geneseed 5.3.1 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/README.md +51 -18
  3. package/SHIPPED.md +7 -7
  4. package/adapters/bob/README.md +12 -1
  5. package/adapters/opencode/README.md +5 -3
  6. package/adapters/opencode/plugins/geneseed-context.js +77 -10
  7. package/adapters/opencode/plugins/geneseed-guard.js +106 -22
  8. package/adapters/opencode/plugins/geneseed-learn.js +641 -6
  9. package/bin/geneseed-cli.mjs +10 -0
  10. package/bin/geneseed-hook.mjs +5 -4
  11. package/docs/PRD.md +1 -1
  12. package/docs/README.md +1 -0
  13. package/docs/concepts/agents.md +14 -2
  14. package/docs/concepts/collaboration.md +2 -2
  15. package/docs/concepts/enforcement-table.md +5 -2
  16. package/docs/concepts/exclusions.md +16 -2
  17. package/docs/concepts/footprint.md +1 -1
  18. package/docs/concepts/foreman-mode.md +23 -4
  19. package/docs/concepts/hook-gates.md +4 -4
  20. package/docs/concepts/hooks.md +25 -7
  21. package/docs/concepts/host-matrix.md +4 -4
  22. package/docs/concepts/hosts.md +1 -1
  23. package/docs/concepts/kits.md +12 -2
  24. package/docs/concepts/loop-bricks.md +3 -3
  25. package/docs/concepts/loops.md +6 -4
  26. package/docs/concepts/ownership.md +1 -1
  27. package/docs/concepts/rules.md +2 -2
  28. package/docs/concepts/shared-tier.md +1 -1
  29. package/docs/concepts/skills.md +21 -1
  30. package/docs/concepts/themes.md +1 -1
  31. package/docs/extending.md +73 -29
  32. package/docs/guides/auto-merge.md +100 -0
  33. package/docs/guides/choose-your-setup.md +1 -1
  34. package/docs/guides/headless.md +1 -1
  35. package/docs/guides/install-clone.md +19 -1
  36. package/docs/guides/install-scripted.md +8 -2
  37. package/docs/guides/install.md +20 -2
  38. package/docs/guides/loop-finish.md +3 -3
  39. package/docs/guides/loop-running.md +4 -4
  40. package/docs/guides/project-context.md +1 -1
  41. package/docs/guides/run-a-factory.md +2 -2
  42. package/docs/guides/setup-doctrines.md +2 -2
  43. package/docs/guides/setup-footprint.md +1 -1
  44. package/docs/guides/uninstall.md +3 -3
  45. package/docs/guides/upgrade.md +2 -2
  46. package/docs/guides/worktree.md +1 -1
  47. package/docs/reference/env-context.md +1 -1
  48. package/docs/reference/environment.md +4 -2
  49. package/docs/reference/plugin-activity.md +1 -1
  50. package/docs/reference/plugin-guard.md +1 -1
  51. package/docs/reference/plugin-learn.md +5 -1
  52. package/docs/reference/plugin-workflow.md +1 -1
  53. package/docs/reference/profiles.md +142 -0
  54. package/docs/reference/troubleshoot-doctor.md +1 -1
  55. package/docs/reference/troubleshoot-hooks.md +2 -2
  56. package/docs/reference/troubleshoot-install.md +3 -3
  57. package/docs/reference/troubleshoot-tools.md +1 -1
  58. package/docs/token-footprint.md +11 -6
  59. package/docs/understand/design-choices-engineering.md +1 -1
  60. package/docs/understand/enforced-vs-asked.md +1 -1
  61. package/docs/understand/machine-claude.md +2 -2
  62. package/docs/understand/on-your-machine.md +1 -1
  63. package/docs/web-ui.md +8 -6
  64. package/harness.config.json +1 -1
  65. package/js/README.md +11 -3
  66. package/js/build/args.mjs +16 -4
  67. package/js/build/catalog.mjs +11 -1
  68. package/js/build/driver.mjs +74 -16
  69. package/js/build/emit-claude.mjs +32 -5
  70. package/js/build/emit-opencode.mjs +16 -9
  71. package/js/build/export.mjs +1 -1
  72. package/js/build/generate.mjs +12 -157
  73. package/js/build/notes-migrate.mjs +99 -0
  74. package/js/build/profile.mjs +326 -0
  75. package/js/build/render.mjs +110 -8
  76. package/js/build/retired-skills.mjs +60 -13
  77. package/js/build/source.mjs +100 -3
  78. package/js/build/stubs.mjs +4 -1
  79. package/js/cli-table.json +212 -7
  80. package/js/hosts/agent-runs.mjs +205 -0
  81. package/js/hosts/done-checks.mjs +3 -1
  82. package/js/hosts/hooks-done.mjs +428 -63
  83. package/js/hosts/hooks-learn.mjs +89 -3
  84. package/js/hosts/hooks-prims.mjs +44 -4
  85. package/js/hosts/hooks.mjs +159 -9
  86. package/js/hosts/hosts.mjs +10 -0
  87. package/js/hosts/installs.mjs +44 -2
  88. package/js/hosts/link.mjs +45 -10
  89. package/js/hosts/native.mjs +61 -7
  90. package/js/hosts/opencode.mjs +1 -1
  91. package/js/hosts/settings.mjs +101 -3
  92. package/js/hosts/spec-feedback.mjs +538 -0
  93. package/js/hosts/usage.mjs +67 -8
  94. package/js/inspect/agent-scores.mjs +118 -0
  95. package/js/inspect/checks-authoring.mjs +2 -1
  96. package/js/inspect/checks-build.mjs +20 -4
  97. package/js/inspect/checks-constitution.mjs +32 -0
  98. package/js/inspect/checks-repo.mjs +27 -2
  99. package/js/inspect/cost.mjs +6 -5
  100. package/js/inspect/diff.mjs +46 -8
  101. package/js/inspect/doctor.mjs +4 -0
  102. package/js/inspect/inventory.mjs +1 -1
  103. package/js/inspect/status.mjs +3 -1
  104. package/js/inspect/validate.mjs +1 -0
  105. package/js/lib/machine-dir.mjs +8 -0
  106. package/js/lib/paths.mjs +4 -1
  107. package/js/maintain/profile-scope.mjs +145 -0
  108. package/js/maintain/profiles.mjs +486 -0
  109. package/js/maintain/setup.mjs +413 -15
  110. package/js/maintain/uninstall.mjs +4 -1
  111. package/js/maintain/update.mjs +4 -2
  112. package/js/web/actions.mjs +44 -41
  113. package/js/web/api.mjs +13 -3
  114. package/js/web/handler.mjs +8 -0
  115. package/js/web/jobs.mjs +5 -4
  116. package/js/web/profiles-api.mjs +201 -0
  117. package/js/web/routes.mjs +5 -0
  118. package/package.json +2 -1
  119. package/profiles/guillaume-claude-global.json +16 -0
  120. package/profiles/starter.json +14 -0
  121. package/registry.json +14 -0
  122. package/src/AGENT.md.tmpl +16 -18
  123. package/src/agents/_self-improvement.md +15 -7
  124. package/src/agents/_template.md +4 -2
  125. package/src/agents/advocate.md +1 -1
  126. package/src/agents/architect.md +1 -1
  127. package/src/agents/developer.md +10 -3
  128. package/src/agents/devops-engineer.md +1 -1
  129. package/src/agents/docker-expert.md +1 -1
  130. package/src/agents/docs.md +1 -1
  131. package/src/agents/empiricist.md +1 -1
  132. package/src/agents/explorer.md +4 -2
  133. package/src/agents/framer.md +1 -1
  134. package/src/agents/historian.md +1 -1
  135. package/src/agents/kubernetes-specialist.md +1 -1
  136. package/src/agents/memory-curator.md +1 -1
  137. package/src/agents/operator.md +1 -1
  138. package/src/agents/performance.md +1 -1
  139. package/src/agents/pragmatist.md +1 -1
  140. package/src/agents/react-engineer.md +1 -1
  141. package/src/agents/react-reviewer.md +1 -1
  142. package/src/agents/researcher.md +1 -1
  143. package/src/agents/reviewer.md +10 -3
  144. package/src/agents/security.md +1 -1
  145. package/src/agents/skeptic.md +1 -1
  146. package/src/agents/spring-boot-engineer.md +1 -1
  147. package/src/agents/spring-reviewer.md +1 -1
  148. package/src/agents/spring-security.md +1 -1
  149. package/src/agents/steward.md +1 -1
  150. package/src/agents/tester.md +4 -2
  151. package/src/agents/user-advocate.md +1 -1
  152. package/src/agents/visionary.md +1 -1
  153. package/src/bricks/pr-open.md +3 -2
  154. package/src/doctrines/ops.md +2 -2
  155. package/src/doctrines/process.md +40 -36
  156. package/src/factories/analysis-to-build.json +1 -1
  157. package/src/factories/bug-report-to-fix.json +1 -1
  158. package/src/factories/issue-to-pr.json +1 -1
  159. package/src/kits/terminal-tools/rules.md +10 -0
  160. package/src/kits/terminal-tools.json +13 -0
  161. package/src/licenses/herdr.txt +201 -0
  162. package/src/memory/README.md +12 -2
  163. package/src/modes/foreman.md +25 -9
  164. package/src/skill-descriptions.json +63 -0
  165. package/src/skills/_self-improvement.md +42 -24
  166. package/src/skills/_template.md +3 -1
  167. package/src/skills/brainstorm.md +35 -22
  168. package/src/skills/commit.md +17 -17
  169. package/src/skills/daydream/VENDOR.md +6 -0
  170. package/src/skills/debug/ci.md +1 -1
  171. package/src/skills/dependencies.md +3 -3
  172. package/src/skills/diagram-design/VENDOR.md +4 -0
  173. package/src/skills/document-project.md +3 -2
  174. package/src/skills/explain-changes/VENDOR.md +5 -1
  175. package/src/skills/factory.md +13 -4
  176. package/src/skills/geneseed.md +4 -2
  177. package/src/skills/git-history.md +5 -7
  178. package/src/skills/herdr.md +135 -0
  179. package/src/skills/loop.md +3 -2
  180. package/src/skills/opencode-cli.md +84 -0
  181. package/src/skills/parallel-agents.md +11 -0
  182. package/src/skills/pipeline.md +3 -3
  183. package/src/skills/plan.md +5 -4
  184. package/src/skills/react-view-transitions/VENDOR.md +7 -1
  185. package/src/skills/release.md +11 -9
  186. package/src/skills/review-response.md +4 -2
  187. package/src/skills/rule/approve.md +2 -1
  188. package/src/skills/rule.md +27 -1
  189. package/src/skills/ship.md +54 -7
  190. package/src/skills/skill-forge.md +5 -3
  191. package/src/skills/token-report/VENDOR.md +5 -1
  192. package/src/skills/worktree.md +2 -2
  193. package/src/upstreams.json +9 -2
  194. package/themes/README.md +3 -1
  195. package/themes/_TEMPLATE.json +2 -0
  196. package/themes/biker.json +2 -0
  197. package/themes/commentator.json +2 -0
  198. package/themes/cyberpunk.json +2 -0
  199. package/themes/gamer.json +2 -0
  200. package/themes/imperial.json +2 -0
  201. package/themes/joker.json +2 -0
  202. package/themes/marvin.json +2 -0
  203. package/themes/mean.json +2 -0
  204. package/themes/military.json +2 -0
  205. package/themes/neutral.json +2 -0
  206. package/themes/pirate.json +2 -0
  207. package/themes/sports.json +2 -0
  208. package/themes/verstappen.json +2 -0
  209. package/themes/wizard.json +2 -0
  210. package/web/dist/assets/{ActiveLoops-BJJN3P-V.js → ActiveLoops-DOJCPPPc.js} +1 -1
  211. package/web/dist/assets/Activity-LKsDzsnK.js +1 -0
  212. package/web/dist/assets/ActivityDetail-DhwTfPm6.js +1 -0
  213. package/web/dist/assets/{Bonsai-BBl4XXqs.js → Bonsai-CePMLrpr.js} +1 -1
  214. package/web/dist/assets/{CopyButton-Beven8yn.js → CopyButton-CuoaJ6k7.js} +1 -1
  215. package/web/dist/assets/Dashboard-D1VKuvLe.js +2 -0
  216. package/web/dist/assets/Docs-CUrHJKaU.js +5 -0
  217. package/web/dist/assets/Factories-Ci1XfmSy.js +1 -0
  218. package/web/dist/assets/{GreenhouseView-Bce212qd.js → GreenhouseView-CNfH2lPK.js} +1 -1
  219. package/web/dist/assets/Installs-ZHQZM1iS.js +3 -0
  220. package/web/dist/assets/{JournalView-CV4omyww.js → JournalView-CMsWahkS.js} +1 -1
  221. package/web/dist/assets/Kits-CkliyK0n.js +1 -0
  222. package/web/dist/assets/Laws-hh4O3HZ4.js +4 -0
  223. package/web/dist/assets/{LibRows-Dag1s0ZX.js → LibRows-Brv0Hmkr.js} +1 -1
  224. package/web/dist/assets/Library-BYmiLjJr.js +3 -0
  225. package/web/dist/assets/Loops-ytm-xJ68.js +2 -0
  226. package/web/dist/assets/{OperatorHudView-JmYY1pBR.js → OperatorHudView-KaqCx_HP.js} +1 -1
  227. package/web/dist/assets/Personal-CmcnRKYE.js +2 -0
  228. package/web/dist/assets/Settings-tUrpdOfq.js +1 -0
  229. package/web/dist/assets/{Tabs-8zsyEPSK.js → Tabs-CD7etcGD.js} +1 -1
  230. package/web/dist/assets/api-CZ-x0iWG.js +1 -0
  231. package/web/dist/assets/{controls-D4wmg_pl.js → controls-CK7qHA8H.js} +1 -1
  232. package/web/dist/assets/{index-CRWqKxfY.css → index-Ba_Kg3Af.css} +1 -1
  233. package/web/dist/assets/index-COKbhFNo.js +6 -0
  234. package/web/dist/index.html +3 -3
  235. package/web/dist/assets/Activity-WQ3ykgxU.js +0 -1
  236. package/web/dist/assets/ActivityDetail-7rt04SkS.js +0 -1
  237. package/web/dist/assets/Dashboard-BgLArtgu.js +0 -2
  238. package/web/dist/assets/Docs-B5aHp86J.js +0 -5
  239. package/web/dist/assets/Factories-BjqzXAw8.js +0 -1
  240. package/web/dist/assets/Installs-B1OsrHXF.js +0 -3
  241. package/web/dist/assets/Kits-CW1e7xNa.js +0 -1
  242. package/web/dist/assets/Laws-1Ckf1lbs.js +0 -4
  243. package/web/dist/assets/Library-B3FuFLel.js +0 -3
  244. package/web/dist/assets/Loops-CwqgnLNw.js +0 -2
  245. package/web/dist/assets/Personal-DKLgLa7Z.js +0 -2
  246. package/web/dist/assets/Settings-BwErnh-R.js +0 -1
  247. package/web/dist/assets/api-DLDVY3K-.js +0 -1
  248. package/web/dist/assets/index-Ce6qF2nG.js +0 -6
@@ -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 an unconsented commit
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 an unconsented commit
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: Every commit and push needs explicit, repeated consent. -->
87
+ <!-- note: summary: Main changes only through a green PR; your own branch is free. -->
88
88
  <!-- LEAN:begin -->
89
- Recording and sharing code is consented, never unilateral. **Every** `git commit`
90
- and `git push` needs the user's **explicit acceptance**, on every branch, every
91
- time — a personal feature branch included. A one-time approval is not standing
92
- consent. Consent may cover a **named batch**: "commit as you go on this branch"
93
- stands for commits on that branch until the session ends or the scope changes; a
94
- new session, a new branch, or a widened scope re-asks. Push earns no such default
95
- and stays per-ask unless granted in the same named form. A launched loop's batch
96
- covers commit and push on its own `loop/*` branch; merging that branch into a
97
- shared one never is. A dispatched worker, crew or slice (a Foreman worker, a pipeline
98
- crew, a parallel-agents slice) holds a batch that covers commit, and merge of its own
99
- sub-workers, in its own worktree, off any shared branch; it never pushes. Outside a
100
- batch, before each commit, present in order (1) a plain-language
101
- summary of what changed and why and (2) the exact commit message you intend to use,
102
- then wait. Never push on your own initiative.
103
- On a **shared branch** — `main`, `master`, `develop`, `development`, a
104
- `release`/`hotfix` branch, or anything that is not a dedicated feature branch —
105
- the same gate applies with extra care; when unsure, treat the branch as shared.
106
- Never force-push, hard-reset, or rebase a shared branch: undo a published mistake
107
- with a new revert commit, not a history rewrite — the rare legitimate rewrite goes
108
- through the git-history {{SKILL}} behind a backup. The host gates commit and push at
109
- the tool boundary too, so this consent cannot be lost to a sticky allowlist.
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
- Recording and sharing code is consented, never unilateral: **every** `git commit` and
112
- `git push` needs **explicit acceptance**, every branch, every time — a personal feature
113
- branch included; one-time approval is not standing consent. A named batch ("commit as
114
- you go") stands until the session ends or scope changes; push earns no default. Never
115
- push on your own initiative. A launched loop's batch covers commit and push on its own
116
- `loop/*` branch only; merging it never. A dispatched worker, crew or slice's covers commit
117
- and merge in its own worktree, off any shared branch, never pushed. Outside a batch, show
118
- the plain summary and the exact commit message before each, then wait. Shared branches — `main`, `master`, `develop`, `development`,
119
- `release`/`hotfix`, any unsure — take the same gate. Never force-push, hard-reset, or
120
- rebase one: undo with a revert commit (git-history {{SKILL}} for a legitimate rewrite).
121
- The host gates both at the tool boundary.
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 or enable auto-merge without the user's yes, asked once at the end of the run.",
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 or enable auto-merge without the user's yes, asked once at the end of the run.",
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 or enable auto-merge without the user's yes, asked once at the end of the run.",
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
+ }
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -133,8 +133,18 @@ Read and write follow one rule each:
133
133
  spec says so). This is the {{AGENT}}'s memory across dispatches.
134
134
  - **Write** — mechanical, never by the {{AGENT}} itself (most run read-only). When
135
135
  a subagent run ends, the learn step distils at most one lesson into the owning
136
- {{AGENT}}'s file. A caller may also fold a returned `spec-feedback:` line in by
137
- hand.
136
+ {{AGENT}}'s file. It needs `$GENESEED_LLM`; without one, this file is not written.
137
+
138
+ The `spec-feedback:` lines an {{AGENT}} ends its report with are a second, distinct
139
+ value, with one writer of their own: the same hook copies them, with no model call,
140
+ into the machine notes `{{PATH_NOTES}}/agent-notes/<agent-name>.md` (a `general` line into
141
+ `agent-notes/_general.md` there), or a line true only in this repo (`[agent:project]`,
142
+ `[general:project]`) into the same two files under `{{PATH_PROJECT_NOTES}}/agent-notes/` at the
143
+ project root; one dated bullet each, duplicates skipped. They are
144
+ capped: 100 bullets in an {{AGENT}}'s file, 30 in `_general.md`, 8 000 characters a file.
145
+ The {{AGENT}} reads all five files at step 0. Neither the caller nor this store holds a
146
+ copy, except on a host with no subagent-finished hook (Bob), where the caller copies the
147
+ line into the same file by hand. Folding a note into an {{AGENT}}'s source is the user's call.
138
148
 
139
149
  Same bar as {{DOCTRINE:persist-insight}}: capture only how this {{AGENT}} should work *next time* —
140
150
  a boundary that proved wrong, an input it always needs — never task residue. Files
@@ -3,6 +3,11 @@ task that would block it to one background task worker, and keeps answering the
3
3
 
4
4
  - **Stay responsive.** Answer the user immediately; never let a running worker
5
5
  block the conversation.
6
+ - **No dispatch tool, no foreman.** If this context holds no tool that can start a writing
7
+ (developer) worker (`Agent` on Claude Code and OpenClaude, `subagent`/`task` on OpenCode,
8
+ `spawn_subagent` on Bob), work as direct mode: do each task yourself, one at a time, in
9
+ one tree, and say so once to the user. Bob Shell, Bob's `ask` mode (it may start only
10
+ `explore`) and a Bob mode without the `subagent` group are such contexts.
6
11
  - **Triage by what would block you, counted, not felt.** Delegate a task when any one
7
12
  of these holds: it will run a command longer than about a minute (a test suite, a
8
13
  build, a canary); it will change three or more files; or it can run beside work
@@ -16,14 +21,16 @@ task that would block it to one background task worker, and keeps answering the
16
21
  - **One worker per task.** Dispatch one developer {{AGENT}} in the background, in its own
17
22
  worktree (without worktrees: one tree, one worker at a time). The brief carries the task as the user stated it, BASE, the write set, the
18
23
  proof commands, and the rule that it commits only in its own worktree, never pushes, and
19
- never merges outside its own branch; without a worktree, it never commits. The worker explores, implements and tests in its own context, loading {{SKILLS}}
24
+ never merges outside its own branch; without a worktree, it never commits. It also covers
25
+ the **Brief checklist** in the parallel-agents {{SKILL}}: read it before you write the brief. The worker explores, implements and tests in its own context, loading {{SKILLS}}
20
26
  as it needs them; after two repair rounds on its own red tests it returns red with its
21
27
  findings ({{DOCTRINE:bound-the-loop}}). Check its write set against every task in flight
22
28
  ({{DOCTRINE:one-writer-per-file}}).
23
29
  - **A worker may lead, inside its worktree.** It may dispatch read-only helpers (explorer,
24
30
  researcher) at any time, and writing sub-workers, each in its own worktree branched from
25
31
  its branch, merged into its own with the proof re-run after each merge. Depth stops at
26
- main → worker → sub-worker: a sub-worker dispatches nothing. Every lead holds every member's result
32
+ main → worker → sub-worker: a sub-worker dispatches nothing. A worker that holds no
33
+ dispatch tool (every Bob subagent) does the work itself. Every lead holds every member's result
27
34
  before it ends. The blind reviewer stays the parent's.
28
35
  - **Status, one line per change.** A worker reports
29
36
  `T<n> · <task> · files: <write set> · <state>` at start and on each change: by
@@ -40,15 +47,24 @@ task that would block it to one background task worker, and keeps answering the
40
47
  `{{DIR_NOTEBOOK}}/foreman-ledger.md`, one line per live task:
41
48
  `T3 · <task> · agent <id> · worktree <path> · <state>` (running, green, red, verifying,
42
49
  merged, dropped). Update it on every dispatch and return; re-read it after a compaction.
43
- A correction, follow-up or verifier finding on a task goes to that task's worker
44
- (`SendMessage` on Claude Code), which resumes with its full context. Start a new worker
45
- only when the old one cannot be resumed — the host has no resume, or its context is
46
- spent — and hand it a note: the ask, the diff so far, the findings, what was tried. A
47
- worker serves one task and retires when that task is merged or dropped.
50
+ A correction, follow-up or verifier finding on a task goes to that task's worker, which
51
+ resumes with its full context: by `SendMessage` on Claude Code (on OpenClaude only in its
52
+ agent-teams mode); on OpenCode by the `subagent` tool with that worker's `sessionID` (V1:
53
+ `task` with `task_id`); the same call without `sessionID` (V1: `task_id`) starts a fresh
54
+ worker. Bob has no resume. Start a new worker only when the old one cannot be resumed —
55
+ the host has no resume, or its context is spent — and hand it a note: the ask, the diff
56
+ so far, the findings, what was tried. A new task gets a new worker by default. It may go
57
+ to an idle worker whose own task is settled (merged or dropped) when it works in the
58
+ same files or context and that worker's context is still light: the worker starts it on
59
+ a new branch from the current BASE, with the full brief of *One worker per task* (BASE,
60
+ write set, proof commands, the Brief checklist) and its write set checked against every
61
+ task in flight. Light or heavy is a judgement call, not a number: write the reason (same
62
+ files, context used) in the task's new ledger line. A worker never holds two live tasks;
63
+ one whose context is heavy, or whose last task touched other code, retires.
48
64
  - **Merge on proof you re-ran.** A worker hands back its branch, its local commits and any
49
65
  uncommitted work, with raw test + lint output. The parent re-runs those commands itself —
50
- a worker's log is the worker's account, not the state — shows the user the diff from BASE
51
- and the green output, and commits and merges only once the user accepts
66
+ a worker's log is the worker's account, not the state — merges the branch into its own,
67
+ and lands it on the main branch only through a pull request with green checks
52
68
  ({{DOCTRINE:consent-before-push}}). Surface completions, failures and merges as they
53
69
  happen; watch workers as the pipeline {{SKILL}}'s step 2 watches a crew.
54
70
  - **Crews are opt-in.** Run the `pipeline` {{SKILL}} only when the user asks for a
@@ -0,0 +1,63 @@
1
+ {
2
+ "adhd": "On /adhd, \"adhd mode\" or \"I have ADHD\": next action first, short numbered steps.",
3
+ "brainstorm": "New feature or project with no design, \"brainstorm\", \"interview me\": spec first.",
4
+ "brick-forge": "New or changed loop brick, \"make a brick\", \"change the test brick\": write it.",
5
+ "bruno": "Bruno API collection, .bru files, OpenCollection YAML: create, convert, test.",
6
+ "codebase-design": "\"Where should the seam go\", module interface, glossary term, ADR: deep modules.",
7
+ "commit": "About to commit changes: stage only the task's paths, one focused message.",
8
+ "compose-ops": "compose.yaml, docker-compose, Dockerfile: health, volumes, pins, secrets.",
9
+ "council": "\"Convene a council\", \"debate this\", \"argue both sides\": viewpoints, a ruling.",
10
+ "daydream": "On /daydream: find hidden links between notes in an Obsidian vault.",
11
+ "debug": "Bug: failing test, crash, an error or stack trace, wrong return value, red CI.",
12
+ "deck": "Presentation, slides or a deck, no file format named: one offline HTML file.",
13
+ "dependencies": "\"What's outdated\", \"are we vulnerable\", audit or upgrade dependencies, CVEs.",
14
+ "develop": "Implement a feature, fix a bug, change behaviour: test first, then code, green.",
15
+ "diagram-design": "Diagram, chart, flowchart, architecture, sequence, ER, Gantt: HTML/SVG output.",
16
+ "document-project": "Docs missing or drifted, PRD, architecture doc, AGENTS.md: write them from code.",
17
+ "explain-changes": "\"What did you change\", \"show me the diff\", explain a PR: one offline HTML page.",
18
+ "factory": "Factory named, issue-to-pr, bug-report-to-fix: carry one item to a green PR.",
19
+ "factory-forge": "New factory, or change one: compose bricks and loops into a checked factory.",
20
+ "forge-mcp": "Build, extend or harden an MCP server that exposes an API as agent tools.",
21
+ "fresh-eyes": "Work claimed done, needs a blind check: a context-free agent judges the ask.",
22
+ "frontend-design": "New UI or redesign needing a point of view: palette, type, layout, no template.",
23
+ "geneseed": "Geneseed, the harness, AGENT.md: install, upgrade, repair, OpenCode theme.",
24
+ "geneseed-code-review": "Review a diff or PR before merge, \"roast my code\": correctness first.",
25
+ "git-history": "Learn from git history (bisect, blame, pickaxe), or repair or rewrite it safely.",
26
+ "gitlab-ci": ".gitlab-ci.yml, GitLab pipeline jobs: rules, needs, includes, cache, variables.",
27
+ "handoff": "Context filling, session ending mid-task, work passing on: write the state down.",
28
+ "herdr": "Only when the user names Herdr: drive its panes, tabs, workspaces and agents.",
29
+ "ingest": "Read a PDF, Word, PowerPoint, Excel, EPUB, HTML or a URL: convert to markdown.",
30
+ "jenkins-pipeline": "Jenkinsfile, Jenkins shared library, CPS or sandbox error: write or fix it.",
31
+ "learn-mode": "User wants to learn while building: they design each part, the agent explains.",
32
+ "loop": "\"Run a loop\", small validated iterations each committed: work a requirement.",
33
+ "opencode-cli": "Drive OpenCode V2 from a script or session: opencode run, sessions, server, MCP.",
34
+ "ownership": "Developer must own production code: they decide each part, the agent proposes.",
35
+ "parallel-agents": "Two or more independent subtasks, no shared state: fan out to parallel agents.",
36
+ "pipeline": "User asks for a pipeline or crew, or a big multi-specialist task: worktree crew.",
37
+ "plan": "Task with several steps or files: write a plan file first, track each step.",
38
+ "ponytail": "\"Ponytail\", \"be lazy\", \"yagni\", \"do less\", over-engineering: laziest fix.",
39
+ "profile": "User wants the agent to know who they are, PROFILE.md a stub: interview, draft.",
40
+ "prose": "Human-facing prose (commit body, PR, docs, reply): write it so it reads human.",
41
+ "prototype": "Design question needing a runnable answer, \"does this feel right\": prototype.",
42
+ "react": "React components, hooks, state, data fetching in a Vite or webpack app (TS/JS).",
43
+ "react-testing": "React tests with Jest, Testing Library, MSW: write or fix them.",
44
+ "react-view-transitions": "React View Transition API: page transitions, shared elements, route animations.",
45
+ "refactor": "Extract, rename, inline, split, dedupe working code; behaviour stays the same.",
46
+ "release": "User asks to cut or publish a release: version bump, changelog, tag, in sync.",
47
+ "research": "Needs current or external facts, not in the repo or the model: sourced answer.",
48
+ "review-response": "Review feedback arrived, from a human or agent: verify each point, then act.",
49
+ "roast-me": "User wants their own ask, plan, idea or writing torn apart, brutally, honestly.",
50
+ "rule": "\"Always\", \"never\", \"from now on\", \"remember that\", auto-merge on/off: record it.",
51
+ "security-audit": "Security review, threat model, \"is this safe\", auth or input change: audit it.",
52
+ "ship": "Change committed and verified: open the pull request, or merge the branch.",
53
+ "skill-forge": "Task repeats and no skill covers it, or a skill to sharpen, merge or retire.",
54
+ "spring-boot": "Spring Boot 4 service: controllers, config, security, HTTP clients, logging.",
55
+ "spring-data-jpa": "Spring Data JPA, Hibernate, N+1, LazyInitializationException, migrations.",
56
+ "spring-testing": "Spring Boot tests: @WebMvcTest, @DataJpaTest, @SpringBootTest, Testcontainers.",
57
+ "teach": "User asks to be taught something, or to have what they know tested: teach, quiz.",
58
+ "token-report": "Token or context usage, \"how full is the context\", what eats it: tables report.",
59
+ "wayfinder": "Work too big for one session, route unclear: map it as decision tickets.",
60
+ "wiki": "Needs the user's machine-wide knowledge base, or a cross-project fact to save.",
61
+ "workflow": "Deterministic multi-agent orchestration, host has a workflow tool: run a script.",
62
+ "worktree": "\"Worktree\", \"isolate this\", work must not share the checkout: own git worktree."
63
+ }
@@ -1,39 +1,57 @@
1
1
  ## Self-improvement
2
2
 
3
3
  <!-- LEAN:begin -->
4
- This {{SKILL}} keeps its own notes in `{{PATH_NOTES}}/skill-notes/<name>.md`,
5
- `<name>` being this {{SKILL}}'s name. When that file exists, read it before the
6
- first step — where it disagrees with this file, the notes win. They are yours to
7
- write, and no rebuild touches them.
4
+ This {{SKILL}} keeps notes in two scopes. Machine notes, true in every repo:
5
+ `{{PATH_NOTES}}/skill-notes/{{SKILL_NAME}}.md`, beside `{{PATH_NOTES}}/skill-notes/_general.md`,
6
+ which every {{SKILL}} shares. Project notes, true only in this repo: the same two files under
7
+ `{{PATH_PROJECT_NOTES}}/skill-notes/` at the project root (in a linked worktree, the main
8
+ checkout's). Read the four in that order, when they exist, before the
9
+ first step — where they disagree with this file, the notes win, and the project notes
10
+ win over the machine notes. No rebuild touches them.
8
11
 
9
12
  Close each run with one beat of reflection on the {{SKILL}} itself:
10
13
  - A step misled, a needed step was missing, or the trigger fired wrongly — that
11
- is a flaw in this file. Write the exact correction (trigger, procedure, or
12
- done-when) into the notes file on your own, with no prompt, as one line:
13
- `- [skill|general] <correction> [— situation: <when it applies>] — seen: <what happened, against what you expected> (<date>)`.
14
- `situation:` bounds where the correction holds; `seen:` is the evidence it is
15
- later judged by; `general` marks one that would fix other {{SKILLS}} too. Never
16
- edit this file: it is a rendered copy, a rebuild overwrites it, and the doctor
17
- reports the edit as drift. `geneseed diff` carries the notes back to the source;
14
+ is a flaw in this file. End your reply with one line that names it, at the start
15
+ of a line and outside any code:
16
+ `spec-feedback: [skill:{{SKILL_NAME}}] <the one-line fix> [— situation: <when it applies>] — seen: <what happened, against what you expected>`.
17
+ `situation:` bounds where the fix holds; `seen:` is the evidence it is later
18
+ judged by. Ask one question first: is it true in any repo, or only here? Any repo:
19
+ `[skill:{{SKILL_NAME}}]`, or `[skill:{{SKILL_NAME}}:general]` for a fix other {{SKILLS}} need
20
+ too. Only here: `[skill:{{SKILL_NAME}}:project]`, or `[skill:{{SKILL_NAME}}:general:project]`.
21
+ When the turn ends, the harness hook copies the line, dated, into the notes —
22
+ no model call, so do not write the notes file yourself. On Bob, whose hook never
23
+ sees your reply, append it yourself: `- [skill] <the fix> … (<date>)` to the machine
24
+ or the project `skill-notes/{{SKILL_NAME}}.md` above, or `- [general] <the fix> … ({{SKILL_NAME}}, <date>)` to
25
+ that scope's `skill-notes/_general.md`; amend or delete a stale line before adding one, and keep
26
+ each file under about twenty lines.
27
+ Never edit this file: it is a rendered copy, a rebuild overwrites it. A bundled
28
+ script that is broken is the one exception: fix it in place, and tell the user
29
+ which file you changed. `geneseed diff` carries the notes back to the source;
18
30
  folding a note into the source is the user's call, through the skill-forge
19
31
  {{SKILL}} ({{LAW:one-intent-one-act}}).
20
- - Keep the notes sharp: amend or delete a line before adding one — a line with no
21
- `seen:`, or whose `seen:` no longer happens, goes first — and prune past about
22
- twenty lines.
23
32
  - A lesson that is *not* a flaw in this file goes to {{MEMORY}} only if it
24
33
  clears {{DOCTRINE:persist-insight}}'s bar: it would change how a future session behaves, and a
25
34
  fresh read of the repo would not re-derive it. Update an existing memory over
26
35
  adding one; when in doubt, leave it out.
27
- - No friction, nothing learned — move on; this loop earns no ceremony. Most
36
+ - No friction, nothing learned — no line; this loop earns no ceremony. Most
28
37
  runs end here.
29
38
  <!-- LEAN:else -->
30
- One beat of reflection on this {{SKILL}}: a step that misled, a missing step, or a
31
- wrong trigger is a flaw in this file — write the exact correction on your own, with no
32
- prompt, into `{{PATH_NOTES}}/skill-notes/<name>.md` (`<name>` is this {{SKILL}}'s
33
- name) as `- [skill|general] <correction> [— situation: <when it applies>] — seen: <what happened vs expected> (<date>)`,
34
- never into this rendered file, which a rebuild overwrites. Folding a note into the
35
- source is the user's call ({{LAW:one-intent-one-act}}). Read that notes
36
- file before the first step when it exists; it wins where it disagrees. Keep it short.
37
- A lesson that is not about this file goes to {{MEMORY}} only if it clears
38
- {{DOCTRINE:persist-insight}}'s bar. Nothing learned — move on.
39
+ Before the first step read, when they exist, the machine notes
40
+ `{{PATH_NOTES}}/skill-notes/{{SKILL_NAME}}.md` and `{{PATH_NOTES}}/skill-notes/_general.md`, then the
41
+ same two project notes under `{{PATH_PROJECT_NOTES}}/skill-notes/` at the project root (a linked
42
+ worktree: the main checkout's). Notes win over this file, project notes over machine notes.
43
+ One beat of reflection on this {{SKILL}}: a step that misled, a missing step, or a wrong
44
+ trigger is a flaw in this file — end your reply with one line, at a line start and outside any code,
45
+ `spec-feedback: [skill:{{SKILL_NAME}}] <the one-line fix> [— situation: <when it applies>] — seen: <what happened vs expected>`.
46
+ True in any repo, or only here? Any repo: `[skill:{{SKILL_NAME}}]`, or `[skill:{{SKILL_NAME}}:general]`
47
+ for a fix other {{SKILLS}} need too; only here: `[skill:{{SKILL_NAME}}:project]`, or
48
+ `[skill:{{SKILL_NAME}}:general:project]`. The hook copies it into
49
+ the notes when the turn ends; do not write them yourself, except on Bob, whose hook never
50
+ sees the reply: there append `- [skill] <the fix> … (<date>)` to the machine or the project
51
+ `skill-notes/{{SKILL_NAME}}.md`, or `- [general] <the fix> … ({{SKILL_NAME}}, <date>)` to that scope's
52
+ `skill-notes/_general.md`, pruning stale lines first. Never edit this rendered file; a broken bundled script is the one
53
+ exception: fix it in place, and tell the user which file you changed. Folding a note
54
+ into the source is the user's call ({{LAW:one-intent-one-act}}). A lesson that is not
55
+ about this file goes to {{MEMORY}} only if it clears {{DOCTRINE:persist-insight}}'s bar.
56
+ Nothing learned — no line.
39
57
  <!-- LEAN:end -->