spec-driven-archive
You are helping the user archive a completed spec-driven change.
Prerequisites
The .spec-driven/ directory must exist at the project root. Before proceeding, verify:
ls .spec-driven/
If this fails, the project is not initialized. Run /spec-driven-init first.
Steps
-
Select the change — run
node {{SKILL_DIR}}/scripts/spec-driven.js modifyto list active changes. Ask which change to archive. If already specified, use it. -
Check for incomplete tasks — run:
node {{SKILL_DIR}}/scripts/spec-driven.js apply <name>If
remaining > 0, stop — archiving is not allowed until all tasks are complete. List the incomplete tasks and suggest/spec-driven-apply <name>or/spec-driven-cancel <name>. -
Merge delta specs — list all files in
.spec-driven/changes/<name>/specs/:- If
specs/is empty: ask the user to confirm this change has no observable spec impact before continuing. - For each delta file (e.g.
specs/install/install-behavior.md), merge into the corresponding main spec file (e.g..spec-driven/specs/install/install-behavior.md):- ADDED: append the
### Requirement:blocks to the target file (create it if it doesn't exist) - MODIFIED: locate the existing
### Requirement: <name>block by name and replace it in place - REMOVED: locate the
### Requirement: <name>block by name and delete it; remove the file if it becomes empty
- ADDED: append the
- Briefly summarize what changed in
specs/after merging.
- If
-
Update specs/INDEX.md — after merging, update
.spec-driven/specs/INDEX.md:- Add entries for any newly created spec files (with a one-line description)
- Remove entries for any deleted spec files
- Leave existing entries unchanged unless the file's scope changed
-
Archive the change — run:
node {{SKILL_DIR}}/scripts/spec-driven.js archive <name>This moves the entire change directory (including questions.md) to the archive.
-
Confirm — report the result:
- Where the change was moved to (e.g.
.spec-driven/changes/archive/2024-01-15-<name>/) - Suggest running
/spec-driven-proposeif there's follow-up work
- Where the change was moved to (e.g.
Rules
- Always check for incomplete tasks before archiving
- Never archive a change with incomplete tasks
- Always merge delta specs before archiving — this is a hard gate, not optional
- If
changes/<name>/specs/is empty, require explicit human confirmation that the change has no observable spec impact - Deleting requirements or empty spec files in
.spec-driven/specs/is allowed when applyingREMOVEDdelta entries - Do not delete the change directory manually — archive the change by running the archive command
More from kw12121212/slim-spec-driven
spec-driven-init
Initialize a .spec-driven/ directory in a project. Creates config.yaml, roadmap/, and specs/ scaffold, then guides the user to fill in project context.
15spec-driven-propose
Propose a new spec-driven change. Scaffolds proposal.md, specs/ delta files, design.md, tasks.md, and questions.md for a named change, populated with project context.
15spec-driven-auto
Run the full spec-driven workflow automatically. Proposes, implements, verifies, reviews, and archives a change with one mandatory proposal checkpoint plus any extra confirmations required by blocking conditions.
14spec-driven-verify
Verify a spec-driven change is complete and correctly implemented. Checks task completion, implementation evidence, and spec alignment.
14spec-driven-review
Review the code quality of a spec-driven change. Checks readability, security, performance, and best practices before archiving.
14spec-driven-apply
Implement the tasks in a spec-driven change. Works through incomplete tasks one by one, marking each complete as it goes.
14