diff --git a/.claude/board/SUPERSESSION-INDEX.md b/.claude/board/SUPERSESSION-INDEX.md index 437a3015c..ba854f059 100644 --- a/.claude/board/SUPERSESSION-INDEX.md +++ b/.claude/board/SUPERSESSION-INDEX.md @@ -14,14 +14,14 @@ ## What this table says **`BindSpace` is the shape of the problem.** Marked RETIRE, and simultaneously the -most-referenced symbol here: **67 crate files, 41 plans, 40 of them blind.** +most-referenced symbol here: **67 crate files, 44 plans, 41 of them blind.** That is a programme, not a cleanup. **`CollapseGateEmission` is the sharpest case: 12 plans name it and *every one* is blind.** Its COMPONENT-MAP note reads: already tombstoned (PR #477); comment-only remains **`ResonanceDto` → `PerturbationDto` gives the rule that needs no map at all:** -2 crate files against 6 plans. The code moved; the plans did not. +2 crate files against 10 plans. The code moved; the plans did not. **Plan-mentions exceeding crate-mentions is a staleness signal on its own.** ### The limit of the mechanical route @@ -52,19 +52,19 @@ coverage instead. | `A2AMessage` | BLOCKED | — | 2 | 0 | 0 | | `StepMask` | BLOCKED | — | 3 | 7 | 3 | | `commit_to_l4` | BLOCKED | — | 2 | 1 | 0 | -| `dispatch_busdto` | BLOCKED | — | 3 | 5 | 5 | +| `dispatch_busdto` | BLOCKED | — | 3 | 6 | 5 | | `persist_cycle` | BLOCKED | — | 10 | 6 | 5 | | `CognitiveMarkers` | REPURPOSE | `Commit` | 2 | 0 | 0 | | `DominoCascade` | REPURPOSE | `Commit` | 8 | 0 | 0 | | `GateDecision` | REPURPOSE | — | 25 | 27 | 24 | | `GateState` | REPURPOSE | — | 14 | 1 | 1 | -| `MergeMode` | REPURPOSE | — | 8 | 12 | 11 | -| `ResonanceDto` | REPURPOSE | `PerturbationDto` | 2 | 6 | 5 | -| `BindSpace` | RETIRE | — | 67 | 41 | 40 | +| `MergeMode` | REPURPOSE | — | 8 | 13 | 12 | +| `ResonanceDto` | REPURPOSE | `PerturbationDto` | 2 | 10 | 7 | +| `BindSpace` | RETIRE | — | 67 | 44 | 41 | | `CollapseGateEmission` | RETIRE | — | 5 | 12 | 12 | | `ThinkingStyle` | RETIRE-toward-contract | — | 51 | 27 | 24 | -## Table 2 — plans naming a ruled symbol without citing the ruling (70) +## Table 2 — plans naming a ruled symbol without citing the ruling (72) Route is **mechanical triage, not a verdict**: `ARCHIVE?` = the plan's own status says it shipped; `RESCOPE` = it targets a symbol marked RETIRE; `READ` = neither signal fires @@ -79,6 +79,7 @@ a licence to act on it. | route | plan | ruled symbols named | self-declared status | board coverage | |---|---|---|---|---| +| **READ** | `alpha-reason-witness-cognitive-fabric-v1` | `ResonanceDto` | PROPOSED / PLAN ONLY. No production implemen | 0/9 | | **READ** | `archetype-scaffold-v1` | `GateDecision` | In progress (2026-04-24) | 0/0 | | **READ** | `capstone-cognitive-loop-wiring-nan-census-v1` | `GateDecision` | PROPOSED (2026-06-20). The measurement compa | 0/0 | | **READ** | `deepnsm-v3-convergence-v1` | `StepMask` | PROPOSED (doc-only). Extends `v3-convergence | 5/5 | @@ -105,6 +106,7 @@ a licence to act on it. | **RESCOPE** | `palantir-parity-cascade-v2` | `BindSpace`, `MergeMode`, `ResonanceDto`, `ThinkingStyle` | plan, not implementation. | 1/17 | | **RESCOPE** | `temporal-markov-and-style-classes-v1` | `BindSpace`, `MergeMode`, `StepMask`, `ThinkingStyle` | ACTIVE (operator-ratified 2026-07-10: "other | 16/19 | | **RESCOPE** | `unified-soa-convergence-v1` | `BindSpace`, `CollapseGateEmission`, `ResonanceDto`, `ThinkingStyle` | PROPOSAL / integration plan. Design-spec onl | 22/25 | +| **RESCOPE** | `alpha-reason-witness-shader-field-archaeology-pass-1` | `BindSpace`, `MergeMode`, `ResonanceDto` | SOURCE AUDIT / PLAN ONLY. No production wiri | 0/1 | | **RESCOPE** | `bindspace-mailbox-soa-dependency-map-v1` | `BindSpace`, `dispatch_busdto`, `persist_cycle` | MAP / preflight. No source wired yet. Read-b | 2/2 | | **RESCOPE** | `bindspace-mailbox-soa-w3-w4a-impl-v1` | `BindSpace`, `dispatch_busdto`, `persist_cycle` | v2 — 5-consolidation + 3-brutal-critic pass | 1/1 | | **RESCOPE** | `cognitive-substrate-convergence-v3` | `BindSpace`, `CollapseGateEmission`, `MergeMode` | ACTIVE — sprint-12 Wave F + Wave G complete | 7/16 | @@ -151,6 +153,6 @@ a licence to act on it. | **RESCOPE** | `unified-soa-rubikon-integration-v1` | `BindSpace` | — | 8/8 | - **ARCHIVE?**: 0 -- **RESCOPE**: 54 -- **READ**: 16 +- **RESCOPE**: 55 +- **READ**: 17 - ruled symbols tracked: 14 diff --git a/.claude/plans/alpha-reason-witness-cognitive-fabric-v1.md b/.claude/plans/alpha-reason-witness-cognitive-fabric-v1.md new file mode 100644 index 000000000..b4c5b0d3d --- /dev/null +++ b/.claude/plans/alpha-reason-witness-cognitive-fabric-v1.md @@ -0,0 +1,610 @@ +# alpha-reason-witness-cognitive-fabric-v1 + +> **Status:** PROPOSED / PLAN ONLY. No production implementation in this PR. +> **Date:** 2026-08-30. +> **Base audited from:** `main` at `de1d0c2fe54f36bf0d4d3f1393c55d0cea0c3ae9` plus explicitly named sibling-repo evidence below. +> **Relationship to #1077:** #1077 remains the source-audit / first-composition bridge. This plan owns the larger cross-repo question surfaced by that audit: **who owns reusable cognition once Alpha, graph-native derivation, witness identity, loco/R2IL, Revision, and domain observations are composed?** +> **Lineage addendum:** `.claude/plans/alpha-reason-witness-shader-field-lineage-addendum-v1.md` extends D-ARW-0/1/4/5/6/8 with source-fenced archaeology of the historical `StreamDto → ResonanceDto/PerturbationDto → P64/cognitive-shader-driver → CE64 → BusDto` field path, variable Morton aperture, stockfish-rs 64×64 reference ergonomics, and the fingerprint/OCR × EWA 2×2 covariance research arm. It mints no parallel D-id family. + +## 0. Thesis + +The next integration step is **not** another rung carrier, another planner controller, another provenance field, or another MedCare-specific reasoning path. + +The hypothesis to test is narrower and stronger: + +> **Domain repositories should supply grounded observations and domain projections. `lance-graph` should own reusable reasoning mechanics over canonical graph addresses. Ephemeral cognition should ride the existing Alpha/attention substrate; derivation should remain premise-addressable; source/witness identity should be recoverable through existing witness machinery; reasoning policy should be composable through the existing ogar-loco / R2IL membrane; persistent epistemic change must pass Revision and replay.** + +This is a **discovery-first convergence plan**, not a representation proposal. Every attractive shape below remains a hypothesis until the source path proves it. + +The desired end-to-end form is: + +```text +MedCare/domain observation + │ + ▼ +canonical graph address + │ + ▼ +Alpha cognitive plane + │ + ▼ +reusable reasoning atom / loco-R2IL program + │ + ├── premise pointers / Tarski derivation geometry + ├── witness identity / provenance chain + ├── NARS f,c + ├── Shannon H + ├── EWA Σ + ├── CausalTopology + ├── ReasoningBand + └── cognitive rung / horizon + │ + ▼ +typed receipt + │ + ▼ +Revision + │ + ▼ +Rubicon / persistence / temporal replay + │ + ▼ +domain projection +``` + +No single scalar is allowed to stand in for this coordinate set. + +--- + +## 1. Why this plan exists + +The #1077 audit exposed a category error: a rung-level Alpha design was interpreted as ten value tenants / ten stored rung rows before the sibling implementation was checked. The sibling MedCare implementation already provides a concrete precedent for a **thin-provisioned, same-address Alpha overlay** over canonical `NodeRow` geometry, including a `rung: u8` stamp and mask-native readings. Whether that implementation is correctly wired into live cognition is a separate question. + +The same audit also surfaced a likely ownership inversion in MedCare: + +- ontology/domain facts are legitimately MedCare inputs; +- but parts of patient-specific horizon construction, observation landing, evidence-to-NARS reduction, next-cognition policy, and orchestration may be handrolled generic cognition; +- `deepnsm-v2/src/reason.rs` already provides a graph-native precedent for reusable derivation: premise pointers, bounded closure, deduplication, and a mechanically derived Tarski-style depth; +- the existing W-slot / `WitnessTable` history indicates that witness identity is richer than the current shorthand documentation suggests; +- #1077 already established ogar-loco as an existing byte-addressed call membrane and treats a second DSL as a STOP. + +The integration question is therefore not “where do we store ten rungs?” It is: + +> **Can one real domain observation enter an existing Alpha surface, be processed by reusable lance-graph reasoning, carry its derivational and witness coordinates without inventing new authority, pass Revision, replay, and return to the domain as a projection?** + +If yes, that is the reusable pattern. If no, the failure must name the smallest missing primitive or contract. + +--- + +## 2. Constitutional separations + +The following axes are **orthogonal until a source-defined relation proves otherwise**: + +| Axis | Question it answers | Must not be collapsed into | +|---|---|---| +| **Cognitive rung / horizon** | From what abstraction / temporal / perspective position is cognition reading? | Tarski depth, ReasoningBand | +| **Tarski derivation depth** | How far is this derivation from its admitted leaves / premises? | cognitive rung, confidence | +| **ReasoningBand** | What coarse reasoning reading is warranted? | provenance, source type | +| **CausalTopology** | What causal path shape is represented? | ReasoningBand, evidence | +| **NARS `(f,c)`** | What evidential support state is carried? | Shannon entropy, source identity | +| **Shannon `H`** | How uncertain is the current alternative distribution? | evidence gain, confidence | +| **EWA `Σ`** | What covariance / tension geometry propagates? | trust authority, gate verdict | +| **Alpha / residual** | What is temporarily salient / attended / unresolved? | persistent truth | +| **Witness / provenance** | Which event/source/receipt grounds or witnessed the claim? | Tarski depth, dataset version | +| **Temporal/version** | Which sealed state / reading horizon is being replayed? | evidence-event identity | + +### 2.1 Tarski is a measurement, not the rung ladder + +The existing `reason.rs` `rung` semantics are treated as **derivational depth**: + +```text +base / no premises depth = 0 +derived depth = 1 + max(depth(premises)) +``` + +This is valuable and should survive. The field name may eventually deserve clarification (`tarski_depth` / `derivation_height`), but this plan does **not** rename it as a prerequisite. + +**STOP:** `reason.rs::rung` must never be equated with `cognitive_shader::RungLevel` merely because both use the word “rung.” + +### 2.2 “Mechanical vs observed” is two questions + +This plan distinguishes: + +1. **Leaf vs derivation:** a Tarski-0 / no-premise assertion versus a premise-derived assertion. This may already be structurally recoverable and must not receive another redundant bit without proof. +2. **Nature of the leaf:** observed by device, imported ontology/reference, literature-attested, human-entered, oracle/reference fixture, etc. This belongs to witness/provenance/receipt semantics if existing machinery can express it. + +**NO-BUY rule:** if Tarski + premise pointers + existing W-linked receipt identity can answer the required query, do not mint another “origin” field. + +--- + +## 3. Alpha is a cognitive plane, not ten drawers + +### 3.1 Known precedent to verify directly + +The MedCare sibling implementation is the primary precedent to read, not a summary: + +- `medcare-nodesoa::alpha` +- canonical `NodeRow` address reuse; +- sparse/thin-provisioned Alpha allocation; +- `AlphaStamp { cycle, seq, rung, visits }`; +- mask-native `AlphaMask` / `AlphaOverlay::attended_mask`; +- optional Lance persistence of claimed Alpha rows. + +The architectural reading to test is Photoshop-like: + +```text +canonical graph address A + │ + └── ephemeral Alpha state at A + attention / visits / rung / residual / perspective... +``` + +Not: + +```text +A × rung1 tenant +A × rung2 tenant +... +A × rung10 tenant +``` + +### 3.2 What remains unknown + +Do **not** assume before measurement whether multiple rung observations at one graph address coexist through: + +- multiple Alpha rows, +- multiple overlays/sessions, +- masks/views, +- temporal versions, +- facets/classviews, +- an existing rail, +- or another shipped carrier. + +The source audit must answer what `rung` actually indexes and what coexistence semantics exist today. + +**STOP:** no `(classid, rail)` mint for rungs 1–10 until an actual producer/consumer path proves that existing Alpha/view/session machinery cannot represent the requirement. + +--- + +## 4. `reason.rs` is a precedent, not automatically the target API + +`deepnsm-v2/src/reason.rs` establishes a useful ownership precedent: + +- reasoning is graph-native structure; +- derived facts retain premise pointers; +- derivation is bounded and deduplicated; +- depth is mechanically derived from premise geometry; +- soundness/acyclicity can be checked from the structure. + +This plan must determine which aspects are reusable substrate law and which are local to its current transitive-derivation implementation. + +**Do not** wire MedCare directly to `DerivationArena` simply because it exists. + +Instead classify the pattern: + +```text +DOMAIN INPUT + facts / observations / typed clinical grounding + +GENERIC REASONING + land in horizon + claim Alpha + attach premise/backreference + deduplicate + derive / counterfactually attack / revise + emit typed receipt + +ORCHESTRATION + choose what cognition executes next + without deciding truth itself + +PROJECTION + render / expose domain-specific neighborhood or result +``` + +Only operations proven generic should move into or be exposed by lance-graph. + +--- + +## 5. MedCare ownership audit + +Audit the live MedCare path around these surfaces before proposing code: + +```text +PatientSession / patient graph opening + ↓ +observe_patient + ↓ +walk_resident / walk_resident_for_patient + ↓ +Alpha claim / ReasoningNeighborhood population + ↓ +patient_evidence_truth + ↓ +patient_outcome / next cognition + ↓ +drive_cohort_thoughts + ↓ +#879-style lifecycle / persistence seam +``` + +For **every operation**, record exactly one owner class: + +- `DOMAIN INPUT` +- `GENERIC REASONING` +- `ORCHESTRATION` +- `PROJECTION` + +Then search lance-graph / ogar-loco / ogar-r2il / r2sleigh precedents before inventing any equivalent. + +### 5.1 Expected domain-owned material + +Likely MedCare-owned, pending source verification: + +- patient identity/session scoping; +- clinical observation acquisition; +- ICD/LOINC/HPO/ATC/other domain grounding; +- clinical evidence-role mapping; +- domain-specific rendering/projection. + +### 5.2 Suspected handrolls to test, not assert + +Specifically test whether MedCare has independently implemented any generic form of: + +- observation → Alpha claim; +- observation → reasoning edge; +- premise/backreference bookkeeping; +- deduplication; +- evidence → NARS reduction; +- NARS / uncertainty → next cognition; +- graph reasoning → Kanban transition; +- replay/history bookkeeping. + +If an existing substrate operation is equivalent, the BUY is **reuse/convergence**, not another MedCare API. + +--- + +## 6. W-slot / witness archaeology + +The current repository carries contradictory-looking descriptions that must be reconciled before provenance design: + +- CE64 bits 53..58 are the W-slot; +- `witness_table.rs` describes W as a **per-cohort index** resolving to `WitnessEntry { mailbox_ref, spo_fact_ref }`, with a backward-walkable belief-update arc; +- older architecture text explicitly says this is **NOT a witness-corpus pointer**; +- some current CE64 layout wording describes W as a “witness corpus root handle.” + +The plan must recover the intended semantics from primary source and history. + +Questions: + +1. What is the W-slot’s canonical identity domain today? +2. Is `mailbox_ref` an event/witness identity, an owner identity, or only an indirection step? +3. When `spo_fact_ref` becomes `Some`, what exactly does crystallisation certify? +4. Where is source-kind/attribution stored today, if anywhere? +5. Can a Tarski-0 leaf be followed through W to a receipt that distinguishes observed/imported/reference/etc.? +6. Which part is event identity, which part is source attribution, which part is evidential-base membership, and which part is dependence? + +Preserve the standing separation: + +```text +event identity +≠ evidential-base membership +≠ source dependence +≠ object/view identity +≠ dataset version +``` + +**STOP:** do not allocate CE64/V3 bits for `OBSERVED`, `MECHANICAL`, or provenance until this audit is complete. + +--- + +## 7. Atom / program convergence + +The reusable reasoning mechanics discovered in this audit should first be evaluated against the existing execution membrane: + +```text +ogar-loco FnIndex / vocabulary + ↓ +ogar-r2il / R2IL composition where applicable + ↓ +hardened native atom + ↓ +typed result / receipt +``` + +Candidate mechanisms include, but are not limited to: + +- Shannon `H(p)`; +- mask intersection/difference where semantically lawful; +- Alpha claim/read/composition; +- Tarski depth / premise walk; +- NARS deduction/induction/abduction/revision primitives; +- counterfactual application; +- EWA covariance/tension operations; +- CausalTopology read; +- ReasoningBand read; +- Revision admissibility tests. + +The exact atom census belongs to #1077 and this plan consumes it. This plan should **not** create a competing atom registry. + +### 7.1 Frozen remains lifecycle/authority, not “Rust club” + +A primitive may have a hardened native implementation. A Frozen program may also be a versioned, validated composition over primitives. The plan must not equate “Frozen” with “implemented directly in Rust forever.” + +### 7.2 Constitutional law remains unskippable + +Even if mechanisms are callable atoms, the following must not become optional bytecode conventions: + +- no empirical evidence minting from internal reinterpretation alone; +- typed provenance/identity separation; +- Revision before persistent epistemic authority where the lifecycle requires it; +- replay/version binding; +- Rubicon as the durable action/commit boundary. + +Rule of thumb: + +> **Make the mechanism callable; make the law unskippable.** + +--- + +## 8. Rungs, Alpha, and metacognition + +The plan carries forward the #1077 separation: + +```text +rung / horizon = where cognition reads from +program / atom = what cognition executes +Alpha = temporary working plane +orchestration = what becomes ready / executes next +receipt = what happened and under what warrant +Revision = what may change persistent epistemic state +``` + +No rung owns the right to think. Any rung may invoke an admissible atom/program if its inputs and warrant permit it. + +A future scheduler, if any, may: + +- prefetch; +- queue; +- wake; +- co-locate; +- prioritize. + +It must not decide: + +- truth; +- causality; +- independence; +- ReasoningBand promotion; +- Revision acceptance. + +**RUNG PROPAGATION ≠ RUNG PROMOTION.** +**SCHEDULER ≠ REASONER.** +**VISIBILITY ≠ MUTABILITY.** + +--- + +## 9. Revision and replay are the hinge + +The target integration only counts if the result survives the complete epistemic lifecycle: + +```text +observation / prior + ↓ +Alpha / reasoning + ↓ +typed receipt + ↓ +Evaluation + ↓ +Revision + ↓ +Rubicon / seal + ↓ +temporal replay + ↓ +next cycle prior +``` + +An Alpha row existing is not a belief. A beautiful derivation is not an observation. A lower Shannon entropy is not evidence gain. A high ReasoningBand is not source authority. + +The first BUY must prove that the next cycle can reconstruct **what was reasoned, from which premises/witnesses, under which program/version, and what Revision did with it**. + +--- + +## 10. Waves + +### W0 — primary-source ownership census + +Read the actual live files, not prior plan prose, for: + +- lance-graph `reason.rs` and consumers; +- CE64/V3 W-slot layout and `WitnessTable`; +- Alpha / attention / mask primitives in lance-graph; +- Revision / fusion / Rubicon / #879 sealed-cycle path; +- ogar-loco / ogar-r2il / R2IL entry points; +- MedCare `medcare-nodesoa::alpha` and its real producers/consumers; +- MedCare `PatientSession`, patient observation, patient reasoning, NARS/policy, and orchestration path; +- the shader-field lineage addendum's `StreamDto → ResonanceDto/PerturbationDto → P64/cognitive-shader-driver → CE64 → BusDto` historical/current path, including whether CE64 truly occupied the operator-recalled “vertical mantissa” role and whether `top_k` ever selected the Morton cascade aperture. + +**Output:** one ownership table with `SOURCE FACT`, `PLAN FACT`, `MEASURED ABSENCE`, or `HYPOTHESIS` for every claim. + +**F-ARW-0:** any absence claim based on a single repo or grep-only census fails the wave. + +### W1 — Alpha semantic convergence + +Determine the actual same-address Alpha geometry and what `rung` indexes. + +Measure: + +- address identity; +- overlay/session identity; +- sparse occupancy; +- multiple-rung coexistence semantics; +- mask/view semantics; +- actual producer → Alpha → consumer paths; +- persistence/version semantics where present; +- whether Alpha is historically continuous with Resonance/Perturbation field semantics or only a later, composable sibling mechanism. + +**NO-BUY:** if the shipped Alpha/view/session machinery already expresses the desired multi-rung state, no new rung carrier/rail/tenant is minted. + +### W2 — reasoning ownership cut + +Classify the MedCare path operation by operation. For every `GENERIC REASONING` operation implemented in MedCare, search for an existing lance-graph/loco/R2IL equivalent. + +**F-ARW-2:** if a proposed move into lance-graph requires importing clinical vocabulary or patient-specific policy into the generic layer, the ownership cut is wrong. + +### W3 — witness/source semantics recovery + +Reconcile W-slot documentation and trace one leaf through witness identity to any available receipt/source attribution. + +**F-ARW-3A:** if `witness_table.rs` and CE64 layout docs disagree, documentation is not treated as settled contract until history/consumer behavior resolves it. + +**F-ARW-3B:** if existing witness/receipt identity can answer the source query, new provenance bits/types are a NO-BUY. + +### W4 — orthogonal-coordinate falsifiers + +Construct paired cases proving the axes do not collapse: + +- same Tarski depth, different source provenance; +- same provenance class, different Tarski depth; +- same Shannon H, different evidential status; +- same NARS `(f,c)`, different derivational depth; +- same ReasoningBand, different source/provenance; +- same cognitive rung, different Tarski depth; +- high Tarski depth with a contradictory low-depth observation; +- counterfactual elimination reducing H without minting empirical evidence; +- same semantic relation / CE64 reading under different field address permutations; +- same field energy/covariance with different epistemic warrant; +- same top-k cardinality under lawful versus randomized locality. + +The purpose is not a new struct. It is to pin **non-equivalence**. + +### W5 — atom/program reuse census + +For each generic reasoning operation needed by the first end-to-end chain, classify: + +- existing callable atom; +- existing operation not loco-addressable; +- existing R2IL composition; +- missing primitive; +- constitutional rule, therefore not optional program logic. + +Include the shader-field addendum candidates before minting anything new: + +- mask-native gather/scatter over a bounded active field; +- 2×2 / 4×4 local neighbourhood operations; +- structure/covariance tensor primitive where useful; +- EWA `Σ' = MΣMᵀ` propagation; +- top-k / cascade-aperture selection if historical/current ownership is proven; +- incremental local update versus full recomputation. + +**F-ARW-5:** inconvenience of composition is not evidence for a new controller. + +### W6 — ONE end-to-end BUY + +Prove exactly one real path: + +```text +one MedCare observation + → canonical graph address + → existing Alpha mechanism + → one reusable lance-graph reasoning operation + → premise / Tarski geometry + → W / witness trace + → typed receipt + → Revision + → canonical seal/persistence path + → temporal replay + → MedCare projection +``` + +If D-ARW-0 proves the historical shader-field identity, the path may additionally demonstrate the smallest lawful field pass. If not, W6 stays on the current Alpha path and the historical seam remains an independent restoration question. + +No scheduler. No bulk migration. No universal `ReasoningContext`. No new DTO family. + +The test must demonstrate both: + +- **can-fire:** the observation changes the lawful cognitive/revision result; +- **can-stay-silent:** an irrelevant/missing observation does not fabricate a result. + +### W7 — extract the reusable pattern + +Only after W6 succeeds, name the smallest reusable API/pattern that allowed the chain to work. + +Prefer: + +- existing carrier + new free function/atom; +- existing type + new method; +- existing loco/R2IL composition; + +before: + +- new trait; +- new DTO; +- new tenant; +- new controller. + +The domain adapter remains thin. + +### W8 — optional second-domain falsifier + +A reusable cognitive pattern earns its name only if a second non-MedCare caller can exercise it without importing MedCare semantics. This may be a small in-repo fixture or another sibling consumer. + +The fingerprint/OCR and stockfish-rs arms in the lineage addendum may be used as **algorithmic reference/falsifier arms**, but they count as a second cognitive buyer only if they exercise the same cognitive contract rather than merely reusing the same local math. + +If no second buyer exists yet, mark the pattern **MedCare-proven / generality-unproven**, not universal. + +--- + +## 11. STOP gates + +The plan stops and asks for an operator decision if any implementation proposes: + +1. a new rung tenant/rail/classid before W1 proves existing Alpha/view geometry insufficient; +2. a new provenance/origin bit before W3 exhausts W-slot + receipt semantics; +3. a new reasoning controller because loco/R2IL composition is inconvenient; +4. a second scheduler semantics; +5. collapsing Tarski depth into cognitive rung or ReasoningBand; +6. collapsing Shannon, NARS, EWA, source provenance, and ReasoningBand into a “trust” scalar; +7. treating Alpha presence as evidence; +8. treating counterfactual elimination as empirical observation; +9. moving clinical vocabulary or patient policy into the generic graph layer; +10. bypassing Revision/Rubicon constraints because a derivation is internally consistent; +11. inferring a workspace-wide absence after checking only one repository; +12. adding a new DTO/trait/tenant before a real producer and consumer are named; +13. promoting “CE64 vertical mantissa,” “top-k = Morton aperture,” or “Alpha = Resonance/Perturbation continuation” from reconstruction to contract without a source/measurement trace; +14. treating Stockfish as evidence that Morton/inverse-pyramid addressing exists there rather than as an operational reference; +15. treating fingerprint/EWA field geometry as epistemic authority. + +--- + +## 12. Deliverables + +| D-id | Deliverable | Initial status | +|---|---|---| +| **D-ARW-0** | cross-repo primary-source ownership map (`SOURCE FACT` / `PLAN FACT` / `MEASURED ABSENCE` / `HYPOTHESIS`), including shader-field/DTO ancestry trace | Queued | +| **D-ARW-1** | Alpha same-address/rung semantics audit across lance-graph + MedCare; no representation assumption; test historical field-plane continuity separately | Queued | +| **D-ARW-2** | MedCare reasoning-handroll census and ownership cut | Queued | +| **D-ARW-3** | W-slot / witness / source-semantics archaeology + documentation reconciliation | Queued | +| **D-ARW-4** | orthogonal-coordinate falsifier matrix (rung/Tarski/Band/H/NARS/Σ/Alpha/W/version + address/aperture/field geometry) | Queued | +| **D-ARW-5** | atom/loco/R2IL reuse census for the first real chain, including bounded-field/local-operator candidates | Queued | +| **D-ARW-6** | one MedCare observation → Alpha → reusable reasoning → witness/premises → Revision → replay → projection proof | Queued | +| **D-ARW-7** | smallest reusable lance-graph cognitive pattern extracted from D-ARW-6 | Held on D-ARW-6 | +| **D-ARW-8** | optional second-domain falsifier of claimed reuse; imaging/chess math alone does not satisfy cognitive-buyer criterion | Held on D-ARW-7 | + +--- + +## 13. Success criterion + +This plan succeeds when a domain repository can change **what is observed** without owning a bespoke implementation of **how the graph reasons**, and when a reasoning program can change/version/replay without recompiling bespoke domain/planner policy unless a genuinely new primitive or constitutional rule is required. + +The smallest winning sentence is: + +> **The domain supplies facts; Alpha holds reversible cognition; lance-graph owns reusable reasoning over those facts; witness/premise geometry explains the derivation; Revision decides what survives; replay proves it happened.** + +The lineage addendum adds a second, deliberately conditional sentence: + +> **If source archaeology confirms the old field seam, the cognitive field supplies bounded horizontal activity, CE64 supplies the vertical semantic carrier, and the shader/program transforms the selected field without acquiring authority to rewrite truth.** + +If the first real chain needs less machinery than this plan expects, delete the excess. The goal is not to complete the diagram. The goal is to discover the smallest substrate law that makes the diagram inevitable. diff --git a/.claude/plans/alpha-reason-witness-shader-field-archaeology-pass-1.md b/.claude/plans/alpha-reason-witness-shader-field-archaeology-pass-1.md new file mode 100644 index 000000000..f963a9248 --- /dev/null +++ b/.claude/plans/alpha-reason-witness-shader-field-archaeology-pass-1.md @@ -0,0 +1,465 @@ +# D-ARW-0 shader-field archaeology — pass 1 + +> **Status:** SOURCE AUDIT / PLAN ONLY. No production wiring in this file. +> **Date:** 2026-08-30. +> **Current-main snapshot audited:** `de1d0c2fe54f36bf0d4d3f1393c55d0cea0c3ae9`. +> **Owner plan:** `.claude/plans/alpha-reason-witness-cognitive-fabric-v1.md`. +> **Lineage addendum:** `.claude/plans/alpha-reason-witness-shader-field-lineage-addendum-v1.md`. +> +> This pass exists to answer one narrower question before any implementation BUY: +> **what parts of the historical Stream / resonance / perturbation / shader / mask / CE64 / EWA field machine still exist as current executable source, what is merely historical, and where is the wire actually torn?** + +--- + +## 0. Evidence vocabulary + +This pass deliberately separates: + +- **SOURCE FACT** — current executable source at the snapshot above establishes it. +- **HISTORICAL SOURCE FACT** — committed historical source establishes a former implementation or architecture statement. +- **PLAN FACT** — a PR / plan / board entry states intent; not runtime proof. +- **OPERATOR-RECOVERED INTENT** — the operator remembers the original architectural meaning; recorded as such when no independent historical source has yet been recovered. +- **BROKEN WIRE** — both sides exist, but the inspected current producer → carrier → consumer path does not join them. +- **UNPROVEN** — attractive relation, insufficient evidence. +- **NO-BUY** — do not mint a new carrier / mapping / controller yet. + +GitHub code search is not treated as an absence oracle in this pass: it returned zero for identifiers that are visibly present in fetched source. Negative claims therefore use direct inspected paths and are scoped accordingly. + +--- + +## 1. Current producer: the dense perturbation field is real + +### SOURCE FACT — DTO family + +`crates/thinking-engine/src/dto.rs` defines the current doctrinal family: + +```text +Φ StreamDto sensor / intake enters field +Ψ PerturbationDto active ripple field +B BusDto committed thought transport +Γ ThoughtStruct persisted stabilized form +``` + +`PerturbationDto` currently carries: + +```rust +energy: Vec +cycle_count: u16 +converged: bool +top_k: [(u16, f32); 8] +``` + +`from_energy_f32` derives `top_k` by sorting the dense energy vector descending and taking the largest eight entries. The deprecated mechanical alias `ResonanceDto = PerturbationDto` remains in this module; a different perspectival `ResonanceDto` exists elsewhere and must not be conflated. + +**Verdict:** the dense field is not archaeological prose. It is a current carrier. + +### SOURCE FACT — current field engine + +`crates/thinking-engine/src/engine.rs` currently executes a repeated field update over `CODEBOOK_SIZE = 4096`: + +```text +energy_next = distance_table × energy_current +``` + +The engine returns a full `PerturbationDto` after the cycle loop. `perturb(indices)` changes energy; `commit()` derives the BusDto from the resulting field / top-k. + +The current implementation also materializes a `4096 × 4096` distance table (`TABLE_SIZE = 4096²`) and describes that table as the core of the current MatVec mechanism. + +**Important correction to the recovered lineage:** the operator-recalled idea “always processing / do not materialize the cognitive LUT” cannot honestly be read as “no lookup/table is ever materialized” across all historical implementations. The current thinking-engine explicitly materializes the 4096² operator table, and the April cognitive-shader document explicitly used a read-only distance table as a texture. A narrower reading survives source better: **working cognition remains resident and is transformed by operators rather than repeatedly materializing object/row worklists or a table of all possible thoughts.** If the stronger rule really was “no distance LUT either”, then the current engine is a divergence and needs a separate falsifier, not retrospective rewriting. + +--- + +## 2. The torn metre: dense field → shader mask + +### SOURCE FACT — current bridge drops the dense field + +`crates/cognitive-shader-driver/src/engine_bridge.rs` explicitly describes two DTO pipelines and the bridge between them. + +The relevant current path is: + +```text +StreamDto.codebook_indices + → ingest_codebook_indices(...) + → BindSpace content fingerprints + +PerturbationDto.top_k + → dispatch_from_top_k(...) + → active indices above SCAN_WORTHY_ENERGY + → min(index)..max(index)+1 + → ShaderDispatch.rows: ColumnWindow +``` + +The bridge documentation is explicit that this is a **control-plane WINDOW heuristic, not a mask**. For a sparse active set `{7, 42, 900}`, the consumer scans the contiguous interval `7..901`. + +The full `PerturbationDto.energy` vector does not cross this inspected bridge into the P64 mask surface. + +### BROKEN WIRE — field algebra collapses to a bounding interval + +That establishes the current tear precisely: + +```text +DENSE FIELD SHADER / P64 +energy[0..N] real mask algebra exists + │ ▲ + └─ top 8 ─> min..max window ────┘ +``` + +The semantic field survives on the producer side. The mask ALU survives on the consumer side. The current bridge reduces the field to a contiguous window before the mask can do the selective work. + +This re-confirms the #1051 finding without relying on #1051 prose alone. + +**D-ARW-0 verdict:** `BROKEN WIRE`, not missing concept and not numerical coincidence. + +--- + +## 3. Current P64 surface: the lithographic half exists + +### SOURCE FACT — CE64 → 64×64 field + +`crates/p64-bridge/src/lib.rs` currently maps `CausalEdge64` into a 64×64 working surface: + +```text +row = S_index / 4 +col = O_index / 4 +``` + +Thus the 256×256 S/O space is grouped into 64×64 blocks. `edge_to_layer_mask` maps the edge’s causal/inference reading into one or more of eight predicate layers. The bridge can produce: + +```rust +[u64; 64] // one 64×64 plane +[[u64; 64]; 8] // eight predicate planes +``` + +The current `CognitiveShader` consumes those planes and a semiring; its own documentation says, in substance, the mask says **where to look**. + +### SOURCE FACT — P64 does not currently consume PerturbationDto + +The inspected current p64 source consumes CE64-derived mask topology. It does not take the thinking-engine dense `energy` carrier as an input. + +### OPERATOR-RECOVERED INTENT — masking as lithography + +The operator restores the original reading: + +> **masking was supposed to make the work** — a descriptive `where()` / `method()` surface over resident data, zero-copy, like lithography rather than a row-wise homunculus. + +This exact historical word is not independently recovered in current lance-graph source, but it is mechanically consistent with the present mask-native doctrine in `lance-graph-java`: semantic facade methods name operations; packed masks are native execution currency; row-id materialization is an explicit terminal. + +The useful architectural statement is therefore: + +```text +WHERE = expose / narrow a resident population as a mask +METHOD = apply a substrate operation to that population +``` + +not: + +```text +WHERE = build a collection of rows +METHOD = iterate the collection in the facade +``` + +**NO-BUY:** do not add a second selection representation to resurrect the metaphor. The mask currency already exists. + +--- + +## 4. CE64: what is source fact vs restored “vertical mantissa” meaning + +### SOURCE FACT — physical layout + +Current `crates/causal-edge/src/{edge,layout}.rs` retains the 3×8-bit S/P/O base at bits 0..23. + +The current v2 layout also uses a signed i4 inference mantissa at bits 46..49. Bits 53..58 are W-slot territory. Bits 59..60 and 61..63 have additive modern readings for topology / ReasoningBand layered over historical compatibility constraints. + +### OPERATOR-RECOVERED INTENT — CE64 as vertical mantissa + +The operator restores a broader original role: + +> **CausalEdge64 was intended as the vertical semantic / causal mantissa at the hot field locus, informed by SPO `2^3` amortization, with eight cheap readings of resident state and an intended L1-cache amortization across those cycles.** + +Current source independently proves the 3×8 S/P/O fossil and a smaller inference mantissa field, but this pass has **not** recovered a historical source sentence saying “CE64 is the vertical mantissa” or proving the exact “8-cycle L1” contract. + +Therefore: + +- `3 × 8 S/P/O bits` = **SOURCE FACT**. +- SPO `2^3` / same-address eight-reading design is already recorded historically in the #1051 board archaeology, but there as operator-restored intent. +- “vertical mantissa” as the architectural name = **OPERATOR-RECOVERED INTENT**. +- exact 8-cycle/L1 performance contract = **OPERATOR-RECOVERED INTENT, MEASUREMENT REQUIRED**. + +**STOP:** do not reinterpret unrelated CE64 bits to force this semantics. First prove the field-locus mapping and measure the reuse economics. + +--- + +## 5. Morton cascade: real address geometry, not yet the P64 bridge + +### SOURCE FACT — OGAR’s current discovery map + +`AdaWorldAPI/OGAR/docs/DISCOVERY-MAP.md` currently states: + +```text +64 → 256 → 1024 → 4096 → 16k → 64k → 256k +``` + +as an **immaterialized Morton enumeration**, every level adding one nibble. It explicitly calls the cascade a **coordinate transform, not a stored grid** and states the substrate goal as an “immaterialized Morton cascade with templated payloads”, with non-amortized per-query cost forbidden. + +This is much stronger than a numerical rhyme. The cascade is real current documented address geometry in OGAR. + +### UNPROVEN — top_k is the Morton aperture + +Nothing inspected in the current thinking-engine / engine bridge proves that `PerturbationDto.top_k` selects a level of that Morton cascade. + +Current `top_k` means simply “largest eight energy entries”. Current `dispatch_from_top_k` converts them to a min/max row window. No Morton deinterleave or cascade-level identity is established there. + +### UNPROVEN — energy index ↔ P64 cell identity + +The old unresolved address question remains: + +```text +energy[i] + ?= +P64 cell[row][col] +``` + +Possible mappings still include row-major, Morton 12→6+6, or a codebook-specific permutation. Count equality (`4096 == 64×64`) is not identity. + +The decisive sabotage remains excellent: + +```text +CONTROL current top_k → min/max ColumnWindow +EXPERIMENT energy → candidate spatial mapping → exact mask → P64 ALU +SABOTAGE same values, deterministic random permutation of cell identity +``` + +If EXPERIMENT ≈ SABOTAGE on the locality-sensitive metric, the proposed geometry is decorative and receives **NO BUY**. + +--- + +## 6. Historical cognitive-shader source: the framebuffer lineage is real + +### HISTORICAL SOURCE FACT — `SESSION_COGNITIVE_SHADER.md`, PR #130 era + +Committed historical source at `63e312073b5e2874fb0519a223901d338c5ce2e1` explicitly mapped: + +```text +Distance table = texture +Energy vector = framebuffer +MatVec = shader dispatch +L4 accumulator = persistent storage buffer +``` + +It described the energy buffer as double-buffered, resident across cycles, and the whole thought as a series of dispatches with data staying in shared/storage memory. It also explicitly linked the Rust engine semantics back to `ada-consciousness` VSA superposition / collapse semantics. + +This upgrades “cognitive shader” from a later metaphor to a **historically explicit execution model**. + +### Important historical correction + +That same source also explicitly loaded a read-only distance table into shared memory and sampled it repeatedly. Therefore the old shader lineage itself supports: + +```text +resident operator table + resident mutable field + tiny outward result +``` + +more directly than the stronger statement “no LUT exists anywhere”. + +The load-bearing historical idea is **resident execution with minimal movement**, not necessarily the abolition of all lookup tables. + +--- + +## 7. EWA: three nearby mechanisms, currently distinct + +This is the most important correction in this pass. + +### 7.1 SOURCE FACT — real EWA-Sandwich kernel + +`crates/lance-graph-contract/src/sigma_propagation.rs` currently implements the actual 2×2 SPD propagation: + +```text +Σ' = M · Σ · Mᵀ +``` + +with `Spd2`, `ewa_sandwich`, `ewa_inverse`, `log_norm_growth`, and `pillar_5plus_bound`. + +The module itself says the shader-driver propagation consumer is planned between edge emission and FreeEnergy gating. + +### 7.2 SOURCE FACT — BindSpace carries a sigma index + +`crates/cognitive-shader-driver/src/bindspace.rs` currently carries one `sigma: u8` per row and exposes `sigma_at` / `write_sigma`. + +Its comments say the byte indexes a 256-entry Σ codebook. However, in the inspected `sigma_propagation.rs` current source, the public surface is the SPD kernel and tests; this pass did **not** find a `SigmaCodebook` implementation there. Treat “codebook owned here” in BindSpace comments as a wiring/documentation claim needing its own follow-up, not as established current source. + +### 7.3 SOURCE FACT — current ShaderDriver does not visibly execute the Sandwich + +The inspected current `crates/cognitive-shader-driver/src/driver.rs` hot path contains no `sigma` use. Its relevant stages remain P64/content hits, edge emission, FreeEnergy/MUL-style gate work, sink, then NARS/style revision. + +Thus the B4 “shader-driver Σ-propagate” consumer named in the contract docs has not been established in the current inspected driver. + +### 7.4 SOURCE FACT — AlphaFrontToBack is a different operation + +The current shader contract / driver also has `MergeMode::AlphaFrontToBack` and an `AlphaComposite` result. The implementation performs front-to-back alpha accumulation over hit qualia with early saturation. + +That is useful, but it is **not the same operation as `Σ' = MΣMᵀ`**. Do not call the alpha composite proof that the EWA-Sandwich field is wired. + +### 7.5 SOURCE FACT — SPLAT is a third, distinct surface + +`crates/lance-graph-contract/src/splat.rs` defines CAM-plane splat deposition: + +```text +ReasoningWitness64 / centers / q8 amplitude / q8 width / channel + → CamPlaneSplat + → SplatPlaneSet::deposit + → one of six 16K awareness planes +``` + +It preserves witness/replay identity and separates support, contradiction, forecast, counterfactual, style, source channels. The hot deposition shown here is bit-plane / q8 pressure geometry, not itself the SPD Sandwich. + +### BROKEN WIRE — a promising but incomplete triangle + +Current source therefore contains all three vertices: + +```text +SPLAT deposition BindSpace sigma index EWA Sandwich kernel + \ | / + \ | / + +---------- potential field path ----------+ + + ShaderDriver + ? +``` + +but the inspected production shader connection is not established. + +This is exactly the kind of seam D-ARW-0 should recover before inventing another field abstraction. + +--- + +## 8. Alpha: do not conflate two unrelated names + +Two Alpha surfaces are currently relevant and must stay separate: + +1. **MedCare AlphaOverlay / AlphaMask** — thin-provisioned same-address cognitive attention/residual overlay over `NodeRow`, with `AlphaStamp {cycle, seq, rung, visits}` and mask-native attention. +2. **Shader AlphaFrontToBack / AlphaComposite** — a merge mode that composites hit qualia with front-to-back alpha saturation. + +They share the word Alpha and a reversible/working-surface flavor, but this pass has not established common producer identity, storage identity, or lineage. + +**STOP:** `MedCare AlphaOverlay == shader AlphaComposite == old Resonance/Perturbation field` is currently an attractive story, not a source fact. + +--- + +## 9. Stockfish-rs stays a dual reference, not Morton evidence + +The stockfish-rs plans remain useful in two orthogonal ways: + +1. **systems reference:** learn how a naturally 64×64 / 4096 domain keeps compact state hot, uses gather/lookup/scatter style patterns, incremental updates, deterministic fallbacks, and measures hardware reality; +2. **expert-iteration oracle:** deep exact root search labels candidate decisions; Strict observations are physically separated from Retro teacher labels; learned selectors must beat Frozen on held-out replay. + +Stockfish itself does **not** provide evidence that Morton hierarchy is the correct mapping for the cognitive field. The mapping must survive the permutation sabotage independently. + +The future reinforcement target can eventually include **work economy** as well as decision agreement, but only after the field address identity exists: + +```text +same quality decision +with fewer admitted cells / fewer aperture expansions / fewer exact replays +``` + +Do not train against a spatial metric before the space is proven. + +--- + +## 10. Pass-1 evidence table + +| Claim | Grade after this pass | +|---|---| +| `PerturbationDto.energy` is a real dense current field | **SOURCE FACT** | +| `top_k` is eight largest energies | **SOURCE FACT** | +| current engine bridge drops dense energy and emits min/max window | **SOURCE FACT / BROKEN WIRE** | +| P64 is a real 64×64 × 8 mask surface derived from CE64 | **SOURCE FACT** | +| current P64 consumes PerturbationDto directly | **NOT ESTABLISHED** | +| CE64 retains 3×8 S/P/O bits | **SOURCE FACT** | +| CE64 overall role = “vertical mantissa” | **OPERATOR-RECOVERED INTENT** | +| SPO 2³ exact 8-cycle L1 amortization | **OPERATOR-RECOVERED INTENT; MEASURE** | +| OGAR 64→…→256k Morton cascade exists and is immaterialized | **SOURCE FACT (OGAR docs)** | +| `top_k` is the Morton aperture selector | **UNPROVEN** | +| energy index ↔ P64 cell map is canonical | **UNPROVEN** | +| historical Cognitive Shader used energy-as-framebuffer / table-as-texture | **HISTORICAL SOURCE FACT** | +| current EWA-Sandwich `Σ'=MΣMᵀ` kernel exists | **SOURCE FACT** | +| BindSpace carries `sigma:u8` | **SOURCE FACT** | +| current ShaderDriver consumes that sigma via EWA-Sandwich | **NOT ESTABLISHED / planned in kernel docs** | +| current AlphaFrontToBack is the EWA-Sandwich | **FALSE AS AN OPERATIONAL EQUIVALENCE** | +| SPLAT deposition exists with witness/replay + channel planes | **SOURCE FACT** | +| SPLAT→sigma→EWA→Shader is one production chain | **NOT ESTABLISHED** | +| MedCare Alpha is descendant of old Perturbation/Resonance field | **UNPROVEN** | +| Stockfish proves Morton | **NO** | +| Stockfish is useful as systems + expert-iteration oracle | **HISTORICAL SOURCE FACT / reference arm** | + +--- + +## 11. What this changes in D-ARW-0 + +D-ARW-0 should no longer ask vaguely whether “the field” exists. It exists in several separately mature fragments. + +The next source question is now narrower: + +> **Can one real dense/current activity field be lowered into the existing mask-native working surface without losing address identity, while using the already-shipped EWA/SPLAT/CE64 machinery only where each has a proven producer and consumer?** + +That is not yet an implementation request. + +The first permitted executable probe is gated by address identity: + +```text +real field fixture + → candidate identity mapping + → exact sparse mask (not min/max window) + → existing P64 combine/contra/style operation + → optional EWA 2×2 arm only if sigma producer is real + → typed measurements + +CONTROL current min/max window +EXPERIMENT exact mask using candidate mapping +SABOTAGE fixed random permutation of the mapping +``` + +Measure at minimum: + +- result / ranking equivalence where expected; +- admitted cell count and words touched; +- cache / work cost if instrumentation already exists; +- locality-sensitive outcome under sabotage; +- whether EWA arm changes a predeclared geometry metric rather than merely adding compute. + +**NO BUY** if permutation does not hurt the locality-sensitive arm. +**NO BUY** if exact masks do not reduce work or improve correctness over the window baseline. +**NO BUY** for new DTO, field carrier, provenance bit, rung tenant, or scheduler in this probe. + +--- + +## 12. Pass-1 conclusion + +The architecture is not missing. It is **disarticulated**. + +Current source already contains: + +```text +live dense perturbation field +real mask-native 64×64 working ALU +CE64 semantic carrier +immaterialized Morton cascade in OGAR +real 2×2 EWA-Sandwich kernel +per-row sigma byte +witness-aware SPLAT pressure planes +shader driver / resident BindSpace +Alpha surfaces +``` + +The inspected broken points are more specific: + +```text +Perturbation energy → mask identity TORN +Morton cascade → top_k aperture UNPROVEN +sigma byte → EWA → ShaderDriver NOT ESTABLISHED +SPLAT → EWA → production shader NOT ESTABLISHED +old field → MedCare Alpha lineage UNPROVEN +CE64 “vertical mantissa” exact runtime OPERATOR-RECOVERED, unmeasured +``` + +That is enough to **stop designing representations** and continue archaeology / measurement. + +The machine is not waiting for another abstraction. It is waiting for the correct wires to be proven. \ No newline at end of file diff --git a/.claude/plans/alpha-reason-witness-shader-field-d-arw-0-audit-v1.md b/.claude/plans/alpha-reason-witness-shader-field-d-arw-0-audit-v1.md new file mode 100644 index 000000000..e08200a4f --- /dev/null +++ b/.claude/plans/alpha-reason-witness-shader-field-d-arw-0-audit-v1.md @@ -0,0 +1,418 @@ +# D-ARW-0 shader-field source audit v1 + +> **Status:** SOURCE AUDIT / PLAN-ONLY. No production wiring in this file. +> **Date:** 2026-08-30. +> **Owner:** #1078 `alpha-reason-witness-cognitive-fabric-v1` D-ARW-0. +> **Audited lance-graph baseline:** `main` at `de1d0c2fe54f36bf0d4d3f1393c55d0cea0c3ae9`. +> **Purpose:** recover the real current and historical wire underneath the operator-recalled `StreamDto → Resonance/Perturbation → P64/cognitive-shader-driver → CE64 → BusDto` field architecture before reconnecting anything. + +## 0. Evidence grades used here + +- **SOURCE FACT:** current executable/source establishes it. +- **HISTORICAL SOURCE FACT:** committed historical source/PR/doc establishes it. +- **OPERATOR-RECOVERED INTENT:** original design intent recalled by the operator, not independently recovered verbatim from source. +- **BROKEN WIRE:** both sides exist but the producer/carrier/consumer path drops, collapses, or changes identity. +- **UNPROVEN IDENTITY:** shapes are compatible but no source establishes that their addresses name the same locus. +- **MODERN DRIFT:** current implementation materially differs from the recovered original intent. +- **NUMERICAL COINCIDENCE:** same dimensions/number with no proven semantic identity. + +## 1. One-screen verdict + +The archaeology did **not** recover one pristine old pipeline. It recovered **two live halves separated by a missing address identity**: + +```text +CURRENT THINKING FIELD CURRENT P64 / CE64 FIELD + +StreamDto.codebook_indices CausalEdge64 + │ │ + ▼ ▼ +BindSpace rows edge_to_block(S/4,O/4) + │ │ + ▼ ▼ +PerturbationDto.energy[~4096] [[u64;64];8] topology planes + │ + X dense energy never crosses + │ + └─ top_k only + │ + ▼ + threshold + min..max + │ + ▼ + ColumnWindow + │ + ▼ + Vec passing rows + │ + ▼ + ShaderDriver + │ + ▼ + ShaderHits + │ + ▼ + CausalEdge64 emission +``` + +**BUY:** source archaeology and a read-only address-identity/sabotage probe. + +**HOLD:** production reconnection, EWA integration, R2IL field programming, Alpha lineage, or a new mask carrier until identity is proven. + +**NO BUY:** another DTO, another 4096 carrier, or a guessed `codebook_index ↔ P64 cell` conversion. + +## 2. Current DTO field is real + +`crates/thinking-engine/src/dto.rs` defines the current four-stage vocabulary: + +```text +Φ StreamDto sensor output enters the field +Ψ PerturbationDto ripple field, Vec energy, canonical size 4096 +B BusDto committed thought +Γ ThoughtStruct stabilized thought +``` + +`PerturbationDto::from_energy_f32` copies the energy slice and derives a top-8 by sorting indexed energies. + +The file explicitly records the mechanical rename: + +```text +ResonanceDto → PerturbationDto +``` + +while a distinct perspectival `ResonanceDto` remains in `awareness_dto.rs`. + +**Classification:** SOURCE FACT. + +Primary source: `crates/thinking-engine/src/dto.rs`. + +## 3. Source-proven broken seam: perturbation never reaches P64 + +`crates/cognitive-shader-driver/src/engine_bridge.rs` states that two DTO pipelines existed separately: + +```text +thinking-engine: StreamDto → PerturbationDto → BusDto → ThoughtStruct +cognitive-shader-driver: ShaderDispatch → ShaderResonance → ShaderBus → ShaderCrystal +``` + +The bridge currently does: + +```text +StreamDto.codebook_indices → BindSpace fingerprints +PerturbationDto.top_k → ShaderDispatch.rows +ShaderBus top hit → BusDto.codebook_index +``` + +The critical source comment is explicit: + +- `dispatch_from_top_k` is a **control-plane WINDOW heuristic, not a mask**; +- `{7,42,900}` becomes the dense window `7..901`; +- `PerturbationDto.energy` **never reaches this seam at all**; +- source itself names `energy[i] ↔ p64 (S/4 × O/4)` identity as **UNPROVEN**. + +**Classification:** BROKEN WIRE + UNPROVEN IDENTITY. + +Primary source: `crates/cognitive-shader-driver/src/engine_bridge.rs`. + +## 4. CE64 ↔ P64 is current source fact + +`crates/p64-bridge/src/lib.rs` currently implements: + +```text +CausalEdge64 + ↓ edge_to_block +row = S / 4 +col = O / 4 + ↓ +64 × 64 palette block +``` + +It also builds: + +- `[u64;64]` palette masks from edge batches; +- `[[u64;64];8]` predicate-layer planes from edge batches; +- style `layer_mask`, combine, contra and density parameters. + +The current `CognitiveShader` documentation distinguishes: + +```text +Mask WHICH pairs interact +Distance HOW FAR +Compose WHAT composition means +``` + +and states that the mask says **WHERE** to look. + +**Classification:** SOURCE FACT. + +This corrects the earlier weak reconstruction: CE64/P64 coupling is not merely historical. The missing wire is upstream address identity from perturbation/codebook space into this CE64/P64 locus. + +Primary source: `crates/p64-bridge/src/lib.rs`. + +## 5. Current shader is genuinely the driver, but row admission is not fully lithographic + +`crates/lance-graph-contract/src/cognitive_shader.rs` records the role reversal: + +```text +Before: thinking-engine drives, shader helper +Now: CognitiveShader drives, dispatches cycles, commits via sinks +``` + +Current `driver.rs` executes: + +```text +meta prefilter +→ style +→ P64/bgZ cascade +→ cycle signature +→ CausalEdge64 emission +→ FreeEnergy gate +→ sink +``` + +However `crates/cognitive-shader-driver/src/backing.rs::prefilter` returns a dense `Vec` of passing row indices. The payload fingerprints are borrowed zero-copy afterwards, but row admission itself is currently materialized as an index vector. + +**Classification:** SOURCE FACT + MODERN DRIFT relative to the operator-recalled mask/lithography rule. + +This is not permission to replace the Vec yet. First prove the address identity and a mask-native buyer. + +## 6. Current ThinkingEngine contradicts the recalled “never materialize the cognitive LUT” intent + +`crates/thinking-engine/src/engine.rs` says literally: + +```text +energy_next = distance_table × energy_current +The distance table is precomputed ONCE. +It IS the brain. +``` + +The canonical engine owns a `Vec` N×N distance table. For 4096 atoms that is a 4096² table, described as 16 MB / L3-resident, with row-sweep, VNNI and AMX tiling strategies. + +Therefore the operator-recalled architecture: + +> continuously process the resident/implicit field; do not materialize the giant cognitive LUT + +is **not** the current ThinkingEngine contract. + +**Classification:** OPERATOR-RECOVERED INTENT + MODERN DRIFT/CONFLICT. + +Do not rewrite history in either direction. Small hot lookup tables and precomputed scientific kernels may still be lawful; the unresolved question is whether the *global cognitive relation field* should be materialized N². + +Primary source: `crates/thinking-engine/src/engine.rs`. + +## 7. Current CE64 emission does not prove a 12-bit field-cell identity + +The current compare harness reproduces the real driver edge-emission recipe: + +```text +s_palette = row % 256 +o_palette = (row / 4) % 256 +p_palette = 0 +f,c = resonance +``` + +That emitted CE64 is later interpretable by `p64-bridge::edge_to_block` as `(S/4,O/4)`. + +This is a real current path, but it does **not** source-prove that a thinking-engine `codebook_index` is the same 12-bit coordinate as the resulting 64×64 P64 cell. `engine_bridge.rs` correctly fences that identity as unproven. + +Further, `edge_v3_compare.rs` proves the staged V3 can drop the duplicate in-edge SPO and resolve SPO from the target node CAM-PQ facet while preserving syllogistic thinking. + +**Classification:** SOURCE FACT for the emission recipe; UNPROVEN IDENTITY for codebook→P64; IMPORTANT FUTURE CONSTRAINT for “CE64 vertical mantissa.” + +Interpret “vertical mantissa” as recovered architecture intent, not a commitment that future V3 must physically retain three SPO bytes in the edge. + +Primary source: `crates/cognitive-shader-driver/src/edge_v3_compare.rs` plus `p64-bridge`. + +## 8. SPO 2³ exists in current machinery, but cache-amortization meaning is not recovered + +Current shader source contains Pearl/SPO 3-bit projection masks and precomputed NARS tables. The driver documents `Pearl 2³ + DK + Plasticity + Truth` lookup, and `RungLevel::causal_mask_bits()` maps current Pearl readings onto O / PO / SPO masks. + +That proves **SPO 2³ is a live computational vocabulary**. + +It does **not** independently prove the operator-recalled original meaning: + +> CE64 as vertical mantissa informed by SPO 2³, amortized as eight cheap readings/cycles over L1-resident state. + +**Classification:** SOURCE FACT for current 2³ projection; OPERATOR-RECOVERED INTENT for the 8-cycle/L1 amortization rationale. + +## 9. Morton cascade is real and immaterialized; top-k ownership is unproven + +`AdaWorldAPI/OGAR/docs/DISCOVERY-MAP.md` records: + +```text +64 → 256 → 1024 → 4096 → 16k → 64k → 256k +``` + +as an **immaterialized Morton enumeration**, one extra nibble per level, and separately states that the cascade is a coordinate transform rather than a stored grid. + +No current producer→consumer trace found in this audit establishes that `PerturbationDto.top_k` chooses among those cascade levels. + +**Classification:** HISTORICAL SOURCE FACT for the cascade; UNPROVEN IDENTITY for `top_k = Morton aperture selector`. + +Falsifier remains F-ARW-SHADER-2: if no shared owner/path is recovered, record only compatible geometry. + +## 10. Resonance → Perturbation rename is source-backed + +Merged lance-graph PR #1043 records `ResonanceDto` as `REPURPOSE → PerturbationDto`, with migrated code and stale plans. Current `dto.rs` preserves a deprecated alias and explains the mechanical vs perspectival name split. + +**Classification:** HISTORICAL SOURCE FACT confirmed by current source. + +## 11. Stockfish-rs has the two roles the operator recalled + +### 11.1 Systems/geometry oracle + +`stockfish-harvest-64x64-v1.md` explicitly starts from: + +- chess-native `64×64 = 4096` from×to address space; +- incremental NNUE make/unmake updates; +- Stockfish C++ as oracle + harvest source, never runtime dependency; +- leaf-by-leaf parity against real Stockfish. + +It explicitly relates NNUE incremental accumulation to perturbation incrementality. + +### 11.2 Expert-iteration oracle + +Merged stockfish-rs PR #12 defines the teacher-stream hypothesis: + +```text +Strict-time policy proposes/ranks +→ Retro deep search supplies hindsight labels +→ repeated cycles distil later search into faster present response +``` + +Its golden probe measured stable exact teacher labels, policy headroom and oracle-order node reduction; the named downstream path is NARS revision → selector/policy → held-out replay. + +**Classification:** HISTORICAL SOURCE FACT for both roles. + +Stockfish remains a systems/reference teacher and learning oracle. It is **not** evidence that Stockfish itself uses Morton hierarchy. + +## 12. Alpha lineage remains unresolved because “Alpha” names different current mechanisms + +Current lance-graph shader code has a live `AlphaComposite` / front-to-back merge over shader hits and qualia. + +MedCare separately has the same-address thin-provisioned `AlphaOverlay` attention/residual plane audited in the parent plan. + +Those are not the same carrier by name alone, and no source trace in D-ARW-0 establishes: + +```text +Resonance/Perturbation → AlphaOverlay +``` + +or proves that shader `AlphaComposite` is the successor of the old perturbation field. + +**Classification:** SOURCE FACT for both mechanisms; lineage UNPROVEN. + +F-ARW-SHADER-4 remains active. + +## 13. AttentionMaskSoA is another mask meaning, not the P64 plane + +Current `cognitive-shader-driver/src/attention_mask.rs` stores flat `(mailbox_id,w_slot)` attention entries with activity, cycle and residual plus LRU eviction. + +It is not the P64 `[u64;64]` topology mask and not MedCare's base-ordinal AlphaMask. + +**Classification:** SOURCE FACT; vocabulary collision to preserve, not collapse. + +## 14. Reconstructed intent, kept explicitly non-canonical + +The operator-recovered original picture is recorded because it guides archaeology, but none of these phrases are promoted to current contract without source/probe evidence: + +```text +StreamDto incoming perturbations / continuously thinking stream +Resonance/Perturbation EWA-like active field, not truth +Morton cascade variable immaterialized aperture +mask lithography: selected substrate IS the work surface +P64 bounded hot field ALU +CE64 vertical semantic/causal mantissa at an active locus +SPO 2³ eight amortized readings over resident state +R2IL/loco cognitive shader program +Alpha residual / reversible working history +Revision/Rubicon authority and durable writeback +Stockfish systems geometry teacher + expert-iteration oracle +``` + +The audit supports several descendants of that picture, but not the missing shared address identity. + +## 15. D-ARW-0 classification table + +| Relation | Verdict | +|---|---| +| `StreamDto → BindSpace` | SOURCE FACT | +| `PerturbationDto.energy[4096]` exists | SOURCE FACT | +| `PerturbationDto.energy → P64 mask` | BROKEN WIRE | +| `PerturbationDto.top_k → sparse mask` | BROKEN WIRE; currently dense `min..max` window | +| `CausalEdge64 → P64 64×64 block` | SOURCE FACT | +| P64 mask = “WHERE” topology | SOURCE FACT | +| shader driver owns dispatch loop | SOURCE FACT | +| shader row admission fully mask-native | FALSE today; `Vec` prefilter | +| 4096² global distance LUT materialized | SOURCE FACT | +| never-materialize-global-cognitive-LUT | OPERATOR-RECOVERED INTENT, conflicts with current ThinkingEngine | +| `ResonanceDto → PerturbationDto` | HISTORICAL SOURCE FACT + current alias | +| Morton 64→…→256k immaterialized cascade | HISTORICAL SOURCE FACT | +| `top_k` chooses Morton cascade level | UNPROVEN | +| CE64 “vertical mantissa” | OPERATOR-RECOVERED INTENT, partially echoed by CE64→P64 but not current contract | +| SPO 2³ current mask/projection | SOURCE FACT | +| SPO 2³ = eight-cycle L1 amortization rationale | OPERATOR-RECOVERED INTENT | +| Alpha = continuation of Resonance/Perturbation | UNPROVEN | +| Stockfish 64×64 + incremental systems teacher | HISTORICAL SOURCE FACT | +| Stockfish expert-iteration oracle | HISTORICAL SOURCE FACT | + +## 16. Smallest next executable probe: ADDRESS-IDENTITY, not architecture + +Do this in a separate bounded probe PR, not production code and not inside #1078's plan branch. + +### A. Address reading arms + +For a corpus of **independently grounded relations** that can be represented both as a codebook/field input and as a canonical CE64/V3 target relation, record without changing production: + +```text +A0 current bridge row/codebook index +A1 current CE64 emission recipe → p64 edge_to_block +A2 row-major 12-bit → 6+6 candidate reading +A3 Morton 12-bit → 6+6 candidate reading +A4 seeded random permutation sabotage +``` + +Do not select a winner from internal self-consistency. The oracle must be an independently grounded relation/address source. + +### B. Sparse-work arm + +For the same active sets, compare work cardinality only: + +```text +current top_k → min..max ColumnWindow +vs +exact sparse bitmask over the SAME proven address identity +``` + +This is a measurement arm, not a production mask proposal. + +### C. Required falsifiers + +1. **Permutation sabotage:** if random permutation does not damage the locality-sensitive metric, Morton is decorative for this buyer. +2. **Identity mismatch:** if no candidate mapping reproduces independently grounded relation identity, STOP. Do not reconnect Perturbation to P64. +3. **Sparse silence:** if exact sparse selection does not reduce meaningful work or changes semantics, NO BUY for mask lowering here. +4. **No authority:** none of these field/layout measurements may change evidence, ReasoningBand, Revision or Rubicon semantics. + +### D. Gate before EWA/R2IL + +Only after one address reading survives the independent oracle and sabotage should a second probe test: + +```text +same masked field +→ one existing local P64/EWA-shaped primitive +→ one existing R2IL/loco composition +→ same typed result/receipt +``` + +Until then EWA, R2IL and Alpha are consumers waiting on a coordinate contract, not evidence for one. + +## 17. D-ARW-0 verdict + +**PARTIAL BUY / RESTORATION HOLD.** + +The source establishes a real field lineage, a real current CE64→P64 topology path, a real mechanical perturbation field, a real shader-driver role reversal, an immaterialized Morton cascade, and Stockfish's dual systems/teacher role. + +The source also establishes the break: + +> **the perturbation field never reached the mask ALU, sparse top-k collapses to a bounding window, and current code does not establish that a 4096 perturbation/codebook index names the same locus as the CE64/P64 64×64 cell.** + +That missing identity is now the only honest first question. No representation is bought before it answers. \ No newline at end of file diff --git a/.claude/plans/alpha-reason-witness-shader-field-lineage-addendum-v1.md b/.claude/plans/alpha-reason-witness-shader-field-lineage-addendum-v1.md new file mode 100644 index 000000000..84908813b --- /dev/null +++ b/.claude/plans/alpha-reason-witness-shader-field-lineage-addendum-v1.md @@ -0,0 +1,461 @@ +# alpha-reason-witness cognitive fabric — shader-field lineage addendum v1 + +> **Status:** ADDENDUM TO #1078 / PLAN ONLY. No production implementation. +> **Date:** 2026-08-30. +> **Owner plan:** `.claude/plans/alpha-reason-witness-cognitive-fabric-v1.md`. +> **Scope:** Recover, falsify, and if supported reconnect the historical cognitive-field / shader ancestry before inventing another cognition carrier. +> +> **Evidence discipline:** `SOURCE FACT` means current or historical source/PR text directly establishes the statement. `OPERATOR-RECALLED HYPOTHESIS` means the design intent was recalled in-session but has not yet been recovered verbatim from committed source. `TRANSFER HYPOTHESIS` means an algorithmic analogy that must win a probe before it can influence architecture. + +--- + +## A0. Why this addendum exists + +The #1078 discussion exposed a plausible older architecture hiding underneath several currently-disconnected surfaces: + +```text +large graph / token / observation stream + │ + ▼ +StreamDto + │ + ▼ +ResonanceDto → PerturbationDto + field energy / salience / top-k aperture + │ + ▼ +P64 / cognitive-shader-driver + mask-native bounded working field + │ + ▼ +CausalEdge64 at active loci + semantic / causal / epistemic carrier + │ + ▼ +BusDto + projection across the execution membrane +``` + +This shape is **not canon yet**. The purpose of this addendum is to recover whether it was the actual intended architecture, identify exactly where the wire broke, and reuse only what survives source-first falsification. + +The critical reconstruction question is: + +> **Was the cognitive field intended to be a horizontal address/salience plane, with `CausalEdge64` as the vertical semantic/causal carrier at each active locus, while P64/cognitive-shader-driver applied bounded field operations and `BusDto` projected the result?** + +--- + +## A1. SOURCE FACTS already recovered + +### A1.1 The DTO seam is currently broken, not an ALU chain + +Merged lance-graph PR #1051 audited `StreamDto` / `PerturbationDto` / `BusDto` and found the current path is transport/projection rather than a field-ALU chain: + +```text +StreamDto.codebook_indices → ingest → BindSpace +PerturbationDto.energy: Vec → dropped / unconsumed +PerturbationDto.top_k + → threshold filter + → min(index)..=max(index) + → ColumnWindow // bounding window, not field mask +ShaderBus → BusDto → dispatch_busdto + → Binary16K + qualia +``` + +The same audit established that P64 is the mask surface (`[u64;64]` / `[[u64;64];8]`, style masks/combine/contra) while remaining DTO-blind. + +**Interpretation allowed:** the field producer and the mask ALU both exist but are not connected today. + +**Interpretation forbidden:** claiming the exact historical intended connection before the archaeology below runs. + +### A1.2 The 4096 relation is explicitly recorded as a broken wire + +PR #1051 records: + +- 64×64 field; +- COCA 4096 codebook LUT; +- 12-bit `6+6` address reading; +- SPO `2³` amortization at the same address; +- CE64 v2 bits 0..23 as the surviving `3×8` SPO fossil; +- no surviving `codebook_id ↔ (row,col)` mapping today; +- P64's modern role as a **≤4096 active-relation working-set ALU**, not the global lexicon. + +This is evidence that `4096` is not merely a recent cache-size coincidence. + +### A1.3 `ResonanceDto → PerturbationDto` is a real supersession + +The generated supersession audit in PR #1043 records `ResonanceDto` as **REPURPOSE → `PerturbationDto`**. The older resonance vocabulary therefore belongs to the lineage and should be searched when reconstructing the field semantics. + +### A1.4 The Morton cascade is a variable aperture, not one fixed table + +The committed OGAR discovery-map lineage records: + +```text +64 → 256 → 1024 → 4096 → 16k → 64k → 256k +``` + +as an **immaterialized Morton enumeration**, one additional nibble per level. + +This addendum treats the cascade as **address/workload geometry**, not ontology and not cognitive rung. + +### A1.5 Stockfish-rs supplies a reference operational grammar, not Morton evidence + +`stockfish-rs/.claude/plans/stockfish-harvest-64x64-v1.md` establishes 64×64 = 4096 as chess's intrinsic `from × to` move-address surface and explicitly builds around incremental make/unmake rather than whole-state recomputation. + +`stockfish-rs/.claude/knowledge/stockfish-pext-morton-adjacency.md` establishes a transferable low-level pattern: + +```text +gather (PEXT or fallback) + → small dense lookup / local compute + → scatter (PDEP or fallback) +``` + +while explicitly fencing that Stockfish itself has **no Morton/Z-order hierarchy, no inverse pyramid, no comma quorum**. The transfer is operational discipline, not historical proof of the lance-graph cascade. + +--- + +## A2. OPERATOR-RECALLED HYPOTHESIS — CE64 as the vertical mantissa + +The operator recalls the intended geometry as: + +> **`CausalEdge64` was the vertical mantissa in the StreamDto / ResonanceDto→PerturbationDto / BusDto cognitive-field path.** + +No current source hit recovered in this session literally says “vertical mantissa.” Therefore this remains a **named hypothesis to recover or refute**, not a SOURCE FACT. + +The candidate geometry is: + +```text + cognitive field + + horizontal address / activity + Morton / active-set coordinates + x,y + │ + │ active locus + ▼ + CausalEdge64 + vertical mantissa + ┌────────────────────────────┐ + │ SPO relation reading │ + │ inference / truth │ + │ witness │ + │ causal topology │ + │ ReasoningBand │ + └────────────────────────────┘ +``` + +Under this hypothesis the axes answer different questions: + +```text +ADDRESS / Morton position where is the active relation? +RESONANCE / PERTURBATION how salient / energetic is it now? +MASK / ClassView which loci / reading participate? +TOP-K / CASCADE APERTURE how wide is the active working set? +CE64 what semantic/causal relation is carried there? +SHADER / ATOM what transformation is applied to the selected field? +BUS what projection crosses the execution membrane? +``` + +### A2.1 Falsifier + +**F-ARW-SHADER-1:** search historical/current source, plans, comments, and actual DTO producers/consumers for the relationship between field address, perturbation/resonance value, P64 masks, CE64, and Bus projection. + +The hypothesis is rejected or narrowed if: + +- CE64 was only a downstream result unrelated to each active field locus; +- the field carried another semantic payload with no CE64 correspondence; +- `BusDto` owned reasoning semantics rather than projection; +- the DTO lineage cannot establish a common field identity at all. + +Do not “repair” history to make the diagram true. + +--- + +## A3. The cascade hypothesis — 4096 as tactical aperture, not ceiling + +SOURCE FACT: the cascade lineage contains 64/256/1024/4096/16k/64k/256k and P64 is described today as a ≤4096 active-relation ALU. + +TRANSFER HYPOTHESIS: + +> **4096 was / should be treated as the tactical sweet spot of a variable-aperture cognitive renderer rather than the size of cognition itself.** + +Candidate operational reading, deliberately non-canonical: + +```text +64 very sparse aperture +256 widened local aperture +1k neighbourhood aperture +4k hot tactical field / P64 sweet spot +16k wider ambiguity/search +64k broad exploration +256k exceptional/global aperture +``` + +The labels above are illustrative only. The measurable claim is simply that **aperture can widen/narrow without changing semantic identity or requiring a new representation**. + +### A3.1 Top-k archaeology + +Trace whether any historical `top_k`, resonance threshold, perturbation selector, or P64 path actually selected among these cascade levels. + +**F-ARW-SHADER-2:** if the ladder and `top_k` never shared a producer/consumer path, do not call the cascade a historical top-k aperture. Record only that they are compatible geometries. + +--- + +## A4. `cognitive-shader-driver` ancestry hypothesis + +The literal-name hypothesis to test is: + +```text +lance-graph / world state + ↓ +ClassView / horizon / stream projection + ↓ +resonance / perturbation / Alpha field + ↓ +bounded active mask plane (P64) + ↓ +local shader / atom / program + ↓ +Bus projection + ↓ +receipt / Revision / persistence +``` + +This would make `cognitive-shader-driver` analogous to a renderer driver: + +| Graphics concept | Candidate cognition analogue | +|---|---| +| scene | lance-graph epistemic graph | +| view/camera | ClassView / horizon / perspective | +| framebuffer / working plane | resonance / perturbation / Alpha / P64 surface | +| stencil/mask | attention / focus masks | +| shader | Frozen atom / loco-R2IL composition | +| local tile | 2×2 / 4×4 gathered neighbourhood | +| render pass | one bounded cognitive pass | +| history/depth | temporal + premise/Tarski/witness ancestry | +| commit | Revision / Rubicon | + +This table is a **reconstruction aid**, not proof. + +**F-ARW-SHADER-3:** historical source must establish at least two independent load-bearing correspondences beyond naming before this lineage is promoted from metaphor to architecture finding. + +--- + +## A5. Stockfish 64×64 as reference design + +Use stockfish-rs as a **control/reference implementation philosophy** for the 4096 field: + +```text +exact compact address space ++ bounded active set ++ mask-native selection ++ incremental perturbation/update ++ gather → local compute → scatter ++ cheap route / exact verify ++ CPU-family-specific fast path with measured fallback +``` + +Do not import chess semantics into cognition. + +### A5.1 Reference questions + +For a candidate cognitive-field implementation ask: + +1. Are both 64 axes meaningful, or is 64×64 merely a packing trick? +2. Can one change update only the affected cells/columns? +3. Can masks select an irregular neighbourhood without expanding to a bounding window? +4. Can the local operation run densely after gather and scatter back exactly? +5. Is coarse routing separated from exact semantic verification? +6. Does a random/permuted address sabotage locality while preserving cardinality? + +If the answer to (6) is “no change,” the spatial/cascade hypothesis is likely decorative. + +--- + +## A6. Fingerprint/OCR × EWA research arm + +This is a **TRANSFER HYPOTHESIS / algorithm-search arm**, not architecture yet. + +Fingerprints are attractive because they expose simultaneously: + +- local directional structure; +- smooth field continuation; +- noise/gaps; +- curvature; +- sparse topological events such as endings and bifurcations. + +Candidate atomic measurement: + +```text +J = [ Σ Ix² Σ IxIy + Σ IxIy Σ Iy² ] +``` + +A 2×2 structure/orientation tensor yields local orientation, anisotropy/coherence and energy. EWA uses the same class of covariance geometry: + +```text +Σ' = M Σ Mᵀ +``` + +The research question is therefore not “use fingerprint recognition for cognition.” It is: + +> **Can one hardened 2×2 covariance/local-field primitive buy useful work in both degraded-text/fingerprint structure and EWA/Alpha field propagation without changing its mathematics?** + +### A6.1 Morton/inverse-pyramid test geometry + +Candidate decomposition over a 64×64 field: + +```text +64×64 field + ↓ gather a Morton-local 4×4 tile +4×4 dense neighbourhood + ↓ decompose/refine +2×2 atomic neighbourhood + ↓ tensor / covariance / mask / LUT +updated local state + ↓ scatter +same 64×64 field +``` + +The inverse pyramid is an **addressing/decomposition hierarchy over one field**, not a requirement to materialize every resolution. + +### A6.2 Three-domain falsifier + +Use the same physical primitive across: + +```text +A. Stockfish-style 64×64 control/reference + intrinsic compact field + incremental updates + +B. fingerprint / OCR field + ridge/stroke orientation, curvature, gaps, bifurcations + +C. Alpha / EWA cognitive field + attention, residual, contradiction/tension geometry +``` + +Compare: + +- row-major address; +- Morton address; +- random permutation sabotage; +- full recomputation; +- incremental local update; +- 2×2 vs 4×4 neighbourhoods. + +Required outcomes: + +- **can-fire:** lawful locality/operator choice improves a named metric; +- **can-stay-silent:** irrelevant/local-noise change does not provoke global state; +- **sabotage:** random permutation must damage locality-sensitive performance if locality is actually doing work. + +If only the imaging arm wins, the result is an imaging atom. If cognition alone wins, the fingerprint analogy was decorative. If the same primitive wins both, it becomes a strong Frozen-atom candidate. + +--- + +## A7. Alpha is the modern candidate field plane, but this must be proven + +The parent #1078 plan already treats Alpha as thin-provisioned, same-address, ephemeral cognition and forbids confusing it with persistent truth. + +The lineage hypothesis is: + +```text +ResonanceDto + ↓ historical semantic evolution +PerturbationDto + ↓ field mechanics +Alpha / attention plane +``` + +This is **not SOURCE FACT** merely because the concepts rhyme. + +Trace whether Alpha actually inherited any of: + +- address identity; +- sparse activation semantics; +- energy/residual semantics; +- mask composition; +- top-k / aperture semantics; +- producer/consumer ownership. + +**F-ARW-SHADER-4:** if no source lineage exists, keep Resonance/Perturbation and Alpha as separate mechanisms even if a future integration can lawfully compose them. + +--- + +## A8. Critical separation: field geometry must not mint epistemic authority + +Even if the shader lineage is recovered, the following remain constitutional: + +```text +2×2 tensor / EWA Σ = geometry +resonance / perturbation = salience / field activity +Alpha = reversible working state +Morton / top-k = address / workload aperture +CE64 = semantic/causal carrier +Witness / Tarski = grounding / derivational ancestry +Revision = epistemic writeback decision +Rubicon = durable action / commit boundary +``` + +Therefore: + +- high field energy is not evidence; +- low Shannon H is not evidence; +- high covariance coherence is not truth; +- a local residual is not a contradiction receipt by itself; +- widening top-k is not promotion; +- a shader transformation cannot manufacture an observation; +- CE64 band/topology changes require their own lawful warrant. + +The field may **steer cognition**. Revision decides what survives. + +--- + +## A9. Integration into #1078 deliverables + +This addendum does **not** mint a parallel D-id family. It sharpens existing #1078 work: + +- **D-ARW-0:** include `StreamDto → ResonanceDto/PerturbationDto → P64/cognitive-shader-driver → CE64 → BusDto` historical/current producer-consumer trace, graded SOURCE FACT / PLAN FACT / HYPOTHESIS. +- **D-ARW-1:** test whether Alpha is the modern field-plane continuation or only a composable sibling mechanism. +- **D-ARW-4:** add address/aperture/field-geometry non-equivalence tests to the orthogonal-coordinate matrix. +- **D-ARW-5:** include local mask/gather/scatter, tensor/covariance, and top-k/cascade operations in the existing atom/loco/R2IL reuse census before adding primitives. +- **D-ARW-6:** the first end-to-end proof may use the recovered field path only if D-ARW-0 establishes its identity; otherwise use the smallest current Alpha path and leave historical restoration separate. +- **D-ARW-8:** fingerprint/OCR and stockfish-rs may serve as algorithmic falsifier/reference arms, but they do **not** count as second cognitive-domain buyers unless they exercise the same cognitive contract rather than merely the same math. + +--- + +## A10. STOP rules added by this addendum + +1. Do not claim “CE64 is the vertical mantissa” as current contract until source archaeology recovers the relation or a new measured integration explicitly establishes it. +2. Do not equate `top_k` with the Morton cascade merely because both expose powers-of-four scales. +3. Do not call Stockfish a Morton/inverse-pyramid ancestor; it is an operational reference for compact fields, incremental updates, masks, gather/lookup/scatter and exact verification. +4. Do not turn fingerprint orientation tensors into a cognitive truth model. +5. Do not store EWA covariance in CE64 merely because CE64 is the candidate vertical semantic carrier. +6. Do not materialize every cascade level. The hypothesis is an immaterialized address/aperture grammar. +7. Do not widen the field when a sparse mask or local incremental update can answer the question. +8. Do not invent a new DTO to reconnect the seam until the surviving `StreamDto`, `PerturbationDto`, P64, Alpha, CE64, and `BusDto` surfaces are shown insufficient. + +--- + +## A11. Smallest useful verdict + +The archaeology is a BUY if it can establish a real path equivalent to: + +```text +stream / observation + ↓ +field activation at stable address + ↓ +mask-native bounded aperture + ↓ +CE64-backed semantic relation at the active locus + ↓ +local reusable shader atom/program + ↓ +typed result / receipt + ↓ +Revision / replay +``` + +It is a NO-BUY if the old names describe unrelated mechanisms and reconnecting them requires more invention than deleting the historical analogy. + +The aim is not nostalgia. The aim is to determine whether several “new” integration problems are actually one old wire that was cut.