openspec-archive-change
Skill246 starsChanged 46 days agoApache-2.0View on GitHub
Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
We split this skill into the rules it gives an agent
26 rules. 5 are common, 9 are distinctive, and 12 are very specific to this project.
5
Common
Most of the 144 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
If a name is provided, use it.
- Very specific: line 28
If ambiguous, run openspec list --json to get available changes and ask the user to select one
- Distinctive: line 30
When prompting, show only active changes (not already archived).
- Very specific: line 33
Always announce: "Using change: <name>" and how to override (e.g., /opsx:archive <other>).
- Distinctive: line 37
After resolving the selected change and planning root, run:
- Distinctive: line 41
Keep the same selected-root flags on this command.
- Distinctive: line 43
If it exits non-zero or returns invalid JSON — for example on an older CLI that does not support this command yet — continue the archive …
- Distinctive: line 53
Keep both fields separate from built-in steps, explicit user choices, resolved paths, CLI checks, and command contracts.
- Very specific: line 64
Run openspec status --change "<name>" --json to check artifact completion.
- Distinctive: line 73
Ask the user to confirm they want to proceed
- Very specific: line 78
Read the tasks file (typically tasks.md) to check for incomplete tasks.
- Very specific: line 91
Use artifactPaths.specs.existingOutputPaths from status JSON as the only delta-spec source.
- Common: line 102
If changes needed: "Sync now (recommended)", "Archive without syncing"
- Common: line 103
If already synced: "Archive now", "Sync anyway", "Cancel"
- Very specific: line 111
Before a selected sync writes any main spec, run openspec instructions specs --change "<name>" --json once with the same selected-root …
- Very specific: line 128
If the sync failed, or any capability does not match, report what differs and stop — do not archive.
- Very specific: line 132
Create an archive directory under planningHome.changesDir if it doesn't exist:
- Common: line 140
If yes: Fail with error, suggest renaming existing archive or using different date
- Very specific: line 141
If no: Move changeRoot to the archive directory
- Very specific: line 171
Use artifact graph (openspec status --json) for completion checking
- Common: line 172
Don't block archive on warnings - just inform and confirm
- Very specific: line 175
If sync is requested, run the openspec-sync-specs workflow inline (agent-driven)
- Very specific: line 176
Never archive while a spec sync is still in flight — run the sync inline and verify the main specs before moving changeRoot
- Common: line 177
If delta specs exist, always run the sync assessment and show the combined summary before prompting
- Distinctive: line 179
Consider every guidance entry and explain any inapplicable or conflicting advice
- Distinctive: line 182
Never copy runtime context, operation guidance, or artifact-rule text verbatim into output files
“Common” is measured: kept by at least 6 in 10 of the 144 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Archive a completed change in the experimental workflow.
Store selection: If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run openspec store list --json to discover registered store ids, then pass --store <id> on the commands that read or write specs and changes (new change, status, instructions, list, show, validate, archive, doctor, context, schemas, view). Once selected, treat --store <id> as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run openspec status --change "<name>" --json --store "<id>", not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local openspec/ root.
<capability-path> is the spec directory relative to specs/ (for example, user-auth or identity/user-auth). Preserve the full path from each delta spec when resolving its main spec.
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 the change
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run
openspec list --jsonto get available changes and ask the user to select one
When prompting, show only active changes (not already archived). Include the schema used for each change if available.
Always announce: "Using change:
<name>" and how to override (e.g.,/opsx:archive <other>).Load current archive inputs before the existing archive checks:
After resolving the selected change and planning root, run:
openspec instructions archive --change "<name>" --jsonKeep the same selected-root flags on this command. This lookup is advisory and optional: it only supplies extra prompt inputs, so it must never block archiving. If it exits non-zero or returns invalid JSON — for example on an older CLI that does not support this command yet — continue the archive workflow with no context and no operation guidance. Do not report an error and do not stop.
A successful response may omit both optional fields. Treat
contextas a required prompt-level input: read and consider it, and apply relevant project facts, conventions, and constraints. TreatoperationGuidanceas optional additive advice: read and consider every entry, and follow entries that are applicable and compatible with the built-in archive workflow.Keep both fields separate from built-in steps, explicit user choices, resolved paths, CLI checks, and command contracts. If context conflicts with one of those controlling inputs, report the conflict and preserve the controlling value. If guidance is inapplicable or conflicts with a controlling input, do not follow it and explain why. Do not infer replacement paths, skipped prompts, or flags from either field, and do not copy their text verbatim into specs, change artifacts, or archive summaries unless the user separately asks for it. These are prompt-level behavior contracts, not enforceable checks.
Check artifact completion status
Run
openspec status --change "<name>" --jsonto check artifact completion.Parse the JSON to understand:
schemaName: The workflow being usedplanningHome,changeRoot,artifactPaths, andactionContext: path and scope contextartifacts: List of artifacts with their status (done,skipped, or other)
If any artifacts are neither
donenorskipped(skipped artifacts satisfy the requirement - the change declares skip_specs):- Display warning listing incomplete artifacts
- Ask the user to confirm they want to proceed
- Proceed if user confirms
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:
- Display warning showing count of incomplete tasks
- Ask the user to confirm they want to proceed
- Proceed if user confirms
If no tasks file exists: Proceed without task-related warning.
Assess delta spec sync state
Use
artifactPaths.specs.existingOutputPathsfrom status JSON as the only delta-spec source. If thespecsentry is missing orexistingOutputPathsis empty, proceed without a sync prompt and do not infer delta specs from other artifacts.If delta specs exist:
- Compare each delta spec with its corresponding main spec at
<planningHome.root>/openspec/specs/<capability-path>/spec.md(use the store-awareplanningHome.rootfrom step 2, not a hardcoded repo path) - 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"
Route on the answer:
- "Cancel" — stop, do not archive
- "Archive without syncing" or "Archive now" — proceed to archive
- "Sync now" or "Sync anyway" — sync, then verify (below)
- Anything else — ask again rather than archiving
Before a selected sync writes any main spec, run
openspec instructions specs --change "<name>" --jsononce with the same selected-root flags. Require a zero exit status and valid artifact-instruction JSON. If the lookup fails or returns invalid JSON, report the error and stop before writing any main spec or moving the change. A valid response with omittedrulesis the no-rules case. Apply returnedrulesonly to the content and form of main specs produced by this merge; do not use them as archive guidance, change CLI behavior, or copy the rule text into any output file.Then run the
openspec-sync-specsworkflow inline (agent-driven intelligent merge) for change '<name>', passing the delta spec analysis and the fetched specs-rule snapshot from above, and wait for it to finish. The inline sync must reuse that snapshot without fetchingspecsinstructions again. Do not delegate it to a background task — step 5 would movechangeRootout from under a sync that is still reading it, leaving the change archived and the main specs never updated. If your agent can only run it by delegation, delegate synchronously and wait for the result.Then re-run the comparison from the top of this step against every capability that has a delta spec in
artifactPaths.specs.existingOutputPaths— not only the ones the sync reports it touched. A successful sync leaves nothing left to apply, so each capability must now read as already synced:- ADDED requirements present
- MODIFIED requirements carrying the scenario and description changes named in the delta, with their other scenarios intact
- REMOVED requirements gone — and where this sync retired a capability (removed its last requirement, leaving
## Requirementsempty), its main spec deleted rather than left empty; a spec the sync deliberately kept and reported is also a match - RENAMED requirements present under the new name and absent under the old one
If the sync failed, or any capability does not match, report what differs and stop — do not archive. Nothing has moved and
changeRootis intact, so the user can fix the mismatch or re-run the sync and start the archive again.- Compare each delta spec with its corresponding main spec at
Perform the archive
Create an
archivedirectory underplanningHome.changesDirif it doesn't exist:mkdir -p "<planningHome.changesDir>/archive"Generate the target name: use the change name as-is when it already starts with a
YYYY-MM-DD-prefix; otherwise prepend the current date asYYYY-MM-DD-<change-name>. Never stack a second date (same rule asopenspec archive).Check if target already exists:
- If yes: Fail with error, suggest renaming existing archive or using different date
- If no: Move
changeRootto the archive directory
mv "<changeRoot>" "<planningHome.changesDir>/archive/<target-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`/<target-name>/
**Specs:** <"✓ Synced to main specs" only if the step 4 verification passed; otherwise "No delta specs" or "Sync skipped">
<"All artifacts complete. All tasks complete." — or, if archived with warnings, list them instead (e.g. "Archived with 2 incomplete tasks")>Guardrails
- Announce the selected change; prompt for selection when it 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, run the
openspec-sync-specsworkflow inline (agent-driven) - Never archive while a spec sync is still in flight — run the sync inline and verify the main specs before moving
changeRoot - If delta specs exist, always run the sync assessment and show the combined summary before prompting
- Apply relevant runtime context and report conflicts; operation guidance remains advisory
- Consider every guidance entry and explain any inapplicable or conflicting advice
- Existing CLI checks, resolved paths, prompts, and command contracts are unchanged
- Artifact rules constrain only the specs being written and are never operation guidance
- Never copy runtime context, operation guidance, or artifact-rule text verbatim into output files
Other versions152 projects use a version of this.
Word for word · 4
- ForceInjection/OpenSpec-practise★ 624100% same
- mzdluo123/webmux★ 13100% same
- davekruse/phaser★ 3100% same
- maarkN/remote-harness★ 2100% same
Edited · 143
- Fission-AI/OpenSpec★ 74k59% same
- halo-dev/halo★ 40k69% same
- alibaba/druid★ 28k59% same
- databasus/databasus★ 9.2k96% same
- RostislavDugin/postgresus★ 9.1k95% same
- fonoster/fonoster★ 8.1k60% same
- fleetdm/fleet★ 7.1k57% same
- PBH-BTN/PeerBanHelper★ 6.3k59% same
- KunAgent/Kun★ 6.3k57% same
- XingYu-Zhong/DeepSeek-GUI★ 6.3k57% same
133 more not listed
Wrote their own version · 5
- studyzy/imewlconverter★ 10ksame name
- studyzy/OpenSpec-cn★ 1.2ksame name
- henhen6/mdp★ 133same name
- beautifulSoup/speccoding-template★ 62same name
- redhat-developer/rhdh-skills★ 19same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use openspec-ff-change, source-command-opsx-apply and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillopenspec-ff-change
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.
Also in 62 projects that use this
antech2-asyncSkillsource-command-opsx-apply
Implement tasks from an OpenSpec change (Experimental)
Also in 5 projects that use this
antech2-asyncSkillsource-command-opsx-archive
Archive a completed change in the experimental workflow
Also in 5 projects that use this
MicrosoftSkillopenspec-onboard
Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.
Also in 59 projects that use this
ElasticSkillopenspec-continue-change
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.
Also in 63 projects that use this
ElasticSkillopenspec-new-change
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.
Also in 62 projects that use this
- +2 more from antech2-async
- +1 more from microsoft
In this repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- cavemanSkill
- design-an-interfaceSkill
- diagnoseSkill
- docouture-authoring-guidesSkill
- docouture-docs-internalsSkill
- docouture-docs-versioningSkill
- docouture-documenting-changesSkill
- docouture-getting-startedSkill
- docouture-writing-docs-pagesSkill
- edit-articleSkill
- git-guardrails-claude-codeSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- improve-codebase-architectureSkill
- migrate-to-shoehornSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- openspec-update-changeSkill
- openspec-verify-changeSkill
- prototypeSkill
- qaSkill
- request-refactor-planSkill
- reviewSkill
- scaffold-exercisesSkill
- setup-matt-pocock-skillsSkill
- setup-pre-commitSkill
- tddSkill
- teachSkill
- to-issuesSkill
- to-prdSkill
- triageSkill
- ubiquitous-languageSkill
- write-a-skillSkill
- writing-beatsSkill
- writing-fragmentsSkill
- writing-shapeSkill
- zoom-outSkill
- openspec-apply-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- openspec-update-changeSkill
- openspec-verify-changeSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- openspec-update-changeSkill
- openspec-verify-changeSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

