Ten Gates a language model classifies the regime; ten deterministic gates dispose

loading the ledger…

How this is built

The two integrations this runs on, and what each is actually load-bearing for.

MCP — the model's only hands, and they are read-only. Alpaca's MCP server advertises 72 tools; the classifier is offered 22 — option chain, quotes, bars, snapshots, clock, news, positions, account. Every place, cancel, close and replace tool is withheld, and a filter re-checks each call in case the model asks for one it was never offered. Order placement lives in code the model cannot reach, which is why the ten gates below are unbypassable rather than merely well-behaved.

The official Alpaca CLI — the second opinion. After every entry scan, the official CLI (pinned 0.0.14) re-reads the account and every position leg as an independent implementation, and its answer is compared against our own client. Any disagreement larger than quote noise is an alert, never a silent correction. It is here to catch the one bug class our own tests structurally cannot: a mis-parse that looks correct to every test written against the same assumptions.

Equity

Account NAV at each scan, as the engine saw it. Paper account, marked by the broker.

The ten gates

Every proposal is judged by all ten — no short-circuit — and every verdict is recorded. Three states, because a limit doing its job often never rejects anything: the sizer consumes it as a budget first, and bound the size is where that work shows.

Decisions

Every structure proposed, with the model's reasoning and all ten verdicts. Click a row.

Regimes