ss-archive
Skill2 starsChanged 5 months agoApache-2.0View on GitHub
Merges an active OpenSpec change's delta specs into the authoritative openspec/specs/ tree and moves the change directory into the dated archive. Idempotent; authorized workflow preparation calls it before independent review. Use it once a delta is reviewed and ready to become part of the source of truth.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ss-cleanupSkill
- ss-code-reviewSkill
- ss-codingSkill
- ss-coding-workflowSkill
- ss-create-branchSkill
- ss-create-prSkill
- ss-feature-workflowSkill
- ss-guardrailsSkill
- ss-inspectSkill
- ss-list-changesSkill
- ss-multi-repo-workflowSkill
- ss-planSkill
- ss-proposalSkill
- ss-referencesSkill
- ss-reverse-specSkill
- ss-show-specSkill
- ss-trace-specSkill
- ss-troubleshooting-workflowSkill
- ss-write-specSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 6 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
If a <change-id> was given, use it.
- Distinctive: line 30
If none exist, report a no-op.
- Distinctive: line 31
If exactly one exists, use it.
- Distinctive: line 32
If multiple exist, ask the user which one to archive.
- Very specific: line 34
If openspec/changes/<change-id>/specs/ has no delta files, report a zero-spec no-op.
- Very specific: line 39
Never stash/reset/discard user work.
- Very specific: line 49
every section heading is followed by at least one ### Requirement: entry — remove empty sections entirely
- Very specific: line 51
every Requirement has at least one #### Scenario:
- Distinctive: line 56
If validation fails, stop and list the exact files and fixes needed.
- Distinctive: line 63
Read the delta file.
- Very specific: line 64
Read openspec/specs/<cap>/spec.md.
- Very specific: line 85
If the file still carries a baseline reverse-spec header (from ss-reverse-spec), remove it after the first successful delta merge.
- Very specific: line 92
Create openspec/changes/archive/ if it doesn't exist.
- Distinctive: line 95
Verify the merged authoritative requirements/scenarios and archived source path.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Archive OpenSpec Change
Merge OpenSpec delta specs from openspec/changes/<change-id>/specs/ into
openspec/specs/, then move the change directory to
openspec/changes/archive/YYYY-MM-DD-<change-id>/.
This skill is idempotent. Read delta timing.
Archive is authorized pre-review preparation, never a late publication action.
--dry-run reports only. A standalone invocation must explicitly authorize mutation.
Preserve the stable change-id and gate binding; archive semantic drift invalidates
approval/review/tests and returns to the affected gate.
Inputs
Optional: a specific <change-id>, and/or --dry-run to validate and report without
writing anything.
Process
Step 1: Discover the Active Change
If a <change-id> was given, use it. Otherwise:
- List directories under
openspec/changes/, excludingarchive/. - If none exist, report a no-op.
- If exactly one exists, use it.
- If multiple exist, ask the user which one to archive.
If openspec/changes/<change-id>/specs/ has no delta files, report a zero-spec no-op.
Step 2: Verify Workspace and Permission
Inspect intended and unrelated dirty/untracked/ignored files and submodule state. Never stash/reset/discard user work. Materialize identical approved deltas and validate current gate binding before archive. Required rebase is a separately permitted workspace action before review; this skill never fetches/rebases/pushes or commits as a ritual. Unknown ownership or semantic conflicts block archive.
Step 3: Validate Delta Format
For every openspec/changes/<change-id>/specs/<cap>/spec.md:
- section headings are only ADDED / MODIFIED / REMOVED / RENAMED Requirements
- every section heading is followed by at least one
### Requirement:entry — remove empty sections entirely - every Requirement has at least one
#### Scenario: MODIFIEDentries copy a matching source-of-truth Requirement in fullREMOVEDentries include a Reason and a Migration noteRENAMEDentries useFROM: <old> → TO: <new>
If validation fails, stop and list the exact files and fixes needed.
Step 4: Merge Deltas Into Source-of-Truth Specs
This is a semantic merge, not a mechanical patch — read and understand each delta before writing. For each capability:
- Read the delta file.
- Read
openspec/specs/<cap>/spec.md; if it doesn't exist, create a new source-of-truth spec. - Apply the delta:
- ADDED: append the new Requirements.
- MODIFIED: replace the matching Requirement with its full modified content.
- REMOVED: remove the Requirement, keeping the rationale in the archived delta.
- RENAMED: rename the Requirement heading, preserving content unless the delta also changes it.
- Maintain the source-of-truth header:
# Capability: <capability>
> Source of truth - auto-generated by the `ss-archive` skill from delta merges.
> Do not hand-edit this file. Create a new delta via the `ss-write-spec` skill,
> then merge it with `ss-archive`.
**Last archived change:** <change-id> (<YYYY-MM-DD>)
**Last sync commit:** <sha>If the file still carries a baseline reverse-spec header (from ss-reverse-spec), remove
it after the first successful delta merge.
Step 5: Move to Archive
Unless --dry-run was given:
- Create
openspec/changes/archive/if it doesn't exist. - Move the change directory to
openspec/changes/archive/<YYYY-MM-DD>-<change-id>/, preserving history if your version control supports move-tracking. - Verify the merged authoritative requirements/scenarios and archived source path; record exact output paths/current bytes in the checkpoint. Commit/push are not archive side effects and require the invoking workflow's explicit permissions.
Output
Report:
- the archived change path
- capabilities merged
- Requirements added / modified / removed / renamed
- the commit SHA, if committed
No-op cases must be reported explicitly and treated as success.
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.

