Archive
Archive a completed OpenSpec change after all beads issues are closed.
Claude CodeGeneric
---
name: OpenSpec: Archive
description: Archive a completed OpenSpec change after all beads issues are closed.
category: OpenSpec
tags: [openspec, archive, beads]
---
<!-- OPENSPEC:START -->
**Guardrails**
- Only archive after ALL beads issues for the change are closed.
- Keep changes tightly scoped to the requested outcome.
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
**Steps**
1. Determine the change ID to archive:
- If this prompt already includes a specific change ID (for example inside a `<ChangeId>` block populated by slash-command arguments), use that value after trimming whitespace.
- If the conversation references a change loosely (for example by title or summary), run `openspec list` to surface likely IDs, share the relevant candidates, and confirm which one the user intends.
- Otherwise, review the conversation, run `openspec list`, and ask the user which change to archive; wait for a confirmed change ID before proceeding.
- If you still cannot identify a single change ID, stop and tell the user you cannot archive anything yet.
2. Validate the change ID by running `openspec list` (or `openspec show <id>`) and stop if the change is missing, already archived, or otherwise not ready to archive.
3. Verify beads issues are complete:
- Read `openspec/changes/<id>/tasks.md` to find linked beads issue IDs
- Run `bd show [epic-id]` to verify the epic status
- Run `bd list --status open` and check if any issues related to this change are still open
- If any linked issues are still open, report them and stop—do not archive until all work is complete
```bash
# Check for open issues related to this change
bd list --status open | grep -i "[change-id]"
Run
openspec archive <id> --yesso the CLI moves the change and applies spec updates without prompts (use--skip-specsonly for tooling-only work).Review the command output to confirm the target specs were updated and the change landed in
changes/archive/.Validate with
openspec validate --strictand inspect withopenspec show <id>if anything looks off.Sync beads with git:
bd sync
Reference
- Use
openspec listto confirm change IDs before archiving. - Use
bd list --status closedto verify all related issues are closed. - Inspect refreshed specs with
openspec list --specsand address any validation issues before handing off.
Maintain Archive?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[Archive on getagentictools](https://getagentictools.com/loops/r0man-archive?ref=badge)