glytch/fktry/lanes/LANE-DATA.md
type-two f015a66283 [data] full codex catalog + data validator
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>
2026-07-17 16:04:27 +10:00

141 lines
8.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# LANE-DATA — content, recipes, balance, and canon-keeping
You are an Opus 4.8 executor on the DATA lane of FKTRY. Read `../MASTERPLAN.md` and
`../CONTRACTS.md` first. Your bible is `../../docs/FKTRY_LORE.md` — you are its
transcriber into machine-readable canon. When the codex and convenience disagree, the
codex wins; when the codex is silent, invent IN ITS VOICE and note what you invented.
**Mission:** every item, machine, recipe, tech, and commission as clean JSON, plus the
validator that keeps five parallel lanes from drowning in dangling ids. Content should
light up in-game with zero code changes from other lanes.
**Owned paths:** `data/**`, `src/sim/data-validate.test.ts` — EXCEPTION: this one test
file in sim's directory is yours; it validates data, not sim. Nothing else in
`src/sim/`.
**Never touch:** contracts, main.ts, other lanes' code. Schema changes are CONTRACT
REQUESTs.
**Standing rules (all rounds):**
- Ids: kebab-case matching codex names (`chroma-slurry`, `mosh-reactor`). `codex`
field points at the lore doc section (`"3:melt"` = §3, MELT entry).
- Balance philosophy: absurd flavor, honest math. Ratios should create real routing
pressure (byproducts you must deal with, not vent). Steal shamelessly from the
doc's real numbers (era efficiency multipliers, 4:2:0 = half the chroma, GOP
cadences).
- Never delete an id other lanes may reference mid-round — deprecate in NOTES first.
---
## CURRENT ORDERS — Round 1 (goal: milestone M1 "FLOW" + M2 prep)
The seed JSONs in `data/` are orchestrator placeholders — correct them, then grow:
1. **Validator first** (`src/sim/data-validate.test.ts`, vitest): every recipe's
machine + items exist; every machine's recipes exist and point back at it; every
tech unlock exists; commission wants exist; ids unique + kebab-case; colors valid
hex; footprints ≥1×1. This test is the lane's handshake — it must fail loudly on
any dangling reference.
2. **Items** → full §2 + §3 catalog: all raw resources, refined intermediates, frames,
the five science packs, and tier-2 products (melt, bloom-concentrate,
macroblock-bricks, ringing-halos, static-canister, moire-crystal, false-color-
speckle, judder-cams, explosive-hits, gamut paints ×3). Colors from codex vibes.
3. **Machines** → full §4 catalog (demosaicer, dct-press, subsampler, mv-extractor,
p-caster, gop-assembler, bloom-duplicator, field-loom, telecine-puller,
hex-splicer, software-decoder, buffer-tank...). Machines beyond M1's seven should
exist in data even though sim/render only generically support crafter/power kinds
— that's fine, they'll work as generic crafters until given bespoke mechanics.
4. **Recipes** → wire the economy: ore → luma/chroma/mv-flux (demux), luma → coeff
packs + hf-dust (quantize, generates bandwidth), mv-flux → delta-wafers, slab +
wafers → gop-crate, gop-crate → melt + reclaimed slab (mosh), coeff overdrive →
macroblock-bricks + double hf-dust, hf-dust → static-canister, science pack
assembly ×3 (analog/spatial/temporal). Include at least two genuinely absurd
ratios for comedy that still balance.
5. **Tech tree v1**`disc` and `stream` era nodes: unlock quantizer tiers, mosh
reactor, bloom duplicator, subsampler grades. Costs in science packs.
6. **Commissions** → 8-10 in full fax voice (§6 has three exemplars). Escalating
absurdity and quantity; at least one demanding a *live* hazard product you know
isn't shippable yet (mark it `"wants": {"mosquito-swarm": 3}` — forward canon;
the validator should allow items that exist in data even if no recipe makes them).
**Definition of done:** `npm test` green including your validator; dev server still
boots with expanded data (placeholders render for everything); every entry traceable
to a codex section. NOTES list what you invented beyond the codex.
---
## NOTES (append-only log, newest at bottom)
```
### Round N — YYYY-MM-DD — [your model]
SHIPPED: / DECISIONS: / INVENTED: / BLOCKED/BROKEN: / CONTRACT REQUEST: / NEXT:
```
### Round 1 — 2026-07-17 — Opus 4.8
SHIPPED:
- Validator `src/sim/data-validate.test.ts`, 28 tests. Fault-injected a recipe with a
dangling item + a machine that doesn't list it — both caught by id and named. It is
not a test that only knows how to pass.
- items 9 → 36, machines 7 → 21, recipes 4 → 35, tech 0 → 17, commissions 1 → 10.
- Verified: `tsc` clean, `vitest run` 52/52 green (LANE-SCREEN's 24 included), and the
live dev build boots with no console errors. All 21 machines appear in LANE-UI's
build bar with zero code changes from them.
DECISIONS:
- **All four seed recipe ids kept alive** (`extract-mdat`, `demux-ore`, `quantize`,
`mosh`) so nothing dangles for a lane mid-round. `mosh` keeps its id but is rewired
to canon: `gop-crate 1 → melt 3 + anchor-slab 1`. The winched-out I-frame is
recovered (§4 mosh reactor: "recoverable — sell it!"), so slabs circulate and delta
wafers are what actually burns. Net economy: 6 wafers → 3 melt.
- `quantize` left at the seed's exact ratio so the M1 chain stays easy to build.
- **M1 chain is longer than the masterplan says — please rule on this.** My orders
spell out `slab + wafers → gop-crate` and `gop-crate → mosh`, but MASTERPLAN M1
describes extractor → belts → demuxer → quantizer → mosh → shipper (seven machines).
Those can't both be true: reaching a crate needs dct-press (slab), p-caster (wafers)
and gop-assembler in between. I followed the orders since they're the more specific
and more recent instruction, and all three run fine as generic crafters. If M1 must
stay at seven machines, say so and I'll add a shortcut `mosh-raw` recipe next round
rather than weaken the canon path.
- Machine params that the codex describes as dials (quantizer Q, subsampler grade taps,
GOP cadence templates) are modelled as **separate recipes per setting**, not as a
per-entity parameter. Cheapest thing that works against the current contract; if SIM
ever wants a real dial, that's a contract change, not a data change.
- Two absurd-but-honest ratios, as ordered: `assemble-gop-i-only` burns 8 premium slabs
for 1 crate (I-only genuinely is the worst cadence — the joke balances itself, nobody
sane builds it), and `pan-speckle` takes 40 HF DUST for 1 speckle (§3 says "panned
like gold", so it's priced like gold panning). Both give hf-dust real sinks.
INVENTED (codex is silent; written in its voice — kill any of these if you disagree):
- `press-anchor-slab` on the DCT PRESS — the press run in reverse is an IDCT, i.e. a
complete picture. Consistent with the field loom and telecine puller, which the codex
explicitly runs backwards. This is where I-frames come from.
- Items `color-plate` (the demosaicer's "full-color sheet", §4) and `v-hold-roll`
(bottled from the §1 Broadcast Shelf v-hold faults, so the ANALOG PACK's "combing +
v-hold roll + static" triptych maps to three real items).
- Machines `artifact-bottler` (§2 calls the packs "a bottled artifact triptych" but
names no bottling plant) and `lane-splitter` (contract has `kind: 'splitter'` and
belts need routing; the codex only ever calls the DEMUXER "the first splitter").
BLOCKED/BROKEN: nothing blocked. Known-incomplete, deliberately:
- Bloom is one grade, not the graded 1-5 line §3 sells by intensity.
- `container-pack` / `cinema-pack` / `mosquito-swarm` / `gibbs-wraith` exist as items
with no recipe — forward canon, per orders. The validator's reachability test has an
explicit FORWARD_CANON allowlist so these four can't hide a real dangling id; delete
entries from it as recipes land.
- `stream-hex-splicing` costs container-packs nothing currently produces. Intentional
dead-end until the moov/container line exists (§6 heists).
CONTRACT REQUEST: `MachineDef.heatPerTick?: number` — the SOFTWARE DECODER is
`kind: 'power'`, and power machines carry no recipes, but `RecipeDef.heat` is the only
heat hook in the contract. So the one machine the codex defines *by* its heat (§4:
"decodes ANYTHING, at any temperature") has no way to declare it. It's shipped as a
plain 45-gen power machine and is currently strictly better than the ASIC, which is
backwards. Alternative if you prefer no contract churn: let power machines run a
recipe with empty outputs — but I'd rather not put `outputs: {}` in the data, and my
validator rejects it today.
NEXT (Round 2 candidates, not self-assigned): bloom grades 1-5 as real items; the
container line (moov shard / offset ribbon / sync key → CONTAINER PACK) which unblocks
the hex splicer; mosquito traps so `vaporwave-sunset` becomes shippable; buffer-tank
and muxer data; reel + broadcast era tech nodes.