geneseed 5.0.0 → 5.0.3
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 +70 -0
- package/README.md +1 -1
- package/SHIPPED.md +1 -1
- package/adapters/claude-code/README.md +6 -4
- package/adapters/opencode/HOW-OPENCODE-LOADS.md +3 -0
- package/adapters/opencode/plugins/geneseed-context.js +13 -2
- package/adapters/opencode/plugins/geneseed-guard.js +595 -74
- package/adapters/opencode/plugins/geneseed-learn.js +1 -1
- package/bin/geneseed-hook.mjs +21 -7
- package/docs/PRD.md +1 -1
- package/docs/concepts/enforcement-table.md +22 -3
- package/docs/concepts/exclusions.md +48 -2
- package/docs/concepts/foreman-mode.md +19 -4
- package/docs/concepts/hook-gates.md +1 -1
- package/docs/concepts/hooks.md +53 -12
- package/docs/concepts/host-matrix.md +4 -3
- package/docs/concepts/hosts.md +1 -1
- package/docs/concepts/kits.md +18 -0
- package/docs/concepts/shared-tier.md +5 -5
- package/docs/concepts/skills.md +1 -1
- package/docs/extending.md +3 -1
- package/docs/guides/autostart.md +27 -3
- package/docs/guides/choose-your-setup.md +1 -1
- package/docs/guides/migrate.md +5 -3
- package/docs/guides/uninstall.md +1 -1
- package/docs/guides/upgrade-to-5.md +6 -4
- package/docs/reference/plugin-context.md +1 -1
- package/docs/reference/plugin-guard.md +24 -5
- package/docs/reference/troubleshoot-doctor.md +2 -2
- package/docs/understand/a-day.md +9 -5
- package/docs/web-ui.md +78 -20
- package/harness.config.json +1 -1
- package/js/README.md +3 -2
- package/js/build/emit-claude.mjs +9 -1
- package/js/build/emit-opencode.mjs +2 -1
- package/js/build/fold.mjs +7 -7
- package/js/build/rule-decide.mjs +273 -0
- package/js/build/source.mjs +9 -3
- package/js/cli-table.json +122 -2
- package/js/hosts/geneseed-dir.mjs +1 -1
- package/js/hosts/hooks-context.mjs +9 -7
- package/js/hosts/hooks-done.mjs +3 -1
- package/js/hosts/hooks-learn.mjs +1 -1
- package/js/hosts/hooks-prims.mjs +270 -0
- package/js/hosts/hooks.mjs +409 -151
- package/js/hosts/hosts.mjs +22 -0
- package/js/hosts/installs.mjs +13 -9
- package/js/hosts/memory-files.mjs +2 -2
- package/js/hosts/settings.mjs +123 -23
- package/js/hosts/shim.mjs +155 -7
- package/js/hosts/store-watch.mjs +41 -14
- package/js/inspect/diff.mjs +2 -1
- package/js/inspect/inventory.mjs +1 -0
- package/js/inspect/registry.mjs +4 -2
- package/js/inspect/validate.mjs +1 -1
- package/js/lib/paths.mjs +13 -0
- package/js/maintain/migrate.mjs +60 -22
- package/js/maintain/uninstall.mjs +5 -1
- package/js/web/actions.mjs +17 -1
- package/js/web/api.mjs +22 -16
- package/js/web/handler.mjs +2 -0
- package/js/web/routes.mjs +9 -4
- package/js/web/update-check.mjs +2 -2
- package/js/web/user-files.mjs +38 -11
- package/package.json +1 -1
- package/registry.json +21 -0
- package/src/AGENT.md.tmpl +17 -21
- package/src/agents/_self-improvement.md +7 -6
- package/src/agents/developer.md +3 -2
- package/src/agents/docker-expert.md +1 -0
- package/src/agents/memory-curator.md +3 -2
- package/src/doctrines/process.md +24 -19
- package/src/kits/ci-pipelines/rules.md +10 -0
- package/src/kits/ci-pipelines.json +14 -0
- package/src/kits/docker/rules.md +11 -0
- package/src/kits/docker.json +12 -0
- package/src/memory/README.md +5 -4
- package/src/modes/foreman.md +23 -10
- package/src/notebook/README.md +1 -1
- package/src/skills/_self-improvement.md +12 -9
- package/src/skills/compose-ops.md +58 -0
- package/src/skills/gitlab-ci.md +51 -0
- package/src/skills/jenkins-pipeline.md +56 -0
- package/src/skills/pipeline.md +2 -2
- package/src/skills/rule/approve.md +11 -5
- package/src/skills/rule.md +26 -19
- package/src/skills/skill-forge.md +24 -6
- package/themes/_TEMPLATE.json +5 -2
- package/themes/biker.json +5 -2
- package/themes/commentator.json +5 -2
- package/themes/cyberpunk.json +5 -2
- package/themes/gamer.json +5 -2
- package/themes/imperial.json +5 -2
- package/themes/joker.json +5 -2
- package/themes/marvin.json +5 -2
- package/themes/mean.json +5 -2
- package/themes/military.json +5 -2
- package/themes/neutral.json +5 -2
- package/themes/pirate.json +5 -2
- package/themes/sports.json +5 -2
- package/themes/verstappen.json +5 -2
- package/themes/wizard.json +5 -2
- package/web/dist/assets/Activity-Ck_Xffpo.js +1 -0
- package/web/dist/assets/ActivityDetail-CBxVS4mU.js +1 -0
- package/web/dist/assets/{Bonsai-B_y20b3i.js → Bonsai-BlOwsvW6.js} +1 -1
- package/web/dist/assets/{CopyButton-CHQte7Ap.js → CopyButton-DFMOIGbe.js} +1 -1
- package/web/dist/assets/Dashboard-BUdUTjbB.js +2 -0
- package/web/dist/assets/{Docs-Dgv_MWfT.js → Docs-D_2Jt6gU.js} +3 -3
- package/web/dist/assets/{GreenhouseView-CSzTMSl_.js → GreenhouseView-WalcX5bp.js} +1 -1
- package/web/dist/assets/Installs-UGiPDMDt.js +3 -0
- package/web/dist/assets/{JournalView-CvRk1-m5.js → JournalView-CZtXQz-v.js} +1 -1
- package/web/dist/assets/Kits-XQHsazCN.js +1 -0
- package/web/dist/assets/Laws-B6A55S-2.js +4 -0
- package/web/dist/assets/Library-D7L0Wdbh.js +3 -0
- package/web/dist/assets/Loops-C0loS73u.js +2 -0
- package/web/dist/assets/{OperatorHudView-DuGz_sTk.js → OperatorHudView-CeDw5qMB.js} +1 -1
- package/web/dist/assets/Personal-PVmGA2-M.js +2 -0
- package/web/dist/assets/{RailCats-AW92uhsX.js → RailCats-BGZnJ6fa.js} +1 -1
- package/web/dist/assets/Settings-DWuxwh4i.js +1 -0
- package/web/dist/assets/Tabs-d2RIRAKT.js +1 -0
- package/web/dist/assets/api-BMFDSXoB.js +1 -0
- package/web/dist/assets/index-BEI5ugYQ.css +1 -0
- package/web/dist/assets/index-BNttaGQb.js +6 -0
- package/web/dist/index.html +3 -3
- package/web/dist/assets/Activity-D8G4eClY.js +0 -1
- package/web/dist/assets/ActivityDetail-BtOBYk3M.js +0 -1
- package/web/dist/assets/Dashboard-B8uXeJZ_.js +0 -2
- package/web/dist/assets/Installs-BDk9lqBI.js +0 -3
- package/web/dist/assets/Kits-CoITzxWM.js +0 -1
- package/web/dist/assets/Laws-Ctf5r9rE.js +0 -3
- package/web/dist/assets/Library-DNwHYVXt.js +0 -3
- package/web/dist/assets/Loops-S85PMQ8m.js +0 -2
- package/web/dist/assets/Personal-afJNwvRS.js +0 -2
- package/web/dist/assets/Settings-CGDFz-6j.js +0 -1
- package/web/dist/assets/Tabs-1qLrnqmn.js +0 -1
- package/web/dist/assets/api-C46vAuqp.js +0 -1
- package/web/dist/assets/index-COTd4TRZ.js +0 -3
- package/web/dist/assets/index-CtorA7uK.css +0 -1
package/docs/extending.md
CHANGED
|
@@ -706,7 +706,9 @@ Two gates hold it: `tests/unit/hook_form.test.mjs` pins the rule (including the
|
|
|
706
706
|
reachable because `ephemeralCheckout` takes the temp root as a parameter), and
|
|
707
707
|
`tests/shim_intact.mjs` — a step in `ci.yml` and `publish.yml`, *after* `node --test`, because
|
|
708
708
|
each test file runs in its own process and the file that causes this is not the file that would
|
|
709
|
-
notice — fails if the suite left the shim naming anything that is not there.
|
|
709
|
+
notice — fails if the suite left the shim naming anything that is not there. The same step fails
|
|
710
|
+
if a test touched the machine tier: a change report naming test fixtures or the temp root, or, behind
|
|
711
|
+
CI's `.suite-fence`, any file in the tier.
|
|
710
712
|
|
|
711
713
|
This is not hypothetical — it happened while this file was being written. Several agents were
|
|
712
714
|
verifying gates out of copied checkouts (the `copyCheckout` fixture pattern
|
package/docs/guides/autostart.md
CHANGED
|
@@ -19,11 +19,35 @@ Only one console runs at a time. A second `start` does nothing, so logging in tw
|
|
|
19
19
|
|
|
20
20
|
> **Always use `web start` in a login item, never bare `web`.** Bare `geneseed web` runs in the foreground and leaves no record of itself. `web stop`, `web restart` and `web status` then cannot see it: they report no live server while it keeps serving. A `restart` would then start a second console that cannot take the busy port.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
## From the web console
|
|
23
|
+
|
|
24
|
+
Open **Settings** and find the **Start at login** row in **Server**. The row shows the file and its state:
|
|
25
|
+
|
|
26
|
+
| State | What the row offers |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| Off | **Turn on** writes the login item for this platform |
|
|
29
|
+
| On · written by Geneseed | **Remove** deletes it |
|
|
30
|
+
| On · points at another copy or Node | **Update** rewrites it for this copy |
|
|
31
|
+
| On · set up by hand | A link to this guide. Geneseed does not change or delete the file |
|
|
32
|
+
|
|
33
|
+
Each button asks first, and the question names the file. Geneseed writes only one file per platform:
|
|
34
|
+
|
|
35
|
+
- **Windows:** `geneseed-web.vbs` in your Startup folder.
|
|
36
|
+
- **macOS:** `~/Library/LaunchAgents/dev.geneseed.web.plist`. It loads at your next login. Geneseed does not run `launchctl`. To start the console now, run `launchctl load` on the file, or run `geneseed web start`.
|
|
37
|
+
|
|
38
|
+
The file runs the Node that runs the console, by absolute path, with this copy's `bin/geneseed-cli.mjs` and `web start --no-browser`. Its second line (the third line of a plist) is a `GENESEED_AUTOSTART` comment. Geneseed updates or removes a file only when that exact line is in that place, so a file you wrote yourself stays yours. If you upgrade Node or move the copy, the row shows **Update**. The confirm names the copy the file runs, and it warns you when that copy is an agent worktree (`.claude/worktrees`) or an npx cache: such a folder can be deleted, and the login item then fails. On Windows, Geneseed refuses a path with a `%` (the login script would expand it) or a character outside ASCII. Set those up by hand.
|
|
39
|
+
|
|
40
|
+
> **The page token does not stop a local program.** Each write needs the page's token, which keeps other web pages in your browser from turning this on. A program that runs as you can read the token from the console's record, `.geneseed-web.json` in the install folder it serves, and send the same request. It could also write the file itself, so this adds no new risk. The confirm only asks you; it does not protect anything.
|
|
41
|
+
|
|
42
|
+
If the write fails, the row shows the error from the system. A managed Windows PC can block the Startup folder or VBS scripts. Then use the scheduled task below, or ask your administrator.
|
|
43
|
+
|
|
44
|
+
Only **Settings** writes a login item. `geneseed migrate` and uninstall do not write or delete one.
|
|
45
|
+
|
|
46
|
+
## By hand
|
|
23
47
|
|
|
24
48
|
The examples below assume `geneseed` is on your `PATH` (see [Run geneseed from anywhere](run-anywhere.md)). Login items do not see your shell's `PATH`, so always use the absolute path to the launcher. For an npm install, `npm prefix -g` shows where npm keeps it.
|
|
25
49
|
|
|
26
|
-
|
|
50
|
+
### Windows
|
|
27
51
|
|
|
28
52
|
Press **Win+R**, type `shell:startup`, and create a file called `geneseed-web.vbs` in the folder that opens:
|
|
29
53
|
|
|
@@ -41,7 +65,7 @@ schtasks /Create /TN "Geneseed Web" /SC ONLOGON /TR "\"%LOCALAPPDATA%\Geneseed\b
|
|
|
41
65
|
schtasks /Delete /TN "Geneseed Web" /F # to remove it
|
|
42
66
|
```
|
|
43
67
|
|
|
44
|
-
|
|
68
|
+
### macOS
|
|
45
69
|
|
|
46
70
|
Create a LaunchAgent at `~/Library/LaunchAgents/dev.geneseed.web.plist`. Set `RunAtLoad` and **no** `KeepAlive`. The launcher exits as soon as it has started the background process, which keeps running on its own.
|
|
47
71
|
|
|
@@ -45,7 +45,7 @@ Pick **peer** unless you know you want another register. A theme changes the pro
|
|
|
45
45
|
- **direct** *(default)*: the agent works every task itself, turn by turn.
|
|
46
46
|
- **foreman**: the session sorts each incoming task. A small task gets done inline. A task that would block the session goes to one background **task worker** in its own git worktree, while the session keeps answering you; corrections go back to the same worker. A crew of agents (a **pipeline**) runs only when you ask for one.
|
|
47
47
|
|
|
48
|
-
A worker never
|
|
48
|
+
A worker never pushes, and merges only into its own branch, from sub-workers it started. It hands back its branch, together with its test and lint output. The session then re-runs those commands itself, shows you the diff and the passing output, and commits and merges only after you accept. Foreman mode costs more per delegated task, because a worker and sometimes a reviewer run beside the session. In exchange, the session stays responsive.
|
|
49
49
|
|
|
50
50
|
```
|
|
51
51
|
geneseed build --emit opencode-global --mode foreman
|
package/docs/guides/migrate.md
CHANGED
|
@@ -14,14 +14,16 @@ Claude Code, Bob and OpenClaude call Geneseed's hooks through one small file, th
|
|
|
14
14
|
|
|
15
15
|
## Run it
|
|
16
16
|
|
|
17
|
-
Install the package first (`npm install -g geneseed
|
|
17
|
+
Install the package first (`npm install -g geneseed`), then run these from it:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
20
|
geneseed migrate --dry-run # survey every install, print the plan and the fold report; writes nothing
|
|
21
21
|
geneseed migrate # do it
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
`migrate` rebuilds every registered install **with its own theme, host, footprint, posture and mode**. Nothing is reset to a default.
|
|
24
|
+
`migrate` rebuilds every registered install **with its own theme, host, footprint, posture and mode**. Nothing is reset to a default. Each rebuild of a Claude Code, Bob or OpenClaude install rewrites the hook shim to name the Geneseed that runs the rebuild, so it now names the npm package. `migrate` does not write the shim itself, and OpenCode has none. It then reports anything it is not allowed to fix for you. A second run prints `already on the npm shape` and writes nothing.
|
|
25
|
+
|
|
26
|
+
**It runs only from the npm package.** From a git clone or a bundle, a real run has nothing to move: the rebuild would point the shim back at that same copy. So it refuses with exit 3 before it writes anything, and says to use `geneseed update`. An `npx` run refuses too: npm prunes that cache, and the shim would die with it. `--dry-run` works from anywhere. Outside the package it previews the fold, then says a real run would refuse.
|
|
25
27
|
|
|
26
28
|
`--dry-run` also previews [the fold](../concepts/shared-tier.md#the-fold) for each global install, even on a machine that has already migrated, because the fold runs in every global emit. Each host is read against the shared tier as it stands, so two hosts that hold the same new fact both count it.
|
|
27
29
|
|
|
@@ -40,6 +42,6 @@ If an install's `.geneseed-emit` marker names something this version does not re
|
|
|
40
42
|
`migrate` reports these instead of rewriting them:
|
|
41
43
|
|
|
42
44
|
- **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.
|
|
43
|
-
- **Login items.** If
|
|
45
|
+
- **Login items.** If the web console [starts at login](autostart.md) and its login item still names your old clone, `migrate` prints its path and the command to put in it. If Settings wrote that file, use **Update** on the **Start at login** row. If you wrote it yourself, edit it yourself.
|
|
44
46
|
|
|
45
47
|
Your clone keeps working in the meantime, so you can migrate when it suits you.
|
package/docs/guides/uninstall.md
CHANGED
|
@@ -53,4 +53,4 @@ npm uninstall -g geneseed # installed from npm
|
|
|
53
53
|
|
|
54
54
|
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.
|
|
55
55
|
|
|
56
|
-
If
|
|
56
|
+
If the web console starts at login, remove that login item too. Do this before you delete the clone. If Settings wrote it, use **Remove** on the **Start at login** row. If you wrote it yourself, delete the file. Uninstall never removes it (see [Start the web console at login](autostart.md)).
|
|
@@ -41,10 +41,12 @@ It writes nothing. It prints one line for each global install, read against the
|
|
|
41
41
|
[migrate] --dry-run: nothing was written.
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
**Use only the `--dry-run` form here.** The `would re-emit` lines are the plan of `geneseed migrate` itself, which moves a clone install to [the npm shape](migrate.md). That is not a 5.0 step.
|
|
44
|
+
**Use only the `--dry-run` form here.** The `would re-emit` lines are the plan of `geneseed migrate` itself, which moves a clone install to [the npm shape](migrate.md). That is not a 5.0 step. From a clone those lines do not appear: the preview ends by saying a real run would refuse, and a real `migrate` there exits 3 and changes nothing.
|
|
45
45
|
|
|
46
46
|
It also lists orphans: a root `AGENT.md`, or the folder of a retired skill, that no manifest owns. Such a folder may be yours. Geneseed never moves it, so move it by hand if it is not.
|
|
47
47
|
|
|
48
|
+
**In the console.** With no terminal, there is no preview before the first fold: *Update* on a clone pulls and rebuilds in one job, so the fold runs in that click, and a 4.x console has no preview. Nothing is deleted, as step 3 shows. After that, *Preview next rebuild* on the Installs page, beside *Rebuild all*, shows the same fold lines and orphans for any later rebuild, without the `would re-emit` lines, and writes nothing.
|
|
49
|
+
|
|
48
50
|
## 3. Upgrade
|
|
49
51
|
|
|
50
52
|
Use the route you always use. See [Upgrade](upgrade.md).
|
|
@@ -57,7 +59,7 @@ geneseed upgrade # from a clone
|
|
|
57
59
|
Between the install and the end of the rebuild:
|
|
58
60
|
|
|
59
61
|
- Hooks and running sessions stay safe. They read the host files until the rebuild moves them.
|
|
60
|
-
- Do not
|
|
62
|
+
- Do not change anything in the web console until the rebuild ends. *Rebuild all* on its Installs page is the same rebuild as `geneseed rebuild-all`.
|
|
61
63
|
- The first `geneseed upgrade` from 4.x still runs the old doctor gate, which can take up to 300 seconds. Wait for it.
|
|
62
64
|
|
|
63
65
|
Each global install in its host's own config directory prints what it moved, once:
|
|
@@ -85,14 +87,14 @@ A host installed after an `exclude add` also gets the repo-side wiring on this r
|
|
|
85
87
|
|
|
86
88
|
`user-rules.draft.md` in the tier lists what the fold could not decide for you. It is never loaded: a drafted rule goes on binding from its host file until you decide.
|
|
87
89
|
|
|
88
|
-
Ask the agent to review the pending rules. The `rule` skill
|
|
90
|
+
Ask the agent to review the pending rules, or open **Pending** on the console's Personal page. The `rule` skill and that section are the only things that write a decision, and they take the same steps:
|
|
89
91
|
|
|
90
92
|
- **Approve** moves the rule to the shared file under a new number. The next rebuild of that host removes the host copy.
|
|
91
93
|
- **Reject** keeps the rule on that host only, and it is never drafted again.
|
|
92
94
|
- **Later** leaves it pending.
|
|
93
95
|
- For a profile or wiki pointer, you choose which file becomes the shared one.
|
|
94
96
|
|
|
95
|
-
|
|
97
|
+
In the console, an item you leave alone stays pending. After a decision that moves a file, the page offers *Rebuild all*, which removes the host copy. If another session changed the draft, the page reloads and applies nothing.
|
|
96
98
|
|
|
97
99
|
## 5. Project installs
|
|
98
100
|
|
|
@@ -18,7 +18,7 @@ One of the [OpenCode plugins](opencode-plugins.md). Its switches are also listed
|
|
|
18
18
|
|
|
19
19
|
**When it runs.** On every request: the context rides invisibly in the request's message list, so it also survives compaction. If your OpenCode build lacks that (experimental) hook, the plugin notices and falls back to one visible message at session start, re-pushed when the session compacts.
|
|
20
20
|
|
|
21
|
-
**The weakened-test reminder.** A write tool call that adds a skip marker to a test file or removes an assertion (the rule in [Hooks](../concepts/hooks.md)) makes the next request carry one invisible message citing *Cure the Cause*, on OpenCode 1 and 2. It is advisory, needs no checks, and an install built `--no-done-gate` does not say it. The call is read before it runs, so one the guard then refuses is still named.
|
|
21
|
+
**The weakened-test reminder.** A write tool call that adds a skip marker to a test file or removes an assertion (the rule in [Hooks](../concepts/hooks.md)) makes the next request carry one invisible message citing *Cure the Cause*, on OpenCode 1 and 2. It is advisory, needs no checks, and an install built `--no-done-gate` or `--no-test-note` does not say it. The call is read before it runs, so one the guard then refuses is still named.
|
|
22
22
|
|
|
23
23
|
**The done gate's reminder.** The project's checks come from `.geneseed/done-checks.txt`, or, without that file, are inferred from the manifests at the project's git root (see [Hooks](../concepts/hooks.md)). A request that follows a turn which edited files without every check passing since gets one more invisible message naming the checks owed (inferred ones marked advisory). OpenCode has no turn-end event a plugin can block on, so this is a reminder, not a block. OpenCode 1 only: on OpenCode 2 the turn is not judged, and with a listed file the plugin logs that once. The context block also opens with one line naming the checks and their source (`Done gate: …`), ending `(reminder)` for a listed file or `(advisory)` for inferred checks on OpenCode 1, and `(not judged on this host)` on OpenCode 2. `GENESEED_CONTEXT_INJECT=off` does not turn the reminder off; a done list that lists nothing does, and so does an install built `--no-done-gate` (`Done gate: off` in its `AGENT.md`, read once when OpenCode starts), which also silences the OpenCode 2 log line and the context line.
|
|
24
24
|
|
|
@@ -10,16 +10,18 @@ One of the [OpenCode plugins](opencode-plugins.md). [Environment variables](envi
|
|
|
10
10
|
|
|
11
11
|
**What it does.** Enforces the safety rules at the tool boundary — before a tool call runs, not after. High-confidence patterns only, so legitimate work is not caught.
|
|
12
12
|
|
|
13
|
-
- **Blocks** writes to private-key and credential files and writes whose content carries a credential (*Sealed Secrets*; an install built `--no-secrets-gate` carries `Secrets gate: off` in its `AGENT.md`, read once at load, and both stop blocking), catastrophic shell commands such as deleting the filesystem root and every command that would really lose data — a protected branch deleted or force-pushed, an unpushed unmerged branch deleted, a protected branch force-moved off commits nothing else holds, unpushed commits abandoned by `reset --hard`, uncommitted work discarded other than by `reset --hard`, a stash dropped, files git cannot restore removed — judged against the repository's state, the same decisions the Claude/Bob hook makes (*Deletion Is Deliberate*; `reflog expire` and `gc --prune` are left to the `permission.bash` ask; an install built `--no-deletion-gate` carries `Deletion gate: off` in its `AGENT.md`, which the plugin reads once at load and then stops blocking real loss — catastrophic commands still block), a recursive scan rooted at a whole filesystem such as `find /` (*Commands Must Return* — search a specific directory instead), and any change — write, move, rename, delete — under a wiki folder declared `protected` in `geneseed-wiki.jsonc`, and writes to a check listed in the project's `.geneseed/protected-checks.txt` (*External Gate* — see [Hooks](../concepts/hooks.md)). The guard also refuses a write to the other hosts' Geneseed-only files (their `excludes.json`, `AGENT.md` and manifests) and to the shared exclude list in `~/.config/geneseed/`; OpenCode's own config and the shared hook settings get `permission.edit` "ask" keys in `opencode.json` instead, so you see OpenCode's prompt. A shell write is read as well: the targets of `>`, `>>`, `tee`, `sed -i`, `cp`, `mv
|
|
13
|
+
- **Blocks** writes to private-key and credential files and writes whose content carries a credential (*Sealed Secrets*; an install built `--no-secrets-gate` carries `Secrets gate: off` in its `AGENT.md`, read once at load, and both stop blocking), catastrophic shell commands such as deleting the filesystem root and every command that would really lose data — a protected branch deleted or force-pushed, an unpushed unmerged branch deleted, a protected branch force-moved off commits nothing else holds, unpushed commits abandoned by `reset --hard`, uncommitted work discarded other than by `reset --hard`, a stash dropped, files git cannot restore removed — judged against the repository's state, the same decisions the Claude/Bob hook makes (*Deletion Is Deliberate*; `reflog expire` and `gc --prune` are left to the `permission.bash` ask; an install built `--no-deletion-gate` carries `Deletion gate: off` in its `AGENT.md`, which the plugin reads once at load and then stops blocking real loss — catastrophic commands still block), a recursive scan rooted at a whole filesystem such as `find /` (*Commands Must Return* — search a specific directory instead), and any change — write, move, rename, delete — under a wiki folder declared `protected` in `geneseed-wiki.jsonc`, and writes to a check listed in the project's `.geneseed/protected-checks.txt` (*External Gate* — see [Hooks](../concepts/hooks.md)). The guard also refuses a write to the other hosts' Geneseed-only files (their `excludes.json`, `AGENT.md` and manifests) and to the shared exclude list in `~/.config/geneseed/`; OpenCode's own config and the shared hook settings get `permission.edit` "ask" keys in `opencode.json` instead, so you see OpenCode's prompt. A shell write is read as well: the targets of `>`, `>>`, `tee`, `sed -i`, `cp`, `mv`, `rm` and the PowerShell writers listed under **Shell is not a boundary** get the same path checks, by path only. `permission.edit` never sees a shell command and this hook has no ask tier, so a shell write to those "ask" files is refused too.
|
|
14
14
|
- **Reminds, once:** it refuses the first write of a session in an application repo (a git root holding a build manifest) whose root `AGENTS.md` has no `## Ownership` section, so the agent proposes the [ownership](../concepts/ownership.md) setup first. This is a reminder, not a gate: the next write passes whatever the agent did, and a sub-agent's session never triggers it. Off per repo with `mode: off` in that section, or for one developer with a personal `Setup: declined <YYYY-MM-DD>` line in `.geneseed/ownership.md`; an install built `--no-ownership-gate` carries `Ownership gate: off` in its `AGENT.md`, read once at load.
|
|
15
|
+
- **Stands down for `External gate: off`** in `AGENT.md` (an install built `--no-external-gate`, read once at load): it stops refusing protected checks and gate configuration on the write and shell paths, and OpenCode 2's `evaluate` stops asking over those files. The `permission.edit` keys in `opencode.json` are host configuration: they stay, and OpenCode keeps asking before an edit tool writes those files. Every other block stays, the NTFS stream refusal included.
|
|
16
|
+
- **Stands down for an excluded rule** read off `AGENT.md`'s `Active packs:` and `Excluded rules:` lines at load, the state the hooks get as flags: with *Persist Insight* (process 1) or its pack off it refuses no rule-store write, by any tool or shell, and OpenCode 2's `evaluate` stops asking over those files; with *Commands Must Return* (ops 2) or its pack off it stops refusing a root scan. The emit also drops the `permission.edit` keys on the rule files. The change report still lists a rule-file change. Every other block stays.
|
|
15
17
|
- **Warns** (logged, allowed) on `.env` writes.
|
|
16
|
-
- **Leaves to OpenCode's own prompt** a write to `user-rules.md
|
|
18
|
+
- **Leaves to OpenCode's own prompt** a write to `user-rules.md` or `user-rules.draft.md`, because a standing rule is your call (*Persist Insight*). Memory is not gated: the agent writes `MEMORY.md` and the facts in a memory store on its own, and you see them afterwards in the web console. The emit writes `permission.edit` "ask" keys for them, so OpenCode asks you inside its edit, write and patch tools. On OpenCode 2 the `permission.hook("evaluate")` hook asks as well, even over an earlier "always". On OpenCode 1 the guard reads the merged config and refuses the write when it would not make the host ask. The check reads the file a write lands on: `..` and `//` folded, links followed and, on Windows, a stream or trailing dots and spaces taken off, so a memory file linked to `user-rules.md` is still a rule write. A hard link has no target to follow, so a write to a second name of a known rule file gets the same prompt: the gate compares the file's device and inode with the `user-rules.md` and `user-rules.draft.md` of the install, the shared tier, the project at the session's git root and the homes `$GENESEED_HARNESS` and `$GENESEED_MEMORY` name. Any other hard-linked file, a pnpm store's for example, is ordinary work. A file-tool write the host cannot prompt for is refused, so a re-issue changes nothing: any tool other than OpenCode's own edit tools and a named read set (the path-like arguments it carries are read), a config or an agent's own rules with no ask for that path, and on OpenCode 1 any write after you answered "always" to an edit.
|
|
17
19
|
|
|
18
|
-
**Shell is not a boundary.** The guard reads only the parsed forms: a redirect, `tee`, `cp`, `mv`, `rm` and `sed -i`. One that lands in a store gets OpenCode's prompt on OpenCode 2, through `evaluate` on the shell tool's own permission check, and is refused on OpenCode 1, which cannot ask. Everything else in a command goes unread: `bash -c`, an interpreter, `dd`, `curl -o`,
|
|
20
|
+
**Shell is not a boundary.** The guard reads only the parsed forms: a redirect, `tee`, `cp`, `mv`, `rm` and `sed -i`, and in PowerShell `Add-Content`, `Set-Content`, `Out-File`, `Clear-Content`, `Remove-Item`, `Copy-Item`, `Move-Item`, `New-Item` and `Rename-Item`, with the aliases `ac`, `sc`, `del`, `copy`, `move`, `ni` and `ren`. A cmdlet name matches in any case, and a pipe into one counts (`| Out-File x`). The reader takes `-Path`, `-LiteralPath`, `-FilePath`, `-Destination` and a first positional path, quoted or bare. A path may open with `~`, `$HOME`, `${HOME}`, `$env:HOME` or `$env:USERPROFILE`. One that lands in a rule store gets OpenCode's prompt on OpenCode 2, through `evaluate` on the shell tool's own permission check, and is refused on OpenCode 1, which cannot ask. Everything else in a command goes unread: `bash -c`, `pwsh -c`, an interpreter, `dd`, `curl -o`, `[IO.File]::WriteAllText`, any other variable. The reader names real write targets; it is no text scan, so `Get-Content MEMORY.md` and a commit message that names the file stay free. The host's own command permission (`permission.bash`) is the backstop for those, and the [change report](../concepts/hooks.md#the-change-report) tells you afterwards. It detects; it does not prevent.
|
|
19
21
|
|
|
20
22
|
It ships whole on every install, whatever [doctrine packs](../concepts/rules.md) you chose. On Claude Code the same checks are hooks, which can *ask* you instead of refusing; Bob has no ask tier, so its hook blocks or warns; OpenCode's tool hook has no ask tier either, so an ask there comes from `permission.edit`.
|
|
21
23
|
|
|
22
|
-
**"Always" on OpenCode 1.** Its edit tools offer "always" with the pattern `*`, which approves every edit until OpenCode restarts. The host would then ask nothing, so the guard refuses rule
|
|
24
|
+
**"Always" on OpenCode 1.** Its edit tools offer "always" with the pattern `*`, which approves every edit until OpenCode restarts. The host would then ask nothing, so the guard refuses rule writes from that answer on, and writes to the files `permission.edit` asks about, such as `opencode.json` and the guard itself. Restart OpenCode to get the prompt back. The guard sees only an answer it heard: one given in this OpenCode instance after the plugin loaded. OpenCode 2 asks whatever you answered before.
|
|
23
25
|
|
|
24
26
|
**Agents on OpenCode 1.** The tool hook does not name the agent, so the guard reads every agent's rules through `client.app.agents()` and passes a write only if none of them allows it outright. One agent with its own `edit: allow` therefore refuses these writes for all of them.
|
|
25
27
|
|
|
@@ -29,7 +31,24 @@ There is no DYNAMIC loop/* exemption on OpenCode — OpenCode 1 declares a `perm
|
|
|
29
31
|
|
|
30
32
|
**When it runs.** Before every tool call (`tool.execute.before`).
|
|
31
33
|
|
|
32
|
-
**What you see.**
|
|
34
|
+
**What you see.**
|
|
35
|
+
- **A refused call** reads `[geneseed-guard] blocked: Tell the user this, word for word: <what changes>`, then why it was refused, what you can do yourself, and a last line for the agent. Nothing can be allowed here, so you depend on the model to relay this text. That is best effort. The [change report](../concepts/hooks.md#the-change-report) reaches you directly. OpenCode 2 refuses by renaming the call and prints `No tool named "<name>"`, so there the name opens `BLOCKED, not a missing tool: `, and the model receives the whole text (seen on 2.2.6). The one exception is the ownership reminder above: it is an instruction to the agent, not text for you, so it keeps its own words.
|
|
36
|
+
- **A prompt** comes from OpenCode, and its dialog shows no plugin text. So for its two asks, a rule write that reaches a host prompt and a gate configuration file, the guard posts the reason just before the dialog, inside a delimiter:
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
──── Geneseed · about the next permission request ────
|
|
40
|
+
This edit changes user-rules.md, your standing rules, which the agent obeys in every session.
|
|
41
|
+
Safe choice: Deny, unless you asked for this rule. (Persist Insight)
|
|
42
|
+
It asks because what becomes a rule is your decision.
|
|
43
|
+
If you allow it, the text binds every later session until you remove it.
|
|
44
|
+
──── The dialog below is for this change ────
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
OpenCode 2 shows it as a message in the session. The model gets one short line instead of this text. OpenCode 1 shows it as a toast, which can expire while the dialog is still open. `opencode run` and `mini` do not show the OpenCode 2 message. An unattended OpenCode 2 session posts the note and then denies the call. A failed post changes nothing: the prompt still asks. The note shows no line count.
|
|
48
|
+
|
|
49
|
+
[What a prompt says](../concepts/hooks.md#what-a-prompt-says) lists what this text can and cannot tell you.
|
|
50
|
+
|
|
51
|
+
The guard's reasons are the same words as the hooks'. The reason never names the switches below: the agent reads it, and a switch named there reads as leave to get round the block. The *Persist Insight* reason tells the agent to ask you and that a re-issue changes nothing — never to write the file another way (through a shell command, say). Warnings go to stderr.
|
|
33
52
|
|
|
34
53
|
**Switches.**
|
|
35
54
|
- `GENESEED_GUARD=warn` — log every block, allow the call.
|
|
@@ -43,8 +43,8 @@ These come only from `geneseed doctor --probe`. It runs each installed gate exac
|
|
|
43
43
|
settings spell it, through the host's own shell, on `git reflog expire --expire=now --all` (which must be refused)
|
|
44
44
|
and `git status` (which must go through). A gate wired with `--no-deletion-gate` lets the first one
|
|
45
45
|
through by design, so it is probed on `find / -name geneseed-probe` instead — a root-wide scan it
|
|
46
|
-
must still refuse. `--no-secrets-gate`, `--no-done-gate
|
|
47
|
-
judges
|
|
46
|
+
must still refuse. `--no-secrets-gate`, `--no-done-gate`, `--no-ownership-gate`, `--no-external-gate` and
|
|
47
|
+
`--no-test-note` change nothing here: none judges either probe command. An OpenCode install's guard plugin has no command to
|
|
48
48
|
run: the probe imports it and calls its hook through both plugin APIs (V1 and V2), with `rm -rf /`
|
|
49
49
|
as the call it must refuse. `GENESEED_GUARD=off` or `warn` in your terminal makes that a note,
|
|
50
50
|
not a failure.
|
package/docs/understand/a-day.md
CHANGED
|
@@ -20,17 +20,21 @@ You ask the agent to clean up history and it decides to force-push `main`. A gat
|
|
|
20
20
|
|
|
21
21
|
```text
|
|
22
22
|
● Bash(git push --force origin main)
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
This command force-pushes the protected branch main on the remote.
|
|
24
|
+
Safe choice: Deny, then push without --force. (Deletion Is Deliberate)
|
|
25
|
+
It asks because a force push replaces the remote history.
|
|
26
|
+
If you allow it, commits that exist only on the remote can be lost for everyone.
|
|
25
27
|
Do you want to proceed? Yes / No
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
An ordinary `git commit` or `git push` gets a milder question when the **process** pack is on: *"
|
|
30
|
+
An ordinary `git commit` or `git push` gets a milder question when the **process** pack is on: *"This command commits or pushes with git, which needs your approval each time. (Consent Before Push)"*. If you answer no, the command does not run, however the model phrased its reasoning.
|
|
29
31
|
|
|
30
|
-
Bob has no prompt, so the same force-push is refused outright:
|
|
32
|
+
Bob has no prompt, so the same force-push is refused outright, and the model is told to relay why:
|
|
31
33
|
|
|
32
34
|
```text
|
|
33
|
-
[geneseed] BLOCKED:
|
|
35
|
+
[geneseed] BLOCKED: Tell the user this, word for word: This command force-pushes the protected branch main on the remote.
|
|
36
|
+
It was refused because a force push replaces the remote history. (Deletion Is Deliberate)
|
|
37
|
+
You can push without --force, or run this command yourself.
|
|
34
38
|
```
|
|
35
39
|
|
|
36
40
|
OpenCode has no prompt a plugin can raise, so Geneseed's guard plugin refuses it the same way. Every catch goes into a log, and `geneseed status` counts the catches by rule.
|
package/docs/web-ui.md
CHANGED
|
@@ -44,6 +44,8 @@ so other sites can't trigger builds, deletes, or shutdown. Mutating actions (bui
|
|
|
44
44
|
update, export, restore, memory-delete, uninstall) run in the background and report back
|
|
45
45
|
as toasts (fire-and-notify). Read-only browsing needs no token.
|
|
46
46
|
|
|
47
|
+
**The token stops other sites, not other programs.** Anything on this machine that can read it, from the served page or `.geneseed-web.json`, can call the console API. So the console is no boundary against an agent with a shell, the same as the shell itself. That includes a rule decision: the [change report](concepts/hooks.md#the-change-report) still lists it, for this reason.
|
|
48
|
+
|
|
47
49
|
Every request passes one guard first: the `Host` must be `127.0.0.1`, `localhost` or `[::1]`
|
|
48
50
|
**at the server's own port** (DNS rebinding, other local servers), `/api/*` refuses a
|
|
49
51
|
`Sec-Fetch-Site` of `cross-site`/`same-site` or a foreign `Origin` (so another site cannot read
|
|
@@ -60,13 +62,13 @@ A request can name the install it reads or writes. A read takes two query parame
|
|
|
60
62
|
`host` and `path` in its JSON body. The pair is a row of `/api/installs`, and the server checks
|
|
61
63
|
it against the same detected-install allowlist as the install toggle. An unknown or half pair
|
|
62
64
|
gets a 404 and never falls through to another install's folder. The writes that take the pair
|
|
63
|
-
are `/api/activity`, `/api/memory/delete`, `/api/rules`, `/api/rules/promote`, `/api/profile`,
|
|
65
|
+
are `/api/activity`, `/api/memory/delete`, `/api/rules`, `/api/rules/promote`, `/api/rules/decide`, `/api/profile`,
|
|
64
66
|
and the `restore` and `build` actions. In `/api/install`, `/api/default-install`, the `install` and
|
|
65
67
|
`deploy` actions, `/api/excludes` and `/api/reveal`, `host`/`path` keep their own meaning.
|
|
66
68
|
|
|
67
69
|
Every `/api/*` read takes and checks the pair, with these exceptions:
|
|
68
70
|
- `/api/ping` and `/api/jobs` ignore it.
|
|
69
|
-
- The machine-wide reads also ignore it: `/api/update`, `/api/installs`, `/api/fleet`,
|
|
71
|
+
- The machine-wide reads also ignore it: `/api/update`, `/api/installs`, `/api/fleet`, `/api/migrate/preview`,
|
|
70
72
|
`/api/kits`, `/api/usage`, `/api/gates`, `/api/excludes`, `/api/mcp`, `/api/loops/active`,
|
|
71
73
|
`/api/activity`, and the Library's skill, agent, memory and notebook lists,
|
|
72
74
|
`/api/catalog/skills`, `/api/catalog/agents`, `/api/catalog/memory` and
|
|
@@ -140,15 +142,22 @@ first read is out, a sentence when it failed, and what it found when it is empty
|
|
|
140
142
|
before its data. The Constitution waits for the picked install's own overview too: a gate read
|
|
141
143
|
before it would read as armed.
|
|
142
144
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
The rail groups its pages under small mono headers, each with a square in the group's tint: the
|
|
146
|
+
Overview alone, then **Govern** (Constitution, Personal), **Build** (Library, Kits, Loops), **Run**
|
|
147
|
+
(Installs, Activity) and **Help** (Docs, Settings). Each icon sits in a 28 px chip tinted by its group
|
|
148
|
+
(`--sb-<group>-bg` and `-ink` in `styles.css`; light mode has pastel chips with deep ink, 5.3:1 or
|
|
149
|
+
better). The lit page gets a raised row and `aria-current="page"`; a count badge is muted mono on the
|
|
150
|
+
right. The chevron in the header collapses the rail to 64 px of chips (44 px targets, each link with an
|
|
151
|
+
`aria-label` and a tooltip, an expand button on top); the choice is kept per browser under
|
|
152
|
+
`geneseed-rail`. Below 960px the rail is always chips and the toggle is hidden; the phone drawer is
|
|
153
|
+
always full. The rail holds navigation only: the doctor's verdict, local edits and build age live on Doctor, Diff
|
|
154
|
+
and Overview, and the voice gallery on Installs. The topbar's
|
|
146
155
|
breadcrumb starts at the page: it names no install.
|
|
147
156
|
|
|
148
157
|
**Install pickers.** The console has no install switch. Where a page acts on one install, one
|
|
149
158
|
`InstallPicker`, always labelled *Install:*, sits right above the heading of the view it acts on
|
|
150
159
|
(under the tabs on a tabbed page, over the h1 on a page with none), and starts on the default install; with one active install it is not shown. A form or popover that
|
|
151
|
-
acts on its own install holds the same control: the new-rule form
|
|
160
|
+
acts on its own install holds the same control: the new-rule form and a
|
|
152
161
|
Library entry with several copies. The Personal page names no harness for what the harnesses share:
|
|
153
162
|
every global install reads one set of rules, one profile and one memory store in the shared tier
|
|
154
163
|
(`~/.config/geneseed`), so Rules, Profile and Memory list each once. Its header states that scope
|
|
@@ -156,8 +165,8 @@ once, a list head or profile card says `shared`, and a project install keeps its
|
|
|
156
165
|
install. Each `/api/installs` and `/api/fleet` row carries `shared`, which the pages read from
|
|
157
166
|
`useInstalls`; `sharedTier` is only a project install's switch. A write goes back to the file an
|
|
158
167
|
entry came from. Notebook stays per install, and its Forget acts on the install of the copy on
|
|
159
|
-
screen. Doctor, Local edits, the Constitution (for its gate switches and doctrine Apply), Loops
|
|
160
|
-
|
|
168
|
+
screen. Doctor, Local edits, the Constitution (for its gate switches and doctrine Apply), and Loops
|
|
169
|
+
each keep their own pick (in the browser's localStorage). The Overview is
|
|
161
170
|
fleet-wide: each install's own facts (voice, footprint, posture, mode, local edits) sit on
|
|
162
171
|
its row, and a figure still read off a project install set as the default (a suggestion, a lens)
|
|
163
172
|
names that install once two or more are active. A *Needs you*
|
|
@@ -176,6 +185,25 @@ doctrine rule are all reachable by name; <kbd>↑</kbd>/<kbd>↓</kbd> to
|
|
|
176
185
|
move, <kbd>Enter</kbd> to open, <kbd>Esc</kbd> to clear. A bottom **Console** drawer
|
|
177
186
|
streams the output of background jobs and keeps their history across reloads.
|
|
178
187
|
|
|
188
|
+
**The Console drawer is a phase timeline.** The left column lists the runs, newest last. Each
|
|
189
|
+
row has a status dot (green done, amber done with warnings, red failed, pulsing while it runs),
|
|
190
|
+
the action, a short detail (the install, the commits pulled, the installs rebuilt) and the
|
|
191
|
+
duration, with `✗` (failed), `⚠` (warnings) or `running` written beside it. A run whose output
|
|
192
|
+
holds a failure line reads failed even when the job exited 0. The newest run is picked, and a new run takes the pick back from a click. The right
|
|
193
|
+
column shows the picked run: its status pill, a `<duration> · N warnings · N notices` line and
|
|
194
|
+
its numbered phases. A phase is one step the job ran (`$ <argv>`) or one install a `rebuild-all`
|
|
195
|
+
rebuilt (`[rebuild-all] <host>:<scope>`), so an upgrade reads *Update the source*, then one
|
|
196
|
+
*Rebuild* per install. Each phase states *Done*, *N warnings*, *N skipped*, *Failed* or
|
|
197
|
+
*Running*. A warning (`[geneseed] WARN`) is an amber box: a short title, one sentence, and its
|
|
198
|
+
full text under **Full text**. The `[rebuild-all] WARN` printed once after the last install is
|
|
199
|
+
about the whole run, so it shows under **Run warnings**, not under that install. A refused link is a grey notice and counts as skipped. A failure
|
|
200
|
+
line is red in its phase, and a failed job with no failure line marks its last phase failed
|
|
201
|
+
with the last line it printed. A line the reader does not know stays in its phase as printed;
|
|
202
|
+
lines before the first phase (the history keeps only an output's tail) go under **Other
|
|
203
|
+
output**. **Full log** shows the raw output unchanged, for the picked run only. The one reader is
|
|
204
|
+
`web/src/lib/runPhases.js`, and the prefixes it knows are listed at its top. On a narrow
|
|
205
|
+
screen the run list stacks above the detail.
|
|
206
|
+
|
|
179
207
|
## Views
|
|
180
208
|
|
|
181
209
|
### Dashboard
|
|
@@ -214,18 +242,35 @@ streams the output of background jobs and keeps their history across reloads.
|
|
|
214
242
|
(code points / 4 of its own block), and each list's head shows the one rule count and total, such
|
|
215
243
|
as `4 rules · ≈1,055 tokens every turn · scope global unless marked`, which counts the file's
|
|
216
244
|
header too. A row shows a scope only when it differs from that. There is no ceiling.
|
|
217
|
-
A **Pending** section lists what waits undecided in `user-rules.draft.md
|
|
218
|
-
|
|
245
|
+
A **Pending** section lists what waits undecided in `user-rules.draft.md`, and a pending rule still
|
|
246
|
+
binds on its host. *Approve* and *Reject* decide a rule; a profile or wiki pointer shows both files,
|
|
247
|
+
with *Use the host file*, *Use the shared file* and *Keep both*. These apply the rule skill's own
|
|
248
|
+
steps (`js/build/rule-decide.mjs`), and a decision that moves a file offers *Rebuild all*. No decision
|
|
249
|
+
applies while a job runs. The [change report](concepts/hooks.md#the-change-report) lists a decision like
|
|
250
|
+
any other console write, and says it may be yours.
|
|
251
|
+
Every write carries the fingerprint of the
|
|
219
252
|
content the page last read — if an agent session edited the file meanwhile, the save
|
|
220
253
|
409s and the page reloads instead of clobbering it.
|
|
221
254
|
- **Constitution** (`#/laws`) — the whole governance surface on one page, in three bands:
|
|
222
255
|
the **Ethos** (five prose sections), the **Dictates** (the nine numbered Rules, with
|
|
223
256
|
a class facet — only non-empty classes render, and two of the six have had no invariant
|
|
224
257
|
since the split), and the **Doctrines** (one group per pack, each marked active or not for
|
|
225
|
-
this install).
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
258
|
+
this install). Where an install can be rebuilt, each Rule and doctrine row has two toggle
|
|
259
|
+
columns, headed *Rule text* and *Hook gate*. Each open band (Ethos, Dictates, every pack) repeats a compact column header under its title, and a folded pack shows none. Screen readers skip it: each row's label already reads its columns. The table sizes itself to the room it has, not to the window (beside the side panels a 1274 px window leaves it about 600 px): below 960 px of table the *Latin name* column folds under the rule name, below 760 px *Status* and *Enforced by* become two chips under it, and below 540 px *No.* moves above the name and the switch columns narrow to 44 px. Rule keeps at least 220 px down to that last step; the switches never drop, and each header drops exactly the columns its rows drop. *Rule text* is the doctrine switch, which stages
|
|
260
|
+
like any doctrine change; a Dictate cannot be excluded, so its cell is locked, with the reason.
|
|
261
|
+
*Hook gate* is the hook's switch: Rules I, III, IV and VIII (the secrets gate, the done gate,
|
|
262
|
+
the deletion gate and the test note: `--no-secrets-gate`, `--no-done-gate`,
|
|
263
|
+
`--no-deletion-gate`, `--no-test-note`) and doctrine rigor 5 (`--no-external-gate`). Flipping
|
|
264
|
+
one asks, then rebuilds the install once; *Enforced by* reads *Gate off* while one is off. A
|
|
265
|
+
hook with no switch shows a locked cell: process 5 reads *with text*, because excluding it
|
|
266
|
+
drops its commit/push ask (`--no-consent`), and so do process 1 (`--no-rule-store`) and ops 2
|
|
267
|
+
(`--no-root-scan`): excluding the rule, or its pack, drops its hook in the same rebuild. A row with no hook leaves the cell empty. Each switch's accessible
|
|
268
|
+
name names its rule (`Deletion gate: hook gate of Deletion Is Deliberate`, `External Gate rule
|
|
269
|
+
text`). Excluding rigor 5's text also switches its gate off in the same Apply, and the confirm
|
|
270
|
+
says so; including it again offers *Also turn the external gate back on*, checked by default.
|
|
271
|
+
A row whose text is excluded while its hook will still ask reads *Text excluded; the hook still
|
|
272
|
+
asks.*: rigor 5 only, once its exclusion is deployed with the gate armed. Excluding process 1
|
|
273
|
+
or ops 2 says in the confirm that its hook goes too. The ownership gate belongs
|
|
229
274
|
to no Rule, so its switch (`--no-ownership-gate`) sits inside the Ethos band's *Ownership*
|
|
230
275
|
row and works the same way. Closed, the row reads *Always* (the section's text binds whatever
|
|
231
276
|
the gate does) and *Hook gate* or *Gate off*. Open, it shows the text, then a gate line with
|
|
@@ -233,6 +278,11 @@ streams the output of background jobs and keeps their history across reloads.
|
|
|
233
278
|
can be rebuilt: with no install the row reads *Instruction*. The gate counts in *Gated* but
|
|
234
279
|
not as a Rule or a section, and the Ethos rank's pill counts it while it is off. Every tab,
|
|
235
280
|
view and filter shows the row, like the sections around it.
|
|
281
|
+
Every opened row that a hook gates (Rules I, III, IV and VIII, doctrines process 1, process 5,
|
|
282
|
+
rigor 5 and ops 2, and the Ownership section) folds a *What the hook does* block after the rule
|
|
283
|
+
text and before any gate line: what it triggers on, what each host does, what it does not see,
|
|
284
|
+
and what still holds with the gate off. It shows with or without an install to rebuild. The
|
|
285
|
+
text has one home, `GATE_HOOK` in `web/src/lib/constitution.js`; a text-only rule shows none.
|
|
236
286
|
A precedence ladder heads the page (a state pill per rank; ranks 5–6 below). *Gated* and *Changed* narrow the rows; packs fold; staged doctrine changes
|
|
237
287
|
collect in a sticky *Unapplied changes* bar that holds Revert and the page's one Apply.
|
|
238
288
|
Every row expands to its full body, lazily fetched. The rail
|
|
@@ -325,12 +375,16 @@ streams the output of background jobs and keeps their history across reloads.
|
|
|
325
375
|
between polls. Tracking is on or off per install: the tracking
|
|
326
376
|
card has one switch per install, and each switch changes only that install. OpenCode project
|
|
327
377
|
installs have no switch: their sessions appear under, and follow, the OpenCode global switch. Sessions that ended in the last 7 days are listed under
|
|
328
|
-
**Recently ended**, below the live ones. Every host records
|
|
378
|
+
**Recently ended**, below the live ones, in the list view only; the Garden shows live sessions only. Every host records activity:
|
|
329
379
|
the OpenCode plugin, and `geneseed-hook activity` on Claude Code, OpenClaude and Bob.
|
|
330
380
|
The live sessions open in the **Garden** by default; a **List | Garden** switch (kept in the
|
|
331
381
|
URL with the filters, which apply to both) shows them as a list of cards instead. The Garden
|
|
332
|
-
shows them as pixel bonsai: one shelf per repository (worktrees stand on their
|
|
333
|
-
repo's shelf, tagged ⎇), one tree per session
|
|
382
|
+
shows them as pixel bonsai: one wooden shelf per repository (worktrees stand on their
|
|
383
|
+
repo's shelf, tagged ⎇), one tree per session, its pot on the plank. A brass plate on the
|
|
384
|
+
plank names the repository and its session count. Under each pot a caption gives the session
|
|
385
|
+
title (two lines at most; the full title is the tooltip and the link's name), the install and
|
|
386
|
+
status pills (working green, your move amber, blocked red, idle grey) and `<turns> turns · <context>%`. A
|
|
387
|
+
narrow screen stacks a shelf's trees onto several planks, the plate on the first. The pot's glaze is the host (clay Claude Code,
|
|
334
388
|
blue Bob, grey OpenCode, violet OpenClaude); the tree grows taller with turns, its crown
|
|
335
389
|
with context fill, and the tips yellow past 80 %. A compaction cuts the crown flat (it
|
|
336
390
|
regrows as context refills) and leaves a notch on the rim. A running sub-agent is a thick
|
|
@@ -339,7 +393,9 @@ streams the output of background jobs and keeps their history across reloads.
|
|
|
339
393
|
cannot tell, so all its blossoms sit on the crown). An amber `!` means the session needs
|
|
340
394
|
you, a red `x` an error, a grey tree an idle session. Two sessions changing the same file
|
|
341
395
|
are tied together in red (same worktree) or dashed amber (two worktrees of the repo): tangled
|
|
342
|
-
roots in the moss when they stand side by side, a thread
|
|
396
|
+
roots in the moss when they stand side by side, a thread across the plank when they do not.
|
|
397
|
+
Two trees on different planks get no thread; the hover card and the link's name still list
|
|
398
|
+
the shared files.
|
|
343
399
|
Hover a tree for its model, turns, context and compactions, or a pad for its author's files;
|
|
344
400
|
click it to open the session. With no mouse, tap a pad to show its files (a second tap clears them,
|
|
345
401
|
and neither opens the session), or focus the tree and walk its pads with the arrow keys; Escape leaves. Past ten trees, quiet shelves (no session working or waiting on
|
|
@@ -391,8 +447,10 @@ streams the output of background jobs and keeps their history across reloads.
|
|
|
391
447
|
own, about the tool and never one install: a sheet with a section index. **Machine**:
|
|
392
448
|
version + Update (labelled by how this copy updates: git pull, npm install -g, or the command
|
|
393
449
|
to run by hand; on the Overview the button shows only when the pull can run), Add to PATH. **Server**: running · port ·
|
|
394
|
-
pid · uptime, whether the code matches the disk (with Restart),
|
|
395
|
-
|
|
450
|
+
pid · uptime, whether the code matches the disk (with Restart), Start at login (the
|
|
451
|
+
login launcher's state; it writes the file when absent, updates it when stale and removes it when
|
|
452
|
+
Geneseed wrote it, each after a confirm that names the file; a hand-written one gets only a
|
|
453
|
+
link to the guide), and the four request guards; the index marks Server with a good/warn dot. **About**: version, changelog, credits, source, creator.
|
|
396
454
|
**Danger zone**: Stop server, Remove from PATH, and a pointer to each install's own
|
|
397
455
|
Uninstall in Hosts.
|
|
398
456
|
- **Appearance** (the topbar's popover, on every page) — the one home of the skin and the accent (a
|
package/harness.config.json
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
"_comment": "version is a human-readable release label only; the canonical identity of an installed harness is the source fingerprint stamped in .geneseed-version (see `harness version`), not this string.",
|
|
3
3
|
"theme": "neutral",
|
|
4
4
|
"product": "Geneseed",
|
|
5
|
-
"version": "5.0.
|
|
5
|
+
"version": "5.0.3"
|
|
6
6
|
}
|
package/js/README.md
CHANGED
|
@@ -42,7 +42,7 @@ layers. These pairs import each other (relative imports between folders, measure
|
|
|
42
42
|
| build ↔ web | 1 / 9 | `build/generate.mjs` lazily imports `web/daemon.mjs` to restart a stale console after `rebuild-all` |
|
|
43
43
|
| hosts ↔ inspect | 1 / 36 | `hosts/installs.mjs` reads `inspect/registry.mjs`'s deploy roots |
|
|
44
44
|
| ui ↔ web | 1 / 1 | `ui/menu.mjs` starts the daemon; `web/docs.mjs` renders `ui/cli.mjs`'s CLI reference |
|
|
45
|
-
| maintain ↔ web | 1 /
|
|
45
|
+
| maintain ↔ web | 1 / 7 | `maintain/update.mjs` lazily imports `web/daemon.mjs` for the same restart |
|
|
46
46
|
|
|
47
47
|
The only gates over the import graph are the transitive closure walks in
|
|
48
48
|
`tests/unit/hook_cli.test.mjs`. They pin which modules the generator and CLI entries may pull
|
|
@@ -65,6 +65,7 @@ as a per-host install at project or global scope.
|
|
|
65
65
|
| `emit-opencode.mjs` | The OpenCode emits — a project's `.opencode/` and the global config dir. Deliberate twin of the above |
|
|
66
66
|
| `emit-common.mjs` | Constants, tree walkers, and the three writers BOTH global emits share. Decides no host |
|
|
67
67
|
| `fold.mjs` | The fold: moves a global install's stores into the shared tier, in the emit. Moves aside, never deletes; a second run writes nothing |
|
|
68
|
+
| `rule-decide.mjs` | The decisions on the draft: the approval flow of `src/skills/rule/approve.md`, as the console applies it. Write order: target, ledger, draft |
|
|
68
69
|
| `stubs.mjs` | Write-once seed files: context, wiki, rules, excludes, profile, `.gitignore`, memory/notebook indexes |
|
|
69
70
|
| `version.mjs` | The release marker: fingerprint the sources, read/compare/write an install's version, warn on downgrade |
|
|
70
71
|
| `driver.mjs` | The generator driver: the nine emit targets, per-host emit orchestration, the prune and the manifest. `bin/build-driver.mjs` is only its entry |
|
|
@@ -105,7 +106,7 @@ user co-owns, and the hook verbs those emitted configs then run.
|
|
|
105
106
|
| `gitref.mjs` | fs/path-only: `gitRootOf`, `gitDirOf`, `gitCommonDirOf`, `currentBranch`, `protectedBranches`, `stashExists`, `loopLaunched` — read straight off `.git`, never spawn git. Shared by `hooks.mjs`'s git-gate, `loss.mjs` and `js/loop/cli.mjs`'s commit-message writer |
|
|
106
107
|
| `loss.mjs` | Law IV calibrated to real loss: `lossReason` decides whether a command would really lose data (protected branch, unpushed branch, dirty tree, stash, reflog, files git cannot restore) and fails closed. The gate path's one `git` spawn, reached only after `LOSS_CANDIDATE_RE` matched. Twin: the OpenCode guard plugin |
|
|
107
108
|
| `settings.mjs` | Merges into user-owned `settings.json`/`opencode.json` (one `loadJsonObject` reader for all of them) and the managed blocks |
|
|
108
|
-
| `shim.mjs` | The machine-wide hook shim: its path, body, liveness (`shimDead`, read on every CLI run), `hookPrefix`/`hookRunnerEntry
|
|
109
|
+
| `shim.mjs` | The machine-wide hook shim: its path, body, liveness (`shimDead`, read on every CLI run), `hookPrefix`/`hookRunnerEntry`; and the web console's login launcher (`autostartState`/`autostartInstall`/`autostartRemove`). Kept cheap to import |
|
|
109
110
|
| `native.mjs` | Capability specs → host-native subagents and skills. The impure half of the emit |
|
|
110
111
|
| `opencode.mjs` | OpenCode-only extras: colour themes, primary agent, `/commands`, plugins, overrides stub |
|
|
111
112
|
| `installs.mjs` | Detects deployed installs and reads back their theme, footprint, posture, mode and loop trust preset |
|
package/js/build/emit-claude.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { claimer, loadAgentOverrides, writeNativeLayer } from '../hosts/native.m
|
|
|
11
11
|
import { ensureAgentOverridesStub, writeAliasCommands } from '../hosts/opencode.mjs';
|
|
12
12
|
import {
|
|
13
13
|
managedBlockRemove, managedBlockWrite, mergeClaudeSettings,
|
|
14
|
-
unwireClaudeExcludes, unwireClaudeSettings, wireClaudeExcludes,
|
|
14
|
+
unwireClaudeEnv, unwireClaudeExcludes, unwireClaudeSettings, wireClaudeEnv, wireClaudeExcludes,
|
|
15
15
|
} from '../hosts/settings.mjs';
|
|
16
16
|
import { get, isDict, isTruthy } from '../lib/json.mjs';
|
|
17
17
|
import { relPosix } from '../lib/text.mjs';
|
|
@@ -281,6 +281,7 @@ function claudeWire(job, claudeMdText, hasAgentText, doctrines = null, excludeRu
|
|
|
281
281
|
if (oldSf !== settingsName) {
|
|
282
282
|
unwireClaudeSettings(path.join(cfgDir, oldSf), get(old, 'settings_hooks') || []);
|
|
283
283
|
unwireClaudeExcludes(path.join(cfgDir, oldSf), get(old, 'settings_excludes') || []);
|
|
284
|
+
unwireClaudeEnv(path.join(cfgDir, oldSf), get(old, 'settings_env'));
|
|
284
285
|
}
|
|
285
286
|
// The merge prunes recorded groups that are no longer canonical and returns the
|
|
286
287
|
// COMPLETE current claim set — store it as-is; unioning with prior would resurrect the
|
|
@@ -293,6 +294,13 @@ function claudeWire(job, claudeMdText, hasAgentText, doctrines = null, excludeRu
|
|
|
293
294
|
doctrines, excludeRules, host, cfgDir, gates,
|
|
294
295
|
);
|
|
295
296
|
managed.settings_hooks = managedHooks;
|
|
297
|
+
// The subagent depth cap, Claude Code only (`CLAUDE_ENV` says why). The record is what this
|
|
298
|
+
// install wrote, prior plus new, so uninstall never takes a key the user set themselves.
|
|
299
|
+
if (host === 'claude') {
|
|
300
|
+
const priorEnv = oldSf === settingsName && isDict(get(old, 'settings_env')) ? old.settings_env : {};
|
|
301
|
+
const env = { ...priorEnv, ...wireClaudeEnv(settingsPath) };
|
|
302
|
+
if (Object.keys(env).length) managed.settings_env = env;
|
|
303
|
+
}
|
|
296
304
|
|
|
297
305
|
// Project-bypasses-global (Claude and OpenClaude): a PROJECT install suppresses the GLOBAL
|
|
298
306
|
// ~/.claude/CLAUDE.md (or ~/.openclaude/CLAUDE.md) while cwd is this repo, via the shared
|
|
@@ -98,7 +98,8 @@ function opencodeLayer(cfg, items, themeName, theme, dir, owned, opts) {
|
|
|
98
98
|
const wired = {};
|
|
99
99
|
const cfgName = path.basename(mergeOpencodeJson(path.join(wireBase, 'opencode.json'),
|
|
100
100
|
agentPath, cfg.doctrines, cfg.excludeRules, userOnlySkills, staleSkillNames, wired,
|
|
101
|
-
cfg.deletionGate, opencodeEditAsks(dir, wireBase === dir, wireBase === dir ? null : agentPath
|
|
101
|
+
cfg.deletionGate, opencodeEditAsks(dir, wireBase === dir, wireBase === dir ? null : agentPath,
|
|
102
|
+
cfg.doctrines, cfg.excludeRules), oldEdit));
|
|
102
103
|
// The next record: Geneseed's earlier denies still wanted, plus the ones it added now. A merge
|
|
103
104
|
// that wrote nothing (`skillsAdded` unset) keeps the old record whole.
|
|
104
105
|
const skillDenies = wired.skillsAdded
|