with one click
corgispec-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.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | corgispec-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. |
| license | MIT |
| compatibility | Requires openspec CLI. |
| metadata | {"author":"openspec","version":"1.0","generatedBy":"1.3.0"} |
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
Select change and resolve worktree
Read openspec/config.yaml for isolation settings.
If isolation.mode: worktree: Changes live inside worktrees, not the main checkout. Read references/worktree-discovery.md for the full discovery procedure. Quick summary:
openspec list --json — if it returns changes, use them<isolation.root>/ directories, verify each with git worktree list and check openspec/changes/<name>/ exists insideIf no isolation: openspec list --json directly. Auto-select if one, prompt if multiple.
If name provided by user, use it directly.
If isolation.mode is none or missing: continue as today.
Check artifact completion status
Run openspec status --change "<name>" --json and warn if artifacts are incomplete.
Check task completion status
Read tasks.md if it exists. Warn if incomplete tasks remain.
Assess delta spec sync state
Check for delta specs at openspec/changes/<name>/specs/ and prompt whether to sync before archive.
4.5 Update GitLab issues (if tracked)
Read openspec/changes/<name>/.gitlab.yaml BEFORE archiving moves it.
If tracking exists:
glab issue view <child_iid> --output json | jq -r '.labels[]'
If the child already has workflow::done, skip the label change for that child.
If the child has none of workflow::todo, workflow::in-progress, or workflow::review, STOP and report:
"⚠️ Child issue #<child_iid> has unexpected labels: <actual labels>. Aborting."
Otherwise proceed:
glab issue update <child_iid> --unlabel "workflow::todo,workflow::in-progress,workflow::review" --label "workflow::done"
Note: Do NOT close the issue. Closing removes issues from board label columns.glab issue note <parent_iid> --message "Change '<name>' archived. All groups done. Specs synced: <yes/no/skipped>."
glab issue view <parent_iid> --output json | jq -r '.labels[]'
Confirm workflow::backlog is present. If not, STOP and report:
"⚠️ Expected label workflow::backlog on parent issue but found: <actual labels>. Aborting label change."glab issue update <parent_iid> --unlabel "workflow::backlog" --label "workflow::done"
If glab is unavailable or .gitlab.yaml is missing, skip silently.
4.7 Extract long-term memory (if memory structure exists)
If memory/ and wiki/ directories exist in the project root:
wiki/patterns/, creates a session summary at wiki/sessions/<name>.md, updates wiki/hot.md lifecycle, resets memory/session-bridge.md, and updates wiki/index.mdmemory/ or wiki/ do not exist, skip this step silently (project may not use memory layer)Perform the archive
Create openspec/changes/archive/ if it does not exist and move the change to openspec/changes/archive/YYYY-MM-DD-<name>.
5.5 Clean up worktree (if isolation active)
If worktree isolation is active (from step 1.3) and the worktree exists:
git worktree remove <worktree-path> --force
<branch_name> remains for the user to merge via MR.Worktree removed. Branch <branch_name> preserved — create an MR to merge it, or run \git branch -d <branch_name>` to discard.`Display summary
Show:
Output On Success
## Archive Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
**Specs:** synced / skipped / no delta specs
**GitLab:** parent and child issues moved to done (open, not closed)
**Worktree:** removed (branch `<branch-name>` preserved) / not applicable
Guardrails
openspec status --json for completion checking.openspec.yaml and .gitlab.yaml by moving the full directory