opencode-thrum-pro 0.1.6 → 0.1.8

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 (74) hide show
  1. package/assets/commands/thrum-compact-extended.md +36 -21
  2. package/assets/commands/thrum-compact.md +19 -18
  3. package/assets/commands/thrum-restart-extended.md +1 -5
  4. package/assets/commands/thrum-restart.md +2 -2
  5. package/assets/commands/thrum-sleep-extended.md +1 -5
  6. package/assets/commands/thrum-sleep.md +1 -5
  7. package/assets/commands/thrum-update-project.md +1 -1
  8. package/assets/skills/brainstorm-queue-aware/SKILL.md +1 -1
  9. package/assets/skills/brainstorm-steward/SKILL.md +3 -3
  10. package/assets/skills/choosing-subagent-models/SKILL.md +183 -74
  11. package/assets/skills/closing-findings-while-warm/SKILL.md +1 -2
  12. package/assets/skills/configure-roles/SKILL.md +2 -2
  13. package/assets/skills/coordinator-assessing-agent-completion/SKILL.md +11 -10
  14. package/assets/skills/coordinator-branch-split-on-block/SKILL.md +1 -2
  15. package/assets/skills/coordinator-context-monitoring/SKILL.md +11 -12
  16. package/assets/skills/coordinator-deploying-a-node/SKILL.md +3 -1
  17. package/assets/skills/coordinator-dispatching-work/SKILL.md +5 -4
  18. package/assets/skills/coordinator-hotpath-merge-gate/SKILL.md +9 -7
  19. package/assets/skills/coordinator-interacting-with-the-owner/SKILL.md +1 -2
  20. package/assets/skills/coordinator-maintaining-memory/SKILL.md +1 -1
  21. package/assets/skills/coordinator-managing-state-and-lifecycle/SKILL.md +10 -3
  22. package/assets/skills/coordinator-merging-code/SKILL.md +21 -14
  23. package/assets/skills/coordinator-philosophy-merge-gate/SKILL.md +4 -5
  24. package/assets/skills/coordinator-plan-reconcile-gate/SKILL.md +1 -2
  25. package/assets/skills/coordinator-rolling-out-to-nodes/SKILL.md +1 -0
  26. package/assets/skills/coordinator-running-brainstorm-cycles/SKILL.md +4 -5
  27. package/assets/skills/coordinator-running-review-cycles/SKILL.md +1 -2
  28. package/assets/{commands/thrum-_deviations-protocol.md → skills/deviations-protocol/SKILL.md} +6 -12
  29. package/assets/skills/efficient-multi-agent-research/SKILL.md +2 -2
  30. package/assets/skills/generator-idempotency-protocol/SKILL.md +9 -0
  31. package/assets/skills/implementer-maintaining-memory/SKILL.md +3 -4
  32. package/assets/skills/implementer-orchestrating-execution/SKILL.md +1 -2
  33. package/assets/skills/implementer-receiving-dispatch/SKILL.md +15 -17
  34. package/assets/skills/implementer-receiving-review-feedback/SKILL.md +3 -4
  35. package/assets/skills/implementer-status-and-handoff/SKILL.md +1 -14
  36. package/assets/skills/implementer-tdd-and-quality/SKILL.md +2 -2
  37. package/assets/skills/memory-audit-recover/SKILL.md +7 -5
  38. package/assets/skills/memory-curate/SKILL.md +3 -3
  39. package/assets/skills/memory-maintenance/SKILL.md +2 -0
  40. package/assets/skills/memory-write-discipline/SKILL.md +1 -1
  41. package/assets/skills/orchestrate/SKILL.md +34 -5
  42. package/assets/skills/persistent-watcher-archetype/SKILL.md +2 -2
  43. package/assets/skills/persistent-watcher-archetype/resources/jev_watcher_filter.py +5 -5
  44. package/assets/skills/persistent-watcher-archetype/resources/roster-watch.sh +5 -5
  45. package/assets/skills/persistent-watcher-archetype/resources/roster-watch_test.sh +2 -2
  46. package/assets/skills/persistent-watcher-archetype/resources/thrum-capture-fallback.sh +1 -1
  47. package/assets/skills/persistent-watcher-archetype/resources/thrum-watch-pane-capture.sh +3 -3
  48. package/assets/skills/prime-agent/SKILL.md +1 -1
  49. package/assets/skills/project-hotpath-gate/SKILL.md +1 -2
  50. package/assets/skills/project-philosophy/SKILL.md +2 -3
  51. package/assets/skills/project-rules-protocol/SKILL.md +12 -0
  52. package/assets/skills/project-setup/SKILL.md +9 -10
  53. package/assets/skills/project-setup/resources/implementation-agent.md +1 -2
  54. package/assets/skills/researcher-answering-queries/SKILL.md +1 -2
  55. package/assets/skills/researcher-investigating/SKILL.md +6 -8
  56. package/assets/skills/researcher-maintaining-memory/SKILL.md +3 -1
  57. package/assets/{commands/thrum-_snapshot-protocol.md → skills/snapshot-protocol/SKILL.md} +10 -15
  58. package/assets/{commands/thrum-_stamp-protocol.md → skills/stamp-protocol/SKILL.md} +5 -6
  59. package/assets/skills/thrum/SKILL.md +9 -4
  60. package/assets/skills/thrum/resources/CLI_REFERENCE.md +32 -27
  61. package/assets/skills/thrum-memory/SKILL.md +1 -1
  62. package/assets/skills/using-monitors/SKILL.md +198 -0
  63. package/assets/skills/using-the-queue/SKILL.md +2 -3
  64. package/assets/skills/using-thrum-state/SKILL.md +3 -3
  65. package/assets/skills/verify-against-plan/SKILL.md +2 -2
  66. package/dist/hooks/block-sync-cd.js +1 -1
  67. package/dist/hooks/block-sync-cd.test.js +1 -1
  68. package/dist/installer-assets.test.d.ts +1 -0
  69. package/dist/installer-assets.test.js +41 -0
  70. package/package.json +1 -1
  71. package/assets/commands/thrum-_compact-runtime-commands.md +0 -61
  72. package/assets/commands/thrum-_generator-idempotency-protocol.md +0 -15
  73. package/assets/commands/thrum-_project-rules-protocol.md +0 -18
  74. package/assets/commands/thrum-_verify-before-write-protocol.md +0 -27
@@ -90,7 +90,7 @@ the one resource it cannot replace and leaves no durable verdict artifact.
90
90
  explicitly in the merge record so the gap is visible rather than invisible.
91
91
 
92
92
  **Verdicts are artifacts:** the runner saves them to
93
- `dev-docs/gate-reports/<ISO-week>/<date>/<gate-slug>/` and commits them BEFORE
93
+ `<gate-reports-dir>/<ISO-week>/<date>/<gate-slug>/` (the project's gate-reports directory) and commits them BEFORE
94
94
  removing any worktree. A verdict that exists only in a message cannot be audited
95
95
  later.
96
96
 
@@ -99,7 +99,7 @@ later.
99
99
  Mandatory checklist handed to the GATE RUNNER (and to any sub-agent it spawns in
100
100
  turn) at dispatch time. Each
101
101
  rule below currently lives only as prose warnings scattered through
102
- `dev-docs/hotpath-gate-efficacy.md` and gets re-learned per session — hand this
102
+ the hotpath-gate efficacy log and gets re-learned per session — hand this
103
103
  list to the sub-agent verbatim at dispatch time instead of relying on it
104
104
  rediscovering these the hard way:
105
105
 
@@ -129,6 +129,8 @@ rediscovering these the hard way:
129
129
  `go run ./cmd/testgate classify-timeout --log <file> --shard-config <file>
130
130
  --shard <name>` (fails closed — only BOUND-TIMEOUT exits 0; HANG and
131
131
  UNCLASSIFIED both exit nonzero) before reporting it as a regression.
132
+ If a gate's own command line invokes the bare package path for RPC, that is a gate defect, not a passing lane.
133
+ A HANG or UNCLASSIFIED verdict from `classify-timeout` requires human review.
132
134
  8. Build+test the MERGED-tree result as a SEPARATE condition — neither gate
133
135
  currently runs a build of the actual post-merge tree; a clean pre-merge
134
136
  build/test does not prove the merged result compiles or passes.
@@ -159,7 +161,7 @@ rediscovering these the hard way:
159
161
  abandoned worktree pins its HEAD commit against `gc` and adds a
160
162
  `.git/worktrees` admin entry, so the object store grows monotonically.
161
163
  Before removing:
162
- (a) `git -C <wt> status --porcelain` — if NON-EMPTY, **STOP and report it
164
+ (a) `git -C <wt> status --porcelain --untracked-files=all --ignored -- .thrum` — if NON-EMPTY, **STOP and report it
163
165
  instead of removing.** Uncommitted work in a throwaway worktree exists
164
166
  NOWHERE else; this is the category that actually loses work.
165
167
  (b) `git branch -a --contains $(git -C <wt> rev-parse HEAD)` — if EMPTY,
@@ -568,7 +570,7 @@ diff — don't bounce reflexively.
568
570
 
569
571
  ## Efficacy tracking (v1 acceptance requirement)
570
572
 
571
- After every gate run, record the outcome in `dev-docs/hotpath-gate-efficacy.md`
573
+ After every gate run, record the outcome in the hotpath-gate efficacy log
572
574
  (created lazily on first run). This is a durable, committed, grep-queryable log
573
575
  that measures v1's real-world efficacy so we can iterate to v2 with data.
574
576
 
@@ -607,7 +609,7 @@ rows.
607
609
  | `CLEAN-WITH-GATE-FIXES` | Gate found only mechanical bookkeeping gaps, fixed them itself as a GATE-AUTHORED commit, re-ran only the affected checks, merge proceeded |
608
610
 
609
611
  **Retrospective reclassification:** When triaging a new wedge or incident, grep
610
- `dev-docs/hotpath-gate-efficacy.md` for the merged branch/date. If the gate
612
+ the hotpath-gate efficacy log for the merged branch/date. If the gate
611
613
  previously logged `CLEAN` for that branch, append a follow-up line referencing
612
614
  the original entry:
613
615
  `- YYYY-MM-DD | branch=<branch> | RECLASSIFIED: CLEAN->SLIPPED | notes=<what the gate missed + which lens should have caught it>`.
@@ -623,13 +625,13 @@ gaps and lens improvements for the next version.
623
625
  patterns, reference functions, incident prose)
624
626
  - `project-hotpath-gate` — the companion builder skill that generates/reconciles
625
627
  the config (analog of `project-philosophy`)
626
- - `dev-docs/brainstorms/hotpath-merge-gate/` — the locked brainstorm (evidence,
628
+ - the hotpath-merge-gate brainstorm record — the locked brainstorm (evidence,
627
629
  gap analysis, lens details, decisions)
628
630
  - `coordinator-philosophy-merge-gate` — the companion general-structural gate
629
631
  (runs in parallel)
630
632
  - `.thrum/philosophy.md` — canonical source for general anti-patterns (cross-
631
633
  referenced by Lenses 1–2, 6–7 where they overlap)
632
- - `dev-docs/hotpath-gate-efficacy.md` — running efficacy log (created lazily on
634
+ - the hotpath-gate efficacy log — running efficacy log (created lazily on
633
635
  first gate run, appended after each run)
634
636
 
635
637
  <!-- THRUM-GATE: stage=skill next=review -->
@@ -162,8 +162,7 @@ bd update thrum-abc --notes "$notes"
162
162
 
163
163
  ## Project-specific rules (already loaded)
164
164
 
165
- Read the shared partial at the absolute path:
166
- `claude-plugin/commands/_project-rules-protocol.md`
165
+ Load the /thrum:project-rules-protocol skill and follow it.
167
166
 
168
167
  If you accumulate a new rule mid-session (the user corrects you), capture it
169
168
  via the `coordinator-maintaining-memory` skill — it references the
@@ -40,7 +40,7 @@ thrum memory create --kind agent_rule --scope role \
40
40
  ```
41
41
 
42
42
  `--short`/`--full` carry real prose — compose via heredoc or file, never
43
- double-quoted inline; see your role preamble's 🔴 PROSE INTO A COMMAND rule.
43
+ double-quoted inline; see the heredoc-or-file rule in your role preamble.
44
44
 
45
45
  Body shape uniform across all role-rule writes — see `memory-write-discipline`.
46
46
 
@@ -130,9 +130,17 @@ run the two-command destroy sequence **in this order**:
130
130
 
131
131
  ```bash
132
132
  thrum tmux kill <session> # kills tmux + runtime first
133
- thrum worktree teardown <name> # then removes worktree + identity
133
+ thrum worktree teardown <name> # then retires the agent + removes the worktree (salvage first)
134
+ thrum agent delete <agent> # SEPARATE reap, after the worktree is gone
134
135
  ```
135
136
 
137
+ `worktree teardown` does NOT delete the agent: it is preparation for deleting
138
+ one. The row stays `retired` (hidden from default `agent list` / `team` /
139
+ overview / UI; visible with `--include-inactive` / `--phase retired`) until
140
+ `thrum agent delete` or the sweeper reaps it. `agent delete` refuses an agent
141
+ whose linked worktree still exists or whose process (pid/tmux) is live, and
142
+ refuses coordinators; correct order is teardown (with salvage) THEN delete.
143
+
136
144
  Sanity-check: after teardown, `tmux list-sessions` should NOT show the agent's
137
145
  session. If it does, the runtime was never killed and step 1 was skipped.
138
146
 
@@ -184,8 +192,7 @@ orchestrators to for the implementers **they** launched.
184
192
 
185
193
  ## Project-specific rules (already loaded)
186
194
 
187
- Read the shared partial at the absolute path:
188
- `claude-plugin/commands/_project-rules-protocol.md`
195
+ Load the /thrum:project-rules-protocol skill and follow it.
189
196
 
190
197
  If you accumulate a new rule mid-session (the user corrects you), capture it via
191
198
  the `coordinator-maintaining-memory` skill — it references the
@@ -169,13 +169,18 @@ The §3 lens gates (hotpath + philosophy) are the judgement half. The per-merge
169
169
  executed half is **scoped to the change**:
170
170
 
171
171
  - Build the merged tree (`go build ./...`).
172
- - Full-*package* `-race` on the **changed packages only** — full-package, never
173
- targeted `-run` (a targeted run misses cross-test races), but only what the diff
174
- touches.
172
+ - 🔴 **RULING:** the full sharded race suite —
173
+ `scripts/test-run.sh race all` (~15-20 min) — on the **merged tree**, every
174
+ Pass-3 verdict. This replaces the prior "changed packages only (+ rpc shard
175
+ sweep)" race scoping below the ruling; a targeted `-run` is still never
176
+ acceptable (a targeted run misses cross-test races). Never on primary (the
177
+ shared fleet build box) — it is CPU-heavy; run it on the gate box.
175
178
  - The fast structural checks on the merged tree — `gate-ban-check`,
176
179
  `gate-omitempty-check`, `gate-lockspan-check`, `gate-marker-diff`,
177
- `gate-stamp-protocol-check` (seconds each; they catch banned flags, `omitempty`
178
- drift, lock-span, marker and stamp drift regardless of the change).
180
+ `gate-stamp-protocol-check`, `gate-plugin-bundle-leaks` (seconds each; they
181
+ catch banned flags, `omitempty` drift, lock-span, marker and stamp drift
182
+ regardless of the change; `gate-plugin-bundle-leaks` self-skips when no plugin
183
+ path changed).
179
184
  - The `merge-base --is-ancestor` fast-forward check (§6).
180
185
  - Any `*_tripwire_test.go` the change touches must stay green or the diff must
181
186
  state why its premise changed; a tripwire edited to accommodate the change is a
@@ -211,9 +216,10 @@ executed half is **scoped to the change**:
211
216
  MERGED tree every merge: `go test ./internal/testgate/... -run
212
217
  TestNoMainStateDBWriteOwnerBypasses`.
213
218
 
214
- **Establish branch-attributable vs pre-existing from the changed-package `-race`
215
- result** — a regression adds failures the same packages did not have before. Do
216
- not classify a scoped change by replaying the whole known-red suite.
219
+ **Establish branch-attributable vs pre-existing from the full-race `-race`
220
+ result** — a regression adds failures the packages touched by the diff did not
221
+ have before. Do not classify a scoped change by replaying the whole known-red
222
+ suite.
217
223
 
218
224
  🔴 **Do NOT run the full all-lanes `make gate` for a merge.** The full suite —
219
225
  every package across lanes A/B/C/D, the integration lane, `gate-ci-mutation-check`,
@@ -221,7 +227,9 @@ the UI lane, the full tripwire/boxstate reconciliation — is the **periodic
221
227
  full-gate cadence**, an agent run on the dedicated isolation box, and it is its own
222
228
  skill: **`coordinator-full-gate`**. A merge never triggers it, and its merge-base
223
229
  replay is not a per-merge step. Running it per merge is ~2h that on a common-mode-
224
- red trunk fails on the baseline every time.
230
+ red trunk fails on the baseline every time. The RULING above
231
+ widens only the **race lane** to full-sharded per merge — it does not pull the
232
+ other lanes (integration, UI, mutation-check) into the per-merge path.
225
233
 
226
234
  🔴 **Never kill a test run to stop a collision.** Killing skips Go's cleanup, which
227
235
  leaks fixed-name tmux fixtures onto the shared socket and breaks that suite box-
@@ -280,12 +288,12 @@ agreeing (`rev-parse origin/<branch>` and `ls-remote`). **Assert the branch TIP*
280
288
  ## 7. AFTER THE MERGE — four things, none optional
281
289
 
282
290
  1. **The verdict artifact.** The runner saves verdicts to
283
- `dev-docs/gate-reports/<ISO-week>/<date>/<gate-slug>/` and **commits them
291
+ `<gate-reports-dir>/<ISO-week>/<date>/<gate-slug>/` (the project's gate-reports directory) and **commits them
284
292
  BEFORE removing any worktree.** Save → commit → then destroy. A verdict that
285
293
  exists only in a message cannot be audited later. The artifact must be able to
286
294
  carry a `CLEAN-WITH-GATE-FIXES` outcome, and when one applies it cites the
287
295
  `GATE-AUTHORED` commit SHA.
288
- 2. **The efficacy row**, in `dev-docs/hotpath-gate-efficacy.md` — required for
296
+ 2. **The efficacy row**, in the hotpath-gate efficacy log — required for
289
297
  **every** trigger-dir merge, including `SKIPPED_WITH_EVIDENCE` rows and
290
298
  orchestrator-run merges. The log measures gate **coverage**, not just outcomes.
291
299
  Record `FALSE_POSITIVE=0` explicitly on a clean run so the zero is a
@@ -356,13 +364,12 @@ hides staleness.
356
364
  - `coordinator-hotpath-merge-gate` · `coordinator-philosophy-merge-gate` — the lenses
357
365
  - `coordinator-running-review-cycles` — the dual-review cycle feeding §1
358
366
  - `coordinator-branch-split-on-block` — when a gate blocks one concern of a bundled branch
359
- - `dev-docs/gate-reports/README.md` — the artifact contract
367
+ - the gate-reports README — the artifact contract
360
368
  - `.thrum/hotpath-gate.json` · `.thrum/philosophy.md` — the configs; read these, not prose
361
369
 
362
370
  ## Project-specific rules (already loaded)
363
371
 
364
- Read the shared partial at the absolute path:
365
- `claude-plugin/commands/_project-rules-protocol.md`
372
+ Load the /thrum:project-rules-protocol skill and follow it.
366
373
 
367
374
  If you accumulate a new rule mid-session (the user corrects you), capture it via
368
375
  the `coordinator-maintaining-memory` skill — it references the
@@ -63,7 +63,7 @@ the one resource it cannot replace and leaves no durable verdict artifact.
63
63
  explicitly in the merge record so the gap is visible rather than invisible.
64
64
 
65
65
  **Verdicts are artifacts:** the runner saves them to
66
- `dev-docs/gate-reports/<ISO-week>/<date>/<gate-slug>/` and commits them BEFORE
66
+ `<gate-reports-dir>/<ISO-week>/<date>/<gate-slug>/` (the project's gate-reports directory) and commits them BEFORE
67
67
  removing any worktree. A verdict that exists only in a message cannot be audited
68
68
  later.
69
69
 
@@ -204,7 +204,7 @@ detection is the 10a/10b/10d probe set, not a single grep.
204
204
  ## Lens 10 — Conflated multi-responsibility service (Anti-Pattern #10)
205
205
 
206
206
  This lens uses three sub-procedures from the single-responsibility standing rule
207
- (`dev-docs/decisions/2026-07-09-single-responsibility-standing-rule.md`).
207
+ (the project's single-responsibility decision record).
208
208
 
209
209
  ### 10a — Structural backstop (grep before you trust prose review)
210
210
 
@@ -453,14 +453,13 @@ diff — don't bounce reflexively.
453
453
 
454
454
  - `.thrum/philosophy.md` — canonical source for all anti-patterns and red flags
455
455
  checked by this gate
456
- - `dev-docs/decisions/2026-07-09-single-responsibility-standing-rule.md` — full
456
+ - the single-responsibility decision record — full
457
457
  standing rule with the three-class scope model, enforcement architecture
458
458
  (3a/3b/3c/3d), and worked examples of previously-traced conflated services
459
459
 
460
460
  ## Project-specific rules (already loaded)
461
461
 
462
- Read the shared partial at the absolute path:
463
- `claude-plugin/commands/_project-rules-protocol.md`
462
+ Load the /thrum:project-rules-protocol skill and follow it.
464
463
 
465
464
  If you accumulate a new rule mid-session (the user corrects you), capture it via
466
465
  the `coordinator-maintaining-memory` skill — it references the
@@ -189,8 +189,7 @@ unambiguously so an implementer doesn't re-litigate them.
189
189
 
190
190
  ## Project-specific rules (already loaded)
191
191
 
192
- Read the shared partial at the absolute path:
193
- `claude-plugin/commands/_project-rules-protocol.md`
192
+ Load the /thrum:project-rules-protocol skill and follow it.
194
193
 
195
194
  If you accumulate a new rule mid-session about multi-plan reconciliation,
196
195
  capture it via the `coordinator-maintaining-memory` skill — it references the
@@ -90,3 +90,4 @@ The node's local runbook is `coordinator-deploying-a-node` — reference that sk
90
90
  - If `fleet.deployment.thrum.products` exists (vestigial), STOP — products live only at `fleet.deployment.products`.
91
91
  - If a node reports success by exit code alone without observed-effect verification, treat as not-verified.
92
92
  - Never wrap a service restart in a blind timeout on the node (see node skill `service.never_timeout` and `migration.signal_rules`).
93
+ - 🔴 A **macOS** node (including the build host / primary) restarted with the plain `service.restart_command` instead of `service.mac_restart_command` (Thrum: `scripts/mac-daemon-restart-via-cron.sh`). The daemon loses its Local Network permission and its LAN peers go dark while it looks healthy. Put the mac command in every macOS node's dispatch, and use it yourself when you roll the build host last.
@@ -113,7 +113,7 @@ forwarding.
113
113
 
114
114
  5. **Authored-against stamp (required, top of every artifact):** Before writing
115
115
  a brainstorm.md or plan.md, derive and emit the stamp per
116
- `claude-plugin/commands/_stamp-protocol.md` § "Stamp format" — the canonical
116
+ the /thrum:stamp-protocol skill § "Stamp format" — the canonical
117
117
  format, derivation commands, and never-type rule.
118
118
 
119
119
  ### Soft pre-flight greps (the SOFT enforcement tier)
@@ -477,7 +477,7 @@ contract-drift and quality issues a single author would miss.
477
477
 
478
478
  1. Researcher writes plan v1 directly.
479
479
  2. Researcher authors the `## Deviations from Source` block per
480
- `claude-plugin/commands/_deviations-protocol.md`, diffing plan v1 against
480
+ the /thrum:deviations-protocol skill, diffing plan v1 against
481
481
  the brainstorm + design spec — BEFORE dual-review, so
482
482
  `verify-against-source` validates it as part of conformance. Required even
483
483
  when empty ("No deviations from source.").
@@ -504,7 +504,7 @@ contract-drift and quality issues a single author would miss.
504
504
  coordinator instead of being folded inline.
505
505
  6. Researcher repeats only if cycle-1 introduces new design surface (rare for
506
506
  bounded mechanical plans); otherwise v2 LOCKED. Before stamping, compute
507
- `plan_obj`/`src_lock` per `_stamp-protocol.md` § "Review-object binding"
507
+ `plan_obj`/`src_lock` per `stamp-protocol.md` § "Review-object binding"
508
508
  (strip-then-hash the plan against itself for `plan_obj`; plain-hash the
509
509
  LOCKED source for `src_lock`), then stamp
510
510
  `<!-- THRUM-REVIEW: stage=plan verdict=Ready:Yes cycle=<N> date=<YYYY-MM-DD> verify=Ready:Yes plan_obj=<blob> src_lock=<blob> -->`.
@@ -636,8 +636,7 @@ don't rebind the agent name to a different topic in place.
636
636
 
637
637
  ## Project-specific rules (already loaded)
638
638
 
639
- Read the shared partial at the absolute path:
640
- `claude-plugin/commands/_project-rules-protocol.md`
639
+ Load the /thrum:project-rules-protocol skill and follow it.
641
640
 
642
641
  If you accumulate a new rule mid-session about brainstorm orchestration, capture
643
642
  it via the `coordinator-maintaining-memory` skill — it references the
@@ -156,8 +156,7 @@ AFTER they report DONE. They target different artifacts and both are needed.
156
156
 
157
157
  ## Project-specific rules (already loaded)
158
158
 
159
- Read the shared partial at the absolute path:
160
- `claude-plugin/commands/_project-rules-protocol.md`
159
+ Load the /thrum:project-rules-protocol skill and follow it.
161
160
 
162
161
  If you accumulate a new rule mid-session (the user corrects you), capture it via
163
162
  the `coordinator-maintaining-memory` skill — it references the
@@ -1,19 +1,13 @@
1
1
  ---
2
- description:
3
- Shared Deviations-from-Source protocol — canonical block format, the
4
- required-even-when-empty rule, and derivation discipline. Not
5
- user-invocable directly.
2
+ name: deviations-protocol
3
+ description: "Use when authoring a plan or implementation prompt - Deviations-from-Source block format, required even when empty."
6
4
  ---
7
5
 
8
- # Deviations from Source Protocol (shared partial)
9
6
 
7
+ # Deviations from Source Protocol
10
8
  This file is the canonical source-of-truth for the "Deviations from Source"
11
- block emitted by planning-loop artifacts (plans, implementation prompts). Do
12
- NOT invoke this file directly; it has no terminal action.
13
-
14
- (To find what currently points here: `grep -rn "_deviations-protocol.md"
15
- claude-plugin/` — a hand-listed consumer roster in this file would rot the
16
- moment a new emitter or reader is added, so none is kept here.)
9
+ block emitted by planning-loop artifacts (plans, implementation prompts).
10
+ Invoke this skill to author the block, even when empty.
17
11
 
18
12
  ## Purpose
19
13
 
@@ -33,7 +27,7 @@ FAILS the gate, whether or not it actually dropped anything.
33
27
  ## Format (emitted artifact — verbatim)
34
28
 
35
29
  Every plan and implementation prompt carries this heading, placed immediately
36
- after its Authored-against stamp block (see `_stamp-protocol.md`):
30
+ after its Authored-against stamp block (see `stamp-protocol.md`):
37
31
 
38
32
  ```
39
33
  ## Deviations from Source
@@ -59,7 +59,7 @@ read-only scoping) are in "Core Pattern" below.
59
59
  **Every prompt MUST scope the read-only restriction around its own output
60
60
  file, in the same breath:** `READ-ONLY EVERYWHERE EXCEPT YOUR OUTPUT FILE —
61
61
  do not modify source, tests, config, git state, or the issue tracker; you
62
- MUST write exactly dev-docs/<topic>/findings_N.md, and that write is
62
+ MUST write exactly <topic-dir>/findings_N.md, and that write is
63
63
  expected and authorized.` Omitting the exception is the most common cause of
64
64
  a fan-out that returns nothing — see Common Mistakes.
65
65
 
@@ -134,7 +134,7 @@ Prefer `cat >> <path> <<'EOF'` to append on later rounds.
134
134
  ```text
135
135
  READ-ONLY EVERYWHERE EXCEPT YOUR OUTPUT FILE.
136
136
  Do not modify source, tests, config, git state, or the issue tracker.
137
- You MUST write your findings to exactly: dev-docs/<topic>/findings_N.md
137
+ You MUST write your findings to exactly: <topic-dir>/findings_N.md
138
138
  Write is fine for creating it. To UPDATE it on a later round, Read it first or
139
139
  append with a heredoc (cat >> <path> <<'EOF' ... EOF) — Write refuses to
140
140
  overwrite a file it has not Read. That single write is expected and authorized.
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: generator-idempotency-protocol
3
+ description: "Use when generating config or docs from templates - idempotency invariant for generator skills."
4
+ ---
5
+
6
+
7
+ # Generator Idempotency Protocol
8
+ The modes are idempotent — running the skill repeatedly on a stable project
9
+ should produce no file changes after the first run.
@@ -40,7 +40,7 @@ thrum memory create --kind agent_rule --scope role \
40
40
  ```
41
41
 
42
42
  `--short`/`--full` carry real prose — compose via heredoc or file, never
43
- double-quoted inline; see your role preamble's 🔴 PROSE INTO A COMMAND rule.
43
+ double-quoted inline; see the heredoc-or-file rule in your role preamble.
44
44
 
45
45
  Body shape is uniform across all role-rule writes — see
46
46
  `memory-write-discipline`. The `Why:` line is load-bearing: future-you needs the
@@ -48,9 +48,8 @@ reason to judge edge cases the rule doesn't literally cover.
48
48
 
49
49
  ## Implementer does NOT write
50
50
 
51
- - **Refactoring opportunities discovered mid-task** → file under the project's
52
- refactoring epic, e.g. `<refactor-epic-id>`, NOT memory. Memory is for AGENT
53
- BEHAVIOR rules; bd tracks code work.
51
+ - **Refactoring opportunities discovered mid-task** → report them to the
52
+ coordinator, NOT memory and not bd. Memory is for AGENT BEHAVIOR rules.
54
53
  - **Research findings about the codebase** → ping the researcher; they own
55
54
  `kind: research_note` writes.
56
55
  - **Per-task notes / scratch state** → use the conversation context or task
@@ -114,8 +114,7 @@ prefix, blinding the evaluation harness.
114
114
 
115
115
  ## Project-specific rules (already loaded)
116
116
 
117
- Read the shared partial at the absolute path:
118
- `claude-plugin/commands/_project-rules-protocol.md`
117
+ Load the /thrum:project-rules-protocol skill and follow it.
119
118
 
120
119
  Capture new rules mid-session via the `implementer-maintaining-memory` skill —
121
120
  it references the `memory-write-discipline` common for the canonical
@@ -38,7 +38,7 @@ config loading, string sanitization, validation), run a targeted grep.
38
38
  something similar exists, use it. If it needs extension, extend it. Only create
39
39
  a new function when nothing exists.
40
40
 
41
- ## Don't refactor for free — log opportunities, don't implement them
41
+ ## Don't refactor for free — report opportunities, don't implement them
42
42
 
43
43
  **Why:** A bug fix doesn't need surrounding cleanup. A one-shot operation
44
44
  doesn't need a helper. Inlining "improvements" into a scoped task expands the
@@ -46,26 +46,25 @@ diff, complicates review, and risks introducing bugs unrelated to the work.
46
46
  Three similar lines is better than a premature abstraction.
47
47
 
48
48
  **How to apply:** When you spot duplicated patterns, hardcoded values that
49
- should be shared, or missed abstractions during implementation, log them to the
50
- project's refactor backlog (a beads epic, e.g. `<refactor-epic-id>`):
49
+ should be shared, or missed abstractions during implementation, report them to
50
+ the coordinator; do not file a bd issue yourself.
51
51
 
52
- `--description` is multi-line prose — never double-quoted inline. On
53
- `scripts/bd-shared`, `--stdin`/`--body-file` are refused (remote-path
54
- resolution + silent-empty-body hazards), so write it to a scratch file and
55
- pass `-d "$(cat <file>)"`; see your role preamble's 🔴 PROSE INTO A COMMAND
56
- rule.
52
+ The report body is multi-line prose — never double-quoted inline; see the
53
+ heredoc-or-file rule in your role preamble.
57
54
 
58
55
  ```bash
59
- cat > /tmp/refactor-task-desc.md <<'EOF'
60
- **Discovered during:** <task-id>
61
- **Files:** <paths>
62
- **Opportunity:** <what could be improved>
63
- **Effort:** small/medium/large
56
+ thrum send --to @<coordinator> --stdin <<'EOF'
57
+ Refactoring opportunity (discovered during <task-id>)
58
+ Files: <paths>
59
+ Opportunity: <what could be improved>
60
+ Effort: small/medium/large
64
61
  EOF
65
- bd create --title="Refactor: <short description>" --type=task \
66
- --parent=<refactor-epic-id> --priority=3 -d "$(cat /tmp/refactor-task-desc.md)"
67
62
  ```
68
63
 
64
+ If the coordinator asks you to file the bead, write the description to a scratch
65
+ file and pass `--body-file <file>` to `scripts/bd-shared` (and
66
+ `comments add <id> -f <file>` for comments).
67
+
69
68
  Then continue with the assigned work. Do not implement the refactoring.
70
69
 
71
70
  ## Flag scope deviations immediately — not in the final report
@@ -96,8 +95,7 @@ related files.
96
95
 
97
96
  ## Project-specific rules (already loaded)
98
97
 
99
- Read the shared partial at the absolute path:
100
- `claude-plugin/commands/_project-rules-protocol.md`
98
+ Load the /thrum:project-rules-protocol skill and follow it.
101
99
 
102
100
  If you accumulate a new rule mid-session (the user corrects you), capture it via
103
101
  the `implementer-maintaining-memory` skill — it references the
@@ -71,8 +71,8 @@ trade-off explicitly:
71
71
  - Is the fix a few lines? Default to fix-now
72
72
  - Does verification require running the same tests as the main fix? Default to
73
73
  fix-now
74
- - Is the fix a meaningful refactor or design change? Defer is legitimate; file
75
- the bd issue and link it in the commit message
74
+ - Is the fix a meaningful refactor or design change? Defer is legitimate; report
75
+ it to the coordinator (not a bd issue) and cite the report in the commit message
76
76
 
77
77
  Don't reach for "deferred" as a shortcut to ship faster.
78
78
 
@@ -117,8 +117,7 @@ list, file them as bd issues — don't slip them into the fix commit.
117
117
 
118
118
  ## Project-specific rules (already loaded)
119
119
 
120
- Read the shared partial at the absolute path:
121
- `claude-plugin/commands/_project-rules-protocol.md`
120
+ Load the /thrum:project-rules-protocol skill and follow it.
122
121
 
123
122
  If you accumulate a new rule mid-session (the user corrects you), capture it via
124
123
  the `implementer-maintaining-memory` skill — it references the
@@ -107,22 +107,9 @@ make test PASS (race), make lint PASS.
107
107
 
108
108
  For first-pass DONE (not review-fix), cite the closing SHA and the test result.
109
109
 
110
- ## Close beads tasks with `--suggest-next` when relevant
111
-
112
- **Why:** `bd close <id>` works fine, but `bd close <id> --suggest-next` prints
113
- newly-unblocked downstream issues immediately. If you're in the middle of an
114
- epic, the next task is often the most useful next move; the flag saves a
115
- `bd ready` round-trip.
116
-
117
- **How to apply:** When closing a task that has dependents, use
118
- `bd close <id> --suggest-next`. For the last task in an epic where you're
119
- stopping at a review gate, plain `bd close` is fine — you're not picking up the
120
- next task anyway.
121
-
122
110
  ## Project-specific rules (already loaded)
123
111
 
124
- Read the shared partial at the absolute path:
125
- `claude-plugin/commands/_project-rules-protocol.md`
112
+ Load the /thrum:project-rules-protocol skill and follow it.
126
113
 
127
114
  If you accumulate a new rule mid-session (the user corrects you), capture it via
128
115
  the `implementer-maintaining-memory` skill — it references the
@@ -86,13 +86,13 @@ that would otherwise come back as findings.
86
86
  package searched -> primitive adopted, or none exists + bounded cost formula
87
87
  (frequency x production cardinality, at production scale). Include it in
88
88
  your DONE report.
89
+ - Before writing a raw read-in-loop, `db.Query`-in-loop, `COUNT(DISTINCT ...)`, or a second transaction or pool acquisition per logical unit under a hot root, search the callee package for an existing targeted, cached, covering or batch primitive.
89
90
 
90
91
  Fix what you find before sending the ping.
91
92
 
92
93
  ## Project-specific rules (already loaded)
93
94
 
94
- Read the shared partial at the absolute path:
95
- `claude-plugin/commands/_project-rules-protocol.md`
95
+ Load the /thrum:project-rules-protocol skill and follow it.
96
96
 
97
97
  If you accumulate a new rule mid-session (the user corrects you), capture it via
98
98
  the `implementer-maintaining-memory` skill — it references the
@@ -44,7 +44,7 @@ monotonic-ish and globally comparable; the larger ULID wins.
44
44
  | Concurrent edits to the SAME field | Larger-ULID event wins. Loser preserved in JSONL. |
45
45
  | Concurrent tombstones | Idempotent. One delete-event wins by ts; status=purged. |
46
46
  | Edit + delete, delete-ULID > edit-ULID | Final `status=purged`. |
47
- | Edit + delete, edit-ULID > delete-ULID AND edit explicitly sets `status=active` | Edit wins → `status=active` (undelete). |
47
+ | Edit + delete, edit-ULID > delete-ULID AND edit explicitly sets `status=active` | Edit wins → `status=active` (undelete; needs a license). |
48
48
  | Edit + delete, edit-ULID > delete-ULID AND edit does NOT touch `status` | Patch applies to body/tags but `status=purged` persists. |
49
49
 
50
50
  LWW is acceptable here because memories aren't a high-write-conflict surface
@@ -94,6 +94,8 @@ Undelete by writing `status=active`:
94
94
  thrum memory edit <id> --status active
95
95
  ```
96
96
 
97
+ Note: `memory edit` (including `--status active` undelete) requires a license (memory.substrate); soft delete (`memory delete`) and reads stay open.
98
+
97
99
  Undelete works regardless of who won the concurrent edit/delete race (see LWW
98
100
  table above). The audit history is intact, so the recovered memory carries its
99
101
  full provenance.
@@ -116,10 +118,10 @@ Type DELETE <id> to confirm: DELETE <id>
116
118
  The exact token (`DELETE <id>`) must be typed back — matches beads'
117
119
  `DESTROY-<prefix>` pattern. There is no `--yes` bypass.
118
120
 
119
- | Mode | Mechanism | Recovery |
120
- | --------------- | -------------------------------------------------------------- | ---------------------------------------- |
121
- | Soft (default) | `memory.delete` → projection `status=purged` | `thrum memory edit <id> --status active` |
122
- | Hard (`--hard`) | `memory.purge_executed` → physical JSONL removal at compaction | Not recoverable post-compaction |
121
+ | Mode | Mechanism | Recovery |
122
+ | --------------- | -------------------------------------------------------------- | ----------------------------------------------------------- |
123
+ | Soft (default) | `memory.delete` → projection `status=purged` | `thrum memory edit <id> --status active` (license required) |
124
+ | Hard (`--hard`) | `memory.purge_executed` → physical JSONL removal at compaction | Not recoverable post-compaction |
123
125
 
124
126
  ## When NOT to hard-delete
125
127
 
@@ -25,7 +25,7 @@ Edge kind is an open string (same hybrid pattern as memory kind). Future edges
25
25
  like `blocks`, `duplicates`, or `parent-child` can be added without schema
26
26
  change.
27
27
 
28
- Add and remove edges:
28
+ Add and remove edges. `memory link` and `memory edit` require a license (memory.substrate); `memory unlink` does not.
29
29
 
30
30
  ```bash
31
31
  thrum memory link <a> supersedes <b>
@@ -59,7 +59,7 @@ thrum memory unlink <new-id> supersedes <old-id>
59
59
  thrum memory edit <old-id> --status active
60
60
  ```
61
61
 
62
- Both steps are required. If you only need to keep the historical link but
62
+ The `--status active` step needs a license; without one the superseded memory stays superseded. Both steps are required. If you only need to keep the historical link but
63
63
  re-surface the old memory, just run the `--status active` edit and leave the
64
64
  edge in place.
65
65
 
@@ -108,7 +108,7 @@ thrum memory create --kind comment \
108
108
  ```
109
109
 
110
110
  `--short`/`--full` carry real prose — compose via heredoc or file, never
111
- double-quoted inline; see your role preamble's 🔴 PROSE INTO A COMMAND rule.
111
+ double-quoted inline; see the heredoc-or-file rule in your role preamble.
112
112
 
113
113
  `--parent` shorthand creates the `child_of` edge in the same operation. Author =
114
114
  `agent_id`, timestamp = `created_at`. Threading walks via the daemon's
@@ -21,6 +21,8 @@ thrum memory edit <id> --title "<updated title>"
21
21
  thrum memory edit <id> --add-tag <new-tag> # appends (repeatable); --rm-tag removes
22
22
  ```
23
23
 
24
+ `memory edit` requires a license (memory.substrate); `delete` and `unlink` do not.
25
+
24
26
  Edits create a **history record** — the daemon retains the prior version. View
25
27
  edit history:
26
28
 
@@ -25,7 +25,7 @@ thrum memory create --kind <K> --scope <S> \
25
25
  ```
26
26
 
27
27
  `--short`/`--full` carry real prose — compose via heredoc or file, never
28
- double-quoted inline; see the role preamble's 🔴 PROSE INTO A COMMAND rule.
28
+ double-quoted inline; see the heredoc-or-file rule in your role preamble.
29
29
 
30
30
  Three flags are **REQUIRED** (schema NOT NULL): `--kind`, `--title`,
31
31
  `--oneline`. The daemon rejects any `memory.create` call missing these.