# OpenCretin — agent orientation

**You are pointed at the open radiative-transport + chemical-flame physics for the LightCell**, a
sodium-illuminant thermophotovoltaic emitter. This file is the front door. Read it, then open the
playable model, then the ledger. Everything here is referenced — nothing is asserted without a pointer.

## Start here (5 minutes)

1. **Open the playable model:** `web/EXPLORE.html` (serve the repo root: `cd <repo> && python3 -m http.server`,
   then visit `/web/EXPLORE.html`). Drag fuel power, secondary pressure, emissivity, geometry — the 2-D
   temperature field re-solves live. This is the real engine, not a cartoon.
2. **Read the IS / IS-NOT landmarks** (below, and on the page). They are the single most important thing
   to internalize before you touch the physics.
3. **Open the ledger:** `docs/coefficients.json` — every coefficient with its **primary source + DOI**,
   conditions, the thesis→antithesis→synthesis it survived, and an adversarial detective's verdict.

## What this IS

- A real **2-D (r,z)** sodium converter (`engine/src/na_grid2d.zig`, 44×60 grid): fuel core + secondary
  annulus across a **radiative vacuum gap** to cooled silicon, with **real envelope emissivity** ε.
- **Energy-balanced**: temperature is *solved* from the per-cell balance, not assumed.
- Occupancy is a **non-equilibrium steady state** (NESS): `S = j/κ`, never `B_λ`. Per-cell Na populations
  → Voigt opacity → Holstein trapping → 589/819 line emission → Stefan-Boltzmann gap loss.
- **Source-recovered and verified**: `na_grid2d.zig` was reconstructed from the shipped wasm and verified
  bit-for-bit (T field 1.16×10⁻⁶, all readout scalars 4.5×10⁻⁶). Every constant traces to primary lit.
- A **deeper Λ-iteration CRETIN-class solver** also lives here (`engine/`, `validation/`) — full
  collisional-radiative cell + formal RTE + Holstein trapping, with passing anti-Saha gates.

## What this is NOT (the landmarks that keep you honest)

- **NOT the fully-coupled ideal.** Axial chemistry + flow along the tube and a real spectral wall
  emissivity ε(λ,T) are *specified in `docs/DESIGN.md` (the B↔C↔A loop) but not yet wired into the kernel.*
  See `CAPABILITY-MATRIX.md` for exactly what runs vs what's spec-only.
- **NOT a fixed-ratio model.** A pinned 819/589 keystone ratio that rides 60 orders of magnitude is
  *laundered by construction* — R is condition-dependent (β-theorem). If you find a fixed R propagating
  across scales, that is a bug, not a result. (See `docs/DOCTRINE.md`.)
- **NOT the 1-D deck viz.** A lightweight `physics.js` explainer exists for the talk deck; its calibration
  anchor gives a *flat R across 12 orders of magnitude* — use it to build intuition, never as ground truth.
- The **secondary chamber + recuperator are boundary-modeled**, not co-solved. Transport is
  escape-factor + radiative-diffusion, not short-characteristics. Single converged fixed point, not
  time-resolved. The Na₂ NIR bands are the next physics brick.

## Build & run

```bash
# The recovered 2-D kernel (Zig 0.16; build-exe, NEVER build-lib — build-lib silently emits an archive):
zig build-exe engine/src/na_grid2d.zig -target wasm32-freestanding -O ReleaseFast -fno-entry -rdynamic -femit-bin=web/recovered/na_grid2d.wasm

# The deeper Λ-solver kernels + its gates:
cd engine && ./build.sh                       # builds cr/cascade/lines/geometry/transport/partition wasm
bun validation/test_r8_saha.mjs               # the anti-Saha gate — proves the float is NOT Boltzmann-in-disguise
bun validation/stage3.mjs                     # the Λ-iteration fixed point (g589 emerges, never set)
```

## Read-order for the physics

1. `web/EXPLORE.html` — the playable model (and its IS/IS-NOT box).
2. `docs/coefficients.json` — the coefficient ledger (primary source per number).
3. `docs/DOCTRINE.md` — the no-equilibrium-smuggling rules + the recovery instrument-lesson. **Binding.**
4. `docs/LITERATURE-CANON.md` — why these papers, the corrected open-vs-closed superradiance frame.
5. `docs/ASK-DETECTIVE.md` — the adversarial-verification protocol. Every load-bearing claim gets one.
6. `README.md` + `GOAL.md` — the 3-layer architecture and the contested research question.
7. `docs/DESIGN.md` + `CAPABILITY-MATRIX.md` — the unified-sim target and what's spec-only vs wired.

## Binding doctrine (the short version — full list in docs/DOCTRINE.md)

- **The source function is `S = j/κ` from the NESS occupancy. Never `B_λ`.** That collapse is forbidden.
- **Populations are the state; temperature is a readout** (here, solved from energy balance).
- **No equilibrium smuggling**: no Saha / law-of-mass-action via a "wall T"; no single excitation
  temperature; no detailed-balance reverse referencing actual (not equilibrium) concentrations; no scalar
  quench standing in for cooperative n² pooling; no imported rate used outside the regime it was measured in.
- **Brackets not points; scaling laws not numbers.** The deliverable is how R and η move across the ladder,
  anchored — not a single keystone ratio that rides every scale.
- **Verify by reproduction, not assertion.** Every rate is a flagged INPUT (measured / cited / assumed).
  A receipt after every concrete mutation. A prior agent's confident verdict is a *claim* until re-checked
  with the right instrument (this repo's flagship sim was wrongly declared "lost" by an agent reasoning
  from git history — in a shop that does not use git; see `docs/DOCTRINE.md`).
- **Archive, don't delete.** Move superseded files to a compost dir; never `rm` what you didn't create.
