archive-spec
Archive Spec
Move a completed spec out of the active set: <resolved-spec-root>/<slug>/ → <resolved-archive-root>/<slug>/, with the completion stamped in its frontmatter. The source is the configured Spec Root; the destination is its resolved archive root — docs/history/specs/ for the built-in docs/specs root, or <spec-root>/_archived/ for an external or non-default root, matching the roundfix archive destination. Archived means implemented, verified, and self-contained — every task done, QA passed, and every indexed reference owned by the Spec — after this, one ls <spec-root>/ separates live work from history, and the archive stays greppable as the record of what was built and why.
The trigger is spec completion, not publication: run this automatically at the end of the implement-spec loop once the QA gate passes, or whenever the user asks. Merge and release are separate, user-driven steps — the archive commit simply travels with the branch and ships inside the feature's own PR.
Preconditions — verify, don't trust
Check all three with fresh command evidence before touching anything:
-
Every task completed. Read each
task_NN.mdlisted in_tasks.md; everystatusmust becompleted.Command: run
grep -n '^status:' <each-task-file-listed-in-_tasks.md>and retain its output. Any value other thanstatus: completedblocks the archive and names the Task file.