Closes a completed SDD change and persists an archive report.
Triggers: /sdd-archive <change-name>, archive change, finalize sdd cycle, close change, sdd archive
Purpose
Archiving is the final step of the SDD cycle. It validates completeness, saves a closure record, and updates the project memory layer. It is irreversible — I confirm with the user before executing.
Skill resolution
Project-local → global, in order:
1. .claude/skills/sdd-archive/SKILL.md (project-local — highest priority)
2. ~/.claude/skills/sdd-archive/SKILL.md (global catalog — fallback)
See docs/SKILL-RESOLUTION.md for the full algorithm.
Claude execution wiring
These notes bind the tool-neutral logic above to the Claude Code harness. They are the EXECUTION layer that does not port to other tools.
- Completeness / legacy fallback — disk existence is primary. If a disk file
is absent, fall back to
mem_search(query: "sdd/{change-name}/{type}"); an artifact counts as present ifmem_searchreturns results. - Verify-report read — use the harness
Read("docs/sdd/{change-name}/verify-report.md"). If the disk file is absent (legacy change), fall back tomem_search(query: "sdd/{change-name}/verify-report")→mem_get_observation(id). - Step 4 closure persistence — disk FIRST via
Write("docs/sdd/{change-name}/archive-report.md", <closure summary>), THENmem_savea pointer withtopic_key: sdd/{change-name}/archive-report,type: architecture,project: {project}. If Engram MCP is unreachable, write the disk artifact only and skip the engram pointer. - Step 5 memory update — read
~/.claude/skills/memory-manage/SKILL.mdand run the/memory-manage"update" process inline; failures are non-blocking. - Step 6 precondition (a) — call
mem_search(topic_key: "sdd/<change>/archive-report", project: <canonical-project>); on miss, retrymem_saveonce before blocking. The move usesWrite("docs/sdd/_archived/<change>-archive-report.md", ...); deletion usesgit rm -r docs/sdd/<change>/thenrm -rf docs/sdd/<change>/. - Capable-tier delegation — the lightweight tier is
model: haiku. The artifact-creation sub-step (Step 3) MUST DELEGATE to a fresh sub-agent launched withmodel: fable(orchestrator substitutessonnetper the model-fallback chain). All other sub-steps remain onmodel: haiku. Created artifacts reach~/.claude/only after a manualinstall.shrun. - Orchestrator output — return the neutral Output Contract as the JSON block
the orchestrator expects;
artifactscarriesengram:sdd/{change-name}/archive-report.