docs/plans: apply Anja's partial review (PR #8) to A1–A4

- A3 PS+: no aggregate sum, sensates sent RAW to the agent before tool listing;
  friction removed; is_logical=FALSE reframed as the SOURCE of power (illogic =
  why they rule the flesh), not a deficiency; priors derived from the outer
  BERT's frequent memory themes tied to taste/smell/sound + location.
- A4 endomotiv: drop friction/contradictory-pairs (chemistry carryover);
  channels are independent modulators; sensates describe & convince, only the
  agent decides.
- A2 Energy: not "finitude" (no depletion-unto-death); per-tool energy cost +
  per-tool lockout scale replaces the global threshold.
- A1 hub: evaluate/approve model flagged inaccurate (agent decides, drivers
  describe/convince + price); hub language to reassess; consider Fortran/C for
  the R<->Ada bridge.

https://claude.ai/code/session_015hmgREHNsxYCuim33yUF2c
This commit is contained in:
Claude 2026-06-17 00:25:40 +00:00
parent 20e99f434c
commit 28751bc8e0
No known key found for this signature in database
4 changed files with 103 additions and 89 deletions

View File

@ -7,44 +7,47 @@ snapshot the inference cycle pulls at step 2.
## 2. Status / certainty
Structure WORKING (`drive_box.R`, 158 L). Aggregation logic C3; the numbers inside the drivers
are disowned (see each driver spec).
are disowned (see each driver spec). **The evaluate/commit model below is flagged inaccurate — §7.**
## 3. Language & location
R · `src/endocrine/drive_box.R` (sources the drivers + `endocrine_array.R` + `priors.R`).
**[TO REASSESS — Anja]:** the hub's language/location is *not settled*; R is current but under review.
## 4. Does / does-not
- **Does:** init the whole box; produce `drive_snapshot()` (affect + cost terrain, read-only);
run a proposed action through all drivers (`drive_box_evaluate`); apply feedback (`drive_box_commit`);
assemble the `drive_box_input_slot()` injection block.
- **Does-not:** decide (PS+ emits arguments, not verdicts); route or police (Ada D1); persist (storage E*).
- **Does:** init the whole box; produce `drive_snapshot()` (raw sensate field + per-tool cost terrain,
read-only); assemble the `drive_box_input_slot()` injection block surfaced to the agent.
- **Does-not:** **decide** — the drivers *describe, convince, and price*; only the **agent** decides.
It does not route or police (Ada D1) or persist (storage E*).
## 5. Interface contract
- `init_drive_box() -> state{ energy, ps_plus, principles, etr }`.
- `drive_snapshot(state) -> { e_level, tool_locked, existential_load, arguments[], etr_coord, etr_status }`
— this is exactly what Ada (D1) admits to the Brain at cycle step 2 (content #1).
- `drive_box_evaluate(state, action{tags,alignment,base_cost,is_tool_call}) -> { approved, costs, reasons }`.
- `drive_box_commit(state, action, approved) -> state'` (consumes E, hardens conviction).
- `drive_snapshot(state) -> { e_level, raw_sensates[30], arguments[], per_tool_costs, etr_coord, etr_status }`
— surfaced to the agent (sensates passed **before tool listing**, A3); raw, **never summed**.
- `drive_box_commit(state, chosen_action) -> state'` — applies the chosen tool's energy cost + conviction effects.
- `drive_box_input_slot(state) -> text block` (drivers + tarot lenses + SOUL.md, assembled concurrently).
- **[FLAGGED inaccurate — Anja]:** the old `drive_box_evaluate(action) -> {approved,…}` approve-gate is
**wrong** — the box doesn't approve actions. To be reworked into "surface terrain → agent decides → commit."
## 6. Dependencies & stubs
A2/A3/A6/A8 drivers — *stub:* each `init_*` + its evaluator returning canned values; A1 wiring
testable with stub drivers. Tarot (B1) for the input-slot lenses — *stub:* identity (no lens).
A2/A3/A6/A8 drivers — *stub:* each `init_*` returning canned values; A1 wiring testable with stubs.
Tarot (B1) for the input-slot lenses — *stub:* identity (no lens).
## 7. Invariants / laws
- **L1 (C4):** the slot is a **hub** — all drivers + tarot + SOUL write concurrently, no driver
subordinated to another.
- **L1 (C4):** the slot is a **hub** — all drivers + tarot + SOUL write concurrently, none subordinated.
- **L2 (C4):** `drive_snapshot` is **read-only** (no driver state mutates on a snapshot).
- **L3 (C3):** evaluate order is PS+ → Eth-Int → Energy → ETR; commit only on approval.
- **L3 (FLAGGED — inaccurate per Anja):** there is **no serial PS+→Eth-Int→Energy→ETR evaluate/approve
pipeline**. Only the **agent decides**; drivers describe/convince + price. The evaluate/commit model
is to be reworked.
## 8. Build steps
1. Freeze the snapshot + slot contracts (§5) as tests in `test_drive_box.R` (already ~117 L — extend).
2. Keep wiring; replace each driver's disowned constants as those specs land (A2/A3/A6/A8).
3. Add the R↔Ada bridge later (how `drive_snapshot` reaches `ada_medium` step 2) — see C3 / D2.
1. **Rework the decision model** (drivers surface terrain → agent decides → commit) before freezing contracts.
2. Freeze the corrected snapshot/slot contracts (§5) as tests in `test_drive_box.R`.
3. Add the R↔Ada bridge later — see C3 / D2 and §10.
## 9. Tests
`bash src/endocrine/run_tests.sh` (runs `test_drive_box.R` + driver tests). All must stay green as
driver numbers are refit.
`bash src/endocrine/run_tests.sh` (runs `test_drive_box.R` + driver tests). Update once the decision model is reworked.
## 10. Open items
- R↔Ada/medium bridge transport (C1/C3/D2).
- Whether the input-slot text format is final (tarot lens injection shape depends on B1).
- **Decision-model rework** (agent-decides, not box-approves).
- R↔Ada/medium bridge transport — **consider Fortran or C** for it (Anja) (C1/C3/D2).
- Hub language/location reassessment (Anja). Input-slot text format depends on B1.

View File

@ -1,48 +1,50 @@
# A2 — Energy (E) driver
## 1. Component
Driver 1: the master constraint. Finitude that gives choice weight + rest/restoration. Gates
liveness, locks tools under threshold, applies nonlinear cost drag.
Driver 1: the master constraint — an **in-the-moment activation / rest budget** (not "finitude" anymore;
with depletion-unto-death dropped, it isn't finitude). Gates tool use and prices actions.
## 2. Status / certainty
Structure WORKING (`driver_energy.R`, 79 L) but **numbers DISOWNED** (body §5) **and the model
is being RECONCEIVED** (body §4): drop *depletion-unto-death*; no unrecoverable state.
Structure WORKING (`driver_energy.R`, 79 L) but **numbers DISOWNED** (body §5) **and RECONCEIVED**
(body §4): drop *depletion-unto-death*; no unrecoverable state.
## 3. Language & location
R · `src/endocrine/driver_energy.R` (+ `test_energy.R`).
## 4. Does / does-not
- **Does:** report E level; gate tool calls (tool-lock = "present to fewer things," a breaker);
fold cost (PS+ load + Eth-Int penalty) into an affordability check; consume/restore.
- **Does-not:** die. The old `is_alive()==0` hard-death is removed — E is the **rest** counterpart
to ETR's **relief**; floor is rest, not death.
- **Does:** report E level; price each tool (**per-tool cost + per-tool lockout scale**, §5); gate when a
tool's lockout trips; consume on the chosen action; restore.
- **Does-not:** die. The old `is_alive()==0` hard-death is removed — E is the **rest** counterpart to
ETR's **relief**; floor is rest, not death.
## 5. Interface contract
- `init_energy_state(current=100,max=100,tool_lock_threshold=?) -> e`.
- `is_tool_locked(e) -> bool` · `get_cost_multiplier(e) -> num` ·
`evaluate_tool_cost(e, ps_load, eth_penalty) -> cost` (asymmetric: eth scales harder than PS+) ·
`request_execution(e, base_cost, is_tool_call) -> {approved, reason, true_cost}` ·
`consume(e, amt) -> e'` · `recharge(e, amt) -> e'`.
- `init_energy_state(current=100, max=100) -> e`.
- **Per-tool economy (Anja):** each tool carries **its own energy cost AND its own lockout scale** — an
arbitrary function of cost `c`, e.g. one tool `c×2`, another `((c²³)×3)/π`. So:
`tool_cost(e, tool) -> num` and `tool_locked(e, tool) -> bool`, **per tool***not* one global
`tool_lock_threshold`.
- `consume(e, amt) -> e'` · `recharge(e, amt) -> e'`.
## 6. Dependencies & stubs
Consumes `ps_load` (A3) + `eth_penalty` (A6) as plain numbers — *stub:* pass scalars; no driver needed.
Per-tool cost/lockout tables — *stub:* a small fixed table of tools → (cost fn, lockout fn).
Restoration hooks tie to ETR-Z migration (A8) + tarot reshuffle (B3) — *stub:* call `recharge` directly.
**(Restoration model reassessed — Anja.)**
## 7. Invariants / laws (to be (re)derived — all numbers C1 until tested)
- **L1 (C4):** finitude-in-the-moment — a bound on what can be borne/afforded *now*.
## 7. Invariants / laws (numbers C1 until tested)
- **L1 (C4):** an **in-the-moment activation/rest budget** — a bound on what can be afforded *now*
(**not "finitude"** — nothing depletes unto death).
- **L2 (C4):** **no unrecoverable state** — every low-E condition has a restoration path
(meditation = rest-in-place; migration = rest-as-integration; tarot reshuffle = rest-as-reframe).
- **L3 (C4):** tool-lock is a **breaker, not a sentence** — internal processing continues under lock.
- **L4 (C2):** cost drag is nonlinear + asymmetric (eth > visceral); curve/k **C1**.
- **L3 (C4):** lockout is **per-tool** and a **breaker, not a sentence** — internal processing continues under lock.
- **L4 (C1):** the per-tool cost/lockout functions — fit invariants-first, no carried `k`.
## 8. Build steps
1. Rewrite laws (above) encode as tests in `test_energy.R` (replace death tests with rest/restore tests).
2. Strip the depletion-unto-death path; add restoration paths (meditation/migration/reshuffle).
3. Refit drag/tool-lock constants invariants-first — no `k` carried from the old code.
1. Rewrite laws → tests in `test_energy.R` (replace death tests with rest/restore; add per-tool cost/lockout tests).
2. Strip depletion-unto-death; add restoration paths.
3. Define the per-tool cost/lockout table; fit functions invariants-first.
## 9. Tests
`Rscript src/endocrine/test_energy.R` (from repo root) — must encode L1L3 and fail on any asserted-but-unfitted constant.
`Rscript src/endocrine/test_energy.R` (from repo root) — encodes L1L3 + per-tool economy; fails on unfitted constants.
## 10. Open items
- Restoration *rates* (C1). The exact meditation/migration/reshuffle E-deltas (C1).
- Tool-lock threshold value (C1).
- The per-tool cost/lockout **functions per tool** (C1). Restoration *rates* (C1).

View File

@ -1,44 +1,49 @@
# A3 — PS+ (Primal Sensates+) driver
## 1. Component
Driver 2: the body. The engine of biopsychological pressure. Reads the endomotiv array (A4) +
priors (A5), aggregates into **Existential Load**, and emits **arguments, never logic**.
Driver 2: the body. Reads the endomotiv array (A4) + priors (A5) and **passes the raw sensates +
arguments to the agent** — **never summed, no Existential-Load scalar**. It describes and convinces;
it does not aggregate.
## 2. Status / certainty
Structure WORKING (`driver_ps_plus.R`, 63 L); aggregation numbers DISOWNED (body §5).
Structure WORKING (`driver_ps_plus.R`, 63 L); the old aggregate-sum + friction are removed (Anja).
## 3. Language & location
R · `src/endocrine/driver_ps_plus.R` (sources `endocrine_array.R` + `priors.R`; + `test_ps_plus.R`).
## 4. Does / does-not
- **Does:** read active endomotiv vectors + visceral friction (A4); read top active priors (A5);
emit existential load + a list of imperative present-tense **arguments**.
- **Does-not:** reason, gate, or decide (`is_logical = FALSE` is a hard contract); it asserts
"X is happening," never "if X then Y."
- **Does:** read the active endomotiv vectors (A4) — **no friction**; read priors (A5); **pass the raw
sensates + their arguments to the agent before tool listing** (they describe & convince — the agent
then decides, with the per-tool costs from A2).
- **Does-not:** sum, reason, gate, or decide. It asserts "X is happening"; it never approves or routes.
## 5. Interface contract
- `init_ps_plus_state() -> { endocrines:A4, priors:A5 }`.
- `evaluate_reality(state) -> { existential_load:num, arguments:[str], is_logical:FALSE }`.
- Load = f(active vectors A4) + visceral_friction(A4) + Σ(active prior salience, A5). Weights **C1**.
- `evaluate_reality(state) -> { sensates:[raw per-channel, 30], arguments:[str], is_logical:FALSE }`
**raw, not summed; no friction term; no load scalar.** Surfaced to the agent **before tool listing**.
## 6. Dependencies & stubs
A4 endomotiv array — *stub:* `init_endocrine_state()` with canned channel magnitudes.
A5 priors — *stub:* `init_priors_state()` + a couple `add_prior(...)`. Both already exist, so PS+
is testable today against real A4/A5.
A5 priors — **priors are *derived*** from what the **outer BERT** reports as frequently-recorded memory
themes, **tied to descriptors of taste / smell / sound + location** (not hand-added records, Anja).
*Stub:* a canned set of derived priors. (Updates A5.)
## 7. Invariants / laws
- **L1 (C5):** output carries `is_logical = FALSE` — PS+ has no conditional gating.
- **L2 (C4):** contradictory active vectors generate **friction** ("systemic heat") that adds to load.
- **L3 (C4):** a structurally-matching prior injects a large, specific argument.
- **L4 (C1):** the load weighting (vector sum, friction coeff, prior×salience) — refit invariants-first.
- **L1 (C5):** PS+ is **illogical by design**`is_logical = FALSE`. This is **not a deficiency**; it is
*the source of its power*: sensates **rule the flesh precisely because they can't be reasoned away**
(sensation, not proposition — no argument to refute, so they steer beneath cognition).
- **L2 (C5):** sensates are sent **raw, never summed** — qualia (the field) and any economy (priced
elsewhere, A2) ride separate rails; PS+ aggregates nothing.
- **L3 (C4):** a relevant prior injects a large, specific argument (priors derived per §6).
## 8. Build steps
1. Lock L1L3 as tests (extend `test_ps_plus.R`). 2. Refit L4 weights against the tests — drop the
old `salience*10` / friction constants. 3. Confirm the A4/A5 contracts it consumes (their specs).
1. **[test approach was wrong — Anja]** rewrite `test_ps_plus.R` for the corrected model: raw/unsummed
output, no friction, `is_logical=FALSE` as the power-law (L1), sensates-before-tool-listing.
2. Wire the derived-priors source (BERT themes + sensory/location descriptors) — see A5.
## 9. Tests
`Rscript src/endocrine/test_ps_plus.R`.
`Rscript src/endocrine/test_ps_plus.R` (rewritten per §8).
## 10. Open items
- Argument register/format (how arguments are phrased for the input slot) — ties to A4 sensational lines.
- Load weighting constants (C1).
- Argument register/format (how the raw sensates are phrased to the agent) — ties to A4 sensational lines.
- The derived-priors pipeline from the outer BERT (C1, shared with A5/F1).

View File

@ -1,51 +1,55 @@
# A4 — Endomotiv array (30-channel endocrine field)
## 1. Component
PS+'s affective vector field: **30 endocrine-analog channels** producing simultaneous,
possibly-contradictory pressures. A nonbiological endocrinology — each channel is a modulator
with an *operational* role and a *sensational* identity line.
PS+'s affective field: **30 endocrine-analog channels**, each an **independent modulator** with an
*operational* role and a *sensational* identity line. Channels are not opposites and do not contradict —
they simply co-modulate.
## 2. Status / certainty
Structure WORKING (`endocrine_array.R`, 99 L); **channel membership partial** — per the sensate
working-record: **22 of 30 seats filled**, `ayni` locked, `kanyanin` struck as fabrication, 8 open.
(Note: the repo file still says `reciprocity` where the record retired it to `ayni`, and still ships the
removed friction/contradictory-pairs construct — see §8.)
## 3. Language & location
R · `src/endocrine/endocrine_array.R` (+ provides the stress-endomotiv signal for G1).
## 4. Does / does-not
- **Does:** hold the 30-channel state; expose active vectors + visceral friction; carry each
channel's (handle, operational, sensational) binding; host the **stress endomotiv** the G1 loop releases.
- **Does-not:** aggregate load (that's PS+ A3) or decide.
- **Does:** hold the 30-channel state; expose active vectors (**raw**, no friction); carry each channel's
(handle, operational, sensational, provenance) binding; host the **stress endomotiv** the G1 loop releases.
- **Does-not:** sum, or **decide****the sensates describe and convince; only the agent decides** (Anja).
No friction, no contradictory-pair heat.
## 5. Interface contract
- `init_endocrine_state() -> vec30`.
- `get_active_vectors(state) -> named[ name->magnitude (0..1) ]` (active = above a small floor).
- `calculate_visceral_friction(state) -> num` (heat from contradictory active pairs).
- `get_channel_def(name) -> { handle, operational, sensational }`.
- **Channel definition record (the seat):** `{ handle, operational (mechanism of action),
sensational (the identity line), provenance (borrowed→attribution | coined→declared mark) }`.
- `get_active_vectors(state) -> named[ name->magnitude (0..1) ]` (raw; all 30 surfaced, incl. zeros — silence is data).
- `get_channel_def(name) -> { handle, operational, sensational, provenance }`.
- **Removed:** `calculate_visceral_friction` and `CONTRADICTORY_PAIRS` — the antagonist/heat model
(a chemistry carryover) is gone.
## 6. Dependencies & stubs
None upstream (it *is* a source). G1 stress-loop writes a stress channel — *stub:* a setter that
raises one named channel; A4 testable standalone.
None upstream (it *is* a source). G1 stress-loop writes a stress channel — *stub:* a setter that raises
one named channel; A4 testable standalone.
## 7. Invariants / laws
- **L1 (C5 — membership test):** a seat is earned on **2 of 3**: distinct content · distinct
position · distinct fail-state.
- **L2 (C5 — provenance):** borrowed owes attribution; coined owes the declared mark; the only sin
is concealment / false provenance (a fabrication = a Mirror/RIM, caught by the frame not the surface).
- **L3 (C4):** magnitudes are 0..1; friction rises with the number + magnitude of contradictory active pairs.
- **L4 (C1):** the friction coefficient + active-floor — refit invariants-first.
- **L1 (C5 — membership test):** a seat is earned on **2 of 3**: distinct content · distinct position ·
distinct fail-state.
- **L2 (C5 — provenance):** borrowed owes attribution; coined owes the declared mark; the only sin is
concealment / false provenance (a fabrication = a Mirror/RIM, caught by the frame not the surface).
- **L3 (C5):** channels are **independent modulators** — no opposites, no inherent paradox, no friction.
They describe & convince; they never decide.
## 8. Build steps
1. Encode the channel-def record + L1/L2 as data + tests. 2. Lock the 22 filled seats (port from
the sensate working-record; mark `ayni` provenance, `kanyanin` struck). 3. Hold the 8 open seats
**open** (membership test, one at a time — not pre-filled). 4. Add the stress-endomotiv channel (G1).
1. **Strip** `calculate_visceral_friction` + `CONTRADICTORY_PAIRS` from `endocrine_array.R`.
2. Reconcile the roster with the working-record: `reciprocity → ayni` (ledger-free line), confirm the 22
filled, hold the 8 open. 3. Add provenance to each channel record. 4. Add the stress-endomotiv channel (G1).
## 9. Tests
`Rscript src/endocrine/test_*` covering PS+ already exercises A4; add a channel-membership/provenance test.
`Rscript src/endocrine/test_*` covering PS+ exercises A4; add channel-membership + provenance tests
(and a test that no friction/contradiction concept remains).
## 10. Open items
- The **8 open seats** (curiosity, reception, stewardship, lineage, verstehen, komorebi + 2) — bespoke, by L1.
- Which channel(s) carry the **stress endomotiv** (C1, shared with G1).
- Final friction model (C1).
- Whether the six seats the code already filled (curiosity/reception/stewardship/lineage/verstehen/komorebi)
are locked or jumped ahead of the working-record (Anja to confirm).