mirror-mind 0.0.1 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (474) hide show
  1. package/.claude/hooks/log-assistant-reply.sh +85 -0
  2. package/.claude/hooks/log-session-end.sh +85 -0
  3. package/.claude/hooks/log-user-prompt.sh +85 -0
  4. package/.claude/hooks/mirror-inject.sh +85 -0
  5. package/.claude/hooks/session-start.sh +85 -0
  6. package/.gemini/hooks/log-assistant.sh +85 -0
  7. package/.gemini/hooks/log-user.sh +85 -0
  8. package/.gemini/hooks/session-end.sh +85 -0
  9. package/.gemini/hooks/session-start.sh +85 -0
  10. package/.pi/extensions/mirror-logger.ts +646 -0
  11. package/.pi/skills/mm-backup/SKILL.md +21 -0
  12. package/.pi/skills/mm-build/SKILL.md +1206 -0
  13. package/.pi/skills/mm-consolidate/SKILL.md +112 -0
  14. package/.pi/skills/mm-consult/SKILL.md +70 -0
  15. package/.pi/skills/mm-conversations/SKILL.md +16 -0
  16. package/.pi/skills/mm-discard/SKILL.md +39 -0
  17. package/.pi/skills/mm-explore/SKILL.md +255 -0
  18. package/.pi/skills/mm-help/SKILL.md +74 -0
  19. package/.pi/skills/mm-identity/SKILL.md +96 -0
  20. package/.pi/skills/mm-journal/SKILL.md +16 -0
  21. package/.pi/skills/mm-journey/SKILL.md +23 -0
  22. package/.pi/skills/mm-journeys/SKILL.md +15 -0
  23. package/.pi/skills/mm-memories/SKILL.md +17 -0
  24. package/.pi/skills/mm-mirror/SKILL.md +98 -0
  25. package/.pi/skills/mm-mute/SKILL.md +18 -0
  26. package/.pi/skills/mm-new/SKILL.md +18 -0
  27. package/.pi/skills/mm-recall/SKILL.md +17 -0
  28. package/.pi/skills/mm-release-notes/SKILL.md +52 -0
  29. package/.pi/skills/mm-seed/SKILL.md +19 -0
  30. package/.pi/skills/mm-shadow/SKILL.md +117 -0
  31. package/.pi/skills/mm-soul/SKILL.md +502 -0
  32. package/.pi/skills/mm-tasks/SKILL.md +24 -0
  33. package/.pi/skills/mm-update/SKILL.md +32 -0
  34. package/.pi/skills/mm-week/SKILL.md +28 -0
  35. package/.pi/skills/mm-welcome/SKILL.md +24 -0
  36. package/AGENTS.md +188 -0
  37. package/README.md +126 -9
  38. package/bin/loader.js +67 -0
  39. package/bin/mirror-hook.js +7 -0
  40. package/bin/mirror.js +7 -0
  41. package/docs/releases/index.md +100 -0
  42. package/docs/releases/pending-cutoffs.md +510 -0
  43. package/docs/releases/v0.10.0.md +123 -0
  44. package/docs/releases/v0.10.1.md +66 -0
  45. package/docs/releases/v0.10.10.md +51 -0
  46. package/docs/releases/v0.10.11.md +39 -0
  47. package/docs/releases/v0.10.12.md +57 -0
  48. package/docs/releases/v0.10.13.md +35 -0
  49. package/docs/releases/v0.10.14.md +42 -0
  50. package/docs/releases/v0.10.15.md +53 -0
  51. package/docs/releases/v0.10.16.md +35 -0
  52. package/docs/releases/v0.10.17.md +43 -0
  53. package/docs/releases/v0.10.2.md +64 -0
  54. package/docs/releases/v0.10.3.md +78 -0
  55. package/docs/releases/v0.10.4.md +42 -0
  56. package/docs/releases/v0.10.5.md +57 -0
  57. package/docs/releases/v0.10.6.md +47 -0
  58. package/docs/releases/v0.10.7.md +53 -0
  59. package/docs/releases/v0.10.8.md +49 -0
  60. package/docs/releases/v0.10.9.md +37 -0
  61. package/docs/releases/v0.11.0.md +86 -0
  62. package/docs/releases/v0.12.0.md +67 -0
  63. package/docs/releases/v0.13.0.md +64 -0
  64. package/docs/releases/v0.14.0.md +68 -0
  65. package/docs/releases/v0.15.0.md +48 -0
  66. package/docs/releases/v0.16.0.md +50 -0
  67. package/docs/releases/v0.16.1.md +55 -0
  68. package/docs/releases/v0.16.2.md +36 -0
  69. package/docs/releases/v0.17.0.md +50 -0
  70. package/docs/releases/v0.17.1.md +58 -0
  71. package/docs/releases/v0.17.2.md +42 -0
  72. package/docs/releases/v0.17.3.md +58 -0
  73. package/docs/releases/v0.18.0.md +84 -0
  74. package/docs/releases/v0.18.1.md +51 -0
  75. package/docs/releases/v0.18.2.md +69 -0
  76. package/docs/releases/v0.19.0.md +85 -0
  77. package/docs/releases/v0.19.1.md +46 -0
  78. package/docs/releases/v0.20.0.md +85 -0
  79. package/docs/releases/v0.21.0.md +61 -0
  80. package/docs/releases/v0.21.1.md +47 -0
  81. package/docs/releases/v0.22.0.md +77 -0
  82. package/docs/releases/v0.22.1.md +42 -0
  83. package/docs/releases/v0.23.0.md +105 -0
  84. package/docs/releases/v0.24.0.md +125 -0
  85. package/docs/releases/v0.25.0.md +107 -0
  86. package/docs/releases/v0.26.0.md +139 -0
  87. package/docs/releases/v0.26.1.md +65 -0
  88. package/docs/releases/v0.26.2.md +43 -0
  89. package/docs/releases/v0.27.0.md +63 -0
  90. package/docs/releases/v0.28.0.md +59 -0
  91. package/docs/releases/v0.29.0.md +61 -0
  92. package/docs/releases/v0.29.1.md +59 -0
  93. package/docs/releases/v0.29.2.md +59 -0
  94. package/docs/releases/v0.29.3.md +93 -0
  95. package/docs/releases/v0.30.0.md +75 -0
  96. package/docs/releases/v0.30.1.md +93 -0
  97. package/docs/releases/v0.30.2.md +66 -0
  98. package/docs/releases/v0.31.0.md +122 -0
  99. package/docs/releases/v0.31.1.md +142 -0
  100. package/docs/releases/v0.31.10.md +118 -0
  101. package/docs/releases/v0.31.11.md +88 -0
  102. package/docs/releases/v0.31.12.md +105 -0
  103. package/docs/releases/v0.31.13.md +99 -0
  104. package/docs/releases/v0.31.14.md +97 -0
  105. package/docs/releases/v0.31.2.md +115 -0
  106. package/docs/releases/v0.31.3.md +142 -0
  107. package/docs/releases/v0.31.4.md +117 -0
  108. package/docs/releases/v0.31.5.md +155 -0
  109. package/docs/releases/v0.31.6.md +132 -0
  110. package/docs/releases/v0.31.7.md +132 -0
  111. package/docs/releases/v0.31.8.md +120 -0
  112. package/docs/releases/v0.31.9.md +120 -0
  113. package/docs/releases/v0.32.0.md +261 -0
  114. package/docs/releases/v0.32.1.md +59 -0
  115. package/docs/releases/v0.33.0.md +164 -0
  116. package/docs/releases/v0.8.0.md +118 -0
  117. package/docs/releases/v0.9.0.md +98 -0
  118. package/docs/releases/v0.9.1.md +83 -0
  119. package/package.json +102 -6
  120. package/plugins/mirror-mind/.claude-plugin/plugin.json +17 -0
  121. package/plugins/mirror-mind/hooks/hooks.json +62 -0
  122. package/plugins/mirror-mind/hooks/log-assistant-reply.sh +98 -0
  123. package/plugins/mirror-mind/hooks/log-session-end.sh +98 -0
  124. package/plugins/mirror-mind/hooks/log-user-prompt.sh +98 -0
  125. package/plugins/mirror-mind/hooks/mirror-inject.sh +98 -0
  126. package/plugins/mirror-mind/hooks/session-start.sh +98 -0
  127. package/plugins/mirror-mind/skills/mm-backup/SKILL.md +27 -0
  128. package/plugins/mirror-mind/skills/mm-build/SKILL.md +1206 -0
  129. package/plugins/mirror-mind/skills/mm-consolidate/SKILL.md +112 -0
  130. package/plugins/mirror-mind/skills/mm-consult/SKILL.md +83 -0
  131. package/plugins/mirror-mind/skills/mm-conversations/SKILL.md +17 -0
  132. package/plugins/mirror-mind/skills/mm-discard/SKILL.md +40 -0
  133. package/plugins/mirror-mind/skills/mm-explore/SKILL.md +241 -0
  134. package/plugins/mirror-mind/skills/mm-help/SKILL.md +104 -0
  135. package/plugins/mirror-mind/skills/mm-identity/SKILL.md +96 -0
  136. package/plugins/mirror-mind/skills/mm-journal/SKILL.md +21 -0
  137. package/plugins/mirror-mind/skills/mm-journey/SKILL.md +37 -0
  138. package/plugins/mirror-mind/skills/mm-journeys/SKILL.md +15 -0
  139. package/plugins/mirror-mind/skills/mm-memories/SKILL.md +20 -0
  140. package/plugins/mirror-mind/skills/mm-mirror/SKILL.md +67 -0
  141. package/plugins/mirror-mind/skills/mm-mute/SKILL.md +18 -0
  142. package/plugins/mirror-mind/skills/mm-new/SKILL.md +18 -0
  143. package/plugins/mirror-mind/skills/mm-recall/SKILL.md +17 -0
  144. package/plugins/mirror-mind/skills/mm-release-notes/SKILL.md +31 -0
  145. package/plugins/mirror-mind/skills/mm-seed/SKILL.md +15 -0
  146. package/plugins/mirror-mind/skills/mm-shadow/SKILL.md +117 -0
  147. package/plugins/mirror-mind/skills/mm-soul/SKILL.md +488 -0
  148. package/plugins/mirror-mind/skills/mm-tasks/SKILL.md +36 -0
  149. package/plugins/mirror-mind/skills/mm-update/SKILL.md +30 -0
  150. package/plugins/mirror-mind/skills/mm-week/SKILL.md +46 -0
  151. package/plugins/mirror-mind/skills/mm-welcome/SKILL.md +22 -0
  152. package/scripts/codex-hooks/session-end.sh +85 -0
  153. package/scripts/codex-hooks/session-start.sh +85 -0
  154. package/scripts/codex-mirror.sh +48 -0
  155. package/templates/identity/README.md +119 -0
  156. package/templates/identity/ego/behavior.yaml +52 -0
  157. package/templates/identity/ego/constraints.yaml +15 -0
  158. package/templates/identity/ego/identity.yaml +43 -0
  159. package/templates/identity/journeys/personal-growth.yaml +39 -0
  160. package/templates/identity/organization/identity.yaml +24 -0
  161. package/templates/identity/organization/principles.yaml +17 -0
  162. package/templates/identity/personas/coach.yaml +94 -0
  163. package/templates/identity/personas/designer.yaml +93 -0
  164. package/templates/identity/personas/doctor.yaml +96 -0
  165. package/templates/identity/personas/engineer.yaml +77 -0
  166. package/templates/identity/personas/financial.yaml +97 -0
  167. package/templates/identity/personas/prompt-engineer.yaml +122 -0
  168. package/templates/identity/personas/researcher.yaml +88 -0
  169. package/templates/identity/personas/strategist.yaml +91 -0
  170. package/templates/identity/personas/teacher.yaml +95 -0
  171. package/templates/identity/personas/therapist.yaml +91 -0
  172. package/templates/identity/personas/thinker.yaml +74 -0
  173. package/templates/identity/personas/writer.yaml +76 -0
  174. package/templates/identity/self/config.yaml +16 -0
  175. package/templates/identity/self/soul.yaml +105 -0
  176. package/templates/identity/user/identity.yaml +30 -0
  177. package/ts/src/backup/staging.ts +62 -0
  178. package/ts/src/backup/zipBackup.ts +267 -0
  179. package/ts/src/backup/zipReader.ts +109 -0
  180. package/ts/src/backup/zipWriter.ts +148 -0
  181. package/ts/src/builder/activeCheckpoint.ts +134 -0
  182. package/ts/src/builder/aggregateStatus.ts +34 -0
  183. package/ts/src/builder/approve.ts +149 -0
  184. package/ts/src/builder/argv.ts +292 -0
  185. package/ts/src/builder/ariadMethod.ts +536 -0
  186. package/ts/src/builder/artifacts/artifactSurfaces.ts +106 -0
  187. package/ts/src/builder/artifacts/artifactWriter.ts +113 -0
  188. package/ts/src/builder/artifacts/closureArtifacts.ts +199 -0
  189. package/ts/src/builder/artifacts/deliveryStoryArtifacts.ts +316 -0
  190. package/ts/src/builder/artifacts/planArtifacts.ts +242 -0
  191. package/ts/src/builder/artifacts/scaffoldSections.ts +273 -0
  192. package/ts/src/builder/artifacts/scaffoldState.ts +227 -0
  193. package/ts/src/builder/artifacts/storyFiles.ts +61 -0
  194. package/ts/src/builder/artifacts/storyIndex.ts +166 -0
  195. package/ts/src/builder/cadence.ts +59 -0
  196. package/ts/src/builder/card.ts +192 -0
  197. package/ts/src/builder/checkpointRefused.ts +66 -0
  198. package/ts/src/builder/closure.ts +964 -0
  199. package/ts/src/builder/commands.ts +2053 -0
  200. package/ts/src/builder/cursorPosition.ts +176 -0
  201. package/ts/src/builder/cursorTransitions.ts +77 -0
  202. package/ts/src/builder/deliveryCursor.ts +577 -0
  203. package/ts/src/builder/deliveryStoryClosure.ts +521 -0
  204. package/ts/src/builder/deliveryStoryPlan.ts +536 -0
  205. package/ts/src/builder/deliveryStoryReady.ts +160 -0
  206. package/ts/src/builder/deliveryStoryRoadmapClosure.ts +151 -0
  207. package/ts/src/builder/expand.ts +336 -0
  208. package/ts/src/builder/flowUnit.ts +339 -0
  209. package/ts/src/builder/homeSurface.ts +122 -0
  210. package/ts/src/builder/implementationGuard.ts +125 -0
  211. package/ts/src/builder/index.ts +11 -0
  212. package/ts/src/builder/lifecycleRefusal.ts +92 -0
  213. package/ts/src/builder/lifecycleRibbon.ts +159 -0
  214. package/ts/src/builder/load.ts +313 -0
  215. package/ts/src/builder/methodAdoption.ts +113 -0
  216. package/ts/src/builder/methodDefinition.ts +429 -0
  217. package/ts/src/builder/methodInspection.ts +371 -0
  218. package/ts/src/builder/plan.ts +408 -0
  219. package/ts/src/builder/planPreauthorization.ts +265 -0
  220. package/ts/src/builder/prepare.ts +225 -0
  221. package/ts/src/builder/projectPaths.ts +64 -0
  222. package/ts/src/builder/pull.ts +356 -0
  223. package/ts/src/builder/pullCandidates.ts +463 -0
  224. package/ts/src/builder/pullCandidatesRender.ts +238 -0
  225. package/ts/src/builder/refinementField.ts +93 -0
  226. package/ts/src/builder/releaseIntent.ts +173 -0
  227. package/ts/src/builder/resumeState.ts +84 -0
  228. package/ts/src/builder/resumeSurface.ts +149 -0
  229. package/ts/src/builder/roadmapGrammar.ts +300 -0
  230. package/ts/src/builder/roadmapScan.ts +97 -0
  231. package/ts/src/builder/roadmapScope.ts +210 -0
  232. package/ts/src/builder/scopePhrases.ts +146 -0
  233. package/ts/src/builder/storyPaths.ts +196 -0
  234. package/ts/src/builder/storyPlanPreauthorization.ts +287 -0
  235. package/ts/src/builder/surfaceProtocol.ts +42 -0
  236. package/ts/src/builder/templateGeneration.ts +148 -0
  237. package/ts/src/builder/transition.ts +178 -0
  238. package/ts/src/consult/args.ts +99 -0
  239. package/ts/src/consult/core.ts +122 -0
  240. package/ts/src/consult/modelCatalog.ts +55 -0
  241. package/ts/src/consult/render.ts +47 -0
  242. package/ts/src/conversation/append.ts +414 -0
  243. package/ts/src/conversation/backfill.ts +387 -0
  244. package/ts/src/conversation/closeTail.ts +467 -0
  245. package/ts/src/conversation/extraction.ts +333 -0
  246. package/ts/src/conversation/extractionDriver.ts +130 -0
  247. package/ts/src/conversation/extractionRun.ts +70 -0
  248. package/ts/src/conversation/hookPayload.ts +51 -0
  249. package/ts/src/conversation/journeyInference.ts +165 -0
  250. package/ts/src/conversation/journeyRepair.ts +114 -0
  251. package/ts/src/conversation/lifecycleFaces.ts +197 -0
  252. package/ts/src/conversation/lifecycleWrites.ts +313 -0
  253. package/ts/src/conversation/listing.ts +77 -0
  254. package/ts/src/conversation/logger.ts +851 -0
  255. package/ts/src/conversation/loggerCli.ts +321 -0
  256. package/ts/src/conversation/loggerRuntime.ts +259 -0
  257. package/ts/src/conversation/metadataLifecycle.ts +443 -0
  258. package/ts/src/conversation/recall.ts +66 -0
  259. package/ts/src/conversation/sessionComposites.ts +258 -0
  260. package/ts/src/conversation/sessionImport.ts +90 -0
  261. package/ts/src/conversation/transcriptBackfill.ts +141 -0
  262. package/ts/src/cultivation/applyActions.ts +241 -0
  263. package/ts/src/cultivation/cluster.ts +86 -0
  264. package/ts/src/cultivation/consolidationStore.ts +281 -0
  265. package/ts/src/cultivation/promptContext.ts +62 -0
  266. package/ts/src/cultivation/propose.ts +305 -0
  267. package/ts/src/cultivation/scan.ts +155 -0
  268. package/ts/src/db/backupGate.ts +47 -0
  269. package/ts/src/db/bootstrap.ts +108 -0
  270. package/ts/src/db/bootstrapLock.ts +223 -0
  271. package/ts/src/db/copyGuard.ts +60 -0
  272. package/ts/src/db/database.ts +397 -0
  273. package/ts/src/db/decode.ts +66 -0
  274. package/ts/src/db/ftsIntegrity.ts +41 -0
  275. package/ts/src/db/migrateOnOpen.ts +214 -0
  276. package/ts/src/db/migrations.ts +576 -0
  277. package/ts/src/db/readyOnOpen.ts +35 -0
  278. package/ts/src/db/rowDecode.ts +42 -0
  279. package/ts/src/db/schema.ts +432 -0
  280. package/ts/src/db/schemaInventory.ts +225 -0
  281. package/ts/src/db/schemaInventorySnapshot.ts +2107 -0
  282. package/ts/src/db/schemaState.ts +91 -0
  283. package/ts/src/db/schemaTsDivergence.ts +114 -0
  284. package/ts/src/descriptor/descriptorRead.ts +49 -0
  285. package/ts/src/docs/docsLint.ts +265 -0
  286. package/ts/src/explorer/handoff.ts +522 -0
  287. package/ts/src/explorer/render.ts +335 -0
  288. package/ts/src/explorer/story.ts +769 -0
  289. package/ts/src/explorer/transition.ts +72 -0
  290. package/ts/src/extensions/bindings.ts +170 -0
  291. package/ts/src/extensions/catalog.ts +249 -0
  292. package/ts/src/extensions/catalogCommands.ts +513 -0
  293. package/ts/src/extensions/catalogWrites.ts +652 -0
  294. package/ts/src/extensions/contextRuntime.ts +325 -0
  295. package/ts/src/extensions/dispatch.ts +374 -0
  296. package/ts/src/extensions/errors.ts +24 -0
  297. package/ts/src/extensions/manifest.ts +356 -0
  298. package/ts/src/extensions/migrations.ts +350 -0
  299. package/ts/src/extraction/conversation.ts +304 -0
  300. package/ts/src/extraction/conversationMetadata.ts +206 -0
  301. package/ts/src/extraction/fencing.ts +106 -0
  302. package/ts/src/extraction/json.ts +17 -0
  303. package/ts/src/extraction/prompts.ts +470 -0
  304. package/ts/src/frontDoor/args.ts +30 -0
  305. package/ts/src/frontDoor/argvShape.ts +106 -0
  306. package/ts/src/frontDoor/buildLoadRuntime.ts +139 -0
  307. package/ts/src/frontDoor/buildRoute.ts +398 -0
  308. package/ts/src/frontDoor/cli.ts +1872 -0
  309. package/ts/src/frontDoor/cloneRoleGuard.ts +98 -0
  310. package/ts/src/frontDoor/consultRoute.ts +50 -0
  311. package/ts/src/frontDoor/contentTailRoute.ts +239 -0
  312. package/ts/src/frontDoor/conversationLoggerRoute.ts +83 -0
  313. package/ts/src/frontDoor/cultivationRoute.ts +210 -0
  314. package/ts/src/frontDoor/dbPath.ts +131 -0
  315. package/ts/src/frontDoor/dbSafetyToolsRoute.ts +240 -0
  316. package/ts/src/frontDoor/exploreRoute.ts +572 -0
  317. package/ts/src/frontDoor/extensionCatalogRoute.ts +252 -0
  318. package/ts/src/frontDoor/frontDoorLog.ts +57 -0
  319. package/ts/src/frontDoor/identityWrite.ts +36 -0
  320. package/ts/src/frontDoor/journeyWriteRoute.ts +26 -0
  321. package/ts/src/frontDoor/lifecycleWriteRoute.ts +110 -0
  322. package/ts/src/frontDoor/liveBackup.ts +100 -0
  323. package/ts/src/frontDoor/mirrorModeRoute.ts +163 -0
  324. package/ts/src/frontDoor/namedRefusal.ts +35 -0
  325. package/ts/src/frontDoor/nodeSupport.ts +24 -0
  326. package/ts/src/frontDoor/render/consolidate.ts +199 -0
  327. package/ts/src/frontDoor/render/conversations.ts +33 -0
  328. package/ts/src/frontDoor/render/cultivationShared.ts +21 -0
  329. package/ts/src/frontDoor/render/descriptor.ts +20 -0
  330. package/ts/src/frontDoor/render/detectPersona.ts +50 -0
  331. package/ts/src/frontDoor/render/icons.ts +13 -0
  332. package/ts/src/frontDoor/render/identity.ts +59 -0
  333. package/ts/src/frontDoor/render/identityRows.ts +17 -0
  334. package/ts/src/frontDoor/render/inspectPersona.ts +53 -0
  335. package/ts/src/frontDoor/render/journeyStatus.ts +78 -0
  336. package/ts/src/frontDoor/render/journeys.ts +79 -0
  337. package/ts/src/frontDoor/render/list.ts +41 -0
  338. package/ts/src/frontDoor/render/memories.ts +67 -0
  339. package/ts/src/frontDoor/render/recall.ts +49 -0
  340. package/ts/src/frontDoor/render/shadow.ts +155 -0
  341. package/ts/src/frontDoor/render/tasks.ts +99 -0
  342. package/ts/src/frontDoor/render/tasksImportSync.ts +63 -0
  343. package/ts/src/frontDoor/render/week.ts +113 -0
  344. package/ts/src/frontDoor/routing.ts +1001 -0
  345. package/ts/src/frontDoor/runtimeRoute.ts +623 -0
  346. package/ts/src/frontDoor/searchRoute.ts +166 -0
  347. package/ts/src/frontDoor/seedPaths.ts +98 -0
  348. package/ts/src/frontDoor/sessionStartWelcomeRoute.ts +166 -0
  349. package/ts/src/frontDoor/soulRoute.ts +433 -0
  350. package/ts/src/frontDoor/stdinSource.ts +37 -0
  351. package/ts/src/frontDoor/tasksImportSyncRoute.ts +110 -0
  352. package/ts/src/frontDoor/tasksWriteRoute.ts +101 -0
  353. package/ts/src/frontDoor/usage.ts +176 -0
  354. package/ts/src/guards/claudePlugin.ts +298 -0
  355. package/ts/src/guards/packContents.ts +306 -0
  356. package/ts/src/guards/piSourcedSkills.ts +70 -0
  357. package/ts/src/guards/retiredRouteShadows.ts +57 -0
  358. package/ts/src/guards/retiredSurfaces.ts +564 -0
  359. package/ts/src/hooks/claude.ts +214 -0
  360. package/ts/src/hooks/codex.ts +45 -0
  361. package/ts/src/hooks/gemini.ts +126 -0
  362. package/ts/src/hooks/main.ts +109 -0
  363. package/ts/src/hooks/mirrorState.ts +71 -0
  364. package/ts/src/hooks/payload.ts +73 -0
  365. package/ts/src/hooks/runtime.ts +179 -0
  366. package/ts/src/hooks/runtimeDetection.ts +34 -0
  367. package/ts/src/identity/applyConsolidationIdentityUpdate.ts +67 -0
  368. package/ts/src/identity/descriptorGenerate.ts +162 -0
  369. package/ts/src/identity/identityEdit.ts +143 -0
  370. package/ts/src/identity/identityKey.ts +77 -0
  371. package/ts/src/identity/identityRead.ts +69 -0
  372. package/ts/src/identity/identityStore.ts +80 -0
  373. package/ts/src/identity/journeyListing.ts +53 -0
  374. package/ts/src/identity/personaInspect.ts +44 -0
  375. package/ts/src/identity/personaListing.ts +37 -0
  376. package/ts/src/identity/setIdentity.ts +64 -0
  377. package/ts/src/index.ts +231 -0
  378. package/ts/src/init/init.ts +111 -0
  379. package/ts/src/journey/journeyOptions.ts +131 -0
  380. package/ts/src/journey/journeyRemoval.ts +158 -0
  381. package/ts/src/journey/journeyStatus.ts +149 -0
  382. package/ts/src/journey/journeySyncFile.ts +87 -0
  383. package/ts/src/journey/journeyWrite.ts +203 -0
  384. package/ts/src/journey/parentJourney.ts +41 -0
  385. package/ts/src/journey/validateParentJourney.ts +55 -0
  386. package/ts/src/mcp/boundary.ts +151 -0
  387. package/ts/src/mcp/guards.ts +244 -0
  388. package/ts/src/mcp/main.ts +121 -0
  389. package/ts/src/mcp/payload.ts +141 -0
  390. package/ts/src/mcp/protocol.ts +141 -0
  391. package/ts/src/mcp/readModels.ts +241 -0
  392. package/ts/src/mcp/registry.ts +201 -0
  393. package/ts/src/mcp/serve.ts +120 -0
  394. package/ts/src/mcp/tools/deterministic.ts +137 -0
  395. package/ts/src/mcp/tools/providerCrossing.ts +187 -0
  396. package/ts/src/mcp/wire.ts +8 -0
  397. package/ts/src/memory/journal.ts +180 -0
  398. package/ts/src/memory/listing.ts +107 -0
  399. package/ts/src/memory/memoryWrite.ts +88 -0
  400. package/ts/src/memory/reinforcement.ts +35 -0
  401. package/ts/src/mirror/context.ts +161 -0
  402. package/ts/src/mirror/defaultResolution.ts +199 -0
  403. package/ts/src/mirror/mirrorForm.ts +43 -0
  404. package/ts/src/mirror/orchestration.ts +364 -0
  405. package/ts/src/mirror/reception.ts +194 -0
  406. package/ts/src/mirror/render.ts +75 -0
  407. package/ts/src/mirror/runtimeSession.ts +205 -0
  408. package/ts/src/mode/operatingMode.ts +148 -0
  409. package/ts/src/observability/callOutcome.ts +115 -0
  410. package/ts/src/observability/inspectLedger.ts +329 -0
  411. package/ts/src/observability/ledgerHooks.ts +126 -0
  412. package/ts/src/observability/llmCalls.ts +154 -0
  413. package/ts/src/persona/detectPersona.ts +81 -0
  414. package/ts/src/planning/promptAssembly.ts +111 -0
  415. package/ts/src/planning/weekPending.ts +81 -0
  416. package/ts/src/planning/weekPlan.ts +183 -0
  417. package/ts/src/planning/weekSave.ts +117 -0
  418. package/ts/src/providers/config.ts +189 -0
  419. package/ts/src/providers/cost.ts +64 -0
  420. package/ts/src/providers/credits.ts +204 -0
  421. package/ts/src/providers/embedding.ts +321 -0
  422. package/ts/src/providers/familyProviders.ts +147 -0
  423. package/ts/src/providers/llm.ts +334 -0
  424. package/ts/src/providers/openrouter.ts +244 -0
  425. package/ts/src/providers/redaction.ts +110 -0
  426. package/ts/src/providers/replay.ts +15 -0
  427. package/ts/src/providers/transport.ts +410 -0
  428. package/ts/src/repair/encodingRepair.ts +253 -0
  429. package/ts/src/runtime/backup.ts +151 -0
  430. package/ts/src/runtime/channel.ts +146 -0
  431. package/ts/src/runtime/config.ts +168 -0
  432. package/ts/src/runtime/diagnose.ts +686 -0
  433. package/ts/src/runtime/git.ts +510 -0
  434. package/ts/src/runtime/installKind.ts +220 -0
  435. package/ts/src/runtime/migrate.ts +154 -0
  436. package/ts/src/runtime/packageIdentity.ts +102 -0
  437. package/ts/src/runtime/releaseNotes.ts +244 -0
  438. package/ts/src/runtime/status.ts +557 -0
  439. package/ts/src/runtime/strategies/clone.ts +200 -0
  440. package/ts/src/runtime/strategies/package.ts +328 -0
  441. package/ts/src/runtime/treeRoot.ts +30 -0
  442. package/ts/src/runtime/update.ts +445 -0
  443. package/ts/src/runtime/updateGate.ts +40 -0
  444. package/ts/src/runtime/updatePipeline.ts +159 -0
  445. package/ts/src/runtime/version.ts +36 -0
  446. package/ts/src/runtime/wiring.ts +130 -0
  447. package/ts/src/search/memorySearch.ts +338 -0
  448. package/ts/src/search/ranker.ts +154 -0
  449. package/ts/src/seed/seed.ts +256 -0
  450. package/ts/src/seed/seedYaml.ts +133 -0
  451. package/ts/src/soul/apply.ts +218 -0
  452. package/ts/src/soul/harvest.ts +267 -0
  453. package/ts/src/soul/prompts/soul_beauty_voice.md +103 -0
  454. package/ts/src/soul/prompts/soul_self_voice.md +219 -0
  455. package/ts/src/soul/prompts/soul_wisdom_voice.md +121 -0
  456. package/ts/src/soul/prompts.ts +85 -0
  457. package/ts/src/soul/render.ts +358 -0
  458. package/ts/src/soul/state.ts +212 -0
  459. package/ts/src/soul/transition.ts +37 -0
  460. package/ts/src/tasks/journeyPathParse.ts +113 -0
  461. package/ts/src/tasks/taskImportSync.ts +142 -0
  462. package/ts/src/tasks/taskStore.ts +312 -0
  463. package/ts/src/tasks/weekView.ts +120 -0
  464. package/ts/src/util/clipCodePoints.ts +26 -0
  465. package/ts/src/util/paths.ts +63 -0
  466. package/ts/src/util/program.ts +9 -0
  467. package/ts/src/util/pyGenerators.ts +144 -0
  468. package/ts/src/util/pythonText.ts +317 -0
  469. package/ts/src/util/semver.ts +45 -0
  470. package/ts/src/util/shellWord.ts +25 -0
  471. package/ts/src/util/slug.ts +64 -0
  472. package/ts/src/welcome/card.ts +339 -0
  473. package/ts/src/welcome/statusLine.ts +101 -0
  474. package/ts/src/welcome/updateCache.ts +129 -0
@@ -0,0 +1,93 @@
1
+ ---
2
+ digest: >
3
+ v0.29.3 is a maintenance patch that fixes Pi external-skill discovery on the
4
+ current ~/.mirror-minds home layout. The Pi logger extension hardcoded the
5
+ legacy ~/.mirror root and never loaded the per-workspace .env, so machines on
6
+ the new home silently discovered zero installed external skills. The fix
7
+ replicates the Python core's mirror-home resolution contract inside the
8
+ extension. The release also records the resulting Python/TypeScript resolution
9
+ duplication as accepted technical debt (TD-001) and hardens the Gemini smoke
10
+ test's production-DB guard so it protects the database the workspace actually
11
+ uses.
12
+ ---
13
+
14
+ # v0.29.3 — Pi External-Skill Discovery Fix
15
+
16
+ **Date:** 2026-07-04
17
+
18
+ ## Highlights
19
+
20
+ - Fixes Pi external-skill discovery on the `~/.mirror-minds` home layout: the Pi logger extension now resolves the mirror home the same way the Python core does, instead of hardcoding the legacy `~/.mirror` root.
21
+ - Replicates the core's resolution contract in the extension — shell env > `.env` (upward walk, same parse rules as `config.py`) > single-catalog auto-scan — preferring the new `~/.mirror-minds` home and falling back to legacy `~/.mirror` only when the new one is absent.
22
+ - Returns null on ambiguity instead of guessing, so a multi-home machine requires an explicit `MIRROR_USER`/`MIRROR_HOME` rather than silently picking the wrong home.
23
+ - Records the resulting Python/TypeScript resolution duplication as accepted, tracked technical debt (TD-001) with an explicit revisit trigger.
24
+ - Hardens the Gemini smoke test's production-DB guard to resolve the DB path through the core so it protects the database the workspace actually uses, degrading to a no-op if resolution fails.
25
+
26
+ ## Where We Started
27
+
28
+ `v0.29.2` closed the Ariad Builder flow refinement arc. Dogfooding on a machine
29
+ using the current `~/.mirror-minds` home layout then surfaced a quiet but real
30
+ regression: Pi reported **zero** installed external skills even when extensions
31
+ were installed.
32
+
33
+ The cause was a divergence between two implementations of one contract. The
34
+ Python core resolves the mirror home through `resolve_mirror_home` — honoring
35
+ shell environment, a per-workspace `.env`, `MIRROR_HOME`/`MIRROR_USER`, and the
36
+ `~/.mirror-minds` default with legacy `~/.mirror` fallback. The Pi logger
37
+ extension, written in TypeScript and unable to import `memory.config`, instead
38
+ hardcoded the legacy `~/.mirror` root and never loaded the workspace `.env`. On
39
+ `~/.mirror-minds` machines it read a non-existent catalog and, because runtime
40
+ extensions are designed to fail quietly, exposed no external skills with no
41
+ visible error.
42
+
43
+ ## What Changed
44
+
45
+ The Pi logger extension now replicates the core's mirror-home resolution
46
+ contract: shell environment first, then an upward `.env` walk using the same
47
+ parse rules as `config.py`, then a single-catalog auto-scan. It prefers the new
48
+ `~/.mirror-minds` home and falls back to legacy `~/.mirror` only when the new one
49
+ is absent. On an ambiguous multi-home machine it returns null instead of
50
+ guessing, forcing an explicit `MIRROR_USER`/`MIRROR_HOME` rather than picking the
51
+ wrong home. The home-directory names are centralized as constants and
52
+ `_resolveMemoryDir`'s fallback is aligned with `config.DEFAULT_MEMORY_DIR`.
53
+
54
+ Because a Pi (TypeScript) extension cannot import the Python `memory.config`
55
+ constants, the fix necessarily duplicates the resolution contract across two
56
+ languages. That duplication is recorded as **TD-001** in the technical-debt
57
+ ledger with an explicit revisit trigger: any change to the core's mirror-home
58
+ resolution semantics (new precedence, a new `MIRROR_*` variable, or another
59
+ home-directory rename), or the next time a non-Python runtime surface needs to
60
+ resolve the home, should promote the resolution to a single source of truth
61
+ rather than adding a third copy.
62
+
63
+ The same mirror-home audit surfaced a parallel defect in the Gemini smoke test.
64
+ Its production-DB guard hardcoded `~/.mirror/<user>/memory.db` to checksum the
65
+ "real" production database before and after the smoke run. On `~/.mirror-minds`
66
+ machines that path is a stale legacy database or absent, so the guard silently
67
+ checksummed the wrong database — or nothing — leaving the in-use production
68
+ database unprotected while reporting success. The guard now resolves the path
69
+ through the core (`resolve_mirror_home` + `default_db_path_for_home`), runs before
70
+ the `DB_PATH`/`MEMORY_ENV` exports, and degrades to a no-op if resolution fails.
71
+
72
+ ## Conscious Exclusions
73
+
74
+ - This release does not consolidate the duplicated mirror-home resolution into a single cross-language source of truth. That is deliberately deferred and tracked as TD-001; this patch centralizes the contract on each side instead.
75
+ - No new user-facing features ship in this release. It is a correctness and test-hardening maintenance patch.
76
+ - Push, tag creation, stable promotion, and GitHub Release publication remain explicit release operations, not side effects of the fix.
77
+
78
+ ## What We Learned
79
+
80
+ Fail-quietly runtime extensions trade visibility for session safety, and that
81
+ trade has a cost: a home-resolution divergence can expose zero external skills
82
+ for a long time with no signal. Duplicated contracts across languages are a
83
+ standing drift risk — the right response here was to make the duplication
84
+ correct and explicitly tracked, not to pretend it does not exist.
85
+
86
+ ## Next Horizon
87
+
88
+ The tracked follow-up is TD-001: when the core's home-resolution semantics next
89
+ change, or another non-Python runtime surface needs to resolve the home, promote
90
+ the resolution to a single source of truth — a core-exposed resolved-home command
91
+ or a language-neutral config the extension can call — rather than maintaining a
92
+ third copy, and add a regression check asserting Node and Python agree for
93
+ representative env/`.env` cases.
@@ -0,0 +1,75 @@
1
+ ---
2
+ digest: >
3
+ v0.30.0 is the first public Windows installer distribution release. It turns
4
+ the recently merged Inno Setup installer work into an official release surface:
5
+ the repository now builds a native Windows .exe from source, publishes it as a
6
+ CI artifact, and makes the release path ready for GitHub Release attachment.
7
+ New Windows users get a guided bootstrapper for Mirror Mind + Pi, while
8
+ existing installs continue to update through the runtime updater instead of
9
+ reinstalling the executable. The release also teaches the installer workflow to
10
+ run on version tags so future releases can produce a matching installer
11
+ artifact from the tagged source.
12
+ ---
13
+
14
+ # v0.30.0 — Windows Installer Distribution
15
+
16
+ **Date:** 2026-07-05
17
+
18
+ ## Highlights
19
+
20
+ - Publishes the first official native Windows installer path for Mirror Mind + Pi.
21
+ - Keeps installer source under `installer/` and generated `.exe` binaries outside the repository tree.
22
+ - Adds release-tag CI support so the Windows Installer workflow runs for `v*` tags and can produce a tag-matched installer artifact.
23
+ - Clarifies the distribution model: new Windows users download the `.exe` from GitHub Releases; existing users update Mirror through `uv run python -m memory runtime update`.
24
+ - Preserves the installer as a bootstrapper with its own version in `installer/VERSION`, decoupled from the Mirror runtime version.
25
+
26
+ ## Where We Started
27
+
28
+ The Windows installer had landed on `main`, but the user path was still unclear.
29
+ A new Windows user arriving at the GitHub repository would not see a committed
30
+ `.exe`, because generated binaries are intentionally excluded from the source
31
+ tree. The installer existed as source and as a GitHub Actions artifact, which is
32
+ acceptable for maintainers but confusing for public onboarding.
33
+
34
+ That exposed the missing release boundary: the installer needed to become a
35
+ published release asset, not just a CI artifact hidden under Actions.
36
+
37
+ ## What Changed
38
+
39
+ This release makes the Windows installer distribution model explicit and
40
+ release-backed. The repository continues to version the installer source,
41
+ including `installer/mirror.iss`, PowerShell bootstrap/configure scripts, the
42
+ launcher, tests, assets, and documentation. The compiled `.exe` remains a build
43
+ artifact, not a committed file.
44
+
45
+ The Windows Installer workflow now also runs on version tags. That means a
46
+ promoted release can produce an installer artifact from the exact tagged source,
47
+ which can then be attached to the matching GitHub Release. This keeps the public
48
+ asset aligned with the release tag rather than with an arbitrary branch run.
49
+
50
+ For users, the intended path is now simple: go to the GitHub Releases page,
51
+ download `MirrorMind-Setup-<installer-version>.exe`, run it, provide a Mirror
52
+ user name and OpenRouter key, then open Mirror Mind and run `/login` in Pi for
53
+ the chat-model subscription. For existing users, the `.exe` is not the update
54
+ mechanism; the runtime updater remains the path for Mirror updates.
55
+
56
+ ## Conscious Exclusions
57
+
58
+ - The installer `.exe` is still not committed to the repository tree. Generated binaries belong to CI artifacts and GitHub Releases.
59
+ - This release does not code-sign the Windows installer. SmartScreen warnings remain expected until signing is added.
60
+ - The installer version remains decoupled from the Mirror runtime version. `installer/VERSION` changes only when the installer itself changes.
61
+ - Existing Windows users do not need to reinstall for ordinary Mirror runtime updates.
62
+
63
+ ## What We Learned
64
+
65
+ A working installer is not the same thing as a distributable installer. Source,
66
+ CI artifact, release asset, and user-facing download link are four different
67
+ surfaces. The public onboarding path only becomes coherent when the generated
68
+ binary is attached to a release users can actually find.
69
+
70
+ ## Next Horizon
71
+
72
+ The next refinement is to make release publication smoother: keep generating the
73
+ installer from the tagged source, attach it to every relevant GitHub Release, and
74
+ later add code signing so Windows trust prompts match the intended public
75
+ onboarding experience.
@@ -0,0 +1,93 @@
1
+ ---
2
+ digest: >
3
+ v0.30.1 contains all user-scoped runtime state inside the resolved mirror
4
+ home. Development and test environments no longer write databases to the
5
+ homes root (~/.mirror-minds), unconfigured runs fail with an actionable
6
+ one-line hint instead of silently creating root databases, extension
7
+ dispatch resolves the same environment-aware database as the core, the Pi
8
+ mirror-logger writes its log inside the mirror home, and runtime diagnose
9
+ reports legacy root artifacts with a documented manual relocation route.
10
+ ---
11
+
12
+ # v0.30.1 — Runtime State Home Containment
13
+
14
+ **Date:** 2026-07-12
15
+
16
+ ## Highlights
17
+
18
+ - The runtime directory is the resolved mirror home for **every**
19
+ `MEMORY_ENV`; the environment selects only the database name
20
+ (`memory.db`, `memory_dev.db`, `memory_test.db`).
21
+ - Unconfigured resolution fails loudly: a one-line actionable hint
22
+ (`Mirror home is not configured. Set MIRROR_HOME or MIRROR_USER…`),
23
+ exit code 2, no traceback, and no silent homes-root writes.
24
+ - Extension dispatch and the core share one `(mirror home, environment) →
25
+ database` mapping (`db_path_for_home`), so a single session can no longer
26
+ straddle two database files.
27
+ - The Pi mirror-logger writes to `<mirror home>/mirror-logger.log`; the
28
+ homes root remains only as the bootstrap error channel when no mirror
29
+ home is resolvable.
30
+ - `runtime diagnose` reports `legacy_root_runtime_state` findings for
31
+ databases, logs, locks, and backups sitting directly in the homes root,
32
+ with a manual relocation route documented in REFERENCE.
33
+
34
+ ## Where We Started
35
+
36
+ A field investigation during a `mirror`-journey session found the homes root
37
+ (`~/.mirror-minds`) accumulating live runtime state alongside the per-user
38
+ mirror homes: an orphan production `memory.db` holding 190 conversations
39
+ bulk-imported in a 22-second burst with no resolvable mirror home, a live
40
+ root `memory_dev.db` carrying the framework repository's own development
41
+ sessions, the Pi `mirror-logger.log`, bootstrap locks, and a `backups/`
42
+ directory.
43
+
44
+ The root cause was pre-CV4 flat-layout semantics that survived inside
45
+ `config.py`: the mirror home was honored only in production, so development
46
+ and test environments — and any run with an unresolvable home — silently
47
+ targeted the homes root. The same split let extension state and session
48
+ registration land in two different databases, which had caused a
49
+ wrong-session export earlier the same day.
50
+
51
+ ## What Changed
52
+
53
+ `config.py` now separates the two axes it had entangled. The runtime
54
+ directory always resolves to the mirror home; `MEMORY_ENV` picks only the
55
+ database name. Explicit `MEMORY_PROD_DIR`, `MEMORY_DIR`, and `DB_PATH`
56
+ overrides keep winning and are never second-guessed. When nothing is
57
+ configured, database-touching commands raise
58
+ `MirrorHomeNotConfiguredError` — surfaced by the CLI as a single actionable
59
+ line with exit code 2 — instead of materializing databases in the root.
60
+
61
+ Extension dispatch (`memory ext`) opens the database through the shared
62
+ `db_path_for_home` mapping. The Pi logger resolves its log destination with
63
+ the same precedence as data routing (`MEMORY_DIR` > resolved mirror home >
64
+ homes-root bootstrap fallback), reusing the resolution machinery introduced
65
+ in v0.29.3 rather than adding a third copy (TD-001 scope note recorded).
66
+ `runtime diagnose` gains detection for legacy root artifacts, and REFERENCE
67
+ documents the manual relocation route.
68
+
69
+ ## Conscious Exclusions
70
+
71
+ - **No automatic migration.** Existing root databases are detected and
72
+ reported, never moved or merged automatically — diverged histories require
73
+ a human decision. An assisted relocation command is a candidate follow-up.
74
+ - **`EXPORT_DIR` homes-root fallback** is unchanged (no root artifact
75
+ observed in the wild); recorded in the story's refactoring notes.
76
+ - **No automated tests for the Pi extension's TypeScript path resolution** —
77
+ the Pi extension has no test harness; the behavior was validated manually.
78
+ The duplicated resolution contract remains tracked as TD-001.
79
+
80
+ ## Lessons
81
+
82
+ The leak survived because failure was silent: development and test writes
83
+ "worked", just in the wrong place, for months. The loud-failure rule would
84
+ have surfaced the orphan production database the day it was created.
85
+ Stabilization principles apply to configuration resolution, not only to
86
+ provider errors — silence, not the wrong path, was the root defect.
87
+
88
+ ## Next Horizon
89
+
90
+ CV9.E2 continues with embedding resilience (S1) and external extension
91
+ runtime surface parity (S2); CV9.DS7 conversation metadata lifecycle still
92
+ has apply behavior open; Boundary Hardening (CV9.E1) remains ahead of the
93
+ full CV9 done condition.
@@ -0,0 +1,66 @@
1
+ ---
2
+ digest: >
3
+ v0.30.2 gives Mirror's runtime git operations a timeout appropriate to
4
+ what they actually do. Every git subprocess previously shared one
5
+ 2-second timeout, which is correct for local inspections but too short
6
+ for network operations: during the v0.30.1 promotion, release-promote
7
+ --push reported failure while the tag push had actually landed on the
8
+ remote, forcing a manual recovery. Local commands keep the 2-second
9
+ default; push and fetch call sites now use a 120-second network timeout,
10
+ with a test asserting the network timeout stays meaningfully larger than
11
+ the local one.
12
+ ---
13
+
14
+ # v0.30.2 — Network-Appropriate Git Timeouts
15
+
16
+ **Date:** 2026-07-13
17
+
18
+ ## Highlights
19
+
20
+ - `_run_git` no longer serves every git subprocess with a single
21
+ 2-second timeout.
22
+ - Local inspection call sites (`status`, `rev-parse`, `branch`, and
23
+ similar) keep the 2-second default.
24
+ - Network call sites — `_git_push_ref`, `_git_fetch`, and the
25
+ release-notes fetch path — now use a 120-second timeout.
26
+ - Six focused tests pin the behavior, including a guard that keeps the
27
+ network timeout meaningfully larger than the local one.
28
+
29
+ ## Where We Started
30
+
31
+ During the v0.30.1 promotion, `release-promote --push` reported failure
32
+ even though the tag push had actually landed on the remote. The runtime's
33
+ git helper served every subprocess call — local inspections and network
34
+ operations alike — with the same 2-second timeout. That budget is
35
+ reasonable for `git status` or `git rev-parse` on a local repository, but
36
+ it is not reasonable for `git push` or `git fetch` over the network, where
37
+ latency and remote-side processing can easily exceed a couple of seconds.
38
+ The mismatch turned a successful push into a false failure, forcing a
39
+ manual recovery step during an otherwise clean release.
40
+
41
+ ## What Changed
42
+
43
+ `_run_git` call sites were split along one axis: local versus network.
44
+ Local inspection commands keep the existing 2-second timeout, since
45
+ correctness there depends on staying fast and responsive. Push (`_git_push_ref`)
46
+ and fetch (`_git_fetch`), along with the release-notes fetch path, now pass
47
+ an explicit 120-second network timeout. Six tests in
48
+ `tests/unit/memory/cli/test_runtime_git_timeout.py` pin this split,
49
+ including a guard test that fails if the network timeout is ever
50
+ tightened to be close to or smaller than the local timeout, preventing an
51
+ accidental regression back to the original bug.
52
+
53
+ ## Conscious Exclusions
54
+
55
+ - No retry or backoff logic was added for network git operations — this
56
+ release only corrects the timeout budget, not resilience against
57
+ transient network failures.
58
+ - No change was made to how failures are reported downstream; a genuine
59
+ timeout still surfaces as a failure, now simply after a budget that
60
+ matches the operation's real network cost.
61
+
62
+ ## Next Horizon
63
+
64
+ CV9 continues toward its done condition; this patch closes out the
65
+ release-promote reliability gap surfaced during the v0.30.1 promotion
66
+ without expanding scope beyond the timeout fix itself.
@@ -0,0 +1,122 @@
1
+ ---
2
+ digest: >
3
+ v0.31.0 delivers the CV9.E2 Stabilization & Robustness epic: the memory
4
+ pipeline now fails safely and observably instead of corrupting state or
5
+ losing memories silently. One poison-pill conversation can no longer halt
6
+ all pending extraction; search degrades to lexical-only when embeddings
7
+ are unavailable; extraction is idempotent across partial failure; and
8
+ every model-in-the-loop surface that embeds untrusted transcript content
9
+ — extraction, scene synthesis, shadow, consolidation, and conversation
10
+ titles/tags/summaries — is now fenced against content-mediated prompt
11
+ injection. It also lands the model-in-the-loop reliability backlog from
12
+ the AI Engineering Audit: explicit call timeouts, model-pin overrides
13
+ with a reachability probe, metadata-default cost observability, and an
14
+ `eval --all` release gate with a model-upgrade playbook. CV9.E2.S2
15
+ (external extension runtime surface) is deferred to a later increment.
16
+ ---
17
+
18
+ # v0.31.0 — Stabilization & Robustness
19
+
20
+ **Date:** 2026-07-23
21
+
22
+ ## Highlights
23
+
24
+ - **Extraction survives failure.** A failing conversation (provider outage,
25
+ oversized or poison-pill transcript, auth error) is isolated and
26
+ quarantined instead of crashing the batch and starving every conversation
27
+ queued behind it. Extraction is idempotent across partial failure — a
28
+ retry re-spends nothing and duplicates no rows.
29
+ - **Search degrades, it does not break.** When embeddings are unavailable
30
+ (no key, provider down), search falls back to lexical-only ranking rather
31
+ than returning nothing or recency noise. Every LLM and embedding call is
32
+ now bounded by an explicit timeout.
33
+ - **Untrusted content is fenced everywhere it enters a prompt.** The
34
+ transcript is data, not instructions — enforced across extraction, scene
35
+ synthesis, shadow observations, consolidation, and conversation
36
+ title/tags/summary generation, each with an adversarial eval probe.
37
+ Model-chosen identity writes are constrained by a target-layer allowlist.
38
+ - **The mirror can now account for itself.** LLM calls record
39
+ role/model/tokens/latency/estimated cost by default (metadata only, never
40
+ bodies unless opted in); embedding calls and provenance are logged; a
41
+ spend summary and consult ledger make cost visible.
42
+ - **Behavior is now gated, not hoped.** An `eval --all` runner plus a
43
+ model-upgrade playbook make a prompt or model-pin change a checked
44
+ migration: no green run (or recorded waiver) means no release.
45
+ - **Reliability details:** reinforcement reinforces only on genuine context
46
+ loads (not internal machinery); the search access-count N+1 is collapsed
47
+ to one batched query; a retrieval-relevance instrument measures whether
48
+ the ranker surfaces the right memories; model pins accept env overrides
49
+ with a `runtime diagnose` reachability probe.
50
+
51
+ ## Where We Started
52
+
53
+ Mirror Mind already worked across its runtimes, but its behavior at the
54
+ edges was undefined. A single conversation that reliably failed extraction
55
+ could halt all pending extraction *forever*, silently, burning an LLM call
56
+ every session start. Search had no offline story. Nothing bounded an LLM
57
+ call's latency. The transcript — user- and third-party-controlled content —
58
+ flowed into extraction, scene, shadow, consolidation, and title/tags/summary
59
+ prompts unfenced, so an embedded instruction could steer what the mirror
60
+ stored or displayed. And the system recorded almost nothing about what it
61
+ did or what it cost, which is at odds with the project's own "evidence over
62
+ vibes" posture. The [AI Engineering Audit](../project/ai-engineering-audit.md)
63
+ named these as the model-in-the-loop reliability gap: the capability
64
+ discipline had outrun the reliability discipline.
65
+
66
+ ## What Changed
67
+
68
+ This release closes the bulk of **CV9.E2 — Stabilization & Robustness**, the
69
+ operational-hardening epic, together with the audit's P0 tier and most of
70
+ its P1/P2 findings:
71
+
72
+ - **Failure isolation & idempotency (AI-01, AI-02, AI-03):** explicit
73
+ per-role call timeouts; per-conversation isolation with attempt-counting
74
+ and quarantine; staged embeddings so partial failure persists nothing.
75
+ - **Safe degradation & signal integrity (AI-04, AI-12):** lexical-only
76
+ search fallback; reinforcement that fires only on genuine context loads.
77
+ - **Boundary hardening & injection defense (AI-15, AI-16, AI-22, AI-23,
78
+ AI-25, D-009):** value validation and caps on extracted memories;
79
+ transcript fencing across all five model surfaces; a target-layer
80
+ allowlist on identity writes; reported-speech recognition in the
81
+ injection-resistance judge.
82
+ - **Observability & cost (AI-07, AI-09, AI-10, AI-13, AI-14):** metadata-
83
+ default LLM-call logging with a single cost authority; embedding
84
+ provenance and call logging; extraction-status legibility; an N+1
85
+ collapse; a deterministic retrieval-relevance instrument.
86
+ - **The eval gate (AI-11):** persisted eval runs with trend, adversarial
87
+ probes for every model surface, and an `eval --all` runner wired as a
88
+ release gate with a model-upgrade playbook.
89
+ - **Product & tooling:** the 1.0 intelligence-flag posture is decided and
90
+ documented (AI-20); Ariad Builder reads Delivery-Story-grammar roadmaps
91
+ (CV20.DS13); and extension install/uninstall is env-aware and guarded
92
+ against symlink and catalog-truncation defects.
93
+
94
+ The journey-and-≥4-messages extraction precondition (AI-21) is now
95
+ documented as intended product behavior — a deliberate noise filter and
96
+ data-minimization boundary — rather than invisible behavior.
97
+
98
+ ## Conscious Exclusions
99
+
100
+ - **CV9.E2 is substantially, not fully, complete.** `CV9.E2.S2` (external
101
+ extension runtime surface parity) remains open and is deferred to a later
102
+ increment; this MINOR release marks the epic milestone, not its final
103
+ story.
104
+ - **Model-behavior release gate — waiver recorded.** `prompts.py` changed in
105
+ this release, so `eval --all` was run on the release candidate: **11/12
106
+ evals pass**. The single failure is `routing`, which is the known,
107
+ documented **D-005** debt (stale persona fixtures in `evals/routing.py`),
108
+ unrelated to any behavior shipped here — every prompt-touching surface
109
+ (extraction, scene, shadow, consolidation, title/tags, summary) passes its
110
+ threshold. The gate is satisfied by conscious waiver, per the development
111
+ guide's model-behavior release rule.
112
+ - **1.0 intelligence-flag posture holds:** two-pass and LLM summarization
113
+ stay off by default; reception stays on. This release does not change that
114
+ posture (AI-20).
115
+
116
+ ## Next Horizon
117
+
118
+ CV9 continues toward its Mirror Mind 1.0 done condition — the remaining
119
+ stabilization work including CV9.E2.S2, boundary hardening, and the
120
+ conversation-metadata lifecycle apply path. In parallel, the CV22 TypeScript
121
+ core port proceeds behind the database seam, inheriting each of these fixes
122
+ on its next merge from `main`.
@@ -0,0 +1,142 @@
1
+ ---
2
+ digest: >
3
+ v0.31.1 closes CV20.DS14: Change Request `park`, `reject`, and `promote`
4
+ are now real Builder CLI verbs for the three terminal states the
5
+ Refinement Workbench domain already modeled but the runtime could not
6
+ reach. The gap had already forced one off-contract production storage
7
+ write (CR023, journey `kia-desktop`) to work around it. A six-persona
8
+ review ran before any code was written and surfaced three real defects
9
+ beyond the original handoff — an `outcome_notes` data-loss risk, a
10
+ surface-marker injection path, and a progress-surface trust bug — all
11
+ fixed in the same TDD pass. CR023 itself is now Navigator-confirmed
12
+ reconciled against the new verb's expected output shape, with no
13
+ migration needed. This release also closes an open Ariad roadmap-parser
14
+ investigation in documentation and registers a new operational debt item
15
+ found while preparing the release.
16
+ ---
17
+
18
+ # v0.31.1 — Change Request Terminal Verbs
19
+
20
+ **Date:** 2026-07-20
21
+
22
+ ## Highlights
23
+
24
+ - Adds `change-request park` / `reject` / `promote` (and the symmetric
25
+ `refinement-story park`) as real Builder CLI verbs, closing the gap that
26
+ previously made a Refinement Story holding a deferred, declined, or
27
+ graduated Change Request unclosable through supported commands.
28
+ - A six-persona review (quality-assurance, database-architect,
29
+ security-engineer, ai-engineer, devops-engineer, prompt-engineer) ran
30
+ against the written plan before implementation began, and its findings
31
+ were folded back into the plan rather than treated as commentary.
32
+ - Fixes a latent `_flow_event` bug where a parked/rejected/promoted Change
33
+ Request was still reported as the *active* one.
34
+ - Fences Ariad transport markers (`<<<ARIAD:`/`<<<END:`) inside rendered
35
+ Change Request free-text, closing a surface-injection path.
36
+ - Fixes the Refinement Story progress surface so a terminal Change Request
37
+ is never shown as "remaining" while the same surface says no actionable
38
+ Change Requests are left.
39
+ - CR023 (`kia-desktop`, `a6be8152`) — the production row that motivated this
40
+ release — is Navigator-confirmed reconciled against the new verb's output
41
+ shape via a read-only check. No migration was needed.
42
+ - Closes an open Ariad roadmap-parser investigation in documentation:
43
+ CV20.DS13 had already fixed the underlying defects, but the ledger and
44
+ investigation record still read "Open," misleading anyone auditing the
45
+ Ariad runtime.
46
+ - Registers TD-002: the `backup` CLI path ignores `MEMORY_ENV`/
47
+ `db_name_for_env()`, silently pointing at the wrong database file on a
48
+ development or test environment.
49
+
50
+ ## Where We Started
51
+
52
+ A Navigator working the `kia-desktop` journey needed to park a Change
53
+ Request — a deliberate build-1 defer, not a mistake and not a rejection.
54
+ The Refinement Workbench domain already modeled `parked` as a terminal
55
+ state, and the RS-close gate already depended on it. But no CLI verb
56
+ reached it: only `done` was wired, and `discard` *deletes* a captured
57
+ record — the wrong tool for a decision worth keeping. The only path was a
58
+ raw write to the production storage layer, bypassing the service entirely:
59
+ no validation of legal source state, no emitted surface, and a real risk of
60
+ leaving the runtime cursor dangling had the Change Request been active.
61
+ That is precisely the failure mode Ariad's "every transition emits a
62
+ verbatim surface" contract exists to prevent.
63
+
64
+ ## What Changed
65
+
66
+ The fix was planned before it was built. A written plan went through six
67
+ professional lenses — quality-assurance, database-architect,
68
+ security-engineer, ai-engineer, devops-engineer, and prompt-engineer — and
69
+ each surfaced something the plan had not accounted for: parking a
70
+ `validated` Change Request would have silently overwritten its validation
71
+ evidence (database-architect), free-text `reason`/`notes`/`target` fields
72
+ render into a transport surface that could be forged with a fake marker
73
+ (security-engineer), and the Refinement Story progress surface would
74
+ report a newly-terminal Change Request as both "remaining" and "no
75
+ actionable Change Requests left" in the same output (quality-assurance).
76
+ All three were designed around and fixed in the implementation, not left
77
+ as follow-up debt.
78
+
79
+ `park`, `reject`, and `promote` now mirror the existing `complete_change_request`
80
+ vertical slice end to end: service functions with legal-state guards, a
81
+ single authoritative terminal-status constant, surface entries for each new
82
+ event, and CLI subparsers wired through the existing clean-error path. `park`
83
+ requires both a reason and a revisit trigger; `reject` keeps the record
84
+ (contrast `discard`, which deletes); `promote` records a delivery target
85
+ without mutating the roadmap. Terminal outcome notes are prepend-preserved
86
+ rather than overwritten, so a Change Request's prior lifecycle evidence
87
+ survives its terminal transition. `mm-build/SKILL.md` now names the real
88
+ commands and explicitly disambiguates `reject` from `discard` — the one
89
+ confusion in this set with an irreversible wrong answer.
90
+
91
+ Validation ran in the order the plan committed to: the full
92
+ park/reject/promote → review/coherence/close route confirmed by the
93
+ Navigator in Builder Mode, a four-phrase verb-routing probe confirming
94
+ natural language never mis-routes `reject` to `discard`, and — the one
95
+ production-touching step, run by the Navigator via a read-only script, not
96
+ the agent — CR023 itself, matched against the new verb's expected shape on
97
+ all four checks.
98
+
99
+ Separately, this release closes the loop on an earlier defect fix:
100
+ CV20.DS13 (Delivery Story grammar roadmap support) shipped the code fix for
101
+ a roadmap-parser investigation but never marked the investigation or its
102
+ dogfooding-ledger findings as resolved, leaving the written record actively
103
+ misleading. That record now matches reality. TD-002 — a real bug found
104
+ while preparing this release's own backup step, where `backup`'s CLI path
105
+ never consults `MEMORY_ENV` — is registered in the technical debt ledger,
106
+ not fixed here.
107
+
108
+ ## Conscious Exclusions
109
+
110
+ - `promote` is deliberately minimal: it records a delivery target and
111
+ reaches a terminal state, and nothing more. It does not create or mutate
112
+ a roadmap item — Ariad does not act as an autonomous project manager.
113
+ - No automated verb-routing eval shipped. The manual routing probe plus the
114
+ skill's reject-vs-discard disambiguation and a "never write storage
115
+ directly" guardrail mitigate the immediate risk; an automated golden-set
116
+ eval is registered on the roadmap Radar as a fast-follow.
117
+ - Refinement Workbench commands remain Pi-only in the skills — the Claude
118
+ skill has no Change Request/Refinement Story commands, and Codex/Gemini
119
+ carry no `mm-build` surface at all. Also registered on the Radar.
120
+ - TD-002 is registered, not fixed.
121
+ - CV20 remains in progress. This release closes one Delivery Story;
122
+ CV20.DS7 (Release And Push Policies) and the remaining planned stories
123
+ are unaffected.
124
+
125
+ ## What We Learned
126
+
127
+ Reviewing a plan from six professional lenses before writing a line of code
128
+ found three real defects at zero implementation cost — the same class of
129
+ defect that, unreviewed, becomes exactly the kind of production incident
130
+ this release exists to close (CR023 itself). Separately, the DS13 cleanup
131
+ was a reminder that fixing code and closing the record of the problem are
132
+ two different acts: a harvest workflow that skips the second half leaves a
133
+ technically-solved defect looking permanently open to the next person who
134
+ reads the ledger.
135
+
136
+ ## Next Horizon
137
+
138
+ CV20's primary arc continues toward CV20.DS7 (Release And Push Policies).
139
+ The two items registered on this release's Radar — an automated
140
+ verb-routing eval and Claude/Codex Refinement-skill parity — are the
141
+ visible next steps for Refinement Work specifically. CV9, CV21, and CV22
142
+ continue in parallel, unaffected by this release.