Order asked for a minimum of ten under happy-dom. happy-dom is not actually
installed (not in package.json, not in node_modules) and root config is not
mine to edit, so these run in the default node environment instead — which is
why the logic was factored into pure modules first.
Covers everything the order named except the two things that genuinely need a
DOM: chip rendering (the arithmetic is covered) and attach()'s window binding
(the routing is covered).
Pins the invariants worth pinning: no build page ever exceeds nine slots at
any catalog size, syncRoster copies values rather than holding sim buffers
across frames, footprint hit-testing respects rotation, and an unknown jam
reason or machine kind degrades instead of throwing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Inspector: setRecipe finally has a UI — a process picker listing each
machine's recipes as readable lines ("1 LUMA BARS -> 1 COEFFICIENT PACK +
1 HF DUST"). Heat gets a bar with THROTTLING and SCRAM states rather than a
number. Jam reasons route through jamText() so 'starved' and 'output full'
read as different problems, and an unknown reason passes through uppercased
instead of being swallowed.
Fax: NEXT IN TRAY peek, a STANDING ORDER stamp for repeat commissions, and a
SANITISING chip once anchor-slabs ship (hardcoded id sanctioned this round).
voice.ts/palette.ts now prefer MachineDef.flavor/.color from data and keep the
round-1 hand-transcribed tables as fallback. chipspec.ts lifts the chip
arithmetic out of the DOM so it can be tested.
Caveats in NOTES: the sim pins the active commission to commissions[0] and
never advances, so STANDING ORDER is unreachable; NEXT IN TRAY infers "next"
from data order because the snapshot has no queue.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Kind tabs alone don't deliver "every machine hotkey-reachable at any catalog
size": REFINE holds 14 crafters and 1-9 reaches nine. So a page caps at nine
and an oversized kind spills into numbered pages (REFINE 1/2, REFINE 2/2).
The 21-machine catalog lands as 1+3+9+5+2+1 across six pages, every slot
hotkeyed. Pagination is pure (pages.ts) so the invariant can be tested rather
than eyeballed.
Selecting a machine from anywhere pulls the bar to the page that holds it, so
the hot button is always the visible one.
hotkeys.ts splits into a pure KeyRouter (map + dispatch, no window) and a thin
window binding, which lets the keymap be tested in node.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contract request 1 landed, so the inspector opens the way it always should
have: click a machine. pick.ts loses the window.__fktryRenderer probe and
its apology; index.ts loses the TAB manifest cycle that stood in for it.
?uifixture and fixture.ts are deleted too. The sim is real now — a brownout
is something you cause by building an extractor with no generator, which is
a better demo than the fake one ever was.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
One stamp per shipped event (not per unit), 0.4s, sized by count, in the item's
chip colour. Composited in screen space so a melting feed never drags the placard.
Scram events get the one-frame TRACKING LOST bar, positioned from entity+tick so
a run always wipes the same way.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
block: 8x8 quantization on a lattice locked to screen space, so the grid stays
rigid while melt drags the picture underneath it. ring: Gibbs halos, gradient
sampled out to 7px so they ring OUT from edges rather than clinging to them,
oscillating parallel to the edge. moire: two near-identical lattices beating,
with rainbow sheen.
PARAMS 8 -> 11; the ledger, easing, wobble and stats all iterate PARAMS, so the
new classes inherit the existing machine. Wires bricks/coeff-packs to block,
halos/gibbs-wraiths to ring, crystal to moire.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Round 2 orders, all seven.
- data/CANON-DELTA.md: ledger of every invention beyond the codex, with the
rationale and the arithmetic behind the numbers.
- colour + flavor on all 21 machines (kills UI's hardcoded lookup and RENDER's
black-on-black); desaturated industrial per style guide §8.
- heat: software decoder 45->55 gen at 0.0025/tick (throttles 9.3s, scrams
13.3s) so it's a burst generator, not a better ASIC; a pinch on the splicer.
- bufferCap 240 = 10s of the reference chain's one-decoder-down deficit.
- commission queue reordered into a ramp + 3 standing orders, incl. THE
CORRECTION BUYBACK (the sellout loop: anchors clean THE SCREEN).
- container line (moov-shard/offset-ribbon/sync-key) unblocks the hex splicer;
bloom grades 1-5. bloom-concentrate kept — LANE-SCREEN hardcodes it.
- validator 28 -> 36 tests, covering every v2 field; FORWARD_CANON pruned.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adding happy-dom hoisted @types/node, changing global setTimeout's return type;
src/ui/fax.ts stampTimer is a DOM timer id, so use window.setTimeout. One-line
cross-lane touch by the orchestrator to unbreak the build it broke.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Decisions, verification evidence, honest limitations, and 3 contract
requests (BeltItem stable id, optional MachineDef.color, main.ts placing
on any pointer button).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replaces the render stub with the full M1 surface:
- camera: ortho iso rig, wheel zoom, middle/right-drag + WASD pan, resize
- ground: shader tile grid w/ world-edge dissolve + screen-space vignette
- registry: procedural placeholders (two-material rule) + MODELBEAST GLB
hot-swap, probed on init and every 10s in dev. GLBs auto-normalise to
the machine footprint, so any export scale lands correctly.
- belts: InstancedMesh per belt def, chevron scroll injected into a
MeshStandardMaterial so belts keep lighting/fog/brownout
- cargo: InstancedMesh per item type, interpolated across ticks via alpha
- ghost + pickTile with footprint occupancy (cyan valid / red blocked)
- feedback: jam klaxon blink, brownout dims the scene via tone-mapping
exposure so emissives dim too
Machine accents are derived from data (recipes -> outputs -> ItemDef.color),
with a legibility floor: near-black products like MDAT ORE would otherwise
render the extractor's CRT head as a black panel and its ore as invisible.
Verified in the dev build: 500 entities + 2,000 belt items at 3.2ms/frame
(5 instanced draw calls); a GLB dropped in mid-session swaps without reload.
Dev scaffold is DEV-gated and tree-shaken from the prod bundle.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reports the M1 melt chain working (tick 1149) and two things the
orchestrator needs to decide: the DoD chain no longer exists after
LANE-DATA's codex landed (mosh now eats gop-crate, melt is 8 machines
deep), and the M1 factory deadlocks at ~tick 1200 on byproduct surplus
with no legal overflow. Proposes splitters as the fix.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replaces the stub with the real sim per lanes/LANE-SIM.md round 1.
- grid + placement/remove/rotate/setRecipe, footprint rotation, bounds
- belts: 2 items/tile, 0.45 spacing enforced across the tile seam,
back-pressure, merges, belt<->machine handoff
- crafting: recipe buffers (2x in, stall at 4x out), edge-triggered jams
- bandwidth v1: gen vs draw, compression generates, brownout = gen/draw
scaling both craft progress and belt movement
- shipping + commission tracking
- output routing ranks belts by tracing the chain to its terminal machine,
so the demuxer's three outputs reach three different consumers without
splitters (see NOTES - biggest judgement call of the round)
18 tests. Measured 3,500 entities + 6,820 belt items at 0.42ms/tick (80x
realtime). Full M1 chain ships MELT at tick 1149 in both node and browser.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Shipped/verified list, and the honest parts: click-to-inspect is blocked
on reaching renderer.pickTile, 12 of 21 machines have no hotkey, and the
lane has no DOM test env. Four contract requests (pickTile, MachineDef
.color, MachineDef.flavor, jsdom) and a build-bar paging proposal.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The sim stub reported an empty world, so there was nothing on screen to
verify the HUD against: an empty inspector and a 0/0 meter prove nothing.
This synthesises a plausible snapshot -- entities mid-craft, a jam, heat,
shipments, a recurring brownout and commission -- so every surface can be
watched doing its job in a browser.
Runs on a wall clock rather than the sim tick: rAF stops in a backgrounded
tab, and a tick-driven fixture crawls too slowly to ever reach the brownout
window. It is a fake sim for eyeballing chrome; nothing here is or needs to
be deterministic.
Inert without the query param, dispatches no Commands, touches no other
lane. Delete once the real sim can be driven to a brownout by hand.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The five M1 surfaces, replacing the stub:
- buildbar.ts: one button per machine, hotkeys 1-9, R rotates, Esc or
right-click clears. LANE-DATA shipped 21 machines, so the bar wraps
rather than running off both edges of the viewport; slots 10-21 are
click-only for now (paging proposed in NOTES).
- topstrip.ts: bandwidth meter going amber at 85% and red + flashing
BROWNOUT over 100%, buffer, shipped ticker + per-item chips, tick or
HALTED. The brownout is legible from this panel alone, which is the
one failure the player has to read across the room.
- inspector.ts: name, codex flavor, intake/output chips with live
buffers, process bar, heat, jam reason. Holds an entity id and
re-looks-up each frame, so a removed unit closes itself.
- fax.ts: the commission card with wants-as-chips and a FAX SENT stamp
on commissionDone.
- toasts.ts: max 4, 6s TTL, colored per event kind.
Click-to-inspect is not wired: the UI cannot reach renderer.pickTile
(UIBus exposes only dispatch/selectedBuild, and ui.init never sees the
Renderer). TAB cycles the unit manifest as a stopgap so the inspector is
reachable without a console. Contract request filed in NOTES.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Shared plumbing for the DOM HUD, no framework:
- voice.ts: every player-facing string, so the OSHA-poster deadpan
register lives in one place instead of being re-invented per panel.
- style.ts: injected terminal-industrial stylesheet. Panels re-enable
pointer-events; #ui itself stays transparent to the mouse.
- chips.ts: the item chip (swatch + name + count), keyed off GameData
so new items from LANE-DATA light up with no code change.
- hotkeys.ts: the whole keymap in one file, per lane orders.
- selection.ts: pending build selection, written through to bus._sel.
- pick.ts: tile -> entity hit-testing plus the flattened roster the UI
keeps instead of holding a snapshot across frames (CONTRACTS says sim
may reuse those buffers, and input handlers fire between frames).
- palette.ts: machine accent colors. Stopgap — MachineDef has no color
field; contract request filed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Eased param pressure so shipments land as waves, log escalation over the
first ~100 items, cross-modulated wobble above 0.8 so a mature factory looks
alive, brownout seize, and a one-frame white awakening on the first ship ever.
Measured 0.004-0.013ms/frame CPU against a 2ms budget.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mix and total are separate axes: what you ship picks the artifact, how much
you have ever shipped picks the intensity. That separation is what makes
40 chroma slurry read as chroma specifically instead of generic damage.
Covers the full 40-item codex LANE-DATA landed; unknown ids degrade to a
generic noise bump, with a test walking data/items.json to keep it that way.
anchor-slab has negative potency and sanitizes THE SCREEN (see NOTES).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Raw WebGL fullscreen triangle, not three.js: one texture, one pass.
The 8 prototype params keep their tuning verbatim; u_drift, u_brownout
and u_flash are additions. Base feed repaints only when a visible glyph
changes rather than per frame, so the texture upload stays off the hot path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Transcribe the §2-§6 codex into machine-readable canon and add the validator
that keeps five parallel lanes from drowning in dangling ids.
- validator (28 tests): recipes point back at their machine, every item/tech/
commission reference resolves, ids unique + kebab-case, colors hex, footprints
>=1x1, plus a reachability pass proving MELT is craftable from raw ore.
- items 9->36, machines 7->21, recipes 4->35, tech 0->17, commissions 1->10.
- mosh rewired to canon (gop-crate -> melt + reclaimed anchor slab); all seed
recipe ids preserved so nothing dangles mid-round.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>