Merge master (fire control) into codex/mining

Conflict in Zone.cs: kept master's TryGetShot, kept Cut 1's deletion of the BeltUpdates field.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-30 02:12:50 +02:00
commit fc90e93618
57 changed files with 12116 additions and 822 deletions

View file

@ -738,7 +738,8 @@ is ready to write the moment the mint path is.
## 9. Blockers, mechanism gaps, and operator forks
**F1 — Only one spare ship prefab exists, and two hulls are specified.**
**F1 — Resolved by the 2026-09-26 hull restore.** The following was the authoring baseline when this batch was
mapped. Both Longinus and Djinni prefabs are now referenced by live hull records in `GameData/Aetheria.cc`.
`ZoneRenderer.cs:295` instantiates `EngineAssets.Load<GameObject>(hullData.Prefab)` and calls
`GetComponent<ShipInstance>()`. A hull with no prefab GUID renders nothing and null-refs. The
project holds exactly two ship prefabs: `Assets/Content/Prefabs/Ships/Longinus.prefab` (used by

File diff suppressed because it is too large Load diff

940
docs/locomotion-cut.md Normal file
View file

@ -0,0 +1,940 @@
# Locomotion: Control Allocation and Capability-Aware AI
Date: 2026-09-22
Status: target and cut map, from an Imagination pass revised on 2026-09-22. Cut 1 (the Longinus and Djinni hulls,
five thruster designs, and tutorial entrance station rule) landed on `codex/locomotion-cut1` and was merged into
`codex/fire-control-12` at `e160bbe5` on 2026-09-26. Cuts 2 to 5 remain target work. The operator's Q1, Q2,
Q3 and Q5 rulings below still govern that work. **The cuts were renumbered by the 2026-09-22 revision**: the
content restore became Cut 1, and what the first committed version called Cuts 1 to 4 became Cuts 2 to 5.
Historical anchors below are against `origin/codex/item-provenance` at `cd846916`; the then-current working tree
on `codex/fire-control-10` (`e8fbb6a6`) had an identical tree for every file named below. The first half of this
document is the **target** (the ends). The second half is the **cut map** (the means). When the campaign closes,
split the target out as
`docs/locomotion-target.md` and keep this file as history.
Claims marked **(probe)** come from running code: scratch builds of `Aetheria.Shared` from `cd846916` against
CultLib `45c2f40`, run in the session scratchpad. That covers catalog dumps, a legacy-msgpack decode, base-commit
flight measurements and a solver comparison. None of the probe sources are kept. Each result below says what was
run. The base suite passes 244/244 in that scratch copy.
## Rulings
Operator, 2026-09-22:
- **Problem statement.** "We're gonna need much smarter locomotion AI if they're to survive getting a thruster
shot out. Longinus (non X) had one big thruster in the back and two attitude thrusters in the front. Losing an
attitude thruster means you can't rotate that way anymore. Losing a thruster on the Djinn usually means some form
of crab walking just became optimal. Naively trying to use a thruster that's been shot out makes them real easy
to cheese."
- **R1, two layers.** (1) **Control allocation owns which thrusters fire.** Each live actuator contributes a
body-frame wrench (Fx, Fy, τ) per unit throttle, with throttle in [0,1]. A bounded least-squares solve finds the
throttles for the desired wrench (Johansen & Fossen 2013 control-allocation survey). This replaces the rotation
buckets and the strafe torque compensation. Thrusters that are destroyed, unpowered, disabled or degraded drop
out of the matrix or scale down in it. (2) **The AI plans with the allocator's achievable set.** For a desired
Δv it scores candidate headings by achievable acceleration along Δv plus turn time in the directions the ship can
still rotate. Crab walking and the long way round emerge from that scoring; neither is special-cased.
- **R2, the same-inputs invariant.** "Player and AI are controlling the same ship with the same inputs, this is an
Aetheria invariant." The player's controls go through the same allocator, through the same input surface the AI
writes. Any second path that bypasses it is a forbidden writer.
- **R3.** A capability-aware **combat facing/tactics** layer is wanted as its own later cut. Example: a one-way
turner keeps its target drifting the way it can turn and leans on its turret arcs. This document maps it at
target-shape level only.
- **R4.** If CultMath lacks a bounded least-squares solver, CultMath gets one, as a CultLib cut. Aetheria does not
grow a local helper. CultMath has none (probe: `packages/cultmath/src/CultMath` at `45c2f40` holds vector types,
`math`, `BatchMath`, `Voronoi` and `Random`, with no linear solver of any kind).
Self, relaying an operator answer, 2026-09-22. This is the layer split, stated precisely:
- **Below the inputs**, shared by player and AI, is the ship's own controller plus the allocator. It turns toward
`LookDirection` and realises `MovementDirection` with whatever actuators are live. **Choosing a feasible turn
direction belongs here**, including the long way round when one rotation direction is dead. If it lived in the
AI planner, a player ship with a dead attitude thruster would still stick when looking toward its dead side.
Holding heading against torque coupling (strafing with an off-centre thruster) also belongs here.
- **Above the inputs**, AI only, is the heading planner. It decides what to write into
`LookDirection`/`MovementDirection`, for example to turn sideways and crab-walk. The player makes that choice by
hand.
- The long-way test therefore belongs to the shared-controller cut and drives `LookDirection` directly, as the
player would. The crab-walk test belongs to the planner cut.
Operator rulings on this map, 2026-09-22, relayed by Self:
- **Q1 = A, the divergence is accepted.** "The divergence is fine." A small divergence from base behaviour on
intact thruster ships is accepted: the Longinus's forward creep of about 10.7 m/s² while turning in place, and
the Djinn's roughly 9% faster strafe. Base is pinned exactly only where the old mixer and the allocator agree,
and the accepted divergences are named with their measured magnitudes in Cut 3's verification, so Soul can tell
an accepted divergence from a regression. **No per-thruster role rules are reintroduced to match base.**
- **Q2 = B, differential main thrust is allowed.** "That's absolutely viable and can be a better decision than
turning around the long way, I wouldn't introduce a thruster exclusion for this." Any live actuator's torque may
be spent on rotation, mains included. A damaged ship turning toward its dead side lurches forward, and the
planner may prefer that to the long way round when it is faster.
- **Q3, fixtures follow the data.** "Good catch on the Longinus main thrusters, I was misremembering." Two aft 2×2
mains, as both legacy catalogs author them.
- **Restore the legacy thruster hulls.** Asked whether the lost layouts could come back: "can we restore these
layouts?" They become Cut 1, the campaign's first cut, ahead of the solver.
Second round, same day:
- **Cut 1 is approved as inventoried, optional gear included.** "Yes and yes": the Longinus and Djinni hulls,
Medium Drive, and Small Drive, Victoire, Talaria and RevvITup 2.0 as well.
- **The second hull behaviour is not `VelocityConversion`.** "I don't think VelocityConversion was on either
hull." The decode agrees: it is `VelocityLimitData`. See Cut 1.
- **Q5 is dissolved, not answered: the rotation demand is not sized at all.** "It should only do that if the
ship's controller also *wants* to accelerate forwards that much, but I'm not sure how to encode that while
allowing the lurch. Like, lurch burn to compensate for a missing attitude thruster is also only a good move when
you both need to turn a bit and don't mind being all the way over there after. It doesn't help when, say,
there's a guy to port and your aft thruster is out, because you'd just end up turning in a great big circle
without changing your bearing at all." On the shape that replaced it: "Yeah, that's better."
- **Cut 3** now runs one weighted least-squares solve over the whole desired wrench (Fx, Fy, yaw) at once,
under throttle bounds. No separate rotation demand, no `TorqueFloor`-sized demand, no piecewise fall-back, and
no branch anywhere on whether a ship can turn a given way. The weights are the design knob, and both error
terms share a currency because each axis is normalized by what that ship can actually achieve on it.
- **Cut 4** chooses manoeuvres by predicted outcome over a short horizon, simulating each candidate, never by a
rule. The operator's case above is its test.
---
# Part I: Target
## Objective
A ship that loses actuators keeps flying as well as its remaining actuators allow, whether a player or an AI is
flying it. The AI picks headings and thrust directions from what the ship can still do, so shooting out a thruster
creates a real handicap and not an exploit.
## Invariants
1. **Same inputs.** A ship is commanded only through `Ship.MovementDirection` (body frame, each component a
fraction of the ship's capacity along that half-axis) and `Entity.LookDirection` (world-frame heading command;
the controller reads only its `xz`). The player writes both (`Gameplay/ActionGameManager.cs:1254`, `:1263`). The
AI writes the same two fields. Nothing else commands a ship's actuators. Identical inputs to identical ships give
identical actuator throttles, whoever wrote them.
2. **One owner for actuator commands.** The ship controller (new, `ShipControl`, below) is the only writer of
`Thruster` and `AetherDrive` throttles. `Ship.cs`'s mixer, its rotation buckets and its strafe compensation stop
existing, and do not survive as a mode or a fallback.
3. **The allocator reads live actuator state every tick.** An actuator's column is derived each tick from its live
stats and liveness: `EquippedItem.Active` (enabled, thermally online, durability online), a power grant above the
same epsilon `Thruster.Execute` uses, and the current resolved `Thrust` (or the drive's own stats) with its
durability, heat and power curves applied. No bucket, cache or event-pruned set decides whether an actuator
counts. A repaired or re-powered actuator rejoins by the same read that dropped it.
4. **Manual and programmatic inputs share one commit path.** A player keypress, an AI state write, and any future
scripted or network input all land in the same two fields, and they reach the actuators by the same
`ShipControl` step inside `Ship.Update`. No input source writes `Thruster.Axis`, `AetherDrive.Axis` or
`Entity.Direction` directly.
5. **Heading changes only through actuators.** `Entity.Direction` is written by actuator execution
(`Thruster.Execute`, `AetherDrive.Execute`), by wormhole scripting (`Ship.ExitWormhole`), by spawn placement
(`ActionGameManager.cs:848`) and by save unpack (`EntitySerializer.cs:66`). The controller does not write it.
Today's snap-to-look lerp (`Ship.cs:280-284`) is a free, thrusterless rotation, and it goes.
6. **Kinematic rotation is retained.** Rotation stays kinematic: yaw rate is proportional to live throttle
(`Thruster.cs:106-107`, `AetherDrive.cs:154-155`), with no angular momentum. Nothing found here argues for
raising it. It keeps turn time exact (angle divided by rate), which is what lets the planner compare a long
way round against a slow lurching turn without simulating either.
7. **A dead actuator never receives throttle.** A destroyed, disabled or unpowered actuator gets zero throttle,
not a saturated request it cannot honour.
8. **Capability is one model.** What a ship can do is computed in one place (`ShipControl`), from the same live
column matrix the allocator solves with: the achievable extremes, the turn-direction comparison, and the solve
itself. The AI reads those and predicts with the controller's own step; it never keeps a private estimate of
what the ship can do, and never branches on which actuators are missing.
## Canonical implementations
- **Solver:** CultMath (`F:\Projects\CultLib\packages\cultmath`), a box-constrained linear least-squares solver,
added by Cut 2. It is the only numerical authority. Aetheria composes the problem and calls it.
- **Allocation reference:** T. A. Johansen and T. I. Fossen, "Control allocation: A survey," *Automatica* 49(5),
2013. Its weighted-least-squares form with priorities is what `ShipControl` states. The active-set method follows
O. Härkegård, "Efficient active set algorithms for solving constrained least squares problems in aircraft control
allocation," CDC 2002, which is bounded-variable least squares in Stark and Parker's sense.
## Out of scope
- **Fire-control Cut 12** (edge-on hit placement in `FireControl.cs`, `Entity.ApplyHit`, `DamageSchematic`) is
being mapped concurrently by another Imagination pass. Cuts 2 to 4 here touch none of those files. The allocator
is a read-only downstream consumer of item destruction (`ItemDamage`, `Entity.cs:488`). **Overlap:** Cut 5 (combat
facing) will rewrite `Agents/States/Combat.cs:88-127`, and presenting armour edge-on is exactly what Cut 12's hit
placement rewards. Cut 5 must be mapped after Cut 12 lands. Cut 1 restores catalog content, and the only file it
and Cut 12 could both touch is `GameData/Aetheria.cc`; Cut 1 must not be in flight while another cut writes the
catalog.
- **The old AetheriaEve/CultMesh/daemon rebuild** is taxidermy. It is not precedent and not a consumer.
- Thruster geometry (the normalized moment-arm `Thruster.Torque`, `Thruster.cs:64-69`, which ignores lever length
and uses unweighted shape cells for centre of mass) is the game's model and stays as authored. Arrival braking in
`MoveToState`, docking approach and formation flight are also out.
## Not consumers
- `Assets/Scripts/Gameplay/*` presentation (`ShipInstance` particles, audio parameters) reads throttles and never
writes them.
- `TurretController` writes `Entity.LookDirection` for turret entities. That is the AI above the inputs for a
non-ship, and it does not drive ship actuators. See the audit.
## 0b: identity, lifecycle, authority
Nothing persistent changes. Actuator wrench columns, capacities, the chosen turn direction and planner state are
runtime-derived per tick, or per planner cadence, and are never saved.
| Kind | Named by | Lifecycle | Decides |
|---|---|---|---|
| Actuator column (runtime) | the `Thruster`/`AetherDrive` behaviour instance on an `EquippedItem` | rebuilt every tick from live stats; appears and disappears with liveness | `ShipControl` derives; item state (durability, heat, power, `Enabled`) is owned by `EquippedItem`/`PowerBus` as today |
| `MovementDirection`, `LookDirection` (runtime) | fields on `Ship`/`Entity` | overwritten each frame by whoever flies the ship | player (`ActionGameManager`) or AI (`Agent` layer), never both on one ship (`Zone.cs:111` gives agents only to `!IsPlayerShip`) |
| Committed turn direction, planner plan (runtime) | fields on `ShipControl` / `Agent` | reset on wormhole, dock, spawn | `ShipControl` / `Agent` |
| `ThrusterData`, `AetherDriveData`, `HullData.Hardpoints/Shape` (persisted, catalog) | catalog record key | authored | unchanged; read only |
| `GameplaySettings.TorqueMultiplier`, `AetherTorqueMultiplier` (authored, `Settings.cs:206-207`; values in `Assets/Resources/Settings.asset`: 0.1, 0.1) | field name | authored | unchanged. `TorqueFloor` (`:205`, authored 0.5) loses its last consumer in Cut 3 and is deleted with its authored value |
This campaign adds no authored **field**. Cut 1 adds authored **records** (hulls, thruster designs and their
products) to `GameData/Aetheria.cc` using the schema as it stands. If Hands finds it needs a tunable, that is an
operator question, and any new field on a persisted CultCache document must be nullable (MessagePack nil rule).
---
# Part II: Body map (what the probes established)
## The mixer today
`Ship.Update` (`Ship.cs:251-292`) runs before `base.Update` executes behaviours. The agents' writes come earlier
still, because `Zone.cs:170-173` updates agents before entities. The steps:
1. `RecalculateThrust` (`Ship.cs:147-247`) sums per-bucket thrust over thrusters whose item is `Active`.
2. It zeroes every thruster's `Axis` (`:256`).
3. Strafe: the right and left buckets get `±MovementDirection.x`, minus a torque compensation for the thrusters
whose torque sign matches the bucket total (`:257-274`).
4. Forward and reverse buckets add `±MovementDirection.y` (`:275-276`).
5. Rotation: `deltaRot = sqrt(|dot(look, right)|)·sign` (`:278-285`) is added to the clockwise bucket and subtracted
from the counter-clockwise bucket (`:287-288`).
6. `AetherDrive.Axis = (MovementDirection.y, MovementDirection.x, deltaRot)` (`:291`). There is no allocation for
drives at all.
Buckets are built once in `Activate` from mount rotation and from `Thruster.Torque` against
`TorqueFloor` (`:102-118`). `RemoveThruster` prunes them permanently on `ItemDestroyed` (`:123`, `:133-143`).
`Thruster.Axis` saturates to [0,1] (`Thruster.cs:45-49`). `Execute` (`:94-115`) applies `Velocity -= facing·input·
Thrust/Mass·dt`, then rotates `Direction` kinematically by `input·Torque·Thrust·TorqueMultiplier/Mass·dt`. Its gate
is `input > .01 && PowerSupply > 1e-4`.
## Findings (probe)
Fixtures here are built from the legacy catalog (next section): hull shape, hardpoints, thruster items with
constant `Thrust` (Large Drive 250000, Medium Drive 200000; mass 100 each), `TorqueFloor` 0.5, `TorqueMultiplier`
0.1. Each ship sits at (37, −12) facing `normalize(0.8, 0.6)`, runs 3 warm-up ticks, is reset, and is measured over
one tick at dt 0.02. Body-frame acceleration is (r, f) in m/s². Heading rate is compass degrees per second,
clockwise positive.
**Torque factors** (`Thruster.Torque`, the sine of the moment arm): Longinus mains ±0.159 (below the floor, so
never used for rotation), attitude thrusters ±0.998. Djinni stern 0 / ±0.161, laterals ±0.727 (aft) and ±0.867
(fore), bow 0.
**Base flight table** (`cd846916`, after warm-up). These are the Cut 3 pins:
| Input | Longinus (r, f, °/s) | Djinni (r, f, °/s) |
|---|---|---|
| forward `(0,1)` | 2.37, 172.38, 0 | 0.11, 55.56, 0 |
| reverse `(0,−1)` | 0, 0, 0 | 0, −18.52, 0 |
| strafe right `(1,0)` | 0, 0, 0 (compensation zeroes the lone attitude thruster) | 34.03, 0.42, 0 (axes 1.00 / 0.84) |
| strafe left `(−1,0)` | 0, 0, 0 | −34.03, 0.42, 0 |
| look 90° right | 68.97, 0, +394.33 | 0.01, 0.59, +169.13 |
| look 90° left | −68.97, 0, −394.33 | 0.01, −0.50, −169.13 |
| look 30° right | 48.77, 0, +278.84 | 0, 0.30, +119.59 |
| look directly behind | 0, 0, 0, **and `|Direction|` falls to 0.96** | same |
| forward+strafe `(.707,.707)` | 1.18, 121.89, 0 | 24.12, 39.49, 0 |
The small cross terms (2.37, 0.42) are real. `Execute` rotates `Direction` thruster by thruster within one tick, so
later thrusters push along an already-rotated nose. The allocator cannot see this, so pins need a tolerance for it.
**Defects the table exposes:**
- **Dead-side stick.** On a Longinus with `Th.CCW` destroyed, looking 90° left gives a heading error of 90.0°
after 30 s. It never turns. Looking right, it reaches within 2° in 0.32 s, the same as intact.
- **Main-thruster cheese.** On a Djinni with all three stern thrusters destroyed, `Agent` plus `MoveToState` toward
a point 300 m to port leaves the ship at speed 0 after 120 s. `Agent.Accelerate` points at Δv and burns forward
thrusters only (`Agent.cs:64-68`), and it never reaches the strafe branch. Intact, the same run arrives in
4.34 s. With only Stern 2 lost it arrives in 4.98 s; with only Port Aft lost, 4.40 s.
- **Snap-to-look.** Inside `|sin error| < .01`, `Ship.cs:283` lerps `Direction` toward the look vector, which is a
rotation no thruster pays for. When the look is directly behind, the lerp goes through the origin and shrinks
`|Direction|`, and thruster force scales with that length (`Thruster.cs:105` uses the unnormalized item
direction). Base also turns *slower* as error passes 90°: `deltaRot` follows `sin`, so it is zero at 180°.
- **First tick.** Items are not yet `Active` on the first `Update` after `Activate`, so the first-tick strafe
compensation divides by a zero count (NaN, unused) and the strafe fires uncompensated.
- **`TurnTime` is wrong and unused.** `Ship.cs:61-66` divides angle by the sum of torque *factors* over mass, which
is unitless nonsense: 261535 s for a Longinus 90° turn. It has no consumer.
- **Permanent pruning.** `RemoveThruster` never restores a thruster whose durability comes back, and `Recalculate*`
reads `Active` while the mixer still commands inactive thrusters.
- **The live catalog's only ship flies on a drive.** `GameData/Aetheria.cc` holds one ship hull, **LonginusX**
(mass 2500, drag 0.1, 6×17), with an `AetherDrive` hardpoint and **no `Thruster` hardpoint**. It moves on
"Traction" (rotor mass (30,20,5), λ (0.5,1,1), MaxRpm 40000..80000). Two thruster designs exist ("deep space
burnout", "Large Drive"), but no live ship can mount them (`docs/content-batch-one.md` §1 says the same).
**AetherDrive is therefore the load-bearing actuator for the player today**, and the allocator must reproduce its
base behaviour exactly. Cut 1 restores the thruster hulls, which is what makes any play check on a thruster ship
possible at all.
- **Existing tests sit on an off-centre thruster.** `BrownoutTests`/`ConditionRatioTests` equip a one-cell thruster
by `TryFindSpace` onto a 5×5 hull. It lands at (1,1) with `Torque` −0.707, and `MovementDirection (0,−1)` fires it
while it spins the ship. Under an allocator that holds heading, a lone off-centre thruster cannot fire without
rotating, so those fixtures must be re-seated (Cut 3).
## Legacy hull layouts (probe)
The live catalog is the post-breach minimal rebuild, so absence there proves nothing. The layouts come from the
git-LFS objects of `GameData/Legacy/AetherDB.2021-03-05.msgpack` (`142998fd…`) and `AetherDB.2021-04-14.msgpack`
(`21ce7bd2…`), both present in `.git/lfs/objects`, decoded with MessagePack `ConvertToJson`. Shape cells are
`bool[w,h]`, flattened as `x*h + y`, with y = 0 at the stern.
**Longinus** (2021-04-14: mass 2500, drag 0.1, 6×17; the 2021-03-05 copy has mass 5000). The shape matches the
live LonginusX's. Rows from y = 0: `.####.` ×4, `######` ×5, `.####.` ×2, `..##..` ×6.
| Hardpoint | Pos | Shape | Rotation |
|---|---|---|---|
| Th.L | (1,0) | 2×2 | Reversed (pushes forward) |
| Th.R | (3,0) | 2×2 | Reversed |
| Th.CW | (2,14) | 1×2 | CounterClockwise (pushes starboard, nose right) |
| Th.CCW | (3,14) | 1×2 | Clockwise (pushes port, nose left) |
**The data has two aft 2×2 thrusters, not one.** The operator remembered "one big thruster" and ruled on it,
2026-09-22: "Good catch on the Longinus main thrusters, I was misremembering." Fixtures follow the data.
**Djinni** (mass 10000, drag 0.2, 14×17). Rows from y = 0: `....######....`, `...########...`,
`..##########..`, `.############.` ×2, `##############` ×5, `.############.`, `...########...` ×3,
`....######....`, `.....####.....`, `......##......`.
| Hardpoint | Pos | Shape | Rotation |
|---|---|---|---|
| Stern 1 | (6,0) | 2×1 | Reversed |
| Stern 2 | (5,1) | 2×1 | Reversed |
| Stern 3 | (7,1) | 2×1 | Reversed |
| Port Aft | (4,4) | 1×2 | CounterClockwise |
| Port Fore | (4,11) | 1×2 | CounterClockwise |
| Starboard Aft | (9,4) | 1×2 | Clockwise |
| Starboard Fore | (9,11) | 1×2 | Clockwise |
| Bow | (6,14) | 2×1 | None (pushes aft) |
Legacy thruster items used for the fixtures: Large Drive 2×2, 250000 thrust, mass 100. Medium Drive 2×1, thrust
100000..300000 (fixtures use a constant 200000), mass 100. Small Drive 1×1, 75000.
## Solver choice (probe)
The comparison ran on the fixtures' own normalized columns, plus a 16-column doubled Djinni: 2000 random wrench
demands each, cost measured against a 20000-iteration projected-gradient reference, double precision,
allocation-heavy scratch C#, Release build.
| Method | Worst excess cost | Suboptimal cases | Mean time |
|---|---|---|---|
| Primal active set (bounded-variable LS, Härkegård WLS form) | ≤ 7e-15 | 0 in every case | 1.8–9.5 µs (n 3–8), 32–38 µs (n 15–16); ≤ 30 iterations cold |
| Redistributed pseudo-inverse | up to 4e3 | 270–1564 of 2000 (n ≤ 8) | about half the active set's time |
**Pick the active set.** It is exact, its cold-start cost is bounded, and it warm-starts from last tick's solution.
The redistributed pseudo-inverse saves about half the time and is wrong in up to 78% of cases on these very
matrices. A production float implementation without allocations will be faster than the scratch numbers.
## Consumer audit
`cd846916`, every `*.cs` outside `Assets/Plugins`. "Dies" means deleted, not deprecated.
| Surface | Readers / writers | Fate |
|---|---|---|
| `Ship.MovementDirection` (`Ship.cs:27`) | W: `ActionGameManager.cs:1263` (player), `Agent.cs:67,73,77` (AI); tests `BrownoutTests.cs:143,402`, `ConditionRatioTests.cs:184,193,243,258`. R: `Ship.cs:261-291` | **Survives** as the translation input. Its meaning is defined by `ShipControl` (fraction of capacity per half-axis) |
| `Entity.LookDirection` (`Entity.cs:55`) | W: `ActionGameManager.cs:1254` (player), `Agent.cs:66`, `MoveTo.cs:26`, `Combat.cs:126`, `TurretController.cs:72,75` (turret entities; no `EntityTypeRestriction`, `TurretController.cs:14-15`). R (as heading): `Ship.cs:278`. R (as aim): `LockWeapon.cs:94`, `GuidedProjectileManager.cs:56`, `EntityInstance.cs:404`, `ShipInstance.cs:117` (tractor), `ZoneRenderer.cs:432`, `ActionGameManager.cs:376` (reticle target pick) | **Survives** as heading command *and* aim. `MoveTo.cs:26` dies in Cut 4 (a double writer: `Accelerate` overwrites it when Δv > 20). The heading/aim conflation is Cut 5's question (Q4) |
| `Thruster.Axis` (`Thruster.cs:45-49`) | W: `Ship.cs:256-288` only. R: `ShipInstance.cs:139` (particles), `Thruster.cs:88` (power request), `:96` (audio), `:102-111` | Getter **survives**. The public setter **dies**; only `ShipControl` commands throttle |
| `AetherDrive.Axis` (`AetherDrive.cs:81-85`) | W: `Ship.cs:291` only. R: drive internals, audio `:170` | Same as `Thruster.Axis` |
| `IAnalogBehavior` (`Behaviors.cs:96-99`) | implemented by `Thruster.cs:40`; consumer only a comment, `Entity.cs:2007` | **Dies** (Cut 3 deletes first) |
| Bucket sets `_forward/_reverse/_right/_left/_clockwise/_counterClockwiseThrusters`, `_thrusterItems`, `_aetherDrives`, `_aetherDriveItems` (`Ship.cs:30-39`) | `Ship.cs` only | **Die** |
| `ForwardThrust`, `ReverseThrust`, `LeftStrafeThrust`, `RightStrafeThrust`, `ClockwiseTorque`, `CounterClockwiseTorque`, `Left/RightStrafeTotalTorque`, `Left/RightStrafeTorqueThrusters` (`Ship.cs:50-59`) | written by `RecalculateThrust`, read by the mixer; **no reader outside `Ship.cs`** (grep, including Unity side and tests) | **Die** |
| `Ship.TurnTime` (`Ship.cs:61-66`) | no consumer | **Dies**; replaced by `ShipControl.TurnTime` (Cut 3), consumed in Cut 4 |
| `RemoveThruster`, `RemoveAetherDrive`, their `ItemDestroyed` subscriptions (`Ship.cs:123-143`) | internal | **Die**; liveness is read live (invariant 3) |
| `Agent.Accelerate` (`Agent.cs:58-79`), `FORWARD_DELTA_THRESHOLD`/`THRUST_DELTA_THRESHOLD` (`:16-17`) | called by `MoveTo.cs:27`, `Combat.cs:127` | **Rewritten** in Cut 4 (planner). Signature kept |
| `Agent.TopSpeed` (`Agent.cs:26`) | `MoveTo.cs:25`, `Combat.cs:127`. No live catalog item carries `VelocityLimit` or `VelocityConversion` (probe), so it is 100 everywhere | Survives |
| `GameplaySettings.TorqueFloor` (`Settings.cs:205`) | `Ship.cs:115,118` only | **Dies** in Cut 3. The full-wrench solve has no threshold to apply it to, and nothing else reads it |
| `TorqueMultiplier`, `AetherTorqueMultiplier` | `Thruster.cs:107`, `AetherDrive.cs:155` | Survive; also enter the yaw-rate row of each column |
| `Entity.Direction` writers | `Thruster.cs:106`, `AetherDrive.cs:154`, `Ship.cs:79` (wormhole), `Ship.cs:283` (snap), `ActionGameManager.cs:848` (spawn), `EntitySerializer.cs:66` | `Ship.cs:283` **dies** (invariant 5); the others survive |
| `Entity.Velocity` external writers | `HullCollider.cs:15` (collision impulse), `ShieldManager.cs:79` (bounce), `VelocityConversion.cs:41`, `VelocityLimit.cs:48` | Not control; these are external forces and constraints. Untouched |
| Undock capability check (`ActionGameManager.cs:913`) | `GetBehavior<Thruster/AetherDrive>() == null` | Survives. It could later read the capability model; not this campaign |
| Mining, Survey, HaulingTask, StationTowing (`Agents/Tasks/*.cs`) | data-only task classes; no movement code (grep) | Not consumers. `PatrolOrbitsState` drives `MoveToOrbitState`, which Cut 4 covers |
| Player input path | `Input.Player.Look` → `_entityYawPitch` → `LookDirection` (`:1250-1254`); `Input.Player.Move` → `MovementDirection` (`:1261-1264`). No other action writes motion (grep of `Input.Player.*`: targeting, heat, shield, stance, tractor, ping, UI) | **Already on the shared surface**. The only bypasses are the ones `Ship.cs` itself holds (the snap, direct `Axis` writes), and both die in Cut 3 |
Out-of-scope note: the working tree has an uncommitted change to `Assets/Scripts/AetheriaInput.cs` (a "Cycle Target
Item" action). That is fire-control work, and it does not touch motion.
---
# Part III: Cut map
## Status header
Status: cut map. Ends are owned by Part I above; this section owns the means.
Cut 1 landed and is merged into `codex/fire-control-12` at `e160bbe5`. Cuts 2 to 5 have not landed.
Rulings (operator, 2026-09-22): **Q1 A** ("The divergence is fine"), **Q2 B** ("that's absolutely viable and can
be a better decision than turning around the long way, I wouldn't introduce a thruster exclusion for this"), **Q3**
fixtures follow the data ("Good catch on the Longinus main thrusters, I was misremembering"), and Cut 1 exists
because of "can we restore these layouts?". The Q2 text below is marked as history; the live design is in Cut 3.
Second-round rulings (operator, 2026-09-22): Cut 1 approved as inventoried, optional gear included ("Yes and
yes"); the second hull behaviour is not `VelocityConversion` ("I don't think VelocityConversion was on either
hull") and the decode names it `VelocityLimitData`; **Q5 is dissolved** by the full-wrench solve ("Yeah, that's
better"), so the Q5 text below and every "sized demand" design it belonged to are history.
Open: **Q4** (heading versus aim) blocks only Cut 5. **Q6** (the one weight in Cut 3's solve) does not block
Hands, who starts at the recommended default; the operator settles it by feel in the Cut 1 play check.
**Tutorial station (operator, 2026-09-25):** "What we're testing is going to be the tutorial level, right? Let's drop a station in there." The live catalog already has a station hull: Zenith, sold by Aeronautics Unlimited. The story-station path is dead because `StoryProcessor` has been commented out at `Galaxy.cs:242` since `ce1a0a46` (2021). Ruled: **faction station now**. The tutorial's entrance zone (`Galaxy.Entrance`) always gets a generated faction station with a docking bay. That is deterministic, not merely likely, and the test pins it on the real tutorial construction path. Reviving the Ink story stations belongs to a later narrative campaign, which must first find out why they were switched off.
Legacy hazard, recorded 2026-09-26 (Soul, Cut 1 fix batch 2): `VelocityLimit` is a hull behaviour gated by the hull's `Active` (`Entity.cs:1624`, `:1636`, `VelocityLimit.cs:45-49`). Thrusters are items with their own gating. Any path that takes the hull offline while the thrusters keep firing removes the cap. Under frozen fixture physics, with the player's override on the thrusters, speed reached 1237. On the shipped settings the hull did not go offline in 300 s. The behaviour dates from 2020-04 and 2021-03. Cut 3 and Cut 4 measure arrival times under this cap, so they must not assume it always holds.
Follow-ups outside this campaign:
- `TurretController` has no `EntityTypeRestriction`, so equipping it on a ship would create a third
`LookDirection` writer racing the player or agent. Restrict it to non-ship hulls when turret work next opens
(`TurretController.cs:14`).
- `Thruster.Execute` applies rotation per thruster inside the tick, which couples later thrusters' force to earlier
thrusters' rotation. It is a small artefact, and it is `Thruster.cs`'s to fix, not the allocator's.
- `AetherDrive.Execute` logs "FUCK FUCK FUCK FUCK" on NaN velocity (`AetherDrive.cs:157-158`), a leftover probe.
## Cut 1. Restore the legacy thruster ship hulls to the live catalog
A pure content cut, separable from every code cut, so Soul can falsify it on its own. Operator, 2026-09-22: "can
we restore these layouts?", and on the inventory below, optional gear included: "Yes and yes". **The list is
approved**; what is left for review is anything Hands finds that this map did not name.
- **Repo/branch:** Aetheria, implemented on `codex/locomotion-cut1` and merged into `codex/fire-control-12` at
`e160bbe5`. The restored hulls are now the real fixtures for Cuts 3 and 4. The catalog mutation is complete.
- **Standing rule** (memory: `aetheria-content-audits-pre-breach`): `GameData/Aetheria.cc` is the post-breach
bare-minimum rebuild, so absence there is not evidence of absence, and **the operator's word is the authority**
on what the pre-breach content was. The list below is therefore an **operator review item before Hands writes
anything into the catalog**.
### What the legacy record actually holds (probe)
Sources, all decoded in the scratchpad: the git-LFS objects behind `GameData/Legacy/AetherDB.2021-04-14.msgpack`
(`21ce7bd2…`, 76 KB) and `AetherDB.2021-03-05.msgpack` (`142998fd…`, 59 KB), and the last
`GameData/AetherDB.msgpack` before the Cut 9 import (`8963a686…`, 46 KB, the commit's own parent at `70fbaca1^`).
All three are present in `.git/lfs/objects`; nothing had to be fetched.
The comparison explains the loss. The 2021-04-14 record carries 5 ship-class hulls and 45 gear designs. The import
source carries 3 hulls (LonginusX, Zenith, Turret) and 25 gear. **Longinus, Djinni and every thruster below the
2×2 class were already gone from the file Cut 9 imported**, which is why the live catalog has no thruster ship.
**Recoverable in full from 2021-04-14** (name, shape, mass, price, hardpoint list with position, shape, rotation
and armour, behaviours, temperature band, manufacturer, prefab and schematic paths):
| Record | Kind | Legacy detail | Notes |
|---|---|---|---|
| **Longinus** | ship hull | 6×17, mass 2500, drag 0.1, price 7,500,000, maker Alakrita | The shape is byte-identical to the live LonginusX's. 4 thruster hardpoints (`Th.L`/`Th.R` 2×2 aft, `Th.CW`/`Th.CCW` 1×2 in the nose) plus control module, 2 energy, 2 launcher, 2 radiator, reactor, sensors |
| **Djinni** | ship hull | 14×17, mass 10000, drag 0.2, price 10,000,000, maker Rossum & Douglas | 8 thruster hardpoints (3 stern, 4 lateral, 1 bow) plus 4 launcher, 2 ballistic, reactor, control module, 4 radiator, sensors, and a shield hardpoint |
| **Medium Drive** | thruster gear | 2×1, mass 100, thrust 100000..300000, price 50,000, no maker | **The one item both restored hulls need.** Fits the 2×1 stern/bow hardpoints and, rotated, the 1×2 lateral and nose ones |
| **Small Drive** | thruster gear | 1×1, mass 50, thrust 75000, price 25,000, no maker | Optional; the cheap end of the line |
| **Victoire** | thruster gear | 2×1, mass 25, thrust 200000..1500000, maker Alakrita | Optional; the racing thruster, and a natural Longinus fit |
| **Talaria** | thruster gear | 2×1, mass 150, thrust 75000..250000, maker Aeronautics Unlimited | Optional |
| **RevvITup 2.0** | thruster gear | 2×2, mass 150, thrust 250000..1000000, maker NiteLife Energy | Optional; a second 2×2 beside the two the catalog already ships |
Everything those records depend on is **already in the live catalog**: all 12 factions (Alakrita and Rossum &
Douglas included), both existing 2×2 thrusters, and the Unity presentation. The prefabs still carry the hardpoint
transforms by their legacy names — `Th.L`, `Th.R`, `Th.CW`, `Th.CCW` in `Assets/Content/Prefabs/Ships/
Longinus.prefab` (GUID `4a3db609…`, already the hull the live LonginusX points at) and `Thruster Stern 1..3`,
`Thruster Port/Starboard Fore/Aft` and `Thruster Bow` in `Djinni.prefab` (GUID `79024f63…`). The schematics exist
too (`schema_Longinus.png` `51702555…`, already referenced; `djinni_schematic_transparent.png` `66f3acdd…`, unused
today). So no art, no prefab work and no faction work is needed.
**Not recoverable, because it post-dates the breach and has to be authored:**
- `HardpointData.FiringArc` (Key 6) for the Djinni's weapon hardpoints. The legacy hardpoint record stops at
armour. 0 means "use `GameplaySettings.FiringArc`"; the `firing-arc-migrate` command in `tools/AetherDb` is the
precedent for deriving one from mount rotation.
- `ItemRole` lists on the restored designs, and `ProductRole` qualities on their products.
`RoleAuthoringTests` refuses a stat naming a role its design lacks, and `docs/content-batch-one.md` fixes the
nomenclature (`injector`/`nozzle` for thrusters, `plating` for hulls). The live "deep space burnout" carries
`injector, nozzle`; "Large Drive" carries none.
- A `FactionProductData` per restored design. `LoadoutGenerator` picks products, not designs, so a design without
one exists but is never generated or sold. The catalog holds 47 products today.
- Any `PowerSupply` term on the restored thrusters' stats (the stats-and-power cut's brownout curve). The shipped
thrusters request zero energy, so matching them is the safe default and is a content decision.
- Provenance is runtime, not authored: `ItemManager` mints the `Lot` (`docs/item-provenance-target.md`).
**The second hull behaviour, identified** (probe; the operator was right that it is not `VelocityConversion`).
Both legacy hulls carry a behaviour LonginusX does not, union tag 11 in the legacy record. The union table is in
`Assets/Scripts/ServerShared/Behaviors/Behaviors.cs` at the legacy-project commit `7006a6b0` and unchanged at
`b4c06b50`: **tag 11 is `VelocityLimitData`**; `VelocityConversionData` is tag 10, and it is on neither hull. The
table cross-checks against the live catalog on every record that survived: tag 6 `ReflectorData` (live LonginusX
has exactly that and nothing else), 8 `ThrusterData` and 9 `WearData` ("deep space burnout" carries both), 3
`RadiatorData` (Arctica), 7 `ShieldData` (legacy "Shield"), 31 `CapacitorData` (legacy "Capacitor").
The payload is a single `PerformanceStat` in `Key(1)`, `VelocityLimitData.TopSpeed`, authored `50..50` with the
legacy exponents `1, 0, 1.5` on both hulls. (Corrected 2026-09-26: the decode behind the restore gives Longinus
`100..100` with exponents `1, 0, 0` and Djinni `50..50` with `1, 0, 1.5`. The catalog carries those values.) So **both restored hulls are capped**, where a hull
without the behaviour leaves `Agent.TopSpeed` at its 100 default (`Agent.cs:26`) and leaves the player uncapped.
`VelocityLimit.Execute` clamps `Entity.Velocity` (`VelocityLimit.cs:48`), so this is a real handling difference on
the restored hulls and Cut 4's arrival times are measured with it.
**The legacy stat shape differs from today's.** A legacy `PerformanceStat` is
`[Min, Max, HeatExponentMultiplier, DurabilityExponentMultiplier, QualityExponent]`; today it is `Min`, `Max` and
a `Terms` list of `StatTerm` (`ItemData.cs:632-643`, keys 2 to 4 retired). Every restored stat has to be
translated, not copied. `docs/stats-power-cut1-migration.md` is the precedent for that mapping and the authority
on what each legacy exponent becomes.
### The cut
- **Deletes first:** nothing. This is content restoration.
- **Adds:** the two hull records and all five thruster designs (`Medium Drive`, `Small Drive`, `Victoire`,
`Talaria`, `RevvITup 2.0`), approved 2026-09-22; a `FactionProductData` for each; roles for each; firing arcs on
the Djinni's weapon hardpoints; each hull's `VelocityLimit` behaviour with its translated stat.
- **Mechanism:** a one-shot command in `tools/AetherDb` (`restore-hulls [apply]`), in the shape of the existing
`*-migrate [apply]` commands: dry run by default, opens the catalog through `AetheriaStores.Open(catalogWritable:
true)` only when applying, writes every record in one `Commit`, and refuses to run twice. The Cut 9 importer
(`tools/AetherDb/Import.cs`, added in `70fbaca1` and deleted by Cut 10) is the precedent for reading the legacy
`[tag, payload]` records and rewriting them by the target type's `[Key]` shape; read it out of git history rather
than re-deriving the mapping. **Delete the command in the same campaign, as Cut 10 deleted the importer**, so the
carrying cost of the restore is zero once it has run.
- **Authority map:**
- Owner: the catalog (`GameData/Aetheria.cc`) owns authored content; the operator owns what the content *is*.
- Inputs: the legacy LFS records, the existing factions and assets, the operator's review of the list above.
- Outputs: new `HullData`, `GearData` and `FactionProductData` records.
- Derived state: none. Runtime `Lot`s and provenance are minted as for any other design.
- Forbidden writers: nothing else may write the catalog while this cut is in flight; the one-shot command must
refuse a second apply rather than upsert twice.
- Deletion line: the command goes once the records are in.
- **Verification:**
- `FireControlCut7Tests.ShippedCatalogOpensAndGeneratesAnArmedHull` still passes unchanged: the real catalog
opens, every `EquippableItemData` deserializes, and LonginusX still generates an armed loadout.
- New `RestoredHullsTests` against the real catalog, read-only: each restored hull exists, has the expected
thruster hardpoint count (Longinus 4, Djinni 8), every thruster hardpoint accepts a catalog thruster design
through `TryEquip` at that hardpoint's own position, and the ship then moves and turns under
`MovementDirection`/`LookDirection` for a few ticks. Before Cut 3 this runs on the old mixer, which is the
point: it proves the content, not the controller.
- `LoadoutGenerator` generates each restored hull when filtered to it, which is the check that the products and
roles are authored correctly.
- `dotnet run --project tools/AetherDb -- census` names the two hulls with their makers, and `dangling` reports
no new dangling reference.
- Operator: the Studio click-through, then a play check flying a restored hull. That play check is what
unblocks the rest of this campaign, and it is where Q6's weight gets settled by feel.
- **Operator questions:** none open. The list is approved and tag 11 is identified.
- **Ledger estimate:** no source removed. About 3 to 7 catalog records added, plus their products, plus a one-shot
command of roughly 150 lines that is deleted again in this campaign. Net carrying cost: the content, and nothing
else.
## Cut 2. CultMath: bounded least squares (CultLib)
- **Repo/branch:** `F:\Projects\CultLib`, a branch from `45c2f40` (Aetheria's pinned `CultLibRevision`,
`Directory.Build.props`). Depends on nothing.
- **First:** run `dotnet test packages/cultmath/tests/CultMath.Tests` green at base and record the count.
- **Deletes first:** none. This is a pure addition, and it is the ruled owner fill (R4).
- **Adds:** one C# file in `packages/cultmath/src/CultMath/` with a static solver for
`min ||A x − b||²` subject to `lo ≤ x ≤ hi`. It serves a dense, small problem (m ≤ ~24 rows, n ≤ ~24 columns).
Rules:
- The method is a primal active set (bounded-variable LS). Each iteration solves the free set by Cholesky on the
normal equations, or by QR if Hands prefers conditioning. It terminates on KKT: at each bound the gradient sign
must be consistent with that bound.
- `float` in, `Span`/`ReadOnlySpan` arguments, caller-supplied workspace. No allocation per call.
- `x` is both warm start and result. The solver clamps it to the box first.
- It returns an iteration count or status, has a bounded iteration cap, is deterministic, and keeps its
last feasible iterate on a cap hit. A rank-deficient free set is handled (the caller adds a small ridge row,
and the solver must not throw on a singular pivot).
- Naming stays boring and HLSL-adjacent per `docs/design.md` Rules, for example a
`CultMath.BoundedLeastSquares` static class. It is C#-only like the intercept helpers (`math.cs`). No Rust or
HLSL mirror, because it is not a batch kernel and no shader needs it.
- **Tests** in `packages/cultmath/tests/CultMath.Tests`:
- `InteriorOptimumEqualsNormalEquations`: a problem whose unconstrained optimum lies inside the box returns it.
Pins the free-set solve.
- `KktHoldsOnRandomBoxedProblems`: randomized problems up to 24×16 are checked against a projected-gradient
reference to 1e-4 relative cost, and each active bound's gradient sign is checked. Pins optimality and the
multiplier test.
- `AllBoundsActive`, `ZeroColumn`, `DuplicateColumns`: degenerate columns return without throwing and are
optimal. Pins rank handling.
- `WarmStartMatchesColdStart`: a solution from a perturbed warm start equals the cold solution. Pins
that the start does not bias the result.
- `AsymmetricBounds`: `lo = −1, hi = 1` on some columns and `[0,1]` on others. Pins bidirectional actuators.
- Fixtures must not be degenerate: non-square, non-identity A, and b not in A's range.
- **Release:** build the Unity package (`packages/cultmath/scripts/build-unity-package.ps1`), bump
`unity/org.gamecult.cultmath/package.json` to 0.2.4, and tag `cultmath-unity-v0.2.4` by CultLib's own release
path. In Aetheria, bump `Packages/manifest.json`'s `org.gamecult.cultmath` tag and `Directory.Build.props`
`CultLibRevision` in one commit.
- **Authority map:** Owner: CultMath. Inputs: A, b, bounds, warm start. Outputs: x and status. Forbidden writers:
no least-squares or linear-solve code in `Aetheria/Assets/Scripts/**` (negative grep in Cut 3).
- **Verification:** `dotnet build packages/cultmath/src/CultMath/CultMath.csproj`; `dotnet test` of CultMath.Tests.
Aetheria's `dotnet test tests/Aetheria.Shared.Tests` still passes 244 after the bump. Unity compiles the new
package, and only the operator can check that.
- **Ledger estimate:** +150..220 lines of source and +150 lines of test in CultLib; Aetheria gets a 2-line bump.
## Cut 3. `ShipControl`: shared controller and allocator replace the mixer
- **Repo/branch:** Aetheria, a branch from the Cut 2 bump commit. Depends on Cut 2. Cut 1 is not a
prerequisite for the code, but its restored hulls are what the operator's play check needs.
- **First:** before editing, commit the base flight numbers above as test constants, reproduced by the fixture spec
in "Findings". They are computed at `cd846916`, never captured from new code. Also run a LonginusX-with-Traction
pin at base: `AetherDrive.Axis` for each probe input is `(my, mx, sqrt(|sin e|)·sign)`, including e = 30°, which
gives `Axis.z = 0.7071`.
- **Deletes first** (separate commit, build and tests green, no behaviour change):
- `Ship.cs:61-66` `TurnTime` (6 lines).
- `Behaviors.cs:96-99` `IAnalogBehavior` (4 lines) and its mention in the `Thruster` declaration (`Thruster.cs:40`).
- `Entity.cs:2007`, the commented `IAnalogBehavior` line.
- **Deletes (behaviour commit):**
- `Ship.cs:30-39` (bucket and item sets, 10 lines).
- `:50-59` (capacity properties and strafe lists, 10 lines).
- `:96-118` (bucket construction; `Activate` keeps `base.Activate()` and gathers actuators, about 20 lines).
- `:123-124` (subscriptions) and `:127-143` (`RemoveAetherDrive`, `RemoveThruster`, 17 lines).
- `:145-249` (the `ThrustCalculation` region, 105 lines).
- `:255-291` (mixer and snap, 37 lines).
- The public `Axis` setters: `Thruster.cs:45-49` and `AetherDrive.cs:81-85` become getters plus a command method
only `ShipControl` calls.
- Total is about 200 lines out of `Ship.cs`.
- **Keeps:** `Ship.cs:253` gate (active, not in a wormhole); `:294-310` drag, position, gravity and rotation
quaternion; wormhole code; `Thruster.Execute`/`AetherDrive.Execute` physics unchanged. The throttle is still
`_input`/`_axis`, so power requests, audio and particles read what they read today.
- **Adds:** `ShipControl` in `Assets/Scripts/ServerShared/ShipControl.cs`, owned by `Ship` and stepped from
`Ship.Update` where the mixer was. It is one file and one owner. Types and rules:
- **Actuator columns.** A narrow interface implemented by `Thruster` and `AetherDrive`. There are two
implementers and one consumer; this replaces `IAnalogBehavior`.
- Each actuator reports its columns every tick: body-frame (Fx, Fy) in m/s² and yaw rate in rad/s
(clockwise positive) per unit throttle, plus bounds. It then accepts its throttles back.
- **Thruster:** one column, [0,1]. F is the negative item facing (`Rotate` of (0,1) by mount rotation) times
live `Evaluate(Thrust)/Mass`. Yaw is `Torque·Thrust·TorqueMultiplier/Mass`.
- **Zeroing:** the column is zero when `!Item.Active.Value` or `Item.PowerSupply ≤ 1e-4`, which is the same
predicate `Execute` gates on. `Thruster.Thrust` (stale, updated only in `Execute`) is not the source.
- **AetherDrive:** three axes. Translation is split into ± columns, [0,1] each, because the drive's efficiency
depends on sign and speed (`AetherDrive.cs:138`). Torque is one column, [−1,1].
- **Drive authority is nominal.** Effectiveness is the drive's force at `MaximumRpm` from its own stats (rotor
mass, λ, λ multiplier, coupling efficiency, `AetherTorqueMultiplier`), scaled by the same liveness and by its
condition. It is not the instantaneous `Rpm`. Rotor spin-up is the drive's internal dynamics, not an
allocation decision. This choice is what keeps LonginusX exact: for a lone drive, self-consistent capacity
cancels the scale, so throttle equals input.
- **One solve over the whole wrench.** There is no rotation stage and no translation stage. Each tick
`ShipControl` builds a desired wrench `v = (Fx_d, Fy_d, ω_d)` and solves, once,
min over u in [lo, hi] of Σ_axis ( w_axis · (B_axis · u − v_axis) / cap_axis )² + ridge · |u|²
where `B` is the live column matrix, `cap_axis` is that axis's achievable extreme, and `ridge` is about 1e-3.
The normalization is what lets a rotation error and a translation error be compared: each residual reads as a
fraction of what this ship can do on that axis.
- **Achievable extremes.** `cap` for an axis is the largest value that axis can take inside the throttle box,
which for a box constraint is just the sum of the positive entries of that row (the negative ones for the
other half-axis). Six numbers, no solve: `+x`, `−x`, `+y`, `−y`, clockwise, counter-clockwise. They are also
what `MovementDirection` is a fraction of. Probe values: Longinus `+y` 172.41, `±x` 68.97, yaw 8.25 rad/s
(472.9°/s); Djinni `+y` 55.56, `−y` 18.52, `±x` 37.04, yaw 3.25 rad/s (186.2°/s).
- **Demand.** `F_d = (mx · cap(±x), my · cap(±y))` from `MovementDirection`. `ω_d = min(profile(e) · cap(dir),
e / dt)` toward the `LookDirection` heading, `profile(e) = sqrt(sin e)` for e ≤ 90° (base's own curve) and 1
beyond, with the `e/dt` term landing the heading without overshoot in place of the deleted snap. A zero
`LookDirection` means hold heading: no demand, no NaN.
- **Direction choice** stays a time comparison, `angle_in_that_direction / cap(dir)`, infinite where `cap` is
zero, with the committed direction held unless the other is faster by a margin. It is not a branch on whether
the ship "can" turn: under Q2 = B `cap(dir)` is almost always non-zero, and the comparison is what makes the
long way round appear.
- **Weights.** Translation rows weigh 1. The yaw row weighs `w`, the single knob (Q6), default **3**. There is
no other tuning constant in the objective.
- **The three regimes fall out of that solve; none of them is a rule** (closed-loop probe, below):
- (a) *Turning while forward thrust is also wanted.* The mains are already firing for `F_d`, so their torque
costs nothing extra, and the ship turns with them.
- (b) *Turning in place.* `F_d` is zero, so every newton of main thrust is pure error, and the solver spends it
only to the extent the remaining yaw residual is worth more. The intact Longinus is no longer forced into
the 84 m/s² burn the earlier sized-demand design produced.
- (c) *No attitude authority in that direction.* The only way to cut the yaw residual at all is the mains, so
the solver takes the lurch, and the direction comparison decides whether that beats the long way round.
- **`TorqueFloor` has no consumer left.** It was read only at `Ship.cs:115,118`. The field goes from
`GameplaySettings` (`Settings.cs:205`) along with its authored value in `Assets/Resources/Settings.asset`;
`TorqueMultiplier` and `AetherTorqueMultiplier` stay, because they are physics.
- **Budget.** One solve per ship per tick, plus six sums. The earlier design's four extra capacity solves are
gone. The fix for cost is solver efficiency, not a cache, because a cache would be a second truth for liveness
(invariant 3).
### Closed-loop probe behind Cut 3
The single-tick table in Part II is measured against the real engine at `cd846916`. The numbers in this section
come from a **separate scratch model**: the fixture columns above, kinematic rotation, `dt` 0.02, the objective as
stated, and the base mixer re-implemented against the same integrator so the two are compared like for like. They
are design evidence and test targets, not engine pins; Hands reproduces them against the real engine and reports
the differences.
| Manoeuvre (Longinus fixture) | base mixer | solve at w = 3 |
|---|---|---|
| Turn 90° in place | 0.32 s, 13.9 m/s of drift | 0.30 s, 16.9 m/s of drift, main peaks at 0.73 throttle |
| Turn 90° at full forward | 0.32 s | 0.30 s |
| Strafe right, 1 s, look held | no strafe at all | 10.7 m/s gained, heading holds within 1.1° |
| Djinni turn 90° in place | 0.68 s, no drift | 0.68 s, no drift, no stern throttle |
The drift in a turn is dominated by the nose thruster, which pushes sideways whatever the controller does: base
pays 13.9 m/s for a 90° turn and the solve pays 16.9 m/s, in about the same time. That is the honest shape of
regime (b): the main does contribute torque, but the turn does not become a forward burn.
The yaw weight trades heading-holding against how hard the mains are spent, and on this hull both come from the
same pair of actuators:
| w | strafe gained in 1 s | heading deviation while strafing | 90° turn in place | main peak |
|---|---|---|---|---|
| 0.5 | 0.1 m/s | 179° (heading lost) | 1.62 s | 0.14 |
| 1 | 46.4 m/s | 59° | 0.60 s | 0.37 |
| 2 | 13.7 m/s | 3.8° | 0.36 s | 0.63 |
| **3** | **10.7 m/s** | **1.1°** | **0.30 s** | **0.73** |
| 5 | 9.9 m/s | 0.4° | 0.28 s | 0.79 |
Damaged cases at w = 3: a Longinus with `Th.CCW` destroyed reaches a heading 90° to port **the long way round**
(0.74 s, sweeping +269°) and a heading 20° to port **the short way, on differential main thrust** (1.18 s, sweeping
−18°, gaining 19.7 m/s). A hull whose single main sits on the centre line has no counter-clockwise authority at
all and always takes the long way (0.86 s). A Longinus with both nose thrusters gone still turns 20° in 0.60 s on
its mains alone, and does it while gaining 83 m/s if forward thrust was also asked for against 20 m/s if it was
not — regime (a) against regime (b) on one fixture.
- **Per-file changes** (against `cd846916`):
- `Ship.cs:251-292`: `Update` calls `ShipControl.Step(dt)` inside the existing `:253` gate. The drag and position
code below stays.
- `Ship.cs:92-119`: `Activate` collects actuators into `ShipControl` (all `Thruster` and `AetherDrive`
behaviours). No classification.
- `Ship.cs:121-125`: the constructor drops both `ItemDestroyed` subscriptions.
- `Thruster.cs:40`: implement the actuator interface, drop `IAnalogBehavior`. `:45-49`: public getter, internal
command. `:61-71`: `Torque` stays as the geometry factor.
- `AetherDrive.cs:81-85`: same pattern. Add the nominal-authority read next to its stats.
- `tests/Aetheria.Shared.Tests/BrownoutTests.cs:111-131` and `ConditionRatioTests.cs:94-95`: equip the consumer
thruster on the hull's centre column, using `TryEquip(item, int2(2, y))` with a free y, so `Torque == 0`. These
tests pin brownout and condition, not flight. Their asserted values (for example `.1f` at
`BrownoutTests.cs:162`) must not change. Fix the fixture, never the assertion. `PowerCurveTests.cs:52-62`'s
comment about the `Axis` being clobbered becomes true for a different reason; update the wording only.
- **Authority map:**
- Owner: `ShipControl` decides every actuator throttle and the feasible turn direction.
- Inputs: `MovementDirection`, `LookDirection.xz`, current `Direction`, `Mass`, `dt`, each actuator's live
column, `TorqueMultiplier`/`AetherTorqueMultiplier`.
- Outputs: per-actuator throttle (`Thruster._input`, `AetherDrive._axis`); the achievable extremes, the
movement-command mapping, `TurnTime(heading)`, and the step itself, which Cut 4 uses as its prediction model.
- Derived state: columns, extremes and the demand are per-tick derived, never stored across ticks except the
warm start and the committed turn direction, which are command state and not truth. `Thruster.Axis` and
`AetherDrive.Axis` are display and command readbacks.
- Forbidden writers: `Ship.Update`'s mixer (gone); any assignment to `Thruster.Axis`/`AetherDrive.Axis` outside
`ShipControl`; `Ship.cs:283`'s direct `Direction` write; bucket pruning on `ItemDestroyed`; any Unity-side
write of throttles. Also forbidden inside `ShipControl`: any test of whether an actuator is "for" rotation or
translation, any per-direction special case, and any second solve that re-decides part of the wrench.
- Shared paths: player writes (`ActionGameManager.cs:1254,1263`) and AI writes (`Agent`, `MoveTo`, `Combat`) both
reach actuators only through `ShipControl.Step`. Wormhole exit leaves the gate closed until the animation
ends, as today.
- Deletion line: the delete commits above land before `ShipControl` gains behaviour.
- **Verification:**
- Builds: `dotnet build Aetheria.Shared`; `dotnet test tests/Aetheria.Shared.Tests -m:1 -p:CultLibRoot=…`.
Unity batchmode compile (operator, or Self when the editor is closed).
- Tests (new file `LocomotionControlTests.cs`, fixtures exactly as in "Findings": off-origin, off-axis nose with
`|fx| > |fy|`, nonzero dt, asymmetric damage):
- `IntactLonginusMatchesBase` and `IntactDjinniMatchesBase`: every row of the base table within tolerance
(2% of that ship's full-scale acceleration or turn rate), except the four accepted divergences below, which
are pinned at their own probed values. Pins the allocator against base.
- **Accepted divergences** (operator, 2026-09-22, "The divergence is fine"). Soul reads these as pinned
behaviour, not as regressions, and anything outside them is a regression:
1. Longinus turning in place spends its mains for torque, peaking near 0.73 throttle at w = 3. The
manoeuvre costs 16.9 m/s of drift against base's 13.9 and finishes in 0.30 s against base's 0.32.
2. Longinus strafing gains a weak strafe it never had: about 10.7 m/s in a held second, heading holding
within about 1°, where base produced exactly nothing.
3. Djinni strafe reaches 37.0 m/s² against base's 34.0 (+9%), by balancing torque with Stern 3 and Bow.
4. Djinni turning in place may run a stern thruster and the bow thruster against each other at low throttle;
net force stays zero, but their exhaust is visible.
Plus two intended fixes, which are not divergences to tolerate but behaviour this cut is buying: turns past
90° run at full rate instead of decaying to zero at 180°, and `|Direction|` no longer shrinks when the look
is directly aft.
- `LonginusXDriveAxisEqualsBaseFormula`: a drive-only hull; for every probe input, `AetherDrive.Axis` equals
`(my, mx, sqrt(|sin e|)·sign)` to 1e-3. Pins the live player ship's feel exactly.
- `CentreMainHullTakesTheLongWayRound`: the long-way fixture, built so the long way is the *only* way. One
centred main (torque 0, so no differential authority) and one clockwise attitude thruster, the
counter-clockwise one destroyed through the real `ItemDamage` path. Write `LookDirection` directly, as the
player would, to 90° left. Heading changes clockwise every tick (never counter-clockwise), and the ship
arrives within 2° in under 1.2 s (model: 0.86 s). Base comparison: a ship of that shape never turns at all.
Pins the shared feasible-direction choice.
- `LonginusMissingCcwPrefersTheLongWayAtNinetyDegrees`: the two-main Longinus with `Th.CCW` destroyed, looking
90° left. It sweeps clockwise through about +270° and arrives (model: 0.74 s). Pins that the comparison is by
time, not by a rule about which actuators are "for" turning.
- `LonginusMissingCcwLurchesRoundTheShortWayAtTwentyDegrees`: the same ship looking 20° left. It sweeps
counter-clockwise through about −20° on differential main thrust, arrives within 2°, and its speed rises
while it does (model: 1.18 s, 19.7 m/s). Pins that the lurching turn is available and is chosen when it is
faster.
- `IntactShipTurningInPlaceDoesNotBurnForward`: the intact Djinni, looking 90° right with
`MovementDirection` zero. Its speed at the end of the turn is under 1 m/s and no stern or bow thruster
exceeds a low throttle. Pins regime (b) on a hull that has the actuators to keep translation clean. The
intact Longinus, which does not, is covered by accepted divergence 1 instead, with its own bound: drift no
worse than 1.3× base's 13.9 m/s and turn time no worse than base's 0.32 s.
- `NoAttitudeAuthorityStillTurns`: a Longinus with both nose thrusters destroyed, looking 20° right. It
arrives, on differential main thrust, and it gains speed doing so (model: 0.60 s). Pins regime (c).
- `TurningIsCheaperWhenForwardThrustIsAlsoWanted`: the same mains-only ship, 20° right, run twice with
`MovementDirection` zero and at full forward. Both arrive in the same time; the second gains much more
speed because the burn was wanted anyway (model: 20 m/s against 83 m/s). Pins regime (a) as a consequence of
one solve rather than a special case.
- `StrafeHoldsHeading`: the intact Longinus, full strafe held for 1 s with `LookDirection` fixed. Heading
deviation stays under 2° (model at w = 3: 1.1°). Pins the weight's other half, which is what stops the nose
swinging when a ship strafes with a thruster that also yaws.
- `LonginusMissingCcwTurnsRightAsBefore`: looking 90° right reaches within 2° in 0.32 s ± one tick (base
value). Pins that damage on one side leaves the other side alone.
- `LookDirectlyBehindTurns`: intact, look exactly aft. The ship turns, `|Direction|` stays 1 ± 1e-4, and there
is no NaN. Pins the snap's deletion and the >90° profile.
- `ZeroLookHoldsHeading`: default `LookDirection` gives no NaN in `Direction` or any throttle.
- `DestroyedThrusterNeverReceivesThrottle`: for each Djinni thruster in turn, destroy it, then drive 50
ticks of mixed inputs (forward, strafe, turn both ways, diagonal). Its `Axis` is 0 on every tick. Repeat for
`Enabled = false` and for a zero power grant. Pins invariant 7.
- `RepairedThrusterRejoins`: destroy, restore durability, `UpdatePerformance`. The next tick's strafe uses it.
Pins the live read (invariant 3) against the old permanent pruning.
- `PlayerAndAiInputsGiveIdenticalThrottles`: two identical Djinni hulls with the same damage. One gets inputs
the way `ActionGameManager` writes them (`LookDirection` with nonzero pitch from yaw/pitch Euler,
`MovementDirection` from a stick value). The other gets them through an `Agent` state writing the same yaw,
flat. After `Update`, every actuator throttle is identical. Pins R2.
- `LonginusMissingMainHoldsHeadingUnderThrust`: `Th.L` destroyed, forward input. Heading drift stays under 1°
over 2 s, and forward acceleration is at least 70 m/s² (probe: 78 with 12 lateral slip). Pins torque-coupling
compensation in the shared layer.
- Negative greps, verified against `cd846916` to hit only the lines this cut deletes:
- `\.Axis\s*[-+]?=` in `Assets/Scripts` should match nothing outside `ShipControl.cs`. At base it matches
exactly `Ship.cs:256,264,273,275,276,287,288,291`. `FieldDriver.cs`'s `RectTransform.Axis` does not match;
checked.
- `_forwardThrusters|_clockwiseThrusters|StrafeTorqueThrusters|RecalculateThrust|TurnTime\(` should match only
`ShipControl.cs`'s new `TurnTime`.
- `TorqueFloor` should match nothing in `Assets/Scripts`, and nothing in `Assets/Resources/Settings.asset`
once Unity rewrites it.
- `IAnalogBehavior` should match nothing.
- `lerp\(Direction` in `Ship.cs` should match nothing.
- No least-squares code outside CultMath: `Cholesky|pseudo.?inverse|ActiveSet` in `Assets/Scripts` should
match nothing.
- Stryker: `dotnet stryker --since:<Cut 3 base>` from `tests/Aetheria.Shared.Tests`. Every non-equivalent
survivor in `ShipControl.cs`, `Thruster.cs` and `AetherDrive.cs` is killed or triaged by name. Float boundary
flips are equivalent, per the fire-control Cut 11 ruling.
- Operator: fly LonginusX and confirm it feels unchanged (strafe, turn, look behind now turns). Then fly a
restored Longinus or Djinni from Cut 1, shoot a thruster off it, and confirm the damaged handling and the
lurching turn. Without Cut 1 this half of the check cannot be done at all.
- **Operator questions:** Q6, below, which does not block the cut. Q1, Q2, Q3 are ruled and Q5 is dissolved.
- **Ledger estimate:** −200 lines in `Ship.cs`, −12 elsewhere (`IAnalogBehavior`, `TorqueFloor` and its authored
value). `ShipControl.cs` adds about 250–350 lines, tests about 500. Net source roughly +100. That buys
actuator-loss capability, which is the explicit ask, and removes seven parallel role sets, the snap, permanent
pruning, one authored setting and four capacity solves a tick.
## Cut 4. Heading planner in the AI
- **Repo/branch:** Aetheria, after Cut 3.
- **First:** pin base AI results as constants. On base, a Djinni with all stern thrusters destroyed never reaches
the target (speed 0 at 120 s). Intact, it reaches it in 4.34 s. Both come from the probe (Agent plus MoveTo, dt
0.02, target 300 m to port from (37,−12), nose `normalize(0.8,0.6)`).
- **Deletes first:** `Agent.cs:16-17` (the two thresholds) and `Agent.cs:60-78` (the body of `Accelerate`, 19
lines). `MoveTo.cs:26` (the duplicate `LookDirection` write). The signature `Accelerate(float2, bool noTurn)`
stays, since `Combat.cs:127` and `MoveTo.cs:27` call it.
- **Adds:** in `Agent` (above the inputs, AI only). **The planner chooses by predicted outcome, never by a
rule.** It simulates each candidate and compares where the ship actually ends up.
- **Candidate manoeuvre:** a pair (heading command, movement command) held for the horizon. The set is the
headings the ship might fly with the translation that points the demand along Δv at each: 16 evenly spaced
headings (Hands default; 8 to 32 is the sensible range), plus the Δv direction and the current heading.
- **Prediction:** roll each candidate forward over a horizon of 1.0 s (Hands default; 0.5 to 2.0 s is the
sensible range) in 5 substeps (3 to 10), stepping the *same* `ShipControl` solve and the same kinematics the
ship will actually fly. There is no second physics model and no closed-form estimate: one owner for what the
ship does, which is invariant 8 applied to prediction.
- **Score:** the predicted outcome at the horizon — remaining distance to the objective, and the closing speed
that ends the horizon (so a manoeuvre that arrives pointing the wrong way with no closing speed loses to one
that is simply nearer and still closing). Infinite where the candidate ends further away than it started.
- **This is what answers the operator's case.** A ship whose rotation has to be bought with main thrust turns in
a great circle: the prediction shows the heading improving while the range opens, so a lateral burn that keeps
the bearing and closes wins on its own numbers. Nothing in the planner tests whether the ship is a one-way
turner, whether a thruster is missing, or which actuator would be used.
- Pick the argmin with hysteresis: replan when a candidate beats the current plan by a margin, on a cadence
(0.25 s default) or when the actuator set changes. The cadence exists for cost: 18 candidates × 5 substeps is
about 90 solves per replan, roughly 1 ms per replan per ship at the scratch timings, so a 0.25 s cadence over
20 AI ships is a few percent of a core. Hands measures and reports; if it is too slow the answer is fewer
candidates or a shorter horizon, both of which are stated ranges, not a cache.
- Write `LookDirection = θ*` unless `noTurn`. Write `MovementDirection` as the per-half-axis fractions that point
the translation demand along Δv, inverting `ShipControl`'s own mapping (a `ShipControl` helper, so the AI never
re-derives it), with a deadband near zero Δv.
- `noTurn` (combat) skips the heading half of the candidate but still predicts the translation. A Djinni with no
stern facing its target strafes or backs off on its own.
- **Authority map:**
- Owner: `Agent` decides what the AI writes to the two inputs.
- Inputs: target velocity and objective position, the `ShipControl` step used as the prediction model, current
velocity and heading.
- Outputs: `LookDirection` (unless `noTurn`) and `MovementDirection`.
- Derived: the plan (heading, time of last replan) is command state only.
- Forbidden writers: `MoveToState` writing `LookDirection`; any AI code writing throttles or `Direction`; any
second model of what the ship will do, whether a closed-form estimate, a capability table of its own, or a
branch on which actuators are missing.
- Shared paths: `MoveToOrbitState` (patrol) and `CombatState` both go through `Accelerate`.
- **Verification:**
- `DjinniWithoutSternReachesTargetByCrabbing`: stern cluster destroyed, target 300 m at a bearing 30° right of
the nose, driven through `Agent` plus a fixed-target `MoveToState`. The ship arrives within 10 m in under 8 s.
Base never arrives (speed 0 at 120 s). Pins R1(2) and the stuck-forever cheese.
- `CrabBeatsTheBigCircle`: **the operator's case, and the reason Cut 4 predicts instead of deciding.** The
fixture is a hull that can strafe cleanly but can only rotate by spending a main: two off-centre mains aft and
one amidships lateral pair whose torque cancels, no attitude thrusters, with an objective abeam to port at
300 m. A turn-to-face policy run in the same harness spends the manoeuvre sweeping a wide arc that barely
improves the bearing and opens the range; the planner's choice closes it. Pinned as time to reach the
objective, and as range at the horizon, never as "the planner chose to strafe".
- `CrabBeatsPointAndBurnWhenMainIsWeak`: Djinni with Stern 1 and Stern 2 destroyed (asymmetric; Stern 3's torque
is balanced by the laterals), target 300 m at 60° left. The planner arrives strictly sooner than a naive
point-and-burn agent run in the same harness through the same Cut 3 controller. A relation, not a captured
number.
- `IntactShipsStillPointAndBurn`: an intact Djinni arrives no later than base's 4.34 s + 10%, with the restored
hull's own `VelocityLimit` in force. Pins no regression.
- `LonginusWithoutReverseFlipsToBrake`: target velocity opposite the current velocity; the predicted-outcome
score puts the ship round, because a Longinus has no reverse thrust.
- `PlannerTakesTheLurchWhenItPays`: the Longinus with `Th.CCW` destroyed and a Δv 20° to port, where the
lurching turn is genuinely faster. The ship gets there sooner than a fixed-heading strafe would in the same
harness. Pins that the planner inherits the controller's comparison rather than avoiding the lurch on
principle.
- `PlannerPredictionMatchesFlight`: run a candidate's prediction, then fly the same commands for the same
horizon, and compare the end states. They agree within a small tolerance. Pins that the prediction uses the
real controller and that nobody has grown a second model.
- Negative grep: `LookDirection` in `Agents/States/MoveTo.cs` should match nothing.
- Stryker `--since:<Cut 4 base>` over `Agent.cs`, `MoveTo.cs` and `ShipControl.cs` queries.
- Operator: watch a patrol Djinni with a stern thruster shot out crab to its next orbit.
- **Ledger estimate:** −22 lines, +140 lines of source (the prediction loop replaces the closed-form score),
+300 lines of test. No new type beyond the plan and the candidate.
## Cut 5. Combat facing and tactics (target shape only)
This cut gets mapped after fire-control Cut 12 lands, because that cut decides what presenting a side is worth.
- **Owner:** `CombatState` (`Combat.cs:88-127`), above the inputs.
- **Shape:** extend Cut 4's predicted-outcome scoring with what the weapons want — arcs, ranges and the aim the
fire-control path will take — so the facing a ship holds is the one its predicted damage favours, not a rule
about its turn asymmetry. A ship that turns one way fast and the other way slowly will, under that scoring, tend
to keep its target drifting toward its fast side, because that is what predicts better. A ship with good turret arcs and poor rotation holds a heading and lets the
turrets work. Weapons with fixed arcs pull the heading onto the target. It uses the Cut 4 planner for thrust.
- **Fork:** Q4 (heading versus aim), which must be ruled before mapping.
## Operator questions
Each question gives options and a recommendation. Self paces these one at a time. Q1, Q2 and Q3 were ruled on
2026-09-22; their text is kept as history, and the live design is in the cuts above.
- **Q6: the yaw weight in Cut 3's solve (does not block Hands).** The solve has exactly one knob, the weight on
the yaw residual against the translation residuals, after each axis is normalized by that ship's achievable
extreme. On a Longinus both the strafe and the turn come from the same nose thrusters, so the knob trades
heading-holding against how hard the mains are spent for torque (closed-loop model, table in Cut 3):
| w | strafe gained in a held second | heading deviation while strafing | 90° turn in place | main peak |
|---|---|---|---|---|
| 1 | 46.4 m/s | 59° | 0.60 s | 0.37 |
| 2 | 13.7 m/s | 3.8° | 0.36 s | 0.63 |
| 3 | 10.7 m/s | 1.1° | 0.30 s | 0.73 |
| 5 | 9.9 m/s | 0.4° | 0.28 s | 0.79 |
The Djinni is unaffected at every value: it has the actuators to do both cleanly. Base, for reference, does not
strafe at all and turns 90° in 0.32 s.
- **A: w = 3.** Heading holds while strafing, turns match base's speed, and the mains carry a real share of the
torque in a turn.
- **B: w ≈ 1.** The mains stay nearly out of turns, but a Longinus asked to strafe swings its nose most of the
way round, because strafing and turning are the same thrusters.
- **C: w = 5.** Heading holding is near-exact and the mains are spent hardest.
**Recommended: A.** Hands starts there and the Cut 3 pins are written against it. This is a feel question, so
the honest place to settle it is the Cut 1 play check; changing it afterwards moves numbers in pins, not
structure.
- **Q4: heading versus aim (blocks Cut 5 only).** `LookDirection` is both the heading command and the aim, read by
`LockWeapon.cs:94`'s lock cone, guided projectiles, reticle targeting and the tractor beam. Capability-aware
facing wants the AI to hold a heading that is not its aim, and under R2 any split applies to the player too.
- **A.** Add a heading input beside the aim on the shared surface. The player's heading follows the view unless a
player control is added later.
- **B.** Keep one input, and the AI accepts degraded lock cones and missile aim while it manoeuvres.
**Recommended: A**, decided when Cut 5 is mapped.
### Ruled or dissolved (history)
- **Q1: intact-ship divergence from base.** **Ruled A, 2026-09-22: "The divergence is fine."** The four accepted
divergences and their magnitudes are listed in Cut 3's verification. The rejected option was to require exact
base behaviour, which would have meant reintroducing per-thruster role rules into the objective.
- **Q2: rotation from translation thrusters.** **Ruled B, 2026-09-22: "that's absolutely viable and can be a
better decision than turning around the long way, I wouldn't introduce a thruster exclusion for this."** The
option this map recommended (A: rotation authority only from thrusters above `TorqueFloor`, so a lost attitude
thruster means that direction is gone) was rejected. Cut 3 and Cut 4 are written to B.
- **Q3: Longinus fixture layout.** **Ruled, 2026-09-22: "Good catch on the Longinus main thrusters, I was
misremembering."** Fixtures follow the data: two aft 2×2 mains.
- **Q5: how the rotation demand is sized.** **Dissolved, 2026-09-22.** The question assumed a separate rotation
demand that something had to size. The operator refused the premise — "it should only do that if the ship's
controller also *wants* to accelerate forwards that much" — and the answer is one solve over the whole wrench
with both residuals in the same currency, which makes the three regimes consequences rather than rules. Neither
of the options this map offered (size from attitude authority with a fall-back; size from everything) survives,
and `TorqueFloor` loses its last consumer. What is left of the question is Q6, the single weight.
## Subtraction ledger (estimates)
| Cut | Removed | Added | Dependencies / targets |
|---|---|---|---|
| 1 | 0 source; the one-shot command is deleted again in this campaign | 3–7 catalog records + products; ~150 lines of throwaway tool + ~120 test | No new package, target, asset or authored field. Existing prefabs, schematics and factions are reused |
| 2 | 0 | ~200 src + ~150 test (CultLib) | CultMath gains one file; cultmath-unity 0.2.4; Aetheria pin bump |
| 3 | ~212 (`Ship.cs` ~200, `Behaviors.cs` 4, `Entity.cs` 1, setters, `TorqueFloor` and its authored value) | ~300 src + ~500 test | `IAnalogBehavior` and one authored setting removed; four capacity solves a tick removed; no new package, target or authored field |
| 4 | ~22 | ~140 src + ~300 test | none |
| 5 | not mapped | not mapped | not mapped |

View file

@ -0,0 +1,172 @@
# Aetheria merge checklist: `codex/fire-control-12` into `master`
Compiled 2026-09-29 by Eyes from the maps on the branch. Pointers are `doc:line` in `docs/` at the branch tip. "Unrecorded" means the maps do not say the check was done.
**What merging does.** `origin/master..codex/fire-control-12` is 257 commits. It carries the item-provenance work after 2026-09-17, stats-and-power (resolver, power bus, input capacitors, priority tiers, power-supply term and brownout, nominal requests, condition ratio, shield reserve, authored roles), fire-control Cuts 1-12.4(b), locomotion Cut 1 (restored hulls), the shield-panel interceptor, and the Addressables cuts. Self performs the git merge after you sign off. Nothing here is for the merge itself; it is what only you can check first.
**Correction to the brief.** `codex/cultcache-cutover`, `codex/aetheria-state-rebuild` and `codex/item-provenance` are all ancestors of the branch tip, and the first two are already on `origin/master`. Master's merge commit `9b85211f` (2026-09-17) took cultcache-cutover and item-provenance at their 09-17 tips, after your play smoke passed (`cultcache-migration-cut.md:148`). Master has two commits the branch lacks (`9b85211f`, `263ac421`, which deletes dead narrative fixtures). `git merge-tree` of the two showed no conflicts. No `aetheria-state-rebuild` doc exists.
## 1. Before you start
- Open branch `codex/fire-control-12` at its tip, `4b594e116c4063ef5ee1dcb937bab0288008e63e` (2026-09-26, in sync with `origin/codex/fire-control-12`).
- Unity `6000.3.24f1` (`ProjectSettings/ProjectVersion.txt`).
- Batchmode: `tasklist` on 2026-09-29 showed Unity Hub and the licensing client but no `Unity.exe`, so none was running. Batchmode refuses an open editor and the maps say to close it and not kill anything (`item-provenance-cut.md:485,519`). Recheck when you start.
- The Unity manifest pins `cultmath-unity-v0.2.4` (`Packages/manifest.json`); the tag exists in CultLib. Unity needs network access to resolve it on first open (`fire-control-cut.md:2205-2212`).
- **Delete or move `GameData/run.cc` and `GameData/player.cc` before the first launch.** Both are git-ignored and stale (2026-09-22, 91,580 and 1,964 bytes). The maps' fresh-launch checks assume neither exists (`cultcache-migration-cut.md:2745`), and an old run store throws on the first lot lookup (`item-provenance-cut.md:595-596`). The persisted shape has changed since (power tier slot, fuse slot 32).
**Your uncommitted work.** The merge happens in a separate worktree and does not touch it. `git status` lists 22 modified tracked files and 3 untracked. `git diff --stat` shows content changes in only 9; I infer the other 13 (materials, render textures) differ by line endings, from the LF/CRLF warnings.
- Content changes: `Asset Sources/Adrasteia1.blend`, `Car Paint White.mat`, `Steel.mat`, `Map Gravity Lines.mat`, `Minimap Gravity Lines.mat`, `LiberationSans SDF - Fallback.asset`, `Assets/Scenes/ARPG.unity` (+374), `Assets/Scenes/FieldShieldTest.unity` (+263), `Assets/Scripts/AetheriaInput.cs` (+40).
- Line-ending-only (inferred): the other Map/Sector `.mat` files, 8 `.renderTexture` files, `Stardust.mat`.
- Untracked: `Asset Sources/Adrasteia1_ContourRoute.blend`, `Ships.blend`, `adra1.png`.
- **Decide about three that belong to merged campaigns (my reading of the diffs):**
- `AetheriaInput.cs` (+40) adds the `Cycle Target Item` action (key J). The branch already has that action in `Assets/Resources/Aetheria.inputactions:72,326` and reads it in `ActionGameManager.cs:412`, but not in the generated wrapper. It is the wrapper catching up to committed data. Recommend including it.
- `FieldShieldTest.unity` (+263) adds `ShieldInterceptor`, `ShieldEnvelope`, a `Panel` with `Prototype` and `ShieldPanel`. This is the shield-panel Cut 4 rig you clicked together (`shield-panel-cut.md:840-846`). It is not on the branch. Without it the interceptor code merges with no rig.
- `ARPG.unity` (+374) adds "Debug Info Panel" and "Debug Info Text". `ActionGameManager.DebugInfoText` (`ActionGameManager.cs:151,1287,1333`) is the fire-control debug HUD and it returns early when null. Without the scene change the HUD "hull" factor in step 10 is invisible.
## 2. One play session, in order
### 2a. Fixtures to author first
1. **Scratch catalog for 12.4.** Copy the catalog; do not edit `GameData/Aetheria.cc`. Author one weapon with `Fuse = Proximity` and a `BlastRadius`, and one with `Fuse = Delayed`, a `BlastRadius` and a penetration of about 2 cells (`fire-control-cut.md:3094,2656-2658`). Shipped penetration is at most 0.25 and enclosed cockpits need about 2 cells, so a penetrator authored from shipped values cannot reach the interior (`:3224-3225`). Fields are `aetheria.weaponitemdata` slot 29 (`BlastRadius`) and slot 32 (`Fuse`). Unrecorded: how to point the game at the scratch catalog, and which tool you author with (the map says only "Studio or `AetherDb`", `:2665`).
2. **Studio open, no game running.** You need it at 2c and 2d. Batchmode-based checks are the agent's, not yours.
### 2b. Fresh launch (no `run.cc`, no `player.cc`)
3. **Launch to main menu.** Expect no Addressables errors, and the Groups window shows `Assets/Content` under `Default Local Group` (`addressables-cut.md:301`). `player.cc` appears and Continue is disabled (`cultcache-migration-cut.md:2746`). Proves: Addressables Cut 1, CultCache cutover. The 09-17 smoke covered the last two on the old tree; this is a cheap recheck on the new schema.
4. **New Game (tutorial).** Expect the galaxy generates and the start ship is LonginusX (`settings-globals-cut.md:498`, an expectation, not a recorded check for this stack). Expect a Zenith station with a docking bay in the entrance zone every time (`locomotion-cut.md:375`). Proves: locomotion Cut 1 station rule.
5. **Addressables, "Use Asset Database".** Ships, turret and Zenith spawn; thruster and aether-drive particles show; fire an instant weapon (Autocannon) and a charged one (ChargeBlast SG); action bar icons show (`addressables-cut.md:362-366`). Proves: Addressables Cut 2.
### 2c. Flight, power and economy
6. **Provenance in play.** Starting-ship items show tier colour; the properties panel shows Manufacturer, product name and flavour for branded gear. Dock and buy: the brand still shows in cargo. `give Lamp` (any design name): no Manufacturer row. Kill an NPC and pick up loot: brand shown (`item-provenance-cut.md:528-539`). Proves: item-provenance Cut C.
7. **Fly a restored hull (Longinus or Djinni).** Thrusters move and turn it (`locomotion-cut.md:501`). Watch the speed cap: `VelocityLimit` is gated by the hull's `Active`, and a hull taken offline with thrusters firing loses the cap (`:377`). It did not happen in 300 s on shipped settings; report if you see runaway speed. Unrecorded: how to spawn a restored hull in play (the map names no path).
8. **Weak reactor (O2).** Fly with a reactor too small for the loadout. Expect visible, legible starvation rather than a cooked reactor (`stats-and-power-cut.md:705-706`). Proves: power bus (map Cut 3).
9. **Brownout and refill (O6, O4).** Brownout reads as degradation, not breakage (`:774`, `:990`). A weapon refilling under brownout stutters instead of firing full rate and cooking the ship (`:729-730`). Proves: power-supply term, brownout, input capacitors.
10. **Memory across zones (O1).** Play across several zones with kills, open the Profiler or Task Manager, and confirm memory does not climb (`:672-673`, `:980-982`). Proves: stat resolver, the entity-leak fix (map Cut 2). Combine with steps 11 and 12.
### 2d. Combat (against a LonginusX-class AI), then save and Studio
11. **Fire-control Cut 1 arcs.** Side-mounted weapons still fire at targets abeam; a turret tracks all the way round; nothing fires through the hull (`fire-control-cut.md:397-398`).
12. **Fire-control Cut 3 and shots.** Shots show rolled impacts and misses; a miss reads as a near-miss, not a bug; damage matches the HUD; aiming at a revealed subsystem concentrates damage; kill time is in the same order as before (`:659-661`). Reveal and selection work, kills drop loot, pickup stores it, the tractor beam still pulls (`headless-playground-cut.md:789-794`). No crash or frozen hot ship when the target vanishes (the 2026-09-20 failure, `fire-control-cut.md:1464-1470`). Recheck after the fixes: unrecorded.
13. **12.2, bow then beam.** The HUD `hull` factor reads higher from the beam. Turn your armoured face into a slow missile and watch where it lands (`:2380-2383`).
14. **12.3, launcher into a bow, then a flank.** Use a GT 3K or pswarm launcher. The schematic display pulses the facing edge only (`:2519-2520`).
15. **12.4, scratch catalog.** Watch a proximity airburst beside a LonginusX and a delayed penetrator into its nose. Damage must land where the model shows the blast; this confirms the centre-of-mass anchor. Bow is already confirmed +y (`:3095-3097`, `:2028-2031`). Proves: 12.4(b) `Detonate`.
16. **Wormhole, save, Continue.** Take a wormhole, quit, Continue: same items, same tier and brand (`item-provenance-cut.md:536-537`).
17. **Die.** Continue is disabled and `run.cc` holds no ledger (`:540-541`).
18. **Shield panel, `FieldShieldTest`.** Follow the numbered look in `shield-panel-cut.md:683-700`. Nothing visible on load. Click the nose: a patch grows and the field ripple runs too. Click the flank: the panel lies flat, not tilted. Click the same spot twice: it strikes the same panel. Spam far-apart clicks: at most 12 panels, oldest replaced. Let them fade: none left. Then the Cut 5 payoff: strong hits dice the patch, and repeated hits on one spot break through on a later hit (`:737-739`). Proves: shield-panel Cuts 3, 4, 5.
19. **Studio click-through.**
- Open `Aetheria.cc`. The fire-control behaviour union renders (`fire-control-cut.md:503-506`).
- `LonginusX` schematic still underlays the shape drawer (`addressables-cut.md:370-371`).
- The restored hull records open (`locomotion-cut.md:501`; the map gives no checklist beyond "the Studio click-through").
- The scratch catalog's new `Fuse` and `BlastRadius` fields edit (from 2a; no map line).
- Open `GameData/run.cc` after step 16. `aetheria.provenanceledger` renders `Lots` with `Attributed` origins and per-role lists. If Studio cannot draw an int-keyed dictionary of unions, that is a Studio defect to raise, not a schema change (`item-provenance-cut.md:541-544`).
20. **Addressables, "Use Existing Build".** Run *Build > New Build > Default Build Script*, then repeat step 5. This proves the player catalog carries GUID keys. Then *Analyze*, "Check Resources to Addressable Duplicate Dependencies", and record the result; 5 known leftovers are expected (`addressables-cut.md:367-370`).
### 2e. Desk review (not play)
21. **Role content (O7).** Review `docs/stats-power-cut7-roles.md`. Rows marked "generic, needs review" are arbitrary-seed, not brand identity, and no design yet has a second product with a raised role (`:156`, `:194-202`; `stats-and-power-cut.md:797-799`, `:991`).
## 3. Feel calls during the session
Only what the maps name.
- **Balance numbers.** `CommitHorizon` (first value 0.3 s), `SchematicCellSize` (0.35) and the targeting stat ranges are first guesses; the smoke is the arbiter (`fire-control-cut.md:664-665`, `:855-859`). `UnaidedAccuracy` is ruled "really, really bad" (`:253-259`); judge whether it reads as a last resort.
- **Arc rule (Q2).** Arcs apply to the player as well as the AI. The map says it is a real difficulty change to be felt in the smoke (`:836-841`).
- **AI holds fire more** once `pOnHull` prices shots. The map calls that tuning, not broken AI (`:1396-1400`).
- **Penetration retune (F12-2)** is a ruled follow-up, "Retuning penetration is a follow up" (`:3223-3229`). The map does not tie it to a smoke. The only link is 2a step 1: shipped penetrators cannot reach interiors, so step 15 needs the scratch value.
- **Locomotion Q6, yaw weight (w = 3 recommended).** The map says settle it in the Cut 1 play check (`locomotion-cut.md:372-373`, `:903-904`), but the weight belongs to Cut 3's solver, which has not landed. There is nothing to feel today. Ambiguity, not a merge gate.
## 4. Already done: do not redo
- Play smoke for cultcache-cutover plus item-provenance, 2026-09-17: new game, combat, loot, save and Continue with brand and quality intact, death clears the run, stance toggle, `FieldShieldTest` (`cultcache-migration-cut.md:148-153`). It ran on the old tree, so steps 3, 6, 16 and 17 are rechecks, not repeats of a gap.
- Studio click-through for the CultCache port, 2026-09-17: AmmoType refs repointed at `515859cf`, `dangling` at 0, schematic underlay restored and checked (`cultcache-migration-cut.md:161-165`).
- Bow is +y on the schematic, confirmed 2026-09-22 from the schematic images (`fire-control-cut.md:2028-2029`). The blast-anchor half is still open (step 15).
- Shield-panel play evidence, 2026-09-18, rigged scene: a panel spawns, is reused and spiderwebs; it shatters only near the rim (`shield-panel-cut.md:119-124`). Partial: the Cut 5 fixes landed after, so step 18 is still open.
- A play smoke on 2026-09-20 found the frozen-ship, no-hits and `LockWeapon` crash (`fire-control-cut.md:1464-1470`). That was a failure report, not a pass. Cuts 8 and 9 answered it and no recheck is recorded.
- Stats-and-power Cuts 0-1 landed with Soul verification and your re-author ruling (`stats-and-power-cut.md:79-99` onward). No operator check remains from them.
## 5. Not part of this merge
- Stats-and-power tier control in the schematic UI (O5) and the deletion of `IOrderedBehavior`/`SortPosition` (O3): no `PowerTier` under `Assets/Scripts/UI` at the tip, and `SortPosition`/`IOrderedBehavior` still exist in `Reactor.cs`, `Entity.cs` (my grep). `stats-and-power-cut.md:752-753`, `:985-989`.
- Stats-and-power UI reconciliation (O8: properties panel, trade menu, schematic HUD, Studio over a stat with terms): the map's Cut 8 has not landed; the branch's "Cut 8" commits are the condition ratio (`:819`, `:991-992`).
- Settings-into-globals: only Cut 0 (delete 5 dead assets, `ea8b420e`) landed. Its play smoke and Studio click-through wait for Cut 1 (`settings-globals-cut.md:498-511`). The map header still says nothing landed.
- Build delivery: the two commits are the map and a ruling (`build-delivery-cut.md:5`, operator checks `:252,324,360,404`).
- Locomotion Cuts 2-5, including Q6 and Q4 (`locomotion-cut.md:360,905`).
- `content-batch-one.md` is a spec that writes no catalog data (`:5-8`).
- Fire-control follow-ups F12-2 to F12-8 (`fire-control-cut.md:3223-3250`).
## 6. Open questions still yours
- **Q12-5 (not ruled):** should the HUD show which target items are exposed from the current bearing? Recommended as a follow-up after 12.3, on the target-item cycling UI (`fire-control-cut.md:1959`, `:3215-3218`).
- **Locomotion Q4:** heading versus aim; blocks Cut 5 only (`locomotion-cut.md:905-913`, `:372`).
- **Locomotion Q6:** the yaw weight; open, does not block (`:372-373`).
- **Defaults Self took in 12.4, which you may overrule** (`fire-control-cut.md:3208-3213`): a blast ignores `DamageSpread` and P sits on the centre lane; `IncomingHit` fires for the host of a contact or delayed hit only; the delayed fuse point clamps to the last reached cell's exit; `Detonate` runs a flat armour, pool, hull pass.
- **Stale headers, not open questions:** the fire-control 12.3 "pending ruling" at `:2581` was ruled at `:2588`; Q12-9 is ruled A (`:3171`); the shield-panel Q1-Q7 block (`shield-panel-cut.md:61`, `:800-`) was not updated after Cuts 1-5 landed, Q5 being ruled C (`:839-846`).
## 7. What happens after you sign off
- **Self merges `codex/fire-control-12` to `master` with `--no-ff`**, in a separate worktree. That single merge carries item-provenance, the stats-and-power work, fire control and locomotion Cut 1. The cultcache-cutover and item-provenance merge into master already happened on 2026-09-17 (`9b85211f`, `cultcache-migration-cut.md:148`), so the maps' "merge the two together" instruction (`item-provenance-cut.md:82`) is spent. The tree merges clean today.
- Any of section 1's three uncommitted files you want included need to be committed to the branch first, or they stay out.
- **Soul gates outstanding:**
- Fire-control 12.4 Soul passes: running tonight. The 12.4 section carries no "closed" status yet (`fire-control-cut.md:2602`). 12.0-12.3 are closed (`:2168-2210`, `:2253`, `:2385`, `:2522`).
- CultMath bounded least squares is locomotion Cut 2, not in this stack (`locomotion-cut.md:508`, `:360`). It gates nothing here.
- Unrecorded: a Unity batchmode compile at the tip `4b594e11`. 12.2 and 12.3 record clean compiles at their own heads.
- **Soul status at merge time: Self fills in.**
## 8. Results: play smoke, 2026-09-30 (operator plays, agent records)
Tree: `codex/fire-control-12` at `113164fa` plus the fixes listed below. `run.cc` and `player.cc` moved to
`GameData/stale-2026-09-22/` before launch.
**Compile.** The Unity 6000.3.24f1 batchmode compile at `113164fa` was clean (exit 0, no `error CS`). The four
never-compiled files needed no fix. One warning, `EntityInstance._destroyed` assigned but never read, is legacy
(`729ab0e8`).
**Changes made during the smoke.**
- `e0a80208`: `AetheriaInput.cs` regenerated; Cycle Target Item bound through `Input.Player.CycleTargetItem`,
retiring the by-name `FindAction` stopgap. Batchmode recompile clean.
- `97edf48c`: `ARPG.unity` Debug Info Panel and `FieldShieldTest.unity` shield-panel Cut 4 rig committed.
- Console: control characters from text input are no longer appended, and Backspace deletes (see step 6 finding).
- `give` (operator ruling 2026-09-30): an unknown name and a full cargo bay now say so instead of doing nothing. A
ship hull is refused unless docked; when docked it goes through `ActionGameManager.CommissionShip`, the same
primitive `TradeMenu.Buy` now uses, and moors a bare player ship at the docked entity with no docking bay
("mothballed ships do not require docking bays"). Non-ship hulls are refused. This is the step 7 path to a
restored hull.
- Scratch weapons authored in place in `GameData/Aetheria.cc` (not committed; restore with
`git checkout -- GameData/Aetheria.cc`): `Smoke Proximity` (Proximity, blast 8), `Smoke Delayed` (Delayed,
blast 4, penetration 2 cells), `Smoke Refused` (Proximity, blast 30, range 20). Each is a Spectra clone, energy,
1 column by 2 rows, to fit the test ship's only energy hardpoint.
| Step | Result | Evidence |
|---|---|---|
| 3 Launch to main menu | pass | Operator reached play through step 6 with no reported Addressables errors. |
| 4 New Game | pass | As above. |
| 5 Addressables, Use Asset Database | partial | Charged weapon (ChargeBlast SG) unprovable: the test ship's only energy hardpoint is 1x2 and ChargeBlast SG is 2x2. Instant weapon not separately reported. |
| 6 Provenance in play | partial | Properties panel correct for starting gear and for a purchased item. **Tier colours missing everywhere**: known defect, `settings-globals-cut.md:150` (Unity-serialised `RarityTier.Color` loads as zero); fixed by settings-globals Cut 1, not part of this merge. `give Lamp` was first refused (console finding), then silently did nothing: `Lamp` is a test-fixture name, absent from the live catalog, and `give` reported no miss (now it does). No-Manufacturer check still open with a real unbranded design. Loot brand not yet reported. |
**Finding, console (not fire control).** Every console command was refused with "commands take only letters,
digits, spaces and hyphens", and Backspace inserted a glyph. Cause: `Keyboard.onTextInput` delivers control
characters (`\b`, `\r`), and `ConsoleView` appended them to the input line. Enter's `\r` rode into every command;
`d503f076` (2026-09-14, on master) correctly changed the parser from stripping disallowed characters to refusing
them, which exposed it. Backspace had never been handled (only Delete), which is legacy (`7006a6b0`).
**Feel notes.** Engaging an AI Djinni: the player was destroyed decisively. "Game is hard."
**Finding, ship purchase and docking bays (design gap, not a merge gate).** The intended UX is that a purchased
ship is assigned its own docking bay. The code does not do that:
- `TradeMenu.Buy` (`TradeMenu.cs:373-381`) creates a bare `Ship` parented to the docked station and assigns it no
bay. It also charges `data.Price` rather than the lot's quality price that `GetPrice` computes for other items.
- `LoadoutGenerator` equips exactly one docking bay per station (`LoadoutGenerator.cs:84-92`), so Zenith has one.
- The inventory panel's Current button (`InventoryPanel.cs:110-120`) sets the new ship as current and overwrites
the single bay's `DockedShip`; the previous ship stays a station child with no bay.
**Smoke stopped after step 6 (operator, 2026-09-30).** The operator rejected the script as a monolithic play order
that does not respect how the game works: step 7 alone meant spawning and fitting a whole Djinni by catalog name.
Direction: operator checks become a list of behaviours verified over time, each set up by an authored, retained
scenario selectable from the main menu (a Eureka cut). Steps 7-20 and handoff checks A-F are unplayed. The operator
prefers to merge now, with those as open entries to verify through scenarios; Self rules on the merge.
**Stale expectations found in this checklist.** Step 6 transcribes `item-provenance-cut.md:529-537` (written
2026-09-17 03:38, `7425ff1b`). "Starting-ship items show tier colour" was falsified by that day's smoke and recorded
at `settings-globals-cut.md:150` (`db420981`, 17:36); the provenance map was never corrected and this checklist
copied it despite its own section 5. "`give Lamp`" names a test fixture (`LoadoutTests.cs:289-312`), never a live
catalog design, and `give` could not have run at all between `d503f076` (09-14) and `f935c29b`.

674
docs/scenarios-cut.md Normal file
View file

@ -0,0 +1,674 @@
# Scenarios: Cut Map
Date: 2026-09-30, 02:10 CEST. Imagination pass.
Status: cut map. Nothing has landed. The target lives in section 0 until Self splits it out into
`docs/scenarios-target.md`; this document owns the means.
Anchors are against Aetheria `origin/master` `dcd7bbc5` (the fire-control merge), read in the clone
`C:\ws72-fuse5` with `git show`/`git grep`. The operator's tree `F:\Projects\Aetheria` was not touched. No
build ran and no Yggdrasil job ran. **(read)** marks a claim read from source at the anchor. **(probe)** marks a
claim measured against a real file.
---
## 0. Target
### 0.1 The request, in the operator's words (2026-09-30)
> "I feel like this would be much more manageable as a list of things to verify over time rather than a
> monolithic smoke script that doesn't respect how the game works. Move gear onto Djinni? That's a lot of items
> to spawn, and am I expected to have the catalog memorized to spawn them? If you want me to test a bunch of
> behaviors under specific conditions, find a way to spawn me in an arena where those conditions are present. If
> you want me to kill a guy and loot him, spawn me next to a ship with no armor or weapons, that sort of thing. I
> wouldn't mind a scenario affordance in the main menu for this sort of job, that way the test fixtures can be
> authored, retained and available. But that sounds like a Eureka cut."
What those words settle, so no question below re-asks them:
- **A scenario is an arena whose conditions are present at spawn.** The player's ship and every other entity are
already fitted and placed. The operator never spawns gear by catalog name and never fits a ship by hand.
- **The fixtures are authored and retained,** and the main menu lists them.
- **Verification is a list of behaviours checked over time,** not a play order.
### 0.2 Ends
- The main menu lists scenarios. Picking one starts a run in its arena.
- A scenario is typed catalog data. It is authored once, kept in git, and replayed at any later revision.
- Every operator check is a typed **check** record: what to do, what to observe, where the rule came from, and
the scenario that sets it up. Results accumulate as typed records carrying the revision they were observed at.
- Checks A-F and checklist steps 7-20 are the first consumers (section 5).
### 0.3 Invariants
- **One owner decides what a new run starts with.** A plain New Game and a scenario launch share the menu path,
the galaxy build, `StartGame` and the staging owner. Scenario launch is New Game with a scenario as input; there
is no second boot path. A plain New Game is the absent-scenario case.
- **One primitive admits an entity into a zone.** Zone construction, staging, warp arrival and undock all admit
through it, and agents are created there and nowhere else.
- **A scenario sets conditions and nothing else.** Once staged, its entities are ordinary run state. The rules
under test run through the same code whether or not a scenario started the run. No scenario-only branch exists
in simulation code.
- **Fixtures are typed state.** Scenario, loadout presets and test designs are CultCache catalog records. Checks and
results are CultCache records. No load-bearing JSON, text scripts or prose checklists.
- **A scenario that cannot stage is refused before anything is cleared,** with its failures listed.
- **The catalog stays read-only at runtime** (`AetheriaStores.cs:13-21`).
### 0.4 Not in scope
- The full run lifecycle owner (`Run`) of `docs/headless-playground-cut.md` Cut 1 (warp, dock, save, death as one
ServerShared owner) and its `AetherDb play` interpreter (Cut 3). This map takes over only the new-run staging
half. The playground map is stale (anchors `1e647953`, fork S superseded by settings-globals) and must be
re-anchored before Hands. When it lands, its `new` command stages a `Scenario` record instead of reading a
`.play` text line.
- Brokkr. It is not needed for any cut here: agents author scenarios headless through `AetherDb`, and the operator
launches them from the menu. Brokkr's Unity actions (`setEditorPlayState`, `captureEditorView`, scene edits;
`F:\Projects\Brokkr` `1357705`, read) have no way to pick a scenario in the menu. Agent-driven Unity play would
need an Aetheria install cut plus a "launch scenario" intent. Recorded as a follow-up, not a fork.
- The ship-purchase docking-bay gap (checklist section 8). It is a design gap in `TradeMenu.Buy` and
`CommissionShip`, not a verification affordance. `CommissionShip` stays; `TradeMenu.Buy` is its consumer.
- Tier colours (settings-globals Cut 1). The check is recorded as a known failure (section 5).
- Balance and feel tuning. A check can record a feel call; it does not tune.
---
## 1. Body findings
### 1.1 The new-run path today (read)
| Concern | Anchor | Notes |
|---|---|---|
| Menu | `MainMenu.cs:92-184` | Continue `:103-108`; New Game `:110-176`; Settings; Quit. The same component runs in-game (`InGame`, `:96`), so the menu reappears on death (`ActionGameManager.cs:1171`). |
| Clear the run | `MainMenu.cs:113` | `RunSave.Clear` at click time, before the galaxy is built. |
| Galaxy | `MainMenu.cs:124-175` | `TutorialPassed` is never set anywhere, so New Game always takes the prelude branch `:146-175`. The background noise position comes from `UnityEngine.Random` (`:128,153`). The seed defaults to the clock (`Galaxy.cs:106,158`). |
| Handoff | statics `ActionGameManager.CurrentGalaxy`, `IsTutorial` (`:96-97`) | read by `StartGame`, `SectorMap`, and nulled by `Die` (`:1173`). |
| Start | `StartGame` `:796-834`, called from `Start` `:491` | New run `:803-815`: `PopulateLevel(Entrance)`, `LoadoutGenerator.GenerateShipLoadout` filtered by `GameSettings.StartingHullName` (`GameSettings.cs:13`, authored `LonginusX`), unpack, `Zone.Entities.Add`, `Activate`, `BindToEntity`. Continue `:817-833`. |
| Zone entry | `PopulateLevel` `:710-744` | generates the pack lazily (`:714-722`), moves the pilot (`:731-737`). |
### 1.2 What a scenario can reuse (read, one probe)
- **Loadout presets already exist.** `aetheria.loadout` (`Loadout.cs:13-20`) holds a hull design, per-cell slot
designs with rotation, and weapon groups. It is a catalog type (`AetheriaStores.cs:9`), authored in Studio or by
the editor console command `capturepreset` (`ActionGameManager.cs:624-662`, `Loadouts.Commit` `Loadout.cs:70-87`).
`Loadouts.Materialize` (`:96-159`) builds a live `Ship` all-or-nothing, listing every failure.
- **No game path calls `Materialize`** (`LoadoutGenerator.cs:152-153` says so; only `LoadoutTests.cs:310,899`
call it).
- **(probe)** The live catalog holds no preset: the schema name `aetheria.loadout` does not occur in
`GameData/Aetheria.cc` (12,698,108 bytes at `dcd7bbc5`), while every populated type's name does (for example
`aetheria.hulldata`, `aetheria.weaponitemdata`). Method: `grep -a -o` over the file.
- `Materialize` always builds a `Ship` (`:131`). A turret hull cannot be materialized.
- It resolves every design through a product (`Resolve`, `:103-115`). A design with no product fails.
- **Unbranded lots exist.** `ItemManager.CreateLot(design, maker, quality)` (`ItemManager.cs:161`) with no maker is
how `give` made its items (`ActionGameManager.cs:538,542`). Provenance's "no Manufacturer row" check depends on
them.
- **Economy exclusion follows from products.** Generation iterates products and requires
`product.Manufacturer.IsSet()` and `design.Price > 0` (`LoadoutGenerator.cs:126-133`). A design with no product
is never generated, stocked or sold. Loot is what a killed entity carries (`EntityInstance.cs:302-321`), so it
cannot leak through loot either unless a scenario fits it.
- **Prelude galaxies offer every product.** `IsAvailable` returns true when `Galaxy.IsPrelude`
(`LoadoutGenerator.cs:154-156`). A preset materialized in a prelude arena never fails on faction availability.
- **Agents are made only at zone construction.** `Zone`'s constructor gives every packed non-player `Ship` a
`Minion` (`Zone.cs:120-131`, `CreateAgent` `:135-142`). An entity added later gets none. A `Minion` targets the
first visible enemy and fights (`Minion.cs`).
- **An entity joins a zone in four other places,** each by hand: `spawnturret` (`ActionGameManager.cs:587`),
`PopulateLevel` (`:735`), `StartGame` (`:813`) and `Entity.TryUndock` (`Entity.cs:1006`).
- **IFF overrides are entity-local and unsaved.** `Entity.SetIff(other, bool?)` (`Entity.cs:529-533`) decides
`IsHostileTo` ahead of faction rules (`:535-552`). A `Materialize`d ship has no faction, so it is neutral unless
overridden.
- **A target that dies and a target that leaves are the same case in fire control.**
`targetGone = shot.Target != null && !zone.Entities.Contains(shot.Target)` (`FireControl.cs:610`), and death
removes the entity from `Zone.Entities` (`Zone.cs:93`). Check A.3 ("the target warps away") is therefore set up by
killing a fragile target while a fused round is in flight. No departure machinery is needed.
- **An orbital entity with no orbit stays where it is put** (`OrbitalEntity.cs` `Update`: position follows the
orbit only when one is set). That is how `spawnturret` placed turrets (`ActionGameManager.cs:583-588`).
- **Headless tests already open the live catalog and the authored settings**
(`RestoredHullsTests.cs`: `AuthoredSettings.Load`, `OpenReadOnlyRealCatalog`). A staging test can generate a
prelude galaxy, build the arena zone and stage a scenario with no Unity.
### 1.3 Debug affordances a scenario replaces (read)
| Affordance | Anchor | Added for |
|---|---|---|
| `give <name>` | `ActionGameManager.cs:515-544` | ad hoc items; the hull route through `CommissionShip` was added tonight in `f935c29b` for step 7 |
| `spawnturret` | `:564-589` | a hostile turret next to the player |
| Neutral wanderers | `ZoneGenerator.cs:342-356`, `EligibleWandererFactions` `:361-365`, `ZoneGenerationSettings.NeutralWandererCount` (`Settings.cs:156`), tests `IffAndCombatTests.cs:329-350` | commit `f732cff9` (2026-09-17): "Spawn neutral wanderers so combat has something non-hostile to target". The code comment calls it a "Testing affordance". Every generated zone carries two. |
Staying, because no scenario replaces them: `iff` (flip a live target's stance mid-play), `trackmissile` (camera),
`revealzones` (map), `tow` (a verb bound to the console), `capturepreset` (the in-play authoring tool for presets).
### 1.4 Collisions with open branches (read)
- `codex/mining` rewrites `Zone.cs` (+239/-). Cut 1 edits the constructor loop and adds the admission primitive.
Land Cut 1 after mining merges, or re-anchor.
- `codex/moddable-ships` edits `AetheriaStores.cs` (line 9, the catalog type list). Cuts 1 and 3 edit the same
lines.
- `codex/item-provenance` carries the narrative map, which edits `MainMenu.cs:132,160` and the `Galaxy`
constructors. Cut 2 edits the same New Game block.
---
## 0b. Identity, lifecycle, authority
No cut is mapped against an empty cell.
| Kind | What names it | Lifecycle | Who decides |
|---|---|---|---|
| **Scenario** (`aetheria.scenario`, catalog) | `CultName` `Name`; key `scenario:<Name>`, derived like `Loadouts.KeyOf` | Authored, then edited in place. A rename is a new record; the old one is deleted, and the checks that pointed at it are repointed in the same commit. A result never points at a scenario (it points at a check), so history survives. A scenario whose presets stop materializing is caught by the staging test (Cut 4), not at play time. | Authored by agents through `AetherDb` or by the operator in Studio. The operator owns what an arena contains. |
| **Loadout preset** (`aetheria.loadout`, existing) | key `loadout:<Name>` (`Loadout.cs:62`) | Unchanged: authored, replaced only explicitly (`Commit(..., replace)`). | Unchanged. |
| **Test design** (catalog `ItemData`, no product) | name; key minted by `Upsert` | Authored with the scenario that needs it. Lives as long as a preset references it. Per Q3. | Operator (Q3) on whether they exist at all. |
| **Check** (`aetheria.check`, ledger store) | `CultName` `Slug`; key `check:<Slug>` | Authored. Its statement is edited in place when a ruling changes (git keeps the history). It is retired, never deleted, once any result references it: `Retired` plus a reason. | The rule's owner (a ruling or a map) decides what it says. Agents transcribe it with a source pointer. |
| **Check result** (`aetheria.checkresult`, ledger store) | key `checkresult:<Slug>:<At as UTC ticks>` | Append-only. Never edited or deleted. A correction is a new result whose note says what it corrects. The latest by `At` is the current status. Order is carried in the data (`At`), not in delivery. | The operator's observation. Who writes the record is Q2. |
| **Pending scenario** (runtime) | `ActionGameManager.PendingScenario`, a static | Written once by the menu's launch, read and nulled once by `StartGame`'s new-run branch. Null for Continue. Never saved. | Command-only transport. It decides nothing. |
| **Staged entities** (runtime, then run state) | ordinary entities | Born at staging. From then on they are run state and saved with the zone like any other entity. Two things are not saved: whether a ship was left unpiloted, and scenario IFF overrides. After Continue, an unpiloted scenario ship gets a `Minion` by the constructor rule and its stance reverts to faction rules (neutral, since presets carry no faction). A scenario run is meant to be played through in one sitting. | `RunStart` at birth; the zone afterwards. |
---
## 2. Target shape
### 2.1 Types (names and rules; bodies are Hands')
`Assets/Scripts/ServerShared/Scenario.cs`, catalog:
- `Scenario` (`aetheria.scenario` v1):
- `Name` (`CultName`).
- `Brief`: the conditions in one or two lines, shown in the menu.
- `Seed` (`uint`): the arena galaxy and the background noise both derive from it, so the arena is the same layout
every launch. Combat rolls are already zone-seeded (`Zone.cs:84`). Lot quality still comes from the
clock-seeded `ItemManager.Random` (`ItemManager.cs:20`), so stats vary slightly per launch. Accepted.
- `Ambient` (`bool`): true keeps the arena zone as generated. False keeps planets, orbits and stations but drops
generated ships and turrets, so nothing wanders into the conditions.
- `Player` (`ScenarioShip`).
- `Entities` (`List<ScenarioEntity>`).
- `ScenarioShip`: `Loadout` (`CultRecordRef<Loadout>`), `Position` (`float2`, zone xz), `Direction` (`float2`),
`Cargo` (`List<CultRecordRef<EquippableItemData>>`, stored in the first cargo bay).
- `ScenarioEntity : ScenarioShip`: `Stance` (`Neutral | Hostile`, applied both ways through `SetIff`) and `Piloted`
(`bool`: a `Minion`, or no agent at all).
- A preset's hull type picks the entity class: a ship hull gives a `Ship`; a turret hull gives an orbital entity
with no orbit, stationary at its position. A station hull is refused as a staging failure.
`Assets/Scripts/ServerShared/Checks.cs`, ledger store (`GameData/Checks.cc`, committed, LFS by the existing
`GameData/*.cc` rule):
- `Check` (`aetheria.check` v1): `Slug` (`CultName`), `Statement` (what to do and what must be observed),
`Source` (the ruling or map pointer, `doc:line`), `Scenario` (`CultRecordRef<Scenario>`, optional), `Setup`
(text, only when there is no scenario: "FieldShieldTest scene", "CultCache Studio", "Addressables play mode Use
Existing Build"), `Retired` and `RetiredReason`.
- `CheckResult` (`aetheria.checkresult` v1): `Check` (ref), `Result` (`Pass | Fail | Partial | Blocked`),
`Revision` (the commit the operator played, plus `+dirty` when the tree had changes), `At` (UTC), `Note`,
`Recorder`.
Naming: "check", not "behaviour". `Behavior` is already the gear-behaviour type family
(`Assets/Scripts/ServerShared/Behaviors/`), and a document named `Behaviour` beside it reads as a typo.
Where they live, and why:
- Scenarios, presets and test designs are design-side fixtures. They go in the catalog: presets are already
catalog data, cross-type refs resolve inside one store, and Studio edits them side by side.
- Checks and results are the verification ledger. They go in their own store. The shipped catalog carries no
history, results never trigger a catalog write, and "one commit lands in one store" holds: recording a result
touches the ledger only.
### 2.2 The staging owner
**Owner: `RunStart`, a static class in `Assets/Scripts/ServerShared/RunStart.cs`.** It decides what a new run
starts with: how the arena zone is generated, the player ship, the other entities, their stance, pilot and cargo.
It holds no Unity type.
- **Inputs:** `ItemManager` (and through it the catalog), the `Galaxy`, `ZoneGenerationSettings`, the optional
`Scenario`, and, for the absent-scenario case, the default hull filter and faction `StartGame` uses today
(`:805-809`).
- **Outputs:**
- the arena's `ZonePack`, with the `Ambient` rule applied inside generation (`ZoneGenerator.GenerateZone`
gains the parameter), not generated and then pruned;
- the admitted player `Ship`, flagged `IsPlayerShip`;
- the admitted scenario entities;
- a failure list. Staging is all-or-nothing, as `Materialize` is.
- **A check entry** that validates a scenario without a zone (every preset materializes, every cargo design
exists). The menu calls it before `RunSave.Clear`; the staging tests call it on every catalog scenario.
- **Derived state:** `ActionGameManager.CurrentEntity` is bound to the returned player. `PendingScenario` is
transport only.
- **Forbidden writers:** `StartGame` may not generate, unpack or admit the player ship. `MainMenu` may not stage.
No console command admits entities (`give` and `spawnturret` die, Q4).
- **Shared paths:** New Game and scenario launch both run menu, galaxy, `StartGame`, `RunStart`. Continue does not
stage.
- **Deletion line:** `StartGame` `:805-814` (generator, unpack, add, activate). The only surviving line is the
bind.
**Admission primitive: `Zone.Admit(Entity entity, bool piloted)`.** It adds the entity to `Entities`, activates it,
and, when `piloted`, gives it the zone's `Minion` (the `CreateAgent` rule, `Zone.cs:135-142`). It is the only writer
of `Entities.Add` and the only creator of agents.
- The constructor loop (`:120-131`) calls it with `piloted: ship && !IsPlayerShip`. It keeps its own rule that
moves a ship packed at the origin (`:129-130`); that is generation placement, not admission.
- `PopulateLevel` (`ActionGameManager.cs:735`), `Entity.TryUndock` (`Entity.cs:1006-1007`) and `RunStart` call it.
`spawnturret` (`:587`) is deleted.
- The `Death` subscription (`Zone.cs:93`) stays on `ObserveAdd` and still covers every join.
**`Loadouts.Materialize` gains two rules** (`Loadout.cs:96-159`):
- A design with **no product at all** is built unbranded, through `CreateLot(design, default, quality)` at one
named quality constant (0.95, the quality `give` used). A design whose products are all unavailable still fails,
as today. The rule turns "no manufacturer makes it" into "outside the economy", which generation already obeys.
- The **hull type picks the entity class** (section 2.1).
- The comment at `LoadoutGenerator.cs:150-153` ("No game path materializes a preset yet") is rewritten to name
`RunStart`.
### 2.3 The Unity lowering
- `MainMenu.ShowMain` (`:92-184`) gains **Scenarios**, shown when `Debug.isDebugBuild` (editor and development
builds). It opens a panel with one button per catalog scenario, ordered by name. Under each button is its brief
and its checks, each with its latest result and revision, read from the ledger (display only). A scenario whose
check entry fails shows the failures and is disabled.
- **One launch body** is extracted from the New Game lambda (`:110-176`). New Game calls it with no scenario; a
scenario button calls it with one. With a scenario, it runs the prelude branch (`:146-175`) with `Seed`, derives
the noise position from `Seed` instead of `UnityEngine.Random`, sets `PendingScenario`, and loads `ARPG`. The
check entry runs first; `RunSave.Clear` (`:113`) moves after it, so a refused scenario leaves the saved run intact.
- `StartGame`'s new-run branch (`:803-815`) calls `RunStart`, binds the returned player and nulls
`PendingScenario`. The Continue branch asserts it is null.
- `AetheriaStores.Open` gains an optional ledger path. The game attaches `GameData/Checks.cc` read-only; `AetherDb`
attaches it writable for the record commands (Cut 3).
### 2.4 Authoring
- **Agents author headless through `AetherDb`.** A seed command (Cut 4) declares the first set in C#. It writes a
record only when the key is absent. When the key exists and differs from what it would write, it refuses and
reports; that means Studio edited it, and Studio wins. When the key exists and matches, it does nothing. It
validates every scenario through the `RunStart` check entry before committing. So the catalog is the authority,
and the seed code never clobbers it.
- **The operator authors in Studio and in play:** Studio for scenario fields; `capturepreset` for a ship fitted by
hand in play.
- Results are recorded per Q2.
---
## 3. Cuts
Build budget, every cut:
- `Aetheria.Shared` (netstandard2.1, the Unity-independence check), `tests/Aetheria.Shared.Tests`, `tools/AetherDb`
(net10.0), Debug.
- CultLib is unchanged; the pins are those in `hands-fuse8/run.sh`.
- No new project, target, package or daemon. One new store file (`GameData/Checks.cc`), three new schemas.
- **Build host:** Yggdrasil builds the headless projects (`run.sh <rev>`). `Assembly-CSharp` is proven only by a
Unity 6000.3.24f1 batchmode compile on Starfire, with the editor closed by the operator. Never kill Unity.
- `run.sh` mounts a pinned `data/Aetheria.cc` over the tree's LFS file. Any cut that changes the catalog (Cut 4)
must refresh that pin, or its content tests read the old catalog. Cut 4's tests that read the ledger mount it the
same way. Yggdrasil's disk is saturated: one job per cut, `--artifacts-path` in the container.
Order: 0, 1, 2, 3, 4. Cut 0 is subtraction alone, so Soul can falsify it alone. Cuts 1 and 3 are headless. Cut 2
is the only Unity-side cut. Cut 4 is content.
### Cut 0. Retire the ad hoc test affordances (Q4)
- **Repo/branch:** Aetheria, `codex/scenarios` from `master` `dcd7bbc5`.
- **Deletes first** (per Q4 A; B keeps the item branch of `give` and the wanderers):
- `ActionGameManager.cs:515-544`, `give` (30 lines).
- `ActionGameManager.cs:564-589`, `spawnturret` (26 lines).
- `ZoneGenerator.cs:342-356`, neutral wanderers (15 lines), and `EligibleWandererFactions` `:361-365` (5).
- `Settings.cs:156`, `NeutralWandererCount` (1). It is absent from `Settings.asset` (settings-globals `:72`), so
no asset edit is needed.
- `IffAndCombatTests.cs:329-350`, the two wanderer tests (22).
- **Keeps:** `CommissionShip` (`:898-903`) and its consumer `TradeMenu.Buy`; the console fixes in `f935c29b`.
- **Docs:** `docs/merge-to-master-checklist.md` section 8, the `give` bullet: add "retired by the scenarios cut"
with the commit. `docs/settings-globals-cut.md:72,348` get a one-line history note.
- **Verification:**
- builds: `Aetheria.Shared`, the test project. Batchmode compile (`ActionGameManager.cs` changed).
- tests: the full suite is green. The locomotion "real enemy-count check" (`95394f78`) counts generated ships;
if it counted wanderers, fix its expectation and say so.
- negative: `rg -n '"give"|"spawnturret"' Assets/Scripts` is empty;
`rg -n "NeutralWanderer|EligibleWandererFactions" Assets tests tools` is empty. Both patterns were checked to
match only these sites today.
- operator: none. There is nothing to see until Cut 2.
- **Ledger:** about -99 lines; 0 added.
### Cut 1. `RunStart`, `Zone.Admit`, and the scenario type (headless)
- **Repo/branch:** Aetheria `codex/scenarios`, on Cut 0. Re-anchor `Zone.cs` if mining has merged.
- **First:** with `AetherDb hardpoint-fit` and a scratch `Materialize` against the live catalog, confirm that
`Djinni`, `LonginusX` and one turret hull each have a product and materialize bare. If one has no product, stop
and report: the Q3 rule would make it unbranded, which may not be intended for a real hull.
- **Deletes first:**
- `ActionGameManager.cs:805-814`, the new-run spawn (it moves into `RunStart`; this cut leaves `StartGame`
calling `RunStart` with no scenario, so behaviour is unchanged).
- The four hand-written joins: `ActionGameManager.cs:735-736`, `Entity.cs:1006-1007`, `Zone.cs:124-125`, and the
agent add at `Zone.cs:128`. Each becomes `Admit`.
- **Adds:** `Scenario.cs`, `RunStart.cs`, `Zone.Admit`, the `ambient` parameter on `ZoneGenerator.GenerateZone`
(`:38-43`; the ship loop `:334-340` and `PlaceTurrets` calls `:309,331` honour it), `Scenario` in
`AetheriaStores.CatalogTypes` (`:9`), and the two `Materialize` rules (`Loadout.cs:103-115,131`).
- **Authority map:** section 2.2. Owner `RunStart`; admission `Zone.Admit`; deletion line as above.
- **Verification:**
- builds: `Aetheria.Shared`, tests, `AetherDb`. Batchmode compile (`ActionGameManager.cs`, `Entity.cs` changed).
- tests (new `RunStartTests`: live catalog, authored settings, a prelude galaxy at a fixed seed). Each rule
must fail under its own mutation:
- With no scenario, staging yields a player of the `StartingHullName` hull, `IsPlayerShip`, admitted, at the
origin. This pins that New Game is unchanged.
- With a scenario, the player is the preset's hull and fit at the authored position and direction, and its
cargo holds the listed designs.
- A piloted entity has exactly one agent in `Zone.Agents`; an unpiloted one has none and stays put over 5 s of
`Zone.Update`.
- `Hostile` makes both `IsHostileTo` directions true. `Neutral` makes both false.
- `Ambient: false` leaves no ship or turret in the arena pack that the scenario did not place. Stations remain.
- A turret preset stages as a stationary orbital entity. A station preset is a staging failure.
- A scenario naming a missing design fails with that design named. The zone is unchanged, and no
`RunSave` call was made (the check entry touches no store).
- A product-less design materializes unbranded; a design whose only product is unavailable still fails.
This is two tests, because the second case is the existing contract.
- `Admit` is the only agent creator: after a warp (`PopulateLevel`'s join through `Admit(pilot, false)`) the
pilot has no agent. The constructor's pack path still gives every non-player ship a `Minion`.
- Stryker on `RunStart.cs`, `Zone.cs` (`Admit` and the constructor loop), `Loadout.cs` (`Materialize`), scoped
to the diff. Triage survivors by name.
- negative: `rg -n "Entities\.Add\(" Assets/Scripts --glob '!**/ZoneGenerator.cs'` matches only
`Zone.cs` (once, inside `Admit`), `Sensor.cs:169` and `Entity.cs:242` (both are `VisibleEntities`/pings, not
zones). `rg -n "new Minion\(" Assets/Scripts` matches only `Zone.cs`.
- operator: none beyond the Cut 2 smoke.
- **Ledger:** `Scenario.cs` +60; `RunStart.cs` +110; `Zone` +12 -8; `Loadout.cs` +20; `ZoneGenerator` +4;
`ActionGameManager` -11 +4; `Entity` ±2; `AetheriaStores` ±1; tests +300.
### Cut 2. The main menu launches scenarios (Unity)
- **Repo/branch:** Aetheria `codex/scenarios`, on Cut 1.
- **Deletes first:** the duplicated body of the two galaxy branches in the New Game lambda (`MainMenu.cs:124-175`)
collapses into one launch body. The standard branch (`:124-145`) is live code only when `TutorialPassed` is
true, and it is kept. Only the duplication goes.
- **Adds:** the Scenarios panel, `PendingScenario`, the seed-derived noise, the check entry before
`RunSave.Clear`. `StartGame` passes `PendingScenario` to `RunStart`.
- **Authority map:**
- Owner of what the run starts with: `RunStart` (unchanged).
- `MainMenu` owns which scenario was picked and when the run is cleared. `PendingScenario` is a command-only
transport, consumed once.
- Forbidden: `MainMenu` stages nothing and admits nothing. `StartGame` reads `PendingScenario` only in the
new-run branch.
- Shared paths: both buttons run one launch body. In-game menu (after death) and title menu run the same one.
- **Verification:**
- builds: batchmode compile, editor closed.
- negative: `rg -n "RunSave\.Clear" Assets/Scripts/UI/MainMenu.cs` appears once, after the check entry.
`rg -n "PendingScenario\s*=" Assets/Scripts` matches the launch body and `StartGame`'s null only.
- operator (Unity, Starfire):
1. Title menu: Scenarios is listed. New Game still starts a LonginusX at the entrance with a Zenith station
(the Cut 1 test pins the ship; this proves the lowering).
2. Launch any scenario. The arena matches its brief; launch it again and the layout is the same.
3. Die in a scenario. From the in-game menu, relaunch the same scenario.
4. Quit mid-scenario, then Continue. The run continues (the 0b rule: unpiloted ships now patrol).
5. Break a scenario on purpose in a scratch catalog (a missing design). It is shown disabled with the failure,
and Continue still offers the previous run.
- **Ledger:** `MainMenu` +45 -25; `ActionGameManager` +4; one static.
### Cut 3. The verification ledger (headless; Q2)
- **Repo/branch:** Aetheria `codex/scenarios`, on Cut 1 (independent of Cut 2).
- **Adds:** `Checks.cs` (`Check`, `CheckResult`); `AetheriaStores.LedgerTypes` and the optional path;
`GameData/Checks.cc` (empty, committed).
- Under Q2 B, `AetherDb` gains two commands:
- `checks [scenario]`: each check with its latest result, its revision, and "never" when there is none.
- `record <slug> <pass|fail|partial|blocked> --revision <sha> [--note <text>]`. It refuses an unknown or
retired slug. It opens the ledger writable and the catalog read-only.
- Under Q2 A, the menu panel gains Pass/Fail/Partial and a note field per check. It writes through the same
ledger primitive, and the game attaches the ledger writable.
- **Authority map:**
- Owner of results: the ledger store. The only writer is the Q2 writer, which calls one append primitive,
`Ledger.Record`.
- Derived, display only: the menu's latest-status line and `checks`' output.
- Forbidden: nothing edits or deletes a `CheckResult`; nothing writes a result into the catalog.
- **Verification:**
- tests (new `LedgerTests`, temp stores):
- Recording appends and never replaces: two results for one check both survive a reopen, and the latest is
the one with the later `At`, even when written first.
- A retired or unknown slug is refused with nothing written.
- The catalog file is byte-identical after `record` (a catalog opened read-only cannot be written; this pins
that the command opened it that way).
- A result carries the revision it was given, and `record` without `--revision` is a usage error.
- Stryker on `Checks.cs` and the `AetherDb` record path.
- negative: `rg -n "CheckResult" Assets/Scripts --glob '!**/Checks.cs'` matches only the menu's read (and under
Q2 A its record call).
- **Ledger:** `Checks.cs` +50; `AetheriaStores` +4; `AetherDb` +90 (B) or `MainMenu` +50 (A); tests +120.
### Cut 4. The first scenarios, checks and history (content)
- **Repo/branch:** Aetheria `codex/scenarios`, on Cuts 2 and 3. Hands authors on the branch clone, never in
`F:\Projects\Aetheria`.
- **First:** tell the operator that the uncommitted smoke weapons in their tree's `GameData/Aetheria.cc` must be
restored (`git checkout -- GameData/Aetheria.cc`, their own command) before they pull. This cut recreates them as
committed designs.
- **Adds:**
- A transient `AetherDb scenario-seed [apply]` command, with the never-clobber rule of section 2.4.
- It writes the test designs (section 5.3), the presets (5.4), the scenarios (5.2) and the checks (5.1).
- It imports the 2026-09-30 smoke results (checklist section 8) as `CheckResult`s at revision `113164fa`,
recorder "operator (play), recorded by agent".
- It runs once, the data is committed, and the command is deleted in the same cut. The catalog is the authority
from then on.
- `ScenarioConditionTests` (live catalog; pinned catalog refreshed, see the build budget). Per scenario, stage it
and assert the conditions its checks need, not the behaviour, which existing suites own. For example:
- `Fused rounds`: the bare hull lies within the arc on the player's initial aim line and has no target
selected; the close hull is nearer than `Smoke Proximity`'s `BlastRadius`; `Smoke Refused` has
`Range < BlastRadius`; a direct-fire weapon can kill the fragile hull.
- `Duel`: the AI is piloted, hostile both ways, and carries a slow missile weapon; the player can see it.
- `Arcs`: the three bare hulls lie in the bow, beam and stern sectors of the player's mounts; the turret is
hostile.
- Every catalog scenario passes the check entry. This is the rot test.
- Every non-retired check with a scenario points at an existing one. Every check without a scenario has a
`Setup`.
- Docs: `docs/merge-to-master-checklist.md` sections 2 and 8 get one line: steps 7-20 and handoff checks A-F are
now checks in `GameData/Checks.cc`, listed by `AetherDb checks`. The prose steps stay as history.
- **Verification:**
- tests: `ScenarioConditionTests`, with mutation by editing a fixture. Moving the close hull outside the blast
radius, dropping the AI's missile weapon, or flipping a stance must each fail its condition. This is a one-off
Soul probe, not a committed suite.
- `AetherDb checks` lists every check in section 5.1, with the imported results on 3, 4, 5, 6 and "never"
elsewhere.
- operator: play each scenario and report per check. That report is the first real use of the ledger.
- **Ledger:** seed command +300 then -300; catalog +5 designs, +11 presets, +10 scenarios; ledger +44 checks, +7
results; tests +250; docs ±4.
---
## 4. Authority map (whole campaign)
- **Owner of a new run's contents:** `RunStart`. It reads the scenario (or its absence) and writes the arena pack
and the admitted entities.
- **Owner of zone membership and agents:** `Zone.Admit`.
- **Owner of fixtures:** the catalog (`Scenario`, `Loadout`, test designs), written by the seed, Studio or
`capturepreset`, and read-only at runtime.
- **Owner of verification history:** the ledger store. It is append-only and written by the Q2 writer.
- **Derived:** menu status lines; `AetherDb checks`; `PendingScenario` (transport).
- **Forbidden writers:** `StartGame` spawning ships; `MainMenu` staging; console commands admitting entities;
anything editing a result; any catalog write at runtime.
- **Shared paths:** New Game and every scenario launch: one launch body, `StartGame`, `RunStart`, `Admit`. Warp,
undock, construction and staging: `Admit`.
- **Deletion line:** Cut 0's affordances; `StartGame` `:805-814`; the four hand-written joins; the duplicated New
Game branches; the transient seed command.
---
## 5. The first consumers
Sources: `docs/merge-to-master-checklist.md` section 2 (steps 7-20) and section 8; checks A-F from
`F:\Projects\HANDOFF-aetheria-play-smoke-2026-09-29.md` section 3. That file sits outside the repo, so the checks
below restate A-F and the ledger becomes their home. The rulings behind A-F are in `fire-control-cut.md`, in the
block "Ruled (operator, 2026-09-30)" (`:2625-2690`).
### 5.1 Checks
| Slug | Statement (abridged; the record carries the full text) | Source | Setup |
|---|---|---|---|
| `restored-hull-flies` | Thrusters move and turn the Djinni. | step 7; `locomotion-cut.md:501` | Djinni shakedown |
| `restored-hull-speed-cap` | Take the hull offline with thrusters firing; speed does not run away. | step 7; `:377` | Djinni shakedown |
| `weak-reactor-starves-legibly` | A reactor too small for the loadout shows starvation, not a cooked reactor. | step 8; `stats-and-power-cut.md:705-706` | Starved reactor |
| `brownout-degrades` | Brownout reads as degradation, not breakage. | step 9; `:774,990` | Starved reactor |
| `brownout-refill-stutters` | A weapon refilling under brownout stutters rather than firing at full rate. | step 9; `:729-730` | Starved reactor |
| `memory-flat-across-zones` | Several zones with kills; memory does not climb. | step 10; `:672-673,980-982` | Long haul |
| `side-mounts-fire-abeam` | Side-mounted weapons fire at the beam target. | step 11; `fire-control-cut.md:397-398` | Arcs |
| `turret-tracks-round` | The hostile turret tracks the player all the way round. | step 11 | Arcs |
| `no-fire-through-hull` | Nothing fires at the stern target through the hull. | step 11 | Arcs |
| `shots-roll` | Rolled impacts and misses; a miss reads as a near-miss; damage matches the HUD. | step 12; `:659-661` | Duel |
| `subsystem-aim` | Reveal and selection work; aiming at a revealed subsystem concentrates damage. | step 12 | Duel |
| `kill-drops-loot` | The kill drops its cargo; pickup stores it; the tractor beam pulls. | step 12; `headless-playground-cut.md:789-794` | Duel |
| `loot-keeps-brand` | Picked-up loot shows its manufacturer. | step 6; `item-provenance-cut.md:528-539` | Duel |
| `target-vanish-safe` | The target dies with shots in flight: no crash, no frozen ship. | step 12; `fire-control-cut.md:1464-1470` | Duel |
| `beam-reads-higher` | The HUD `hull` factor reads higher from the beam than from the bow. | step 13; `:2380-2383` | Duel |
| `armour-face-missile` | Turn the armoured face into the AI's slow missile; it lands there. | step 13 | Duel |
| `ai-engages` | The AI still engages normally. | D; `:2658-2660` | Duel |
| `launcher-edge-pulse` | Launcher into the bow, then a flank: the schematic pulses the facing edge only. | step 14; `:2519-2520` | Launcher angles |
| `guided-explodes-on-detonation` | A guided round's explosion shows only when the simulation detonated. | E | Launcher angles |
| `guided-target-left-fades` | Kill the target while a guided round flies: the round fades with no explosion. | E | Launcher angles |
| `guided-hit-at-target` | A guided hit plays its effect at the target. | E | Launcher angles |
| `fused-clear-line-max-range` | Nothing selected, clear line: the round bursts at max range along the arc-clamped aim. | A.1; `:2625,2636-2642` | Fused rounds |
| `fused-first-hull-stop` | Nothing selected, aim at the bare hull: the round stops and detonates on it. | A.2; `:2632-2634` | Fused rounds |
| `fused-target-left-no-burst` | Fire at the fragile target, kill it with the direct weapon before arrival: no burst. | A.3; `:2636-2642`, `FireControl.cs:610` | Fused rounds |
| `fused-out-of-arc` | Select the stern target: the round fires and bursts at its range along the arc-clamped aim. | A.4; `:2643-2645` | Fused rounds |
| `fused-arming-pushout` | Select the close hull: the burst is pushed out to `BlastRadius` from the ship's centre. | A.5; `:2646-2653` | Fused rounds |
| `airburst-at-model` | A proximity airburst beside the LonginusX lands damage where the model shows the blast. | step 15; `:3094-3097` | Fused rounds |
| `penetrator-reaches-interior` | A delayed penetrator into the LonginusX nose detonates inside. | step 15 | Fused rounds |
| `hud-forecast-fused` | The HUD shows Direct, Burst at N m or Refused for fused weapons, and a percentage for direct weapons. | C; `:2661-2663` | Fused rounds |
| `unbranded-no-manufacturer` | An unbranded smoke weapon shows no Manufacturer row. | step 6 | Fused rounds |
| `refused-shot-free` | A refused shot costs no ammo, energy, heat, sound, visibility or cooldown. | B; `:2664-2666` | Refused rounds |
| `refused-beam-no-flicker` | A refused beam never starts. | B | Refused rounds |
| `refused-charge-never-charges` | A refused charged weapon never starts charging. | B | Refused rounds |
| `instant-and-charged-fire` | Autocannon and ChargeBlast SG fire; effects, particles and action-bar icons show. | step 5; `addressables-cut.md:362-366` | Weapon feel |
| `burst-cadence` | Burst cadence is unchanged. | F | Weapon feel |
| `charge-release-press` | A fast release-and-press on a charged weapon starts no second charge. | F | Weapon feel |
| `existing-build-play` | Under "Use Existing Build", the Weapon feel checks hold (GUID keys in the player catalog). | step 20; `addressables-cut.md:367-370` | Weapon feel, Setup: play mode Use Existing Build |
| `ai-never-fires-refused` | The hostile AI whose only weapon is refused never fires it. | D | AI fused discipline |
| `ai-never-bomb-fishes` | The neutral AI carrying a fused weapon never fires it. | D | AI fused discipline |
| `continue-keeps-items` | Warp, quit, Continue: same items, same tier and brand. | step 16; `item-provenance-cut.md:536-537` | Long haul |
| `death-ends-run` | Die: Continue is disabled and `run.cc` holds no ledger. | step 17; `:540-541` | Long haul |
| `shield-panel-rig` | The numbered shield-panel look, including the Cut 5 dicing and break-through. | step 18; `shield-panel-cut.md:683-700,737-739` | Setup: FieldShieldTest scene |
| `studio-*` (5 checks) | The fire-control union renders; the schematic underlay; restored hull records; the fuse fields edit; the provenance ledger renders from a real `run.cc`. | step 19 | Setup: CultCache Studio |
| `addressables-duplicates` | Analyze the duplicate dependencies: 5 known leftovers. | step 20 | Setup: Addressables Analyze |
| `new-game-start`, `purchase-keeps-brand`, `tier-colour` | New Game; buying keeps the brand; tier colours show. | steps 3, 4, 6 | Setup: New Game |
Imported results (checklist section 8, revision `113164fa`, 2026-09-30):
- `new-game-start`: pass.
- `purchase-keeps-brand`: pass.
- `instant-and-charged-fire`: partial ("charged weapon unprovable: 1x2 hardpoint").
- `tier-colour`: fail ("known defect, `settings-globals-cut.md:150`; fixed by settings-globals Cut 1").
- `unbranded-no-manufacturer`: blocked ("`give Lamp` named a test fixture").
- `loot-keeps-brand`: no result ("not yet reported").
### 5.2 Scenarios
All use `Ambient: false` except Long haul. Positions are authored in the seed and pinned by the condition tests.
| Scenario | Player | Entities | Checks |
|---|---|---|---|
| Djinni shakedown | Djinni, full fit | none | 2 |
| Starved reactor | a combat hull with an undersized reactor, energy weapons and a shield | 1 unpiloted bare hull ahead, neutral | 3 |
| Arcs | a hull with side mounts | 3 unpiloted bare hulls (bow, beam, stern), neutral; 1 turret preset, hostile | 3 |
| Duel | combat fit | 1 piloted LonginusX, hostile, carrying a slow missile weapon, cargo holding a branded item | 8 |
| Launcher angles | GT 3K or pswarm plus a direct weapon | 1 unpiloted LonginusX, hostile; 1 fragile bare hull | 4 |
| Fused rounds | Smoke Proximity, Smoke Delayed, a direct weapon | unpiloted: LonginusX mid range, hostile; bare hull on the clear bearing; fragile bare hull; close bare hull inside `BlastRadius`; stern target | 9 |
| Refused rounds | Smoke Refused (instant, beam, charged) plus one working weapon | 1 unpiloted bare hull | 3 |
| Weapon feel | a hull with a 2x2 energy hardpoint: ChargeBlast SG, Autocannon, a burst weapon | 1 unpiloted bare hull | 4 |
| AI fused discipline | a sturdy hull | 1 piloted neutral with a fused weapon; 1 piloted hostile whose only weapon is refused | 2 |
| Long haul | standard combat fit, `Ambient: true` | none | 3 |
### 5.3 Test designs (Q3)
None has a product. They are unbranded and outside the economy.
- `Smoke Proximity`: Proximity, blast 8.
- `Smoke Delayed`: Delayed, blast 4, penetration 2 cells.
- `Smoke Refused`: Proximity, blast 30, range 20.
These three are the operator's own designs from tonight, Spectra clones, energy, 1x2.
- `Smoke Refused Beam` and `Smoke Refused Charge`: a constant weapon and a charged weapon with a fuse and
`Range < BlastRadius`.
- All must pass `CultRecordRefs.Validate` (R-heat, stat modifiers, roles).
### 5.4 Presets
About eleven, named after their scenarios. The seed author picks designs with `AetherDb hardpoint-fit`. The only
hard constraints are those the condition tests pin.
---
## 6. Subtraction ledger
| Cut | Removed | Added | Targets, schemas, stores |
|---|---|---|---|
| 0 | `give` 30, `spawnturret` 26, wanderers 20, setting 1, tests 22 | 0 | no change |
| 1 | `StartGame` spawn 10, joins 6 | `Scenario.cs` 60, `RunStart.cs` 110, `Admit` 12, `Materialize` 20, `GenerateZone` 4; tests 300 | +1 schema (`aetheria.scenario`) |
| 2 | duplicated New Game body about 25 | menu panel and launch body about 45; 1 static | none |
| 3 | none | `Checks.cs` 50, stores 4, `AetherDb` 90 (or the menu 50); tests 120 | +2 schemas, +1 store file |
| 4 | the seed command, once spent (300) | seed 300; condition tests 250; catalog and ledger data | catalog content, ledger content |
Net production code is about +250. That buys:
- the main-menu scenario affordance;
- typed checks with history;
- one staging owner and one admission primitive (from five hand-written joins);
- the first game consumer of the presets that already existed.
It removes three ad hoc test affordances and the wanderers that ran in every zone.
---
## 7. Operator questions
Each question stands alone. The first is what the scenario request leaves open.
**Q1. Is a scenario arena part of a real run?**
Your words settle what an arena holds. They leave open what surrounds it. Checks 16 and 17 (warp, save,
Continue, death) need a real run. Every other check needs only the arena.
- **A.** The arena is the entrance zone of a small prelude galaxy built from the scenario's seed. Stations,
planets and wormholes are there, and the run saves on warp and quit, continues and ends at death like any run.
Launching a scenario replaces your saved run, as New Game does. Scenario-only details (unpiloted ships, forced
stances) do not survive a Continue.
- **B.** A sealed arena: one zone, no galaxy, no saving. Launching never touches your saved run. Checks 16 and 17
go back to plain New Game play. This is a second zone-entry path with no galaxy under it, which `PopulateLevel`
and the sector map do not support today.
- **Recommended: A.** It is the same New Game path with an input, so there is no second boot path. Every rule
under test then runs exactly as it does in a real run. Replacing the saved run seems harmless for a dev
affordance.
- **Depends on it:** Cut 2's launch body; the 0b lifecycle row for staged entities; whether Long haul exists.
**Q2. Who records a check's result, and where?**
You play and observe. Something has to write "pass at `abc123`, note ...".
- **A.** In game. The Scenarios panel gets Pass/Fail/Partial and a note per check. The game writes the ledger file
in your working tree, and you commit it with your other work.
- **B.** The agent. You tell the session what you saw, and it records typed results with `AetherDb record` on a
branch and pushes. The menu shows each check's latest result, read-only.
- **C.** No typed results. Checks are typed, and results go in a prose ledger doc, as checklist section 8 does now.
- **Recommended: B.** It matches how tonight's smoke already worked: you play, the agent records. Nothing in the
game writes a file that git tracks, and no agent needs to touch your tree. The menu still shows what is stale.
A can be added later on the same append primitive.
- **Depends on it:** Cut 3's writer and whether the game attaches the ledger writable.
**Q3. Where do test-only item designs live?**
Checks A-C need fused weapons the catalog does not ship. Tonight they were authored in place and left
uncommitted.
- **A.** Committed catalog designs with no product. With no product nothing makes them, so they are never
generated, stocked, sold or looted. A preset builds them unbranded (a new `Materialize` rule). Studio lists them
beside real content.
- **B.** Committed designs with a product and price 0. Generation skips price 0 today, but only through a filter
written for another reason, so the exclusion is a coincidence.
- **C.** A scratch catalog swapped in per session, as checklist step 2a proposed. Scenarios would then depend on
which catalog is loaded, and the fixtures would not be retained.
- **Recommended: A.**
- **Depends on it:** the `Materialize` rule in Cut 1; section 5.3.
**Q4. Which ad hoc test affordances do scenarios retire?**
`give` got its hull route tonight (your ruling: "mothballed ships do not require docking bays"), and step 7 was its
reason. `spawnturret` places a turret. Neutral wanderers spawn two non-hostile ships in every generated zone, "so
combat has something non-hostile to target" (`f732cff9`).
- **A.** Delete all three. Scenarios cover ships, cargo, turrets and neutral targets. `CommissionShip` stays for
purchases.
- **B.** Delete the hull route and `spawnturret`. Keep `give` for items (ad hoc poking outside scenarios) and keep
the wanderers.
- **C.** Keep everything.
- **Recommended: A.** Each one is a second way to create what scenarios now author, and the wanderers change every
zone of real play for a testing reason. `iff`, `trackmissile`, `revealzones`, `tow` and `capturepreset` stay.
- **Depends on it:** Cut 0.
Defaults Self took, which you may overrule:
- Scenarios show only in editor and development builds.
- The ledger is its own committed store, `GameData/Checks.cc`, not the catalog.
- "Check", not "behaviour", because `Behavior` is the gear type family.
- Brokkr is not installed in this campaign (section 0.4).
- The scenario record holds no "start docked" field. No first consumer needs one.
---
## 8. Follow-ups outside this campaign
- Re-anchor `docs/headless-playground-cut.md`. Its Cut 1 now builds on `RunStart` and `Zone.Admit`; its `new`
command stages a `Scenario`.
- Brokkr install plus a "launch scenario" intent, if agents should drive Unity play.
- A durable agent authoring command for presets (fit by design name with validation), instead of transient seed
commands.
- `AetherDb` carries spent one-shot migration commands (`targeting-catalog-6c`, `-6d`, `firing-arc-migrate`, and
others; `Program.cs` is 1,477 lines). This is a subtraction pass of its own.
- `ItemManager`'s clock seed (`ItemManager.cs:20`) makes lot quality vary per scenario launch. It is recorded,
not fixed here.

View file

@ -0,0 +1,83 @@
# Ship collection authoring
Status: authoring contract for new ships. Longinus and Djinni predate this contract and keep their current prefabs.
## Objective and ownership
One Blender collection exports one FBX model. Its hierarchy names the ship's presentation anchors. Unity builds
`Assets/Content/Prefabs/Ships/<Name>.prefab` from that model and assigns the components and references that the
runtime currently requires on a hand-built ship prefab. `GameData/Aetheria.cc` remains the owner of `HullData`,
hardpoint cells and types, gameplay stats, products, and the prefab's Addressables key. The model never decides a
hit, thruster force, weapon arc, or shield capacity.
Today `ShipInstance` reads manually filled arrays on each ship prefab. It matches their transform names against
`HullData.Hardpoints[].Transform`. Its shared ping, invisible material, explosion, shield, and tractor references
also live on each prefab. The builder derives the arrays from the FBX hierarchy and supplies the shared Unity
assets once, from their existing project paths. The old prefabs are left alone.
## Blender collection and export
- Name the collection `Ship.<Name>` and configure its collection exporter as FBX. Export to
`Assets/Models/Ships/<Name>.fbx`. The filename is the generated prefab name. Blender's collection exporter can
export a collection directly and repeat that export after edits.
- Export meshes and empties, with animation disabled. Use Blender's `-Z Forward`, `Y Up` axis conversion for Unity.
Keep the collection origin at the ship's simulation centre, with the nose pointing toward the exported +Z axis.
Apply object scales on visual and collision meshes; the `Shield` empty's scale is the deliberate exception.
- The importer owns every prefab under `Assets/Content/Prefabs/Ships/` whose matching model is in
`Assets/Models/Ships/`. Editing generated components by hand is temporary; the next export rebuilds them.
Put appearance in the FBX and gameplay values in the catalog.
The exported hierarchy uses **exact, case-sensitive names**. Names beginning `HP.`, `Pivot.`, or `SHIP.` are
reserved. IDs after a role prefix must be unique across the model. Other visual objects may have any names.
```text
<Name> FBX root
Body visible meshes, any nesting
SHIP.MapIcon one mesh; assigned the shared map material and Minimap layer
SHIP.HullCollider one low-poly closed convex mesh; rendered invisible, given a MeshCollider
SHIP.Shield one empty; its position and scale set the shield envelope
SHIP.TractorBeam one empty; its pose sets the tractor effect origin
HP.Thruster.PortAft empty; exact name copied to HullData.Hardpoints[].Transform
Emitter one mesh; thruster particle emission shape
HP.Weapon.PortGun empty; exact name copied to the catalog
Muzzle.0 empty; +Z is firing direction
Muzzle.1 optional additional barrel
HP.Radiator.Port empty; exact name copied to the catalog
RadiatorMesh one mesh; temperature emission surface
HP.Equipment.Reactor empty; exact name copied to the catalog
Pivot.0.-90.90.-80.80.60 optional empty parent of articulated mounts
```
`HP.Equipment` covers sensors, reactor, shield, cargo, and other mounts without a special visual component.
`HP.Weapon` covers ballistic, energy, and launcher mounts; the catalog chooses which. Every `HP.*` becomes an
`EquipmentHardpoints` entry. Thruster, weapon, and radiator roles also get their matching components and arrays.
`Muzzle.<nonnegative integer>` children are sorted numerically; their transforms become `FiringPoint`. A weapon
mount requires at least one. A `Pivot` name carries `Group.YawMin.YawMax.PitchMin.PitchMax.Speed` as signed
integers in degrees and degrees per second. It gets `ArticulationPoint`; child mounts follow its transform. Pivots are
presentation only: the simulation's catalog firing arc remains authoritative.
`SHIP.Shield` receives the existing Shield prefab as a child. That prefab's effective unscaled radius is one
Unity unit; the marker's three scale components are the intended envelope radii in world units. The builder adds
`ShieldEnvelope` to the Shield prefab root if absent. `SHIP.TractorBeam` receives the existing Tractor Beam
prefab. The four `SHIP.*` markers are required exactly once. Ship-specific mesh materials remain authored in
Blender/Unity's material import mapping; the builder only assigns the shared map-icon material.
## Build, validation, and failure
Re-exporting an FBX in `Assets/Models/Ships/` schedules a prefab rebuild after Unity finishes importing it.
`Aetheria/Build Ship Prefab From Selected Model` performs the same build on demand. The builder validates all
reserved names, required anchors, component meshes, muzzle numbering, and shared asset references **before**
replacing a prefab. A bad export reports an error and leaves the last valid prefab in place. The output is a
Prefab Variant of the FBX model, so mesh and transform identities remain tied to the source export.
After adding a ship, author its `HullData` and product in the catalog, set `HullData.Prefab` to the generated
prefab's GUID, and set every `HardpointData.Transform` to an exact `HP.*` name. Run the catalog asset check and
the Unity compile. A visual play check still owns size, materials, shield fit, barrel orientation, and thrust
appearance. The builder cannot infer the 2D schematic from a 3D mesh.
## Cut and build budget
This adds an Editor-only builder, its focused smoke, and this contract. It adds no runtime component, persistent field, package,
service, or build target. It replaces per-ship array and shared-reference authoring for newly exported ships.
The focused verification target is Unity Editor script compilation plus a synthetic named-hierarchy check; a
real Blender collection export is required before claiming end-to-end import fidelity.