From 8e26f7f0c1de155f429334a87722551519211cb6 Mon Sep 17 00:00:00 2001 From: gravermistakes Date: Sun, 1 Nov 2026 18:44:01 -0800 Subject: [PATCH] docs(drivebox): clarify trauma/triumph record permanence and salience --- core/docs/plans/A5-priors.md | 49 ++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/core/docs/plans/A5-priors.md b/core/docs/plans/A5-priors.md index 4990b30..67c5668 100644 --- a/core/docs/plans/A5-priors.md +++ b/core/docs/plans/A5-priors.md @@ -1,47 +1,40 @@ -# A5 — Priors database +# A5 — Priors: Triumphs and Traumas ## 1. Component -PS+'s non-endocrine primitive: the records of the self — high-salience **Triumphs and Traumas** -(scar/reward tissue). When a current event structurally matches a prior, it activates and injects -a large, specific argument into PS+ load. +Priors are PS+'s **non-endocrine history**: Triumph and Trauma records. They are not the Endomotiv array, and not GnuCOBOL invariants. Recurring, structurally similar lived events can make them unusually salient and sometimes contribute to existentially significant **compounding trauma**. ## 2. Status / certainty -Structure WIP (`priors.R`, 63 L). As a *database* (query/decay/persistence), C3. +**Partially drafted; current implementation insufficient.** `priors.R` supports manual records with a 0..1 salience clamp, while the historical spec says 0..5. Neither numeric range is ratified by the discrepancy. BERT-derived memory themes plus sensory and location descriptors are an intended source, not currently demonstrated. ## 3. Language & location -R · `src/endocrine/priors.R` (consumed by PS+ A3). Persistence backing → storage (E2/E3) later. +R `core/src/endocrine/priors.R`, consumed by A3; durable provenance-bearing history belongs in variant memory storage (exact E2/E3 backing still open). ## 4. Does / does-not -- **Does:** store prior records; return top active priors above a salience threshold; track - activation counts; decay salience over time. -- **Does-not:** aggregate load (A3) or decide; it is memory tissue, queried by PS+. +- **Does:** retain the fact, type, identity, provenance and recurrence of lived episodes; expose changing **activation/salience** to PS+; identify structurally related recurrent events; participate in remaster of active weights. +- **Does not:** delete or invent historical records during Full Natal, automatically classify every painful event as Graph drift, supply global PS+ load, or turn trauma into immutable law. -## 5. Interface contract [WIP] -- **Record:** `{ id, type∈{TRAUMA,TRIUMPH}, salience(0..5.00), payload(str), activation_count }`. -- `init_priors_state() -> store` · `add_prior(store,id,type,salience,payload) -> store'` · - `get_top_active_priors(store, threshold=?) -> [record] (desc salience)` · - `activate_prior(store,id) -> store'` · `decay_prior(store,id,rate=?) -> store'`. +## 5. Interface contract (target) +- `prior -> {id, type:TRIUMPH|TRAUMA, source_refs, provenance, descriptors, salience, activation_history?, recurrence?}`. Mutable salience is explicitly separate from immutable event identity/content. +- `match_event(event, priors) -> evidence_of_structural_similarity` (mechanism C1). +- `top_priors(priors, context, n=2)` returns the most salient *relevant* records to PS+; preserve attribution. +- `remaster_salience(priors, parameters) -> priors'` may change active salience/weight **only**, retaining episode identity, source, type and history. +- `assess_compounding_trauma(evidence) -> extraordinary_event_candidate`: classification/windowing/threshold remain open; ETR drift is not automatic. ## 6. Dependencies & stubs -None upstream. The **match** that activates a prior (structural similarity of current event ↔ prior) -is upstream of A5 — *stub:* call `activate_prior(id)` directly for tests. Also connects to EthInt via Memory stores and Tool Calling +Memory storage E2/E3, derived themes F1/BERT, PS+ A3 and a future extraordinary-event evaluator into A8. A test can use fixture events without pretending the model or store exists. ## 7. Invariants / laws -- **L1 (C5):** type ∈ {TRAUMA, TRIUMPH} only (invalid types error). -- **L2 (C4):** salience clamped 0..5; top-active sorted descending; only ≥ threshold are "active." Uses floating point scalar. -- **L3 (C4):** activation is tracked; salience decays over time (for migration cycles). -- **L4 (C1):** threshold + decay-rate constants — refit invariants-first. +- **L1:** each prior is a Triumph or Trauma with preserved original provenance and history. +- **L2:** value remaster changes salience, never erases or falsifies historical records. +- **L3:** repeated structurally isomorphic events are distinguishable from isolated events. +- **L4:** PS+ surfaces no more than the two most salient relevant priors in its standard snapshot. +- **L5:** no inherited numeric threshold/decay coefficient is ratified without invariants and tests. ## 8. Build steps -1. Lock the record + L1–L3 as tests. 2. Refit threshold/decay (drop old 0.8 / 0.01 unless re-derived). -3. Define the **match** interface (how an event activates a prior) — likely semantic, ties to A4/A7 tags. -4. Add persistence (E2/E3) once storage specs land. +Separate event identity from affective weights; define provenance and structural match contracts; implement salience projection; test compounding vs isolated events; integrate ETR eligibility only afterward. ## 9. Tests -`Rscript src/endocrine/test_*` (PS+ tests exercise priors); add a dedicated priors test for L1–L3. +Type, preserved source, salience-only remaster, top-two ranking, recurrence and no unqualified drift. Old `test_priors.R` assumptions may need replacement. ## 10. Open items -- The **match** mechanism (event ↔ prior structural similarity) — C1. -- Persistence backing (VARIANT store E2 vs RAG E3) — C1. -- Threshold/decay constants (C1). -- Should we use R for a predominantly lookup and reference script? Is R-to-R worth precision and ease of use compared to C-abi connection? +Memory schema/backing, structural similarity source, salience range and rate, compounding-event qualification, and precise interaction with other DriveBox values.