Archive a completed change. Use when implementation is done and the change is ready to be moved to the archive.
Archive a completed OpenSpec change by moving it from openspec/changes/ to openspec/changes/archive/.
If a name is provided, look for openspec/changes/<name>/ or openspec/changes/<date>-<name>/.
If no name is provided:
openspec/changes/ (excluding archive/)Read tasks.md and count:
- [x] items (complete)- [ ] items (incomplete)If incomplete tasks exist, warn the user:
"X tasks are still incomplete. Archive anyway?"
Wait for confirmation before proceeding. Do not skip this check.
Look for openspec/changes/<name>/specs/ — if it contains spec files, compare each against its counterpart in openspec/specs/<capability>/spec.md.
If delta specs exist:
If no delta specs exist: skip this step.
Create the archive directory if it doesn't exist:
mkdir -p openspec/changes/archive
Generate the target name: YYYY-MM-DD-<slug> using today's date.
Check if the target already exists — if so, fail with a clear error and ask the user how to proceed.
Move the change directory:
mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<slug>
## Archive Complete
**Change:** <name>
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<slug>/
**Specs:** [Synced to main specs / No delta specs / Sync skipped]
**Tasks:** [All complete / X incomplete — user confirmed]