Captain Bob, 2026-11-12: "Wire L2, keep L7 on". The table held the 128 cards of the 7-bit L1-L7 space; nothing read L7, and the rolling window recorded whatever the card said, so the 128 were 32 behaviours. - compudynamics.c: cd_tuning_word() sizes the table to 64 (L1-L6). - ssm_jacquard.c: card_bits() makes a card's 7-bit mask, L7 set, where a card is read, seeded and started (C4: 17 -> card 8); ssm_l8_force_config() still takes the 7-bit index, its L7 bit implied. - physics_execution_hooks.c, kernel vm_core.c: the rolling window records only while L2 is on (or before there is a config). - ssm_jacquard.h says what is wired, bit by bit (it said L7 was); v3/CLAUDE.md and the L8 reference corrected in place; FABRIC-3 XLVIII.21. Tests first, seen to fail against HEAD (logs/20261112-210510/kernel-tests): test_ssm_jacquard 4 of 7, test_physics_l2 1 of 4; all pass now. v4 reads no rolling window: acceptance is unchanged; the protocol runs next. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
46 lines
2.2 KiB
Markdown
46 lines
2.2 KiB
Markdown
# v3/CLAUDE.md -- loaded when working under v3/ (moved from .claude/CLAUDE.md, 2026-11-06)
|
||
|
||
## Physics-Driven Adaptive Runtime
|
||
|
||
Uses thermodynamic metaphors as modeling language (see `ONTOLOGY.md`):
|
||
|
||
1. **Loop #1 — Execution Heat** (`dictionary_heat_optimization.c`) — frequency counter per word
|
||
2. **Loop #2 — Rolling Window** (`rolling_window_of_truth.c`) — circular buffer, execution history
|
||
3. **Loop #3 — Linear Decay** — quiescent words lose heat over time
|
||
4. **Loop #4 — Pipelining** (`physics_pipelining_metrics.c`) — word-to-word transition prediction
|
||
5. **Loop #5 — Window Width Inference** (`inference_engine.c`) — Levene's test, binary chop
|
||
6. **Loop #6 — Decay Slope Inference** (`inference_engine.c`) — exponential regression
|
||
7. **Loop #7 — Adaptive Heartrate** (`HeartbeatState`) — background tick coordinator
|
||
|
||
**L8 Jacquard Mode Selector** (`ssm_jacquard.c`) — a 64-card loop-gate selector: L1–L6, with L7
|
||
permanently on (corrected 2026-11-12, #188 -- this said "a 128-state, 7-bit" selector; the cards
|
||
differing only in L7 or the then-unwired L2 acted alike).
|
||
In this repo it now has a real per-VM heat channel into fleet-wide tuning (VM Fleet
|
||
Attractor physics — see `docs/working/architecture/VM-FLEET-ATTRACTOR-DESIGN-20260705.md`),
|
||
replacing hardcoded compudynamics constants with a dynamically-inferred rate.
|
||
|
||
## Critical Implementation Details
|
||
|
||
### DoE CSV Output Suppression
|
||
|
||
Intentionally suppressed as of 2025-12-08. See `v3/src/main.c:390-396`:
|
||
- Metrics still collected via `metrics_from_vm()`
|
||
- CSV row was redundant with internal VM metrics
|
||
- To re-enable: add a `--csv-export` flag or write to a file
|
||
|
||
### Heartbeat Instrumentation (Planned)
|
||
|
||
`HeartbeatTickSnapshot` and `tick_buffer` are declared in `v3/include/vm.h`,
|
||
but `heartbeat_export_csv()` is **not yet implemented**.
|
||
|
||
### Word Statistics Output
|
||
|
||
`WORD-ENTROPY` prints execution heat statistics to stdout. Kept enabled in DoE mode
|
||
intentionally (diagnostic value outweighs noise cost).
|
||
|
||
### StarKernel M7 Parity
|
||
|
||
`parity.c` logs every VM birth and execution with: VM ID, capsule hash, dictionary hash.
|
||
This enables offline determinism verification — an independent system can load the same
|
||
capsule and compare dict hashes. Zero-deviation means 0% algorithmic variance.
|