/project-orchestration:project-orchestrationfrom project-orchestration
Use for multi-session project lifecycle management. Triggers on kickoff phrases ("plan the roadmap", "new project", "start a project from scratch", "greenfield", "what milestones do we need"); session lifecycle ("resume", "continue", "where are we", "pause", "I'm done for today"); phase/milestone ops ("add a phase", "new milestone", "groom the milestone", "audit the milestone", "complete the milestone"); session start on a project with a docs/planning/ directory; or an empty/greenfield repo where the user signals multi-milestone work. Covers greenfield kickoff via plan-roadmap (whole-project brainstorm covering 3-7 milestones, NOT one phase or one milestone), brownfield codebase mapping, phase management, session pause/resume via STATE.md, milestone audit/completion, and routing via start-next-phase. Skip for one-off features that fit a single brainstorming → writing-plans → executing-plans cycle without milestones.
Trending skills
7-day visitors to each skill page
Ships in project-orchestration. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Read the actual skill file — do not act from memory of what the skill name implies. Loose "invocation" routinely drifts into ad-hoc behavior.
Follow the skill end-to-end — including its own checklists, gates, and required outputs. Brainstorming can be brief, but it must happen.
Verify the required output artifact exists before continuing the chain:
| Sub-skill | Required output artifact |
|---|---|
superpowers:brainstorming | docs/superpowers/specs/YYYY-MM-DD-*-design.md (or where the project's preferences put specs) |
superpowers:writing-plans | docs/superpowers/plans/YYYY-MM-DD-*.md (or where the project's preferences put plans) |
superpowers:executing-plans | All plan tasks checked off, tests passing |
If the artifact is missing, the previous step did not complete — return to it. Do not proceed with the next link in the chain on faith.
Brainstorming's hand-off when this skill drives it. Upstream brainstorming (superpowers v7+) ends with "invoke superpowers:writing-plans and no other skill". That line keeps an agent from jumping to implementation. When start-next-phase, groom-milestone, plan-roadmap, or new-milestone drives brainstorming, its job ends at the approved design: return here and continue from this skill's routing. The Surface pre-plan hook between brainstorming and writing-plans runs skills that only write documents (ui-design-system, ui-workflow ui-phase, refactor-analysis), so brainstorming's gate still holds: nothing gets built before the design is approved and planned. plan-roadmap and new-milestone do not chain to writing-plans at all; they write planning files from the approved design.
Writing-plans when this skill drives it. Plans keep each task small enough for one implementer to finish in a short run. Split a task that touches more than about five files, or that combines a new component with its integration. A task that is genuinely hard (architecture, tricky concurrency, cross-module work) gets a **Model:** opus line with a one-line reason; a task without the mark runs on Sonnet. Every plan ends with a ## Checks section in the format the unattended plugin reads: a - build: `cmd` bullet taken from CONVENTIONS.md **Build:** and a - tests: `cmd` bullet taken from **Test:**. If docs/planning/CONVENTIONS.md is missing, run init-conventions first, as the Commit & Release Protocol's self-heal does. When either line is missing or reads none (defaulted), ask the operator for the command before writing the plan, and write the answer under ## Stack as **Build:** `cmd` or **Test:** `cmd` . Stage the CONVENTIONS.md edit with the plan and commit them together. A deliberate none means that project has no such command: the plan omits that bullet, and keeps the other. Execution follows context-budget ## Model Choice, and pause-work is the handoff context-budget uses under ## Fresh-Session Handoff when docs/planning/STATE.md exists.
State file writes (separate gate, applies to every sub-skill below that touches docs/planning/):
When a sub-skill says it creates, appends to, or updates docs/planning/ROADMAP.md, docs/planning/MILESTONE.md, or docs/planning/STATE.md, you MUST:
Write or Edit tool for every change. Narrating the change in conversation ("I've added Milestone 3 to the roadmap") does NOT create or modify the file — only a tool call does. The conversation evaporates between sessions; the file does not.Read tool and confirming the expected content is on disk. If the expected content is missing, the write did not happen — retry with the tool.git commit issued before the verify step will either fail (no diff) or commit the wrong state. Run git status after the commit and confirm a clean tree.If you find yourself thinking "I'll write the file in a moment" or "the description captured it" — STOP. Make the tool call now. Files do not appear by intention.
Post-compaction discipline (separate gate, fires when the conversation has been auto-compacted):
A "compaction-style entry" is when the session begins with — or recently received — a summary of prior work. Concrete tells:
When any of these signals fires AND docs/planning/ exists in the project, you MUST:
resume-work first. Read docs/planning/STATE.md, ROADMAP.md, and MILESTONE.md. Then run start-next-phase, which will route to complete-phase if the prior session left a phase ready to close, or to the correct downstream skill (brainstorming / writing-plans / executing-plans) for the actual current state.start-next-phase would route to, proceed. If they disagree, trust the state files — they outlive any single conversation.If you find yourself thinking "the Continuation Plan tells me to fix X, no need to read STATE.md" — STOP. The summarizer is a different model with no persistent state access; the planning files are the source of truth.
No MCP servers or external tools required. Uses only built-in tools (Read, Write, Glob, Bash for git commands).
This skill provides project lifecycle management for larger, multi-session projects. The core principle is:
"Big projects need navigation, not just execution."
A single brainstorming + writing-plans + executing-plans cycle works well for small features. Multi-milestone projects need a way to track where they are, manage their roadmap, pause and resume cleanly, and mark releases. This skill provides that structure without replacing the superpowers workflow — it wraps around it.
Read docs/planning/CONVENTIONS.md.
If it does not exist → run init-conventions now, then re-read the file. If it still does not exist, STOP — the user aborted at Propose, or VERIFY never converged. Do not continue on faith: this file's top HARD-GATE requires verifying the artifact before chaining, and continuing with no conventions lands in the branch guard with every field absent. Do not guess a format, and do not fall back to a hardcoded one.
This does not recurse: init-conventions writes and VERIFYs the file before it commits, so its commit re-enters here with the file already on disk.
A value may carry a trailing parenthetical — the field's value is everything before the first ( that follows a space, and **PR required:** yes (detected) reads as yes. This rule lives here, where fields are read; without it that value matches no row in the branch guard and the guard fails open.
Protected branches: none means the list is empty, not a branch named none. The guard splits on commas, so this must be stated or it yields a one-element list. init-conventions reads this list when it derives Model (see the Derive step for the exact rule).
Read the current branch with git branch --show-current. If it returns empty (detached HEAD) → STOP: there is no branch to check against, so the guard cannot answer. Say so rather than committing.
Match it against Protected branches, which is comma-separated. * matches within one path segment: release/* matches release/1.2 but not release/1/2. Matching is case-sensitive. This definition lives here, not in CONVENTIONS.md — the file records the patterns; the rule that parses them belongs where it executes.
PR required | Current branch matches a protected pattern | Action |
|---|---|---|
yes | yes | STOP. Do not commit. |
yes | no | Proceed |
no | — | Proceed |
unknown | yes | STOP and ask. unknown means detection could not reach the host — usually gh unauthenticated. Never treat it as no: that silently fails open on exactly the branch the guard exists to protect. |
unknown | no | Proceed |
| anything else, or the field is absent | — | STOP and ask. Propose lets the user type any value and VERIFY only rejects < and a space-padded | — it never checks a token against its enum — so Yes, true, required, or a missing line all reach here. An unmatched row must never mean "proceed": that is the fail-open this guard exists to prevent, reached through the door the table left open. |
On a STOP from the two protected-branch rows (yes + match, unknown + match), announce:
"CONVENTIONS.md protects
<branch>and requires a PR. Move to a feature branch before I commit orchestration state."
On a STOP from the last row, say what is actually wrong instead — quote the value found for PR required, or say the field is missing, and ask the user to correct CONVENTIONS.md or re-run init-conventions. Do not tell them to move branches: the branch may be perfectly fine, and changing it would not fix the file.
Never create the branch or open the PR automatically — that belongs to superpowers:using-git-worktrees and superpowers:finishing-a-development-branch.
Format | Scopes | Message |
|---|---|---|
conventional | enforced or free | <type>(<scope>): <subject> |
conventional | none | <type>: <subject> — the project's conventions say it has no scopes; do not render one. |
free-form | any | <subject> |
| anything else, or the field is absent | — | STOP and ask. Same reasoning as the branch guard: an unmatched row must never silently pick a format. |
If Format: conventional AND Scopes: enforced, read the allowed scopes from the file named by Scope source and check <scope> against them. Read the whole file — do not grep for scope-enum and expect the array beside it. On this repository's own commitlint.config.js the rule is on line 4 and its array starts on line 5; the array may also come from a variable or another module. If the file is missing, unreadable, or its scope list cannot be read off it — including when the array comes from a variable or another module — apply Fallback when scope not allowed rather than assuming permission. Treating an unreadable config as unrestricted renders <type>(<scope>): unvalidated, which commitlint then rejects — failing the commit, which the rule below forbids. The Fallback branch (omit scope) provably always lands. When the protocol cannot determine whether a scope is allowed, take the branch that cannot fail.
If <scope> is not allowed → apply Fallback when scope not allowed:
omit scope → <type>: <subject>map to <x> → <type>(<x>): <subject>Warn once per session when a fallback fires — once, not per commit; a phase can commit repeatedly and the warning is information, not an alarm. Never fail a commit over a scope.
complete-milestone only. The table is keyed on two fields — keying it on Scheme alone leaves tags a release: no matching no row while yes + semver matches two, and two agents then diverge on whether to tag at all.
Render the tag in the shape the project's existing tags already use — take the prefix from git tag -l (most carry v; some carry none, and release-please monorepos carry <name>-v). Do not assume v.
Milestone completion tags a release | Scheme | Tag |
|---|---|---|
no | any | Do not tag. Announce: "Release handled by <Released by>; not tagging." |
yes | semver | Ask the user for the version. Do not invent a bump — a milestone is not inherently major or minor. If the user declines, defers, or says "you pick": do not tag. Announce that no version was given and no tag was created, and that complete-milestone can be re-run once there is one. A question is not a terminal state; every other row here ends in tag-or-announce and this one must too. |
yes | calver | Match the shape of the existing tags (vYYYY.MM.DD, vYYYY.MM, …) — vYYYY.MM.DD is not the only calver. Calver carries no milestone identity, so two milestones completed on one day render the same string. Before tagging, resolve the collision per the rule below — do not silently reuse the date. |
yes | milestone | vN.0 |
yes | none, or anything unrecognised | Do not tag. Announce that the scheme is unset or unknown and no tag was created. init-conventions derives no whenever Scheme: none, so this is reachable only via a hand-edited file — but a table the protocol can fall off the end of is how the vN.0 hardcode survived in the first place. |
Before tagging, check git tag -l <tag>. If it exists, check what it points at — git rev-list -n 1 <tag>:
calver this is routine, not exotic: two milestones completed on the same day both render today's date.Existence alone is not identity. A check that only asks "does a tag of this name exist" reports the second milestone as tagged while pointing at the first one's commit, and it announces success — it certifies the collision instead of catching it. That is this branch's recurring failure: a green check that is not checking.
After tagging, verify with git tag -l <tag> before announcing success.
This skill contains multiple sub-skills, each invoked by a specific trigger phrase or context. They share the docs/planning/ state directory (see state-files.md for file formats).
Invoke before brainstorming when starting work on an existing codebase the agent has not previously analyzed. Especially useful when:
docs/superpowers/ (or legacy docs/plans/) directory or design docs"Mapping the existing codebase. I'll analyze structure, entry points, dependencies, and key patterns before we start designing."
Read project root — identify tech stack from package.json, *.csproj, *.sln, pyproject.toml, Cargo.toml, go.mod, Gemfile, etc.
Map directory structure — use Glob with **/* to understand the top-level layout. Identify: source directories, test directories, config files, docs, build artifacts.
Find entry points — locate main files: main.*, index.*, Program.cs, app.*, server.*, cmd/, etc.
Read key config files — package.json scripts, .env.example, CI config (.github/workflows/), docker-compose files.
Identify patterns — grep for: framework indicators (React, ASP.NET, FastAPI, Rails), architectural patterns (repositories, services, controllers, handlers), test framework config.
Detect traps — find what bites people later, so planned work does not walk into it:
get_complexity_metrics and find_god_objects instead of line counts.fix: commits (for example git log --name-only --pretty=format: | grep -v '^$' | sort | uniq -c | sort -rn | head, and the same with --grep='^fix' added to git log, keeping the grep -v filter, for the fix hotspots).find_circular_dependencies), and environment variables read with no default.Summarize — present a codebase map with:
Save to: docs/superpowers/specs/YYYY-MM-DD-codebase-map.md
Transition — invoke brainstorming with the codebase map as context.
Once per project, at kickoff — invoked by plan-roadmap. Also invoked automatically by the Commit & Release Protocol when docs/planning/CONVENTIONS.md is missing (self-heal on existing projects). Re-runnable when a convention changes ("we moved to release-please").
Unlike map-codebase, this runs on greenfield and brownfield. Greenfield needs it most — an empty repo has no conventions to observe, so they must be decided.
"Establishing project conventions. I'll detect what I can from the repo and ask you to confirm before recording anything."
Steps refer to each other by name, never by number.
Detect. Best-effort. Every signal is optional; never fail on a missing one. A field with no signal is left unset for Propose to ask — do not ask here, and never infer a value from absence.
| Field | Signal |
|---|---|
| Language / runtime, Package manager, Framework | If map-codebase ran this session, read docs/superpowers/specs/*-codebase-map.md — it already detected these. Otherwise apply map-codebase's Read project root and Identify patterns steps. Greenfield: no signal. |
| Datastore | ORM config, connection strings, compose service images; else no signal. |
| Build / Test | package.json scripts named build and test, a .sln or .csproj (dotnet build, dotnet test), a Makefile with build and test targets, or pyproject.toml (a test runner such as pytest). Otherwise no signal: Propose asks, and a declined field is recorded as none (defaulted). |
| Commit format | commitlint.config.js, .commitlintrc*, husky hooks. Else sample git log -50 --format=%s: a clear majority matching type(scope): → conventional. No commits → no signal. |
| Scopes / Scope source | A scope-enum rule → enforced plus the path of the file holding it. Conventional but no rule → free, Scope source: n/a. Not conventional → none, n/a. |
| Scheme | Shape of git tag -l, ignoring any <name>- prefix — release-please monorepo tags look like mypkg-v1.2.3. vX.Y.Z → semver, vYYYY.MM* → calver, vN.0 → milestone. Mixed shapes → whichever the 10 most recent tags mostly use. No tags → none. |
| Released by | release-please-config.json, .releaserc*, .changeset/, or a release workflow. None and tags exist → manual git tag. None and no tags → no signal: absence of automation is not evidence of a manual tagging habit. |
| Changelog | CHANGELOG.md present, and whether the release automation writes it; else none. |
| Protected branches | gh api repos/{owner}/{repo}/branches --jq '.[] | select(.protected) | .name', joined with commas. Do not use the single-branch /protection endpoint — it answers for one branch and cannot enumerate a list. On gh failure → no signal. |
| PR required | For each protected branch, query gh api repos/{owner}/{repo}/branches/{branch}/protection --jq '.required_pull_request_reviews' — this is the one place the single-branch /protection endpoint is correct, because only it returns that field (the list endpoint above does not). Any branch requiring reviews → yes. Protected branches empty → no. On gh failure → no signal. |
| Deploy target / Deployed by | Workflows with deploy/publish steps, Dockerfile, vercel.json, fly.toml, *.tf. The artifact or registry named is Deploy target; the mechanism is Deployed by. Neither found → none. |
| Environments | environment: keys in CI workflows, *.tfvars, compose profiles; else none. |
Handle re-runs — before any interaction. If docs/planning/CONVENTIONS.md exists, load it and diff detected-vs-recorded. No differences → announce "Conventions unchanged" and stop, having asked nothing. Otherwise carry the recorded values forward as the baseline.
A field with no signal is not a difference — the recorded value stands. Detection failure must never downgrade a recorded value. Without this rule a gh outage proposes PR required: yes → unknown, the user confirms, and a network error has disarmed the branch guard.
The diff ignores Established, which is write-once.
Derive. No signal can produce these. Derive only fills fields that are unset — a recorded value stands. Otherwise a user who set Model: gitflow (reachable only by editing at Propose, since no rule produces it) gets it silently reverted to feature-branch on every re-run, and the same for a Fallback overridden to map to <scope>. Established was already protected this way; these need it too. Changed inputs are handled by Re-derive, not here.
| Field | Rule |
|---|---|
Established | Today on a first run. Preserved unchanged on a re-run — it records when conventions were first set, not when last checked. |
Model | feature-branch when Protected branches is non-empty or PR required: yes; else trunk. |
Fallback when scope not allowed | omit scope — conventional commits permit a scope-less message, so it always lands. |
CI timeout | 60 (defaulted) unless the operator names another value in minutes. ci-watch reads it; no signal in the repo can produce it. |
Milestone completion tags a release | yes only when Released by: manual git tag and Scheme is not none. Everything else no: an automation already owns tagging, and Scheme: none has nothing to build a tag from. |
Mark uncertainty. A value inferred without a definitive signal — a git log that looks conventional with no commitlint config — is shown as (uncertain) in the proposal only. The marker is never written to the file.
Propose. Present the filled-in fields as one block; on a re-run, show only what changed. Ask for every field still unset. Offer conventional and semver as defaults the user may reject — offered, never imposed.
"Confirm these, or tell me what's wrong.
[y / edit]"
If the user declines a field, record the default and mark it (defaulted) so the choice stays reviewable.
Re-derive. If the user changed any field a Derive rule reads — Released by or Scheme (feeding Milestone completion tags a release), PR required or Protected branches (feeding Model) — recompute the field that reads it, overriding the recorded value, and show the result. This is the one place a derivation overrules what is on disk, because the user just changed its input. Skipping it leaves a corrected Released by: release-please paired with a stale tags a release: yes, which double-tags.
Write docs/planning/CONVENTIONS.md from templates/conventions.template.md. Keep the # title, the five ## headings and the **Key:** value lines; omit the > blockquotes — they are fill-in guidance, not file content. Do not read this as "**Key:** lines only": dropping the headings fails VERIFY, whose remedy is to re-write from the template, which drops them again. In their place write one provenance line so the file is not anonymous:
> Written by `init-conventions`. Do not hand-edit — re-run the sub-skill instead; the Commit & Release Protocol reads these fields. One exception: the writing-plans `## Checks` rule may also fill `**Build:**` and `**Test:**`, which the protocol does not read. `ci-watch` also reads `**CI timeout:**`, which the protocol does not. Every other field goes through a re-run.
VERIFY. Re-read the file. All five ## sections present, and no **Key:** line still containing < or a space-padded | — either means a field was never decided. **Established:** is a real date. On failure, re-write and VERIFY again; never continue with a failing VERIFY.
Commit only docs/planning/CONVENTIONS.md, by explicit pathspec, per Commit & Release Protocol with type=chore, scope=state, subject=establish project conventions. The pathspec is load-bearing: a self-heal enters here with the caller's files already staged, and a bare git commit would sweep them into this commit.
Announce: "Conventions recorded. complete-milestone will <tag per the recorded scheme | not tag — release handled by <Released by>>."
No. Without it, every commit falls back to a format the host's lint config may reject, and milestone completion invents a tag scheme the project does not use.
Invoke when the user asks "where are we?", "what's next?", "show me progress", or at the start of a session on a project with docs/planning/ state files.
"Reading project state to show current progress."
Check for docs/planning/ROADMAP.md — if not found, announce: "No docs/planning/ directory found. This project hasn't been initialized with project-orchestration yet. Start with plan-roadmap to brainstorm the whole-project layout (multiple milestones with rough phase outlines). For brownfield codebases, plan-roadmap will run map-codebase first; for greenfield/empty repos it brainstorms from a blank sheet."
Read docs/planning/ROADMAP.md — parse milestones and phases, identify which are complete, active, and pending.
Read docs/planning/STATE.md — get last session handoff (current phase, last task, next step). If STATE.md does not exist (fresh project with no prior pause), skip steps 3 and omit "Last completed" and "Next step" from the output.
Read docs/planning/MILESTONE.md — get current milestone goal and definition of done.
Present status:
Project Progress
Current Milestone: N — Name (X of Y phases complete) Current Phase: N.M — Name Last completed: Task description Next step: Recommended next action
Roadmap:
- ✅ Milestone 1: Name (complete)
- 🔄 Milestone 2: Name (active — phase 2.3 of 5)
- ⏳ Milestone 3: Name (pending)
When the user wants to append a new phase to the current milestone's roadmap.
docs/planning/ROADMAP.md and docs/planning/MILESTONE.md (use the Read tool) to find the current milestone and its last phase number.UI | Backend | Refactor | Data | Infra | Docs | Mixed. HelpWanted is yes or no — defaults to no. yes flags the phase for external contributors when github-sync is enabled.)"Edit tool to append the new phase block to docs/planning/ROADMAP.md under the current milestone with status pending and the user's stated **Surface:** and **HelpWanted:**. Format per state-files.md.docs/planning/ROADMAP.md and confirm the new phase block is present with the correct number, name, status: pending, Surface:, and HelpWanted: values. If any is missing, the Edit did not apply — retry.Edit tool to add the new phase to the ## Phases list in docs/planning/MILESTONE.md.docs/planning/MILESTONE.md and confirm the phase appears in the list.git add docs/planning/ROADMAP.md docs/planning/MILESTONE.md, then commit per Commit & Release Protocol with type=chore, scope=roadmap, subject=add phase N.M — <name>. Run git status and confirm a clean tree.When urgent work needs to be inserted between two existing phases.
docs/planning/ROADMAP.md (use the Read tool), present the current phase list to the user.UI | Backend | Refactor | Data | Infra | Docs | Mixed)", and "HelpWanted? (yes or no — defaults to no. yes flags the phase for external contributors when github-sync is enabled.)"Edit tool to insert the new phase block into docs/planning/ROADMAP.md (with the user's stated **Surface:** and **HelpWanted:** lines) and renumber every subsequent phase (N.M+1 → N.M+2, etc.). Both inserts and renumbers are tool calls — narrating "I've shifted the numbers" does not change the file.docs/planning/ROADMAP.md and confirm: (a) the new phase block is present with correct number/name/status/Surface/HelpWanted, (b) every later phase is renumbered consecutively with no gaps or duplicates.Edit tool to update the ## Phases list in docs/planning/MILESTONE.md to reflect the inserted phase and renumbered siblings.docs/planning/MILESTONE.md and confirm the list matches ROADMAP.md.git add docs/planning/ROADMAP.md docs/planning/MILESTONE.md and the specs and plans step 7 edited, then commit per Commit & Release Protocol with type=chore, scope=roadmap, subject=insert phase N.M — <name>. Run git status and confirm a clean tree.When a future (pending) phase should be removed from the roadmap.
docs/planning/ROADMAP.md (use the Read tool), present pending phases to the user.**Issue:** #N value (if present) BEFORE editing — the field is about to be deleted with the block, and it is needed in step 10 to close the GitHub issue. If the phase has no **Issue:** field, sync was not initialized for this phase; skip the capture.Edit tool to remove the phase block from docs/planning/ROADMAP.md and renumber all subsequent phases (N.M+1 → N.M, etc.).docs/planning/ROADMAP.md and confirm: (a) the removed phase block is absent, (b) every later phase is renumbered consecutively with no gaps or duplicates.Edit tool to remove the phase from the ## Phases list in docs/planning/MILESTONE.md.docs/planning/MILESTONE.md.- guard N.M: bullet that names it, since nothing will rely on that interface. A **Builds on:** line that names it would now point at whichever phase took its number. Use the Edit tool to replace its phase reference with <removed Phase N.M>, a placeholder that ready-check fails as an open question and that holds the phase back in start-next-phase step 2, and report "Phase X.Y builds on the removed Phase N.M. Its design needs a new answer."gh issue close <N> --comment "Phase removed from roadmap". If gh is not installed/authenticated or the call fails (404, network, rate limit), log the failure and continue — the local removal is authoritative; the orphan issue can be closed manually later. Never block the local commit on a gh failure.git add docs/planning/ROADMAP.md docs/planning/MILESTONE.md and the specs and plans step 9 edited, then commit per Commit & Release Protocol with type=chore, scope=roadmap, subject=remove phase N.M — <name>. Run git status and confirm a clean tree.insert-phase and remove-phase shift phase numbers. Groomed designs and plans name phases by number, so they move with them:
start-next-phase step 3 finds them), use the Edit tool to rewrite every **Builds on:** Phase N.M line and every - guard N.M: label that names a renumbered phase. Rewrite each reference once, from its old number straight to its new one. Never chain edits, such as 1.2 → 1.3 and then 1.3 → 1.4.**Builds on:** line and guard label names the phase it named before the shift.unattended/phase-N-M under its old number, as start-next-phase step 2 does, and for an open PR from it when gh works. Do not rename the branch. Warn: "Branch unattended/phase-1-2 was built for the phase now numbered 1.3. start-next-phase matches branches by phase number. Resolve its PR before the next continuation."Before starting execution of a phase — surfaces Claude's intended implementation approach for the user to review and correct before work begins.
Read the phase's plan document from docs/superpowers/plans/ (or the legacy docs/plans/).
Read relevant design docs from docs/superpowers/specs/ (or the legacy docs/plans/).
Present:
Phase N.M — Name: Intended Approach
Before I start, here is my intended approach for this phase:
- [Assumption about implementation approach]
- [Assumption about files to touch]
- [Assumption about test strategy]
- [Assumption about integration points]
Any corrections before I begin?
Wait for user confirmation or corrections before invoking executing-plans.
After audit-milestone identifies gaps — the milestone definition of done is not yet met.
docs/superpowers/reviews/YYYY-MM-DD-milestone-N-audit.md).add-phase for each approved phase.When the user is stopping work and wants to preserve context for next session. Triggers on: "I'm done for today", "pausing", "stopping here", "need to stop".
"Creating session handoff. I'll capture current state so we can resume cleanly."
Identify current position: which milestone, which phase, which task was last completed.
Identify open decisions or blockers (from the conversation context).
Determine recommended next step.
Use the Write tool to create or overwrite docs/planning/STATE.md with the handoff note (see state-files.md for format). Do not narrate the content — write the file. When groom-milestone is mid-run, include the ## Grooming section with Grooming: milestone N, next phase N.M, naming the next phase to groom. Otherwise leave that section out.
VERIFY: re-read docs/planning/STATE.md and confirm the handoff note is present with all required sections (Current Position, Open Decisions, Blockers, Recommended Next Step), plus ## Grooming when step 4 wrote it. If any section is missing, the write did not capture it — re-write.
Compress state files (if enabled). Read docs/planning/ROADMAP.md and check whether its YAML frontmatter contains compress_memory: enabled.
enabled: invoke the compress-memory skill on docs/planning/STATE.md. Then, if git diff --quiet HEAD -- docs/planning/ROADMAP.md exits non-zero (i.e. ROADMAP.md has changed since the last commit), also invoke compress-memory on docs/planning/ROADMAP.md.disabled, absent, or the file has no frontmatter: skip compression entirely.compress-memory is not installed: skip compression entirely (treat the field as absent).Graceful failure (matches the sync-github pattern): if compress-memory reports a validation failure or any other error, log the failure to the user, leave the uncompressed file on disk, and continue with the remaining pause-work steps. Compression failure must NEVER prevent state files from being written, committed, or synced. Local state is the source of truth and must remain writable even when compression breaks.
Stage git add docs/planning/, then commit per Commit & Release Protocol with type=chore, scope=state, subject=pause-work — phase N.M, last task: <description>. The docs/planning/ glob includes STATE.md, ROADMAP.md, and any *.original.md backups produced by step 6's compression. Users who do not want backups committed can add docs/planning/*.original.md to .gitignore. Run git status and confirm a clean tree.
Squad sync (if installed) — if a .squad/ directory exists in the project, run squad-sync after the STATE.md commit. Squad's per-agent history.md files capture session learning that complements STATE.md (which captures position). Without this step, agent histories drift behind project state. If squad is not installed, skip silently — this step is best-effort.
Decision-tracker sync (if installed) — if decision-tracker is active and any decisions were captured during this session, ensure they have been persisted to long-term memory before exiting. Pause is the natural fence for memory writes; deferring them risks losing the decision when the conversation ends. If decision-tracker is not active, skip silently.
GitHub sync (if initialized) — if docs/planning/ROADMAP.md contains any **Issue:** or **Milestone:** field (signal that init-github-sync has been run), invoke sync-github as a final step. This produces a full reconciliation of GitHub state with the just-written STATE.md / ROADMAP.md changes. If sync is not initialized, skip silently — do not invite the user to set it up here, that is init-github-sync's job. Note: sync-github may produce its own reconcile commit (rendered per Commit & Release Protocol) when it writes new **Issue:** or **Milestone:** fields back into ROADMAP.md (e.g. phases added since the last sync). This is normal — pause-work ends with one commit on a quiet sync, two commits when sync had write-back work. Both are clean states.
Announce only after the commit succeeds:
"Session state saved to
docs/planning/STATE.md. Next session, start withresume-workor say 'resume' and I'll restore context."
At the start of a session on a project with existing docs/planning/ state. Triggers on:
docs/planning/ exists, run resume-work BEFORE acting on any code-level instruction in the compaction summary.The post-compaction trigger exists because conversation summarizers do not have access to STATE.md, ROADMAP.md, or the current plan file. Their "Continuation Plan" sections are best-effort recall and routinely diverge from the actual project state on disk. resume-work reads the source of truth and reconciles.
Read docs/planning/STATE.md.
Read docs/planning/ROADMAP.md and docs/planning/MILESTONE.md for full context.
Present:
Resuming session
Last session: YYYY-MM-DD Current milestone: N — Name Current phase: N.M — Name Last completed: Task description Open decisions: (list if any) Grooming: milestone N, next phase N.M (only when STATE.md has a
## Groomingsection) Recommended next step: DescriptionReady to continue?
If decision-tracker is active for this project, trigger decision recall now to restore cross-cutting decisions alongside session state.
On confirmation, invoke start-next-phase to determine and execute the next action. If STATE.md has a ## Grooming section, check it first. Invoke groom-milestone instead only when the milestone it names is still [status: active] in ROADMAP.md and the phase it names has no plan file yet. groom-milestone then resumes at its step 3. Otherwise the section is stale: invoke start-next-phase as usual.
CRITICAL: Do NOT ask the user "what would you like to do?" after presenting the resume summary. The
start-next-phasesub-skill determines the correct next action automatically. The user said "resume" — that means "continue working", not "present me a menu".
If ROADMAP.md frontmatter has compress_memory: enabled, STATE.md and ROADMAP.md on disk are in compressed form (written that way by pause-work). This is expected — the compression skill preserves frontmatter, headings, tables, and list structure byte-exact, so this skill's parsing of phase status, milestone numbers, and the current position is unchanged.
If a human reader prefers the original prose (for example, when reading the file directly outside Claude Code), the pristine backup is at docs/planning/STATE.original.md and docs/planning/ROADMAP.original.md. These backups are the first-write originals; subsequent compressions do not overwrite them.
If you encounter a malformed state file that resume-work cannot parse — frontmatter missing the compress_memory field but the body looks compressed, headings out of order, etc. — fall back to the *.original.md backup, report the corruption to the user, and ask whether to re-baseline.
When a phase's plan is finished — all tasks in docs/superpowers/plans/YYYY-MM-DD-<phase>.md are checked off (- [x]), tests pass, and executing-plans returned a clean state. Promotes the phase from active to complete in the planning files. A phase built by an unattended run is still pending when its PR merges; complete-phase promotes it from pending to complete directly.
The executors do not tick the plan themselves. On the attended path, start-next-phase step 6 ticks it when execution returns clean. An unattended run ticks it on its branch before it opens the PR, so the merge brings a ticked plan to the default branch.
This sub-skill closes the loop that was missing: without it, executing-plans finishes a phase but ROADMAP.md still shows the phase as active, so the next session sees stale state and start-next-phase routes back to the same already-finished phase.
start-next-phase invokes complete-phase automatically when it detects an active or pending phase whose plan has at least one checkbox and is fully checked off (see start-next-phase step 1 below), after it ticks a plan in step 6, and when step 2 finds a merged unattended PR. Manual invocation is also supported when the user says "mark phase N.M complete" or "wrap up this phase".
Pre-condition: the phase's plan file exists, it has at least one checkbox, all task checkboxes in it are - [x], and the phase is currently [status: active] or [status: pending] in ROADMAP.md. If the phase is already [status: complete], this sub-skill is a no-op.
"Marking Phase N.M — {name} complete."
Read docs/planning/ROADMAP.md and confirm the target phase is [status: active] or [status: pending]. If it's already [status: complete], exit silently — this is a no-op.
Read the plan file referenced by the phase's Plan: line. If it has no checkboxes at all, refuse: "Phase N.M's plan has no checkboxes — nothing shows it was executed." and exit. Confirm all task checkboxes are - [x]. If any - [ ] remain, refuse: "Phase N.M has unchecked tasks — execution is not complete. Resume executing-plans first." and exit. When execution did finish clean and only the ticks are missing, tick the plan as start-next-phase step 6 does, then start this sub-skill again.
Use the Edit tool on docs/planning/ROADMAP.md to make TWO precise edits to the phase's block. The exact transitions are:
Before (active on the attended path, pending after an unattended run's PR merges):
### Phase 1.2: <Name> [status: active]
**Goal:** <one sentence>
**Plan:** `docs/superpowers/plans/<plan-file>.md`
### Phase 1.2: <Name> [status: pending]
**Goal:** <one sentence>
**Plan:** `docs/superpowers/plans/<plan-file>.md`
After:
### Phase 1.2: <Name> [status: complete]
**Goal:** <one sentence>
**Plan:** `docs/superpowers/plans/<plan-file>.md`
**Completed:** YYYY-MM-DD
Two changes: (a) [status: active] or [status: pending] → [status: complete] in the heading, (b) add **Completed:** YYYY-MM-DD line below **Plan:** with today's actual date.
VERIFY: re-read docs/planning/ROADMAP.md and confirm both edits landed — the heading shows [status: complete], the **Completed:** ... line is present, and no other phase was accidentally modified.
Use the Edit tool on docs/planning/MILESTONE.md to update the ## Phases list. The exact transition is:
Before ([active] or [pending], matching ROADMAP.md):
2. Phase 1.2 — <name> [active]
After:
2. Phase 1.2 — <name> [complete]
VERIFY: re-read docs/planning/MILESTONE.md and confirm the phase entry now reads [complete].
Stage git add docs/planning/ROADMAP.md docs/planning/MILESTONE.md, plus the plan file when start-next-phase ticked it, then commit per Commit & Release Protocol with type=chore, scope=roadmap, subject=complete phase N.M — <name>.
Run git status and confirm a clean tree.
GitHub sync (if initialized) — if the phase has an **Issue:** #N field, invoke sync-github to update the GitHub issue's status label and toggle it to closed. This is a single-phase update, not a full reconciliation. If the phase has no **Issue:** field, skip silently — sync was not initialized for this project.
Announce only after the commit succeeds:
"Phase N.M — {name} marked complete in ROADMAP.md and MILESTONE.md. Committed."
Then offer retro, if it is installed and has not been offered in this session.
complete-milestone is end-of-milestone: marks the WHOLE milestone complete, hands the release to the Commit & Release Protocol's Tag step (which may create no tag), and only runs after audit-milestone passes. It is a one-time event per milestone.
complete-phase is per-iteration: marks ONE phase complete inside an active milestone, runs after every phase wraps up. A milestone with 8 phases will see complete-phase run 8 times, then audit-milestone once, then complete-milestone once.
Without complete-phase, working through a multi-phase milestone leaves ROADMAP.md frozen with every phase showing [status: active] until the very end — exactly the bug this sub-skill fixes.
After resume-work confirmation, or any time the user says "continue", "next", "let's go", or otherwise signals "move the project forward". Acts as the routing hub between project state and the correct downstream skill — replaces the agent's ad-hoc judgment about which skill to enter next.
"Determining the next action from project state."
Read docs/planning/ROADMAP.md and docs/planning/MILESTONE.md. Before identifying the next phase, check whether any phase in the current milestone is [status: active] or [status: pending] AND its plan file exists, has at least one checkbox, and has all of them checked off (- [x]). If yes, run complete-phase first to promote it to complete. This closes the loop after the previous session — without it, every continuation routes back to the already-finished phase. A pending phase with a fully ticked plan is one an unattended run built: the ticked plan reached the default branch when its PR was merged, by the run through ci-watch or by the operator. A plan with no checkboxes shows nothing was executed, so it never closes a phase.
After any pending complete-phase runs, identify the next non-complete phase (first phase with status active, falling back to the first pending phase in roadmap order). Before routing it, run the open-PR check, because an unattended run may already have built it:
unattended/phase-N-M, where N-M is the phase number with a dash, such as unattended/phase-1-2. Run git ls-remote --heads origin unattended/phase-N-M and git branch --list unattended/phase-N-M. The branch exists if either prints a line.gh works (gh auth status succeeds): run the PR queries whether or not the branch exists, because a merged PR's head branch is often deleted. Run gh pr list --head unattended/phase-N-M --state open. If it prints nothing, run gh pr list --head unattended/phase-N-M --state merged --json url,mergeCommit.
<url>. See .claude/unattended-run.md for why. Merge it, then continue." The phase waits; move on to the next non-complete phase and run this check on it.ci-watch. Never treat the phase as unbuilt. First confirm the merge is on the current branch: git merge-base --is-ancestor <mergeCommit.oid> HEAD exits 0. A stacked PR merges into its base branch first, so it may not be. If it is not, report "Phase N.M's unattended PR <url> was merged into its base run branch, not into this branch. Merge that branch down first, then continue." The phase waits; move on to the next non-complete phase and run this check on it. If it is, run complete-phase for the phase. A run that predates the tick step left the plan unticked: tick it first, as step 6 does, because the merged PR shows the run built it with its checks passing. Then identify the next non-complete phase again.unattended/phase-N-M exists with no open PR. Look at it before this phase is built again."gh (missing or not authenticated), branch exists: report "Branch unattended/phase-N-M exists; its PR state is unknown without gh. Check it, then continue." and ask the operator whether the phase waits.gh, no branch: route the phase normally.**Builds on:** line naming a phase that is not complete waits too, and is never built without that phase's code. Report "Phase 1.2 waits on Phase 1.1." and move on. A phase with no **Builds on:** line, or whose named phases are all complete, proceeds. A line that reads <removed Phase N.M>, written by remove-phase, is an open question: the phase waits. Report "Phase X.Y builds on the removed Phase N.M. Its design needs a new answer before it is built." and move on. Any other line whose phase is still the template's literal Phase N.M or a <...> placeholder names no phase, so it counts as no **Builds on:** line here.Check artifacts for that phase:
**Surface:** line in ROADMAP.md. Drives the pre-plan hook in step 5. Missing or Mixed falls through to default routing.docs/superpowers/specs/*-<phase>-*.md (or the phase's referenced design doc) exist?Plan: link in ROADMAP.md (docs/superpowers/plans/*-<phase>-*.md or similar) exist on disk?Surface: UI — does docs/design/MASTER.md exist? Does a UI contract docs/superpowers/specs/*-<phase>-*-ui-contract.md exist?Surface: Refactor — does an impact analysis docs/superpowers/specs/*-<phase>-*-impact-analysis.md exist?docs/superpowers/ keep these files in docs/plans/. Check there too before deciding an artifact is missing.Base routing — route based on design spec / plan file presence. Read the target skill file and follow it end-to-end — do not loosely "invoke" it.
| Phase status | Design spec | Plan file | Action |
|---|---|---|---|
active | — | exists | Read list-phase-assumptions (this skill) → on user confirmation, read the superpowers:executing-plans skill and follow it end-to-end |
active | exists | missing | Run Surface pre-plan hook (step 5) → read the superpowers:writing-plans skill and follow it end-to-end. VERIFY: plan file exists. Then run list-phase-assumptions → superpowers:executing-plans |
pending | exists | exists | Groomed phase (see state-files.md). Use the Edit tool to set [status: active] on the phase in ROADMAP.md and [active] in MILESTONE.md's ## Phases list. VERIFY both edits, then commit per Commit & Release Protocol with type=chore, scope=roadmap, subject=start phase N.M — <name>. Then read list-phase-assumptions (this skill) → on user confirmation, read the superpowers:executing-plans skill and follow it end-to-end |
pending | exists | missing | Run Surface pre-plan hook (step 5) → read the superpowers:writing-plans skill and follow it end-to-end. VERIFY: plan file exists. Then run list-phase-assumptions → superpowers:executing-plans |
pending | missing | missing | Read the superpowers:brainstorming skill and follow it end-to-end. The brainstorm fills in templates/phase-design.template.md and saves it at docs/superpowers/specs/YYYY-MM-DD-<phase>-design.md. On the operator's approval, set the spec's **Status:** draft to **Status:** approved YYYY-MM-DD with today's date. VERIFY: design spec exists AND its **Surface:** line matches the phase's Surface in ROADMAP.md AND no **Builds on:** line still reads Phase N.M or holds a <...> placeholder. If Surface is missing or mismatched, the brainstorm did not complete — re-run it. A placeholder **Builds on:** line is a template leftover: delete it, or fill in the phase and interfaces. Then run Surface pre-plan hook (step 5) → chain to superpowers:writing-plans (verify plan file) → list-phase-assumptions → superpowers:executing-plans |
Surface pre-plan hook — fires once a design spec exists for the phase and BEFORE chaining to superpowers:writing-plans. Reads the phase's **Surface:** value from ROADMAP.md and applies:
| Surface | Pre-plan chain | Required artifact after the hook runs |
|---|---|---|
UI | (a) If decision-tracker is active for this project, run a recall for tags=[ui, design] so prior UI conventions surface before a new contract is written. (b) If docs/design/MASTER.md is missing, read the ui-design-system skill end-to-end and follow it. VERIFY: docs/design/MASTER.md exists. (c) Read the ui-workflow skill (sub-skill ui-phase) end-to-end and follow it. VERIFY: the phase's UI contract exists. | docs/superpowers/specs/*-<phase>-*-ui-contract.md |
Refactor | (a) If decision-tracker is active, run a recall for tags=[architecture, naming] and any project-specific tags so prior structural decisions inform the impact analysis. (b) Read the refactor-analysis skill end-to-end and follow it (Phases 1–7) until it produces the impact analysis document. VERIFY: the impact analysis file exists. | docs/superpowers/specs/*-<phase>-*-impact-analysis.md |
Backend / Data / Infra / Docs / Mixed / unset | No pre-plan hook. Proceed directly to superpowers:writing-plans. | (none) |
The hook produces inputs that writing-plans consumes — UI contracts give the plan concrete component / layout / state targets; impact analyses give the plan a safe execution order grounded in transitive dependencies. Skipping the hook for an applicable surface means writing-plans runs blind to those inputs and produces a less informed plan. Mixed deliberately skips the hook — the author signals that two surfaces are in play and they will sequence them manually; force-firing both ui-phase and refactor-analysis for Mixed produces noisy artifacts.
Decision recall is best-effort — if decision-tracker / longterm-memory MCP is not available, skip the recall step silently and proceed to the surface specialist. Recall failures are not chain failures.
When executing-plans or subagent-driven-development returns (the leaf of every routing path): neither skill ticks the plan file. They track progress in their own ledger and todo list, so the plan's checkboxes are still - [ ]. If execution returned clean, with every task done and the plan's checks passing, use the Edit tool to set every task checkbox in the plan to - [x], and VERIFY by re-reading the plan that no - [ ] is left. Then run the Surface post-implementation hook below FIRST, then run complete-phase to promote the phase to complete in ROADMAP.md and MILESTONE.md. Its commit takes the ticked plan. If execution stopped before every task was done, leave the plan as it is: the phase stays active for the next continuation. Skipping complete-phase is the most common reason ROADMAP.md gets stale during multi-phase milestones.
Surface post-implementation hook — fires after executing-plans returns clean and BEFORE complete-phase. Mirrors the pre-plan hook on the audit side:
| Surface | Post-implementation chain |
|---|---|
UI | Read the ui-workflow skill (sub-skill ui-review) end-to-end and follow it to audit the implementation against the UI contract produced in step 5. ui-review requires the Playwright MCP (via regression-test); if Playwright MCP is unavailable, log a note in the phase's audit history and proceed without the review (do not block complete-phase). |
Refactor / Backend / Data / Infra / Docs / Mixed / unset | No post-implementation hook. Proceed directly to complete-phase. |
The post-impl hook closes the design-implementation loop for UI phases — ui-phase writes the contract before implementation; ui-review audits the result against the same contract. Without it, the contract becomes write-only and the audit value is lost.
After each step, VERIFY the required artifact exists (see HARD-GATE table at the top of this skill) before chaining to the next link. If a required artifact is missing, return to the prior step — do not proceed.
Do not stop and ask "what next?" between links. The chain is mechanical. Only stop for:
list-phase-assumptions user confirmation (this is an explicit gate, not a menu)unattended/phase-N-M branch waits when gh is unavailableresume-work / "continue" / "next"
│
▼
┌──────────────────────┐
│ Active/pending phase │ Yes ┌──────────────────┐
│ with ≥1 checkbox, ├───────►│ complete-phase │
│ all checked? │ │ (active/pending │
│ (cleanup last run) │ │ → complete) │
└────────┬─────────────┘ └────────┬─────────┘
│ No │
◄───────────────────────────────┘
│
▼
┌──────────────────┐
│ Find next phase │◄─────────────────────────┐
│ (first non- │ │
│ complete phase) │ │
└────────┬──────────┘ │
│ │
┌─────▼──────────────┐ Yes ┌─────────────┴──────────┐
│ Open unattended PR,│──────►│ Report and skip: │
│ or Builds on a │ │ "PR open: <url>" or │
│ non-complete phase?│ │ "1.2 waits on 1.1" │
└─────┬──────────────┘ └────────────────────────┘
│ No (merged PR: complete-phase, then find again;
│ a branch with no PR: name it, route on)
┌─────▼──────┐ No ┌──────────────────┐
│ Design spec├──────────►│ brainstorming │──┐
│ exists? │ │ (verify spec) │ │
└─────┬──────┘ └──────────────────┘ │
│ Yes (chains to) │
┌─────▼──────┐ No ┌──────────────────────────────┐ │
│ Plan file ├──────────►│ Surface pre-plan hook │ │
│ exists? │ │ ┌──────────────────────────┐ │ │
└─────┬──────┘ │ │ Surface == UI? │ │ │
│ Yes │ │ → ui-design-system │ │ │
│ │ │ (if no MASTER.md) │ │ │
│ │ │ → ui-workflow ui-phase │ │ │
│ │ │ (verify ui-contract) │ │ │
│ │ │ Surface == Refactor? │ │ │
│ │ │ → refactor-analysis │ │ │
│ │ │ (verify impact- │ │ │
│ │ │ analysis) │ │ │
│ │ │ Else: skip hook │ │ │
│ │ └────────┬─────────────────┘ │ │
│ │ ▼ │ │
│ │ ┌──────────────────────────┐ │ │
│ │ │ writing-plans │◄┼──┘
│ │ │ (verify plan) │ │
│ │ └────────┬─────────────────┘ │
│ └──────────┼───────────────────┘
│ │
│ pending (groomed)? │
│ set [status: active] first │
┌─────▼──────────────┐ │
│ list-phase- │◄────────────┘
│ assumptions │
└─────┬──────────────┘
│ User confirms
▼
┌────────────────────┐
│ executing-plans │
└────────┬───────────┘
│
┌─────▼──────────────────┐ Yes ┌─────────────────────────────┐
│ All tasks done? ├───────►│ Surface post-impl hook │
│ (tick plan, close loop)│ │ ┌─────────────────────────┐ │
└─────┬──────────────────┘ │ │ Surface == UI? │ │
│ No (mid-phase pause) │ │ → ui-workflow ui-review│ │
▼ │ │ (degrade if no │ │
(return — phase stays │ │ Playwright MCP) │ │
active for the next │ │ Else: skip hook │ │
continuation) │ └────────┬────────────────┘ │
│ ▼ │
│ ┌─────────────────────────┐ │
│ │ complete-phase │ │
│ │ (active → complete) │ │
│ └─────────────────────────┘ │
└─────────────────────────────┘
When the operator wants to answer every design and plan question of the active milestone in one sitting, so its phases can be built later without them: by an unattended run, or attended through start-next-phase. Triggers on: "groom the milestone", "groom milestone N", "prep this milestone for an unattended run", "answer everything up front". new-milestone's closing announce line also offers it.
Grooming writes designs and plans. It never executes a plan.
Pre-condition: a milestone is [status: active] in docs/planning/ROADMAP.md. If none is, refuse: "No milestone is active. Run new-milestone first." If the operator names a milestone that is not the active one, refuse: "Only the active milestone can be groomed. Milestone N is not active."
"Grooming milestone N — design and plan every pending phase, no execution."
Read docs/planning/ROADMAP.md, docs/planning/MILESTONE.md and docs/planning/CONVENTIONS.md. Run complete-phase for any phase that start-next-phase step 1 would close.
Check commands. Apply the HARD-GATE's writing-plans ## Checks rule now, once for the whole milestone, instead of at the first plan. When it asks for a command, propose one found in the repo, such as a package.json script, a .sln or a Makefile target. Stage the CONVENTIONS.md edit with the run's first commit, a repair in step 3 or the first phase in step 4.6. If step 3 finds nothing to groom or repair, commit it on its own per Commit & Release Protocol with type=chore, scope=state, subject=record build and test commands.
List the phases to groom: the active milestone's phases that are not [status: complete] and have no plan file on disk. Look for plans as start-next-phase step 3 does, including the legacy docs/plans/ layout. A phase that already has a plan is not groomed again. It gets the repairs below, so ready-check cannot reject it for a gap grooming could have closed. Some of them fix a groom that was interrupted after writing the plan file. Others fix a plan written before this sub-skill existed.
**Plan:** line in ROADMAP.md is missing, use the Edit tool to write it, and VERIFY it by re-reading the file.**Status:** draft, get the operator's approval, then use the Edit tool to set **Status:** approved YYYY-MM-DD with today's date, and VERIFY it by re-reading the spec.## Checks section, use the Edit tool to add one per the HARD-GATE's writing-plans ## Checks rule, with the commands from step 2, and VERIFY it by re-reading the plan.**Builds on:** entry and the earlier phase's plan has no matching guard check, run step 4.5 for it.After any repair, commit as in step 4.6. If no phase is left to groom, skip to step 6.
For each phase, in roadmap order:
superpowers:brainstorming skill and follow it end-to-end at phase scope, as the pending | missing | missing row of start-next-phase step 4 does. The brainstorm fills in templates/phase-design.template.md and saves it at docs/superpowers/specs/YYYY-MM-DD-<phase>-design.md. On the operator's approval, set **Status:** draft to **Status:** approved YYYY-MM-DD with today's date. A spec that exists but is not approved, with no status line or with draft, gets the operator's approval now, or a re-run of the brainstorm. Never plan over an unapproved design. VERIFY: the spec exists, its **Surface:** line matches the phase's Surface in ROADMAP.md, and it reads **Status:** approved YYYY-MM-DD.**Builds on:** Phase N.M — followed by the interfaces it uses, one line per earlier phase: the type, function, endpoint or table names. That phase's code does not exist yet, so take the names and signatures from its plan. This phase's plan then uses exactly those names. An earlier phase that is active counts too. VERIFY: every **Builds on:** line names a real phase and real interfaces. A line that still reads Phase N.M or holds a <...> placeholder is an open question, and ready-check fails it.start-next-phase step 5, including its VERIFY.superpowers:writing-plans skill and follow it end-to-end. Supply the execution method up front, in these words: "Execution method: none now. This plan is built later, by an unattended run or by start-next-phase. Review only; do not execute." writing-plans then asks the operator to review the plan and stops there. The plan follows the HARD-GATE's writing-plans rules, ## Checks included. VERIFY: the plan file exists and has a ## Checks section. Then use the Edit tool to write the phase's **Plan:** line in ROADMAP.md, and VERIFY it by re-reading the file. The phase keeps its status: a pending phase stays [status: pending].**Builds on:** entry, append one guard check to the earlier phase's plan, under its ## Checks. If that plan has no ## Checks section, create it first per the HARD-GATE's writing-plans ## Checks rule. For Phase 1.2 building on Phase 1.1, that is - guard 1.2: `cmd` in Phase 1.1's plan. The command is a build or test command that exercises the interfaces named on the line, normally a test that 1.1's plan already adds. A guard must fail when the named interface is missing or renamed. A test that imports or calls the named function counts. A name filter that can match zero tests, such as --test-name-pattern, does not count unless the command also fails when no test ran. If 1.1's plan has no such test, add a task to 1.1's plan that writes one, and point the guard at it. A Phase 1.1 that is already active still gets the guard. A new test task goes in unticked, and the execution in flight picks it up. The guard label tells ready-check that the check may fail at the base. VERIFY: re-read the earlier plan and confirm the guard bullet is under ## Checks.type=docs, scope=plan, subject=groom phase N.M — <name>. Run git status and confirm a clean tree.Between phases, apply the handoff rule in context-budget ## Fresh-Session Handoff. A finished phase groom is a natural break. On handoff, pause-work writes the STATE.md ## Grooming section with Grooming: milestone N, next phase N.M, naming the next phase to groom. The new session re-enters groom-milestone. It resumes at step 3, because the groomed phases now have plans.
Hand off. If docs/planning/STATE.md has a ## Grooming section, use the Edit tool to remove it, and VERIFY by re-reading the file that it is gone. Commit STATE.md per Commit & Release Protocol with type=chore, scope=state, subject=clear grooming marker — milestone N, and run git status to confirm a clean tree. A stale section would send the next resume-work back into grooming. Then, if the unattended plugin is installed, announce: "Milestone N is groomed. Run ready-check to queue it, or start-next-phase to build it attended." Otherwise announce: "Milestone N is groomed. Run start-next-phase to build it." Do not invoke ready-check unasked; the operator may want to build attended.
executing-plans or subagent-driven-development.[status: active].When the user believes a milestone is complete and wants to verify it against its definition of done.
"Auditing milestone N — {name}. I'll verify each definition-of-done criterion against git history, test results, and documentation."
docs/planning/MILESTONE.md to get the definition of done.complete.npm test / dotnet test / pytest (detect from project). Record pass/fail.regression-test skill if a web UI is available (optional, confirm with user).audit-milestone does NOT re-run code-quality review (security, YAGNI, dead code, naming) — that is pre-push-review's remit, run per phase before push. Check that at least one docs/pre-push-review-*.md report exists with a PASS verdict, dated within the milestone's lifespan. Record one of three outcomes: (a) PASS report on file → record verdict in audit; (b) FAIL or stale (older than the milestone's earliest phase commit) → record gap, recommend re-running pre-push-review on each feature branch; (c) no reports found → record gap as "code quality not independently reviewed in this milestone" with same recommendation. This is a warning, not a hard fail — milestones can pre-date the pre-push-review skill or have used a different review process. Surface the gap so the user decides.docs/planning/CONVENTIONS.md says Milestone completion tags a release: yes. Do not check that the tag already exists: complete-milestone creates it, and it runs after this audit passes, so requiring it here is a deadlock — the mirror of the no-case forever-fail. Instead confirm the tag can be rendered: Scheme is a shape the Commit & Release Protocol's Tag step handles (semver / calver / milestone, not none or unrecognised), and — for semver — that a version is obtainable. When conventions say no, skip this criterion: it is not a gap and must not count toward a FAIL verdict. The release is owned by whatever Released by names, and the absence of a milestone tag is the correct state. Unguarded either way, this criterion blocks complete-milestone: no-projects fail forever because the tag never comes, yes-projects deadlock because it cannot come yet.docs/superpowers/reviews/YYYY-MM-DD-milestone-N-audit.mdcomplete-milestone.plan-milestone-gaps.After audit-milestone returns PASS.
"Completing milestone N — {name}. I'll archive the milestone doc, update the roadmap, and handle the release per this project's conventions — which may mean no tag at all."
Confirm with user: "Mark Milestone N — {name} as complete?" Do not promise a tag here. Whether one is created is the Commit & Release Protocol's Tag step's decision, made in step 7 against conventions this step has not read yet.
Use the Edit tool on docs/planning/ROADMAP.md: set milestone status to complete and add **Completed:** YYYY-MM-DD line.
VERIFY: re-read docs/planning/ROADMAP.md and confirm the milestone block now shows [status: complete] and a Completed date.
Use the Edit tool on docs/planning/MILESTONE.md: set **Status:** complete and add **Completed:** YYYY-MM-DD.
VERIFY: re-read docs/planning/MILESTONE.md and confirm the status and completion date.
Stage git add docs/planning/ROADMAP.md docs/planning/MILESTONE.md, then commit per Commit & Release Protocol with type=chore, scope=milestone, subject=complete milestone N — <name>. Run git status and confirm a clean tree.
Tag the release per the Commit & Release Protocol's Tag step — it decides whether a tag is created at all, renders it in the project's own scheme, resolves collisions and re-runs, verifies it, and announces the outcome. Do not tag here, and do not presume it will tag: where the project's conventions hand releases to an automation, that step correctly performs no git action.
Announce only after the Tag step returns: "Milestone N complete. Ready to start Milestone N+1 with new-milestone." The Tag step has already announced the release outcome — do not restate it and do not add a tag claim of your own. It carries an announce for every outcome it can reach, including the ones where no tag was created; a second announce written here could only drift from it. When Released by is release-please, add one pointer after it: the release PR is followed by the ci-watch Release stage, which checks that the milestone's feat and fix commits are in it and that the tag and publish workflows succeed.
Then offer retro, if it is installed and has not been offered in this session.
One-time setup. Triggered manually by /sync-to-github or by an explicit invocation when the user signals: "set up GitHub sync", "publish the roadmap to GitHub", "make the backlog visible to external devs". Refuses to run if sync is already initialized (any **Issue:** or **Milestone:** field present in ROADMAP.md) — incremental updates are sync-github's job.
gh auth status succeeds. If not → refuse with: "Sync requires the GitHub CLI authenticated. Run gh auth login, then re-invoke /sync-to-github."git remote get-url origin returns a github.com URL. If not → refuse with: "Project does not appear to be hosted on GitHub. Sync is GitHub-specific; skip for non-GitHub remotes."docs/planning/ROADMAP.md exists with at least one milestone."Initializing GitHub sync. I'll create native Milestones and Issues for every roadmap entry, then write the GitHub numbers back into ROADMAP.md so future syncs are idempotent."
gh api repos/{owner}/{repo}/... paths use literal {owner} and {repo} placeholders — gh api substitutes them from the current repo's remote automatically. Pass them through verbatim, do not interpolate. Markdown permalinks (https://github.com/.../blob/...) are NOT touched by gh — resolve owner/repo explicitly:
OWNER_REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner) # e.g. "MarcelRoozekrans/superpowers-extensions"
SHA=$(git rev-parse HEAD)
Capture both once at the start of the sub-skill and reuse them for every iteration. Do not re-resolve per phase.
Verify pre-conditions (above). Refuse loudly if any fails. Then capture OWNER_REPO and SHA once per the Repo resolution section above and reuse them for every permalink built in Step 4a.
Create labels if missing — surface:ui, surface:backend, surface:refactor, surface:data, surface:infra, surface:docs, surface:mixed, status:pending, status:active, status:complete, help wanted. Use gh label create --force <name> for each.
For each milestone in ROADMAP.md (top-down order):
a. gh api -X POST repos/{owner}/{repo}/milestones -f title="Milestone N: <Name>" -f description="<body>" — pass {owner} / {repo} as literal placeholders (gh substitutes them). The <body> is the milestone's ## Goal paragraph plus its ## Definition of Done checklist, both read from docs/planning/MILESTONE.md for the active milestone, or from the matching milestone block in ROADMAP.md for inactive ones (DoD lives in the milestone block per state-files.md). Capture the returned number.
b. Edit ROADMAP.md to add **Milestone:** N immediately after the milestone's **Started:** line.
c. VERIFY by re-reading ROADMAP.md.
For each phase under each milestone (in order):
a. Build the issue body: the phase's **Goal:** line + Surface tag + permalink to the design spec at https://github.com/${OWNER_REPO}/blob/${SHA}/docs/superpowers/specs/<spec>.md if a spec exists; otherwise include the literal text "no design spec yet" in the issue body in place of the permalink line. Use the captured OWNER_REPO and SHA from Step 1 — do not paste the literal {owner}/{repo} placeholders here, those only work for gh api.
b. Build the label list: surface:<value>, status:<value>, plus help wanted if **HelpWanted:** yes.
c. gh issue create --title "Phase N.M: <Name>" --body "<body>" --milestone <milestone-number> --label "<labels>" — capture the returned issue number. Title comes from the phase's ### Phase N.M: <Name> heading in ROADMAP.md.
d. Edit ROADMAP.md to add **Issue:** #N after the phase's **HelpWanted:** line if present, otherwise after **Surface:** (legacy phases authored before HelpWanted existed may omit it — fall through to Surface).
e. VERIFY by re-reading ROADMAP.md.
Final VERIFY — re-read ROADMAP.md end-to-end, confirm every milestone has **Milestone:** N and every phase has **Issue:** #N. If any is missing, the corresponding gh call did not return cleanly — re-attempt that one once. If it still fails, fall through to the gh API error on a single call row of the Error handling table — stop the loop, report the failing call, and direct the user to sync-github for incremental recovery.
Stage git add docs/planning/ROADMAP.md, then commit per Commit & Release Protocol with type=chore, scope=sync, subject=init github sync — N issues, M milestones. Run git status and confirm a clean tree.
Announce only after the commit succeeds:
"GitHub sync initialized. N issues created across M milestones. Future
pause-workandcomplete-phaseruns will reconcile state automatically."
Available only on direct invocation — /sync-to-github --dry-run or explicit user phrases ("dry run", "preview the sync", "show me what would change"). The auto-invocations from pause-work and complete-phase always run for-real; they do NOT propagate flags or trigger phrases. If a dry-run is needed, run init-github-sync (or sync-github) directly before pausing.
In dry-run mode:
gh call that would be made, with argumentsUse this on first run to verify the labels, milestones, and issues look right before any real GitHub state is created.
| Condition | Response |
|---|---|
| Already initialized (Issue/Milestone fields present) | Refuse: "Sync already initialized. Use sync-github for incremental updates." |
gh auth status fails | Refuse with gh auth login instruction |
| No GitHub remote | Refuse with explanation |
| Rate limit hit mid-loop | Stop with partial state. Report which milestones/issues were created. Re-running init-github-sync will be refused (the already-initialized guard fires on the partial state). Direct the user to sync-github, which is incremental-aware and will fill in the missing issues/milestones. |
gh API error on a single call | Stop the loop. Report the failing call. Do NOT continue with other phases — partial state is confusing. |
Automatic. Runs as a step of pause-work (full reconciliation across all milestones and phases) and complete-phase (just the finished phase). Manual invocation is also supported when the user says "resync GitHub" or "push roadmap changes to GitHub".
gh auth status succeeds. If not → log a warning to the conversation, skip silently, do NOT block the parent skill.init-github-sync (at least one **Issue:** or **Milestone:** field present). If not → log "Sync not initialized; skipping. Run /sync-to-github to initialize", do NOT block."Reconciling GitHub state with ROADMAP.md."
Verify pre-conditions (above). Skip silently if any fails. Then capture OWNER_REPO and SHA once per the Repo resolution section in init-github-sync (same rules apply here):
OWNER_REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
SHA=$(git rev-parse HEAD)
Reuse both for every iteration in steps 3-4. {owner} and {repo} are passed as literal placeholders to gh api (auto-substituted); OWNER_REPO is interpolated into markdown permalinks (which gh does not touch).
Read docs/planning/ROADMAP.md.
Reconcile milestones. For each milestone block:
**Milestone:** N exists → gh api -X PATCH repos/{owner}/{repo}/milestones/N -f title="Milestone N: <Name>" -f description="<body>" -f state="open|closed". Title comes from the ## Milestone N: <Name> heading. <body> is the milestone's ## Goal paragraph + ## Definition of Done checklist (read from docs/planning/MILESTONE.md for the active milestone, or from the matching milestone block in ROADMAP.md for inactive ones — DoD lives in the milestone block per state-files.md). State is open if [status: active|pending], closed if [status: complete].init-github-sync step 3, write back.Reconcile phases. For each phase block:
DESIRED.**Issue:** #N exists:
gh issue view N --json labels -q '.labels[].name' → call this set CURRENT.ADD = DESIRED - CURRENT; REMOVE = (CURRENT ∩ {known sync-managed labels}) - DESIRED. The "known sync-managed labels" are the ones init-github-sync creates (surface:*, status:*, help wanted) — never propose to remove labels outside this set, those are maintainer-applied.gh issue edit N --title "Phase N.M: <Name>" --body "<body>" --milestone <m> plus one --add-label <name> per element of ADD and one --remove-label <name> per element of REMOVE. Title comes from the ### Phase N.M: <Name> heading in ROADMAP.md; <body> follows the init-github-sync Step 4a recipe (goal + Surface tag + design-spec permalink at OWNER_REPO/SHA, or "no design spec yet"). Skip the edit entirely when both ADD and REMOVE are empty AND title/body/milestone are unchanged.gh issue close N or gh issue reopen N based on [status: complete].init-github-sync step 4, write back.Detect external signals. For each phase with **Issue:** #N:
gh issue view N --json state,closedAt,comments — check GitHub-side state.| GitHub state | Local ROADMAP status | Action |
|---|---|---|
closed | active | Post comment on the issue: "Issue closed externally — maintainer should run complete-phase N.M locally to confirm. ROADMAP.md still shows this phase as active." Idempotent — first scan the issue's comments; skip if a previous "closed externally" comment exists. |
closed | pending | Same comment, adapted for pending phases. |
open | complete | We marked complete locally; step 4 already issued gh issue close. No comment. |
open | active / pending | Normal — no action. |
If anything was written back to ROADMAP.md (new issues created or milestones added since last sync), stage git add docs/planning/ROADMAP.md, then commit per Commit & Release Protocol with type=chore, scope=sync, subject=reconcile github state. If no writes happened, skip the commit.
Announce only the change set, briefly:
"Synced. N issues updated, M created, K external-close signals posted."
Same flag/trigger as init-github-sync — direct invocation only. The auto-invocations from pause-work (step 10) and complete-phase (step 8) always run for-real and do NOT accept --dry-run; flags do not propagate from the parent skill. To preview a sync, invoke sync-github directly before triggering the parent. Prints intended gh calls, skips writes, skips commits.
| Condition | Response |
|---|---|
gh auth missing/failed | Log + skip silently. Never block parent. |
Single gh call fails (network, rate limit, permission) | No mid-loop retry — log the specific failure, continue with the rest of the loop. Report aggregate failures at the end. Partial sync is acceptable; next run reconciles. (Differs intentionally from init-github-sync, which retries once before falling through, because sync-github runs frequently from pause-work/complete-phase and a transient failure is naturally re-tried on the next sync.) |
| Issue #N returns 404 (deleted on GitHub) | Warn: "Issue #N referenced in ROADMAP.md no longer exists on GitHub. Skipping. Reconcile manually before next sync." Do NOT silently re-create with a new number. |
Phase removed locally via remove-phase | remove-phase itself runs gh issue close <N> --comment "Phase removed from roadmap" (see remove-phase step 10). sync-github does not encounter this case because the phase block is already gone from ROADMAP.md by the time it next runs. If remove-phase's gh call failed (gh missing/network), the issue is left open on GitHub as an orphan — the maintainer reconciles manually. |
Phase renumbered locally via insert-phase | Issue number is stable; only the title (Phase N.M: <Name> from the heading in ROADMAP.md) changes. The reconcile loop in step 4 picks the new title up via gh issue edit --title. |
Embedded in sync-github step 5 — not a standalone sub-skill. The procedure (read GitHub state with gh issue view, compare to local ROADMAP.md status, post idempotent advisory comments on drift) lives there. This section exists so cross-references (Red Flag #13, Common Rationalizations row "External dev closed the issue, the work is done", Quick Reference table) resolve to a real heading instead of looking like a missing skill.
The procedure is intentionally embedded rather than separated because every signal it detects requires the surrounding sync-github reconciliation context — pulling it out would force callers to re-walk the same ROADMAP.md state immediately.
At the start of a multi-milestone project, or when the existing docs/planning/ROADMAP.md needs reshaping at the milestone level (not just phase additions). Triggers on phrases like: "plan the roadmap", "what milestones do we need", "high-level project plan", "design the roadmap", or first-time use of project-orchestration on a project that has no docs/planning/ROADMAP.md yet.
This is the roadmap-level brainstorming entry point — it brainstorms the project as a whole (3-7 milestones with rough scope), not a single milestone.
"Planning the project roadmap. I'll brainstorm milestone-level scope before writing any state files."
Optional: invoke map-codebase first if the project is brownfield and the codebase has not been analyzed yet. Codebase context grounds milestone proposals. Skip on greenfield — empty repo means brainstorm from a blank sheet, no codebase to map.
Establish project conventions. Read init-conventions and follow it. On brownfield most fields are detected and the user just confirms; on greenfield they are decided here. This runs BEFORE the brainstorm so that stack decisions are settled and the brainstorm's scope guard — which defers library choices — does not have to carry them.
VERIFY: docs/planning/CONVENTIONS.md exists.
Read the superpowers:brainstorming skill file and follow it end-to-end at roadmap scope — the generic layout of the entire project across multiple milestones and phases, NOT a single milestone and NOT a single phase. The brainstorm answers "what is the shape of this project from start to finish?", and must produce a filled-in copy of templates/roadmap-design.template.md, saved at docs/superpowers/specs/YYYY-MM-DD-roadmap-design.md. The template's required sections are:
Surface tag — exactly one of UI | Backend | Refactor | Data | Infra | Docs | Mixed. This drives start-next-phase's pre-plan routing (UI phases chain through ui-design-system + ui-workflow ui-phase; refactor phases chain through refactor-analysis; others skip the pre-plan hook). At roadmap scope a one-word tag is enough — no surface detail required yet.Use the template structure verbatim (headings, ordering, Surface tag formatting). The VERIFY step that follows grep-checks the filled-in copy against the template's required sections — drifting from the template makes the spec unreadable to downstream skills.
Scope guard — keep the abstraction level high: if the brainstorm starts converging on the implementation details of a single milestone or phase (specific files to create, API endpoints, schemas, library choices), STOP and zoom out. That detail is new-milestone's job (per-milestone scope) and start-next-phase → superpowers:brainstorming (per-phase scope), each fired separately when their turn comes. Stack-level choices — language, package manager, framework, datastore — are not deferred but already decided: the Establish project conventions step above recorded them in docs/planning/CONVENTIONS.md, so read them off that file rather than re-litigating them here. Only per-milestone library choices belong to new-milestone. The roadmap brainstorm intentionally stays lossy at the milestone level so it covers the whole project in one pass without rat-holing on milestone 1.
Greenfield vs brownfield: the brainstorm is the same shape either way. Brownfield grounds milestone proposals in existing code (via map-codebase); greenfield grounds them in the user's stated product vision. Neither case skips the whole-project sweep — both produce the same 3-7 milestone roadmap.
VERIFY: the brainstorming design spec exists at docs/superpowers/specs/YYYY-MM-DD-roadmap-design.md AND covers all 3-7 milestones (not just the first one). If the spec only details milestone 1 with the rest as TBD, the brainstorm did NOT complete at roadmap scope — return to the brainstorm step and finish the sweep. Do NOT skip to writing files because "I have the milestones in my head" or "we can detail the later milestones when we get to them" — the whole point is the global view.
Ask the compress-memory opt-in question. If the compress-memory plugin is installed (check for plugins/compress-memory/skills/compress-memory/SKILL.md in the active marketplace), ask:
Enable memory-file compression for this project?
When enabled,
pause-workautomatically compressesSTATE.mdandROADMAP.mdafter writing them. Saves ~40-50% input tokens every time those files are read back (everyresume-work, everyprogress, every session start). Code, URLs, paths, headings, and tables preserved byte-exact. Original files backed up as*.original.mdbefore each compression.Trade-off: prose nuance gets terser. If you write long-form rationale in STATE.md notes, you may prefer to keep it readable.
(y/N)— opt-out by default.
Record the answer (enabled if yes, disabled if no or skipped). This value goes into the compress_memory frontmatter field on ROADMAP.md in the next step.
If compress-memory is NOT installed, skip this question and treat the answer as absent (no frontmatter written). The user can install the plugin later and add the field manually.
Use the Write tool to create docs/planning/ROADMAP.md from the design spec.
If the user answered the compress-memory opt-in question, prepend the YAML frontmatter block to the file:
---
compress_memory: enabled
---
(or disabled per the user's answer)
First milestone with status: active, all others with status: pending. Format per state-files.md.
VERIFY: re-read docs/planning/ROADMAP.md and confirm: (a) every brainstormed milestone is present, (b) exactly one is active, (c) milestone numbering is consecutive starting at 1, (d) if the opt-in question was asked, frontmatter compress_memory field is present with value enabled or disabled.
Use the Write tool to create docs/planning/MILESTONE.md for milestone 1 only (subsequent milestones get their own MILESTONE.md when activated via new-milestone). Include goal, definition of done, and the proposed phase outline from the design.
VERIFY: re-read docs/planning/MILESTONE.md and confirm goal, DoD, and phase list are present.
Stage git add docs/planning/ROADMAP.md docs/planning/MILESTONE.md, then commit per Commit & Release Protocol with type=chore, scope=roadmap, subject=plan project roadmap (M1-M<N>). Run git status and confirm a clean tree.
Announce only after the commit succeeds: "Roadmap drafted with N milestones. Milestone 1 is active. Use add-phase to define phase 1.1, or invoke brainstorming to refine milestone 1's scope further."
No. This sub-skill exists specifically to force a brainstorm at the roadmap level, covering the whole project across multiple milestones. If the user pushes back ("just write the file, I know what I want"), capture their stated milestones in a brief brainstorm anyway — the brainstorming skill itself is short by default. The output spec is what audit-milestone and downstream skills will reference; skipping it leaves no shared source of truth.
Also no. If the user says "I only care about the first milestone right now, let's just plan that" — that is new-milestone territory, not plan-roadmap. Run plan-roadmap once for the whole-project sweep (even if later milestones are sketchy), then run new-milestone for the first milestone's detail. The two operate at different levels of abstraction by design; collapsing them loses the global view that prevents milestone-2-onwards drift.
After complete-milestone, or when the user wants to start a new version cycle on top of an existing roadmap.
Pre-condition: the previous milestone (N) must have status complete in docs/planning/ROADMAP.md. If it does not, refuse and recommend audit-milestone → complete-milestone first.
"Starting milestone N+1. I'll brainstorm the milestone scope before writing any state files."
Read docs/planning/ROADMAP.md and confirm the previous milestone has status complete. If not, STOP. Announce: "Milestone N is not complete. Run audit-milestone then complete-milestone before starting milestone N+1." and exit this sub-skill.
Read the superpowers:brainstorming skill file and follow it end-to-end at milestone scope. The brainstorm produces a filled-in copy of templates/milestone-design.template.md, saved at docs/superpowers/specs/YYYY-MM-DD-milestone-N-design.md. The template's required sections are:
Surface tag — exactly one of UI | Backend | Refactor | Data | Infra | Docs | Mixed. If plan-roadmap already assigned a Surface for this phase, reuse it unless the milestone-scope brainstorm reveals it was wrong. The Surface drives start-next-phase's pre-plan routing — get it right at milestone scope so the routing is deterministic when each phase activates.Use the template structure verbatim. The design from plan-roadmap (if it exists) covers this milestone at low fidelity — use it as input, but do NOT skip the brainstorm because "the roadmap already says what this milestone is". Roadmap-level scope is intentionally lossy; per-milestone brainstorming is where the detail lives.
VERIFY: the brainstorming design spec exists at docs/superpowers/specs/YYYY-MM-DD-milestone-N-design.md (or equivalent). If missing, the brainstorm did not complete — return to step 2.
Determine milestone number (current + 1).
Use the Write tool to create or overwrite docs/planning/MILESTONE.md with the new milestone definition from the design spec. Format per state-files.md.
VERIFY: re-read docs/planning/MILESTONE.md and confirm: (a) milestone number is N+1, (b) goal paragraph is present, (c) DoD list has at least 2 criteria, (d) Phases section is present (may be a stub if phases haven't been added yet).
Use the Edit tool to add the new milestone block to docs/planning/ROADMAP.md with status active and **Started:** YYYY-MM-DD. Use today's actual date.
VERIFY: re-read docs/planning/ROADMAP.md and confirm the new milestone block is present with the correct number, name, status, and started date.
Stage git add docs/planning/MILESTONE.md docs/planning/ROADMAP.md, then commit per Commit & Release Protocol with type=chore, scope=milestone, subject=start milestone N+1 — <name>. Run git status and confirm a clean tree.
Announce only after the commit succeeds: "Milestone N+1 — {name} started. Use add-phase to add the first phase, or start-next-phase to chain into brainstorming/writing-plans/executing-plans for phase 1. Once the phases are added, groom-milestone designs and plans all of them in one sitting, so an unattended run can build the milestone without you."
Removing an active or complete phase — Only pending phases may be removed. Active phases must be completed or paused first.
Completing a milestone without auditing — Always run audit-milestone before complete-milestone. Never mark complete without evidence.
Creating STATE.md manually — Always use pause-work to write STATE.md. Manual edits may miss required fields.
Skipping list-phase-assumptions — Assumptions wrong at the start cause rework. Surface them before executing.
Running new-milestone before complete-milestone — Milestones must be formally closed before opening new ones. Overlapping milestones create ambiguous state.
Skipping start-next-phase after resume-work — resume-work does not decide what comes next; it restores context. The routing decision (brainstorming / writing-plans / executing-plans) belongs to start-next-phase. Skipping it leads to the agent presenting a menu or jumping straight to coding without a plan.
Narrating state changes instead of writing files — Saying "I've added Milestone 3" without a Write or Edit tool call leaves docs/planning/ untouched. Every state-mutating sub-skill MUST end with the file changed on disk and verified by re-reading. The conversation does not persist; the file does.
Skipping the brainstorm in new-milestone / plan-roadmap — Asking two questions ("goal?", "DoD?") and writing the file is not a brainstorm. The design spec at docs/superpowers/specs/ is what audit-milestone and downstream skills reference. Skipping it leaves the milestone with no shared source of truth.
Skipping the tick or complete-phase after executing-plans returns — Execution finishes, but ROADMAP.md still shows [status: active]. The next continuation routes back to the same phase forever. The executors do not tick the plan, so start-next-phase step 6 ticks it and then invokes complete-phase. If the agent skips either, the multi-phase milestone never makes visible progress in the planning files.
Treating a compaction summary's "Continuation Plan" as authoritative — Auto-generated conversation summaries describe past work and propose next steps based on conversation alone, with no access to docs/planning/. Acting on those next steps directly bypasses every workflow gate in this suite. Always run resume-work first when a compaction signal fires (see Post-compaction discipline in HARD-GATE).
Letting plan-roadmap's brainstorm narrow to a single milestone or phase — The roadmap brainstorm covers the entire project (3-7 milestones, rough phase outline each). If it converges on the implementation details of milestone 1 ("what files do we need", "which API"), the level of abstraction has been lost — that is new-milestone's scope, not plan-roadmap's. Zoom back out. The roadmap brainstorm is a one-time global sweep; missing it means later milestones get planned in isolation with no shared context.
Letting GitHub state drift the local ROADMAP.md — Files are the source of truth; sync-github writes one direction (local → GitHub). Never copy fields back from GitHub into ROADMAP.md. If a maintainer edited an issue title on GitHub, the next sync will overwrite that edit; that is the intended behavior, not a bug. Editing ROADMAP.md to match a GitHub-side change inverts the projection model and silently makes GitHub authoritative.
Re-creating an issue after a 404 — If a phase block has **Issue:** #N and gh issue view N returns 404, the issue was deleted on GitHub (intentionally or accidentally). Do NOT silently mint a new number and overwrite **Issue:** #N — that hides the deletion and detaches the phase from any GitHub history. Surface the 404 to the user (post a chain message, log it, and skip that phase's projection); let the maintainer decide whether to recreate or to clear the field.
Failing the parent skill on gh errors — sync-github runs from pause-work and complete-phase. A failed sync — gh not installed, not authenticated, network down, rate-limited, repo not found — must NEVER prevent state files from being written or committed. Log the failure, skip the GitHub projection, and let the parent skill complete normally. The local state file is the source of truth and must remain writable even when GitHub is unreachable.
"I'll just commit with chore(...) like the examples show" — The examples are gone. Read docs/planning/CONVENTIONS.md and follow the Commit & Release Protocol — the host project's lint config decides the format, not this skill. Every call site now passes a type / scope / subject triple and lets the protocol render it; copying a message shape out of this file's history is how the hardcodes got here in the first place, and it is exactly the message the host's commitlint may reject.
Executing a plan during grooming — groom-milestone stops at the reviewed plan. Running executing-plans or subagent-driven-development from it builds a phase that an unattended run will build again, and leaves ROADMAP.md saying pending for work that is done. The operator chooses how the milestone is built, after grooming ends.
Grooming a phase outside the active milestone — A later milestone's plan is written against code that the active milestone has not built yet, so its names are guesses on top of guesses. Groom the active milestone, build it, then groom the next.
| Rationalization | Why It's Wrong | Correct Action |
|---|---|---|
| "I know where we are, no need to resume" | Memory doesn't persist across sessions; STATE.md does | Always read STATE.md at session start on an active project |
| "Skip the audit, I know all tests pass" | DoD has multiple criteria, not just tests | Run audit-milestone mechanically |
| "The phase is basically done, mark it complete" | "Basically done" is not done | Complete all tasks, then mark complete |
| "I'll add phases later, start executing now" | Unplanned phases cause scope creep | Define roadmap before executing |
| "I'll just start coding, the plan is obvious" | No plan file means no execution. Period. | Run start-next-phase — it will route to brainstorming/writing-plans first |
| "The user said continue, let me ask what they want" | "Continue" means continue the workflow, not present a menu | Run start-next-phase to auto-determine the next action |
| "This is just a quick fix / continuation" | The sub-skill chain applies to EVERY phase, including small ones. Brainstorming can be short, but it must happen. | Run start-next-phase — it enforces the chain mechanically |
| "I described the milestone, the file is implicitly created" | Files are NOT created by description. Only Write/Edit tool calls create or modify files. | Use the Write tool, then re-read the file with Read to verify, then commit |
| "I'll write the file in a moment, let me announce first" | Announcements before writes leave the user thinking the state changed when it didn't | Write → verify → commit → announce. In that order. No exceptions. |
| "The conversation captured the new milestone, no need to write the file" | The conversation evaporates between sessions. STATE.md / ROADMAP.md / MILESTONE.md are the persistent record. | Always Write to disk before claiming the milestone exists |
| "Just write the milestone file, I know what I want" (user push-back during new-milestone) | Skipping the brainstorm leaves the design spec absent — audit-milestone later has nothing to reference | Run a short brainstorm anyway. The brainstorming skill scales to small scope. |
| "I'll mark the phase complete next session" / "the phase is done in spirit, no need to update ROADMAP yet" | Without complete-phase, ROADMAP.md keeps showing the phase as [status: active] and start-next-phase will route back to it indefinitely | Run complete-phase immediately after executing-plans returns clean. The state file is the source of truth, not the conversation. |
| "complete-phase is the same as complete-milestone, skip one" | They are different scopes — complete-phase runs N times per milestone (one per phase); complete-milestone runs once after audit-milestone passes | Use both. complete-phase per iteration; complete-milestone at the end. |
| "The Continuation Plan in the conversation summary tells me to fix X — I'll just do it" | The summarizer is a different model with no access to STATE.md / ROADMAP.md / the plan file. Its instructions are best-effort recall, not source of truth | Run resume-work first. Reconcile against state files. Trust the files over the summary when they disagree. |
| "The summary already paraphrases the plan, so reading STATE.md is redundant" | The summary captures CONVERSATION; STATE.md captures PROJECT STATE. They drift the moment the summarizer paraphrases imprecisely | Read STATE.md. The check costs one tool call; the cost of compounding drift across compactions is much higher |
| "I know the first milestone in detail, let me capture that now" (during plan-roadmap brainstorm) | The roadmap brainstorm is a whole-project sweep at low fidelity. Detailing milestone 1 here means milestones 2-N never get the shared-context treatment | Keep the brainstorm at roadmap scope. List 3-7 milestones with one-line goals and a rough phase outline each; do NOT detail any single one. Per-milestone detail is new-milestone's job, fired separately when each milestone activates. |
| "There's no codebase yet, so we can't brainstorm a roadmap" | Greenfield projects brainstorm from product vision, not from code. map-codebase is optional and skipped on greenfield; the roadmap brainstorm itself works from a blank sheet | Run plan-roadmap directly. The brainstorm grounds milestone proposals in the user's stated goals and users, not in existing files. |
| "We'll figure out the later milestones when we get there" | That's how projects end up with milestone 1 carefully designed and milestones 2-N improvised in isolation. The roadmap is the shared context that prevents this | Finish the whole-project sweep in plan-roadmap. Later milestones are intentionally lossy (one-line goals, rough phase outlines) — they get refined by new-milestone when activated, but the global shape is set up front. |
| "I'll just edit the issue directly on GitHub" | Maintainer-side edits get overwritten on next sync. ROADMAP.md is the source of truth; GitHub is a one-way projection target. | Edit ROADMAP.md, then sync-github (or wait for the next pause-work / complete-phase) propagates the change to GitHub. |
| "External dev closed the issue, the work is done" | Closed-on-GitHub is a signal, not state. The maintainer reviews the evidence and runs complete-phase locally; that is what writes the authoritative status. | Read the advisory comment posted by detect-external-signals. Decide. If genuinely done, run complete-phase; if not, reopen on GitHub or leave it pending. |
| "Sync failed; let me fix the file directly" | If sync-github fails, the desired GitHub state was not achieved, but ROADMAP.md is unaffected and still correct. Editing ROADMAP.md to "compensate" inverts the projection direction and corrupts the source of truth. | Investigate the gh failure (auth, network, rate limit, deleted issue). Re-run sync-github. Leave ROADMAP.md alone unless the local state itself is wrong. |
| "I'll skip the dry-run, it's fine" | Dry-run is the fastest way to catch label/title/permission/repo-name mistakes before they create real GitHub state that has to be cleaned up afterwards. | Use --dry-run on first init-github-sync and after any structural change (renamed phase, new label scheme, repo move). Only run for-real after the dry-run output looks correct. |
| "I'll add the guard check in a later commit" | The guard belongs in the commit that writes the **Builds on:** line. Put off, it is lost at the next handoff, and in a run Phase 1.1 can drift from its plan while Phase 1.2 still builds on the moved interface, with nothing failing | Append the guard in step 4.5, before the step 4.6 commit of the phase whose design has the **Builds on:** line |
| "The plan is reviewed, let me just run it" | Grooming hands the milestone to ready-check or start-next-phase. Running the plan here skips list-phase-assumptions and the operator's choice between an unattended and an attended build | Commit the plan and move to the next phase. Build later, through start-next-phase or an unattended run |
| Sub-skill | Trigger | State Files Written |
|---|---|---|
map-codebase | Before brainstorming on existing project | docs/superpowers/specs/YYYY-MM-DD-codebase-map.md |
init-conventions | Kickoff via plan-roadmap; self-heal when CONVENTIONS.md is missing; on demand when a convention changes | docs/planning/CONVENTIONS.md |
progress | "where are we?" / session start | None (read-only) |
add-phase | "add a phase" | docs/planning/ROADMAP.md, docs/planning/MILESTONE.md |
insert-phase | "insert urgent work" | docs/planning/ROADMAP.md, docs/planning/MILESTONE.md |
remove-phase | "remove phase N.M" | docs/planning/ROADMAP.md, docs/planning/MILESTONE.md |
list-phase-assumptions | Before executing a phase | None (read-only) |
plan-milestone-gaps | After failed audit | docs/planning/ROADMAP.md (via add-phase) |
pause-work | "done for today" / stopping | docs/planning/STATE.md |
resume-work | "resume" / session start — chains to start-next-phase | None (read-only) |
start-next-phase | After resume-work, or on "continue" / "next" | None (read-only — routes to brainstorming/writing-plans/executing-plans) |
groom-milestone | "groom the milestone" / before an unattended run | Specs, plans, the earlier phase's plan (guard checks), docs/planning/ROADMAP.md (**Plan:** lines; phases stay pending), docs/planning/CONVENTIONS.md (**Build:** / **Test:** when missing), docs/planning/STATE.md (clears ## Grooming) |
complete-phase | After executing-plans finishes a phase, or "mark phase N.M complete" | docs/planning/ROADMAP.md, docs/planning/MILESTONE.md (single phase: active or pending → complete) |
audit-milestone | "verify milestone is done" | docs/superpowers/reviews/YYYY-MM-DD-milestone-N-audit.md |
complete-milestone | After audit PASS | docs/planning/ROADMAP.md, docs/planning/MILESTONE.md, git tag (only when conventions say so) |
plan-roadmap | "plan the roadmap" / first project setup, no ROADMAP.md yet | docs/superpowers/specs/YYYY-MM-DD-roadmap-design.md, docs/planning/ROADMAP.md, docs/planning/MILESTONE.md |
new-milestone | After complete-milestone — chains through superpowers:brainstorming | docs/superpowers/specs/YYYY-MM-DD-milestone-N-design.md, docs/planning/MILESTONE.md, docs/planning/ROADMAP.md |
init-github-sync | "set up github sync" / first-time GitHub projection setup | docs/planning/ROADMAP.md (Issue + Milestone numbers written back); labels, native Milestones, and Issues created on GitHub (not local files) |
sync-github | Auto-invoked from pause-work and complete-phase; manual on demand | None locally — projects ROADMAP.md state to GitHub issues/milestones (one-way write) |
detect-external-signals | Called from sync-github step 5 (embedded — not invoked directly) | None — only posts advisory comments on GitHub when external closes/edits are detected |
| Superpowers Skill | Relationship | Notes |
|---|---|---|
superpowers:brainstorming | Four entry points: (1) plan-roadmap invokes brainstorming at roadmap scope (3-7 milestones) at project start. (2) new-milestone invokes brainstorming at milestone scope before writing MILESTONE.md. (3) start-next-phase invokes brainstorming at phase scope when a phase has no design spec. (4) groom-milestone invokes it at phase scope for every pending phase of the active milestone that has no approved design. map-codebase runs before brainstorming on existing projects. | Provides codebase context that makes brainstorming questions more grounded. The skill is reused at three levels of abstraction; the brainstorming process is the same, only the scope changes. |
superpowers:writing-plans | start-next-phase routes to writing-plans when a design spec exists but no plan file does. groom-milestone runs it for each phase it grooms, with the execution method supplied up front, so writing-plans stops at the operator's plan review and nothing executes. add-phase / insert-phase maintain the ROADMAP.md that writing-plans references for context. list-phase-assumptions reviews the plan before executing-plans begins. | Phase management and plan writing are complementary — ROADMAP.md is the source of truth for what gets planned. |
superpowers:executing-plans | start-next-phase routes to executing-plans (via list-phase-assumptions) when a plan file exists for an active phase. pause-work can interrupt executing-plans cleanly. | list-phase-assumptions is a pre-execution gate; pause-work is a clean exit. |
superpowers:subagent-driven-development | list-phase-assumptions applies equally before subagent dispatch. pause-work captures state when stopping mid-subagent execution. | Both sub-skills work regardless of whether execution uses executing-plans or subagent-driven-development. |
superpowers:finishing-a-development-branch | audit-milestone + complete-milestone extend the finishing workflow to full milestone release management. | finishing-a-development-branch handles branch integration; complete-milestone handles milestone closure and hands the release to whatever docs/planning/CONVENTIONS.md records under Released by. It creates a tag only when Milestone completion tags a release: yes — on a project where an automation owns releases, closing a milestone correctly performs no git tag action at all. |
unattended (ready-check and unattended) | groom-milestone ends by pointing at ready-check, which queues the groomed phases of the active milestone. The run builds each phase on unattended/phase-N-M, opens a PR and merges it through ci-watch once its CI is green and the Merge stage allows it. start-next-phase step 1 then closes the phase, and step 2 holds back a phase whose PR is still open. | The unattended run never writes ROADMAP.md; phase state changes only on the default branch, after merge. A PR with red CI after three fix rounds parks its item. A PR that times out, has no checks, fails the Merge rules, is a release PR or whose rules cannot be read stays open and its item ends done with no merged, the reason in .claude/unattended-run.md. groom-milestone never invokes ready-check unasked. |
ci-watch | complete-milestone points at the ci-watch Release stage when Released by is release-please. ci-watch reads **CI timeout:** from docs/planning/CONVENTIONS.md, which init-conventions records as 60 (defaulted). The unattended run merges its own green item PRs through it. ci-watch does not park; it returns an outcome and a reason, and the unattended queue decides the item status. | Without the ci-watch plugin the pointer is skipped and PRs are merged by hand. |
regression-test | audit-milestone optionally invokes regression-test as part of definition-of-done verification for projects with a web UI. | Regression-test provides the visual and functional evidence for milestone audit. |
decision-tracker | Independent but complementary. Three integration points: (1) resume-work triggers decision-tracker recall at session start. (2) Surface: UI pre-plan hook runs a recall for tags=[ui, design] so prior UI conventions inform the contract. (3) Surface: Refactor pre-plan hook runs a recall for tags=[architecture, naming] so prior structural decisions inform the impact analysis. All three are best-effort — recall failures (MCP unavailable, no matching tags) are not chain failures. | decision-tracker handles cross-cutting decisions; project-orchestration handles project state and lifecycle. Project conventions are deliberately a local file (docs/planning/CONVENTIONS.md) rather than a decision-tracker memory, and the best-effort clause above is the reason: a recall failure is explicitly not a chain failure, so conventions stored as memories would silently go absent whenever the MCP server is down. The Commit & Release Protocol cannot be best-effort — it must either read the conventions or stop, never guess a format or a release mechanism from a failed recall. A file is either on disk or it is not, and init-conventions self-heals the "not". Record the rationale for a convention in decision-tracker if it is worth remembering; the protocol still reads the file. |
pre-push-review | audit-milestone checks tests and regression, but does NOT cover code quality review (security, YAGNI, dead code, naming). Run pre-push-review on each feature branch before audit-milestone for complete coverage. | No direct invocation — they operate at different scopes (branch vs milestone). |
ui-design-system | start-next-phase's Surface pre-plan hook invokes ui-design-system for Surface: UI phases when docs/design/MASTER.md is missing. Runs once per project (the design system is global), then ui-phase consumes it for every subsequent UI phase. | Surface-driven dispatch — the phase declares **Surface:** UI in ROADMAP.md and the hook handles the rest. No manual invocation needed. |
ui-workflow (ui-phase and ui-review) | Two hook points for Surface: UI phases. Pre-plan: start-next-phase runs ui-phase after ui-design-system (if needed) to produce docs/superpowers/specs/*-<phase>-*-ui-contract.md BEFORE chaining to superpowers:writing-plans. Post-implementation: when executing-plans returns clean, start-next-phase runs ui-review to audit the implementation against that same contract before complete-phase runs. Without the post-impl hook, the contract becomes write-only and the audit value is lost. | The contract is the bridge between design spec and implementation plan for UI work — and the audit target after implementation. ui-review requires the Playwright MCP (via regression-test); the chain degrades gracefully (logs and skips) when MCP is unavailable. |
refactor-analysis | For Surface: Refactor phases, the Surface pre-plan hook runs refactor-analysis (Phases 1–7) to produce docs/superpowers/specs/*-<phase>-*-impact-analysis.md BEFORE chaining to superpowers:writing-plans. The analysis feeds writing-plans the safe execution order, transitive dependency map, and risk register. | Surface-driven dispatch — phases that involve restructuring existing code declare **Surface:** Refactor and get impact analysis automatically rather than relying on the agent to remember. |
gh CLI / GitHub | External tool, not a sibling skill — init-github-sync, sync-github, and the embedded detect-external-signals shell out to gh to project local state onto GitHub. Files in docs/planning/ are the source of truth; GitHub is a one-way visibility target written by sync-github from pause-work and complete-phase. External signals (closes/edits performed directly on GitHub) are surfaced as advisory comments — never copied back into ROADMAP.md. See docs/superpowers/specs/2026-05-06-github-sync-design.md for the full projection model and rationale. | Hybrid signal handling: outbound writes are authoritative (ROADMAP.md → GitHub); inbound is advisory only (GitHub closes/edits → comment, maintainer decides). Sync failures must never block local state writes — sync-github logs and skips when gh is unavailable, mis-authenticated, or rate-limited. |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub marcelroozekrans/superpowers-extensions --plugin project-orchestration