geneseed 3.10.0 → 3.11.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 (186) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/DESIGN.md +1 -1
  3. package/README.md +26 -44
  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/bin/build-driver.mjs +2 -0
  10. package/bin/geneseed-cli.mjs +17 -0
  11. package/bin/geneseed-hook.mjs +2 -0
  12. package/docs/README.md +42 -0
  13. package/docs/_groups.json +18 -0
  14. package/docs/concepts/agents.md +44 -0
  15. package/docs/concepts/collaboration.md +62 -0
  16. package/docs/concepts/exclusions.md +55 -0
  17. package/docs/concepts/footprint.md +52 -0
  18. package/docs/concepts/foreman-mode.md +69 -0
  19. package/docs/concepts/hooks.md +101 -0
  20. package/docs/concepts/hosts.md +55 -0
  21. package/docs/concepts/lsp.md +50 -0
  22. package/docs/{web → concepts}/memory.md +2 -2
  23. package/docs/{web → concepts}/notebook.md +2 -2
  24. package/docs/concepts/rules.md +52 -0
  25. package/docs/concepts/skills.md +49 -0
  26. package/docs/concepts/themes.md +50 -0
  27. package/docs/extending.md +27 -21
  28. package/docs/guides/autostart.md +70 -0
  29. package/docs/guides/choose-your-setup.md +120 -0
  30. package/docs/guides/headless.md +22 -0
  31. package/docs/guides/install.md +161 -0
  32. package/docs/guides/mcp.md +195 -0
  33. package/docs/guides/migrate.md +41 -0
  34. package/docs/guides/project-context.md +87 -0
  35. package/docs/guides/run-anywhere.md +45 -0
  36. package/docs/guides/uninstall.md +51 -0
  37. package/docs/guides/upgrade.md +65 -0
  38. package/docs/guides/verify.md +65 -0
  39. package/docs/guides/wiki.md +69 -0
  40. package/docs/guides/worktree.md +47 -0
  41. package/docs/reference/about.md +7 -0
  42. package/docs/reference/cli.md +7 -0
  43. package/docs/reference/environment.md +99 -0
  44. package/docs/reference/glossary.md +33 -0
  45. package/docs/reference/opencode-plugins.md +131 -0
  46. package/docs/reference/troubleshooting.md +350 -0
  47. package/docs/understand/a-day.md +77 -0
  48. package/docs/understand/enforced-vs-asked.md +64 -0
  49. package/docs/understand/harness.md +36 -0
  50. package/docs/understand/on-your-machine.md +76 -0
  51. package/docs/web-ui.md +1 -1
  52. package/harness.config.json +1 -1
  53. package/js/README.md +3 -2
  54. package/js/build/generate.mjs +12 -1
  55. package/js/build/source.mjs +6 -0
  56. package/js/cli-table.json +1 -1
  57. package/js/hosts/mcp.mjs +1 -1
  58. package/js/hosts/settings.mjs +13 -1
  59. package/js/inspect/checks-authoring.mjs +5 -3
  60. package/js/inspect/doctor.mjs +1 -1
  61. package/js/inspect/inventory.mjs +1 -1
  62. package/js/inspect/registry.mjs +20 -3
  63. package/js/inspect/status.mjs +7 -2
  64. package/js/lib/node-floor.mjs +30 -0
  65. package/js/maintain/setup.mjs +109 -21
  66. package/js/maintain/update.mjs +4 -15
  67. package/js/ui/cli.mjs +2 -2
  68. package/js/web/api.mjs +3 -0
  69. package/js/web/daemon.mjs +52 -0
  70. package/js/web/docs.mjs +149 -65
  71. package/js/web/server.mjs +5 -2
  72. package/package.json +6 -4
  73. package/registry.json +7 -0
  74. package/src/AGENT.md.tmpl +4 -0
  75. package/src/postures/mentor.md +1 -0
  76. package/src/skills/learn-mode.md +89 -0
  77. package/src/skills/pipeline.md +2 -2
  78. package/src/skills/quiz.md +2 -1
  79. package/src/skills/teach.md +2 -1
  80. package/themes/_TEMPLATE.json +1 -0
  81. package/themes/biker.json +1 -0
  82. package/themes/commentator.json +1 -0
  83. package/themes/cyberpunk.json +1 -0
  84. package/themes/gamer.json +1 -0
  85. package/themes/imperial.json +1 -0
  86. package/themes/joker.json +1 -0
  87. package/themes/marvin.json +1 -0
  88. package/themes/mean.json +1 -0
  89. package/themes/military.json +1 -0
  90. package/themes/neutral.json +1 -0
  91. package/themes/pirate.json +1 -0
  92. package/themes/sports.json +1 -0
  93. package/themes/verstappen.json +1 -0
  94. package/themes/wizard.json +1 -0
  95. package/web/dist/assets/Activity-C52LEb-2.js +1 -0
  96. package/web/dist/assets/ActivityDetail-CjNLRvXg.js +1 -0
  97. package/web/dist/assets/Dashboard-B6_sSCHi.js +2 -0
  98. package/web/dist/assets/Docs-Dj7BmCSA.js +5 -0
  99. package/web/dist/assets/{GreenhouseView-D0cbCJ5m.js → GreenhouseView-BALwjQsA.js} +1 -1
  100. package/web/dist/assets/Installs-BbffDQm3.js +2 -0
  101. package/web/dist/assets/JournalView-JpAQ8Hqe.js +1 -0
  102. package/web/dist/assets/Laws-DK7eCWSm.js +3 -0
  103. package/web/dist/assets/Library-CoamHelE.js +1 -0
  104. package/web/dist/assets/{Markdown-CkFyfgNf.js → Markdown-qjM2_ofS.js} +5 -5
  105. package/web/dist/assets/{OperatorHudView-CiAkAkQL.js → OperatorHudView-DVx1HlBx.js} +1 -1
  106. package/web/dist/assets/Personal-eaXb1zcj.js +1 -0
  107. package/web/dist/assets/{Tabs-B4HNrrCs.js → Tabs-BmGtt8E2.js} +1 -1
  108. package/web/dist/assets/api-Dc8f3ca-.js +1 -0
  109. package/web/dist/assets/drawable-Du_PZrQj.js +1 -0
  110. package/web/dist/assets/index-Bz_KMRDH.css +1 -0
  111. package/web/dist/assets/index-CNFH7o55.js +2 -0
  112. package/web/dist/index.html +3 -2
  113. package/QUICKSTART.md +0 -50
  114. package/SETUP.md +0 -1148
  115. package/docs/web/_groups.json +0 -45
  116. package/docs/web/about.md +0 -6
  117. package/docs/web/adapters-claude-code.md +0 -8
  118. package/docs/web/adapters-opencode-loads.md +0 -8
  119. package/docs/web/adapters-opencode-spec.md +0 -8
  120. package/docs/web/adapters-opencode.md +0 -8
  121. package/docs/web/agents.md +0 -8
  122. package/docs/web/authoring.md +0 -11
  123. package/docs/web/autostart.md +0 -9
  124. package/docs/web/claude-hooks.md +0 -37
  125. package/docs/web/cli.md +0 -6
  126. package/docs/web/collaboration.md +0 -27
  127. package/docs/web/configure-wiki.md +0 -9
  128. package/docs/web/design.md +0 -7
  129. package/docs/web/env-knobs.md +0 -9
  130. package/docs/web/exclusions.md +0 -26
  131. package/docs/web/first-session.md +0 -28
  132. package/docs/web/footprint.md +0 -38
  133. package/docs/web/foreman-mode.md +0 -33
  134. package/docs/web/glossary.md +0 -6
  135. package/docs/web/harnesses.md +0 -30
  136. package/docs/web/headless.md +0 -9
  137. package/docs/web/ingest-docs.md +0 -9
  138. package/docs/web/install-paths.md +0 -9
  139. package/docs/web/install-quick.md +0 -35
  140. package/docs/web/lsp-overview.md +0 -37
  141. package/docs/web/mcp-claude-code.md +0 -10
  142. package/docs/web/mcp-filesystem.md +0 -9
  143. package/docs/web/mcp-gitlab.md +0 -9
  144. package/docs/web/mcp-markitdown.md +0 -9
  145. package/docs/web/mcp-overview.md +0 -34
  146. package/docs/web/mcp-trouble.md +0 -9
  147. package/docs/web/mcp-verify.md +0 -9
  148. package/docs/web/migrate.md +0 -39
  149. package/docs/web/model.md +0 -20
  150. package/docs/web/pipelines.md +0 -24
  151. package/docs/web/plugin-activity.md +0 -23
  152. package/docs/web/plugin-context.md +0 -26
  153. package/docs/web/plugin-guard.md +0 -24
  154. package/docs/web/plugin-learn.md +0 -27
  155. package/docs/web/plugin-notify.md +0 -24
  156. package/docs/web/plugin-ponytail.md +0 -23
  157. package/docs/web/plugin-setup.md +0 -7
  158. package/docs/web/plugin-workflow.md +0 -25
  159. package/docs/web/plugins.md +0 -17
  160. package/docs/web/project-context.md +0 -9
  161. package/docs/web/rules.md +0 -30
  162. package/docs/web/run-anywhere.md +0 -9
  163. package/docs/web/self-improve.md +0 -8
  164. package/docs/web/setup-choices.md +0 -64
  165. package/docs/web/skills.md +0 -8
  166. package/docs/web/themes-author.md +0 -20
  167. package/docs/web/themes.md +0 -9
  168. package/docs/web/token-footprint.md +0 -7
  169. package/docs/web/trouble.md +0 -38
  170. package/docs/web/upgrade.md +0 -9
  171. package/docs/web/verify.md +0 -30
  172. package/docs/web/wiki.md +0 -7
  173. package/docs/web/worktree.md +0 -10
  174. package/docs/wiki.md +0 -43
  175. package/web/dist/assets/Activity-BjVp522q.js +0 -1
  176. package/web/dist/assets/ActivityDetail-8ep1bspW.js +0 -1
  177. package/web/dist/assets/Dashboard-OkC_PCH6.js +0 -2
  178. package/web/dist/assets/Docs-CKPWz00o.js +0 -2
  179. package/web/dist/assets/Installs-BtGGdoTt.js +0 -2
  180. package/web/dist/assets/JournalView-Ckl4dmzR.js +0 -1
  181. package/web/dist/assets/Laws-CLpdRRk8.js +0 -3
  182. package/web/dist/assets/Library-wPPuKQrI.js +0 -1
  183. package/web/dist/assets/Personal-D8CnDo9v.js +0 -1
  184. package/web/dist/assets/drawable-BiwaOo6x.js +0 -1
  185. package/web/dist/assets/index-C1yil5j1.js +0 -2
  186. package/web/dist/assets/index-CDPDk2vj.css +0 -1
@@ -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).
@@ -0,0 +1,45 @@
1
+ ---
2
+ group: guides
3
+ order: 9
4
+ title: "Run geneseed from anywhere"
5
+ kind: "concept"
6
+ ---
7
+ **Installed from npm? You have nothing to do.** `npm install -g geneseed` already puts `geneseed`, `geneseed-build` and `geneseed-hook` on your `PATH`.
8
+
9
+ From a clone, you call the launcher inside the clone: `./geneseed` (Windows: `.\geneseed.cmd`). To type plain `geneseed` from any folder, link it.
10
+
11
+ ## macOS and Linux
12
+
13
+ ```
14
+ ./geneseed link # a launcher in ~/.local/bin, no sudo
15
+ ./geneseed link /usr/local/bin # or another bin folder (may ask for sudo)
16
+ ```
17
+
18
+ `link` writes a small shell launcher that runs this clone by its absolute path. It also tells you whether the target folder is on your `PATH`, and if it is not, the one line to add to your shell profile. Then:
19
+
20
+ ```
21
+ geneseed # the web console (or the command list), from any folder
22
+ geneseed build # and every other command
23
+ ```
24
+
25
+ If you prefer a shell function, add one to your `~/.zshrc` or `~/.bashrc` from inside the clone instead:
26
+
27
+ ```
28
+ echo 'geneseed() { "'"$PWD"'/geneseed" "$@"; }' >> ~/.zshrc
29
+ ```
30
+
31
+ ## Windows
32
+
33
+ ```powershell
34
+ .\geneseed.cmd link
35
+ ```
36
+
37
+ This writes a `geneseed.cmd` launcher into `%LOCALAPPDATA%\Geneseed\bin` and adds that folder to your user `PATH`. You need neither admin rights nor symlinks. Open a new terminal, then call `geneseed` from any folder.
38
+
39
+ ## Undo it
40
+
41
+ ```
42
+ geneseed unlink
43
+ ```
44
+
45
+ `unlink` removes the launchers that `link` wrote. It leaves alone any `geneseed` it did not write itself. In the web console, **Settings** has the same link and unlink controls.
@@ -0,0 +1,51 @@
1
+ ---
2
+ group: guides
3
+ order: 5
4
+ title: "Uninstall"
5
+ kind: "concept"
6
+ ---
7
+ `geneseed uninstall` removes one install at a time. It deletes only what Geneseed wrote and keeps anything you would not be able to rebuild.
8
+
9
+ ## Remove an install
10
+
11
+ ```
12
+ geneseed uninstall # the project install in this folder, else the OpenCode global one
13
+ geneseed uninstall --target /path/to/repo # a project install
14
+ geneseed uninstall --target ~/.claude # a global install: pass its config directory
15
+ ```
16
+
17
+ Without `--target`, the command picks the project install in the current folder if there is one, and the OpenCode global install otherwise. It prints what it will remove and asks before going on. Pass `--yes` to skip the question. In a shell without an interactive terminal, `--yes` is required: without it, the command refuses and exits 1.
18
+
19
+ To see where each install lives, run `geneseed status`. The web console's **Harnesses** page can also uninstall.
20
+
21
+ ## What it removes
22
+
23
+ Each install keeps a manifest, a list of the files Geneseed wrote. **Uninstall deletes exactly those files and nothing else**, then removes any folders they leave empty. A file of yours that sits in the same folder stays.
24
+
25
+ - **OpenCode global:** `AGENT.md`, `agents/`, `skills/`, `plugins/`, the marker files, and the `instructions` entry in `opencode.json`.
26
+ - **OpenCode per repo:** `AGENT.md`, `.opencode/`, `laws/`, `agents/`, `skills/`, and the `instructions` entry in `opencode.json`.
27
+ - **Claude Code, Bob, OpenClaude:** `agents/`, `skills/`, the marker files, Geneseed's managed block in the instructions file (`CLAUDE.md` or `AGENTS.md`), and Geneseed's own hooks and exclusions in `settings.json`. Your own settings keys and hooks stay.
28
+
29
+ It also removes the install's row from the registry of installs. Start a new session in your tool afterwards so it stops loading the old files.
30
+
31
+ ## What it keeps
32
+
33
+ - **`memory/` and `notebook/`.** These are never deleted. `--archive-memory` moves both aside, into sibling `archived-memory/<timestamp>/` and `archived-notebook/<timestamp>/` folders, instead of leaving them in place. Even then they are moved, not deleted.
34
+ - **`wiki.jsonc`**, **`context.json`** and the **`improvements/`** folder. None of these are in the manifest.
35
+ - **Other installs.** Removing the global install does not touch any project install. Uninstall lists the project installs that remain, each with the command that removes it. If a repo carries installs for several hosts, uninstall removes one and tells you to run it again for the next.
36
+
37
+ ## The hook shim
38
+
39
+ Claude Code, Bob and OpenClaude hooks all run through one shared file, the hook shim at `~/.geneseed/bin/geneseed-hook` (or under `$GENESEED_HOME`). Uninstalling an install removes that install's hooks but leaves the shim, because other installs may still use it. Once no install is left, you can delete the `~/.geneseed` folder yourself.
40
+
41
+ ## Remove the `geneseed` command
42
+
43
+ The commands themselves are removed separately:
44
+
45
+ ```
46
+ npm uninstall -g geneseed # installed from npm
47
+ ```
48
+
49
+ From a clone, `geneseed unlink` removes the launcher that `geneseed link` put on your `PATH` (see [Run geneseed from anywhere](run-anywhere.md)). Then delete the clone folder.
50
+
51
+ If you set the web console to start at login, delete that login item too. It is a file you created, and Geneseed never removes it (see [Start the web console at login](autostart.md)).
@@ -0,0 +1,65 @@
1
+ ---
2
+ group: guides
3
+ order: 4
4
+ title: "Upgrade"
5
+ kind: "concept"
6
+ ---
7
+ Upgrading happens in two steps: get the new Geneseed, then rebuild every install from it. Editing or updating Geneseed changes nothing on your machine until something rebuilds. The route depends on how you installed.
8
+
9
+ ## Installed from npm
10
+
11
+ ```
12
+ npm install -g geneseed@latest # get the new version
13
+ geneseed rebuild-all # rebuild every install with its own settings
14
+ ```
15
+
16
+ `rebuild-all` re-renders each registered install in place, keeping its own theme, host, footprint, posture, mode, packs and rule exclusions. It is best-effort: when one install fails, it reports the failure and carries on with the rest.
17
+
18
+ `upgrade`, `update`, `sync-self` and `bootstrap` are the clone route. Run from an npm install, they stop before touching anything and point you to `npm install -g geneseed@latest` instead.
19
+
20
+ ## Installed from a clone
21
+
22
+ ```
23
+ geneseed upgrade # pull, check, rebuild; keeps theme and install mode
24
+ geneseed upgrade imperial # the same, switching the theme
25
+ ```
26
+
27
+ `upgrade` does three things:
28
+
29
+ 1. It runs a fast-forward-only `git pull` from the clone's own remote, on the current branch.
30
+ 2. It runs a blocking `doctor` pass over the result, and rolls back if it fails.
31
+ 3. It rebuilds the bundle and every install in place.
32
+
33
+ A dirty working tree, or a folder that is not a git clone, is reported rather than force-updated. `update` and `sync-self` are aliases of `upgrade`. `bootstrap` does the same and then opens the setup wizard (`--no-setup` skips the wizard).
34
+
35
+ ## What an upgrade keeps
36
+
37
+ A rebuild only replaces files the install's manifest says Geneseed owns. It leaves these alone:
38
+
39
+ - the `memory/` and `notebook/` stores;
40
+ - your `context.json` and `wiki.jsonc`;
41
+ - the marker files that record each install's choices (theme, footprint, packs, excluded rules), which every rebuild reads back;
42
+ - your own agents, skills, plugins and hooks, and any `opencode.json` or `settings.json` keys you wrote yourself;
43
+ - the `improvements/` folder (see below).
44
+
45
+ ## Local edits, and the improvements file
46
+
47
+ The agent can refine its own deployed agent and skill files as it works, and so can you. A rebuild would overwrite those edits, so **setup, re-theme and upgrade export them first**. When the files they are about to overwrite differ from a fresh render, the differences are written to a markdown **improvements file** in `improvements/`, inside the install's own folder (for the OpenCode global install, `~/.config/opencode/improvements/`). The manifest does not list that folder, so rebuilds never overwrite it and uninstall never removes it.
48
+
49
+ To see the drift yourself, or to export it on demand:
50
+
51
+ ```
52
+ geneseed diff # file-level summary of what diverged
53
+ geneseed diff --full # with line-level diffs
54
+ geneseed diff --out improvements.md # write the improvements file
55
+ ```
56
+
57
+ `diff` compares the global OpenCode install by default. Pass `--target <config dir>` to compare another install. The improvements file is self-contained. To make the changes permanent, hand it to an agent in a Geneseed clone and ask it to fold them back into `src/`. Then they survive every future build. The web console's **Changes** page exports the same file.
58
+
59
+ ## Moving from a clone to npm
60
+
61
+ If you installed from a clone and now want the npm package, `geneseed migrate` moves every install across in one pass. See [Migrate to npm](migrate.md).
62
+
63
+ ---
64
+
65
+ **Next:** [Verify it works](verify.md) · [Uninstall](uninstall.md)
@@ -0,0 +1,65 @@
1
+ ---
2
+ group: guides
3
+ order: 3
4
+ title: "Verify it works"
5
+ kind: "concept"
6
+ ---
7
+ Four checks, from quickest to most thorough. The first one alone tells you whether the harness loaded.
8
+
9
+ ## 1. The readiness sigil
10
+
11
+ Open your agent in any repo and say anything. The first reply opens with the readiness line: `✅` for the neutral theme, `🧬` for imperial, or your theme's own sigil.
12
+
13
+ If the sigil is missing, the tool is not loading `AGENT.md`. Check that your tool's instructions setting points at it. On OpenCode, that is the `instructions` key in `opencode.json`.
14
+
15
+ ## 2. `geneseed doctor`
16
+
17
+ ```
18
+ geneseed doctor
19
+ ```
20
+
21
+ `npx geneseed doctor` runs the same check without installing anything. Doctor renders the harness and checks the result for unresolved theme tokens, dead links, missing files and drift from the source. It checks the theme you installed, unless you pass `--theme NAME` for another theme or `--all` for every theme. A clean run ends with a line like this:
22
+
23
+ ```
24
+ [doctor] ok — 1 theme(s) clean: no unresolved tokens, no dead …
25
+ ```
26
+
27
+ Every failure comes with a hint for fixing it. Doctor also reports a stale hook shim, the file every Claude Code, Bob and OpenClaude hook goes through. If that shim points at a folder that no longer exists, the hooks stop silently. One `geneseed build` (or `geneseed rebuild-all`) rewrites it.
28
+
29
+ ## 3. `geneseed status`
30
+
31
+ ```
32
+ geneseed status
33
+ ```
34
+
35
+ This prints a dashboard with your theme, the components installed, the memory store, the version, the active doctrine packs, and one row per install with its host, scope, theme, footprint, posture, mode and packs. A healthy install reads `active`. If the bottom of the dashboard says the installed build differs from the current source, run `geneseed rebuild-all` (see [Upgrade](upgrade.md)).
36
+
37
+ The `gates` row counts how often a gate asked or blocked, per rule. It shows the hooks are actually firing. `geneseed status --json` prints the same data as JSON, including the exact `geneseed build` command that rebuilds each install.
38
+
39
+ ## 4. Context delivery
40
+
41
+ <!--harness:opencode-->
42
+ *(OpenCode only)*
43
+
44
+ Start a session with `GENESEED_DEBUG=1` set. The context plugin then logs what it discovered and injected, and you should see the repo's `README.md` and its docs listed. To check memory, do a little work and end the session. After a quiet period, the learn plugin logs `wrote N memory file(s)` or the reason it skipped. Total silence means the plugin did not load.
45
+ <!--/harness-->
46
+
47
+ <!--harness:claude-->
48
+ *(Claude Code only)*
49
+
50
+ At session start, the context hook adds the repo's docs to the conversation. Ask the agent what project context it received. It should name your `README.md` and list your `docs/`.
51
+ <!--/harness-->
52
+
53
+ ## Dry-run a build before you write it
54
+
55
+ `geneseed validate` takes the same flags as `geneseed build`. It renders into a throwaway sandbox and runs every doctor check against the result. Nothing is written under the real `--out` or `--root`: no marker files, no settings merge, no registry record.
56
+
57
+ ```
58
+ geneseed validate --theme imperial --emit opencode --out /path/to/repo/Harness
59
+ ```
60
+
61
+ It prints how many files each layer would get (`-v` lists the paths), exits `0` when the build is clean, and exits non-zero on any problem. It is useful in CI, or before you point a real build at a repo you do not want to touch yet. The generator itself (`geneseed-build`) has no dry-run flag. `validate` is a separate command because it runs doctor, and the generator is not allowed to start processes.
62
+
63
+ ---
64
+
65
+ Something wrong? See [Troubleshooting](../reference/troubleshooting.md).
@@ -0,0 +1,69 @@
1
+ ---
2
+ group: guides
3
+ order: 7
4
+ title: "Connect your wiki"
5
+ kind: "concept"
6
+ ---
7
+ If you keep a personal knowledge base on this machine, such as an Obsidian vault or any folder of interlinked markdown, you can declare it once. The agent then reads from it and writes to it while following your own structure. This is optional. Until you declare a wiki, the feature stays off.
8
+
9
+ > **You already know this:** a wiki is a shared drive with a README that says "read me before you add anything". The agent reads that note first, files new notes where your structure says they belong, and keeps out of the folders you marked off-limits.
10
+
11
+ ## Wiki, memory, notebook: three different stores
12
+
13
+ - **[Memory](../concepts/memory.md)**: small facts the agent learns, one per file, private to this machine.
14
+ - **[Notebook](../concepts/notebook.md)**: the agent's own scratch space.
15
+ - **Wiki**: durable knowledge that spans projects, which **you** own and curate.
16
+
17
+ When a memory fact or a notebook note hardens into knowledge worth keeping across projects, the agent promotes it into the wiki, so the truth lives in one place.
18
+
19
+ ## Declare it in `wiki.jsonc`
20
+
21
+ The build writes a `wiki.jsonc` stub beside `AGENT.md` (for the OpenCode global install, `~/.config/opencode/wiki.jsonc`) and never overwrites it. The file is JSONC, so comments and trailing commas are fine. The stub contains this example, commented out:
22
+
23
+ ```json
24
+ {
25
+ "wikis": [{
26
+ "name": "Brain",
27
+ "path": "/home/me/Documents/Brain",
28
+ "description": "my machine-wide knowledge base",
29
+ "entries": [
30
+ { "path": "ARCHITECTURE.md", "load": "eager", "description": "the root map" },
31
+ { "path": ".", "load": "lazy" }
32
+ ],
33
+ "conventions": "STYLE.md",
34
+ "inbox": "Inbox/",
35
+ "protected": ["Journal/"]
36
+ }]
37
+ }
38
+ ```
39
+
40
+ - **`path`**: the vault root, absolute. On Windows, use forward slashes (`C:/Users/me/Brain`).
41
+ - **`entries`**: notes the agent sees each session, with the same `eager` and `lazy` meaning as [project context](project-context.md). An eager note is loaded in full. A lazy note is only listed, and the agent reads it on demand. An entry can be one note or a folder (`"."` is the whole vault; dot-folders like `.obsidian` are skipped). A file entry overrides its folder's mode, and `"load": "exclude"` removes a note or folder from the list. The example above is the usual shape: the root index eager, everything else lazy.
42
+ - **`conventions`**: the note the agent must read before its first write, so new notes match your naming, frontmatter and folder rules.
43
+ - **`inbox`**: where the agent drops a note it cannot confidently file, instead of guessing.
44
+ - **`protected`**: folders the agent must never write to.
45
+
46
+ You can declare several wikis. An empty `wikis` list keeps the feature off. The file may hold private paths. It is specific to this machine and must never be committed. A project install's own `.gitignore` already lists it.
47
+
48
+ Geneseed looks for the file in this order: `$GENESEED_WIKI`, then `$GENESEED_HARNESS/wiki.jsonc`, then beside the installed `AGENT.md`. A `wiki.json` left by an older install is still read at each of those places.
49
+
50
+ ## How each host honours it
51
+
52
+ <!--harness:opencode-->
53
+ *(OpenCode only)*
54
+
55
+ The context plugin loads your eager entries and lists your lazy ones at session start. A big vault's lazy list stops at 200 notes and shows a count of the rest (`GENESEED_WIKI_LAZY_LIMIT` changes the limit). The guard plugin **blocks** any write into a `protected` folder at the tool boundary, before the write happens. `GENESEED_GUARD=warn` turns the block into a warning, and `GENESEED_GUARD=off` disables the guard.
56
+ <!--/harness-->
57
+
58
+ <!--harness:claude-->
59
+ *(Claude Code only)*
60
+
61
+ No hook reads the wiki. The instructions in your harness tell the agent to read `wiki.jsonc` at session start and to honour it, including the `protected` folders. That is an instruction the model follows, not a block. Nothing stops a write at the tool boundary. The same applies to Bob, OpenClaude and plain `AGENT.md` tools. See [Enforced vs. asked](../understand/enforced-vs-asked.md).
62
+ <!--/harness-->
63
+
64
+ ## What the agent does with it
65
+
66
+ The `wiki` skill drives the procedure.
67
+
68
+ - **Reading.** The agent starts from your entry notes and moves outward by your own structure, following `[[wikilinks]]` and index notes, instead of reading the whole vault. It treats what it reads as true when written, and checks it against the live system before building on it.
69
+ - **Writing.** Durable, reusable facts that span projects go back into the wiki as proper notes: wikilinked, in your house style, filed where your structure says (or in the inbox). Session details stay in memory, and secrets are never written anywhere. The agent never restructures the vault. Moving and renaming notes is your call.