SuperAPI AI Directory

sdd-archive

Coding & development

View repository

Updated 10-15 21:41

About this skill

sdd-archive

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 if mem_search returns 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 to mem_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>), THEN mem_save a pointer with topic_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.md and 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, retry mem_save once before blocking. The move uses Write("docs/sdd/_archived/<change>-archive-report.md", ...); deletion uses git rm -r docs/sdd/<change>/ then rm -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 with model: fable (orchestrator substitutes sonnet per the model-fallback chain). All other sub-steps remain on model: haiku. Created artifacts reach ~/.claude/ only after a manual install.sh run.
  • Orchestrator output — return the neutral Output Contract as the JSON block the orchestrator expects; artifacts carries engram:sdd/{change-name}/archive-report.