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,331 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: coordinator-merging-code
|
|
3
|
+
description: "Use the moment code is presented for merge - a merge report arrives, an agent says MERGE-READY or RECOMMEND MERGE or the branch is ready, you are asked to approve or land or ship a branch, you are about to run git merge, or you are consolidating review findings before a merge. Loads the full merge sequence - dual review as a PRECONDITION not the gate, the mechanical merge-worthiness pre-gate, DISPATCHING both Pass-3 gates to the Gate Runner rather than walking the lenses yourself, tripwire checks, gating the MERGED tree, the committed verdict artifact, the efficacy row, and branch disposal."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Coordinator: Merging Code โ the full sequence, every time
|
|
7
|
+
|
|
8
|
+
**Check whether you are the merge king for THIS branch before running this
|
|
9
|
+
sequence.** Do not assume โ read it from config:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
jq -r --arg b "$(git branch --show-current)" \
|
|
13
|
+
'.orchestration.merge_kings[$b] // "unset"' .thrum/config.json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
If it names you, you are the merge king for this branch โ proceed with the
|
|
17
|
+
sequence below. If it names someone else, route the merge to them instead of
|
|
18
|
+
running it yourself. Nothing lands except through this sequence, run by
|
|
19
|
+
whichever coordinator the map names.
|
|
20
|
+
|
|
21
|
+
**`orchestration.merge_kings` may not be populated for every branch yet** (the
|
|
22
|
+
jq command above will print `unset` in that case). An `unset` result does NOT
|
|
23
|
+
mean "nobody is merge king, proceed" โ it means the map hasn't caught up to
|
|
24
|
+
this branch. Fall back to whichever coordinator has actually been the merge
|
|
25
|
+
authority for this branch in practice (check with your team, or your
|
|
26
|
+
project's own operational convention); if that is not you, route the merge
|
|
27
|
+
to them the same as if the map had named them explicitly.
|
|
28
|
+
|
|
29
|
+
> ๐ด **THE ONE THING MOST OFTEN GOT WRONG: YOU DO NOT RUN THE GATES. YOU DISPATCH
|
|
30
|
+
> THEM TO THE GATE RUNNER.** See ยง3. A coordinator that walks the lenses inline
|
|
31
|
+
> burns the one resource it cannot replace and leaves **no auditable verdict** โ
|
|
32
|
+
> and it will feel like diligence the entire time.
|
|
33
|
+
|
|
34
|
+
## 0. What this skill is, and what it is not
|
|
35
|
+
|
|
36
|
+
This is the **coordinator-facing index and running order.** The lens content lives
|
|
37
|
+
in the two gate skills; the runner's own discipline lives in the `gate` role
|
|
38
|
+
preamble.
|
|
39
|
+
|
|
40
|
+
**Do not duplicate lens definitions here.** Point at them and keep the order.
|
|
41
|
+
|
|
42
|
+
## 1. PRECONDITION โ dual review, and it is NOT the gate
|
|
43
|
+
|
|
44
|
+
Two axes, run in parallel, on the branch: **code-quality** and **spec-compliance /
|
|
45
|
+
verify-against-plan**.
|
|
46
|
+
|
|
47
|
+
**Before treating dual review as clean, confirm BOTH axes EMITTED** โ name the
|
|
48
|
+
agent and either one finding or an explicit zero, per axis. **An absent report and
|
|
49
|
+
a clean report are different things**, and silence defaults to the reading you
|
|
50
|
+
want. If an axis goes silent twice, re-route it rather than re-spawning.
|
|
51
|
+
|
|
52
|
+
**A verdict attaches to an OBJECT.** If the branch takes a new commit after review
|
|
53
|
+
โ including a merge-forward โ the prior verdicts do not transfer. **Re-dispatch the
|
|
54
|
+
axes on the delta.** A fix produced in response to a finding is exactly where the
|
|
55
|
+
next defect lives.
|
|
56
|
+
|
|
57
|
+
**Consolidate into ONE numbered list** across all severities before anything goes
|
|
58
|
+
back to the implementer. Never send partial findings; they fix batch 1 and miss
|
|
59
|
+
batch 2.
|
|
60
|
+
|
|
61
|
+
**Verify a finding against source before forwarding it, and verify pushback the
|
|
62
|
+
same way.** Reviewers misread files. Pushback is a feature, not insubordination โ
|
|
63
|
+
and a trace-correction from an implementer is welcome.
|
|
64
|
+
|
|
65
|
+
## 2. MECHANICAL MERGE-WORTHINESS PRE-GATE โ run every time, in this order
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# 1. FETCH BRANCH-EXPLICITLY. A bare `git fetch` is not enough.
|
|
69
|
+
git fetch origin 'refs/heads/<branch>:refs/remotes/origin/<branch>'
|
|
70
|
+
|
|
71
|
+
# 2. RESOLVE FROM ORIGIN, NOT THE LOCAL CACHE. `origin/<branch>` is a cache of your
|
|
72
|
+
# last fetch and will happily report a branch that never left the submitter's box.
|
|
73
|
+
git ls-remote origin <branch>
|
|
74
|
+
|
|
75
|
+
# 3. PROVE THE OBJECT EXISTS *BEFORE* ANY ANCESTRY CLAIM. A fabricated sha and an
|
|
76
|
+
# unfetched one produce IDENTICAL not-ancestor output.
|
|
77
|
+
git cat-file -t <sha>
|
|
78
|
+
|
|
79
|
+
# 4. ANCESTRY โ MIND WHICH PAIR. Doubtful thing on the RIGHT, known base on the LEFT.
|
|
80
|
+
git merge-base --is-ancestor <base> <tip>
|
|
81
|
+
# CONTROL: an invented/all-zeros sha must FAIL the same check.
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
๐ด **`--is-ancestor <merge-base> <tip>` is TRUE BY DEFINITION โ a vacuous green.**
|
|
85
|
+
When you supply SHAs anywhere, **say which PAIR to test**: the tree WITHOUT the
|
|
86
|
+
change and the tree WITH it.
|
|
87
|
+
|
|
88
|
+
**Assert HEAD is attached** (`git symbolic-ref -q HEAD`) and that you are on the
|
|
89
|
+
merge target before merging.
|
|
90
|
+
|
|
91
|
+
## 3. PASS-3 GATES โ DISPATCH BOTH TO THE GATE RUNNER
|
|
92
|
+
|
|
93
|
+
**Resolve the Gate Runner from `thrum team` by its `gate` ROLE โ never by a
|
|
94
|
+
remembered agent name.** A name in a skill goes stale exactly like a copied model
|
|
95
|
+
tier.
|
|
96
|
+
|
|
97
|
+
Record the dispatch on your own queue (`thrum queue assign <bundle>
|
|
98
|
+
<gate-runner>`) per `coordinator-dispatching-work`'s queue step before
|
|
99
|
+
sending the gate dispatch.
|
|
100
|
+
|
|
101
|
+
๐ด **WHERE THE LONG / tmux-SENSITIVE LANES RUN โ a DEDICATED NON-FLEET gate box, never
|
|
102
|
+
a populated one.** The integration lane and the rpc race suite create FIXED-NAME tmux
|
|
103
|
+
fixtures on the shared fleet socket; on any box with live agents they COLLIDE, and every
|
|
104
|
+
such red is a FALSE positive you then burn effort classifying as "pre-existing/env." Run
|
|
105
|
+
them where the verdict is TRUE โ a box with zero live agents. The value is a CLEAN verdict,
|
|
106
|
+
NOT speed (wall-clock is not faster; lane invocation serializes regardless of the
|
|
107
|
+
parallelism flags). **The specific box + ssh/access for THIS fleet is in project_state
|
|
108
|
+
(`DEDICATED GATE BOX`), not here โ this rule is general.** If you catch yourself dispatching
|
|
109
|
+
the gate to a populated box "because the runner lives there," that is the exact forgetting
|
|
110
|
+
this line exists to stop.
|
|
111
|
+
|
|
112
|
+
| Gate | Skill | Skippable? |
|
|
113
|
+
|---|---|---|
|
|
114
|
+
| Hot-path | `coordinator-hotpath-merge-gate` | **Only** if the diff touches zero `trigger_directories` |
|
|
115
|
+
| Philosophy | `coordinator-philosophy-merge-gate` | **NEVER** |
|
|
116
|
+
|
|
117
|
+
**Read the trigger directories and the lens count FROM `.thrum/hotpath-gate.json`,
|
|
118
|
+
at the tree under gate โ never from prose, including this file.**
|
|
119
|
+
|
|
120
|
+
โ ๏ธ **If your trigger-dir query returns EMPTY, treat it as a broken key until
|
|
121
|
+
proven otherwise.** A typo'd `jq` path and a clean skip are byte-identical in the
|
|
122
|
+
output.
|
|
123
|
+
|
|
124
|
+
**Skip BOTH only for a one-line config change, a typo, or a test-only diff.**
|
|
125
|
+
|
|
126
|
+
**Dispatch is the default at every diff size.** Diff size changes what you ask
|
|
127
|
+
for; it never changes who runs it. Only run a gate yourself when **no** gate-role
|
|
128
|
+
agent exists โ and then say so explicitly in the merge record, so the gap is
|
|
129
|
+
visible rather than invisible.
|
|
130
|
+
|
|
131
|
+
### What the dispatch must contain
|
|
132
|
+
|
|
133
|
+
The gate answers the question you ask it. Four required sections:
|
|
134
|
+
|
|
135
|
+
1. **The enumeration key AND any output filter.** A gate can narrow the key
|
|
136
|
+
without touching the key โ widest grep, then filter the *output* on incidental
|
|
137
|
+
vocabulary โ and produce an identical confident "none" about a population it
|
|
138
|
+
silently excluded.
|
|
139
|
+
2. **"VERIFICATION EXECUTED โ every command + its EXIT, or the words NONE RAN."**
|
|
140
|
+
A CLEAN that never states its support is **unfalsifiable** and silently
|
|
141
|
+
defaults to the lane-backed reading. A static-only CLEAN is legitimate and is a
|
|
142
|
+
DIFFERENT CLAIM.
|
|
143
|
+
3. **Name ONE test runner, or serialize the lane.** Parallelism is free for
|
|
144
|
+
reading and unsafe for executing. The rpc suite creates FIXED-NAME tmux
|
|
145
|
+
fixtures on the SHARED FLEET SOCKET; the resulting `duplicate session` failure
|
|
146
|
+
is indistinguishable from a genuine branch regression.
|
|
147
|
+
4. **Diff each gate's proposed efficacy line against its own report body** before
|
|
148
|
+
it lands. One contradicted itself precisely in the half a busy runner pastes
|
|
149
|
+
unread.
|
|
150
|
+
|
|
151
|
+
Also supply **the SHA pair**, **specific questions** (a gate briefed with "review
|
|
152
|
+
this" returns generic coverage), and **the pre-cleared non-findings list** โ things
|
|
153
|
+
already ruled zero-diff on purpose.
|
|
154
|
+
|
|
155
|
+
**Fence: split it.** The runner gets `commit`/`push` path-fenced to its own gate
|
|
156
|
+
worktree; its sub-agents get READ-ONLY git. `checkout`/`reset`/`restore`/`stash`/
|
|
157
|
+
`clean`/`rebase` forbidden in **every** directory for both. Give an escape hatch
|
|
158
|
+
for instrument-and-undo (a `cp` copy, or edit-then-revert) or the careful agent
|
|
159
|
+
breaches the fence doing good work. **Use `rm -r`, NEVER `rm -rf`.**
|
|
160
|
+
**Pasting a fence is not enforcing it.**
|
|
161
|
+
|
|
162
|
+
## 4. THE EXECUTED VERIFY โ SCOPED TO THE CHANGE
|
|
163
|
+
|
|
164
|
+
The ยง3 lens gates (hotpath + philosophy) are the judgement half. The per-merge
|
|
165
|
+
executed half is **scoped to the change**:
|
|
166
|
+
|
|
167
|
+
- Build the merged tree (`go build ./...`).
|
|
168
|
+
- Full-*package* `-race` on the **changed packages only** โ full-package, never
|
|
169
|
+
targeted `-run` (a targeted run misses cross-test races), but only what the diff
|
|
170
|
+
touches.
|
|
171
|
+
- The fast structural checks on the merged tree โ `gate-ban-check`,
|
|
172
|
+
`gate-omitempty-check`, `gate-lockspan-check`, `gate-marker-diff`,
|
|
173
|
+
`gate-stamp-protocol-check` (seconds each; they catch banned flags, `omitempty`
|
|
174
|
+
drift, lock-span, marker and stamp drift regardless of the change).
|
|
175
|
+
- The `merge-base --is-ancestor` fast-forward check (ยง6).
|
|
176
|
+
- Any `*_tripwire_test.go` the change touches must stay green or the diff must
|
|
177
|
+
state why its premise changed; a tripwire edited to accommodate the change is a
|
|
178
|
+
finding, not a fix.
|
|
179
|
+
|
|
180
|
+
**Establish branch-attributable vs pre-existing from the changed-package `-race`
|
|
181
|
+
result** โ a regression adds failures the same packages did not have before. Do
|
|
182
|
+
not classify a scoped change by replaying the whole known-red suite.
|
|
183
|
+
|
|
184
|
+
๐ด **Do NOT run the full all-lanes `make gate` for a merge.** The full suite โ
|
|
185
|
+
every package across lanes A/B/C/D, the integration lane, `gate-ci-mutation-check`,
|
|
186
|
+
the UI lane, the full tripwire/boxstate reconciliation โ is the **periodic
|
|
187
|
+
full-gate cadence**, an agent run on the dedicated isolation box, and it is its own
|
|
188
|
+
skill: **`coordinator-full-gate`**. A merge never triggers it, and its merge-base
|
|
189
|
+
replay is not a per-merge step. Running it per merge is ~2h that on a common-mode-
|
|
190
|
+
red trunk fails on the baseline every time.
|
|
191
|
+
|
|
192
|
+
๐ด **Never kill a test run to stop a collision.** Killing skips Go's cleanup, which
|
|
193
|
+
leaks fixed-name tmux fixtures onto the shared socket and breaks that suite box-
|
|
194
|
+
wide. Let it finish, tell the other runner its results are contaminated, re-run
|
|
195
|
+
after.
|
|
196
|
+
|
|
197
|
+
## 5. GATE THE MERGED TREE, NOT THE BRANCH
|
|
198
|
+
|
|
199
|
+
A clean pre-merge build does not prove the merged result compiles or passes.
|
|
200
|
+
**Merge locally, then build and test, then push โ guarded on the merge's exit
|
|
201
|
+
status, never on having reached the line.**
|
|
202
|
+
|
|
203
|
+
๐ด **A `//go:embed`-ed ASSET IS A TEST SURFACE. Run the embedding package's suite
|
|
204
|
+
on the merged tree even when the diff contains ZERO lines of Go.** "Docs-only" is
|
|
205
|
+
not a risk category; "compiled into the binary" is. Both static gates are blind to
|
|
206
|
+
this by construction โ only execution sees it.
|
|
207
|
+
|
|
208
|
+
**Ask "did anything under an embed path change", never "did any `.go` change".
|
|
209
|
+
Carry the command, never the list:**
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
git grep -l -E '^//go:embed' <sha> -- '*.go' # anchored ^ โ unanchored pulls in prose
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
The role templates are not the risky entry โ **skill files, references and
|
|
216
|
+
strategy docs are compiled in too**, so every skill edit and strategy-doc edit is
|
|
217
|
+
a code change, and those are exactly the diffs routed as low-risk `docs:`.
|
|
218
|
+
|
|
219
|
+
โ ๏ธ **"Comment-only" is not a safe carve-out in Go.** `//go:embed`, `//go:build`
|
|
220
|
+
and `//nolint` are comments with semantics. A diff with zero non-comment changed
|
|
221
|
+
lines can still change what is compiled in. Assert zero changed lines matching
|
|
222
|
+
`//(go:|nolint|\+build)`, **with a control proving the key can fire.**
|
|
223
|
+
|
|
224
|
+
**Redirect test output to a FILE and read the file. Never pipe a test through
|
|
225
|
+
`tail`** โ `$?` after a pipeline is `tail`'s status, so a FAILED run reports
|
|
226
|
+
success, and the dropped lines include the goroutine dump that separates a
|
|
227
|
+
deadlock from an assertion failure.
|
|
228
|
+
|
|
229
|
+
**When a suite is red, establish pre-existing vs introduced by running the same
|
|
230
|
+
suite at the merge-base** in a throwaway detached worktree โ check the
|
|
231
|
+
discriminator, don't assume from the platform: `[ -L /tmp ]`. macOS (symlink)
|
|
232
|
+
needs `/private/tmp`; Linux (real dir) uses `/tmp` (`/private/tmp` may not
|
|
233
|
+
exist there and must not be created) โ and **compare failing sets BY NAME, not
|
|
234
|
+
by count.** Sets differing in both directions indicate flakiness; a regression
|
|
235
|
+
adds failures without removing any.
|
|
236
|
+
|
|
237
|
+
## 6. RE-DERIVE ANCESTRY IN THE SAME TURN AS THE MERGE
|
|
238
|
+
|
|
239
|
+
**An ancestry check from ten minutes ago is not a check.** Trunk moves. Bind the
|
|
240
|
+
re-derivation to the irreversible ACT, not to a ceremony earlier in the sequence.
|
|
241
|
+
|
|
242
|
+
Resolve trunk through its **remote-tracking ref**, and prefer two instruments
|
|
243
|
+
agreeing (`rev-parse origin/<branch>` and `ls-remote`). **Assert the branch TIP**
|
|
244
|
+
โ ancestry proves a merge EXISTS, never WHAT landed.
|
|
245
|
+
|
|
246
|
+
## 7. AFTER THE MERGE โ four things, none optional
|
|
247
|
+
|
|
248
|
+
1. **The verdict artifact.** The runner saves verdicts to
|
|
249
|
+
`dev-docs/gate-reports/<ISO-week>/<date>/<gate-slug>/` and **commits them
|
|
250
|
+
BEFORE removing any worktree.** Save โ commit โ then destroy. A verdict that
|
|
251
|
+
exists only in a message cannot be audited later.
|
|
252
|
+
2. **The efficacy row**, in `dev-docs/hotpath-gate-efficacy.md` โ required for
|
|
253
|
+
**every** trigger-dir merge, including `SKIPPED_WITH_EVIDENCE` rows and
|
|
254
|
+
orchestrator-run merges. The log measures gate **coverage**, not just outcomes.
|
|
255
|
+
Record `FALSE_POSITIVE=0` explicitly on a clean run so the zero is a
|
|
256
|
+
measurement rather than an absence.
|
|
257
|
+
3. **Commit accumulated agent state** under `.thrum/agents/` along with the merge.
|
|
258
|
+
Uncommitted agent state exists in exactly one working tree, and it IS the
|
|
259
|
+
agent's memory across restarts. **Never `git add -f`.**
|
|
260
|
+
4. **Delete the merged branch AND drop its queue bundle โ one ritual, at merge
|
|
261
|
+
time**, after the push is verified. `feature/*` and `fix/*` are one-shot โ
|
|
262
|
+
delete freely. **`agent/*`, `salvage/*`, `website-dev` and `release/*` are
|
|
263
|
+
ongoing or archival โ do NOT delete.** Then, in the same turn: `thrum queue
|
|
264
|
+
done <bundle>` + `thrum queue drop <bundle>` for the bundle that tracked this
|
|
265
|
+
branch, and `bd close <id>` any beads this merge closed. A merge is not
|
|
266
|
+
complete until the branch ref AND its queue bundle are both gone โ the same
|
|
267
|
+
act that lands the code retires its tracking.
|
|
268
|
+
|
|
269
|
+
## 7a. BEFORE YOU ACCEPT A VERDICT โ CONFIRM THE RUNNER TORE ITS OWN THINGS DOWN
|
|
270
|
+
|
|
271
|
+
A gate leaves behind worktrees, agents AND tmux sessions. The worktree half is
|
|
272
|
+
covered in the runner's preamble; the agent/session half needs the same check.
|
|
273
|
+
|
|
274
|
+
**Ask for it in the verdict, and verify it yourself โ it is one command:**
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
thrum tmux status | grep -E '^\s*g[0-9]+' # gate sessions, agentless ones included
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
๐ด **`thrum team` and `thrum agent list` CANNOT SEE an agentless session.** Five of
|
|
281
|
+
those nine had no registered agent, so a registry-based enumeration returns a
|
|
282
|
+
confident answer that omits most of the population. **Enumerate sessions, not
|
|
283
|
+
agents.**
|
|
284
|
+
|
|
285
|
+
๐ด **AND WATCH FOR `--force` IN THE TEARDOWN REPORT. `git worktree remove` REFUSES at rc=128 on untracked files โ THE REFUSAL IS THE PROTECTION, NOT THE ENUMERATION.** A clean enumeration therefore *invites* the flag that removes it. **Any `--force` must arrive as an OVERRIDE with a justification, never as a pass**, and a clean guard result is not a justification.
|
|
286
|
+
|
|
287
|
+
**A verdict is not complete until its runtime is gone.** Accept the finding, then
|
|
288
|
+
ask: which worktrees, which agents, which sessions, and what does the count read
|
|
289
|
+
now. **Never run `thrum agent cleanup --force`** to tidy up โ its "orphans"
|
|
290
|
+
include live agents fleet-wide.
|
|
291
|
+
|
|
292
|
+
## 8. MERGED != INSTALLED != RUNNING
|
|
293
|
+
|
|
294
|
+
Three facts; only the third is behaviour. A merged fix to any `//go:embed`-ed
|
|
295
|
+
template or skill is **dead until a binary carrying it runs**, and the running
|
|
296
|
+
binary may rewrite generated files from its own stale embedded copy meanwhile.
|
|
297
|
+
**A generated file is never admissible evidence of what is merged.**
|
|
298
|
+
|
|
299
|
+
Say which of the three you verified. "Deployed" that silently covers all three
|
|
300
|
+
hides staleness.
|
|
301
|
+
|
|
302
|
+
## 9. Red flags โ STOP
|
|
303
|
+
|
|
304
|
+
- Walking the Pass-3 lenses yourself when a gate-role agent exists.
|
|
305
|
+
- Treating dual review as the gate.
|
|
306
|
+
- Carrying a prior verdict onto a new SHA.
|
|
307
|
+
- An efficacy row that contradicts its own report body.
|
|
308
|
+
- Reading `--is-ancestor <merge-base> <tip>` as a check.
|
|
309
|
+
- A zero from a trigger-dir query, accepted without a control.
|
|
310
|
+
- `go test โฆ | tail`, or `$?` read after any pipe.
|
|
311
|
+
- Pushing without guarding on the merge's exit status.
|
|
312
|
+
- Declaring a class closed on a count you did not re-derive.
|
|
313
|
+
- Deleting `agent/*`, `salvage/*`, `website-dev` or `release/*`.
|
|
314
|
+
- Pushing a merge without dropping the queue bundle that tracked it.
|
|
315
|
+
|
|
316
|
+
## See also
|
|
317
|
+
|
|
318
|
+
- `coordinator-hotpath-merge-gate` ยท `coordinator-philosophy-merge-gate` โ the lenses
|
|
319
|
+
- `coordinator-running-review-cycles` โ the dual-review cycle feeding ยง1
|
|
320
|
+
- `coordinator-branch-split-on-block` โ when a gate blocks one concern of a bundled branch
|
|
321
|
+
- `dev-docs/gate-reports/README.md` โ the artifact contract
|
|
322
|
+
- `.thrum/hotpath-gate.json` ยท `.thrum/philosophy.md` โ the configs; read these, not prose
|
|
323
|
+
|
|
324
|
+
## Project-specific rules (already loaded)
|
|
325
|
+
|
|
326
|
+
Read the shared partial at the absolute path:
|
|
327
|
+
`claude-plugin/commands/_project-rules-protocol.md`
|
|
328
|
+
|
|
329
|
+
If you accumulate a new rule mid-session (the user corrects you), capture it via
|
|
330
|
+
the `coordinator-maintaining-memory` skill โ it references the
|
|
331
|
+
`memory-write-discipline` common for the canonical `thrum memory create` shape.
|