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
Resolve change name
If a change name was provided, use it.
If no change name was provided:
- First, try to infer the change name from the conversation context.
- If exactly one active change can be confidently inferred, auto-select it.
- If inference is vague, ambiguous, or no active change can be inferred, run
openspec list --json to get available changes and use the AskUserQuestion tool to let the user select.
When prompting, show only active changes (not already archived) and include the schema used for each change if available.
IMPORTANT: Do NOT guess or auto-select a change when inference is vague or ambiguous. Always let the user choose in that case.
Check artifact completion status
Run openspec status --change "<name>" --json to check artifact completion.
Parse the JSON to understand:
schemaName: The workflow being used
planningHome, changeRoot, artifactPaths, and actionContext: path and scope context
artifacts: List of artifacts with their status (done or other)
If status reports actionContext.mode: "workspace-planning", explain that workspace archive is not supported in this slice and STOP. Do not move workspace changes into repo-local archives or edit linked repos.
If any artifacts are not done:
- Display warning listing incomplete artifacts
- Use AskUserQuestion tool to confirm user wants to proceed
- Proceed if user confirms
Check task completion status
Derive the actual task artifact path from the OpenSpec metadata (for example, from openspec status --change "<name>" --json or openspec instructions archive --change "<name>" --json output, or from contextFiles) before reading the file and counting checkboxes.
Count tasks marked with - [ ] (incomplete) vs - [x] (complete).
If incomplete tasks found:
- Display warning showing count of incomplete tasks
- Use AskUserQuestion tool to confirm user wants to proceed
- Proceed if user confirms
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:
- Compare each delta spec with its corresponding main spec at
openspec/specs/<capability>/spec.md
- Determine what changes would be applied (adds, modifications, removals, renames)
- Show a combined summary before prompting
Prompt options:
- If changes needed: "Sync now (recommended)", "Archive without syncing"
- If already synced: "Archive now", "Sync anyway", "Cancel"
If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke openspec-sync-specs for change ''. Delta spec analysis: "). Proceed to archive regardless of choice.
Perform the archive
Create an archive directory under planningHome.changesDir if it doesn't exist:
mkdir -p "<planningHome.changesDir>/archive"
Generate target name using current date: YYYY-MM-DD-<change-name>
Check if target already exists:
- If yes: Fail with error, suggest renaming existing archive or using different date
- If no: Move
changeRoot to the archive directory
mv "<changeRoot>" "<planningHome.changesDir>/archive/YYYY-MM-DD-<name>"
Display summary
Show archive completion summary including:
- Change name
- Schema that was used
- Archive location
- Whether specs were synced (if applicable)
- Note about any warnings (incomplete artifacts/tasks)
Output On Success
## Archive Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/
**Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
All artifacts complete. All tasks complete.
Guardrails
- Prompt for change selection only when the change name is not provided and cannot be inferred, or when inference is ambiguous
- Use artifact graph (openspec status --json) for completion checking
- Don't block archive on warnings - just inform and confirm
- Preserve .openspec.yaml when moving to archive (it moves with the directory)
- Show clear summary of what happened
- If sync is requested, use openspec-sync-specs approach (agent-driven)
- If delta specs exist, always run the sync assessment and show the combined summary before prompting
Source: Ardakilic/lilt — distributed by TomeVault.
1---2name: openspec-archive-change-33description: Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete. Use when this capability is needed.4---56Archive a completed change in the experimental workflow.78**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.910**Steps**11121. **Resolve change name**1314 If a change name was provided, use it.1516 If no change name was provided:17 - First, try to infer the change name from the conversation context.18 - If exactly one active change can be confidently inferred, auto-select it.19 - If inference is vague, ambiguous, or no active change can be inferred, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select.2021 When prompting, show only active changes (not already archived) and include the schema used for each change if available.2223 **IMPORTANT**: Do NOT guess or auto-select a change when inference is vague or ambiguous. Always let the user choose in that case.24252. **Check artifact completion status**2627 Run `openspec status --change "<name>" --json` to check artifact completion.2829 Parse the JSON to understand:30 - `schemaName`: The workflow being used31 - `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context32 - `artifacts`: List of artifacts with their status (`done` or other)3334 If status reports `actionContext.mode: "workspace-planning"`, explain that workspace archive is not supported in this slice and STOP. Do not move workspace changes into repo-local archives or edit linked repos.3536 **If any artifacts are not `done`:**37 - Display warning listing incomplete artifacts38 - Use **AskUserQuestion tool** to confirm user wants to proceed39 - Proceed if user confirms40413. **Check task completion status**4243 Derive the actual task artifact path from the OpenSpec metadata (for example, from `openspec status --change "<name>" --json` or `openspec instructions archive --change "<name>" --json` output, or from `contextFiles`) before reading the file and counting checkboxes.4445 Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).4647 **If incomplete tasks found:**48 - Display warning showing count of incomplete tasks49 - Use **AskUserQuestion tool** to confirm user wants to proceed50 - Proceed if user confirms5152 **If no tasks file exists:** Proceed without task-related warning.53544. **Assess delta spec sync state**5556 Use `artifactPaths.specs.existingOutputPaths` from status JSON to check for delta specs. If none exist, proceed without sync prompt.5758 **If delta specs exist:**59 - Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`60 - Determine what changes would be applied (adds, modifications, removals, renames)61 - Show a combined summary before prompting6263 **Prompt options:**64 - If changes needed: "Sync now (recommended)", "Archive without syncing"65 - If already synced: "Archive now", "Sync anyway", "Cancel"6667 If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke openspec-sync-specs for change '<name>'. Delta spec analysis: <include the analyzed delta spec summary>"). Proceed to archive regardless of choice.68695. **Perform the archive**7071 Create an `archive` directory under `planningHome.changesDir` if it doesn't exist:72 ```bash73 mkdir -p "<planningHome.changesDir>/archive"74 ```7576 Generate target name using current date: `YYYY-MM-DD-<change-name>`7778 **Check if target already exists:**79 - If yes: Fail with error, suggest renaming existing archive or using different date80 - If no: Move `changeRoot` to the archive directory8182 ```bash83 mv "<changeRoot>" "<planningHome.changesDir>/archive/YYYY-MM-DD-<name>"84 ```85866. **Display summary**8788 Show archive completion summary including:89 - Change name90 - Schema that was used91 - Archive location92 - Whether specs were synced (if applicable)93 - Note about any warnings (incomplete artifacts/tasks)9495**Output On Success**9697```98## Archive Complete99100**Change:** <change-name>101**Schema:** <schema-name>102**Archived to:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/103**Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")104105All artifacts complete. All tasks complete.106```107108**Guardrails**109- Prompt for change selection only when the change name is not provided and cannot be inferred, or when inference is ambiguous110- Use artifact graph (openspec status --json) for completion checking111- Don't block archive on warnings - just inform and confirm112- Preserve .openspec.yaml when moving to archive (it moves with the directory)113- Show clear summary of what happened114- If sync is requested, use openspec-sync-specs approach (agent-driven)115- If delta specs exist, always run the sync assessment and show the combined summary before prompting116117---118> Source: [Ardakilic/lilt](https://github.com/Ardakilic/lilt) — distributed by [TomeVault](https://tomevault.io).119<!-- tomevault:4.0:skill_md:2026-06-29 -->