with one click
openspec-archive-change
// 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. Use when the user wants to finalize and archive a change after implementation is complete.
Build and troubleshoot native Node.js addons using node-gyp. Use when working with native addon compilation, binding.gyp configuration, NODE_MODULE_VERSION mismatch errors, Electron native module rebuilds, or packages like bcrypt, node-sass, sqlite3, sharp. Covers platform-specific build setup (Linux/macOS/Windows), N-API configuration, cross-compilation, and pre-built binary distribution.
Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
Continue working on an OpenSpec change by creating the next artifact. Use when the user wants to progress their change, create the next artifact, or continue their workflow.
Fast-forward through OpenSpec artifact creation. Use when the user wants to quickly create all artifacts needed for implementation without stepping through each one individually.
Start a new OpenSpec change using the experimental artifact workflow. Use when the user wants to create a new feature, fix, or modification with a structured step-by-step approach.
Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.
| name | openspec-archive-change |
| description | 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, 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.
Check if delta specs need syncing
Check if specs/ directory exists in the change with spec files.
If delta specs exist, perform a quick sync check:
a. For each delta spec at openspec/changes/<name>/specs/<capability>/spec.md:
### Requirement: <name>)b. Check corresponding main spec at openspec/specs/<capability>/spec.md:
c. Report findings:
If sync needed:
⚠️ Delta specs may not be synced:
- specs/auth/spec.md → Main spec missing requirement "Token Refresh"
- specs/api/spec.md → Main spec doesn't exist yet
Would you like to sync now before archiving?
If already synced (all requirements found):
If no delta specs exist: Proceed without sync-related checks.
Perform the archive
Create the archive directory if it doesn't exist:
mkdir -p openspec/changes/archive
Generate target name using current date: YYYY-MM-DD-<change-name>
Check if target already exists:
mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
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 "⚠️ Not synced")
All artifacts complete. All tasks complete.
Guardrails