counterparts 0.3.2 → 0.3.3

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 (66) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/package.json +1 -1
  3. package/src/adapters/claude-code/NOTES.md +12 -0
  4. package/src/adapters/claude-code/bin/hook.ts +85 -22
  5. package/src/adapters/claude-code/config.ts +7 -0
  6. package/src/adapters/claude-code/doctor.ts +20 -4
  7. package/src/adapters/claude-code/hooks.ts +157 -6
  8. package/src/adapters/claude-code/index.ts +3 -0
  9. package/src/adapters/cli/commands.ts +11 -0
  10. package/src/adapters/cli/mechanisms.ts +46 -21
  11. package/src/adapters/dashboard/registries.ts +4 -0
  12. package/src/adapters/dashboard/web/README.md +19 -11
  13. package/src/adapters/dashboard/web/flow.ts +2 -0
  14. package/src/adapters/dashboard/web/mechanisms/emotional/index.js +9 -5
  15. package/src/adapters/dashboard/web/mechanisms/prospective/index.js +6 -3
  16. package/src/adapters/dashboard/web/narrate.ts +8 -0
  17. package/src/adapters/dashboard/web/pages/health/sections/checks.js +17 -1
  18. package/src/adapters/dashboard/web/pages/self/index.js +55 -16
  19. package/src/adapters/dashboard/web/pages/self/sections/journal.js +75 -19
  20. package/src/adapters/dashboard/web/pages/self/sections/page.js +108 -65
  21. package/src/adapters/dashboard/web/pages/self/sections/settling.js +94 -99
  22. package/src/adapters/dashboard/web/pages/self/sections/wake.js +31 -15
  23. package/src/adapters/dashboard/web/pages/self/self.css +119 -59
  24. package/src/adapters/dashboard/web/pages/self/state.js +23 -0
  25. package/src/adapters/dashboard/web/pages/self/tips.js +50 -0
  26. package/src/adapters/dashboard/web/shared/memory-modal.js +9 -0
  27. package/src/adapters/dashboard/web/views/mechanisms.ts +85 -14
  28. package/src/adapters/dashboard/web/views/memory.ts +15 -1
  29. package/src/adapters/dashboard/web/views/mind.ts +130 -6
  30. package/src/adapters/feelings-line.ts +74 -0
  31. package/src/adapters/fired.ts +78 -18
  32. package/src/adapters/mcp/CONTRACT.md +8 -0
  33. package/src/adapters/mcp/NOTES.md +45 -0
  34. package/src/adapters/mcp/server.ts +165 -6
  35. package/src/adapters/mcp/tools.ts +51 -4
  36. package/src/core/bridge.ts +21 -16
  37. package/src/core/counterpart.ts +309 -6
  38. package/src/core/encode/CONTRACT.md +7 -1
  39. package/src/core/feelings-wheel.ts +171 -13
  40. package/src/core/mint.ts +9 -0
  41. package/src/core/physics/CONTRACT.md +43 -0
  42. package/src/core/physics/NOTES.md +94 -0
  43. package/src/core/physics/index.ts +98 -6
  44. package/src/core/prospective/CONTRACT.md +35 -6
  45. package/src/core/prospective/INTERFACE-GAPS.md +10 -5
  46. package/src/core/prospective/NOTES.md +175 -4
  47. package/src/core/prospective/derive.ts +32 -3
  48. package/src/core/prospective/index.ts +362 -39
  49. package/src/core/prospective/tunables.ts +18 -1
  50. package/src/core/prospective/windows.ts +104 -46
  51. package/src/core/recall/CONTRACT.md +28 -0
  52. package/src/core/recall/NOTES.md +39 -0
  53. package/src/core/recall/activate.ts +32 -5
  54. package/src/core/recall/gate.ts +7 -1
  55. package/src/core/recall/index.ts +19 -0
  56. package/src/core/recall/mood.ts +106 -0
  57. package/src/core/recall/tunables.ts +26 -0
  58. package/src/core/remember/index.ts +1 -0
  59. package/src/core/remember/proposals.ts +86 -3
  60. package/src/core/self/identity.ts +20 -1
  61. package/src/core/store/CONTRACT.md +9 -2
  62. package/src/core/store/NOTES.md +20 -0
  63. package/src/core/store/feelings.ts +23 -6
  64. package/src/core/store/index.ts +107 -10
  65. package/src/core/store/operational.ts +15 -1
  66. package/src/core/types.ts +9 -0
@@ -4,17 +4,18 @@
4
4
  * Split out of `web/views.ts`, which re-exports every public name from here;
5
5
  * the four rules in that file's header apply to every line below.
6
6
  */
7
- import { TUNABLES as PHYSICS, kindPhysics, promotionEligibility, sal } from "../../../../core/physics/index.js";
7
+ import { TUNABLES as PHYSICS, kindPhysics, promotionEligibility, sal, salArm } from "../../../../core/physics/index.js";
8
8
  import { isConfidential } from "../../../../core/recall/index.js";
9
9
  import {
10
10
  FRAMING,
11
11
  LANE_ORDER,
12
12
  SELF_PAGE_REVISED_EVENT,
13
13
  chapterModels,
14
+ dayBefore,
14
15
  pageSections,
15
16
  readChapterLead,
16
17
  } from "../../../../core/self/index.js";
17
- import type { PageVersion } from "../../../../core/self/index.js";
18
+ import type { PageVersion, PageWriterRun, PageWriterStatus } from "../../../../core/self/index.js";
18
19
  import { TUNABLES as SLEEP, isJournal } from "../../../../core/sleep/index.js";
19
20
  import type { Band, Kind } from "../../../../core/types.js";
20
21
  import { NEVER, NONE } from "../../layout.js";
@@ -92,6 +93,8 @@ export interface MindView {
92
93
  readonly reason: string | null;
93
94
  readonly version: number;
94
95
  readonly stale: boolean;
96
+ /** Calendar days without a rewrite past which `stale` turns true (`self/`'s PAGE_STALE_DAYS). */
97
+ readonly staleAfter: number;
95
98
  readonly core: string;
96
99
  readonly lately: string;
97
100
  readonly headed: boolean;
@@ -119,6 +122,34 @@ export interface MindView {
119
122
  readonly journalAbsent: string | null;
120
123
  /** Chapters past the ones sent. 0 when all of them are here. */
121
124
  readonly journalMore: number;
125
+ /** What the nightly page writer did on the newest night it has a row for. */
126
+ readonly writer: WriterLine;
127
+ }
128
+
129
+ /**
130
+ * The page writer's newest night, in plain words (2026-09-26, the self tab's
131
+ * side column; an experiment). Read from the newest `self.page.writer.ran` row
132
+ * through `self/`'s own `pageWriterStatus`, so a claim whose day has passed
133
+ * reads the way doctor reads it, and a derived reading is worded as ours.
134
+ */
135
+ export interface WriterLine {
136
+ /** False when the log holds no run at all. */
137
+ readonly ran: boolean;
138
+ /** The night's date (the day the run read), "" when none. */
139
+ readonly about: string;
140
+ readonly outcome: string | null;
141
+ /** True when no row says this: it is read from a claim whose day is over. */
142
+ readonly derived: boolean;
143
+ /** True when that night is last night. */
144
+ readonly lastNight: boolean;
145
+ /** "Last night", "The night of Jul 9", or "" when nothing ran. */
146
+ readonly when: string;
147
+ /** What it did, in plain words. */
148
+ readonly what: string;
149
+ /** The two together, as the page prints it. */
150
+ readonly line: string;
151
+ /** `(never run)` when the log holds no run; null otherwise. */
152
+ readonly absent: string | null;
122
153
  }
123
154
 
124
155
  /** One state of the page: an archived version, or the one standing now. */
@@ -253,9 +284,7 @@ export function mindView(src: DashboardSource): MindView {
253
284
  const stories = storyViews(src);
254
285
 
255
286
  return {
256
- opening:
257
- `Lived day ${day}. Who I am, in my own words — and, under it, how that has changed, ` +
258
- "what is slowly settling into the core, what the next session will be handed, and the journal.",
287
+ opening: `Day ${day} · Who I am`,
259
288
  identity,
260
289
  identityAbsent: e.identity.length === 0 ? (everLived ? NONE : NEVER) : null,
261
290
  guarded,
@@ -283,6 +312,7 @@ export function mindView(src: DashboardSource): MindView {
283
312
  reason: page.reason,
284
313
  version: page.version,
285
314
  stale: src.self.pageStale(page),
315
+ staleAfter: src.self.tunables.PAGE_STALE_DAYS,
286
316
  // The three the type declares, NAMED — a spread of `pageSections`
287
317
  // also carried `preamble` into the JSON, which `tsc` cannot catch
288
318
  // through a spread (adversarial review n2).
@@ -313,9 +343,103 @@ export function mindView(src: DashboardSource): MindView {
313
343
  wakeParts: wake.ok ? wakeParts(wake.text, page !== null) : [],
314
344
  wakeBudget: lastBudget(src),
315
345
  ...journal(src, JOURNAL_LIMIT, everLived ? NONE : NEVER),
346
+ writer: writerLine(src),
316
347
  };
317
348
  }
318
349
 
350
+ // ─────────────────────────────────────────────────────────────────────────────
351
+ // the page writer's last night, in plain words
352
+ // ─────────────────────────────────────────────────────────────────────────────
353
+
354
+ /** Why a run did not happen or did not finish, in words. A code nobody mapped
355
+ * keeps its own words (hyphens read as spaces) rather than being guessed at. */
356
+ const WRITER_REASON: Record<string, string> = {
357
+ watchdog: "it ran out of time",
358
+ "no-room": "the session had no room to ask it",
359
+ "scope-question": "the first-launch question took its turn",
360
+ off: "the writer is switched off",
361
+ observer: "the session was read-only",
362
+ "no-previous-day": "there was no earlier day to read",
363
+ "already-claimed": "that night was already handled",
364
+ "asks-spent": "it had already been asked as often as it may",
365
+ "no-memories": "nothing was remembered that day",
366
+ "not-host-mode": "it is not set to run on its own",
367
+ };
368
+
369
+ export function writerReason(detail: string): string {
370
+ const d = detail.trim();
371
+ if (d === "") return "no reason was recorded";
372
+ const known = WRITER_REASON[d];
373
+ if (known !== undefined) return known;
374
+ const exit = /^exit (\S+)$/.exec(d);
375
+ if (exit !== null) return `it stopped with an error (exit ${exit[1] as string})`;
376
+ return d.replace(/[-_]+/g, " ");
377
+ }
378
+
379
+ const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
380
+
381
+ /** "2026-07-09" → "Jul 9"; anything else as it came. */
382
+ function shortDay(iso: string): string {
383
+ const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(iso);
384
+ if (m === null) return iso;
385
+ return `${MONTHS[Number(m[2]) - 1] ?? (m[2] as string)} ${Number(m[3])}`;
386
+ }
387
+
388
+ /** What `writerWords` reads: `pageWriterStatus`'s answer, or null when the log
389
+ * holds no run at all. */
390
+ export type WriterReading =
391
+ | (Pick<PageWriterStatus, "about" | "outcome" | "derived"> & { readonly run: Pick<PageWriterRun, "detail"> | null })
392
+ | null;
393
+
394
+ /** The words for one night. Pure, so every outcome is tested without a store. */
395
+ export function writerWords(status: WriterReading, yesterday: string): WriterLine {
396
+ if (status === null) {
397
+ const none = "No run recorded yet";
398
+ return { ran: false, about: "", outcome: null, derived: false, lastNight: false, when: "", what: none, line: none, absent: NEVER };
399
+ }
400
+ const detail = status.run?.detail ?? "";
401
+ let what: string;
402
+ switch (status.outcome) {
403
+ case "revised":
404
+ what = "rewrote it";
405
+ break;
406
+ case "nothing-to-say":
407
+ // A derived reading is OURS: the session was handed the day and nothing
408
+ // came back. It must not read as something the writer reported.
409
+ what = status.derived ? "was handed the day and left it as is" : "read the day and kept it as is";
410
+ break;
411
+ case "refused":
412
+ what = `tried, but the rewrite was turned away — ${writerReason(detail)}`;
413
+ break;
414
+ case "failed":
415
+ // Derived: a `started` claim still standing once its day was over.
416
+ what = status.derived ? "started and never finished" : `couldn't run — ${writerReason(detail)}`;
417
+ break;
418
+ case "asked":
419
+ what = "was asked at today's first session; no answer yet";
420
+ break;
421
+ case "started":
422
+ what = "is running now";
423
+ break;
424
+ default:
425
+ what = status.run === null ? "nothing ran, and nothing says why" : `didn't run — ${writerReason(detail)}`;
426
+ }
427
+ const lastNight = status.about !== "" && status.about === yesterday;
428
+ const when = lastNight ? "Last night" : status.about === "" ? "Its last run" : `The night of ${shortDay(status.about)}`;
429
+ return { ran: true, about: status.about, outcome: status.outcome, derived: status.derived, lastNight, when, what, line: `${when}: ${what}`, absent: null };
430
+ }
431
+
432
+ function writerLine(src: DashboardSource): WriterLine {
433
+ try {
434
+ const today = src.self.calendarToday();
435
+ const last = src.self.pageWriterRuns()[0];
436
+ if (last === undefined) return writerWords(null, dayBefore(today));
437
+ return writerWords(src.self.pageWriterStatus(last.about, today), dayBefore(today));
438
+ } catch {
439
+ return writerWords(null, "");
440
+ }
441
+ }
442
+
319
443
  /** How many chapters the journal sends. The rest are counted, not dropped silently. */
320
444
  const JOURNAL_LIMIT = 60;
321
445
 
@@ -430,7 +554,7 @@ function settlingView(
430
554
  const v = promotionEligibility(p);
431
555
  if (v.blockedBy.includes("already-identity")) continue;
432
556
  const k = kindPhysics(p.kind);
433
- const best = Math.max(k.wSal * sal(p.salience), k.wRep * PHYSICS.REP_CAP) + PHYSICS.CONS_BONUS;
557
+ const best = Math.max(k.wSal * salArm(p), k.wRep * PHYSICS.REP_CAP) + PHYSICS.CONS_BONUS;
434
558
  if (best < v.threshold) {
435
559
  outOfReach += 1;
436
560
  continue;
@@ -0,0 +1,74 @@
1
+ /**
2
+ * A memory's feelings as ONE plain line, for the surfaces where a memory's
3
+ * detail is shown (the dashboard's memory view, `counterparts ask --full`):
4
+ *
5
+ * you: worried 0.6 (now 0.3) · me: tender 0.4
6
+ *
7
+ * "you" is the owner — the person reading — and "me" is the counterpart
8
+ * (emotion part A, owner decision 6). The number is the strength as recorded;
9
+ * "now" is the same feeling softened by the lived days since (physics §5.10),
10
+ * shown only when it has moved. The word is the wheel word, or the writer's own
11
+ * for an `other`. `carried_by` is not shown: it is a pointer at the moment,
12
+ * and it stays with the export.
13
+ */
14
+ import { softenedFeeling } from "../core/physics/index.js";
15
+ import type { FeelingRow } from "../core/store/index.js";
16
+
17
+ /** What each `whose` is called on a surface the owner reads. */
18
+ export function whoseLabel(whose: string): string {
19
+ return whose === "owner" ? "you" : whose === "self" ? "me" : whose;
20
+ }
21
+
22
+ /** The word a feeling is shown as: the wheel word (unqualified), or the writer's own. */
23
+ export function feelingWord(row: Pick<FeelingRow, "emotion" | "other_word">): string {
24
+ if (row.emotion === "other") return row.other_word ?? "other";
25
+ const dot = row.emotion.indexOf(".");
26
+ return dot >= 0 ? row.emotion.slice(dot + 1) : row.emotion;
27
+ }
28
+
29
+ export interface ShownFeeling {
30
+ readonly who: string;
31
+ readonly word: string;
32
+ readonly strength: number;
33
+ readonly now: number;
34
+ }
35
+
36
+ export function shownFeelings(
37
+ rows: readonly Pick<FeelingRow, "whose" | "emotion" | "other_word" | "strength">[],
38
+ ageDays: number,
39
+ ): ShownFeeling[] {
40
+ return rows.map((r) => ({
41
+ who: whoseLabel(r.whose),
42
+ word: feelingWord(r),
43
+ strength: r.strength,
44
+ now: softenedFeeling(r.strength, ageDays),
45
+ }));
46
+ }
47
+
48
+ const n1 = (x: number): string => x.toFixed(1);
49
+
50
+ /**
51
+ * The line, grouped by person — the owner's first, then the counterpart's, then
52
+ * anyone else — or "" when there are no feelings.
53
+ */
54
+ export function feelingsLine(
55
+ rows: readonly Pick<FeelingRow, "whose" | "emotion" | "other_word" | "strength">[],
56
+ ageDays: number,
57
+ ): string {
58
+ const shown = shownFeelings(rows, ageDays);
59
+ if (shown.length === 0) return "";
60
+ const order = (who: string): number => (who === "you" ? 0 : who === "me" ? 1 : 2);
61
+ const people = [...new Set(shown.map((s) => s.who))].sort((a, b) => order(a) - order(b) || (a < b ? -1 : 1));
62
+ return people
63
+ .map((who) => {
64
+ const words = shown
65
+ .filter((s) => s.who === who)
66
+ .map((s) => {
67
+ const at = n1(s.strength);
68
+ const now = n1(s.now);
69
+ return now === at ? `${s.word} ${at}` : `${s.word} ${at} (now ${now})`;
70
+ });
71
+ return `${who}: ${words.join(", ")}`;
72
+ })
73
+ .join(" · ");
74
+ }
@@ -55,6 +55,8 @@
55
55
  import { TUNABLES as ENCODE } from "../core/encode/tunables.js";
56
56
  import { addDays, daysBetween as calendarDaysBetween, localDate } from "../core/time.js";
57
57
  import type { EventRow, ReadOnlyStore } from "../core/store/index.js";
58
+ import { rowToPhysics } from "../core/store/index.js";
59
+ import { emotionalIntensity } from "../core/physics/index.js";
58
60
  import type { DurableEventName } from "./dashboard/registries.js";
59
61
 
60
62
  /** The window every count on this page is measured over. Seven CALENDAR days,
@@ -140,8 +142,13 @@ export const STATE_MEANING: Record<FiredState, string> = {
140
142
  */
141
143
  export type ProbeId =
142
144
  | "edges"
145
+ /** Live memories carrying at least one recorded feeling (dated by the newest). */
146
+ | "feelings"
147
+ /** Live memories whose emotional intensity is above 0 (dated by birth day). */
148
+ | "emotion.weighted"
143
149
  | "prospective.armed"
144
150
  | "prospective.fired"
151
+ | "prospective.dated"
145
152
  | "protected"
146
153
  | "removals"
147
154
  | `versions:${string}`;
@@ -353,6 +360,30 @@ export const MECHANISMS: readonly Mechanism[] = [
353
360
  )} (encode/tunables.ts) — a named decision, not a fault`,
354
361
  }),
355
362
  },
363
+ // EMOTION PART A (2026-09-26): feelings weigh now. Three rows, because the
364
+ // three halves leave three different traces — a feeling on a row, a row
365
+ // whose intensity lifts and slows it, and a turn whose mood lifted a memory.
366
+ {
367
+ id: "feelings",
368
+ label: "how something felt was recorded on a memory, the owner's or the self's",
369
+ module: "store/feelings.ts",
370
+ evidence: { kind: "probe", probe: "feelings" },
371
+ since: "2026-09-25",
372
+ },
373
+ {
374
+ id: "emotion-weight",
375
+ label: "a memory's strongest feeling holds it higher at birth and slows its fading",
376
+ module: "physics/ §5.10",
377
+ evidence: { kind: "probe", probe: "emotion.weighted" },
378
+ since: "2026-09-26",
379
+ },
380
+ {
381
+ id: "mood-match",
382
+ label: "a memory that felt the way someone feels now came to mind more easily",
383
+ module: "recall/mood.ts",
384
+ evidence: { kind: "event", names: ["recall.decision"], positive: "moodMatched" },
385
+ since: "2026-09-26",
386
+ },
356
387
  {
357
388
  id: "salience",
358
389
  label: "every memory is scored for novelty, relevance, feeling and usefulness as it is written",
@@ -735,26 +766,38 @@ export const MECHANISMS: readonly Mechanism[] = [
735
766
  },
736
767
  },
737
768
  {
738
- // STILL BLIND, and the rows are built and waiting (2026-09-20, E2).
739
- //
740
- // `prospective.fire` and `prospective.fire.refused` exist now and are
741
- // written by `Prospective.fire()`. What does NOT exist is a caller: the
742
- // only one in the tree is `tools/demo/seed.ts` (mechanism inventory §3 S4).
743
- // So pointing this row's evidence at the new name would make it read `new`
744
- // for two days and then `never` for ever — durable evidence asserted for a
745
- // mechanism nothing can make fire, which is the blind case wearing a never
746
- // label, and exactly the confusion this view exists to break.
747
- //
748
- // It goes back to event evidence the day the surfacing path spends a fire.
769
+ // A memory with a reminder date on it (2026-09-26): `note` and
770
+ // `session_end` write the `event_date` column now. The count the gauge
771
+ // reads as "dated memories held".
772
+ id: "prospective-dated",
773
+ label: "a memory was given a date to come back on",
774
+ module: "prospective/, mcp/tools.ts",
775
+ evidence: { kind: "probe", probe: "prospective.dated" },
776
+ },
777
+ {
778
+ // BACK ON EVENT EVIDENCE (2026-09-26). Until today the only caller of
779
+ // `fire()` was `tools/demo/seed.ts`, so this row was `blind` on purpose;
780
+ // `Counterpart#spendArrivals` now spends a fire whenever a date's cue
781
+ // actually surfaced in a turn. A QUIET reminder, the default.
749
782
  id: "prospective-fired",
750
783
  label: "that future date arrived and the reminder came back",
751
- module: "prospective/",
752
- evidence: {
753
- kind: "none",
754
- reason:
755
- "the two rows that would record it now exist (`prospective.fire`, `prospective.fire.refused`) and nothing calls `fire()` outside the demo seeder, so no row can land: `arrivals()` is read every turn but the fire budget is never spent. Wiring the surfacing path to spend it is what closes this, not another row.",
756
- },
757
- covers: ["prospective.fire", "prospective.fire.refused"],
784
+ module: "prospective/, counterpart.ts#spendArrivals",
785
+ evidence: { kind: "event", names: ["prospective.fire"] },
786
+ // The refusal row is ACCOUNTED FOR here, and deliberately not read as a
787
+ // refusal column: its reasons are budget and calendar ("already fired
788
+ // today", "held for after"), the "not yet" vocabulary `RefusalSource.only`
789
+ // exists to keep out of the blocked list.
790
+ covers: ["prospective.fire.refused"],
791
+ since: "2026-09-26",
792
+ },
793
+ {
794
+ // A PLAIN reminder told to the person on its day (2026-09-26): one row per
795
+ // memory, window and beat, latched.
796
+ id: "prospective-plain",
797
+ label: "a reminder marked plain was said plainly on its day",
798
+ module: "prospective/, claude-code/hooks.ts",
799
+ evidence: { kind: "event", names: ["prospective.plain"] },
800
+ since: "2026-09-26",
758
801
  },
759
802
 
760
803
  // ── the machinery underneath ─────────────────────────────────────────────
@@ -1647,6 +1690,21 @@ function readProbes(store: ReadOnlyStore, w: Window): Probed {
1647
1690
  for (const id of scanned) {
1648
1691
  const row = store.row(id);
1649
1692
  if (row !== undefined && row.archived === 0 && row.protected === 1) bump("protected");
1693
+ // Emotion part A: `row()` carries the strongest recorded feeling beside the
1694
+ // row, so only a memory that HAS one pays for the dated read.
1695
+ if (row !== undefined && row.archived === 0 && row.superseded_by === null) {
1696
+ if (emotionalIntensity(rowToPhysics(row)) > 0) bump("emotion.weighted", { livedDay: row.birth_day });
1697
+ if (row.feeling_peak !== null && row.feeling_peak !== undefined) {
1698
+ let newest: number | null = null;
1699
+ for (const f of store.feelingsFor(id)) if (newest === null || f.created_at > newest) newest = f.created_at;
1700
+ bump("feelings", { at: newest });
1701
+ }
1702
+ }
1703
+ // A live memory carrying a reminder date (schema v7's `event_date`), dated
1704
+ // by when it was written: the day a date was SET is the row's own moment.
1705
+ if (row !== undefined && row.archived === 0 && row.event_date !== null) {
1706
+ bump("prospective.dated", { at: row.created_at });
1707
+ }
1650
1708
  for (const edge of store.edgesFrom(id)) bump("edges", { livedDay: edge.last_day });
1651
1709
  for (const p of store.prospectiveFor(id)) {
1652
1710
  bump("prospective.armed");
@@ -1698,5 +1756,7 @@ function probeLabel(probe: ProbeId): string {
1698
1756
  if (probe === "protected") return "memories marked permanent";
1699
1757
  if (probe === "removals") return "the removal record";
1700
1758
  if (probe === "edges") return "the links table";
1759
+ if (probe === "feelings") return "memories carrying a recorded feeling";
1760
+ if (probe === "emotion.weighted") return "memories a feeling holds higher and fades slower";
1701
1761
  return `the ${probe.replace(".", " ")} table`;
1702
1762
  }
@@ -303,6 +303,14 @@ this scar's direct descendant) · **§2.7** (the note traverses the one write ch
303
303
  what a feeling's magnitude IS (a fired-cue count? a stated intensity the author
304
304
  supplies alongside the type?) — a design question, not a wiring one. Until then the
305
305
  author's own `emotional` score is the only route, which is why it is now exposed.
306
+ **ANSWERED 2026-09-25/26:** a stated intensity. `note` and `session_end` take
307
+ `feelings` (schema v7), each with its own `strength`; since emotion part A the
308
+ strongest of those and `emotional` is the memory's intensity, which lifts its height
309
+ and slows its decay (physics §5.10), and a recent one sets the mood recall matches
310
+ (recall G18). A lone `emotional` score was already kept on the row by `mint.ts`; the
311
+ battery now reads it the same way (`bridge.ts#dimensionsFrom` pads a missing
312
+ dimension with 0 instead of dropping all three). The stated-emotion gate still
313
+ supplies no number, and still must not.
306
314
  5. **Is four hours the right TTL?** CAL. Every Stop refreshes the clock and the ask is
307
315
  delivered AT a Stop, so the window only ever bounds the gap between an ask and its
308
316
  answer: four hours is far past any plausible think-time and comfortably inside a day,
@@ -662,3 +662,48 @@ the feelings, never the memory, and says so. No salience, decay or recall change
662
662
  - `other_word` is now in the published schema, so the schema and the reader agree.
663
663
  - **N6.** A note that did not land (a duplicate, a gate) answers
664
664
  `feelings: { stored: 0, reason: "memory-not-stored" }`.
665
+
666
+ ## 2026-09-26 — `eventDate` and `remind` on `note` and `session_end` (PR B)
667
+
668
+ An optional `eventDate` (a day, a month, a year or an `a..b` range, read by
669
+ `time.ts#parseCalendarDate`) and `remind: "plain" | "quiet"` on a `note` and on every
670
+ `session_end` entry, the write-up door's included. `readReminder` checks both BEFORE
671
+ anything is captured or minted: an unreadable date refuses the note, or that one entry,
672
+ as `event-date-unreadable` with the four shapes in `detail`; anything but the two words is
673
+ `remind-unknown`. The model converts "late October" itself — nothing here, or anywhere,
674
+ reads a date out of the text. A deposit that landed answers `reminder: { eventDate,
675
+ remind }` (plus a note when the date is a bare year, which never comes back on its own);
676
+ `remind` sent with no date is dropped and said (`reminder: { ignored: "remind" }`), and
677
+ the memory still lands. The `remind` description carries the owner's plain-vs-quiet
678
+ guidance: plain for a real deadline or an important date, or when
679
+ the person says it matters; quiet otherwise. What happens after the deposit is
680
+ `prospective/` NOTES §12.
681
+
682
+ **Review, same day (owner decision):** an explicit `eventDate` now qualifies a quiet
683
+ reminder whatever its salience — choosing a date is itself the importance signal — so the
684
+ description no longer says "about 0.6". The salience floor still gates a date a caller
685
+ extracted; decay (faded) and archival still keep a memory from arriving.
686
+
687
+ **Follow-ups, same day (review N7, N8).** `eventDate` also takes `null` (the schema type is
688
+ now `["string", "null"]`): on a revision it drops the date. `readReminder` passes `remind`
689
+ through only when it was SENT, so `remember/intake` can tell a left-out mode from a stated
690
+ one (`DateIntent`). The echo reports what was RECORDED, not what was sent: a revision that
691
+ carried a date answers `reminder: { eventDate, remind, from, carriedOver }`, and one that
692
+ dropped it `reminder: { cleared: true, from }` (the carry itself is `core/counterpart.ts`,
693
+ `prospective/` NOTES §13). A date whose last day is before the person's today —
694
+ `time.ts#todayIn` in the store's zone, off this server's injectable clock — is kept and
695
+ answered with `note: "That date has already passed — it won't come back as a reminder."`;
696
+ that note wins over the bare-year one. A plain past date is indeed never said; a quiet one
697
+ could still be cued in the week of grace after it, which the note does not spell out —
698
+ its job is to let the model catch a wrong year. The carry runs only for an `updates`
699
+ address that resolved as an ID (`Store#resolve` is id-only): a handle or title falls to
700
+ content matching, which carries nothing — so the `eventDate` description says "by its id".
701
+
702
+ **After the adversarial review of #247.** `from` in a carried or cleared reply names the
703
+ memory the reminder came FROM, which is not always the id the author sent: when that
704
+ memory's reminder had already moved on, the carry follows it (`Counterpart#reminderHolder`,
705
+ prospective NOTES §13), so a cancel or a reschedule sent against the first id still lands.
706
+ A revision that sends `eventDate: null` and reaches no dated memory now answers
707
+ `reminder: { cleared: false, note }` instead of nothing; a fresh note sending `null` (no
708
+ `updates`) still answers nothing, since a client that fills every optional field with null
709
+ would otherwise get the note on every deposit.