/specpilot-compact, which runs it. Three of them, validate, archive and backfill, run a shell script that ships inside the command file.
Paths below are inside .specs/.
At a glance
/specpilot-status
Reads Current Sprint inplanning/tasks.md and the milestones in planning/roadmap.md. Shows each sprint task’s ID with a short summary, and the next unchecked milestone. One screen, nothing written.
/specpilot-reanchor
Readsproject/project.yaml in full and the Re-Anchor Prompt in development/prompts.md, and makes them your agent’s working context again. Use it after a long session or when your agent forgets the rules.
/specpilot-report
Runs the spec check before a change. Your agent:- Classifies the change as trivial, feature or architectural.
- Reads the specs for that kind of task.
- Updates the specs first.
- Shows a Spec Report: the classification, the files touched and what changed in each.
yes, proceed. For an architectural change, a plain “ok” isn’t enough. See Review and Spec Reports.
/specpilot-sync
Comparesarchitecture/architecture.md, project/requirements.md and quality/tests.md with your source folder and package.json. Lists the drift, such as stale versions, renamed or removed files the specs still name, and modules the specs don’t mention, and proposes an edit for each. Writes only after you confirm.
/specpilot-refine
Give it the new requirement after the command:project/requirements.md, development/context.md and development/prompts.md, and proposes edits that follow the existing IDs, such as REQ-###.#. It shows a line-by-line preview and writes only after you confirm. The command version of specpilot refine.
/specpilot-validate
Runs a script that checks three things:- The nine required spec files are there.
- Each Markdown spec has
fileID,lastUpdated,version,contributorsandrelatedFilesin its front matter. - Every file named in
relatedFilesexists under.specs/.
specpilot validate in the terminal runs more checks.
/specpilot-archive
Runs a script that moves old rows out of the way:- Completed rows of
planning/tasks.md, once that section passes 25 lines. The newest 10 stay. - The oldest entries of
development/prompts.md, once the file passes 100 lines. About 80 lines stay.
main or master, it warns and asks before going on. The command version of specpilot archive.
/specpilot-compact
Shortensdevelopment/context.md and project/requirements.md, which your agent reads on most tasks. Your agent decides what to archive and how to rewrite; the SpecPilot CLI moves the text and keeps the originals. Unlike the other commands, it needs the CLI installed: npm install -g specpilot@latest.
Your agent:
- Checks the branch. On a branch other than
mainormaster, it asks before going on. - Runs
specpilot compact --reportand shows each file’s size, estimated tokens and likely saving. It stops if there’s nothing to compact, and otherwise asks you before it readscontext.mdorrequirements.md. - Runs
specpilot archive, so finished Completed rows move toplanning/tasks-archive.mdfirst. - Judges each
context.mdentry and writes a plan,development/compact-plan.md: archive or keep, with a reason. It never archives a security decision, an entry about a Won’t do task or something dropped on purpose, an entry that still overrides a spec or a standing rule, or an entry naming a task that’s still open. - Rewrites the largest requirements, at most 10 per run and each at least 4 KB, to what the project does now. Every command, flag, number, exact message, path, security rule and cited ID stays. The rewrites go to
development/compact-requirements.md. - Runs
specpilot compact --apply --dry-run, shows what would move and what each rewrite leaves out, and stops. You can edit either plan or tell your agent what to change. - When you type
applyyourself, runsspecpilot compact --apply.
--apply applies both plans or neither. Each archived entry moves, unchanged, to development/context-archive.md, with a one-line marker left in context.md. Each rewritten requirement replaces the original in place, and the original is kept unchanged in project/requirements-archive.md. The CLI refuses an entry whose task is still open, and a rewrite that is longer or out of date. Until you type apply, context.md and requirements.md are untouched.
In the terminal, specpilot compact on its own lists each context.md entry with a status, and the requirements largest first, and changes nothing.
/specpilot-backfill
Runs a script that checks each instruction file that exists (CLAUDE.md, .github/copilot-instructions.md, .cursor/rules/specpilot.mdc, .windsurfrules, .antigravity/rules.md) for four sections: Critical Mandates, Code Philosophy, Code Rules and Re-Anchor. A missing section is added at the end, and nothing is overwritten.
It also checks project/project.yaml for team.devPrefix. If it’s missing, your agent asks you for a short handle.
Unlike specpilot backfill, it doesn’t add or update command files. Use Regenerate All for that (see Regenerate commands and skills).
In each AI IDE
- Claude Code shows
<description>as a hint for/specpilot-refine, lets validate, archive and backfill run their scripts, and lets compact runspecpilot. - GitHub Copilot runs the commands in agent mode. Outside it, Copilot can’t run the scripts and does the checks by reading the files, with more mistakes, and can’t run
/specpilot-compactat all. - Codex needs the files copied to
~/.codex/prompts/first (see Codex).
Not a command: the project skill
Claude Code also gets thespecpilot-project skill, which gives it your project’s context without a command. See Commands and skills.
How we use this day to day: The Spec Guide: Prompt library ↗