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.
- package/CHANGELOG.md +96 -0
- package/DESIGN.md +1 -1
- package/README.md +27 -45
- package/SHIPPED.md +2 -2
- package/adapters/bob/README.md +1 -1
- package/adapters/claude-code/README.md +17 -12
- package/adapters/openclaude/README.md +1 -1
- package/adapters/opencode/README.md +4 -4
- package/adapters/opencode/plugins/geneseed-guard.js +157 -2
- package/bin/build-driver.mjs +2 -0
- package/bin/geneseed-cli.mjs +21 -0
- package/bin/geneseed-hook.mjs +2 -0
- package/docs/README.md +42 -0
- package/docs/_groups.json +18 -0
- package/docs/concepts/agents.md +44 -0
- package/docs/concepts/collaboration.md +62 -0
- package/docs/concepts/exclusions.md +55 -0
- package/docs/concepts/footprint.md +52 -0
- package/docs/concepts/foreman-mode.md +69 -0
- package/docs/concepts/hooks.md +101 -0
- package/docs/concepts/hosts.md +55 -0
- package/docs/concepts/loops.md +165 -0
- package/docs/concepts/lsp.md +50 -0
- package/docs/{web → concepts}/memory.md +2 -2
- package/docs/{web → concepts}/notebook.md +2 -2
- package/docs/concepts/rules.md +52 -0
- package/docs/concepts/skills.md +49 -0
- package/docs/concepts/themes.md +50 -0
- package/docs/extending.md +32 -21
- package/docs/guides/autostart.md +70 -0
- package/docs/guides/choose-your-setup.md +134 -0
- package/docs/guides/headless.md +22 -0
- package/docs/guides/install.md +161 -0
- package/docs/guides/mcp.md +195 -0
- package/docs/guides/migrate.md +41 -0
- package/docs/guides/project-context.md +87 -0
- package/docs/guides/run-anywhere.md +45 -0
- package/docs/guides/uninstall.md +51 -0
- package/docs/guides/upgrade.md +65 -0
- package/docs/guides/verify.md +65 -0
- package/docs/guides/wiki.md +69 -0
- package/docs/guides/worktree.md +47 -0
- package/docs/reference/about.md +7 -0
- package/docs/reference/cli.md +7 -0
- package/docs/reference/environment.md +99 -0
- package/docs/reference/glossary.md +37 -0
- package/docs/reference/opencode-plugins.md +133 -0
- package/docs/reference/troubleshooting.md +350 -0
- package/docs/understand/a-day.md +77 -0
- package/docs/understand/enforced-vs-asked.md +64 -0
- package/docs/understand/harness.md +36 -0
- package/docs/understand/on-your-machine.md +76 -0
- package/docs/web-ui.md +13 -2
- package/harness.config.json +1 -1
- package/js/README.md +27 -4
- package/js/build/driver.mjs +14 -8
- package/js/build/generate.mjs +22 -7
- package/js/build/render.mjs +5 -0
- package/js/build/source.mjs +11 -1
- package/js/cli-table.json +236 -1
- package/js/hosts/gitref.mjs +99 -0
- package/js/hosts/hooks.mjs +88 -1
- package/js/hosts/installs.mjs +21 -0
- package/js/hosts/mcp.mjs +1 -1
- package/js/hosts/settings.mjs +13 -1
- package/js/inspect/checks-authoring.mjs +15 -3
- package/js/inspect/diff.mjs +3 -0
- package/js/inspect/doctor.mjs +3 -2
- package/js/inspect/inventory.mjs +2 -1
- package/js/inspect/registry.mjs +20 -3
- package/js/inspect/status.mjs +8 -3
- package/js/lib/node-floor.mjs +30 -0
- package/js/loop/catalog.mjs +116 -0
- package/js/loop/cli.mjs +151 -0
- package/js/loop/graph.mjs +145 -0
- package/js/loop/score.mjs +143 -0
- package/js/loop/state.mjs +322 -0
- package/js/maintain/migrate.mjs +4 -2
- package/js/maintain/setup.mjs +109 -21
- package/js/maintain/update.mjs +4 -15
- package/js/ui/cli.mjs +2 -2
- package/js/web/actions.mjs +9 -3
- package/js/web/api.mjs +41 -2
- package/js/web/daemon.mjs +94 -4
- package/js/web/docs.mjs +149 -65
- package/js/web/handler.mjs +1 -0
- package/js/web/jobs.mjs +3 -1
- package/js/web/server.mjs +10 -5
- package/package.json +6 -4
- package/registry.json +21 -0
- package/src/AGENT.md.tmpl +6 -0
- package/src/bricks/README.md +32 -0
- package/src/bricks/_template.md +32 -0
- package/src/bricks/apply.md +17 -0
- package/src/bricks/baseline-green.md +17 -0
- package/src/bricks/bruno-test.md +16 -0
- package/src/bricks/ci-fix.md +17 -0
- package/src/bricks/deps-audit.md +14 -0
- package/src/bricks/docs-update.md +15 -0
- package/src/bricks/identify.md +20 -0
- package/src/bricks/lint.md +14 -0
- package/src/bricks/plan.md +17 -0
- package/src/bricks/reproduce.md +16 -0
- package/src/bricks/review.md +17 -0
- package/src/bricks/security-scan.md +17 -0
- package/src/bricks/test.md +14 -0
- package/src/doctrines/process.md +11 -8
- package/src/loops/bugfix.json +22 -0
- package/src/loops/feature.json +21 -0
- package/src/loops/refactor.json +20 -0
- package/src/postures/mentor.md +1 -0
- package/src/skills/brick-forge.md +46 -0
- package/src/skills/geneseed.md +1 -1
- package/src/skills/learn-mode.md +89 -0
- package/src/skills/loop.md +99 -0
- package/src/skills/pipeline.md +2 -2
- package/src/skills/quiz.md +2 -1
- package/src/skills/teach.md +2 -1
- package/themes/_TEMPLATE.json +3 -0
- package/themes/biker.json +3 -0
- package/themes/commentator.json +3 -0
- package/themes/cyberpunk.json +3 -0
- package/themes/gamer.json +3 -0
- package/themes/imperial.json +3 -0
- package/themes/joker.json +3 -0
- package/themes/marvin.json +3 -0
- package/themes/mean.json +3 -0
- package/themes/military.json +3 -0
- package/themes/neutral.json +3 -0
- package/themes/pirate.json +3 -0
- package/themes/sports.json +3 -0
- package/themes/verstappen.json +3 -0
- package/themes/wizard.json +3 -0
- package/web/dist/assets/Activity-GaaZWXTY.js +1 -0
- package/web/dist/assets/ActivityDetail-4t7d45Du.js +1 -0
- package/web/dist/assets/Dashboard-CYn7Tp16.js +2 -0
- package/web/dist/assets/Docs-BeFKLg2T.js +5 -0
- package/web/dist/assets/{GreenhouseView-D0cbCJ5m.js → GreenhouseView-C6ibc8IE.js} +1 -1
- package/web/dist/assets/Installs-DRYjYnxs.js +2 -0
- package/web/dist/assets/JournalView-1HbU1mfg.js +1 -0
- package/web/dist/assets/Laws-DFoG8JWB.js +3 -0
- package/web/dist/assets/Library-DDjgNwz_.js +1 -0
- package/web/dist/assets/Loops-D9VEoO0F.js +1 -0
- package/web/dist/assets/{Markdown-CkFyfgNf.js → Markdown-qjM2_ofS.js} +5 -5
- package/web/dist/assets/{OperatorHudView-CiAkAkQL.js → OperatorHudView-Bs7paWmh.js} +1 -1
- package/web/dist/assets/Personal-BY5n4gTw.js +1 -0
- package/web/dist/assets/Tabs-ho-EYD8i.js +1 -0
- package/web/dist/assets/api-CyMRbU2x.js +1 -0
- package/web/dist/assets/drawable-CLS9drMb.js +1 -0
- package/web/dist/assets/index-CX_hXMi5.css +1 -0
- package/web/dist/assets/index-Cjr7XCA3.js +2 -0
- package/web/dist/index.html +3 -2
- package/QUICKSTART.md +0 -50
- package/SETUP.md +0 -1148
- package/docs/web/_groups.json +0 -45
- package/docs/web/about.md +0 -6
- package/docs/web/adapters-claude-code.md +0 -8
- package/docs/web/adapters-opencode-loads.md +0 -8
- package/docs/web/adapters-opencode-spec.md +0 -8
- package/docs/web/adapters-opencode.md +0 -8
- package/docs/web/agents.md +0 -8
- package/docs/web/authoring.md +0 -11
- package/docs/web/autostart.md +0 -9
- package/docs/web/claude-hooks.md +0 -37
- package/docs/web/cli.md +0 -6
- package/docs/web/collaboration.md +0 -27
- package/docs/web/configure-wiki.md +0 -9
- package/docs/web/design.md +0 -7
- package/docs/web/env-knobs.md +0 -9
- package/docs/web/exclusions.md +0 -26
- package/docs/web/first-session.md +0 -28
- package/docs/web/footprint.md +0 -38
- package/docs/web/foreman-mode.md +0 -33
- package/docs/web/glossary.md +0 -6
- package/docs/web/harnesses.md +0 -30
- package/docs/web/headless.md +0 -9
- package/docs/web/ingest-docs.md +0 -9
- package/docs/web/install-paths.md +0 -9
- package/docs/web/install-quick.md +0 -35
- package/docs/web/lsp-overview.md +0 -37
- package/docs/web/mcp-claude-code.md +0 -10
- package/docs/web/mcp-filesystem.md +0 -9
- package/docs/web/mcp-gitlab.md +0 -9
- package/docs/web/mcp-markitdown.md +0 -9
- package/docs/web/mcp-overview.md +0 -34
- package/docs/web/mcp-trouble.md +0 -9
- package/docs/web/mcp-verify.md +0 -9
- package/docs/web/migrate.md +0 -39
- package/docs/web/model.md +0 -20
- package/docs/web/pipelines.md +0 -24
- package/docs/web/plugin-activity.md +0 -23
- package/docs/web/plugin-context.md +0 -26
- package/docs/web/plugin-guard.md +0 -24
- package/docs/web/plugin-learn.md +0 -27
- package/docs/web/plugin-notify.md +0 -24
- package/docs/web/plugin-ponytail.md +0 -23
- package/docs/web/plugin-setup.md +0 -7
- package/docs/web/plugin-workflow.md +0 -25
- package/docs/web/plugins.md +0 -17
- package/docs/web/project-context.md +0 -9
- package/docs/web/rules.md +0 -30
- package/docs/web/run-anywhere.md +0 -9
- package/docs/web/self-improve.md +0 -8
- package/docs/web/setup-choices.md +0 -64
- package/docs/web/skills.md +0 -8
- package/docs/web/themes-author.md +0 -20
- package/docs/web/themes.md +0 -9
- package/docs/web/token-footprint.md +0 -7
- package/docs/web/trouble.md +0 -38
- package/docs/web/upgrade.md +0 -9
- package/docs/web/verify.md +0 -30
- package/docs/web/wiki.md +0 -7
- package/docs/web/worktree.md +0 -10
- package/docs/wiki.md +0 -43
- package/web/dist/assets/Activity-BjVp522q.js +0 -1
- package/web/dist/assets/ActivityDetail-8ep1bspW.js +0 -1
- package/web/dist/assets/Dashboard-OkC_PCH6.js +0 -2
- package/web/dist/assets/Docs-CKPWz00o.js +0 -2
- package/web/dist/assets/Installs-BtGGdoTt.js +0 -2
- package/web/dist/assets/JournalView-Ckl4dmzR.js +0 -1
- package/web/dist/assets/Laws-CLpdRRk8.js +0 -3
- package/web/dist/assets/Library-wPPuKQrI.js +0 -1
- package/web/dist/assets/Personal-D8CnDo9v.js +0 -1
- package/web/dist/assets/Tabs-B4HNrrCs.js +0 -1
- package/web/dist/assets/drawable-BiwaOo6x.js +0 -1
- package/web/dist/assets/index-C1yil5j1.js +0 -2
- package/web/dist/assets/index-CDPDk2vj.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,102 @@ label. For the capability ↔ spec map, see [SHIPPED.md](SHIPPED.md).
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [3.12.0] — 2026-10-03
|
|
12
|
+
|
|
13
|
+
**Upgrading:** re-emit after installing (`geneseed rebuild-all`) to get the `loop` and
|
|
14
|
+
`brick-forge` skills, the loop-branch git-gate rule and the amended consent doctrine; then
|
|
15
|
+
`geneseed web restart` for the Loops page.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- **Loops** — work a requirement in small validated iterations on a `loop/*` branch. A loop is a
|
|
19
|
+
graph of reusable **bricks** (13 shipped in `src/bricks/`; templates `bugfix`, `refactor`,
|
|
20
|
+
`feature` in `src/loops/`), or a graph the model composes from the catalogue. Your own bricks
|
|
21
|
+
live in `$XDG_CONFIG_HOME/geneseed/` or a repo's `.geneseed/`, and override shipped ones by name.
|
|
22
|
+
- **`geneseed loop check|init|next|score|record|decide`** — a deterministic state machine: the
|
|
23
|
+
model only reports outcomes. Each iteration's risk is the max of its declared actions' weights,
|
|
24
|
+
re-scored on the real diff before commit; `LOOP.md` holds the state and every iteration commit
|
|
25
|
+
carries `Loop-*` trailers. Ceilings: 20 iterations, 2 empty diffs, one re-split of an exhausted
|
|
26
|
+
inner ring.
|
|
27
|
+
- **`--trust prudent|balanced|aggressive`** build axis (default balanced, also in the console's
|
|
28
|
+
install form) — how much a loop may do before it stops: silent (trailers only), soft (listed for
|
|
29
|
+
review at the end), or blocking (the run ends and `geneseed loop decide` resumes it).
|
|
30
|
+
- **`loop` and `brick-forge` skills.**
|
|
31
|
+
- **Console: Loops page** — templates drawn as rings (inner rings for apply ⇄ test and review ⇄
|
|
32
|
+
fix, a gate before the first code-changing step), every brick with its source and origin, and
|
|
33
|
+
catalogue problems.
|
|
34
|
+
- **Documentation for loops** (`docs/concepts/loops.md`): bricks, templates and the three
|
|
35
|
+
origins, the trust presets and the three validation levels, `LOOP.md` and its trailers, the
|
|
36
|
+
`loop/*` branch exemption and why merging always asks, and the `geneseed loop` actions table.
|
|
37
|
+
Cross-linked from `foreman-mode.md`; `glossary.md` gains `brick`, `iteration`, `loop` and
|
|
38
|
+
`trust preset`.
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
- **Consent Before Push**: a launched loop's batch covers commit and push on its own `loop/*`
|
|
42
|
+
branch, in a fixed set of command forms (`git commit -F <file>`, `git push <remote> HEAD:<loop
|
|
43
|
+
branch>`); anything else asks, the final commit asks, and merging never belongs to the batch.
|
|
44
|
+
Enforced by the git gate on Claude Code, Bob and OpenClaude, and by `geneseed-guard` on OpenCode.
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
- **`geneseed web stop|restart|status --port N`** act on that port only; a stop aimed at a test
|
|
48
|
+
instance no longer shuts down the console recorded on another port (#175).
|
|
49
|
+
|
|
50
|
+
## [3.11.0] — 2026-10-03
|
|
51
|
+
|
|
52
|
+
**Upgrading:** re-emit after installing (`geneseed rebuild-all`) — it also repairs a dead hook
|
|
53
|
+
shim and restarts a console left running on old code.
|
|
54
|
+
|
|
55
|
+
### Added
|
|
56
|
+
- **`learn-mode` skill** (user-invoked): you design at checkpoints, the agent writes only what an
|
|
57
|
+
answered checkpoint approved. State lives in `.geneseed/learn.md`, anchored by two lines in
|
|
58
|
+
`AGENT.md`'s Mode section; no hook changes. Inspired by nykooi1/vibe-wise (MIT), rewritten.
|
|
59
|
+
- **One-step installers** — `install` / `install.cmd` / `install.command` check Node ≥ 22.3 and
|
|
60
|
+
git with per-OS hints (they never install anything), then run setup and offer the web console.
|
|
61
|
+
- **Setup lists the tools it can install into** — OpenCode, Claude Code, IBM Bob and OpenClaude,
|
|
62
|
+
each found on PATH or shown with its install link — and asks before going on when none is present.
|
|
63
|
+
|
|
64
|
+
### Changed
|
|
65
|
+
- **The documentation is one tree, read on GitHub and in the console.** `docs/understand/`,
|
|
66
|
+
`docs/guides/`, `docs/concepts/` and `docs/reference/` replace `docs/web/`, `SETUP.md`,
|
|
67
|
+
`QUICKSTART.md` and `docs/wiki.md`; `docs/README.md` is the index. Install paths, every
|
|
68
|
+
configuration knob and MCP setup now live in `docs/guides/`; environment variables and
|
|
69
|
+
troubleshooting (organised by symptom) in `docs/reference/`. Every page was audited against
|
|
70
|
+
the code first, and a dozen wrong or stale claims were corrected on the way.
|
|
71
|
+
- **New: Understand**, four pages for developers new to agent harnesses — what a harness is,
|
|
72
|
+
what lands on your machine (per host: every file and hook, what it does, what it costs, how to
|
|
73
|
+
turn it off), a day with it, and what is enforced versus only asked.
|
|
74
|
+
- **Console Docs tab**: a three-column handbook with an "on this page" margin and glossary cards
|
|
75
|
+
for the terms a page uses; Understand renders as a step-by-step track with progress; "what
|
|
76
|
+
lands on your machine" is an interactive map; the Overview offers a dismissible "New here?"
|
|
77
|
+
card. Relative `.md` links work in both places.
|
|
78
|
+
- **The glossary** is a markdown table (`docs/reference/glossary.md`) with a developer analogy
|
|
79
|
+
per term, so GitHub readers get it too.
|
|
80
|
+
|
|
81
|
+
### Fixed
|
|
82
|
+
- **Docs no longer claim a foreman pipeline merges on its own.** It hands back an uncommitted
|
|
83
|
+
worktree; the session re-runs the proof and merges only once you accept. The Claude hooks page
|
|
84
|
+
no longer says dropping the process pack loses the git gate — destructive git is still refused.
|
|
85
|
+
- The console's CLI reference printed every command as `harness <verb>`; it says `geneseed`.
|
|
86
|
+
- The `pipeline` skill said the parent merges on the crew's own proof without re-verifying; it
|
|
87
|
+
re-runs the proof and merges only once you accept, as foreman mode always said.
|
|
88
|
+
- **Dead hooks are said out loud.** When the machine's hook shim points at a folder that no
|
|
89
|
+
longer exists, every Claude Code, Bob and OpenClaude hook is silently off. Every `geneseed`
|
|
90
|
+
command now warns about it on stderr (`GENESEED_NO_SHIM_CHECK=1` silences it), and the `gates`
|
|
91
|
+
row of `geneseed status` reads `DEAD` instead of `armed`. `geneseed rebuild-all` repairs it.
|
|
92
|
+
- **Scratch installs stay out of the install list.** Installs built under the OS temp folder
|
|
93
|
+
(agent scratchpads, throwaway tests) are no longer registered, and existing ones are dropped,
|
|
94
|
+
so `rebuild-all` and `status` only cover real installs.
|
|
95
|
+
- **A console running old code says so.** After an upgrade replaced the console's files, a
|
|
96
|
+
still-running console served a page that could not load. `geneseed web status` and a banner on
|
|
97
|
+
the console now say when it is out of date, the banner restarts it, and `rebuild-all`
|
|
98
|
+
restarts a stale console by itself.
|
|
99
|
+
- **An old Node gets one sentence.** Below Node 22.3 every Geneseed command — including `npx`,
|
|
100
|
+
a global npm install and the hooks — says which Node it needs instead of crashing with a
|
|
101
|
+
stack trace.
|
|
102
|
+
- **The end of setup tells the truth for every host.** It names the file each tool really loads
|
|
103
|
+
and where it is, the hooks wired for Claude Code, Bob and OpenClaude, whether memory learning
|
|
104
|
+
is on, the right tool to restart, and where to read what was installed. A successful Claude
|
|
105
|
+
Code install no longer ends on "expected AGENT.md … but it is not there".
|
|
106
|
+
|
|
11
107
|
## [3.10.0] — 2026-10-01
|
|
12
108
|
|
|
13
109
|
**Upgrading:** re-emit after installing (`geneseed rebuild-all`). A Copilot install is no longer
|
package/DESIGN.md
CHANGED
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[](package.json)
|
|
11
11
|
[](package.json)
|
|
12
12
|
[](themes/)
|
|
13
|
-
[](src/skills/)
|
|
14
14
|
[](src/agents/)
|
|
15
15
|
[](src/laws/universal.md)
|
|
16
16
|
[](adapters/opencode/plugins/)
|
|
@@ -37,11 +37,11 @@ Want to read what it leaves behind before installing anything? [**geneseed-demo*
|
|
|
37
37
|
A hand-written instructions file is prose the model may or may not honour, copied into every repo and drifting in each one. Geneseed is a build, and that changes four things:
|
|
38
38
|
|
|
39
39
|
- **Laws are enforced, not suggested.** A force-push, a `reset --hard`, or a credential written into a tracked file is caught by a hook *before* the tool runs, in the host's own dialect — a prompt on Claude Code and OpenClaude, a hard block on OpenCode, exit 2 on Bob. The gates fail closed, and every catch is one line in a ledger that `geneseed status` counts.
|
|
40
|
-
- **One source, five targets.** Skills are byte-identical on every host; only the wiring differs. Every commit renders all
|
|
40
|
+
- **One source, five targets.** Skills are byte-identical on every host; only the wiring differs. Every commit renders all 263 emit configurations, and a second emit into the same tree must change nothing.
|
|
41
41
|
- **Costs are measured, not guessed.** Zero runtime dependencies. The hook path loads in about 14 ms per tool call. The default *lean* footprint keeps the always-on context small and puts the full rationale one read away — the numbers are in [docs/token-footprint.md](docs/token-footprint.md).
|
|
42
42
|
- **It follows you.** Install once, globally; every repo inherits it. One `git pull` or `npm install -g geneseed@latest` rebuilds every active install.
|
|
43
43
|
|
|
44
|
-
This page is the overview.
|
|
44
|
+
This page is the overview. **New to agent harnesses?** Start with [Understand](docs/understand/harness.md) — four short pages on what a harness is, what lands on your machine, what changes in your day, and what is enforced versus only asked. Everything else — every install path, configuration knob, and troubleshooting step — is in the **[documentation](docs/README.md)**, which the web console also renders.
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
@@ -83,38 +83,43 @@ npm install -g geneseed # then plain `geneseed <command>` from any directo
|
|
|
83
83
|
npm install -g geneseed@latest # …and that is also the update
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
Every other route (Claude Code, Bob, OpenClaude, plain `AGENT.md`, per-repo installs) is in the **[install guide](docs/guides/install.md)**.
|
|
87
87
|
|
|
88
88
|
### 🧬 The long way — a git checkout
|
|
89
89
|
|
|
90
|
-
Cloning
|
|
90
|
+
Cloning is the route when npm is out of reach (a corporate network with no registry access) or when you intend to *change* the harness rather than use it. It needs **git** and the same **Node ≥ 22.3** as everything else — there is nothing extra to install.
|
|
91
|
+
|
|
92
|
+
**One step: run the installer at the root of the clone.** It checks that Node ≥ 22.3 and git are there and, when one is missing, says exactly what to install and where (on a managed PC: Software Center / Company Portal) — it never installs anything itself. Then it runs the setup wizard — which opens by listing the AI coding tools it can install into (OpenCode, Claude Code, IBM Bob, OpenClaude), each `ok` or with its install link, and asks before going on when none is there — and offers to open the web console.
|
|
91
93
|
|
|
92
94
|
```bash
|
|
93
95
|
git clone https://github.com/Arylmera/Geneseed.git
|
|
94
96
|
cd Geneseed
|
|
95
|
-
./
|
|
97
|
+
./install # prerequisites, then the wizard
|
|
96
98
|
```
|
|
97
99
|
|
|
98
|
-
**
|
|
100
|
+
**macOS** — or double-click `install.command` in the Finder (it opens in Terminal). **Linux** — `./install` from any shell. On both, a missing prerequisite comes with the platform's own fix: Homebrew or the Command Line Tools on macOS, nvm/NodeSource or the package manager on Linux.
|
|
101
|
+
|
|
102
|
+
**Windows** — native, no bash, WSL, curl, unzip or PowerShell script; double-click `install.cmd` in Explorer, or from cmd or PowerShell:
|
|
99
103
|
|
|
100
104
|
```powershell
|
|
101
105
|
git clone https://github.com/Arylmera/Geneseed.git
|
|
102
106
|
cd Geneseed
|
|
103
|
-
.\
|
|
104
|
-
# PowerShell runs a .cmd directly, so this is the PowerShell spelling too
|
|
107
|
+
.\install.cmd # prerequisites, then the wizard
|
|
105
108
|
```
|
|
106
109
|
|
|
110
|
+
Afterwards, `./geneseed setup` (`.\geneseed.cmd setup`) re-runs the wizard and bare `./geneseed` (`.\geneseed.cmd`) opens the web console. PowerShell runs a `.cmd` directly, so that is the PowerShell spelling too.
|
|
111
|
+
|
|
107
112
|
Both launchers are thin shims over the Node CLI: they need `node` (22.3+) on `PATH`, and nothing else. Set `GENESEED_NODE` to an absolute path if `node` is not on `PATH` — under a version manager that only patches interactive shells, say. The wizard is plain text prompts on every console, old or new.
|
|
108
113
|
|
|
109
114
|
### 🟩 One runtime — Node, and nothing else
|
|
110
115
|
|
|
111
|
-
Node ≥ 22.3 is the entire dependency list — every command, all five hook verbs, the web console and both generators run from it, and nothing any bundle ships needs a second interpreter.
|
|
116
|
+
Node ≥ 22.3 is the entire dependency list — every command, all five hook verbs, the web console and both generators run from it, and nothing any bundle ships needs a second interpreter.
|
|
112
117
|
|
|
113
118
|
### ✅ After installing
|
|
114
119
|
|
|
115
|
-
- **Verify** — open your agent in any repo: the first reply starts with the readiness sigil and your project's docs are already in context. `geneseed doctor` should print `ok`.
|
|
116
|
-
- **Run it from anywhere** — a global `npm install -g geneseed` already does this
|
|
117
|
-
- **
|
|
120
|
+
- **Verify** — open your agent in any repo: the first reply starts with the readiness sigil and your project's docs are already in context. `geneseed doctor` should print `ok`. More in [Verify it works](docs/guides/verify.md).
|
|
121
|
+
- **Run it from anywhere** — a global `npm install -g geneseed` already does this; from a checkout see [Run geneseed from anywhere](docs/guides/run-anywhere.md).
|
|
122
|
+
- **Something wrong?** [Troubleshooting](docs/reference/troubleshooting.md) is organised by what you see.
|
|
118
123
|
|
|
119
124
|
---
|
|
120
125
|
|
|
@@ -137,14 +142,7 @@ geneseed web stop # stop the daemon
|
|
|
137
142
|
geneseed web status # is it running, and where
|
|
138
143
|
```
|
|
139
144
|
|
|
140
|
-
The
|
|
141
|
-
|
|
142
|
-
| Group | Views |
|
|
143
|
-
| --- | --- |
|
|
144
|
-
| *(ungrouped)* | **Dashboard** — live readout of what's deployed (voice, capabilities, drift, recent jobs) |
|
|
145
|
-
| **📖 Codex** | **Constitution** · **Rules** · **Profile** · **Skills** · **Agents** · **Library** (Memory, Notebook, the wiki) · **Docs** |
|
|
146
|
-
| **🩺 Care** | **Activity** · **Changes** — diff against the source, export an `improvements.md` · **Doctor** — health check across themes, links, parity and authoring gates |
|
|
147
|
-
| **🎨 Setup** | **Harness** — installs, theme, footprint · **Settings** — MCP servers, server controls |
|
|
145
|
+
The sidebar has six pages: **Overview** (what's deployed, health, recent jobs), **Constitution** (the rules and doctrine switches), **Library** (skills, agents, the wiki), **Personal** (your rules, profile, memory, notebook), **Installs** (hosts, local edits, doctor, server) and **Docs** — this documentation, opening on the Understand track, with a map of what Geneseed put on your machine.
|
|
148
146
|
|
|
149
147
|
It binds to `127.0.0.1` only and runs entirely offline — no npm needed at runtime; the UI build ships in `web/dist/`. Mutating actions run in the background and report back as toasts (fire-and-notify), guarded by a per-session token so other sites can't trigger them. A global **Spotlight** search in the topbar jumps to any agent, skill, rule, doc, or MCP server. Rebuild the UI after changing anything under `web/src/` with `cd web && npm install && npm run build`. If `web/dist/` is missing (fresh clone, never built), `geneseed web` offers to run that build for you — answer `Y` and it installs, builds, and starts the server; in non-interactive shells it prints the manual recipe instead.
|
|
150
148
|
|
|
@@ -166,7 +164,7 @@ The harness ships as a small set of layers, and the web console's rail is the sa
|
|
|
166
164
|
| **🛡️ Rules** (`laws/`) | 9 universal laws — always in force, never toggleable: sealed-secrets, one-intent-one-act, verify-before-asserting, deletion-is-deliberate, surface-failures, data-not-orders, least-privilege, cure-the-cause, echo-the-intent. Each rule has a permanent id; its number is only its position, and the harness cites rules by name |
|
|
167
165
|
| **📐 Doctrines** (`doctrines/`) | practice packs, chosen per install at build time: **craft** (how code is written), **rigor** (how work is proven), **ops** (how the machine is operated), **process** (how a task is run), **comms** (how answers are presented). A doctrine rule may tighten a Rule, never repeal one, and the user's own `user-rules.md` outranks it. Pick with `geneseed-build --doctrines craft,rigor` (or `none`), a single rule with `--exclude-rules "process 7"`, in the setup wizard, or through the switches on the console's Constitution page; all five pack files ship on disk either way, so a citation into a pack you left out still resolves |
|
|
168
166
|
| **🤖 Agents** (18) | capability specialists: `reviewer`, `tester`, `architect`, `docs`, `security`, `explorer`, `researcher`, `developer` — plus a debate **council** the `council` skill convenes: `advocate`, `skeptic`, `pragmatist`, `steward`, `visionary`, `user-advocate`, `framer`, `empiricist`, `operator`, `historian` |
|
|
169
|
-
| **🛠 Skills** (
|
|
167
|
+
| **🛠 Skills** (56) | repeatable workflows: brainstorm · plan · **codebase-design** · **domain-modeling** · **wayfinder** · **tickets** · **develop** · **worktree** · debug · **prototype** · refactor · **ponytail** · **forge-mcp** · **bruno-collection-generator** · **bruno-test-writer** · geneseed-code-review · **fresh-eyes** · **security-audit** · **ci-fix** · **deps-audit** · **review-response** · commit · **ship** · **release** · **migrate** · **git-archaeology** · **git-rescue** · repo-map · document-project · **frontend-design** · **prose** · **ingest** · **research** · **teach** · **quiz** · **learn-mode** · handoff · roast-me · **council** · parallel-agents · **workflow** · **wiki** · **geneseed** · **rule** · **profile** · **consolidate-memory** · **skill-forge** · **opencode-theme** · **herdr** · **pipeline** · **loop** · **brick-forge** · **daydream** · **react-view-transitions** · **token-report** · **explain-changes** |
|
|
170
168
|
| **🔌 Plugins** (OpenCode) | `geneseed-context` injects project docs *and your machine wiki* every session (and across compaction); `geneseed-learn` distils memory at session end; `geneseed-guard` enforces the safety Laws and protected wiki folders at the tool boundary; `geneseed-workflow` registers the `workflow` tool that runs saved orchestration scripts; `geneseed-notify` sends a native OS notification when a long run finishes; `geneseed-ponytail` holds a minimal-code mode (`/ponytail lite\|full\|ultra\|off`), opt-in, injecting the laziest-that-works ruleset every turn so it doesn't drift; `geneseed-activity` streams what each session is doing to the web console's Activity view |
|
|
171
169
|
| **🧠 Memory** (`memory/`) | one-fact-per-file durable knowledge, indexed by `MEMORY.md` (git-ignored, personal) |
|
|
172
170
|
| **📓 Notebook** (`notebook/`) | the agent's sovereign space — any medium (code, tools, data, notes), self-ruled via a seed-once charter, always git-ignored; only its `.gitignore` is build-asserted |
|
|
@@ -197,26 +195,11 @@ Fourteen themes ship — each a single JSON file in `themes/` carrying voice tok
|
|
|
197
195
|
| 🏟️ **sports** | play-by-play commentary |
|
|
198
196
|
| 🏍 **biker** · 🎤 **commentator** · 🃏 **joker** · 🤖 **marvin** · 😤 **mean** · 🏎 **verstappen** | community-added voices for fun |
|
|
199
197
|
|
|
200
|
-
Pick with `--theme NAME` or via the setup wizard
|
|
198
|
+
Pick with `--theme NAME` or via the setup wizard; upgrades remember it. More in [Themes](docs/concepts/themes.md).
|
|
201
199
|
|
|
202
200
|
### 🪶 Footprint (lean vs full)
|
|
203
201
|
|
|
204
|
-
A second per-install dial
|
|
205
|
-
|
|
206
|
-
| Footprint | The Ethos + Sections 1–2 of `AGENT.md` | Trade-off |
|
|
207
|
-
| --- | --- | --- |
|
|
208
|
-
| **lean** *(default)* | the Ethos, each Rule and each active doctrine rule in their **authored** short form; then pointers to the full text | lighter every turn; rationale is one on-demand read away |
|
|
209
|
-
| **full** | the Ethos, every Rule and every active doctrine rule at complete text **and** rationale, inlined | maximum guidance density; largest per-turn token cost |
|
|
210
|
-
|
|
211
|
-
**Lean is authored, not cut.** The Ethos, every Rule and every doctrine rule carry a hand-written lean form beside their full text (`LEAN` blocks in `src/`), so a rule's lean footprint is decided by its author and not by where its first full stop happens to fall — the earlier first-sentence cut shipped Rule II as one 36-character line and dropped its stop-and-ask mechanism, and shipped a doctrine rule like *Change as little as the task requires.* as six words with no verb to act on.
|
|
212
|
-
|
|
213
|
-
Both footprints put the full text on disk beside `AGENT.md`: `laws/`, `ontology/` and `doctrines/` all ship in the bundle at **full** text whatever the footprint, and **all five pack files ship whether or not the pack was built in** — which is what lets a citation into an inactive pack resolve. So lean is a context/token optimization, **not** a rules cut.
|
|
214
|
-
|
|
215
|
-
Lean is the default: the rationale is one read away and the context it frees is paid back on every turn. Switch to **full** when token cost is a non-issue or you run a smaller model, which leans harder on always-present rationale. Set it with `--footprint lean|full`, the Settings toggle, the per-harness dropdown in the Harnesses tab, or the setup wizard. It's remembered in a `.geneseed-footprint` marker and preserved across rebuilds, on every host (OpenCode, Claude Code, Bob, OpenClaude).
|
|
216
|
-
|
|
217
|
-
Either way the harness is otherwise identical — same files, Rules, capabilities, and guards; lean only relocates the *reasoning* to on-demand (and adds the standalone law, ontology and doctrine files to global/Claude/Bob installs). The one behavioural edge: with the rationale always in context, **full** applies a rule's nuance more reliably on subtle edge cases — or with a weaker model that may not reach for the pointer.
|
|
218
|
-
|
|
219
|
-
Want to check a build before it touches anything real? `geneseed validate --theme NAME --emit MODE --out TARGET` renders and validates into a throwaway sandbox — nothing under `--out`/`--root` is written — and exits non-zero on any problem. Details: [SETUP.md](SETUP.md#dry-run-a-build-validate).
|
|
202
|
+
A second per-install dial sets how much of the constitution the root file carries *inline* every turn — a token-cost knob, not a change to which Rules apply. **lean** (the default) carries each rule's hand-written short form and points to the full text on disk; **full** inlines every rule with its rationale. Every rule is in force either way. More in [Footprint](docs/concepts/footprint.md) and [Choose your setup](docs/guides/choose-your-setup.md).
|
|
220
203
|
|
|
221
204
|
---
|
|
222
205
|
|
|
@@ -292,7 +275,8 @@ Geneseed/
|
|
|
292
275
|
├── themes/ voice token maps (14 themes shipped)
|
|
293
276
|
├── web/ Vite + React UI source; the committed web/dist/ build is what ships
|
|
294
277
|
├── tests/ Node test suites, golden.mjs (every emit config) and mutate.mjs
|
|
295
|
-
├── docs/ guides
|
|
278
|
+
├── docs/ understand/ guides/ concepts/ reference/ — the docs, also the console's
|
|
279
|
+
│ Docs pages; maintainer notes beside them (extending, design-history…);
|
|
296
280
|
│ specs/, reviews/, superpowers/ are local working docs — git-ignored
|
|
297
281
|
├── adapters/ per-host glue (opencode/, claude-code/, bob/, openclaude/)
|
|
298
282
|
└── .github/workflows/ ci.yml (doctor + tests) · publish.yml (npm, OIDC, manual only)
|
|
@@ -324,19 +308,17 @@ geneseed rebuild-all # re-render every registered install in its own theme + m
|
|
|
324
308
|
./geneseed upgrade # just the content refresh (remembers theme + emit mode)
|
|
325
309
|
```
|
|
326
310
|
|
|
327
|
-
**Local edits survive.**
|
|
328
|
-
|
|
329
|
-
Details and precedence rules: [SETUP.md → Upgrade](SETUP.md#upgrade).
|
|
311
|
+
**Local edits survive.** If the agent refined its deployed agent/skill files in place, an upgrade exports that drift to an `improvements/` file inside the install before overwriting. Details: [Upgrade](docs/guides/upgrade.md).
|
|
330
312
|
|
|
331
313
|
## 📚 Documentation
|
|
332
314
|
|
|
333
315
|
| Page | Read it when… |
|
|
334
316
|
| --- | --- |
|
|
335
|
-
| **[
|
|
317
|
+
| **[docs/](docs/README.md)** | Using Geneseed — Understand, Guides (install, setup choices, MCP, wiki, upgrade, uninstall…), Concepts and Reference (CLI, environment, troubleshooting, glossary) |
|
|
336
318
|
| **[DESIGN.md](DESIGN.md)** | Changing structure — the spec and the decisions behind it |
|
|
337
319
|
| **[SHIPPED.md](SHIPPED.md)** | What's in the harness today — capabilities ↔ the spec behind each |
|
|
320
|
+
| **[docs/extending.md](docs/extending.md)** | Adding to the harness — what each kind of addition costs |
|
|
338
321
|
| **[docs/web-ui.md](docs/web-ui.md)** | The web console — every view, the launch/daemon/PWA surface, security model |
|
|
339
|
-
| **[docs/wiki.md](docs/wiki.md)** | The machine wiki — your personal knowledge base, setup and writing model |
|
|
340
322
|
| **[docs/token-footprint.md](docs/token-footprint.md)** | What the harness costs in context-window tokens, per host |
|
|
341
323
|
| **[docs/opencode-plugin-setup.md](docs/opencode-plugin-setup.md)** | Installing the OpenCode plugins — the one-time wiring they all share |
|
|
342
324
|
| **[CHANGELOG.md](CHANGELOG.md)** | What changed between versions |
|
package/SHIPPED.md
CHANGED
|
@@ -20,7 +20,7 @@ historical references, not files distributed with the repo.
|
|
|
20
20
|
> **On version numbers.** [`harness.config.json`](harness.config.json)'s `version` is a
|
|
21
21
|
> human-readable label only. The canonical identity of an installed harness is the
|
|
22
22
|
> **source fingerprint** stamped in `.geneseed-version` (see `geneseed version`), not the
|
|
23
|
-
> string. Current label: **3.
|
|
23
|
+
> string. Current label: **3.12.0**.
|
|
24
24
|
|
|
25
25
|
## Capabilities
|
|
26
26
|
|
|
@@ -29,7 +29,7 @@ Every row below is present in the tree today; "Spec" names the design record.
|
|
|
29
29
|
| Capability | What it is | Spec |
|
|
30
30
|
| --- | --- | --- |
|
|
31
31
|
| **Themed generator** | One neutral `src/` → 14 themed bundles via `geneseed-build` (zero dependencies); structure stays theme-independent | [DESIGN.md](DESIGN.md) |
|
|
32
|
-
| **Laws / Agents / Skills / Memory / Notebook** | 9 laws, 18 agents,
|
|
32
|
+
| **Laws / Agents / Skills / Memory / Notebook** | 9 laws, 18 agents, 56 skills, the memory convention, and the agent's sovereign notebook | `2026-06-11-notebook-sovereign-space` · `2026-06-10-notebook-agent-own-space` |
|
|
33
33
|
| **Three-tier constitution** | The governance surface splits into an always-on **Ontology** (Telos, Evidence, Decisions, Conduct — the Pact absorbed into Telos), the nine always-on **Invariants**, and five toggleable **Doctrine** packs (craft, rigor, ops, process, comms) addressed `<pack> <n>`. Every rule carries a permanent id; its number is its position, computed at render time, and a citation renders as the rule's principle name. Packs are chosen at build time with `--doctrines` or the setup wizard; the whole catalogue ships on disk either way, so a citation into an inactive pack still resolves. Precedence, in order: Ontology + Invariants, then the user's `user-rules.md`, then the active Doctrines, then `PROFILE.md`. `doctor`'s `constitutionProblems` gates rule ids (declared, unique, never a retired one), the per-rule Principle column, every `{{LAW:<id>}}` / `{{DOCTRINE:<id>}}` citation in `src/`, and the rule that an always-on tier may never cite a toggleable one | `2026-08-19-three-tier-constitution-design` |
|
|
34
34
|
| **`doctor`** | One check: unresolved tokens, dead/non-hermetic links, theme-key parity, authoring gates, rendered-bundle drift | `2026-06-07-theme-aware-doctor-diff` |
|
|
35
35
|
| **`diff` + improvements export** | Deployed-vs-source drift report; export an `improvements.md` back-port | `2026-06-12-improvements-export` |
|
package/adapters/bob/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 🤖 IBM Bob adapter
|
|
2
2
|
|
|
3
|
-
> [← Back to README](../../README.md) · [
|
|
3
|
+
> [← Back to README](../../README.md) · [Install guide](../../docs/guides/install.md) · [Claude Code adapter](../claude-code/README.md) · [OpenCode adapter](../opencode/README.md)
|
|
4
4
|
|
|
5
5
|
[IBM Bob](https://bob.ibm.com) is **Claude-Code-shaped**: a project `.bob/`
|
|
6
6
|
layer, an `AGENTS.md` instructions file, `SKILL.md` skills, subagents, and a
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 🪝 Claude Code adapter
|
|
2
2
|
|
|
3
|
-
> [← Back to README](../../README.md) · [
|
|
3
|
+
> [← Back to README](../../README.md) · [Install guide](../../docs/guides/install.md) · [OpenCode adapter](../opencode/README.md)
|
|
4
4
|
|
|
5
5
|
Optional. Claude Code supports lifecycle **hooks**, so a team using it can make
|
|
6
6
|
parts of the harness fire automatically instead of relying on agent
|
|
@@ -14,10 +14,11 @@ bin/geneseed-hook.mjs …` — so at user scope they would fire and fail in ever
|
|
|
14
14
|
repo that doesn't vendor the harness. A generated global install wires
|
|
15
15
|
absolute-path hooks instead — `geneseed setup` does that for you.) It:
|
|
16
16
|
|
|
17
|
-
- on **PreToolUse** (matcher `Bash`),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
- on **PreToolUse** (matcher `Bash`), runs `geneseed-hook git-gate` — the tool-boundary
|
|
18
|
+
half of Doctrine process 5 (*consent before every commit and push*) and of the
|
|
19
|
+
destructive-git Rule. Drop the `process` pack (or exclude process 5) and the hook stays,
|
|
20
|
+
wired with `--no-consent`: commits and pushes pass without asking, while the
|
|
21
|
+
invariant-territory refusals (force-push, `reset --hard`) stay in every build. The hook inspects
|
|
21
22
|
command and, when it runs a `git commit` or `git push` (bare, flagged, `-C <path>`,
|
|
22
23
|
or chained like `git add . && git commit … && git push`), returns
|
|
23
24
|
`permissionDecision: "ask"` so Claude Code **prompts on every such call**. Crucially
|
|
@@ -31,27 +32,31 @@ absolute-path hooks instead — `geneseed setup` does that for you.) It:
|
|
|
31
32
|
`create_or_update_file` / `merge_pull_request`, which bypass Bash. To gate those too,
|
|
32
33
|
widen the matcher to `"Bash|mcp__github__.*"` — `git-gate` ignores any payload it
|
|
33
34
|
doesn't recognise as a commit/push, so over-matching the tool surface is harmless.
|
|
35
|
+
- on **PreToolUse** (matcher `Write|Edit|MultiEdit|NotebookEdit`), runs
|
|
36
|
+
`geneseed-hook rule-gate` — refuses a write that would put a credential into a tracked
|
|
37
|
+
file, and asks first on the first write to `user-rules.md` or a memory file (whether
|
|
38
|
+
something you want kept is a rule or a fact is your call). Ordinary edits pass.
|
|
34
39
|
- on **SessionStart** (`startup`/`clear` only — a fresh context), prints `AGENT.md`
|
|
35
|
-
so the harness is in context from the first turn, then runs `
|
|
40
|
+
so the harness is in context from the first turn, then runs `geneseed-hook context` to
|
|
36
41
|
**inject the project context** directly into the session — so the project-context load is
|
|
37
42
|
by the hook, not left to the agent to remember (lazy entries are only listed). On
|
|
38
|
-
**`resume`** it runs `
|
|
43
|
+
**`resume`** it runs `geneseed-hook context` *without* re-`cat`ting `AGENT.md`: the resumed
|
|
39
44
|
conversation already carries the harness, so re-injecting the static file each resume
|
|
40
45
|
is pure token waste — only the (possibly changed) project context is refreshed;
|
|
41
|
-
- on **Stop**, runs `
|
|
46
|
+
- on **Stop**, runs `geneseed-hook learn` over the session to capture durable memories.
|
|
42
47
|
Claude Code pipes the hook payload (with the session's `transcript_path`) to the
|
|
43
48
|
command on stdin; `learn` reads that, flattens the transcript, distils new
|
|
44
49
|
memories, and **writes them into the bundle's `memory/` while updating
|
|
45
50
|
`MEMORY.md`** — deduping against what is already stored. No `< /dev/null` and no
|
|
46
51
|
redirection: the stdin payload is the whole point.
|
|
47
|
-
- on **SubagentStop**, runs the *same* `
|
|
52
|
+
- on **SubagentStop**, runs the *same* `geneseed-hook learn` command. `learn` reads the
|
|
48
53
|
payload's `hook_event_name`, sees a subagent dispatch, and routes it to the
|
|
49
54
|
per-agent lesson path instead of the shared store: it distils at most one durable
|
|
50
55
|
lesson and appends it to `memory/agents/<agent-name>.md` (capped, newest kept). If
|
|
51
56
|
the payload does not name the subagent, the step is a silent no-op — never a
|
|
52
57
|
crash, never a wrong write. This is the parity twin of the OpenCode learn plugin's
|
|
53
58
|
child-session branch.
|
|
54
|
-
- on **PreCompact**, runs the same `
|
|
59
|
+
- on **PreCompact**, runs the same `geneseed-hook learn` once more. `learn` distils the
|
|
55
60
|
*tail* of the transcript, so per-turn Stop is a sliding window over the session —
|
|
56
61
|
and auto-compaction is the moment that window is about to be summarised away.
|
|
57
62
|
This captures memory *before* the summary; the SessionStart `compact` matcher
|
|
@@ -68,11 +73,11 @@ the commands are identical (`node bin/geneseed-hook.mjs …`).
|
|
|
68
73
|
|
|
69
74
|
Why inject rather than instruct? The constitution tells the agent to read the project
|
|
70
75
|
context at startup, but startup rituals are exactly what agents skip. The
|
|
71
|
-
`
|
|
76
|
+
`geneseed-hook context` hook removes the choice: the eager files' contents land in
|
|
72
77
|
context before the first turn regardless of agent discipline. On tools without
|
|
73
78
|
hooks or plugins, the AGENT.md prose still carries the rule.
|
|
74
79
|
|
|
75
|
-
> **Auto-discovery (parity with OpenCode).** `
|
|
80
|
+
> **Auto-discovery (parity with OpenCode).** `geneseed-hook context` no longer needs a
|
|
76
81
|
> hand-filled `context.json`: with no manifest (or just the empty stub) it
|
|
77
82
|
> **auto-discovers the repo's docs by convention** — root `AGENTS.md`/`AGENT.md`/
|
|
78
83
|
> `CLAUDE.md`/`README.md`/`CONTRIBUTING.md` injected eager, `docs/`/`adr/`/monorepo
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 🦀 OpenClaude adapter
|
|
2
2
|
|
|
3
|
-
> [← Back to README](../../README.md) · [
|
|
3
|
+
> [← Back to README](../../README.md) · [Install guide](../../docs/guides/install.md) · [Claude Code adapter](../claude-code/README.md) · [OpenCode adapter](../opencode/README.md)
|
|
4
4
|
|
|
5
5
|
[OpenClaude](https://openclaude.gitlawb.com/) (`@gitlawb/openclaude`, binary
|
|
6
6
|
`openclaude`) is an open-source coding-agent CLI that "originated from the Claude
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 🔌 OpenCode adapter
|
|
2
2
|
|
|
3
|
-
> [← Back to README](../../README.md) · [
|
|
3
|
+
> [← Back to README](../../README.md) · [Install guide](../../docs/guides/install.md) · [How OpenCode loads](HOW-OPENCODE-LOADS.md) · [Global harness spec](GLOBAL-HARNESS-SPEC.md)
|
|
4
4
|
|
|
5
5
|
[OpenCode](https://opencode.ai) is `AGENTS.md`-native and has first-class
|
|
6
6
|
**subagents** and **commands**, so Geneseed fits it cleanly. Pick the depth you
|
|
@@ -211,7 +211,7 @@ the harness live entirely in the global config dir with zero per-repo files.
|
|
|
211
211
|
install). Per wiki: eager entries inject in full, lazy entries list, and the
|
|
212
212
|
`conventions` / `inbox` / `protected` metadata is surfaced — on the **same**
|
|
213
213
|
budgets, compaction and transform paths as the project context. Schema and
|
|
214
|
-
behaviour: [
|
|
214
|
+
behaviour: [the wiki guide](../../docs/guides/wiki.md).
|
|
215
215
|
|
|
216
216
|
It needs no model, writes nothing, skips the learn plugin's throwaway sessions, and
|
|
217
217
|
swallows every error. Output mirrors `geneseed-hook context`.
|
|
@@ -468,9 +468,9 @@ OpenCode runs, so the command has to resolve — the `uvx` form above needs only
|
|
|
468
468
|
call). No uv? `pipx install markitdown-mcp` and swap the command to `["markitdown-mcp"]`.
|
|
469
469
|
Or drop the block entirely — the skill falls back to a CLI converter (MarkItDown /
|
|
470
470
|
Pandoc / Docling) and never installs one silently. Listed but not connecting? The
|
|
471
|
-
command isn't on PATH — see [
|
|
471
|
+
command isn't on PATH — see [the MCP guide](../../docs/guides/mcp.md).
|
|
472
472
|
Full runbook, including the corporate-TLS (`UV_SYSTEM_CERTS`) step and the OCR extras:
|
|
473
|
-
[
|
|
473
|
+
[the MCP guide](../../docs/guides/mcp.md).
|
|
474
474
|
|
|
475
475
|
## Optional add-on — git-worktree isolation (third-party, not vendored)
|
|
476
476
|
|
|
@@ -16,8 +16,22 @@
|
|
|
16
16
|
//
|
|
17
17
|
// Install: dropped into the plugins dir by `build --emit opencode[-global]` (the *.js
|
|
18
18
|
// glob), exactly like the context and learn plugins. Errors never break a tool call.
|
|
19
|
+
//
|
|
20
|
+
// `permission.ask` — the loop/* exemption (Consent Before Push). OpenCode's static
|
|
21
|
+
// `permission.bash` globs (`git commit*`/`git push*` = "ask", written by
|
|
22
|
+
// js/hosts/settings.mjs) cannot see which branch is checked out — they are a build-time
|
|
23
|
+
// string match with no request-time context. This hook is the ONLY seam where Geneseed can
|
|
24
|
+
// look at the live branch, and it only DOWNGRADES an ask to allow: only a fixed set of
|
|
25
|
+
// commit/push forms (see `loopExempt` below, the twin of js/hosts/hooks.mjs's) on a `loop/*`
|
|
26
|
+
// branch a loop was actually LAUNCHED on — not just named `loop/...`. It is a WHITELIST, not
|
|
27
|
+
// a blacklist: a false ask costs one prompt, a false allow publishes. It never raises the
|
|
28
|
+
// bar: anything not on the whitelist, anything off a launched loop branch, a status this hook
|
|
29
|
+
// did not itself leave as the default "ask", or any non-bash permission leaves `output.status`
|
|
30
|
+
// untouched and OpenCode's own ask (or another hook's deny) stands. A host version that never
|
|
31
|
+
// fires `permission.ask` simply never reaches this hook — the static ask still fires, so the
|
|
32
|
+
// failure mode is one extra prompt, never a silent allow.
|
|
19
33
|
|
|
20
|
-
import { promises as fs } from "node:fs"
|
|
34
|
+
import { promises as fs, existsSync, statSync, lstatSync, readFileSync, openSync, readSync, closeSync } from "node:fs"
|
|
21
35
|
import * as path from "node:path"
|
|
22
36
|
import { fileURLToPath } from "node:url"
|
|
23
37
|
import { homedir } from "node:os"
|
|
@@ -267,7 +281,131 @@ function ruleStoreTarget(p) {
|
|
|
267
281
|
// substring stance: over-matching the class is harmless (see WRITE_TOOLS note).
|
|
268
282
|
const WIKI_MUTATE_TOOLS = [...WRITE_TOOLS, "delete", "remove", "rename", "move", "trash"]
|
|
269
283
|
|
|
270
|
-
|
|
284
|
+
// ---- the loop/* exemption (Consent Before Push) --------------------------------
|
|
285
|
+
// Twin of js/hosts/gitref.mjs (currentBranch/loopLaunched) and js/hosts/hooks.mjs's
|
|
286
|
+
// git-gate (the rest) — keep in step. Node's native sync `fs` (not the `fs.promises`
|
|
287
|
+
// import above): a worktree's `.git` is read the same way the Claude/Bob hook reads it, so
|
|
288
|
+
// the two decide the exemption identically. This plugin cannot import from `js/` at all
|
|
289
|
+
// (it is copied whole into an OpenCode install, outside this repo's module graph), so it
|
|
290
|
+
// keeps its own standalone copy rather than the single shared owner the Node side has.
|
|
291
|
+
|
|
292
|
+
const GIT_GATE_RE = /\bgit\b[^\n]*\b(?:commit|push)\b/
|
|
293
|
+
|
|
294
|
+
// No newline, backtick, or `$(` substitution anywhere, no `<`/`>` redirect, and no single
|
|
295
|
+
// `&` (a shell runs `a & b` as two commands exactly like `a && b`) — these can smuggle a
|
|
296
|
+
// second command (or a shared-branch target) past every check below. `(?<!&)&(?!&)` matches
|
|
297
|
+
// a lone `&` without matching either half of a doubled `&&`.
|
|
298
|
+
const UNSAFE_CHARS_RE = /[\n`<>]|\$\(|(?<!&)&(?!&)/
|
|
299
|
+
|
|
300
|
+
// The only three git shapes a loop's own automation ever needs — see js/hosts/hooks.mjs's
|
|
301
|
+
// identically-named constants for the full rationale. The token class `[\w./:@^~=+,-]`
|
|
302
|
+
// excludes quotes, braces, `!`, `*`, `$` and `&` — a brace/glob expansion is exactly how a
|
|
303
|
+
// shell turns one whitelisted-looking token into several unknown ones, which is also why the
|
|
304
|
+
// `-F`/`--file` path uses this same class rather than the looser `[^\s'"]+` it once did: that
|
|
305
|
+
// loose class let `git commit -F {m,--amend}` brace-expand into an amend of the last commit.
|
|
306
|
+
const ARG_RE = "[\\w./:@^~=+,-]+"
|
|
307
|
+
const SEG_ADD_RE = new RegExp(`^git\\s+add(\\s+${ARG_RE})*$`)
|
|
308
|
+
const SEG_COMMIT_RE = new RegExp(`^git\\s+commit(\\s+-q)?\\s+(-F\\s+|--file[=\\s])${ARG_RE}(\\s+-q)?$`)
|
|
309
|
+
const SEG_READONLY_RE = new RegExp(`^git\\s+(status|diff|log|rev-parse|show)(\\s+${ARG_RE})*$`)
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* `git push`, exactly: `[-u|--set-upstream] <remote> HEAD:<branch>` or
|
|
313
|
+
* `HEAD:refs/heads/<branch>` — the ONLY exempt form, same as js/hosts/hooks.mjs's
|
|
314
|
+
* `pushSegmentOk`. An explicit refspec is immune to `push.default`/`remote.*.push`
|
|
315
|
+
* redirection and refuses to coexist with a mirror/`+`/`:`-prefixed form; nothing else is.
|
|
316
|
+
*/
|
|
317
|
+
function pushSegmentOk(seg, branch) {
|
|
318
|
+
const m = /^git\s+push(?:\s+(.*))?$/.exec(seg)
|
|
319
|
+
if (!m) return false
|
|
320
|
+
const rest = (m[1] || "").trim()
|
|
321
|
+
if (!rest) return false
|
|
322
|
+
const tokens = rest.split(/\s+/)
|
|
323
|
+
let i = 0
|
|
324
|
+
if (tokens[i] === "-u" || tokens[i] === "--set-upstream") i += 1
|
|
325
|
+
const remote = tokens[i]
|
|
326
|
+
if (remote === undefined || !/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(remote)) return false
|
|
327
|
+
i += 1
|
|
328
|
+
const ref = tokens[i]
|
|
329
|
+
i += 1
|
|
330
|
+
if (ref === undefined || i !== tokens.length) return false
|
|
331
|
+
return ref === `HEAD:${branch}` || ref === `HEAD:refs/heads/${branch}`
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const LOOP_STATE_MARKER = "<!-- loop-state:begin -->"
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Whether `<root>/LOOP.md` carries the engine's state marker — read at most 64 KB.
|
|
338
|
+
* `lstatSync` (never `statSync`, which follows a link) must find an ordinary file: a FIFO
|
|
339
|
+
* would block the read, a symlink could point anywhere outside the repo.
|
|
340
|
+
*/
|
|
341
|
+
function loopLaunched(gitRoot) {
|
|
342
|
+
let fd
|
|
343
|
+
try {
|
|
344
|
+
const p = path.join(gitRoot, "LOOP.md")
|
|
345
|
+
if (!lstatSync(p).isFile()) return false
|
|
346
|
+
fd = openSync(p, "r")
|
|
347
|
+
const buf = Buffer.alloc(65536)
|
|
348
|
+
const n = readSync(fd, buf, 0, buf.length, 0)
|
|
349
|
+
return buf.toString("utf8", 0, n).includes(LOOP_STATE_MARKER)
|
|
350
|
+
} catch {
|
|
351
|
+
return false
|
|
352
|
+
} finally {
|
|
353
|
+
if (fd !== undefined) { try { closeSync(fd) } catch { /* already gone */ } }
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* The branch checked out in `cwd`, and the directory holding `.git` for it, read from
|
|
359
|
+
* .git/HEAD without spawning git — a worktree's `.git` is a FILE naming its gitdir, so both
|
|
360
|
+
* shapes are followed. `{ branch: null, root: null }` on anything unexpected (detached HEAD,
|
|
361
|
+
* no repo, unreadable): the caller then leaves the ask alone.
|
|
362
|
+
*/
|
|
363
|
+
function currentBranch(cwd) {
|
|
364
|
+
try {
|
|
365
|
+
let dir = path.resolve(cwd)
|
|
366
|
+
for (;;) {
|
|
367
|
+
const dotgit = path.join(dir, ".git")
|
|
368
|
+
if (existsSync(dotgit)) {
|
|
369
|
+
let gitdir = dotgit
|
|
370
|
+
if (statSync(dotgit).isFile()) {
|
|
371
|
+
const m = /^gitdir:\s*(.+?)\s*$/m.exec(readFileSync(dotgit, "utf8"))
|
|
372
|
+
if (!m) return { branch: null, root: null }
|
|
373
|
+
gitdir = path.resolve(dir, m[1])
|
|
374
|
+
}
|
|
375
|
+
const ref = /^ref:\s*refs\/heads\/(.+?)\s*$/m.exec(readFileSync(path.join(gitdir, "HEAD"), "utf8"))
|
|
376
|
+
return { branch: ref ? ref[1] : null, root: dir }
|
|
377
|
+
}
|
|
378
|
+
const up = path.dirname(dir)
|
|
379
|
+
if (up === dir) return { branch: null, root: null }
|
|
380
|
+
dir = up
|
|
381
|
+
}
|
|
382
|
+
} catch {
|
|
383
|
+
return { branch: null, root: null }
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Consent Before Push's loop/* exemption — the twin of js/hosts/hooks.mjs's `loopExempt`.
|
|
389
|
+
* True only when the command carries none of the unsafe characters, every `&&`/`;`/`||`/`|`
|
|
390
|
+
* segment is one of the three whitelisted git shapes (every push segment also passing
|
|
391
|
+
* `pushSegmentOk`), and the branch checked out in `cwd` starts with `loop/` AND its git root
|
|
392
|
+
* carries a launched LOOP.md.
|
|
393
|
+
*/
|
|
394
|
+
function loopExempt(command, cwd) {
|
|
395
|
+
if (typeof command !== "string" || UNSAFE_CHARS_RE.test(command)) return false
|
|
396
|
+
const { branch, root } = currentBranch(cwd)
|
|
397
|
+
if (!branch || !branch.startsWith("loop/")) return false
|
|
398
|
+
if (!root || !loopLaunched(root)) return false
|
|
399
|
+
const segments = command.split(/&&|\|\||[;|]/).map((s) => s.trim()).filter(Boolean)
|
|
400
|
+
if (!segments.length) return false
|
|
401
|
+
return segments.every((seg) => SEG_ADD_RE.test(seg) || SEG_COMMIT_RE.test(seg)
|
|
402
|
+
|| SEG_READONLY_RE.test(seg) || pushSegmentOk(seg, branch))
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export const GeneseedGuard = async (ctx) => {
|
|
406
|
+
// The session's working directory, the same resolution the context plugin uses — a
|
|
407
|
+
// worktree session's `.git` is a FILE, which `currentBranch` already follows.
|
|
408
|
+
const root = () => ctx?.worktree || ctx?.directory || process.cwd()
|
|
271
409
|
return {
|
|
272
410
|
"tool.execute.before": async (input, output) => {
|
|
273
411
|
if (OFF) return
|
|
@@ -318,6 +456,23 @@ export const GeneseedGuard = async () => {
|
|
|
318
456
|
log(`inspect error (ignored): ${err?.message ?? err}`)
|
|
319
457
|
}
|
|
320
458
|
},
|
|
459
|
+
"permission.ask": async (input, output) => {
|
|
460
|
+
// Never throw from a permission hook — leave `output.status` untouched on any
|
|
461
|
+
// error, exactly as a crashed check here must default to the static ask standing.
|
|
462
|
+
try {
|
|
463
|
+
if (OFF) return
|
|
464
|
+
// Never loosen anything but the plain "ask" this hook itself would otherwise leave
|
|
465
|
+
// alone — a deny (or any other status another hook already set) is never overwritten.
|
|
466
|
+
if (output?.status && output.status !== "ask") return
|
|
467
|
+
if (input?.type !== "bash") return
|
|
468
|
+
// ONLY `input.metadata?.command` — no pattern/title fallback. A value this hook did
|
|
469
|
+
// not itself read in full is a value it must not reason about.
|
|
470
|
+
const command = input?.metadata?.command
|
|
471
|
+
if (typeof command !== "string" || !command || !GIT_GATE_RE.test(command)) return
|
|
472
|
+
if (await sovereignBypass(root())) return
|
|
473
|
+
if (loopExempt(command, root())) output.status = "allow"
|
|
474
|
+
} catch { /* leave output.status untouched */ }
|
|
475
|
+
},
|
|
321
476
|
}
|
|
322
477
|
}
|
|
323
478
|
|