guts/web/js/levels/L2_esophagus.json
jing 1b5ec767cd [lane C] Round 1: schema v1, levels registry + selfcheck + pacing sim, L2 vertical slice
Data spine:
- Schema v1 ratified (TECH.md, C-owned). Additive over v0: schema/par/next, segment
  name, cross-section placement (theta/rho as a FRACTION of safe radius), spread, span,
  pickup+gate event types, hazard params. STUB_LEVEL synced (that const only, per
  ROUND1 §Lane C.1) — world.hash() unchanged (1bdf001), geometry provably untouched.
- levels/index.js: registry + loader (node+browser, no THREE), real schema selfcheck
  (qa's --selfcheck hook is now live) and a pacing simulator (--sim). Consumes the other
  lanes' contracts live rather than restating them: A's biomes.js for ids and
  wave.amp+breathe, A's SKIN, B's tuning.js hull radius, B's balance.js for scores.
- levels/enemies.js (fiction id -> archetype join table), levels/difficulty.js.

L2_esophagus — the vertical slice, complete: 3600 units, 7 beats, 47 events, 65 enemies,
10 checkpoints, 3 samples, reflux-surge finale. L1/L3 skeletons (shape only).
Anatomy is the level designer: the three real esophageal constrictions are the three
setpieces, and all three enemies are real esophageal pathology (bolus chunk, eosinophilic
esophagitis, candida esophagitis).

Measured (node web/js/levels/index.js --selfcheck|--sim; qa GREEN):
- selfcheck 3/3 valid, exit 0.
- pressure curve 0.27 -> 2.14 -> 4.35 -> 0.69 -> 4.53 -> 6.35 -> 4.40 (breather/pressure/
  spike/breather/pressure/peak/finale).
- par 3:30 vs measured 2:47 speedrun / 3:19 par-pace / 4:22 timid; par.score 9000 of a
  9400 kill budget (95%), computed from B's scores.
- all 10 checkpoint gaps within the <=30s death-cost law (max 28.8s); min clearance 2.73.

Two contract collisions found and resolved (LANE_C_NOTES):
- Biome ids: authored mouth/pharynx/cardia/pylorus; A's registry has six canonical ids and
  rejected all four. A is right — biome = look, segments[].name = anatomy. Conformed.
- Balance: my first enemies.js restated hp/size/speed/score that B owns in balance.js.
  Cut to a join table; index.js reads B's scores via scoreFor().

Caught live: A raised esophagus wave.amp 0.9 -> 1.4 mid-session, making the diaphragmatic
hiatus unflyable (2.33 vs the 2.5 floor). Widened 6.5 -> 6.8. The invariant also failed my
own aortic constriction's first draft (radius 7, symmetric squeeze) -> radius 9, directional.

No in-engine flythrough: ?stub=1&lvl= does not compose (snippet offered to F) and the stub
is single-segment, so it could only render beat 1. The pacing evidence is a kinematic model,
not a playtest — it proves L2 is flyable, paced and survivable, not that it feels good.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 08:53:34 +10:00

139 lines
13 KiB
JSON

{
"schema": 1,
"id": "L2_esophagus",
"name": "Esophagus",
"tagline": "Ride the swallow",
"seed": 20260716,
"par": { "time": 210, "score": 9000, "samples": 3 },
"next": "L3_stomach",
"design": {
"owner": "Lane C",
"identity": "The speed level. Level 2 is the vertical slice and the purest tube in the body: one biome, no arenas, everything readable at 14-20 u/s.",
"anatomy": "Real esophagus, real order: upper esophageal sphincter -> cervical -> the broncho-aortic constriction -> thoracic -> diaphragmatic hiatus -> abdominal esophagus -> cardiac sphincter (LES) into the stomach. The three narrowings are the three real anatomical constrictions and they are this level's three setpieces.",
"scale": "Cross-sections are ANATOMICALLY TRUE (radius 10-12 units = ~2cm lumen at 1 unit : 1 mm). Lengths are DILATED ~14x (real esophagus is 25cm; this level is 3600 units). The canal is proportioned, not measured. See LANE_C_NOTES.md.",
"curve": "breather -> pressure -> SPIKE -> breather -> pressure -> SPIKE -> lethal finale. Pressure indices measured in LANE_C_NOTES.md §L2 pacing.",
"teach_then_test": "flow (b1) / bolus (b1 solo -> b3 in the pinch) / candida (b2 solo, clear sightline -> b3 in the squeeze) / eosinophil (b2 open stretch -> b6 in the hiatus) / ring_gate (b5 open 2.4s -> b6 open 1.2s) / reflux (b4 non-lethal burp -> b7 lethal finale)."
},
"segments": [
{
"biome": "esophagus",
"name": "Upper Esophageal Sphincter",
"length": 400,
"radius": { "base": 11, "wobble": 0.12 },
"curviness": 0.15,
"flow": 12,
"note": "BEAT 1 - breather. You drop through the cricopharyngeus behind the swallow. Slowest flow in the level, straightest tube, one lazy bolus chunk: this stretch exists to teach that the current carries you and you steer within it."
},
{
"biome": "esophagus",
"name": "Cervical Esophagus",
"length": 700,
"radius": { "base": 12, "wobble": 0.18 },
"curviness": 0.35,
"flow": 14,
"note": "BEAT 2 - first pressure. Widest, most forgiving tube in the level, which is exactly why every enemy type gets introduced here, alone and survivable, before the pinch."
},
{
"biome": "esophagus",
"name": "Aortic Constriction",
"length": 400,
"radius": { "base": 9, "wobble": 0.15 },
"curviness": 0.5,
"flow": 16,
"note": "BEAT 3 - SPIKE. The aortic arch presses on the esophagus (real: the broncho-aortic constriction narrows the lumen to ~75%, which is exactly 12 -> 9). The tube also pulses with the heartbeat, from ONE SIDE - the aorta crosses on the left. Everything you were taught in beat 2, now in 75% of the room with a wall that breathes at you."
},
{
"biome": "esophagus",
"name": "Thoracic Esophagus",
"length": 500,
"radius": { "base": 12, "wobble": 0.2 },
"curviness": 0.4,
"flow": 14,
"note": "BEAT 4 - breather + the tutorial for the finale. Opens back out, mucin and orbs to recover, and one non-lethal 'burp' surge that teaches the reflux chase 1300 units before the real one tries to kill you."
},
{
"biome": "esophagus",
"name": "Bronchial Narrowing",
"length": 600,
"radius": { "base": 10, "wobble": 0.25 },
"curviness": 0.6,
"flow": 16,
"note": "BEAT 5 - the ramp. Highest curviness in the level: the tube writhes, so wall-mounted candida stay hidden until you round each bend. Sightline pressure rather than raw density."
},
{
"biome": "esophagus",
"name": "Diaphragmatic Hiatus",
"length": 400,
"radius": { "base": 6.8, "wobble": 0.15 },
"curviness": 0.3,
"flow": 18,
"note": "BEAT 6 - SPIKE. The tightest hole in the level: the esophagus threads the diaphragm. Free radius ~2.7 units - the narrowest thing Lane C will author, and only 0.2 above the MIN_CLEARANCE law. Base was 6.5 until Lane A measured the esophagus peristalsis at amp 1.4 (up from the stub's 0.9); the wave eats the difference, so the hole had to widen to stay a challenge instead of a toll. Straightened out on purpose - the challenge is the ring gate's timing, and a writhing tube would make that unreadable."
},
{
"biome": "esophagus",
"name": "Abdominal Esophagus",
"length": 600,
"radius": { "base": 9, "wobble": 0.2 },
"curviness": 0.45,
"flow": 20,
"note": "BEAT 7 - FINALE. Fastest flow in the level. The stomach refluxes and an acid wall chases you to the cardiac sphincter. Bolus chunks drift slower than the current, so here they read as traffic you overtake at speed."
}
],
"arenas": [],
"events": [
{ "s": 20, "type": "checkpoint", "name": "Upper Esophageal Sphincter" },
{ "s": 120, "type": "pickup", "kind": "nutrient_orb", "count": 3, "spread": 40, "note": "Orb lines teach the racing line before they score anything." },
{ "s": 240, "type": "spawn", "enemy": "bolus_chunk", "count": 1, "note": "TEACH bolus: one chunk, slow, unmissable, harmless if you simply steer." },
{ "s": 340, "type": "pickup", "kind": "nutrient_orb", "count": 3, "spread": 40 },
{ "s": 420, "type": "checkpoint", "name": "Cervical Narrowing" },
{ "s": 520, "type": "spawn", "enemy": "bolus_chunk", "count": 4, "spread": 120, "note": "TEST bolus (mild): a field, but in the widest tube in the level." },
{ "s": 620, "type": "spawn", "enemy": "eosinophil_swarm", "count": 3, "spread": 40, "note": "TEACH eosinophil: three of them, open water, nothing else happening." },
{ "s": 700, "type": "pickup", "kind": "biopsy_sample", "count": 1, "theta": 3.1416, "rho": 0.92, "note": "SAMPLE 1/3. Cost = proximity: pinned to the far wall in the tail of the bolus field, so collecting it means wall-hugging (graze damage) while chunks tumble past. Visible from the racing line the whole way in." },
{ "s": 760, "type": "spawn", "enemy": "candida_bloom", "count": 1, "theta": 0, "note": "TEACH candida: one bloom, on the straightest wall, with a clear 200-unit sightline." },
{ "s": 860, "type": "checkpoint", "name": "Thoracic Inlet" },
{ "s": 900, "type": "spawn", "enemy": "bolus_chunk", "count": 5, "spread": 160 },
{ "s": 980, "type": "spawn", "enemy": "candida_bloom", "count": 2, "theta": [1.05, 4.19], "note": "TEST candida: two blooms covering opposite arcs, so there is no free side - and debris in the lane." },
{ "s": 1060, "type": "pickup", "kind": "mucin_glob", "count": 1, "note": "Coat top-up immediately before the spike. Pickup economy law: the game pays you right before it charges you." },
{ "s": 1080, "type": "checkpoint", "name": "Aortic Narrowing", "note": "Checkpoint sits BEFORE the hazard zone opens at 1100 - never respawn a player inside a squeeze." },
{ "s": 1100, "type": "hazard", "kind": "aortic_squeeze", "span": 400, "period": 2.4, "amplitude": 0.45, "theta": 0, "warn": 2.5, "note": "SPIKE hazard, and a POSITIONING verb rather than a timing one - that distinction is deliberate. You cannot stop in a flow-locked tube, so a zone that sealed on a beat would just tax you 10 times with no counterplay. Instead the aorta presses from ONE side (theta=0, anatomically the left): the wall bulges 45% inward there on a 2.4s beat and the safe lane is the opposite arc. The player's answer is 'be on the far side when it beats', which is playable at 16 u/s. Real heart rate is a 0.83s beat - dramatised to 2.4s to be readable. Non-lethal: contact is graze damage, so the zone's first pulses teach it inside itself." },
{ "s": 1180, "type": "spawn", "enemy": "candida_bloom", "count": 2, "theta": [0.5, 3.8], "note": "The squeeze pushes you toward the walls; the walls are where the blooms are. That interaction is the whole point of the beat." },
{ "s": 1260, "type": "spawn", "enemy": "bolus_chunk", "count": 3, "spread": 80, "note": "TEST bolus: same chunks as beat 1, now in a 7-unit tube that is periodically 45% narrower." },
{ "s": 1300, "type": "pickup", "kind": "biopsy_sample", "count": 1, "theta": 1.5708, "rho": 0.9, "note": "SAMPLE 2/3. Cost = timing: it sits against the wall inside the squeeze zone, so you must take the pinch on the wall side and eat a pulse, or thread it between beats." },
{ "s": 1380, "type": "spawn", "enemy": "eosinophil_swarm", "count": 4, "spread": 60, "note": "TEST eosinophil: they were free room in beat 2; here there is no room." },
{ "s": 1520, "type": "checkpoint", "name": "Thoracic Esophagus" },
{ "s": 1560, "type": "pickup", "kind": "mucin_glob", "count": 2, "spread": 30 },
{ "s": 1600, "type": "pickup", "kind": "nutrient_orb", "count": 4, "spread": 60 },
{ "s": 1680, "type": "checkpoint", "name": "Thoracic Run" },
{ "s": 1700, "type": "hazard", "kind": "reflux_surge", "speed": 16, "from": -60, "span": 260, "warn": 3.0, "lethal": false, "neutralizable": true, "note": "TEACH reflux - the most important event in the level. A burp: 16 u/s against a 14 u/s current, so even a timid player at throttle 1.15 (16.1 u/s) escapes it. Touching it hurts and does not kill. When the real surge arrives at s=3000 the player already knows the verb." },
{ "s": 1900, "type": "spawn", "enemy": "bolus_chunk", "count": 3, "spread": 100 },
{ "s": 2000, "type": "checkpoint", "name": "Bronchial Narrowing" },
{ "s": 2060, "type": "spawn", "enemy": "candida_bloom", "count": 3, "theta": [0.2, 2.4, 4.6], "note": "Three arcs covered in the level's twistiest tube: each is a surprise on a blind bend. This is the beat that makes curviness a mechanic." },
{ "s": 2100, "type": "hazard", "kind": "ring_gate", "period": 3.6, "open": 2.4, "warn": 2.5, "note": "TEACH ring gate: open 2.4s of every 3.6s (67% open). At 16 u/s you clear it without thinking - which is the point. You will meet its evil twin at s=2800." },
{ "s": 2200, "type": "spawn", "enemy": "eosinophil_swarm", "count": 6, "spread": 80, "note": "Biggest swarm in the level." },
{ "s": 2280, "type": "checkpoint", "name": "Subcarinal" },
{ "s": 2300, "type": "pickup", "kind": "antacid_ammo", "count": 2, "spread": 20, "note": "Arms the player 700 units before the reflux finale. Antacid neutralises an acid zone (GDD) - fired BACKWARD it stalls the surge. The level hands you the tool, never explains it, and rewards you for noticing." },
{ "s": 2380, "type": "spawn", "enemy": "bolus_chunk", "count": 6, "spread": 140 },
{ "s": 2420, "type": "spawn", "enemy": "candida_bloom", "count": 2, "theta": [1.8, 5.1], "note": "Blooms + debris simultaneously: the level's densest sustained stretch." },
{ "s": 2540, "type": "pickup", "kind": "mucin_glob", "count": 1 },
{ "s": 2580, "type": "checkpoint", "name": "Diaphragmatic Hiatus" },
{ "s": 2700, "type": "spawn", "enemy": "bolus_chunk", "count": 4, "spread": 60, "note": "Debris jammed into the tightest tube in the level - spread 60 makes it a wall of traffic, not a sprinkle." },
{ "s": 2800, "type": "hazard", "kind": "ring_gate", "period": 3.0, "open": 1.2, "warn": 2.5, "note": "TEST ring gate: open 1.2s of every 3.0s (40% open), in a 6.5-unit tube. Same verb as s=2100, half the window. This is the level's skill check." },
{ "s": 2880, "type": "spawn", "enemy": "eosinophil_swarm", "count": 5, "spread": 60, "note": "They chase you THROUGH the gate: the gate closing behind you culls them - a free kill the observant player earns." },
{ "s": 2960, "type": "pickup", "kind": "mucin_glob", "count": 2, "spread": 20, "note": "Last top-up in the level. Take it or regret it for 600 units." },
{ "s": 2980, "type": "checkpoint", "name": "Cardia Approach", "note": "The finale's checkpoint. Sits 20 units before the surge trigger: a death in the chase costs you the chase, not the hiatus." },
{ "s": 3000, "type": "hazard", "kind": "reflux_surge", "speed": 21, "from": -40, "span": 600, "warn": 2.0, "lethal": true, "neutralizable": true, "note": "THE FINALE. Acid wall, 21 u/s, spawning 40 units behind you and chasing for 600 units. Flow here is 20, so throttle 1.05+ outruns it and throttle 0.6 (12 u/s) kills you: the level's last instruction is 'do not dawdle'. Par pace (~26 u/s) finishes ~5s clear. Antacid fired backward buys ~10s." },
{ "s": 3080, "type": "pickup", "kind": "antacid_ammo", "count": 1, "note": "On the racing line, mid-chase: the one pickup in the level you get for free at speed." },
{ "s": 3120, "type": "spawn", "enemy": "bolus_chunk", "count": 5, "spread": 200, "note": "Traffic, not enemies. They drift 3.5 u/s slower than the current, so at chase pace you close on them fast." },
{ "s": 3200, "type": "pickup", "kind": "biopsy_sample", "count": 1, "theta": 4.7124, "rho": 0.85, "note": "SAMPLE 3/3. Cost = the chase itself. Off the racing line by ~1.5s with an acid wall 5s behind you. The cruellest of the three and the only one that is a real decision at full speed." },
{ "s": 3320, "type": "spawn", "enemy": "eosinophil_swarm", "count": 4, "spread": 100 },
{ "s": 3440, "type": "spawn", "enemy": "candida_bloom", "count": 2, "theta": [2.0, 5.3], "note": "Last gauntlet, at maximum speed, with 160 units to react. Telegraph 0.7s = ~18 units of warning at 26 u/s: fair, barely." },
{ "s": 3580, "type": "gate", "id": "cardiac_sphincter", "to": "L3_stomach", "note": "The lower esophageal sphincter. You go through it; the acid does not." }
]
}