Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
Archive a completed change in the experimental workflow.
Input: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
Steps
If no change name provided, prompt for selection
Run openspec list --json to get available changes. Use the AskUserQuestion tool to let the user select.
Show only active changes (not already archived). Include the schema used for each change if available.
IMPORTANT: Do NOT guess or auto-select a change. Always let the user choose.
Check artifact completion status
Run openspec status --change "<name>" --json to check artifact completion.
Parse the JSON to understand:
schemaName: The workflow being usedartifacts: List of artifacts with their status (done or other)If any artifacts are not done:
Check task completion status
Read the tasks file (typically tasks.md) to check for incomplete tasks.
Count tasks marked with - [ ] (incomplete) vs - [x] (complete).
If incomplete tasks found:
If no tasks file exists: Proceed without task-related warning.
Archive via CLI (merges delta specs and moves to archive)
The openspec archive CLI command handles both spec syncing and archiving in one step.
If the change has no delta specs (empty or missing specs/ directory), skip the sync:
openspec archive "<name>" --skip-specs -y
If delta specs exist, let the CLI merge them into openspec/specs/:
openspec archive "<name>" -y
The CLI will:
openspec/specs/<domain>/spec.mdopenspec/changes/archive/YYYY-MM-DD-<name>/If the CLI fails, report the error and stop. Do not attempt a manual move.
Display summary
Show archive completion summary including:
Output On Success
## Archive Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
**Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
All artifacts complete. All tasks complete.
Guardrails
openspec archive CLI command (never manual mv)