danwright32

plan-council

Plan a big or ambiguous feature by first grilling the user on the framing, then convening a panel of independent expert role-agents (architect, frontend, backend, data, security, …) that each propose an approach, distill into 2-3 rival whole options, champion and red-team them, score against criteria set up front, and synthesize the BEST (not merely doable) plan, then reality-check it against the real codebase, audit it against the recorded lessons from past mistakes, and post the debate + plan to a GitHub Discussion. Use for large, ambiguous, or architectural features worth deep planning. Invoke ONLY when the user explicitly asks for plan-council (slash command or by name in prose); NEVER unprompted (spawns many agents).

danwright32 0 Updated 1w ago

Resources

11
GitHub

Install

npx skillscat add danwright32/claude-config/plan-council

Install via the SkillsCat registry.

SKILL.md

plan-council

A heavyweight, robust planner for big features. A panel of independent specialist agents debate rival approaches and converge on the best plan, not the most agreeable one. The real multi-agent debate runs through the Workflow engine (genuinely independent subagents, so the anti-groupthink design actually holds); this skill handles the framing conversation, the GitHub record, and presenting decisions to the user.

Use for: large, ambiguous, or architectural features. NOT for small or mechanical changes: use normal planning there.

Gates marked (user) require the user before continuing.

1. Frame the problem (user)

First, a gate: does this even need the panel? Research shows a single strong pass beats a multi-agent panel on most tasks. Only run plan-council when the feature is genuinely big: multiple defensible approaches worth scoring against each other, cross-cutting impact, or real architectural uncertainty. If it is only medium, recommend /plan-lite; if small, just plan inline. Don't reach for the panel out of habit.

Then, in conversation with the user, establish:

  • The feature (one or two sentences), the target project directory (so agents read the right repo), and its GitHub repo (owner/name).
  • Hard constraints (stack, deadlines, must-not-break, compliance).
  • Success criteria: what "done well" means.
  • The roles that matter for THIS feature: pick 3-6; do not use a fixed cast. Reusable definitions live in ~/.claude/agents/ (plan-architect, plan-product, plan-backend, plan-frontend, plan-ux, plan-data, plan-security, plan-redteam). Pass each chosen role in args.roles as { key, brief, agentType: 'plan-<role>' } so the workflow spawns the real definition; add an ad-hoc role (key + brief, no agentType) when none fits.
  • The weighted criteria that define "best", always include cost / recurring spend (default stance: prefer free; a paid option must clearly earn its bill), plus e.g. correctness & robustness, user impact, maintainability, risk/reversibility. Do NOT include build time / effort as a criterion: the user's standing rule is "right is always better than fast." SET THESE NOW, before any option exists, so "best" cannot be bent toward the easy option later.

GRILL the user to close context gaps, BEFORE the panel disperses. Once the workflow launches, the specialist agents run in parallel and CANNOT ask you anything; whatever context they're missing, they'll guess. So the main agent's job at this gate is to surface and fill those gaps now, and a few batched questions are not enough pressure to find them.

Before the first grilling question, find any earlier verdict on this approach. Run bash ~/.claude/skills/plan-council/find-prior-verdicts.sh --dir <project dir> "<term>" "<term>" with two to four of the approach's distinctive phrases (the mechanism, not the feature's generic name). It searches the project's decision records (DESIGN, README, CLAUDE, AGENTS, ADR and docs markdown) and every issue, closed ones included. Quote each earlier verdict to the user with its date and where it is recorded, and ask whether it still stands before the panel builds on it; a decision is only true as of its date (L61). When it prints NONE FOUND, say so in one line, naming what was searched. When it prints COULD NOT SEARCH, say which source went unsearched: an unsearched source is not an empty one. Put every verdict it found into the panel's constraints, so no specialist proposes a rejected route as new.

First take a quick read of the repo so your questions are sharp and specific, not generic. Then invoke the grilling skill (Skill tool, skill name grilling) and run the interview it describes: one question at a time, waiting for each answer before asking the next, every question carrying YOUR recommended answer, and anything the codebase can answer gets answered by reading the codebase instead of being asked. Ask through AskUserQuestion so each one is a picker. Invoke grilling, NOT grill-me: grill-me is a user-typed command (disable-model-invocation: true) and you cannot call it.

The grilling is not optional and not a formality: this is the last moment a human can correct the panel's understanding, and a wrong premise here is paid for by every agent downstream. Cover all of the following, plus whatever the repo read makes you suspicious of:

  • What problem are we really solving, and for whom? (the intent behind the feature, not just the feature)
  • What is explicitly IN and OUT of scope?
  • Known constraints or landmines: things that must not break, past attempts that failed, hard deadlines, the budget ceiling.
  • Existing code/work to reuse vs. replace (name the specific things you found in the repo).
  • What does "done well" look like, and do you already hold a strong preference on the approach?
  • What must always be true: end the grilling with the feature's Must always be true list, written and approved by Dan as ~/.claude/skills/milestone/MUST-ALWAYS-BE-TRUE.md says (the list's one home, so read it and follow it), and put the approved list into the panel's constraints, so every specialist designs to the same rules.

Ask only what you genuinely cannot determine from the code yourself: don't quiz the user on what a quick read answers. Keep grilling until you could hand the panel a brief with no critical unknowns left; stop when the answers stop changing your understanding, not after a fixed number of questions.

If the plan will read, parse, classify, or geo-locate external source pages, fetch a real example of each source FIRST and quote its raw strings into the framing, the same way you read the DB schema before writing SQL. For a scraper the external pages ARE part of the system under design; grounding only in the code produces plans that are internally rigorous and wrong about the world. On a past run the panel fitted a parser to the one source it had ever scouted and picked a winner that two 30-second WebFetch calls then refuted. Hand the panel those verbatim snippets so it designs against the real pages, not the exception.

Then check the brief's premises before anyone builds on them (claude-config#1208). Dispatch ONE agent (the Agent tool) with the drafted constraints and the project directory, told to check each FACTUAL claim in them (a file or function that exists, a behaviour the code has, a number measured) against the real code, and to answer per claim: holds, wrong (with what the code actually shows), or could not check. Show Dan every claim that came back wrong or unchecked, and correct the brief before the panel runs. A wrong premise is the one fault no later check can catch, because every agent downstream takes the brief as given: on #1208's own run, a red-team found that a constraint about a script the healthchecks used was false only after the whole panel had designed around it.

Then present the full framing (roles + criteria + scope + what you learned in the interview) with AskUserQuestion for approval or edits. Do not skip this gate: it is what keeps the run grounded and cheap-to-correct, and it is the user's last input before the panel runs autonomously.

2. Run the debate (Workflow engine)

First copy the workflow script into this session's scratchpad, because the Workflow tool refuses a script under ~/.claude: it accepts only a path it returned itself or a file inside the working directory, a directory added to the session, or the scratchpad. Run, with the scratchpad directory your system prompt names:

bash ~/.claude/hooks/lib/stage-workflow.sh ~/.claude/skills/plan-council/panel.workflow.js "<scratchpad directory>"

It prints one line, the absolute path of an exact copy of the script, and refuses (printing no path) when the scratchpad is missing, relative, or inside ~/.claude. If the session names no scratchpad, read the script and pass its contents unchanged as script instead of scriptPath, rather than writing a copy into the project. Then call the Workflow tool with:

{
  scriptPath: "<the path stage-workflow.sh printed>",
  args: {
    feature: "<the feature>",
    constraints: "<hard constraints>",
    weightedCriteria: "<criteria + weights agreed above>",
    roles: [ { key: "architect", brief: "…" }, { key: "backend", brief: "…" } ],
    projectDir: "<absolute path to the repo>",
    repo: "<owner/name>",
    lessonIndexFiles: [ "<every file `ls ~/.claude/LESSONS-INDEX-*.md` lists>" ],
    usesSupabase: <true or false from uses-supabase.sh, below; omitted when it could not tell>
  }
}

Pass that printed path exactly as it is: the Workflow tool takes scriptPath as a literal string and expands neither ~ nor $HOME.

Before the call, find out whether the project uses Supabase, so the preflight probes the schema only where there is one:

bash ~/.claude/skills/plan-council/uses-supabase.sh "<absolute path to the repo>"; echo "exit $?"

Add usesSupabase: true to the args on exit 0, usesSupabase: false on exit 1, and leave it out on exit 2 (it could not tell, so the preflight probes as it always did). On false the workflow skips the schema probe and reports the schema as not-applicable rather than unreachable.

It starts with a preflight that confirms it can actually reach your code and database, then runs with real independent subagents: independent first-passes → distill to 2-3 rival whole options → champion + red-team each → score against the criteria and pick the survivor → synthesize the winner (grafting the runner-up's best ideas, recording overruled dissent and the ideal-vs-doable gap) → reality-check against the actual codebase/schema, alongside a lessons audit that reads every ~/.claude/LESSONS-INDEX-*.md file (never the full LESSONS.md, too large to read whole), looks up the full entry of any lesson it cites, and flags anywhere the plan repeats a mistake already paid for on a past project → fix-and-reverify, which keeps every finding as a numbered record (F1, F2...) rather than re-reading the whole plan each round: the plan is split into items, the fixer edits only the items findings name (everything else stays byte identical), a verifier rules on each open finding by its id and only that ruling closes it, and a round re-checks only edited items plus the items that name them ("Phase 3"). Lesson findings are blocking (the plan would repeat the defect) or advisory (only a strengthening), and only blocking ones hold the loop. After every fix round, once nothing blocking is open, one whole plan consistency check runs, and a finding it raises reopens the loop. It stops at clean, at the 3 round ceiling with the open list, or settled with dissent when the fixer declined a finding with a reason, which is Dan's to decide. The rival options always span a cost spread (at least one free/cheapest; a paid option only when clearly better), and every product / scope / cost trade-off, including free-vs-paid: is escalated to you, not locked by the panel. It returns { plan, selection, options, advocacy, checks, lessonsAudit, preflight, rcRounds, … }, where checks is { stoppedAt, converged, rounds, open, advisory, declined, fixed, unverified, sizes, perRound } and lessonsAudit is the first full audit. A run costs at most 17 checking agents, at the ceiling (two full checks, then per round a fixer, a verifier, a scoped recheck and reaudit, and a whole plan consistency pass after it), against about 8 before; a plan that is clean after one round costs 7.

3. Record to GitHub (the audit surface)

Build a markdown body (final plan, the Must always be true list saying after each rule which phase of the final plan builds what keeps it true, rival options + scores, overruled dissent, ideal-vs-doable gap, open risks, reality-check verdict) and write it to a temp file. Then run the bundled helper, which handles every fallback for you:

bash ~/.claude/skills/plan-council/post-discussion.sh "<owner/name>" "<title>" <body-file> "<milestone title, optional>"

It tries a GitHub Discussion first, then a tracking issue (with a priority, a planning label and a milestone), then a PLAN-<slug>.md at the project's root, and prints one line: DISCUSSION <url>, ISSUE <url>, or FILE <path>. Tell the user which happened (and, if it fell back, that enabling Discussions on the repo would give a nicer home next time). If it exits non-zero, the plan landed nowhere: say so, with the reason it printed, and that the plan is still in the body file.

If it fell back to an issue and also printed MILESTONE-PENDING <url> ..., that issue is waiting in the catch-all milestone Ungrouped, because the plan's milestone does not exist until step 5. Carry that URL to step 5 and move it there.

4. Present + decide (user)

Open with any CAVEATS before the summary: the user must never mistake a partly-checked plan for a clean one:

  • Lead with checks.stoppedAt, said plainly. Only clean (with converged: true) means every finding was verified fixed. Then:
    • ceiling → LEAD with a prominent warning that the plan still holds the findings in checks.open, and list each one with its item and, for a lesson, its id. Do not bury this below the summary.
    • settled-with-dissent → list each of checks.declined with the fixer's reason, and put each to Dan with AskUserQuestion: they are disagreements only he can settle, not fixed problems.
    • unverified or a non-empty checks.unverified → say plainly which check never ran cleanly (a dead reality-check, or an audit that skipped an index file or read none), so that part of the plan was never checked. Unverified and unaudited are not clean, and must never be reported as "no issues found".
    • checks.advisory → list them briefly after the summary as optional strengthenings, never as defects.
    • Clean → one line saying the plan was checked against the code and the recorded lessons (lessonsAudit.lessonsSeen considered), in checks.rounds rounds. Do not inflate this into a guarantee.
  • Check grounding next: if preflight reported repoReadable:false, or its schemaState is unreachable or unverified, lead with that too, warn the user the plan may be partly ungrounded and name the unreachable source (e.g. "Supabase wasn't connected for this project, so the data parts are best-effort"). A confident plan built blind is the main risk. A schemaState of not-applicable means the project does not use Supabase: say nothing about the schema then, because it is not a gap. A preflight of null means the probe never ran, so neither the code nor the schema was confirmed reachable: say that.
  • Give a plain-language summary: the recommended plan, why it won over the alternatives, the ideal-vs-doable gap, and what the checks fixed along the way (checks.fixed, checks.perRound).
  • Show the Must always be true list with its Not covered line, as the final plan has it, and say which rules are still at nothing yet. If the panel's plan changed a rule, Dan approves the list again.
  • If the workflow returned escalatedDecisions (genuine values trade-offs only the user should make), present them with AskUserQuestion, never bury them in prose.
  • Link the GitHub Discussion (or note the fallback artifact).

5. Offer a tracking milestone (user)

Once the plan is approved, offer to turn it into a GitHub milestone with one issue per plan phase: this is how big features get tracked. Ask with AskUserQuestion ("Create a GitHub milestone + one issue per phase for this plan?"); skip silently if the user declines. On yes:

  1. Build a temp JSON file: title = the feature, description = a short summary plus the Discussion/issue link from step 3, issues = one {title, body, priority, labels} per phase of the synthesized plan (phase name as title, the phase's scope as body, with the rules that phase must keep true as ~/.claude/skills/milestone/SKILL.md step 2 says).

    When the feature has a settled design file (from /design-rounds), add "design": "<its absolute path>" and have each phase name the PRD requirements it builds as Requirement <number>. The helper reads the decision map inside the design file and files nothing (exit 11) while any decision has no requirement or any requirement has no issue, then adds the milestone's last issue, the comparison of the built screens against every design frame (~/.claude/skills/milestone/SKILL.md, claude-config#1290).

    This is one of only three places a milestone gets created (/plan-lite and /milestone are the others), so the title matters: it NAMES the feature, with NO punctuation at all (a comma or colon is refused at any length) and at most 8 words (Saved views, Bulk contact enrichment for scouted shows), never a narrative sentence and never a category like Accessibility, since categories are labels and an issue can be two at once. The helper exits 8 refusing a title that is not shaped like a feature name. Every issue also needs a priority-p0 to priority-p4 label and at least one category label, both of which you choose per phase. The helper files nothing if any phase is missing either. Both rules: ~/.claude/skills/milestone/NAMING.md.

  2. Preview with a dry run, then create:

    DRY_RUN=1 bash ~/.claude/skills/milestone/create-milestone.sh "<owner/name>" <plan.json>   # preview
    bash ~/.claude/skills/milestone/create-milestone.sh "<owner/name>" <plan.json>             # create
    
  3. Relay the milestone URL it prints. Same helper backs /plan-lite and /milestone, so milestones look identical across all three paths. The helper reuses an existing milestone with that title rather than creating a second one, and stops to ask if the title closely resembles an open milestone.

  4. If step 3 printed MILESTONE-PENDING <url>, move that tracking issue into the milestone now, so the plan record lives with the work it describes:

    gh issue edit <url> --milestone "<milestone title>"

Revise mode: fold in the user's GitHub comments

When the user has commented on the Discussion and wants the plan updated (e.g. "revise the plan-council plan from "):

  1. Fetch the discussion body + comments for that URL with gh api graphql (or gh REST).
  2. Call the Workflow tool with the same scriptPath and args, plus mode: "revise", priorPlan: "<original plan text>", and comments: "<fetched comments>". It revises the plan, then settles it through the same check loop as a full run, and returns { revised: { plan, responses, openRisks }, checks, lessonsAudit }. Present checks exactly as in step 4.
  3. Post the revised plan back as an update/comment on the same Discussion (reuse the helper or gh), and show the user the point-by-point responses for how each comment was handled.

Resuming after an interrupted run

If a run is killed part way (a restart, a rate limit, a stop), resume it with
Workflow({scriptPath, resumeFromRunId}), but pass the args verbatim as the original
call
. In a later session the scratchpad is a different folder, so stage the script again
(step 2) and pass the new path. The cache is keyed on a hash of each agent's prompt, so editing the framing even
slightly, including "improving" it with corrections you have since discovered, changes
every key and the panel silently re-runs from the first pass at full cost instead of
resuming. There is no warning; it simply starts over.

Measured on the 2026-08-18 PET run: resuming with an edited brief matched 0 of 6 cache
keys and re-ran everything, then hit a weekly limit; resuming with the identical brief
matched 2 of 2 and picked up at the final check round. If you have corrections, note them
for the fix round rather than editing the brief, because the reality-check phase generally
finds the same things itself.

To check whether a resume actually hit the cache, compare the key fields in the run's
journal.jsonl against the earlier entries. Do not judge it by agent transcript
timestamps: replay and teardown touch those files too, which reads as fresh agents.

Notes

  • Cost is intended. At full rigor this spawns many agents per run (independent passes + a champion and red-team per option + judge + synthesizer + verifier). That depth is the point; it is why this is user-invoked only.
  • Grounding is mandatory. Every agent is told to read the real code, CLAUDE.md, and the Supabase schema (MCP) and to verify files/APIs/tables exist. A plan that is internally agreed but wrong about the codebase is exactly the failure the reality-check phase exists to catch.
  • The recorded lessons are part of the debate, not just a final filter. The red-team is told to cite lesson ids, the judge weights a cited lesson above a hypothetical objection, and the synthesizer is told to design against the file before writing. The audit phase is the backstop, so a violation reaching it means the earlier phases missed it.
  • Revise mode gets the same treatment: the same loop, with the same 3 round ceiling.
  • First run = the prototype. Expect to tune the roles, criteria, and phase prompts after seeing it work once on a real feature.