the intelligence stack · how institutional knowledge becomes infrastructure
Five layers. Each does one thing: write down what the layer below it would otherwise lose.
Every judgment a careful human reader keeps to themselves — this one is only industry practice, that statute has not commenced, this cell I never actually saw the official text for — has to be written down here, and enforced. Software reads a field and treats it as fact; it has no eyebrow to raise. Discipline that lives in prose is discipline software cannot read.
From a primary instrument to an action an agent takes
The five layers below are an architecture, not a flow diagram. The difference is that a flow diagram describes how data moves, while an architecture states what each layer owes the one above it. Where any layer hands upward something it cannot itself support, every layer above stops holding — with no symptom.
Evidence layer
Primary instruments, official gazettes, supervisory rules, commencement orders. What this layer owes upward is provenance and a date: whether the text was official or paraphrased, the pinpoint, and the day it was read. Without those three, the four layers above are opinion.
Knowledge layer
Structured propositions: jurisdictions, instruments, dimensions, obligations, entities, relations. What this layer owes upward is type — whether a row is a proposition of law or an observation about market practice. Where the two mix, the layers above serve practice as requirement.
Reasoning layer
Constraints, interaction sets, compatibility, temporal logic, jurisdictional composition. What this layer owes upward is arguability: every derived verdict must name the rules it passed through and the date on which it holds. A verdict with no date never goes stale and so never turns out to have been wrong.
Agent layer
Typed MCP tools, schema-validated returns, the citable subset. What this layer owes upward is a boundary: outside its coverage it must decline rather than extrapolate. This is precisely what level L3 of the KYA framework asks for.
Action layer
Routing, settlement, treasury, filing, supervision. This layer is not part of this project; it belongs to the institution using the data. It owes the four below it exactly one thing: keep the version number in the record. Without it, everything the four layers below did is worth nothing after the fact.
how these five relate to the six build layers below
The five state what it is; the six below state how it is made. L1–L2 are implemented by build layers 01–02, L3 by 03–06, L4 is the MCP server, and L5 is outside this repository. Both are written out because architecture alone reads like a slide and a pipeline alone reads like a changelog.
Which records may be cited as current binding law
Every record carries three axes that do not substitute for one another: what kind of claim it is (a proposition of law or a market fact), how well it is sourced, and whether the instrument is actually in force. Their intersection is the subset a lawyer or a supervisor can cite as current binding law.
| Axis | The question it answers | What happens without it |
|---|---|---|
| claim_class | Is this a proposition of law, or an observation about what the market does? | “Major issuers generally hold short-dated bills” is served as “the rules require short-dated bills”, and it reads impeccably. |
| evidence_tier | Does this rest on official text, or on a paraphrase, a news report, or a supervisor's remark? | A regime-level confirmation gets quietly promoted to a provision-level one, and the promotion leaves no trace. |
| status | Is this instrument in force today? | A statute that is enacted and not commenced is cited as current law. This is the most common failure of an ungrounded model. |
why three axes rather than one score
Collapsing them into a single “confidence 0.87” destroys three things at once. An impeccably sourced market fact and a poorly sourced proposition of law land on similar numbers, though they are used for entirely different purposes. And “not yet commenced” gets scored as uncertainty when it is in fact a certainty. Citability is a boolean, not a threshold.
the implementation · six build layers, each derived from the one before it
No layer is a hand-kept copy. Change one and the next is recomputed; where the recomputation disagrees with the authored analysis, the build surfaces it as a finding rather than quietly amending one side.
Obligation records
The base facts. One sourced (jurisdiction × instrument × dimension) proposition of law per record, schema-validated.
Analysis layer
The pairwise compatibility matrix and the six constraint-interaction sets: the composition analysis, turned from prose into queryable data.
Corridor layer
Directed origin → destination edges, each read at the inbound gate, carrying its feasibility class and the mechanism that gates it.
Computed layer
compose() re-derives each corridor's class from a per-jurisdiction signal table and diffs it against the authored analysis. Disagreements are surfaced as findings, not silently fixed.
Time engine
compose(as_of=…) applies every scheduled change in law, so a corridor reads one class today and another once a regime is operative. US → UK flips to a clean Category I on 25 Oct 2027.
Constraint substrate
The deepest layer: a corridor's class composed from each jurisdiction's stance on eight constraints (C1–C8), through the interaction-set rules rather than a single inbound gate.
What the build refuses
Discipline counts only where it runs in CI. Each line below is a refusal that fails the build, and each carries a negative test — a deliberately non-compliant record whose passing fails the suite. That step is not decorative: a gate that has never bitten and a gate that does not exist look identical in a log.
| Gate | What it refuses | The failure it prevents |
|---|---|---|
| Sourcing | A record cannot claim a confirmation it has no source for. | A confirmation level quietly promoted. |
| Claim class | A market fact cannot enter the instrument a lawyer is shown. | Industry practice served as legal requirement. |
| Commencement | A statute that is written but not commenced cannot be cited as current law. | A pending regime read as an operative one. |
| Reconciliation | A recomputed corridor class that contradicts the authored analysis cannot merge silently. | Two places in the dataset disagreeing, both looking right. |
| Schema | A record that does not validate cannot enter the build. | Every downstream consumer guessing at field shapes. |
the part that is not done
The gates are defenses, not a cure. They stop a claim its evidence cannot carry from being served; they cannot turn it into one that can. Only primary-source verification retires that liability, and it is never faked.
The register is at v0.10.x: depth-first over twelve jurisdictions rather than broad. Forty-six records meet the full bar — proposition of law, official text checked, in force — and the rest are confirmed at regime-status level with primary-source verification continuing. That queue is published as a per-cell worklist rather than left implicit. Two hundred countries would mean a scrape, and a scrape cannot tell you which rule binds. The value here is the judgment in the data.
Regulation moves fast enough to require exactly this discipline: Taiwan's regime passed at third reading on the afternoon of the last build. So the register is versioned and dated, and every claim carries the date it was read. What it offers is not coverage of everything, but a verified, citable, machine-queryable account of the corridors it does cover.