Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
64
76%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./skills/openspec-archive-change/SKILL.mdArchive a completed change in the experimental workflow.
Store selection: If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run openspec store list --json to discover registered store ids, then pass --store <id> on the commands that read or write specs and changes (new change, status, instructions, list, show, validate, archive, doctor, context). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local openspec/ root.
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 usedplanningHome, changeRoot, artifactPaths, and actionContext: path and scope contextartifacts: List of artifacts with their status (done, skipped, or other)If any artifacts are neither done nor skipped (skipped artifacts satisfy the requirement - the change declares skip_specs):
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.
Assess delta spec sync state
Use artifactPaths.specs.existingOutputPaths from status JSON to check for delta specs. If none exist, proceed without sync prompt.
If delta specs exist:
<planningHome.root>/openspec/specs/<capability>/spec.md (use the store-aware planningHome.root from step 2, not a hardcoded repo path)Prompt options:
Route on the answer:
To sync, run the openspec-sync-specs workflow inline (agent-driven intelligent merge) for change '', passing the delta spec analysis from above, and wait for it to finish. Do not delegate it to a background task — step 5 would move changeRoot out from under a sync that is still reading it, leaving the change archived and the main specs never updated. If your agent can only run it by delegation, delegate synchronously and wait for the result.
Then re-run the comparison from the top of this step against every capability that has a delta spec in artifactPaths.specs.existingOutputPaths — not only the ones the sync reports it touched. A successful sync leaves nothing left to apply, so each capability must now read as already synced:
If the sync failed, or any capability does not match, report what differs and stop — do not archive. Nothing has moved and changeRoot is intact, so the user can fix the mismatch or re-run the sync and start the archive again.
Perform the archive
Create an archive directory under planningHome.changesDir if it doesn't exist:
mkdir -p "<planningHome.changesDir>/archive"Generate the target name: use the change name as-is when it already starts with a YYYY-MM-DD- prefix; otherwise prepend the current date as YYYY-MM-DD-<change-name>. Never stack a second date (same rule as openspec archive).
Check if target already exists:
changeRoot to the archive directorymv "<changeRoot>" "<planningHome.changesDir>/archive/<target-name>"Display summary
Show archive completion summary including:
Output On Success
## Archive Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** the archive path derived from `planningHome.changesDir`/<target-name>/
**Specs:** <"✓ Synced to main specs" only if the step 4 verification passed; otherwise "No delta specs" or "Sync skipped">
<"All artifacts complete. All tasks complete." — or, if archived with warnings, list them instead (e.g. "Archived with 2 incomplete tasks")>Guardrails
openspec-sync-specs workflow inline (agent-driven)changeRoot6a5171e
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.