Overview
The/sdd-archive command finalizes a completed change by merging delta specs into the main specs (source of truth) and moving the change folder to the archive. This closes the SDD cycle.
Usage
string
Optional. The change to archive. If omitted, archives the most recent verified change.
What It Does
1. Validates Readiness
Checks prerequisites:- ✓ Verification report exists?
- ✓ Verification status is PASS or PASS WITH WARNINGS?
- ✓ No CRITICAL issues?
- ✓ All MUST/SHALL requirements met?
2. Merges Delta Specs
Syncs change specs into main specs:- ADDED specs
- MODIFIED specs
- REMOVED specs
Copies new spec files to main specs directory:
3. Moves to Archive
Relocates the change folder with timestamp:- Proposal
- Exploration
- Specs (delta)
- Design
- Tasks
- Verification report
4. Generates Archive Report
Creates a summary:- Change name and date
- Specs merged
- Files affected
- Audit trail reference
Example Output
Successful Archive
Archive with Warnings
Archive Structure
The archive preserves complete change history:Delta Spec Merging
The archiver intelligently merges specs:ADDED Requirements
Change spec:MODIFIED Requirements
Change spec:REMOVED Requirements
Change spec:When to Use
After Verification
Run after
/sdd-verify passes successfullyChange Complete
All code written, tested, and reviewed
Before Deployment
Close the change before deploying to production
Cycle Completion
Final step in the SDD workflow
Archive Checklist
Before archiving, confirm:✓ Verification passed
✓ Verification passed
-
/sdd-verifyrun successfully - Status is PASS or PASS WITH WARNINGS
- No CRITICAL issues
- All tests passing
✓ Implementation complete
✓ Implementation complete
- All tasks marked done
- Code reviewed (if team process)
- No TODOs (or documented as follow-up)
- Ready to deploy
✓ Specs accurate
✓ Specs accurate
- Delta specs reflect actual changes
- No placeholder content
- Scenarios match implementation
✓ Documentation updated
✓ Documentation updated
- README updated if needed
- API docs updated if needed
- Migration guide written if needed
Rollback After Archive
If you need to revert an archived change:1
Find archive
2
Read rollback plan
3
Revert code changes
Use git to revert commits or manually undo changes
4
Revert spec changes
Manually undo spec merges (ADDED → delete, MODIFIED → restore previous)
Spec Sync Behavior
How specs are synced:Archive Reports
The archive report includes:Related Commands
- /sdd-verify - Always verify before archiving
- /sdd-apply - Implement before archiving
- /sdd-new - Start the next change