geneseed 3.10.0 → 3.12.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 (227) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/DESIGN.md +1 -1
  3. package/README.md +27 -45
  4. package/SHIPPED.md +2 -2
  5. package/adapters/bob/README.md +1 -1
  6. package/adapters/claude-code/README.md +17 -12
  7. package/adapters/openclaude/README.md +1 -1
  8. package/adapters/opencode/README.md +4 -4
  9. package/adapters/opencode/plugins/geneseed-guard.js +157 -2
  10. package/bin/build-driver.mjs +2 -0
  11. package/bin/geneseed-cli.mjs +21 -0
  12. package/bin/geneseed-hook.mjs +2 -0
  13. package/docs/README.md +42 -0
  14. package/docs/_groups.json +18 -0
  15. package/docs/concepts/agents.md +44 -0
  16. package/docs/concepts/collaboration.md +62 -0
  17. package/docs/concepts/exclusions.md +55 -0
  18. package/docs/concepts/footprint.md +52 -0
  19. package/docs/concepts/foreman-mode.md +69 -0
  20. package/docs/concepts/hooks.md +101 -0
  21. package/docs/concepts/hosts.md +55 -0
  22. package/docs/concepts/loops.md +165 -0
  23. package/docs/concepts/lsp.md +50 -0
  24. package/docs/{web → concepts}/memory.md +2 -2
  25. package/docs/{web → concepts}/notebook.md +2 -2
  26. package/docs/concepts/rules.md +52 -0
  27. package/docs/concepts/skills.md +49 -0
  28. package/docs/concepts/themes.md +50 -0
  29. package/docs/extending.md +32 -21
  30. package/docs/guides/autostart.md +70 -0
  31. package/docs/guides/choose-your-setup.md +134 -0
  32. package/docs/guides/headless.md +22 -0
  33. package/docs/guides/install.md +161 -0
  34. package/docs/guides/mcp.md +195 -0
  35. package/docs/guides/migrate.md +41 -0
  36. package/docs/guides/project-context.md +87 -0
  37. package/docs/guides/run-anywhere.md +45 -0
  38. package/docs/guides/uninstall.md +51 -0
  39. package/docs/guides/upgrade.md +65 -0
  40. package/docs/guides/verify.md +65 -0
  41. package/docs/guides/wiki.md +69 -0
  42. package/docs/guides/worktree.md +47 -0
  43. package/docs/reference/about.md +7 -0
  44. package/docs/reference/cli.md +7 -0
  45. package/docs/reference/environment.md +99 -0
  46. package/docs/reference/glossary.md +37 -0
  47. package/docs/reference/opencode-plugins.md +133 -0
  48. package/docs/reference/troubleshooting.md +350 -0
  49. package/docs/understand/a-day.md +77 -0
  50. package/docs/understand/enforced-vs-asked.md +64 -0
  51. package/docs/understand/harness.md +36 -0
  52. package/docs/understand/on-your-machine.md +76 -0
  53. package/docs/web-ui.md +13 -2
  54. package/harness.config.json +1 -1
  55. package/js/README.md +27 -4
  56. package/js/build/driver.mjs +14 -8
  57. package/js/build/generate.mjs +22 -7
  58. package/js/build/render.mjs +5 -0
  59. package/js/build/source.mjs +11 -1
  60. package/js/cli-table.json +236 -1
  61. package/js/hosts/gitref.mjs +99 -0
  62. package/js/hosts/hooks.mjs +88 -1
  63. package/js/hosts/installs.mjs +21 -0
  64. package/js/hosts/mcp.mjs +1 -1
  65. package/js/hosts/settings.mjs +13 -1
  66. package/js/inspect/checks-authoring.mjs +15 -3
  67. package/js/inspect/diff.mjs +3 -0
  68. package/js/inspect/doctor.mjs +3 -2
  69. package/js/inspect/inventory.mjs +2 -1
  70. package/js/inspect/registry.mjs +20 -3
  71. package/js/inspect/status.mjs +8 -3
  72. package/js/lib/node-floor.mjs +30 -0
  73. package/js/loop/catalog.mjs +116 -0
  74. package/js/loop/cli.mjs +151 -0
  75. package/js/loop/graph.mjs +145 -0
  76. package/js/loop/score.mjs +143 -0
  77. package/js/loop/state.mjs +322 -0
  78. package/js/maintain/migrate.mjs +4 -2
  79. package/js/maintain/setup.mjs +109 -21
  80. package/js/maintain/update.mjs +4 -15
  81. package/js/ui/cli.mjs +2 -2
  82. package/js/web/actions.mjs +9 -3
  83. package/js/web/api.mjs +41 -2
  84. package/js/web/daemon.mjs +94 -4
  85. package/js/web/docs.mjs +149 -65
  86. package/js/web/handler.mjs +1 -0
  87. package/js/web/jobs.mjs +3 -1
  88. package/js/web/server.mjs +10 -5
  89. package/package.json +6 -4
  90. package/registry.json +21 -0
  91. package/src/AGENT.md.tmpl +6 -0
  92. package/src/bricks/README.md +32 -0
  93. package/src/bricks/_template.md +32 -0
  94. package/src/bricks/apply.md +17 -0
  95. package/src/bricks/baseline-green.md +17 -0
  96. package/src/bricks/bruno-test.md +16 -0
  97. package/src/bricks/ci-fix.md +17 -0
  98. package/src/bricks/deps-audit.md +14 -0
  99. package/src/bricks/docs-update.md +15 -0
  100. package/src/bricks/identify.md +20 -0
  101. package/src/bricks/lint.md +14 -0
  102. package/src/bricks/plan.md +17 -0
  103. package/src/bricks/reproduce.md +16 -0
  104. package/src/bricks/review.md +17 -0
  105. package/src/bricks/security-scan.md +17 -0
  106. package/src/bricks/test.md +14 -0
  107. package/src/doctrines/process.md +11 -8
  108. package/src/loops/bugfix.json +22 -0
  109. package/src/loops/feature.json +21 -0
  110. package/src/loops/refactor.json +20 -0
  111. package/src/postures/mentor.md +1 -0
  112. package/src/skills/brick-forge.md +46 -0
  113. package/src/skills/geneseed.md +1 -1
  114. package/src/skills/learn-mode.md +89 -0
  115. package/src/skills/loop.md +99 -0
  116. package/src/skills/pipeline.md +2 -2
  117. package/src/skills/quiz.md +2 -1
  118. package/src/skills/teach.md +2 -1
  119. package/themes/_TEMPLATE.json +3 -0
  120. package/themes/biker.json +3 -0
  121. package/themes/commentator.json +3 -0
  122. package/themes/cyberpunk.json +3 -0
  123. package/themes/gamer.json +3 -0
  124. package/themes/imperial.json +3 -0
  125. package/themes/joker.json +3 -0
  126. package/themes/marvin.json +3 -0
  127. package/themes/mean.json +3 -0
  128. package/themes/military.json +3 -0
  129. package/themes/neutral.json +3 -0
  130. package/themes/pirate.json +3 -0
  131. package/themes/sports.json +3 -0
  132. package/themes/verstappen.json +3 -0
  133. package/themes/wizard.json +3 -0
  134. package/web/dist/assets/Activity-GaaZWXTY.js +1 -0
  135. package/web/dist/assets/ActivityDetail-4t7d45Du.js +1 -0
  136. package/web/dist/assets/Dashboard-CYn7Tp16.js +2 -0
  137. package/web/dist/assets/Docs-BeFKLg2T.js +5 -0
  138. package/web/dist/assets/{GreenhouseView-D0cbCJ5m.js → GreenhouseView-C6ibc8IE.js} +1 -1
  139. package/web/dist/assets/Installs-DRYjYnxs.js +2 -0
  140. package/web/dist/assets/JournalView-1HbU1mfg.js +1 -0
  141. package/web/dist/assets/Laws-DFoG8JWB.js +3 -0
  142. package/web/dist/assets/Library-DDjgNwz_.js +1 -0
  143. package/web/dist/assets/Loops-D9VEoO0F.js +1 -0
  144. package/web/dist/assets/{Markdown-CkFyfgNf.js → Markdown-qjM2_ofS.js} +5 -5
  145. package/web/dist/assets/{OperatorHudView-CiAkAkQL.js → OperatorHudView-Bs7paWmh.js} +1 -1
  146. package/web/dist/assets/Personal-BY5n4gTw.js +1 -0
  147. package/web/dist/assets/Tabs-ho-EYD8i.js +1 -0
  148. package/web/dist/assets/api-CyMRbU2x.js +1 -0
  149. package/web/dist/assets/drawable-CLS9drMb.js +1 -0
  150. package/web/dist/assets/index-CX_hXMi5.css +1 -0
  151. package/web/dist/assets/index-Cjr7XCA3.js +2 -0
  152. package/web/dist/index.html +3 -2
  153. package/QUICKSTART.md +0 -50
  154. package/SETUP.md +0 -1148
  155. package/docs/web/_groups.json +0 -45
  156. package/docs/web/about.md +0 -6
  157. package/docs/web/adapters-claude-code.md +0 -8
  158. package/docs/web/adapters-opencode-loads.md +0 -8
  159. package/docs/web/adapters-opencode-spec.md +0 -8
  160. package/docs/web/adapters-opencode.md +0 -8
  161. package/docs/web/agents.md +0 -8
  162. package/docs/web/authoring.md +0 -11
  163. package/docs/web/autostart.md +0 -9
  164. package/docs/web/claude-hooks.md +0 -37
  165. package/docs/web/cli.md +0 -6
  166. package/docs/web/collaboration.md +0 -27
  167. package/docs/web/configure-wiki.md +0 -9
  168. package/docs/web/design.md +0 -7
  169. package/docs/web/env-knobs.md +0 -9
  170. package/docs/web/exclusions.md +0 -26
  171. package/docs/web/first-session.md +0 -28
  172. package/docs/web/footprint.md +0 -38
  173. package/docs/web/foreman-mode.md +0 -33
  174. package/docs/web/glossary.md +0 -6
  175. package/docs/web/harnesses.md +0 -30
  176. package/docs/web/headless.md +0 -9
  177. package/docs/web/ingest-docs.md +0 -9
  178. package/docs/web/install-paths.md +0 -9
  179. package/docs/web/install-quick.md +0 -35
  180. package/docs/web/lsp-overview.md +0 -37
  181. package/docs/web/mcp-claude-code.md +0 -10
  182. package/docs/web/mcp-filesystem.md +0 -9
  183. package/docs/web/mcp-gitlab.md +0 -9
  184. package/docs/web/mcp-markitdown.md +0 -9
  185. package/docs/web/mcp-overview.md +0 -34
  186. package/docs/web/mcp-trouble.md +0 -9
  187. package/docs/web/mcp-verify.md +0 -9
  188. package/docs/web/migrate.md +0 -39
  189. package/docs/web/model.md +0 -20
  190. package/docs/web/pipelines.md +0 -24
  191. package/docs/web/plugin-activity.md +0 -23
  192. package/docs/web/plugin-context.md +0 -26
  193. package/docs/web/plugin-guard.md +0 -24
  194. package/docs/web/plugin-learn.md +0 -27
  195. package/docs/web/plugin-notify.md +0 -24
  196. package/docs/web/plugin-ponytail.md +0 -23
  197. package/docs/web/plugin-setup.md +0 -7
  198. package/docs/web/plugin-workflow.md +0 -25
  199. package/docs/web/plugins.md +0 -17
  200. package/docs/web/project-context.md +0 -9
  201. package/docs/web/rules.md +0 -30
  202. package/docs/web/run-anywhere.md +0 -9
  203. package/docs/web/self-improve.md +0 -8
  204. package/docs/web/setup-choices.md +0 -64
  205. package/docs/web/skills.md +0 -8
  206. package/docs/web/themes-author.md +0 -20
  207. package/docs/web/themes.md +0 -9
  208. package/docs/web/token-footprint.md +0 -7
  209. package/docs/web/trouble.md +0 -38
  210. package/docs/web/upgrade.md +0 -9
  211. package/docs/web/verify.md +0 -30
  212. package/docs/web/wiki.md +0 -7
  213. package/docs/web/worktree.md +0 -10
  214. package/docs/wiki.md +0 -43
  215. package/web/dist/assets/Activity-BjVp522q.js +0 -1
  216. package/web/dist/assets/ActivityDetail-8ep1bspW.js +0 -1
  217. package/web/dist/assets/Dashboard-OkC_PCH6.js +0 -2
  218. package/web/dist/assets/Docs-CKPWz00o.js +0 -2
  219. package/web/dist/assets/Installs-BtGGdoTt.js +0 -2
  220. package/web/dist/assets/JournalView-Ckl4dmzR.js +0 -1
  221. package/web/dist/assets/Laws-CLpdRRk8.js +0 -3
  222. package/web/dist/assets/Library-wPPuKQrI.js +0 -1
  223. package/web/dist/assets/Personal-D8CnDo9v.js +0 -1
  224. package/web/dist/assets/Tabs-B4HNrrCs.js +0 -1
  225. package/web/dist/assets/drawable-BiwaOo6x.js +0 -1
  226. package/web/dist/assets/index-C1yil5j1.js +0 -2
  227. package/web/dist/assets/index-CDPDk2vj.css +0 -1
@@ -0,0 +1,134 @@
1
+ ---
2
+ group: guides
3
+ order: 2
4
+ title: "Choose your setup"
5
+ kind: "concept"
6
+ ---
7
+ The setup wizard asks a handful of questions before it builds. Every one has a safe default, so you can accept them all and move on. This page says what each one changes, so you can pick on purpose, and how to change it later.
8
+
9
+ All of these choices are made **at build time**. The build writes them into the files your agent loads. Nothing switches at runtime. Rebuilds, re-themes and upgrades keep each install's choices, because they are recorded in small marker files beside the install.
10
+
11
+ > **You already know this:** these are compiler flags. You set them once, the output is built from them, and changing one means rebuilding rather than editing the output by hand.
12
+
13
+ ## Theme: the voice
14
+
15
+ A theme changes how the harness *sounds*: the banner, the readiness sigil the agent opens with, and the vocabulary of its prose. It never changes which rules apply or which files ship. The wizard previews each theme live as you move through the list.
16
+
17
+ `neutral` is plain English. The others are `imperial`, `military`, `pirate`, `wizard`, `cyberpunk`, `gamer`, `sports`, `biker`, `commentator`, `joker`, `marvin`, `mean` and `verstappen`.
18
+
19
+ ```
20
+ geneseed build --emit opencode-global --theme imperial
21
+ ```
22
+
23
+ More in [Themes](../concepts/themes.md).
24
+
25
+ ## Posture: how the agent works with you
26
+
27
+ Posture is the relationship register, fixed at build time so it does not drift mid-session:
28
+
29
+ - **peer** *(default)*: a candid equal. Dense, challenges you, no flattery.
30
+ - **mentor**: explains the why and checks your understanding.
31
+ - **expert**: maximum density, no basics.
32
+ - **assistant**: precise execution, low initiative. You steer.
33
+ - **artisan**: a peer with toolsmith reflexes, terminal-first.
34
+
35
+ ```
36
+ geneseed build --emit opencode-global --posture mentor
37
+ ```
38
+
39
+ Pick **peer** unless you know you want another register. A theme changes the prose, while a posture changes the relationship. See [Collaboration](../concepts/collaboration.md).
40
+
41
+ ## Mode: who does the work
42
+
43
+ - **direct** *(default)*: the agent works every task itself, turn by turn.
44
+ - **foreman**: the session sorts each incoming task. A trivial task gets a direct answer. A substantial task goes to a small crew of agents (a **pipeline**) running in its own git worktree, while the session keeps answering you.
45
+
46
+ A pipeline never commits or merges. It hands back its worktree uncommitted, together with its test and lint output. The session then re-runs those commands itself, shows you the diff and the passing output, and commits and merges only after you accept. Foreman mode costs more per substantial task, because several agents run instead of one. In exchange, the session stays responsive.
47
+
48
+ ```
49
+ geneseed build --emit opencode-global --mode foreman
50
+ geneseed build --emit opencode-global --mode direct # back to the default
51
+ ```
52
+
53
+ More in [Foreman mode](../concepts/foreman-mode.md).
54
+
55
+ ## Loop trust: how far a loop goes before it asks
56
+
57
+ The `loop` skill scores every change it validates and stops to ask once the score passes a threshold. `--trust` sets the preset the skill starts a loop with; the user can still name another one per loop.
58
+
59
+ - **prudent**: asks early, on anything past a rename.
60
+ - **balanced** *(default)*: logic changes and new files pass with a note; API changes and deletions stop.
61
+ - **aggressive**: only an architecture-level change stops the loop.
62
+
63
+ The preset lives in the `loop` skill only, so it costs nothing in the always-on instructions.
64
+
65
+ ```
66
+ geneseed build --emit opencode-global --trust prudent
67
+ ```
68
+
69
+ ## Doctrine packs: which practices bind
70
+
71
+ The harness's rules come in tiers (see [Rules](../concepts/rules.md)). The Ethos and the Rules are always on. The **doctrines** are practices rather than principles, and they ship as packs you choose:
72
+
73
+ | Pack | What it governs |
74
+ | --- | --- |
75
+ | **craft** | how code is written: reuse first, house conventions, docs updated in the same change, the smallest diff |
76
+ | **rigor** | how work is proven: idempotence, honest tests, cover-and-verify, gates that can actually fail |
77
+ | **ops** | how the machine is driven: tool discovery, commands that return, complete teardowns |
78
+ | **process** | how a session runs: planning, context economy, docs first, bounded loops, and consent before every commit and push |
79
+ | **comms** | how answers are presented: stable reference codes on tracked items, and a diagram or table only where it earns its place |
80
+
81
+ Every pack is enabled by default. To keep only some packs, or none:
82
+
83
+ ```
84
+ geneseed build --emit opencode-global --doctrines craft,rigor # two packs
85
+ geneseed build --emit opencode-global --doctrines none # Ethos and Rules only
86
+ ```
87
+
88
+ The packs always load in the same order (craft, rigor, ops, process, comms), whatever order you type them in. A pack you leave out still ships on disk under `doctrines/`, so you can read it before you turn it on. A clone can set its own default in `harness.config.json` with a `doctrines` array.
89
+
90
+ **Dropping `process` changes what the machine does, not only what the agent reads.** The *Consent Before Push* rule in that pack is enforced at the tool boundary as well as in the prose:
91
+
92
+ - On Claude Code and OpenClaude, the git hook stays wired but stops asking before a commit or push.
93
+ - On OpenCode, a fresh install no longer gets the `git commit*` and `git push*` ask entries in `opencode.json`. On an existing install, entries that are already there are left in place and reported, because Geneseed cannot tell its own entries from ones you typed.
94
+
95
+ The refusals of destructive git and `rm -rf` belong to the always-on Rules, not to the pack, so they stay in every build. See [Enforced vs. asked](../understand/enforced-vs-asked.md).
96
+
97
+ ## One rule at a time
98
+
99
+ A pack is all-or-nothing. `--exclude-rules` drops single doctrine rules instead. It takes rule addresses, written `<pack> <n>` or `<pack>.<n>`:
100
+
101
+ ```
102
+ geneseed build --emit opencode-global --exclude-rules "process 7"
103
+ geneseed build --emit opencode-global --exclude-rules "process 5,craft 2"
104
+ geneseed build --emit opencode-global --exclude-rules none
105
+ ```
106
+
107
+ The number in an address is the rule's position in its pack, so it can change if a rule is added or removed. To see the current addresses, pass an address that does not exist: the build refuses it and lists every valid address. The web console's **Constitution** page has one switch per rule. You stage the changes there and apply them in a single rebuild.
108
+
109
+ Excluding *Consent Before Push* (`process 5` today) takes the commit and push consent gate with it, exactly as dropping the whole `process` pack does. The console and the wizard both warn you before applying it. A pack whose every rule is excluded drops out of the build entirely. See [Exclusions](../concepts/exclusions.md) for excluding whole folders instead.
110
+
111
+ ## Footprint: how much loads every turn
112
+
113
+ Footprint controls how much of the rules text sits inside `AGENT.md`, which is loaded on every turn. It changes the token cost, not which rules apply:
114
+
115
+ - **lean** *(default)*: each rule appears in a hand-written short form, with a pointer to the full text. The full text ships beside `AGENT.md`, and the agent reads it when a rule's nuance matters.
116
+ - **full**: every rule's complete text and rationale is inline. This costs the most tokens. It can help a smaller model, which applies a rule's nuance more reliably when the reasoning is always in front of it.
117
+
118
+ ```
119
+ geneseed build --emit opencode-global --footprint full
120
+ ```
121
+
122
+ Both footprints install the same agents, skills, hooks and plugins. More in [Footprint](../concepts/footprint.md).
123
+
124
+ ## Changing a choice later
125
+
126
+ You have three ways to change a choice:
127
+
128
+ - **Re-run the wizard** with `geneseed setup`. It pre-selects what the install already has, so holding Enter cannot widen a set you narrowed on purpose. The wizard does not ask about single rules, but it keeps any rule exclusions already in place.
129
+ - **Use the web console** (`geneseed web`). **Settings** and the **Harnesses** page change theme, footprint and the rest per install. **Constitution** toggles packs and rules.
130
+ - **Run the build yourself.** Watch out: a flag you leave out takes the *generator's* default, not your install's current value. `geneseed status --json` prints, for every install, the exact `geneseed build` command that rebuilds it as it is. Start from that command and change the one flag you want.
131
+
132
+ ---
133
+
134
+ **Next:** [Verify it works](verify.md)
@@ -0,0 +1,22 @@
1
+ ---
2
+ group: guides
3
+ order: 11
4
+ title: "Run in CI / headless"
5
+ kind: "concept"
6
+ harness: "opencode"
7
+ ---
8
+ Once the harness is installed for OpenCode (global or per repo), OpenCode can run **non-interactively**, without its terminal UI. The harness's rules, agents and skills then apply in scripts and pipelines too:
9
+
10
+ ```
11
+ opencode run "review the staged diff and list any correctness bugs" # one shot, prints to stdout
12
+ opencode run -m anthropic/claude-sonnet-4-5 "…" # pin a model for this run
13
+ cat issue.md | opencode run "triage this and propose a fix plan" # pipe input in
14
+ ```
15
+
16
+ `opencode run` loads the same `opencode.json` (its `instructions` pointing at `AGENT.md`, its permission rules, any per-agent overrides) and the same agents, skills and plugins as an interactive session. Geneseed writes nothing extra for this. It is ordinary OpenCode usage.
17
+
18
+ ## Things to know
19
+
20
+ - **Permission prompts still apply, and in CI nobody can answer them.** Any command the config marks `ask` blocks a non-interactive run: `rm -rf`, and `git commit` and `git push` whenever the *Consent Before Push* rule is built in (it is part of the `process` pack; see [Choose your setup](choose-your-setup.md)). A CI job that has to commit should set those commands back to `"allow"` in its own `permission.bash` map, or limit the run to read-only work. Do not disable the guards wholesale.
21
+ - **`--pure`** runs OpenCode without any local or global config. Use it to reproduce a bug without the harness in the way, or to confirm that a behaviour comes from the harness.
22
+ - **The plugins still load.** The context plugin injects the repo's docs, and the learn plugin still writes memory when the session goes idle. To change their behaviour for a run, set `GENESEED_GUARD=warn` or `off`, `GENESEED_CONTEXT_INJECT=off`, or `GENESEED_DEBUG=1`. See [Environment](../reference/environment.md) and [OpenCode plugins](../reference/opencode-plugins.md).
@@ -0,0 +1,161 @@
1
+ ---
2
+ group: guides
3
+ order: 1
4
+ title: "Install"
5
+ kind: "concept"
6
+ ---
7
+ Geneseed builds a harness (the rules, agents, skills and hooks your AI coding tool loads; see [What a harness is](../understand/harness.md)) and installs it into the tool you already use. Most people need one command.
8
+
9
+ ## The 5-minute path
10
+
11
+ The only prerequisite is **Node 22.3 or newer**.
12
+
13
+ ```
14
+ npx geneseed setup
15
+ ```
16
+
17
+ The command is the same on macOS, Linux and Windows (cmd, PowerShell or any POSIX shell). The setup wizard lists the AI coding tools it found on your `PATH`, then asks for a theme, a posture, a mode, the doctrine packs, an install mode and a footprint. Each one has a safe default, so you can hold Enter through all of them. [Choose your setup](choose-your-setup.md) explains each question. **OpenCode global** is the recommended install mode: you install once and every repo inherits it, with nothing committed into your projects. The wizard then builds the harness and ends with a short summary: the root file your tool loads and where it was written, the hooks it wired (Claude Code, Bob and OpenClaude), whether memory learning is on, which tool to restart, and a link to what was installed. It then offers to run a health check.
18
+
19
+ To keep the command on your machine:
20
+
21
+ ```
22
+ npm install -g geneseed
23
+ ```
24
+
25
+ This puts three commands on your `PATH`: `geneseed` (the CLI you type), `geneseed-build` (the generator) and `geneseed-hook` (what the host tool calls on every tool use, which you never type yourself).
26
+
27
+ Next: [Verify it works](verify.md). To see what the install just wrote, read [What lands on your machine](../understand/on-your-machine.md).
28
+
29
+ ## From a clone
30
+
31
+ Clone the repository when npm is out of reach (for example, a corporate network with no registry access), or when you want to change the harness rather than just use it. A clone needs **git** as well as Node 22.3 or newer. git is what updates the clone.
32
+
33
+ Each OS has a one-step installer at the root of the clone. It checks for Node and git. If one is missing, it names what to install and where to get it, then stops. **It never installs anything itself.** When the checks pass, it runs the setup wizard and offers to open the web console.
34
+
35
+ ```bash
36
+ git clone https://github.com/Arylmera/Geneseed.git
37
+ cd Geneseed
38
+ ./install # macOS, Linux, or a POSIX shell on Windows
39
+ ```
40
+
41
+ - **macOS**: you can also double-click `install.command` in the Finder. It opens in Terminal.
42
+ - **Windows**: double-click `install.cmd` in Explorer, or run it from cmd or PowerShell. It needs no bash, WSL or PowerShell script.
43
+
44
+ ```powershell
45
+ git clone https://github.com/Arylmera/Geneseed.git
46
+ cd Geneseed
47
+ .\install.cmd
48
+ ```
49
+
50
+ Later, run the launcher in the clone: `./geneseed setup` (Windows: `.\geneseed.cmd setup`) re-runs the wizard, and bare `./geneseed` opens the web console. Both launchers need `node` on `PATH`. If it is not there (some version managers only patch interactive shells), set `GENESEED_NODE` to the absolute path of the Node binary.
51
+
52
+ From a clone, every `geneseed …` command on these pages is `./geneseed …` (Windows: `.\geneseed.cmd …`). To drop the `./`, see [Run geneseed from anywhere](run-anywhere.md).
53
+
54
+ ## Prerequisites
55
+
56
+ - **Node 22.3 or newer.** This is the only hard requirement. Geneseed has zero runtime dependencies, and nothing it installs needs a second interpreter.
57
+ - **Your agent tool**: OpenCode (recommended), Claude Code, IBM Bob, OpenClaude, or any tool that reads a root instructions file.
58
+ - **git**, for a clone only. A clone updates itself with `git pull`.
59
+ - *Optional:* a document converter (MarkItDown, Pandoc or Docling) if you want the agent to read PDFs and Office files. See [MCP servers](mcp.md#reading-non-markdown-docs).
60
+
61
+ ## Without the wizard
62
+
63
+ `setup` needs an interactive terminal. In a script, a CI job, or any shell without one, it stops with exit code 1 and prints the build command to run instead:
64
+
65
+ ```
66
+ geneseed build --emit opencode-global --theme neutral
67
+ ```
68
+
69
+ `geneseed build` takes the same flags as the generator `geneseed-build`. `--emit` picks the host and its scope: `files`, `opencode`, `opencode-global`, `claude`, `claude-global`, `bob`, `bob-global`, `openclaude` or `openclaude-global`. A `-global` emit writes into the tool's own config directory. A project emit writes into the repo you name with `--out <repo> --root <repo>`. All the other flags (`--theme`, `--footprint`, `--posture`, `--mode`, `--trust`, `--doctrines`, `--exclude-rules`) are covered in [Choose your setup](choose-your-setup.md).
70
+
71
+ To test a build before writing anything, use `geneseed validate` with the same flags. See [Verify](verify.md).
72
+
73
+ ## Install paths, one per host
74
+
75
+ The wizard runs one of these for you. Use them directly when you script an install, or when you want a scope the wizard did not offer you.
76
+
77
+ ### OpenCode, global (recommended)
78
+
79
+ ```
80
+ geneseed build --emit opencode-global
81
+ ```
82
+
83
+ This writes into OpenCode's config directory: `$OPENCODE_CONFIG_DIR`, else `$XDG_CONFIG_HOME/opencode`, else `~/.config/opencode` (on Windows too: `C:\Users\<you>\.config\opencode`). The install contains `AGENT.md`, `agents/`, `skills/`, the plugins, the `memory/` store, and a merged `opencode.json` whose `instructions` key points at `AGENT.md`. Every repo you open in OpenCode inherits it. You do not need a per-repo file, because the context plugin finds each repo's docs by itself (see [Project context](project-context.md)).
84
+
85
+ The install is non-destructive. A manifest (`.geneseed-manifest.json`) records the files Geneseed owns. A rebuild replaces and prunes only those files, and never touches your own agents, skills, plugins or memory.
86
+
87
+ ### OpenCode, per repo
88
+
89
+ ```
90
+ geneseed build --emit opencode --out /path/to/repo --root /path/to/repo
91
+ ```
92
+
93
+ This writes the bundle (`AGENT.md`, `agents/`, `skills/`, `memory/`, `notebook/`) and OpenCode's own layer (`opencode.json` and `.opencode/`) into one repository. You can commit them or not. To keep the bundle in a subfolder, point `--out` at the subfolder and keep `--root` on the repo, so instruction paths resolve from the project root:
94
+
95
+ ```
96
+ geneseed build --emit opencode --out /path/to/repo/Harness --root /path/to/repo
97
+ ```
98
+
99
+ ### Claude Code
100
+
101
+ ```
102
+ geneseed build --emit claude-global # ~/.claude, every repo
103
+ geneseed build --emit claude --out /path/to/repo --root /path/to/repo # one repo
104
+ ```
105
+
106
+ The install writes `CLAUDE.md`, `agents/`, `skills/`, `memory/` and `notebook/`, plus hooks in Claude Code's `settings.json`. Hooks are commands Claude Code runs around each tool call. They gate risky actions and load project context (see [Hooks](../concepts/hooks.md)). For a project install the hooks go into `.claude/settings.local.json`, which stays out of git because it names a path on your machine.
107
+
108
+ Every hook calls `geneseed-hook <verb>` through one stable file, the **hook shim** at `~/.geneseed/bin/geneseed-hook` (`geneseed-hook.cmd` on Windows). The shim knows where Node and Geneseed live. If you move or replace Geneseed, one rebuild rewrites the shim and every install works again. `GENESEED_HOME` moves the shim's folder.
109
+
110
+ ### OpenClaude
111
+
112
+ ```
113
+ geneseed build --emit openclaude-global # ~/.openclaude
114
+ geneseed build --emit openclaude --out /path/to/repo --root /path/to/repo # one repo
115
+ ```
116
+
117
+ [OpenClaude](https://openclaude.gitlawb.com/) is a fork of Claude Code that can drive any model. You get the same agents, skills and hooks as Claude Code, under a different config directory. OpenClaude never reads `~/.claude` or a project `.claude/`, so the two installs can sit side by side. The differences:
118
+
119
+ - Per repo, the preamble is written to `.openclaude/CLAUDE.md` rather than a root file, and the hooks go into `.openclaude/settings.local.json`.
120
+ - `$OPENCLAUDE_CONFIG_DIR` moves the global directory (default `~/.openclaude`).
121
+
122
+ OpenClaude support has not yet been verified against a live install.
123
+
124
+ ### IBM Bob
125
+
126
+ ```
127
+ geneseed build --emit bob-global # ~/.bob
128
+ geneseed build --emit bob --out /path/to/repo --root /path/to/repo # one repo
129
+ ```
130
+
131
+ Bob is shaped like Claude Code, so it gets the same agents and skills. Per repo, the preamble goes into a root `AGENTS.md` and the rest into `.bob/`. Globally, everything goes under `~/.bob` (`$BOB_CONFIG_DIR` moves it), and the preamble rides `rules/geneseed.md`, because Bob does not auto-load a global `AGENTS.md`. Bob's hooks refuse an action with exit code 2, and Bob has no `SubagentStop` or `PreCompact` events. Bob support has not yet been verified against a live install.
132
+
133
+ ### Any AGENT.md tool
134
+
135
+ ```
136
+ geneseed build # renders the plain bundle into ./Harness
137
+ ```
138
+
139
+ Point your tool's instructions or rules setting at `Harness/AGENT.md`. If the tool only loads one specific filename, rename or symlink the file (`AGENT.md` to `AGENTS.md` or `CLAUDE.md`). The rules then rest on the agent's own discipline, because these tools have no hooks or plugins to enforce anything (see [Enforced vs. asked](../understand/enforced-vs-asked.md)).
140
+
141
+ Some of these tools also load skills. Their own docs list where:
142
+
143
+ - **Codex CLI** loads a root `AGENTS.md` and `~/.codex/AGENTS.md`, and skills from `~/.codex/skills` or `.agents/skills`.
144
+ - **Cursor** loads `AGENTS.md`, and skills from `.cursor/skills`, `.agents/skills` or `.claude/skills`.
145
+ - **Gemini CLI** reads `GEMINI.md` by default. Set `context.fileName` in its `settings.json` to include `AGENTS.md`. Skills load from `.gemini/skills` or `.agents/skills`.
146
+
147
+ Copy or symlink the bundle's `skills/` to `.agents/skills/` and all three of them see it.
148
+
149
+ ### No runtime on the target machine
150
+
151
+ If the machine that will use the harness cannot run Node, run this once on a machine that can:
152
+
153
+ ```
154
+ npx geneseed prompt --theme neutral > install-geneseed.md
155
+ ```
156
+
157
+ This produces one self-contained prompt that recreates the whole file tree. Paste it into any capable agent on the target machine. There is nothing to install and no build step. Any theme works the same way.
158
+
159
+ ---
160
+
161
+ **Next:** [Verify it works](verify.md) · [Choose your setup](choose-your-setup.md) · [What lands on your machine](../understand/on-your-machine.md)
@@ -0,0 +1,195 @@
1
+ ---
2
+ group: guides
3
+ order: 8
4
+ title: "MCP servers"
5
+ kind: "concept"
6
+ ---
7
+ MCP (Model Context Protocol) servers give your agent extra tools: converting a PDF, opening a merge request, reading files outside the repo. Geneseed ships three ready-made server **presets** (MarkItDown, GitLab and Filesystem) that you can switch on without writing JSON by hand.
8
+
9
+ > **You already know this:** an MCP entry is a line in a Procfile. It names a command the agent starts on demand. Writing the line does not install the program behind it.
10
+
11
+ Each preset is a *local* server, a command your agent launches when it needs the server. Registering a preset only points the agent at that command. **You** install the tool behind it (or let `uvx` or `npx` fetch it) and you supply any credentials.
12
+
13
+ > **Never commit a real token.** The presets ship with an empty `GITLAB_PERSONAL_ACCESS_TOKEN` and a sample filesystem path. Fill them in your own config, never in a tracked file.
14
+
15
+ ## Where the config lives
16
+
17
+ Each host keeps its servers in its own file and in a slightly different shape:
18
+
19
+ | Host | Project | Global | Shape |
20
+ | --- | --- | --- | --- |
21
+ | OpenCode | `opencode.json` (or `opencode.jsonc`) | `~/.config/opencode/opencode.json` | key `mcp`; `command` is one list; `environment`; `enabled` |
22
+ | Claude Code | `.mcp.json` | `~/.claude.json` | key `mcpServers`; `command` + `args`; `env` |
23
+ | OpenClaude | `.mcp.json` | `~/.openclaude.json` (or inside `$OPENCLAUDE_CONFIG_DIR`) | as Claude Code |
24
+ | Bob | `.bob/mcp.json` | `~/.bob/settings/mcp.json` | as Claude Code |
25
+
26
+ The same MarkItDown server in both shapes:
27
+
28
+ ```json
29
+ { "mcp": { "markitdown": { "type": "local", "command": ["uvx", "markitdown-mcp"], "enabled": true } } }
30
+ ```
31
+
32
+ ```json
33
+ { "mcpServers": { "markitdown": { "command": "uvx", "args": ["markitdown-mcp"] } } }
34
+ ```
35
+
36
+ **Toggle instead of editing.** In the web console (`geneseed web`), **Settings → MCP servers** adds, enables, disables or removes any preset in the right file, already in the right shape. Not sure which file that is? The **Harnesses** page shows the config path for each install, and `geneseed mcp` prints the same paths and lists the servers each install has wired, without starting anything.
37
+
38
+ The reference OpenCode config ships MarkItDown enabled and the GitLab and Filesystem entries disabled, so a merge never switches on a server that has no credentials yet. Fill in the blanks, then switch the server on.
39
+
40
+ ## MarkItDown
41
+
42
+ [MarkItDown](https://github.com/microsoft/markitdown) (Microsoft) converts PDF, Word, Excel, PowerPoint and HTML to markdown. It exposes one tool, `convert_to_markdown(uri)`, which accepts `file:`, `http:`, `https:` and `data:` URIs.
43
+
44
+ **1. Make the command resolve.**
45
+
46
+ - **`uvx` (recommended, nothing to install).** If you have [uv](https://docs.astral.sh/uv/), `uvx markitdown-mcp` fetches and caches the server on first use. This is the command the preset uses.
47
+ - **`pipx`.** Without uv, run `pipx install markitdown-mcp`, then use `markitdown-mcp` alone as the command (OpenCode: `["markitdown-mcp"]`; Claude: `"command": "markitdown-mcp"`, no args).
48
+
49
+ ```
50
+ uvx markitdown-mcp --help # uv route: confirm it resolves
51
+ pipx install markitdown-mcp && markitdown-mcp --help # pipx route
52
+ ```
53
+
54
+ For scanned or image-only PDFs, which otherwise come back empty, add the OCR extras: `uvx --with "markitdown[all]" markitdown-mcp`, or `pipx inject markitdown-mcp "markitdown[all]"`.
55
+
56
+ **2. Corporate TLS (only behind an SSL-inspecting proxy).** uv ships its own root certificates and ignores the OS trust store, so a proxy's internal certificate fails with `invalid peer certificate: UnknownIssuer`. Point uv at the OS store rather than turning verification off:
57
+
58
+ ```
59
+ export UV_SYSTEM_CERTS=true # older uv: UV_NATIVE_TLS=true
60
+ # fallback: export SSL_CERT_FILE=/path/to/corporate-root-ca.pem
61
+ ```
62
+
63
+ **3. Register it**, with the console toggle or one of the blocks above. Then restart your agent.
64
+
65
+ ## GitLab
66
+
67
+ [`@zereight/mcp-gitlab`](https://github.com/zereight/gitlab-mcp) provides repository, merge request, issue and CI tools over the GitLab API. It runs through `npx`, so nothing is installed globally. The same command serves gitlab.com and any self-hosted instance.
68
+
69
+ **1. Create a personal access token** on the instance (User Settings → Access Tokens) with the scopes `api` and `read_repository`. Treat it like a password.
70
+
71
+ **2. Register the server.**
72
+
73
+ <!--harness:opencode-->
74
+ *(OpenCode only)*
75
+
76
+ ```json
77
+ {
78
+ "mcp": {
79
+ "gitlab": {
80
+ "type": "local",
81
+ "command": ["npx", "-y", "@zereight/mcp-gitlab"],
82
+ "environment": {
83
+ "GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-…",
84
+ "GITLAB_API_URL": "https://gitlab.com/api/v4"
85
+ },
86
+ "enabled": true
87
+ }
88
+ }
89
+ }
90
+ ```
91
+ <!--/harness-->
92
+
93
+ <!--harness:claude-->
94
+ *(Claude Code only)*
95
+
96
+ ```json
97
+ {
98
+ "mcpServers": {
99
+ "gitlab": {
100
+ "command": "npx",
101
+ "args": ["-y", "@zereight/mcp-gitlab"],
102
+ "env": {
103
+ "GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-…",
104
+ "GITLAB_API_URL": "https://gitlab.com/api/v4"
105
+ }
106
+ }
107
+ }
108
+ }
109
+ ```
110
+
111
+ You can also register it with `claude mcp add`.
112
+ <!--/harness-->
113
+
114
+ Keep the `/api/v4` suffix on the URL.
115
+
116
+ **A second instance** (gitlab.com plus a self-hosted server, for example) is a copy of the same block under a new name, such as `gitlab-acme`, with its own `GITLAB_API_URL` and token. The preset covers the first instance only. You add the copy by hand.
117
+
118
+ ## Filesystem
119
+
120
+ [`@modelcontextprotocol/server-filesystem`](https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem) gives the agent file access limited to the folders you list, through `npx`. **The allowed folders are command-line arguments.** The server refuses any path outside them, so grant the narrowest set that works, not `$HOME` or `/`.
121
+
122
+ <!--harness:opencode-->
123
+ *(OpenCode only)*
124
+
125
+ ```json
126
+ {
127
+ "mcp": {
128
+ "filesystem": {
129
+ "type": "local",
130
+ "command": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"],
131
+ "enabled": true
132
+ }
133
+ }
134
+ }
135
+ ```
136
+ <!--/harness-->
137
+
138
+ <!--harness:claude-->
139
+ *(Claude Code only)*
140
+
141
+ ```json
142
+ { "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"] } } }
143
+ ```
144
+ <!--/harness-->
145
+
146
+ > **Replace the placeholder.** The preset ships with the literal path `/path/to/allowed/dir`. If you enable the server without changing it, the server runs but can reach nothing. This is the classic "the filesystem MCP sees nothing" problem.
147
+
148
+ ## Verify
149
+
150
+ Restart your agent, then list the servers:
151
+
152
+ <!--harness:opencode-->
153
+ *(OpenCode only)*
154
+
155
+ `opencode mcp` lists each server and whether it **connected**.
156
+ <!--/harness-->
157
+
158
+ <!--harness:claude-->
159
+ *(Claude Code only)*
160
+
161
+ `/mcp` in a session, or `claude mcp list` in a terminal, shows each server and whether it connected.
162
+ <!--/harness-->
163
+
164
+ Being listed is not the same as working. A local server appears in the list whether or not its command actually launches.
165
+
166
+ ## A server won't connect
167
+
168
+ Work through these in order:
169
+
170
+ 1. **Does the command resolve?** Run the exact command in a fresh terminal: `uvx markitdown-mcp --help`, or `npx -y @modelcontextprotocol/server-filesystem --help`. "command not found" means the binary is not on the `PATH` your agent starts from. Use the `uvx` or `npx` form, which needs only uv or Node, or point at the absolute path of the binary. This is the most common cause for MarkItDown.
171
+ 2. **Filesystem sees nothing?** The allowed folder is still the placeholder, or it points at a path that does not exist.
172
+ 3. **GitLab will not connect?** Almost always a missing or under-scoped token, or a wrong `GITLAB_API_URL`. Keep the `/api/v4` suffix.
173
+ 4. **Right file?** Editing a file the host does not read fails silently.
174
+
175
+ <!--harness:opencode-->
176
+ *(OpenCode only)*
177
+
178
+ OpenCode reads `opencode.jsonc` if it exists, otherwise `opencode.json`, both in the project root and in `~/.config/opencode/`. The console toggle always writes the file OpenCode actually reads.
179
+ <!--/harness-->
180
+
181
+ <!--harness:claude-->
182
+ *(Claude Code only)*
183
+
184
+ Claude Code reads `.mcp.json` in the project and the `mcpServers` block in `~/.claude.json`. `claude mcp list` shows which servers actually loaded.
185
+ <!--/harness-->
186
+
187
+ ## Reading non-markdown docs
188
+
189
+ The agent's doc discovery only sees markdown. The `ingest` skill teaches the agent to convert a PDF, Word, PowerPoint, Excel or HTML file, or a URL, to markdown before reading it. Install one converter and the skill uses it:
190
+
191
+ - **MarkItDown**: the broadest. Use the MCP server above (preferred on a host with MCP: nothing to install per call, one cheap tool), or `pip install markitdown`.
192
+ - **Pandoc**: excellent for Office and HTML, and a single binary.
193
+ - **Docling** (IBM): best for complex tables and scanned PDFs.
194
+
195
+ When an MCP converter is available, the skill prefers it. A prompt like *"convert file:///path/to/spec.pdf to markdown"* then just works. The skill never installs a converter silently. If none is present, it tells you which one to add.
@@ -0,0 +1,41 @@
1
+ ---
2
+ group: guides
3
+ order: 13
4
+ title: "Migrate from a clone to npm"
5
+ kind: "concept"
6
+ ---
7
+ If you installed Geneseed by cloning the repository and now want to use the npm package, one command moves every install you already have, without touching your own settings.
8
+
9
+ ## Why there is something to migrate
10
+
11
+ Claude Code, Bob and OpenClaude call Geneseed's hooks through one small file, the **hook shim** at `~/.geneseed/bin/geneseed-hook`. Every install's `settings.json` points at the shim, and the shim points at the Geneseed code it should run, which is your clone. Installing from npm moves that code. Each install also carries a `.geneseed-emit` marker, a small file that records which host and scope it was built for, so the install can be rebuilt as it was.
12
+
13
+ ## Run it
14
+
15
+ Install the package first (`npm install -g geneseed`, or prefix each command with `npx`), then:
16
+
17
+ ```
18
+ geneseed migrate --dry-run # survey every install and print the plan; writes nothing
19
+ geneseed migrate # do it
20
+ ```
21
+
22
+ `migrate` rebuilds every registered install **with its own theme, host, footprint, posture and mode**. Nothing is reset to a default. It then rewrites the hook shim to point at the npm package, and reports anything it is not allowed to fix for you. A second run prints `already on the npm shape` and writes nothing.
23
+
24
+ ## All or nothing
25
+
26
+ Before changing anything, `migrate` copies every host settings file and the hook shim into `~/.geneseed/.migrate-backup/`. If any install fails to rebuild, **everything is put back** and the command exits non-zero. You are never left half on one setup and half on the other.
27
+
28
+ `rebuild-all` behaves the opposite way on purpose: it carries on past a broken install so that one failure cannot block the rest.
29
+
30
+ ## It refuses rather than guesses
31
+
32
+ If an install's `.geneseed-emit` marker names something this version does not recognise (a truncated or hand-edited file, for example), `migrate` **refuses the whole run**. It names the install and changes nothing. Rebuilding it would mean guessing which host and scope you chose. Fix or delete the marker, then run `migrate` again.
33
+
34
+ ## What it leaves alone
35
+
36
+ `migrate` reports these instead of rewriting them:
37
+
38
+ - **Hooks it did not write.** Your own hooks and any third-party hooks stay exactly as they are. A rebuild only replaces the hook groups that Geneseed's manifest says it owns.
39
+ - **Login items.** If you set the web console to [start at login](autostart.md), you wrote that file yourself. If it still names your old clone, `migrate` prints its path and the command to put in it. You edit the file yourself.
40
+
41
+ Your clone keeps working in the meantime, so you can migrate when it suits you.
@@ -0,0 +1,87 @@
1
+ ---
2
+ group: guides
3
+ order: 6
4
+ title: "Project context"
5
+ kind: "concept"
6
+ ---
7
+ At the start of every session, the harness shows the agent your repo's own documentation. Usually you have nothing to configure. This page explains what gets loaded and what each choice costs, so you know when to override it.
8
+
9
+ ## Eager and lazy: what each costs
10
+
11
+ The context step sorts every doc it finds into one of two lists:
12
+
13
+ - **Eager**: the full text is put into the session. The agent knows it from the first turn, but you pay its tokens in **every** session in that repo, whether the task needs it or not.
14
+ - **Lazy**: only the path (and a heading) is listed. The agent reads the file when a task calls for it. The cost is close to zero until the file is read.
15
+
16
+ > **You already know this:** eager versus lazy loading of imports. Eager is fast to use and always paid for. Lazy costs one extra step and is free until you need it.
17
+
18
+ ## What is found automatically
19
+
20
+ With no configuration, the context step finds these files:
21
+
22
+ - **Eager:** root `AGENTS.md`, `AGENT.md`, `CLAUDE.md` and `.cursorrules`, plus `README.md` and `CONTRIBUTING.md`. The root file your tool already loads by itself is skipped, so you never pay for it twice.
23
+ - **Lazy:** `docs/`, `doc/`, `documentation/`, `architecture/`, `adr/` and `ADR/`, monorepo `packages/*/README.md` and `apps/*/README.md`, and any other root `*.md`.
24
+ - **Never scanned:** `node_modules`, `.git`, `dist`, `build`, `vendor`, `.next`, `target`, `.venv`, `__pycache__`, `.opencode` and `.harness`.
25
+
26
+ Eager files share a 48 KB budget per session. An eager file that would go over the budget is listed instead, to be read on demand.
27
+
28
+ On OpenCode the context plugin does this work. On Claude Code, Bob and OpenClaude, the session-start hook does it (`geneseed-hook context`). Both read the same override file, described next.
29
+
30
+ ## Override it with `context.json`
31
+
32
+ Add a manifest only when the convention does not fit your repo. Put it at `.harness/context.json`, or at `context.json` in the repo root, or point `$GENESEED_CONTEXT` at it:
33
+
34
+ ```json
35
+ {
36
+ "extend": true,
37
+ "context": [
38
+ { "path": "docs/house-rules.md", "load": "eager", "description": "Branch policy, definition of done." },
39
+ { "path": "docs/**/*.md", "load": "lazy" },
40
+ { "path": "internal/secrets.md", "load": "exclude" }
41
+ ]
42
+ }
43
+ ```
44
+
45
+ - `path` is absolute, relative to the repo, or a glob.
46
+ - `load` is `eager`, `lazy` or `exclude`.
47
+ - `"extend": true` keeps automatic discovery running and adds your entries on top. Without it, the manifest replaces discovery entirely.
48
+
49
+ ### Example: a monorepo
50
+
51
+ A monorepo with docs scattered across packages might write:
52
+
53
+ ```json
54
+ {
55
+ "extend": true,
56
+ "context": [
57
+ { "path": "docs/architecture.md", "load": "eager", "description": "system map" },
58
+ { "path": "api/README.md", "load": "eager" },
59
+ { "path": "web/README.md", "load": "eager" }
60
+ ]
61
+ }
62
+ ```
63
+
64
+ Keep the eager list to the few files a new teammate would read first. Three sharp docs beat ten broad ones. Use `"load": "lazy"` for anything a session should only read on demand.
65
+
66
+ <!--harness:opencode-->
67
+ *(OpenCode only)*
68
+
69
+ ## What else OpenCode adds
70
+
71
+ On OpenCode the eager budget is adjustable: 16 KB per file and 48 KB in total by default, changed with `GENESEED_EAGER_FILE_KB` and `GENESEED_EAGER_TOTAL_KB`. When it can, the context block also adds two lines, so the agent starts out oriented:
72
+
73
+ - the repo's **runnable commands**: targets from `Makefile`, `package.json` scripts (with the right runner for the lockfile), `justfile` and `Taskfile`;
74
+ - the session's **current model**, read from the transcript, with `GENESEED_MODEL=provider/model` as a fallback.
75
+
76
+ A line is simply left out when its source is missing.
77
+
78
+ ## How OpenCode delivers it
79
+
80
+ By default, the plugin delivers the context invisibly. It prepends the context to each request through OpenCode's experimental `experimental.chat.messages.transform` hook, so nothing appears in the conversation. Because it is re-sent with every request, the context also survives compaction. If your OpenCode build lacks that hook, the plugin notices and falls back to posting a visible `PROJECT CONTEXT` message.
81
+
82
+ - `GENESEED_CONTEXT_VISIBLE=1` always shows the visible block, so you can see what the agent received.
83
+ - `GENESEED_CONTEXT_INJECT=off` turns injection off. The agent then relies on the instruction in `AGENT.md` to read the docs itself.
84
+ - `GENESEED_DEBUG=1` logs what was discovered and how it was delivered.
85
+ <!--/harness-->
86
+
87
+ All the knobs are listed in [Environment](../reference/environment.md). For knowledge that belongs to you rather than to one repo, see [Wiki](wiki.md).