OpenSpec Archive
Purpose
Finalize a completed OpenSpec change by moving it to the archive only when it is safe to do so.
This skill is the lifecycle closing step. It should not implement new work or perform complex spec edits unless the user explicitly asks for pre-archive fixes.
When To Invoke
Invoke when the user asks to:
- archive a change
- finalize a completed change
- move a change to
archive/ - complete the OpenSpec lifecycle
- clean up after implementation and spec sync
Inputs
Useful inputs include:
- change name
- whether incomplete tasks are accepted
- whether spec sync should be required before archive
- archive date or default current date
Repository Files
This skill reads:
openspec/changes/<change-name>/tasks.mdopenspec/changes/<change-name>/proposal.mdopenspec/changes/<change-name>/design.mdopenspec/changes/<change-name>/specs/**/spec.mdopenspec/specs/**/spec.md
This skill moves:
openspec/changes/<change-name>/- to
openspec/changes/archive/YYYY-MM-DD-<change-name>/
Procedure
- Identify the target change.
- Check whether the change is already archived.
- Inspect
tasks.mdfor incomplete items. - Check whether approved change specs still need syncing.
- Verify no obvious artifact contradiction remains.
- Ask for confirmation if tasks are incomplete or sync is skipped.
- Move the change directory into archive.
- Report the archive path and final status.
Decision Rules
- Do not archive incomplete tasks unless the user explicitly accepts them.
- Do not archive when required spec sync is pending unless the user explicitly skips it.
- If the archive target already exists, ask before choosing a new path.
- If the change is already archived, report that state instead of moving it again.
Guardrails
- Do not delete change history.
- Do not silently skip unresolved work.
- Do not implement feature code.
- Do not perform broad spec rewrites.
- Preserve archive path clarity with a date prefix.
Output Format
Using change: <change-name>
Status: ready-to-archive
Archived to:
- openspec/changes/archive/YYYY-MM-DD-<change-name>/
Skipped or warnings:
- <item or none>
Next action: <recommended next step>
Examples
User: "Archive add-user-auth."
Action: check tasks and spec sync state, then move the change to the dated archive directory if safe.