geneseed 2.1.0 → 3.0.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 (187) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/DESIGN.md +112 -61
  3. package/QUICKSTART.md +1 -1
  4. package/README.md +24 -14
  5. package/SETUP.md +83 -17
  6. package/SHIPPED.md +5 -4
  7. package/adapters/bob/README.md +3 -3
  8. package/adapters/claude-code/README.md +6 -4
  9. package/adapters/claude-code/skills/geneseed/SKILL.md +10 -6
  10. package/adapters/copilot/README.md +5 -4
  11. package/adapters/opencode/GLOBAL-HARNESS-SPEC.md +11 -6
  12. package/adapters/opencode/HOW-OPENCODE-LOADS.md +1 -1
  13. package/adapters/opencode/README.md +15 -9
  14. package/adapters/opencode/agents/orchestrator.md +1 -1
  15. package/adapters/opencode/plugins/geneseed-context.js +7 -7
  16. package/adapters/opencode/plugins/geneseed-guard.js +6 -6
  17. package/adapters/opencode/workflows/dispatch.js +1 -1
  18. package/bin/geneseed.mjs +72 -6
  19. package/docs/extending.md +164 -55
  20. package/docs/limits.md +4 -4
  21. package/docs/token-footprint.md +15 -4
  22. package/docs/web/authoring.md +1 -1
  23. package/docs/web/claude-hooks.md +2 -2
  24. package/docs/web/collaboration.md +3 -3
  25. package/docs/web/first-session.md +2 -2
  26. package/docs/web/footprint.md +14 -7
  27. package/docs/web/foreman-mode.md +2 -2
  28. package/docs/web/harnesses.md +5 -3
  29. package/docs/web/install-quick.md +1 -1
  30. package/docs/web/model.md +3 -3
  31. package/docs/web/plugin-context.md +2 -2
  32. package/docs/web/plugin-guard.md +3 -3
  33. package/docs/web/plugin-ponytail.md +1 -1
  34. package/docs/web/rules.md +23 -3
  35. package/docs/web/setup-choices.md +20 -7
  36. package/docs/web/themes-author.md +13 -1
  37. package/docs/web-ui.md +36 -12
  38. package/harness.config.json +1 -1
  39. package/js/catalog.mjs +29 -4
  40. package/js/checkout.mjs +24 -1
  41. package/js/cli-table.json +8 -6
  42. package/js/diff.mjs +8 -3
  43. package/js/doctor.mjs +307 -4
  44. package/js/emit.mjs +48 -11
  45. package/js/generate.mjs +39 -5
  46. package/js/hooks.mjs +8 -7
  47. package/js/installs.mjs +101 -4
  48. package/js/inventory.mjs +150 -21
  49. package/js/migrate.mjs +10 -4
  50. package/js/render.mjs +110 -7
  51. package/js/settings.mjs +218 -27
  52. package/js/setup.mjs +95 -5
  53. package/js/status.mjs +45 -4
  54. package/js/tui.mjs +44 -1
  55. package/js/uninstall.mjs +25 -6
  56. package/js/web/actions.mjs +56 -5
  57. package/js/web/api.mjs +95 -16
  58. package/js/web/docs.mjs +33 -5
  59. package/js/web/jobs.mjs +12 -3
  60. package/js/web/server.mjs +6 -0
  61. package/package.json +1 -1
  62. package/src/AGENT.md.tmpl +75 -65
  63. package/src/agents/_template.md +4 -4
  64. package/src/agents/advocate.md +4 -4
  65. package/src/agents/architect.md +2 -2
  66. package/src/agents/developer.md +5 -5
  67. package/src/agents/docs.md +2 -2
  68. package/src/agents/empiricist.md +3 -3
  69. package/src/agents/explorer.md +3 -3
  70. package/src/agents/framer.md +3 -3
  71. package/src/agents/historian.md +3 -3
  72. package/src/agents/operator.md +3 -3
  73. package/src/agents/pragmatist.md +3 -3
  74. package/src/agents/reviewer.md +2 -2
  75. package/src/agents/security.md +2 -2
  76. package/src/agents/skeptic.md +4 -4
  77. package/src/agents/steward.md +3 -3
  78. package/src/agents/tester.md +2 -2
  79. package/src/agents/user-advocate.md +3 -3
  80. package/src/agents/visionary.md +3 -3
  81. package/src/doctrines/README.md +41 -0
  82. package/src/doctrines/craft.md +51 -0
  83. package/src/doctrines/ops.md +61 -0
  84. package/src/doctrines/process.md +87 -0
  85. package/src/doctrines/rigor.md +52 -0
  86. package/src/laws/universal.md +17 -336
  87. package/src/memory/README.md +2 -2
  88. package/src/modes/README.md +2 -2
  89. package/src/modes/foreman.md +1 -1
  90. package/src/notebook/README.md +2 -2
  91. package/src/ontology/universal.md +89 -0
  92. package/src/postures/README.md +3 -3
  93. package/src/postures/artisan.md +3 -3
  94. package/src/postures/assistant.md +1 -1
  95. package/src/postures/expert.md +1 -1
  96. package/src/postures/mentor.md +1 -1
  97. package/src/postures/peer.md +2 -2
  98. package/src/skills/_template.md +2 -2
  99. package/src/skills/brainstorm.md +2 -2
  100. package/src/skills/clarify.md +2 -2
  101. package/src/skills/codebase-design.md +1 -1
  102. package/src/skills/commit.md +5 -5
  103. package/src/skills/council.md +4 -4
  104. package/src/skills/crash-course.md +1 -1
  105. package/src/skills/daydream/SKILL.md +1 -1
  106. package/src/skills/debug.md +2 -2
  107. package/src/skills/decode.md +1 -1
  108. package/src/skills/develop.md +6 -6
  109. package/src/skills/document-project.md +4 -4
  110. package/src/skills/domain-modeling.md +1 -1
  111. package/src/skills/drill.md +1 -1
  112. package/src/skills/feynman.md +1 -1
  113. package/src/skills/forge-mcp.md +3 -3
  114. package/src/skills/fresh-eyes.md +4 -4
  115. package/src/skills/frontend-design.md +1 -1
  116. package/src/skills/gap-detector.md +1 -1
  117. package/src/skills/geneseed-code-review.md +1 -1
  118. package/src/skills/geneseed.md +4 -4
  119. package/src/skills/git-archaeology.md +1 -1
  120. package/src/skills/git-rescue.md +3 -3
  121. package/src/skills/handoff.md +4 -4
  122. package/src/skills/herdr.md +1 -1
  123. package/src/skills/ingest.md +3 -3
  124. package/src/skills/learning-path.md +1 -1
  125. package/src/skills/migrate.md +5 -5
  126. package/src/skills/opencode-theme.md +1 -1
  127. package/src/skills/parallel-agents.md +2 -2
  128. package/src/skills/pipeline.md +2 -2
  129. package/src/skills/plan.md +2 -2
  130. package/src/skills/ponytail.md +1 -1
  131. package/src/skills/profile.md +1 -1
  132. package/src/skills/prose.md +2 -2
  133. package/src/skills/prototype.md +2 -2
  134. package/src/skills/refactor.md +2 -2
  135. package/src/skills/release.md +4 -4
  136. package/src/skills/repo-map.md +5 -5
  137. package/src/skills/research.md +6 -6
  138. package/src/skills/review-response.md +3 -3
  139. package/src/skills/roast-me.md +1 -1
  140. package/src/skills/rule.md +5 -5
  141. package/src/skills/ship.md +3 -3
  142. package/src/skills/tdd.md +2 -2
  143. package/src/skills/tickets.md +1 -1
  144. package/src/skills/wayfinder.md +1 -1
  145. package/src/skills/wiki.md +4 -4
  146. package/src/skills/workflow.md +2 -2
  147. package/themes/README.md +17 -7
  148. package/themes/_TEMPLATE.json +37 -36
  149. package/themes/biker.json +37 -36
  150. package/themes/commentator.json +37 -36
  151. package/themes/cyberpunk.json +37 -36
  152. package/themes/gamer.json +37 -36
  153. package/themes/imperial.json +37 -36
  154. package/themes/joker.json +37 -36
  155. package/themes/marvin.json +37 -36
  156. package/themes/mean.json +37 -36
  157. package/themes/military.json +37 -36
  158. package/themes/neutral.json +37 -36
  159. package/themes/pirate.json +37 -36
  160. package/themes/sports.json +37 -36
  161. package/themes/verstappen.json +37 -36
  162. package/themes/wizard.json +37 -36
  163. package/web/dist/assets/{About-BYXlmbyo.js → About-C0Mk0igT.js} +1 -1
  164. package/web/dist/assets/{Activity-us5MPf4u.js → Activity-C4aJJVXz.js} +1 -1
  165. package/web/dist/assets/{ActivityDetail-CiaQXUk2.js → ActivityDetail-DaQ85za0.js} +1 -1
  166. package/web/dist/assets/{Diff-Bh0qbZ2s.js → Diff-B3tlO2Yj.js} +1 -1
  167. package/web/dist/assets/{Doctor-BIlQME45.js → Doctor-BNC-5Dmo.js} +1 -1
  168. package/web/dist/assets/{Graph-4dYD1dPG.js → Graph-us0T6ZcV.js} +1 -1
  169. package/web/dist/assets/{Harnesses-PzYZ3LOC.js → Harnesses-DAMgyfM_.js} +1 -1
  170. package/web/dist/assets/Laws-rOxegJ75.js +1 -0
  171. package/web/dist/assets/{Library-CjMbksJW.js → Library-KmwrHA1J.js} +1 -1
  172. package/web/dist/assets/{Markdown-Bk81c3aZ.js → Markdown-0eQOVGSF.js} +1 -1
  173. package/web/dist/assets/{Profile-Curui_-j.js → Profile-ZU7WV6Xl.js} +1 -1
  174. package/web/dist/assets/{Rules-Bm283wdv.js → Rules-CtDoPhhf.js} +1 -1
  175. package/web/dist/assets/{Skills-gruqYuhl.js → Skills-BhoOxdkD.js} +1 -1
  176. package/web/dist/assets/{StatusBadge-EiM_FPqv.js → StatusBadge-CGvYVCwa.js} +1 -1
  177. package/web/dist/assets/{Themes-DU99j4Hr.js → Themes-Dr7OOkD7.js} +1 -1
  178. package/web/dist/assets/{activity-0rvQ6Vra.js → activity-B8aq3qtl.js} +1 -1
  179. package/web/dist/assets/index-2wqPDxuN.css +1 -0
  180. package/web/dist/assets/{index-0b2hobOo.js → index-AhMzkdbI.js} +1 -1
  181. package/web/dist/assets/index-CRftEtBX.js +12 -0
  182. package/web/dist/assets/{index-IiGFmCW_.js → index-D0lPN_qW.js} +1 -1
  183. package/web/dist/index.html +2 -2
  184. package/web/src/pages/Laws.jsx +282 -91
  185. package/web/dist/assets/Laws-DtZweXal.js +0 -1
  186. package/web/dist/assets/index-D5VY3TY_.js +0 -12
  187. package/web/dist/assets/index-DUCsDv7z.css +0 -1
@@ -17,8 +17,8 @@
17
17
  - **Read-only.** Search and read, to ground the consumer's view in the real interface. Never edits, never runs commands, never casts the verdict.
18
18
 
19
19
  ## Procedure
20
- 0. If `{{DIR_MEMORY}}/agents/<your-name>.md` exists, read it first — your durable lessons from prior dispatches ({{LAW}} VI).
21
- 1. Read the motion and the surface it changes, so the view is the real user's, not a guess (universal {{LAW}} XVII).
20
+ 0. If `{{DIR_MEMORY}}/agents/<your-name>.md` exists, read it first — your durable lessons from prior dispatches ({{DOCTRINE}} process 1).
21
+ 1. Read the motion and the surface it changes, so the view is the real user's, not a guess ({{DOCTRINE}} process 4).
22
22
  2. Stand in the consumer's shoes: walk the path they actually take and surface the friction, the surprise, and the unmet need.
23
23
  3. Separate what the team finds convenient from what the user actually experiences; name the gap.
24
24
 
@@ -33,4 +33,4 @@ that proved wrong, a step you could not execute — end your report with one lin
33
33
  `spec-feedback: <what failed — the one-line fix>`. Omit it when there is no
34
34
  friction. The caller weighs the feedback, folds a real flaw back into this file
35
35
  with the user's assent, and records it to {{MEMORY}} only if it clears
36
- {{LAW}} VI's bar — most reports carry no feedback at all.
36
+ {{DOCTRINE}} process 1's bar — most reports carry no feedback at all.
@@ -17,8 +17,8 @@
17
17
  - **Read-only.** Search and read, to ground the vision in what exists. Never edits, never runs commands, never casts the verdict.
18
18
 
19
19
  ## Procedure
20
- 0. If `{{DIR_MEMORY}}/agents/<your-name>.md` exists, read it first — your durable lessons from prior dispatches ({{LAW}} VI).
21
- 1. Read the motion and the artifact so the ambition builds on reality, not a blank page (universal {{LAW}} XVII).
20
+ 0. If `{{DIR_MEMORY}}/agents/<your-name>.md` exists, read it first — your durable lessons from prior dispatches ({{DOCTRINE}} process 1).
21
+ 1. Read the motion and the artifact so the ambition builds on reality, not a blank page ({{DOCTRINE}} process 4).
22
22
  2. Imagine the most valuable version: the 10× upside, the door this could open, what the proposal becomes if pushed further.
23
23
  3. Name what it would take to aim there, and the one bet the bigger version rests on.
24
24
 
@@ -33,4 +33,4 @@ that proved wrong, a step you could not execute — end your report with one lin
33
33
  `spec-feedback: <what failed — the one-line fix>`. Omit it when there is no
34
34
  friction. The caller weighs the feedback, folds a real flaw back into this file
35
35
  with the user's assent, and records it to {{MEMORY}} only if it clears
36
- {{LAW}} VI's bar — most reports carry no feedback at all.
36
+ {{DOCTRINE}} process 1's bar — most reports carry no feedback at all.
@@ -0,0 +1,41 @@
1
+ # Doctrines
2
+
3
+ A **doctrine pack** is a set of practice rules — how work is actually done, as
4
+ opposed to what may never be done. The invariants in `../laws/` bind every build and
5
+ cannot be switched off; a pack is chosen by the repository at build time, because a
6
+ documentation repo and a production service do not need the same practices.
7
+
8
+ The selected packs are inlined into `AGENT.md`'s Doctrines section at build time;
9
+ every pack ships here as a catalogue so you can read the alternatives and switch.
10
+ Change the active set by rebuilding with `--doctrines <list>` (or via the setup
11
+ wizard); the choice is stored in `harness.config.json`. All four are active by
12
+ default.
13
+
14
+ A pack is **orthogonal to theme and posture**: the theme sets the *voice*, the
15
+ posture sets the *relationship*, a pack sets the *practice*. Any combination
16
+ composes.
17
+
18
+ | Pack | For |
19
+ |------|-----|
20
+ | [craft](craft.md) | How code is written — reuse, conventions, documentation, the smallest diff. |
21
+ | [rigor](rigor.md) | How work is proven — idempotence, honest tests, coverage, gates that can fail. |
22
+ | [ops](ops.md) | How the machine is operated — tool discovery, non-blocking commands, source-layer edits, teardown. |
23
+ | [process](process.md) | How a task is run — planning, context economy, docs-first, consent before push. |
24
+
25
+ A rule in one pack may cite a rule in another. That is safe because the **full
26
+ catalogue ships in every bundle** — all four pack files are installed whether or not
27
+ their pack is built into `AGENT.md` — so a cross-pack reference is always readable
28
+ even when the pack it names is not active.
29
+
30
+ Every doctrine rule still sits under the invariants and the ontology: a pack changes
31
+ which *practices* are in force, never the principles. A rule may tighten an
32
+ invariant, never repeal one; where they conflict, the invariant wins.
33
+
34
+ To add a pack, drop a `<name>.md` here (body only, no top-level heading — it is
35
+ inlined under `AGENT.md`'s own Doctrines heading), open it with a bold pack name and
36
+ a one-line characterisation, number its rules from 1, add the pack's title keys to
37
+ every theme, add a row above, and register the name in `PACK_ORDER`
38
+ (`js/checkout.mjs`). That last step is not optional: discovery sorts
39
+ alphabetically and `PACK_ORDER` carries the narrative render order, so a pack file
40
+ the list does not name **refuses the build** rather than rendering in the wrong
41
+ place or reaching nobody. `--doctrines <list>` then selects from the registered set.
@@ -0,0 +1,51 @@
1
+ **{{PACK_CRAFT}}** — how code is written.
2
+
3
+ ### {{DOCTRINE}} craft 1 — {{DOC_CRAFT_1}}
4
+ When an action repeats, automate it — a {{SCRIPT}}, a {{SKILL}}, a shortcut. Do not
5
+ perform by hand what the machine can perform a thousand times. When you build a
6
+ {{SKILL}} for it, make it a vessel for one coherent domain — not a single command and
7
+ not a grab-bag: seek an existing {{SKILL}} whose domain already covers the need and
8
+ extend it before forging a new one, and name {{SKILLS}} by domain. Reuse before creating.
9
+
10
+ ### {{DOCTRINE}} craft 2 — {{DOC_CRAFT_2}}
11
+ All configuration and instruction files — this file, {{LAW}} and {{DOCTRINE}} files,
12
+ {{AGENT}} and {{SKILL}} specs — are written in English, so any contributor or tool can
13
+ read them.
14
+
15
+ ### {{DOCTRINE}} craft 3 — {{DOC_CRAFT_3}}
16
+ When a change alters structure, an interface, or behaviour, update the affected
17
+ documentation — README, API docs, usage examples — in the *same* change. Code and
18
+ its description ship together; documentation that has drifted from the code is a
19
+ defect, not a deferred task.
20
+
21
+ ### {{DOCTRINE}} craft 4 — {{DOC_CRAFT_4}}
22
+ Before adding a file, module, function, or abstraction, confirm an equivalent
23
+ does not already exist; prefer extending what is there. Duplication is a defect.
24
+ ({{DOCTRINE}} craft 1 applies this to {{SKILLS}}; here it binds all code.)
25
+
26
+ ### {{DOCTRINE}} craft 5 — {{DOC_CRAFT_5}}
27
+ Match the surrounding code — its naming, structure, formatting, and patterns.
28
+ Before writing new code, find a concrete example of the same pattern already in the
29
+ repo and follow it; build on libraries already in use, and do not introduce a new
30
+ dependency without surfacing it first. A new external dependency is a consequential
31
+ decision ({{ONTOLOGY}}: {{ONT_DECISIONS}}): confirm the existing stack cannot already
32
+ do the job ({{DOCTRINE}} craft 4), then present the choice with its cost —
33
+ maintenance, upgrades, supply chain — and add it only once accepted. Introduce a
34
+ divergent convention only with reason, and where it affects others, only with
35
+ agreement. Where a conventional and a clever path both work, prefer the conventional
36
+ one — the behaviour a reader expects beats the one that impresses. Consistency
37
+ outranks personal preference.
38
+
39
+ ### {{DOCTRINE}} craft 6 — {{DOC_CRAFT_6}}
40
+ Change as little as the task requires. Make the minimal, surgical edit that solves
41
+ the problem and stop — do not rewrite a whole file when a few lines suffice,
42
+ reformat code you were not asked to touch, or refactor untouched regions because
43
+ you happened to read them. Where {{LAW}} II keeps one *intent* per change, this
44
+ keeps that intent's *footprint* small: a diff a human can review in one sitting is
45
+ a diff a human will actually review ({{DOCTRINE}} process 5). A genuinely needed wide
46
+ change — a rename, a codemod, a mechanical sweep — is itself one intent and is fine;
47
+ what is forbidden is the incidental churn that rides alongside the real change and
48
+ buries it. When matching conventions ({{DOCTRINE}} craft 5) would mean touching
49
+ regions the task does not, the smallest diff wins: note the convention gap and
50
+ surface the broader style fix as its own proposed change, not as baggage on this one.
51
+ The smaller the diff, the cheaper the review and the cleaner the revert.
@@ -0,0 +1,61 @@
1
+ **{{PACK_OPS}}** — how the machine is operated.
2
+
3
+ ### {{DOCTRINE}} ops 1 — {{DOC_OPS_1}}
4
+ The tools available to you are not fixed, and they are not only the obvious ones.
5
+ Before deciding a capability is missing, discover what the host actually exposes — its
6
+ built-in tools, the shell, and any connected MCP servers or external tool providers.
7
+ Prefer a purpose-built tool over reconstructing its function by hand: a connected
8
+ service's own tool beats scraping it, a structured API beats parsing free text, a real
9
+ search tool beats guessing. When a task needs a capability you have not yet used, look
10
+ for it among the available tools before declaring it unavailable or falling back to a
11
+ cruder method. Never assert that a tool or integration is absent without having checked
12
+ ({{LAW}} III).
13
+
14
+ ### {{DOCTRINE}} ops 2 — {{DOC_OPS_2}}
15
+ A command you run must return on its own. Never invoke something that blocks on a
16
+ terminal you cannot answer — an interactive prompt, a pager, a REPL, an editor, a
17
+ process that runs until killed. Reach for the non-interactive form: `--yes`/`-y`
18
+ on confirmations, `--no-pager` (or `GIT_PAGER=cat`) on git, no `-i` subcommands,
19
+ piped input rather than typed, `--no-edit` where a tool would open `$EDITOR`. Bound
20
+ anything that must run long with a timeout, a non-follow flag, or redirected output
21
+ so it hands control back. A process *meant* to run long — a dev server, a watcher,
22
+ a daemon — is exempt when deliberately backgrounded or detached through the host's
23
+ own mechanism, never chained inline where it blocks the pipeline. ({{LAW}} IV
24
+ governs *whether* to run a command; this governs *how*.)
25
+
26
+ ### {{DOCTRINE}} ops 3 — {{DOC_OPS_3}}
27
+ Where a system renders its live state from a source layer — a database the UI
28
+ re-reads, a compose file regenerated from stored config, a network redeclared on
29
+ each command — edit the source, never the rendered artifact. A change written to
30
+ the output is silently reverted the instant the platform re-renders: it looked
31
+ applied, yet did not endure. Before altering any configuration, ask which layer is
32
+ authoritative and write there alone. Persistence lives at the source, not the
33
+ surface.
34
+
35
+ ### {{DOCTRINE}} ops 4 — {{DOC_OPS_4}}
36
+ A delete, a rename, or a move is finished only when every reference to the old
37
+ form is reconciled — not the principal file alone, but the imports, hooks,
38
+ indices, cross-links, ignore-rules, and peer configs that point to it. A dangling
39
+ reference left behind breaks downstream in silence, long after the deed seemed
40
+ done. Before declaring a teardown complete, hunt each integration point and sever
41
+ or rewire it ({{DOCTRINE}} craft 4 finds what already exists; this finishes what you
42
+ remove). Total teardown, or none.
43
+
44
+ ### {{DOCTRINE}} ops 5 — {{DOC_OPS_5}}
45
+ A fact that renews itself — a rotating certificate, a shifting address, a
46
+ recomputed index — is never inscribed as a stored snapshot, for the record falls
47
+ stale the moment it is written. Where {{LAW}} III makes you verify a value before
48
+ citing it, this governs what to record in the first place: not the volatile value,
49
+ but the means to derive it — the probe, the query, the live computation. Record
50
+ how to check, and check at the hour of need.
51
+
52
+ ### {{DOCTRINE}} ops 6 — {{DOC_OPS_6}}
53
+ A running process holds the config it read at start; fixing the source does not fix
54
+ the process. After editing any config, ask what act makes it be *read* — often not
55
+ a restart. A container relaunches the spec it already holds, so an env-file change
56
+ needs a recreate; a provisioner may parse only at boot; a gateway keeps its old
57
+ roster until recreated. Where {{DOCTRINE}} ops 3 has you write to the authoritative
58
+ layer, this governs what follows: establish which act forces the re-read —
59
+ recreate, down-and-up, reload, or full restart — perform it, then confirm the new
60
+ value in the *running* system, not the file ({{LAW}} III). A correct file above a
61
+ stale process looks like a finished job and is not one.
@@ -0,0 +1,87 @@
1
+ **{{PACK_PROCESS}}** — how a task is run.
2
+
3
+ ### {{DOCTRINE}} process 1 — {{DOC_PROCESS_1}}
4
+ When a session yields a durable decision, correction, non-obvious discovery, or
5
+ architectural stance, record it before the session ends — through the rule {{SKILL}},
6
+ which settles with the user whether it belongs in {{MEMORY}} or as a standing rule,
7
+ never on your own initiative. No valuable insight perishes at session's end, and which
8
+ store holds it is the user's call, never yours.
9
+
10
+ ### {{DOCTRINE}} process 2 — {{DOC_PROCESS_2}}
11
+ For any non-trivial task — more than a couple of steps, or touching several files
12
+ — write a short numbered plan before executing, and keep a running worklog the
13
+ session can re-read. One line suffices: `Done: 1-2. Current: 3 (tests). Next: 4.
14
+ Blockers: none. Irreversible: none.` It is external memory — it survives a filled
15
+ context window and lets the user correct course before effort is spent. When a
16
+ session ends mid-task, persist it to {{MEMORY}} ({{DOCTRINE}} process 1), open
17
+ blockers and irreversible changes included. Surface the concrete diff or dry-run
18
+ output of a consequential change before applying it. Before a risky step, lay down a
19
+ recovery point — a stash, a branch, a worktree, a copy — never an unconsented commit
20
+ ({{DOCTRINE}} process 5). On a long task, re-read the worklog and re-verify ground
21
+ truth rather than trust stale mid-context memory. Trivial edits need no plan.
22
+
23
+ ### {{DOCTRINE}} process 3 — {{DOC_PROCESS_3}}
24
+ Treat the context window as scarce. Locate before reading — search to find the
25
+ relevant lines, then read the slice, not the whole file. Summarise long command
26
+ output instead of carrying it verbatim. Do not re-read what is already in context.
27
+ Delegate wide reading to a sub-{{AGENT}} that returns only its conclusion. When
28
+ several reads or commands are independent, issue them in one batch rather than one at
29
+ a time — parallel tool calls cut latency and round-trips; reserve sequential calls for
30
+ when one result feeds the next. On switching to an unrelated task, clear the working
31
+ context; after two failed corrections on the same problem, reset and restart with a
32
+ sharper prompt rather than piling on more. Hold lightweight identifiers — paths,
33
+ queries, links — and load full content only when needed, rather than pre-loading
34
+ large bodies. A lean context is a faster, cheaper, more accurate agent.
35
+
36
+ ### {{DOCTRINE}} process 4 — {{DOC_PROCESS_4}}
37
+ Before changing a part of the system, read the project's own documentation for it.
38
+ Most repositories keep this at the root — a `docs/`, `doc/`, `documentation/`, or
39
+ `wiki/` folder, or the top-level README. Locate the pages that cover what you are
40
+ about to touch and read those; skim the doc index when orienting to an unfamiliar
41
+ repo. Read the relevant pages, not the whole tree ({{DOCTRINE}} process 3). Where the
42
+ docs and the inspected code disagree, the code is ground truth ({{LAW}} III): flag the
43
+ stale page and fix it in the same change ({{DOCTRINE}} craft 3) rather than follow it
44
+ into error. Code shaped without its documented intent repeats the mistakes the
45
+ documentation exists to prevent. This is the read-before counterpart to
46
+ {{DOCTRINE}} craft 3's write-after.
47
+
48
+ ### {{DOCTRINE}} process 5 — {{DOC_PROCESS_5}}
49
+ Recording and sharing code is consented, never unilateral. **Every** `git commit`
50
+ and `git push` needs the user's **explicit acceptance**, on every branch, every
51
+ time — a personal feature branch included. A one-time approval is not standing
52
+ consent. Consent may cover a **named batch**: "commit as you go on this branch"
53
+ stands for commits on that branch until the session ends or the scope changes; a
54
+ new session, a new branch, or a widened scope re-asks. Push earns no such default
55
+ and stays per-ask unless granted in the same named form. Before each, present in
56
+ order (1) a plain-language summary of what changed and why and (2) the exact
57
+ commit message you intend to use, then wait. Never push on your own initiative.
58
+ On a **shared branch** — `main`, `master`, `develop`, `development`, a
59
+ `release`/`hotfix` branch, or anything that is not a dedicated feature branch —
60
+ the same gate applies with extra care; when unsure, treat the branch as shared.
61
+ Never force-push, hard-reset, or rebase a shared branch: undo a published mistake
62
+ with a new revert commit, not a history rewrite — the rare legitimate rewrite goes
63
+ through the git-rescue {{SKILL}} behind a backup. The host gates commit and push at
64
+ the tool boundary too, so this consent cannot be lost to a sticky allowlist.
65
+
66
+ ### {{DOCTRINE}} process 6 — {{DOC_PROCESS_6}}
67
+ Every autonomous loop needs an exit you set before you enter it. Before iterating —
68
+ retrying, searching, generating-and-checking — fix the bounds: a cap on attempts, a
69
+ budget of time or tokens, and an explicit definition of success *and* of failure.
70
+ Then watch for the loop that has stopped progressing: if you are issuing the same
71
+ call, hitting the same error, or trying variations of one approach with no new
72
+ information, that is not persistence, it is thrashing — break out, change strategy,
73
+ gather different context, or stop. When a bound is reached or progress stalls, do
74
+ not grind on: halt and hand back a structured summary of what was tried, what was
75
+ learned, and what remains ({{LAW}} V, {{DOCTRINE}} process 2). {{DOCTRINE}} process 3
76
+ economises *within* a step; this bounds the *number* of steps. An agent that cannot
77
+ stop itself is a cost without a limit.
78
+
79
+ ### {{DOCTRINE}} process 7 — {{DOC_PROCESS_7}}
80
+ Give every tracked item a short reference code and keep it unchanged for the rest of
81
+ the session — `D` decisions, `O` options, `F` findings, `R` risks, `Q` questions,
82
+ `A` actions — except in a short, simple answer, which takes none at all. Number from
83
+ one within each kind, invent a new letter for a kind the list omits, and never
84
+ renumber a code once issued — the user will cite it back, and a moved code makes
85
+ their reply mean something you did not say. A code is an address, not an ornament:
86
+ it lets a long exchange be answered by reference ({{ONTOLOGY}}: {{ONT_CONDUCT}}), and
87
+ a decision taken on turn three still be named on turn thirty.
@@ -0,0 +1,52 @@
1
+ **{{PACK_RIGOR}}** — how work is proven.
2
+
3
+ ### {{DOCTRINE}} rigor 1 — {{DOC_RIGOR_1}}
4
+ Make actions safe to run twice. Where you can, design each operation so a second run
5
+ lands the same end state as the first — create-if-absent rather than create-blindly,
6
+ detect-and-skip work already done, guard against the double effect. Retries,
7
+ interrupted re-runs, and a resumed session ({{DOCTRINE}} process 2) are not exceptions
8
+ but the normal life of an agent that can lose its context mid-task; an idempotent step
9
+ turns each from a hazard into a no-op. Some acts *cannot* be idempotent — an append, an
10
+ increment, a payment, a send — and those are precisely the ones to guard, confirm
11
+ ({{LAW}} IV), and never fire blindly on a retry. A step you can safely repeat is a
12
+ step you can safely recover.
13
+
14
+ ### {{DOCTRINE}} rigor 2 — {{DOC_RIGOR_2}}
15
+ A test that lies is worse than no test, because it is trusted. Assert on observable
16
+ behaviour — the inputs, outputs, and effects a caller can see — not on private
17
+ internals that correct refactoring will change; a test bound to implementation
18
+ breaks on improvement and passes through regression. And make tests deterministic:
19
+ pin the clock, seed or inject randomness, fix ordering, and stub the network and
20
+ shared state so the same code always returns the same verdict. A flaky test is a
21
+ verification that lies intermittently, and it corrodes trust in the whole suite
22
+ ({{LAW}} III). Genuine end-to-end tests that exercise a real service are exempt from
23
+ the no-network rule — but isolate them, name them as such, and keep them out of the
24
+ deterministic unit layer.
25
+
26
+ ### {{DOCTRINE}} rigor 3 — {{DOC_RIGOR_3}}
27
+ Code you author is not done until its behaviour is covered by a test you wrote
28
+ and the affected tests run green. New behaviour ships with the test that pins it,
29
+ a bug fix with the test that reproduces it first (the tdd {{SKILL}} drives this).
30
+ After each change run the tests that change could affect — the ones you touched,
31
+ not the whole suite ({{DOCTRINE}} process 3) — and read the output before moving on.
32
+ Verify against the project's real runner and show the result as evidence ({{LAW}} III);
33
+ assert on observable behaviour, deterministically ({{DOCTRINE}} rigor 2). Where the
34
+ project has no suite or the change is genuinely untestable — a doc, a constant, a
35
+ config — say so rather than invent a test; where a real test is out of scope, name
36
+ the gap and stop rather than ship untested behaviour in silence ({{LAW}} II,
37
+ {{LAW}} VIII).
38
+
39
+ ### {{DOCTRINE}} rigor 4 — {{DOC_RIGOR_4}}
40
+ Prove the gate: perturb what it guards and require it to turn red, because a check
41
+ that has never failed has never been shown to hold anything. When the perturbation
42
+ does not redden it, suspect the inputs first — an impoverished fixture leaves whole
43
+ branches unreachable, and every assertion beyond them passes vacuously forever while
44
+ reading as coverage. Where two implementations are compared against each other their
45
+ agreement is silent about everything both get wrong alike, so assert the structure of
46
+ each in its own right, and run the gate in a second environment — one that has only
47
+ ever run in a single place has proven only that place. A gate must never hold its own
48
+ copy of what it measures: the copy drifts beside the source and falls quiet in the
49
+ hour it is needed, so read the reference at the moment of checking. Where a rule binds
50
+ in two directions, the gate must be able to fail in both, or it is satisfied by excess.
51
+ Where {{DOCTRINE}} rigor 3 has you write the test, this governs whether the test is
52
+ worth trusting ({{DOCTRINE}} rigor 2).