From speckit-pro
Archive a merged SpecKit spec and clean active workflow residue after the implementation PR has merged. Use after confirming merge provenance, when the user asks for post-merge SpecKit archive hygiene, cleanup hygiene, or removal of completed specs from active specs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/speckit-pro:speckit-archive-cleanup SPEC-ID and optional merged PR URL or numberSPEC-ID and optional merged PR URL or numberThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Accept a SPEC-ID such as `DOC-007` or `PRSG-014`, an active spec directory, a
Accept a SPEC-ID such as DOC-007 or PRSG-014, an active spec directory, a
workflow file path, or a merged PR URL/number. If more than one is provided,
cross-check that they all point to the same completed work.
Required facts before editing:
specs/docs/ai/specs/.process/, if present.specify/extensions/archive/ existsStart from live repository truth:
git status --short --branch..specify/memory/archive-reports/
to match local conventions..specify/feature.json exists. If it is absent, do not create
it. If it exists and points at the completed spec, remove or rewrite it only
according to repository convention.find specs -mindepth 1 -maxdepth 4 -print and
identify the exact folder that belongs to the merged spec.Do not remove any active spec folder until merge provenance and recovery
commands are recorded. Do not remove process files under
docs/ai/specs/.process/ unless repository history shows that process evidence
is intentionally deleted for completed specs. In this repository, process files
are preserved as historical evidence.
Read the archive extension command contract before making archive edits when it is present. Treat it as the local policy for source directories, memory files, cleanup eligibility, and extension hooks.
Then update the project state in this order:
.specify/memory/archive-reports/ named with the
current date and SPEC-ID. Include PR URL, merge commit, merged-at timestamp,
source spec path, workflow file, canonical shipped artifacts, cleanup branch,
cleanup command, verification commands, and exact recovery commands using
git show or git checkout against the merge commit..specify/memory/spec.md,
.specify/memory/plan.md, and .specify/memory/changelog.md. These records
should summarize what shipped, where canonical artifacts live now, why the
active spec folder can be removed, and where the detailed archive report is..specify/memory/ records are the system of record for history, and agent
context files must stay small (Codex reads AGENTS.md under a 32 KiB budget).docs/ai/specs/.process/autopilot-state.json only if it exists and
still points at the completed spec. The status should become an archived or
completed archive state, with the cleanup applied and post-merge archive
phase completed.specs/. Keep specs/.gitkeep.--check mode.Prefer local helper scripts over hand-maintaining generated files. If the repo has docs-site generated reference pages or generated plugin payloads affected by the cleanup, run the relevant generators and include those generated changes.
These parts are safe to do in parallel:
git status, gh pr view, find specs, and
reading roadmap, memory, and workflow filesThese parts must be serialized:
The serialized files all represent one shared project state. Parallel edits make it easy to leave contradictory status such as "archived" in memory but "in progress" in a roadmap.
Run the smallest checks that prove the cleanup, then the standard project checks if plugin or generated payload files changed. Typical checks:
specs/.gitkeeppython3 -m json.tool docs/ai/specs/.process/autopilot-state.json--checkgit diff --checkIf a check cannot run, report the exact command and the reason. Do not claim the archive is fully verified when generated files or structural checks are stale.
For archive-only cleanup commits and PRs, use a lower-case Conventional Commit
scope derived from the completed spec ID. For example, archive cleanup for
CAR-001 should use docs(car-001): archive post-merge state, not
docs(CAR-001): archive post-merge state. The repository PR title gate checks
the final PR title, so apply the same lower-case scope to gh pr create or
gh pr edit --title.
Report:
Keep the report short and make the next action explicit, usually review the cleanup PR or merge it after CI passes.
npx claudepluginhub racecraft-lab/racecraft-plugins-public --plugin speckit-proCreates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.