geneseed 5.3.0 → 5.4.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 +95 -0
- package/README.md +23 -20
- package/SHIPPED.md +7 -7
- package/adapters/bob/README.md +31 -18
- package/adapters/claude-code/README.md +27 -22
- package/adapters/openclaude/README.md +18 -8
- package/adapters/opencode/HOW-OPENCODE-LOADS.md +8 -3
- package/adapters/opencode/README.md +3 -2
- package/adapters/opencode/plugins/geneseed-activity.js +20 -21
- package/adapters/opencode/plugins/geneseed-context.js +175 -62
- package/adapters/opencode/plugins/geneseed-guard.js +419 -205
- package/adapters/opencode/plugins/geneseed-workflow.js +3 -2
- package/adapters/opencode/workflows/_runtime.js +3 -2
- package/bin/geneseed-cli.mjs +7 -0
- package/bin/geneseed-hook.mjs +59 -11
- package/docs/PRD.md +1 -1
- package/docs/README.md +1 -0
- package/docs/concepts/agents.md +1 -1
- package/docs/concepts/collaboration.md +2 -2
- package/docs/concepts/enforcement-table.md +5 -2
- package/docs/concepts/exclusions.md +18 -4
- package/docs/concepts/footprint.md +11 -1
- package/docs/concepts/foreman-mode.md +1 -1
- package/docs/concepts/hook-gates.md +5 -5
- package/docs/concepts/hooks.md +4 -3
- package/docs/concepts/host-matrix.md +24 -6
- package/docs/concepts/kits.md +12 -2
- package/docs/concepts/loop-bricks.md +3 -3
- package/docs/concepts/loops.md +6 -4
- package/docs/concepts/ownership.md +1 -1
- package/docs/concepts/rules.md +2 -2
- package/docs/concepts/skills.md +1 -1
- package/docs/design-history.md +8 -0
- package/docs/extending.md +112 -35
- package/docs/guides/auto-merge.md +100 -0
- package/docs/guides/choose-your-setup.md +1 -1
- package/docs/guides/headless.md +1 -1
- package/docs/guides/install-bob.md +2 -2
- package/docs/guides/install-clone.md +1 -1
- package/docs/guides/install-openclaude.md +1 -1
- package/docs/guides/install.md +1 -1
- package/docs/guides/loop-finish.md +3 -3
- package/docs/guides/loop-running.md +4 -4
- package/docs/guides/project-context.md +1 -1
- package/docs/guides/run-a-factory.md +2 -2
- package/docs/guides/setup-doctrines.md +2 -2
- package/docs/guides/setup-footprint.md +1 -1
- package/docs/guides/uninstall.md +3 -3
- package/docs/guides/upgrade.md +1 -1
- package/docs/guides/verify.md +12 -0
- package/docs/guides/worktree.md +1 -1
- package/docs/reference/environment.md +5 -2
- package/docs/reference/plugin-activity.md +1 -1
- package/docs/reference/plugin-guard.md +1 -1
- package/docs/reference/plugin-learn.md +1 -1
- package/docs/reference/plugin-workflow.md +1 -1
- package/docs/reference/troubleshoot-doctor.md +2 -2
- package/docs/reference/troubleshoot-hooks.md +2 -2
- package/docs/reference/troubleshoot-install.md +3 -3
- package/docs/reference/troubleshoot-tools.md +1 -1
- package/docs/token-footprint.md +68 -4
- package/docs/understand/design-choices-hosts.md +1 -1
- package/docs/understand/design-choices-shape.md +1 -0
- package/docs/understand/enforced-vs-asked.md +2 -2
- package/docs/understand/machine-bob.md +1 -1
- package/docs/understand/machine-claude.md +2 -2
- package/docs/understand/on-your-machine.md +1 -1
- package/docs/web-ui.md +10 -5
- package/harness.config.json +1 -1
- package/js/README.md +5 -3
- package/js/build/args.mjs +13 -2
- package/js/build/driver.mjs +34 -7
- package/js/build/emit-claude.mjs +9 -5
- package/js/build/emit-opencode.mjs +13 -9
- package/js/build/generate.mjs +10 -165
- package/js/build/profile.mjs +318 -0
- package/js/build/render.mjs +81 -3
- package/js/build/retired-skills.mjs +60 -13
- package/js/build/source.mjs +15 -1
- package/js/build/stubs.mjs +4 -1
- package/js/cli-table.json +48 -3
- package/js/hosts/done-checks.mjs +6 -0
- package/js/hosts/geneseed-dir.mjs +3 -2
- package/js/hosts/gitref.mjs +5 -3
- package/js/hosts/hook-tap.mjs +104 -0
- package/js/hosts/hooks-context.mjs +4 -2
- package/js/hosts/hooks-done.mjs +345 -55
- package/js/hosts/hooks-learn.mjs +51 -19
- package/js/hosts/hooks-prims.mjs +5 -3
- package/js/hosts/hooks.mjs +172 -19
- package/js/hosts/hosts.mjs +80 -12
- package/js/hosts/installs.mjs +26 -1
- package/js/hosts/native.mjs +33 -7
- package/js/hosts/owned.mjs +7 -6
- package/js/hosts/ownership-gate.mjs +14 -1
- package/js/hosts/settings.mjs +273 -105
- package/js/hosts/shim.mjs +4 -4
- package/js/hosts/usage.mjs +9 -3
- package/js/inspect/checks-constitution.mjs +32 -0
- package/js/inspect/checks-probe.mjs +66 -5
- package/js/inspect/checks-repo.mjs +196 -2
- package/js/inspect/cost.mjs +34 -2
- package/js/inspect/diff.mjs +21 -3
- package/js/inspect/doctor.mjs +6 -1
- package/js/inspect/inventory.mjs +1 -1
- package/js/lib/machine-dir.mjs +1 -1
- package/js/lib/node-floor.mjs +46 -6
- package/js/maintain/setup.mjs +5 -1
- package/js/maintain/uninstall.mjs +42 -16
- package/js/maintain/update.mjs +4 -2
- package/js/web/actions.mjs +17 -12
- package/js/web/api.mjs +7 -2
- package/package.json +1 -1
- package/registry.json +14 -0
- package/src/AGENT.md.tmpl +15 -17
- package/src/bricks/pr-open.md +3 -2
- package/src/doctrines/ops.md +2 -2
- package/src/doctrines/process.md +40 -36
- package/src/factories/analysis-to-build.json +1 -1
- package/src/factories/bug-report-to-fix.json +1 -1
- package/src/factories/issue-to-pr.json +1 -1
- package/src/kits/terminal-tools/rules.md +10 -0
- package/src/kits/terminal-tools.json +13 -0
- package/src/licenses/herdr.txt +201 -0
- package/src/modes/foreman.md +6 -3
- package/src/skills/_self-improvement.md +9 -7
- package/src/skills/commit.md +17 -17
- package/src/skills/debug/ci.md +1 -1
- package/src/skills/dependencies.md +3 -3
- package/src/skills/document-project.md +3 -2
- package/src/skills/factory.md +13 -4
- package/src/skills/geneseed.md +4 -2
- package/src/skills/git-history.md +5 -7
- package/src/skills/herdr.md +135 -0
- package/src/skills/loop.md +3 -2
- package/src/skills/opencode-cli.md +84 -0
- package/src/skills/pipeline.md +1 -1
- package/src/skills/release.md +5 -8
- package/src/skills/review-response.md +4 -2
- package/src/skills/rule.md +27 -1
- package/src/skills/ship.md +54 -7
- package/src/skills/worktree.md +2 -2
- package/src/upstreams.json +7 -0
- package/themes/_TEMPLATE.json +2 -0
- package/themes/biker.json +2 -0
- package/themes/commentator.json +2 -0
- package/themes/cyberpunk.json +2 -0
- package/themes/gamer.json +2 -0
- package/themes/imperial.json +2 -0
- package/themes/joker.json +2 -0
- package/themes/marvin.json +2 -0
- package/themes/mean.json +2 -0
- package/themes/military.json +2 -0
- package/themes/neutral.json +2 -0
- package/themes/pirate.json +2 -0
- package/themes/sports.json +2 -0
- package/themes/verstappen.json +2 -0
- package/themes/wizard.json +2 -0
- package/web/dist/assets/Activity-D2kOc3yi.js +1 -0
- package/web/dist/assets/ActivityDetail-By3xOr21.js +1 -0
- package/web/dist/assets/{Bonsai-Bfpb6W-1.js → Bonsai-CBWDTBA4.js} +1 -1
- package/web/dist/assets/{CopyButton-ByIntFtB.js → CopyButton-BVbpriMB.js} +1 -1
- package/web/dist/assets/Dashboard-CIJLPHM9.js +2 -0
- package/web/dist/assets/{Docs-DvlMJhpu.js → Docs-CiRRIELs.js} +3 -3
- package/web/dist/assets/Factories-DhyK0O8d.js +1 -0
- package/web/dist/assets/GreenhouseView-DW3PgTPy.js +1 -0
- package/web/dist/assets/Installs-B6nlo-Ly.js +3 -0
- package/web/dist/assets/JournalView-O65qEWfp.js +1 -0
- package/web/dist/assets/Kits-C5U-yT6Z.js +1 -0
- package/web/dist/assets/Laws-CuTw_XNf.js +4 -0
- package/web/dist/assets/{LibRows-DEHjIoD-.js → LibRows-D6-CVa3K.js} +1 -1
- package/web/dist/assets/Library-CzPlerd6.js +3 -0
- package/web/dist/assets/Loops-CqNF_-nS.js +2 -0
- package/web/dist/assets/Markdown-CxkA7940.js +71 -0
- package/web/dist/assets/OperatorHudView-BNr8K5qj.js +1 -0
- package/web/dist/assets/Personal-DeDb9e8O.js +2 -0
- package/web/dist/assets/Settings-B8MPN_AD.js +1 -0
- package/web/dist/assets/{Tabs-CWeQTADL.js → Tabs-DJzAez4h.js} +1 -1
- package/web/dist/assets/index-BL3P-9Rg.js +6 -0
- package/web/dist/assets/{index-CsAZq0BQ.css → index-CRWqKxfY.css} +1 -1
- package/web/dist/index.html +2 -2
- package/adapters/claude-code/settings.json +0 -52
- package/web/dist/assets/Activity-CqJiquEq.js +0 -1
- package/web/dist/assets/ActivityDetail-BSzevynX.js +0 -1
- package/web/dist/assets/Dashboard-DBOEi9lQ.js +0 -2
- package/web/dist/assets/Factories-Bpvv7L2H.js +0 -1
- package/web/dist/assets/GreenhouseView-GpBsYn50.js +0 -1
- package/web/dist/assets/Installs-BlGmVrFK.js +0 -3
- package/web/dist/assets/JournalView-iLuLrOxE.js +0 -1
- package/web/dist/assets/Kits-DRwpxC-J.js +0 -1
- package/web/dist/assets/Laws-CZkiNOWQ.js +0 -4
- package/web/dist/assets/Library-B4K-1iNF.js +0 -3
- package/web/dist/assets/Loops-BWSzaW8E.js +0 -2
- package/web/dist/assets/Markdown-0ORz7tAc.js +0 -69
- package/web/dist/assets/OperatorHudView-BAXwCEvY.js +0 -1
- package/web/dist/assets/Personal-Bp9nV4GR.js +0 -2
- package/web/dist/assets/Settings-CWWuaIp-.js +0 -1
- package/web/dist/assets/index-How7SzDZ.js +0 -6
|
@@ -58,13 +58,15 @@ import {
|
|
|
58
58
|
CLAUDE_STYLE, DISABLED_STASH, GLOBAL_MANIFEST, HOSTS, VERSION_MARKER, expanduser, isHostGlobalDir, opencodeConfigDir,
|
|
59
59
|
resolvePath, settingsFile,
|
|
60
60
|
} from '../hosts/hosts.mjs';
|
|
61
|
-
import {
|
|
61
|
+
import { mcpLoad } from '../hosts/mcp.mjs';
|
|
62
62
|
import {
|
|
63
63
|
SRC_DIRS_MARKER, bundleFiles, hashesOf, ownedState, ownedWithin, recordedDenies, recordedEdit,
|
|
64
|
+
recordedGates,
|
|
64
65
|
} from '../hosts/owned.mjs';
|
|
65
66
|
import {
|
|
66
67
|
atomicWriteJson, managedBlockRead, managedBlockRemove, managedBlockWrite,
|
|
67
68
|
loadJsonObject, mergeClaudeSettings, opencodeTarget, OPENCODE_SENTINEL, opencodeSentinelWrite,
|
|
69
|
+
OWNED_VERDICT,
|
|
68
70
|
settingsIntegrityCheck, wireClaudeExcludes, unwireClaudeExcludes,
|
|
69
71
|
unwireClaudeSettings, wireClaudeEnv, unwireClaudeEnv,
|
|
70
72
|
} from '../hosts/settings.mjs';
|
|
@@ -246,12 +248,24 @@ const REVERSAL_MARKERS = [GLOBAL_MANIFEST, '.geneseed-theme', '.geneseed-emit',
|
|
|
246
248
|
* deactivate, which removed the entry but kept the denies (PR #241 review) — so either half
|
|
247
249
|
* alone is a change, and only "neither" declines.
|
|
248
250
|
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
+
* `gates` is the manifest's `bash_gates` — the `permission.bash` keys an emit itself ADDED,
|
|
252
|
+
* because they were absent when it ran. Uninstall once left all of them (some 45 keys:
|
|
253
|
+
* `"git commit*": "ask"` and the push chain) in a file whose harness was gone, although the
|
|
254
|
+
* record of having written them was right there. A recorded key goes only while it still reads
|
|
255
|
+
* the verdict Geneseed writes for it (`OWNED_VERDICT`): the same two conditions under which a
|
|
256
|
+
* pack-off rebuild takes one back (`reconcileOpencodePermission`), so a key the user re-scoped,
|
|
257
|
+
* and any key that is not in the record — theirs from the start, or from an install older than
|
|
258
|
+
* 5.2.0 — stays. An emptied `bash` object is dropped, as an emptied `skill` is; `permission`
|
|
259
|
+
* itself is left, empty or not, as those two sweeps leave it. `[]` (deactivate) sweeps nothing:
|
|
260
|
+
* a paused install keeps its gates, which is the fail-closed direction.
|
|
261
|
+
*
|
|
262
|
+
* A COMMENTED file — `opencode.json` or `.jsonc`, the extension does not matter — is not
|
|
263
|
+
* rewritten and the user is told to do it by hand — the entry, the recorded denies still set
|
|
264
|
+
* to `"deny"` AND the recorded gates still at Geneseed's verdict, each named: rewriting it
|
|
251
265
|
* would drop the comments. That branch returns False, so the caller's `unmerged` reports
|
|
252
266
|
* REALITY rather than intent.
|
|
253
267
|
*/
|
|
254
|
-
export function unmergeOpencodeJson(p, entry, denyNames = [], edit = null) {
|
|
268
|
+
export function unmergeOpencodeJson(p, entry, denyNames = [], edit = null, gates = []) {
|
|
255
269
|
const target = opencodeTarget(p);
|
|
256
270
|
// Absent, unreadable (the Python's `except OSError: return False`) or not an object: decline.
|
|
257
271
|
const { state, data: cfg, hadComments } = loadJsonObject(target);
|
|
@@ -267,20 +281,28 @@ export function unmergeOpencodeJson(p, entry, denyNames = [], edit = null) {
|
|
|
267
281
|
// back only when nothing but its `"*"` is left — a key the user added since keeps the object.
|
|
268
282
|
const editObj = edit && isDict(cfg.permission) && isDict(cfg.permission.edit) ? cfg.permission.edit : null;
|
|
269
283
|
const asks = editObj ? edit.asks.filter((k) => editObj[k] === 'ask') : [];
|
|
270
|
-
|
|
271
|
-
|
|
284
|
+
const bash = isDict(cfg.permission) && isDict(cfg.permission.bash) ? cfg.permission.bash : null;
|
|
285
|
+
const ours = bash
|
|
286
|
+
? gates.filter((k) => OWNED_VERDICT.has(k) && bash[k] === OWNED_VERDICT.get(k))
|
|
287
|
+
: [];
|
|
288
|
+
if (!hasEntry && !denies.length && !asks.length && !ours.length) return false;
|
|
289
|
+
if (hadComments) {
|
|
272
290
|
printOut(`[uninstall] ${path.basename(target)} has comments — not rewriting it.`
|
|
273
291
|
+ (hasEntry ? ` Remove this from its "instructions" by hand: ${jsonDumps(entry)}` : '')
|
|
274
292
|
+ (denies.length ? ` Remove these from its "permission.skill" by hand: `
|
|
275
293
|
+ `${denies.map((n) => jsonDumps(n)).join(', ')}` : '')
|
|
276
294
|
+ (asks.length ? ` Remove these from its "permission.edit" by hand: `
|
|
277
295
|
+ `${asks.map((k) => jsonDumps(k)).join(', ')}` : '')
|
|
296
|
+
+ (ours.length ? ` Remove these from its "permission.bash" by hand: `
|
|
297
|
+
+ `${ours.map((k) => jsonDumps(k)).join(', ')}` : '')
|
|
278
298
|
+ '\n');
|
|
279
299
|
return false;
|
|
280
300
|
}
|
|
281
301
|
if (hasEntry) cfg.instructions = instr.filter((i) => i !== entry);
|
|
282
302
|
for (const name of denies) delete skill[name];
|
|
283
303
|
if (skill && denies.length && !Object.keys(skill).length) delete cfg.permission.skill;
|
|
304
|
+
for (const k of ours) delete bash[k];
|
|
305
|
+
if (ours.length && !Object.keys(bash).length) delete cfg.permission.bash;
|
|
284
306
|
for (const k of asks) delete editObj[k];
|
|
285
307
|
if (asks.length) {
|
|
286
308
|
const left = Object.keys(editObj);
|
|
@@ -324,7 +346,7 @@ export function claudeUninstall(cfg, archiveMemory, force = false) {
|
|
|
324
346
|
if (kept.length) warnKept(kept);
|
|
325
347
|
const hooks = managed.settings_hooks || [];
|
|
326
348
|
const sf = settingsFile(cfg, managed);
|
|
327
|
-
const unwired = unwireClaudeSettings(sf, hooks);
|
|
349
|
+
const unwired = unwireClaudeSettings(sf, hooks, cfg);
|
|
328
350
|
unwireClaudeExcludes(sf, managed.settings_excludes || []);
|
|
329
351
|
unwireClaudeEnv(sf, managed.settings_env);
|
|
330
352
|
// The unwire is VERIFIED, not assumed: a commented settings file is never rewritten, so a
|
|
@@ -361,7 +383,8 @@ export function uninstallGlobal(target, archiveMemory, host = 'opencode', force
|
|
|
361
383
|
if (isDir(p) && isEmptyDir(p)) rmdirQuiet(p);
|
|
362
384
|
}
|
|
363
385
|
const unmerged = unmergeOpencodeJson(path.join(target, 'opencode.json'),
|
|
364
|
-
path.join(target, 'AGENT.md').split(path.sep).join('/'), recordedDenies(man), recordedEdit(man)
|
|
386
|
+
path.join(target, 'AGENT.md').split(path.sep).join('/'), recordedDenies(man), recordedEdit(man),
|
|
387
|
+
recordedGates(man));
|
|
365
388
|
managedBlockRemove(path.join(target, OPENCODE_SENTINEL));
|
|
366
389
|
if (failed.length) warnMarkersKept();
|
|
367
390
|
else for (const m of REVERSAL_MARKERS) unlinkQuiet(path.join(target, m));
|
|
@@ -488,7 +511,8 @@ function opencodeProjectUninstall(root, force = false) {
|
|
|
488
511
|
}
|
|
489
512
|
}
|
|
490
513
|
const unmerged = unmergeOpencodeJson(path.join(root, 'opencode.json'), entry,
|
|
491
|
-
man ? recordedDenies(man) : [], man ? recordedEdit(man) : null
|
|
514
|
+
man ? recordedDenies(man) : [], man ? recordedEdit(man) : null,
|
|
515
|
+
man ? recordedGates(man) : []);
|
|
492
516
|
const result = { removed, unmerged, archived: null, userOnly };
|
|
493
517
|
if (failed.length) result.failed = failed;
|
|
494
518
|
if (kept.length) result.kept = kept;
|
|
@@ -1010,7 +1034,7 @@ function installMoveList(root, kind) {
|
|
|
1010
1034
|
*
|
|
1011
1035
|
* Deliberately a minimal inline re-add rather than the emit's own merge, whose side effects
|
|
1012
1036
|
* (adding `permission` and `lsp: true` when absent) would clobber values the user may have
|
|
1013
|
-
* set since the install was disabled. A commented
|
|
1037
|
+
* set since the install was disabled. A commented file is not rewritten — the same
|
|
1014
1038
|
* refusal `unmergeOpencodeJson` makes — but here the files have ALREADY been restored, so it
|
|
1015
1039
|
* tells the operator what to add rather than failing the whole reactivate. That asymmetry is
|
|
1016
1040
|
* the reference's and is gated per side.
|
|
@@ -1024,7 +1048,7 @@ function installReaddEntry(target, entry) {
|
|
|
1024
1048
|
if (state !== 'ok') return false; // unreadable (except OSError), or not an object
|
|
1025
1049
|
const instr = Array.isArray(cfg.instructions) ? cfg.instructions : [];
|
|
1026
1050
|
if (indexOfDeepEqual(instr, entry) >= 0) return false;
|
|
1027
|
-
if (
|
|
1051
|
+
if (hadComments) {
|
|
1028
1052
|
printOut(`[activate] ${path.basename(target)} has comments — not rewriting it. Add this `
|
|
1029
1053
|
+ `to its "instructions" by hand: ${jsonDumps(entry)}\n`);
|
|
1030
1054
|
return false;
|
|
@@ -1138,12 +1162,14 @@ export function installDeactivate(root, host = 'opencode', scope = 'global') {
|
|
|
1138
1162
|
}
|
|
1139
1163
|
const kind = installKind(root);
|
|
1140
1164
|
const target = opencodeTarget(path.join(root, 'opencode.json'));
|
|
1141
|
-
// Caught UP FRONT, before any file moves: a commented
|
|
1142
|
-
// dropping the user's comments, so refuse and move NOTHING.
|
|
1143
|
-
|
|
1165
|
+
// Caught UP FRONT, before any file moves: a commented file cannot be rewritten without
|
|
1166
|
+
// dropping the user's comments, so refuse and move NOTHING. By comments, not by extension:
|
|
1167
|
+
// the unmerge below refuses a commented `opencode.json` too, and a guard that let one
|
|
1168
|
+
// through would move every file and leave the `instructions` entry pointing at nothing.
|
|
1169
|
+
if (loadJsonObject(target).hadComments) {
|
|
1144
1170
|
return { ok: false,
|
|
1145
1171
|
error: `${path.basename(target)} has comments — refusing to rewrite it. `
|
|
1146
|
-
+ 'Disable by hand or
|
|
1172
|
+
+ 'Disable by hand or remove the comments first.' };
|
|
1147
1173
|
}
|
|
1148
1174
|
const stash = path.join(root, DISABLED_STASH);
|
|
1149
1175
|
const { done, failed } = moveAll(root, stash, installMoveList(root, kind));
|
|
@@ -1275,7 +1301,7 @@ function claudeDeactivate(root, scope = 'global', host = 'claude') {
|
|
|
1275
1301
|
cleanHostStash(cfg, host);
|
|
1276
1302
|
return { ok: false, failed, rolled_back: done.length };
|
|
1277
1303
|
}
|
|
1278
|
-
unwireClaudeSettings(settingsFile(cfg, managed), managed.settings_hooks || []);
|
|
1304
|
+
unwireClaudeSettings(settingsFile(cfg, managed), managed.settings_hooks || [], cfg);
|
|
1279
1305
|
unwireClaudeExcludes(settingsFile(cfg, managed), managed.settings_excludes || []);
|
|
1280
1306
|
unwireClaudeEnv(settingsFile(cfg, managed), managed.settings_env);
|
|
1281
1307
|
// The same integrity check the uninstall path runs: a deactivate that silently failed to
|
package/js/maintain/update.mjs
CHANGED
|
@@ -749,7 +749,9 @@ async function drainStdout() {
|
|
|
749
749
|
|
|
750
750
|
/**
|
|
751
751
|
* The flags that re-emit the install at `dir` on its OWN axes — footprint, posture, mode,
|
|
752
|
-
* trust, doctrine packs, excluded rules — or `[]`
|
|
752
|
+
* trust, doctrine packs, excluded rules, excluded skills, gates, kits, shared tier — or `[]`
|
|
753
|
+
* when no build ever wrote a marker there. Every axis the preserve guard compares
|
|
754
|
+
* (js/build/profile.mjs) has to be here, or `upgrade` is refused on the one it left out.
|
|
753
755
|
*
|
|
754
756
|
* WITHOUT THEM THE REBUILD RESETS THE INSTALL. The generator's defaults are not the install's:
|
|
755
757
|
* a missing `--footprint` is `lean`, and posture, mode, packs and excluded rules come from
|
|
@@ -770,7 +772,7 @@ export async function installAxes(dir, { installProfile, setupBuildArgs }, notif
|
|
|
770
772
|
if (!existsSync(path.join(String(dir), '.geneseed-emit'))) return [];
|
|
771
773
|
const p = installProfile('opencode', 'global', String(dir), notify);
|
|
772
774
|
return setupBuildArgs('', 'files', null, null, p.footprint, p.posture, p.mode, p.doctrines,
|
|
773
|
-
undefined, p.excludeRules, p.trust, p.excludeSkills, p, p.kits).slice(4);
|
|
775
|
+
undefined, p.excludeRules, p.trust, p.excludeSkills, p, p.kits, p.sharedTier).slice(4);
|
|
774
776
|
}
|
|
775
777
|
|
|
776
778
|
/**
|
package/js/web/actions.mjs
CHANGED
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
opencodeConfigDir, resolvePath,
|
|
49
49
|
} from '../hosts/hosts.mjs';
|
|
50
50
|
import {
|
|
51
|
-
EMIT_HOST_SCOPE, doctrinesForBuild, excludedRulesOfDir, excludedSkillsOfDir, kitsOfDir, sharedTierOfDir, renderedTier,
|
|
51
|
+
EMIT_FOR, EMIT_HOST_SCOPE, doctrinesForBuild, excludedRulesOfDir, excludedSkillsOfDir, kitsOfDir, sharedTierOfDir, renderedTier,
|
|
52
52
|
footprintOfDir, gatesOfDir,
|
|
53
53
|
installState, installTargets, modeOfDir, postureOfDir, themeOfDir,
|
|
54
54
|
trustOfDir,
|
|
@@ -157,7 +157,7 @@ function bodySharedTier(body, root, host) {
|
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
159
|
* The gate switches across the trust boundary (`deletionGate`, `secretsGate`, `doneGate`,
|
|
160
|
-
* `ownershipGate`, `externalGate`, `testNote`), each on its own: only a real JSON boolean counts. Anything else — a string
|
|
160
|
+
* `ownershipGate`, `externalGate`, `testNote`, `ownBranchPass`), each on its own: only a real JSON boolean counts. Anything else — a string
|
|
161
161
|
* `"false"`, a number, absence — falls back to the install's own answer for THAT gate, so a
|
|
162
162
|
* malformed or partial body can never disarm (or re-arm) a gate it did not name.
|
|
163
163
|
*/
|
|
@@ -563,12 +563,16 @@ export function buildActionCmds(state, body) {
|
|
|
563
563
|
return { error: `${emit} installs into a folder you choose — use Deploy with a folder, `
|
|
564
564
|
+ 'not Build' };
|
|
565
565
|
}
|
|
566
|
-
|
|
566
|
+
const [step] = actionCommands('build', {
|
|
567
567
|
theme, emit, footprint: deployed(state) ? state.footprint : 'lean',
|
|
568
568
|
posture: state.posture, mode: state.mode,
|
|
569
569
|
trust: state.trust,
|
|
570
570
|
doctrines: doctrinesForBuild(state.target),
|
|
571
571
|
});
|
|
572
|
+
// `--reset`, as in `apiInstallCmd`: a fresh target's argv is a whole selection that elides
|
|
573
|
+
// axes at their defaults, so an install already there must not be refused by the preserve
|
|
574
|
+
// guard (js/build/profile.mjs) for every axis it did not spell.
|
|
575
|
+
return [[...step, '--reset']];
|
|
572
576
|
}
|
|
573
577
|
|
|
574
578
|
/**
|
|
@@ -716,14 +720,6 @@ export function apiRestore(state, files) {
|
|
|
716
720
|
return { restored, deleted, errors, archive };
|
|
717
721
|
}
|
|
718
722
|
|
|
719
|
-
/** (host, scope) -> the emit name that installs it. */
|
|
720
|
-
const EMIT_FOR = new Map([
|
|
721
|
-
['opencode global', 'opencode-global'], ['opencode project', 'opencode'],
|
|
722
|
-
['claude global', 'claude-global'], ['claude project', 'claude'],
|
|
723
|
-
['bob global', 'bob-global'], ['bob project', 'bob'],
|
|
724
|
-
['openclaude global', 'openclaude-global'], ['openclaude project', 'openclaude'],
|
|
725
|
-
]);
|
|
726
|
-
|
|
727
723
|
/**
|
|
728
724
|
* The build command that installs Geneseed into a DETECTED location, or re-themes an
|
|
729
725
|
* already-active one (an in-place re-emit, the same command either way).
|
|
@@ -745,7 +741,7 @@ export function apiInstallCmd(state, body) {
|
|
|
745
741
|
const emit = EMIT_FOR.get(`${host} ${scope}`);
|
|
746
742
|
if (emit === undefined) return { error: `no install mode for ${host}:${scope}` };
|
|
747
743
|
// Every read-back below is narrowed to `host`'s OWN carrier (host-compat B1) — see the
|
|
748
|
-
// comment at `installProfile` in `js/build/
|
|
744
|
+
// comment at `installProfile` in `js/build/profile.mjs`.
|
|
749
745
|
// The theme default is THIS install's own, not the viewed one's: the Kits page acts on any row.
|
|
750
746
|
// An ABSENT row has no footprint of its own (`footprintOfDir` answers its no-marker `full`),
|
|
751
747
|
// so a new install takes the CLI's default, lean — see `apiDeployCmd` below.
|
|
@@ -788,9 +784,16 @@ export function apiInstallCmd(state, body) {
|
|
|
788
784
|
const argv = setupBuildArgs(theme || 'neutral', emit, out, out, fp, pos, mode, doctrines,
|
|
789
785
|
PACK_ORDER, excludeRules, trust, excludedSkillsOfDir(root, host), gates,
|
|
790
786
|
kits ?? kitsOfDir(root, host), sharedTier);
|
|
787
|
+
// `--reset`: this argv is a WHOLE selection — every axis is the body's or the install's own —
|
|
788
|
+
// and `setupBuildArgs` elides an axis at its default, so returning one to it (a mode back to
|
|
789
|
+
// direct, a gate re-armed) would otherwise trip the preserve guard (js/build/profile.mjs).
|
|
790
|
+
argv.push('--reset');
|
|
791
791
|
// `--force` only on a literal `true`: the panel's "Replace with Geneseed's copies", which
|
|
792
792
|
// names the files first. It is this one build's instruction and is never recorded.
|
|
793
793
|
if (bget(body, 'force') === true) argv.push('--force');
|
|
794
|
+
// `--prune-gates` the same way, and only where it means something: OpenCode's opencode.json
|
|
795
|
+
// is the one file with `permission.bash` gates. One build's instruction, never recorded.
|
|
796
|
+
if (bget(body, 'pruneGates') === true && host === 'opencode') argv.push('--prune-gates');
|
|
794
797
|
return { cmd: [process.execPath, path.join(ROOT, 'bin', 'build-driver.mjs'), ...argv] };
|
|
795
798
|
}
|
|
796
799
|
|
|
@@ -924,5 +927,7 @@ export function apiDeployCmd(state, body) {
|
|
|
924
927
|
const argv = setupBuildArgs(theme || 'neutral', host, root, root, fp, pos, mode, doctrines,
|
|
925
928
|
PACK_ORDER, excludeRules, trust, excludedSkillsOfDir(root, host), gates, kitsOfDir(root, host),
|
|
926
929
|
bodySharedTier(body, root, host));
|
|
930
|
+
// `--reset`, as in `apiInstallCmd`: the form's answers plus the folder's own are a whole selection.
|
|
931
|
+
argv.push('--reset');
|
|
927
932
|
return { cmd: [process.execPath, path.join(ROOT, 'bin', 'build-driver.mjs'), ...argv] };
|
|
928
933
|
}
|
package/js/web/api.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import { factCount } from '../hosts/memory-files.mjs';
|
|
|
24
24
|
import { autostartState } from '../hosts/shim.mjs';
|
|
25
25
|
import {
|
|
26
26
|
footprintOfDir, gatesOfDir, installState, installTargets, leftoversOf, modeOfDir,
|
|
27
|
-
trustOfDir, sharedTierOfDir,
|
|
27
|
+
trustOfDir, sharedTierOfDir, strandedGatesOf,
|
|
28
28
|
postureOfDir, readJsonMaybe, readMaybe, themeOfDir,
|
|
29
29
|
} from '../hosts/installs.mjs';
|
|
30
30
|
import { PRESETS } from '../loop/score.mjs';
|
|
@@ -174,6 +174,8 @@ const driftCounts = (files) => ({
|
|
|
174
174
|
missing: files.filter((f) => f.status === 'missing').length,
|
|
175
175
|
linked: files.filter((f) => f.status === 'linked').length,
|
|
176
176
|
stale: files.filter((f) => f.status === 'stale').length,
|
|
177
|
+
// D11: .md files keep alert tone even when kept, so don't count them in kept
|
|
178
|
+
kept: files.filter((f) => f.status === 'edited' && f.diverged === false && !f.rel.endsWith('.md')).length,
|
|
177
179
|
});
|
|
178
180
|
|
|
179
181
|
/**
|
|
@@ -243,6 +245,8 @@ export function apiInstalls(state) {
|
|
|
243
245
|
// Files here that are the user's where Geneseed ships one, and retired leftovers: what a
|
|
244
246
|
// forced rebuild would replace or remove (`leftoversOf`). Read off the emit's own record.
|
|
245
247
|
leftovers: leftoversOf(root, host, scope),
|
|
248
|
+
// OpenCode only: the bash gates a `--prune-gates` rebuild would take out (`strandedGatesOf`).
|
|
249
|
+
strandedGates: strandedGatesOf(root, host, scope),
|
|
246
250
|
// The install a request naming none reads (`defaultView`): the console's pickers start on it.
|
|
247
251
|
default: !!def && samePath(viewCfg(host, scope, root), def[0]),
|
|
248
252
|
});
|
|
@@ -477,7 +481,8 @@ export function apiOverview(state, counts = machineCounts(state, [{ install: nul
|
|
|
477
481
|
if (samePath(viewCfg(host, scope, root), state.target)) {
|
|
478
482
|
// `deletionGate`/`secretsGate`/`doneGate`/`testNote`/`ownershipGate`/`externalGate`: the gate
|
|
479
483
|
// switches, for the Constitution page's toggles on rows IV, I, III, VIII, inside the Credo's
|
|
480
|
-
// Ownership row and inside doctrine rigor 5's row.
|
|
484
|
+
// Ownership row and inside doctrine rigor 5's row. `ownBranchPass` too: false is strict
|
|
485
|
+
// consent, the switch inside doctrine process 5's row.
|
|
481
486
|
install = { host, scope, path: root, footprint: footprintOfDir(root),
|
|
482
487
|
...gatesOfDir(root, host) };
|
|
483
488
|
break;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"//": "Every field here is argued and gated in tests/unit/package_manifest.test.mjs. `files`, `bin`, `exports` and `engines` each have a test that fails when reality drifts from this file; `version` mirrors harness.config.json and is gated too. Read that docblock before editing this one.",
|
|
3
3
|
"name": "geneseed",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.4.0",
|
|
5
5
|
"description": "A portable, theme-able harness you implant once and use everywhere to grow a disciplined AI coding agent.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"ai",
|
package/registry.json
CHANGED
|
@@ -596,6 +596,20 @@
|
|
|
596
596
|
"added": "2026-11-08",
|
|
597
597
|
"last_verified": ""
|
|
598
598
|
},
|
|
599
|
+
"skills/herdr": {
|
|
600
|
+
"status": "experimental",
|
|
601
|
+
"version": "1.0.0",
|
|
602
|
+
"owner": "Guillaume Lemer",
|
|
603
|
+
"added": "2026-11-13",
|
|
604
|
+
"last_verified": ""
|
|
605
|
+
},
|
|
606
|
+
"skills/opencode-cli": {
|
|
607
|
+
"status": "experimental",
|
|
608
|
+
"version": "1.0.0",
|
|
609
|
+
"owner": "Guillaume Lemer",
|
|
610
|
+
"added": "2026-11-13",
|
|
611
|
+
"last_verified": ""
|
|
612
|
+
},
|
|
599
613
|
"skills/gitlab-ci": {
|
|
600
614
|
"status": "experimental",
|
|
601
615
|
"version": "1.0.0",
|
package/src/AGENT.md.tmpl
CHANGED
|
@@ -24,19 +24,17 @@ Tool-agnostic: where the host has no sub-agents, each {{AGENT}} below is a
|
|
|
24
24
|
<!-- LEAN:end -->
|
|
25
25
|
|
|
26
26
|
<!-- LEAN:begin -->
|
|
27
|
-
**Readiness sigil
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
it
|
|
33
|
-
first:** when a request matches a {{SKILL}}, invoke it as your first tool
|
|
34
|
-
call — before loading context or touching files.
|
|
27
|
+
**Readiness sigil.** Before your first reply, read this file and its {{LAWS}}, then
|
|
28
|
+
load the project context (**Session start**, below). Begin that reply with the line
|
|
29
|
+
below, as written, before any other text. The user reads it as the sign that you
|
|
30
|
+
loaded the {{LAWS}} and the project context; a first reply without it tells them the
|
|
31
|
+
harness was not read. **{{SKILLS}} first:** when a request matches a {{SKILL}}, invoke
|
|
32
|
+
it as your first tool call, before you load context or touch files.
|
|
35
33
|
<!-- LEAN:else -->
|
|
36
|
-
**Readiness sigil
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
**Readiness sigil.** Before your first reply, read this file and its {{LAWS}} and load
|
|
35
|
+
`context.json` and its `eager` entries (§9); begin that reply with the line below, as
|
|
36
|
+
written. **{{SKILLS}} first:** when the request matches a {{SKILL}}, invoke it as your first
|
|
37
|
+
tool call, before you load context, read files or search.
|
|
40
38
|
<!-- LEAN:end -->
|
|
41
39
|
|
|
42
40
|
> {{LOADED_SIGIL}}
|
|
@@ -205,7 +203,7 @@ decompose it into independent subtasks, route each to the single owning {{AGENT}
|
|
|
205
203
|
above, and converge the results yourself. Every handoff carries an **envelope** —
|
|
206
204
|
the subtask goal, the inputs the {{AGENT}} needs, and its output contract — and the
|
|
207
205
|
constraints travel with it: dispatched {{AGENTS}} commit only in their own worktree, never
|
|
208
|
-
push, and never merge outside their own branch ({{DOCTRINE:consent-before-push}}
|
|
206
|
+
push, and never merge outside their own branch, so the push stays with you ({{DOCTRINE:consent-before-push}}), and an unfulfilled contract returns as a stated gap, never invented
|
|
209
207
|
content. Where the host exposes a `workflow` tool, prefer the saved `dispatch`
|
|
210
208
|
workflow ([workflow {{SKILL}}]({{DIR_SKILLS}}/workflow.md)); where it does not, run
|
|
211
209
|
the same shape model-driven via the [parallel-agents {{SKILL}}]({{DIR_SKILLS}}/parallel-agents.md).
|
|
@@ -217,7 +215,7 @@ dispatched alone; the [council {{SKILL}}]({{DIR_SKILLS}}/council.md) convenes th
|
|
|
217
215
|
subset that productively clashes on a given motion.
|
|
218
216
|
<!-- LEAN:else -->
|
|
219
217
|
Dispatched {{AGENTS}} commit only in their worktree, never push, never merge outside
|
|
220
|
-
their own branch ({{DOCTRINE:consent-before-push}}
|
|
218
|
+
their own branch, so the push stays with you ({{DOCTRINE:consent-before-push}}), and an unfulfilled contract returns as a stated gap, never invented content. A
|
|
221
219
|
multi-part goal goes through the [parallel-agents {{SKILL}}]({{DIR_SKILLS}}/parallel-agents.md)
|
|
222
220
|
(or the [workflow {{SKILL}}]({{DIR_SKILLS}}/workflow.md) where the host has a workflow tool);
|
|
223
221
|
the ten council seats are convened by the [council {{SKILL}}]({{DIR_SKILLS}}/council.md).
|
|
@@ -359,7 +357,7 @@ tool you build for yourself — belongs in `{{DIR_NOTEBOOK}}/`, never in the hos
|
|
|
359
357
|
tree. `NOTEBOOK.md`, a session file, recalls what you keep here; keep the space referable across sessions — the seeded index
|
|
360
358
|
is one way; replace it with whatever scheme serves you better. When a note
|
|
361
359
|
hardens into a durable fact worth recalling verbatim, write it to {{MEMORY}}
|
|
362
|
-
|
|
360
|
+
in §5 ({{DOCTRINE:persist-insight}}). Keep the two stores distinct by *role*, not just by
|
|
363
361
|
format: {{MEMORY}} holds durable insight for future sessions, the {{NOTEBOOK}}
|
|
364
362
|
holds your working artifacts. The one fixed law: `{{DIR_NOTEBOOK}}/` is **personal and
|
|
365
363
|
git-ignored** — never committed or shared, and the `.gitignore` that guarantees
|
|
@@ -457,7 +455,7 @@ new note linked in. Cross-project facts go here via the
|
|
|
457
455
|
*{{EPI_CONTEXT}}*
|
|
458
456
|
|
|
459
457
|
<!-- LEAN:begin -->
|
|
460
|
-
|
|
458
|
+
Load `context.json` before your first reply. The
|
|
461
459
|
harness carries no project-specific knowledge; this manifest is how the project hands
|
|
462
460
|
you its own: the repo's own (`context.json` or `.harness/context.json` at its root),
|
|
463
461
|
else `{{AT_HARNESS}}context.json`. The hook injects its `eager` entries (**Session
|
|
@@ -475,7 +473,7 @@ comment carries its schema and setup notes.
|
|
|
475
473
|
**Reviewing code** — with any review command, built-in or not — first apply the nearest
|
|
476
474
|
`REVIEW.md` above each changed file. It overrides the review defaults, never a {{LAW}}.
|
|
477
475
|
<!-- LEAN:else -->
|
|
478
|
-
|
|
476
|
+
Load `context.json` before your first reply. The repo's own
|
|
479
477
|
(`context.json` or `.harness/context.json` at its root), else `{{AT_HARNESS}}context.json`,
|
|
480
478
|
is how the project hands you its own knowledge; the hook injects its `eager` entries
|
|
481
479
|
(**Session start**). `"eager"` entries are read now and are
|
package/src/bricks/pr-open.md
CHANGED
|
@@ -5,8 +5,9 @@ effect: read
|
|
|
5
5
|
skill: ship
|
|
6
6
|
outcomes: pass, fail
|
|
7
7
|
---
|
|
8
|
-
Follow the `ship` skill's pull-request path only: never merge, never enable auto-merge
|
|
9
|
-
|
|
8
|
+
Follow the `ship` skill's pull-request path only: never merge, never enable auto-merge here (the
|
|
9
|
+
`factory` skill's close step arms it, only as the user's standing rule allows), never push to any
|
|
10
|
+
branch but this worktree's own. First look for a PR already open on this branch
|
|
10
11
|
(`gh pr view --json url,state` or `glab mr view`): after a rework lap it exists, and this stage
|
|
11
12
|
only pushes the new commits to it.
|
|
12
13
|
|
package/src/doctrines/ops.md
CHANGED
|
@@ -65,8 +65,8 @@ form is reconciled — not the principal file alone, but the imports, hooks,
|
|
|
65
65
|
indices, cross-links, ignore-rules, and peer configs that point to it. A dangling
|
|
66
66
|
reference left behind breaks downstream in silence, long after the deed seemed
|
|
67
67
|
done. Before declaring a teardown complete, hunt each integration point and sever
|
|
68
|
-
or rewire it ({{DOCTRINE:search-before-creating}}
|
|
69
|
-
remove
|
|
68
|
+
or rewire it. A search first finds what already exists ({{DOCTRINE:search-before-creating}}); this
|
|
69
|
+
finishes what you remove. Total teardown, or none.
|
|
70
70
|
<!-- LEAN:else -->
|
|
71
71
|
A delete, a rename, or a move is finished only when every reference to the old form is
|
|
72
72
|
reconciled — imports, hooks, indices, cross-links, ignore-rules, peer configs. Before
|
package/src/doctrines/process.md
CHANGED
|
@@ -28,8 +28,8 @@ context window and lets the user correct course before effort is spent. When a
|
|
|
28
28
|
session ends mid-task, persist it to {{MEMORY}} ({{DOCTRINE:persist-insight}}), open
|
|
29
29
|
blockers and irreversible changes included. Surface the concrete diff or dry-run
|
|
30
30
|
output of a consequential change before applying it. Before a risky step, lay down a
|
|
31
|
-
recovery point — a stash, a branch, a worktree, a copy — never
|
|
32
|
-
({{DOCTRINE:consent-before-push}}). On a long task, re-read the worklog and re-verify ground
|
|
31
|
+
recovery point — a stash, a branch, a worktree, a copy — never a commit on the main
|
|
32
|
+
branch ({{DOCTRINE:consent-before-push}}). On a long task, re-read the worklog and re-verify ground
|
|
33
33
|
truth rather than trust stale mid-context memory. Trivial edits need no plan.
|
|
34
34
|
<!-- LEAN:else -->
|
|
35
35
|
For any non-trivial task, write a short numbered plan before executing, keep a running
|
|
@@ -37,7 +37,7 @@ worklog. One line:
|
|
|
37
37
|
`Done: 1-2. Current: 3 (tests). Next: 4. Blockers: none. Irreversible: none.`
|
|
38
38
|
When a session ends mid-task, persist it to {{MEMORY}} ({{DOCTRINE:persist-insight}}) with open
|
|
39
39
|
blockers and irreversibles. Show the diff or dry-run before a consequential change. Before
|
|
40
|
-
a risky step, lay down a recovery point — stash or branch — never
|
|
40
|
+
a risky step, lay down a recovery point — stash or branch — never a commit on main
|
|
41
41
|
({{DOCTRINE:consent-before-push}}). Trivial edits need no plan.
|
|
42
42
|
<!-- LEAN:end -->
|
|
43
43
|
|
|
@@ -84,41 +84,45 @@ the stale page and fix it in the same change ({{DOCTRINE:documentation-in-step}}
|
|
|
84
84
|
<!-- LEAN:end -->
|
|
85
85
|
|
|
86
86
|
### {{DOCTRINE:consent-before-push}} Consent Before Push
|
|
87
|
-
<!-- note: summary:
|
|
87
|
+
<!-- note: summary: Main changes only through a green PR; your own branch is free. -->
|
|
88
88
|
<!-- LEAN:begin -->
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
the
|
|
106
|
-
Never force-push,
|
|
107
|
-
|
|
108
|
-
through the git-history {{SKILL}} behind a backup
|
|
109
|
-
the
|
|
89
|
+
A push onto the main branch needs consent, and the pull request is that consent. The
|
|
90
|
+
main branch is `main`, `master`, the remote's default branch, or, from a linked
|
|
91
|
+
worktree, the branch the main checkout holds; when unsure whether a branch is one of them
|
|
92
|
+
— a remote with no default recorded, or no remote at all — treat it as main. It
|
|
93
|
+
changes only through a pull request whose required checks are green: never commit on
|
|
94
|
+
it, push to it, or merge into it directly, and never merge a pull request whose
|
|
95
|
+
checks are red, pending or absent. A green pull request is merged on the user's
|
|
96
|
+
acceptance of that merge, or under their standing auto-merge rule (the ship {{SKILL}}
|
|
97
|
+
says when it arms). Where the
|
|
98
|
+
repository has no remote, no CI or no branch protection, a change to the main branch
|
|
99
|
+
needs the user's explicit acceptance of that change. Any other branch you work on is
|
|
100
|
+
your own: commit as the work advances and push it with a plain push, without asking.
|
|
101
|
+
Each commit still holds one intent ({{LAW:one-intent-one-act}}) and passes the commit
|
|
102
|
+
{{SKILL}}'s checks; a forced push asks, even on your own branch. A tag, a release or a
|
|
103
|
+
publish faces outward and asks ({{LAW:deletion-is-deliberate}}). A dispatched worker,
|
|
104
|
+
crew or slice commits, and merges its own sub-workers, only in its own worktree, and
|
|
105
|
+
never pushes: the session that dispatched it pushes the branch and opens the pull
|
|
106
|
+
request. Never force-push,
|
|
107
|
+
hard-reset, or rebase the main branch: undo a published mistake with a revert commit;
|
|
108
|
+
the rare legitimate rewrite goes through the git-history {{SKILL}} behind a backup,
|
|
109
|
+
with the user's acceptance. The host gates commits and pushes onto the main branch at
|
|
110
|
+
the tool boundary, so this consent cannot be lost to a sticky allowlist. (On OpenCode,
|
|
111
|
+
whose permission rules cannot see the branch, every commit and push asks.){{STRICT_CONSENT}}
|
|
110
112
|
<!-- LEAN:else -->
|
|
111
|
-
|
|
112
|
-
`
|
|
113
|
-
branch
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
113
|
+
A push onto the main branch needs consent; the pull request is that consent. Main is
|
|
114
|
+
`main`, `master`, the remote's default, or, from a linked worktree, the main checkout's
|
|
115
|
+
branch; unsure (no remote, or no default recorded), treat it as main. It changes only
|
|
116
|
+
through a pull request with green checks: never commit, push or merge directly onto it,
|
|
117
|
+
never merge a red, pending or unchecked one; a green one on the user's yes or their
|
|
118
|
+
standing auto-merge rule (ship {{SKILL}}). With no remote, CI or protection, a change to
|
|
119
|
+
main needs explicit acceptance.
|
|
120
|
+
Your own branch: commit and plain-push freely; a forced push asks. Tags, releases and
|
|
121
|
+
publishes ask ({{LAW:deletion-is-deliberate}}). A dispatched worker, crew or slice commits
|
|
122
|
+
and merges only in its own worktree, never pushes. Never force-push, hard-reset or
|
|
123
|
+
rebase main: revert instead (git-history {{SKILL}}, with acceptance, for a real rewrite).
|
|
124
|
+
The host gates both at the tool boundary (on OpenCode, which cannot see the branch, every
|
|
125
|
+
commit and push asks).{{STRICT_CONSENT}}
|
|
122
126
|
<!-- LEAN:end -->
|
|
123
127
|
|
|
124
128
|
### {{DOCTRINE:bound-the-loop}} Bound the Loop
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Turn an analysis (a document, pasted text or a request) into a spec whose task list you approve, build each task in turn with the feature loop in one worktree, run the base branch's checks and a review panel, play the holdout scenarios it never saw, then open one pull request and wait for green CI; a failed check, review or scenario, or red CI, sends the work back to the loop as one more task, twice at most each. At the end it asks you once whether to merge.",
|
|
4
4
|
"category": "development",
|
|
5
5
|
"rules": [
|
|
6
|
-
"Never merge
|
|
6
|
+
"Never merge without the user's yes, asked once at the end of the run; enable auto-merge only as the user's standing auto-merge rule allows.",
|
|
7
7
|
"Push only this worktree's own branch."
|
|
8
8
|
],
|
|
9
9
|
"stages": ["intake", "spec", "holdout-write", "loop:feature", "checks", "review-panel", "holdout", "pr-open", "merge-gate", "retro"],
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Take one bug report, fix it with the bugfix loop, run the base branch's checks and a review panel, play the holdout scenarios it never saw, open the pull request and wait for green CI; a failed check, review or scenario, or red CI, sends the fix back to the loop, twice at most each. At the end it asks you once whether to merge.",
|
|
4
4
|
"category": "development",
|
|
5
5
|
"rules": [
|
|
6
|
-
"Never merge
|
|
6
|
+
"Never merge without the user's yes, asked once at the end of the run; enable auto-merge only as the user's standing auto-merge rule allows.",
|
|
7
7
|
"Push only this worktree's own branch."
|
|
8
8
|
],
|
|
9
9
|
"stages": ["intake", "holdout-write", "loop:bugfix", "checks", "review-panel", "holdout", "pr-open", "merge-gate", "retro"],
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Take one issue, let triage pick the lane that fits (the bugfix, feature, deps-upgrade or refactor loop, or a docs-only update), run the base branch's checks and a review panel, play the holdout scenarios it never saw, open the pull request and wait for green CI; a failed check, review or scenario, or red CI, sends the work back to that lane, twice at most each. At the end it asks you once whether to merge.",
|
|
4
4
|
"category": "development",
|
|
5
5
|
"rules": [
|
|
6
|
-
"Never merge
|
|
6
|
+
"Never merge without the user's yes, asked once at the end of the run; enable auto-merge only as the user's standing auto-merge rule allows.",
|
|
7
7
|
"Push only this worktree's own branch."
|
|
8
8
|
],
|
|
9
9
|
"stages": [
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
### Terminal tools kit
|
|
2
|
+
|
|
3
|
+
Applies when the agent drives a terminal program through that program's own CLI: Herdr, or OpenCode V2.
|
|
4
|
+
|
|
5
|
+
- Gate on the environment first: Herdr only inside a Herdr pane (`HERDR_ENV=1`), OpenCode only when `opencode --version` reports a 2.x. If the gate fails, say so and stop.
|
|
6
|
+
- Read before acting: list the live state (panes, agents, sessions, service status) and take every id from a command's output, never from an example or an earlier listing.
|
|
7
|
+
- Close what you opened, and only that. Never close, kill or delete a pane, agent, session or workspace you did not create, unless the user asks.
|
|
8
|
+
- Never stop, restart or reconfigure the user's server or background service (`herdr server stop`, `opencode service stop|restart|set|unset`) unless the user asks.
|
|
9
|
+
- No credentials: login, account switches and SSH or OAuth prompts are the user's to complete. Never print, export or import stored credentials: no `opencode auth export|import`, no `opencode service get password|env` and no bare `service get`, which prints the env too.
|
|
10
|
+
- Approval dialogs belong to the user: never answer another agent's permission prompt, and never pass a flag that auto-approves permissions unless the user asks for it.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Terminal programs the agent drives through their own CLI: Herdr panes and agents from inside a Herdr pane, and OpenCode V2 from another session.",
|
|
3
|
+
"skills": ["herdr", "opencode-cli"],
|
|
4
|
+
"agents": [],
|
|
5
|
+
"rules": "kits/terminal-tools/rules.md",
|
|
6
|
+
"rulesWordBudget": 300,
|
|
7
|
+
"catalogue": {
|
|
8
|
+
"skills": [
|
|
9
|
+
"| [herdr]({{DIR_SKILLS}}/herdr.md) | the user names Herdr and the session runs in a Herdr pane (`HERDR_ENV=1`): inspect or control its workspaces, tabs, panes, commands or another agent |",
|
|
10
|
+
"| [opencode-cli]({{DIR_SKILLS}}/opencode-cli.md) | driving OpenCode V2 from another session through its CLI: a headless `opencode run`, its sessions, the background service, MCP servers, plugins, models, stats, debug |"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
}
|