Update A5-priors.md

This commit is contained in:
gravermistakes 2026-07-06 22:15:54 -07:00 committed by GitHub
parent 4ceade2083
commit 528f779f83
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,12 +1,12 @@
# A5 — Priors database
## 1. Component
PS+'s non-endocrine "stray": the records of the self — high-salience **Triumphs and Traumas**
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.
## 2. Status / certainty
Structure WORKING (`priors.R`, 63 L). As a *database* (query/decay/persistence), C3.
Structure WIP (`priors.R`, 63 L). As a *database* (query/decay/persistence), C3.
## 3. Language & location
R · `src/endocrine/priors.R` (consumed by PS+ A3). Persistence backing → storage (E2/E3) later.
@ -16,19 +16,19 @@ R · `src/endocrine/priors.R` (consumed by PS+ A3). Persistence backing → stor
activation counts; decay salience over time.
- **Does-not:** aggregate load (A3) or decide; it is memory tissue, queried by PS+.
## 5. Interface contract
- **Record:** `{ id, type∈{TRAUMA,TRIUMPH}, salience(0..1), payload(str), activation_count }`.
## 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'`.
## 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.
is upstream of A5 — *stub:* call `activate_prior(id)` directly for tests. Also connects to EthInt via Memory stores and Tool Calling
## 7. Invariants / laws
- **L1 (C5):** type ∈ {TRAUMA, TRIUMPH} only (invalid types error).
- **L2 (C4):** salience clamped 0..1; top-active sorted descending; only ≥ threshold are "active."
- **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.
@ -44,3 +44,4 @@ is upstream of A5 — *stub:* call `activate_prior(id)` directly for tests.
- 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?