Status
as-built (scanners, patterns) + direction (shift sweep product claim)
Conceptual layer
④ Decision
Repo layer
L4 knowledge-reasoning
Source
architecture section 3.6.4, section 3.3b
ADR
ADR-022
Related
07-finding-runtime.md · 09-portfolio.md · 00-kernel.md · 03-plant-situation-model.md

L3 detectors catch registered conditions. Plants also waste on overlaps, idle auxiliaries, handoff waits, partial loads, and shared-utility imbalance that no FindingAs-built L3 detector output admitted to L4 (finding.json 1.2.0) names yet. Discovery surfaces some of that under the same evidence floor as a Finding (direction: EvidenceLayer contract for detector output (direction; as built: Finding finding.json 1.2.0) section 5.2). Card origin is l4_pattern for certified patterns and l4_hypothesis for the grounded-hypothesis laneOwner opt-in path for LLM hypotheses that still pass L3 grounding + dual-family + kernel. Exploration is a separate boolean flag, not an origin. Humans still accept and execute.

This amends the older line "L3 detects; L4 only turns a Finding into a card."


Decision#

Four mechanisms run in fixed order. Only two emit routes reach the decision runtime; everything else is shadow. Ranking is a feasibility floor, then a lexicographic policy from a versioned registry — never a blended score. Money still comes from L3.


Why#

Scanners and L3 system methods are cheap, repeatable, and auditable. LLM hypotheses are useful for naming mechanisms the scanners have not encoded yet, but only after L3 grounds condition, price, and verification. Free LLM emit floods owners. A blended multi-objective score hides which axis lost.


Cadence — when L4 runs without a Finding#

L4 is not Finding-only. If the plant looks “normal” (no L3 anomaly), discovery still runs. That is how Stamped searches for efficiency while the floor is quiet — idle auxiliaries, overlapping shared-resource starts, handoff waits, partial loads, envelope proximity — conditions that often never trip a detector.

TriggerWhat firesTypical use
Finding intakeL3 emits a FindingNamed detector condition
Material PSM changeEvent-driven discovery shortlistAsset state flip, alarm, constraint activate/expire, open-card change, topology publish
Shift sweepFull registered discovery pass once per shiftWhole-plant opportunity search when nothing “broke”
Ask enqueueOwner/staff requests a discovery sweepOn-demand (14-ask.md)
Owner backlog promoteSoft-gate block re-enters the runtimeHuman-driven, not automatic

Shift sweepOnce-per-shift whole-plant discovery pass (normative for v1 product claim):

  1. Once per shift per plant, at a site-pack configured offset after shift start (default: +15 minutes after roster shift boundary — illustrative default until the plant locks it).
  2. Code refreshes the PSMPlant Situation Model digest (as-known-at), runs all commissioned scanners + admitted L3 system methods for that plant, then optional hypothesis shortlist if the lane is opted in.
  3. Hits become discovery candidates → same constraint / portfolio / kernel path as Findings. Attention budget and one-card rule still apply; the sweep does not flood the Now queue.
  4. Caps: shadow volume, hypothesis volume, exploration budget — all soft gates. Hard stops unchanged.
  5. If the previous shift’s sweep is still running, the new one queues (does not overlap LLM-heavy stages). Scanner-only stages may overlap with watermarking.

Registry knobs (soft / data — not kernel):

KnobMeaningv1 default
discovery.shift_sweep.enabledPlant opt-in (default on once commissioning minimums pass)on when commissioned
discovery.shift_sweep.offset_after_shift_startMinutes after shift boundary15 (illustrative until site-locked)
discovery.shift_sweep.max_candidates_to_runtimeHard cap into DecisionCase pipeline after rankingplant registry
discovery.event_triggersWhich PSM change kinds enqueue a partial sweepstate / constraint / open-card / topology

All discovery and Finding intake enqueue through the plant work queueDurable per-plant scheduler for Findings, sweeps, Ask (25-work-queue-and-concurrency.md). Emit stays off until safe-start (28-commissioning-and-controls.md).

What a shift sweep is not: a full plant reschedule, a dashboard rebuild, or an unsupervised LLM tour of every asset. It is a code-owned whole-plant shortlist → the same honest card path. That is the product claim: decisions backed by the full plant view, on a clock, not only when something alarms.

Mid-shift partial sweeps: material PSM events enqueue a scoped discovery pass (neighbourhood / shared resource of the change), not a second full shift sweep — unless the event is marked plant-wide (e.g. feeder constraint activate).


Mechanisms (order)#

1. Deterministic temporal scanners#

Code over PSM episodes and digests. No model. Typical predicates:

  • overlapping starts on a shared resource
  • persistent idle auxiliaries while the parent asset is down
  • recurring handoff waits between areas
  • partial loads that could consolidate inside a known window
  • constraint activation or expiry
  • verification gaps on recent closures
  • recurring condition keys in the case libraryEpisodic store of traces joined with L5 outcomes; authority when it disagrees with Hindsight without an open card

Each hit produces a shortlist row: predicate id, footprint template bindings, evidence row ids, pattern candidate id if any.

2. System methods via L3#

Where L3 exposes them as typed tools: dynamic bottleneck detection, blocked/starved propagation, shared-utility supply/demand imbalance, demand-envelope proximity. Outputs enter the ledger as method-versioned rows. L4 does not reimplement the math.

3. L3 what-if#

Bounded alternatives replayed against a validated method. Return: affected set, assumptions, uncertainty, constraint results. Outside the method envelope → not usable for emit.

4. LLM hypotheses (last)#

Both families read the plant digest and the scanner/method shortlist. Each proposes a mechanism plus the signals that would prove it. Hypotheses do not emit by themselves.


Emit routes#

Discovery emit routes

Live runtime

certified pattern

hypothesis + all gates

else

Mechanisms 1–4

Temporal scanners

L3 system methods

L3 what-if

LLM hypotheses

Emit route triage

Certified pattern
origin l4_pattern

Grounded hypothesis
origin l4_hypothesis

Same runtime as Finding path

Shadow trace only

Opportunity ledger

Constraint → portfolio → kernel

How to read it.

  1. Scanners and L3 methods run before LLM hypotheses; hypotheses never emit alone.
  2. Only certified patterns or fully grounded hypotheses open a DecisionCase on the shared runtime (07-finding-runtime.md).
  3. Everything else is traced and opportunity-ledgered, not sent to L5.

Build now: shift sweep + commissioned scanners. Later: pattern→detector retire when L3 binds the same condition key.

View Mermaid source
flowchart TB
    %% house-style: discovery-emit-routes
    subgraph mech["Mechanisms 1–4"]
        direction LR
        scan["Temporal scanners"]
        sys["L3 system methods"]
        wi["L3 what-if"]
        llm["LLM hypotheses"]
    end
    triage{{"Emit route triage"}}
    subgraph emit["Live runtime"]
        direction LR
        pat["Certified pattern<br/>origin l4_pattern"]
        hyp["Grounded hypothesis<br/>origin l4_hypothesis"]
        run["Same runtime as Finding path"]
    end
    sh["Shadow trace only"]
    ol["Opportunity ledger"]
    mech --> triage
    triage -->|"certified pattern"| pat --> run
    triage -->|"hypothesis + all gates"| hyp --> run
    triage -->|"else"| sh --> ol
    run --> gates{{"Constraint → portfolio → kernel"}}

    classDef govc fill:#fff4d6,stroke:#c99a2e,color:#000
    classDef agentc fill:#e8f0ff,stroke:#5b7bd5,color:#000
    classDef loopc fill:#eef7ee,stroke:#4f9a4f,color:#000
    class triage,gates govc

Certified pattern#

Registry entry (status=certified) naming:

  • scanner predicate (or method binding)
  • footprint template
  • primary domain (registry id)
  • condition-key recipe (shared function inputs)
  • verification recipe
  • owner role default
  • dependencies (PSM elements, L3 tools, prompts)

Emits into the normal decision runtime (07-finding-runtime.md) with origin l4_pattern and pattern_ref. New patterns start in shadow until certified. L3 condition test (or equivalent certified scanner predicate) is required before emit — same proof floorMinimum evidence/structure required before emit (asset bound, verification path, L3 condition test for discoveries) as hypothesis grounding (15-l3-l4-interface.md, 00-kernel.md).

Grounded-hypothesis lane (ADR-022)#

Per-plant opt-in by the named plant owner. A hypothesis emits only when all of the following hold:

  1. L3 condition test passes
  2. L3 prices each domain-section effect (calculator owns rupees)
  3. L3 verification-plan builder returns a plan from signals already in L2
  4. Footprint is computable
  5. Constraint evaluator returns satisfied (not unknown on a hard constraint)
  6. Both families independently select the same action template (lane disabled in one-family mode)
  7. Every kernel criterion passes
  8. Per-plant volume cap is not exceeded

Origin: l4_hypothesis. Precision is tracked. The lane auto-disables for a plant when rejected-plus-no-change exceeds the owner-set threshold. A hypothesis type that keeps succeeding becomes a pattern proposal for certification — it does not silently promote itself.

Else: shadow#

Traced, opportunity-ledgered, never sent to L5. Soft-gate shadow items may appear on the owner backlog; hard-gate blocks stay audit-only (22-missed-opportunities.md).


Quality controls#

ControlBehavior
Per-pattern precisionTrack accept / verify / reject / no-change. Poor precision → auto-demotion to shadow (soft gate; threshold in registry)
Re-proposal cooldownPer condition key and pattern after reject or no-change; lift only on materially new evidence
Shadow volume capSoft gate; excess stays ledgered, not promoted to backlog flood
Pattern → detector hand-offWhen L3 ships a detector for the same condition, the L4 pattern retires so two detectors never run for one condition
Certifier rolesStamped tech lead for global patterns; named plant owner for plant-scoped patterns

Ranking#

No blended score.

  1. Feasibility floor (hard): proof obligations, constraint satisfied (not unknown-hard), footprint computable, method envelope if priced, hard stops clear.

  2. Lexicographic order from the versioned ranking-policy registry entry (order itself is a release, not a prompt):

    1. Evidence and constraint safety
    2. Exception urgency
    3. Effect on the current bottleneck or shared resource
    4. Interference with accepted work
    5. Section-specific priced effect (sections never summed; calculator refs only)
    6. Attention cost

Ties break by condition-key stability and earlier first-seen time. Portfolio still applies after ranking (09-portfolio.md).


Rejected alternatives#

RejectedWhy
Free LLM discovery emit without L3 groundingNuisance cards; invented money
Blended multi-objective scoreHides which axis lost; hard to calibrate
Discovery that bypasses portfolio or attention budgetFloods owners; conflicts with open work
Auto-certifying successful hypothesesPatterns need a named certifier and replay

What evidence would change this#

  • High verified closure rate on grounded hypotheses with low reject rate → raise volume cap or shorten path to pattern proposal.
  • Scanners alone matching L3 detectors on Pilot families → keep LLM hypotheses shadow-only for those predicates.
  • Ranking policy regret (portfolio regret metric) dominated by one axis → reorder the ranking-policy registry entry via replay, not a one-off prompt tweak.

v1 slice vs later#

v1Later
Scanners for idle auxiliaries, feeder/shared-resource overlap, a few handoff waitsBroader temporal library as PSM elements admit them
Grounded-hypothesis lane opt-in, strict gates, dual-family requiredSame gates; thresholds tuned by opportunity-ledger calibration
Ranking-policy seed as aboveReordered only by release + replay
Pattern hand-off manual/process with registry statusAutomated retire when L3 detector id binds the same condition-key recipe

Page history: last 3 changes
  1. 2026-10-07 docs(technical): rewrite l4 00-10 to the architecture c52a111
  2. 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
  3. 2026-09-25 docs(l4): agentic decision architecture, ADRs, and production hardness 8275e7c

Diagram

100%

Search the architecture