Planning
Critstorm
Multi-Session Roadmap
How the rest of critstorm gets built: the dependency spine that forces the order, a wave-by-wave plan from here to a playable v0.1 slice and beyond, and a readiness label on every open issue so you know what an agent can take solo and what needs you in the loop. Current status: wave 2.5 merged, wave 3 drafted.
01Where we are
Two waves of foundation are in. The game itself has not started yet.
- What shipped so far is scaffolding, not gameplay: the headless physics sim, its pixel buffer rendered under the Pixi stage, a world-bootstrap generator (terrain floor + storm core + strike zone), and a headless storm-harness CLI with stubbed bot strategies.
- The actual game — gold eruptions, the bank-or-ride surge, defenses, meta progression, presentation — is entirely ahead of us.
- The build order is not a free choice: the epics have hard
blocksdependencies. The critical path to something playable runsgold loop → surge, and almost everything else hangs off those two. - Every open issue now carries a readiness label (
agent-ready/agent-draft/needs-human) and a wave label (wave-3…wave-7), so a session can be fired withbd list --label wave-3.
02The dependency spine
Blocks-edges between epics force a mostly-linear order. b4r is done; mhz then hkm are the critical path.
flowchart LR b4r["b4r · sim + render ✓"] --> mhz["mhz · gold loop"] mhz --> hkm["hkm · surge (bank-or-ride)"] mhz --> j5g["j5g · defenses"] mhz --> sh8["sh8 · presentation"] hkm --> cz["4cz · economy harness"] hkm --> gen["gen · meta layer"] hkm --> npq["npq · storm arc & finale"]
Read this as: nothing in mhz can start until b4r is done (it is); nothing in hkm / j5g / sh8 until mhz lands; the three right-hand epics unblock only once hkm exists. That last fan-out is the best place to run epics in parallel.
03The wave plan
Each wave is one (or a few) agent sessions, grouped so dependencies are satisfied and file-ownership doesn't collide.
| Wave | Focus | Issues | Gated on |
|---|---|---|---|
| ✓ | 2.5 — wave-2 cleanup tail (done) | 9zz, 18q, jhg, 5nf (7g6 deferred) | — |
| 3 | Gold matter loop | mhz.1–5 | b4r ✓ |
| 4 | Surge + v0.1 slice | hkm.1–5, j5g.1 | mhz |
| 5 | Economy harness + perf | 4cz.2, 4cz.3, b4r.4, 7g6 | hkm |
| 6 | Content breadth (3 parallel epics) | j5g.2–4, gen.1–3, npq.1–4 | hkm |
| 7 | Presentation (taste pass) | sh8.1–3, dur | mhz+ |
Waves 3 and 4 are strictly sequential — the surge needs the gold loop to exist first.
Wave 6's three epics (j5g / gen / npq) are independent of each other. That's the ideal fan-out: one agent-chain per epic, running concurrently.
Wave 7 is all taste — art, audio, juice, bust legibility. Save it for a session where you're actually in the loop; agents can't judge feel.
04The v0.1 milestone
Finishing waves 3 and 4 is the design's own vertical slice — the smallest build where the pitch is visible in a 10-second clip.
Design §8 defines v0.1 as: strikes erupt molten gold with tier-scaled heat → gold cools and pools → a collector turns it into essence → essence buys crit upgrades and stone/water brushes → the surge with its pot, BANK button, physical overheat bust, and a readable HUD. Completing mhz + hkm is that slice. The pacing gate: the first surge must be reachable within ~90s of a fresh start. If this slice isn't fun, nothing above it saves the game — so this is the first real playtest checkpoint, not wave 7.
05The readiness labels
A three-tier scheme, not a binary — the middle tier is where an agent does the work but you review before the next issue builds on it.
| Label | Meaning | Open | Examples |
|---|---|---|---|
| agent-ready | Deterministic, spec-precise, test-verifiable. Fire and forget. | 9 | mhz.1 materials, mhz.4 collector, gen.1 cores formula |
| agent-draft | Agent writes the first pass; a human reviews before it's trusted — an architectural keystone others build on, or a feel/visual thing that can't be unit-tested. | 13 | mhz.2 value contract, hkm.1 surge state machine, mhz.3 ballistic eruption |
| needs-human | Playtest tuning, UI/UX, art, audio, juice. Judgment calls, not code. | 7 | hkm.5 HUD legibility, 4cz.3 pacing, gen.2 workshop UI, sh8.* |
Why three tiers matter: the binary hides the two spots where the whole downstream chain depends on getting a shape right. mhz.2 (the Lagrangian value-conservation contract) and hkm.1 (the surge state machine) are keystones — if an agent gets the contract or the state shape wrong, every issue built on top inherits the mistake. Those want a human eye on the design before the dependents run, even though the agent can write them.
06The 7g6 finding
One wave-2.5 issue came back with a real result instead of a green checkmark — worth reading.
The agent tasked with the anti-farming test (7g6) did not fake a passing test. It proved the current pre-surge economy violates the property: cores/min declines after ~15 min because in-storm essence growth flattens once the crit-chance / golden / attack-rate caps hit, and the 8-vs-35-minute comparison even flips sign depending on how many seeds you sample. No fixed seed yields an honest green assertion without cherry-picking.
This is not a bug to fix now. Design §6 says the late-game growth curve is supposed to come "mostly through multiplier growth + collection efficiency" — i.e. from the surge multiplier (hkm.1) and the collector (mhz.4), neither of which exists yet. So 7g6 was mis-scoped as buildable today. It's been re-scoped: relabeled agent-draft + wave-5, given dependencies on hkm.1 and mhz.4, and the intended assertion is parked as an it.skip in sim/storm-simulator.test.ts with the full analysis in the test body. It comes back in wave 5 once the surge economy makes the assertion meaningful.
07How each wave gets fired
Reuse the wave-2 pattern that worked, minus the two things that tripped the safety gate.
- Agents run in isolated git worktrees → branch → PR (keeps main clean, lets you review)
- No
bdinside worktrees — the beads DB isn't available there; all issue bookkeeping happens from the main checkout afterward - Reviews are comment-only — the classifier blocks an agent approving its own PR
- Merges are done by you (or by me on your explicit go-ahead) — the classifier blocks agent-driven merges
- Keystone review is at merge — no mid-workflow pause. Wave 3 splits into a foundation PR you merge (reviewing the value contract then) before consumers fan out
08Wave 3, concretely
Decisions made — here's how the gold loop actually runs, in two phases forced by a hard code dependency.
Keystone review happens at merge, not via a workflow pause. The bd label arg-order quirk is not being saved to memory.
The gold loop can't run as one fan-out: mhz.2's value field must exist in code before the collector, eruption spawner, and loss rules (mhz.3/4/5) can be written against it. So wave 3 is two phases:
| Phase | What | Issues | Ends at |
|---|---|---|---|
| 3a — foundation (drafted) | One agent: gold materials, then the Lagrangian value field + conservation contract | mhz.1, mhz.2 | One reviewed PR, ready for your merge |
| 3b — consumers (after 3a merges) | Three agents in parallel from merged main, each against the value-field API 3a exposes | mhz.3, mhz.4, mhz.5 | Three reviewed PRs |
Phase 3b's agent prompts reference the exact value-field API — so I write that script after 3a merges, when the real API names exist. The wave-3.js foundation script is drafted and waiting; it guards preconditions, builds both foundation issues in a worktree, posts a comment-only review keyed on the conservation contract, auto-applies confirmed blocker/major findings, and stops at a merge-ready PR.