/opsx:archive
Archive a completed change.
Input: Optionally specify change name.
Steps
- •
Select change
If no name provided:
- •Run
openspec list --json - •Use AskUserQuestion tool to let user select
- •Do NOT auto-select
- •Run
- •
Check artifact completion
bashopenspec status --change "<name>" --json
If incomplete artifacts:
- •Display warning
- •Ask user to confirm proceeding
- •
Check task completion
Read tasks.md and count incomplete tasks.
If incomplete tasks:
- •Display warning with count
- •Ask user to confirm proceeding
- •
Perform archive
Create archive directory if needed:
bashmkdir -p openspec/archive
Generate target name:
YYYY-MM-DD-<change-name>Move change to archive:
bashmv openspec/changes/<name> openspec/archive/YYYY-MM-DD-<name>
- •
Display summary
Output
code
## Archive Complete **Change:** <change-name> **Archived to:** openspec/archive/YYYY-MM-DD-<name>/ **Tasks:** X/Y complete All done! Change has been archived.
Guardrails
- •Always prompt for change selection if not provided
- •Don't block archive on warnings - just inform and confirm
- •Show clear summary of what happened