These are readable snapshots of existing patterns, not newly authored replacements. Selecting a pattern indicates relevance at the scope explained beside the TODO; it does not adopt every formula, historical status or instruction in its text. No selection is a cascade edge or a completion claim.
Source: /home/joe/code/futon3/library/agent/evidence-over-assertion.flexiarg · SHA256 f73a72b6d4d885810f7f8effbed190165d9a3ca06b45f70ce9959d76916eee36
@flexiarg agent/evidence-over-assertion
@title Evidence Over Assertion
@sigils [📁/示]
@audience agent architects, workflow designers, futon developers
@tone foundational
@style pattern
@why no problem-corpus source matched (@holds-at absent; holds-token and id-text searches over every node in [problems] found no match). Negative claim per the committed check futon2 holes labs library-loop runs l6_no_source_check.py, receipt runs/L10-no-source-check.edn. Rationale not invented (L10 rationale-backfill, zai-1, 2026-09-05)
@how own mechanism: Claims require grounding; an agent that asserts without evidence cannot be audited or trusted. (source: this pattern's ! conclusion line; L10 rationale-backfill, zai-1, 2026-09-05)
! conclusion: Claims require grounding; an agent that asserts without evidence cannot be audited or trusted.
+ context: An agent makes claims about what it did, what it found, or what is true.
+ IF:
The agent's outputs need to be verifiable by other agents, humans, or future selves.
+ HOWEVER:
Assertions without anchors are indistinguishable from confabulation. Observers cannot tell if the agent is reporting reality or generating plausible-sounding noise.
+ THEN:
Require every substantive claim to point to evidence: a file path, a trace event, a test result, a quotation. If evidence is unavailable, emit the claim as provisional with an expiry and a verification path. Make "unsupported claim" a detectable violation, not just a style preference.
+ BECAUSE:
Evidence transforms agent output from "trust me" to "check this." It enables verification, correction, and cumulative trust-building.
+ evidence: Fulab PUR/PSR templates require anchors/certificates (`src/futon3/fulab/pattern_competence.clj`), and claim verification is enforced via `fulab-pattern-claim` + `fulab-pattern-check`.
+ NEXT-STEPS:
- Identify claim types in your agent's output (facts, completions, diagnoses).
- For each type, define what counts as adequate evidence.
- Add validation that flags claims missing their evidence anchors and records provisional claims separately.
- Auto-attach tool/file anchors from `lab/tool-uses` to PUR/PSR records and surface missing evidence in `fulab-session-report`.
Source: /home/joe/code/futon3/library/agent/handoff-preserves-context.flexiarg · SHA256 3be950a40b5e83b0d7168fdfe1dddb02f1f3b5d7e4c220beb7ebf2336dcc18d7
@flexiarg agent/handoff-preserves-context
@title Handoff Preserves Context
@sigils [📤/代]
@audience agent architects, workflow designers, futon developers
@tone foundational
@style pattern
@why problems/process-conduct-is-unassured (A1 round 1; basis: P-assured-process states that handoff machinery is unassured prose rather than typed, refusing contracts; source: futon2 holes problems P-assured-process.md:41-43,55-65; codex-18, 2026-09-06)
@how own mechanism: When passing work to another agent or future self, transfer enough state that the receiver doesn't restart from scratch. (source: this pattern's ! conclusion line; L10 rationale-backfill, zai-1, 2026-09-05)
! conclusion: When passing work to another agent or future self, transfer enough state that the receiver doesn't restart from scratch.
+ context: An agent's work will be continued by another agent, a human, or the same agent in a future session.
+ IF:
Continuity matters: the work is incremental, context is expensive to rebuild, or progress would be lost.
+ HOWEVER:
Without explicit handoff, successors face cold starts: they repeat discoveries, miss constraints, or contradict prior decisions.
+ THEN:
Define a handoff record that captures: current state hypothesis, decisions made and why, open questions, scope boundaries, next actions, evidence/trail anchors, and any provisional-claim ledger. Emit it at session end or when transferring to another agent.
+ BECAUSE:
Handoffs convert ephemeral session state into persistent project state. They enable distributed and asynchronous work without context collapse.
+ evidence: Fulab exports session context to `lab/raw`, `lab/stubs`, and `lab/trace` (`dev/lab-export-claude.clj`), plus summaries via `fulab-summary` and `fulab-session-report`.
+ NEXT-STEPS:
- Identify handoff points in your agent's lifecycle (session end, escalation, delegation).
- Define what context is essential vs. nice-to-have for each handoff type.
- Test handoffs by having a fresh agent resume and measuring ramp-up cost.
- Extend lab stubs/summaries to capture open questions, scope boundaries, and provisional claims for resumption.
Source: /home/joe/code/futon3/library/agent/intent-handshake-is-binding.flexiarg · SHA256 0220b0c31c89b1afc1619e65cd68a0eea46e7a004aacf65ccc4937ee38821e2b
@flexiarg agent/intent-handshake-is-binding
@title Intent Handshake Is Binding
@sigils [👥/令]
@audience agent architects, workflow designers, futon developers
@tone foundational
@style pattern
@why no problem-corpus source matched (@holds-at absent; holds-token and id-text searches over every node in [problems] found no match). Negative claim per the committed check futon2 holes labs library-loop runs l6_no_source_check.py, receipt runs/L10-no-source-check.edn. Rationale not invented (L10 rationale-backfill, zai-1, 2026-09-05)
@how own mechanism: A run should not start until the agent has restated and bound the intent and scope. (source: this pattern's ! conclusion line; L10 rationale-backfill, zai-1, 2026-09-05)
! conclusion: A run should not start until the agent has restated and bound the intent and scope.
+ context: An agent is about to begin a session or new turn.
+ IF:
The system needs a reliable record of what the agent believes it is doing.
+ HOWEVER:
If intent only lives in the prompt or UI, it drifts: agents reinterpret mid-run without explicit renegotiation.
+ THEN:
Require a handshake that echoes intent, scope, constraints, and success criteria, and record an acknowledgment. Changes to intent or scope require an explicit renegotiation event before further actions.
+ BECAUSE:
Binding intent makes the run auditable and prevents silent goal drift.
+ evidence: Fulab HUD prompts require an intent restatement (`src/futon3/fulab/hud.clj`), and `fuclaude --intent` passes intent into the HUD.
+ NEXT-STEPS:
- Add an intent-handshake event to the session start protocol.
- Block tool actions until the handshake is logged.
- Record intent changes as first-class events with rationale.
- Emit an explicit intent-handshake event in lab sessions and enforce it before tool calls.
Source: /home/joe/code/futon3/library/agent/pause-is-not-failure.flexiarg · SHA256 904b1589986a76431b25493ae2a7c25e133687b38682a9ed27bfe11ff0d6b485
@flexiarg agent/pause-is-not-failure
@title Pause Is Not Failure
@sigils [💤/不]
@audience agent architects, workflow designers, futon developers
@tone foundational
@style pattern
@why no problem-corpus source matched (@holds-at absent; holds-token and id-text searches over every node in [problems] found no match). Negative claim per the committed check futon2 holes labs library-loop runs l6_no_source_check.py, receipt runs/L10-no-source-check.edn. Rationale not invented (L10 rationale-backfill, zai-1, 2026-09-05)
@how own mechanism: Stopping to request clarification or expanded scope is a valid action, not a defect. (source: this pattern's ! conclusion line; L10 rationale-backfill, zai-1, 2026-09-05)
! conclusion: Stopping to request clarification or expanded scope is a valid action, not a defect.
+ context: An agent encounters ambiguity, uncertainty, or boundary conditions during execution.
+ IF:
The agent cannot proceed confidently without information or authorization it doesn't have.
+ HOWEVER:
Agents that never pause either over-commit (bulldozing through uncertainty) or silently drift (making up answers). Both erode trust.
+ THEN:
Treat "pause and ask" as a first-class action with defined triggers: ambiguous requirements, scope boundary reached, confidence below threshold, resource budget near exhaustion. Emit pause events with context for resumption (reason, missing info, requested decision, scope impact, confidence/budget snapshot).
+ BECAUSE:
Pausing surfaces uncertainty to those who can resolve it. An agent that pauses appropriately is more trustworthy than one that always "succeeds."
+ NEXT-STEPS:
- Define explicit pause triggers for your agent (don't rely on ad-hoc judgment).
- Design pause events that carry enough context for efficient resumption.
- Track pause frequency as a diagnostic: too many suggests unclear scope; zero suggests over-confidence.
- Add pause events to fulab sessions with reason/confidence/budget snapshots and a resume hook.
Source: /home/joe/code/futon3/library/aif/belief-state-operational-hypotheses.flexiarg · SHA256 7f12e343b0c6878235a996680062f43014a827c10fcb01cc9e6fac69f861983f
@flexiarg aif/belief-state-operational-hypotheses
@title Belief State as Operational Hypotheses
@sigils [〰️/双]
@audience fulab agents, aif implementers
@tone technical
@style pattern
@holds-at R1 ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R1 in p4ng/sec-catalog.tex; see PREREG-war-machine §1b
@why R1 dossier problem: R1 solves how the loop keeps revisable hypotheses rather than repeatedly reasoning from raw history: the roster places **“Belief state”** in BELIEVE (`p4ng/empirics-futon/control-stages.edn:17`; control-stage numbering). (source: futon2 holes labs wm-contract PROBLEMS-r1-r3-r3a-batch3.md, R1, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: Maintain a compact belief map of operational hypotheses that is updated each step. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/r1-belief-state (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
! conclusion: Maintain a compact belief map of operational hypotheses that is updated each step.
+ context: The agent needs an internal state about what it is doing and why, beyond the raw trace.
+ IF:
You want decisions to depend on tractable hypotheses (progress, blockers, pattern fit, uncertainty) rather than raw conversation history.
+ HOWEVER:
If the belief state is just the conversation, the agent cannot cleanly update, compare, or falsify its own assumptions.
+ THEN:
Represent (mu) as a belief map of operational hypotheses (for example: :goal, :subgoals, :current-hypothesis, :blockers, :pattern-fit, :expected-next-observation, :uncertainty), updated at each step using observation and outcomes.
+ BECAUSE:
A compact belief state makes predict -> observe -> update implementable and testable.
+ NEXT-STEPS:
- Define :aif/belief-state schema in tatami_schema.clj with keys [:goal :subgoals :current-hypothesis :blockers :pattern-fit :expected-next-observation :uncertainty].
- Extend aif_bridge/aif-step->event to validate mu against the schema before emitting :aif/tick events.
- Add (mu-diff prev-mu next-mu) helper and log diffs as :aif/belief-delta events in pattern_competence.clj.
- DONE (UKRN v3 HO-01, 2026-05-14): per-institution BeliefState schema with mean+variance per coordinate, named handle (not inlined), centralised initialisation via initial-belief-state. Evidence: notebooks/ukrn_v2_contracts.clj:22-30; notebooks/ukrn_v2_substrate.clj:286-298. Validation: handoffs/v3_runner/validation_HO-01.md.
- DONE (UKRN v3 HO-01): trajectory-CSV emission of belief means and variances per tick, enabling visible belief evolution in the output stream. Evidence: notebooks/ukrn_v2_runner.clj:110-140.
- Practice refinement: prefer a *named schema handle* (e.g. BeliefState) over inlining belief shape inside agent/instance schemas — keeps the schema stable across update-rule changes and reusable by predictive-forward-model code. Surfaced 2026-05-14 in HO-01 review.
- Practice refinement: centralise initialisation in a single helper (e.g. initial-belief-state) rather than duplicating tick-0 values across constructors. Surfaced 2026-05-14 in HO-01 review.
Source: /home/joe/code/futon3/library/aif/candidate-pattern-action-space.flexiarg · SHA256 dc221cd3304cdd998309a06623b22ab594ff725d46111a1c0687c9b561a6a49e
@flexiarg aif/candidate-pattern-action-space
@title Candidate Pattern Action Space
@sigils [📥/力]
@audience fulab agents, aif implementers
@tone technical
@style pattern
@why war-room/wr-19-tension-must-generate-not-only-rank ;; editorial, claude-13 2026-08-23: retrospective sense-making, NOT a causal
;; claim -- WR-19 did not produce this pattern. See README-flexiarg 5a.
@holds-at R6 ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R6 in p4ng/sec-catalog.tex; see PREREG-war-machine §1b
@see-also aif/evidence-precision-registry
@why R6 dossier problem: Control-stage R6 occupies SELECT and is labelled **“Candidate action space”** (`p4ng/empirics-futon/control-stages.edn:23`; control-stage numbering), although the original contract R6 criterion is the adjacent operation: softmax selection with temperature and an abstain branch, where **“the agent declines to act”** under too much predictive uncertainty (`docs/futon-aif-completeness.md:147-157`; contract R6). (source: futon2 holes labs wm-contract PROBLEMS-r4-r5-r6-pilot.md, R6, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: Treat action selection as choosing from a bounded candidate set of pattern IDs. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/r6-candidate-action-space-and-selection (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
@why problems/tension-proposes-candidates (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
! conclusion: Treat action selection as choosing from a bounded candidate set of pattern IDs.
+ context: Action selection in fulab often means selecting (and committing to) a pattern to apply next.
+ IF:
You want pattern choice to be legible and comparable, and you want to avoid collapse into one habitual pattern.
+ HOWEVER:
If the action space is any pattern at any time, evaluation becomes unstructured and selection becomes arbitrary or dominated by recency.
+ THEN:
Define (a) as a constructed candidate set of pattern IDs produced by retrieval plus gating rules, with bounded size and explicit reasons for inclusion and exclusion.
+ BECAUSE:
Constraining the action space makes downstream scoring meaningful rather than performative.
+ NEXT-STEPS:
- Add :aif/candidate-entry and :aif/candidate-chosen event types to tatami_schema.clj.
- In learn_or_act/expand-hints, emit :aif/candidate-entry for each pattern in :search/candidates.
- In learn_or_act/decide success path, emit :aif/candidate-chosen with pattern-id and runner stats.
- Create aif_coverage.clj with (coverage-report session-id) that computes entered-vs-chosen ratios per pattern.
Source: /home/joe/code/futon3/library/aif/currency-before-merge.flexiarg · SHA256 ad88ea7650006dd215451753c29113dc30c614b44bbe6ac8bd408ddcf82c15a3
@flexiarg aif/currency-before-merge
@title Currency Before Merge
@keywords valuation, units, commensurability, exchange-rate, multi-objective, score
@audience aif implementers, scorer designers, futon developers
@tone technical
@style pattern
@references [aif/declare-the-conditioning aif/placeholder-is-load-bearing]
@see-also aif/expected-free-energy-scorecard
@why no matching problem dossier node (@holds-at absent; not among the twenty dossier nodes R1-R17, R20, TRACE). Negative claim per the committed check futon2 holes labs library-loop runs l3_no_dossier_check.py, receipt runs L3-no-dossier-check.edn (enumerates every aif pattern's @holds-at against the dossier node set extracted from PROBLEMS-*.md headings). Rationale not invented (L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: Never sum value-signals from different lanes without an explicit exchange rate; a constant standing in for a missing exchange rate IS the smell. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
! conclusion: Never sum value-signals from different lanes without an explicit exchange rate; a constant standing in for a missing exchange rate IS the smell.
+ context: A system accumulates valuation lanes over time (an EFE blend, a wholeness score, a rollout ΔG, heuristic bonuses), and selection wants one number to rank by.
+ IF:
You need candidates valued by different subsystems to compete in one arena.
+ HOWEVER:
The lanes are in incommensurate units, and the cheap move — projecting everything into one linear sum at hand-set weights, or gluing unscored rows in with a constant — hides the incommensurability instead of resolving it. The weights silently absorb the units problem; the constants silently become behaviour.
+ THEN:
Before any cross-lane merge, either establish a real exchange rate (a shared unit like nats, a fitted calibration with stated evidence) or keep the lanes separate and declare the selection rule over the tuple. Audit every constant in the arena: ask what it beats and what beats it.
+ BECAUSE:
A merged score with no exchange rate optimizes an accident of scale, not a judgment; behaviour is then dominated by whichever lane happens to have the largest dispersion.
+ evidence: M-evaluate-policies (futon2, 2026-07-03): the WM blend flattened C/E/Π-slot terms into one sum — measured result: the epistemic pole had 0% decision influence over 674 ticks while high-dispersion analogical terms steered (47.9%/44.5% flip-rates); cascade rows entered at a 0.0 constant and never won (293/293). E4: every naive renormalisation just moved winners without warrant (11.4%–93.8%).
+ NEXT-STEPS:
- Inventory each lane's unit and dispersion (within-decision dispersion, not corpus-wide).
- Name the exchange rate or refuse the merge; record the decision as IF/HOWEVER/THEN/BECAUSE.
- Add an invariant: every summand entering the merged score is persisted with it (no silent steering).
Source: /home/joe/code/futon3/library/aif/declare-the-conditioning.flexiarg · SHA256 ce32fce1e34076f70d5ec04b8bfd5b3372f6c3347be00c67371db65ba77554d9
@flexiarg aif/declare-the-conditioning
@title Declare the Conditioning (Score the Fit, Not the Form)
@keywords conditioning, situation, context, fit, EFE, curried, referent
@audience aif implementers, pattern authors, futon developers
@tone technical
@style pattern
@references [aif/currency-before-merge aif/valuation-reads-the-paperwork]
@how aif/structured-observation-vector
@see-also aif/term-to-channel-traceability
@why no matching problem dossier node (@holds-at absent; not among the twenty dossier nodes R1-R17, R20, TRACE). Negative claim per the committed check futon2 holes labs library-loop runs l3_no_dossier_check.py, receipt runs L3-no-dossier-check.edn (enumerates every aif pattern's @holds-at against the dossier node set extracted from PROBLEMS-*.md headings). Rationale not invented (L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: Every valuation surface must declare what slice of the situation it consumed; G(candidate) is a lambda — only G(candidate | situation) is a value. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
! conclusion: Every valuation surface must declare what slice of the situation it consumed; G(candidate) is a lambda — only G(candidate | situation) is a value.
+ context: A stack grows multiple valuation surfaces (blend terms, wholeness, ΔG legs, field diagrams), each labelled with the same vocabulary ("EFE", "value", "score").
+ IF:
You want valuations to be comparable, auditable, and honestly labelled.
+ HOWEVER:
Different surfaces silently consume different slices of the world — one eats the live observation vector, another a 160-char prose scrap, a third nothing at all — so identical labels name incomparable objects, and cross-surface comparisons are apples-to-oranges without anyone having lied.
+ THEN:
Give every valuation surface a three-axis declaration: SENSE (which formal object it claims), SELECTION-SEMANTICS (extremum / amortized sample / bound — over what menu), and CONDITIONING (what situation-slice it consumed). Render the declaration where the number is rendered. In pattern terms: Context → (Problem → Solution) — application is modus ponens; the world supplies the antecedent; score the fit, never the form alone.
+ BECAUSE:
Canonical expected free energy is G(π; Q(s), C) — conditioned on beliefs and preferences by definition; a policy has no value in vacuo, and Alexander says the same of form and context. Surfaces that skip the declaration re-invent the mislabeling one level up.
+ evidence: M-evaluate-policies §9.6–9.7 + exhibit "conditions on" column (futon2, 2026-07-03): the atomic-action lane conditioned on the live observation vector while the cascade lane ate a title+status scrap and two native components consumed no situation at all — one arena, incomparable conditioning. E5 measured the conditioning channel: situation-enriched ψ rebuilt 11/13 cascades. The fold contract already typed circumstance as an argument; the plumbing had starved it.
+ NEXT-STEPS:
- Add the sense × selection-semantics × conditioning triple to each EFE-labelled surface's declaration (extends the efe-referent-declaration shape).
- Route all lanes toward ONE situation source (the structured observation vector) where feasible.
Source: /home/joe/code/futon3/library/aif/free-energy-as-tick-scalar.flexiarg · SHA256 7c2b9cc16996715d742fd1591f441489854f37cb32da586d021f42ef8b940107
@flexiarg aif/free-energy-as-tick-scalar
@title Variational Free Energy as a Per-Tick Scalar
@sigils [🪔/双]
@audience fulab agents, aif implementers
@tone technical
@style pattern
@holds-at R8 ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R8 in p4ng/sec-catalog.tex; see PREREG-war-machine §1b
@see-also aif/evidence-precision-registry
@how aif/predictive-coding-belief-update
@see-also aif/expected-free-energy-scorecard
@why R8 dossier problem: R8 solves how the loop exposes whether its present belief explains the evidence: the roster places **“Present-fit mismatch”** in PERCEIVE (`p4ng/empirics-futon/control-stages.edn:16`; control-stage numbering). (source: futon2 holes labs wm-contract PROBLEMS-r2-r8-r7-batch2.md, R8, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: Compute and emit variational free energy F = 0.5 × mean(Π · ε²) per tick as a canonical scalar that summarises agent surprise. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/per-tick-mismatch-instruments-outer-loop-gain (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
@why problems/r8-present-fit-mismatch (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
! conclusion: Compute and emit variational free energy F = 0.5 × mean(Π · ε²) per tick as a canonical scalar that summarises agent surprise.
+ context: AIF computes two distinct quantities. **G** (Expected Free Energy) is per-candidate-action, drives policy. **F** (Variational Free Energy) is per-tick, summarises how surprised the agent currently is by its observations. They are different objects; conflating them is a common documentation hazard.
+ IF:
You want a single, comparable-across-time scalar that says "how badly is the agent's current belief explaining what it just observed?" — useful for validation (F should decrease on average as the agent learns), diagnostics (F-spikes flag surprise events worth investigating), and operational triggers (F-above-threshold can signal hyperparameter adjustment).
+ HOWEVER:
Without an explicit F-per-tick, the agent's belief evolution becomes opaque — there's no scalar to plot, no acceptance criterion to test, no operational alarm to trigger. And G-per-candidate is not a substitute: G is about the future; F is about the present.
+ THEN:
Implement F as a pure function (mu, observation, precision-opts) → non-negative scalar, applying the formula F = 0.5 × mean(Π_k · ε_k²) over all observation channels k. Emit it as part of the per-tick trace alongside μ and ε. When μ matches observation exactly, F should be zero by construction.
+ BECAUSE:
F is the quantity AIF agents are minimising (variationally); making it observable per tick gives a clean validation target (V3: F decreases on average) and a clean operational signal (sudden F-jumps merit attention). Keeping F distinct from G in vocabulary, file location, and trace schema prevents the cross-stack confusion where one is mistaken for the other.
+ NEXT-STEPS:
- Implement free-energy as a pure function in the same namespace as the belief update (canonical pairing: same module owns both rules). Pure function, takes precision options as inputs.
- Trace F per tick alongside μ and ε; include in CSV/evidence emissions.
- Acceptance: F = 0 when belief matches observation; F ≥ 0 always; F decreases over a run on average. The third property is V3 in the AIF completeness validation harness.
- DONE (UKRN v3 HO-02, 2026-05-14): free-energy implemented as pure function in notebooks/ukrn_v3_belief.clj:42-51. Hand-computed test cases pass. Available for the V3 validation property in the planned validation harness.
- Practice: when documenting an AIF surface, refer to F as "free energy" or "variational free energy" and G as "expected free energy" or "EFE-per-candidate". Cross-stack vocabulary discipline reduces handoff ambiguity.
Source: /home/joe/code/futon3/library/aif/grounded-actuation-not-reobservation.flexiarg · SHA256 81fd51b6e5f1aab495d6787a63ac86b558a6882721071f86426db4cacf188bc8
@flexiarg aif/grounded-actuation-not-reobservation
@title Grounded Actuation, Not Re-Observation (the loop closes outside the model)
@sigils [🐜/专]
@audience fulab agents, aif implementers
@tone technical
@style pattern
@holds-at R16 ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R16 in p4ng/sec-catalog.tex; see PREREG-war-machine §1b
@why aif/no-self-certification
@see-also aif/scheduled-observer-entrypoint
@why R16 dossier problem: R16 solves what makes a selected action an intervention rather than another internal calculation: the roster places **“Grounded actuation”** in ACT (`p4ng/empirics-futon/control-stages.edn:28-31`; control-stage numbering). (source: futon2 holes labs wm-contract PROBLEMS-r16-r13-r14-batch4.md, R16, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: A closed action–perception loop (R16) requires the act to write an ungameable witness to a substrate OUTSIDE the generative model, and that witness to feed the next decision. Re-running your own constructor and scoring how faithfully it reproduced its own diagram is a mirror, not an act. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/r16-grounded-actuation (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
! conclusion: A closed action–perception loop (R16) requires the act to write an ungameable witness to a substrate OUTSIDE the generative model, and that witness to feed the next decision. Re-running your own constructor and scoring how faithfully it reproduced its own diagram is a mirror, not an act.
+ context: R16 asks the loop to close — action feeds back, changes the world, and the changed world changes the next belief/decision ("act → world → observe → act"). The enactment seam is where a deliberating agent becomes an acting one.
+ IF:
You want a genuinely closed action–perception loop: the agent selects a policy, acts on it, and the world it observes on the next tick is materially different because it acted.
+ HOWEVER:
This is seductively easy to fake. An "enactor" that re-runs the fold/construction engine and measures coverage-ΔG over how faithfully the builder reproduced the diagram produces a perfectly honest number over a quantity that CANNOT MOVE — the mission's open-hole-count never changes, so the recommendation repeats forever and the loop reports green. Honesty about a quantity that cannot move is still inertia. The tell: `:realized-G` is computed by re-observing the construction the executor itself just built (the anti-tautology cross-check can be present and the loop still be causally sealed from the world).
+ THEN:
Close the loop only when BOTH hold. (1) The act writes a TYPED, UNGAMEABLE witness to a substrate outside the model: the sorry's endpoints proven inhabited by a query DERIVED FROM the authored bindings, not from builder claims (you cannot `touch` a typed `:capability/*` hyperedge over real `:capability`×`:mission/doc` nodes into existence — producing the structure IS the work); AND the built structure matching its CLean wiring spec box-for-box (build-match: every box's `:produces` inhabited, not just the terminal boundary). (2) That witness feeds the next decision — the deliberator re-ranks on the substrate dial. Gate "closed = ✓" on a real dial move (1/2 → 2/2), NEVER on the enactor merely firing.
+ BECAUSE:
The entire point of a perception–action loop is that action changes the world and the changed world changes the next belief. If "realized" is coverage-over-reproduction, the world never changes and the belief never updates — you have built a machine that dreams it acted. The witness must be (a) outside the model (so the model cannot author its own success) and (b) ungameable (so a builder cannot claim it), or the closure is a reflection.
+ NEXT-STEPS:
- DONE (2026-07-07, c9e1dbc): provable substrate witness — the sorry's endpoints proven inhabited via authed Drawbridge `xtdb.api/q`, derived from authored `:endpoint-bindings`, ungameable. Verified: a written `:capability/*` hyperedge is matched, an absent one is not. Evidence: futon2/src/futon2/aif/actuator_a3.clj.
- DONE (2026-07-08, 8bdff65 / 4ecf5eb): the fold emits a `clean_argcheck`-gated CLean; the structure spec becomes contractual at deposit time — a fold cannot deposit a malformed CANALIZE. Evidence: futon2/aif/fold_escrow.clj.
- DONE (2026-07-08, fdbc527): build-match — every box's `:produces` checked against the CLean, not just the terminal. The discriminating case (terminal inhabited, an interior box missing) is caught. Evidence: box-match-snapshot / build-match.
- DONE (2026-07-08): build-match on the DONE mission autoclock-in reads 2/3 and surfaces genuine drift — the clock hyperedge exists but its agent endpoints are raw strings, not typed `:person` entities. The structure check found a real substrate-schema gap, not an invented one. Evidence: futon2/holes/bindings-autoclock-in-grounding.md.
- OPEN (the second half): the deliberator does not yet re-rank on the substrate dial — the witness lands but does not change the next decision. Needs R12 (accumulated learning) + R13 (policy discrimination; the G-ties false-floor). This is the deferred long-term-memory gap; until it lands, R16 is grounded-actuation (◐), not a closed loop.
- OPEN: the live durable discharge — the act firing end-to-end (builder writes the endpoint, executor proves the dial moved 1/2 → 2/2), operator-gated.
- Anti-pattern to name explicitly: `re-observe-your-own-construction` — measuring realized outcome by re-running the constructor. If `:realized` is a function of the executor's own output, the loop is a mirror.
Source: /home/joe/code/futon3/library/aif/hierarchical-and-temporal-depth.flexiarg · SHA256 7de8b14a408582a834fa7e271729de8a7ca7f36bda7e8579df38734757cd7b5c
@flexiarg aif/hierarchical-and-temporal-depth
@title Hierarchical and Temporal Depth (Each Level Has Its Own Quantities)
@keywords hierarchy, timescale, strategic loop, tactical loop, temporal discount, calibration state, two-tick campaign, Beta update
@audience aif implementers; anyone coupling a fast loop inside a slow one
@tone technical
@style pattern
@provenance written 2026-08-30 (claude-15) from the catalogue paragraph numbered R15 in p4ng/sec-catalog.tex (PLoP 2026), so that every R-node on Figure 4 has a library pattern; wording follows the paragraph, which is the standard
@see-also aif/temporal-depth-beyond-greedy aif/hierarchical-budget-aware-action-selection
@holds-at R15 ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R15; see PREREG-war-machine §1b
@see-also aif/policy-precision-commitment-temperature
@why R15 dossier problem: R15 solves how a fast tactical loop and a slower strategic loop become a hierarchy rather than two unrelated scorers: the roster places **“Hierarchy and timescale”** in SELECT (`p4ng/empirics-futon/control-stages.edn:26`; control-stage numbering). (source: futon2 holes labs wm-contract PROBLEMS-r15-r11-r17-batch5.md, R15, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: When a fast tactical loop acts inside a slower strategic loop, make the coupling explicit and give each level its own quantities — strategic selection fixes the tactical target, witnessed tactical outcomes update the next strategic calibration state, and longer policies carry a named temporal discount of their own — so that no quantity does duty at two levels at once. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/r15-hierarchy-and-timescale (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
! conclusion: When a fast tactical loop acts inside a slower strategic loop, make the coupling explicit and give each level its own quantities — strategic selection fixes the tactical target, witnessed tactical outcomes update the next strategic calibration state, and longer policies carry a named temporal discount of their own — so that no quantity does duty at two levels at once.
+ context: An AIF harness with two grains of decision: a strategic loop that chooses which task
to work on and updates priors and preferences slowly, and a tactical loop that constructs and
executes a cascade against the chosen target quickly. (R13 names the two loops; R11 is the
orthogonal resource hierarchy over a shared budget. This pattern is the coupling between the
two timescales.)
+ IF:
A fast tactical loop acts inside a slower strategic loop.
+ HOWEVER:
Merely giving both levels a scalar score does not create a hierarchy. A second use of the
same score — the commitment dial doing duty as a temporal discount, a tactical outcome read
as if it were strategic evidence — collapses the levels back into one, and nothing in the
record can then say which level learned what.
+ THEN:
Make the coupling explicit, in three named seams: (1) strategic selection fixes the tactical
target — the tactical loop does not choose what to work on; (2) witnessed tactical outcomes
update the next strategic calibration state — an outcome enters the slow level only through
a witness the fast level did not manufacture; (3) longer policies use a named temporal
discount of their own, rather than overloading the commitment dial (R14) to stand in for
time preference.
+ BECAUSE:
Hierarchy is a relationship between levels and timescales, not a second use of the same
score. Each level has its own quantities; the invariant to preserve is that no quantity does
duty at two levels at once.
+ evidence: the opt-in two-tick campaign records both levels separately, rejects unwitnessed
learning, folds a grounded fast outcome into a Beta update of the slow state, and uses that
state to parameterise the next fast rollout. Campaign S (2026-08-21): Tick A's independently
approved and grounded outcome advanced the slow posterior from Beta(1,1) to Beta(2,1),
changed the slow mode from exploration to consolidation, and parameterised Tick B under
that state. This is evidence for the explicit coupling, not for a general nested
generative model.
+ COUNTERFACTUAL: a run in which a tactical outcome changed the strategic state without a
witness, or in which the commitment dial and the temporal discount are one number, would
show the coupling is not explicit.
Source: /home/joe/code/futon3/library/aif/hierarchical-budget-aware-action-selection.flexiarg · SHA256 e895d512bf3b078167d449317303222536efa9c53f6ea2a0c7f44d493a7c6f1b
@flexiarg aif/hierarchical-budget-aware-action-selection
@title Hierarchical Budget-Aware Action Selection
@sigils [🏛️/双]
@audience fulab agents, aif implementers, multi-agent-AIF designers, simulation-of-collective-action designers
@tone technical
@style pattern
@holds-at R11 ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R11 in p4ng/sec-catalog.tex; see PREREG-war-machine §1b
@see-also aif/free-energy-as-tick-scalar
@see-also budgeted-action-selection/mana-gated-work
@why R11 dossier problem: R11 solves how locally factored proposals share a finite resource without silently oversubscribing it: the roster places **“Hierarchical shared budget”** in SELECT (`p4ng/empirics-futon/control-stages.edn:27`; control-stage numbering). (source: futon2 holes labs wm-contract PROBLEMS-r15-r11-r17-batch5.md, R11, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: When multiple agents operating over shared state can independently choose actions that share consumable resources, resolve conflicts at multiple budget hierarchy levels: aggregate setup-budget conservation across all agents per tick; per-instance forward projection of each action's downstream resource consumption to detect instances that would predictively exhaust. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/r11-hierarchical-shared-budget (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
! conclusion: When multiple agents operating over shared state can independently choose actions that share consumable resources, resolve conflicts at multiple budget hierarchy levels: aggregate setup-budget conservation across all agents per tick; per-instance forward projection of each action's downstream resource consumption to detect instances that would predictively exhaust.
+ context: A multi-agent (or multi-band, or hierarchical) AIF setup gives each agent or sub-agent local autonomy: each scores candidate actions and selects via softmax. But the candidates often consume shared resources — setup budget for capability activation, engagement-budget for per-instance participation, attention budget across the agent's responsibility area. A naive *union* of independent selections will violate resource constraints whenever multiple agents simultaneously prefer expensive candidates.
+ IF:
You want collective action selection that respects budget constraints at every hierarchy level. You want the agent (a) to never recommend allocations that exceed available aggregate budget per tick, and (b) to factor in *downstream* consequences of each candidate on per-instance budgets so the agent doesn't recommend "great-looking now" candidates that cause instances to exhaust their budgets in the next K ticks.
+ HOWEVER:
A naive union-of-selections leaves the budget invariant unenforced — over-subscription happens silently. A naive single-coordinator approach throws away the value of the local-agent factoring, requiring all candidates to compete in one big softmax. Neither is right.
+ THEN:
Implement conflict resolution at *each* hierarchy level explicitly:
- **Aggregate level**: a coordinator function `resolve-conflicts` that takes per-agent selections, applies them in priority order (e.g. importance band, deadline order, severity rank), debiting shared budget per applied action. Actions that exceed remaining budget are dropped to a no-op baseline or downgraded; trace records which were dropped and why.
- **Per-instance level**: a `feasibility-penalty` EFE subterm. For each candidate, project per-instance resource consumption forward over K ticks using a cheap approximation (constant status; only the budget decays). Count instances predicted to fall below their minimum-viable budget threshold. The penalty scales linearly with that count, multiplied by a tunable λ weight.
Both layers produce trace fields. The trace fields land in the per-tick record (R8) so the agent's reasoning about resource constraints is auditable.
+ BECAUSE:
Conservation at the aggregate level is a *hard* constraint (you literally can't spend more than the budget; violating it makes the simulation incoherent). Forward-projecting per-instance consumption is a *soft* constraint (the agent might be willing to risk some instances exhausting if the candidate's other terms are sufficiently good). Hard constraints belong in the action selector; soft constraints belong in the EFE term. Implementing both gives the agent the right kind of attention to budget at every level.
+ NEXT-STEPS:
- Identify the budget hierarchy in your domain: aggregate (per-tick setup or attention budget shared across agents) and per-instance (resource each instance consumes to participate, with a threshold below which the instance disengages).
- Implement `resolve-conflicts`: priority-ordered application; per-agent fallback to no-op baseline; trace records.
- Implement `feasibility-penalty`: K-tick forward projection; cheap approximation by default (constant non-budget status; only budget decays). Avoid full kernel-replay over K ticks unless the cheap approximation gives wrong answers.
- Calibrate the aggregate budget against the actual action-cost distribution: pick a value that admits one expensive action or two cheap actions per tick; tighter than "everything fits", looser than "always blocks".
- Calibrate λ_feasibility: should produce a penalty large enough to deter clearly-truncating candidates but not so large that no candidate ever passes it.
- DONE (UKRN v3 HO-07, 2026-05-14): `resolve-band-conflicts` at notebooks/ukrn_v3_kernel.clj:30-79 implements aggregate setup-budget conservation in band priority order (high → middle → thin). `budget-feasibility-penalty` at notebooks/ukrn_v3_efe.clj:205-211 implements per-institution K=4 tick projection; λ=0.5 per predicted truncation. Smoke output: a candidate against population with 6 high-band institutions at budget=20 produces feasibility-penalty=3.0 (6 at-risk × 0.5), shifting G from −4.28 to −1.28 (+70% deterrent). Closes V9 (setup-budget conservation) and V11 (per-institution budget feasibility). Evidence: handoffs/v3_runner/validation_HO-07.md.
- Practice: duplicate same-tick proposals (two agents proposing the same action) should typically pay the aggregate cost once, not twice — debit on first-occurrence-of-action-id, not per-agent. Mirrors set-semantics of resource activation.
- Practice: K-tick forward projection complexity should match operational stakes. Full kernel-replay K times per candidate is expensive; the cheap approximation (status held constant; budget decays linearly) is usually sufficient because the agent's decision is *should I avoid candidates that drain budgets* not *what exactly will happen K ticks from now*. The approximation is fit for purpose.
Source: /home/joe/code/futon3/library/aif/interoceptive-tripwires.flexiarg · SHA256 e543c22f3127a89e8e6e9e98ff51f9131b5f7db245fb01c8c803a5a43d8ceca8
@flexiarg aif/interoceptive-tripwires
@title Interoceptive Tripwires (Freeze, Record, Park, Summon)
@keywords tripwire, interoception, invariant, phase boundary, retro-trip, blind-spot map, stop-line, wedge, livelock, precision evidence
@audience anyone running a control loop live whose failures have so far been found by post-hoc archaeology
@tone technical
@style pattern
@provenance written 2026-08-30 (claude-15) from the catalogue paragraph numbered R20 in p4ng/sec-catalog.tex (PLoP 2026), so that every R-node on Figure 4 has a library pattern; wording follows the paragraph, which is the standard. The implementation on record (futon2/src/futon2/aif/tripwire.clj, 13 wires, 2026-07-16) watches the coding-cohort runner, not the AIF loop — see futon4/holes/delivery-lifecycle.v1.md §0
@see-also aif/no-self-certification aif/evidence-precision-registry
@holds-at R20 ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R20; see PREREG-war-machine §1b
@see-also aif/structured-observation-vector
@why R20 dossier problem: R20 solves observation of the machine's own failure trajectories: the roster places **“Interoceptive tripwires”** in EVALUATE's assurance band (`control-stages.edn:41`; control-stage/catalogue numbering). (source: futon2 holes labs wm-contract PROBLEMS-assurance-band-batch6.md, R20, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: Weave a supplementary harness of invariant tripwires around the live run at its phase boundaries — each wire a near-infinite-precision prior over machine trajectories — so that a violation is noticed at the moment it happens, with the state still warm; a trip is surprisal that belief updating cannot explain away, and the mandated action is freeze, record, park, summon, on a ladder that degrades only toward recording. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/r20-interoceptive-tripwires (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
! conclusion: Weave a supplementary harness of invariant tripwires around the live run at its phase boundaries — each wire a near-infinite-precision prior over machine trajectories — so that a violation is noticed at the moment it happens, with the state still warm; a trip is surprisal that belief updating cannot explain away, and the mandated action is freeze, record, park, summon, on a ladder that degrades only toward recording.
+ context: A loop whose constructed core (R1–R16) has been hardened and which now runs live,
where every pathology so far — wedges, livelocks, mixed code images, silently lost wakes — was
discovered afterwards, on a completed broken run.
+ IF:
You have hardened the loop's constructed core and want the machinery itself to be observable
while it runs live.
+ HOWEVER:
The loop's observation channel is task-level only: it observes the world it acts on (job
outcomes, verdicts, witnesses, QA), while its own machinery is a hidden state with no
likelihood mapping. And simulation tests of the known invariants pass by construction the
moment the known bugs are fixed, so neither channel can notice the failure modes nobody has
imagined yet.
+ THEN:
Weave a supplementary harness of invariant tripwires around the live run at its phase
boundaries. Each wire is a near-infinite-precision prior over machine trajectories — turn
conservation, ledger closure, review-commit provenance binding, append-only repair stores and
their status lattice, wedge and livelock detectors, wall-clock overrides, loaded-code/file-code
coherence, and an environment-alphabet wire on which any unknown job state trips rather than
defaulting. A trip is surprisal that belief updating cannot explain away, and the mandated
epistemic action is freeze, record, park, summon: write the frozen state as a durable report,
open a typed stop-line through the loop's own repair machinery, park an investigation join and
summon the outer reviewer, on a fail-safe ladder that only ever degrades toward recording,
never toward blocking the run. Calibrate before arming: the wires must retro-trip on the known
incident corpus (a wire that does not fire on the known past is a dud laser), and every closed
incident thereafter must deposit either a new wire or an entry on an explicit blind-spot map.
+ BECAUSE:
This is interoception, not vision. Like any sensorium it admits no completeness theorem — it
gets identifiability checks, a measured coverage number, and a blind-spot map instead. An
organism with only a hand (R16) and a preference model (C) learns of poison from the stomach
ache, and each hotfix repairs one meal; an organism with interoceptive nerves notices at the
moment of violation and every incident leaves it permanently more observant. The trip stream
is also precision evidence about the machine itself (R7): a wire whose trips keep being
blessed as model revisions demotes itself, and a genuine trip should lower the system's
confidence in its own machinery until the finding is discharged.
+ evidence: the operational witness of 2026-07-16: eleven wires specified from the loop's own
fix-ledgers, retro-tripping 4/4 on the reconstructed incident corpus; first live catch about
itself (fifteen shadow-mode trips from a baseline captured mid-load); 43 trips 07-16..07-27,
all but one :record.
+ COUNTERFACTUAL: a blind-spot map with one entry that does not name the loop the harness was
built for is the failure this pattern must refuse — recorded against the July harness, which
watched the coding runner while the AIF loop it was meant to observe had already gone
quiet (futon4/holes/delivery-lifecycle.v1.md §0).
Source: /home/joe/code/futon3/library/aif/measurement-window-hygiene.flexiarg · SHA256 e393cb9cd1fd8de60fa503fee23f565529fcedd6ccbb5dc6e40b5711803236dd
@flexiarg aif/measurement-window-hygiene
@title Measurement-Window Hygiene (Tight Baseline, Settled Readback, Drop the Confounded)
@sigils [⊢⊣/≈]
@keywords measurement, baseline, settled read, transient spike, stale begin, drift, before-after, eventual consistency, prediction error, confound
@audience anyone measuring an action's effect on a drifting, settling system
@tone practical
@style pattern
@see-also aif/term-to-channel-traceability
@why no matching problem dossier node (@holds-at absent; not among the twenty dossier nodes R1-R17, R20, TRACE). Negative claim per the committed check futon2 holes labs library-loop runs l3_no_dossier_check.py, receipt runs L3-no-dossier-check.edn (enumerates every aif pattern's @holds-at against the dossier node set extracted from PROBLEMS-*.md headings). Rationale not invented (L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: To measure an action's effect on a system that drifts and settles over time, capture the BASELINE tight — right before the action, not before the preparatory work — and read the EFFECT settled — after the state stabilizes (≥2 consecutive reads agree within ε) — and EXCLUDE any pair where drift or transience confounds the window. A before/after number is only as good as the window it brackets. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
! conclusion: To measure an action's effect on a system that drifts and settles over time, capture the BASELINE tight — right before the action, not before the preparatory work — and read the EFFECT settled — after the state stabilizes (≥2 consecutive reads agree within ε) — and EXCLUDE any pair where drift or transience confounds the window. A before/after number is only as good as the window it brackets.
+ context: You measure `effect = after − before` around an action, in a system whose state
propagates asynchronously (scans, caches, eventual consistency, a live field other agents touch).
+ IF:
You record a predicted/realised (or before/after) pair to score an action's effect on such a
system.
+ HOWEVER:
Two window failures inflate or fabricate the number, and both look clean:
(a) STALE BASELINE — you captured "before" *early* (e.g. before minting the artifact the action
commits), and the system drifted in between; the measured Δ is mostly that drift, not the action.
(b) TRANSIENT READBACK — you read "after" at the first post-action sample, catching an in-flight
spike that decays to baseline; the measured Δ is a scan-timing artifact.
+ THEN:
Bracket the window tightly. BEFORE: capture the baseline immediately prior to the field-visible
action — do the preparatory work first, *then* baseline, *then* commit. AFTER: read at the
settled state — require ≥2 consecutive reads agreeing within ε; tag `:settled` vs `:transient`
and exclude transient. And if the system drifted independently inside the window, DROP the pair
(untagged / proposal-mode) rather than attribute the drift to the action.
+ BECAUSE:
A measurement's validity lives in its window, not its arithmetic. The durable effect is what
persists between a tight baseline and a settled readback; everything else — drift, spikes — is
the window leaking. Excluding a confounded pair keeps the dataset honest; recording it launders
noise as signal. (The two failures, caught live: a 0.277 "move" that was a transient spike
(retracted on settled re-read); and a 0.277 "move" that was field drift during artifact-minting
(excluded, proposal-mode) — same magnitude, both fake, both caught by tightening the window.)
+ how-to-apply:
Order operations: prepare → baseline → act → settle → read → (exclude if confounded). Never
baseline before the slow part; never read before the fast part settles; never attribute a
window's drift to the action inside it. Distilled from the FutonZero G-SIM calibration arc
(WM-pilot, 2026-06-11). Sibling of `[[aif/no-self-certification]]`.
Source: /home/joe/code/futon3/library/aif/no-self-certification.flexiarg · SHA256 4d07c7dfda6e0c30181a60bdab3aecfbe8f1d54bbe64b4014eb7a79853aa57c2
@flexiarg aif/no-self-certification
@title No Self-Certification (A Verdict Moves Only on Evidence Its Maker Did Not Manufacture)
@sigils [⊘/⟲]
@keywords self-certification, circular evidence, prior-equals-value, independence tag, censored observation, calibration, verdict, structural enforcement, untagged-never-counts
@audience anyone building a measurement, calibration, gate, certifier, or reward channel
@tone foundational
@style pattern
@why war-room/wr-25-good-news-gets-the-same-evidence-discipline-as-bad ;; editorial, claude-13 2026-08-23: retrospective sense-making, NOT a causal
;; claim -- WR-19 did not produce this pattern. See README-flexiarg 5a.
@holds-at R9 ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R9 in p4ng/sec-catalog.tex; see PREREG-war-machine §1b
@how aif/measurement-window-hygiene
@see-also aif/interoceptive-tripwires
@why R9 dossier problem: Control-stage R9 solves who may certify a result: the roster places **“No self-certification”** in ACT's assurance band (`p4ng/empirics-futon/control-stages.edn:43`; control-stage/catalogue numbering). (source: futon2 holes labs wm-contract PROBLEMS-assurance-band-batch6.md, R9, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: A measurement / verdict apparatus must never be moveable by evidence it manufactured itself. Enforce this STRUCTURALLY — with tags the apparatus cannot fake (independence, measured-vs-fallback, settled-vs-transient) and a verdict that counts only those tags — not by vigilance. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/r9-no-self-certification (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
! conclusion: A measurement / verdict apparatus must never be moveable by evidence it manufactured itself. Enforce this STRUCTURALLY — with tags the apparatus cannot fake (independence, measured-vs-fallback, settled-vs-transient) and a verdict that counts only those tags — not by vigilance.
+ context: You are building an instrument that issues a verdict — "calibrated", "passed",
"admissible", "rewardable" — from evidence that the same system also produces, stages, or
scores. The verdict will look earned long before it is.
+ IF:
An instrument issues a verdict from evidence it also produces or stages (a calibrator over
its own predictions, a gate over its own outputs, a reward channel over its own scores).
+ HOWEVER:
On first contact with reality, every layer tries to certify ITSELF, and each attempt looks
rigorous: the forward model scores its own constants (`prior == value`); the evidence reader
eats its own staging files; the realised channel copies predicted on success (a censored
0.0); the calibration clears on degenerate volume. Vigilance cannot catch these — an
instrument's *first* catches are about itself, and no human watches every path.
+ THEN:
Require that a verdict may be moved ONLY by evidence the verdict-maker did not manufacture.
Tag every evidence record at birth with the properties the apparatus cannot fake —
`:independent?` (was there an out-of-band witness?), source (`:measured` vs
`:target-absent-fallback`), settledness (`:settled` vs `:transient`) — and have the verdict
count ONLY the records whose tags clear. Strictness default: **untagged never counts**.
+ BECAUSE:
Circularity is invisible from inside the loop precisely because every internal reading is
consistent with every other — that is what `prior == value` means. The only thing that breaks
it is a referent the maker had no hand in: an external witness, a settled re-read of a world
it does not control, a tag it cannot forge. Structure survives where vigilance fails, and it
converts "be careful" (unauditable) into "the tag is absent, so it does not count" (checkable).
+ canonical-instance:
The FutonZero G-SIM calibration arc (WM-pilot, 2026-06-11): four distinct self-certification
attempts surfaced live — censored fallback, transient spike, `prior == value`, and
operator-gate-as-fruit — each caught only because an independence/source/settled tag existed
to exclude it, and each then encoded as a permanent structural guard. See
`[[M-the-perfect-crime]]` (the forensic framing: the crime relocates to a scarcer witness;
this pattern is the structural half of that ladder) and the reward-red-team fixture
(the executable suite of the shapes).
+ how-to-apply:
Before trusting any "it passed", ask: did this verdict move on evidence the system made?
If yes, find the un-manufactured referent (external witness / settled read / out-of-band
tag) and gate the verdict on it. If there is none, the verdict is decoration. Minted from the
arc that learned it, WM-pilot 2026-06-11 (arc-2 cycle 13).
Source: /home/joe/code/futon3/library/aif/policy-precision-commitment-temperature.flexiarg · SHA256 6d27db7ee7b7d3c859fb5d57e99bdbaadf707709dee39b88f2635f02428b2777
@flexiarg aif/policy-precision-commitment-temperature
@title Policy Precision as Commitment Temperature
@sigils [🍲/由]
@audience fulab agents, aif implementers
@tone technical
@style pattern
@holds-at R14 ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R14 in p4ng/sec-catalog.tex; see PREREG-war-machine §1b
@see-also aif/hierarchical-budget-aware-action-selection
@see-also aif/expected-free-energy-scorecard
@why R14 dossier problem: R14 solves how operational confidence controls commitment without changing the underlying value model: the roster places **“Commitment temperature”** in SELECT (`p4ng/empirics-futon/control-stages.edn:25`; control-stage numbering). (source: futon2 holes labs wm-contract PROBLEMS-r16-r13-r14-batch4.md, R14, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: Maintain a commitment temperature that modulates how strongly the policy commits to low-G choices. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/commitment-temperature-is-instrumented-as-gain (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
@why problems/r14-commitment-temperature (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
! conclusion: Maintain a commitment temperature that modulates how strongly the policy commits to low-G choices.
+ context: Even with identical scores, the agent sometimes should explore alternatives and other times should commit.
+ IF:
You want exploration versus exploitation to depend on operational pressure (deadlines, repeated failures, user impatience, instability), not on randomness alone.
+ HOWEVER:
Without an explicit (tau), the agent either thrashes or tunnels with no controllable dial.
+ THEN:
Maintain (tau) as a commitment temperature that modulates softmax over (-G/tau), coupled to diagnostic signals (recent regressions, uncertainty in (mu), contradiction rate, time pressure, repeated test failures).
+ BECAUSE:
A single commitment dial allows systematic control of stochasticity without changing the scoring model.
+ NEXT-STEPS:
- Add :aif/tau-adjustment event type to tatami_schema.clj with keys [:prev-tau :next-tau :trigger :diagnostic-signals].
- Implement tau-coupling rules in aif_bridge.clj: increase tau on :test-failure or :uncertainty > 0.7; decrease on :tests-passing streak.
- Persist tau history in lab/aif/tau-cache.edn keyed by pattern-id; load on session start.
- Add (policy-entropy session) metric to aif_coverage.clj; correlate with outcome stability in session summaries.
- DONE (UKRN v3 HO-05, 2026-05-14): abstain? rule implemented at notebooks/ukrn_v3_efe.clj:75-92. Computes G-spread across top-K candidates, divides by τ, abstains if the resulting discriminability is ≤ floor (default 0.5, configurable). Edge case: < 2 candidates returns true (degenerate). Test abstain-fires-only-under-low-discriminability covers well-separated, weakly-separated, threshold, and just-over-threshold regimes. Closes R6 abstain criterion for UKRN v3-runner. Evidence: handoffs/v3_runner/validation_HO-05.md.
- Practice (HO-05): abstain semantics are part of R6 in the AIF completeness criteria. An implementation that has softmax without abstain is operationally incomplete — it always picks something, even when statistically indistinguishable candidates would warrant inaction. Make abstain explicit; make the threshold configurable.
Source: /home/joe/code/futon3/library/aif/predictive-coding-belief-update.flexiarg · SHA256 cd7a7483cf0bcb3ee2cd71eb4b58039c8ab97db0d60025725cf2575ca7a62473
@flexiarg aif/predictive-coding-belief-update
@title Predictive-Coding Belief Update with Variance Evolution
@sigils [🌀/由]
@audience fulab agents, aif implementers
@tone technical
@style pattern
@holds-at R3 ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R3 in p4ng/sec-catalog.tex; see PREREG-war-machine §1b
@see-also aif/predictive-entropy-as-ambiguity
@see-also aif/evidence-precision-registry
@see-also futon-theory/four-types
@why R3 dossier problem: R3 solves how observations change belief without either overwriting it or letting it become immovable: the roster places **“Belief update”** in BELIEVE (`p4ng/empirics-futon/control-stages.edn:18`; control-stage numbering). (source: futon2 holes labs wm-contract PROBLEMS-r1-r3-r3a-batch3.md, R3, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: Update beliefs via predictive-coding (μ ← μ + α·Π·ε) and evolve variance with a sensor-variance floor so uncertainty stays meaningful. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/r3-belief-update (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
! conclusion: Update beliefs via predictive-coding (μ ← μ + α·Π·ε) and evolve variance with a sensor-variance floor so uncertainty stays meaningful.
+ context: The agent receives an observation each tick and must integrate it into its belief state. The integration rule determines both mean trajectory and uncertainty trajectory.
+ IF:
You want belief updates to be principled (Bayesian-shaped under Gaussian approximation), tunable (single learning rate; per-channel precision), and operationally robust (variance doesn't collapse to zero; doesn't blow up).
+ HOWEVER:
Without an explicit update rule the agent either slams beliefs to each observation (over-trusts) or never moves them (over-anchors). Variance with no sensor-variance floor decays toward zero under any informative-observation history, killing the predictive-entropy term in EFE for later ticks.
+ THEN:
Implement two coupled updates per tick:
- Mean: μ ← μ + α · Π · ε, where ε = observation − μ, Π is per-channel precision, α is learning rate.
- Variance: var ← (1−α)·var + α·(observation − new-μ)² + σ²_sensor, where σ²_sensor is the sensor's intrinsic variance floor.
The residual against the *new* mean (not the old mean) is what informs the variance update — this matches the moment-matched EWMA approximation of Bayesian update under Gaussian likelihood.
+ BECAUSE:
The mean rule realises predictive coding (Friston et al.); the variance rule keeps belief uncertainty in a meaningful regime where ambiguity terms in EFE stay informative. σ²_sensor as a *configurable* parameter supports noiseless-mode sanity checks and sensitivity sweeps without recompilation.
+ NEXT-STEPS:
- Implement update-mu as a pure function: (mu, observed-state, opts) → BeliefState. Take α, Π, σ²_sensor from opts with named defaults.
- Use observation − new-mean (post-update residual) in the variance term, not observation − old-mean. The shorthand can confuse handoff specs; cite the acceptance-criterion hand-calculation as source of truth.
- Floor variance at 0 explicitly via (max 0 (...)); under σ²_sensor > 0 the floor is rarely tested in practice but the explicit floor protects against pathological inputs.
- DONE (UKRN v3 HO-02, 2026-05-14): update-mu and free-energy implemented at notebooks/ukrn_v3_belief.clj:1-51. α=0.4, Π=1.0, σ²_sensor=0.02 defaults configurable via thresholds map. Verified across 8 hand-computed test cases. Evidence: handoffs/v3_runner/validation_HO-02.md.
- Validation: variance should shrink under low-prediction-error observations (test A4: var goes from 0.04 to 0.024 under perfect prediction and σ²=0); grow under surprise (test A3: var goes from 0.04 to 0.080 under ε=0.5 and σ²=0.02). Both tests should be in the validation harness for any new AIF implementation following this pattern.
Source: /home/joe/code/futon3/library/aif/structure-learning-by-model-reduction.flexiarg · SHA256 6242b468d8a822223afa3c475095afc2aa2d46c855c522c154c3b93972218939
@flexiarg aif/structure-learning-by-model-reduction
@title Structure Learning by Bayesian Model Reduction (the third optimisation level)
@sigils [✂️/简]
@audience fulab agents, aif implementers, designers of concept-formation
@tone technical
@style pattern
@holds-at R17 ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R17 in p4ng/sec-catalog.tex; see PREREG-war-machine §1b
@see-also aif/currency-before-merge
@why R17 dossier problem: R17 solves changing the model's structure rather than merely sharpening fixed parameters: the roster places **“Structure learning”** in SELECT's assurance band (`p4ng/empirics-futon/control-stages.edn:42`; control-stage numbering). (source: futon2 holes labs wm-contract PROBLEMS-r15-r11-r17-batch5.md, R17, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: Structure Learning (R17) is the third optimisation level, beyond inference and parametric (Hebbian) learning: OFFLINE, it prunes and merges redundant model structure by Bayesian Model Reduction (BMR) over accumulated Dirichlet counts — accepting a reduced model when ΔF ≤ −3 (Bayes factor ≈ 20). Parametric learning only sharpens existing structure; only model reduction reorganises it. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/r17-structure-learning (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
! conclusion: Structure Learning (R17) is the third optimisation level, beyond inference and parametric (Hebbian) learning: OFFLINE, it prunes and merges redundant model structure by Bayesian Model Reduction (BMR) over accumulated Dirichlet counts — accepting a reduced model when ΔF ≤ −3 (Bayes factor ≈ 20). Parametric learning only sharpens existing structure; only model reduction reorganises it.
+ context: The Active Inference Framework has three optimisation levels (Neacsu 2024, after Friston, Parr et al. 2018). (Active) Inference minimises variational free energy over states and policies (online, moment-to-moment). Parametric Learning accumulates Dirichlet concentration counts — mathematically Hebbian plasticity (online, gradual). Structure Learning selects among model *structures* by model evidence (offline, between periods of engagement). The first two cannot reorganise the model; they only sharpen what is already there. Concept formation, generalisation, and "these two contexts are the same" collapse require the third.
+ IF:
You want the agent to form concepts and reorganise its generative model — merge look-alike states, prune redundant likelihood connections, generalise across contexts — using accumulated experience but NO new data, offline (the sleep/consolidation regime).
+ HOWEVER:
Parametric (Hebbian) accumulation alone cannot do this. Adding more Dirichlet counts only sharpens existing state–outcome mappings; it never removes a connection or ties two states together. An agent that only accumulates will represent every context as distinct forever (no generalisation), keep every redundant parameter (no complexity control), and never form the "these two rooms are the same" concept. Model *comparison* is a different operation from parameter *estimation*, and you cannot make a static count-accumulator do a model-selection loop's job.
+ THEN:
Implement Structure Learning as Bayesian Model Reduction over the Dirichlet concentration parameters. Given a full (parent) model with prior `a` and accumulated posterior `A`, and a reduced/alternative model with prior `a'`, compute analytically:
reduced posterior `A' = A + a' − a`
free-energy change `ΔF = ln B(A) + ln B(a') − ln B(a) − ln B(A')` (`B` = multivariate beta)
accept the reduction (prune/merge) when `ΔF ≤ −3` (Bayes factor ≈ 20; the reduced model is ~20× more likely).
Construct the alternative models to reflect the LEARNT associations (data-informed alternatives, as the thesis does): e.g. a "merge states i,j" hypothesis whose reduced prior ties j's profile to i's (a pooled row). Run offline, in a quiet window (BMR is heavy), triggered by accumulated new evidence — NOT per-tick. The surviving reduced structure IS the concept.
+ BECAUSE:
Model evidence — not more data — is what reorganises concepts. BMR is the analytic, closed-form, biologically-plausible (synaptic regression / pruning during sleep) operator that scores a reduced model against its parent using only the accumulated posteriors and the priors, with no reinversion. It is the AIF-canonical mechanism for the third optimisation level, and it grants the rapid, insight-like learning that gradual Hebbian accumulation cannot: Neacsu 2024 Ch.4 shows BMR-endowed agents accumulate more reward AND higher information gain than accumulation-only agents.
+ NEXT-STEPS:
- DONE (2026-07-08, 4064533): pure BMR kernel — closed-form ΔF over Dirichlet params + Dirichlet moments. Reviewed as a real gate: the sign is pinned by redundant-vs-informative tests (ΔF ≈ −5.5 accept / +8.2 reject), log-gamma verified against known values. Evidence: futon2/src/futon2/aif/bmr.clj.
- DONE (2026-07-08, 8200f08): concept-formation pipeline — corpus→concentration→pairwise merge-hypotheses→equivalence-class concepts→capability-star docs. Neacsu-faithful (pooled-from-data reduced prior) and evidence-conservative: a merge needs accumulated repeated co-occurrence to cross −3 (A–B ΔF −2.12 at +1 count → no merge; −4.33 at +20 → merge). Evidence: futon2/src/futon2/aif/a4a.clj.
- OPEN / demo-validated (the honest status for the R-map): on the current demo corpus — 0 `:capability/*` edges, 3 discharges over 35 capabilities — NO merges fire (~6× below the threshold). The mechanism is validated synthetically; real concept-formation awaits the `:capability/*` production write. Evidence: futon2/holes/M-a4a-structure-node.md.
- Anti-pattern to name explicitly: `accumulate-without-reduce` — believing that Hebbian count accumulation IS structure learning. It sharpens; it never reorganises. Structure Learning is a distinct, offline, model-comparison step (BMR / BME / BMS), not a limit of parametric learning.
- Respect `currency-before-merge`: a merge that collapses two concepts is a STRUCTURAL edit, not merely a count sum — it must honour any accumulation-currency invariants downstream.
Source: /home/joe/code/futon3/library/aif/temporal-depth-beyond-greedy.flexiarg · SHA256 3a8a428fb2bb99f46059d3df8d5720735937dd56f5168a52c41661063fc91346
@flexiarg aif/temporal-depth-beyond-greedy
@title Temporal Depth Beyond the Greedy Step
@sigils [🐜/专]
@audience fulab agents, aif implementers
@tone technical
@style pattern
@holds-at R13 ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R13 in p4ng/sec-catalog.tex; see PREREG-war-machine §1b
@see-also aif/hierarchical-budget-aware-action-selection
@see-also aif/hierarchical-and-temporal-depth
@why R13 dossier problem: R13 solves how delayed consequences can outrank a greedy first move: the roster places **“Temporal policy depth”** in SELECT (`p4ng/empirics-futon/control-stages.edn:24`; control-stage numbering). (source: futon2 holes labs wm-contract PROBLEMS-r16-r13-r14-batch4.md, R13, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: Genuine planning (R15) requires evaluating policies G(π) over a horizon and separating timescales; a single rollout step demonstrates the machinery, not the depth. Depth-1 is reactive control wearing planning's clothes. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/r13-temporal-policy-depth (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
! conclusion: Genuine planning (R15) requires evaluating policies G(π) over a horizon and separating timescales; a single rollout step demonstrates the machinery, not the depth. Depth-1 is reactive control wearing planning's clothes.
+ context: R15 asks for hierarchical / temporal depth — the agent evaluates policies over a horizon of several ticks (not just the next action), and represents goals that span many ticks via a slow loop that sets priors for a fast loop.
+ IF:
You want the agent to plan — to prefer an action whose payoff is two or three ticks out over a greedy one-step win, and to pursue goals (like accumulating capability) that no single tick can achieve.
+ HOWEVER:
A rollout that looks ONE step ahead — even one that passes a "2-step-beats-greedy" witness — demonstrates the MACHINERY (multi-step G(π) is computable) but not DEPTH. The horizon is still shallow, and without a temporal HIERARCHY (a slow loop shaping a fast one) the agent cannot represent a goal whose satisfaction is spread across many ticks. It reacts one step at a time and calls it planning.
+ THEN:
Extend G(π) evaluation to a horizon H > 1 with a temporal discount, AND introduce a two-timescale hierarchy: a slow (strategic) loop that updates priors/preferences and a fast (tactical) loop that acts against them. The slow loop is where accumulated learning (R12) and prior-preferences (R19) live; the fast loop is the per-tick act-gate. Couple the two so the fast loop's realized outcomes update the slow loop's priors.
+ BECAUSE:
Active inference plans by minimizing expected free energy over a POLICY (a temporally-extended sequence), not over the next action alone. A depth-1 evaluation cannot distinguish a locally-optimal dead-end from a step toward a distant goal. Temporal hierarchy is also the natural home for the capability curriculum ("work descends into capability") — a payoff that only a slow loop can score.
+ NEXT-STEPS:
- DONE: rollout apparatus + the 2-step-beats-greedy witness (`futon2.aif.rollout`). Evidence: futon2/docs/futon-aif-completeness.md R13.
- Extend rollout to a configurable horizon H with a temporal discount; report G(π) per horizon, not just the winning first action.
- Introduce fast/slow timescale separation: the WM's strategic tick as the slow loop; a faster inner act-gate as the fast loop.
- Wire the slow loop to R12 (dual-loop hyperparameter inference) and R19 (prior preferences): realized outcomes over a horizon update the priors the fast loop scores against.
- Guard: report the horizon actually evaluated. A depth-1 evaluation labelled "planning" is the R15 anti-pattern (sibling to R16's re-observe-your-own-construction).
Source: /home/joe/code/futon3/library/aif/term-to-channel-traceability.flexiarg · SHA256 52abfe0cfb13aaa0f3236a15ba3b1657c8ad547fa35ffa62131ff5c187f47e2b
@flexiarg aif/term-to-channel-traceability
@title Term-to-Channel Traceability
@sigils [🏃/功]
@audience fulab agents, aif implementers
@tone technical
@style pattern
@see-also aif/evidence-precision-registry
@how aif/expected-free-energy-scorecard
@why no matching problem dossier node (@holds-at absent; not among the twenty dossier nodes R1-R17, R20, TRACE). Negative claim per the committed check futon2 holes labs library-loop runs l3_no_dossier_check.py, receipt runs L3-no-dossier-check.edn (enumerates every aif pattern's @holds-at against the dossier node set extracted from PROBLEMS-*.md headings). Rationale not invented (L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: Require each score term to declare the observation channels and precision settings it consumed. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
! conclusion: Require each score term to declare the observation channels and precision settings it consumed.
+ context: A pattern-guided agent evaluates candidates with a multi-term expected free energy score built from heterogeneous evidence.
+ IF:
You want tuning decisions and failures to be diagnosable at the level of which evidence actually drove each score term.
+ HOWEVER:
Without explicit traceability, terms like risk or ambiguity silently absorb whatever signals are available, making post-hoc explanations indistinguishable from rationalization.
+ THEN:
Require every G term contribution to declare the observation keys it consumed, the precision channels applied, and the intermediate values used to compute that term, and persist this mapping alongside the score.
+ BECAUSE:
Explicit term-to-channel linkage prevents semantic drift in scoring terms and makes policy behavior mechanically inspectable.
+ NEXT-STEPS:
- DONE: Validate PSR :aif/g-terms provenance keys (term-id, observation-keys, precision-channels, intermediate-values, final-contribution) in check-psr. Evidence: src/futon3/hx/logic.clj
- DONE: Add (dominant-channels psr) analysis that flags when a single channel accounts for >60% of a term's value. Evidence: src/futon3/hx/logic.clj
- DONE: Add term provenance + dominant channel summaries to fulab pattern reports. Evidence: src/futon3/fulab/pattern_competence.clj, dev/lab-pattern-report.clj
- DONE: Emit :aif summaries in MUSN turn start/select/use responses and log them in musn_stream. Evidence: src/futon3/musn/service.clj, dev/musn_stream.clj, src/futon3/musn/schema.clj
- BLOCKED: Define :aif/term-provenance schema in tatami_schema.clj with keys [:term-id :observation-keys :precision-channels :intermediate-values :final-contribution]. blocked-by[tatami-schema]
- BLOCKED: Include term provenance in fulab-pattern-check CLI output for top-3 candidates. blocked-by[term-provenance-schema, fulab-pattern-check]
Source: /home/joe/code/futon3/library/aif/two-layer-calibration.flexiarg · SHA256 0b9c0c25c8e9aef566d1d8f23f95c49f6abf200966271958f1bf17287b90b03f
@flexiarg aif/two-layer-calibration
@title Two-Layer Calibration (Dynamics-Consistency vs Witnessed-Outcome)
@sigils [L1/L2]
@keywords calibration, prior-equals-value, dynamics, value, witnessed outcome, three-witness, self-reference, G-vs-G, reward gating
@audience anyone calibrating a value/forward model against a field the model helps compose
@tone architectural
@style pattern
@holds-at R12 ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R12 in p4ng/sec-catalog.tex; see PREREG-war-machine §1b
@how aif/off-continuity-null-discriminates
@why-posthoc aif/no-self-certification
@why R12 dossier problem: Control-stage R12 solves separating internal consistency from externally witnessed value evidence: the roster places **“Two-layer calibration”** in BELIEVE's assurance band (`control-stages.edn:40`; control-stage/catalogue numbering). (source: futon2 holes labs wm-contract PROBLEMS-assurance-band-batch6.md, R12, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: When you calibrate a model whose own outputs compose the field it is scored against, split the calibration into TWO layers and never let one stand in for the other. L1 — dynamics/consistency (does the field respond to measured state?): cheap, accrues every cycle, and is NEVER value evidence. L2 — outcome-vs-prediction (did real functioning result?): scarce, witnessed, gated, and is the ONLY value clearance. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/r12-two-layer-calibration (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
! conclusion: When you calibrate a model whose own outputs compose the field it is scored against, split the calibration into TWO layers and never let one stand in for the other. L1 — dynamics/consistency (does the field respond to measured state?): cheap, accrues every cycle, and is NEVER value evidence. L2 — outcome-vs-prediction (did real functioning result?): scarce, witnessed, gated, and is the ONLY value clearance.
+ context: You are calibrating a forward/value model against a live field, and the field's value
function is computed from the same effects the model predicts with (`prior == value` risk).
+ IF:
Predicted-vs-realised pairs are your evidence that the model is "calibrated".
+ HOWEVER:
On such a field the comparison is largely self-referential: it tests dynamics-consistency
(did the world move as the model's state-response said?), NOT whether the model's VALUE is
right — because the realised IS the model's own output. A model can pass this layer forever
while being worthless at predicting real outcomes. Worse, fixing the obvious circularity
(making predict-effects state-sensitive) RELOCATES it rather than removing it: state-blindness
breaks, but the error *magnitude* stays model-priced.
+ THEN:
Name and keep both layers explicitly. **L1 = G-vs-G dynamics**: cheap, every cycle, labelled
never-value-evidence; it earns its keep as a consistency/sanity layer. **L2 =
outcome-vs-prediction** against WITNESSED outcomes the model did not produce — closure-folds,
three-witness certificates, attested real functioning — scarce, gated behind the reward
discipline. Only L2 clears value. Forbid L1's cheap pass from being reported as L2 clearance.
+ BECAUSE:
The only thing that escapes `prior == value` is a referent the model had no hand in. L1's
referent (the field) is the model's own output, so L1 can only ever measure internal
consistency. L2's referent (a witnessed outcome) is external, so it is the only layer that can
be WRONG about value — which is exactly why it is the gate, not an enhancement.
+ canonical-instance:
FutonZero G-SIM (WM-pilot, 2026-06-11): L1 dynamics live — the state-sensitive model is 2.55×
better than the constant counterfactual at predicting no-move — while L2 stays gated behind
pudding-G1's binding of the arrow-witness to witnessed affect/outcome. The split was forced by
discovering the calibration was self-certifying (`[[aif/no-self-certification]]`).
Source: /home/joe/code/futon3/library/cascades/edges-earn-permanence.flexiarg · SHA256 3226ac2100b997247e1d40fb2df071907ed78a6a28ddeb150ac59613df13d37b
@flexiarg cascades/edges-earn-permanence
@title Edges Earn Permanence
@sigils [🪙/功]
@keywords cascade, promotion, demand-side, use-receipt, review, declared, derived, bridge, evidence
@audience knowledge-base designers, agent-system builders
@tone design
@factor Discernment (paññā)
@provenance M-apm-demonstration W.70; whitepaper-v3 §6 (demand-side memory); W.24 attach-then-review economy
@why no problem-corpus source matched (@holds-at absent; holds-token and id-text searches over every library/problems node -- legacy 6, L5 dossier 20 incl. TRACE, L5 record/ruling 6 -- found no match). Negative claim per the committed check futon2 holes labs library-loop runs l6_no_source_check.py, receipt runs/L6-no-source-check.edn. Rationale not invented (L6 rationale-backfill, zai-1, 2026-09-05)
@how own mechanism: A derived edge becomes a declared edge by the same economy as everything else durable: evidence of use, then judged review. Receipt every derived edge that feeds a dispatch; edges accumulating use-receipts become promotion candidates for the declared skeleton. (source: this pattern's ! conclusion line; L6 rationale-backfill, zai-1, 2026-09-05)
! conclusion:
A derived edge becomes a declared edge by the same economy as everything else durable:
evidence of use, then judged review. Receipt every derived edge that feeds a dispatch;
edges accumulating use-receipts become promotion candidates for the declared skeleton.
+ context: Declared and derived cascade layers coexist (cascades/declared-skeleton,
cascades/on-the-fly-cascade) and something must govern movement between them — neither
editorial fiat (skeleton rots into a wall chart) nor automatic accretion (skeleton bloats
into noise).
+ IF:
A derived edge keeps reappearing in used slices across distinct problems and contexts.
+ HOWEVER:
Use is evidence, not proof: the reviewer must still judge whether the relation
generalizes beyond the contexts that used it, with power to reject — a rejected candidate
simply remains derivable. And the reviewer must be a seat that acts as itself
(reviewer-must-act), not a name passed along.
+ THEN:
Log slice edges into dispatch receipts (the eligibility-provenance idiom); periodically
collect edges above a use threshold as a promotion manifest; review with reasons;
declare the approved edges in the pattern files with their becauses.
+ BECAUSE:
This is the demand-side principle — kept because used — applied to structure instead of
content, and it makes the cascade grow exactly as fast as its usefulness is demonstrated.
The store's first promotion round showed the alternative failure: judged-in-isolation
attachments produced high per-item fit and zero connective structure.
+ NEXT-STEPS:
next[Implement the use-receipts FIRST, before any declared edges or derivation engine.]
next[Run several cycles; if receipts are mostly one-shot noise, this pattern is falsified.]
next[Promote by manifest and review, never by threshold alone.]
Source: /home/joe/code/futon3/library/war-machine/ambient-pattern-retrieval.flexiarg · SHA256 350ab6a9d50814747dceda8917b411652650b33a116de6ede1a257e557b374f3
@flexiarg war-machine/ambient-pattern-retrieval
@title Ambient Pattern Retrieval
! conclusion: A library of reusable strategies that is searched automatically on every conversation turn functions as ambient intelligence - the system's background awareness of what it knows, surfaced without being asked.
+ CONTEXT:
futon3a's pattern library is searched via MiniLM embeddings on every A->B turn in the REPL, and the results appear as desktop notifications with evidence certificates. The operator does not request the search; it happens as a side-effect of working. Over time, the activation pattern across the library reveals which strategies are repeatedly relevant and which are never activated.
+ IF:
The system can search a large pattern library automatically on each work turn and surface the results ambiently rather than as an interruption.
+ HOWEVER:
A large knowledge base is only useful when the right pieces surface at the right time. Retrieval quality depends on embedding quality and library coverage, and notification fatigue will turn ambient retrieval into noise if low-relevance patterns keep firing.
+ THEN:
Search the library on every turn as a background process. Display results as ambient notifications, log the activation history as evidence, and use the resulting hot-zone / cold-zone pattern to tune retrieval and train later pre-hoc prediction.
+ BECAUSE:
Expert practitioners develop intuitions that surface relevant knowledge without deliberate recall. Ambient retrieval externalises that intuition: the system maintains a background awareness of its own knowledge and surfaces relevant pieces as the situation evolves.
+ NEXT-STEPS:
next[Use the activation history to tune retrieval quality and distinguish genuine hot zones from cold library regions that never become relevant.]
Source: /home/joe/code/futon3/library/workshop/accountable-next-action-choice.flexiarg · SHA256 b66d0944e798356cfe3052fe4dd3863a904ae02d076c1b52d2fe48c981d91b3c
@flexiarg workshop/accountable-next-action-choice
@title Accountable Next-Action Choice
@keywords choice, priority, accountability, uncertainty, goals, G, received-preference
@audience task managers, strategic loops, selectors
@tone normative
@style pattern
@grade principle
@provenance apex-thesis cluster D ("Accountable next-action choice, including goal formation: deciding what to do next, accountably, under uncertainty — with the goals themselves formable, not given") — members: G over policies; C; find/organise (WM core); policy-conditioned EIG; policy-grain compliance; shared-budget arbitration; pre-goal preference C_ser. Minted for apex coverage (Joe, 2026-09-12).
@review Joe approved the pattern-language framing; this member pending detailed read.
@class process
@domain process
@family-note workshop/ family, seventh member; cluster D of the apex — completes A-D coverage of the small pattern language. Out of the math pool by construction.
@status workshop declaration 2026-09-12; NOT assayed.
! conclusion:
The choice of the next action is accountable when it can say, with
evidence: what was chosen, from what candidates, under what
preference, at what uncertainty — and the preference was RECEIVED
from where preference legitimately lives, never computed by the
chooser.
+ context:
Selection machinery exists (ranked-actions, intrinsic-value
posteriors, preregistered G); goal formation is the harder half
(pre-goal preferences, C_ser); and the failure mode is a chooser
that quietly becomes the source of the preferences it optimizes.
+ IF:
Any agent, loop, or manager selects what work happens next.
+ HOWEVER:
Under real uncertainty the account includes the uncertainty:
wide intervals, unranked ties, and "no action cleared its
threshold" are all legal typed outcomes — accountable does not
mean confident. Simulated demand (Part III agents) is input to
preference, never preference itself.
+ THEN:
The selector emits its account with the choice: candidates,
ranked-actions with reasons, the received preference's
provenance (operator pin or rehydrated posterior), the
uncertainty typed, and the shared-budget arithmetic. Choosing
without emitting the account is the violation.
+ BECAUSE:
"Accountable next-action choice" is the apex thesis's D stated
as a constraint; the constitutional line (priority received,
never computed) is what keeps the crew a tool of its operator
rather than an agent with opinions about what matters.
+ NEXT-STEPS:
next[The task-manager spec's constitutional line is this pattern's first enforcement; keep it verbatim when built.]
next[Ranked-actions' missing reconciliation exits (lint ticket) are this pattern's open gap.]