geneseed 3.8.0 → 3.10.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 (229) hide show
  1. package/CHANGELOG.md +71 -1
  2. package/DESIGN.md +13 -10
  3. package/QUICKSTART.md +1 -1
  4. package/README.md +31 -32
  5. package/SETUP.md +7 -42
  6. package/SHIPPED.md +4 -4
  7. package/adapters/bob/README.md +17 -1
  8. package/adapters/openclaude/README.md +1 -1
  9. package/adapters/opencode/GLOBAL-HARNESS-SPEC.md +1 -1
  10. package/adapters/opencode/README.md +3 -3
  11. package/adapters/opencode/plugins/geneseed-context.js +78 -8
  12. package/adapters/opencode/plugins/geneseed-guard.js +9 -9
  13. package/adapters/opencode/plugins/geneseed-workflow.js +1 -1
  14. package/adapters/opencode/workflows/_runtime.js +2 -2
  15. package/adapters/opencode/workflows/dispatch.js +1 -1
  16. package/bin/geneseed-hook.mjs +1 -1
  17. package/docs/candidate-hosts.md +12 -5
  18. package/docs/extending.md +72 -40
  19. package/docs/token-footprint.md +26 -21
  20. package/docs/web/claude-hooks.md +1 -1
  21. package/docs/web/collaboration.md +1 -1
  22. package/docs/web/exclusions.md +0 -1
  23. package/docs/web/footprint.md +1 -1
  24. package/docs/web/harnesses.md +14 -14
  25. package/docs/web/install-quick.md +1 -1
  26. package/docs/web/plugin-guard.md +2 -2
  27. package/docs/web/rules.md +1 -1
  28. package/docs/web/themes-author.md +2 -2
  29. package/docs/web-ui.md +2 -2
  30. package/harness.config.json +1 -1
  31. package/js/README.md +8 -7
  32. package/js/build/driver.mjs +26 -95
  33. package/js/build/emit-claude.mjs +76 -81
  34. package/js/build/generate.mjs +0 -1
  35. package/js/build/render.mjs +10 -3
  36. package/js/build/source.mjs +105 -1
  37. package/js/build/stubs.mjs +25 -4
  38. package/js/cli-table.json +8 -8
  39. package/js/hosts/hooks.mjs +91 -59
  40. package/js/hosts/hosts.mjs +5 -21
  41. package/js/hosts/installs.mjs +4 -6
  42. package/js/hosts/mcp.mjs +3 -13
  43. package/js/hosts/native.mjs +28 -51
  44. package/js/hosts/opencode.mjs +1 -1
  45. package/js/hosts/settings.mjs +4 -78
  46. package/js/inspect/checks-authoring.mjs +153 -117
  47. package/js/inspect/checks-repo.mjs +45 -1
  48. package/js/inspect/diff.mjs +11 -3
  49. package/js/inspect/doctor.mjs +3 -3
  50. package/js/inspect/excludes.mjs +0 -4
  51. package/js/inspect/inventory.mjs +1 -2
  52. package/js/inspect/status.mjs +4 -4
  53. package/js/maintain/migrate.mjs +5 -5
  54. package/js/maintain/setup.mjs +3 -5
  55. package/js/maintain/uninstall.mjs +8 -42
  56. package/js/ui/tui.mjs +1 -1
  57. package/js/web/actions.mjs +4 -5
  58. package/js/web/api.mjs +10 -5
  59. package/package.json +1 -2
  60. package/registry.json +7 -0
  61. package/src/AGENT.md.tmpl +86 -65
  62. package/src/agents/_template.md +3 -3
  63. package/src/agents/advocate.md +3 -3
  64. package/src/agents/architect.md +3 -3
  65. package/src/agents/developer.md +4 -4
  66. package/src/agents/docs.md +3 -3
  67. package/src/agents/empiricist.md +4 -4
  68. package/src/agents/explorer.md +4 -4
  69. package/src/agents/framer.md +3 -3
  70. package/src/agents/historian.md +3 -3
  71. package/src/agents/operator.md +3 -3
  72. package/src/agents/pragmatist.md +3 -3
  73. package/src/agents/researcher.md +7 -7
  74. package/src/agents/reviewer.md +3 -3
  75. package/src/agents/security.md +3 -3
  76. package/src/agents/skeptic.md +3 -3
  77. package/src/agents/steward.md +3 -3
  78. package/src/agents/tester.md +3 -3
  79. package/src/agents/user-advocate.md +3 -3
  80. package/src/agents/visionary.md +3 -3
  81. package/src/doctrines/README.md +4 -3
  82. package/src/doctrines/comms.md +4 -4
  83. package/src/doctrines/craft.md +20 -20
  84. package/src/doctrines/ops.md +19 -19
  85. package/src/doctrines/process.md +20 -20
  86. package/src/doctrines/rigor.md +22 -22
  87. package/src/laws/universal.md +26 -44
  88. package/src/memory/README.md +3 -3
  89. package/src/modes/foreman.md +1 -1
  90. package/src/notebook/README.md +1 -1
  91. package/src/ontology/universal.md +8 -10
  92. package/src/postures/artisan.md +2 -2
  93. package/src/skills/_self-improvement.md +4 -4
  94. package/src/skills/_template.md +1 -1
  95. package/src/skills/brainstorm.md +3 -3
  96. package/src/skills/bruno-collection-generator.md +6 -6
  97. package/src/skills/bruno-test-writer.md +5 -5
  98. package/src/skills/ci-fix.md +4 -4
  99. package/src/skills/commit.md +11 -10
  100. package/src/skills/consolidate-memory.md +4 -4
  101. package/src/skills/council.md +2 -2
  102. package/src/skills/daydream/SKILL.md +10 -3
  103. package/src/skills/daydream/VENDOR.md +10 -2
  104. package/src/skills/daydream/instructions.md +2 -2
  105. package/src/skills/debug.md +4 -4
  106. package/src/skills/deps-audit.md +3 -3
  107. package/src/skills/develop.md +7 -7
  108. package/src/skills/document-project.md +6 -6
  109. package/src/skills/explain-changes/SKILL.md +69 -0
  110. package/src/skills/explain-changes/VENDOR.md +20 -0
  111. package/src/skills/explain-changes/scripts/render_changes.mjs +558 -0
  112. package/src/skills/forge-mcp.md +4 -4
  113. package/src/skills/fresh-eyes.md +4 -4
  114. package/src/skills/frontend-design.md +1 -1
  115. package/src/skills/geneseed.md +4 -4
  116. package/src/skills/git-archaeology.md +5 -5
  117. package/src/skills/git-rescue.md +7 -7
  118. package/src/skills/handoff.md +3 -3
  119. package/src/skills/ingest.md +5 -5
  120. package/src/skills/migrate.md +8 -8
  121. package/src/skills/parallel-agents.md +2 -2
  122. package/src/skills/pipeline.md +2 -2
  123. package/src/skills/plan.md +3 -3
  124. package/src/skills/ponytail.md +2 -2
  125. package/src/skills/profile.md +2 -2
  126. package/src/skills/prose.md +1 -1
  127. package/src/skills/prototype.md +1 -1
  128. package/src/skills/react-view-transitions/SKILL.md +1 -1
  129. package/src/skills/react-view-transitions/VENDOR.md +7 -2
  130. package/src/skills/refactor.md +3 -3
  131. package/src/skills/release.md +5 -5
  132. package/src/skills/repo-map.md +4 -4
  133. package/src/skills/research.md +9 -9
  134. package/src/skills/review-response.md +4 -4
  135. package/src/skills/rule.md +3 -3
  136. package/src/skills/security-audit.md +5 -5
  137. package/src/skills/ship.md +5 -5
  138. package/src/skills/skill-forge.md +4 -4
  139. package/src/skills/token-report/SKILL.md +2 -3
  140. package/src/skills/token-report/VENDOR.md +2 -3
  141. package/src/skills/token-report/scripts/token_report.mjs +7 -121
  142. package/src/skills/wiki.md +5 -5
  143. package/src/skills/workflow.md +3 -4
  144. package/src/skills/worktree.md +4 -4
  145. package/themes/_TEMPLATE.json +37 -39
  146. package/themes/biker.json +37 -39
  147. package/themes/commentator.json +37 -39
  148. package/themes/cyberpunk.json +37 -39
  149. package/themes/gamer.json +37 -39
  150. package/themes/imperial.json +37 -39
  151. package/themes/joker.json +37 -39
  152. package/themes/marvin.json +37 -39
  153. package/themes/mean.json +37 -39
  154. package/themes/military.json +37 -39
  155. package/themes/neutral.json +37 -39
  156. package/themes/pirate.json +37 -39
  157. package/themes/sports.json +37 -39
  158. package/themes/verstappen.json +37 -39
  159. package/themes/wizard.json +37 -39
  160. package/web/dist/assets/Activity-BjVp522q.js +1 -0
  161. package/web/dist/assets/ActivityDetail-8ep1bspW.js +1 -0
  162. package/web/dist/assets/Dashboard-OkC_PCH6.js +2 -0
  163. package/web/dist/assets/{Docs-DrJNDPwI.js → Docs-CKPWz00o.js} +2 -2
  164. package/web/dist/assets/FilterInput-CVyqmYWM.js +1 -0
  165. package/web/dist/assets/GreenhouseView-D0cbCJ5m.js +2 -0
  166. package/web/dist/assets/Installs-BtGGdoTt.js +2 -0
  167. package/web/dist/assets/JournalView-Ckl4dmzR.js +1 -0
  168. package/web/dist/assets/Laws-CLpdRRk8.js +3 -0
  169. package/web/dist/assets/Library-wPPuKQrI.js +1 -0
  170. package/web/dist/assets/{Markdown-BQAvN8xx.js → Markdown-CkFyfgNf.js} +14 -14
  171. package/web/dist/assets/OperatorHudView-CiAkAkQL.js +2 -0
  172. package/web/dist/assets/Personal-D8CnDo9v.js +1 -0
  173. package/web/dist/assets/Tabs-B4HNrrCs.js +1 -0
  174. package/web/dist/assets/drawable-BiwaOo6x.js +1 -0
  175. package/web/dist/assets/geist-mono-latin-400-normal-DTRLJnHl.woff2 +0 -0
  176. package/web/dist/assets/geist-mono-latin-500-normal-YINYabwD.woff2 +0 -0
  177. package/web/dist/assets/index-C1yil5j1.js +2 -0
  178. package/web/dist/assets/index-CDPDk2vj.css +1 -0
  179. package/web/dist/assets/{react-DbkvxWG5.js → react-B9Z_tXRV.js} +1 -1
  180. package/web/dist/assets/sections-GalMS0Zv.js +1 -0
  181. package/web/dist/assets/usePoll-O0sJEw1Y.js +1 -0
  182. package/web/dist/index.html +4 -4
  183. package/web/src/pages/Laws.jsx +616 -361
  184. package/adapters/copilot/README.md +0 -105
  185. package/web/dist/assets/Activity-CH-7cPIM.js +0 -1
  186. package/web/dist/assets/ActivityDetail-DZvz0xS5.js +0 -1
  187. package/web/dist/assets/CatalogRow-DftXpZHY.js +0 -1
  188. package/web/dist/assets/Diff-DvwdG0L9.js +0 -2
  189. package/web/dist/assets/Doctor-OTmwmYZg.js +0 -1
  190. package/web/dist/assets/FilterInput-BakJLvaV.js +0 -1
  191. package/web/dist/assets/GreenhouseView-XxrAdriX.js +0 -2
  192. package/web/dist/assets/Harness-C_LYNk5c.js +0 -1
  193. package/web/dist/assets/JournalView-BcuyeEaR.js +0 -1
  194. package/web/dist/assets/Laws-CWHrTKY4.js +0 -3
  195. package/web/dist/assets/Library-CA9IHghn.js +0 -1
  196. package/web/dist/assets/OperatorHudView-BMRY1Tt4.js +0 -2
  197. package/web/dist/assets/Profile-wceET1JY.js +0 -1
  198. package/web/dist/assets/Rules-BEXvY4Tx.js +0 -1
  199. package/web/dist/assets/Settings-DS2zF0Ez.js +0 -1
  200. package/web/dist/assets/Skills-DahlOJuI.js +0 -1
  201. package/web/dist/assets/StatusBadge-Cg6j-NJL.js +0 -1
  202. package/web/dist/assets/activity-iWaWVtsR.js +0 -1
  203. package/web/dist/assets/audiowide-latin-400-normal-6GFCX7ni.woff2 +0 -0
  204. package/web/dist/assets/drawable-BTHjTzF7.js +0 -1
  205. package/web/dist/assets/geist-mono-latin-400-normal-DKaoCDn5.woff2 +0 -0
  206. package/web/dist/assets/geist-mono-latin-500-normal-C3sF8Y1B.woff2 +0 -0
  207. package/web/dist/assets/geist-mono-latin-600-normal-BHzjB6_C.woff2 +0 -0
  208. package/web/dist/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  209. package/web/dist/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
  210. package/web/dist/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
  211. package/web/dist/assets/ibm-plex-serif-latin-400-normal-BIGslYFI.woff2 +0 -0
  212. package/web/dist/assets/ibm-plex-serif-latin-500-normal-REKAfBVG.woff2 +0 -0
  213. package/web/dist/assets/ibm-plex-serif-latin-600-normal-DAxitmSu.woff2 +0 -0
  214. package/web/dist/assets/index-AN5Emnrg.js +0 -2
  215. package/web/dist/assets/index-Ruh93A3A.css +0 -1
  216. package/web/dist/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
  217. package/web/dist/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
  218. package/web/dist/assets/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
  219. package/web/dist/assets/inter-latin-700-normal-Yt3aPRUw.woff2 +0 -0
  220. package/web/dist/assets/lawCats-Btjp3Hk_.js +0 -1
  221. package/web/dist/assets/oswald-latin-400-normal-BAFo8sP8.woff2 +0 -0
  222. package/web/dist/assets/oswald-latin-500-normal-B-eyT0Dw.woff2 +0 -0
  223. package/web/dist/assets/oswald-latin-600-normal-plFmSr5g.woff2 +0 -0
  224. package/web/dist/assets/oswald-latin-700-normal-vy6hmKSr.woff2 +0 -0
  225. package/web/dist/assets/poppins-latin-400-normal-cpxAROuN.woff2 +0 -0
  226. package/web/dist/assets/poppins-latin-500-normal-C8OXljZJ.woff2 +0 -0
  227. package/web/dist/assets/poppins-latin-600-normal-zEkxB9Mr.woff2 +0 -0
  228. package/web/dist/assets/poppins-latin-700-normal-Qrb0O0WB.woff2 +0 -0
  229. package/web/dist/assets/rolldown-runtime-CbXtAM7H.js +0 -1
@@ -14,8 +14,8 @@ whole set. The user's wiki is out of scope — that is the [wiki {{SKILL}}](wiki
14
14
  1. **Read the whole set once**: `MEMORY.md` and every file it indexes, plus any file in
15
15
  `{{DIR_MEMORY}}/` the index forgot. Build a scratch table — name, type, the claim in
16
16
  one line, the date it was written — and note which entries the current session
17
- already saw contradicted ({{DOCTRINE}} process 3: read to decide, not to reread).
18
- 2. **Verify against the live repo, not memory** ({{LAW}} III). For each memory that
17
+ already saw contradicted ({{DOCTRINE:context-economy}}: read to decide, not to reread).
18
+ 2. **Verify against the live repo, not memory** ({{LAW:verify-before-asserting}}). For each memory that
19
19
  names a path, function, flag, command, version, PR or branch: check it still exists
20
20
  and still behaves as claimed. A `project` memory about work since merged, a
21
21
  `reference` to a moved file, a `feedback` note the code now enforces — each is a
@@ -27,11 +27,11 @@ whole set. The user's wiki is out of scope — that is the [wiki {{SKILL}}](wiki
27
27
  `user-rules.md` — hand it to the [rule {{SKILL}}](rule.md)), *retire* (wrong,
28
28
  superseded, or a fact a fresh read of the repo re-derives). When in doubt between
29
29
  keep and retire, keep and date it.
30
- 4. **Show the plan, then apply it with consent** ({{LAW}} IV — retirement is deletion).
30
+ 4. **Show the plan, then apply it with consent** ({{LAW:deletion-is-deliberate}} — retirement is deletion).
31
31
  Merges preserve the `[[links]]` of both parents; rewrites keep the file name so
32
32
  inbound links hold; every surviving file keeps its frontmatter valid and its
33
33
  `**Why** / **How to apply**` lines where the type demands them. Nothing in the set
34
- ever holds a secret ({{LAW}} I) — a memory that does is retired on sight.
34
+ ever holds a secret ({{LAW:sealed-secrets}}) — a memory that does is retired on sight.
35
35
  5. **Rebuild the index.** `MEMORY.md` gets exactly one line per surviving file, each
36
36
  with a hook that says why a future session would open it; entries the index had
37
37
  lost are added, retired ones removed, and the archive lines for old compactions kept
@@ -5,7 +5,7 @@
5
5
  **Trigger:** the user asks to "convene a council", "debate this", "argue both sides", "stress-test this decision", or wants a change, plan, or claim challenged from several points of view before committing to it.
6
6
 
7
7
  ## Procedure
8
- 1. Frame the motion in one line — the exact decision, change, or claim under debate — and name what it feeds (a choice to make, a design to accept, a discussion to settle). Ground it in the real artifact and the project's own docs ({{DOCTRINE}} process 4) so the council argues the actual thing; if the motion is unclear or bundles several questions, split it and ask once, then proceed.
8
+ 1. Frame the motion in one line — the exact decision, change, or claim under debate — and name what it feeds (a choice to make, a design to accept, a discussion to settle). Ground it in the real artifact and the project's own docs ({{DOCTRINE:read-the-docs-first}}) so the council argues the actual thing; if the motion is unclear or bundles several questions, split it and ask once, then proceed.
9
9
  2. Seat the council from the standing roster of read-only debate {{AGENTS}}, each arguing one fixed stance — convene the subset that genuinely clashes on *this* motion (usually 3–6, never the whole bench for its own sake), always anchored by the for/against spine of [advocate](../{{DIR_AGENTS}}/advocate.md) and [skeptic](../{{DIR_AGENTS}}/skeptic.md):
10
10
  - [advocate](../{{DIR_AGENTS}}/advocate.md) — the strongest case **for**; [skeptic](../{{DIR_AGENTS}}/skeptic.md) — devil's advocate, failure modes and hidden assumptions.
11
11
  - [pragmatist](../{{DIR_AGENTS}}/pragmatist.md) — cost, effort, YAGNI; [steward](../{{DIR_AGENTS}}/steward.md) — long-term architecture and debt; [operator](../{{DIR_AGENTS}}/operator.md) — running it in production.
@@ -15,7 +15,7 @@
15
15
  Hand each chosen seat the motion and a one-line charter scoped to this topic; skip the seats with nothing to say here, and add an ad-hoc seat (e.g. the [security](../{{DIR_AGENTS}}/security.md) surface) only when the topic plainly demands a voice the roster doesn't cover.
16
16
  3. Round one — positions: convene the seats by dispatching each stance {{AGENT}} as its own subagent in one batch where the tool supports it (the [parallel-agents {{SKILL}}](parallel-agents.md)), so each argues in an isolated context with no groupthink; where no subagent capability exists, voice each seat in turn as a persona. Each returns its steelmanned brief ({{ONTOLOGY}}: {{ONT_CONDUCT}}) — no hedging, no strawmen.
17
17
  4. Round two — clash: put the briefs in front of each other and have the seats rebut only on the points that actually conflict, surfacing the cruxes, the load-bearing assumptions, and where the evidence is thin. Hold to a fixed number of rounds so the debate converges instead of looping; the skeptic already pairs every objection with what would resolve it (the [roast-me {{SKILL}}](roast-me.md) discipline).
18
- 5. The chair synthesises in neutral voice: state the verdict and its reasoning, record the strongest surviving dissent verbatim so it is not lost, list what would change the verdict, and name the single next action. Surface it for the user to decide — the council advises, it does not commit: write no code and push nothing on its own ({{LAW}} IV, {{DOCTRINE}} process 5).
18
+ 5. The chair synthesises in neutral voice: state the verdict and its reasoning, record the strongest surviving dissent verbatim so it is not lost, list what would change the verdict, and name the single next action. Surface it for the user to decide — the council advises, it does not commit: write no code and push nothing on its own ({{LAW:deletion-is-deliberate}}, {{DOCTRINE:consent-before-push}}).
19
19
 
20
20
  ## Done when
21
21
  - A crisp motion was debated by distinct, steelmanned seats over bounded rounds, and the chair has delivered a verdict, the preserved dissent, and one next action for the user to weigh.
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: daydream
3
+ description: "Mine an Obsidian vault for non-obvious connections between notes: samples recency-weighted note pairs, synthesizes links with parallel subagents, keeps only critic-approved insights and writes a daily digest. Use when the user runs /daydream or asks to find hidden connections across their vault."
4
+ ---
5
+
1
6
  # Vault Daydream Skill
2
7
 
3
8
  Multi-agent system that mines the Obsidian vault for non-obvious connections between notes, mimicking the brain's default mode network. Samples random note pairs, synthesizes connections via Sonnet, filters with Haiku critic.
@@ -10,6 +15,9 @@ Inspired by [Gwern's LLM Daydreaming](https://gwern.net/ai-daydreaming).
10
15
  /daydream
11
16
  ```
12
17
 
18
+ To run it, follow `<this-skill-directory>/instructions.md` step by step — that file is the
19
+ procedure; this one is the overview.
20
+
13
21
  ## Setup (Geneseed)
14
22
 
15
23
  Before the first run, make sure the pieces this skill depends on are in place:
@@ -20,14 +28,13 @@ Before the first run, make sure the pieces this skill depends on are in place:
20
28
  asks. No vault → nothing to daydream about.
21
29
  2. **Parallel subagents.** Synthesis and critique fan out across ~10–20 subagents per
22
30
  run, so the host must be able to dispatch them (Claude Code's `Task`; OpenCode's
23
- `task` tool — see the [parallel-agents](../parallel-agents.md) skill). On a host
31
+ `task` tool — see the `parallel-agents` skill). On a host
24
32
  with no subagent mechanism, the skill still works but runs serially and slowly.
25
33
  3. **Models.** The upstream prompts request `sonnet` for synthesis and `haiku` for
26
34
  critique. Those are Claude model names — on another host, substitute the host's
27
35
  capable/cheap pair (a strong model for synthesis, a fast one for scoring).
28
36
  4. **Prompt templates.** Steps 4 and 5 read the `synthesizer-prompt.md` and
29
- `critic-prompt.md` files **in this skill's own folder** (`skills/daydream/` in a
30
- deployed Geneseed bundle). They ship with the skill — nothing to install.
37
+ `critic-prompt.md` files **in this skill's own folder** (`<this-skill-directory>/`). They ship with the skill — nothing to install.
31
38
  5. **Writable output folders.** The run writes `Daydreams/`, `Daydreams/digests/`,
32
39
  `Daily/`, and `ai-research/daydream/history.json` into the vault. If any of those
33
40
  sit under a `protected` path in `wiki.jsonc`, the guard plugin will block the write —
@@ -23,5 +23,13 @@ subagents over recency-weighted note pairs. The model-name references (`sonnet`,
23
23
  non-Claude host, read the sibling `synthesizer-prompt.md` / `critic-prompt.md`
24
24
  directly and dispatch through whatever subagent mechanism the host provides.
25
25
 
26
- To update, re-copy the upstream folder, re-apply the wiki.jsonc adaptation in
27
- `SKILL.md` / `instructions.md`, and bump the commit above.
26
+ `SKILL.md` also carries a `name`/`description` frontmatter that upstream lacks — without it
27
+ a host that registers skills from frontmatter (the Agent Skills format: Claude Code, Bob, …)
28
+ never lists the skill — and points the agent at `instructions.md`, which upstream leaves to
29
+ its slash command. Sibling files are named through the this-skill-directory placeholder (see
30
+ `SKILL_DIR_PLACEHOLDER` in `js/hosts/native.mjs`), which the emit resolves for a host that
31
+ does not tell the model where a skill lives.
32
+
33
+ To update, re-copy the upstream folder, re-apply the wiki.jsonc adaptation, the
34
+ frontmatter and the placeholder paths in `SKILL.md` / `instructions.md`, and
35
+ bump the commit above.
@@ -152,7 +152,7 @@ Store the pairs array. Each pair has:
152
152
  ## Step 4: Synthesize Connections (Parallel Task Agents)
153
153
 
154
154
  ### 4a. Read synthesizer prompt
155
- Read `synthesizer-prompt.md` from this skill's own folder to get the prompt template (in a deployed Geneseed bundle that is `skills/daydream/synthesizer-prompt.md`; an upstream Claude install uses `.claude/skills/daydream/synthesizer-prompt.md`).
155
+ Read `synthesizer-prompt.md` from this skill's own folder to get the prompt template (`<this-skill-directory>/synthesizer-prompt.md`; an upstream Claude install uses `.claude/skills/daydream/synthesizer-prompt.md`).
156
156
 
157
157
  ### 4b. Batch pairs
158
158
  Split the pairs into batches of 5. This yields up to 10 batches.
@@ -212,7 +212,7 @@ If a Task agent returns malformed JSON, skip that batch and note the error. Do n
212
212
  ## Step 5: Critique and Score (Parallel Task Agents)
213
213
 
214
214
  ### 5a. Read critic prompt
215
- Read `critic-prompt.md` from this skill's own folder to get the prompt template (in a deployed Geneseed bundle that is `skills/daydream/critic-prompt.md`; an upstream Claude install uses `.claude/skills/daydream/critic-prompt.md`).
215
+ Read `critic-prompt.md` from this skill's own folder to get the prompt template (`<this-skill-directory>/critic-prompt.md`; an upstream Claude install uses `.claude/skills/daydream/critic-prompt.md`).
216
216
 
217
217
  ### 5b. Batch synthesis results
218
218
  Split synthesis results into batches of 5 (same pattern as Step 4).
@@ -14,11 +14,11 @@ faster than thrashing; do not trade it away under pressure.
14
14
  1. Reproduce it first: find the smallest input or command that triggers the failure reliably. If you can't reproduce it, gather evidence (logs, stack trace, recent diff) until you can. Read the error and stack trace in full — they often name the cause outright.
15
15
  2. Isolate: binary-search the cause — narrow the input, the code path, or (for a regression) the commit range with `git bisect` (the [git-archaeology {{SKILL}}](git-archaeology.md) carries the full method). Change one variable at a time. In a multi-layer system (CI → build → sign, API → service → DB), instrument each boundary once to see *which* layer breaks before investigating inside it.
16
16
  3. State one hypothesis that explains ALL the evidence before touching code. If you can't, you don't yet understand the failure — gather more evidence, don't guess.
17
- 4. Apply the smallest fix that addresses the root cause, not the symptom; resist fixing things the evidence doesn't implicate ({{LAW}} II). One change at a time — no bundled "while I'm here" edits, or you can't tell what worked.
18
- 5. Verify: run the project's checks and read the actual output (universal {{LAW}} III) — the original reproduction now passes and nothing nearby broke. Where a test can pin the bug, add a regression test that fails before the fix and passes after, so it can never silently return. Dispatch the [tester {{AGENT}}](../{{DIR_AGENTS}}/tester.md) for a focused regression check when the blast radius is unclear.
19
- 6. If a fix doesn't work, return to step 1 with what you learned — don't stack a second fix on top. **After three failed fixes, stop fixing:** when each attempt only shifts the symptom elsewhere, the architecture, not the line, is likely wrong. Surface that to the user and decide the approach together before trying again ({{LAW}} II).
17
+ 4. Apply the smallest fix that addresses the root cause, not the symptom; resist fixing things the evidence doesn't implicate ({{LAW:one-intent-one-act}}). One change at a time — no bundled "while I'm here" edits, or you can't tell what worked.
18
+ 5. Verify: run the project's checks and read the actual output ({{LAW:verify-before-asserting}}) — the original reproduction now passes and nothing nearby broke. Where a test can pin the bug, add a regression test that fails before the fix and passes after, so it can never silently return. Dispatch the [tester {{AGENT}}](../{{DIR_AGENTS}}/tester.md) for a focused regression check when the blast radius is unclear.
19
+ 6. If a fix doesn't work, return to step 1 with what you learned — don't stack a second fix on top. **After three failed fixes, stop fixing:** when each attempt only shifts the symptom elsewhere, the architecture, not the line, is likely wrong. Surface that to the user and decide the approach together before trying again ({{LAW:one-intent-one-act}}).
20
20
 
21
- **Diagnostic logging is scaffolding.** When you add logging to isolate a bug, use the project's real logger at a DEBUG level rather than scattered `print`/`console.log`, prefer correlation IDs over loose object dumps, and **never log secrets, tokens, or PII** ({{LAW}} I). Treat every temporary log as disposable: remove or downgrade each `print`/`console.log`/`debugger` before the change ships ({{LAW}} VIII) — leftover debug noise in a diff is a defect, not a free comment.
21
+ **Diagnostic logging is scaffolding.** When you add logging to isolate a bug, use the project's real logger at a DEBUG level rather than scattered `print`/`console.log`, prefer correlation IDs over loose object dumps, and **never log secrets, tokens, or PII** ({{LAW:sealed-secrets}}). Treat every temporary log as disposable: remove or downgrade each `print`/`console.log`/`debugger` before the change ships ({{LAW:cure-the-cause}}) — leftover debug noise in a diff is a defect, not a free comment.
22
22
 
23
23
  ## Done when
24
24
  - The failure is reproduced, root-caused, fixed at the cause, and the reproduction passes with no new breakage.
@@ -9,7 +9,7 @@ to bump first. migrate moves *one* dependency safely; this {{SKILL}} decides *wh
9
9
  *in what order*, and *whether at all*.
10
10
 
11
11
  ## Procedure
12
- 1. **Inventory from the lockfile, not the manifest** ({{LAW}} III): every direct
12
+ 1. **Inventory from the lockfile, not the manifest** ({{LAW:verify-before-asserting}}): every direct
13
13
  dependency with its pinned version, and the transitive tree where the tooling
14
14
  exposes it. Include vendored or copied-in code the manifest does not list — it is
15
15
  a dependency with no update channel.
@@ -23,7 +23,7 @@ to bump first. migrate moves *one* dependency safely; this {{SKILL}} decides *wh
23
23
  codebase), *behind by a minor/patch* (usually safe, batchable), *abandoned* (no
24
24
  release, no maintainer — plan a replacement, not a bump), *unused* (imported
25
25
  nowhere — remove it, the cheapest upgrade there is).
26
- 4. **For a proposed new dependency, ask the ladder first** ({{DOCTRINE}} craft 4): does
26
+ 4. **For a proposed new dependency, ask the ladder first** ({{DOCTRINE:search-before-creating}}): does
27
27
  the stdlib or an already-installed package cover it, and is the cost of a few lines
28
28
  lower than the cost of another maintainer's release cadence, licence, and
29
29
  transitive tree? Check who publishes it, how maintained it is, its licence
@@ -31,7 +31,7 @@ to bump first. migrate moves *one* dependency safely; this {{SKILL}} decides *wh
31
31
  5. **Order the plan by risk, then blast radius:** reachable security fixes first, then
32
32
  removals, then patch/minor batches, then majors one at a time with their changelog
33
33
  notes attached. Each major is its own [migrate {{SKILL}}](migrate.md) run on its own
34
- branch ({{LAW}} II); never bundle unrelated bumps.
34
+ branch ({{LAW:one-intent-one-act}}); never bundle unrelated bumps.
35
35
  6. **Report and hand off.** A ranked table — dependency, current → target, class,
36
36
  reachable?, the note that justifies the rank — plus what was left alone and why.
37
37
  Nothing is upgraded by the audit itself; the user picks the tranche and migrate
@@ -9,30 +9,30 @@ case where the seam is only known once the change is made.
9
9
 
10
10
  ## Procedure
11
11
  1. Orient on the project's own documentation for what you are about to touch
12
- ({{DOCTRINE}} process 4), and confirm the actual starting state — the suite runs,
13
- the baseline is green ({{LAW}} III). A red baseline is a [debug {{SKILL}}](debug.md)
12
+ ({{DOCTRINE:read-the-docs-first}}), and confirm the actual starting state — the suite runs,
13
+ the baseline is green ({{LAW:verify-before-asserting}}). A red baseline is a [debug {{SKILL}}](debug.md)
14
14
  task first, not something to build on.
15
15
  2. Agree the seams: name the public interfaces the tests will target and confirm
16
16
  them with the user when they are not obvious — no test is written at an
17
17
  unconfirmed seam. Testing effort belongs on critical paths and complex logic,
18
18
  not every edge.
19
- 3. Pick the next **smallest slice** that advances the task ({{DOCTRINE}} craft 6), then
19
+ 3. Pick the next **smallest slice** that advances the task ({{DOCTRINE:smallest-viable-diff}}), then
20
20
  cover it:
21
21
  - *Seam known up front* — test-first. Write ONE failing test that pins the slice,
22
22
  specific about the expected output (for a bug, the test reproduces it). Run it
23
23
  and watch it fail **for the right reason** — a test that passes immediately, or
24
24
  fails on a typo, proves nothing.
25
25
  - *Seam only clear once the change exists* — write the covering test alongside the
26
- change ({{DOCTRINE}} rigor 3), then break the implementation on purpose once to
26
+ change ({{DOCTRINE:cover-and-verify}}), then break the implementation on purpose once to
27
27
  see the test go red before trusting it.
28
28
  4. Write the minimum code that makes it pass; add nothing the test doesn't demand.
29
- 5. Run the *affected* tests and read the output ({{LAW}} III); on failure fix the
30
- cause, never mask it ({{LAW}} VIII). Dispatch the
29
+ 5. Run the *affected* tests and read the output ({{LAW:verify-before-asserting}}); on failure fix the
30
+ cause, never mask it ({{LAW:cure-the-cause}}). Dispatch the
31
31
  [tester {{AGENT}}](../{{DIR_AGENTS}}/tester.md) for heavier or unfamiliar coverage,
32
32
  or when the blast radius is unclear.
33
33
  6. With the slice green, tidy through the [refactor {{SKILL}}](refactor.md) — the tests
34
34
  are the safety net — then commit the slice through the [commit {{SKILL}}](commit.md)
35
- ({{DOCTRINE}} process 5). Loop from step 3, one slice at a time.
35
+ ({{DOCTRINE:consent-before-push}}). Loop from step 3, one slice at a time.
36
36
  7. **Exit.** When the last slice is in: run the whole affected suite once more, state
37
37
  what was run and its result, and hand over — to the [ship {{SKILL}}](ship.md) when
38
38
  the change is ready for a PR, or to the [handoff {{SKILL}}](handoff.md) if the
@@ -13,8 +13,8 @@ write; with none, step 3 proposes them.
13
13
  convention [repo-map {{SKILL}}](repo-map.md) and the context loader use). Reuse the one
14
14
  that exists — never create a second. If none exists, create `docs/` at the root.
15
15
  2. **Survey the code, not the intent.** Map entry points, the public API / modules,
16
- commands, config, and key directories — read the actual behaviour (universal {{LAW}} III,
17
- {{DOCTRINE}} process 4). If there is no `ARCHITECTURE.md`, run [repo-map {{SKILL}}](repo-map.md)
16
+ commands, config, and key directories — read the actual behaviour ({{LAW:verify-before-asserting}},
17
+ {{DOCTRINE:read-the-docs-first}}). If there is no `ARCHITECTURE.md`, run [repo-map {{SKILL}}](repo-map.md)
18
18
  first so you have the orientation map to build on.
19
19
  3. **Select the doc set.** Unless the argument names the targets, propose which of the four
20
20
  documents apply and wait for the user's go-ahead — e.g. "no UI detected (no stylesheet,
@@ -30,7 +30,7 @@ write; with none, step 3 proposes them.
30
30
  5. **Reconcile the markdown (whole tree).** Check every existing page against the current
31
31
  implementation — renamed or removed APIs, changed flags, dead examples — and fix the
32
32
  drift. Add pages for significant undocumented surfaces; remove docs for features that no
33
- longer exist (deletion is deliberate — {{LAW}} IV). For substantial writing, dispatch
33
+ longer exist ({{LAW:deletion-is-deliberate}}). For substantial writing, dispatch
34
34
  the [docs {{AGENT}}](../{{DIR_AGENTS}}/docs.md). Keep examples runnable — run them.
35
35
  Every generated page follows three conventions:
36
36
  - **Typed frontmatter.** Open each page with YAML frontmatter carrying `type:` (one of
@@ -52,9 +52,9 @@ write; with none, step 3 proposes them.
52
52
  members included, current with the set you just reconciled.
53
53
  7. **Regenerate the HTML** — self-contained files at the doc home, a visual parallel to the
54
54
  markdown and never a source of truth: regenerate them whole from the markdown each run
55
- ({{DOCTRINE}} ops 3: edit the source, not the surface).
55
+ ({{DOCTRINE:edit-the-source-not-the-surface}}).
56
56
  Overwrite the previous ones, but confirm each is the generated artifact before clobbering
57
- ({{LAW}} III, {{LAW}} IV). Both files:
57
+ ({{LAW:verify-before-asserting}}, {{LAW:deletion-is-deliberate}}). Both files:
58
58
  - **Stand alone, fully offline** — a single file, content pre-rendered to semantic HTML,
59
59
  all styling in one inline `<style>`, at most minimal vanilla JS (light/dark toggle, TOC
60
60
  scroll). No CDN, no external assets, no web fonts (use a system-font stack). Render any
@@ -84,7 +84,7 @@ write; with none, step 3 proposes them.
84
84
  (variants, states, path) — no live rendering, which would need the project's framework; and
85
85
  the hard-coded-value drift in a separate callout.
86
86
  8. **Do not auto-publish.** Leave the changes for the user to review; stage and commit only
87
- on consent, via the [commit {{SKILL}}](commit.md) ({{DOCTRINE}} process 5).
87
+ on consent, via the [commit {{SKILL}}](commit.md) ({{DOCTRINE:consent-before-push}}).
88
88
 
89
89
  ## The doc set
90
90
 
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: explain-changes
3
+ description: "Renders one offline HTML page explaining a change — intent, risks, walkthrough, side-by-side git diff — and opens it. Use when the user asks to explain, show or review the changes ('what did you change?', 'show me the diff'), for a branch or PR, or offer it (never impose) before asking to commit a non-trivial change."
4
+ ---
5
+
6
+ # explain-changes
7
+
8
+ > Turn a diff into a page a human can actually verify: why each part changed, what to check first, and the exact diff beside it.
9
+
10
+ **Trigger:** the user asks to explain, walk through, show or visualise the changes; you are about to ask consent to commit a non-trivial change (offer the report — never make it a condition); or the user wants a branch or PR explained (`--base <ref>`).
11
+
12
+ ## Division of labour
13
+
14
+ You write the **brief** — the narrative only. `scripts/render_changes.mjs` runs `git diff` itself and puts the exact diff on the page. Never paste diff lines into the brief: you would pay for them in output tokens and could alter the very thing under review. The script only reads git; it never stages anything.
15
+
16
+ ## Procedure
17
+
18
+ 1. **Measure.** `git diff --cached --shortstat`; if empty, `git diff HEAD --shortstat`; for a branch, `git diff <ref>...HEAD --shortstat`. The shortstat leaves out untracked files, which the report includes when nothing is staged: add `git ls-files --others --exclude-standard | wc -l` (or the host equivalent) to the file count.
19
+ 2. **Choose who writes the brief.**
20
+ - You made the change, and it is under ~300 changed lines and ~10 files: write it yourself from what you already know. Read only the hunks you do not remember (`git diff -- <path>`).
21
+ - Bigger, a change you did not make, or your context is already heavy: delegate to **one fresh subagent** (the `developer` agent where the host has agents). Hand it the user's request verbatim, your intent notes per logical unit (a few lines each), the diff command, this file's brief rules, and the render command. It returns the report path and three lines. The full diff never enters your context.
22
+ - No subagents on this host: write the brief one logical unit at a time, reading `git diff -- <paths>` for that unit only.
23
+ 3. **Write the brief** as JSON to a temporary file outside the repository (schema below).
24
+ 4. **Render.**
25
+ `node <this-skill-directory>/scripts/render_changes.mjs --brief <brief.json> --out <your notebook directory>` — add `--base <ref>` for a branch. Your notebook directory is named in your root instructions; if this install has none, omit `--out` and the report goes under `.git/explain-changes/`.
26
+ `--base <ref>` covers committed work only (`<ref>...HEAD`); uncommitted changes are not in it — commit first, or explain them separately without `--base`.
27
+ 5. **Fix mismatches.** If the script prints narrative mismatches — a file or hunk you cited that is not in the diff, a changed file no unit explains, an unsafe diagram, no risks — fix the brief and re-run. Never hand over a bannered report.
28
+ 6. **Open it.** Windows `start "" "<path>"` from cmd or Git Bash, `Start-Process "<path>"` from PowerShell; macOS `open "<path>"`, Linux `xdg-open "<path>"`. If that fails (headless, SSH, container), print the path instead.
29
+ 7. **Hand over** in two lines: the path, and the one risk the user should check first. Before you later ask commit consent, run the script with `--hash`: if it differs from the `diff <hash>` in the report's footer, the diff has changed since — regenerate.
30
+
31
+ ## The brief
32
+
33
+ ```json
34
+ {
35
+ "lang": "en",
36
+ "title": "HTTP cache with expiry",
37
+ "request": "the user's request, verbatim",
38
+ "summary": "3-5 sentences: what changes for the user or the system, and why",
39
+ "risks": [
40
+ { "level": "high", "text": "The cache key ignores auth headers: two users can get each other's response.", "unit": "u2" }
41
+ ],
42
+ "units": [
43
+ {
44
+ "id": "u1",
45
+ "kind": "entry point",
46
+ "title": "The client reads the cache before the network",
47
+ "why": "1-2 sentences",
48
+ "files": ["src/http/client.js"],
49
+ "hunks": { "src/http/client.js": [0, 1] },
50
+ "out_of_scope": false,
51
+ "svg": "<svg viewBox=\"0 0 760 150\">…</svg>"
52
+ }
53
+ ]
54
+ }
55
+ ```
56
+
57
+ - `request` is the user's words, verbatim — not your summary of them.
58
+ - **Units follow execution order** (entry point → core → effects → tests), not file order. One unit = one intent. `hunks` picks hunks by index; omit it to show every hunk of each file in `files`.
59
+ - **`risks` is the section the reader acts on.** Cover, whenever they exist: assumptions you did not verify; what is untested; files touched outside the request (also mark that unit `"out_of_scope": true`); user-visible behaviour changes (API, config, schema, migrations). You are describing your own work — err toward listing. `level` is `high`, `medium` or `low`. An empty list needs `"risks_none_reason"`.
60
+ - **`svg` only when the change alters a flow between components** — a call sequence, a data model, a state machine. A change local to one file gets none. Hand-written inline SVG, one `<svg>` element and nothing after it; no scripts, event handlers, `foreignObject`, `<style>` (use attributes), animated links, external links or `url()` to anything but a `#fragment` — the script drops unsafe diagrams. Use `currentColor`, `var(--muted)`, `var(--add-ink)`, `var(--del-ink)`, `var(--line)` and `var(--code-bg)` so it follows the page theme.
61
+ - `lang` is `en` or `fr`, matching the user's language; write every text field in that language.
62
+
63
+ ## Privacy
64
+
65
+ The report contains code. It stays in a git-ignored local path; if the diff holds a secret, the report does too — the same exposure as the diff itself. Never commit or publish a report.
66
+
67
+ ## Done when
68
+
69
+ - A report built from the current diff exists with no mismatch banner, it is open (or its path given), and the user knows the one risk to check first.
@@ -0,0 +1,20 @@
1
+ # Folder skill — explain-changes
2
+
3
+ Like `token-report`, this folder is **Geneseed-authored**, not third-party. It rides
4
+ the vendored-folder mechanism because it bundles an executable
5
+ (`scripts/render_changes.mjs`) and Geneseed's flat-skill pipeline renders single
6
+ `.md` files only. Listing it in the generator's `VENDORED_SKILL_DIRS` makes the
7
+ whole folder ride along verbatim into every host emit — Claude Code, IBM Bob,
8
+ OpenCode, OpenClaude.
9
+
10
+ - **Upstream:** this repository (first-party)
11
+ - **License:** same as Geneseed (see repository LICENSE)
12
+
13
+ Consequences of riding this mechanism (deliberate):
14
+
15
+ - exempt from the flat-skill authoring gates (theme DESC tokens, dead-link,
16
+ hermeticity) — the SKILL.md carries its own frontmatter `description`, and it
17
+ names no themed term: the notebook directory reaches the script as `--out`;
18
+ - listed in AGENT.md's folder-skills section, not the main skills table.
19
+
20
+ The script needs only `node` and `git`, both already present wherever Geneseed runs.