opencode-thrum-pro 0.1.6 → 0.1.7

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 (52) 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 +1 -1
  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/choosing-subagent-models/SKILL.md +188 -72
  9. package/assets/skills/closing-findings-while-warm/SKILL.md +1 -2
  10. package/assets/skills/configure-roles/SKILL.md +2 -2
  11. package/assets/skills/coordinator-branch-split-on-block/SKILL.md +1 -2
  12. package/assets/skills/coordinator-dispatching-work/SKILL.md +2 -3
  13. package/assets/skills/coordinator-hotpath-merge-gate/SKILL.md +3 -1
  14. package/assets/skills/coordinator-interacting-with-the-owner/SKILL.md +1 -2
  15. package/assets/skills/coordinator-maintaining-memory/SKILL.md +1 -1
  16. package/assets/skills/coordinator-managing-state-and-lifecycle/SKILL.md +1 -2
  17. package/assets/skills/coordinator-merging-code/SKILL.md +18 -11
  18. package/assets/skills/coordinator-philosophy-merge-gate/SKILL.md +1 -2
  19. package/assets/skills/coordinator-plan-reconcile-gate/SKILL.md +1 -2
  20. package/assets/skills/coordinator-running-brainstorm-cycles/SKILL.md +4 -5
  21. package/assets/skills/coordinator-running-review-cycles/SKILL.md +1 -2
  22. package/assets/{commands/thrum-_deviations-protocol.md → skills/deviations-protocol/SKILL.md} +6 -12
  23. package/assets/skills/generator-idempotency-protocol/SKILL.md +9 -0
  24. package/assets/skills/implementer-maintaining-memory/SKILL.md +3 -4
  25. package/assets/skills/implementer-orchestrating-execution/SKILL.md +1 -2
  26. package/assets/skills/implementer-receiving-dispatch/SKILL.md +15 -17
  27. package/assets/skills/implementer-receiving-review-feedback/SKILL.md +3 -4
  28. package/assets/skills/implementer-status-and-handoff/SKILL.md +1 -14
  29. package/assets/skills/implementer-tdd-and-quality/SKILL.md +2 -2
  30. package/assets/skills/memory-curate/SKILL.md +1 -1
  31. package/assets/skills/memory-write-discipline/SKILL.md +1 -1
  32. package/assets/skills/orchestrate/SKILL.md +33 -4
  33. package/assets/skills/prime-agent/SKILL.md +1 -1
  34. package/assets/skills/project-hotpath-gate/SKILL.md +1 -2
  35. package/assets/skills/project-philosophy/SKILL.md +1 -2
  36. package/assets/skills/project-rules-protocol/SKILL.md +12 -0
  37. package/assets/skills/project-setup/SKILL.md +7 -8
  38. package/assets/skills/project-setup/resources/implementation-agent.md +1 -2
  39. package/assets/skills/researcher-answering-queries/SKILL.md +1 -2
  40. package/assets/skills/researcher-investigating/SKILL.md +6 -8
  41. package/assets/skills/researcher-maintaining-memory/SKILL.md +1 -1
  42. package/assets/{commands/thrum-_snapshot-protocol.md → skills/snapshot-protocol/SKILL.md} +10 -15
  43. package/assets/{commands/thrum-_stamp-protocol.md → skills/stamp-protocol/SKILL.md} +5 -6
  44. package/assets/skills/using-thrum-state/SKILL.md +2 -2
  45. package/assets/skills/verify-against-plan/SKILL.md +2 -2
  46. package/dist/installer-assets.test.d.ts +1 -0
  47. package/dist/installer-assets.test.js +41 -0
  48. package/package.json +1 -1
  49. package/assets/commands/thrum-_compact-runtime-commands.md +0 -61
  50. package/assets/commands/thrum-_generator-idempotency-protocol.md +0 -15
  51. package/assets/commands/thrum-_project-rules-protocol.md +0 -18
  52. package/assets/commands/thrum-_verify-before-write-protocol.md +0 -27
@@ -159,8 +159,7 @@ asserted after the fact).
159
159
 
160
160
  ## Project-specific rules (already loaded)
161
161
 
162
- Read the shared partial at the absolute path:
163
- `claude-plugin/commands/_project-rules-protocol.md`
162
+ Load the /thrum:project-rules-protocol skill and follow it.
164
163
 
165
164
  If you accumulate a new rule mid-session about branch-splitting, capture it
166
165
  via the `coordinator-maintaining-memory` skill — it references the
@@ -307,14 +307,13 @@ EOF
307
307
  ### Step 3: Your role during execution
308
308
 
309
309
  - You receive the orchestrator's merge report when all epics complete.
310
- - Run your merge-approval gate (see Merge Approval Gate in your preamble).
310
+ - Run your merge-approval gate (see the merge approval rules in your preamble).
311
311
  - Monitor the orchestrator's status updates; escalate to the operator only for
312
312
  genuine judgment calls (architectural pivot, scope change, budget concern).
313
313
 
314
314
  ## Project-specific rules (already loaded)
315
315
 
316
- Read the shared partial at the absolute path:
317
- `claude-plugin/commands/_project-rules-protocol.md`
316
+ Load the /thrum:project-rules-protocol skill and follow it.
318
317
 
319
318
  If you accumulate a new rule mid-session (the user corrects you), capture it via
320
319
  the `coordinator-maintaining-memory` skill — it references the
@@ -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,
@@ -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
 
@@ -184,8 +184,7 @@ orchestrators to for the implementers **they** launched.
184
184
 
185
185
  ## Project-specific rules (already loaded)
186
186
 
187
- Read the shared partial at the absolute path:
188
- `claude-plugin/commands/_project-rules-protocol.md`
187
+ Load the /thrum:project-rules-protocol skill and follow it.
189
188
 
190
189
  If you accumulate a new rule mid-session (the user corrects you), capture it via
191
190
  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 2026-09-29:** 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 2026-09-29 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-
@@ -361,8 +369,7 @@ hides staleness.
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
@@ -459,8 +459,7 @@ diff — don't bounce reflexively.
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
@@ -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
@@ -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
@@ -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
@@ -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.
@@ -189,8 +189,10 @@ thrum worktree create <name>
189
189
  thrum tmux create <name> --cwd <worktree-path> \
190
190
  --name <agent_name> --role implementer --module <module> \
191
191
  --mode ephemeral --identity ephemeral \
192
- --model <from runtime.role_models, per choosing-subagent-models>
193
- thrum tmux launch <name> --runtime <runtime> --model <from runtime.role_models, per choosing-subagent-models>
192
+ --model <from runtime.role_models, per choosing-subagent-models> \
193
+ --effort <from runtime.role_models, per choosing-subagent-models>
194
+ thrum tmux launch <name> --runtime <runtime> --model <from runtime.role_models, per choosing-subagent-models> \
195
+ --effort <from runtime.role_models, per choosing-subagent-models>
194
196
  ```
195
197
 
196
198
  > **Implementer lifecycle:** All implementers are ephemeral+stateless (no agent
@@ -233,7 +235,7 @@ That prints the runtime's own footer line, e.g. `Model: <resolved model>`. **Rea
233
235
  intended tier from `.thrum/config.json` → `runtime.role_models`, not from memory.**
234
236
  If the footer shows a different tier (see the BLOCKED note under Step 2 — the model ban
235
237
  list lives in `choosing-subagent-models`), the pin failed silently — re-pin with
236
- `thrum tmux create ... --model <from runtime.role_models, per choosing-subagent-models>` (or
238
+ `thrum tmux create ... --model <from runtime.role_models, per choosing-subagent-models> --effort <from runtime.role_models, per choosing-subagent-models>` (or
237
239
  `thrum agent runtime-config set <agent_name> --model <from runtime.role_models, per choosing-subagent-models>`) and relaunch BEFORE
238
240
  assigning work. **Do not dispatch an unpinned implementer** — the daemon's
239
241
  role-default backstop (`jq -r '.runtime.role_models' .thrum/config.json`) is a
@@ -504,7 +506,7 @@ done
504
506
 
505
507
  **C. If conflicts arise:**
506
508
  Reading the conflicted files directly is permitted (merge-conflict carve-out
507
- in Scope Boundaries). Analyze the conflict using your plan/intent context to
509
+ in the Scope section of your preamble). Analyze the conflict using your plan/intent context to
508
510
  determine the correct resolution. Then spawn a targeted edit sub-agent:
509
511
 
510
512
  ```text
@@ -805,3 +807,30 @@ EOF
805
807
  ```
806
808
 
807
809
  Do not proceed without approval when autonomy is `per_epic`.
810
+
811
+ ### Tier-swap: replace an underperforming implementer in the same worktree
812
+
813
+ Use when the first review shows multiple BLOCKING findings, systematic misunderstanding of the task, or an agent clearly going long. The swap reuses the SAME worktree: retire the underperforming agent and relaunch a fresh one under a NEW name in place. Never `thrum agent delete` (operator-only, gated to the coordinator; orchestrators are refused). The swapped-out agent is retired with `set-phase retired`; its registry row, messages and transcript are retained.
814
+
815
+ Step 1: kill the old agent's tmux session first, so its pid is dead. A live-pid identity file is preserved and not quarantined; a dead pid lets the new create quarantine it.
816
+ thrum tmux kill <same_worktree_name>
817
+ Step 2: retire the old agent. It keeps the registry row (Retired tab). `set-phase` is not operator-gated. Retiring does not free the identity; Step 4's create does.
818
+ thrum agent set-phase retired --agent <underperforming_agent_name>
819
+ Step 3: verify the worktree is intact (WIP code preserved).
820
+ ls <worktree-path>
821
+ Step 4: launch a fresh ephemeral identity under a NEW name in the SAME worktree, pinned on both create and launch from `runtime.role_models` (per `choosing-subagent-models`). `--intent` carries the orient-from-WIP one-liner.
822
+ thrum tmux create <same_worktree_name> --cwd <worktree-path> --name <new_agent_name> --role implementer --module <module> --mode ephemeral --identity ephemeral --model <per runtime.role_models> --effort <per runtime.role_models> --intent "tier-swap: orient in the worktree (WIP + first-review findings) and continue"
823
+ thrum tmux launch <same_worktree_name> --runtime claude --model <per runtime.role_models> --effort <per runtime.role_models>
824
+ Step 5: deliver the WIP pointer and first-review findings (a cold handoff: the code plus the findings).
825
+ thrum send --to @<new_agent_name> --stdin <<'EOF'
826
+ Tier-swap pickup: <WIP summary + first-review findings>
827
+ EOF
828
+
829
+ The pickup prompt (Step 5) must include:
830
+ You are picking up in-progress work from a prior agent that was replaced.
831
+ Context:
832
+ - Worktree: <path> — contains partial implementation, review it with git diff
833
+ - Task: <epic-id> / <task description>
834
+ - First-review findings from the prior pass:
835
+ <paste the consolidated finding list here>
836
+ - Your goal: address all BLOCKING findings + complete the remaining task scope.
@@ -88,7 +88,7 @@ context on a healthy daemon — no turn spent reading a file or running a skill.
88
88
  This skill is the correct choice here only as a **fallback**, when that
89
89
  auto-injection didn't fire or failed (e.g. the hook's "auto-injection failed"
90
90
  notice, daemon unreachable). In that fallback case: read the snapshot first,
91
- then run this skill. See `claude-plugin/commands/compact.md`'s "How resume
91
+ then run this skill. See `/thrum:compact`'s "How resume
92
92
  works" section.
93
93
 
94
94
  ## After Step 2
@@ -23,8 +23,7 @@ later ones.
23
23
  3. **Re-run-evolved** (config present, project has drifted) — compute a
24
24
  sectional diff, present for approval, write only on confirmation.
25
25
 
26
- Read the shared partial at the absolute path:
27
- `claude-plugin/commands/_generator-idempotency-protocol.md`
26
+ Load the /thrum:generator-idempotency-protocol skill and follow it.
28
27
 
29
28
  > **Note: human-in-the-loop required.** This skill uses interactive prompts for
30
29
  > first-run incident-prose seeding and re-run-evolved diff approval. It cannot
@@ -29,8 +29,7 @@ later ones.
29
29
  3. **Re-run-evolved** (doc present, project has drifted) — compute a sectional
30
30
  diff, present via `AskUserQuestion`, write only on confirmation.
31
31
 
32
- Read the shared partial at the absolute path:
33
- `claude-plugin/commands/_generator-idempotency-protocol.md`
32
+ Load the /thrum:generator-idempotency-protocol skill and follow it.
34
33
 
35
34
  > **Note: human-in-the-loop required.** This skill uses `AskUserQuestion` for
36
35
  > first-run project-specific prompts, re-run-evolved diff approval, and
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: project-rules-protocol
3
+ description: "Use when loading project-specific rules - shared rule skill for role skills."
4
+ ---
5
+
6
+
7
+ # Project-Specific Rules Protocol
8
+ Project-local rules of kind `agent_rule` at `--scope role` were loaded at
9
+ session start by your preamble (see the memory rules in your role preamble).
10
+ If a project-local rule conflicts with a universal rule above, the
11
+ project-local rule wins; surface the conflict in your reply so the user can
12
+ decide whether to graduate or remove the override.
@@ -50,7 +50,7 @@ describes the artifact in front of you. Parse the binding keys from the
50
50
  **highest-cycle** (last-appended) `stage=plan` line — stamps are only ever
51
51
  appended, never reordered, so `tail -1` is the binding verdict; never `sort`
52
52
  (a `cycle=10` line must beat `cycle=9`, which a lexical sort inverts) — then
53
- re-derive the current values per `_stamp-protocol.md` § "Review-object
53
+ re-derive the current values per `stamp-protocol.md` § "Review-object
54
54
  binding" and compare:
55
55
 
56
56
  ```bash
@@ -95,7 +95,7 @@ Notes on the check:
95
95
  marker. Surface any `THRUM-DEFER` lines still present in the doc as part
96
96
  of the override audit.
97
97
  - **The Deviations block has no override.** Its absence always fails the
98
- gate — see `claude-plugin/commands/_deviations-protocol.md` ("empty must
98
+ gate — see the /thrum:deviations-protocol skill ("empty must
99
99
  be WRITTEN, not omitted").
100
100
  - **`verify=` has no silent-omission path.** A stamp missing `verify=`
101
101
  entirely FAILS this third check exactly like a missing stamp fails the
@@ -117,7 +117,7 @@ Notes on the check:
117
117
  silent-omission path** — a stamp missing `plan_obj`/`src_lock` entirely
118
118
  fails exactly like a missing `verify=` field (fourth check above). The
119
119
  remedy is the same shape as the `verify=` remedy: re-run the plan review so
120
- the stamp is emitted with live binding keys (`_stamp-protocol.md` § "Review-
120
+ the stamp is emitted with live binding keys (`stamp-protocol.md` § "Review-
121
121
  object binding"), or a coordinator adds an explicit `verdict=OVERRIDE`
122
122
  (with `reason=`) to the `stage=plan` line — the SAME auditable escape used
123
123
  for the first check, not a new mechanism. There is no `PREDATES` value for
@@ -476,8 +476,7 @@ template's "Logging Refactoring Opportunities" section.
476
476
  If not found, create one:
477
477
 
478
478
  `--description` is multi-line prose — never double-quoted inline. Use
479
- `--body-file` to pass the content from a file instead; see the role preamble's
480
- 🔴 PROSE INTO A COMMAND rule. `scripts/bd-shared` delivers `--body-file` (and
479
+ `--body-file` to pass the content from a file instead; see the heredoc-or-file rule in your role preamble. `scripts/bd-shared` delivers `--body-file` (and
481
480
  `--stdin`) content: it reads the file on your box and pipes those bytes to bd,
482
481
  and an empty or blank body is refused loudly; only `-f`/`--file` and `--graph`
483
482
  (bulk-plan files) are refused there. Scratch files go in `/private/tmp` on macOS,
@@ -870,11 +869,11 @@ architecture notes specific to this feature:
870
869
 
871
870
  > ⚠️ Verify base before acting: `git diff <sha>..origin/<merge_target> -- <files cited>` -- non-empty ⇒ cited code moved. (Resolve `<merge_target>` through its remote-tracking ref, never a bare local branch name — a local branch of the same name can be stale or absent.)
872
871
 
873
- <!-- Derive stamp per `claude-plugin/commands/_stamp-protocol.md`. -->
872
+ <!-- Derive stamp per the /thrum:stamp-protocol skill. -->
874
873
 
875
874
  ## Deviations from Source
876
875
 
877
- <!-- Derive per `claude-plugin/commands/_deviations-protocol.md` — diff
876
+ <!-- Derive per the /thrum:deviations-protocol skill — diff
878
877
  against the plan/spec, never recall from memory. Required even when
879
878
  empty. -->
880
879
 
@@ -959,7 +958,7 @@ prompt file:
959
958
  ```
960
959
 
961
960
  2. **After the post-setup prompt review terminates `Ready:Yes`**, compute
962
- `prompt_obj`/`plan_lock` per `_stamp-protocol.md` § "Review-object binding"
961
+ `prompt_obj`/`plan_lock` per `stamp-protocol.md` § "Review-object binding"
963
962
  (strip-then-hash the prompt against itself for `prompt_obj`; plain-hash the
964
963
  LOCKED plan for `plan_lock`), then append the verdict stamp:
965
964
 
@@ -439,8 +439,7 @@ bd list --type=epic | grep -i refactor
439
439
  If no refactoring epic exists, create one:
440
440
 
441
441
  `--description` is multi-line prose — never double-quoted inline. Write it to a
442
- scratch file and pass `--body-file <file>`; see your role preamble's 🔴 PROSE
443
- INTO A COMMAND rule. `scripts/bd-shared` delivers `--body-file` (and `--stdin`)
442
+ scratch file and pass `--body-file <file>`; see the heredoc-or-file rule in your role preamble. `scripts/bd-shared` delivers `--body-file` (and `--stdin`)
444
443
  content: it reads the file on YOUR box and pipes those bytes to bd, and an empty
445
444
  or blank body is refused loudly. Only `-f`/`--file` and `--graph` (bulk-plan
446
445
  files) are refused there. Scratch files go in `/private/tmp` on macOS, where
@@ -75,8 +75,7 @@ where inlining is genuinely cheaper than the round-trip.
75
75
 
76
76
  ## Project-specific rules (already loaded)
77
77
 
78
- Read the shared partial at the absolute path:
79
- `claude-plugin/commands/_project-rules-protocol.md`
78
+ Load the /thrum:project-rules-protocol skill and follow it.
80
79
 
81
80
  If you accumulate a new rule mid-session (the user corrects you), capture it via
82
81
  the `researcher-maintaining-memory` skill — it references the