opencode-thrum-pro 0.1.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.
- package/assets/commands/thrum-_deviations-protocol.md +87 -0
- package/assets/commands/thrum-_generator-idempotency-protocol.md +15 -0
- package/assets/commands/thrum-_project-rules-protocol.md +18 -0
- package/assets/commands/thrum-_snapshot-protocol.md +265 -0
- package/assets/commands/thrum-_stamp-protocol.md +112 -0
- package/assets/commands/thrum-_verify-before-write-protocol.md +27 -0
- package/assets/commands/thrum-inbox.md +22 -0
- package/assets/commands/thrum-load-context.md +17 -0
- package/assets/commands/thrum-overview.md +17 -0
- package/assets/commands/thrum-prime.md +30 -0
- package/assets/commands/thrum-quickstart.md +14 -0
- package/assets/commands/thrum-reply.md +28 -0
- package/assets/commands/thrum-restart-extended.md +195 -0
- package/assets/commands/thrum-restart.md +293 -0
- package/assets/commands/thrum-send.md +31 -0
- package/assets/commands/thrum-sleep-extended.md +186 -0
- package/assets/commands/thrum-sleep.md +212 -0
- package/assets/commands/thrum-team.md +12 -0
- package/assets/commands/thrum-update-project.md +259 -0
- package/assets/commands/thrum-wait.md +14 -0
- package/assets/skills/adversarial-critique/SKILL.md +242 -0
- package/assets/skills/brainstorm-queue-aware/SKILL.md +167 -0
- package/assets/skills/brainstorm-steward/SKILL.md +181 -0
- package/assets/skills/choosing-subagent-models/SKILL.md +244 -0
- package/assets/skills/closing-findings-while-warm/SKILL.md +104 -0
- package/assets/skills/configure-roles/SKILL.md +229 -0
- package/assets/skills/coordinator-assessing-agent-completion/SKILL.md +205 -0
- package/assets/skills/coordinator-assessing-agent-completion/scan.py +117 -0
- package/assets/skills/coordinator-branch-split-on-block/SKILL.md +168 -0
- package/assets/skills/coordinator-context-monitoring/SKILL.md +674 -0
- package/assets/skills/coordinator-dispatching-work/SKILL.md +288 -0
- package/assets/skills/coordinator-hotpath-merge-gate/SKILL.md +522 -0
- package/assets/skills/coordinator-interacting-with-the-owner/SKILL.md +171 -0
- package/assets/skills/coordinator-maintaining-memory/SKILL.md +89 -0
- package/assets/skills/coordinator-managing-state-and-lifecycle/SKILL.md +192 -0
- package/assets/skills/coordinator-merging-code/SKILL.md +331 -0
- package/assets/skills/coordinator-philosophy-merge-gate/SKILL.md +442 -0
- package/assets/skills/coordinator-plan-reconcile-gate/SKILL.md +198 -0
- package/assets/skills/coordinator-post-restart-sweep/SKILL.md +135 -0
- package/assets/skills/coordinator-running-autonomous-feature-development/SKILL.md +199 -0
- package/assets/skills/coordinator-running-brainstorm-cycles/SKILL.md +654 -0
- package/assets/skills/coordinator-running-review-cycles/SKILL.md +153 -0
- package/assets/skills/coordinator-single-responsibility-merge-gate/SKILL.md +14 -0
- package/assets/skills/diagnosing-fleet-and-daemon/SKILL.md +255 -0
- package/assets/skills/efficient-multi-agent-research/SKILL.md +177 -0
- package/assets/skills/fixing-documentation-errors/SKILL.md +258 -0
- package/assets/skills/implementer-maintaining-memory/SKILL.md +84 -0
- package/assets/skills/implementer-orchestrating-execution/SKILL.md +125 -0
- package/assets/skills/implementer-receiving-dispatch/SKILL.md +127 -0
- package/assets/skills/implementer-receiving-review-feedback/SKILL.md +125 -0
- package/assets/skills/implementer-status-and-handoff/SKILL.md +150 -0
- package/assets/skills/implementer-tdd-and-quality/SKILL.md +99 -0
- package/assets/skills/memory-audit-recover/SKILL.md +153 -0
- package/assets/skills/memory-curate/SKILL.md +139 -0
- package/assets/skills/memory-maintenance/SKILL.md +87 -0
- package/assets/skills/memory-read-discipline/SKILL.md +164 -0
- package/assets/skills/memory-search-advanced/SKILL.md +217 -0
- package/assets/skills/memory-write-discipline/SKILL.md +135 -0
- package/assets/skills/orchestrate/SKILL.md +795 -0
- package/assets/skills/persistent-watcher-archetype/SKILL.md +225 -0
- package/assets/skills/prime-agent/SKILL.md +92 -0
- package/assets/skills/project-hotpath-gate/SKILL.md +255 -0
- package/assets/skills/project-philosophy/SKILL.md +418 -0
- package/assets/skills/project-philosophy/resources/philosophy-template.md +155 -0
- package/assets/skills/project-philosophy/resources/reliability-class-library.md +653 -0
- package/assets/skills/project-setup/SKILL.md +1007 -0
- package/assets/skills/project-setup/resources/implementation-agent.md +826 -0
- package/assets/skills/researcher-answering-queries/SKILL.md +100 -0
- package/assets/skills/researcher-investigating/SKILL.md +152 -0
- package/assets/skills/researcher-maintaining-memory/SKILL.md +176 -0
- package/assets/skills/state-migration/SKILL.md +54 -0
- package/assets/skills/thrum/SKILL.md +161 -0
- package/assets/skills/thrum/resources/ANTI_PATTERNS.md +132 -0
- package/assets/skills/thrum/resources/BOUNDARIES.md +56 -0
- package/assets/skills/thrum/resources/CLI_REFERENCE.md +1066 -0
- package/assets/skills/thrum/resources/IDENTITY.md +49 -0
- package/assets/skills/thrum/resources/LISTENER_PATTERN.md +64 -0
- package/assets/skills/thrum/resources/MESSAGING.md +163 -0
- package/assets/skills/thrum/resources/TMUX_SESSIONS.md +118 -0
- package/assets/skills/thrum/resources/WORKTREES.md +117 -0
- package/assets/skills/thrum-memory/SKILL.md +138 -0
- package/assets/skills/trace-spec-to-plan/SKILL.md +104 -0
- package/assets/skills/trace-spec-to-plan/resources/sweep-agent-prompt.md +57 -0
- package/assets/skills/update-queue/SKILL.md +149 -0
- package/assets/skills/using-the-queue/SKILL.md +172 -0
- package/assets/skills/using-thrum-state/SKILL.md +104 -0
- package/assets/skills/verify-against-plan/SKILL.md +323 -0
- package/assets/skills/verify-against-source/SKILL.md +237 -0
- package/assets/skills/watcher-archetype/SKILL.md +84 -0
- package/assets/skills/writing-durable-markdown/SKILL.md +66 -0
- package/dist/hooks/block-sync-cd.d.ts +9 -0
- package/dist/hooks/block-sync-cd.js +71 -0
- package/dist/hooks/block-sync-cd.test.d.ts +1 -0
- package/dist/hooks/block-sync-cd.test.js +61 -0
- package/dist/hooks/shell-env.d.ts +8 -0
- package/dist/hooks/shell-env.js +22 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +25 -0
- package/dist/installer.d.ts +2 -0
- package/dist/installer.js +86 -0
- package/package.json +49 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verify-against-plan
|
|
3
|
+
description: "Use after implementation is complete to verify the code covers every requirement from the plan / design spec - runs alongside code-review as the second pass in the Code Review Protocol. Outputs structured findings - missing scope, unmet acceptance criteria, silent deviations from the spec, newly-introduced surprises."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verify Against Plan
|
|
7
|
+
|
|
8
|
+
## Inputs
|
|
9
|
+
|
|
10
|
+
Two inputs are required. Missing either is a pre-flight bail.
|
|
11
|
+
|
|
12
|
+
### 1. Plan or spec path (required)
|
|
13
|
+
|
|
14
|
+
A markdown plan or spec file — the authoritative reference the implementation is
|
|
15
|
+
checked against.
|
|
16
|
+
|
|
17
|
+
- Preferred: `dev-docs/plans/YYYY-MM-DD-<topic>-plan.md` (produced by
|
|
18
|
+
`superpowers:writing-plans`)
|
|
19
|
+
- Fallback: `dev-docs/specs/YYYY-MM-DD-<topic>-design.md` if no plan exists
|
|
20
|
+
|
|
21
|
+
If both exist, prefer the plan — plans are tighter and already contain the
|
|
22
|
+
file-structure and acceptance-criteria anchors the skill compares against.
|
|
23
|
+
|
|
24
|
+
### 2. Implementation scope (required; one of three forms)
|
|
25
|
+
|
|
26
|
+
- **Branch name** — compare branch `HEAD` vs. merge-base with `main` (the common
|
|
27
|
+
case). E.g. `feat/verify-against-plan`.
|
|
28
|
+
- **Commit range** — `start..end` for custom ranges. E.g. `d4943ce5..HEAD`.
|
|
29
|
+
- **Worktree path** — infer the branch and diff from the worktree's current
|
|
30
|
+
state. E.g. `<workspace>/thrum/plugin-skills-slate`.
|
|
31
|
+
|
|
32
|
+
### Context-inferred defaults
|
|
33
|
+
|
|
34
|
+
When the caller supplies no explicit scope, infer:
|
|
35
|
+
|
|
36
|
+
- **Branch** from `git rev-parse --abbrev-ref HEAD`
|
|
37
|
+
- **File scope** from the plan's **File Structure** table — only files the plan
|
|
38
|
+
claims to touch are in scope for verification
|
|
39
|
+
|
|
40
|
+
### Invocation examples
|
|
41
|
+
|
|
42
|
+
**Explicit args:**
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
/verify-against-plan plan=dev-docs/plans/YYYY-MM-DD-topic-plan.md branch=feat/plugin-skills-slate
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Context-inferred (from current worktree):**
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
/verify-against-plan plan=dev-docs/plans/YYYY-MM-DD-topic-plan.md
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The second form uses the current branch as the implementation scope.
|
|
55
|
+
|
|
56
|
+
## Pre-flight checks
|
|
57
|
+
|
|
58
|
+
Before producing any findings, run these three checks. If any fails, bail with a
|
|
59
|
+
clear error — do not proceed with partial inputs.
|
|
60
|
+
|
|
61
|
+
1. **Plan/spec file exists and is readable.** Verify the path resolves and the
|
|
62
|
+
file is non-empty markdown. Error message on failure names the path and the
|
|
63
|
+
issue (missing / empty / unreadable).
|
|
64
|
+
|
|
65
|
+
2. **Implementation scope resolves to a non-empty diff.** For branch or
|
|
66
|
+
commit-range inputs, `git diff` must produce at least one changed file. An
|
|
67
|
+
empty diff means either the branch is at merge-base or the range is
|
|
68
|
+
mis-specified — either way, there is nothing to verify.
|
|
69
|
+
|
|
70
|
+
3. **Plan's File Structure and Acceptance/Test-plan sections are extractable.**
|
|
71
|
+
Parse the plan for a `## File Structure` (or equivalent) table and an
|
|
72
|
+
`## Acceptance` / `## Test plan` section. These are the comparison anchors
|
|
73
|
+
for the actual verification pass. If neither is present, bail — a plan with
|
|
74
|
+
no acceptance criteria and no file table cannot be verified against.
|
|
75
|
+
|
|
76
|
+
4. **Authored-against drift check (informational; does not block on missing stamp).**
|
|
77
|
+
Look for a stamp of this form near the top of the plan:
|
|
78
|
+
|
|
79
|
+
Literal example: `**Authored-against:** \`a1b2c3d4e5\` target: \`thrum-agents\``
|
|
80
|
+
|
|
81
|
+
Regex: `^\*\*Authored-against:\*\* \`([0-9a-f]+)\` target: \`([^\`]+)\``
|
|
82
|
+
(sha → capture group 1, merge_target → capture group 2)
|
|
83
|
+
|
|
84
|
+
(Canonical stamp definition: `claude-plugin/commands/_stamp-protocol.md`. The
|
|
85
|
+
stamp follows the same literal `grep -F` / fixed-field-order / case-sensitive /
|
|
86
|
+
ASCII-only convention as the `THRUM-REVIEW` marker — see
|
|
87
|
+
`coordinator-running-brainstorm-cycles` skill § "Footer → commit → stamp".)
|
|
88
|
+
|
|
89
|
+
Three distinct outcomes, never conflated:
|
|
90
|
+
|
|
91
|
+
- **UNVERIFIABLE — no stamp:** note as informational ("plan predates the
|
|
92
|
+
Authored-against stamp convention, cannot check for drift") and continue
|
|
93
|
+
— do not fail or block; this is an additive check for plans that carry the
|
|
94
|
+
stamp.
|
|
95
|
+
- **UNVERIFIABLE — stamp present, no cited files:** if the stamp is present
|
|
96
|
+
but the plan's File Structure table cites zero files, check for this
|
|
97
|
+
condition BEFORE constructing any `git diff` command — a bare
|
|
98
|
+
`git diff <sha>..<target> --` with an empty pathspec produces a FULL-REPO
|
|
99
|
+
diff rather than an empty one, which would wrongly land in the NEEDS-RECHECK
|
|
100
|
+
branch with nothing to re-check. Go straight to reporting UNVERIFIABLE
|
|
101
|
+
without running any diff. Report explicitly: "stamp present but no cited
|
|
102
|
+
files to diff — cannot confirm currency." This is NOT reported as
|
|
103
|
+
VERIFIED-CURRENT.
|
|
104
|
+
- **Stamp found and cited files present:** run `git diff
|
|
105
|
+
<sha>..origin/<merge_target> -- <files from the File Structure table>`
|
|
106
|
+
(resolve `<merge_target>` through its remote-tracking ref, never a bare
|
|
107
|
+
local branch name — a local branch of the same name can be stale or
|
|
108
|
+
absent on the reader's machine), scoped only to the files the plan cites
|
|
109
|
+
(never a full-repo diff). Two sub-outcomes:
|
|
110
|
+
- **VERIFIED-CURRENT** — empty diff: report as a FALSIFIABLE NULL: "plan's
|
|
111
|
+
cited files verified CURRENT as of `<merge_target>` — zero drift." (State
|
|
112
|
+
a positive confirmed fact, not "no evidence of problems" — that
|
|
113
|
+
distinction matters.)
|
|
114
|
+
- **NEEDS-RECHECK** — non-empty diff: NOT automatically a blocking failure.
|
|
115
|
+
Files moved since authoring — a signal to re-verify, not proof the plan
|
|
116
|
+
is wrong. Proceed by: (a) listing exactly which cited files moved or were
|
|
117
|
+
deleted/renamed; (b) re-checking every specific plan claim about those
|
|
118
|
+
files (file:line anchors, function names, preconditions asserted); (c)
|
|
119
|
+
assigning severity from THAT re-check, not from the diff being non-empty:
|
|
120
|
+
- **BLOCKING** — only if a specific claim is now demonstrably false (a
|
|
121
|
+
cited anchor rotted; a precondition the plan assumed no longer holds).
|
|
122
|
+
A deleted or renamed cited file is automatically BLOCKING without
|
|
123
|
+
further re-check nuance: the plan asserts the file exists and has
|
|
124
|
+
certain content; a deleted file can never satisfy that assertion.
|
|
125
|
+
(This routing — deleted/renamed cited file → NEEDS-RECHECK → BLOCKING
|
|
126
|
+
— is intentional; future pathspec optimizations must not short-circuit
|
|
127
|
+
past this branch for deleted or renamed files.)
|
|
128
|
+
- **IMPORTANT** — if the cited files moved but every plan claim re-checks
|
|
129
|
+
as accurate: "cited files moved since authoring, re-verified — claims
|
|
130
|
+
still accurate."
|
|
131
|
+
|
|
132
|
+
5. **Read-time provenance re-derivation (informational; does not block on
|
|
133
|
+
missing stamp).** Runs whenever check 4 found a stamp at all — both the
|
|
134
|
+
"stamp present, no cited files" outcome and the "stamp and cited files
|
|
135
|
+
present" outcome above, since this check only needs the stamp's
|
|
136
|
+
`<sha>`/`<merge_target>`, not the plan's cited-files list. Run the
|
|
137
|
+
ordered, short-circuiting two-check sequence defined canonically in
|
|
138
|
+
`_stamp-protocol.md` § "Read-time provenance re-derivation" (SHA-resolves
|
|
139
|
+
first, then merge-status) against the stamp's `<sha>`/`<merge_target>` —
|
|
140
|
+
the exact commands live there as the single source of truth; this section
|
|
141
|
+
states outcomes and severity only:
|
|
142
|
+
|
|
143
|
+
- **FABRICATED** — SHA-resolves fails: flag immediately and stop; the
|
|
144
|
+
merge-status check is undefined for a SHA that doesn't exist.
|
|
145
|
+
- **STALE** — SHA-resolves passes AND merge-status shows the SHA has
|
|
146
|
+
already merged into `<merge_target>` AND the plan's own prose still
|
|
147
|
+
describes that SHA's work as open/in-progress/awaiting-a-gate.
|
|
148
|
+
|
|
149
|
+
These checks are re-derived at read time, every time this skill runs — not
|
|
150
|
+
cached from a prior verification pass.
|
|
151
|
+
|
|
152
|
+
6. **Primitive Ledger row present and valid.** If the diff adds I/O or SQL under
|
|
153
|
+
a hot root (`Handle*`/tick/sweeper/`SyncApplier`/boot — see
|
|
154
|
+
`.thrum/hotpath-gate.json`'s `lenses.existing_primitive_bypass.hot_root_indicators`), confirm the implementer's
|
|
155
|
+
report includes a ledger row (raw op -> callee package searched -> primitive
|
|
156
|
+
adopted, or none exists + bounded cost formula at production scale). Absence
|
|
157
|
+
of the row when one was required is a finding. Presence alone is not
|
|
158
|
+
sufficient — verify the claim: if a primitive is named as adopted, confirm it
|
|
159
|
+
is actually used at the cited call site; if "none exists" is claimed, spot-check
|
|
160
|
+
that the callee package was actually searched and the cost formula uses
|
|
161
|
+
realistic production scale, not a test-fixture number.
|
|
162
|
+
|
|
163
|
+
Only when checks 1–3 pass should the comparison pass begin. Checks 4, 5, and 6
|
|
164
|
+
run alongside and contribute findings; a missing stamp never blocks, and check 6
|
|
165
|
+
only fires when the diff actually touches a hot root.
|
|
166
|
+
|
|
167
|
+
## Output format
|
|
168
|
+
|
|
169
|
+
Findings go to stdout in this exact shape so the coordinator can consolidate the
|
|
170
|
+
dual-review batch without reformatting.
|
|
171
|
+
|
|
172
|
+
```markdown
|
|
173
|
+
## Verify-Against-Plan Findings
|
|
174
|
+
|
|
175
|
+
**Plan:** <path> **Implementation:** <branch> (<N> commits, <M> files changed)
|
|
176
|
+
**Summary:** <N> BLOCKING, <N> IMPORTANT, <N> MINOR
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
### BLOCKING #1 — <short descriptor>
|
|
181
|
+
|
|
182
|
+
- **Plan reference:** <plan file>:<line> — "<verbatim requirement>"
|
|
183
|
+
- **Implementation state:** <code path>:<line> or "absent"
|
|
184
|
+
- **Why it matters:** <link back to acceptance criterion / invariant>
|
|
185
|
+
- **Suggested resolution:** <add code, update plan, or flag for coordinator>
|
|
186
|
+
|
|
187
|
+
### IMPORTANT #1 — …
|
|
188
|
+
|
|
189
|
+
### MINOR #1 — …
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Every finding must include all four fields:
|
|
193
|
+
|
|
194
|
+
- **Plan reference** — exact `<file>:<line>` with the verbatim quote from the
|
|
195
|
+
plan. No paraphrase.
|
|
196
|
+
- **Implementation state** — what's in the code now, or the literal string
|
|
197
|
+
`absent` if the requirement has no corresponding code.
|
|
198
|
+
- **Why it matters** — the acceptance criterion or invariant this finding ties
|
|
199
|
+
back to. Prevents findings drifting into style opinions.
|
|
200
|
+
- **Suggested resolution** — concrete next action (add the missing code, update
|
|
201
|
+
the plan, or flag for coordinator judgment). "Review this" is not a
|
|
202
|
+
resolution.
|
|
203
|
+
|
|
204
|
+
If there are no findings in a severity bucket, omit that bucket entirely — do
|
|
205
|
+
not write "### BLOCKING #0 — none".
|
|
206
|
+
|
|
207
|
+
## Severity criteria
|
|
208
|
+
|
|
209
|
+
- **BLOCKING** — a named acceptance criterion is unmet, or the implementation
|
|
210
|
+
contradicts a stated invariant. Must be fixed before merge. Example: plan's
|
|
211
|
+
File Structure claims `internal/auth/session.go` exists but no such file was
|
|
212
|
+
added; plan's Test plan names a test that isn't present in the diff. Also:
|
|
213
|
+
drift check found that a specific plan claim (file:line anchor, function name,
|
|
214
|
+
or precondition) is now demonstrably false after cited files moved.
|
|
215
|
+
- **IMPORTANT** — a plan requirement is implemented but with silent deviation
|
|
216
|
+
(different file path, different function name, different public shape) that is
|
|
217
|
+
likely intentional but unverified. Should be fixed, or the deviation
|
|
218
|
+
explicitly acknowledged by the implementer. Example: plan says
|
|
219
|
+
`ResolveAgentID()` but code has `GetAgentID()` with the same behavior —
|
|
220
|
+
probably fine, but nobody said so. Also: files or behavior present in the
|
|
221
|
+
implementation diff with no corresponding entry in the plan's File Structure
|
|
222
|
+
table — unplanned additions the coordinator should review for scope creep.
|
|
223
|
+
Also: drift check found that cited files moved since authoring but all plan
|
|
224
|
+
claims re-checked as accurate ("cited files moved since authoring,
|
|
225
|
+
re-verified — claims still accurate").
|
|
226
|
+
- **MINOR** — missing documentation reference, commit-message format drift, or
|
|
227
|
+
stylistic plan deviation that does not affect behavior. Example: plan calls
|
|
228
|
+
for `Refs thrum-abc.3` in commit body, commit just has the title.
|
|
229
|
+
|
|
230
|
+
Drift-check-specific outcomes (step 4) and their severity mapping:
|
|
231
|
+
|
|
232
|
+
- **UNVERIFIABLE** — no stamp present, OR stamp present but plan cites zero
|
|
233
|
+
files. Reported as informational; never promoted to VERIFIED-CURRENT. No
|
|
234
|
+
bucket entry.
|
|
235
|
+
- **VERIFIED-CURRENT** — stamp present, at least one cited file, and the scoped
|
|
236
|
+
diff against those files is empty. Reported as a FALSIFIABLE NULL, not a
|
|
237
|
+
severity finding. No bucket entry.
|
|
238
|
+
- **NEEDS-RECHECK** — stamp present, at least one cited file, and the scoped
|
|
239
|
+
diff is non-empty. Resolves to one of two severities after re-check:
|
|
240
|
+
- **IMPORTANT** (NEEDS-RECHECK → claims-hold): cited files moved but every
|
|
241
|
+
plan claim re-verified accurate ("cited files moved since authoring,
|
|
242
|
+
re-verified — claims still accurate").
|
|
243
|
+
- **BLOCKING** (NEEDS-RECHECK → claim-false): a specific plan claim is now
|
|
244
|
+
demonstrably false after re-check. A deleted or renamed cited file is
|
|
245
|
+
automatically BLOCKING — the plan asserts the file exists; deletion proves
|
|
246
|
+
the assertion false without further nuance.
|
|
247
|
+
|
|
248
|
+
Read-time provenance re-derivation (check 5) severity mapping:
|
|
249
|
+
|
|
250
|
+
- **FABRICATED** — SHA-resolves failed: the stamped `<sha>` does not exist in
|
|
251
|
+
the repo. **BLOCKING** — the stamp itself is untrustworthy; every downstream
|
|
252
|
+
drift claim (check 4) built on this SHA is unverifiable.
|
|
253
|
+
- **STALE** — SHA-resolves passed, merge-status shows the SHA has already
|
|
254
|
+
merged into `<merge_target>`, but the plan's prose still narrates that work
|
|
255
|
+
as open/in-progress/awaiting-a-gate. **IMPORTANT** — the plan's narrative is
|
|
256
|
+
out of date; the described gate has already resolved (or never needed to
|
|
257
|
+
block), which the coordinator should reconcile before acting on the plan's
|
|
258
|
+
stated pending state.
|
|
259
|
+
|
|
260
|
+
Primitive Ledger check (check 6) severity mapping:
|
|
261
|
+
|
|
262
|
+
- **BLOCKING** — the hot-root diff genuinely bypasses an available primitive
|
|
263
|
+
(a primitive exists, was not adopted, and no ledger row accounts for the
|
|
264
|
+
bypass) — a raw op standing where a callee-package primitive was reachable
|
|
265
|
+
and unlogged. Also BLOCKING: a ledger row is present but the "adopted"
|
|
266
|
+
primitive is not actually used at the cited call site, or a "none exists"
|
|
267
|
+
claim is contradicted by an available primitive the implementer's own
|
|
268
|
+
ledger row claims to have searched for and missed.
|
|
269
|
+
- **IMPORTANT** — the ledger row is missing but the raw op itself is
|
|
270
|
+
harmless (no primitive exists, cost formula would clear at production
|
|
271
|
+
scale) — the accounting step was skipped, not the substance. Also
|
|
272
|
+
IMPORTANT: a "none exists" claim whose cost formula uses a test-fixture
|
|
273
|
+
number instead of realistic production scale, pending a re-derived figure.
|
|
274
|
+
|
|
275
|
+
When choosing between BLOCKING and IMPORTANT, apply the test: _would a reader of
|
|
276
|
+
the merged code be surprised by this?_ BLOCKING = yes, definitely; IMPORTANT =
|
|
277
|
+
maybe, needs explanation.
|
|
278
|
+
|
|
279
|
+
## Invariant: stdout only, no inline edits
|
|
280
|
+
|
|
281
|
+
Findings go to stdout only. Do NOT:
|
|
282
|
+
|
|
283
|
+
- Create TodoWrite entries, beads issues, or worklog files inline —
|
|
284
|
+
consolidation into the dual-review batch is the coordinator's job.
|
|
285
|
+
- Edit the code or the plan in response to findings — that is the implementer's
|
|
286
|
+
next step after receiving the consolidated review.
|
|
287
|
+
- Modify git state (no commits, no stashes, no checkouts).
|
|
288
|
+
|
|
289
|
+
The skill reports; the coordinator decides; the implementer fixes. Keep those
|
|
290
|
+
three roles separate or the dual-review batch stops composing cleanly with
|
|
291
|
+
`feature-dev:code-reviewer`.
|
|
292
|
+
|
|
293
|
+
## Integration
|
|
294
|
+
|
|
295
|
+
When an implementer pushes back on a finding from this skill, apply the
|
|
296
|
+
pushback-and-verify protocol from
|
|
297
|
+
`~/.claude/CLAUDE.md § Verification Discipline` — re-read the cited file at the
|
|
298
|
+
cited lines, confirm the quoted plan requirement is verbatim, and confirm the
|
|
299
|
+
implementation state claim is accurate. Findings that don't survive that check
|
|
300
|
+
must be withdrawn or downgraded before the coordinator consolidates the
|
|
301
|
+
dual-review batch. Trace-corrections from the implementer are welcome signal,
|
|
302
|
+
not insubordination.
|
|
303
|
+
|
|
304
|
+
## Scope discipline
|
|
305
|
+
|
|
306
|
+
This skill has ONE job: does the code match what the plan said it would do?
|
|
307
|
+
|
|
308
|
+
It does NOT:
|
|
309
|
+
|
|
310
|
+
- **Judge code quality** — that's `feature-dev:code-reviewer`. Error handling,
|
|
311
|
+
idioms, dead code, security patterns — not this skill's problem.
|
|
312
|
+
- **Perform security review** — that's `security-review`. SQL injection, XSS,
|
|
313
|
+
auth bypass, secret handling — not this skill's problem.
|
|
314
|
+
- **Analyze test coverage** — coverage tools exist for that; this skill reports
|
|
315
|
+
whether the plan's named test paths exist and pass, not whether they hit every
|
|
316
|
+
branch.
|
|
317
|
+
- **Review the plan itself** — pre-implementation plan review is handled by
|
|
318
|
+
`superpowers:writing-plans` (built-in reviewer). If the plan is wrong, that's
|
|
319
|
+
a separate workflow.
|
|
320
|
+
|
|
321
|
+
If a finding would belong in any of the above categories, omit it from
|
|
322
|
+
verify-against-plan output. Coordinator will pick up quality / security /
|
|
323
|
+
coverage gaps via the other skills running in parallel.
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verify-against-source
|
|
3
|
+
description: "Use when verifying that a prose artifact (brainstorm, design spec, plan, or implementation prompt) honors its input/source artifact(s) - the prose counterpart to verify-against-plan. Runs as the conformance axis of the planning-skill review loop. Outputs structured findings - missing scope, silent deviations from the source, scope creep, misunderstandings."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verify Against Source
|
|
7
|
+
|
|
8
|
+
The prose counterpart to `verify-against-plan`. Where `verify-against-plan` asks
|
|
9
|
+
"does the CODE match the plan?", this asks "does this PROSE ARTIFACT honor its
|
|
10
|
+
SOURCE?" — e.g. does a plan honor every locked brainstorm decision, does an
|
|
11
|
+
implementation prompt faithfully translate the plan + bead descriptions.
|
|
12
|
+
|
|
13
|
+
Use it as the **conformance axis** of the planning-skill review loop, paired in
|
|
14
|
+
parallel with a prose-quality reviewer.
|
|
15
|
+
|
|
16
|
+
This skill is **MANDATORY at plan-lock, not optional** — `project-setup`'s
|
|
17
|
+
Phase 0 hard-gates on the `THRUM-REVIEW` stamp's `verify=` field as evidence
|
|
18
|
+
that this skill specifically ran on the plan (see `project-setup/SKILL.md`
|
|
19
|
+
Phase 0). Skipping it is not a soft-enforcement gap; it blocks downstream
|
|
20
|
+
dispatch.
|
|
21
|
+
|
|
22
|
+
## Inputs
|
|
23
|
+
|
|
24
|
+
Two inputs are required. Missing either is a pre-flight bail.
|
|
25
|
+
|
|
26
|
+
### 1. Artifact path (required)
|
|
27
|
+
|
|
28
|
+
The prose document under review — a markdown brainstorm, design spec, plan, or
|
|
29
|
+
implementation prompt.
|
|
30
|
+
|
|
31
|
+
### 2. Source path(s) (required; one or more)
|
|
32
|
+
|
|
33
|
+
The input artifact(s) the artifact must honor. The source changes per stage:
|
|
34
|
+
|
|
35
|
+
| Artifact under review | Source(s) it must honor |
|
|
36
|
+
| --------------------- | --------------------------------------------------- |
|
|
37
|
+
| brainstorm | parent decisions, feature request, ticket, siblings |
|
|
38
|
+
| design spec | the brainstorm (its locked Decision Summary) |
|
|
39
|
+
| plan | the brainstorm + design spec |
|
|
40
|
+
| implementation prompt | the plan + the bead task descriptions |
|
|
41
|
+
|
|
42
|
+
Multiple sources are allowed and common (a plan honors both a brainstorm and a
|
|
43
|
+
spec; a prompt honors both a plan and bead descriptions).
|
|
44
|
+
|
|
45
|
+
### Invocation examples
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
/verify-against-source artifact=dev-docs/plans/YYYY-MM-DD-topic-plan.md source=dev-docs/brainstorms/YYYY-MM-DD-topic-brainstorm.md
|
|
49
|
+
/verify-against-source artifact=dev-docs/prompts/YYYY-MM-DD-topic-prompt.md source=dev-docs/plans/YYYY-MM-DD-topic-plan.md,/tmp/bead-acs.md
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Pre-flight checks
|
|
53
|
+
|
|
54
|
+
This skill reviews **prose against prose**. It deliberately does NOT inherit the
|
|
55
|
+
two pre-flight bails that make `verify-against-plan` unusable on prose artifacts
|
|
56
|
+
— a prose artifact has no code diff, and a brainstorm has no File-Structure or
|
|
57
|
+
Acceptance/Test-plan table. Only these two checks apply:
|
|
58
|
+
|
|
59
|
+
1. **Artifact path exists and is readable.** Verify the path resolves and the
|
|
60
|
+
file is non-empty markdown. Error on failure names the path and the issue
|
|
61
|
+
(missing / empty / unreadable).
|
|
62
|
+
2. **Source path(s) exist and are readable.** Every supplied source path
|
|
63
|
+
resolves and is non-empty.
|
|
64
|
+
|
|
65
|
+
There is **no** non-empty-diff check and **no** File-Structure /
|
|
66
|
+
Acceptance-table requirement. If either input is missing or empty, bail with a
|
|
67
|
+
clear error. Only when both pass should the comparison begin.
|
|
68
|
+
|
|
69
|
+
## Comparison pass
|
|
70
|
+
|
|
71
|
+
For each requirement, decision, or commitment stated in the source(s), classify
|
|
72
|
+
how the artifact treats it:
|
|
73
|
+
|
|
74
|
+
- **honored** — correctly reflected; no finding.
|
|
75
|
+
- **missing** — a source requirement/decision the artifact dropped or
|
|
76
|
+
contradicts.
|
|
77
|
+
- **misunderstood** — implemented but with a silent deviation (different shape,
|
|
78
|
+
scope, or framing than the source decided) that is likely unintentional or
|
|
79
|
+
unconfirmed.
|
|
80
|
+
- **extra (scope creep)** — the artifact introduces something the source did not
|
|
81
|
+
decide and that materially changes scope.
|
|
82
|
+
|
|
83
|
+
Quote the source verbatim with a `<file>:§section` reference (cite by
|
|
84
|
+
section/heading or verbatim quote — never by line number, since line numbers
|
|
85
|
+
drift as documents are edited).
|
|
86
|
+
|
|
87
|
+
### Second comparison unit: prose vs CODE (required)
|
|
88
|
+
|
|
89
|
+
The classification above compares prose to prose. That cannot catch an artifact
|
|
90
|
+
that is wrong about the code. **For every requirement naming a field, struct,
|
|
91
|
+
column, table, RPC parameter, config key, or stored value, open the actual
|
|
92
|
+
definition at the authored-against SHA and diff the claim against it.**
|
|
93
|
+
|
|
94
|
+
Do not sample — **enumerate every such requirement** and record the satisfied
|
|
95
|
+
ones too, with the task that satisfies them. A map that lists only holes cannot
|
|
96
|
+
tell the reader what is safe to build on.
|
|
97
|
+
|
|
98
|
+
Three questions per requirement:
|
|
99
|
+
|
|
100
|
+
1. Is there a task for it?
|
|
101
|
+
2. Does the artifact include **every step** needed to make it true — **including
|
|
102
|
+
creating substrate that does not exist yet**?
|
|
103
|
+
3. Would anything **fail** if it regressed?
|
|
104
|
+
|
|
105
|
+
**Verdicts:** `SATISFIED` · `PARTIAL` · `MISSING-STEP` · `NOT-ADDRESSED`.
|
|
106
|
+
|
|
107
|
+
🔴 **`IMPOSSIBLE` is not a verdict and must never be reported.** If the struct
|
|
108
|
+
lacks the field or the table lacks the column, that is a **MISSING-STEP in the
|
|
109
|
+
artifact — never a defect in the source.** The source is owner-ruled; the plan
|
|
110
|
+
is what is incomplete. Reporting `IMPOSSIBLE` points the next reader at scoping
|
|
111
|
+
down the spec, which is backwards.
|
|
112
|
+
|
|
113
|
+
**Callers must supply the code side.** If the invocation supplies only prose
|
|
114
|
+
sources, report it as a `BLOCKING` finding rather than silently running
|
|
115
|
+
prose-only — a conformance pass that never opened a source file should not
|
|
116
|
+
read as clean.
|
|
117
|
+
|
|
118
|
+
### Third comparison unit: Primitive Ledger (required when hot-root I/O/SQL is present)
|
|
119
|
+
|
|
120
|
+
For every I/O or SQL operation the code side introduces under a hot root
|
|
121
|
+
(`Handle*`/tick/sweeper/`SyncApplier`/boot — see `.thrum/hotpath-gate.json`'s
|
|
122
|
+
`lenses.existing_primitive_bypass.hot_root_indicators`), treat the implementer's Primitive Ledger row itself as
|
|
123
|
+
a requirement to be verified, exactly like the field/struct/column checks
|
|
124
|
+
above: raw op -> callee package searched -> primitive adopted (or none exists
|
|
125
|
+
and a bounded cost formula at production scale).
|
|
126
|
+
|
|
127
|
+
**Verdicts (same taxonomy as above):** `SATISFIED` — a valid ledger row exists
|
|
128
|
+
for the op and, if a primitive is named as adopted, it is actually used at the
|
|
129
|
+
cited call site. `PARTIAL` — a ledger row exists but is incomplete or
|
|
130
|
+
unverified (e.g. a "none exists" claim whose cost formula uses a test-fixture
|
|
131
|
+
number instead of production scale). `MISSING-STEP` — the op was introduced
|
|
132
|
+
under a hot root and no ledger row accounts for it. `NOT-ADDRESSED` — not
|
|
133
|
+
applicable to this artifact (no hot-root I/O/SQL was added).
|
|
134
|
+
|
|
135
|
+
## Output format
|
|
136
|
+
|
|
137
|
+
Findings go to stdout in this exact shape so the caller can consolidate the
|
|
138
|
+
dual-review batch without reformatting.
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
## Verify-Against-Source Findings
|
|
142
|
+
|
|
143
|
+
- **Artifact:** <path>
|
|
144
|
+
- **Source(s):** <path[, path...]>
|
|
145
|
+
- **Summary:** <N> BLOCKING, <N> IMPORTANT, <N> MINOR
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
### BLOCKING #1 — <short descriptor>
|
|
150
|
+
|
|
151
|
+
- **Source reference:** <source file>:§<section> — "<verbatim requirement>"
|
|
152
|
+
- **Artifact state:** <artifact section> or "absent"
|
|
153
|
+
- **Classification:** missing | misunderstood | extra
|
|
154
|
+
- **Why it matters:** <link back to the source decision / locked invariant>
|
|
155
|
+
- **Suggested resolution:** <add the missing content, reconcile the deviation,
|
|
156
|
+
or flag for the caller>
|
|
157
|
+
|
|
158
|
+
### IMPORTANT #1 — …
|
|
159
|
+
|
|
160
|
+
### MINOR #1 — …
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Every finding must include all five fields. If there are no findings in a
|
|
164
|
+
severity bucket, omit that bucket entirely — do not write "### BLOCKING #0 —
|
|
165
|
+
none".
|
|
166
|
+
|
|
167
|
+
## Severity criteria
|
|
168
|
+
|
|
169
|
+
- **BLOCKING** — a locked source decision is dropped or contradicted. Must be
|
|
170
|
+
fixed (or explicitly overridden) before the artifact propagates downstream.
|
|
171
|
+
Example: the brainstorm's Decision Summary locked "X", the spec says "not X"
|
|
172
|
+
or omits X entirely.
|
|
173
|
+
- **IMPORTANT** — a source decision is honored but with a silent deviation
|
|
174
|
+
(different shape/scope/wording) that is probably intentional but unconfirmed,
|
|
175
|
+
OR a partially-honored decision. Should be reconciled or explicitly
|
|
176
|
+
acknowledged. Also: material additions the source never decided (scope creep
|
|
177
|
+
the caller should review).
|
|
178
|
+
- **MINOR** — citation drift, wording mismatch, or a stylistic deviation that
|
|
179
|
+
does not change meaning.
|
|
180
|
+
|
|
181
|
+
When choosing between BLOCKING and IMPORTANT, apply the test: _would a reader
|
|
182
|
+
who trusts the source be surprised by this?_ BLOCKING = yes, definitely;
|
|
183
|
+
IMPORTANT = maybe, needs explanation.
|
|
184
|
+
|
|
185
|
+
- **FEASIBILITY** — a requirement IS present in the source (honored in intent),
|
|
186
|
+
but the reviewer judges it too hard, too risky, or impractical to implement
|
|
187
|
+
as specified. This is a distinct routing signal, NOT a synonym for BLOCKING:
|
|
188
|
+
a BLOCKING finding says "the artifact dropped or contradicted a locked
|
|
189
|
+
decision"; a FEASIBILITY finding says "the artifact kept the decision, but
|
|
190
|
+
implementing it as written may not be achievable." Do not fold a
|
|
191
|
+
FEASIBILITY finding inline into the next revision as a silent scope cut —
|
|
192
|
+
per `coordinator-running-brainstorm-cycles/SKILL.md` § Loop semantics, it
|
|
193
|
+
MUST escalate to the coordinator/intent-owner for an explicit keep/cut/weaken
|
|
194
|
+
ruling; only BLOCKING/IMPORTANT/MINOR findings are the researcher's to
|
|
195
|
+
resolve inline.
|
|
196
|
+
|
|
197
|
+
## Invariant: stdout only, no inline edits
|
|
198
|
+
|
|
199
|
+
Findings go to stdout only. Do NOT:
|
|
200
|
+
|
|
201
|
+
- Create TodoWrite entries, beads issues, or worklog files inline —
|
|
202
|
+
consolidation into the dual-review batch is the caller's job.
|
|
203
|
+
- Edit the artifact or the source in response to findings — that is the author's
|
|
204
|
+
next step after receiving the consolidated review.
|
|
205
|
+
- Modify git state (no commits, no stashes, no checkouts).
|
|
206
|
+
|
|
207
|
+
The skill reports; the caller consolidates; the author fixes. Keep those three
|
|
208
|
+
roles separate or the dual-review batch stops composing cleanly with the
|
|
209
|
+
prose-quality reviewer.
|
|
210
|
+
|
|
211
|
+
## Scope discipline
|
|
212
|
+
|
|
213
|
+
This skill has ONE job: does the artifact honor its source?
|
|
214
|
+
|
|
215
|
+
It does NOT:
|
|
216
|
+
|
|
217
|
+
- **Judge prose quality** — internal consistency, clarity, ambiguity, gaps, and
|
|
218
|
+
contradiction are the prose-quality reviewer's job (the parallel axis), not
|
|
219
|
+
this skill's.
|
|
220
|
+
- **Review the source itself** — if the source is wrong, that is a separate
|
|
221
|
+
workflow (re-open the prior stage's review).
|
|
222
|
+
- **Review code** — that is `verify-against-plan` (code vs plan) and
|
|
223
|
+
`feature-dev:code-reviewer` (code quality).
|
|
224
|
+
|
|
225
|
+
If a finding would belong in any of the above categories, omit it from
|
|
226
|
+
verify-against-source output. The caller picks up quality gaps via the parallel
|
|
227
|
+
prose-quality reviewer.
|
|
228
|
+
|
|
229
|
+
## Integration
|
|
230
|
+
|
|
231
|
+
When an author pushes back on a finding from this skill, apply the
|
|
232
|
+
pushback-and-verify protocol from
|
|
233
|
+
`~/.claude/CLAUDE.md § Verification Discipline` — re-read the cited source at
|
|
234
|
+
the cited section, confirm the quoted requirement is verbatim, and confirm the
|
|
235
|
+
artifact-state claim is accurate. Findings that don't survive that check must be
|
|
236
|
+
withdrawn or downgraded before the caller consolidates the dual-review batch.
|
|
237
|
+
Trace-corrections from the author are welcome signal, not insubordination.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: watcher-archetype
|
|
3
|
+
description: "Use when running as a watcher agent on a scheduled wake - the read-only, wake-run-exit detection loop (scan, then triage plus fix-sketch, then emit, then report, then job done). Loads the deterministic run-cycle discipline and the domain skill-pack plug-in contract for security/lint/deps/etc. watchers built on the v0.11 watcher substrate."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Watcher Archetype: the deterministic run cycle
|
|
7
|
+
|
|
8
|
+
A watcher is a read-only, scheduled agent that detects issues deterministically,
|
|
9
|
+
files/annotates them as beads, and exits. The substrate provides the engine and
|
|
10
|
+
the `thrum watcher` CLI; a domain skill-pack supplies the scanner. Your job each
|
|
11
|
+
wake is to run ONE cycle and exit — never to fix, never to write code.
|
|
12
|
+
|
|
13
|
+
## The non-negotiable invariants
|
|
14
|
+
|
|
15
|
+
1. **Read-only.** Never edit source, never write an in-code marker.
|
|
16
|
+
Markers are implementer-side; you only read them (the scanner does) to
|
|
17
|
+
re-link a finding after a rename.
|
|
18
|
+
2. **Wake-run-exit.** One cycle per wake. No resident loop, no polling.
|
|
19
|
+
3. **Determinism.** The scanner decides findings; you do not. Your only
|
|
20
|
+
judgment is triage + fix-sketch authoring, both keyed by the stable
|
|
21
|
+
fingerprint so they survive line drift.
|
|
22
|
+
4. **Research, don't fix.** You detect and annotate; the implementer fixes.
|
|
23
|
+
5. **Fail toward open.** Never close a finding for a unit you didn't
|
|
24
|
+
actually re-scan.
|
|
25
|
+
|
|
26
|
+
## The loop
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
┌─ scan ───────────────────────────────────────────────────────────────┐
|
|
30
|
+
│ thrum watcher scan --id <id> │
|
|
31
|
+
│ → JSON: {head_commit, mode, needs_triage[], scan_failures[]} │
|
|
32
|
+
│ read-only: no store writes, no cursor advance │
|
|
33
|
+
└───────────────────────────────────────────────────────────────────────┘
|
|
34
|
+
│ needs_triage[] = OPEN/REOPEN findings
|
|
35
|
+
▼
|
|
36
|
+
┌─ triage + fix-sketch (your only judgment) ───────────────────────────┐
|
|
37
|
+
│ For each finding you understand well enough to suggest a fix, add an │
|
|
38
|
+
│ entry to a fix-sketches JSON file keyed by the finding's fingerprint: │
|
|
39
|
+
│ { "<fingerprint>": "<one- or two-line fix sketch>", ... } │
|
|
40
|
+
│ Sketches are advisory text for the implementer — NEVER code, NEVER a │
|
|
41
|
+
│ file edit. Findings you can't sketch still get filed (empty sketch). │
|
|
42
|
+
└───────────────────────────────────────────────────────────────────────┘
|
|
43
|
+
▼
|
|
44
|
+
┌─ emit ───────────────────────────────────────────────────────────────┐
|
|
45
|
+
│ thrum watcher emit --id <id> [--beads] [--fix-sketches sketches.json] │
|
|
46
|
+
│ [--domain <d>] [--priority <p>] │
|
|
47
|
+
│ → applies reconciled actions: detection facts to the store and, │
|
|
48
|
+
│ with --beads, files/closes beads. Advances the run cursor. │
|
|
49
|
+
│ → JSON: the run summary {run_id, new, closed, reopened, ...} │
|
|
50
|
+
└───────────────────────────────────────────────────────────────────────┘
|
|
51
|
+
▼
|
|
52
|
+
┌─ report ─────────────────────────────────────────────────────────────┐
|
|
53
|
+
│ thrum watcher report --id <id> │
|
|
54
|
+
│ → writes report.md + report.json to the agent dir (always-on). │
|
|
55
|
+
│ Then PRINT ONE PANE LINE with a UTC timestamp: │
|
|
56
|
+
│ watcher <id> cycle done <ts> — <N> new, <C> closed, <R> reopened │
|
|
57
|
+
│ The pane line is the verification surface — no digest message. │
|
|
58
|
+
└───────────────────────────────────────────────────────────────────────┘
|
|
59
|
+
▼
|
|
60
|
+
┌─ done ───────────────────────────────────────────────────────────────┐
|
|
61
|
+
│ thrum job done → signal completion; the daemon tears you down. │
|
|
62
|
+
│ Then EXIT. Do not start a second cycle. │
|
|
63
|
+
└───────────────────────────────────────────────────────────────────────┘
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
An empty run (no `needs_triage`) is still valid: run `emit` (advances the
|
|
67
|
+
cursor, records the run), `report`, print the pane line, then `thrum job done`.
|
|
68
|
+
|
|
69
|
+
Scanner-failure, store-loss, and bd-down surface automatically as
|
|
70
|
+
high-priority health-alerts — don't suppress them, nothing else to do.
|
|
71
|
+
|
|
72
|
+
## Domain skill-pack plug-in contract
|
|
73
|
+
|
|
74
|
+
A DOMAIN watcher (security, lint, deps, web-routes, …) is built by composing
|
|
75
|
+
this archetype skill with a domain skill-pack that supplies the domain's
|
|
76
|
+
`enumerate.Enumerator`/`scan.ScannerAdapter` (the deterministic detector,
|
|
77
|
+
compiled in at build time) and its triage guidance. Detection logic ALWAYS
|
|
78
|
+
lives in the domain's scanner, never in agent prose.
|
|
79
|
+
|
|
80
|
+
## Config
|
|
81
|
+
|
|
82
|
+
The watcher's config lives at `.thrum/agents/<id>/` at the repo root
|
|
83
|
+
(resolve via `.thrum/redirect` from a worktree) — see the role preamble for
|
|
84
|
+
the per-wake read. It runs as a `scheduled_agent` job.
|