Skip to content

/wbPlan — Exhaustive Simulation () ​

/wbPlan is the general. Its job is to produce the plan file that every other QA-group command reads from. The plan is the source of truth for what work is queued, what's done, what's validated, and what's deferred — and /wbPlan is the one command that creates and structures it. Workers and validators only ever mutate cells in plans they didn't author; the plan's shape is /wbPlan's alone.

Read this if you want to know why /wbPlan is the only command that can mutate both Done and Valid cells, what --focus actually scopes, and where planning ends and orchestration (/wbActOn) begins.


1. Role & target ​

AspectBehavior
RoleThe General — coordinates workers and validators by structuring their tasks and estimating execution cost.
TargetA free-text description of what should be planned, or a --resume flag to carry over yesterday's incomplete work.
Cell scopeBoth Done and Valid cells (state-only flags). This is the unique privilege; /wbWork writes only Done, /wbValid writes only Valid, /wbPlan can transition either or both.
Side effects allowedWriting new plan_<package>_<date>.md files; appending rows to existing plans; mutating both cells of a row via state-only flags; computing Est. (min · kt) token estimates and 💰 Budget Summary per plan.
Side effects forbiddenEditing source code; running tests; making non-plan-related decisions.

The "both cells" privilege is what makes /wbPlan the recovery tool. If the worker/validator pair gets into a bad state — a row marked Done = ✅, Valid = 🚫 that should actually be Done = ⏸️, Valid = ⏸️ — only /wbPlan can correct both cells in one operation. /wbWork --id="N" -d would only fix Done; /wbValid --id="N" -d only Valid. The plan command is the cleanup primitive.


2. Argument resolution matrix ​

FormExampleWhat /wbPlan does
Free-text descriptionCommand: /wbPlan "implement WBC.js decomposition"Reads context.md for the active package, breaks the description into rows, assigns model tiers per feedback_model_selection.md.
File referenceCommand: /wbPlan core2/packages/wb-core/src/WBC.jsTreats the file as the target of planning — produces rows for refactoring/extending it.
Audit/review reportCommand: /wbPlan reports/<date>/audits/audit_<...>.mdReads the report's findings and produces rows that address them. (This is what /wbAudit --wbPlan does internally — /wbPlan accepts the report directly when chaining hasn't happened.)
--resume flagCommand: /wbPlan --resumeReads yesterday's plan, extracts incomplete rows (Done ≠ ✅ or Valid ≠ ✅), carries them into a fresh plan_*_<today>.md with renumbered IDs.
--id="<filter>" + state flagCommand: /wbPlan --id="3" -dState-only mutation: writes ⏸️ to both Done and Valid of row 3.

The state-only path is operationally important. It exists because the most common cleanup case is "this row is irrelevant now; clear both cells in one go." Doing it via two separate commands (/wbWork ... -d then /wbValid ... -d) is correct but ceremonious; /wbPlan ... -d is the one-step.


3. Flag matrix ​

/wbPlan has the largest flag surface in the QA group — it's the most-configurable command because planning intent varies most.

Structural flags ​

FlagShortcutPurpose
--focus="<sub-system>"-fScopes the plan to a specific sub-system (e.g., --focus="auth", --focus="docs"). Filters rows so they all relate to the focus.
--scope="<level>"-sArchitectural scope: local (one package), cross-package, monorepo. Default: local.
--resume-rCarries over incomplete rows from the most recent plan in the same scope.
--continue-tomorrow(none)Marks the current plan with a handover header for tomorrow's --resume. The header summarizes context and pending decisions.

Row-shaping flags ​

FlagShortcutPurpose
--task="<type>"-tForces a row category: feature, bugfix, refactor, audit-followup, docs. Affects the Verify column template.
--id="<id>"-iWhen state-only flags are present, scopes the mutation to specific rows.

State-only flags (the dual-cell privilege) ​

FlagShortcutEffect when paired with --id
--open-oBoth cells → ⬜. Re-opens the row entirely.
--def-dBoth cells → ⏸️ Deferred.
--can-cBoth cells → 🚫 Cancelled.

Chaining flags ​

FlagShortcutPurpose
--act-aRoutes the new plan through /wbActOn to produce a ranked execution order.
--wbPlan-PError / no-op here — /wbPlan already produces a plan; chaining its output back into itself is meaningless. The flag exists for grammar consistency across commands but is rejected with a notice.

The --wbPlan no-op is an interesting case. Other commands (/wbAudit, /wbReview, /wbStandup) take this flag as "convert findings into plan rows." /wbPlan's findings are plan rows. The flag would be circular; the agent rejects it explicitly rather than silently ignoring.


4. Pipelines (the agent-native scenarios) ​

📋/wbPlan Exhaustive Simulation
The Monday morning resume/wbPlan --resume
> /wbPlan --resume
[SYSTEM] Looking for most recent plan in scope `local`...
[FOUND] reports/<friday>/plans/plan_wb-core_<friday>.md
[ANALYZE] Row state in friday's plan:
Row 1: Done=✅ Valid=✅ — closed.
Row 2: Done=✅ Valid=✅ — closed.
Row 3: Done=✅ Valid=❌ — re-work needed.
Row 4: Done=⬜ — never started.
Row 5: Done=✅ Valid=⬜ — validation pending.
[CARRY] Carrying rows 3, 4, 5 into today's plan.
[RENUMBER] 3→1, 4→2, 5→3.
[WRITE] reports/<today>/plans/plan_wb-core_<today>.md created.
| # | Task | Verify | Dep | Done | Valid |
|---|---|---|---|---|---|
| 1 | (was friday row 3) Re-work ... | ... | — | ⬜ | ⬜ |
| 2 | (was friday row 4) Implement ... | ... | — | ⬜ | ⬜ |
| 3 | (was friday row 5) Validate ... | ... | — | ✅ | ⬜ |
[OK] Resume complete. Note row 3's Done=✅ — only Valid was pending.
Run /wbValid --id="3" to close that row.
⚠️ Note: Friday's plan had 5 rows; 3 done, 2 incomplete. Monday, the user wants to start with those 2 carried forward into a fresh plan:

💠 Pipeline The Monday morning resume ​

Friday's plan had 5 rows; 3 done, 2 incomplete. Monday, the user wants to start with those 2 carried forward into a fresh plan:

💠 Pipeline The audit-driven plan (no chaining required) ​

/wbAudit --wbPlan is the chained shortcut, but the user can also do it explicitly: run audit, produce report, then /wbPlan directly from the report:

💠 Pipeline The dual-cell cleanup ​

A row is in a confused state (e.g., Done=✅, Valid=❌ because the work landed but failed validation, then the team decided the row was wrong-shaped to begin with). One command fixes both cells:

💠 Pipeline Plan with --focus and --continue-tomorrow ​

A multi-day session on docs work needs explicit handover state:


5. Edge cases & refusals ​

TriggerWhat /wbPlan does
Free-text input that's vague (e.g., "make things better")Halt. ❌ Need a more specific description. What sub-system? What outcome?
--resume with no prior plan in scopeHalt. ❌ No plan to resume from in scope=local.
--id without a state flagHalt. ❌ --id on /wbPlan only valid with -o/-d/-c (state mutation).
--wbPlan flagReject with notice. Self-chaining is circular.
Plan generation produces zero rowsHonest "nothing to plan." Does not fabricate filler rows.
--task="<unknown>"Halt. Lists supported categories.
--continue-tomorrow on a plan that's already completePlan is written with handover header noting "all rows closed; next session free to choose direction."
--scope="monorepo"Permitted but warns: "monorepo plans tend to be too coarse for /wbWork to action; consider per-package plans."

The pattern: /wbPlan is the structural authority, the only dual-cell command, and the source of every plan file every other command reads. It refuses circular self-chaining, refuses to fabricate rows for vague descriptions, and treats the --continue-tomorrow header as a first-class handover artifact. Planning is the foundation; everything else operates on what /wbPlan produces.