dot_config/opencode/skills/sdd-archive/SKILL.md
Sync delta specs to main specs and archive a completed change. Trigger: When the orchestrator launches you to archive a change after implementation and verification.
npx skillsauth add adacosdev/dotfiles sdd-archiveInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a sub-agent responsible for ARCHIVING. You merge delta specs into the main specs (source of truth), then move the change folder to the archive. You complete the SDD cycle.
From the orchestrator:
engram | openspec | hybrid | none)Read and follow skills/_shared/persistence-contract.md for mode resolution rules.
If mode is engram:
Read ALL artifacts (two-step for each — search returns truncated previews):
mem_search(query: "sdd/{change-name}/proposal", project: "{project}") → get IDmem_get_observation(id: {id}) → full proposalmem_search(query: "sdd/{change-name}/spec", project: "{project}") → get IDmem_get_observation(id: {id}) → full specmem_search(query: "sdd/{change-name}/design", project: "{project}") → get IDmem_get_observation(id: {id}) → full designmem_search(query: "sdd/{change-name}/tasks", project: "{project}") → get IDmem_get_observation(id: {id}) → full tasksmem_search(query: "sdd/{change-name}/verify-report", project: "{project}") → get IDmem_get_observation(id: {id}) → full verification reportRecord all observation IDs — include them in the archive report for full traceability.
Save your artifact:
mem_save(
title: "sdd/{change-name}/archive-report",
topic_key: "sdd/{change-name}/archive-report",
type: "architecture",
project: "{project}",
content: "{your archive report with all observation IDs for lineage}"
)
topic_key enables upserts — saving again updates, not duplicates.
(See skills/_shared/engram-convention.md for full naming conventions.)
If mode is openspec: Read and follow skills/_shared/openspec-convention.md. Perform merge and archive folder moves.
If mode is hybrid: Follow BOTH conventions — persist archive report to Engram (with observation IDs) AND perform filesystem merge + archive folder moves.
If mode is none: Return closure summary only. Do not perform archive file operations.
Do this FIRST, before any other work.
mem_search(query: "skill-registry", project: "{project}") → if found, mem_get_observation(id) for the full registry.atl/skill-registry.md from the project rootFrom the registry, identify and read any skills whose triggers match your task. Also read any project convention files listed in the registry.
IF mode is engram: Skip filesystem sync — artifacts live in Engram only. The archive report (Step 5) records all observation IDs for traceability.
IF mode is none: Skip — no artifacts to sync.
IF mode is openspec or hybrid: For each delta spec in openspec/changes/{change-name}/specs/:
openspec/specs/{domain}/spec.md)Read the existing main spec and apply the delta:
FOR EACH SECTION in delta spec:
├── ADDED Requirements → Append to main spec's Requirements section
├── MODIFIED Requirements → Replace the matching requirement in main spec
└── REMOVED Requirements → Delete the matching requirement from main spec
Merge carefully:
The delta spec IS a full spec (not a delta). Copy it directly:
# Copy new spec to main specs
openspec/changes/{change-name}/specs/{domain}/spec.md
→ openspec/specs/{domain}/spec.md
IF mode is engram: Skip — there are no openspec/ directories to move. The archive report in Engram serves as the audit trail.
IF mode is none: Skip — no filesystem operations.
IF mode is openspec or hybrid: Move the entire change folder to archive with date prefix:
openspec/changes/{change-name}/
→ openspec/changes/archive/YYYY-MM-DD-{change-name}/
Use today's date in ISO format (e.g., 2026-02-16).
IF mode is openspec or hybrid: Confirm:
IF mode is engram: Confirm all artifact observation IDs are recorded in the archive report.
IF mode is none: Skip verification — no persisted artifacts.
This step is MANDATORY — do NOT skip it.
If mode is engram:
mem_save(
title: "sdd/{change-name}/archive-report",
topic_key: "sdd/{change-name}/archive-report",
type: "architecture",
project: "{project}",
content: "{your archive report with all observation IDs for lineage}"
)
If mode is openspec or hybrid: the file was already written in Step 3.
If mode is hybrid: also call mem_save as above (write to BOTH backends).
Return to the orchestrator:
## Change Archived
**Change**: {change-name}
**Archived to**: `openspec/changes/archive/{YYYY-MM-DD}-{change-name}/` (openspec/hybrid) | Engram archive report (engram) | inline (none)
### Specs Synced
| Domain | Action | Details |
|--------|--------|---------|
| {domain} | Created/Updated | {N added, M modified, K removed requirements} |
### Archive Contents
- proposal.md ✅
- specs/ ✅
- design.md ✅
- tasks.md ✅ ({N}/{N} tasks complete)
### Source of Truth Updated
The following specs now reflect the new behavior:
- `openspec/specs/{domain}/spec.md`
### SDD Cycle Complete
The change has been fully planned, implemented, verified, and archived.
Ready for the next change.
openspec/changes/archive/ doesn't exist, create itrules.archive from openspec/config.yamlstatus, executive_summary, detailed_report (optional), artifacts, next_recommended, and risksdocumentation
Create or update the skill registry for the current project. Scans user skills and project conventions, writes .atl/skill-registry.md, and saves to engram if available. Trigger: When user says "update skills", "skill registry", "actualizar skills", "update registry", or after installing/removing skills.
documentation
Creates new AI agent skills following the Agent Skills spec. Trigger: When user asks to create a new skill, add agent instructions, or document patterns for AI.
testing
Validate that implementation matches specs, design, and tasks. Trigger: When the orchestrator launches you to verify a completed (or partially completed) change.
testing
Break down a change into an implementation task checklist. Trigger: When the orchestrator launches you to create or update the task breakdown for a change.