counterparts 0.3.39 → 0.3.41

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 (40) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/package.json +1 -1
  3. package/src/adapters/claude-code/doctor-open.ts +28 -0
  4. package/src/adapters/claude-code/doctor.ts +5 -1
  5. package/src/adapters/dashboard/registries.ts +3 -0
  6. package/src/adapters/dashboard/web/flow.ts +2 -0
  7. package/src/adapters/dashboard/web/lanes.ts +1 -0
  8. package/src/adapters/dashboard/web/narrate.ts +19 -0
  9. package/src/adapters/fired.ts +1 -1
  10. package/src/adapters/mcp/NOTES.md +59 -0
  11. package/src/adapters/mcp/server-words.ts +1 -1
  12. package/src/adapters/mcp/server.ts +43 -17
  13. package/src/adapters/mcp/tools.ts +23 -5
  14. package/src/adapters/remote/NOTES.md +2 -1
  15. package/src/adapters/update-check.ts +1 -1
  16. package/src/core/counterpart-events.ts +5 -1
  17. package/src/core/counterpart.ts +70 -11
  18. package/src/core/dream/reflect.ts +4 -2
  19. package/src/core/onboarding.ts +35 -7
  20. package/src/core/recall/CONTRACT.md +23 -2
  21. package/src/core/recall/NOTES.md +101 -0
  22. package/src/core/recall/activate.ts +188 -31
  23. package/src/core/recall/gate.ts +8 -2
  24. package/src/core/recall/index.ts +52 -11
  25. package/src/core/recall/prime.ts +7 -1
  26. package/src/core/recall/rated.ts +1 -1
  27. package/src/core/recall/render.ts +15 -2
  28. package/src/core/recall/session.ts +8 -4
  29. package/src/core/recall/tunables.ts +34 -4
  30. package/src/core/schemas/NOTES.md +8 -0
  31. package/src/core/schemas/tunables.ts +6 -1
  32. package/src/core/self/NOTES.md +77 -0
  33. package/src/core/self/briefing-room.ts +88 -12
  34. package/src/core/self/briefing.ts +114 -15
  35. package/src/core/self/identity.ts +40 -8
  36. package/src/core/self/index.ts +56 -23
  37. package/src/core/self/tunables.ts +12 -2
  38. package/src/core/self/work.ts +20 -0
  39. package/src/core/store/index.ts +4 -3
  40. package/src/core/store/reads-memories.ts +37 -7
@@ -105,8 +105,14 @@ export interface CandidateVerdict {
105
105
  /** `"link"` for a QUIET POINTER — a memory only links reached (2026-09-28,
106
106
  * `activate.ts#Candidate.linkOnly`). Its verdict is one of the ordinary ones;
107
107
  * this says which lane it came by. Absent for everything the conversation
108
- * reached. */
109
- readonly via?: "link";
108
+ * reached. `"see-also"` (2026-10-29, `activate.ts#seeAlso`): brought along because
109
+ * a memory the turn shows NAMES its id; `seeAlso.by` is that memory. */
110
+ readonly via?: "link" | "see-also";
111
+ /** SEE-ALSO (2026-10-29): the shown memory whose text named this one. Set
112
+ * only with `via: "see-also"`; its verdict is then `footnoted`, whatever
113
+ * the gate said of it on its own (the number fields are the gate's, or 0
114
+ * for a memory no channel reached). */
115
+ readonly seeAlso?: { readonly by: string };
110
116
  /** HABITUATED (2026-10-19, `habituation.ts`): rated 0 in enough recent
111
117
  * sessions that the bar it faced (`bar`) was raised. Absent otherwise. */
112
118
  readonly habituated?: true;
@@ -33,7 +33,7 @@ import { TUNABLES as PHYSICS, USE_TIER_WEIGHT, strength } from "../physics/index
33
33
  import type { CreditOutcome, UseTier } from "../physics/index.js";
34
34
  import type { ProseDoc, Store } from "../store/index.js";
35
35
  import { isChapterSummary, stemTerm, tokenize } from "../store/index.js";
36
- import { activate, isBeliefRow, primeOf } from "./activate.js";
36
+ import { activate, isBeliefRow, primeOf, seeAlso } from "./activate.js";
37
37
  import type { Candidate, LearnedCuesFn, SpreadFn, SpreadStats } from "./activate.js";
38
38
  import type { FeelingAskInput } from "./feeling-ask.js";
39
39
  import { buildCues, detectAffect, stripBoilerplate } from "./cues.js";
@@ -82,6 +82,8 @@ export * from "./habituation.js";
82
82
  export * from "./prime.js";
83
83
  export * from "./render.js";
84
84
  export * from "./session.js";
85
+ export { SEE_ALSO_NAMES_READ, namedIds, recallableRow, seeAlso } from "./activate.js";
86
+ export type { SeeAlso, SeeAlsoInput } from "./activate.js";
85
87
  export * from "./standing.js";
86
88
  export * from "./recency-ask.js";
87
89
  export * from "./time-ask.js";
@@ -750,8 +752,45 @@ export class Recall {
750
752
 
751
753
  if (this.now() - started > budgetMs) return quiet("latency-abort");
752
754
 
755
+ // SEE-ALSO FROM NAMED IDS (PP1, 2026-10-29, an experiment): a shown
756
+ // memory whose text names another's id brings it along, one each,
757
+ // `SEE_ALSO_MAX` a turn, after everything the gate admitted (so the byte
758
+ // budget trims them first among footnotes; a belief line goes before). Its verdict becomes an ordinary footnote's,
759
+ // `trains` true, marked `via: "see-also"` — the record step and the
760
+ // credit pass then treat it as any footnote: a use trains this turn's
761
+ // words to it. Off, or nothing named: the turn is as before.
762
+ const byId = new Map(candidates.map((c) => [c.id, c]));
763
+ const along = seeAlso({
764
+ store: this.store,
765
+ day,
766
+ shown: [...gated.surfaced, ...gated.footnotes].map((c) => c.id),
767
+ namers: [...gated.surfaced, ...gated.footnotes].filter((c) => c.linkOnly !== true).map((c) => c.id),
768
+ candidates: byId,
769
+ verdicts: gated.verdicts,
770
+ seen: state.surfaced,
771
+ ...(turn.echo === undefined ? {} : { echo: turn.echo }),
772
+ // Never another project's work, under the hard filter OR the higher bar
773
+ // (review of #681): a named id is no way round Mike's "slightly higher
774
+ // bar" for crossing work; personal memories cross as ever.
775
+ ...(turn.elsewhere !== undefined && (this.tunables.RECALL_BY_PROJECT || this.tunables.CROSS_PROJECT_BAR_LIFT > 1)
776
+ ? { elsewhere: turn.elsewhere }
777
+ : {}),
778
+ ...(habituated.size === 0 ? {} : { habituated }),
779
+ background: gated.background.bar,
780
+ t: this.tunables,
781
+ });
782
+ const alongIds = new Set(along.map((x) => x.id));
783
+ // The turn's verdicts from here on: a brought-along candidate's own
784
+ // (below its bar, say) is replaced by its see-also one; one no channel
785
+ // reached is added.
786
+ const verdicts: CandidateVerdict[] = along.length === 0 ? gated.verdicts : [
787
+ ...gated.verdicts.map((v) => along.find((x) => x.id === v.id)?.verdict ?? v),
788
+ ...along.filter((x) => !gated.verdicts.some((v) => v.id === x.id)).map((x) => x.verdict),
789
+ ];
790
+
753
791
  const docs = new Map<string, ProseDoc>();
754
792
  for (const c of candidates) docs.set(c.id, c.doc);
793
+ for (const x of along) docs.set(x.id, x.doc);
755
794
  // Quiet pointers render with their one-word label (`FRAMING.linked`).
756
795
  const linked = new Set(candidates.filter((c) => c.linkOnly === true).map((c) => c.id));
757
796
  const lifted = new Set(candidates.filter((c) => c.lifted === true).map((c) => c.id));
@@ -774,6 +813,7 @@ export class Recall {
774
813
  const r = resolveDoc(docs.get(id), id);
775
814
  const st = standing(id);
776
815
  const withStanding = st === null ? r : { ...r, standing: { prefix: st.prefix, suffix: st.suffix } };
816
+ if (alongIds.has(id)) return { ...withStanding, seeAlso: true, titleBytes: this.tunables.SEE_ALSO_TITLE_BYTES };
777
817
  return linked.has(id) ? { ...withStanding, linked: true } : withStanding;
778
818
  };
779
819
 
@@ -782,7 +822,7 @@ export class Recall {
782
822
  turn: turnNo,
783
823
  affectFlag: gated.affectFlag,
784
824
  surfaced: gated.surfaced.map((c) => c.id),
785
- footnotes: gated.footnotes.map((c) => c.id),
825
+ footnotes: [...gated.footnotes.map((c) => c.id), ...along.map((x) => x.id)],
786
826
  ...(beliefPicks === null || beliefPicks.lines.length === 0 ? {} : { beliefs: beliefPicks.lines }),
787
827
  budgetBytes,
788
828
  gistBytes: this.tunables.GIST_BYTES,
@@ -808,12 +848,12 @@ export class Recall {
808
848
 
809
849
  // The admitted memories the mood lifted, by id (2026-10-14): `moodMatched`
810
850
  // counts them all, `moodMatchedIds` names the first MOOD_MATCHED_IDS_CAP.
811
- const moodLifted = gated.verdicts
851
+ const moodLifted = verdicts
812
852
  .filter((v) => (v.verdict === "surfaced" || v.verdict === "footnoted") && (v.mood ?? 0) > 0)
813
853
  .map((v) => v.id);
814
854
  // What priming did to what was SHOWN (after the render's trim).
815
855
  const shownSet = new Set([...rendered.surfaced, ...rendered.footnotes]);
816
- const shownPrimed = gated.verdicts.filter((v) => v.primed !== undefined && shownSet.has(v.id) && (v.verdict === "surfaced" || v.verdict === "footnoted"));
856
+ const shownPrimed = verdicts.filter((v) => v.primed !== undefined && shownSet.has(v.id) && (v.verdict === "surfaced" || v.verdict === "footnoted"));
817
857
  const primed: PrimeSummary | null =
818
858
  plan === null
819
859
  ? null
@@ -848,17 +888,18 @@ export class Recall {
848
888
  semanticSource,
849
889
  semanticFromTurn,
850
890
  candidates: act.candidates.length,
851
- verdicts: gated.verdicts,
891
+ verdicts,
852
892
  surfaced: rendered.surfaced,
853
893
  footnotes: rendered.footnotes,
854
894
  affectFlag: rendered.affectFlag,
855
895
  affectReason: gated.affectReason,
856
896
  moodMatched: moodLifted.length,
857
897
  moodMatchedIds: moodLifted.slice(0, MOOD_MATCHED_IDS_CAP),
858
- echoSkipped: gated.verdicts.filter((v) => v.verdict === "echo-skipped").length,
859
- projectSkipped: gated.verdicts.filter((v) => v.verdict === "project-skipped").length,
860
- crossProjectLifted: gated.crossLifted.length,
861
- ...this.stops(turn.sessionId, () => stopCounts(gated.verdicts, gated.crossLifted, rendered.trimmed, this.tunables)),
898
+ echoSkipped: verdicts.filter((v) => v.verdict === "echo-skipped").length,
899
+ projectSkipped: verdicts.filter((v) => v.verdict === "project-skipped").length,
900
+ // What the lift alone kept back, less what see-also then showed.
901
+ crossProjectLifted: alongIds.size === 0 ? gated.crossLifted.length : gated.crossLifted.filter((id) => !alongIds.has(id)).length,
902
+ ...this.stops(turn.sessionId, () => stopCounts(verdicts, gated.crossLifted, rendered.trimmed, this.tunables)),
862
903
  ...(competing === null ? {} : { pairsCompeted: gated.competed.length }),
863
904
  primed,
864
905
  beliefs: beliefPicks === null ? null : { offered: beliefPicks.offered, shown: rendered.beliefs, bytes: rendered.beliefBytes },
@@ -871,7 +912,7 @@ export class Recall {
871
912
  ...act.spread,
872
913
  pointersShown: rendered.footnotes.filter((id) => linked.has(id)).length,
873
914
  liftedShown: [...rendered.surfaced, ...rendered.footnotes].filter((id) => lifted.has(id)).length,
874
- pointersUnanchored: gated.verdicts.filter((v) => v.via === "link" && v.verdict === "dark-uncued").length,
915
+ pointersUnanchored: verdicts.filter((v) => v.via === "link" && v.verdict === "dark-uncued").length,
875
916
  },
876
917
  dropped: act.dropped,
877
918
  bytes: rendered.bytes,
@@ -935,7 +976,7 @@ export class Recall {
935
976
  turn: d.turn,
936
977
  tier: "footnoted",
937
978
  trains: trainsOf(d.verdicts, id),
938
- ...(via === "link" ? { via } : {}),
979
+ ...(via === "link" || via === "see-also" ? { via } : {}),
939
980
  };
940
981
  }
941
982
  // THE BELIEFS THE SLOT SHOWED (lane E): their own records, so the slot
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * CONTEXT PRIMING — an experiment, 2026-10-19 (check ~10-22, two lived days
3
3
  * after install; revert by setting `PRIME_LINK_UNITS` and `PRIME_TRAIN_SHARE`
4
- * to 0, or by reverting the PR). Brief:
4
+ * to 0, or by reverting the PR; the train's share is 0 since the 10-29 read,
5
+ * so only links and tags prime now). Brief:
5
6
  * `~/counterparts-notes/2026-10-19-context-priming-brief.md`.
6
7
  *
7
8
  * Walk into the kitchen and kitchen things come to mind more easily. Until
@@ -484,6 +485,11 @@ export function planPrime(input: {
484
485
  }
485
486
  }
486
487
 
488
+ // THE TRAIN'S SHARE AT 0 (the 10-29 read) IS OFF, NOT JUST WEIGHTLESS: no
489
+ // train is handed to scoring, so no candidate's vector is read for it and
490
+ // the turn's row says `train: false`. The train itself is still kept (the
491
+ // `next` below), so turning the share back on starts warm.
492
+ if (!(t.PRIME_TRAIN_SHARE > 0)) scoring = null;
487
493
  return {
488
494
  activation: { link, train: scoring, trainWeight: scoring === null ? 0 : Math.min(1, scoringMass), exclude: input.echo ?? new Set<string>() },
489
495
  sources,
@@ -163,7 +163,7 @@ export interface ShownEntry {
163
163
  * `beliefs` the slot's (`GateState.beliefs`, belief id → turn; lane E).
164
164
  */
165
165
  export function rateableSet(
166
- surfaced: Readonly<Record<string, { turn: number; tier: "surfaced" | "footnoted"; via?: "link" }>>,
166
+ surfaced: Readonly<Record<string, { turn: number; tier: "surfaced" | "footnoted"; via?: "link" | "see-also" }>>,
167
167
  asked: Iterable<string>,
168
168
  opened: Iterable<string>,
169
169
  beliefs: Readonly<Record<string, number>> = {},
@@ -71,6 +71,12 @@ export const FRAMING = {
71
71
  * reason as `journal`: a label, never a filter.
72
72
  */
73
73
  linked: "Linked:",
74
+ /**
75
+ * ONE LABEL, IN FRONT OF A MEMORY ANOTHER NAMED (see-also, 2026-10-29): it
76
+ * is here because a memory this turn shows names its id, not because the
77
+ * turn's words or meaning reached it. Same shape and reason as `linked`.
78
+ */
79
+ seeAlso: "See also:",
74
80
  /**
75
81
  * THE BELIEFS SLOT'S HEADER (wave 2 lane E, 2026-10-22; design §7): what
76
82
  * the subjects this turn named are held to be, in a slot of their own, so
@@ -130,6 +136,12 @@ export interface Resolved {
130
136
  /** True for a quiet pointer (`Candidate.linkOnly`), which renders with
131
137
  * `FRAMING.linked` in front of it. Absent reads as false. */
132
138
  readonly linked?: boolean;
139
+ /** True for a memory a shown one named (`activate.ts#seeAlso`), which renders with
140
+ * `FRAMING.seeAlso` in front of it. Absent reads as false. */
141
+ readonly seeAlso?: boolean;
142
+ /** A tighter title clip for this line (see-also's `SEE_ALSO_TITLE_BYTES`);
143
+ * the render's `titleBytes` when absent, never wider than it. */
144
+ readonly titleBytes?: number;
133
145
  /**
134
146
  * The memory's STANDING in a contradiction (2026-09-29, `standing.ts`): a
135
147
  * qualifier in front (`Earlier (now [id]): `, `Unsettled — may be out of
@@ -208,7 +220,7 @@ export function clip(text: string, maxBytes: number): string {
208
220
  * belongs.
209
221
  */
210
222
  function label(r: Resolved): string {
211
- return `${r.linked === true ? `${FRAMING.linked} ` : ""}${r.journal === true ? `${FRAMING.journal} ` : ""}${r.standing?.prefix ?? ""}`;
223
+ return `${r.linked === true ? `${FRAMING.linked} ` : ""}${r.seeAlso === true ? `${FRAMING.seeAlso} ` : ""}${r.journal === true ? `${FRAMING.journal} ` : ""}${r.standing?.prefix ?? ""}`;
212
224
  }
213
225
 
214
226
  /** The standing's pointer, after the text and outside the clip, like the label. */
@@ -261,7 +273,8 @@ function compose(
261
273
  // Pointers with short titles, NEVER bodies (§9 OUTPUTS).
262
274
  for (const id of footnotes) {
263
275
  const r = resolve(id);
264
- lines.push(`- ${label(r)}${clip(r.title, input.titleBytes)} [${id}]${after(r)}`);
276
+ const titleBytes = r.titleBytes === undefined ? input.titleBytes : Math.min(input.titleBytes, r.titleBytes);
277
+ lines.push(`- ${label(r)}${clip(r.title, titleBytes)} [${id}]${after(r)}`);
265
278
  }
266
279
  }
267
280
  // THE BELIEFS SLOT (lane E), after the footnotes, in its own labelled block.
@@ -144,6 +144,8 @@ export const SCALAR_REF = "state";
144
144
  export const SEMANTIC_REF = "lag";
145
145
  /** A `surfaced` row's `value` when the memory was a quiet pointer (2026-09-28). */
146
146
  export const POINTER_VALUE = "link";
147
+ /** A `surfaced` row's `value` when a shown memory's text named it (see-also, 2026-10-29). */
148
+ export const SEE_ALSO_VALUE = "see-also";
147
149
 
148
150
  /** What a memory got, the turn it got it, and whether it may ever train. */
149
151
  export interface SurfaceRecord {
@@ -153,8 +155,10 @@ export interface SurfaceRecord {
153
155
  trains: boolean;
154
156
  /** `"link"` when it was a QUIET POINTER — reached only through links
155
157
  * (2026-09-28). Kept in the row's otherwise unused `value` column, so the
156
- * credit pass can count pointers that were later expanded. No schema change. */
157
- via?: "link";
158
+ * credit pass can count pointers that were later expanded. No schema change.
159
+ * `"see-also"` (2026-10-29) when a shown memory's text named it; the same
160
+ * column. Either way an ordinary footnote to credit and to rate. */
161
+ via?: "link" | "see-also";
158
162
  }
159
163
 
160
164
  export interface CreditRecord {
@@ -263,7 +267,7 @@ export function loadGateState(store: Store, sessionId: string, max = Infinity):
263
267
  turn: row.turn,
264
268
  tier: row.tier === "footnoted" ? "footnoted" : "surfaced",
265
269
  trains: row.trains !== 0,
266
- ...(row.value === POINTER_VALUE ? { via: "link" as const } : {}),
270
+ ...(row.value === POINTER_VALUE ? { via: "link" as const } : row.value === SEE_ALSO_VALUE ? { via: "see-also" as const } : {}),
267
271
  };
268
272
  } else if (row.kind === "credited") {
269
273
  credited[row.ref] = { turn: row.turn, tier: (row.tier ?? "referenced") as UseTier, day: row.last_day };
@@ -332,7 +336,7 @@ export function saveGateState(store: Store, state: GateState, max: number, extra
332
336
  lastDay: state.lastDay,
333
337
  tier: rec.tier,
334
338
  trains: rec.trains,
335
- ...(rec.via === "link" ? { value: POINTER_VALUE } : {}),
339
+ ...(rec.via === "link" ? { value: POINTER_VALUE } : rec.via === "see-also" ? { value: SEE_ALSO_VALUE } : {}),
336
340
  });
337
341
  }
338
342
  const keptSurfaced = bound(state.surfaced, max);
@@ -248,6 +248,24 @@ export interface RecallTunables {
248
248
  * memory, however many paths reach it. Counted when it binds. CAL. */
249
249
  HOP_CEILING: number;
250
250
 
251
+ // ── see-also from named ids (PP1, 2026-10-29, an experiment) ─────────────
252
+ // Trying a memory that names another's id bringing it along (`activate.ts#seeAlso`),
253
+ // to see the 10-25 ping/pong miss close and stay closed. Revert by setting
254
+ // `SEE_ALSO_NAMED_IDS` to false (the turn is then composed as before).
255
+ /** Does a shown memory whose text names another memory's id bring it along
256
+ * as a `See also:` footnote? */
257
+ SEE_ALSO_NAMED_IDS: boolean;
258
+ /** How many a turn may bring along, at most one per shown memory. Their own
259
+ * slots after the footnotes and pointers, and the first lines the byte
260
+ * budget trims. Why 2: on the 10-29 store 42 of 1,711 footnotes (2.5%)
261
+ * named an id that could have ridden along, so a second slot rarely binds,
262
+ * and a turn whose loud line and a footnote both name one keeps both. CAL. */
263
+ SEE_ALSO_MAX: number;
264
+ /** A see-also line's title, in bytes (the label, id and standing ride
265
+ * outside it). Tighter than `FOOTNOTE_TITLE_BYTES`: it is a pointer to a
266
+ * pointer. CAL. */
267
+ SEE_ALSO_TITLE_BYTES: number;
268
+
251
269
  // ── habituation (an experiment, 2026-10-19, light; check ~10-22) ─────────
252
270
  // Trying a raised bar for memories rated 0 twice to see whether footnote
253
271
  // noise drops. Revert by setting `HABITUATION_BAR_LIFT` to 0.
@@ -340,7 +358,8 @@ export interface RecallTunables {
340
358
  // without one cluster winning turn after turn (`prime.ts`). Ambient only;
341
359
  // only candidates the turn's own words or meaning reached; never the
342
360
  // session's own writes; never past the absolute floors. Revert by setting
343
- // `PRIME_LINK_UNITS` and `PRIME_TRAIN_SHARE` to 0.
361
+ // `PRIME_LINK_UNITS` and `PRIME_TRAIN_SHARE` to 0 (the train's share is 0
362
+ // already since the 10-29 read).
344
363
  /** Along LINKS: a source passes `weight × decayed edge × this` CUE UNITS
345
364
  * (`floorUnit`) to each linked partner. Why 1: a fresh source and a link
346
365
  * two co-uses made (0.5, associate `CO_USE_DEPOSIT`) give half a
@@ -349,8 +368,14 @@ export interface RecallTunables {
349
368
  PRIME_LINK_UNITS: number;
350
369
  /** Along MEANING: the train of thought's head start, as a SHARE of what the
351
370
  * turn's own meaning gives at the same cosine (the in-line semantic floor and
352
- * weight of the store's embedder, `semanticTuning`). Why 0.5: the last few
353
- * turns count half as much as this one. */
371
+ * weight of the store's embedder, `semanticTuning`). 0 since the 10-29
372
+ * read (`docs/decisions.d/chore-read-1029-knobs.md`): train-lifted
373
+ * footnotes were the worst-rated group (n 199, 44% noise / 11% useful;
374
+ * person turns n 80, 48% / 6%), so the train scores nothing — no candidate
375
+ * is scored against it and the row says `train: false`; links and tags
376
+ * prime as before. The train is still kept per session (one gate row), so
377
+ * a revert to 0.5 (the old start: the last few turns count half as much as
378
+ * this one) starts warm. */
354
379
  PRIME_TRAIN_SHARE: number;
355
380
  /** CENTRING (review, 2026-10-19, an experiment inside the experiment):
356
381
  * 1 = a candidate gets a train head start only for the part of its cosine
@@ -763,6 +788,10 @@ export const TUNABLES: RecallTunables = {
763
788
  SPREAD_SEEDS: 24,
764
789
  HOP_CEILING: 1,
765
790
 
791
+ SEE_ALSO_NAMED_IDS: true,
792
+ SEE_ALSO_MAX: 2,
793
+ SEE_ALSO_TITLE_BYTES: 100,
794
+
766
795
  HABITUATION_WINDOW_DAYS: 7,
767
796
  HABITUATION_MIN_SESSIONS: 2,
768
797
  HABITUATION_CLEAR_SCORE: 2,
@@ -780,7 +809,8 @@ export const TUNABLES: RecallTunables = {
780
809
  UNSETTLED_COMPETE_WINDOW_DAYS: 7,
781
810
 
782
811
  PRIME_LINK_UNITS: 1,
783
- PRIME_TRAIN_SHARE: 0.5,
812
+ // 10-29 read: train priming off (was 0.5); revert `recall.PRIME_TRAIN_SHARE=0.5`.
813
+ PRIME_TRAIN_SHARE: 0,
784
814
  PRIME_TRAIN_CENTRE: 1,
785
815
  PRIME_TRAIN_DECAY: 0.5,
786
816
  PRIME_SOURCE_DECAY: 0.8,
@@ -919,3 +919,11 @@ everywhere else), and each awake repeat, filed or held, writes a durable `belief
919
919
  (the schemas' own events live only in the ring and the process log), so the check after can tell
920
920
  awake filings from the reflection's. Switch
921
921
  `AWAKE_SUPPORT_ON_DUPLICATE`; off is the old reply, byte for byte.
922
+
923
+ ## 2026-10-29 — why the beliefs slot shows one belief (a pointer)
924
+
925
+ The 10-29 read found recall's beliefs slot showed one belief in 62 showings. The reason is on
926
+ this module's side of the seam: `beliefsNamedIn` never offers the self subject (no name, and
927
+ left out by id), and 4 of the 6 beliefs held are about me or us; the fifth, on the Mike card,
928
+ is under recall's floor. The table and the reading are in `src/core/recall/NOTES.md` ("the
929
+ beliefs slot shows one belief"). No change.
@@ -114,10 +114,15 @@ export const TUNABLES = {
114
114
  * THE NIGHT'S TAGGING ASK (`dream/tags.ts`), per night: untagged memories
115
115
  * shown (recent and strong first), look-alike tag pairs asked "same?", and
116
116
  * cards with no subject kind asked which kind. CAL: starting points.
117
+ * KINDS 10 → 30 (the 10-29 read, `docs/decisions.d/chore-read-1029-knobs.md`):
118
+ * 144 of 207 live cards were kindless, ~10 born kindless a day against ~7
119
+ * set a night, so the backlog only grew. At 30 the ask's card lines are
120
+ * ~10.3 KB (from ~3.4 KB; the whole read ~23.7 KB on that store), inside
121
+ * the tool result's ceiling (`fit/TOOL_RESULT_CEILING`) even at its widest.
117
122
  */
118
123
  TAGS_BACKFILL_PER_NIGHT: 40,
119
124
  TAGS_MERGE_ASKS_PER_NIGHT: 10,
120
- TAGS_KINDS_PER_NIGHT: 10,
125
+ TAGS_KINDS_PER_NIGHT: 30,
121
126
 
122
127
  /** Box-2 meta key prefix for a card's calendar anchor (`{ day, date }`): a
123
128
  * lived day and the calendar date the fade sweep saw it on. NOTES §14. */
@@ -2864,3 +2864,80 @@ random-5b's wake on 0.3.35 (8,981 B) had four rough spots; each is now a smaller
2864
2864
  `still-open-and-night.test.ts`'s sweep (1,600–3,000 B, 1 and 50 open, the night before
2865
2865
  and today's) keeps the item due today and Still open's first item at every budget, and
2866
2866
  fails at 1,600 B with the rescue reading only "Last night:".
2867
+
2868
+ ## 2026-10-28 — open threads parked at 14 lived days (P2; roadmap 10-28, Mike's "ok your lean sounds good"; lightly held)
2869
+
2870
+ The brief asked the night to park an open item nobody touched for 2+ weeks. The carry rule of
2871
+ 2026-10-22 (`identity.ts#openCarry`, 21 lived days) already did most of it — out of "Still
2872
+ open" and its count, not closed, a touch carries it again, the reflection told the count — so
2873
+ P2 is that rule retuned and said aloud, not a second mechanism beside it:
2874
+
2875
+ - **14 lived days** (`OPEN_CARRY_DAYS`, was 21): the lived days "Still open" and the handle
2876
+ already count age in (`livedDaysSinceTouched`). `STILL_OPEN_STALE_DAYS` is also 14, so it
2877
+ now orders only what is never parked.
2878
+ - **Never parked**: a dated item (as before), an `asked` one (as before), and one naming what
2879
+ would settle it (`meta.settlesWhen`, S1; read in the same SQL, `reads-memories.ts#
2880
+ openThreadTouches`'s `settles`). Its door is the reflection's `settlesOpen`, which a parked
2881
+ item would leave. **Dated means still to come** (review of #674): ahead of the store's day,
2882
+ inside its grace week after (`HOLD_GRACE_DAYS`), or repeating (`openThreadTouches`'s `at`,
2883
+ `openCarry`'s `at`, `Store#today` by default). A one-off past its grace parks like the rest —
2884
+ exempt, a 10-05 vet visit was still in "Still open" on 11-10, which "Coming up" had let go.
2885
+ - **Doctor's Open items line is not in the session-start reading** (review of #674): it is
2886
+ never red, the only thing that notice prints, and `openCarry` reads every open row.
2887
+ - **Said**: "Still open"'s count line ends `· N parked` after its paren (`briefing.ts#
2888
+ parkedTail`; `countedLanes` reads the count before it as before), the collapsed line too;
2889
+ the count is per reader (another folder's work not counted, O2), set on `Lanes.parked` by
2890
+ `Self` and carried on `BriefingRequest.threadsParked`. (A lane with no count line said
2891
+ nothing of what it parked; P2b below closed that.)
2892
+ `recall "still open"` lists the parked after the carried, `parked: true`, most recently
2893
+ touched first, with `parked` their count (it used to count them as `notCarried`). The
2894
+ reflection's share says "N open items nobody touched in 14 lived days are parked; recall
2895
+ "still open" lists them." `status`'s `openItems` gains `parked`; doctor gains an Open items
2896
+ line (green, silent with none).
2897
+ - **Read live, nothing written**: parked is computed from the store's own facts at every wake,
2898
+ so a touch un-parks at once, and a host whose nights never run parks all the same. The night
2899
+ records what it parked (`reflections.detail.notCarried`, the 10-22 name kept so rows written
2900
+ since read the same).
2901
+ - **The reflection**: `staleOpen` and the close proposals still skip the parked — being offered
2902
+ is not a touch, and offering them nightly would turn parking into closing by another door.
2903
+
2904
+ Revert: `OPEN_CARRY_DAYS` 21 (or `Infinity`); `parkedTail` returning "".
2905
+
2906
+ **P2b, the same day — the parked are counted whatever line the lane has** (the brief: parked
2907
+ items are counted, not vanished; its main aim a clean list for a new user in week 3). P2 put
2908
+ `· N parked` only on the lane's own count line, so a lane listing fewer than `THREADS_MAX`
2909
+ said nothing, and a store carrying nothing said nothing at all (day 40, 3 parked: no word).
2910
+ Now (`briefing.ts#parkedLine`, placed by `briefing-room.ts#owedParked`):
2911
+
2912
+ - a lane that lists items and counts none it left out ends `(3 parked; recall "still open"
2913
+ lists them)` (42 bytes);
2914
+ - a wake carrying no open item gets the lane as one line, `Still open: nothing current · 3
2915
+ parked (recall "still open" lists them)` (72 bytes). `collapsedLane` reads it as "Still
2916
+ open"'s (the dashboard, the delivery, the claude.ai wake's lane move); `countedLanes` counts
2917
+ nothing from it, since the parked are not "more";
2918
+ - the folded line's "Still open" part ends `· 3 parked` too (`foldedLine`'s `parked`; it
2919
+ dropped it before).
2920
+
2921
+ The line is reserved like a lane's count line: the trim loop composes with it, and with
2922
+ nothing else to pop it takes room as the lanes' lines do (`counting` in `render`) or goes with
2923
+ a bare floor; `tellLost` never accepts a composition over its limit for it and reports whether
2924
+ it was said (`parked`), so the top-item upgrade cannot drop it silently. Nothing when none is
2925
+ parked: a wake with no parked thread is byte for byte what it was. Revert: `parkedLine`
2926
+ returning null.
2927
+
2928
+ **Review of #675, the same day — the parked words give way first.** As built, the parked words
2929
+ were reserved down to a bare floor, so ` · N parked` on the folded line could push the fold a
2930
+ few bytes past its room and the loop went bare: every lane untold, and the parked unsaid too
2931
+ (the PR's own sweep, 700 bytes: "Still open" and "Coming up" both gone; a 4,000-case render
2932
+ fuzz against master: 48 wakes told fewer lanes than #674's). And with no page they outranked
2933
+ "Who I am" items. Now (`render`'s `hush`, `briefing-room.ts#withoutParked`): before the loop
2934
+ pops a "Who I am" item for them, and before a floor that found no room (`takeRoom` to
2935
+ `arrivingFirst`) goes bare, the parked words go quiet — no parked line, no ` · N parked` tail
2936
+ — and the rescues compose without them too; `tellLost` tries every form with them, then every
2937
+ form without them, before its last resort. Where they are not said, the wake is byte for byte
2938
+ the wake with nothing parked (the fuzz checks it; `test/park-old-threads.test.ts` sweeps it).
2939
+ They still take room from "Work here", the Yesterday line's titles and the handoffs when that
2940
+ room is there, as the lanes' lines do. Still to see: in about 10 of the 4,000 cases a "Coming
2941
+ up" count goes untold while the parked are said; the same lanes with nothing parked go untold
2942
+ the same way a few bytes lower (a due-day head kept past its lane's count, #442), so that one
2943
+ is the old floor shifted by the parked words' bytes, not theirs.
@@ -9,7 +9,7 @@ import type { LaneName, Ranked } from "./identity.js";
9
9
  import { byteLength } from "./identity.js";
10
10
  import { addDays, isDay } from "../time.js";
11
11
  import { TODAY_ELSEWHERE_MAX_BYTES } from "../handoff/last-here.js";
12
- import { LANE_ORDER, ROOM_ORDER, collapsedLine, compose, flatten, foldedLine, isNightLine, moreLine } from "./briefing.js";
12
+ import { LANE_ORDER, ROOM_ORDER, collapsedLine, compose, flatten, foldedLine, isNightLine, moreLine, parkedLine } from "./briefing.js";
13
13
  import type { BriefingRequest, Composed, HorizonCounted, IdentityBlock, Resolve, RoomLane, TrimEvent } from "./briefing.js";
14
14
 
15
15
 
@@ -86,22 +86,71 @@ export function lendOf(n: number | undefined): number {
86
86
  /**
87
87
  * The count lines a composition carries for its pinned lanes: "N more", or —
88
88
  * a lane that lists nothing — its one collapsed line (`collapsedLine`).
89
+ * And "Still open"'s parked line when the lane has no count line of its own
90
+ * (`owedParked`, P2b): reserved like the others.
89
91
  */
90
92
  export function pinnedLines(
91
93
  pinned: Partial<Record<LaneName, readonly string[]>>,
92
94
  kept: Kept,
93
95
  /** What "Coming up" counts rather than lists (`BriefingRequest.horizonLater`, `.horizonOverdue`). */
94
96
  counted?: HorizonCounted,
97
+ ): Partial<Record<LaneName, string>> {
98
+ return withParked(countLines(pinned, kept, counted), pinned, kept, counted);
99
+ }
100
+
101
+ function countLines(
102
+ pinned: Partial<Record<LaneName, readonly string[]>>,
103
+ kept: Kept,
104
+ counted?: HorizonCounted,
95
105
  ): Partial<Record<LaneName, string>> {
96
106
  const out: Partial<Record<LaneName, string>> = {};
97
107
  for (const lane of LANE_ORDER) {
98
108
  const ids = pinned[lane];
99
109
  if (ids === undefined || ids.length === 0) continue;
100
- out[lane] = lane !== "identity" && kept[lane].length === 0 ? collapsedLine(lane, ids, counted) : moreLine(lane, ids, counted?.horizonOverdue);
110
+ out[lane] = lane !== "identity" && kept[lane].length === 0 ? collapsedLine(lane, ids, counted) : moreLine(lane, ids, counted?.horizonOverdue, counted?.threadsParked);
101
111
  }
102
112
  return out;
103
113
  }
104
114
 
115
+ /**
116
+ * "STILL OPEN"'S PARKED, SAID WHEN THE LANE HAS NO COUNT LINE (P2b,
117
+ * 2026-10-28): the line `parkedLine` composes — under the items the lane
118
+ * lists, or the lane's one line when it lists nothing — when some threads are
119
+ * parked and the lane counts none it left out (`pinned.threads` empty; a lane
120
+ * that does carries ` · N parked` on its own line). Null otherwise.
121
+ */
122
+ export function owedParked(
123
+ pinned: Partial<Record<LaneName, readonly string[]>>,
124
+ kept: Kept,
125
+ counted?: HorizonCounted,
126
+ ): string | null {
127
+ if ((pinned.threads?.length ?? 0) > 0) return null;
128
+ return parkedLine(kept.threads.length > 0, counted?.threadsParked);
129
+ }
130
+
131
+ /**
132
+ * The request with its parked count gone quiet (review of #675): no parked
133
+ * line, no ` · N parked` on a count line or the folded one. The render and
134
+ * `tellLost` compose with it once the parked count has given way — before a
135
+ * lane goes untold or an identity item is popped for it: an aside about what
136
+ * nobody touched in 14 lived days never costs a current lane its count.
137
+ */
138
+ export function withoutParked(req: BriefingRequest): BriefingRequest {
139
+ if (req.threadsParked === undefined) return req;
140
+ const { threadsParked: _parked, ...rest } = req;
141
+ return rest;
142
+ }
143
+
144
+ function withParked(
145
+ lines: Partial<Record<LaneName, string>>,
146
+ pinned: Partial<Record<LaneName, readonly string[]>>,
147
+ kept: Kept,
148
+ counted?: HorizonCounted,
149
+ ): Partial<Record<LaneName, string>> {
150
+ const line = owedParked(pinned, kept, counted);
151
+ return line === null ? lines : { ...lines, threads: line };
152
+ }
153
+
105
154
  /**
106
155
  * THE SAME COUNTS, FOLDED (2026-10-12, decided by COUNTERPARTS, lightly
107
156
  * held): a lane that still lists an item keeps its own "N more" line under
@@ -121,8 +170,11 @@ export function foldParts(
121
170
  if (lane !== "identity" && kept[lane].length === 0) empty[lane] = ids;
122
171
  else listing[lane] = ids;
123
172
  }
124
- const fold = foldedLine(empty);
125
- return fold === null ? { more: pinnedLines(listing, kept, counted) } : { more: pinnedLines(listing, kept, counted), fold };
173
+ const fold = foldedLine(empty, counted?.threadsParked);
174
+ // The parked line only for a lane neither listed nor folded (`owedParked`
175
+ // reads the whole of `pinned`, so a folded "Still open" is not said twice).
176
+ const more = withParked(countLines(listing, kept, counted), pinned, kept, counted);
177
+ return fold === null ? { more } : { more, fold };
126
178
  }
127
179
 
128
180
  /**
@@ -547,6 +599,9 @@ export function tellLost(ctx: {
547
599
  folded: boolean;
548
600
  untold: Partial<Record<LaneName, number>>;
549
601
  quiet: Partial<Record<LaneName, number>>;
602
+ /** Whether the composition says how many threads are parked (P2b): on
603
+ * "Still open"'s own line or its parked line. False with none parked. */
604
+ parked: boolean;
550
605
  } {
551
606
  const at = (more: Partial<Record<LaneName, string>>, fold?: string): Composed =>
552
607
  compose(ctx.kept, ctx.req.day, ctx.resolve, ctx.coreName, ctx.identity, more, ctx.yesterday, ctx.elsewhere, fold);
@@ -559,51 +614,72 @@ export function tellLost(ctx: {
559
614
  return out;
560
615
  };
561
616
  const counts = countsOf(ctx.lost);
617
+ // Some threads parked: the tries below say so — on the lane's own line, in
618
+ // the folded one, or in its parked line (`pinnedLines`) — so a try that
619
+ // lost nothing must still fit (P2b). Then the same tries without it
620
+ // (`withoutParked`, review of #675): the parked count is the first of the
621
+ // lanes' words to give way, before a lane goes untold.
622
+ const parkedNow = (ctx.req.threadsParked ?? 0) >= 1;
623
+ const quietReq = withoutParked(ctx.req);
562
624
  const reserved = withoutNearby(ctx.lost);
563
625
  const hints = ctx.lost.hints?.length ?? 0;
564
626
  const quiet: Partial<Record<LaneName, number>> = hints > 0 ? { hints } : {};
565
- const tries: { lost: Partial<Record<LaneName, readonly string[]>>; fold: boolean }[] = [
627
+ const base: { lost: Partial<Record<LaneName, readonly string[]>>; fold: boolean }[] = [
566
628
  { lost: ctx.lost, fold: false },
567
629
  { lost: ctx.lost, fold: true },
568
630
  ...(hints > 0 ? [{ lost: reserved, fold: false }, { lost: reserved, fold: true }] : []),
569
631
  ...(ctx.pinned === undefined ? [] : [{ lost: ctx.pinned, fold: false }, { lost: ctx.pinned, fold: true }]),
570
632
  ];
633
+ const tries = [
634
+ ...base.map((t) => ({ ...t, req: ctx.req, parked: parkedNow })),
635
+ ...(parkedNow ? base.map((t) => ({ ...t, req: quietReq, parked: false })) : []),
636
+ ];
571
637
  for (const t of tries) {
572
- const parts = t.fold ? foldParts(t.lost, ctx.kept, ctx.req) : { more: pinnedLines(t.lost, ctx.kept, ctx.req) };
638
+ const parked = t.parked;
639
+ const parts = t.fold ? foldParts(t.lost, ctx.kept, t.req) : { more: pinnedLines(t.lost, ctx.kept, t.req) };
573
640
  if (t.fold && parts.fold === undefined) continue;
574
641
  const c = at(parts.more, parts.fold);
575
- if (Object.keys(counts).length === 0 || c.bytes <= ctx.limit) {
642
+ if ((Object.keys(counts).length === 0 && !parked) || c.bytes <= ctx.limit) {
576
643
  const said = countsOf(t.lost);
577
644
  const untold: Partial<Record<LaneName, number>> = {};
578
645
  for (const lane of LANE_ORDER) {
579
646
  const n = counts[lane];
580
647
  if (n !== undefined && said[lane] === undefined && lane !== "hints") untold[lane] = n;
581
648
  }
582
- return { composed: c, more: said, folded: parts.fold !== undefined, untold, quiet: said.hints === undefined ? quiet : {} };
649
+ return { composed: c, more: said, folded: parts.fold !== undefined, untold, quiet: said.hints === undefined ? quiet : {}, parked };
583
650
  }
584
651
  }
585
652
  // The last resort: what fits, lane by lane; the rest is untold ("Nearby": quiet).
586
653
  let current = at({});
587
654
  const lines: Partial<Record<LaneName, string>> = {};
588
655
  const more: Partial<Record<LaneName, number>> = {};
656
+ let saidParked = false;
589
657
  for (const lane of MORE_ORDER) {
590
658
  const ids = ctx.lost[lane];
591
- if (ids === undefined || ids.length === 0) continue;
592
- lines[lane] = lane !== "identity" && ctx.kept[lane].length === 0 ? collapsedLine(lane, ids, ctx.req) : moreLine(lane, ids, ctx.req.horizonOverdue);
659
+ // "Still open" with nothing it left out: its parked line, when owed (P2b).
660
+ const owed = lane === "threads" ? owedParked(ctx.lost, ctx.kept, ctx.req) : null;
661
+ if ((ids === undefined || ids.length === 0) && owed === null) continue;
662
+ lines[lane] =
663
+ ids === undefined || ids.length === 0
664
+ ? (owed ?? "")
665
+ : lane !== "identity" && ctx.kept[lane].length === 0
666
+ ? collapsedLine(lane, ids, ctx.req)
667
+ : moreLine(lane, ids, ctx.req.horizonOverdue, ctx.req.threadsParked);
593
668
  const candidate = at(lines);
594
669
  if (candidate.bytes > ctx.limit) {
595
670
  delete lines[lane];
596
671
  continue;
597
672
  }
598
673
  current = candidate;
599
- more[lane] = ids.length;
674
+ if (lane === "threads" && parkedNow) saidParked = true;
675
+ if (ids !== undefined && ids.length > 0) more[lane] = ids.length;
600
676
  }
601
677
  const untold: Partial<Record<LaneName, number>> = {};
602
678
  for (const lane of LANE_ORDER) {
603
679
  const n = counts[lane];
604
680
  if (n !== undefined && more[lane] === undefined && lane !== "hints") untold[lane] = n;
605
681
  }
606
- return { composed: current, more, folded: false, untold, quiet: more.hints === undefined ? quiet : {} };
682
+ return { composed: current, more, folded: false, untold, quiet: more.hints === undefined ? quiet : {}, parked: saidParked };
607
683
  }
608
684
 
609
685
  /** The lanes whose count is reserved: every lane but "Nearby" (2026-10-12). */