Status
contract (L3MethodsPort floor) · as-built (Finding 1.2.0 intake)
Conceptual layer
④ Decision
Repo layer
L4 knowledge-reasoning
Source
architecture section 3.6.4, section 5.2, section 2.2 KR runtime/
ADRs
020 · 022 · 026
Siblings
00-kernel.md · 07-finding-runtime.md · 08-discovery.md · 11-models-and-seams.md · Contract deltas: 18-contract-deltas.md

L3 owns methods (detect, price, test, simulate, build verification plans). L4 consumes them as typed tools. L4 does not re-implement money, envelopes, or detector science.


1. Decision summary#

#TopicDecision
1Finding floorIntake enforces the evidence / bind / verification floor before any seam
2Detector identityEvery Evidence record (as built: Finding) carries detector_id + detector_version; traces and memory re-key on version change
3UncertifiedUncertified detectors / patterns stay shadow — traced, not emitted — until certified
4CalculatorRupees and priced effects only via L3 calculator references; unreferenced quantities → withhold
5Condition testDiscovery / hypothesis emit requires L3 condition test pass
6Verification-plan builderL3 builds plans from signals already in L2; L4 may only narrow (same boundary, equal or tighter bounds)
7SimulatorsL3 simulators return Modeled effects inside a credibility envelope; out-of-envelope → cannot support emit
8Shared registriesDomains, families, patterns, constraint kinds, evidence-tier rules live in one pack; both layers consume
9Pattern ↔ detectorWhen L3 ships a detector for a condition, the L4 pattern retires — no double detect
10OwnershipL3 owns method code and calibration epochs; L4 owns decision runtime, portfolio, and card proposal

2. Why#

If L4 invents a parallel calculator, the card and the EvidenceLayer contract for detector output (direction; as built: Finding finding.json 1.2.0) record disagree on money. If L4 skips the condition test, discovery becomes storytelling. If envelopes are ignored, Modeled numbers read like Measured.

Split the work the way the plant already thinks: detection science and pricing methods in one place; “what should we do with this on this shift?” in another. Humans still accept the card.


3. Finding intake (L3 → L4)#

Floor (must hold before DecisionCase)#

RequiredFail behavior
Schema-valid Finding (finding.json 1.2.0; direction: Evidence section 5.2)Reject intake; no run
Asset / condition bindingWithhold / abstain per kernel
Evidence referencesLedger rows required
Verification path present (or explicit absence per family rules)Withhold
Evidence tier assigned by code rulesInvalid tier → withhold
detector_id + detector_versionReject intake if missing
Detector certified for plantElse shadow only
Calculator references for priced effectsUnreferenced ₹ → withhold
Condition key via shared key functionSame function L3 used for merge

Shadow means full trace and opportunity-ledger entry where applicable; nothing sent to L5 as a customer card.

What L4 may change on the Finding’s plan#

Verification plan on the card proposal may only narrow the FindingAs-built L3 detector output admitted to L4 (finding.json 1.2.0)’s plan (or the L3-built discovery plan): same measurement boundary, equal or tighter bounds, subset of allowed methods from the builder’s offer. Widening is a hard fail.


4. L3 methods port (tools L4 calls)#

All calls go through L3MethodsPort. Outputs are frozen into the evidence ledgerTyped rows (measured / advisory / model partitions) frozen into the trace (12-trace-and-eval.md). L4 cites method id + version; it does not re-implement these methods.

Calculator#

RuleDetail
InputTyped effect quantities + tariff / tagged fallback refs
OutputPriced sections with method id, version, tier
L4 dutyCite calculator reference ids on any ₹ claim
FailMissing reference → withhold (unreferenced_rupee)

Sections are never summed into one hero ₹ across domains.

Condition test (discovery / hypothesis)#

RuleDetail
InputCandidate mechanism + signal bindings from PSM / L2
Outputpass | fail + cited signal ids + method version
Emit gateHypothesis lane and pattern grounding require pass
FailShadow / ledger only — not a customer card

Verification-plan builder#

RuleDetail
InputCondition key, footprint, domain registry entry, available L2 signals
OutputPlan: signals, windows, success/fail criteria, method options
ConstraintOnly signals already available (or commissioned) in L2
L4 seamMay choose among offered methods / tighten bounds — never invent a signal

Simulators (credibility envelope)#

Every simulator result carries an envelope. Emit may use the result only if inside envelope.

Envelope fieldMeaning
Intended useWhat decision class this method supports
Calibration epochWhen the method was last validated
Validation summaryPass/fail of last validation suite (ref)
UncertaintyReported uncertainty / ranges
Out-of-domain behaviorExplicit: refuse, degrade, or widen uncertainty
ResultL4 behavior
In envelopeMay cite as Modeled with method+version
Out of envelopeRecord in ledger; cannot support emit on that claim
Method downDegraded mode — evidence-only path or withhold; no invented counterfactual

Also consumed when certified: system methods (bottleneck, blocked/starved, utility balance) and baselines for PSMPlant Situation Model history views.

L4’s l3_method_choice and simulate_vs_evidence seams select among registered methods; they do not author physics (11-models-and-seams.md).


5. Discovery hand-off#

L4 scanners / hypotheses
        │
        ▼
L3 condition test ──fail──► shadow + opportunity ledger
        │ pass
        ▼
L3 calculator (per section)
        │
        ▼
L3 verification-plan builder
        │
        ▼
L4 DecisionCase → same kernel as Findings

Certified patterns name their L3 method dependencies in the registry. Grounded-hypothesis laneOwner opt-in path for LLM hypotheses that still pass L3 grounding + dual-family + kernel also requires dual-family action agreement and plant owner opt-in (08-discovery.md).


6. Shared registry pack#

Both layers read versioned entries under stamped-external/registries/ (ADR-026; one registry D9, RECOMMENDED):

RegistryL3 uses forL4 uses for
DomainsClaim kinds, pricing units, detectorsSections, analyses, seam options
FamiliesFinding family → domainWorkflow route, owner roles
PatternsHand-off targetsDiscovery emit recipes
Constraint kinds—Evaluator predicates
Evidence-tier rulesFinding floorLedger tier assignment
Condition-key recipeMergeDedupe / portfolio

A new domain is declared once. L3 adds methods/detectors; L4 adds an analysis plug-in. Kernel and seams iterate by id — they do not hard-code the five names.

LockfileRelease pin of registry versions, kernel version, model pins skew between L3 and L4 releases is a failure mode: intake should refuse or shadow when required method versions are missing.


7. Pattern → detector retirement#

When L3 certifies a detector that covers an L4 discovery pattern’s condition keyStable id for “this plant condition”; one open card per key recipe:

  1. Registry marks pattern retiring with deprecation window.
  2. New emits prefer the Finding path.
  3. After window, pattern retired; scanners may still feed Lab, not customer cards.
  4. Trace links pattern_ref → detector_id for learning continuity.

Two active detectors for one condition is a bug, not a feature (08-discovery.md).


8. What L4 must not ask L3 to do#

  • Override a hard constraint for modeled benefit
  • Publish topology (site packVersioned, owner-reviewed plant configuration including topology / L1 path)
  • Accept chat as a detector
  • Sum section wallets
  • Silently promote detector weights from L4 closures

9. Ownership summary#

ConcernOwner
Detector code, Lab vs certified laneL3
Calculator, condition test, simulators, verification-plan builderL3
Method calibration epochs and envelopesL3
Finding merge on condition keyL3
PSM, portfolio, seams, terminals, card proposalL4
Constraint evaluation at decide timeL4 (rows from L2; kinds from shared registry)
Live card, person, verify, closeL5
Learning facts and outcomesL5 → L4 memory (06-memory.md)
Named-owner accept of pins / topology / lane opt-inHuman

Offline improvement may propose detector or pattern ideas for L3/L4 owners — it does not silently promote them (13-improvement.md).


10. Rejected alternatives#

AlternativeWhy rejected
L4 re-implements pricing in promptsInvented ₹; drifts from Finding
Emit discovery without condition testUngrounded cards
Widening Finding verification plans in L4Lowers the bar after detect
Ignoring simulator envelopesModeled treated as Measured
Separate domain enums per layerDual maintenance; sixth domain breaks one side
Keeping L4 pattern after L3 detector shipsDouble cards for one condition

11. Evidence that would change this#

  • Envelope schema too coarse for Pilot 1 methods → extend fields; do not drop envelope checks.
  • Condition tests too slow for shift sweepOnce-per-shift whole-plant discovery pass → cache typed results with as-known-at; do not skip the test.
  • Registry skew incidents in staging → tighten release coupling or add explicit compatibility windows in the lockfile.

12. v1 slice vs later#

v1Later
Finding floor + detector id/version + shadow uncertifiedRicher Lab metrics into shadow review
Calculator + condition test + verification-plan builder + ≥1 enveloped simulator per seed domain that needs itBroader method catalog; same port
Shared registry pack consumed by bothSixth domain as registry+plugin only
Pattern retirement rule documentedAutomated retirement workflow in ops

13. Fast loop and L4 (direction)#

Not as-built. Design: ../l3/05-twin-and-fast-loop.md · ../fast-loop/07-interfaces-and-ownership.md.

  • Intake is unchanged. Twin outputs never reach L4 directly. Card-worthy twin conditions (procedure not followed, model drift, repeated part risk) arrive as ordinary 1.2.0 Findings from scheduled twin-record engines.
  • episode_id. Such Findings list episode ids and the Plant BoxPlant-side computer for the fast loop (direction; D4) lockfile id in evidence references. L4 carries them into the case trace so a card links back to floor events; L4 zoom reads the twin records from L2 by episode (D3 twin on Plant Box, RECOMMENDED).
  • Procedure explanation. L4 drafts the plain-words explanation shown on the L6 procedure acceptance card (what it watches, what it says, who receives it, its limits) from the versioned procedure YAML; it never edits the procedure.
  • Procedure candidates. L4 may propose a new or revised standing procedure as a card from repeated cases or missed-savings patterns; it becomes live only through named plant acceptance of a new version (L5) and the stage gates in ADR-035.
  • L4 never sends signals or WriteRequests; those stay on the Plant Box (section 5.8, direction).
Page history: last 5 changes
  1. 2026-10-07 docs(technical): rewrite l4 11-20; reconcile contract deltas with section 5 ef9187f
  2. 2026-10-03 docs(handoff,l4): fast-loop architecture handoff, L4 procedure and ledger links, indexes 0f45a47
  3. 2026-10-03 docs(decisions): add ADR-033..038 (twin runtime, fast read path, plant-side writer, message classes, alerts and quality-to-lot link, part-keyed parameters), fast-loop technical set, rebuilt index with renumbering map; fix bare-number link text and ranges 22e2872
  4. 2026-10-03 docs(decisions): renumber live ADRs 001-032 in order, mark withdrawn refs ADR-W###, repoint withdrawn links to archive, note partial supersessions 36c944e
  5. 2026-09-25 docs(l4): agentic decision architecture, ADRs, and production hardness 8275e7c

Diagram

100%

Search the architecture