Imported from Goldenmule-Media/hotseat-web (
.claude/skills/plan-feature/SKILL.md). Install upstream withnpx skills add Goldenmule-Media/hotseat-web --skill plan-feature. Copyright stays with the author.
Plan a feature through the wiki
Produce one grounded, reviewed, build-ready feature plan — then stop. The wiki's feature
bundle is the source of truth for what document edit comes next; you supply what it cannot —
choosing what to plan, grounding it in the real repo, authoring the plan, and reviewing it for
soundness before handing it off. This skill is the front half of /build-feature: it writes
no code, runs no tests, and crosses no FSM gate past beginPlanning. When the plan is
authored and reviewed it stops, leaving the brief build-ready for /build-feature feature-brief:<id>.
Inputs
-
Workspace — a repo maps 1:1 to a wiki workspace, so you do not pass the id; resolve it once at the start and call the result
$WS. Resolution precedence:- If
$targetbegins with aws:token → that token is$WS(an explicit override); the remainder is the real target. - Else
Readhotseat.config.jsonat the worktree root and use itsworkspaceIdas$WS. - Else (file missing or no
workspaceId) → calllistWorkspaces, confirm$WSwith the user, then offer to writehotseat.config.jsonso future runs need no lookup.
Use
$WSwherever a workspace id is needed for the rest of the run. Never silently guess a workspace. - If
-
Target =
$target(with any leadingws:override token stripped per above) — either an existingfeature-brief:<id>to plan, or a one-line intent.- Starts with
feature-brief:→ plan that brief. - Otherwise → treat it as the feature intent and
createPagea newfeature-brief(title from the intent) under the "Feature Specs" TOC (Planning step 1) — never at the workspace root. That auto-materializes its pinned children: implementation-plan, implementation-checklist, testing-plan, feature-spec — never create the children by hand. - Empty → call
nextActions($WS)to list in-progress feature work and confirm which brief to plan (or ask for an intent).
- Starts with
Standing rules (apply for the whole task)
- The wiki decides the next document edit — you don't. After every write, read the echoed
next; callnextActions($WS, <briefId>)fordo/blocked/humanGates/attention. Drivedoedges; for eachblockededge author exactly the content itsreasonnames, then re-check. Never hardcode a command sequence — if areasonchanges, follow the new one. - You plan; you do not build. Drive the FSM up to
beginPlanningand satisfybeginImplementation's blockers, but never callbeginImplementation(or anything past it). Crossing intobuildingis/build-feature's job. Likewise never callsubmitForRevieworship, and stop at anyattentionitem. - Gates must reflect reality. Author only content you actually grounded;
askQuestion/escalateQuestionanything that genuinely needs a human decision rather than inventing an answer. Default to not advancing when unsure. - Branch/worktree-agnostic. Operate in the current worktree on its current branch. Never
checkout, assume a base branch, or requiremain. - Read-only on code and shared state. You write only to the wiki. Do not create workspaces, configure emitters, write any source file, or stage/commit anything. The Markdown mirror is emitted to the main checkout automatically.
- Workflow calls: load the schema first, pass real JSON. Before the first
Workflowcall, load its schema withToolSearch("select:Workflow")(fold it into the ToolSearch you make for the wiki tools) — without the schema in your prompt, object parameters are emitted as JSON-encoded strings and the script receives garbage. Passargsas a real JSON object, never a stringified one. Both templates fail fast with a named error ifargsdoesn't arrive intact; on that error, re-run with the template body inlined via thescriptparameter and the values baked in. Don't poll a running workflow (noMonitor) — completion notifies you.
Planning (draft → planning)
Ground the plan in the real repo first — the wiki's preconditions read only sibling pages, never the codebase, so an ungrounded plan invents plausible-but-wrong steps.
- New briefs live under the "Feature Specs" TOC. When Target is an intent, first find the workspace's top-level
tocpage titled "Feature Specs" (tree($WS)); if it doesn't exist,createPage({ type: "toc", title: "Feature Specs" })to make it. ThencreatePagethe feature-brief withparentIdset to that TOC's id. The TOC's contents are derived from its live children — no TOC edit is needed. - Capture/confirm the brief id and child page ids with
tree($WS, <briefId>). - Run the grounding workflow (parallel repo reads):
Workflow({ scriptPath: "${CLAUDE_SKILL_DIR}/workflows/grounding.template.js", args: { repoRoot: "<this worktree path>", intent: "<intent or current brief summary>", areas: [<optional repo areas to focus>] } })argsmust be a real JSON object (see the standing rule) — the template throws rather than running against placeholders ifintentdoesn't arrive. Adapt the script inline only if this feature needs a different fan-out. It returns a structured proposal (summary, components, constraints, plan steps, data-model snippets, test cases, open questions, conflicts) and does not touch the wiki. - Author the proposal with
mutatePageBatch(atomic, ordered, ≤50 ops/page):setSummary/addComponent/addConstrainton the brief;addStep/addDataModelon the implementation-plan;addCaseon the testing-plan. Anything that genuinely needs a human decision →askQuestionon the brief (escalateQuestionif it must block). - Follow
nextActionsto drivebeginPlanning. Then satisfybeginImplementation'sblockedreasons (≥1 plan step, ≥1 data-model code block, ≥1 testing-plan case) so the brief is build-ready — but do not cross that edge. Stop ifattentionsurfaces an escalated question.
Review the plan (then stop)
There is no code yet, so this reviews the authored plan for soundness — the analogue of /build-feature's pre-sign-off code review.
- Read the authored plan back (
getPagethe implementation-plan and testing-plan) so you review what actually landed. - Run the plan-review workflow:
Workflow({ scriptPath: "${CLAUDE_SKILL_DIR}/workflows/plan-review.template.js", args: { repoRoot: "<this worktree path>", summary: "<brief summary>", steps: [<{stepId,text}>], dataModels: [<{language,source}>], cases: [<{caseId,text}>] } })It fans out read-only agents over the real repo across review lenses (grounding/repo-faithfulness, completeness/gaps, feasibility/sequencing, test coverage) and returns structured findings, each tagged with a suggested action. It does not touch the wiki. - Apply the findings via the wiki: concrete gaps →
addStep/addCase/addComponent/addConstraint; a decision a human must make →askQuestionon the brief (escalateQuestionif it must block); a wording/scope fix → edit the relevant section. Re-checknextActionssobeginImplementation's blockers stay satisfied after edits. - Stop. Report the brief id, the authored plan summary, the review findings and what you changed in response, and that the brief is build-ready: hand it off with
/build-feature feature-brief:<id>. Stop early ifattentionsurfaces an escalation.
Finishing
plan-feature never crosses beginImplementation, submitForReview, or ship. When you stop, summarize the plan and any remaining open questions via nextActions and attention so the user knows it is ready to build (or what a human must decide first).