with one click
cdd-close
// Close and archive a completed change. Confirms all tasks are done, promotes durable learnings, then runs cdd-kit archive. Args: <change-id>
// Close and archive a completed change. Confirms all tasks are done, promotes durable learnings, then runs cdd-kit archive. Args: <change-id>
| name | cdd-close |
| description | Close and archive a completed change. Confirms all tasks are done, promotes durable learnings, then runs cdd-kit archive. Args: <change-id> |
A change is "done" when:
cdd-kit gate <change-id> exits 0)contracts/ or project guidance (CLAUDE.md/CODEX.md)This skill drives steps 2–3 and physically moves the change to specs/archive/.
contracts/, source files, tests, CI config, CLAUDE.md, CODEX.md.specs/changes/<change-id>/ directory while the change is open.specs/archive/ after close.Cold data is historical evidence, not current requirements. Do not promote claims from old specs or archive prose unless they are backed by agent-log evidence, QA evidence, changed contracts, changed tests, or passing gates from this change.
The skill argument is the change-id (e.g., add-jwt-auth).
If not provided, ask: "Which change-id do you want to close?"
If the user wants to abandon this change (not close as complete):
cdd-kit abandon <change-id> --reason "<reason>"
This marks tasks.yml as status: abandoned and records it in specs/archive/INDEX.md. The directory is preserved for git history. Do NOT run the rest of this skill after abandoning.
Run: cdd-kit gate <change-id>
If gate fails: stop and report failures. Do NOT archive a change that hasn't passed gate.
Exception: if tasks.yml contains status: gate-blocked, ask the user: "This change was gate-blocked. Abandon it? (yes/no)". If yes, run cdd-kit abandon <change-id> --reason "gate-blocked after 3 attempts" and stop.
Read specs/changes/<change-id>/tasks.yml.
Check section 7:
7.1 Archive change — will be ticked after Step 47.2 Promote durable learnings to contracts or project guidance — must be done NOWIf 7.2 is [ ], proceed to Step 2.5. If already [x] or [-], skip Steps 2.5 and 3.
Read only active evidence for this change:
specs/changes/<change-id>/agent-log/ (all log files)specs/changes/<change-id>/qa-report.md (if exists)specs/changes/<change-id>/ci-gates.mdspecs/changes/<change-id>/context-manifest.mdspecs/changes/<change-id>/tasks.ymlDo not read specs/archive/ while closing a change. Historical archives are cold data and must not be used as current requirements.
Synthesize a specs/changes/<change-id>/archive.md file with:
This file records the close-out evidence, but Step 3 promotion must still be evidence-gated. Archive prose alone is not enough to change hot data.
General agents do not perform durable learning promotion during /cdd-new; they
only record evidence and findings in artifacts and agent-log/*.yml. Durable
learning promotion happens here, during /cdd-close Step 3, and main Claude
owns the final writes.
Read specs/changes/<change-id>/archive.md section ## Lessons Promoted to Standards and cross-check every proposed lesson against agent-log, QA report, contract/test changes, or gate evidence from this change.
Classify each candidate:
CLAUDE.md and/or CODEX.md.If there are lessons to promote, invoke contract-reviewer with:
After contract-reviewer responds:
CLAUDE.md and/or CODEX.md only if it is provider/project guidance, not product behaviorcdd-kit validate --contracts to confirm contract format is preservedcdd-kit context-scan so future classifiers see updated hot context indexes## Lessons Promoted to Standards in archive.md with what was promoted, where, and evidence path7.2 to status: done in tasks.ymlIf there are no lessons to promote, mark 7.2 as status: skipped with rationale.
Run: cdd-kit archive <change-id>
If successful, set task 7.1 to status: done in tasks.yml (the file is now in specs/archive/, update it there):
specs/archive/<year>/<change-id>/tasks.yml — change 7.1 from status: pending to status: done.
## /cdd-close complete
Change ID: <change-id>
Archived to: specs/archive/<year>/<change-id>/
Learnings promoted: <list what was added to contracts/ or project guidance (CLAUDE.md/CODEX.md), or "none">
specs/changes/<change-id>/ has been removed from the active surface.
Token cost of future sessions reduced by ~<N> files.
specs/archive/ as hot requirementscontracts/; agent workflow guidance belongs in CLAUDE.md and/or CODEX.md[HINT] Download the complete skill directory including SKILL.md and all related files