Write plan
Use in the Plan phase after the spec is approved - dispatches the planner agent to draft the executable plan from the standard template (decision summary, T-xxx task breakdown with test-first + verify per task), gets the user's approval, records the plan (opening the write gate), and mirrors the breakdown into Claude Code's native task list. Runs inline on the main thread (it owns the approval gate, the state write, and the task mirror).From its SKILL.md
npx -y skills add taipt1504/claudehut --skill write-planAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.8 KB, as published. Nobody here has run it
Write Plan (Plan phase)
Convert the approved spec into an executable, test-first plan. Runs inline on the main thread — the planner drafts in isolation; this skill owns the user gate, the state write, and — where task tools exist — the task mirror (a subagent cannot).
Flow
flowchart TB
s(["spec approved (set-spec recorded)"]) --> draft["dispatch claudehut-planner → draft plan.md<br/>(T-rows + §3 flow + per-task Sketch)"]
draft --> check{"§1 restates decision, §3 traces end-to-end,<br/>every behavior task RED-first + verbatim verify?"}
check -- "no" --> draft
check -- "yes" --> smart{"full tier AND (≥5 tasks OR sensitive keyword)?<br/>the SAME predicate set-plan gates on"}
smart -- "no" --> ask
smart -- "yes" --> rev["dispatch claudehut-plan-reviewer → REFUTE vs spec<br/>writes plan-review.md (SubagentStop blocks empty return)"]
rev --> verdict{"Verdict == APPROVE?"}
verdict -- "REVISE (route items back)" --> draft
verdict -- "APPROVE" --> record["set-plan-review APPROVE --evidence plan-review.md<br/>(byte-identical plan; edit forces re-review)"]
record --> ask{"interactive? user Approves?"}
ask -- "Request changes" --> draft
ask -. "headless -p" .-> bypass(["record approval: non-interactive in header"])
ask -- "Approve" --> setplan["set-plan plan.md (opens PreToolUse write gate)"]
bypass --> setplan
setplan --> mirror["IF task tools available: TaskCreate per T-row + TaskUpdate addBlockedBy<br/>(absent → skip; plan.md is the source of truth)"]
mirror --> phase["set-phase implement → REQUIRED NEXT claudehut:implement"]
Process
- Dispatch
claudehut:claudehut-planner. Task dir is derived from the recorded spec path (dirnameof theset-specpath) — never recomputeNNNN. Inputs: spec, reuse-scan + brainstorm (same dir), templatereferences/plan-template.md. It writes…/tasks/NNNN-<slug>/plan.md; it does NOT write state. (set-planREJECTS a plan with no| T-xxxrows.) Summer KB (when the project has.claude/summer-kb/): every T-xxx row whose files touch Summer wiring MUST carry the KB citation from the spec (.claude/summer-kb/<module>.md §<section>) in its verify column — the implementer verifies against it, and the plan-reviewer REVISEs a plan whose Summer tasks cite nothing. - Dispatch
claudehut:claudehut-plan-reviewer— on the SAME predicateset-plangates on, not on every plan. It fires when the plan is substantial (≥5| T-rows) OR sensitive —security,/auth,migration,flyway,liquibase,password,secret,owasp,permitAll,deserialanywhere inplan.md(mirror it exactly — dispatch on less andset-planrefuses a plan you chose not to review). Below the predicate the §1/§3 check above IS the doc gate: no dispatch, no verdict. When it fires it gates the doc BEFORE the user sees the plan and writes its coverage table +Verdict: APPROVE|REVISEtotasks/NNNN-<slug>/plan-review.md. Loop onREVISE— cap 2 rounds: each round re-drafts and re-reviews the whole plan, so a thirdREVISEmeans the spec is the problem, not the plan. Take it to the user withAskUserQuestion(the surviving gaps + the two attempts) instead of looping. Then record the verdict (only the main thread writes state):
The wire that makes the reviewer fire:claudehut-state --session ${CLAUDE_SESSION_ID} set-plan-review APPROVE --evidence .claude/claudehut/tasks/NNNN-<slug>/plan-review.mdset-planREFUSES a full-tier plan meeting that same predicate unlessplan_review==APPROVEis recorded for the byte-identical plan (smart-gate; editing forces re-review via content-hash). Headless-p, no Agent budget: A human may unblock both set-plan and the write gate withclaudehut-state set-bypass true --reason '<why>'— ask, do not run it yourself; the reason is persisted in state. - Get approval (this opens the write gate — not before). Interactive:
AskUserQuestionwith the decision + T-xxx list, Approve / Request changes. Non-interactive (-p): recordapproval: non-interactive run — proceeded with draftin the header. Only after approval (unlocks thePreToolUsegate):claudehut-state --session ${CLAUDE_SESSION_ID} set-plan .claude/claudehut/tasks/NNNN-<slug>/plan.md - Mirror into the native task list — ONLY if you have task tools. Availability is per session and
not guaranteed;
TaskCreate/TaskUpdateare absent in many. No task tools → skip this step entirely, the same wayclaudehut:implementskips its orchestration section when there is no Agent tool.plan.mdis the source of truth; the mirror is a convenience view, never a gate. With task tools: oneTaskCreateper T-xxx row (subject: "T-001: <goal>",description: files + test-first + verify + req-ref,activeForm: present-continuous), thenTaskUpdate addBlockedByper Depends-on.plan.mdstays the durable source of truth. Then enter Implement:claudehut-state --session ${CLAUDE_SESSION_ID} set-phase implement.
REQUIRED NEXT: claudehut:implement (test-first; the enforcement-set rules auto-load by path).