geneseed 4.31.0 → 5.0.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 (272) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/DESIGN.md +2 -2
  3. package/README.md +6 -5
  4. package/SHIPPED.md +4 -3
  5. package/adapters/bob/README.md +6 -5
  6. package/adapters/claude-code/README.md +4 -3
  7. package/adapters/claude-code/skills/geneseed/SKILL.md +1 -1
  8. package/adapters/openclaude/README.md +4 -3
  9. package/adapters/opencode/GLOBAL-HARNESS-SPEC.md +3 -1
  10. package/adapters/opencode/HOW-OPENCODE-LOADS.md +2 -1
  11. package/adapters/opencode/README.md +18 -18
  12. package/adapters/opencode/plugins/geneseed-activity.js +57 -1
  13. package/adapters/opencode/plugins/geneseed-context.js +220 -18
  14. package/adapters/opencode/plugins/geneseed-guard.js +578 -74
  15. package/adapters/opencode/plugins/geneseed-learn.js +97 -23
  16. package/bin/geneseed-cli.mjs +17 -25
  17. package/bin/geneseed-hook.mjs +23 -8
  18. package/docs/DESIGN.md +175 -0
  19. package/docs/PRD.md +111 -0
  20. package/docs/README.md +3 -2
  21. package/docs/architecture.md +145 -0
  22. package/docs/concepts/agents.md +1 -1
  23. package/docs/concepts/collaboration.md +1 -1
  24. package/docs/concepts/enforcement-table.md +1 -1
  25. package/docs/concepts/exclusions.md +6 -6
  26. package/docs/concepts/footprint.md +1 -1
  27. package/docs/concepts/foreman-mode.md +2 -2
  28. package/docs/concepts/hook-gates.md +1 -1
  29. package/docs/concepts/hooks.md +27 -11
  30. package/docs/concepts/host-matrix.md +3 -3
  31. package/docs/concepts/hosts.md +1 -1
  32. package/docs/concepts/kits.md +3 -1
  33. package/docs/concepts/loop-bricks.md +1 -1
  34. package/docs/concepts/loop-notes.md +4 -2
  35. package/docs/concepts/loop-templates.md +7 -4
  36. package/docs/concepts/loops.md +3 -0
  37. package/docs/concepts/ownership.md +2 -2
  38. package/docs/concepts/rules.md +15 -2
  39. package/docs/concepts/shared-tier.md +73 -0
  40. package/docs/concepts/skills.md +2 -2
  41. package/docs/concepts/themes.md +1 -1
  42. package/docs/extending.md +13 -12
  43. package/docs/guides/install-claude-code.md +1 -1
  44. package/docs/guides/install-opencode.md +1 -1
  45. package/docs/guides/migrate.md +4 -2
  46. package/docs/guides/project-context.md +2 -2
  47. package/docs/guides/run-a-loop.md +1 -1
  48. package/docs/guides/set-up-ownership.md +1 -1
  49. package/docs/guides/setup-footprint.md +1 -1
  50. package/docs/guides/uninstall.md +2 -1
  51. package/docs/guides/upgrade-to-5.md +116 -0
  52. package/docs/guides/upgrade.md +21 -9
  53. package/docs/guides/wiki.md +3 -3
  54. package/docs/reference/env-context.md +5 -3
  55. package/docs/reference/environment.md +1 -1
  56. package/docs/reference/glossary.md +2 -0
  57. package/docs/reference/loop-actions.md +1 -1
  58. package/docs/reference/opencode-plugins.md +3 -3
  59. package/docs/reference/plugin-activity.md +1 -1
  60. package/docs/reference/plugin-context.md +5 -0
  61. package/docs/reference/plugin-guard.md +14 -6
  62. package/docs/reference/plugin-learn.md +13 -6
  63. package/docs/reference/troubleshoot-hooks.md +3 -3
  64. package/docs/reference/troubleshoot-update.md +14 -0
  65. package/docs/token-footprint.md +4 -3
  66. package/docs/understand/a-day.md +2 -2
  67. package/docs/understand/design-choices-install.md +2 -1
  68. package/docs/understand/enforced-vs-asked.md +4 -3
  69. package/docs/understand/machine-bob.md +3 -1
  70. package/docs/understand/machine-claude.md +7 -5
  71. package/docs/understand/machine-opencode.md +7 -5
  72. package/docs/understand/on-your-machine.md +4 -0
  73. package/docs/understand/take-it-out.md +1 -1
  74. package/docs/web-ui.md +141 -73
  75. package/harness.config.json +1 -1
  76. package/js/README.md +10 -6
  77. package/js/build/args.mjs +10 -8
  78. package/js/build/bundle.mjs +11 -13
  79. package/js/build/driver.mjs +66 -65
  80. package/js/build/emit-claude.mjs +22 -16
  81. package/js/build/emit-common.mjs +4 -5
  82. package/js/build/emit-opencode.mjs +22 -22
  83. package/js/build/fold.mjs +515 -0
  84. package/js/build/generate.mjs +41 -52
  85. package/js/build/render.mjs +115 -29
  86. package/js/build/source.mjs +4 -1
  87. package/js/build/stubs.mjs +70 -9
  88. package/js/build/version.mjs +10 -10
  89. package/js/cli-table.json +23 -83
  90. package/js/hosts/activity.mjs +2 -2
  91. package/js/hosts/geneseed-dir.mjs +1 -1
  92. package/js/hosts/hooks-context.mjs +410 -99
  93. package/js/hosts/hooks-done.mjs +97 -31
  94. package/js/hosts/hooks-learn.mjs +38 -7
  95. package/js/hosts/hooks-prims.mjs +69 -2
  96. package/js/hosts/hooks.mjs +300 -64
  97. package/js/hosts/hosts.mjs +150 -51
  98. package/js/hosts/installs.mjs +55 -167
  99. package/js/hosts/link.mjs +3 -5
  100. package/js/hosts/mcp.mjs +1 -1
  101. package/js/hosts/memory-files.mjs +219 -17
  102. package/js/hosts/ownership-gate.mjs +1 -1
  103. package/js/hosts/settings.mjs +18 -13
  104. package/js/hosts/shim.mjs +4 -33
  105. package/js/hosts/store-watch.mjs +189 -0
  106. package/js/inspect/checks-authoring.mjs +3 -3
  107. package/js/inspect/checks-build.mjs +45 -18
  108. package/js/inspect/checks-counts.mjs +4 -4
  109. package/js/inspect/checks-repo.mjs +13 -14
  110. package/js/inspect/cost.mjs +24 -2
  111. package/js/inspect/diff.mjs +123 -123
  112. package/js/inspect/doctor.mjs +22 -27
  113. package/js/inspect/excludes.mjs +181 -62
  114. package/js/inspect/inventory.mjs +22 -27
  115. package/js/inspect/registry.mjs +106 -30
  116. package/js/inspect/scan.mjs +5 -5
  117. package/js/inspect/status.mjs +141 -119
  118. package/js/inspect/validate.mjs +22 -24
  119. package/js/lib/fs.mjs +47 -50
  120. package/js/lib/json.mjs +10 -17
  121. package/js/lib/machine-dir.mjs +73 -0
  122. package/js/lib/paths.mjs +22 -33
  123. package/js/lib/proc.mjs +1 -1
  124. package/js/lib/prompt.mjs +19 -27
  125. package/js/lib/text.mjs +8 -12
  126. package/js/lib/udiff.mjs +11 -15
  127. package/js/loop/catalog.mjs +2 -3
  128. package/js/loop/state.mjs +15 -5
  129. package/js/maintain/memory.mjs +17 -17
  130. package/js/maintain/migrate.mjs +79 -89
  131. package/js/maintain/setup.mjs +43 -32
  132. package/js/maintain/uninstall.mjs +43 -61
  133. package/js/maintain/update.mjs +200 -93
  134. package/js/ui/anim.mjs +21 -35
  135. package/js/ui/cli.mjs +36 -58
  136. package/js/ui/menu.mjs +22 -45
  137. package/js/ui/tui.mjs +27 -67
  138. package/js/web/actions.mjs +38 -38
  139. package/js/web/api.mjs +132 -76
  140. package/js/web/catalog.mjs +175 -46
  141. package/js/web/docs.mjs +33 -12
  142. package/js/web/doctor-worker.mjs +14 -0
  143. package/js/web/handler.mjs +14 -5
  144. package/js/web/routes.mjs +17 -19
  145. package/js/web/state.mjs +78 -19
  146. package/js/web/update-check.mjs +25 -10
  147. package/js/web/user-files.mjs +50 -105
  148. package/package.json +7 -4
  149. package/registry.json +48 -55
  150. package/src/AGENT.md.tmpl +13 -14
  151. package/src/agents/_self-improvement.md +1 -1
  152. package/src/agents/_template.md +4 -1
  153. package/src/agents/advocate.md +1 -1
  154. package/src/agents/architect.md +1 -1
  155. package/src/agents/developer.md +6 -3
  156. package/src/agents/devops-engineer.md +1 -1
  157. package/src/agents/docker-expert.md +1 -1
  158. package/src/agents/docs.md +1 -1
  159. package/src/agents/empiricist.md +1 -1
  160. package/src/agents/explorer.md +1 -1
  161. package/src/agents/framer.md +1 -1
  162. package/src/agents/historian.md +1 -1
  163. package/src/agents/kubernetes-specialist.md +1 -1
  164. package/src/agents/memory-curator.md +2 -2
  165. package/src/agents/operator.md +1 -1
  166. package/src/agents/performance.md +1 -1
  167. package/src/agents/pragmatist.md +1 -1
  168. package/src/agents/react-engineer.md +1 -1
  169. package/src/agents/react-reviewer.md +1 -1
  170. package/src/agents/researcher.md +1 -1
  171. package/src/agents/reviewer.md +1 -1
  172. package/src/agents/security.md +1 -1
  173. package/src/agents/skeptic.md +1 -1
  174. package/src/agents/spring-boot-engineer.md +1 -1
  175. package/src/agents/spring-reviewer.md +1 -1
  176. package/src/agents/spring-security.md +1 -1
  177. package/src/agents/steward.md +1 -1
  178. package/src/agents/tester.md +5 -2
  179. package/src/agents/user-advocate.md +1 -1
  180. package/src/agents/visionary.md +1 -1
  181. package/src/bricks/apply.md +3 -0
  182. package/src/bricks/test.md +6 -4
  183. package/src/loops/bugfix.json +11 -5
  184. package/src/loops/feature.json +7 -4
  185. package/src/memory/README.md +1 -1
  186. package/src/skills/_self-improvement.md +2 -2
  187. package/src/skills/daydream/SKILL.md +2 -2
  188. package/src/skills/daydream/instructions.md +1 -1
  189. package/src/skills/geneseed.md +1 -1
  190. package/src/skills/learn-mode.md +1 -2
  191. package/src/skills/loop.md +1 -0
  192. package/src/skills/profile.md +2 -2
  193. package/src/skills/rule/approve.md +69 -0
  194. package/src/skills/rule/consolidate.md +3 -3
  195. package/src/skills/rule.md +13 -5
  196. package/src/skills/ship.md +9 -1
  197. package/src/skills/skill-forge.md +1 -1
  198. package/src/skills/teach.md +29 -12
  199. package/src/skills/wiki.md +1 -1
  200. package/themes/_TEMPLATE.json +1 -2
  201. package/themes/biker.json +1 -2
  202. package/themes/commentator.json +1 -2
  203. package/themes/cyberpunk.json +1 -2
  204. package/themes/gamer.json +1 -2
  205. package/themes/imperial.json +1 -2
  206. package/themes/joker.json +1 -2
  207. package/themes/marvin.json +1 -2
  208. package/themes/mean.json +1 -2
  209. package/themes/military.json +1 -2
  210. package/themes/neutral.json +1 -2
  211. package/themes/pirate.json +1 -2
  212. package/themes/sports.json +1 -2
  213. package/themes/verstappen.json +1 -2
  214. package/themes/wizard.json +1 -2
  215. package/web/dist/assets/Activity-D8G4eClY.js +1 -0
  216. package/web/dist/assets/ActivityDetail-BtOBYk3M.js +1 -0
  217. package/web/dist/assets/AgentGlyph-k6o3gCM1.js +1 -0
  218. package/web/dist/assets/Bonsai-B_y20b3i.js +1 -0
  219. package/web/dist/assets/{CopyButton-IXnXzH4Y.js → CopyButton-CHQte7Ap.js} +1 -1
  220. package/web/dist/assets/Dashboard-B8uXeJZ_.js +2 -0
  221. package/web/dist/assets/{DataTable-BWbUx4bY.js → DataTable-b9zTShqJ.js} +1 -1
  222. package/web/dist/assets/Docs-Dgv_MWfT.js +5 -0
  223. package/web/dist/assets/{EmptyState-1sPNleqv.js → EmptyState-CY5Pm2xy.js} +1 -1
  224. package/web/dist/assets/FilterInput-qGKNSlxv.js +1 -0
  225. package/web/dist/assets/GreenhouseView-CSzTMSl_.js +1 -0
  226. package/web/dist/assets/Installs-BDk9lqBI.js +3 -0
  227. package/web/dist/assets/JournalView-CvRk1-m5.js +1 -0
  228. package/web/dist/assets/Kits-CoITzxWM.js +1 -0
  229. package/web/dist/assets/Laws-Ctf5r9rE.js +3 -0
  230. package/web/dist/assets/Library-DNwHYVXt.js +3 -0
  231. package/web/dist/assets/{Loops-C5u7fQOR.js → Loops-S85PMQ8m.js} +2 -2
  232. package/web/dist/assets/Markdown-0ORz7tAc.js +69 -0
  233. package/web/dist/assets/OperatorHudView-DuGz_sTk.js +1 -0
  234. package/web/dist/assets/Personal-afJNwvRS.js +2 -0
  235. package/web/dist/assets/RailCats-AW92uhsX.js +1 -0
  236. package/web/dist/assets/Settings-CGDFz-6j.js +1 -0
  237. package/web/dist/assets/Tabs-1qLrnqmn.js +1 -0
  238. package/web/dist/assets/api-C46vAuqp.js +1 -0
  239. package/web/dist/assets/controls-D4wmg_pl.js +1 -0
  240. package/web/dist/assets/index-COTd4TRZ.js +3 -0
  241. package/web/dist/assets/index-CtorA7uK.css +1 -0
  242. package/web/dist/assets/motion-RlUl1osO.js +1 -0
  243. package/web/dist/assets/react-C1iE8mnY.js +9 -0
  244. package/web/dist/assets/rolldown-runtime-XKyaHtl9.js +1 -0
  245. package/web/dist/assets/{sections-ChwaobfW.js → sections-CtFz7HFH.js} +1 -1
  246. package/web/dist/assets/{usePoll-bDFN-Hr6.js → usePoll-o8ul-Sog.js} +1 -1
  247. package/web/dist/index.html +7 -7
  248. package/src/skills/quiz.md +0 -44
  249. package/web/dist/assets/Activity-B7cFtS00.js +0 -1
  250. package/web/dist/assets/ActivityDetail-C-GbMmuW.js +0 -1
  251. package/web/dist/assets/Bonsai-_YyexVC5.js +0 -1
  252. package/web/dist/assets/Dashboard-sCfEjowQ.js +0 -2
  253. package/web/dist/assets/Docs-w3Y7M5Ts.js +0 -5
  254. package/web/dist/assets/FilterInput-CZREvrjX.js +0 -1
  255. package/web/dist/assets/GreenhouseView-BWWbMKmg.js +0 -1
  256. package/web/dist/assets/Installs-CnkdJ-VA.js +0 -3
  257. package/web/dist/assets/JournalView-C7bPD3fZ.js +0 -1
  258. package/web/dist/assets/KitApply-CQQbnThf.js +0 -1
  259. package/web/dist/assets/Kits-aj07N7mT.js +0 -1
  260. package/web/dist/assets/Laws-DZ38nl_H.js +0 -3
  261. package/web/dist/assets/Library-QCGXPV5h.js +0 -2
  262. package/web/dist/assets/Markdown-DpmmtW2Y.js +0 -65
  263. package/web/dist/assets/OperatorHudView-Blu1lqiZ.js +0 -1
  264. package/web/dist/assets/Personal-ox_MktWO.js +0 -2
  265. package/web/dist/assets/RailCats-BuJD4Jou.js +0 -1
  266. package/web/dist/assets/Tabs-CIPyMAX-.js +0 -1
  267. package/web/dist/assets/api-BxjLd7Qd.js +0 -1
  268. package/web/dist/assets/index-0GCxkY7m.css +0 -1
  269. package/web/dist/assets/index-CzDi9JpF.js +0 -3
  270. package/web/dist/assets/motion-CXaUMNkg.js +0 -1
  271. package/web/dist/assets/react-DlYQp10C.js +0 -9
  272. package/web/dist/assets/rolldown-runtime-hePW80VL.js +0 -1
package/CHANGELOG.md CHANGED
@@ -8,6 +8,113 @@ label. For the capability ↔ spec map, see [SHIPPED.md](SHIPPED.md).
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [5.0.0] — 2026-11-06
12
+
13
+ Memory, rules, profile and the wiki move to one machine-wide shared tier at `~/.config/geneseed`, and existing stores fold into it on the next global emit. Breaking: see Removed.
14
+
15
+ ### Added
16
+ - **A change report tells you when a rule or memory file changed outside a session's approved writes.** A session records each store file's size and time at its start, and compares at the end of each turn. It detects a change; it does not prevent one. Geneseed's own learn and fold writes are excused. See [Hooks](docs/concepts/hooks.md#the-change-report).
17
+ - **A drafted rule has a reminder.** `geneseed status` gets a `drafts` row, and a session that reads the shared tier gets one line, while `.fold-state.json` holds pending items.
18
+ - **The Overview shows session-start hook size against its budget**, and warns when it is near the limit or content was cut.
19
+ - **The shared tier goes live.** A global emit in a host's own config directory creates `~/.config/geneseed/` and seeds `user-rules.md`, `PROFILE.md`, `geneseed-wiki.jsonc`, `excludes.json`, `memory/` and `notes/`. Global installs name these locations as absolute paths, and state the rule order: project over host over shared. Project installs and default builds keep their bytes. No emit grants a directory permission. `geneseed doctor` adds a note when a rendered path differs from the run-time one. `geneseed diff` also lists the notes in the tier.
20
+ - **The web console meets the shared tier.** On a global install the console reads and edits the tier's rules, profile, memory and wiki manifest. What the harnesses share is shown once and names no harness: Rules, Profile, Memory and the Overview's *Needs you* each list the shared store one time, tagged `shared`, and a project install keeps its own entry. `geneseed uninstall` prints where the tier lives and never touches it, whatever `--archive-memory` says.
21
+
22
+ - **Rules show their cost, and pending rules show their text.** Each rule row on the Rules page gives its token cost, and the page gives one total. A read-only *Pending* section lists what waits in `user-rules.draft.md`, and says that a pending rule still binds on its host and that the `rule` skill decides it.
23
+
24
+ - **The fold moves existing stores into the shared tier.** Each global emit in a host's own config directory copies facts, agent lessons, self-improvement notes and exclude paths into the tier, and moves a profile or wiki manifest there when the tier holds only a seed. It prints one line per host and nothing on a second run. A differing profile or wiki stays in force, with a pointer in `user-rules.draft.md`. A host rule with the same title and body as a shared rule merges; any other goes to the draft and stays in the host file, still binding, until the `rule` skill records your decision. Approve moves it to the shared file under a new number, reject keeps it on that host. Nothing is deleted: after every copy is read back, the old store moves to `archived-memory/<stamp>/`, and a failed copy keeps it readable until the next emit retries. A host installed after an `exclude add` now gets the repo-side wiring on its emit, so the first upgrade can write `.bob/rules/geneseed.md` and `settings.local.json` in an excluded repo. A downgrade is not automatic: restore the archived store by hand.
25
+
26
+ - **`--shared-tier on` lets a project install read the machine tier.** It is off by default, so default builds keep their bytes. On gives a read-only, labelled view before the project's docs. `setup`, `--help`, the web toggle and `status` state the benefit and the token cost.
27
+ - **The Claude hook renders the wiki.** It prints the same header lines as the OpenCode plugin, inside its own budget.
28
+ - **`status` and `rebuild-all` warn about a legacy wiki name.** A `wiki.jsonc` or `wiki.json` still in place is named, with what it renames to.
29
+ - **`migrate --dry-run` lists orphans.** It names the root `AGENT.md` and the folder of a retired or merged skill that no manifest owns, and says that such a folder may be yours: if it is not, move it by hand. Nothing moves it.
30
+ - **The 24 remaining `experimental` entries are `approved`.** The status stays valid for a new entity.
31
+ - **The console's motion has one token scale.** `--dur-*` and `--ease-*` in `styles.css` now set every duration and curve, in CSS and in anime.js. A duration moved to the nearest step. Curves were unified too: `ease` became `ease-out`, a near-twin of `--ease-swing` merged into it, and Spotlight's anime.js curve became `outExpo`. Each JS animation keeps its `settle()`.
32
+ - **You can choose the default install.** On the Installs page, *Make default* on any active install sets the install that the console's pickers start on and that a request naming no install reads. The `install` and `theme` lines of `geneseed status` follow it. The choice is machine-wide, in `default-install.json` in the shared tier. If that install is removed or disabled, the console goes back to the fixed host order.
33
+
34
+ ### Changed
35
+ - **The console gives each thing one home and one word.** `docs/DESIGN.md` now holds the term table, and the console follows it: *in sync*, *local edits*, *install*, *voice*, *skin*, *Run doctor*. A gate never prints its ledger key. Skin and accent live only in the Appearance popover, the lens only in the Overview header. Kit switches live only on the Kits page; `#/installs/kits` opens it. Settings is a rail entry of its own, and `#/installs/server`, `#/settings` and `#/about` open it. The footprint lives only in the Hosts panel. Memory and Notebook live only on Personal: the Library loses both kinds, its badge counts what it lists, and their old addresses open the Personal tabs. The Library's *Personal* skill category is now *Custom*.
36
+ - **The Overview keeps one header across its five views.** The lenses that shared a skin's name are now Genome and HUD, the Operator sub-view is Readout, and the Journal keeps the sub-view control. A browser that stored `cultivar` or `operator` keeps its lens.
37
+ - **Every install picker reads *Install:*, in one place.** A page's picker sits right above the heading of the view it acts on.
38
+ - **Rules and Profile say less.** Each intro is two sentences and a Docs link. The shared scope is stated once, in the Personal header. The rule count is stated once, at the head of each file's list, and a row no longer repeats `shared` or its file's usual scope. The *What the agent knows about you* card is gone: the tabs carry its figures.
39
+ - **`/api/installs` rows carry `shared`.** The field moved from the `/api/fleet` rows to the row base they both spread, so both have it, and the console reads it from `useInstalls`. `sharedTier` stays a project install's switch.
40
+ - **The console reads better without a mouse.** On a phone the Docs page comes first in the DOM, as it does on screen. Docs pages go H1 then H2 whatever level the source starts at. On a coarse pointer, controls in a row or list reach 44 px. Garden pads answer a tap and the arrow keys. List panes pad their loading state.
41
+ - **Every console count covers every install, deduped, and equals what its page lists.** `/api/overview` `counts` now reads the same lists the pages show, so the rail, the Library, the Constitution and each Overview lens print one figure. Wiki and setup files join the fleet lists. The Constitution counts its rules, on or off, and no longer the Ethos sections. The Installs badge is one figure: what is installed. The Installs tabs lose their one-install badges, and an Overview row loses its memory-fact count.
42
+ - **`MEMORY.md`, `NOTEBOOK.md` and a folder's README leave the Memory and Notebook lists.** They are never counted. They stay readable by name.
43
+ - **Install names use the host's label everywhere.** A tag now reads `BOB (IBM) · global` or `my-repo · Claude Code`. A KPI card titles its scope *Highest install*, and the Docs host switch shows only on a page that differs by host.
44
+ - **The Hosts table fits beside its panel at 1440 px.** Path moves under the name, and Voice and Footprint leave the row: the side panel has them.
45
+ - **OpenCode asks you itself before a rule or memory write.** The guard used to refuse the first write and pass any re-issue, so an agent could release its own refusal. A write to `user-rules.md`, the rule draft or a memory file now gets the host's own prompt, through `permission.edit` keys and, on OpenCode 2, the `evaluate` hook. The check reads the file a write lands on, so a link, a `..` spelling or an NTFS stream no longer passes, and it covers a project install's own store. A file-tool write the host cannot prompt for is refused. On OpenCode 1, an "always" on an edit approves every later edit, so the guard refuses those writes until OpenCode restarts.
46
+ - **Bob refuses rule and memory file-tool writes.** They were a warning and the call went through. Bob has no prompt, so they now exit 2, and its move and delete tools count as writes.
47
+ - **Shell is not a boundary, and the docs now say so.** Only parsed forms are read: a redirect, `tee`, `cp`, `mv`, `rm`, `sed -i`. One that lands in a store asks on Claude Code and OpenCode 2, is refused on OpenCode 1, and warns on Bob. The host's own command permission is the backstop for everything else.
48
+ - **The guard reads every path a call carries.** A decoy `patchText` or a second path key no longer hides the target, which also closes that route past the secret-file refusal.
49
+ - **The package closes its deep imports.** `package.json` gains an `exports` field that opens only `package.json`, so `import 'geneseed/js/…'` now fails. The three `bin` commands are not affected.
50
+ - **A guard refusal on OpenCode 2 opens with `BLOCKED, not a missing tool: `**, because OpenCode prints it as `No tool named "…"`.
51
+
52
+ ### Deprecated
53
+ - **`$GENESEED_MEMORY` and `$GENESEED_HARNESS`.** They keep working, and the CLI prints one warning on stderr when one is set. Removal is planned for 6.0.
54
+
55
+ ### Removed
56
+ - **The console's rule limit.** The 15-rule and 1,500-token budget, its meter on the Personal page and the "getting heavy" warning are gone: the console reports the token total and sets no ceiling. The `rule` skill now weighs that total too, not a rule count.
57
+ - **BREAKING: `sync-self` and the dead positionals are gone.** `upgrade` takes only a theme, so `upgrade imperial` still works and `upgrade main imperial` is an error. `bootstrap` no longer takes `ref` or `extra`.
58
+ - **`anamnesis/` is no longer read as a store.** The memory resolver and the session files drop it, because on Windows it matched a vault named `Anamnesis/` by case folding. `status` reports a leftover store.
59
+ - **The `quiz` skill is part of `teach`.** `teach` now also runs the drill, feynman and gap-check shapes, and `/quiz` still opens it through the alias.
60
+ - **The legacy process carrier guard.** `rebuild-all`, `upgrade`, `migrate`, `status` and the web console no longer detect an install whose carrier names `process 8`, and no longer skip it or warn about it. The floor is a 3.7.0 install (the comms pack); see the upgrade guide.
61
+ - **`migrate` no longer classifies the wiring shape.** The stamp alone was always the trigger, so its value was only printed.
62
+ - **A 1.x install must rebuild first.** Hooks that name `harness.py` no longer read as Geneseed's.
63
+
64
+ ### Fixed
65
+ - **The console tells a pending read from a failed or empty one.** The Overview, Library and Activity show `Loading` until a first read lands, and no count before its data. The Constitution no longer shows "always", "Instruction" or an extra *Gated* row before the picked install is read, and says so when that read fails.
66
+ - **The Overview's Sync cell draws a bar only for stale or edited files.** Otherwise it states one result: *No edits*, or *3 linked by you*. The New here meter appears after the first page read.
67
+ - **Console copy says what is true.** Kits no longer mention a topbar selector. Activity reads *1 session*. Doctor states that it builds this install's theme. The garden's hint works on touch, and its *Sakura* button is *Pink blossom*. An empty Activity names no host.
68
+ - **The console's Memory page names the shared store.** On a tier install it shows the emit's note and the tier's paths.
69
+ - **`geneseed memory rm --purge` no longer deletes a file of a repo that is no install.** A `memory/` beside the cwd, or under `./Harness`, came ahead of the shared tier. The order is now `--memory`, `$GENESEED_MEMORY`, `$GENESEED_HARNESS`, a project install in the cwd or `./Harness`, the shared tier, then the OpenCode config store. A `memory/` counts as a project store only when an emit made it: a known `.geneseed-emit`, `.geneseed-version` beside it and `MEMORY.md` in it. Any other is reached through `--memory`. `status`, `memory list` and a hand-run `learn` follow, and `memory rm` prints the store it acted on. The OpenCode learn plugin keeps its own order, which still ends in a bare `./memory`; it only writes there.
70
+ - **The console no longer takes a 4.x machine folder for the shared tier.** `~/.config/geneseed` holds `installs.json`, `bricks/` and `loops/` on 4.x, and `default-install.json` can create it. The console now tests what the tier holds, its `memory/` or a session file, so until the fold it edits the host files that the hooks read.
71
+ - **`geneseed status` and `rebuild-all` survive an account with no home directory.** With no `$XDG_CONFIG_HOME`, the scan of the tier crashed the verb.
72
+ - **The fold names a hand-written line in a host `MEMORY.md`.** Such a line stops loading once the tier rebuilds the index, and so does a pointer to a file that is not a fact. The `[shared]` line now lists `memory/MEMORY.md` as left in the archive. Each file on that line names its own archive.
73
+ - **Help and emit text match the shared tier.** A global emit no longer says that memory lives in `<cfg>/memory`. `migrate`, `uninstall`, `memory`, `exclude`, `bootstrap` and `learn --memory` state what they do on 5.0, and the upgrade guide says what is safe between install and rebuild.
74
+ - **The Installs tables no longer widen the phone layout.** Their hidden "Selected" headers escaped the scroll box and made the page 702 px wide.
75
+ - **A lens chosen with Cultivar › Lineage open now takes effect.** A lens change goes back to the Status direction.
76
+ - **The Overview offers Update only when the pull can run.** A clone with local changes, no upstream, a detached HEAD or a diverged branch showed an Update button that the job then refused. While the clone's own check runs, the chip says so.
77
+ - **A cold web console answers at once.** The doctor that warms the daemon now has its own thread, so a first Overview takes about a second where it took four or more, and the boot splash no longer stalls into Retry. Until the verdict lands the console says it is checking, then reads the fleet again. A run that hangs is stopped after three minutes and reads as a failed doctor.
78
+ - **A warm Overview does less.** `/api/setup` counts the inventory once per source state, consumers that mount together share one fetch, and the Ledger starts without waiting for `/api/installs`. The Library loads its Markdown and agent glyphs on demand.
79
+ - **The console renders an install's reference once.** One memo now serves the daemon and every per-install view, `/api/diff` reads it, and installs alike in host and every axis share a render.
80
+ - **`setup` and `rebuild-all` are no longer refused for an npm install inside a git project with no commits.** The gate now asks whether Geneseed's own root is a checkout, and a repository with no commits has no pending record to honour.
81
+ - **`geneseed migrate --dry-run` reports on a migrated machine.** It stopped at the stamp and printed nothing about what the next emit would do. It now prints the fold report for each global install.
82
+ - **The web console finds a `wiki.json` manifest.** It stopped at `wiki.jsonc`, while the plugin and the guard also read the older name.
83
+ - **Concurrent installs no longer lose a registry row.** Two processes could each load `installs.json` and the later write dropped the other's root. A record and the prune on read now take a bounded lock, and the prune keeps a row recorded during its walk.
84
+ - **A `learn` hook payload with a transcript and no event name reaches the shared store.**
85
+ - **`geneseed update` no longer rolls back a healthy pull when the doctor gate cannot finish.** A doctor timeout is now reported as a gate that did not finish. The pull stays, nothing is rebuilt, and the exit code is 1. The next update runs the gate again before it rebuilds. A real doctor failure still rolls back.
86
+ - **An install registry write is no longer lost in silence.** On Windows a rename over `installs.json` can be refused for a moment. The write now waits it out within a small bound, and a write that still fails is reported on stderr.
87
+ - **The source stamp survives a file deleted during its walk.**
88
+ - **`Done gate: off` is honoured on a `CLAUDE.md` carrier.** The hook read only `AGENT.md`, so the line was ignored.
89
+ - **`diff` and `validate` ask their own host.** A stale `AGENT.md` no longer answers for an install whose host reads another carrier.
90
+ - **`AGENTS.md` no longer loads twice on Claude Code.** The hook leaves it out when `CLAUDE.md` imports it, and, from v2.1.277, when no `CLAUDE.md` exists.
91
+ - **A stray `Harness/` moves to `archived-Harness/<stamp>`.** It was deleted before, which lost notes, rules and a profile. `.gitignore` gains the name.
92
+ - **A failed wiki rename is reported.** The build said nothing when it could not rename a legacy wiki file.
93
+ - **`rebuild-all` and the `migrate --dry-run` fold preview survive an account with no home directory.** A Claude Code or OpenClaude project stopped the rebuild; its exclude of the global preamble is now skipped.
94
+ - **`status` and the console count memory facts by one rule.** A directory named like a fact no longer counts on the console's Overview, and `status` no longer drops a fact file it cannot read.
95
+
96
+ ## [4.32.0] — 2026-11-05
97
+
98
+ Minor: shell writes reach the rule gate, a weakened test is reported at the end of the turn, a loop `pass` cannot hide a skipped check, and the `feature` and `bugfix` loops prove their tests. Run `geneseed rebuild-all` once after updating to get the new hooks, agents and loops.
99
+
100
+ ### Added
101
+ - **The rule gate reads shell writes.** The targets of `>`, `>>`, `tee`, `sed -i`, `cp`, `mv` and `rm` now get the protected-checks and gate-configuration checks, by path only: a prompt on Claude Code and OpenClaude, a refusal on OpenCode and Bob. Scripts, interpreter one-liners, `npm run`, variables, globs and subshell tricks stay unseen, so keep running the checks in CI. Run `geneseed rebuild-all` to pick up the OpenCode plugins.
102
+ - **A weakened test is reported, as an advisory.** An edit of a test file that adds a skip marker or removes an assertion leaves the agent a note and adds a `[done-gate] advisory` line when the turn ends, citing *Cure the Cause*. It never asks or blocks. Bob gets a log line, OpenCode a reminder on the next request.
103
+ - **A `Runtime floor:` line at session start.** A git root whose `package.json` has no `engines` field gets one context line that asks the agent to name the supported runtime before it adds a dependency or a language feature. Run `geneseed rebuild-all` to pick up the OpenCode plugin.
104
+ - **A `STATUS:` first line in agent reports.** The developer and tester output contracts, and the agent template, start with `STATUS: OK|BLOCKED|OUT_OF_SCOPE|ERROR`. In ownership mode, `blocked: decision needed` follows `STATUS: BLOCKED`.
105
+
106
+ ### Changed
107
+ - **Inferred done checks stay advisory, with no date.** The 4.29.0 note that called them "advisory in this release" promised a change that is not coming: only a list the project wrote in `.geneseed/done-checks.txt` can block.
108
+ - **The web console can switch the ownership gate.** The Constitution page has a switch inside the *Ownership* row of the Credo band: a click asks, then rebuilds the install with or without `--no-ownership-gate`. The row reads *Hook gate* or *Gate off*, and the Credo's pill counts it while it is off. The Gate asks card now names the gate, reads it off, and lands on its row; before, its link led nowhere.
109
+ - **The ship skill deletes a branch once it is merged, local and remote, including after a PR merge.** Before, it deleted a branch only after a local merge, so on a PR-based repo every merged branch stayed on the remote (this repo reached 156). It asks first, as for any deletion, and the first time it ships in a repo it checks whether the forge deletes merged branches by itself (GitHub: *Automatically delete head branches*), since a PR usually merges after the agent's turn has ended. Run `geneseed rebuild-all` to pick it up.
110
+ - **`geneseed loop record` refuses a `test` `pass` whose check list has a skipped check.** The `test` brick now writes its list to a temp file and reports the path with every outcome, so the list reaches the engine. The record fails with the entry named and `LOOP.md` does not change. `fail` and `error` with skipped checks are still accepted.
111
+ - **The `feature` loop writes a failing test first, and the `bugfix` loop proves its tests bite.** `feature` runs `red-test` before `apply`. `bugfix` runs `mutation-check` between `test` and `review`; with no mutation tool it reports `unavailable` and the loop carries on. Each `bugfix` card's write set must name the reproduction test, so a repair can strengthen it.
112
+ - **`review` and `mutation-check` notes leave `LOOP.md` when `apply` reports.** A later repair no longer reads findings about code that has changed.
113
+ - **The Library shows compact status icons, and the Overview graphs fill their cards.**
114
+
115
+ ### Fixed
116
+ - **Long install names no longer overflow** the voice menu, the Library rows and the sidebar.
117
+
11
118
  ## [4.31.0] — 2026-10-31
12
119
 
13
120
  Minor: the web console becomes one hub over every install. The top install switch is gone; Activity, Library, Rules, Profile, Memory and Notebook cover every install, and a page or control that acts on one install has its own picker next to it. Run `geneseed web restart` after updating, so the console serves the new UI.
package/DESIGN.md CHANGED
@@ -193,7 +193,7 @@ theme file defines a `DIR_*` key, so `laws/` is `laws/` in all fourteen voices.
193
193
  | Doctrines | `src/doctrines/` | `doctrines/` | the four practice packs — the one build-time axis that changes *which rules ship*; the whole catalogue is written to disk either way |
194
194
  | Delegation | `src/agents/` | `agents/` | capability specialists with output contracts |
195
195
  | Workflows | `src/skills/` | `skills/` | repeatable procedures |
196
- | Memory | `src/memory/` | `memory/` | one-fact-per-file convention + index |
196
+ | Memory | `src/memory/` | `memory/` | one-fact-per-file convention + index; a global install keeps the facts in the shared tier, `~/.config/geneseed/memory/` |
197
197
  | Notebook | `src/notebook/` | `notebook/` | the agent's sovereign space — any medium, seed-once charter the agent may rewrite; only `.gitignore` re-asserted |
198
198
  | Posture | `src/postures/` | inlined into `AGENT.md` | how much ceremony the agent brings to a task |
199
199
  | Mode | `src/modes/` | inlined into `AGENT.md` | the working axis (solo, foreman, …) — orthogonal to posture |
@@ -203,7 +203,7 @@ theme file defines a `DIR_*` key, so `laws/` is `laws/` in all fourteen voices.
203
203
  | Lifecycle | `registry.json` | — | maintainer-side status/version/owner per agent and skill; never rendered into a bundle |
204
204
  | Generator | `bin/build-driver.mjs` (`geneseed-build`) | — | substitution + `<!-- INCLUDE: -->` inlining, and the eleven `--emit` targets |
205
205
  | CLI, as data | `js/cli-table.json` | — | the owned document the entry point parses its own argv from |
206
- | Automation | `bin/geneseed-cli.mjs` (`geneseed`) | — | 25 verbs — `build` / `doctor` / `status` / `prompt` / `diff` / `setup` / `web` / `upgrade` / … |
206
+ | Automation | `bin/geneseed-cli.mjs` (`geneseed`) | — | 24 verbs — `build` / `doctor` / `status` / `prompt` / `diff` / `setup` / `web` / `upgrade` / … |
207
207
  | Hooks | `bin/geneseed-hook.mjs` (`geneseed-hook`) | — | the six verbs an emitted hook config invokes: `context` / `git-gate` / `rule-gate` / `tool-gate` / `learn` / `activity` |
208
208
  | Adapters | `adapters/` | — | optional per-tool glue (hooks, OpenCode plugins) |
209
209
 
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  [![Node >= 22.7](https://img.shields.io/badge/node-%3E%3D22.7-5fa04e)](package.json)
12
12
  [![zero dependencies](https://img.shields.io/badge/deps-zero-success)](package.json)
13
13
  [![Themes](https://img.shields.io/badge/themes-14-9cf)](themes/)
14
- [![Skills](https://img.shields.io/badge/skills-50-blueviolet)](src/skills/)
14
+ [![Skills](https://img.shields.io/badge/skills-49-blueviolet)](src/skills/)
15
15
  [![Agents](https://img.shields.io/badge/agents-20-orange)](src/agents/)
16
16
  [![Laws and doctrines](https://img.shields.io/badge/laws-9%20%2B%2031%20doctrines-critical)](src/doctrines/)
17
17
  [![Plugins](https://img.shields.io/badge/plugins-7-teal)](adapters/opencode/plugins/)
@@ -180,9 +180,10 @@ The harness ships as a small set of layers, and the web console's rail is the sa
180
180
  | **🛡️ Rules** (`laws/`) | 9 universal laws — always in force, never toggleable: sealed-secrets, one-intent-one-act, verify-before-asserting, deletion-is-deliberate, surface-failures, data-not-orders, least-privilege, cure-the-cause, echo-the-intent. Each rule has a permanent id; its number is only its position, and the harness cites rules by name |
181
181
  | **📐 Doctrines** (`doctrines/`) | practice packs, chosen per install at build time: **craft** (how code is written), **rigor** (how work is proven), **ops** (how the machine is operated), **process** (how a task is run), **comms** (how answers are presented). A doctrine rule may tighten a Rule, never repeal one, and the user's own `user-rules.md` outranks it. Pick with `geneseed-build --doctrines craft,rigor` (or `none`), a single rule with `--exclude-rules "process 7"`, in the setup wizard, or through the switches on the console's Constitution page; all five pack files ship on disk either way, so a citation into a pack you left out still resolves |
182
182
  | **🤖 Agents** (20) | capability specialists: `reviewer`, `tester`, `architect`, `docs`, `security`, `performance`, `explorer`, `researcher`, `developer`, `memory-curator` — plus a debate **council** the `council` skill convenes: `advocate`, `skeptic`, `pragmatist`, `steward`, `visionary`, `user-advocate`, `framer`, `empiricist`, `operator`, `historian` |
183
- | **🛠 Skills** (50) | repeatable workflows: brainstorm · plan · **codebase-design** · **wayfinder** · **develop** · **worktree** · debug · **prototype** · refactor · **ponytail** · **adhd** · **forge-mcp** · **bruno** · geneseed-code-review · **fresh-eyes** · **security-audit** · **dependencies** · **review-response** · commit · **ship** · **release** · **git-history** · document-project · **frontend-design** · **deck** · **prose** · **ingest** · **research** · **teach** · **quiz** · **learn-mode** · **ownership** · handoff · roast-me · **council** · parallel-agents · **workflow** · **wiki** · **geneseed** · **rule** · **profile** · **skill-forge** · **pipeline** · **loop** · **brick-forge** · **daydream** · **react-view-transitions** · **token-report** · **explain-changes** · **diagram-design** |
183
+ | **🛠 Skills** (49) | repeatable workflows: brainstorm · plan · **codebase-design** · **wayfinder** · **develop** · **worktree** · debug · **prototype** · refactor · **ponytail** · **adhd** · **forge-mcp** · **bruno** · geneseed-code-review · **fresh-eyes** · **security-audit** · **dependencies** · **review-response** · commit · **ship** · **release** · **git-history** · document-project · **frontend-design** · **deck** · **prose** · **ingest** · **research** · **teach** · **learn-mode** · **ownership** · handoff · roast-me · **council** · parallel-agents · **workflow** · **wiki** · **geneseed** · **rule** · **profile** · **skill-forge** · **pipeline** · **loop** · **brick-forge** · **daydream** · **react-view-transitions** · **token-report** · **explain-changes** · **diagram-design** |
184
184
  | **🔌 Plugins** (OpenCode) | `geneseed-context` injects project docs *and your machine wiki* every session (and across compaction); `geneseed-learn` distils memory at session end; `geneseed-guard` enforces the safety Laws and protected wiki folders at the tool boundary; `geneseed-workflow` registers the `workflow` tool that runs saved orchestration scripts; `geneseed-notify` sends a native OS notification when a long run finishes; `geneseed-ponytail` holds a minimal-code mode (`/ponytail lite\|full\|ultra\|off`), opt-in, injecting the laziest-that-works ruleset every turn so it doesn't drift; `geneseed-activity` streams what each session is doing to the web console's Activity view |
185
185
  | **🧠 Memory** (`memory/`) | one-fact-per-file durable knowledge, indexed by `MEMORY.md` (git-ignored, personal) |
186
+ | **🔗 Shared tier** (`~/.config/geneseed`) | one machine-wide home for memory, your rules, profile, wiki manifest, exclude paths and notes, read by every global install on every host; existing stores [fold into it](docs/guides/upgrade-to-5.md) on the next global rebuild, and a project install opts in with `--shared-tier on` |
186
187
  | **📓 Notebook** (`notebook/`) | the agent's sovereign space — any medium (code, tools, data, notes), self-ruled via a seed-once charter, always git-ignored; only its `.gitignore` is build-asserted |
187
188
  | **🌐 Wiki** (`geneseed-wiki.jsonc`) | your own machine-wide knowledge base — typically an Obsidian vault — declared once per machine: entry notes load eager/lazy, the agent reads and **writes** it under the vault's own conventions, with an inbox fallback and guard-enforced protected folders |
188
189
  | **🧭 Context** | the project's own docs — auto-discovered on OpenCode, or via a `context.json` manifest |
@@ -244,14 +245,14 @@ is **identical on every host**. What differs is how much of it the host can
244
245
  | **Context injection** | ⚙️ plugin | 🪝 hook | 🪝 hook¹ | 🪝 hook³ |
245
246
  | **Memory write-back** (learn) | ⚙️ plugin | 🪝 hook | 🪝 hook¹ | 🪝 hook³ |
246
247
  | **Git-gate consent** (process 5) | ⚙️ plugin | 🪝 hook | 🪝 hook¹ (warn) | 🪝 hook³ |
247
- | **Rule-gate consent** (process 1) | ⚙️ plugin² | 🪝 hook | 🪝 hook¹ (warn) | 🪝 hook³ |
248
+ | **Rule-gate consent** (process 1) | ⚙️ plugin² | 🪝 hook | 🪝 hook¹ (exit 2) | 🪝 hook³ |
248
249
  | **Laws I / IV at the boundary** | ⚙️ plugin (block) | 🪝 hook (ask) | 🪝 hook¹ (exit 2) | 🪝 hook³ (ask) |
249
250
  | **Sovereign-repo excludes** | ⚙️ plugin | ✅ `claudeMdExcludes` | ✅ rules-shadow | ✅ `claudeMdExcludes` |
250
251
  | **MCP server wiring** | ✅ `mcp` | ✅ `mcpServers` | ✅ `mcp.json` | ✅ `mcpServers` |
251
252
  | **Colour themes** | ✅ full palette | ➖ | ➖ | ➖ |
252
253
  | **LSP · workflow runner · primary-agent · `/`-commands** | ✅ | ➖ | ➖ | ➖ |
253
254
 
254
- <sub>✅ native support · ⚙️ OpenCode plugin · 🪝 `settings.json` hook · 📄 carried by preamble prose only · ➖ no host mechanism (harness discipline still applies) · ¹ Bob's own hook contract: global hooks in `~/.bob/settings/settings.json`, Claude's event names but stdout ignored on `PreToolUse` — a refusal is **exit code 2**. So Laws I/IV, rigor-5 (External Gate) and ops-2 (a recursive scan of a whole filesystem) exit 2, the consent rules are a stderr line, `SessionStart` context is plain stdout, `Stop` runs learn; `SubagentStop`/`PreCompact` are not Bob events and are not written. Unverified live (no Bob install on the authoring machine); the harness still holds via the rules preamble. · ² OpenCode's `tool.execute.before` can only allow or throw, with no "ask the user" tier, so the rule gate is a one-shot speed bump there rather than a prompt. · ³ OpenClaude is a Claude Code fork: Claude's hook groups and verdicts verbatim, in `~/.openclaude/settings.json` (global) or `.openclaude/settings.local.json` (per repo). Unverified live (no OpenClaude install on the authoring machine).</sub>
255
+ <sub>✅ native support · ⚙️ OpenCode plugin · 🪝 `settings.json` hook · 📄 carried by preamble prose only · ➖ no host mechanism (harness discipline still applies) · ¹ Bob's own hook contract: global hooks in `~/.bob/settings/settings.json`, Claude's event names but stdout ignored on `PreToolUse` — a refusal is **exit code 2**. So Laws I/IV, rigor-5 (External Gate) and ops-2 (a recursive scan of a whole filesystem) exit 2, the consent rules are a stderr line, `SessionStart` context is plain stdout, `Stop` runs learn; `SubagentStop`/`PreCompact` are not Bob events and are not written. Unverified live (no Bob install on the authoring machine); the harness still holds via the rules preamble. · ² OpenCode's `tool.execute.before` can only allow or throw, with no "ask the user" tier, so the host's own prompt asks there, and the guard refuses a file-tool write that prompt cannot reach. Shell is not a boundary on any host; the host's command permission is the backstop, and a [change report](docs/concepts/hooks.md#the-change-report) tells you afterwards. · ³ OpenClaude is a Claude Code fork: Claude's hook groups and verdicts verbatim, in `~/.openclaude/settings.json` (global) or `.openclaude/settings.local.json` (per repo). Unverified live (no OpenClaude install on the authoring machine).</sub>
255
256
 
256
257
  **Reading the matrix.** Everything above the divider is at full parity — no host
257
258
  drops an Agent, Skill, or the memory convention. The asymmetry is entirely in
@@ -366,7 +367,7 @@ geneseed rebuild-all # re-render every registered install in its own theme + m
366
367
 
367
368
  Issues and PRs welcome at [github.com/Arylmera/Geneseed](https://github.com/Arylmera/Geneseed). The CI is dependency-free and runs on every push — keep `doctor` green and the test suites passing. Adding a new theme is one JSON file in `themes/` with the same voice-token keys; `doctor` will tell you if any are missing.
368
369
 
369
- Three things that bite when you don't know them:
370
+ Start with [`AGENTS.md`](AGENTS.md), the repo's working guide (`CLAUDE.md` imports it). Three things that bite when you don't know them:
370
371
 
371
372
  - **`js/cli-table.json` IS the CLI.** The argument parser is data, and that file is the owned document — not a generated one. `bin/geneseed-cli.mjs` cannot parse a single verb without it, `bin/geneseed-hook.mjs` renders `--help` from it, and the console's `cli` docs page is a filtered view of it. What holds it honest is `tests/unit/cli_table.test.mjs` — change a flag here and that suite is what tells you.
372
373
  - **The version has one owner: `harness.config.json`.** `package.json` mirrors it and a test fails the fork. Never `npm version` — it edits one of the two.
package/SHIPPED.md CHANGED
@@ -20,7 +20,7 @@ historical references, not files distributed with the repo.
20
20
  > **On version numbers.** [`harness.config.json`](harness.config.json)'s `version` is a
21
21
  > human-readable label only. The canonical identity of an installed harness is the
22
22
  > **source fingerprint** stamped in `.geneseed-version` (see `geneseed version`), not the
23
- > string. Current label: **4.31.0**.
23
+ > string. Current label: **5.0.0**.
24
24
 
25
25
  ## Capabilities
26
26
 
@@ -29,7 +29,7 @@ Every row below is present in the tree today; "Spec" names the design record.
29
29
  | Capability | What it is | Spec |
30
30
  | --- | --- | --- |
31
31
  | **Themed generator** | One neutral `src/` → 14 themed bundles via `geneseed-build` (zero dependencies); structure stays theme-independent | [DESIGN.md](DESIGN.md) |
32
- | **Laws / Agents / Skills / Memory / Notebook** | 9 laws, 20 agents, 50 skills, the memory convention, and the agent's sovereign notebook | `2026-06-11-notebook-sovereign-space` · `2026-06-10-notebook-agent-own-space` |
32
+ | **Laws / Agents / Skills / Memory / Notebook** | 9 laws, 20 agents, 49 skills, the memory convention, and the agent's sovereign notebook | `2026-06-11-notebook-sovereign-space` · `2026-06-10-notebook-agent-own-space` |
33
33
  | **Three-tier constitution** | The governance surface splits into an always-on **Ontology** (Telos, Evidence, Decisions, Ownership, Conduct — the Pact absorbed into Telos), the nine always-on **Invariants**, and five toggleable **Doctrine** packs (craft, rigor, ops, process, comms) addressed `<pack> <n>`. Every rule carries a permanent id; its number is its position, computed at render time, and a citation renders as the rule's principle name. Packs are chosen at build time with `--doctrines` or the setup wizard; the whole catalogue ships on disk either way, so a citation into an inactive pack still resolves. Precedence, in order: Ontology + Invariants, then the user's `user-rules.md`, then the active Doctrines, then `PROFILE.md`. `doctor`'s `constitutionProblems` gates rule ids (declared, unique, never a retired one), the per-rule Principle column, every `{{LAW:<id>}}` / `{{DOCTRINE:<id>}}` citation in `src/`, and the rule that an always-on tier may never cite a toggleable one | `2026-08-19-three-tier-constitution-design` |
34
34
  | **`doctor`** | One check: unresolved tokens, dead/non-hermetic links, theme-key parity, authoring gates, rendered-bundle drift | `2026-06-07-theme-aware-doctor-diff` |
35
35
  | **`diff` + improvements export** | Deployed-vs-source drift report; export an `improvements.md` back-port | `2026-06-12-improvements-export` |
@@ -43,10 +43,11 @@ Every row below is present in the tree today; "Spec" names the design record.
43
43
  | **Wiki integration** | Machine-wide knowledge base (`geneseed-wiki.jsonc`): eager/lazy loading, conventions, protected folders enforced at the tool boundary | `2026-06-11-wiki-knowledge-base` |
44
44
  | **Collaboration layer** | Negotiated postures (peer/mentor/expert/assistant/artisan, chosen at setup, inlined in AGENT.md), the bidirectional Pact, epistemically-typed memory (`force:` + Bridge rule), and a seed-once `PROFILE.md` identity with a web editor tab and a `profile` skill that interviews the user to draft it | `2026-07-12-collaboration-layer` |
45
45
  | **Ownership** | The developer keeps ownership of production code: a Credo section (the code belongs to whoever answers for it), the `ownership` skill (setup from the code and a short interview, `feature`/`file`/`function` granularity, interfaces and sensitive zones always a checkpoint, announce-don't-ask), a `## Ownership` section in the committed root `AGENTS.md` (`mode: on\|off`), and a first-write gate on every host that stops the session's first write once in an application repo without one. learn-mode always comes first; `develop`, the `developer` agent and Foreman hold the checkpoints. Off per repo (`mode: off`), per install (`--no-ownership-gate`), per session ("proceed without") | `2026-10-26-ownership` |
46
- | **Rule front door** | Both durable stores enter through the `rule` skill's fork (*standing rule, or fact to remember?* — always asked, never inferred): the memory branch elicits the binding `force` and shows the file before writing, the rule branch pressure-tests by reformulation and a mandatory counter-example. Doctrine process 1 carries the norm on every host; a `rule-gate` PreToolUse hook (Claude, Bob) and a `geneseed-guard` speed bump (OpenCode) hold it at the tool boundary | `2026-07-30-rule-front-door` |
46
+ | **Rule front door** | Both durable stores enter through the `rule` skill's fork (*standing rule, or fact to remember?* — always asked, never inferred): the memory branch elicits the binding `force` and shows the file before writing, the rule branch pressure-tests by reformulation and a mandatory counter-example. Doctrine process 1 carries the norm on every host; a `rule-gate` PreToolUse hook (Claude, Bob) and OpenCode's own prompt behind `geneseed-guard` hold it at the tool boundary | `2026-07-30-rule-front-door` |
47
47
  | **Entity registry** | `registry.json` records a lifecycle status, version, owner and add-date for every agent and skill in the tree (maintainer-side — never rendered into a bundle, so it costs no session context). `doctor` gates it against `src/` in both directions, sweeps everything that ships for credentials, and holds each vendored skill folder to an immutable upstream commit. The status surfaces as a badge in the web catalog, shown only where it deviates from `approved` | `2026-07-31-entity-registry` |
48
48
  | **Node runtime + npm package** | The whole harness runs from Node: every command `js/cli-table.json` declares, all five hook verbs, every web-console endpoint (the OS-native folder picker excepted, and declined on purpose) and both generators. Every commit runs the unit suite, `doctor --all` across every theme × host × footprint, and the generator's two self-comparisons, on Linux and Windows both; the frozen emit/cli/web recordings that also gated it retired on 2026-08-17 (see the 2.0.0 entry in [CHANGELOG.md](CHANGELOG.md)). It ships as the zero-dependency `geneseed` package (`geneseed`, `geneseed-hook`, `geneseed-build`), so `npx geneseed setup` needs no clone and nothing else installed; `geneseed migrate` moves an existing checkout install across. Node is the only runtime it asks for: the `token-report` skill's own script is `token_report.mjs`, gated over seeded transcripts for all four hosts, and `daydream` calls `node -e` | `2026-08-06-npx-distribution` |
49
49
  | **Runtime awareness** | MCP discovery, web research, tool-call batching, review discipline — carried by the doctrine packs (`ops 1` tool discovery, `process 4` read the docs first, `rigor 2`/`rigor 3` honest tests and cover-and-verify), not by the invariants | `2026-06-07-runtime-awareness-and-review-discipline` |
50
+ | **Shared tier** | One machine-wide folder (`~/.config/geneseed`) for memory, standing rules, profile, wiki manifest, exclude paths and notes, read by every global install on every host. Layered reads (project over host over shared), a fold in each global emit that moves existing stores aside, `user-rules.draft.md` decided only through the `rule` skill, and `--shared-tier on` for a project install | `2026-11-05-shared-tier` |
50
51
  | **Run from anywhere / uninstall** | `link`/`unlink` onto PATH; global uninstall that keeps the memory store | `2026-06-07-version-and-uninstall` |
51
52
 
52
53
  ## Workplans (not features)
@@ -31,13 +31,14 @@ limitation to be aware of on a shared repo.
31
31
  - `rules/geneseed.md` — a **slim shadow stub** (see *Bob-ism 1* below).
32
32
  - `settings.json` — Geneseed's lifecycle hooks (gitignored by the emit's
33
33
  `.bob/.gitignore`, see the caveat below).
34
- - `mcp.json` — any MCP servers you wire with `geneseed mcp` / the web console.
34
+ - `mcp.json` — yours: Geneseed lists the servers in it (`geneseed mcp`, the web console) and never writes it.
35
35
  - `memory/`, `notebook/` stores + their indices.
36
36
 
37
37
  ### Global (`--emit bob-global` → `~/.bob`, or `$BOB_CONFIG_DIR`)
38
38
 
39
- Self-contained under `~/.bob`: agents, skills, `settings.json`, memory and
40
- notebook. **No `AGENTS.md` is written** — a global `~/.bob/AGENTS.md` is *not*
39
+ Under `~/.bob`: agents, skills, `settings.json`, a seeded memory folder and the
40
+ notebook. Rules, profile, facts and notes live in the shared tier,
41
+ `~/.config/geneseed/`, which every global install on the machine reads. **No `AGENTS.md` is written** — a global `~/.bob/AGENTS.md` is *not*
41
42
  auto-loaded by Bob, so the preamble rides `rules/geneseed.md` instead (Bob's
42
43
  always-injected channel). An `AGENTS.md` left by an older install is removed on
43
44
  re-emit.
@@ -171,8 +172,8 @@ add the line yourself.
171
172
 
172
173
  ## MCP
173
174
 
174
- MCP servers are wired at runtime (web console, listed by `geneseed mcp`) into the
175
- `mcpServers` key of Bob's own MCP file — `.bob/mcp.json` per-repo,
175
+ You add MCP servers yourself, and `geneseed mcp` and the web console list them read-only. They
176
+ go in the `mcpServers` key of Bob's own MCP file — `.bob/mcp.json` per-repo,
176
177
  `~/.bob/settings/mcp.json` global — never `settings.json`, which Bob does not read
177
178
  servers from ([Bob docs](https://bob.ibm.com/docs/ide/configuration/mcp/mcp-in-bob)).
178
179
 
@@ -61,7 +61,7 @@ absolute-path hooks instead — `geneseed setup` does that for you.) It:
61
61
  - on **Stop**, runs `geneseed-hook learn` over the session to capture durable memories.
62
62
  Claude Code pipes the hook payload (with the session's `transcript_path`) to the
63
63
  command on stdin; `learn` reads that, flattens the transcript, distils new
64
- memories, and **writes them into the bundle's `memory/` while updating
64
+ memories, and **writes them into the memory store while updating
65
65
  `MEMORY.md`** — deduping against what is already stored. No `< /dev/null` and no
66
66
  redirection: the stdin payload is the whole point.
67
67
  - on **SubagentStop**, runs the *same* `geneseed-hook learn` command. `learn` reads the
@@ -86,8 +86,9 @@ absolute-path hooks instead — `geneseed setup` does that for you.) It:
86
86
  a harmless no-op — it returns immediately rather than reading the transcript for
87
87
  nothing; running `learn` by hand with notes piped in still prints the prompt it
88
88
  would have sent. Geneseed never embeds an API key.
89
- If your bundle's `memory/` is not at `./memory` or `./Harness/memory`, point at
90
- it with `GENESEED_MEMORY=/abs/path/to/memory`.
89
+ A global install writes to the shared store, `~/.config/geneseed/memory/`. A hand-run
90
+ `learn` finds a project install or bundle in the cwd or `./Harness`. Any other `memory/` is not a store until it is named:
91
+ `--memory <dir>` or `GENESEED_MEMORY=/abs/path/to/memory`.
91
92
 
92
93
  Adjust the paths if your harness bundle is not at the repository root. On Windows
93
94
  the commands are identical (`node bin/geneseed-hook.mjs …`).
@@ -54,7 +54,7 @@ These are destructive or scope-changing and must be initiated by the user:
54
54
 
55
55
  - `geneseed setup` — interactive install wizard.
56
56
  - `geneseed build` — re-renders the bundle from `src/` (only meaningful inside the Geneseed source repo anyway).
57
- - `geneseed upgrade` / `bootstrap` / `update` / `sync-self` — pull-and-rebuild from the published source; overwrites the deployed bundle. Local edits are auto-exported to an `improvements/` markdown beside the install before being overwritten, but still: user decision.
57
+ - `geneseed upgrade` / `bootstrap` / `update` — pull-and-rebuild from the published source; overwrites the deployed bundle. Local edits are auto-exported to an `improvements/` markdown beside the install before being overwritten, but still: user decision.
58
58
  - `geneseed link` / `unlink` — modifies PATH symlinks.
59
59
  - `geneseed uninstall` — removes a global or per-repo (project-scoped) install.
60
60
 
@@ -40,15 +40,16 @@ repo root like every other host.
40
40
  Gitignored by the emit's `.openclaude/.gitignore`, because the hook commands name
41
41
  this machine's paths.
42
42
  - `memory/`, `notebook/` stores and their indices.
43
- - MCP servers you wire with `geneseed mcp` or the web console go in the repo's
44
- `.mcp.json`, as on Claude.
43
+ - MCP servers you add go in the repo's `.mcp.json`, as on Claude. `geneseed mcp` and
44
+ the web console list them read-only.
45
45
 
46
46
  ### Global (`--emit openclaude-global` → `~/.openclaude`, or `$OPENCLAUDE_CONFIG_DIR`)
47
47
 
48
48
  The same layout under the config dir, with `CLAUDE.md` (auto-loaded as user
49
49
  memory) and `settings.json`. `$OPENCLAUDE_CONFIG_DIR` is OpenClaude's own
50
50
  documented variable, so Geneseed honours it. Claude's `$CLAUDE_CONFIG_DIR` is
51
- ignored, as OpenClaude ignores it. MCP servers go in `~/.openclaude.json`, or in
51
+ ignored, as OpenClaude ignores it. Rules, profile, facts and notes live in the shared
52
+ tier, `~/.config/geneseed/`, which every global install on the machine reads. MCP servers go in `~/.openclaude.json`, or in
52
53
  `$OPENCLAUDE_CONFIG_DIR/.openclaude.json` when the variable is set: OpenClaude's
53
54
  global config file.
54
55
 
@@ -1,6 +1,8 @@
1
1
  # Global Harness + Convention-Glob Context — Spec
2
2
 
3
3
  Status: **implemented** (build emitter + context plugin v2 landed; docs synced).
4
+ Since 5.0.0 a global install keeps its memory in the shared tier, so the `<cfg>/memory` and
5
+ `GENESEED_HARNESS` steps below are history: see `docs/concepts/shared-tier.md`.
4
6
  Target adapter: OpenCode. A *second deployment mode* ("everything global, zero
5
7
  per-repo files") plus the context-discovery redesign that makes it safe.
6
8
 
@@ -370,7 +372,7 @@ git-tracked folder), else `$XDG_CONFIG_HOME/opencode`, else `~/.config/opencode`
370
372
  ```powershell
371
373
  cd C:\path\to\Geneseed
372
374
  $env:GENESEED_EMIT = "opencode-global"
373
- .\geneseed.cmd upgrade main imperial # PowerShell runs a .cmd directly
375
+ .\geneseed.cmd upgrade imperial # PowerShell runs a .cmd directly
374
376
  ```
375
377
  This populates `C:\Users\<user>\.config\opencode\{AGENT.md,agents,skills,plugins,memory}`.
376
378
 
@@ -91,6 +91,7 @@ changed for each plugin:
91
91
  | `client.session.messages` | `ctx.session.context({ sessionID })`: `user` / `assistant` messages after the last compaction |
92
92
  | throwaway session + `prompt` to distil | `ctx.generate.text({ prompt, model })`: one stateless call |
93
93
  | a hook throws to block a tool | a throw is a **defect that fails the whole step**. The guard renames the call instead (see `geneseed-guard.js`) |
94
+ | `permission.ask` is declared and never called; only a static `permission.edit` rule asks | `permission.hook("evaluate")` runs for every `permission.assert`, after the rules, and may raise the effect to `ask`: `edit` per file, and `shell` per parsed command with `source.id` naming the call. The guard uses both for rule-store writes |
94
95
  | `@opencode-ai/plugin` `tool()` helper | `@opencode/plugin`; a plain JSON-schema `input` needs no helper |
95
96
  | `todo.updated` | no V2 event. The activity cards show no todos on V2 |
96
97
  | user-message `summary.diffs` (files touched) | `session.step.ended` / `step.failed` `files`: paths only, so the activity cards show files with no line counts, and a revert never removes one |
@@ -127,7 +128,7 @@ to native **skills**, not slash commands (same `SKILL.md` shape as Claude Code).
127
128
  | plugin on `experimental.session.compacting` | **context plugin** — re-pushes the `eager` docs so they survive compaction |
128
129
  | plugin on `session.idle` | **learn plugin** — distils memory into `memory/` (debounced to fire once, at session end) |
129
130
  | plugin on `experimental.chat.messages.transform` (V1) | **context plugin** — also adds the done gate's reminder when a check in `.geneseed/done-checks.txt` (or, without it, a check inferred from the root manifests) has not passed since the last edit (Verify Before Asserting); OpenCode 2 turns are not judged |
130
- | plugin on `tool.execute.before` | **guard plugin** — blocks secret-file writes and credential-shaped write content (Sealed Secrets), writes to a protected check or the done list (External Gate), catastrophic shell and every other real data loss, judged against the repository's state (Deletion Is Deliberate), a recursive whole-filesystem scan (Commands Must Return), the first rule-store write (Persist Insight), protected wiki folders, and the session's first write in an application repo with no `## Ownership` section in its root `AGENTS.md` (the ownership gate, once; a child session defers; off with `--no-ownership-gate` or a personal `Setup: declined <date>` line in `.geneseed/ownership.md`); logs each block to the gate ledger and counts skill/subagent use (`GENESEED_GUARD=off\|warn`) |
131
+ | plugin on `tool.execute.before` | **guard plugin** — blocks secret-file writes and credential-shaped write content (Sealed Secrets), writes to a protected check or the done list (External Gate), catastrophic shell and every other real data loss, judged against the repository's state (Deletion Is Deliberate), a recursive whole-filesystem scan (Commands Must Return), a rule-store write the host cannot prompt for (Persist Insight), protected wiki folders, and the session's first write in an application repo with no `## Ownership` section in its root `AGENTS.md` (the ownership gate, once; a child session defers; off with `--no-ownership-gate` or a personal `Setup: declined <date>` line in `.geneseed/ownership.md`); logs each block to the gate ledger and counts skill/subagent use (`GENESEED_GUARD=off\|warn`) |
131
132
  | plugin registering a custom tool | **workflow plugin** — the `workflow` tool runs saved orchestration scripts from `workflows/` |
132
133
  | `context.json` / `.harness/` (manifest) | *optional* override when discovery doesn't fit |
133
134
 
@@ -151,12 +151,14 @@ the filename, the `.js` extension, and that the path is exactly the plugins dir.
151
151
  The plugin writes into the first location that resolves:
152
152
 
153
153
  1. `$GENESEED_MEMORY` — an explicit memory dir;
154
- 2. `$GENESEED_HARNESS/memory` (or `/anamnesis` for the imperial theme);
155
- 3. `./memory` or `./Harness/memory` — when the bundle lives inside the project.
154
+ 2. `$GENESEED_HARNESS/memory`;
155
+ 3. the install's own target: the shared store, `<machine dir>/memory`, on a global install when it
156
+ exists, else the `memory/` beside the plugin;
157
+ 4. `./memory` or `./Harness/memory` in the repo, last.
156
158
 
157
- Because your Harness is global (used from any directory), set `GENESEED_HARNESS`
158
- once to the bundle's absolute path so the plugin always writes to the same memory
159
- store no matter where you launch OpenCode:
159
+ A global install needs nothing set. Set `GENESEED_HARNESS` only for a bundle that is
160
+ not a global install, so the plugin writes to the same memory store no matter where
161
+ you launch OpenCode. It wins over the shared store:
160
162
 
161
163
  ```
162
164
  export GENESEED_HARNESS=/abs/path/to/Harness # e.g. in your shell profile
@@ -208,7 +210,7 @@ the harness live entirely in the global config dir with zero per-repo files.
208
210
  - **Machine wiki (AGENT.md §8):** the same block carries a `MACHINE WIKI` segment
209
211
  for the user's own knowledge base(s) — typically an Obsidian vault — declared in
210
212
  `geneseed-wiki.jsonc` (`$GENESEED_WIKI` → `$GENESEED_HARNESS/geneseed-wiki.jsonc` → beside the
211
- install). Per wiki: eager entries inject in full, lazy entries list, and the
213
+ install → the shared tier on a global install). Per wiki: eager entries inject in full, lazy entries list, and the
212
214
  `conventions` / `inbox` / `protected` metadata is surfaced — on the **same**
213
215
  budgets, compaction and transform paths as the project context. Schema and
214
216
  behaviour: [the wiki guide](../../docs/guides/wiki.md).
@@ -302,26 +304,24 @@ uses) and builds **no sibling `Harness/` folder**:
302
304
 
303
305
  - `AGENT.md` rendered straight in;
304
306
  - `agents/`, `skills/<name>/SKILL.md`, and a single `plugins/` copy;
305
- - the **memory store** at `<cfg>/memory` — always classic English, never themed
307
+ - a **seeded memory folder** at `<cfg>/memory` — always classic English, never themed
306
308
  (like `agents/`/`skills/`); migrated once from a legacy `Harness/memory` (or a
307
- themed `anamnesis/`) if you had one, else seeded;
309
+ themed `anamnesis/`) if you had one, else seeded. Its facts then fold into the shared
310
+ store, `$XDG_CONFIG_HOME/geneseed/memory`;
308
311
  - `opencode.json` merged to point `instructions` at the absolute `AGENT.md`;
309
312
  - **no** `context.json` — the context plugin auto-discovers each repo's docs.
310
313
 
311
- The learn plugin now **auto-locates** the in-config store: it resolves `memory/`
312
- relative to its own file (`<cfg>/plugins/geneseed-learn.js` → `<cfg>/memory`), so the
313
- `export GENESEED_HARNESS` step is **optional**. Set it only to point the plugin at a
314
- *different* store:
315
-
316
- ```
317
- export GENESEED_HARNESS="$HOME/.config/opencode" # optional override
318
- echo "export GENESEED_HARNESS=\"$HOME/.config/opencode\"" >> ~/.zshrc
319
- ```
314
+ The learn plugin **auto-locates** its store: a global install takes the shared store
315
+ when it exists, else `memory/` relative to its own file
316
+ (`<cfg>/plugins/geneseed-learn.js` → `<cfg>/memory`), so the `export GENESEED_HARNESS`
317
+ step is **optional**. Set it only to point the plugin at a *different* store, which
318
+ also takes facts out of the shared tier.
320
319
 
321
320
  The dir is shared with your own config, so it is never wiped: a
322
321
  `.geneseed-manifest.json` tracks only the files this layer owns (AGENT.md, agents,
323
322
  skills, plugins — **not** memory) and removes stale ones on re-emit, leaving your own
324
- agents/skills/plugins and the memory store untouched.
323
+ agents/skills/plugins untouched. The fold moves a global store to the shared tier and
324
+ keeps the old one under `archived-memory/<stamp>/`; see `docs/concepts/shared-tier.md`.
325
325
 
326
326
  Use `$OPENCODE_CONFIG_DIR` to keep the global harness in a **git-tracked** folder.
327
327
  On upgrade: `GENESEED_EMIT=opencode-global ./geneseed upgrade` — or, on Windows,
@@ -34,8 +34,10 @@
34
34
  // and docs/specs/2026-06-18-activity-v1.1-enriched-cards.md.
35
35
 
36
36
  import fs, { existsSync, statSync, readFileSync } from "node:fs"
37
- import os from "node:os"
37
+ import os, { homedir } from "node:os"
38
38
  import path from "node:path"
39
+ import { realpathSync } from "node:fs"
40
+ import { fileURLToPath } from "node:url"
39
41
 
40
42
  // GENESEED_ACTIVITY=off is a hard kill switch at startup; the web console's runtime
41
43
  // toggle is the .geneseed-activity flag file checked per event (see isEnabled).
@@ -235,6 +237,58 @@ function mainWorktreeOf(cwd) {
235
237
  }
236
238
  }
237
239
 
240
+ // Twin of js/hosts/hosts.mjs `resolvePath`: tests/plugins/helper_parity.test.mjs holds the copies equal.
241
+ function resolvePath(p) {
242
+ // Expand a leading "~" / "~/…" to the home dir — a hand-edited excludes.json entry
243
+ // like "~/vault" must resolve the same way here as it does for the Claude/Bob
244
+ // hook guard.
245
+ let raw = String(p)
246
+ if (raw === "~" || raw.startsWith("~/") || raw.startsWith("~\\")) {
247
+ raw = raw === "~" ? homedir() : path.join(homedir(), raw.slice(2))
248
+ }
249
+ let s = path.resolve(raw)
250
+ // Symlinks and junctions followed through the deepest existing ancestor (the rest appended),
251
+ // the rule js/hosts/hosts.mjs resolvePath applies: an exclude spelled through a link matches
252
+ // on every host, not only on Claude/Bob.
253
+ for (let cur = s, tail = []; ;) {
254
+ try { s = path.join(realpathSync.native(cur), ...tail); break } catch { /* walk up */ }
255
+ const up = path.dirname(cur)
256
+ if (up === cur) break
257
+ tail.unshift(path.basename(cur))
258
+ cur = up
259
+ }
260
+ return s
261
+ }
262
+ const norm = (p) => {
263
+ const s = resolvePath(p)
264
+ return process.platform === "win32" ? s.toLowerCase() : s
265
+ }
266
+ // Whether `dir` sits in an excluded folder: the rule of the other plugins' `sovereignBypass` and of
267
+ // js/hosts/activity.mjs `recordActivity`, kept synchronous because it runs inside the event switch
268
+ // (once per session). Read from the SESSION's directory: one `opencode serve` hosts every project.
269
+ function excludedFolder(dir) {
270
+ try {
271
+ const cfg = path.dirname(path.dirname(fileURLToPath(import.meta.url)))
272
+ const listOf = (file) => {
273
+ try { const l = JSON.parse(readFileSync(file, "utf8")).excludes; return Array.isArray(l) ? l : [] } catch { return [] }
274
+ }
275
+ const entries = listOf(path.join(cfg, "excludes.json"))
276
+ const shared = listOf(path.join(process.env.XDG_CONFIG_HOME || path.join(homedir(), ".config"), "geneseed", "excludes.json"))
277
+ let global = norm(cfg) === norm(configBase())
278
+ try { global ||= readFileSync(path.join(cfg, ".geneseed-emit"), "utf8").trim().endsWith("-global") } catch { /* no marker */ }
279
+ if (global) entries.push(...shared)
280
+ const main = mainWorktreeOf(dir)
281
+ const heres = main ? [norm(dir), norm(main)] : [norm(dir)]
282
+ for (const e of entries) {
283
+ const p = typeof e === "string" ? e : e && e.path
284
+ if (typeof p !== "string" || !p.trim()) continue
285
+ const base = norm(p.trim()).replace(/[\\/]+$/, "")
286
+ if (heres.some((h) => h === base || h.startsWith(base + path.sep))) return true
287
+ }
288
+ } catch { /* degrade to active */ }
289
+ return false
290
+ }
291
+
238
292
  // `top` is the git root above the SESSION's own directory (gitRootOf), or null outside any
239
293
  // repository — never the plugin instance's worktree: one `opencode serve` hosts an instance per
240
294
  // opened project, every instance hears every session, and each would otherwise stamp its own
@@ -538,6 +592,8 @@ export const GeneseedActivity = async (_input) => {
538
592
  return
539
593
  }
540
594
  if (event.type !== "session.created" && !owned.has(sid)) return
595
+ // An excluded repo is dormant: no card, and its sub-agents fall to the `!top` branch above.
596
+ if (!owned.has(sid) && info.directory && excludedFolder(info.directory)) { skipped.add(sid); return }
541
597
  const ev = { type: event.type, title: info.title ?? null, cwd: info.directory }
542
598
  if (!owned.has(sid)) Object.assign(ev, { ...rootsOf(info.directory && gitRootOf(info.directory)), agents: [], turns: 0, context: null,
543
599
  compactions: 0, compacted_at: null, context_at_compaction: null })