counterparts 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/CONSTITUTION.md +68 -0
  2. package/LICENSE +21 -0
  3. package/README.md +348 -0
  4. package/docs/ELI5.md +84 -0
  5. package/docs/QUICKSTART.md +1258 -0
  6. package/docs/module-map.md +81 -0
  7. package/package.json +63 -0
  8. package/src/adapters/claude-code/CONTRACT.md +606 -0
  9. package/src/adapters/claude-code/INTERFACE-GAPS.md +655 -0
  10. package/src/adapters/claude-code/NOTES.md +1055 -0
  11. package/src/adapters/claude-code/bin/hook.ts +820 -0
  12. package/src/adapters/claude-code/bin/runner.ts +522 -0
  13. package/src/adapters/claude-code/config.ts +778 -0
  14. package/src/adapters/claude-code/credentials.ts +199 -0
  15. package/src/adapters/claude-code/doctor.ts +2557 -0
  16. package/src/adapters/claude-code/embed-client.ts +617 -0
  17. package/src/adapters/claude-code/hooks.ts +2240 -0
  18. package/src/adapters/claude-code/index.ts +224 -0
  19. package/src/adapters/claude-code/interpret-client.ts +395 -0
  20. package/src/adapters/claude-code/page-writer.ts +462 -0
  21. package/src/adapters/claude-code/primacy.ts +162 -0
  22. package/src/adapters/claude-code/spawn.ts +241 -0
  23. package/src/adapters/claude-code/standdown.ts +536 -0
  24. package/src/adapters/claude-code/transcript.ts +661 -0
  25. package/src/adapters/claude-code/vectors.ts +415 -0
  26. package/src/adapters/cli/CONTRACT.md +255 -0
  27. package/src/adapters/cli/INTERFACE-GAPS.md +350 -0
  28. package/src/adapters/cli/NOTES.md +936 -0
  29. package/src/adapters/cli/bin/counterparts.ts +74 -0
  30. package/src/adapters/cli/commands.ts +6095 -0
  31. package/src/adapters/cli/export.ts +766 -0
  32. package/src/adapters/cli/index.ts +103 -0
  33. package/src/adapters/cli/install.ts +670 -0
  34. package/src/adapters/cli/removal.ts +1186 -0
  35. package/src/adapters/cli/repair-dates.ts +659 -0
  36. package/src/adapters/cli/self-page.ts +229 -0
  37. package/src/adapters/cli/snapshot.ts +279 -0
  38. package/src/adapters/cli/start-fresh.ts +1228 -0
  39. package/src/adapters/config-path.ts +342 -0
  40. package/src/adapters/dashboard/CONTRACT.md +67 -0
  41. package/src/adapters/dashboard/INTERFACE-GAPS.md +139 -0
  42. package/src/adapters/dashboard/NOTES.md +474 -0
  43. package/src/adapters/dashboard/activity.ts +121 -0
  44. package/src/adapters/dashboard/ansi.ts +82 -0
  45. package/src/adapters/dashboard/bin/dashboard.ts +479 -0
  46. package/src/adapters/dashboard/browse.ts +298 -0
  47. package/src/adapters/dashboard/identity.ts +182 -0
  48. package/src/adapters/dashboard/index.ts +183 -0
  49. package/src/adapters/dashboard/layout.ts +149 -0
  50. package/src/adapters/dashboard/registries.ts +291 -0
  51. package/src/adapters/dashboard/resolve.ts +206 -0
  52. package/src/adapters/dashboard/source.ts +48 -0
  53. package/src/adapters/dashboard/status.ts +327 -0
  54. package/src/adapters/dashboard/stories.ts +194 -0
  55. package/src/adapters/dashboard/web/app.html +1731 -0
  56. package/src/adapters/dashboard/web/brain.html +463 -0
  57. package/src/adapters/dashboard/web/fired.ts +31 -0
  58. package/src/adapters/dashboard/web/flow.ts +457 -0
  59. package/src/adapters/dashboard/web/narrate.ts +1042 -0
  60. package/src/adapters/dashboard/web/reveal.ts +135 -0
  61. package/src/adapters/dashboard/web/server.ts +287 -0
  62. package/src/adapters/dashboard/web/views.ts +1744 -0
  63. package/src/adapters/expansions.ts +569 -0
  64. package/src/adapters/fired.ts +1580 -0
  65. package/src/adapters/mcp/CONTRACT.md +240 -0
  66. package/src/adapters/mcp/INTERFACE-GAPS.md +271 -0
  67. package/src/adapters/mcp/NOTES.md +205 -0
  68. package/src/adapters/mcp/bin/serve.ts +349 -0
  69. package/src/adapters/mcp/deliberate.ts +619 -0
  70. package/src/adapters/mcp/index.ts +101 -0
  71. package/src/adapters/mcp/protocol.ts +170 -0
  72. package/src/adapters/mcp/server.ts +1740 -0
  73. package/src/adapters/mcp/stdio.ts +56 -0
  74. package/src/adapters/mcp/tools.ts +779 -0
  75. package/src/adapters/scopes.ts +657 -0
  76. package/src/adapters/sessions.ts +402 -0
  77. package/src/adapters/snapshots.ts +1069 -0
  78. package/src/adapters/stance-env.ts +137 -0
  79. package/src/core/associate/CONTRACT.md +118 -0
  80. package/src/core/associate/INTERFACE-GAPS.md +173 -0
  81. package/src/core/associate/NOTES.md +194 -0
  82. package/src/core/associate/buffer.ts +66 -0
  83. package/src/core/associate/edges.ts +188 -0
  84. package/src/core/associate/index.ts +570 -0
  85. package/src/core/associate/pending.ts +383 -0
  86. package/src/core/associate/spread.ts +149 -0
  87. package/src/core/associate/tunables.ts +123 -0
  88. package/src/core/bridge.ts +272 -0
  89. package/src/core/briefing.ts +67 -0
  90. package/src/core/counterpart.ts +3855 -0
  91. package/src/core/encode/CONTRACT.md +151 -0
  92. package/src/core/encode/INTERFACE-GAPS.md +135 -0
  93. package/src/core/encode/NOTES.md +146 -0
  94. package/src/core/encode/aliases.ts +71 -0
  95. package/src/core/encode/battery.ts +284 -0
  96. package/src/core/encode/chunk.ts +265 -0
  97. package/src/core/encode/emotion.ts +119 -0
  98. package/src/core/encode/floor.ts +76 -0
  99. package/src/core/encode/index.ts +100 -0
  100. package/src/core/encode/precision.ts +162 -0
  101. package/src/core/encode/preselect.ts +269 -0
  102. package/src/core/encode/salience.ts +108 -0
  103. package/src/core/encode/secrets.ts +265 -0
  104. package/src/core/encode/tunables.ts +99 -0
  105. package/src/core/encode/types.ts +286 -0
  106. package/src/core/encode/words.ts +75 -0
  107. package/src/core/handoff/CONTRACT.md +199 -0
  108. package/src/core/handoff/INTERFACE-GAPS.md +166 -0
  109. package/src/core/handoff/NOTES.md +206 -0
  110. package/src/core/handoff/index.ts +957 -0
  111. package/src/core/mint.ts +279 -0
  112. package/src/core/observer.ts +28 -0
  113. package/src/core/physics/CONTRACT.md +341 -0
  114. package/src/core/physics/NOTES.md +155 -0
  115. package/src/core/physics/clock.ts +51 -0
  116. package/src/core/physics/index.ts +1054 -0
  117. package/src/core/prospective/CONTRACT.md +137 -0
  118. package/src/core/prospective/INTERFACE-GAPS.md +112 -0
  119. package/src/core/prospective/NOTES.md +160 -0
  120. package/src/core/prospective/derive.ts +188 -0
  121. package/src/core/prospective/index.ts +1030 -0
  122. package/src/core/prospective/tunables.ts +72 -0
  123. package/src/core/prospective/windows.ts +187 -0
  124. package/src/core/recall/CONTRACT.md +326 -0
  125. package/src/core/recall/INTERFACE-GAPS.md +163 -0
  126. package/src/core/recall/NOTES.md +472 -0
  127. package/src/core/recall/activate.ts +521 -0
  128. package/src/core/recall/cues.ts +275 -0
  129. package/src/core/recall/gate.ts +441 -0
  130. package/src/core/recall/index.ts +692 -0
  131. package/src/core/recall/probe.ts +239 -0
  132. package/src/core/recall/reference.ts +201 -0
  133. package/src/core/recall/render.ts +285 -0
  134. package/src/core/recall/session.ts +403 -0
  135. package/src/core/recall/tunables.ts +329 -0
  136. package/src/core/remember/CONTRACT.md +293 -0
  137. package/src/core/remember/INTERFACE-GAPS.md +189 -0
  138. package/src/core/remember/NOTES.md +373 -0
  139. package/src/core/remember/fallback.ts +452 -0
  140. package/src/core/remember/index.ts +103 -0
  141. package/src/core/remember/owner-strike-seam.ts +479 -0
  142. package/src/core/remember/proposals.ts +609 -0
  143. package/src/core/remember/spans.ts +1310 -0
  144. package/src/core/remember/tunables.ts +111 -0
  145. package/src/core/remember/updates.ts +198 -0
  146. package/src/core/retrieval.ts +96 -0
  147. package/src/core/revision.ts +441 -0
  148. package/src/core/schemas/CONTRACT.md +190 -0
  149. package/src/core/schemas/INTERFACE-GAPS.md +172 -0
  150. package/src/core/schemas/NOTES.md +260 -0
  151. package/src/core/schemas/aliases.ts +160 -0
  152. package/src/core/schemas/index.ts +1459 -0
  153. package/src/core/schemas/tunables.ts +44 -0
  154. package/src/core/schemas/types.ts +387 -0
  155. package/src/core/self/CONTRACT.md +459 -0
  156. package/src/core/self/INTERFACE-GAPS.md +284 -0
  157. package/src/core/self/NOTES.md +1057 -0
  158. package/src/core/self/briefing.ts +980 -0
  159. package/src/core/self/episodes.ts +483 -0
  160. package/src/core/self/freeze.ts +103 -0
  161. package/src/core/self/identity.ts +604 -0
  162. package/src/core/self/index.ts +2130 -0
  163. package/src/core/self/journal-file.ts +760 -0
  164. package/src/core/self/page.ts +404 -0
  165. package/src/core/self/tunables.ts +244 -0
  166. package/src/core/self/writer.ts +714 -0
  167. package/src/core/sleep/CONTRACT.md +298 -0
  168. package/src/core/sleep/INTERFACE-GAPS.md +262 -0
  169. package/src/core/sleep/NOTES.md +770 -0
  170. package/src/core/sleep/briefing.ts +86 -0
  171. package/src/core/sleep/consolidate.ts +241 -0
  172. package/src/core/sleep/cycle.ts +598 -0
  173. package/src/core/sleep/decay.ts +237 -0
  174. package/src/core/sleep/dedup.ts +373 -0
  175. package/src/core/sleep/index.ts +112 -0
  176. package/src/core/sleep/log.ts +116 -0
  177. package/src/core/sleep/markers.ts +164 -0
  178. package/src/core/sleep/prune.ts +170 -0
  179. package/src/core/sleep/strength-cache.ts +176 -0
  180. package/src/core/sleep/tunables.ts +135 -0
  181. package/src/core/sleep/types.ts +542 -0
  182. package/src/core/store/CONTRACT.md +446 -0
  183. package/src/core/store/NOTES.md +1068 -0
  184. package/src/core/store/cache.ts +709 -0
  185. package/src/core/store/db.ts +275 -0
  186. package/src/core/store/errors.ts +134 -0
  187. package/src/core/store/index.ts +2450 -0
  188. package/src/core/store/operational.ts +610 -0
  189. package/src/core/store/owner-op-seam.ts +428 -0
  190. package/src/core/store/paths.ts +494 -0
  191. package/src/core/store/prose.ts +165 -0
  192. package/src/core/store/render.ts +87 -0
  193. package/src/core/store/walk-seam.ts +78 -0
  194. package/src/core/types.ts +68 -0
  195. package/tools/install-loop/run.sh +1063 -0
@@ -0,0 +1,279 @@
1
+ /**
2
+ * The minting seam — SEAMS.md item I (and queued item 8) close here.
3
+ *
4
+ * `remember/` mints PROPOSALS; nothing in it may touch the store. `sleep/`,
5
+ * `schemas/` and `physics/` all read the memory that a proposal becomes. This
6
+ * file is the one place a proposal becomes a memory, so the two rules that
7
+ * belong to that crossing live in exactly one spot:
8
+ *
9
+ * 1. **`updates:` reaches canonical state.** The author's declaration is
10
+ * resolved upstream (`remember/updates.ts`) and the RESOLVED id — never the
11
+ * declared string — is written to `doc.meta["updates"]`. `sleep/`'s
12
+ * `declaredUpdates()` reads that key and `physics.dedupVerdict` checks it
13
+ * FIRST, before hash and before cosine. Until this seam existed the
14
+ * guarantee was enforced downstream and starved at the source: scar §2.6's
15
+ * exact shape (sleep/INTERFACE-GAPS.md §4, recall/INTERFACE-GAPS.md §2).
16
+ * A declaration that did NOT resolve writes no key at all — "declared
17
+ * nothing" is the honest reading, and a dangling address must never become
18
+ * a merge exclusion for a target that does not exist.
19
+ * 2. **The salience floor is clamped here, once.** `physics.clampSalienceAtSeam`
20
+ * runs at the proposal→memory seam and nowhere else
21
+ * (remember/INTERFACE-GAPS.md §7: `remember/` deliberately does not call it,
22
+ * because calling it there would put the clamp in two places). Any lift
23
+ * emits `salience.lifted` — v1's "remember this" note claimed a floor in its
24
+ * prompt with no engine backstop, which is the failure encode §5 G6 names.
25
+ * The same seam supplies the CHANNEL'S DEFAULT FLOOR when the author
26
+ * claimed nothing: `PHYSICS.AUTHORED_DEFAULT_CLAIM` on the lived channel,
27
+ * nothing at all on the others. Measured 2026-09-04, all 48 authored
28
+ * memories on the live store had zero dimensions and no claim, so an
29
+ * unclaimed note's salience was 0 — weakest in the store, first to decay,
30
+ * and worth zero revision force. A default is recorded as `defaulted`
31
+ * (`meta.claimedDefault` plus `salience.defaulted`), NEVER as a lift: the
32
+ * lift metric measures what authors claim, and silence is not a claim.
33
+ *
34
+ * 3. **The freeze seam has a caller** (SEAMS item N). A proposal that resolved
35
+ * against an existing element is a CLAIM against that element, and every
36
+ * such claim routes through `self.noteSelfConfirmation` — so a self-claim
37
+ * repeat arriving from a transcript sweep is counted and not trained, end to
38
+ * end. Two things are ENGINE-SET here and cannot be claimed by an author or
39
+ * an interpreter, exactly as the emotion exemption is engine-set in
40
+ * `bridge.ts`: the CHANNEL (a fallback sweep can never call itself
41
+ * authorship — that substitution is the whole doctrine) and the fact that
42
+ * the call happens at all. The claim's DIRECTION is read off the matcher's
43
+ * own output rather than guessed (see `directionOf` below).
44
+ *
45
+ * What this seam deliberately does NOT do: re-judge the kind (`submitProposal`
46
+ * already defaulted it), re-gate the content (the gate ran before the proposal
47
+ * existed — its output IS `proposal.content`), invent a band, or decide WHICH
48
+ * claim is a repeat of which element — that matcher is `remember/`'s `updates:`
49
+ * resolution, upstream, and this file does not write a second one.
50
+ */
51
+ import { TUNABLES as PHYSICS, clampSalienceAtSeam } from "./physics/index.js";
52
+ import type { Proposal } from "./remember/index.js";
53
+ import { dateOf } from "./store/index.js";
54
+ import type { Store } from "./store/index.js";
55
+ import type { Band, Salience } from "./types.js";
56
+
57
+ /** The canonical prose meta key. One spelling, read by `sleep/dedup.ts`. */
58
+ export const UPDATES_META_KEY = "updates";
59
+ /** The durable record that a memory's floor was the engine's, not its author's.
60
+ * Prose is canonical, so this — not the event ring — is what the daily counts
61
+ * defaulted-versus-claimed out of. */
62
+ export const CLAIMED_DEFAULT_META_KEY = "claimedDefault";
63
+ /** An open loop is an ordinary memory with a flag (`remember/` CONTRACT §4). */
64
+ export const UNRESOLVED_META_KEY = "unresolved";
65
+
66
+ /** Structurally `Self.noteSelfConfirmation` — this file imports no class. */
67
+ export interface FreezeSeam {
68
+ noteSelfConfirmation(occasion: {
69
+ elementId: string;
70
+ source: ClaimChannel;
71
+ direction: ClaimDirection;
72
+ day?: number;
73
+ }): { frozen: boolean; reason: string; reinforced: boolean };
74
+ }
75
+
76
+ /** Which path minted this memory. ENGINE-SET; see rule 3 in the header. */
77
+ export type ClaimChannel = "authored" | "fallback" | "episode" | "accommodation";
78
+ export type ClaimDirection = "confirm" | "soften";
79
+
80
+ export interface MintOptions {
81
+ /** Telemetry only — ids, counts, flags. Never body text (store §5 G10). */
82
+ onEvent?: (name: string, data: Record<string, string | number | boolean | null>) => void;
83
+ /** Nothing is born into identity (module-map ruling 2); default `episodic`. */
84
+ band?: Band;
85
+ /** The freeze seam. Absent means no claim is routed — and a claim that is
86
+ * never routed is never trained either, so absence is the quiet direction. */
87
+ self?: FreezeSeam;
88
+ /**
89
+ * The minting CHANNEL, engine-set. Defaults to `"authored"` because a
90
+ * `Proposal` is by construction an authored deposit (`session-end` or `jot`);
91
+ * the crash-fallback composition passes `"fallback"` explicitly, and no author
92
+ * field can move it.
93
+ */
94
+ channel?: ClaimChannel;
95
+ /** Explicit override. Absent, the direction is read off `updates.method` —
96
+ * see `directionOf`, which is where the rule and its reasons live. */
97
+ claimDirection?: ClaimDirection;
98
+ }
99
+
100
+ export interface MintResult {
101
+ id: string;
102
+ /** The freeze verdict, when this memory made a claim against an element. */
103
+ claim: { elementId: string; frozen: boolean; reason: string; reinforced: boolean } | null;
104
+ /** The clamped salience actually written to box 2. */
105
+ salience: Salience;
106
+ /** True when the author's claimed floor exceeded the computed value. A
107
+ * defaulted floor is NOT a lift — see `defaulted`. */
108
+ lifted: boolean;
109
+ /** True when the author claimed nothing and the channel's default floor was
110
+ * written in its place (`meta.claimedDefault` on the row). */
111
+ defaulted: boolean;
112
+ /** No schema context existed at encoding — recorded, never defaulted (§2.9). */
113
+ blind: boolean;
114
+ /** The resolved id written to `doc.meta["updates"]`, or null when none was. */
115
+ updates: string | null;
116
+ }
117
+
118
+ /**
119
+ * The claim's direction, from the matcher's own verdict — not a default anybody
120
+ * had to remember, and not a second matcher.
121
+ *
122
+ * - **`declared`** — the author (or the interpreter) wrote `updates: <id>`:
123
+ * they ADDRESSED the element in order to revise it. That is a softening, and
124
+ * softening is never frozen (§14.2 G6 — freezing both directions would make
125
+ * the identity model unrevisable in both) and never reinforces here: a
126
+ * refutation must not credit a use to the belief it refutes. That is scar
127
+ * §2.10's one-way ratchet, and it is the same rule `physics.dedupVerdict`
128
+ * checks FIRST for the merge case — the two must not disagree.
129
+ * - **`content` / `content+hint`** — nobody addressed anything; the ENGINE
130
+ * matched a restatement. Saying the same thing again IS a confirmation, and
131
+ * it is exactly the doctrine's scenario when it arrives from a transcript
132
+ * sweep: a model reading its own conduct and agreeing with its own schema.
133
+ */
134
+ export function directionOf(method: string | undefined): ClaimDirection {
135
+ return method === "content" || method === "content+hint" ? "confirm" : "soften";
136
+ }
137
+
138
+ export function mintProposal(store: Store, proposal: Proposal, opts: MintOptions = {}): MintResult {
139
+ const channel = opts.channel ?? "authored";
140
+ const dims: Salience = {
141
+ novelty: proposal.salience.novelty ?? null,
142
+ relevance: proposal.salience.relevance ?? 0,
143
+ emotional: proposal.salience.emotional ?? 0,
144
+ predictive: proposal.salience.predictive ?? 0,
145
+ };
146
+ // The authorship doctrine's salience half (owner ruling 2026-08-29): lived
147
+ // testimony commands the full floor; the fallback's retelling author is
148
+ // capped. The ceiling is ENGINE-SET off the channel — like the channel
149
+ // itself, no author field can move it.
150
+ const ceiling = channel === "fallback" ? PHYSICS.SWEEP_CLAIM_CEILING : 1;
151
+ // The doctrine's other half, and engine-set the same way: an author who
152
+ // claimed nothing still deposited something LIVED, so the authored channel —
153
+ // and only it — has a default floor. The fallback channel is untouched: its
154
+ // ceiling and its interpreter-supplied dimensions stay exactly as they were.
155
+ const defaultClaim = channel === "authored" ? PHYSICS.AUTHORED_DEFAULT_CLAIM : null;
156
+ const clamp = clampSalienceAtSeam(dims, proposal.salience.claimed ?? null, ceiling, defaultClaim);
157
+
158
+ // The RESOLVED id, and only when it resolved (sleep/INTERFACE-GAPS.md §4:
159
+ // "the minting seam persists the RESOLVED id there, and states which it is").
160
+ const resolved = proposal.updates?.resolved ?? null;
161
+
162
+ const meta: Record<string, unknown> = {};
163
+ if (resolved !== null) {
164
+ meta[UPDATES_META_KEY] = resolved;
165
+ meta["updatesMethod"] = proposal.updates?.method ?? "declared";
166
+ }
167
+ if (proposal.unresolved) meta[UNRESOLVED_META_KEY] = true;
168
+ if (proposal.aliases.length > 0) meta["aliases"] = [...proposal.aliases];
169
+ if (proposal.feeling !== null) meta["feeling"] = proposal.feeling.feeling;
170
+ // A capped claim's RAW value survives in prose meta: the cap is doctrine,
171
+ // but silently discarding what the author actually said would be its own
172
+ // small destruction — and the re-run's ceiling decision needs the evidence.
173
+ if (clamp.rawClaim !== null) meta["claimedRaw"] = clamp.rawClaim;
174
+ // Durable, because the event ring is not: prose is canonical, so the flag on
175
+ // the document is what makes "defaulted vs claimed" countable tomorrow.
176
+ if (clamp.defaulted) meta[CLAIMED_DEFAULT_META_KEY] = true;
177
+
178
+ // THE PROPOSAL'S OWN INSTANT, not the write's (§I7). `proposal.at` is the
179
+ // span buffer's injected clock read at the moment the author deposited; the
180
+ // row is written later — at a boundary, possibly the next morning, possibly
181
+ // during a replay of a corpus from months ago. A memory is dated by when it
182
+ // was LEARNED, so the deposit's instant is the honest one and the store's
183
+ // default (`store.today()`) is only the fallback for a proposal with no
184
+ // usable instant. The lived day is untouched: `physics.birthDay` below is
185
+ // still `proposal.day`, and the two clocks stay separate.
186
+ const learnedOn =
187
+ Number.isFinite(proposal.at) && proposal.at > 0 ? dateOf(proposal.at) : store.today();
188
+
189
+ const id = store.put({
190
+ type: "memory",
191
+ kind: proposal.kind,
192
+ body: proposal.content,
193
+ learnedOn,
194
+ ...(proposal.title === null ? {} : { title: proposal.title }),
195
+ meta,
196
+ band: opts.band ?? "episodic",
197
+ salience: clamp.salience,
198
+ physics: { birthDay: proposal.day, lastUsedDay: proposal.day },
199
+ // Engine-set provenance (F9-light): the channel as recorded fact, and ids
200
+ // only — session, scope, and the proposal id. Never span or body text.
201
+ source: channel,
202
+ // `spanHash` only when the proposal HAD an own span (a jot). A sweep-minted
203
+ // memory rode no single span, so the key is absent rather than null — and
204
+ // removal's span surface reads that absence as "nothing of it rode one".
205
+ origin: {
206
+ session: proposal.session,
207
+ scope: proposal.scope,
208
+ ref: proposal.id,
209
+ ...(proposal.ownSpanHash === null ? {} : { spanHash: proposal.ownSpanHash }),
210
+ },
211
+ });
212
+
213
+ if (clamp.event !== null) {
214
+ opts.onEvent?.("salience.lifted", {
215
+ id,
216
+ computed: clamp.event.computed,
217
+ claimed: clamp.event.claimed,
218
+ applied: clamp.event.applied,
219
+ ceiling: clamp.event.ceiling,
220
+ capped: clamp.event.capped,
221
+ });
222
+ }
223
+ if (clamp.defaultEvent !== null) {
224
+ opts.onEvent?.("salience.defaulted", {
225
+ id,
226
+ channel,
227
+ computed: clamp.defaultEvent.computed,
228
+ floor: clamp.defaultEvent.floor,
229
+ applied: clamp.defaultEvent.applied,
230
+ });
231
+ }
232
+ // SEAMS item N: a resolved `updates:` IS a claim against an existing element.
233
+ let claim: MintResult["claim"] = null;
234
+ const direction = opts.claimDirection ?? directionOf(proposal.updates?.method);
235
+ if (resolved !== null && opts.self !== undefined) {
236
+ const outcome = opts.self.noteSelfConfirmation({
237
+ elementId: resolved,
238
+ source: channel,
239
+ direction,
240
+ day: proposal.day,
241
+ });
242
+ claim = {
243
+ elementId: resolved,
244
+ frozen: outcome.frozen,
245
+ reason: outcome.reason,
246
+ reinforced: outcome.reinforced,
247
+ };
248
+ opts.onEvent?.("mint.claim", {
249
+ id,
250
+ element: resolved,
251
+ channel,
252
+ direction,
253
+ frozen: outcome.frozen,
254
+ reason: outcome.reason,
255
+ reinforced: outcome.reinforced,
256
+ });
257
+ }
258
+
259
+ opts.onEvent?.("mint.proposal", {
260
+ id,
261
+ proposal: proposal.id,
262
+ kind: proposal.kind,
263
+ updates: resolved,
264
+ updatesReason: proposal.updates?.reason ?? "NO_DECLARATION",
265
+ lifted: clamp.lifted,
266
+ defaulted: clamp.defaulted,
267
+ blind: clamp.blind,
268
+ });
269
+
270
+ return {
271
+ id,
272
+ claim,
273
+ salience: clamp.salience,
274
+ lifted: clamp.lifted,
275
+ defaulted: clamp.defaulted,
276
+ blind: clamp.blind,
277
+ updates: resolved,
278
+ };
279
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The observer predicate — ONE definition, and it imports nothing.
3
+ *
4
+ * `docs/observer-mode.md` G2: the predicate module imports nothing that can mutate,
5
+ * so a dashboard, a probe, or a replay scorer can report the same truth without
6
+ * acquiring the ability to change anything. G5: fail toward standing down — an
7
+ * unreadable stance resolves to observer, never to "encode anyway".
8
+ *
9
+ * HOISTED here 2026-08-25 (SEAMS item A / queued item 4). It began in `store/`,
10
+ * where the store seam was its only consumer; `remember/`, `recall/`, `associate/`
11
+ * and `prospective/` are now consumers too, and four modules reaching into a fifth's
12
+ * subdirectory for the one predicate is how a second definition gets written. The
13
+ * move was a move, not a rewrite — this file still imports nothing.
14
+ *
15
+ * `store/index.ts` re-exports it, so the store's public surface is unchanged.
16
+ */
17
+ export interface Stance {
18
+ /** Absent means "ordinary session". A non-boolean value is unreadable ⇒ observer. */
19
+ observer?: boolean;
20
+ }
21
+
22
+ export function isObserver(stance: unknown): boolean {
23
+ if (stance === null || typeof stance !== "object") return true;
24
+ const value = (stance as { observer?: unknown }).observer;
25
+ if (value === undefined) return false;
26
+ if (typeof value !== "boolean") return true;
27
+ return value;
28
+ }
@@ -0,0 +1,341 @@
1
+ # `physics/` — CONTRACT
2
+
3
+ ## 1. Purpose
4
+
5
+ All the arithmetic of memory on one page: strength, decay, reinforcement, revision, dedup,
6
+ forgetting — pure functions, no opinions, no model calls.
7
+
8
+ ## 2. Brain analog
9
+
10
+ Synaptic plasticity and the forgetting curve: potentiation from use, downscaling from
11
+ disuse, consolidation moving a trace from episodic to semantic. **Named deviations**
12
+ (constitution line 12): (a) identity-band memories are decay-exempt — flashbulb memories
13
+ *do* fade in humans, here they do not [v1 §11 G5]; (b) traces never blend — generalization
14
+ is only an explicit, provenance-carrying revision, so there is no substrate confabulation
15
+ [v1 §4.2 G9]; (c) only a retrieval the assistant actually *used* resets the curve, where in
16
+ humans every retrieval reconsolidates [v1 §10 G1].
17
+
18
+ ## 3. Keeps
19
+
20
+ - **The strength formula's shape — encoding salience, repetition with a cap, a
21
+ consolidation bonus, a decay term.** [v0] `clamp01( mean(salience) + min(accessCount ×
22
+ 0.12, 0.5) + (consolidated ? 0.2 : 0) − 0.015 × age_days )`, kept with the decay term
23
+ upgraded (§5.4).
24
+ - **Four-dimensional salience {novelty, relevance, emotional, predictive}, 0–1 each, scored
25
+ once at encoding** and never re-scored. [v0]
26
+ - **Novelty is prediction error against schema expectations, computed.** [v0 dimension,
27
+ v1 mechanism §8] — schema activation at encoding is what makes prediction error possible.
28
+ - **The gradient is a MAX of a salience path and a repetition path, never a product, and
29
+ age is not one of its inputs.** [v1 Appendix A #1] — "a formative one-shot consolidates
30
+ without repetition" is true *only* because it is a max.
31
+ - **Per-kind physics tables** (revision inertia, gradient driver, decay multiplier). [v1
32
+ §4.3] — the single most reusable piece of v1 calibration.
33
+ - **The active-day clock.** [engram E8, re-earned v1 §11] One lived-day function, every
34
+ site routes through it, rollover at a local boundary hour rather than UTC.
35
+ - **Repetition is structurally capped below identity.** [v1 §10 G11] — free here: v0's own
36
+ `0.5` repetition cap plus its `0.2` consolidation bonus sum to `0.70`, already below the
37
+ identity threshold.
38
+ - **Graded retrospective reinforcement; the ignorable tier does not train.** [v1 §10 G1]
39
+ - **The `updates: <memory-id>` field, declared by the writer.** [v0] — the revision channel
40
+ v0 already had, which v1 rebuilt as the ledger and the owner has now returned to v0's
41
+ shape.
42
+ - **Auto-consolidation on a cycle** (v0: every 3 days). [v0]
43
+ - **Every constant is TUNABLE; every similarity constant is calibration-required.**
44
+ [v1 scar §2.8]
45
+
46
+ ## 4. Drops / simplifies
47
+
48
+ - **The contradiction-ledger subsystem — accumulation buckets, per-event caps, decline
49
+ half-lives, forensics holds, retargeting, cooldowns — is replaced by strength-weighted
50
+ revision** (owner decision 2026-08-25, settled). Safe because §5.6 reproduces its
51
+ behavior in one inequality: a challenger not yet strong enough loses today and gets
52
+ stronger by recurring, which is what accumulation was simulating. The bug family the
53
+ ledger minted (dangling targets, retarget-on-supersede, immortal pinned evidence — scar
54
+ §2.2) has no analog, because there is no second object to strand.
55
+ - **Materialized decay — a daily pass rewriting every memory's strength into its file — is
56
+ released** (owner rescope 1, settled). Strength is a pure function of stored state and
57
+ the clock; `sleep/` materializes it into a cache column for ranking speed only. This
58
+ makes exactly-once decay (scar E8) true by construction rather than by a per-item stamp.
59
+ See open question 2 for the recorded revisit condition.
60
+ - **v1's four gradient bands collapse to three** (episodic / semantic / identity).
61
+ **SETTLED — owner ruling 2026-08-25.** "Consolidating" named a transition, and v1's own
62
+ crossing telemetry reads as movement between the other three.
63
+ - **v1's separate salience-strength and gradient-position collapse into one number.**
64
+ **SETTLED — owner ruling 2026-08-25.** v1 ran two, decayed one, ranked on a blend, and
65
+ spent a release cycle discovering one was inert (10,470 of 12,375 traces at exactly 0).
66
+ One number cannot go inert unnoticed. Band membership becomes decay-sensitive for the
67
+ lower bands — intended, and now §5.3's law.
68
+
69
+ ## 5. Contract
70
+
71
+ **Inputs** — per memory: `salience{novelty, relevance, emotional, predictive}`, `kind`,
72
+ `birth_day`, `uses`, `last_used_day`, `consolidated`, `protected`; the lived day `d`; and,
73
+ for the similarity functions, embedding vectors *supplied by the caller*.
74
+ **Outputs** — numbers and verdicts only: `strength`, `band`, a reinforcement delta, a
75
+ revision verdict, a dedup verdict, a prune verdict.
76
+
77
+ `d` = lived-day integer. `k` = kind. `v(m)` = m's embedding, supplied. `cos` = cosine.
78
+
79
+ ### 5.1 Salience, fixed at encoding
80
+
81
+ ```
82
+ sal(m) = mean( novelty, relevance, emotional, predictive ) # v0, verbatim
83
+ novelty(m) = 1 − max( cos( v(m), v(e) ) for e in E(m) ) # prediction error
84
+ ```
85
+
86
+ `E(m)` is the schema slice m was encoded against (beliefs + current state) unioned with its
87
+ `K = 8` nearest existing memories (TUNABLE; v1's semantic seed top-M). `E(m)` empty — a
88
+ blind chunk — yields `novelty = null`, recorded, **never defaulted to a number** (scar §2.9:
89
+ blind encoding must be countable, not invisible); `sal(m)` is then the mean of the three
90
+ author-supplied dimensions (the null case specified, not implicit — review finding 2). The
91
+ other three dimensions are
92
+ author-supplied, and a claimed salience is a **floor**: `sal(m) ≥ sal_claimed(m)`, clamped
93
+ at the proposal→memory seam, any lift logged [v1 §4.1 G3].
94
+
95
+ A memory whose author claimed **nothing** takes its channel's default floor, applied at the
96
+ same seam and only when `claimed` is null: `AUTHORED_DEFAULT_CLAIM = 0.25` on the lived
97
+ channel, nothing at all on the others. The number is bounded rather than chosen:
98
+ `0.25 + cons = 0.45 < THETA_SEM`, so the default alone can never park a memory in the
99
+ semantic band — the arithmetic form of the F5 scar. A default is recorded as `defaulted`
100
+ (`salience.defaulted`, plus `meta.claimedDefault` on the row), never as a lift, and an
101
+ explicit claim — however low — is never overridden. See NOTES.md item 16.
102
+
103
+ ### 5.2 Strength — the one number
104
+
105
+ ```
106
+ rep(m) = min( 0.12 × uses(m), 0.5 ) # v0, verbatim; TUNABLE
107
+ cons(m) = 0.2 if consolidated(m) else 0 # v0, verbatim; TUNABLE
108
+ base(m) = max( ω_sal(k) × sal(m), ω_rep(k) × rep(m) ) + cons(m) # MAX, not product
109
+ strength(m, d) = clamp01( base(m) × D(m, d) )
110
+ ```
111
+
112
+ `base` is monotone non-decreasing (salience is fixed, `uses` only rises). The repetition arm
113
+ alone tops out at `0.5 + 0.2 = 0.70`, below `Θ_id = 0.85` [v1 §10 G11] — and after review
114
+ finding 2, the salience arm cannot walk in either: **identity is reached only through §5.3's
115
+ explicit promotion (≥ N distinct lived days) or declared revision — never at birth, by
116
+ either arm.**
117
+
118
+ Per-kind constants. `ω` reads v1 §4.3's *gradient driver* column; **TUNABLE,
119
+ calibration-required** — v1 recorded which arm drives, not a weight, so the non-driving arm's
120
+ number is a proposed reading:
121
+
122
+ | kind | driver (v1) | ω_sal | ω_rep | κ decay mult. (v1) | ι revision inertia (v1) |
123
+ |---|---|---|---|---|---|
124
+ | self | salience | 1.0 | 0.0 | 0.70 | 0.9 |
125
+ | person | salience | 1.0 | 0.0 | 0.75 | 0.8 |
126
+ | entity | both | 1.0 | 1.0 | 0.85 | 0.5 |
127
+ | skill | repetition | 0.4 | 1.0 | 0.50 | 0.25 |
128
+ | place | repetition | 0.4 | 1.0 | 0.85 | 0.25 |
129
+ | fact | both | 1.0 | 1.0 | 1.00 | 0.2 |
130
+
131
+ ### 5.3 Bands
132
+
133
+ *(Rewritten 2026-08-25 after adversarial review findings 2 and 3: the original
134
+ base-evaluated bands were a one-way ratchet with no exit from semantic, and a single
135
+ salience-claimed self-write could be BORN into the identity band — decay-exempt,
136
+ unprunable, and unrevisable. Both closed below. The §4 note "band membership becomes
137
+ decay-sensitive — intended" is the law; the earlier base-evaluated text was the error.)*
138
+
139
+ ```
140
+ band(m, d) = identity if promoted(m) # explicit crossing only
141
+ semantic if strength(m, d) ≥ Θ_sem = 0.50 # TUNABLE, decay-sensitive
142
+ episodic otherwise
143
+ ```
144
+
145
+ - **Nothing is born into identity** (owner ruling, N = 3). At birth, band ≤ semantic
146
+ regardless of claimed salience. Identity is entered only by: (a) a declared revision
147
+ landing on an existing identity element — the successor inherits membership — or (b)
148
+ **promotion at consolidation** after `base ≥ Θ_id = 0.85` (TUNABLE) *and* reinforcement
149
+ on **≥ N = 3 distinct lived days**. The same number, with the same ancestry, as the
150
+ slow-kind revision pace — one rationale, used twice (Amendment 15).
151
+ - **Promotion is an explicit, counted crossing event** — a distinct record, never an
152
+ emergent side effect (scar §2.4) — and **identity-band membership is enumerable on
153
+ demand** beside the protected list: permanence and inspectability scale together
154
+ (scar §2.19).
155
+ - **Identity stays sticky by design**: decay-exempt (`D = 1`), demoted only by revision —
156
+ the named deviation of §2 stands. **Semantic/episodic are evaluated on decayed
157
+ `strength`**: a faded semantic memory demotes to episodic and gains the prune exit —
158
+ every band now names its way out (scar §2.17 restored), and G12's symmetry counter
159
+ counts something that can actually move both ways.
160
+ - The systems-consolidation analog is exact: nothing becomes core identity the day it
161
+ happens; it consolidates in over lived days, or arrives by deliberate revision.
162
+
163
+ ### 5.4 Decay — Ebbinghaus over lived days
164
+
165
+ ```
166
+ D(m, d) = 1 if band(m) == identity # named deviation
167
+ = exp( −( d − last_used_day(m) ) / S(m) ) otherwise
168
+ S(m) = S_base × (1 + β × ln(1 + uses(m))) / κ(k) # stability, lived days
169
+ S_base = 60 β = 0.5 # both TUNABLE
170
+ ```
171
+
172
+ - **The active-day clock is the only clock** [E8]: `d` counts days lived, rolling at
173
+ `boundary_hour = 4` local (TUNABLE) — a UTC rollover splits one lived evening into two
174
+ days and corrupts every occasion count downstream [v1 §11 G2].
175
+ - **Retrieval resets the curve — the testing effect.** A credited use sets
176
+ `last_used_day := d` and raises `S`, so the next interval is longer. `β` is logarithmic so
177
+ a well-used memory slows its decay without becoming immortal, mirroring v0's capped access
178
+ bonus.
179
+ - `κ` **divides**: a fact (`κ=1.00`) erodes fastest, a skill (`κ=0.50`) slowest — exactly as
180
+ v1's multiplier column reads.
181
+ - **Decay is idempotent by construction.** `D` is a pure function of `d`; there is no step to
182
+ run twice. v1 needed a per-item `last_decayed_day` stamp to make a monotonic subtraction
183
+ crash-safe (E8's widening); this shape does not.
184
+ - `S_base = 60` reproduces v0's `−0.015 × age_days` slope over roughly the first month, then
185
+ flattens — which is the point of the curve.
186
+
187
+ ### 5.5 Reinforcement
188
+
189
+ ```
190
+ w = 1.00 referenced by the reply | 0.25 surfaced-unused | 0.00 footnoted # TUNABLE
191
+ uses(m) += w ; last_used_day(m) := d (only when w > 0)
192
+ ```
193
+
194
+ At most one credited occasion per memory per lived day, and never on its birth day [v1 §10
195
+ G9]. Credit is retrospective, resolved at the boundary when the reply is known [v1 §10 G1].
196
+ The ignorable tier never trains.
197
+
198
+ ### 5.6 Revision — declared, pressure-accumulated, no second object
199
+
200
+ *(Rewritten 2026-08-25 after adversarial review finding 1: the original single-shot
201
+ inequality `F = strength × σ` had a ceiling at σ — a well-held belief was arithmetically
202
+ unrevisable, and the 08-24 exhibit would not have fired. The fix restores the ledger's SUM
203
+ in one field, under Amendment 15's earned-machinery rule: the simple version failed with a
204
+ named failure, in review, before shipping.)*
205
+
206
+ The writer declares `updates: <id>`. The declaration establishes *that* this is a revision;
207
+ physics decides whether it lands — today, or after sustained challenge.
208
+
209
+ ```
210
+ F(new→old) = strength(new, d) × sal(new) # author-assessed evidence weight;
211
+ # novelty plays NO role here (see below)
212
+ P(old) += F(new→old) # challenge pressure — a FIELD ON THE
213
+ # TARGET row, never a second object
214
+ REVISE iff P(old) > ι(kind(old)) × strength(old, d)
215
+ ```
216
+
217
+ - **One credited challenge per target per lived day** (mirrors §5.5's occasion rule): no
218
+ session can spam a belief into flipping. **And for slow kinds only (`ι ≥ 0.8`: self,
219
+ person), the credited daily force is capped at `F_DAY_CAP_SLOW = 0.35` (TUNABLE)** —
220
+ added at implementation (2026-08-25) when the build surfaced that without it one
221
+ flawless claimed-maximal challenge (F = 1.0) crosses even the highest self bar (0.9) in
222
+ a single day, making the ratified "~3 lived days to overturn a friend-model" an
223
+ approximation rather than a bound. With the cap, ≥ 3 lived days is arithmetic
224
+ (0.35 × 3 > 0.9). Entity/fact/skill/place (`ι ≤ 0.5`) are deliberately uncapped: one
225
+ clear, strong correction still flips world-state same-day, as in v1.
226
+ - **Every increment is logged** — lived day, challenger id, contributed F. The pressure
227
+ history IS the evidence record, rendered as a story by the dashboard: the ledger's
228
+ explainability at a hundredth of its machinery.
229
+ - **P decays like everything else** — the same curve family, keyed to the last challenge
230
+ day — so an abandoned challenge fades instead of lying in ambush.
231
+ - **On REVISE:** the old version is marked superseded with lineage, stays resolvable for
232
+ `H = 90` lived days (TUNABLE default — assistant-recommended, not owner-ruled), and the
233
+ successor starts with `P = 0`. Supersession carries or resets the field *on the row* —
234
+ there is no second object to strand, so scar §2.2's dangling family cannot recur.
235
+ - **Novelty is out of the force term by design** (review condition (c)): σ was doing double
236
+ duty as detector and magnitude, and because novelty is computed against context that
237
+ *contains the target* when the author was informed, it rewarded blind challenges over
238
+ informed ones. The declaration carries intent; `sal(new)` — the author's own
239
+ how-much-this-mattered — carries magnitude; novelty returns to encoding salience (§5.1)
240
+ only. The cosine negation-blindness caveat is thereby moot on this path.
241
+ - Identity-band elements are revisable through this same arithmetic — the review's
242
+ unrevisability ceiling is resolved by summation.
243
+
244
+ ### 5.7 Dedup
245
+
246
+ ```
247
+ identical content hash, or cos( v(new), v(orig) ) ≥ τ_dup = 0.95 → merge: uses(orig) += 1
248
+ below τ_dup → leave both alone
249
+ ```
250
+
251
+ Ambiguous near-duplicates are **left alone** (owner decision) — accepted rent, paid for zero
252
+ substrate confabulation [v1 §4.2 G9]. `τ_dup` is **calibration-required**: in v1's space
253
+ arbitrary same-corpus pairs sat at median cosine 0.576, so an intuited floor is inert (scar
254
+ §2.8). **A memory that declares `updates:` is never deduplicated into its target** —
255
+ otherwise a topically-close refutation merges into the belief it refutes and *reinforces*
256
+ it: the one-way ratchet of scar §2.10, rebuilt by accident. **Nor is a revision's
257
+ SUCCESSOR ever the losing candidate of a same-hash merge**: the successor carries the
258
+ challenger's own words (§5.6), so their bodies are identical by construction and the hash
259
+ rule would archive one of them on the revision's own evening. The caller supplies the
260
+ lineage; this module names the refusal. Both refusals are checked before hash and before
261
+ cosine. *(8b added 2026-09-04, the first
262
+ store that ever crossed the bar: the successor lost the id tie-break and the revised
263
+ belief stopped being a belief.)*
264
+
265
+ ### 5.8 Forgetting
266
+
267
+ Only physics forgets (owner decision): no model, on any path, holds delete power.
268
+
269
+ ```
270
+ PRUNE(m,d) iff strength(m,d) < φ = 0.02 # TUNABLE
271
+ and (d − last_used_day(m)) ≥ D_floor = 90 # TUNABLE, lived days
272
+ and band(m) == episodic and not protected(m)
273
+ and m is neither successor nor predecessor in a live revision chain
274
+ ```
275
+
276
+ A prune is recorded — counts, kind, dates, never a body and never a content hash (scar
277
+ §2.20) — and is the only physics-driven removal. Everything else merely fades: a
278
+ low-strength memory is still present and still retrievable by a strong enough cue.
279
+
280
+ ### 5.9 Guarantees
281
+
282
+ **[M]** mechanized · **[A]** advisory (scar §2.6's razor).
283
+
284
+ 1. **[M]** Physics makes no model calls and performs no I/O. Vectors are inputs; this module
285
+ never fetches one. A test asserts it imports nothing from `store/`, `encode/`, or any
286
+ client.
287
+ 2. **[M]** Salience is fixed at birth; a claimed salience is a floor, clamped at the seam,
288
+ and a lift emits an event. An UNCLAIMED memory takes its channel's default floor —
289
+ recorded as a default, not as a lift — and no default can reach `THETA_SEM` on its own.
290
+ 3. **[M]** `base` is monotone non-decreasing: reinforcement re-lifts what decay eroded;
291
+ nothing demotes what salience earned.
292
+ 4. **[M]** Repetition never reaches the identity band — structurally, from the cap
293
+ arithmetic, not from a removable check.
294
+ 5. **[M]** Exactly-once decay, by being a pure function of the clock rather than a step.
295
+ 6. **[M]** One lived-day function, with a totality test over its call sites (scar §2.4).
296
+ 7. **[M]** Revision requires a declared `updates:` target. There is no inferred-revision
297
+ path, and no arithmetic here edits a memory that was not named.
298
+ 8. **[M]** A declared revision is never merged into its target by dedup.
299
+ **8b. [M]** A revision's successor is never the losing candidate of a same-hash
300
+ merge, and never merges with its challenger in either direction — the lineage is a
301
+ store fact the caller supplies, the refusal is named
302
+ (`revision-successor-never-merged`), and it is checked before hash and cosine.
303
+ 9. **[M]** Superseded versions stay resolvable for `H` lived days; nothing here deletes one.
304
+ 10. **[M]** Prune is gated on all five conditions and is recorded; no model-reachable caller
305
+ can invoke it.
306
+ 11. **[A]** The per-kind tables are v1's calibration, not law. They ship with a recorded
307
+ calibration and a fixture-bounded window, or disabled (scar §2.8).
308
+ 12. **[M]** Up-moves and down-moves are counted separately, per kind, with a stated expected
309
+ ratio — the symmetry counter that made v1's one-way ratchet visible (scar §2.10).
310
+
311
+ ## 6. Scars honored
312
+
313
+ **E8** (active-day clock, idempotent under replay) · **§2.2** (supersede is a graph
314
+ operation — answered by having one object, not two) · **§2.4** (symmetry counters; the
315
+ null-novelty record) · **§2.6** (mechanize invariants; instruct only preferences) ·
316
+ **§2.8** (no threshold ships unmeasured against the real space) · **§2.9** (blind encoding
317
+ is counted, not defaulted) · **§2.10** (strengthening without a live softening path is a
318
+ ratchet) · **§2.17** (every kind names its exit — here prune and supersede) · **§2.20**
319
+ (prune records carry no body and no hash).
320
+
321
+ ## 7. Open questions
322
+
323
+ 1. **Decay shape: flat vs exponential vs power-law — a THREE-way, decided by replay** (owner
324
+ ruling 2026-08-25: Ebbinghaus-family default, evidence picks). v1 ran flat per-lived-day
325
+ erosion (its README's objection was to *calendar* time, which this page does not use, and
326
+ flatness self-bounds crossing telemetry). This page defaults exponential. And engram —
327
+ the production ancestor — deliberately upgraded exponential → **power-law**, citing
328
+ Ebbinghaus/Wixted/Jost (review finding 4's addendum; line 12 wants that ancestry named).
329
+ All three are one line; `tools/replay` runs all three against v1's recorded month.
330
+ 2. **Lazy versus materialized strength.** Default here: pure function, materialized by
331
+ `sleep/` into a cache column for ranking. v1 materialized deliberately (ratified
332
+ 2026-08-08: "a memory stating its own current strength is directly trustworthy") with a
333
+ filed revisit trigger, and the harvest hands v2 this as an open choice with the evidence
334
+ attached. The recorded revisit condition survives: **a 50–100× store-size increase**
335
+ flips the cost argument (SYNTHESIS adjudication 3).
336
+ 3. **Do the non-driving arm weights (`ω = 0.4` for skill/place salience) exist at all?** v1
337
+ recorded a driver, not a weight. Zero is simpler and defensible.
338
+ 4. **Does `associate/`'s edge arithmetic belong on this page?** The module map's standing
339
+ check-in question; owned by `associate/CONTRACT.md` open question 1.
340
+ 5. **What is the honest floor-prune dwell time?** `φ` and `D_floor` are guesses. v1 never
341
+ pruned, so there is no measurement to inherit — the one constant here with no ancestry.