Status
contract (offline loop, pins) · direction (GEPA, Jev swaps)
Conceptual layer
④ Decision
Repo layer
L4 knowledge-reasoning
Source
architecture section 8, section 8.1, section 3.6.4
ADRs
017 · 023 · 025
Siblings
06-memory.md · 11-models-and-seams.md · 12-trace-and-eval.md · 22-missed-opportunities.md

L4 gets better from what it sent and from what it held back. Humans accept every production pin. Nothing promotes itself.

Month-12 quality is a versioned playbook and prompt set — not silent weight post-training on raw closures. Improvement runs offline. Opus 5.5 + GPT-5.6 Sol never sit on the plant request path.


1. Decision summary#

#TopicDecision
1Offline councilOpus 5.5 + GPT-5.6 Sol label and propose; never on the plant request path
2Two learning streams(A) cards + closures (B) opportunity ledger, backlog, exploration (ADR-025)
3PlaybooksACE-style bullet playbooks with helpful / harmful counters
4Loop shapeGenerator → reflector → curator; proposer and red-team swap each cycle
5Prompt evolutionGEPA-style prompt candidates — replayed, never live-edited
6Code mergesRegistry / stage-graph / adapter deltas as versioned PRs; same shadow path
7PromotionShadow → named-owner accept → canary → pin. Unpin = rollback
8WeightsNo silent weight post-training on raw closures. Clean step labels first; small verifier or Jev on closed seams before any weight work
9PinsNo self-promotion of model pins, thresholds, playbooks, or patterns

2. Why#

A system that only learns from cards it sent drifts cautious: gates hide their own mistakes. The opportunity ledgerStore of every blocked candidate with gate id and later outcome if known is the honest half of improvement (ADR-025).

ACE-style bullets stay inspectable. A plant owner can read “helpful 12 / harmful 3” on a playbook line. Opaque weight updates on messy closures teach false lessons (ineligible closes, selection bias, detector epoch shifts).

HITL is the product promise: recommend and record; humans decide what enters production registries.


3. Inputs#

StreamSourceUse
Sent cardsDecisionTrace + L5 closures + learning factsWhat worked / failed after emit
Held backOpportunity ledger, backlog promote/dismiss, exploration=trueSoft-gate miss rate, over-strict blocks
Process labelsCouncil (+ human on dissent)Bad route, weak grounding, flooded owner, …
HoldoutsSuites proposers never seeReplay gate before any pin

Ineligible closes set “action worked” to null. Closure rate alone never ranks patterns.


4. Offline council#

L4 improvement loop

Inputs

Case library outcomes

Opportunity ledger

Exploration outcomes

Seam decision records

Offline council
Opus 5.5 + GPT-5.6 Sol

Proposals: bullets,
prompts, soft thresholds

Replay holdouts + pass^k

Shadow on plant

↩ Named owner accept

Release lockfile pin

How to read it.

  1. Council models never sit on the plant request path; they label and propose from traces and ledger rows.
  2. Every delta must pass replay on holdouts before shadow compares against the pinned lockfile.
  3. Named owners accept; nothing self-promotes into production registries or model pins.

Build now: council labeling, ACE bullets, soft-gate proposals through owner packs. Later: higher automation on the council agree-set only after replay gates hold.

View Mermaid source
flowchart TB
    %% house-style: l4-improvement-loop
    subgraph in["Inputs"]
        direction LR
        case["Case library outcomes"]
        ol["Opportunity ledger"]
        exp["Exploration outcomes"]
        seam["Seam decision records"]
    end
    off["Offline council<br/>Opus 5.5 + GPT-5.6 Sol"]
    prop["Proposals: bullets,<br/>prompts, soft thresholds"]
    replay{{"Replay holdouts + pass^k"}}
    shadow["Shadow on plant"]
    own(["↩ Named owner accept"])
    lock["Release lockfile pin"]
    case --> off
    ol --> off
    exp --> off
    seam --> off
    off --> prop --> replay --> shadow --> own --> lock

    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 replay govc
    class own agentc
    class off agentc
RoleModelJob
GeneratorOpus or Sol (alternates)Propose deltas from labeled misses
ReflectorThe other modelRed-team: nuisance cost, hard-gate adjacency, selection bias
CuratorCode + human checklistKeep only deltas that pass schema, replay, and owner pack rules

Where the two models agree on a process label, it stands as a candidate. Where they disagree, a human decides. Council judgement on blocked items may prioritise backlog review; it is not itself a training label for “should have emitted.”


5. ACE-style bullet playbooks#

Procedural memory holds versioned playbook bullets per domain / family / pattern scope.

FieldRule
Bullet textShort, operational; when to apply / not apply
helpful counterIncremented when a labeled good step or verified path used the bullet
harmful counterIncremented when a labeled miss or reject path used the bullet
Statusdraft | shadow | certified | retired
ScopeGlobal or plant override

Generator → reflector → curator emits add / update / remove. Deterministic code merges — no monolithic rewrite (brevity bias / context collapse). Counters never auto-delete a bullet; low helpful / high harmful triggers a proposal to retire, accepted by the owner.

Directives and hard stops are not editable by this loop.


6. Generator → reflector → curator (one cycle)#

  1. Label — council labels a sample of traces and blocked ledger items (12-trace-and-eval.md).
  2. Generate — ACE bullets · GEPA-style prompt candidates · registry edits (thresholds, soft gates, patterns, workflows) · stage-graph proposals · seam threshold changes · Jev swap proposals when records are strong enough.
  3. Reflect — other model attacks nuisance rate, hard-gate adjacency, and “this only looks good on sent cards.”
  4. Curate — drop illegal deltas (hard-gate loosens, write tools, money invention).
  5. Replay — holdouts proposers never saw; pass^k and suite gates.
  6. Owner pack — dissent visible; tech lead for global; plant owner for plant-scoped.
  7. Shadow → canary → pin — unpin rolls back. In-flight runs finish under the lockfile they started; new runs take the new pin.

Proposer and red-team swap every cycle.


7. GEPA-style prompt evolution#

Prompts are registry entries under the lockfile.

RuleDetail
CandidatesGenerated offline; scored by replay on frozen episodes; Pareto frontier under replay metrics
Live pathNever hot-edits the plant prompt mid-shift
Grammar vs knowledgeHard grammar fixed; retrieved bullets and evolved sections are separate
AcceptSame shadow → owner → pin path as playbooks

If a candidate improves pass^k but raises nuisance or grounding violations, it fails curation.


8. Opportunity ledger → improvement (ADR-025)#

Soft-gate scorecards (miss rate, block precision, foregone Modeled effect, nuisance cost of loosening) are first-class generator fuel.

DirectionTrigger
LoosenMiss rate or foregone effect crosses a registered bar
TightenReleased cards under that gate keep getting rejected / no-change

Hard gates are outside this loop. A pattern of hard-gate blocks that looks wrong is a data problem for the constraint owner — not a threshold knob.

Exploration closures (exploration=true) are the unbiased sample. Prefer them when proposing soft-gate moves. Detail: 22-missed-opportunities.md.


9. Seams → Jev#

Seam decision records are the training and comparison set. A classifier / Jev candidate must beat the logged LLM seam under replay before replacing it (11-models-and-seams.md).


10. Forbidden#

ForbiddenWhy
Weight post-training of the generator on raw closuresLabels sparse, delayed, confounded; wait for clean step labels
Silent pin / threshold / playbook / pattern promotionLockfile + named owner
Plant-path council modelsLatency and blast radius
Ranking patterns by closure rate aloneSelection bias
Editing hard stops via playbookKernel / ADR only
Online RL from accept/reject clicksTeaches to please the click, not the plant
Auto-apply mental-model changes from AskConfirm / verified closure only (14-ask.md)

11. Named ownership#

ChangeAccepts
Global playbook / promptTech lead (or designated) after replay
Plant-scoped threshold / patternNamed plant owner
Soft-gate thresholdNamed owner after ledger evidence
Kernel / hard gateADR + version bump
Model pin swapTech lead + replay; plant owner for plant override

12. Rejected alternatives#

AlternativeWhy rejected
Online RL from clicksNoisy, unsafe
Single-model self-improvement on the live pathCorrelated blindness
Unbounded prompt rewrite without replayRegressions land on the floor
Learning only from sent cardsSelection bias toward caution
Auto-certify patterns from hypothesis success aloneStill needs owner / tech-lead certifier

13. Evidence that would change this#

  • ACE counters too sparse after N weeks → add exploration sampling or tighten label cadence; do not jump to silent fine-tunes.
  • Small verifier on closed seams beats LLM under replay → allow weight/Jev track for that seam only.
  • Owner pack fatigue → raise auto-filter bar; do not remove the human pin.

14. v1 slice vs later#

v1Later
Council labeling + ACE bullets + soft-gate proposalsHigher automation on label agree-set
GEPA-style candidates on a few high-traffic promptsBroader prompt population
No generator weight trainingVerifier / Jev first; weights only with clean labels
Manual owner packsSame HITL; better packaging
Page history: last 4 changes
  1. 2026-10-07 docs(technical): rewrite l4 11-20; reconcile contract deltas with section 5 ef9187f
  2. 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
  3. 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
  4. 2026-09-25 docs(l4): agentic decision architecture, ADRs, and production hardness 8275e7c

Diagram

100%

Search the architecture