/sdlc:write-planfrom sdlc
Enters plan mode to write an implementation plan structured for clean git history and subagent-driven execution. Each step maps to an atomic commit.
Ships in sdlc. 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.
None: SKILL.md is the whole skill.
Write a plan file for the work described below, then hand it off for execution. The plan must be shaped so that (a) the resulting git history is clean per the git-workflow rules, and (b) the implementation can be driven by one persistent implementation subagent that receives the plan file itself, not giant inlined excerpts.
This command is normally run after /sdlc:pre-plan and a design discussion, so most context should already be in hand — don't re-derive what's already been gathered or decided.
$ARGUMENTS
If the Scope is empty, use the current conversation context (e.g. a pre-plan briefing already produced in this session). If it's unclear what we're planning, ask the user before proceeding.
Invoke the git:git-workflow skill first, and apply its rules to shape the plan around the ideal git history rather than the order code happens to get written. The concrete tie-in for this command: each step in the plan maps onto one intended atomic commit (or a small, named group), so the plan's structure already encodes the commit sequence.
Do not enter plan mode yet. Plan mode restricts what the permission system lets you run, and this phase may still need real work — subagent explorations, data checks, queries against external systems. Enter plan mode only in Step 3, when the only work left is writing.
The plan you write will be executed with minimal supervision — the user may not be at the keyboard while it runs. So the bar is not "do I know enough to start writing": it is "have I surfaced every decision the user would otherwise be asked mid-implementation". A question asked now costs one AskUserQuestion; the same question at step 7 stalls the whole run.
Don't move on to Step 3 while something material is unresolved.
Enter plan mode now. Everything is decided and explored, so the plan should come out final — the user reviews it, adjusts at most small details, approves, and lets execution run unattended. Planning only; do not start implementing.
Write the plan to the plan file specified in the plan-mode system message — a fresh file; don't append to or carry over a previous plan. The body is the ordered sequence of atomic-commit-sized steps from Step 1, each with: what changes, which files, why, how to verify, the intended commit message, and the step's check tier (below).
The plan opens with a Sources line naming, by worktree path, the pre-plan files this session produced: the context file (./.claude/plans/pre-plan-<slug>.md), its briefing (./.claude/plans/<slug>-briefing.md), and the ticket dump when there is one. The implementation subagent receives this plan file and follows those pointers, so they must be paths it can open, not descriptions.
Do not restate what those files already say and still hold. The current state of the code, the subdomain map, the areas of pressure, the trade-offs — a step that needs them cites the file and the section ("the writer/reader split in pre-plan-<slug>.md § Current state") and moves on. A plan that copies its own sources is twice as long, and the copy goes stale the moment the source is corrected.
What the plan does carry is the delta since the pre-plan: every decision the discussion took, every fact the discussion overturned, every open question the briefing listed that is now closed. State each as what is now true and mark what it supersedes, so a reader of both files knows which one wins. A decision recorded only in the chat is a decision the executing agent never sees.
When there was no pre-plan — the plan comes from the conversation alone — the plan carries the context itself, and the Sources line says so.
The plan names the model for the implementation subagent — one line near the top. Use opus by default. Use fable only when the implementation itself carries hard reasoning: concurrency, transaction and isolation behavior, subtle correctness, cross-system effects. If the difficulty is concentrated in one phase, the plan may schedule a subagent swap at that phase boundary (see the protocol) so the expensive model is spent only on the steps that need it.
The orchestrator checks the work after every step — that part is fixed. What the plan decides, per step, is who performs the check, based on how small and simple the step is expected to be:
check: direct — the orchestrator inspects the staged diff itself. For trivial increments: small mechanical changes, renames, config, code the plan already spells out nearly verbatim.check: validation subagent (opus) / check: validation subagent (fable) — a fresh validation subagent reviews the staged work against the plan's intent. For everything that is not trivial: new logic, anything with edge cases, anything the plan describes by outcome rather than by exact change. Use fable when the step carries real reasoning risk — concurrency, transaction and isolation behavior, subtle correctness, cross-system or cross-repo effects, a wide blast radius; opus otherwise. Do not spend fable by default.A phase boundary always gets the subagent tier, whatever the size of the step. A phase boundary is where the next block of work is built on the assumption that the previous block is already correct, so a defect there is discovered late and expensively. Real boundaries: a schema or migration layer landing before the code that reads it, an abstraction reshaped before the features built on it, a data backfill before its consumers, one service's contract before the caller that depends on it. For each subagent-tier check, write down what it must confirm — the acceptance criteria it covers and the specific risks this plan is worried about.
Always end the implementation steps with a final validation checkpoint as its own numbered step: a fresh validation subagent reviews the finished branch as a whole against the plan's intent. This is not a repeat of the per-step checks — it looks at the sum. Name its model by the same opus/fable rule.
After the final checkpoint, the plan's last numbered step opens the MR with /sdlc:mr-open, which then drives it to mergeable through /sdlc:mr-babysit. It is part of the plan, not an epilogue the orchestrator asks permission for.
At the end of the plan file, append a verbatim "## Implementation Protocol" section, so the execution rules travel with the plan even into a fresh session. Keep it lean — exactly this:
## Implementation Protocol
One step at a time, never in parallel. The user may not be watching — the default is to keep going, not to stop and wait.
1. **Before step 1**: create a "continue the plan" cron firing every 30 minutes. Each pass re-derives state from scratch (this plan file, `git status`, `git log`) and continues the run if it stalled. Once `/sdlc:mr-babysit` has started, a pass never re-enters it: babysit runs its own watcher and watchdog, and a second invocation would spawn a second watcher on the same MRs. Delete this cron when babysit has been started, or earlier if the user takes the MR themselves.
2. **One persistent implementation subagent** — spawn it with the model this plan names and reuse it for every step: message it this plan file's path, the step to do, and "stop and report when done". Its first prompt also names the writes that the `/sdlc:mr-babysit` steps will ask of it in later turns, by action and target: rebase and force-push with lease the source branch `<branch>`, push fixes to it, reply to and resolve review threads on its MR, mark the MR ready. Quote the user's instruction to run the plan verbatim next to them. The auto mode classifier reads the first prompt as the user's instruction and holds the subagent to it, so a write it did not name is blocked when a later message asks for it. Start a fresh one only when it runs out of context window or this plan schedules a model swap; the fresh one catches up from the plan file and the branch's commits.
3. The subagent implements the step, verifies it (build / lint / relevant tests), **stages everything with `git add -A`, does NOT commit**, and reports: what it did, what verification ran and came back, which parts are tricky.
4. **Check every step at the tier this plan assigns it.** `check: direct` → the orchestrator inspects the staged diff itself. `check: validation subagent` → a fresh subagent with the model the plan names, given *only* this plan file's path, the steps it covers, what to review, and the risks the plan flags — nothing else. Validators read, run the real verification, and report; they never change code.
5. **Findings go back to the implementation subagent** — the orchestrator never fixes code itself. Re-check after the correction; repeat until clean or the rest is consciously accepted. Then the orchestrator commits with the step's intended message and moves to the next step.
6. **Mid-flight decisions**: derivable from code, data, or convention → decide, record the decision in this file, continue. A product decision only the user can make → ask, park the dependent steps, continue everything not blocked. Stop and wait only when proceeding would be damaging or hard to reverse.
7. **Finish without asking**: run the final validation checkpoint, then `/sdlc:mr-open`. Its last step starts `/sdlc:mr-babysit`, which arms its own cron, so delete this cron right before that step and never start babysit a second time. Skip the MR step only if the user explicitly said they will handle the MR themselves.
reset/amend-ed. Staging (not leaving unstaged) also keeps git diff --cached complete — new files show as full additions — so inspection is one call.check: direct. Start with the shape (git diff --cached --stat), read in full only the regions that carry real logic, and skim bulk/low-signal regions — snapshot dumps, regenerated fixtures, lockfiles, generated code — just enough to confirm they are the expected kind of change. Use the subagent's "tricky parts" list as the starting map.Call ExitPlanMode to present the finished plan (body + appended Implementation Protocol) for approval — it reads the plan file you just wrote. Do not start implementing — wait for the user to review and approve.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
8 skills in this plugin
/brief-next-stepssdlc:brief-next-stepsWrite a short briefing of the proposed next steps into ./.claude/plans/ so the conclusion can be read instead of the argument/mr-babysitsdlc:mr-babysitBabysit MR(s) or PR(s) — a watcher reports every change, an actor triages, fixes and posts, and you decide, until every MR is rebased, green, quiet and handed over/mr-opensdlc:mr-openOpen a draft MR for the current branch — the Why in the ticket, the reviewer's guide in comments, a one-screen description, then babysit it/pre-plansdlc:pre-planGather context for a problem (ticket + code exploration) before discussing a solution and writing a plan/ticket-attach-docssdlc:ticket-attach-docsAttach the session's plan and research documents to the ticket, as tracker documents where they exist and as attachments or comments otherwise/ticket-newsdlc:ticket-newDraft and create a ticket from the current conversation contextnpx claudepluginhub fprochazka/claude-code-plugins --plugin sdlcOther plugins' skills for the same job