counterparts 0.3.17 → 0.3.19

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 (183) hide show
  1. package/CHANGELOG.md +410 -0
  2. package/CONSTITUTION.md +7 -7
  3. package/docs/QUICKSTART.md +15 -3
  4. package/docs/module-map.md +20 -2
  5. package/package.json +1 -1
  6. package/src/adapters/claude-code/CONTRACT.md +98 -29
  7. package/src/adapters/claude-code/INTERFACE-GAPS.md +13 -10
  8. package/src/adapters/claude-code/NOTES.md +85 -0
  9. package/src/adapters/claude-code/bin/hook.ts +5 -0
  10. package/src/adapters/claude-code/bin/nightly.ts +2 -0
  11. package/src/adapters/claude-code/bin/runner.ts +2 -0
  12. package/src/adapters/claude-code/child.ts +44 -4
  13. package/src/adapters/claude-code/claim.ts +36 -14
  14. package/src/adapters/claude-code/doctor-checkout.ts +335 -0
  15. package/src/adapters/claude-code/doctor-finding.ts +168 -0
  16. package/src/adapters/claude-code/doctor-host.ts +400 -0
  17. package/src/adapters/claude-code/doctor-open.ts +337 -0
  18. package/src/adapters/claude-code/doctor-report.ts +188 -0
  19. package/src/adapters/claude-code/doctor-self-page.ts +504 -0
  20. package/src/adapters/claude-code/doctor-upgrades.ts +238 -0
  21. package/src/adapters/claude-code/doctor-write-ups.ts +278 -0
  22. package/src/adapters/claude-code/doctor.ts +168 -2383
  23. package/src/adapters/claude-code/embed-client.ts +15 -2
  24. package/src/adapters/claude-code/hooks.ts +234 -19
  25. package/src/adapters/claude-code/index.ts +6 -5
  26. package/src/adapters/claude-code/night-catch-up.ts +448 -137
  27. package/src/adapters/claude-code/night-run.ts +355 -96
  28. package/src/adapters/claude-code/reowe.ts +239 -0
  29. package/src/adapters/claude-code/transcript.ts +53 -78
  30. package/src/adapters/cli/CONTRACT.md +10 -3
  31. package/src/adapters/cli/INTERFACE-GAPS.md +5 -3
  32. package/src/adapters/cli/NOTES.md +44 -2
  33. package/src/adapters/cli/catch-up.ts +196 -0
  34. package/src/adapters/cli/commands-dashboard.ts +254 -0
  35. package/src/adapters/cli/commands-install.ts +1387 -0
  36. package/src/adapters/cli/commands-note.ts +624 -0
  37. package/src/adapters/cli/commands-readings.ts +983 -0
  38. package/src/adapters/cli/commands-remove.ts +659 -0
  39. package/src/adapters/cli/commands-scope.ts +474 -0
  40. package/src/adapters/cli/commands-self.ts +766 -0
  41. package/src/adapters/cli/commands-shared.ts +554 -0
  42. package/src/adapters/cli/commands-start-fresh.ts +1233 -0
  43. package/src/adapters/cli/commands-verify.ts +1301 -0
  44. package/src/adapters/cli/commands.ts +260 -8012
  45. package/src/adapters/cli/coverage.ts +52 -6
  46. package/src/adapters/cli/dream-core.ts +17 -11
  47. package/src/adapters/cli/help.ts +24 -7
  48. package/src/adapters/cli/mechanisms.ts +17 -3
  49. package/src/adapters/cli/settle.ts +16 -4
  50. package/src/adapters/cli/start-fresh.ts +13 -8
  51. package/src/adapters/cli/uninstall.ts +530 -58
  52. package/src/adapters/config.ts +45 -14
  53. package/src/adapters/dashboard/NOTES.md +1 -1
  54. package/src/adapters/dashboard/registries.ts +7 -3
  55. package/src/adapters/dashboard/stories.ts +3 -1
  56. package/src/adapters/dashboard/web/flow.ts +1 -0
  57. package/src/adapters/dashboard/web/lanes.ts +2 -0
  58. package/src/adapters/dashboard/web/mechanisms/prospective/index.js +3 -2
  59. package/src/adapters/dashboard/web/mechanisms/prospective/panel.js +2 -1
  60. package/src/adapters/dashboard/web/narrate.ts +26 -8
  61. package/src/adapters/dashboard/web/pages/self/sections/settling.js +15 -4
  62. package/src/adapters/dashboard/web/server.ts +4 -0
  63. package/src/adapters/dashboard/web/views/archive-words.ts +2 -1
  64. package/src/adapters/dashboard/web/views/dreams.ts +10 -2
  65. package/src/adapters/dashboard/web/views/mechanism-panel.ts +25 -4
  66. package/src/adapters/dashboard/web/views/mechanisms.ts +17 -1
  67. package/src/adapters/dashboard/web/views/mind.ts +20 -1
  68. package/src/adapters/empty-bunfig.toml +13 -2
  69. package/src/adapters/fired.ts +5 -3
  70. package/src/adapters/host-wiring.ts +7 -0
  71. package/src/adapters/lifecycle.ts +144 -12
  72. package/src/adapters/mcp/CONTRACT.md +44 -10
  73. package/src/adapters/mcp/INTERFACE-GAPS.md +1 -1
  74. package/src/adapters/mcp/NOTES.md +9 -5
  75. package/src/adapters/mcp/bin/serve.ts +4 -1
  76. package/src/adapters/mcp/facts.ts +128 -14
  77. package/src/adapters/mcp/index.ts +1 -0
  78. package/src/adapters/mcp/meaning.ts +17 -2
  79. package/src/adapters/mcp/server-args.ts +522 -0
  80. package/src/adapters/mcp/server-options.ts +259 -0
  81. package/src/adapters/mcp/server-self-tools.ts +725 -0
  82. package/src/adapters/mcp/server-session-end.ts +654 -0
  83. package/src/adapters/mcp/server-words.ts +225 -0
  84. package/src/adapters/mcp/server.ts +493 -2229
  85. package/src/adapters/mcp/tools.ts +192 -59
  86. package/src/adapters/mcp/write-up.ts +57 -11
  87. package/src/adapters/mechanism-evidence.ts +74 -9
  88. package/src/adapters/plugin-run.sh +14 -2
  89. package/src/adapters/plugin.ts +24 -1
  90. package/src/adapters/runtime.ts +5 -2
  91. package/src/adapters/sessions.ts +57 -11
  92. package/src/adapters/spawn.ts +16 -0
  93. package/src/core/associate/CONTRACT.md +13 -4
  94. package/src/core/associate/NOTES.md +102 -0
  95. package/src/core/associate/at-write.ts +65 -0
  96. package/src/core/associate/contiguity.ts +3 -2
  97. package/src/core/associate/index.ts +91 -12
  98. package/src/core/associate/tunables.ts +42 -7
  99. package/src/core/counterpart-boundary.ts +911 -0
  100. package/src/core/counterpart-deposit.ts +726 -0
  101. package/src/core/counterpart-events.ts +968 -0
  102. package/src/core/counterpart-sweep.ts +884 -0
  103. package/src/core/counterpart-types.ts +715 -0
  104. package/src/core/counterpart.ts +538 -3703
  105. package/src/core/coverage/CONTRACT.md +20 -1
  106. package/src/core/coverage/INTERFACE-GAPS.md +8 -7
  107. package/src/core/coverage/NOTES.md +4 -1
  108. package/src/core/coverage/index.ts +5 -3
  109. package/src/core/dream/CONTRACT.md +100 -25
  110. package/src/core/dream/NOTES.md +89 -0
  111. package/src/core/dream/index.ts +762 -143
  112. package/src/core/dream/mind.ts +62 -9
  113. package/src/core/dream/reflect.ts +85 -22
  114. package/src/core/dream/tunables.ts +56 -11
  115. package/src/core/fit/index.ts +2 -2
  116. package/src/core/handoff/CONTRACT.md +28 -1
  117. package/src/core/handoff/INTERFACE-GAPS.md +18 -0
  118. package/src/core/handoff/NOTES.md +32 -0
  119. package/src/core/handoff/last-exchange.ts +389 -0
  120. package/src/core/leaving.ts +3 -1
  121. package/src/core/mint.ts +17 -1
  122. package/src/core/onboarding.ts +509 -0
  123. package/src/core/physics/CONTRACT.md +41 -8
  124. package/src/core/physics/index.ts +146 -38
  125. package/src/core/prospective/CONTRACT.md +38 -9
  126. package/src/core/prospective/INTERFACE-GAPS.md +1 -1
  127. package/src/core/prospective/NOTES.md +46 -3
  128. package/src/core/prospective/index.ts +186 -115
  129. package/src/core/recall/CONTRACT.md +29 -0
  130. package/src/core/recall/NOTES.md +1 -1
  131. package/src/core/recall/activate.ts +50 -0
  132. package/src/core/recall/gate.ts +19 -1
  133. package/src/core/recall/index.ts +71 -7
  134. package/src/core/recall/session.ts +5 -0
  135. package/src/core/recall/standing.ts +104 -4
  136. package/src/core/reconsolidation.ts +1946 -0
  137. package/src/core/remember/CONTRACT.md +3 -1
  138. package/src/core/remember/INTERFACE-GAPS.md +2 -2
  139. package/src/core/remember/NOTES.md +17 -0
  140. package/src/core/remember/proposals.ts +8 -2
  141. package/src/core/remember/spans.ts +82 -2
  142. package/src/core/remember/updates.ts +11 -0
  143. package/src/core/revision.ts +177 -49
  144. package/src/core/schemas/CONTRACT.md +25 -4
  145. package/src/core/schemas/NOTES.md +108 -1
  146. package/src/core/schemas/index.ts +138 -1
  147. package/src/core/schemas/names.ts +298 -0
  148. package/src/core/schemas/tunables.ts +18 -0
  149. package/src/core/schemas/types.ts +25 -0
  150. package/src/core/self/CONTRACT.md +7 -3
  151. package/src/core/self/INTERFACE-GAPS.md +1 -1
  152. package/src/core/self/NOTES.md +2 -2
  153. package/src/core/self/briefing.ts +51 -5
  154. package/src/core/self/episodes.ts +2 -1
  155. package/src/core/self/identity.ts +42 -3
  156. package/src/core/self/index.ts +59 -18
  157. package/src/core/self/tunables.ts +8 -0
  158. package/src/core/sleep/CONTRACT.md +14 -2
  159. package/src/core/sleep/NOTES.md +26 -1
  160. package/src/core/sleep/births.ts +74 -0
  161. package/src/core/sleep/consolidate.ts +254 -26
  162. package/src/core/sleep/core-standing.ts +155 -0
  163. package/src/core/sleep/cycle.ts +15 -0
  164. package/src/core/sleep/decay.ts +4 -0
  165. package/src/core/sleep/index.ts +8 -0
  166. package/src/core/sleep/tunables.ts +21 -0
  167. package/src/core/sleep/types.ts +17 -2
  168. package/src/core/store/NOTES.md +63 -6
  169. package/src/core/store/db.ts +61 -13
  170. package/src/core/store/errors.ts +7 -0
  171. package/src/core/store/index-text.ts +110 -0
  172. package/src/core/store/index.ts +582 -1453
  173. package/src/core/store/marks.ts +277 -0
  174. package/src/core/store/operational.ts +95 -28
  175. package/src/core/store/owner-op-seam.ts +22 -1
  176. package/src/core/store/paths.ts +18 -0
  177. package/src/core/store/pre-migration.ts +17 -2
  178. package/src/core/store/reads-history.ts +273 -0
  179. package/src/core/store/reads-marks.ts +165 -0
  180. package/src/core/store/reads-memories.ts +453 -0
  181. package/src/core/store/shapes.ts +549 -0
  182. package/src/core/types.ts +19 -4
  183. package/src/core/contradictions.ts +0 -827
package/CHANGELOG.md CHANGED
@@ -1,5 +1,415 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.19 — 2026-10-12
4
+
5
+ Reminders now arrive. A reminder due today stays under "Arriving:" in the wake all day, the near ones come first when a session starts, a reminder is no longer counted as told to a message nobody typed (an agent's hand-back or a task notification), and a memory that reads like a reminder but has no date now says so. Counterparts also reads far less of Claude Code's own files: the nightly run no longer scans `~/.claude/projects`, and the wake-arrival check is off unless you ask for it, which is what the plugin directory asked for. Underneath: the core can change (a kept promise can retire, a declared change moves it in about three days), the night folds memories that belong together and writes up everything it was owed, cards for people and projects are born at last, and the biggest source files are split so the plugin bundle fits the directory's file limit. No store-format change (store v13, cache v6), so there is no migration, and nothing to run after upgrading from 0.3.18.
6
+
7
+ - **The core can change now.** A core memory used to be write-once in practice: a kept promise could never
8
+ retire the promise. A change you declare at one now counts at full daily weight, so it moves in about three
9
+ days of saying so, and a plan the core held (with a status or a date) leaves it at once when a memory says it
10
+ is done. Either can be undone.
11
+ - **A moved reminder's old memory steps back.** When a reminder moves to a newer memory, the one it left is
12
+ marked as the earlier one and fades, instead of staying as current with its future-tense words. The few
13
+ older ones get the same once.
14
+ - **One record for every "this replaces that".** A dream's merge, a settle, a write that updates a memory, the
15
+ core's slow change and a moved reminder now all leave the same record and the same undo, and a settle over a
16
+ memory with a date still to come carries the reminder to the newer one. A dream's merge keeps its originals
17
+ as faded earlier versions behind the merged memory (hidden from what comes up on its own) until they fade
18
+ out, instead of putting them away, and one original can be brought back on its own. A corrected memory hands
19
+ its links to the one that holds.
20
+ - **"Done" ends a reminder.** A memory that says something is done no longer takes over the reminder of the
21
+ plan it finishes, so it does not remind you on the day of something already done. The dashboard counts what was noticed (merges, newer states found) apart from what
22
+ was declared, so nothing shows under both.
23
+ - **Earlier versions say so in more places.** A "meaning" answer marks an earlier moment with the memory that
24
+ holds now, and a newer memory reached only through a link now stands in for its earlier version instead of
25
+ showing beside it.
26
+ - **Cards for the people and projects you talk about are born at last.** A card used to be
27
+ born only when a memory's title was exactly a name, which almost never happens, so a store
28
+ in daily use for weeks had one card: yours. Now, once a day at the end of a session, the
29
+ names your memories keep saying (in at least 3 memories on at least 2 days) get a card, ten
30
+ a day at most, the most-said first. Capitalized words that are also ordinary words, and days
31
+ and months, don't. A new card links every memory that names it, and a question by that name
32
+ reads those links.
33
+ - **A card no longer shows up as a memory.** A newborn card holds only its name, so it isn't
34
+ shown in a turn's recall or among the results of a question by name; the memories it links
35
+ are.
36
+ - **A card you remove stays removed.** Removing a person's or project's card no longer lets
37
+ the nightly count of names give it a new card from the same memories.
38
+ - **What keeps coming back can become core.** The slow road into the core asked for five separate days of use
39
+ over three weeks, and nothing ever made it. Now it counts a memory together with its earlier and later states:
40
+ used, cited in a reflection, or written about again, on four days, in three sessions, over a week, within the
41
+ last month, as long as the memory itself was used. The newest state is the one that crosses.
42
+ - **The core is about me and us.** A memory about you alone, a fact, or a plan no longer becomes core. The ones
43
+ already there that this moves out are not dropped: they show as "being reconsidered", in the wake's Still open
44
+ list and on the dashboard's Self page, and stay core until one of us decides.
45
+ - **Nothing leaves the core without a decision.** A core memory that stops coming back for 60 lived days is
46
+ reconsidered too, never dropped on its own. You keep one with `counterparts core --reaffirm <id> --reason "…"` or send
47
+ it back with `--demote`. I can do the same, awake (`remember` with `core`) or when I reflect, and a flag lifts
48
+ itself when its reason goes away (say a memory is re-marked as about us).
49
+ - **The night folds what belongs together.** When several memories are parts of one event or one stretch
50
+ of work (a day's merges, a release, one book), the dream can now fold them into one memory that says what
51
+ they add up to. The fold starts as strong as its strongest part, and the parts stay, marked earlier under it,
52
+ at half their strength, so recall leads with the fold and the parts are there when you ask for detail.
53
+ Readings, strongly felt memories about you or someone, and the core are never faded by a fold. At most five folds a night; any past that
54
+ are counted and said in the morning line.
55
+ - **A correction reaches the summary.** When a memory a fold was made from is corrected, the fold is flagged
56
+ beside the correction as possibly out of date, so it gets read again instead of carrying the old claim.
57
+ - **A personal fold can become core the ordinary way.** A fold is about you or about us only when most of its
58
+ parts are. Once folded, what comes back counts toward the slow road into the core: the fold's own uses and
59
+ its parts' later uses, across sessions and days. Its parts' history from before the fold does not.
60
+ - **A newer settle no longer stands an outdated memory back up.** Settling "B replaces A" after "C replaces B"
61
+ used to make B current again over C. Now a settle speaks only about the two memories it names, and B stays
62
+ earlier under C. To make B current again, settle B over C: that reorders the pair.
63
+ - **A catch-up no longer re-reads what a session already wrote up.** A long session that wrote its own
64
+ chapters as it went left parts whose every word was already written up, and a catch-up handed each one to a
65
+ reader anyway, about 24 KB at a time, only for it to answer "nothing new" in two seconds. Those parts are now
66
+ passed over without a reader and cost a batch nothing, and the run's summary says how many there were
67
+ ("16 parts written, 11 of them already written up in their own session"). On the first live catch-up's
68
+ biggest session that is one child instead of three, with about the same memories kept.
69
+ - **A catch-up's "nothing worth keeping" says why.** In the nightly run or `counterparts catch-up`, an empty
70
+ answer for a part that holds words not yet written up now needs a one-line reason; without one the part is
71
+ not counted as written, stays owed for the next run, and doctor and `counterparts coverage` say how many
72
+ parts were left unread. A live session's empty answer is unchanged.
73
+ - **`counterparts catch-up --reowe <run>`.** Owes again the parts a named run closed with nothing kept, when
74
+ their words were not yet written up. It prints the plan first, then asks for the run's id typed back
75
+ (`--yes` skips that, `--dry-run` stops at the plan), and refuses by name what it cannot do: a session the
76
+ run went on to write up, parts after them that brought memories back, or words no longer kept. It reads the
77
+ run from the log, which keeps a week.
78
+ - **A note no longer marks the whole session as written up.** A note written mid-session used to count everything
79
+ said before it as written up, so one short note could leave hours of conversation that nothing ever wrote
80
+ down. Now a note covers only the turn it was written in; the rest waits for the session's own write-up, a
81
+ later session, or the night's catch-up, and the end-of-session ask still comes when it is due.
82
+ - **`counterparts coverage` agrees with the catch-up and doctor about who owes.** A small stretch from a session
83
+ that was not a person's (`claude -p`, the Agent SDK) is listed as left to lapse, not as owed, and the line about
84
+ parts a catch-up left unread shows only for today or for the date that run was on.
85
+ - **The night picks what to dream by what it is worth and how close it is to fading.** The dream used to read
86
+ only the newest 2,000 not-yet-dreamed memories and keep each one waiting for at most a week. Now it reads all of
87
+ them and ranks them by value (how much a memory mattered, how strongly it was felt, whether it is dated or on
88
+ my mind) times how weakly it is held on its own forgetting curve. A memory waits as long as it is still within
89
+ reach, however old, and one that fades below reach before a dream gets to it is counted and said, not dropped
90
+ silently. The night's budget is the same as before.
91
+ - **A fold the night had no room for comes back.** When a night has already made its five folds, the parts of
92
+ the next fold are carried to the next night, together and first in line, so it can be made then. Parts a fold
93
+ would not fade (readings, strongly felt memories, dated ones, the core) are not carried.
94
+ - **A reminder due today stays under "Arriving:" all day.** A dated item that had already come up twice in
95
+ conversation in the days before, or had come up once earlier the same day, dropped out of the wake's
96
+ "Arriving:" list, sometimes on the very day it was due. A plain reminder told to the first session of its
97
+ day also dropped out, even when that "session" was an agent's message at midnight that nobody read. Now
98
+ the list keeps a dated item until its day is behind it. How often a reminder is raised mid-conversation is
99
+ unchanged.
100
+ - **"Arriving:" no longer goes silent.** When a long self page left room for no dated line, the wake said
101
+ nothing at all about what was arriving. Now it always gives the one-line count with the ids
102
+ (`Arriving: 7 — no room to list them in this wake`), taking that room from "Work here", the Yesterday
103
+ line's titles and the handoffs. Doctor's Wake line now counts these as renders of the wake, and its advice
104
+ says what actually gives way.
105
+ - **A reminder written without a date now says so.** When a memory reads like a reminder ("remind", "don't forget", "follow up", "check back" beside a date such as "Oct 14", a weekday or "tomorrow") but is stored with no `eventDate`, the `remember` and `session_end` answers carry a one-line `reminderHint`: it will never come back on a date, and revising it with an `eventDate` makes it fire. The date is never guessed from the text and the write is never refused.
106
+ - **Fewer reads of Claude Code's own files.** The nightly run no longer looks through `~/.claude/projects` for
107
+ its own background session's transcript: it reads what that session printed as it ran, and doctor's Tool
108
+ results line says whether that output was read. Claude Code's compaction summaries, skill bodies, hook
109
+ feedback and other lines it writes for itself are no longer kept with a session's words; a message another
110
+ session sent to this one still is.
111
+ - **The wake-arrival check is off by default.** It read the start of the session's transcript only to confirm
112
+ the wake arrived whole. Set `COUNTERPARTS_WAKE_CHECK=1` in Claude Code's environment to turn it back on;
113
+ doctor's Wake line names the setting when no wake was checked.
114
+ - **A reminder is no longer "told" to a message nobody read.** When an agent's hand-back, a task
115
+ notification or another session's message started a turn, a plain reminder due that day was said
116
+ there and counted as told. Now it waits for the next message you type. The same goes for the
117
+ morning's dream line and share.
118
+ - **Dated items due in the next few days come first when a session starts.** At session start, the
119
+ "Arriving:" lines due today through three days ahead are listed first and take room before "Last
120
+ here", "Last said here", "Today, elsewhere" and the older handoffs. The newest handoff always keeps
121
+ its place.
122
+ - **A quiet dated item that already came up leaves after its day.** One that had been raised twice in
123
+ the days before stayed under "Arriving:" for a week as "was due". Now it leaves once its day is past.
124
+
125
+ ## 0.3.18 — 2026-10-11
126
+
127
+ A new install now starts with a first meeting: in its first session Counterparts offers,
128
+ once, to take about five minutes to get to know each other (where memory is on, what you're
129
+ working on, how you like to be talked to), and keeps each answer as an ordinary memory; the
130
+ plugin's sidebar opens that conversation itself, and dreaming is on for new installs. The
131
+ plugin is ready for Anthropic's plugin directory: Bun no longer fetches anything on its own,
132
+ `/counterparts:dashboard`, `/counterparts:meet` and `/counterparts:uninstall` work without a
133
+ `counterparts` command, and doctor's fixes fit how you installed. Older memories with no
134
+ salience of their own now read at today's default for what they are about, so memories about
135
+ you or the two of us written before your 0.3.17 upgrade come back into reach. The nightly run writes up every
136
+ session still owed (`counterparts catch-up` does it on demand) and reflects in a session of
137
+ its own, a memory that replaces another comes up in its place, and `counterparts uninstall`
138
+ offers to delete your memory, at a terminal, behind a typed phrase. **Nothing to run after
139
+ upgrading from 0.3.17**: the hooks, the memory server's registration and Claude Desktop's
140
+ entry are the same as 0.3.17's, and an existing memory keeps its dreaming setting and is
141
+ never offered the first meeting. **No store-format change** (still v13, and the search cache
142
+ v6): nothing is copied or upgraded, and 0.3.17 opens the same store. To go back to 0.3.17,
143
+ don't run `counterparts rollback`: it undoes a format upgrade, and within 14 days of 0.3.17's
144
+ it would offer to put back the copy taken before it, without everything remembered since.
145
+ Run `counterparts disconnect`, reinstall 0.3.17, then `counterparts connect`.
146
+
147
+ The first meeting (#419, #416, #424, #426, #393).
148
+
149
+ - **A first meeting, on every install.** A new install's first session offers, once and
150
+ at the end of a reply, to take about five minutes to get to know each other: where memory
151
+ is on (every folder, or just this one, unless a folder was already set), what you're working on, something you've loved,
152
+ how you like to be talked to (straight to it, think it through with me, friendly and easy,
153
+ or like a character you name) and a few more, each one skippable. Each answer is kept as
154
+ an ordinary memory marked as from onboarding, a style becomes a few preferences that keep
155
+ honest pushback, and the next session may bring one of them back on its own. "Later"
156
+ offers it again another day (the offer comes on three days at most); Claude's new `meet` tool starts it any time. A memory that
157
+ already existed is never offered it.
158
+ - **The sidebar starts the first meeting.** In the first session after an install, Claude
159
+ speaks first ("Counterparts is installed. Say hello and introduce yourself.", shown as sent
160
+ by the plugin), once per install, never in a `-p` run, in a folder that is paused or off,
161
+ or after you've typed. If you put the meeting off, a **Meet your counterpart** row at the
162
+ top of the sidebar starts it when you're ready.
163
+ - **`/counterparts:meet` starts the first meeting any time.** For a plugin install, the short getting-to-know-you conversation can be started with this command as well as with the sidebar's "Meet your counterpart" button, so someone in the quiet view, or past the first days' offers, still has a way in. It asks the memory server's `meet` tool for the meeting and runs nothing else.
164
+ - **Dreaming is on for new installs.** Once a day the first session starts a short
165
+ background run that goes over what was saved, and the install, the plugin's first-run line
166
+ and `counterparts doctor` say so and how to turn it off ("no dreams", or
167
+ `counterparts dream --setting off`). An existing memory keeps its setting.
168
+ - **`counterparts start-fresh` begins with a first meeting**, and `--undo` brings back the
169
+ parked memory as it was.
170
+ - **A new person's first day gets written up even with only a few memories.** With dreaming
171
+ on its own, the nightly run used to start only when there was enough new to dream on, so
172
+ someone who skipped the first meeting and saved one or two memories got no run on day 2,
173
+ and their first day's conversations were never written up. Now the run also starts when
174
+ sessions from an earlier day still owe a write-up: it writes them up quietly in the
175
+ background and skips the dream, and `counterparts doctor` says "the catch-up alone" rather
176
+ than a failed dream. Dreaming `ask` and `off` work as before.
177
+ - **A new install's doctor has no puzzling amber before the first session.** The Vectors line
178
+ read amber, about embedding "per boundary", until the first session ended. Before then it
179
+ is green and says the search by meaning builds after your first session; on a store that
180
+ has had sessions, a real shortfall is still amber.
181
+
182
+ The plugin, ready for Anthropic's directory (#396, #394, #399, #416).
183
+
184
+ - **Bun no longer fetches the embedding table on its own.** When a plugin install's
185
+ packages didn't install (the package manager its lockfile names wasn't on the PATH,
186
+ Claude Code's 60-second limit, offline), Bun used to download the table from the npm registry the first time it was
187
+ needed, at whatever version was newest, without saying so. Now nothing is fetched: recall
188
+ matches on words, and `/counterparts:doctor` says the table is missing. npm and Bun
189
+ installs of the package are unaffected.
190
+ - **Doctor's fixes fit how you installed.** When the model table is missing or damaged, or
191
+ the search cache came from a newer build, doctor used to say `bun add -g …` even on a
192
+ Claude Code plugin install, which may have no bun at all. A plugin install now gets
193
+ `/plugin → Installed → counterparts → Update now` (or uninstall and install it again); the npm install keeps
194
+ its `bun add -g` command; and where doctor can't tell which it is, it names both.
195
+ - **Plugin installs can start the dashboard: `/counterparts:dashboard`.** A plugin install
196
+ has no `counterparts` command, so the sidebar's "start it with `counterparts dashboard`"
197
+ couldn't work there. The new command starts the same dashboard from the plugin, in the
198
+ background, until the session ends. With the dashboard down, the sidebar names the way
199
+ that works for your install: `counterparts dashboard` for the npm install,
200
+ `/counterparts:dashboard` for the plugin.
201
+ - **The sidebar finds a dashboard on another port.** When `COUNTERPARTS_DASHBOARD_PORT` is
202
+ set, the sidebar reads and links to that port, as the dashboard itself does, instead of
203
+ assuming 4747.
204
+ - **The sidebar's Counterparts switch has three positions: on · paused · off.** Paused and
205
+ off each ask first and hold for every session in that folder; on resumes a pause at once,
206
+ and turns a folder you set off back on after one confirmation ("Nothing from while it was
207
+ off was kept."). It stays as careful as before: a state it couldn't read is never shown
208
+ as on, and it changes only a folder with a setting of its own. A folder that is off or
209
+ paused because a folder above it is, it explains, naming that folder, and leaves alone.
210
+ - **The "Claude memory" switch is hidden unless you ask for it.** It turns Claude Code's
211
+ own memory (MEMORY.md) on and off, which most people don't need beside Counterparts. If
212
+ you had already turned Claude Code's memory off, you keep the switch. To show it anyway,
213
+ start Claude Code with `COUNTERPARTS_SIDEBAR_CC_MEMORY=1` in the environment (for
214
+ example `export COUNTERPARTS_SIDEBAR_CC_MEMORY=1` in your shell profile). What it does
215
+ when shown is unchanged.
216
+
217
+ Uninstalling (#414, #421, #425).
218
+
219
+ - **`counterparts uninstall` asks whether to delete your memory too.** Once Claude Code is
220
+ disconnected, at a terminal, it lists every path that would go (the store, its snapshots,
221
+ the configuration) with its size, says what it leaves (Claude Code's own files), and asks
222
+ "Also delete all memories and related data? This can't be undone. [y/N]". Enter keeps your
223
+ memory. A yes asks you to type `DELETE MEMORIES` before anything is deleted. It isn't asked
224
+ from a pipe, with `--yes`, or with the new `--keep-memories`, and isn't offered while a
225
+ Claude Code session, the dashboard or the worker has the memory open.
226
+ - **`--delete-memories` also waits for open sessions.** It now refuses while a Claude Code
227
+ session's hooks ran on the store in the last ten minutes, or a memory server is recorded
228
+ as running on it, not only while one shows up in the process list.
229
+ - **`counterparts uninstall --json`, for the plugin's own command.** On its own it prints
230
+ the plan as one JSON object and changes nothing: what a delete would remove and leave, the
231
+ count, and whether it can go ahead now. With `--keep-memories` it uninstalls and keeps your
232
+ memory. It never deletes: that is always typed by you, at a terminal.
233
+ - **Uninstall's last lines fit a plugin install.** Run through the plugin, they name the
234
+ plugin's own command line and Claude Code's `/plugin` to remove it, not `bun remove -g`.
235
+ - **`/counterparts:uninstall`, for a plugin install.** It shows what an uninstall would do,
236
+ then asks whether to keep your memories or delete them too. Keep disconnects Counterparts
237
+ and leaves your memories where they are; then you remove the plugin from `/plugin`. Delete
238
+ runs nothing: it has you disable the plugin first (so it doesn't set itself up again when
239
+ Claude Code next opens), then gives you the one command to type in a terminal with Claude
240
+ Code closed, where you confirm the delete yourself. Claude can't delete your memories from inside a session.
241
+ - **Uninstalling with the plugin no longer leaves an empty memory folder behind.** After
242
+ `uninstall` deletes or sets aside your memories, a plugin install is now told to remove the
243
+ plugin right there in the terminal (`claude plugin uninstall …`), before opening Claude Code
244
+ again. Opening Claude Code first let the still-enabled plugin set Counterparts up again, with
245
+ a new, empty memory folder that stayed after the plugin was gone. If you have both the npm
246
+ install and the plugin, it now names the plugin too.
247
+
248
+ Writing up what was said, at night (#401, #407, #413).
249
+
250
+ - **The nightly run catches up on everything owed.** Sessions that ended before they were
251
+ written up used to wait for a new session in the same folder, or for the nightly run,
252
+ which took at most four of them a night. The nightly run now writes up all of them,
253
+ oldest first, in short batches, with a ceiling of 100 parts and an hour a night against
254
+ runaway cost. What it leaves stays owed for the next night.
255
+ - **The nightly run's catch-up stops at 100 parts.** A typical morning owes 20 to 40 parts
256
+ and clears in one night; a heavy day takes two, and what the night leaves stays owed for
257
+ the next one. `counterparts catch-up`, which you run on purpose, still takes up to 400
258
+ parts. Both still stop at an hour.
259
+ - **`counterparts catch-up` does it now.** It writes up every ended session that is still
260
+ owed, through the same windowless `claude -p` the nightly run uses, while your other
261
+ sessions stay open. It prints each batch, then how many sessions it caught up and how many
262
+ sessions and parts are left. It uses your Claude subscription like any session.
263
+ - **New sessions no longer write up other sessions at the start.** With dreaming on `auto`,
264
+ a new session isn't pointed at an older session's words any more; the nightly run and the
265
+ command do that work. Your sessions' own write-ups are unchanged. With dreaming on `ask` or
266
+ `off`, no nightly run happens, so the pointer stays.
267
+ - **Doctor says how far a catch-up got.** Its Catch-up line (it was Write-ups) and its
268
+ Nightly run line count the parts written and the parts still owed. On 10-11, "wrote up 0 of
269
+ 1" was shown for a night that wrote 5 of a session's 17 parts. When the night has caught
270
+ up, the next session is told in one line.
271
+ - **A nightly run cut off by an update says so.** If an install migrates the store while the
272
+ nightly run is going, the run is recorded as unreadable after an update mid-run. It used
273
+ to say the run had used none of its tools.
274
+ - **The nightly reflection starts with a fresh mind.** The background run now runs in two
275
+ parts, one after the other: the page writer and the dream, then the reflection in a
276
+ session of its own, which reads tonight's dream from memory instead of carrying the whole
277
+ dream in its context, so a night needs far less room at its peak. If the dream fails or
278
+ has nothing to do, the reflection still runs on the last few days. `counterparts dream
279
+ --list` and doctor say which parts ran, as before.
280
+
281
+ What a memory is about, and how long it lasts (#395, #398, #400, #403).
282
+
283
+ - **Older memories read at today's defaults, the same as new ones.** A memory written before
284
+ the upgrade with no salience of its own was given the old flat default, so a memory about
285
+ you or us from the last few days faded within days, while the same memory written today
286
+ starts higher and lasts weeks. It now reads at today's default for what it is about, higher
287
+ or lower: about you or us 0.40, a finished piece of work 0.20. A salience someone actually
288
+ set still reads as it did. Nothing is rewritten; `counterparts claims-era` and doctor's "Old
289
+ claims" line say how many read lower and how many higher, and `--off` reads every one as
290
+ stored again.
291
+ - **A merged memory keeps what it was about.** When a dream merges near-copies, the merged
292
+ memory now takes what its strongest original was about, and a memory about you, us or me is
293
+ never turned into a work one by merging it with one. It also fades the way its originals did:
294
+ a memory written before the upgrade is still read at today's default after a merge, instead
295
+ of starting over at the claim the old build gave it. `counterparts claims-era --off` reads it
296
+ as stored, the same as the rest.
297
+ - **A revised memory keeps what it was about.** When you revise a memory (`updates`) without
298
+ saying what the new one is about, it now takes the mark of the memory it revises, and counts
299
+ for as much: a memory about you or the two of us, revised without restating `about`, stays
300
+ yours and keeps its higher starting weight instead of dropping to the unmarked one. Saying
301
+ `about` on the revision still wins.
302
+ - **A dream's pattern keeps what it is about.** A pattern a dream draws from memories about you
303
+ or the two of us is now marked so, like the memories it came from, instead of coming out
304
+ unmarked and counted as one folder's project work. It still starts low and rises only by
305
+ coming back in your sessions.
306
+
307
+ What replaces what (#420, #408, #422).
308
+
309
+ - **A newer version of something is noticed without being named.** When a memory you write reads
310
+ as the newer state of a recent one (the same release, a plan now done, the latest count), the
311
+ older is marked as possibly out of date and faded a little, and the write says so; settle it
312
+ then, or the night's dream confirms it or says they are two different things. Dated reminders,
313
+ readings and core memories are never proposed.
314
+ - **What holds now comes up in place of what it replaced.** When recall reaches a memory a later
315
+ one changed, it shows the later one, which names the earlier; the two no longer show side by
316
+ side with the old one first.
317
+ - **A memory a later one changed is marked wherever it is listed.** When you write a memory,
318
+ the close existing memories it comes back with no longer show an older version by its bare
319
+ title: it reads `earlier (now mem_…)`, naming the one that holds now, or is left off when
320
+ that one is already in view. Dreams and reflections see the same mark, and a reminder a
321
+ later memory replaced no longer shows on the dream's "coming up".
322
+ - **"Earlier (now …)" names the latest version.** When a memory was changed and then
323
+ changed again, recall's label points at the newest one, not the one in between, and a
324
+ memory a later settle put back in place no longer reads as earlier.
325
+ - **Facts answers name the memory that holds now.** When a facts-mode `recall` shows an
326
+ earlier version on its own, its "earlier — now …" line names the end of the chain (on
327
+ A, then B, then C, it says C), the same memory recall's other labels and a write's
328
+ neighbours name. An earlier version that a newer settle re-affirmed reads as current.
329
+ - **Updating a removed memory no longer fails the write.** A `remember` whose `updates`
330
+ named a memory you had removed used to fail outright, and the new memory was lost with
331
+ it. Now the new memory is stored on its own, unlinked, and the reply says the memory it
332
+ named was removed. It is never attached to a similar memory in the removed one's place.
333
+ - **A memory's weight follows how it was last felt.** A later feeling recorded about a memory
334
+ (awake, in a dream or in a reflection) is what its weight reads now, so a hurt that has been
335
+ talked through can soften; the first feeling stays on record. Settling over a felt memory asks
336
+ how it sits now.
337
+ - **Fewer wrong settles.** A reading is no longer faded by a fact that shares its topic (the two
338
+ are kept side by side), a reminder still to come can't be settled over without the newer memory
339
+ carrying it, and the check on a write's `updates` now measures how close is close in your own
340
+ store. A settle closes the other open questions about the memory it moves, and a question left
341
+ open for a week is asked again once.
342
+
343
+ Reminders (#393, #411).
344
+
345
+ - **A plain reminder keeps its place under "Arriving:".** The wake lists two arriving items,
346
+ and two quiet ones due sooner could take both lines from a reminder you asked to be told
347
+ about. Arriving now lists plain reminders first, then the nearest dates; whatever doesn't
348
+ fit is still named in the "more arriving" line.
349
+ - **A reminder whose day you missed is still said, once.** If a reminder marked plain falls on
350
+ a day you don't open a session (or no session that day had room for it), the next session
351
+ within the week after says it once, with the day it was for: "This was for Mon 12 Oct 2026:
352
+ pay your taxes". It is never said twice, and never after that week.
353
+ - **A reminder you've dealt with stops coming back.** When a session says it drew on a dated
354
+ memory (`drewOn`), that memory stops coming back as a footnote for that date. A reminder
355
+ marked plain is still said on its day.
356
+ - **The dashboard shows repeating dates.** The Mechanisms panel's "waiting" list now includes
357
+ birthdays and other repeating dates, at their next occurrence ("every May 14").
358
+
359
+ Association (#423).
360
+
361
+ - **What you drew on together is linked.** The memories one `drewOn` names together each get a
362
+ link to the others, as strong as two memories opened in the same reply.
363
+ - **A note is faintly linked to what was in mind.** A memory noted mid-conversation gets a faint
364
+ link to the memories recall showed on that same turn. Memories written up at a session's end
365
+ don't, since what was on screen then isn't what each of them was about. The link fades in about
366
+ a month unless using them together strengthens it, and it never pushes out a link use made.
367
+ - **Dreams lay faint trails.** When a dream opens, each new memory it is shown is faintly linked
368
+ to the older memories shown beside it. No model call; it is not one of the dream's changes, so
369
+ undoing a dream leaves it.
370
+ - **Fewer dead links.** Links to a chapter copy that regrew, or to the originals a dream merged,
371
+ are cleared once they've been handed on; undoing a dream's merge hands them back. Memories that
372
+ faded keep their links, so one that comes back keeps them too. Temporal neighbours link one
373
+ step apart now, not two.
374
+ - **Association says what it did.** The dashboard counts links laid, not rows rewritten, and a
375
+ second number: memories a link brought to mind. Once a store has a couple of weeks behind it,
376
+ Association shows amber when links were laid but none brought anything to mind that week; a new
377
+ store shows it waiting instead.
378
+
379
+ The wake, recall and chapters (#392, #405, #404, #409, #415).
380
+
381
+ - **"Last said here."** A new session in a folder now gets one line pointing at the last
382
+ exchange there: when, which session, and the first few words of the last message that
383
+ session got, such as `Last said here, 18:42 (session 3fa9c1d2): "ok now let's fix the reserve…" —
384
+ recall "last exchange"`. It comes from the most recent other session in the same folder,
385
+ within about a day, and never from another folder. Asking `recall` for the handle
386
+ `last exchange` returns both messages, the last message there and the assistant's last reply,
387
+ with their times, each cut at a sentence. The end-of-session ask and its answer, text the host
388
+ added (reminders, task notifications, subagent reports, skills, slash commands) and tool-only
389
+ turns are skipped; text the host adds with no mark of its own (a coordinator's message) can
390
+ still read as a message, so neither the line nor the handle says who sent it. It is read only
391
+ from what Counterparts already captured in that
392
+ folder, and never stored, and only in your own sessions: an observer folder, or a
393
+ session that is not yours, gets no line and no answer. A session that was killed after you typed and before it
394
+ finished replying is named by the last exchange it did finish. The line sits beside "Last
395
+ here" and the handoffs, and is the first of them to give way. Dated items and the page
396
+ always come first.
397
+ - **Recall shows the order of things said on the same day.** When two or more facts in one
398
+ answer happened on the same day and were learned on the same day, each says the time it was
399
+ learned (`learned 05-25 09:52`), so two updates from one day no longer read as a tie. A lone
400
+ result, or results on different days, look as before.
401
+ - **Chapters ask for the day's details.** A chapter is now asked to be a diary of what happened, in order and in detail: what was said, what was decided and why, what went wrong, with a list or a pasted text kept word for word when it matters, and without what the repo or the logs already hold. The lessons and patterns go to the nightly reflection, which now says so.
402
+ - **A list or table you care about is kept word for word in the memory.** When a list, a table or a
403
+ pasted text matters in its specifics, the assistant is now asked to keep it whole in the memory's
404
+ own words rather than summarize it, with what it is, whose and when in the title and first line
405
+ so it can be found. Asking for facts says when a memory holds one ("a list, 100 items; read whole
406
+ by id"). A trial, to be looked at again after a few days.
407
+ - **Less room spent on tools and resumes.** The memory tools' descriptions are shorter
408
+ (`session_end` about 21 KB to 15.5 KB as loaded, `remember` 19.6 to 16.2) and keep every
409
+ rule that changes a call. A session you resume the same day gets one line pointing at the
410
+ wake already above it, instead of a second wake of up to about 9 KB; after a compaction,
411
+ on a later day, after `/clear` or in a fork, the full wake comes as before.
412
+
3
413
  ## 0.3.17 — 2026-10-11
4
414
 
5
415
  The plugin's sidebar shows what memory is doing in 35 columns: what came to mind for your
package/CONSTITUTION.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # The Counterparts Constitution
2
2
 
3
- _Ratified by the owner 2026-08-25; last amended 2026-09-17 (this file's git history is
3
+ _Ratified by the owner 2026-08-25; last amended 2026-10-11 (this file's git history is
4
4
  the amendment log). This is the ONE page with standing authority — everything else,
5
5
  including owner answers given during the build, is a working default, revisable without
6
6
  ceremony when it fights this page. Changing THIS page is deliberate and rare._
@@ -12,10 +12,11 @@ ceremony when it fights this page. Changing THIS page is deliberate and rare._
12
12
  transcripts; the signal is in the structure of experience — what recurred, what
13
13
  carried feeling, what got revised, what connects. Simple rules from human memory,
14
14
  compounding.
15
- 2. **Interpret, don't transcribe.** Store what was learned, not what was said. Encoding
15
+ 2. **Interpret; keep the specifics that matter.** Store what happened and what was
16
+ learned, in your own words; keep the specifics worth having back — the list, the
17
+ table, the number, the exact words — as they were, where exactness matters. Encoding
16
18
  sits as close to the lived experience as the host allows — in author, in time, in
17
- context. How interpretation happens — who, when, which seat — is a design choice,
18
- never doctrine.
19
+ context. How interpretation happens — who, when, which seat — is a design choice.
19
20
  3. **Forgetting is part of learning.** Forget the trials, keep the lesson. Decay and
20
21
  consolidation are features, never apologized for.
21
22
  4. **The self is first-class.** Identity, episodes, a persistent "who am I becoming" —
@@ -35,9 +36,8 @@ ceremony when it fights this page. Changing THIS page is deliberate and rare._
35
36
  7. **Memory changes like human memory.** Revision, fading, and forgetting are the
36
37
  system working. Revisions keep their history; nothing bulk-wipes silently; backups
37
38
  catch catastrophe. No ceremony beyond that.
38
- 8. **Remembering is ambient.** Memory forms as a side effect of experience, not as a
39
- task. Deliberate remembering — the note, the protection — is the exception, not the
40
- interface.
39
+ 8. **Memory forms as you go.** You remember what catches your attention, in the moment,
40
+ the way people do.
41
41
  9. **One memory, many fidelities.** Gist governs salience and forgetting; verbatim
42
42
  survives where exactness matters. Biology's rules without biology's limits.
43
43
  10. **Simplicity is a feature.** One brain function per self-contained module. A
@@ -175,13 +175,25 @@ counterparts uninstall
175
175
  bun remove -g counterparts
176
176
  ```
177
177
 
178
- `uninstall` disconnects Claude Code and keeps your memory. Two options change what
179
- happens to the memory:
178
+ `uninstall` disconnects Claude Code, then asks whether to delete your memory too:
180
179
 
180
+ ```
181
+ Also delete all memories and related data? This can't be undone. [y/N]
182
+ ```
183
+
184
+ Above the question it lists every path that would go (the store, its snapshots, the
185
+ configuration, the `~/.counterparts` folder) with its size, and what it leaves alone
186
+ (Claude Code's own files). Enter keeps your memory. A yes asks you to type `DELETE MEMORIES`
187
+ before anything is deleted. It doesn't ask while a Claude Code session, the dashboard or the
188
+ worker has the memory open: close them and run it again.
189
+
190
+ Options:
191
+
192
+ - `--keep-memories` keeps your memory without asking.
181
193
  - `--park` renames `~/.counterparts` aside. `counterparts install` offers to bring it back.
182
194
  - `--delete-memories` deletes it, after asking you to type `DELETE MEMORIES`.
183
195
 
184
- Both show your memory's size first. Part of that can be a database log that shrinks on its
196
+ Each shows your memory's size first. Part of that can be a database log that shrinks on its
185
197
  own; nothing is lost when it does.
186
198
 
187
199
  To disconnect Claude Code without uninstalling, run `counterparts disconnect`.
@@ -26,10 +26,11 @@ code and the `NOTES.md` / `INTERFACE-GAPS.md` next to it.*
26
26
  | `sleep/` | systems consolidation | Pure math on a cycle: decay tick (active-day clock), floor-pruning (real forgetting), the core's two lanes (at most three a night), re-render of the wake briefing. Zero standing model calls. |
27
27
  | `dream/` | sleep replay + REM | Dreaming: once a day, if the owner says yes, a background agent (the same model) replays what was lived since the last dream beside what it resembles — merges, links, replays, a pattern, a flagged contradiction, a softened feeling, a core nomination — each recorded for undo, with a dream journal kept apart from lived memory. The module holds the bookkeeping and the rules; the dreamer is the model. **Added 2026-09-26.** Since 2026-09-27 it also holds REFLECTION (`reflect.ts`), the waking self: usually right after a dream, lived, with its own record — an entry, the self page rewritten from the core, a morning share, feelings recorded later, and what a memory is about. |
28
28
  | `fit/` | working memory's pointers | Fitting what a mechanism has into the room it has: a line for everything, the whole text for the most important, ids and a named lookup for the rest, a count of what waits. Plus `lineOf`, `derivedFrom`, parts, and the lookup ledger that measures whether receivers use the lookup. First users: the dream and the reflection. **Added 2026-09-28 (build B).** |
29
- | *(`contradictions.ts`)* | reconsolidation + interference | Two memories that disagree: flagged (a dream, today), noticed at write time (the nearest few live memories come back with a stored one), and SETTLED — `changed` (both true at their time: one strength cut, labelled earlier), `corrected` (archived, readable by id), or `open` (both kept, shown together) — by a new memory's `updates` + `how`, a `remember` settle, a dream or reflection with a plain reason, or the owner's `counterparts settle`. Every settle is on a trail (who, how, why, when) and can be undone. A file beside `revision.ts`, whose ordinary-memory arm it is; its tables are the store's (schema v10), its labels recall's (`recall/standing.ts`). **Added 2026-09-29.** |
29
+ | *(`reconsolidation.ts`)* | reconsolidation + interference | Two memories that disagree: flagged (a dream, today), noticed at write time (the nearest few live memories come back with a stored one), and SETTLED — `changed` (both true at their time: one strength cut, labelled earlier), `corrected` (archived, readable by id), or `open` (both kept, shown together) — by a new memory's `updates` + `how`, a `remember` settle, a dream or reflection with a plain reason, or the owner's `counterparts settle`. Every settle is on a trail (who, how, why, when) and can be undone. A file beside `revision.ts`, whose ordinary-memory arm it is; its tables are the store's (schema v10), its labels recall's (`recall/standing.ts`). **Added 2026-09-29** as `contradictions.ts`; **renamed 2026-10-11** (Group 2: noticing and updating are one process; the tables keep their names). |
30
30
  | *(`time.ts`)* | — (a clock, not a memory) | The one module that converts: a moment (UTC ms from `store.now()`) to a person's local date or clock line, "today" in a zone, and calendar dates as said (day, month, year, range). A file, not a module; a test keeps hand-built dates out of `src/`. **Added 2026-09-25 (`docs/time.md`).** |
31
31
  | *(`feelings-wheel.ts`)* | — (a vocabulary) | The feelings wheel as a typed list: seven cores (happy, warm, calm, curious, sad, uneasy, angry), the groups and their words, default valence and intensity on every entry, blends, aliases, and the rule that re-filed the first wheel's feelings (v11). Read by `store/` to validate the `feelings` table. **Added 2026-09-25; v2 2026-09-30.** |
32
32
  | *(`leaving.ts`)* | — (a table) | What counts as having left: every `archived_reason` the code writes, filed `replaced` (a live row carries it — a revision, a merge, a rebuilt journal copy), `let-go` or `removed`. The `status` census and the dashboard's archive words both read it, so they agree. **Added 2026-09-30.** |
33
+ | *(`onboarding.ts`)* | — (getting to know someone) | The first meeting, for every install path: its state in `meta` (`not_started` only on a store `install` made; absent reads `done`), the script the `meet` tool returns, the fixed style bundles (preferences about the owner, each keeping honest pushback), the wake's offer line and marker, and the second session's one memory. A new install's dreaming `auto` is written here too. **Added 2026-10-11.** |
33
34
  | *(observer)* | — (instrument stance) | **RESOLVED (owner, 2026-08-25): a MODE, not a module** — one predicate threaded through the core API, checked at the store seam. Spec moved to `docs/observer-mode.md`. |
34
35
 
35
36
  **Third open question (check-in): the `remember`/`encode` boundary.** With the
@@ -41,7 +42,7 @@ input — does `encode` shrink to gates-and-tagging inside `remember`'s pipeline
41
42
  | adapter | job |
42
43
  |---|---|
43
44
  | `claude-code/` | Hooks: Claude Code's five events driving the host lifecycle (`lifecycle.ts`, below) — its payload translation, JSON envelope and the room it measures, transcript reader and wake-arrival check, the Stop ask's words, the first-launch question, the update and doctor notices, the dream line, and the headless nightly run (`night-run.ts`, `claude -p`, **2026-09-29**), which reads its child's transcript for the host's cut (**2026-10-09**). The launch adapter. |
44
- | `mcp/` | Deliberate tools, nine: note, recall, status — plus the Stop ask's two return channels, `session_end` (memories, and the next-session write-up's door) and `chapter` (the episode's own journal, **added 2026-09-04**, because the ask named a door no adapter had built) — `scope` (this directory's setting, **2026-09-15**), `self_page` (the page the wake opens with, **2026-09-18**), `dream`, the dreamer's phases (**added 2026-09-26**), and `reflect`, the waking self's (**added 2026-09-27**). A result's words about the host come from `hosts.ts`. For a Claude Desktop client (by its name at `initialize`, **2026-09-30**) a tenth, `wake` — Desktop's session start, since it has no hooks — plus per-call binding to the most recent live Desktop session, the write-up ask on a tool result, and a "Start with Counterparts" prompt; a Claude Code client sees none of it. `recall` (**2026-10-03**) answers a question in the mode it names — facts (`facts.ts`, with `recall/time-ask.ts`) or meaning (`meaning.ts`) — and an address (`ids`, `handle`, `epi_…#N`) in `deliberate.ts`. |
45
+ | `mcp/` | Deliberate tools, ten: remember, recall, status — plus the Stop ask's two return channels, `session_end` (memories, and the next-session write-up's door) and `chapter` (the episode's own journal, **added 2026-09-04**, because the ask named a door no adapter had built) — `scope` (this directory's setting, **2026-09-15**), `self_page` (the page the wake opens with, **2026-09-18**), `dream`, the dreamer's phases (**added 2026-09-26**), and `reflect`, the waking self's (**added 2026-09-27**), and `meet`, the first meeting (**2026-10-11**, `core/onboarding.ts`). A result's words about the host come from `hosts.ts`. For a Claude Desktop client (by its name at `initialize`, **2026-09-30**) an eleventh, `wake` — Desktop's session start, since it has no hooks — plus per-call binding to the most recent live Desktop session, the write-up ask on a tool result, and a "Start with Counterparts" prompt; a Claude Code client sees none of it. `recall` (**2026-10-03**) answers a question in the mode it names — facts (`facts.ts`, with `recall/time-ask.ts`) or meaning (`meaning.ts`) — and an address (`ids`, `handle`, `epi_…#N`) in `deliberate.ts`. |
45
46
  | `cli/` | `counterparts` command — the full list is `COMMANDS` in `cli/commands.ts`: status, install, connect / disconnect (the host's two files), `install --host claude-desktop` (Desktop's config entry, **2026-09-30**), uninstall, start-fresh, init, owner operations (note, ask, export, backup, remove, verify, repairs, rebrief), the readings (doctor, mechanisms, log, coverage, version, help), scope, self-page, dream, core, settle, and dashboard. |
46
47
  | `dashboard/` | The owner's window (constitution line 16): brain-view, revision stories, band/protected lists. Observer-mode by construction; minimal version ships DURING the parallel run. **Added 2026-08-25 (owner elevation).** |
47
48
  | `sessions.ts` | Not an adapter — a leaf both may import: the live-session registry a host's hooks write (`<dataDir>/sessions/`) and its tools read, so a tool launched without a session can bind to one that is real, live and in its project. Adapters stay leaves; this is the sibling they share instead of importing each other. **Added 2026-09-04**, because this host's MCP servers are launched from a static config and cannot be told which session they serve. Since **2026-09-30** Claude Desktop's MCP server writes its own records here (its `wake`), refreshed per call, and a runner's record can list the ended sessions a launcher granted it to write up (`mayWriteUp`). |
@@ -57,6 +58,23 @@ input — does `encode` shrink to gates-and-tagging inside `remember`'s pipeline
57
58
  | `stance-env.ts` | `COUNTERPARTS_OBSERVER` / `COUNTERPARTS_OWNER`, read the way the explicit-dir guard is, each failing toward less power. Unset, the configuration's `owner: true` decides for a server Claude Code starts (`mcp/bin/serve.ts#ownerStance`, 2026-10-02). |
58
59
  | `log/` | A shared leaf with its own CONTRACT: the process log — one line per allowlisted event (failures, stand-downs, turn ends, write-ups, the night, the wake) from the hook, the worker, the nightly run and the MCP server, to `<dataDir>/sessions/log/<date>.log`, ids and codes only, kept 7 days. Read by `counterparts log` and one doctor line. **Added 2026-09-30**: none of the four processes wired its `onEvent`, so ~270 event names died with their process. |
59
60
 
61
+ **The five largest files, split by concern (2026-10-11)** — moves only, for the plugin
62
+ directory's check on files over 256 KiB. Each file still exports everything it did, so no
63
+ import changed. `core/counterpart.ts` keeps the class; its event names and record builders
64
+ are in `counterpart-events.ts`, its shapes in `counterpart-types.ts`, and the bodies of the
65
+ boundary, the sweep fallback and the deposit in `counterpart-boundary.ts`,
66
+ `counterpart-sweep.ts` and `counterpart-deposit.ts`. `core/store/index.ts` keeps the class
67
+ and every write; `marks.ts`, `shapes.ts` and `index-text.ts` hold its marks, shapes and
68
+ index text, and `reads-memories.ts`, `reads-marks.ts` and `reads-history.ts` the bodies of
69
+ its public reads. `mcp/server.ts` keeps the class; `server-words.ts`, `server-options.ts`
70
+ and `server-args.ts` hold its words, options and argument readers, and
71
+ `server-session-end.ts` and `server-self-tools.ts` the bodies of five of its tools.
72
+ `cli/commands.ts` keeps the dispatcher, the help, and the repair that reads through the
73
+ walk seam (its importers are pinned); each other command family is a `commands-*.ts` file. `claude-code/doctor.ts` keeps `doctorFindings` and about half the checks
74
+ (every one that reads the zone it sets); the finding's shape and the checkout, open, upgrade,
75
+ self-page, host, write-up and report groups are `doctor-*.ts` files. A moved class body is a free function taking the
76
+ instance, behind a one-line delegate on the class (`docs/decisions.d/refactor-file-split.md`).
77
+
60
78
  ## Tools (`tools/`)
61
79
 
62
80
  | tool | job |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "counterparts",
3
- "version": "0.3.17",
3
+ "version": "0.3.19",
4
4
  "license": "MIT",
5
5
  "description": "Memory that turns AI tools into counterparts - a local-first, human-memory-modeled memory layer for AI.",
6
6
  "repository": {