geneseed 2.1.0 → 3.1.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 (187) hide show
  1. package/CHANGELOG.md +155 -0
  2. package/DESIGN.md +112 -61
  3. package/QUICKSTART.md +1 -1
  4. package/README.md +24 -14
  5. package/SETUP.md +83 -17
  6. package/SHIPPED.md +5 -4
  7. package/adapters/bob/README.md +3 -3
  8. package/adapters/claude-code/README.md +6 -4
  9. package/adapters/claude-code/skills/geneseed/SKILL.md +10 -6
  10. package/adapters/copilot/README.md +5 -4
  11. package/adapters/opencode/GLOBAL-HARNESS-SPEC.md +11 -6
  12. package/adapters/opencode/HOW-OPENCODE-LOADS.md +1 -1
  13. package/adapters/opencode/README.md +15 -9
  14. package/adapters/opencode/agents/orchestrator.md +1 -1
  15. package/adapters/opencode/plugins/geneseed-context.js +7 -7
  16. package/adapters/opencode/plugins/geneseed-guard.js +6 -6
  17. package/adapters/opencode/workflows/dispatch.js +1 -1
  18. package/bin/geneseed.mjs +72 -6
  19. package/docs/extending.md +164 -55
  20. package/docs/limits.md +4 -4
  21. package/docs/token-footprint.md +15 -4
  22. package/docs/web/authoring.md +1 -1
  23. package/docs/web/claude-hooks.md +2 -2
  24. package/docs/web/collaboration.md +3 -3
  25. package/docs/web/first-session.md +2 -2
  26. package/docs/web/footprint.md +14 -7
  27. package/docs/web/foreman-mode.md +2 -2
  28. package/docs/web/harnesses.md +5 -3
  29. package/docs/web/install-quick.md +1 -1
  30. package/docs/web/model.md +3 -3
  31. package/docs/web/plugin-context.md +2 -2
  32. package/docs/web/plugin-guard.md +3 -3
  33. package/docs/web/plugin-ponytail.md +1 -1
  34. package/docs/web/rules.md +23 -3
  35. package/docs/web/setup-choices.md +20 -7
  36. package/docs/web/themes-author.md +13 -1
  37. package/docs/web-ui.md +36 -12
  38. package/harness.config.json +1 -1
  39. package/js/catalog.mjs +29 -4
  40. package/js/checkout.mjs +24 -1
  41. package/js/cli-table.json +8 -6
  42. package/js/diff.mjs +8 -3
  43. package/js/doctor.mjs +307 -4
  44. package/js/emit.mjs +48 -11
  45. package/js/generate.mjs +39 -5
  46. package/js/hooks.mjs +8 -7
  47. package/js/installs.mjs +101 -4
  48. package/js/inventory.mjs +150 -21
  49. package/js/migrate.mjs +10 -4
  50. package/js/render.mjs +110 -7
  51. package/js/settings.mjs +218 -27
  52. package/js/setup.mjs +95 -5
  53. package/js/status.mjs +45 -4
  54. package/js/tui.mjs +44 -1
  55. package/js/uninstall.mjs +25 -6
  56. package/js/web/actions.mjs +56 -5
  57. package/js/web/api.mjs +102 -16
  58. package/js/web/docs.mjs +33 -5
  59. package/js/web/jobs.mjs +12 -3
  60. package/js/web/server.mjs +6 -0
  61. package/package.json +1 -1
  62. package/src/AGENT.md.tmpl +75 -65
  63. package/src/agents/_template.md +4 -4
  64. package/src/agents/advocate.md +4 -4
  65. package/src/agents/architect.md +2 -2
  66. package/src/agents/developer.md +5 -5
  67. package/src/agents/docs.md +2 -2
  68. package/src/agents/empiricist.md +3 -3
  69. package/src/agents/explorer.md +3 -3
  70. package/src/agents/framer.md +3 -3
  71. package/src/agents/historian.md +3 -3
  72. package/src/agents/operator.md +3 -3
  73. package/src/agents/pragmatist.md +3 -3
  74. package/src/agents/reviewer.md +2 -2
  75. package/src/agents/security.md +2 -2
  76. package/src/agents/skeptic.md +4 -4
  77. package/src/agents/steward.md +3 -3
  78. package/src/agents/tester.md +2 -2
  79. package/src/agents/user-advocate.md +3 -3
  80. package/src/agents/visionary.md +3 -3
  81. package/src/doctrines/README.md +41 -0
  82. package/src/doctrines/craft.md +51 -0
  83. package/src/doctrines/ops.md +61 -0
  84. package/src/doctrines/process.md +87 -0
  85. package/src/doctrines/rigor.md +52 -0
  86. package/src/laws/universal.md +17 -336
  87. package/src/memory/README.md +2 -2
  88. package/src/modes/README.md +2 -2
  89. package/src/modes/foreman.md +1 -1
  90. package/src/notebook/README.md +2 -2
  91. package/src/ontology/universal.md +89 -0
  92. package/src/postures/README.md +3 -3
  93. package/src/postures/artisan.md +3 -3
  94. package/src/postures/assistant.md +1 -1
  95. package/src/postures/expert.md +1 -1
  96. package/src/postures/mentor.md +1 -1
  97. package/src/postures/peer.md +2 -2
  98. package/src/skills/_template.md +2 -2
  99. package/src/skills/brainstorm.md +2 -2
  100. package/src/skills/clarify.md +2 -2
  101. package/src/skills/codebase-design.md +1 -1
  102. package/src/skills/commit.md +5 -5
  103. package/src/skills/council.md +4 -4
  104. package/src/skills/crash-course.md +1 -1
  105. package/src/skills/daydream/SKILL.md +1 -1
  106. package/src/skills/debug.md +2 -2
  107. package/src/skills/decode.md +1 -1
  108. package/src/skills/develop.md +6 -6
  109. package/src/skills/document-project.md +4 -4
  110. package/src/skills/domain-modeling.md +1 -1
  111. package/src/skills/drill.md +1 -1
  112. package/src/skills/feynman.md +1 -1
  113. package/src/skills/forge-mcp.md +3 -3
  114. package/src/skills/fresh-eyes.md +4 -4
  115. package/src/skills/frontend-design.md +1 -1
  116. package/src/skills/gap-detector.md +1 -1
  117. package/src/skills/geneseed-code-review.md +1 -1
  118. package/src/skills/geneseed.md +4 -4
  119. package/src/skills/git-archaeology.md +1 -1
  120. package/src/skills/git-rescue.md +3 -3
  121. package/src/skills/handoff.md +4 -4
  122. package/src/skills/herdr.md +1 -1
  123. package/src/skills/ingest.md +3 -3
  124. package/src/skills/learning-path.md +1 -1
  125. package/src/skills/migrate.md +5 -5
  126. package/src/skills/opencode-theme.md +1 -1
  127. package/src/skills/parallel-agents.md +2 -2
  128. package/src/skills/pipeline.md +2 -2
  129. package/src/skills/plan.md +2 -2
  130. package/src/skills/ponytail.md +1 -1
  131. package/src/skills/profile.md +1 -1
  132. package/src/skills/prose.md +2 -2
  133. package/src/skills/prototype.md +2 -2
  134. package/src/skills/refactor.md +2 -2
  135. package/src/skills/release.md +4 -4
  136. package/src/skills/repo-map.md +5 -5
  137. package/src/skills/research.md +6 -6
  138. package/src/skills/review-response.md +3 -3
  139. package/src/skills/roast-me.md +1 -1
  140. package/src/skills/rule.md +5 -5
  141. package/src/skills/ship.md +3 -3
  142. package/src/skills/tdd.md +2 -2
  143. package/src/skills/tickets.md +1 -1
  144. package/src/skills/wayfinder.md +1 -1
  145. package/src/skills/wiki.md +4 -4
  146. package/src/skills/workflow.md +2 -2
  147. package/themes/README.md +17 -7
  148. package/themes/_TEMPLATE.json +37 -36
  149. package/themes/biker.json +37 -36
  150. package/themes/commentator.json +37 -36
  151. package/themes/cyberpunk.json +37 -36
  152. package/themes/gamer.json +37 -36
  153. package/themes/imperial.json +37 -36
  154. package/themes/joker.json +37 -36
  155. package/themes/marvin.json +37 -36
  156. package/themes/mean.json +37 -36
  157. package/themes/military.json +37 -36
  158. package/themes/neutral.json +37 -36
  159. package/themes/pirate.json +37 -36
  160. package/themes/sports.json +37 -36
  161. package/themes/verstappen.json +37 -36
  162. package/themes/wizard.json +37 -36
  163. package/web/dist/assets/{About-BYXlmbyo.js → About-_MnJcwb_.js} +1 -1
  164. package/web/dist/assets/{Activity-us5MPf4u.js → Activity-DpjqO-FR.js} +1 -1
  165. package/web/dist/assets/{ActivityDetail-CiaQXUk2.js → ActivityDetail-Bvrjv8oW.js} +1 -1
  166. package/web/dist/assets/{Diff-Bh0qbZ2s.js → Diff-DZ0IehBV.js} +1 -1
  167. package/web/dist/assets/{Doctor-BIlQME45.js → Doctor-cu4krooO.js} +1 -1
  168. package/web/dist/assets/{Graph-4dYD1dPG.js → Graph-DUOPY65j.js} +1 -1
  169. package/web/dist/assets/{Harnesses-PzYZ3LOC.js → Harnesses-B5Osg-BF.js} +1 -1
  170. package/web/dist/assets/Laws-D8DJgTBp.js +3 -0
  171. package/web/dist/assets/{Library-CjMbksJW.js → Library-8y69I3_z.js} +1 -1
  172. package/web/dist/assets/{Markdown-Bk81c3aZ.js → Markdown-Ds5GS1OD.js} +1 -1
  173. package/web/dist/assets/{Profile-Curui_-j.js → Profile-7Jxa7ZUX.js} +1 -1
  174. package/web/dist/assets/{Rules-Bm283wdv.js → Rules-UZ0jWkjg.js} +1 -1
  175. package/web/dist/assets/{Skills-gruqYuhl.js → Skills-Bgkl0xLd.js} +1 -1
  176. package/web/dist/assets/{StatusBadge-EiM_FPqv.js → StatusBadge-Cx4caF_2.js} +1 -1
  177. package/web/dist/assets/{Themes-DU99j4Hr.js → Themes-De8az7Sv.js} +1 -1
  178. package/web/dist/assets/{activity-0rvQ6Vra.js → activity-VDAdVQ3q.js} +1 -1
  179. package/web/dist/assets/index-1pPSz7Kl.css +1 -0
  180. package/web/dist/assets/{index-0b2hobOo.js → index-BKrjBRV4.js} +1 -1
  181. package/web/dist/assets/index-C-gb-q-r.js +12 -0
  182. package/web/dist/assets/{index-IiGFmCW_.js → index-wNiNzFFQ.js} +1 -1
  183. package/web/dist/index.html +2 -2
  184. package/web/src/pages/Laws.jsx +401 -93
  185. package/web/dist/assets/Laws-DtZweXal.js +0 -1
  186. package/web/dist/assets/index-D5VY3TY_.js +0 -12
  187. package/web/dist/assets/index-DUCsDv7z.css +0 -1
package/SETUP.md CHANGED
@@ -165,9 +165,11 @@ your repo's `.claude/settings.json` (paths assume the bundle is at the repo root
165
165
  It wires:
166
166
 
167
167
  - **PreToolUse** (matcher `Bash`) — runs `harness git-gate`, a tool-boundary backstop
168
- for Law XX. The hook inspects the command and forces an `ask` on every `git commit`
169
- or `git push` (even chained or `-C`-flagged), un-suppressible by a one-time "don't
170
- ask again". Every other Bash command is deferred to the normal permission flow.
168
+ for Doctrine `process 5`. The hook inspects the command and forces an `ask` on every
169
+ `git commit` or `git push` (even chained or `-C`-flagged), un-suppressible by a
170
+ one-time "don't ask again". Every other Bash command is deferred to the normal
171
+ permission flow. It is wired only when the **process** pack is active — build with
172
+ `--doctrines` leaving `process` out and this hook is not installed at all.
171
173
  - **SessionStart** (`startup`/`clear`) — prints `AGENT.md` and injects the project
172
174
  context (`harness context`, which auto-discovers the repo's docs);
173
175
  - **SessionStart** (`resume`) — refreshes the project context only, without re-printing
@@ -286,17 +288,79 @@ doubles as a CI drift check: `1` when it had to change files, `0` when every the
286
288
  already in sync, and `2` when `_TEMPLATE.json` itself is missing or unreadable — the one
287
289
  case where a `0` would have meant "in sync" without having checked anything.
288
290
 
291
+ ### Doctrine packs
292
+
293
+ The constitution is three tiers, and only one of them is a choice. The **Ontology** (how the
294
+ agent thinks — Telos, Evidence, Decisions, Conduct) and the nine **Rules** (what it never
295
+ trades away) are always on and cannot be switched off. The **Doctrines** are practices rather
296
+ than principles, and they ship as four packs:
297
+
298
+ | Pack | What it governs |
299
+ | --- | --- |
300
+ | **craft** | how code is written — reuse first, house conventions, docs in the same change, the smallest diff |
301
+ | **rigor** | how work is proven — idempotence, honest tests, cover-and-verify, gates that can actually fail |
302
+ | **ops** | how the machine is driven — tool discovery, commands that return, complete teardowns, restart is not reload |
303
+ | **process** | how a session runs — planning, context economy, docs first, bounded loops, and the consent gate on every commit and push |
304
+
305
+ They are picked **at build time**, once, on the generator — there is no runtime toggle — and
306
+ the default is all four:
307
+
308
+ geneseed-build --doctrines craft,rigor # two packs
309
+ geneseed-build --doctrines none # ontology and the nine Rules only
310
+ geneseed-build # all four (the default)
311
+
312
+ `harness.config.json`'s `doctrines` array sets this checkout's own default, and `doctor`
313
+ refuses one that names a pack the checkout does not ship. Order is fixed by the harness
314
+ (craft → rigor → ops → process) regardless of the order you type.
315
+
316
+ The setup wizard asks too — one *all* / *choose* gate, then a yes/no per pack with its
317
+ one-line description — and it **pre-selects what the install already carries**, read off the
318
+ `Active packs:` marker line in the deployed `AGENT.md`. So re-running the wizard and holding
319
+ Enter cannot silently widen a set you deliberately narrowed.
320
+
321
+ **The whole catalogue always ships.** Every pack file lands under `doctrines/` beside
322
+ `AGENT.md` at both footprints whether or not it was built in, so a rule that cites a pack you
323
+ left out is still readable on disk — only the rendered `AGENT.md` is narrower. `doctor` reports
324
+ such citations as a `[note]`, printed and not counted, because a narrowed build is a
325
+ configuration you chose rather than a defect.
326
+
327
+ ⚠ **Turning `process` off also removes the commit/push consent gate.** Doctrine `process 5`
328
+ (*Consent Before Push*) is enforced twice: as prose in `AGENT.md`, and at the tool boundary —
329
+ the `git-gate` PreToolUse hook on Claude Code and Bob, and the `git commit*` / `git push*`
330
+ permission entries on OpenCode. A build without the `process` pack wires neither, and
331
+ rebuilding an install that had them takes the Claude hook back out of `settings.json`. That is
332
+ deliberate and it is the rule the tiering rests on: **prompt and boundary must never
333
+ disagree.** A gate that stops every command to ask consent for a rule the install did not adopt
334
+ is a gate the agent cannot explain and you did not ask for. Two details worth knowing:
335
+
336
+ - **What stays in every build regardless:** `rm -rf *`, `git push --force*` and `git push -f*`.
337
+ Those are Rule IV's territory — an always-on invariant — not the process pack's.
338
+ - **On OpenCode, an existing `opencode.json` is not stripped.** That file is co-owned, nothing
339
+ on disk records who wrote a given permission entry, and Geneseed will not delete a line you
340
+ might have typed yourself. A pack-off rebuild leaves an already-written `git commit*` in
341
+ place and *reports* it instead. A fresh install has no git gate at all.
342
+
343
+ `process` is the only pack whose removal changes what the machine does rather than only what
344
+ the agent reads — which is why the wizard's blurb for it says so.
345
+
289
346
  ### Footprint (lean vs full)
290
347
 
291
- **Footprint** sets how much of the Rules `AGENT.md` carries *inline* on every turn — a
348
+ **Footprint** sets how much of the constitution `AGENT.md` carries *inline* on every turn — a
292
349
  token-cost dial, not a change to which Rules apply. Both states keep all Rules in force:
293
350
 
294
- - **full** (default) — Section 1 inlines every Rule's complete text *and* rationale.
295
- Maximum guidance density; the largest always-loaded block in the harness.
296
- - **lean** — Section 1 carries each Rule's heading + the rule line, then a pointer to the
297
- full law file. ~40% smaller; the complete `laws/universal.md` still ships beside
298
- `AGENT.md` and the agent reads it on demand (and is told to before acting on secrets,
299
- deletion, git history, scope, or untrusted content).
351
+ - **lean** (default) — Sections 1–2 carry the heading and rule line of each Rule and each
352
+ active doctrine rule, then a pointer to the full text. Lighter every turn; the complete
353
+ `laws/universal.md`, `ontology/` and `doctrines/` still ship beside `AGENT.md` and the agent
354
+ reads them on demand (and is told to before acting on secrets, deletion, git history, scope,
355
+ or untrusted content).
356
+ - **full** — Sections 1–2 inline every Rule's and every active doctrine rule's complete text
357
+ *and* rationale. Maximum guidance density; the largest always-loaded block in the harness.
358
+
359
+ **The Ontology is never truncated.** Lean keeps only the first sentence of each `### ` block,
360
+ and the four ontology sections are flowing prose rather than numbered rules — cutting them
361
+ would leave four orphan sentences, so they ship whole at both footprints. That is why adding
362
+ the ontology tier grew the lean carrier proportionally more than the full one; it was taken as
363
+ a deliberate cost.
300
364
 
301
365
  **Why:** context is scarce and metered. Lean reclaims that budget — and the tokens you
302
366
  pay for it — for the task, moving the *rationale* one read away while keeping the rules
@@ -310,10 +374,11 @@ you run a smaller model.
310
374
  can *do*: lean and full emit identical files (same agents, skills, plugins, commands, memory,
311
375
  notebook, hooks) and every Rule is present and binding. The only structural difference is
312
376
  that a lean install on a global / Claude / Bob / Copilot target also ships the standalone
313
- `laws/universal.md` (project bundles already carry it); the only behavioural difference is
314
- that each Rule's reasoning loads on demand instead of every turn. Lean is the default;
315
- full, with the rationale always in front of the model, applies a rule's nuance more
316
- reliably on subtle edge cases or with a weaker model, and is one flag away.
377
+ `laws/universal.md` and `ontology/` (project bundles already carry them, and `doctrines/`
378
+ ships at both footprints on every target); the only behavioural difference is that the
379
+ reasoning loads on demand instead of every turn. Lean is the default; full, with the rationale
380
+ always in front of the model, applies a rule's nuance more reliably on subtle edge cases or
381
+ with a weaker model, and is one flag away.
317
382
 
318
383
  Set it with `--footprint lean|full` (alongside any `--emit`), the **Footprint** toggle in
319
384
  the web Settings, the per-harness dropdown in the Harnesses tab, or the setup wizard. It is
@@ -418,7 +483,7 @@ opt-in, now simply matches the default. To drop injection entirely, set
418
483
  If you keep a personal knowledge base on this machine — an Obsidian vault, or any
419
484
  folder of interlinked markdown — declare it once in **`wiki.jsonc`** and the agent
420
485
  becomes a citizen of it: entry notes load each session (eager) or on demand (lazy),
421
- and it reads *and writes* notes under your vault's own conventions (AGENT.md §7,
486
+ and it reads *and writes* notes under your vault's own conventions (AGENT.md §8,
422
487
  the `wiki` skill). Unlike `context.json` this is **per machine, not per repo**.
423
488
 
424
489
  The build seeds `wiki.jsonc` beside `AGENT.md` (for a global install:
@@ -462,7 +527,7 @@ list keeps the feature off. The file may hold private paths — it is host-speci
462
527
  covered by the bundle `.gitignore`, and never committed.
463
528
 
464
529
  On tools without the plugins (plain `AGENT.md`, Claude Code), the same contract
465
- holds through prose: AGENT.md §7 instructs the agent to read `wiki.jsonc` at session
530
+ holds through prose: AGENT.md §8 instructs the agent to read `wiki.jsonc` at session
466
531
  start and honour it.
467
532
 
468
533
  ### Memory
@@ -963,7 +1028,8 @@ capability agent. Notes:
963
1028
 
964
1029
  - **Permissions still gate.** The consent-before-commit/push / `rm -rf` `ask` rules
965
1030
  will *block* in a non-interactive run (nothing to answer the prompt). Both
966
- `git commit` and `git push` are gated now (Law XX, every branch), so a CI job that
1031
+ `git commit` and `git push` are gated on every branch whenever the **process** pack
1032
+ is active (Doctrine `process 5`; a build without it wires neither), so a CI job that
967
1033
  commits must opt those commands back to `"allow"` in its own `permission.bash` map,
968
1034
  or scope the run to read-only work — don't blanket-disable the guards.
969
1035
  - **`--pure`** runs OpenCode ignoring local/global config — handy to reproduce a bug
package/SHIPPED.md CHANGED
@@ -20,7 +20,7 @@ historical pointers, 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: **2.1.0**.
23
+ > string. Current label: **3.1.0**.
24
24
 
25
25
  > **Spec status audit (2026-06-15).** Every dated spec authored before today was
26
26
  > verified against the source tree and confirmed implemented (code + tests + docs);
@@ -35,7 +35,8 @@ Every row below is present in the tree today; "Spec" links the design record.
35
35
  | Capability | What it is | Spec |
36
36
  | --- | --- | --- |
37
37
  | **Themed generator** | One neutral `src/` → 14 themed bundles via `geneseed-build` (zero dependencies); structure stays theme-independent | [DESIGN.md](DESIGN.md) |
38
- | **Laws / Agents / Skills / Memory / Notebook** | 40 laws, 17 agents, 47 skills, the memory convention, and the agent's sovereign notebook | [notebook](docs/specs/2026-06-11-notebook-sovereign-space.md) · [agent-own-space](docs/specs/2026-06-10-notebook-agent-own-space.md) |
38
+ | **Laws / Agents / Skills / Memory / Notebook** | 9 laws, 17 agents, 47 skills, the memory convention, and the agent's sovereign notebook | [notebook](docs/specs/2026-06-11-notebook-sovereign-space.md) · [agent-own-space](docs/specs/2026-06-10-notebook-agent-own-space.md) |
39
+ | **Three-tier constitution** | The governance surface splits into an always-on **Ontology** (Telos, Evidence, Decisions, Conduct — the Pact absorbed into Telos), the nine always-on **Invariants**, and four toggleable **Doctrine** packs (craft, rigor, ops, process) addressed `<pack> <n>`. 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 pack numbering, the per-rule Principle column, every `{{DOCTRINE}}` citation in `src/`, and the rule that an always-on tier may never cite a toggleable one | [three-tier-constitution](docs/specs/2026-08-19-three-tier-constitution-design.md) |
39
40
  | **`doctor`** | One check: unresolved tokens, dead/non-hermetic links, theme-key parity, authoring gates, rendered-bundle drift | [theme-aware doctor/diff](docs/specs/2026-06-07-theme-aware-doctor-diff.md) |
40
41
  | **`diff` + improvements export** | Deployed-vs-source drift report; export an `improvements.md` back-port | [improvements-export](docs/specs/2026-06-12-improvements-export.md) |
41
42
  | **`status` / `version`** | Headless dashboard + fingerprint verdict (no TUI needed) | [status-command](docs/specs/2026-06-07-status-command.md) · [version-and-uninstall](docs/specs/2026-06-07-version-and-uninstall.md) |
@@ -46,10 +47,10 @@ Every row below is present in the tree today; "Spec" links the design record.
46
47
  | **Per-agent memory** | Each capability agent keeps durable lessons in `memory/agents/<name>.md`: read at dispatch, written back mechanically by `learn` on session/subagent end (OpenCode plugin + claude/bob `SubagentStop`); `learn --consolidate` rebuilds the index | [orchestration-memory-upgrade](docs/specs/2026-07-04-orchestration-memory-upgrade.md) |
47
48
  | **Wiki integration** | Machine-wide knowledge base (`wiki.jsonc`): eager/lazy loading, conventions, protected folders enforced at the tool boundary | [wiki-knowledge-base](docs/specs/2026-06-11-wiki-knowledge-base.md) |
48
49
  | **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 | [collaboration-layer](docs/specs/2026-07-12-collaboration-layer.md) |
49
- | **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. Law VI 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 | [rule-front-door](docs/specs/2026-07-30-rule-front-door.md) |
50
+ | **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 | [rule-front-door](docs/specs/2026-07-30-rule-front-door.md) |
50
51
  | **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` | [entity-registry](docs/specs/2026-07-31-entity-registry.md) |
51
52
  | **Node runtime + npm package** | The whole harness runs from Node: every command `js/cli-table.json` declares, all four 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 (`docs/limits.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` and `herdr` call `node -e` | [npx-distribution](docs/specs/2026-08-06-npx-distribution.md) |
52
- | **Runtime awareness** | MCP discovery, web research, tool-call batching, review discipline baked into the laws | [runtime-awareness](docs/specs/2026-06-07-runtime-awareness-and-review-discipline.md) |
53
+ | **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 | [runtime-awareness](docs/specs/2026-06-07-runtime-awareness-and-review-discipline.md) |
53
54
  | **Run from anywhere / uninstall** | `link`/`unlink` onto PATH; global uninstall that keeps the memory store | [version-and-uninstall](docs/specs/2026-06-07-version-and-uninstall.md) |
54
55
 
55
56
  ## Workplans (not features)
@@ -65,9 +65,9 @@ project-bypasses-global need. An older Bob install that wrote a stale exclude is
65
65
  ## Hooks — best-effort
66
66
 
67
67
  The `settings.json` hooks use the **Claude dialect** (a `PreToolUse:Bash`
68
- git-gate for Rule XX consent, `SessionStart` context injection, and
69
- `Stop`/`SubagentStop` learn/memory capture — the same three `harness.py`
70
- subcommands the OpenCode plugins drive). Bob's hook execution is **unverified**:
68
+ git-gate for Doctrine process 5 consent — present only when the `process` pack is
69
+ built in — `SessionStart` context injection, and `Stop`/`SubagentStop` learn/memory
70
+ capture, the same `geneseed-hook` subcommands the OpenCode plugins drive). Bob's hook execution is **unverified**:
71
71
  if Bob honours Claude-shaped hooks they fire; if not, they are inert and the
72
72
  harness still works fully through the `AGENTS.md`/`rules` preamble prose. This is
73
73
  the same behaviour-contract parity every non-OpenCode host gets — the mechanism
@@ -14,8 +14,10 @@ bin/geneseed-hook.mjs …` — so at user scope they would fire and fail in ever
14
14
  repo that doesn't vendor the harness. A generated global install wires
15
15
  absolute-path hooks instead — `geneseed setup` does that for you.) It:
16
16
 
17
- - on **PreToolUse** (matcher `Bash`), runs `harness git-gate` — a tool-boundary
18
- backstop for Rule XX (*consent before every commit and push*). The hook inspects the
17
+ - on **PreToolUse** (matcher `Bash`), **on an install that built the `process` pack in**,
18
+ runs `harness git-gate` — the tool-boundary half of Doctrine process 5 (*consent before
19
+ every commit and push*). Drop that pack and this hook is not written at all; the
20
+ invariant-territory refusals (`rm -rf`, force-push) stay in every build. The hook inspects
19
21
  command and, when it runs a `git commit` or `git push` (bare, flagged, `-C <path>`,
20
22
  or chained like `git add . && git commit … && git push`), returns
21
23
  `permissionDecision: "ask"` so Claude Code **prompts on every such call**. Crucially
@@ -31,7 +33,7 @@ absolute-path hooks instead — `geneseed setup` does that for you.) It:
31
33
  doesn't recognise as a commit/push, so over-matching the tool surface is harmless.
32
34
  - on **SessionStart** (`startup`/`clear` only — a fresh context), prints `AGENT.md`
33
35
  so the harness is in context from the first turn, then runs `harness context` to
34
- **inject the project context** directly into the session — so Rule XVIII is enforced
36
+ **inject the project context** directly into the session — so the project-context load is
35
37
  by the hook, not left to the agent to remember (lazy entries are only listed). On
36
38
  **`resume`** it runs `harness context` *without* re-`cat`ting `AGENT.md`: the resumed
37
39
  conversation already carries the harness, so re-injecting the static file each resume
@@ -59,7 +61,7 @@ absolute-path hooks instead — `geneseed setup` does that for you.) It:
59
61
  Adjust the paths if your harness bundle is not at the repository root. On Windows
60
62
  the commands are identical (`node bin/geneseed-hook.mjs …`).
61
63
 
62
- Why inject rather than instruct? Rule XVIII tells the agent to read the project
64
+ Why inject rather than instruct? The constitution tells the agent to read the project
63
65
  context at startup, but startup rituals are exactly what agents skip. The
64
66
  `harness context` hook removes the choice: the eager files' contents land in
65
67
  context before the first turn regardless of agent discipline. On tools without
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: geneseed
3
- description: "Interact with a deployed Geneseed harness from any repo — locate the install, read its laws/agents/skills/memory/notebook by name, run status/doctor/diff, distill memory with learn, and manage the local web UI. Use when the user mentions Geneseed, AGENT.md, the harness, an agent operating system, or asks you to inspect, refresh, or read from the deployed bundle."
3
+ description: "Interact with a deployed Geneseed harness from any repo — locate the install, read its ontology/rules/doctrines/agents/skills/memory/notebook by name, run status/doctor/diff, distill memory with learn, and manage the local web UI. Use when the user mentions Geneseed, AGENT.md, the harness, an agent operating system, or asks you to inspect, refresh, or read from the deployed bundle."
4
4
  ---
5
5
 
6
6
  # geneseed — agent skill
7
7
 
8
- Geneseed is a portable AI-agent harness deployed once and used everywhere. This skill lets you talk to whichever deployment is in scope from any repo: read the canonical files (laws, agents, skills, memory, notebook), probe state (status, version, doctor, diff), distill durable memory, and drive the local web UI. The harness is theme-independent in structure — directory and section names are always plain English — so the paths below are stable across themes.
8
+ Geneseed is a portable AI-agent harness deployed once and used everywhere. This skill lets you talk to whichever deployment is in scope from any repo: read the canonical files (the three constitution tiers, agents, skills, memory, notebook), probe state (status, version, doctor, diff), distill durable memory, and drive the local web UI. The harness is theme-independent in structure — directory and section names are always plain English — so the paths below are stable across themes.
9
9
 
10
10
  ## Find the deployed harness before doing anything
11
11
 
@@ -19,7 +19,9 @@ Pick the first that resolves; remember the path for the rest of the session.
19
19
 
20
20
  If none resolve, the user does not have Geneseed deployed here — say so and stop. Do not run `setup`, `build`, or `upgrade` on your own to "fix" this; that is a user decision.
21
21
 
22
- A live harness root contains: `AGENT.md`, `agents/<name>.md`, `skills/<name>/SKILL.md`, `memory/MEMORY.md`, `notebook/NOTEBOOK.md`, `themes/`, and (on OpenCode) `plugins/`, `workflows/`, `opencode.jsonc`, `wiki.jsonc`. Laws live as numbered sections inside `AGENT.md`, not as separate files in the deployed bundle — read them from `AGENT.md` directly.
22
+ A live harness root contains: `AGENT.md`, `ontology/universal.md`, `laws/universal.md`, `doctrines/<pack>.md`, `agents/<name>.md`, `skills/<name>/SKILL.md`, `memory/MEMORY.md`, `notebook/NOTEBOOK.md`, `themes/`, and (on OpenCode) `plugins/`, `workflows/`, `opencode.jsonc`, `wiki.jsonc`.
23
+
24
+ The constitution is **three tiers**: an always-on **Ontology** (four prose sections — Telos, Evidence, Decisions, Conduct), nine always-on **Rules** numbered I–IX, and the **Doctrines** — practice packs (`craft`, `rigor`, `ops`, `process`) chosen per install at build time. `AGENT.md` carries all three inline (whole at the `full` footprint, heading-plus-first-line at `lean`), *and* the complete text ships as files beside it. All four pack files ship even when a pack was not built in, so a citation into an inactive pack still resolves on disk — which is why a question about a rule is answered from the tier file, never only from `AGENT.md`.
23
25
 
24
26
  ## Read-only verbs (safe, no confirmation needed)
25
27
 
@@ -32,11 +34,13 @@ A live harness root contains: `AGENT.md`, `agents/<name>.md`, `skills/<name>/SKI
32
34
  - **Read a specific piece** — read the file directly:
33
35
  - Agent by name: `<harness>/agents/<name>.md`
34
36
  - Skill by name: `<harness>/skills/<name>/SKILL.md`
35
- - Law by number: section `## N. …` inside `<harness>/AGENT.md`
37
+ - Ontology section by name: `<harness>/ontology/universal.md` — `#### Telos` / `Evidence` / `Decisions` / `Conduct` (theme-independent names)
38
+ - Rule by numeral I–IX: `<harness>/laws/universal.md` — heading `### <Rule-noun> <ROMAN> — <title>`
39
+ - Doctrine rule by pack and number: `<harness>/doctrines/<pack>.md` — heading `### <Doctrine-noun> <pack> <n> — <title>`
36
40
  - Memory fact: `<harness>/memory/<file>.md`; index at `MEMORY.md`
37
41
  - Notebook entry: `<harness>/notebook/<file>.md`; index at `NOTEBOOK.md`
38
42
 
39
- When the user asks "what does the X skill say" or "what's law VI", read the file directly — do not summarise from memory.
43
+ When the user asks "what does the X skill say", "what's Rule VI" or "what does Doctrine process 5 say", read the file directly — do not summarise from memory.
40
44
 
41
45
  ## Side-effecting verbs (confirm with the user first)
42
46
 
@@ -59,7 +63,7 @@ If the user asks for any of these, run them as requested. Do not run them as a s
59
63
  ## Common patterns
60
64
 
61
65
  - **"What harness do I have here?"** — `geneseed status` (if launcher on PATH); else resolve via the fallback list and report theme, install mode, path, and version.
62
- - **"What does the `<X>` skill / agent / law say?"** — read the file directly. For laws, grep `AGENT.md` for `## N\.` or `Law N`.
66
+ - **"What does the `<X>` skill / agent / rule say?"** — read the file directly. A Rule is `### <Rule-noun> <ROMAN> —` in `laws/universal.md`; a doctrine rule is `### <Doctrine-noun> <pack> <n> —` in `doctrines/<pack>.md`; an ontology section is `#### <Name>` in `ontology/universal.md`. The tier noun is themed, the address never is.
63
67
  - **"Show me what's drifted in my install."** — `geneseed diff`. Offer to write the output to a file (`--out`) if it's long.
64
68
  - **"Distill what we did today into memory."** — confirm scope, then `geneseed learn`. Afterwards, `git status` inside the harness dir to show what landed.
65
69
  - **"Open the dashboard / web UI."** — `geneseed web start`. Tell the user the URL it printed and that it binds to localhost only.
@@ -43,12 +43,12 @@ page is mostly about *what it does not automate* and why the harness still holds
43
43
  Copilot has **no `settings.json` and no lifecycle-hook mechanism**, so the whole
44
44
  settings/hooks/excludes stage is skipped. Concretely, Copilot does **not** get:
45
45
 
46
- - **automated context injection** — Rule XVIII's project-context load falls back
46
+ - **automated context injection** — the project-context load falls back
47
47
  to the preamble instructing the agent to read the docs itself;
48
48
  - **automated memory / learn write-back** — no `Stop`/`SubagentStop` hook; the
49
49
  memory convention rides the preamble's instructions (the agent writes its own
50
50
  memories) rather than a session-end distiller;
51
- - **the git-gate consent backstop** — Rule XX (*consent before every commit and
51
+ - **the git-gate consent backstop** — Doctrine process 5 (*consent before every commit and
52
52
  push*) is enforced by the **preamble prose only**, not at the tool boundary.
53
53
  There is no hook to force the prompt;
54
54
  - **sovereign-repo excludes** — Copilot documents no exclude/shadow mechanism
@@ -58,8 +58,9 @@ settings/hooks/excludes stage is skipped. Concretely, Copilot does **not** get:
58
58
  installs already exist.
59
59
 
60
60
  None of this is a build gap — it is Copilot's ceiling. The harness still applies
61
- in full: every Rule, agent, and skill is present; only the *automation* of a few
62
- Rules degrades to instruction-only. This is behaviour-contract parity, the same
61
+ in full: the Ontology, every Rule, every doctrine rule the install built in, and
62
+ every agent and skill are present; only the *automation* of a few of them degrades
63
+ to instruction-only. This is behaviour-contract parity, the same
63
64
  principle every non-OpenCode host follows.
64
65
 
65
66
  ## MCP
@@ -190,7 +190,7 @@ enforcement paths read the same. Adds a machine marker (first line) for §4.
190
190
 
191
191
  ```
192
192
  <!-- geneseed-context:v2 -->
193
- === PROJECT CONTEXT — binding for this repo per Law XVIII ===
193
+ === PROJECT CONTEXT — binding for this repo ===
194
194
 
195
195
  ----- <path> — <description> -----
196
196
  <full file contents, trailing newlines stripped>
@@ -204,7 +204,7 @@ enforcement paths read the same. Adds a machine marker (first line) for §4.
204
204
  - [demoted: README.md exceeded 16 KB — read on demand]
205
205
  ```
206
206
 
207
- - Header keeps the exact `=== PROJECT CONTEXT … Law XVIII ===` wording.
207
+ - Header keeps the exact `=== PROJECT CONTEXT — binding for this repo ===` wording.
208
208
  - A `MISSING` eager file emits `[context] MISSING eager file: <err>` inline (as today).
209
209
  - The `<!-- geneseed-context:v2 -->` marker is the idempotency sentinel.
210
210
 
@@ -269,12 +269,17 @@ exactly one copy and the setup guide (§10) removes project copies. Document thi
269
269
 
270
270
  ---
271
271
 
272
- ## 8. Fallback Law (for tools without the plugin)
272
+ ## 8. Fallback rule (for tools without the plugin)
273
273
 
274
- Add to the universal laws so non-OpenCode tools and uncovered repos still get
275
- project context — the *instruction* tier behind the *injection* tier:
274
+ ⚠ HISTORICAL. This was written when the corpus was a flat, open-ended list of laws.
275
+ It is not one now: the invariants are a closed set of nine, and project-context
276
+ discovery is one of the two old laws absorbed into AGENT.md's own **§9 Context**
277
+ section, which every build carries as prose. Nothing an adapter spec writes is
278
+ added to the invariants. The text below survives as the *instruction* tier behind
279
+ the *injection* tier, and `{{DOCTRINE}} process 4` (Read the Docs First) is its
280
+ nearest live citation:
276
281
 
277
- > **Law (Project Context Discovery).** When project context has not already been
282
+ > **Rule (Project Context Discovery).** When project context has not already been
278
283
  > injected, before substantive work read the repo's agent-directed rules and entry
279
284
  > docs — `AGENTS.md`/`AGENT.md`/`CLAUDE.md`, root `README.md`, and any `.harness/`
280
285
  > manifest — and treat `docs/`, `adr/`, and architecture notes as lazy: consult
@@ -30,7 +30,7 @@ rules. It accepts:
30
30
  - globs (`"laws/*.md"`),
31
31
  - URLs.
32
32
 
33
- Geneseed points it at the bundle's **`AGENT.md`** (which inlines the laws). That is
33
+ Geneseed points it at the bundle's **`AGENT.md`** (which inlines all three constitution tiers — the Ontology, the nine Rules and the active doctrine packs; at the default `lean` footprint the rules are heading-plus-first-line, with the complete text in `ontology/`, `laws/` and `doctrines/` beside it). That is
34
34
  all you need there — the rest of the harness is loaded by the plugins below.
35
35
 
36
36
  ## 3. Plugins — event-driven JS/TS
@@ -181,7 +181,7 @@ docs with an `eager`/`lazy` split. The
181
181
  On `session.created` it **auto-discovers the current repo's docs by convention**
182
182
  and injects the `eager` ones into the session via a no-reply prompt
183
183
  (`session.prompt({ noReply: true })`) — so they're in context before your first
184
- turn, enforcing **Law XVIII** by injection, not agent discipline. This is what lets
184
+ turn, enforcing the project-context load by injection, not agent discipline. This is what lets
185
185
  the harness live entirely in the global config dir with zero per-repo files.
186
186
 
187
187
  - **Eager** (injected in full, budget-capped): root `AGENTS.md`/`AGENT.md`/
@@ -200,11 +200,11 @@ the harness live entirely in the global config dir with zero per-repo files.
200
200
  hard guarantee is still a single install: OpenCode dedups plugins by npm
201
201
  name+version only, so two local copies both load.)
202
202
  - **Survives compaction:** on the experimental `session.compacting` hook it re-pushes
203
- the eager docs into the compaction context, so the project context (Law XVIII)
203
+ the eager docs into the compaction context, so the project context
204
204
  persists when a long session is summarised. The `AGENT.md` rules already survive —
205
205
  they load via `instructions`, not the conversation — so only the injected project
206
206
  context needs re-pushing.
207
- - **Machine wiki (AGENT.md §7):** the same block carries a `MACHINE WIKI` segment
207
+ - **Machine wiki (AGENT.md §8):** the same block carries a `MACHINE WIKI` segment
208
208
  for the user's own knowledge base(s) — typically an Obsidian vault — declared in
209
209
  `wiki.jsonc` (`$GENESEED_WIKI` → `$GENESEED_HARNESS/wiki.jsonc` → beside the
210
210
  install). Per wiki: eager entries inject in full, lazy entries list, and the
@@ -381,7 +381,7 @@ behaviour** — nothing changes the machine's current agent/model unless you opt
381
381
  - **Runtime guard plugin** (`geneseed-guard.js`, installed with the others). Enforces
382
382
  the safety Laws at the tool boundary: **blocks** writes to private-key/credential
383
383
  files (Law I), catastrophic shell like `rm -rf /` (Law IV), and any mutation under
384
- a declared wiki's `protected` folders (AGENT.md §7, from `wiki.jsonc`); **warns** on
384
+ a declared wiki's `protected` folders (AGENT.md §8, from `wiki.jsonc`); **warns** on
385
385
  `.env` writes and force-push. `GENESEED_GUARD=off` disables it, `=warn` downgrades
386
386
  blocks to warnings.
387
387
  - **Invisible context injection** (the default). The context plugin delivers via
@@ -390,10 +390,15 @@ behaviour** — nothing changes the machine's current agent/model unless you opt
390
390
  auto-falls back to the visible `session.created` message. `GENESEED_CONTEXT_VISIBLE=1`
391
391
  forces the visible block (legacy `GENESEED_CONTEXT_TRANSFORM=0/off` does the same).
392
392
  - **Default permissions.** A fresh `opencode.json` gets a minimal policy that **asks**
393
- before `rm -rf *` and **every `git commit` and `git push`** (the host-level backstop
394
- for the consent-before-commit/push Rule — the agent never records or shares code
395
- unprompted, on any branch; force-push is also called out explicitly). Added only when
396
- you have no `permission` key — an existing policy is never touched. Routine local work
393
+ before `rm -rf *` and a force-push — those are **Rule IV**'s territory and are in every
394
+ build — and, **on an install that built the `process` pack in**, before every
395
+ `git commit` and `git push` (the host-level backstop for **Doctrine process 5**: the
396
+ agent never records or shares code unprompted, on any branch). Build with
397
+ `--doctrines` leaving `process` out and those two entries are simply not written.
398
+ The whole block is added only when you have no `permission` key; an existing policy is
399
+ reconciled key by key — Geneseed adds back what a returning pack wants and **never
400
+ removes** an entry, because it cannot tell its own from one you typed, so a pack-off
401
+ rebuild leaves a `git commit*` you already have in place and reports it instead. Routine local work
397
402
  (edits, builds, tests) is unaffected; to allow frictionless commits/pushes, set
398
403
  `"git commit*"` / `"git push*"` to `"allow"` in your own `permission.bash` map. (Note:
399
404
  OpenCode lets a user pick "always allow" for the session, which makes the gate
@@ -521,7 +526,8 @@ install `jsonc-parser` yourself — you lose OCX's dependency management and
521
526
  auto-updates, and you own the upgrade-by-re-copy. Prefer the OCX path.
522
527
 
523
528
  **Consent note.** `worktree_delete` auto-commits before removal. The harness's
524
- consent-before-commit Rule is enforced for *shell* `git commit` via `opencode.json`
529
+ consent-before-commit rule (**Doctrine process 5**, when the `process` pack is built in)
530
+ is enforced for *shell* `git commit` via `opencode.json`
525
531
  permissions, but this plugin commits through its own tool path — so review what it
526
532
  will commit before invoking delete, or keep the worktree and commit yourself.
527
533
 
@@ -21,5 +21,5 @@ yourself: decompose into independent subtasks, route each to the single owning s
21
21
  above, and converge the results yourself. Prefer the saved `dispatch` workflow when the
22
22
  `workflow` tool is available; otherwise follow the parallel-agents Skill. Every handoff
23
23
  carries an envelope — the subtask goal, the inputs the agent needs, its output contract —
24
- and the constraints travel with it: subagents never commit or push (Law XX stays with
24
+ and the constraints travel with it: subagents never commit or push (Doctrine process 5 stays
25
25
  you), and an unfulfilled contract comes back as a stated gap, never invented content.
@@ -1,6 +1,6 @@
1
1
  // Geneseed — OpenCode project-context plugin (v2, convention-glob).
2
2
  //
3
- // Enforces Law XVIII ("Load the Project Context") by INJECTION, not instruction:
3
+ // Enforces the project-context rule ("Load the Project Context") by INJECTION, not instruction:
4
4
  // on `session.created` it puts the repo's documentation in context before your
5
5
  // first turn, rather than trusting the agent to read it. v2 removes the need for a
6
6
  // committed `context.json` — it AUTO-DISCOVERS the current repo's docs by
@@ -26,7 +26,7 @@
26
26
  // $GENESEED_MODEL), so the agent reasons within its real limits. The model line
27
27
  // is added per request, outside the cached block; unknown -> omitted.
28
28
  //
29
- // MACHINE WIKI (AGENT.md §7): the same block also carries the user's own knowledge
29
+ // MACHINE WIKI (AGENT.md §8): the same block also carries the user's own knowledge
30
30
  // base(s) — typically an Obsidian vault — declared once per machine in `wiki.jsonc`
31
31
  // ($GENESEED_WIKI -> $GENESEED_HARNESS/wiki.jsonc -> beside this plugin's install).
32
32
  // Each wiki's eager entries inject in full and lazy entries list, drawing on the
@@ -484,7 +484,7 @@ async function resolveSource(root) {
484
484
 
485
485
  // ---- machine wiki (wiki.jsonc) --------------------------------------------------
486
486
  // The user's own knowledge base(s) — typically an Obsidian vault — declared once per
487
- // machine, not per repo (AGENT.md §7). Same injection mechanics as project context,
487
+ // machine, not per repo (AGENT.md §8). Same injection mechanics as project context,
488
488
  // different scope. Resolution (first match wins, mirroring the learn plugin):
489
489
  // 1. $GENESEED_WIKI explicit manifest path
490
490
  // 2. $GENESEED_HARNESS/wiki.jsonc pinned install dir
@@ -675,8 +675,8 @@ async function buildBlock(sets, wikis = [], commands = []) {
675
675
 
676
676
  if (!proj.length && !wik.length) return null
677
677
  const out = [MARKER]
678
- if (proj.length) out.push("=== PROJECT CONTEXT — binding for this repo per Law XVIII ===", "", ...proj)
679
- if (wik.length) out.push("=== MACHINE WIKI — the user's knowledge base, binding per AGENT.md §7 ===", "", ...wik)
678
+ if (proj.length) out.push("=== PROJECT CONTEXT — binding for this repo ===", "", ...proj)
679
+ if (wik.length) out.push("=== MACHINE WIKI — the user's knowledge base, binding per AGENT.md §8 ===", "", ...wik)
680
680
  return { text: out.join("\n"), injected: state.injected, lazy: state.lazy, kb: kb(state.spent) }
681
681
  }
682
682
 
@@ -820,8 +820,8 @@ export const GeneseedContext = async (ctx) => {
820
820
  // Survive compaction. The visible injection above is a conversation message, so
821
821
  // OpenCode summarises it away when a long session compacts (the AGENT.md rules
822
822
  // persist — they load via opencode.json `instructions`, not the conversation).
823
- // Re-push the eager docs into the compaction context so the project context —
824
- // Law XVIII — outlives the summary. Only needed when delivery is visible
823
+ // Re-push the eager docs into the compaction context so the project context
824
+ // outlives the summary. Only needed when delivery is visible
825
825
  // (forced or fallback); the transform re-sends per request. Experimental
826
826
  // OpenCode hook; if it is absent in a build this key is simply never called.
827
827
  "experimental.session.compacting": async (_input, output) => {
@@ -4,9 +4,9 @@
4
4
  // "enforce by injection, don't just instruct" stance as the context plugin:
5
5
  // - Law I (Sealed Secrets): block writes to private-key / credential files.
6
6
  // - Law IV (Deletion Is Deliberate): block catastrophic shell commands.
7
- // - Law VI (rule vs memory): speed-bump the first write to user-rules.md or a
7
+ // - Doctrine process 1 (rule vs memory): speed-bump the first write to user-rules.md
8
8
  // memory file — that choice belongs to the user, via the rule skill.
9
- // - Wiki (AGENT.md §7): block mutations under a declared wiki's `protected`
9
+ // - Wiki (AGENT.md §8): block mutations under a declared wiki's `protected`
10
10
  // folders — the user's knowledge base sets its own no-go zones in wiki.jsonc.
11
11
  // High-confidence patterns only, so legitimate work is never caught. Borderline cases
12
12
  // (.env edits, force-push) are WARNED, not blocked.
@@ -114,7 +114,7 @@ const WRITE_TOOLS = ["write", "edit", "patch", "create", "save", "insert", "repl
114
114
  const SHELL_TOOLS = ["bash", "shell", "exec", "command", "terminal", "run"]
115
115
  const hasAny = (name, parts) => parts.some((s) => name.includes(s))
116
116
 
117
- // ---- protected wiki folders (AGENT.md §7) --------------------------------------
117
+ // ---- protected wiki folders (AGENT.md §8) --------------------------------------
118
118
  // wiki.jsonc (the machine-level knowledge-base manifest) may list `protected` folders
119
119
  // per wiki. Mutating anything under one is denied. Same resolution chain as the
120
120
  // context plugin: $GENESEED_WIKI -> $GENESEED_HARNESS/wiki.jsonc -> beside the install.
@@ -207,7 +207,7 @@ async function protectedPrefixes() {
207
207
  return prefixes
208
208
  }
209
209
 
210
- // ---- the rule / memory stores (Law VI) -----------------------------------------
210
+ // ---- the rule / memory stores (Doctrine process 1) -----------------------------
211
211
  // Whether something the user wants kept is a standing rule or a durable fact is THEIR
212
212
  // call, settled through the rule skill. `tool.execute.before` can only allow or throw —
213
213
  // it has no "ask the user" tier like the Claude/Bob rule-gate hook —
@@ -257,7 +257,7 @@ export const GeneseedGuard = async () => {
257
257
  if (store && !RULE_STORE_BUMPED.has(p)) {
258
258
  RULE_STORE_BUMPED.add(p)
259
259
  deny(`writing to ${store} — a standing rule, or a fact to remember? That ` +
260
- `choice is the user's (Law VI). Settle it through the rule skill, ` +
260
+ `choice is the user's (Doctrine process 1). Settle it through the rule skill, ` +
261
261
  `then re-issue this write`)
262
262
  return
263
263
  }
@@ -268,7 +268,7 @@ export const GeneseedGuard = async () => {
268
268
  const abs = (path.isAbsolute(p) ? p : path.resolve(p)).replace(/\\/g, "/").toLowerCase()
269
269
  const hit = (await protectedPrefixes()).find(
270
270
  (x) => abs.startsWith(x.prefix) || abs === x.prefix.slice(0, -1))
271
- if (hit) { deny(`mutation in protected wiki folder — ${hit.label} (AGENT.md §7)`); return }
271
+ if (hit) { deny(`mutation in protected wiki folder — ${hit.label} (AGENT.md §8)`); return }
272
272
  }
273
273
  }
274
274
  // NOT else-if: a compound tool name (e.g. exec_and_save) can match both
@@ -3,7 +3,7 @@
3
3
  //
4
4
  // The model-driven fallback is the parallel-agents skill; this runs the same
5
5
  // shape on rails: the script, not the model, enforces routing and the handoff
6
- // envelope (context in, output contract back, no commits — Law XX stays with
6
+ // envelope (context in, output contract back, no commits — Doctrine process 5 stays with
7
7
  // the caller).
8
8
  //
9
9
  // args: { goal: string, context?: string, agents?: string[] }