zone.hyperreal.enterprises
War Machine · explanations before construction

WM-03: interpret what applying a pattern changes

Authored build-design cascade, 2026-09-15. Exactly WM-03. The target is action-conditioned B matching the machine's declared dynamics, with complete policy bindings and consistent prediction and belief-update consumers. This document proposes how to build and validate that connection. It does not supply an implemented B, new probabilities, a numerical G score or an execution commission.

The problem, before the kernel

A design pattern argues for a response to recurring tensions in a situation. Its title is not an instruction opcode, and its THEN is not automatically a state transition. WM-03 must explain how the response is interpreted for this work, what it can change, under which conditions, and what evidence supports the adaptation.

WM-04 designs independently grounded observations. WM-05 designs prediction from the actual model inputs. They require an account of dynamics that neither counting observations nor multiplying matrices can invent. The existing two-action B reference does not cover production interpretations merely because it has valid probability rows.

Our recurring example is a disputed mission handoff. Handoff Preserves Context responds to expensive reconstruction, lost constraints and provisional claims. Its response retains the hypothesis, decisions and reasons, unanswered questions, scope and evidence. Writing “complete” into a file is not an adequate interpretation. Nor does successfully writing a thorough record prove the successor understood it or that the disputed mission succeeded.

This authoring cascade develops that distinction into build interfaces. Its nodes are design arguments, not a claim that the running machine already executes this arrangement. The original two seeds are Match Interpretation as Well as Identity and Shared Kernel for the Predictive Forward Model; two new patterns make interpretation evidence and history explicit.

Eleven pattern applications

B1 — Recover the actual design problem

Pattern: wm-pattern-design/pattern-before-operation.

Read the particular pattern's context, IF, HOWEVER, THEN and BECAUSE. Explain the tension in the target situation and how the proposed response would help. Retain the exact source revision and the interpretation's scope. Output: a task-specific argument for applying the pattern, including a situation where it would not help.

For the handoff example, distinguish preserving uncertainty from advertising completion. If the proposed action changes only a status flag, B1 exposes the missing response before it becomes a kernel. Interpretation can adapt a response; it must account for its adaptation rather than silently replace the problem.

B2 — Identify what decision the model describes

Pattern: wm-pattern-design/separate-design-from-use.

Declare whether a candidate edits a partial design or applies an already interpreted design to work. Identify the target and state of that decision. Construction steps, runtime transitions and observation times are distinct. Output: a conditioning declaration shared with WM-05.

The current semantics source requires prediction for partial constructions. Their lack of a completed successor does not justify rejecting them as inherently unscoreable or copying the completed design's effects into them. If their interpretation is absent, that remains owed input. This WM-03 design supplies the interpretation route, not a new G extension or a license to treat refusal as completion.

B3 — Bind the interpretation to its evidence

New pattern: wm-connected-learning/interpretation-carries-its-argument.

Turn B1's argument, within B2's grain, into a declared guard and effect contract. Bind pattern revision, task/model scope, full interpreted rule, kernel identity, interpreter and any attester, attested-versus-documented status, fixture bytes, tested domain, expected versus observed findings and limitations. Output: a versioned interpretation record with resolvable evidence.

Joe's September 7 ruling permits attested or documented interpretations of THEN. A documented interpretation still requires independent validation of applicability; it is not measured success. An attestation badge is not a probability parameter. If two interpretations have identical dynamics, changing only a quality label cannot silently change B.

B4 — Make the information and history explicit

New pattern: wm-connected-learning/history-and-guard-information-are-state.

Declare the modeled state, information available to guards, and history required for repeated application, termination and nesting. These must agree with the intended executor and WM-02's admitted belief semantics. Output: an explicit state/information/history contract and distinguishing examples, not a fabricated joint state.

Two known questions must be resolved: a once-only simulator versus repeated first-enabled selection; and prediction guards evaluated on hidden state versus enactment guards evaluated on available information. The semantics source calls the latter an extrapolation/approximation. Matching observable guards can close a particular case, but cannot establish all guards agree. Do not resolve uncertainty by treating unknown as false, resetting history, or giving the predictor information the agent cannot use.

B5 — Explain composition through changed applicability

Pattern: wm-pattern-design/composition-changes-the-problem.

Use B3 and B4 to identify which state components each interpretation reads and changes, and how one response changes another's applicability or effect. Output: explicit composition and conflict-resolution obligations.

Evidence discipline before a handoff may change which assertions can responsibly be transmitted. A later review of an already frozen handoff may require a new version and another transfer. Those alternatives must be distinguished in state and interpretation; a sum of isolated action scores cannot represent the difference. A redundant repetition must also be representable. Claimed independence requires justified factorization and absence of shared dependencies, including environmental ones; distinct names or token lists alone do not prove it.

B6 — Retain the complete candidate

Pattern: wm-pattern-design/same-policy-through-comparison.

Bind the whole interpreted policy: pattern and rule revisions, arrangement, precedence/conflict decisions, guard and history semantics, scope and model context. At authoring grain retain the partial construction and proposed delta. Output: an immutable policy-plan identity that all dynamics consumers resolve.

The same target and pattern set may describe different policies. An unsupported member must not disappear from the plan to make it executable. WM-03 owns this binding at its input/output boundary; WM-11's prior and posterior calculations remain separate.

B7 — Admit a controlled probability law

Pattern: wm-prediction/probability-laws-with-runtime-meaning.

Construct the declared transition law on the agreed carrier from B3–B6. Require complete support, nonnegative normalized mass, valid conditioning and a declared numerical representation. Retain deterministic effects as declared deterministic effects only where justified. Uncertain outcomes need an explicit supported model; never add Gaussian noise merely because a reference implementation did so.

Output: an admitted controlled B with authority and applicability bounds, or a typed refusal. Missing interpretation, unknown guard information, a known non-firing rule and terminal behavior are different cases. The semantics source's identity-when-non-firing choice is explicitly an extrapolation. It cannot become a universal fallback for missing data. Declared identity dynamics also do not imply the target was achieved.

B8 — Share the model law across its consumers

Pattern: aif/shared-kernel-predictive-forward-model.

Use one admitted dynamics authority for prediction and the transition component of belief update, with explicit model, policy and history inputs. A pure shared function is a useful implementation when the semantics allow it. Output: the shared contract, actual call-site bindings and retained model identity at both consumers.

Sharing a function cannot establish empirical correctness. An external effect such as another agent understanding a handoff is not made deterministic by wrapping an API call. Keep orchestration and I/O separate from the model. The belief update's observation conditioning remains distinct from its B propagation. Prediction must not enact work as a side effect, and belief update must not apply the same transition twice.

B9 — Compare prediction with what was enacted

Pattern: wm-connected-learning/same-interpretation-predicted-and-enacted.

Retain available guard information, pre-state reference, execution history, resolved interpretation, actual operation/result and independent readback. Compare those against the admitted model and policy identity. Output: a correspondence finding whose scope is explicit.

For controlled deterministic software effects, exact correspondence may be appropriate. For modeled external or stochastic effects, a single outcome neither proves the distribution nor necessarily refutes it. Validate the model using the independently authorized observations and adequacy criteria; do not compare a predicted mean with one sample and call that equivalence. Unmodeled interference, partial failure or changed context triggers an explicit out-of-domain or revision decision, not a successful receipt containing the selected vector.

B10 — Keep state meaning into Q

Pattern: wm-prediction/outcome-meaning-across-models.

Deliver the exact admitted B and policy context to WM-05, on state supports compatible with current belief and WM-04's A. Output: a producer/consumer receipt binding versions, supports, history semantics and numerical admission. Reject a stale rule, incompatible state mapping or legacy action-grain proxy.

For a justified Markov representation x that includes the necessary history, the intended propagation is q_(t+1)(x') = sum_x B_pi,t(x' | x) q_t(x). This is conditional on the declared representation and policy semantics. Adaptive information-dependent choices or temporally extended interpretations require that conditioning to be represented; the shorthand does not settle it. WM-05 owns constructing Q, while WM-03 supplies the appropriate transition law.

B11 — Follow the actual model into the next choice

Pattern: wm-connected-learning/observation-to-next-choice.

Trace admitted model identity through the two B consumers and subsequent prediction, preserving how observations can challenge the interpretation. Output: an end-to-end receipt of which model was actually consumed, plus a revision path that creates a new reviewed model rather than rewriting past predictions.

This is an interface and feedback obligation for WM-03. It does not close the whole learning loop, canonical G selection or WM completion. Source presence, matching table arithmetic and a successful refusal remain distinct from an ordinary production use.

Why the relations matter

B1 and B2 constrain B3: the interpreted effect must answer this problem at this grain. B3 and B4 jointly constrain B5: composition depends on meaning and history. B5 and B6 supply the complete controlled plan to B7. B7 supplies the law for B8; B4 also constrains both consumer contexts. B8 and B6 supply B9's correspondence comparison. B7 and B8 supply B10's predictor interface; B9 and B10 jointly supply B11's actual-use account.

Feedback can change the design. B5 can expose a missing guard distinction and return to B4. B7 can expose an unsupported probability assignment and return to B3. B9 can expose an operation that fails to realize the original response and return to B1. B10 can reveal incompatible state meaning. None of those feedback relations authorizes silently weakening the governing requirement.

Proposed build components and retained interfaces

These are proposed responsibilities, not claims that new modules exist.

Component Required inputs Output and rejection boundary
Interpretation reader/admitter Pinned pattern, task/grain, rationale, guard/effect declaration, evidence and authority interpreted-rule; unsupported or unresolved adaptation refuses
State/guard adapter Admitted state meaning, information sources, history, timing Explicit guard inputs; unknown and false remain distinguishable
Policy resolver Complete candidate arrangement and rule/model revisions resolved-policy; no dropped nodes, invented order or fallback interpretation
Dynamics constructor Resolved policy, admitted per-rule laws, state and temporal semantics controlled-B; validate kernels and every supported branch
Prediction binding Actual current belief/model/policy and B Same B used by WM-05, with input/output pins
Belief-update binding Prior state, same admitted B, action/occurrence, observation update contract One transition propagation, followed by the declared observation update; retain distinct stages
Enactment recorder Selected policy, available information, actual operation and readback Interpretation correspondence or an explicit mismatch, not an asserted success
Revision authority Independent findings, affected interpretation and consumer identities New admitted revision and applicability scope; immutable old receipts retained

Artifact identity includes schema revision, content hashes and authority references. Actual retained bytes must resolve. Missing input produces a typed failure before unsupported prediction or actuation. Atomic model publication prevents different consumers reading a mixture of revisions. No reload, dispatch, click or implementation is performed by authoring these interfaces.

Worked handoff distinction

The proposed adaptation writes a handoff containing the disputed hypothesis, unresolved criterion, decisions, evidence references and next reviewer question. A successful write establishes only the specified artifact effect. It does not establish semantic completeness of the contents, receiver comprehension or mission success. Each further claim needs its own interpretation and evidence.

Now suppose the guard remains true after writing. Repeated firing could create another record; once-only semantics could prevent it. If the first write changes a “handoff required” condition, both may stop in this particular case, concealing the disagreement. A useful distinguishing control therefore keeps the guard enabled and examines history explicitly. Another control changes evidence after the first handoff: whether that licenses a revision or a new occurrence must be declared, not guessed.

These are proposed examples to review, not new adopted carrier fields or measured transitions. They show why a generic “advance mission” effect cannot by itself explain the interpreted pattern.

Build order and acceptance

  1. Review the task-specific interpretation and grain (B1–B4). Settle required state, information and timing semantics. Preserve attested/documented distinctions and named limitations. Identify the exact authority for choices currently marked extrapolations. Unresolved choices block their dependent behavior.
  2. Build the complete resolver and controlled law (B5–B7). Negative controls reject missing firing interpretations, unknown guard inputs, dropped policy members, changed model revisions, unsupported probability mass and inappropriate factorization. Include partial constructions without substituting final-state effects. A refusal exposes missing work; it does not satisfy the obligation to supply their models.
  3. Connect prediction and belief update (B8/B10). Retain both real call sites' B and policy identities. Test wrong support, stale revision, hidden default and double propagation. Validate relevant exact or floating-point correspondence. Fixtures establish mechanics only.
  4. Exercise distinguishing enactment controls (B9). Test once-only/repeat, hidden/information guard, precedence interaction, redundant application, non-firing versus unfinished target, partial failure and interference under the admitted semantics. Independent review checks applicability and evidence, not just normalization.
  5. Retain an authorized ordinary use and revision path (B11). Demonstrate actual model consumption and the independently observed effect within its declared limits. Explain how a counterexample changes a future interpretation without retroactively changing the old prediction. No qualifying-run claim follows from this one interface receipt.

WM-02 state/belief, WM-04 observations and WM-05 prediction remain dependencies, not silently completed rows. C-family construction, posterior selection, G/fuel decisions and run qualification retain their own authority and work.

Source boundaries

The checklist's WM-03 is governing scope. September 7's interpretation ruling permits attested or documented production-rule adaptation. The September 15 cascade semantics document separately records source-based resolutions, extrapolations, partial-construction requirements and pending decisions; its claims are not all Joe's verbatim rulings. The formerly reported once-only/repeating discrepancy is a retained review issue, not a fresh current-runtime diagnosis here.

The companion JSON pins these sources and every applied pattern. Existing AIF patterns are referenced within scope, not duplicated into the independent sublibrary. The new interpretation and history patterns remain drafts. This design makes no current deployment, successful execution or WM-03 completion claim.

Explicit design relations

FromToKindReason
B1B3prerequisiteThe adaptation must address the actual pattern argument.
B2B3prerequisiteGrain and decision context constrain the effect interpretation.
B3B5prerequisiteComposition depends on interpreted effects.
B4B5prerequisiteHistory and guard information constrain interaction.
B5B6prerequisiteThe resolved plan retains composition and precedence choices.
B5B7prerequisiteThe controlled law must represent interactions.
B6B7prerequisiteThe complete policy determines the conditional dynamics.
B3B7prerequisiteEach law requires interpretation authority.
B7B8prerequisiteConsumers must use the admitted transition law.
B4B8prerequisiteBoth consumers need the same information/history contract.
B8B9prerequisiteShared model identity must be checked against enactment.
B6B9prerequisiteThe enacted candidate must match the resolved full policy.
B7B10prerequisiteWM-05 needs the admitted controlled law.
B8B10prerequisiteThe actual prediction binding must use that law.
B9B11prerequisiteObserved correspondence limits constrain later use and revision.
B10B11prerequisiteThe next choice must receive the actual modeled prediction.
B5B4revision-feedbackAn interaction may expose missing history or guard distinctions.
B7B3revision-feedbackUnsupported probabilities require interpretation review.
B9B1revision-feedbackAn operation can fail to realize the original pattern response.
B10B4revision-feedbackA consumer mismatch requires compatible state and information semantics.

Existing AIF source snapshots

Quoted as local library references, not copied into the new sublibrary. Their other claims and examples are not adopted by this cascade.

aif/shared-kernel-predictive-forward-model
@flexiarg aif/shared-kernel-predictive-forward-model
@title Shared Kernel for the Predictive Forward Model
@sigils [⚙️/由]
@audience fulab agents, aif implementers, simulation-based-AIF designers
@tone technical
@style pattern
@holds-at R4   ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R4 in p4ng/sec-catalog.tex; see PREREG-war-machine §1b

@see-also aif/expected-free-energy-scorecard
@how aif/temporal-depth-beyond-greedy
@why R4 dossier problem: R4 solves the problem of evaluating an action before enacting it: the control-stage roster places **“Forward model”** in EVALUATE (`p4ng/empirics-futon/control-stages.edn:21`; control-stage numbering), and the operational criterion requires a pure `(state, action) -> next-state-distribution` which **“the agent uses to score candidate actions before taking them”** (`docs/futon-aif-completeness.md:110-114`; contract R4). (source: futon2 holes labs wm-contract PROBLEMS-r4-r5-r6-pilot.md, R4, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: Extract the deterministic dynamics core into a pure shared kernel; have both the live step and the predictive forward model call into it. One implementation, two callers. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/r4-forward-model (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: Extract the deterministic dynamics core into a pure shared kernel; have both the live step and the predictive forward model call into it. One implementation, two callers.

  + context: An AIF agent that scores candidate actions via Expected Free Energy needs a predictive forward model — a function that takes a candidate action and returns the predicted next-state distribution. The naive implementation maintains a separate "shadow" dynamics for the predictive call, which inevitably drifts from the live dynamics as the code evolves.

  + IF:
    You want the predictive forward model's outputs to be principled (the agent's beliefs about candidate actions match what the live dynamics would actually do under those actions), maintainable (one set of dynamics rules to update), and verifiable (a single regression-test surface that catches accidental divergence).

  + HOWEVER:
    Two implementations of the same dynamics is two implementations to maintain, two places for bugs to hide, two surfaces where the forward model's predictions can disagree with what the live step actually does. The cost of maintaining bit-equivalent shadows grows quadratically with the dynamics complexity.

  + THEN:
    Factor the live step into (a) a *pure deterministic kernel* taking explicit (state, action, seed, opts) and returning a next state, and (b) a *thin orchestration wrapper* that threads defaults and calls the kernel. The wrapper preserves the live API; the kernel becomes callable by:
      - The wrapper, in live operation.
      - The predictive forward model, for candidate scoring — typically via a second arity that admits supplied candidate actions and skips the live action-selection step.
    The predictive forward model then becomes a thin probabilistic wrapper around the same kernel: call kernel with candidate, add Gaussian noise (or other principled uncertainty representation), produce next-state distribution.

  + BECAUSE:
    One implementation of the deterministic dynamics is the only place where the rules live. The kernel is what the live step does *and* what the forward model predicts. Any update to one is automatically reflected in the other. The bit-equivalence test (live-path output unchanged under refactor) is the cheapest catchnet for accidental drift.

  + NEXT-STEPS:
    - Audit the live step for impurities: I/O calls, atom mutations, time-of-day reads, side-effect emissions. The kernel must be pure; impurities belong in the wrapper.
    - Define the kernel signature with explicit (state, action, seed, opts) — no implicit context, no defaults inside the kernel itself.
    - Add a second arity for the forward-model seam: `(kernel state ext seed opts candidate-actions)` — supplied actions skip live action selection.
    - Document the RNG-consumption divergence: when candidate actions are supplied, the kernel doesn't consume action-selection RNG. The forward model's Gaussian noise wrap is the source of predictive uncertainty, not kernel RNG draws. This must be in the kernel docstring.
    - Capture a pre-refactor regression baseline. Commit it (e.g. as a CSV fixture). Automated test compares post-refactor output to baseline byte-for-byte.
    - DONE (UKRN v3 HO-03, 2026-05-14): step-kernel extracted to notebooks/ukrn_v3_kernel.clj:159-193; engagement-step reduced to 8-line wrapper at notebooks/ukrn_v2_engagement.clj:51-58; bit-equivalence regression fixture at test/fixtures/ho03_v11_headline_trajectory_baseline.csv. Evidence: handoffs/v3_runner/validation_HO-03.md.
    - DONE (UKRN v3 HO-04, 2026-05-14): predict-engagement-step at notebooks/ukrn_v3_forward.clj:122-149 wraps step-kernel 5-arity with Gaussian noise propagation; smoke output shows threshold-proximity behaviour discriminates candidates correctly. Evidence: handoffs/v3_runner/validation_HO-04.md.
    - Practice: keep the kernel and the forward model in separate namespaces. The kernel is the deterministic shared core; the forward model is the probabilistic wrapper. Separation makes the call surface for downstream EFE consumers clear.

Download the source-pinned cascade JSON · WM-05 cascade