Registries and stage graph
- Status
- contract + direction
- Conceptual layer
- ④ Decision
- Repo layer
- L4
knowledge-reasoning - Source
- architecture section 3.6.4, section 5.11
- ADR
- 026
- Registry owner (direction)
- D9
- Normative checkpoints
00-kernel.mdsection 12
The kernel stays small. Domains, workflows, soft thresholds, and model pins change weekly in v1. Hard-coding them into the runtime turns every plant request into a rewrite and breaks replay. Everything replaceable is a versioned registry entry pinned by one release lockfile.
The kernel and runtime refer to registries by id. They never list the five seed domains by name.
Registry catalog#
| Registry | What an entry defines | Used by |
|---|---|---|
| Domains | id, label, attention-budget exempt flag, default owner roles | Card primary domain; memory tags; seam options |
| Families | Evidence family → domain, proof obligations, workflow default | L3 Evidence intake (as built: Finding) |
| Workflows | Stage sequence id, applicability predicate, escape to investigative | Workflow-route seam |
| Stages | Stage id, port, allowed tools, token budget | Stage graph |
| Analyses | Plug-in id, domain binding, claim kinds, forbidden claims | Domain analyses |
| Patterns | Scanner predicate, footprint template, domain, condition-key recipe, verification recipe, owner, precision thresholds | Discovery emit |
| Constraint kinds | Predicate vocabulary + evaluator binding | Constraint evaluator |
| Tools | Allowlisted read tools / builder reads | Analyses, zoom |
| Prompts | Versioned prompt ids per seam / analysis | Model calls |
| Memory missions | Hindsight mission ids and retention | Plant bank |
| Model pins | Family A/B ids, offline council ids, hosting mode | Runtime |
| Ranking policy | Lexicographic order for discovery/portfolio ranking | Discovery, portfolio |
| Soft-gate thresholds | Numeric / enum thresholds per soft gate id | Soft gates |
| Roles | Owner role set | One-owner rule |
Release lockfile#
One lockfile per deploy pins:
- every registry entry version in use
l4-kernelversion- model pins
- Hindsight / case-library schema versions
Replay of a past DecisionCaseOne run unit: intake + snapshot + obligations + candidates + terminal uses the lockfile that was live at run time. Nothing in a registry promotes itself into the lockfile.
Default stage graph#
How to read it.
- Registry-defined stages run left to right; custom graphs may add stages but must still hit every kernel checkpoint.
- Portfolio and minimizer sit before the kernel re-check; nothing skips the constraint evaluator.
- Terminals are code-owned; registries never promote themselves into the lockfile.
Build now: seed registries + default graph above. Later: extra stages that preserve checkpoints (17-change-guide.md).
View Mermaid source
flowchart TB
%% house-style: l4-default-stage-graph
subgraph pipe["Default stage graph (registry)"]
direction LR
c["Candidates"] --> ce["Constraint evaluator"]
ce --> pf["Portfolio"]
pf --> mn["Card minimizer"]
mn --> kr["Kernel re-check"]
end
gate{{"Kernel checkpoints<br/>(00-kernel section 12)"}}
term(["↩ Terminal: emit / supersede / withhold / abstain"])
kr --> gate --> term
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 gate govc
class term loopc
Rules that every custom graph must still obey — see 00-kernel.md section 12 (do not restate the checkpoint list here).
Stages may be added (e.g. an optional analysis stage) or reordered within those checkpoints by registry change + replay.
How a new domain appears#
- Domain registry entry (id, exempt flag, roles).
- Analysis plug-in bound to that id (
10-domain-analyses.md). - Memory tag scope uses the same id.
- Seam option sets pull domains from the registry — no seam code change.
- LockfileRelease pin of registry versions, kernel version, model pins pin + replay on holdouts + shadow before plant default.
No kernel edit. No ADR unless the domain needs a new hard gateNever tunable, never backlog, never explored (unusual).
How a new pipeline stage appears#
- Stage registry entry (port, tools, budget, typed in/out).
- Insert into workflows without skipping kernel checkpoints. If the stage changes candidates or footprints after the constraint evaluator, it must trigger constraint re-evaluation before portfolio.
- Lockfile + replay.
If the stage would change a kernel checkpoint, that is an ADR + kernel bump — not a registry-only change.
Domain registry entry (canonical fields for v1): id, label, attention_budget_exempt, default owner roles, analysis plug-in id. Richer fields (claim kinds, effect units, calculator methods, rendering) live on the analysis plug-in and family entries — see 17-change-guide.md for the full add-domain recipe including L5/L6 section ids on the wire.
Exception-response attention exemption#
Declared on the domain registry entry (attention_budget_exempt: true), not hard-coded in portfolio logic. Portfolio reads the flag (09-portfolio.md).
Seam options from registries#
Workflow route, secondary domain, owner role, pattern id, and similar closed option sets are populated from registries at runtime. Adding a domain or workflow automatically extends the option set for the next lockfile that includes it.
Change control summary#
| Change | Path |
|---|---|
| Registry content | Entry version + lockfile + replay |
| Soft-gate threshold | Soft-gate registry + owner accept after evidence (22-missed-opportunities.md) |
| Stage graph shape | Stage + workflow registries + replay; must keep kernel checkpoints |
| Kernel checkpoints / hard gates | ADR + kernel version bump + full replay |
See also 17-change-guide.md.
v1 slice vs later#
| v1 | Later |
|---|---|
| Seed registries for five product domains + Pilot families/workflows/patterns | Sixth+ domains, more stages, more soft gates — still registry-only |
| Default stage graph | Custom graphs that keep kernel checkpoints |
| Soft-gate thresholds in registry | Same; calibrated via opportunity ledger |
Shared pack target: stamped-external/registries/ (schemas + seed; implementation after this docs set) | Same location |
Page history: last 4 changes
- docs(technical): rewrite l4 21-30, glossary and README; reconcile architecture gaps
e7fead7 - 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 - docs(decisions): renumber live ADRs 001-032 in order, mark withdrawn refs ADR-W###, repoint withdrawn links to archive, note partial supersessions
36c944e - docs(l4): agentic decision architecture, ADRs, and production hardness
8275e7c