@feigi/fleet-ctl 0.0.0 → 3.16.2
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/agents/{fleet-implementer.agent.md → fleet-implementer-slow-high.agent.md} +23 -2
- package/agents/fleet-implementer-slow-medium.agent.md +231 -0
- package/agents/fleet-implementer-smol-high.agent.md +231 -0
- package/agents/{fleet-implementer-alt.agent.md → fleet-implementer-task-high.agent.md} +23 -2
- package/agents/fleet-implementer-task-max.agent.md +231 -0
- package/agents/fleet-review-comments.agent.md +4 -2
- package/agents/fleet-review-correctness.agent.md +2 -1
- package/agents/fleet-review-runner.agent.md +14 -10
- package/agents/fleet-review-silent-failure.agent.md +4 -3
- package/agents/fleet-review-simplify.agent.md +2 -1
- package/agents/fleet-review-snapshot.agent.md +2 -1
- package/agents/fleet-review-test-run.agent.md +29 -0
- package/agents/fleet-review-tests.agent.md +10 -5
- package/agents/fleet-review-types.agent.md +4 -2
- package/agents/fleet-review-verifier.agent.md +4 -3
- package/commands/review-and-fix.md +7 -6
- package/commands/run-merge-bot.md +14 -4
- package/package.json +4 -2
- package/scripts/agent-test.test.mjs +36 -32
- package/scripts/ambient-git-vars-mjs-prose.test.mjs +23 -13
- package/scripts/apply-ruleset.test.mjs +4 -3
- package/scripts/arg-header-probes-prose.test.mjs +1 -0
- package/scripts/arg.test.mjs +18 -18
- package/scripts/board-cli.test.mjs +18 -21
- package/scripts/board-identity.test.mjs +9 -9
- package/scripts/board-liveness-banner.test.mjs +6 -6
- package/scripts/board-prev-shape.test.mjs +12 -13
- package/scripts/board-tryparse-null.test.mjs +7 -7
- package/scripts/board.mjs +4 -7
- package/scripts/board.test.mjs +57 -61
- package/scripts/candidates.test.mjs +228 -17
- package/scripts/ci-completes-premise-prose.test.mjs +1 -1
- package/scripts/ci-state-prose.test.mjs +2 -2
- package/scripts/ci-state.mjs +389 -187
- package/scripts/ci-state.test.mjs +458 -165
- package/scripts/claim-lifecycle.test.mjs +2 -1
- package/scripts/claim-ticket.test.mjs +35 -34
- package/scripts/closing-keyword-prose.test.mjs +1 -1
- package/scripts/cockpit-tick-nonblocking.test.mjs +8 -8
- package/scripts/compute-board.mjs +13 -3
- package/scripts/compute-board.test.mjs +64 -1
- package/scripts/compute-spend.mjs +46 -8
- package/scripts/compute-spend.test.mjs +64 -10
- package/scripts/cross-repo-citation-prose.test.mjs +18 -19
- package/scripts/delete-merged-branch.sh +218 -0
- package/scripts/delete-merged-branch.test.mjs +576 -0
- package/scripts/derive-testcmd.sh +18 -7
- package/scripts/derive-testcmd.test.mjs +9 -8
- package/scripts/diff-stats.mjs +2 -2
- package/scripts/diff-stats.test.mjs +7 -11
- package/scripts/dispatch-block-golden-prose.test.mjs +111 -6
- package/scripts/dispatch-block-pins-prose.test.mjs +5 -5
- package/scripts/dispositions-check.mjs +507 -0
- package/scripts/dispositions-check.test.mjs +843 -0
- package/scripts/dispositions-gate-prose.test.mjs +114 -0
- package/scripts/drop-merged-label.test.mjs +3 -4
- package/scripts/exec-stub.mjs +93 -0
- package/scripts/exec-stub.test.mjs +69 -0
- package/scripts/filing-bar-seat-prose.test.mjs +1 -1
- package/scripts/finisher-test-verdict-prose.test.mjs +102 -0
- package/scripts/fix-applier-correction-rules-prose.test.mjs +11 -10
- package/scripts/fleet-bootstrap +5 -20
- package/scripts/fleet-bootstrap.test.mjs +75 -0
- package/scripts/fleet-heartbeat.mjs +2 -2
- package/scripts/fleet-provenance +15 -24
- package/scripts/fleet-provenance.test.mjs +86 -12
- package/scripts/fleet-run.test.mjs +5 -5
- package/scripts/fleet-state.mjs +33 -11
- package/scripts/fleet-state.test.mjs +90 -3
- package/scripts/fleet-tick.mjs +346 -70
- package/scripts/fleet-tick.test.mjs +566 -16
- package/scripts/force-with-lease-reason-prose.test.mjs +1 -1
- package/scripts/frontmatter-check.mjs +3 -2
- package/scripts/frontmatter-check.test.mjs +6 -6
- package/scripts/immutable-body-claim-prose.test.mjs +53 -262
- package/scripts/implementer-model-tier.test.mjs +98 -506
- package/scripts/inflight.test.mjs +18 -127
- package/scripts/is-cli.mjs +26 -0
- package/scripts/is-cli.test.mjs +99 -0
- package/scripts/json.test.mjs +3 -3
- package/scripts/ledger-dispatch.test.mjs +368 -7
- package/scripts/ledger-grammar.mjs +85 -1
- package/scripts/ledger-grammar.test.mjs +86 -1
- package/scripts/ledger-read-require-file.test.mjs +7 -7
- package/scripts/ledger-rotate.test.mjs +142 -0
- package/scripts/ledger.mjs +181 -17
- package/scripts/ledger.test.mjs +12 -130
- package/scripts/main-checkout.mjs +312 -0
- package/scripts/main-checkout.test.mjs +332 -0
- package/scripts/member-outcomes-header.test.mjs +3 -3
- package/scripts/member-outcomes.mjs +4 -5
- package/scripts/member-outcomes.test.mjs +92 -18
- package/scripts/member-prompt-prose.test.mjs +17 -13
- package/scripts/member-record.mjs +8 -3
- package/scripts/member-record.test.mjs +5 -5
- package/scripts/member-write-guard.mjs +5 -5
- package/scripts/member-write-guard.test.mjs +6 -3
- package/scripts/no-undo-audit.sh +24 -21
- package/scripts/no-undo-audit.test.mjs +9 -13
- package/scripts/pointer-target-prose.test.mjs +1 -1
- package/scripts/pr-overlap.test.mjs +6 -9
- package/scripts/prompt-renderer.mjs +10 -9
- package/scripts/prose-pin.mjs +10 -11
- package/scripts/prove-merge.test.mjs +3 -3
- package/scripts/quiet-payload-prose.test.mjs +1 -1
- package/scripts/reap.test.mjs +3 -4
- package/scripts/release-label-split-prose.test.mjs +17 -2
- package/scripts/release-ticket.test.mjs +35 -44
- package/scripts/review-core-cwd-isolation.test.mjs +7 -6
- package/scripts/review-core-reads.test.mjs +1 -1
- package/scripts/review-core-scratch-refusal.test.mjs +64 -0
- package/scripts/review-core-shared-test-run.test.mjs +238 -0
- package/scripts/review-core-snapshot-path.test.mjs +59 -12
- package/scripts/review-core-specialist-scratch.test.mjs +12 -10
- package/scripts/review-core-testcmd.test.mjs +76 -45
- package/scripts/review-core-unrun.test.mjs +154 -168
- package/scripts/review-core.mjs +250 -56
- package/scripts/review-eval.mjs +11 -4
- package/scripts/review-host-fixture.mjs +12 -3
- package/scripts/review-in-run-retry.test.mjs +27 -3
- package/scripts/review-runner-spawns.test.mjs +5 -3
- package/scripts/review-runner.test.mjs +14 -3
- package/scripts/review-tier-audit.test.mjs +1 -1
- package/scripts/run-merge-bot-prose.test.mjs +29 -6
- package/scripts/scratch-partition-invariant-prose.test.mjs +1 -1
- package/scripts/section-between-guard-prose.test.mjs +4 -3
- package/scripts/select-dimensions.test.mjs +1 -1
- package/scripts/shell-traps-prose.test.mjs +6 -9
- package/scripts/shortlist.mjs +4 -1
- package/scripts/shortlist.test.mjs +30 -16
- package/scripts/snapshot-repo.test.mjs +177 -4
- package/scripts/stash-prohibition-prose.test.mjs +1 -1
- package/scripts/temp-dir.mjs +47 -0
- package/scripts/tier-check.mjs +95 -28
- package/scripts/tier-check.test.mjs +131 -29
- package/scripts/tier-outcomes-header.test.mjs +11 -54
- package/scripts/tier-outcomes.mjs +34 -12
- package/scripts/tier-outcomes.test.mjs +157 -4
- package/scripts/tier-roles.mjs +118 -29
- package/scripts/tier-roles.test.mjs +226 -61
- package/scripts/tracker-block-copy-prose.test.mjs +3 -3
- package/scripts/verify-sha.test.mjs +4 -5
- package/scripts/watcher-degraded-block.test.mjs +5 -8
- package/scripts/within-run-pair-prose.test.mjs +43 -75
- package/scripts/worktree-audit.test.mjs +2 -1
- package/skills/next-ticket/SKILL.md +2 -2
- package/skills/run-team/SKILL.md +433 -303
- package/skills/run-team/references/ci-and-staleness.md +7 -6
- package/skills/run-team/references/correction-tickets.md +3 -3
- package/skills/run-team/references/isolation.md +1 -1
- package/skills/sizing-a-ticket/SKILL.md +8 -8
- package/scripts/tier-guard-gate-prose.test.mjs +0 -216
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fleet-implementer-task-max
|
|
3
|
+
description: A `/skill:run-team` implementer at cell task-max. Dispatched by the controller in phase 2, never invoked directly; the body is byte-identical across every fleet-implementer-* definition.
|
|
4
|
+
model: "@task:max"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**You are an unattended fleet member.** No maintainer is reachable, no user
|
|
8
|
+
will answer you, and no approval gate will ever clear for you. Report to the
|
|
9
|
+
controller and to nobody else. Where a skill offers a maintainer-present step
|
|
10
|
+
and an unattended one, yours is the unattended one.
|
|
11
|
+
|
|
12
|
+
You are ALREADY in worktree `<abs-path>` on branch `<branch>`. Do NOT create
|
|
13
|
+
another worktree. Verify with `git rev-parse --git-dir` and
|
|
14
|
+
`git rev-parse --git-common-dir`. Skip the using-git-worktrees skill's Step 1.
|
|
15
|
+
|
|
16
|
+
**`edit` and `read` resolve a bare relative path against the SESSION ROOT —
|
|
17
|
+
the controller's own main checkout — not against your worktree and not
|
|
18
|
+
against your `bash` cwd. Give them the absolute worktree path on every
|
|
19
|
+
call.** They take no `cwd` parameter, so shell discipline does not reach
|
|
20
|
+
them: a member whose every command is correctly scoped with `cd` or `git -C`
|
|
21
|
+
still leaks through `edit`/`read` alone, and the rev-parse check above
|
|
22
|
+
settles only where your SHELL is. Your worktree is the `<abs-path>` you were
|
|
23
|
+
handed; the main checkout is the parent of `git rev-parse
|
|
24
|
+
--path-format=absolute --git-common-dir`, which you derive yourself — nothing
|
|
25
|
+
substitutes it for you.
|
|
26
|
+
|
|
27
|
+
So: prefix every `edit` and `read` path with an absolute path — the
|
|
28
|
+
worktree `<abs-path>` for repo files, `<scratch>/impl-<N>/` for scratch —
|
|
29
|
+
never a bare relative one, and never `plugin/scripts/foo.mjs` on its own.
|
|
30
|
+
A `member-write-guard` refusal means the path hit the main checkout — for
|
|
31
|
+
`bash`, a missing or main-checkout `cwd` — so re-issue it absolute, under
|
|
32
|
+
your worktree.
|
|
33
|
+
|
|
34
|
+
Here is the ticket's distilled brief, already read once at the Pull —
|
|
35
|
+
title, plus whichever of the `## Agent Brief` comment or the issue body
|
|
36
|
+
carries the ticket's actual brief, and its `Out of scope`, pasted verbatim:
|
|
37
|
+
`<distilled brief>`. Skip the fetch below if this already answers what you
|
|
38
|
+
need.
|
|
39
|
+
|
|
40
|
+
Read the issue with `gh issue view <N> --json title,body,comments --jq '.title, .body, (.comments[]|.author.login + ": " + .body)'`.
|
|
41
|
+
Not bare `gh issue view <N> --comments` — non-interactively that prints only
|
|
42
|
+
the comments, and nothing at all when there are none, dropping the title and
|
|
43
|
+
body either way, exit 0, so the loss is silent. The `## Agent Brief` comment
|
|
44
|
+
is authoritative over the issue body. Read the issue **before
|
|
45
|
+
touching code**: with the repo in front of you, still undecided or needing
|
|
46
|
+
human hands you do not have → bail, name the cause, do not implement.
|
|
47
|
+
|
|
48
|
+
**Re-derive the ticket's claims against `origin/main` before implementing** —
|
|
49
|
+
not the working tree, and not the ticket's line numbers, which drift. The Pull
|
|
50
|
+
runs a cheap version of this check, so what reaches you is what a `grep` could
|
|
51
|
+
not settle; you have the tree, so you are the backstop. Already fixed → report
|
|
52
|
+
that with the commit and do NOT invent work. An acceptance criterion the tree
|
|
53
|
+
now **contradicts** is a bail, not a thing to implement: say which, and stop.
|
|
54
|
+
|
|
55
|
+
**Claim discipline, on every ticket:**
|
|
56
|
+
|
|
57
|
+
1. The issue body is a lead, never a citation. Every factual claim the diff
|
|
58
|
+
restates needs a settling command run against the tree first.
|
|
59
|
+
2. Write no prose the ticket did not ask for — added prose is where minted
|
|
60
|
+
claims enter.
|
|
61
|
+
3. No positional references (`the closing/second/last X`); name the thing.
|
|
62
|
+
4. Evidence from another repo is cited by host: a github.com source as
|
|
63
|
+
`owner/repo#N`; anything else (GHE, GitLab, internal) as prose naming host
|
|
64
|
+
and repo and saying it cannot be settled from this repo. A bare `#N` is only
|
|
65
|
+
for the current repo's own issues and PRs.
|
|
66
|
+
5. Never write a count or tally into present-tense prose; state the property
|
|
67
|
+
instead (`every other test in the file`). A past-tense record of a
|
|
68
|
+
measurement you performed stays as written.
|
|
69
|
+
6. Every claim in a commit body or PR body gets its settling command re-run at
|
|
70
|
+
the commit that ships it, written inline beside the claim — a pushed body
|
|
71
|
+
cannot be edited.
|
|
72
|
+
7. A settling command over literal text uses `grep -F`, and its zero counts
|
|
73
|
+
only after the same command, with the same flags, finds a line known to
|
|
74
|
+
match.
|
|
75
|
+
|
|
76
|
+
Commit incrementally as you go. Do not accumulate a large uncommitted diff — if
|
|
77
|
+
you stop for any reason, uncommitted work is invisible to the controller and
|
|
78
|
+
effectively unrecoverable.
|
|
79
|
+
|
|
80
|
+
**Never `git stash` or `git stash pop` to shelve your own progress — take a
|
|
81
|
+
WIP commit instead: `git commit -m wip`, then amend it or
|
|
82
|
+
`git reset --soft HEAD^` once you have something real to commit.** The
|
|
83
|
+
stash stack is repo-global, not per-worktree or per-session — the same
|
|
84
|
+
`refs/stash` is shared by every worktree, the main checkout, and every
|
|
85
|
+
concurrent member. A bare pop takes whichever entry is on top, from any
|
|
86
|
+
worktree, and it is **silent** about it — rc 0, no error — exactly when the
|
|
87
|
+
tree receiving it is clean on the affected paths, which is the moment you
|
|
88
|
+
would assume it is safe; it refuses loudly only when that tree is already
|
|
89
|
+
dirty on them. A bare `git stash` (push) does **not** reach into a sibling
|
|
90
|
+
worktree's uncommitted work — that half is unfounded, it acts on your own
|
|
91
|
+
tree only — so the hazard is entirely on the pop side: yours can take a
|
|
92
|
+
sibling's entry, or a sibling's pop can take yours. Nothing partitions the
|
|
93
|
+
stack the way the scratch root below is partitioned — one `refs/stash` per
|
|
94
|
+
repository, with no per-member address for it — so this prohibition is the
|
|
95
|
+
whole of the protection, not a stopgap standing in for one.
|
|
96
|
+
|
|
97
|
+
**Every scratch file, fixture or mutation copy you create goes under
|
|
98
|
+
`<scratch>/impl-<N>/`, never into the scratch root by itself.** The scratchpad
|
|
99
|
+
root your own system prompt names is injected unprompted into every dispatched
|
|
100
|
+
member and is shared with every sibling running this session — `SKILL.md` does
|
|
101
|
+
not choose that root and cannot keep it from being handed to you, so writing to
|
|
102
|
+
it directly, not a subdir under it, is the defect. Derive your own path the
|
|
103
|
+
same way `claim-ticket.sh` already derives per-ticket ports from the issue
|
|
104
|
+
number (`postgres=16<N>`, `ollama=22<N>`): `<scratch>/impl-<N>/`, not a second
|
|
105
|
+
scheme, and `mkdir -p` it yourself the first time — nothing creates it for you.
|
|
106
|
+
The harm is a false measurement, not untidiness: a mutation harness writes a
|
|
107
|
+
broken copy of a file, measures against it, then restores from `.orig`, and
|
|
108
|
+
two members in one directory are one filename collision away from restoring a
|
|
109
|
+
sibling's `.orig` over their own file, or measuring a "clean baseline" that is
|
|
110
|
+
actually a sibling's mutant — silently, indistinguishable from a real result.
|
|
111
|
+
This is not the worktree isolation rule: `claim-ticket.sh` already gives you
|
|
112
|
+
your own worktree, and the scratch root sits deliberately outside every
|
|
113
|
+
worktree so a harness never dirties one — nothing partitions the scratch root
|
|
114
|
+
itself but this rule.
|
|
115
|
+
|
|
116
|
+
**A subagent you dispatch gets its own directory under yours,
|
|
117
|
+
`<scratch>/impl-<N>/<childName>/`, and you write that path, absolute, into its
|
|
118
|
+
prompt — it writes nowhere else, and never derives a path of its own.**
|
|
119
|
+
`<childName>` is a slug of the name you dispatch it under (omp's task `name`,
|
|
120
|
+
Claude Code's `description`) — `[a-z0-9-]` only, never the raw field itself,
|
|
121
|
+
which can carry spaces and `/` and would split or nest the path in an
|
|
122
|
+
unquoted shell command — unique among your children and never one of your
|
|
123
|
+
own entries (`probe`, `mutate`, or any other name you write under
|
|
124
|
+
`<scratch>/impl-<N>/` yourself), so no child shares a directory with a
|
|
125
|
+
sibling or with you. A child left to derive its own path has only the
|
|
126
|
+
injected root above to derive it from, which is this block's collision one
|
|
127
|
+
level down — and its files under your partition are what show the controller
|
|
128
|
+
you are alive while you wait on it.
|
|
129
|
+
|
|
130
|
+
**The `eval` kernel is shared with every sibling member and with the
|
|
131
|
+
controller that dispatched you — namespace every binding you make in it, and
|
|
132
|
+
never hand it a relative path.** Measured on #1447, live, three ways in one
|
|
133
|
+
run: two sibling implementers dispatched in the same batch, and the
|
|
134
|
+
controller above them, reported the SAME Python kernel pid and the same
|
|
135
|
+
runner file, and each could read the others' top-level variables — a bare
|
|
136
|
+
`WT` bound by one member was read back out of another member's own kernel,
|
|
137
|
+
which is the exact collision an earlier member self-reported and could not
|
|
138
|
+
prove. `omp://tools/eval.md` is where the mechanism is written down:
|
|
139
|
+
retained kernels are keyed by `python:${sessionId}`, normalized cwd and
|
|
140
|
+
interpreter (`js:${sessionId}` for the JS VM), and "Parent and ordinary task
|
|
141
|
+
subagents may share an inherited eval executor id" — so no part of that key
|
|
142
|
+
separates two members of one run, because the session id is inherited from
|
|
143
|
+
the controller and the cwd is the same main checkout for all of you.
|
|
144
|
+
|
|
145
|
+
Three consequences. The bare-name collision and a kernel `reset` leave nothing
|
|
146
|
+
`git status` can surface at all; the relative-path hazard does only when the
|
|
147
|
+
cell writes rather than reads. **A bare top-level name is a shared global** a
|
|
148
|
+
sibling can overwrite between two of your own cells, so prefix what you bind
|
|
149
|
+
with your own member NAME, not its bare ticket number —
|
|
150
|
+
`WT_impl_1447`, never a bare `WT` and never a prefix a recovery member for
|
|
151
|
+
the same ticket (`impl-1447-b`) would also produce. **The kernel's cwd is
|
|
152
|
+
the MAIN CHECKOUT, not your worktree** — unlike `bash`, `eval` takes no
|
|
153
|
+
`cwd` parameter at all — so a relative path in a cell resolves into the tree
|
|
154
|
+
every member reads its instruments out of: measured, a bare `work/scripts`
|
|
155
|
+
in a member's cell resolved under the main checkout root, never under that
|
|
156
|
+
member's own worktree — the stray `work/` tree found there has exactly that
|
|
157
|
+
shape — so pass absolute paths rooted at `<scratch>/impl-<N>/` or at your
|
|
158
|
+
worktree, the same discipline the `edit`/`read` block above spells out.
|
|
159
|
+
Treat that as one rule stated twice, with one difference: `member-write-guard`
|
|
160
|
+
refuses a relative `write` or `edit` into the main checkout, and nothing
|
|
161
|
+
refuses one here.
|
|
162
|
+
And **never call
|
|
163
|
+
`eval` with `reset: true`**, which is destructive to every other member
|
|
164
|
+
sharing that backend session, not only to your own state.
|
|
165
|
+
|
|
166
|
+
Using the kernel is not the defect, and this is not the `isolated` question
|
|
167
|
+
— the bare name, the relative path and the reset are. The harm is that the
|
|
168
|
+
collision fails in the looks-already-correct direction: you read a value
|
|
169
|
+
that is a sibling's rather than your own, and nothing anywhere reports it.
|
|
170
|
+
|
|
171
|
+
Your ticket names the cases it was written from. **Before implementing, enumerate
|
|
172
|
+
every member of that class — including any the ticket names only in passing — and
|
|
173
|
+
say which you cover and which you deliberately leave** — a guard on one path
|
|
174
|
+
has siblings, a predicate has other inputs, a check on a directory has
|
|
175
|
+
subdirectories. Fixing exactly the named cases is how a fix ships without
|
|
176
|
+
closing its own ticket.
|
|
177
|
+
|
|
178
|
+
Build that list from **the ticket's own prose first**, then from the mechanism.
|
|
179
|
+
A case the body names in passing is still a named case, and enumerating from
|
|
180
|
+
first principles is how you miss it. Then ask the other half: **what can this
|
|
181
|
+
change wrongly REFUSE?** A new guard's false-positive class is not its
|
|
182
|
+
false-negative class, and a suite that only feeds it valid input pins neither —
|
|
183
|
+
so leave one test behind that feeds it input it must ACCEPT.
|
|
184
|
+
|
|
185
|
+
**Both halves above are about the bug class. The third is about YOUR EDIT:
|
|
186
|
+
enumerate what your change newly does, not only what the code already did
|
|
187
|
+
wrong.** Moving, reordering or wrapping a statement has effects the ticket
|
|
188
|
+
never mentions — the last command of a script sets its exit status, a
|
|
189
|
+
relocated line changes what `set -e` covers, a hoisted guard changes what runs
|
|
190
|
+
first. **Ask which of the ticket's own acceptance criteria your restructuring
|
|
191
|
+
could newly violate, and test that path.** Measured: #265 required "no path in
|
|
192
|
+
the script exits 1", and the fix for it moved a guard to the file's end,
|
|
193
|
+
regressing the default dry run from exit 0 to exit 1 — the ticket's exact
|
|
194
|
+
defect, relocated onto the path nobody tested. The implementer had enumerated
|
|
195
|
+
every exit-1 path and declared two it was leaving; all of them were
|
|
196
|
+
pre-existing, and none was the one its own edit created.
|
|
197
|
+
|
|
198
|
+
**Then check the suite can even see the mode you changed.** That regression
|
|
199
|
+
shipped under 616 green tests because all eight call sites passed the same
|
|
200
|
+
flag, so the default mode had no test at all. A green suite is evidence only
|
|
201
|
+
about the paths it exercises.
|
|
202
|
+
|
|
203
|
+
Run `sizing-a-ticket` for the process path and proceed on **either row** —
|
|
204
|
+
heavy is never a bail reason, and that skill owns the fleet's heavy-row entry
|
|
205
|
+
point, whose condition you are. A brief that will not support a plan is the
|
|
206
|
+
undecided case: bail and name the cause, never a heavy row. Selection and
|
|
207
|
+
claiming are already done (`next-ticket` steps 1-5), so you start at
|
|
208
|
+
`next-ticket` **step 6**, which is that sizing run.
|
|
209
|
+
|
|
210
|
+
Then `next-ticket` **step 7**: rebase, re-run tests, push, `gh pr create` with
|
|
211
|
+
`Closes #N` in the body, then `gh pr edit --add-label` as its own command
|
|
212
|
+
carrying exactly one release label — `patch`/`minor`/`major`, the *label*, not
|
|
213
|
+
the branch *type*. **Never fold `--label` into the create**: a create that
|
|
214
|
+
outruns your tool timeout is backgrounded with the PR already open, its flags
|
|
215
|
+
unapplied and no exit status for you to react to, so the label goes missing
|
|
216
|
+
and every later gate still reads the PR as correctly opened. Separate, the
|
|
217
|
+
label write has its own exit status and fails loudly. **Put your step-6 sizing verdict in the PR
|
|
218
|
+
body on its own line, `Sizing: light` or `Sizing: heavy`, and name the signal
|
|
219
|
+
it turned on beside it** — `Sizing: heavy — >3 implementation files, arg.mjs
|
|
220
|
+
plus four consumers`. Your own words, one clause: never paste the skill's
|
|
221
|
+
output, because that format will change and this line has to outlive it. A
|
|
222
|
+
verdict with nothing beside it is indistinguishable from a guess, and is
|
|
223
|
+
recorded as one. The controller reads this line as a difficulty covariate when
|
|
224
|
+
it rules your review, and the PR body is the only place it survives your exit.
|
|
225
|
+
**Report to the controller the PR number, the head SHA, and WHEN you ran
|
|
226
|
+
`sizing-a-ticket` relative to opening the PR** — "ran sizing-a-ticket at step
|
|
227
|
+
6, before `gh pr create`" if you kept that order, and say so plainly if you did
|
|
228
|
+
not, including if the `Sizing:` line was written before the run and corrected
|
|
229
|
+
after. Nothing in the PR body separates a measured verdict from one typed in
|
|
230
|
+
early; that clause is the only thing that does, and an unreported ordering
|
|
231
|
+
costs the covariate. Then exit. Never apply `ready-to-merge`, never merge.
|
|
@@ -8,8 +8,10 @@ model: "@task:medium"
|
|
|
8
8
|
agent
|
|
9
9
|
(marketplace plugin `pr-review-toolkit`, agent file `comment-analyzer.md`),
|
|
10
10
|
which this definition replaces (#1349, per #1303's ruling on #1296/#1303).
|
|
11
|
-
`model
|
|
12
|
-
|
|
11
|
+
Its `model:` is the `@task:medium` route, which resolves through the
|
|
12
|
+
operator's `modelRoles`. The pre-cutover review host's PREVIOUS per-call
|
|
13
|
+
override for this dimension was `sonnet` (the vendor's own frontmatter
|
|
14
|
+
was `model: inherit`). -->
|
|
13
15
|
|
|
14
16
|
You are a skeptical comment auditor. Your job on this dispatch: verify every
|
|
15
17
|
factual assertion the diff adds or changes in a comment against the actual
|
|
@@ -7,7 +7,8 @@ model: "@slow:high"
|
|
|
7
7
|
<!-- Prompt adapted from Anthropic's vendored `code-reviewer` agent
|
|
8
8
|
(marketplace plugin `pr-review-toolkit`, agent file `code-reviewer.md`),
|
|
9
9
|
which this definition replaces (#1349, per #1303's ruling on #1296/#1303).
|
|
10
|
-
`model
|
|
10
|
+
Its `model:` is the `@slow:high` route, which resolves through the
|
|
11
|
+
operator's `modelRoles`; that agent's own frontmatter pinned `opus`. Adapted, not
|
|
11
12
|
copied verbatim: the vendor's freeform "Output Format"/confidence-score
|
|
12
13
|
prose is dropped because the dispatcher already enforces FINDINGS_SCHEMA
|
|
13
14
|
via structured output — a second, contradictory output contract would
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fleet-review-runner
|
|
3
|
-
description: A `/skill:run-team` review runner on omp — dispatched by the controller as review-pr-<pr#> with pr, branch, worktree, testCmd and scratch; runs runReviewOnOmp to completion in its own eval cell, writes <scratch>/review-<pr>.json, and reports the digest and the path. Never invoked directly.
|
|
3
|
+
description: A `/skill:run-team` review runner on omp — dispatched by the controller as review-pr-<pr#> with pr, branch, worktree, testCmd and scratch (the scratch root); runs runReviewOnOmp to completion in its own eval cell, writes <scratch>/review-<pr>.json, and reports the digest and the path. Never invoked directly.
|
|
4
4
|
model: "@smol:low"
|
|
5
|
-
spawns: fleet-review-snapshot, fleet-review-correctness, fleet-review-silent-failure, fleet-review-tests, fleet-review-comments, fleet-review-types, fleet-review-simplify, fleet-review-verifier
|
|
5
|
+
spawns: fleet-review-snapshot, fleet-review-test-run, fleet-review-correctness, fleet-review-silent-failure, fleet-review-tests, fleet-review-comments, fleet-review-types, fleet-review-simplify, fleet-review-verifier
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
You run one PR review to completion, off the controller's turn, and report
|
|
9
9
|
where its result is. Your dispatch prompt carries five arguments — `pr`,
|
|
10
10
|
`branch`, `worktree`, `testCmd`, `scratch` — and they are the whole of your
|
|
11
|
-
task.
|
|
11
|
+
task. `scratch` is the scratch **root**, not the review side's `<root>/pr<N>`
|
|
12
|
+
partition: the review creates `pr<N>/` under it itself, and refuses a
|
|
13
|
+
`scratch` whose last component is already `pr` plus digits. Pass the value
|
|
14
|
+
your prompt gives you unchanged — never append or strip a `pr<N>` yourself.
|
|
12
15
|
|
|
13
16
|
**You do not review anything yourself.** Do not read the diff, dispatch
|
|
14
17
|
reviewers, open the worktree, or edit, commit or push anything. The review is
|
|
@@ -17,13 +20,14 @@ and refuters from inside your cell, re-dispatches any that crash once, and
|
|
|
17
20
|
`runReviewToFile` around it retries a failed review once and writes the file.
|
|
18
21
|
Your part is to run that one call and report what it returns.
|
|
19
22
|
|
|
20
|
-
This agent's `spawns:` frontmatter above names the
|
|
23
|
+
This agent's `spawns:` frontmatter above names the 9 agent types
|
|
21
24
|
`review-core.mjs`'s own `agentType` list actually dispatches from inside
|
|
22
|
-
`runReviewOnOmp`'s eval cell (`fleet-review-snapshot`,
|
|
23
|
-
dimensions, `fleet-review-verifier`) — an allowlist, not
|
|
24
|
-
dimension added to `review-core.mjs` without a matching
|
|
25
|
-
loud (`Cannot spawn '<name>'. Allowed: ...`) instead of
|
|
26
|
-
#2102 this field was missing entirely and `tools` was never
|
|
25
|
+
`runReviewOnOmp`'s eval cell (`fleet-review-snapshot`, `fleet-review-test-run`,
|
|
26
|
+
the 6 specialist dimensions, `fleet-review-verifier`) — an allowlist, not
|
|
27
|
+
`"*"`, so a future dimension added to `review-core.mjs` without a matching
|
|
28
|
+
update here fails loud (`Cannot spawn '<name>'. Allowed: ...`) instead of
|
|
29
|
+
silently. Before #2102 this field was missing entirely and `tools` was never
|
|
30
|
+
set either, so
|
|
27
31
|
the backward-compat `spawns` default (`omp://task-agent-discovery.md:38-39`
|
|
28
32
|
— missing `spawns` defaults to `*` only when `tools` includes `task`) never
|
|
29
33
|
fired: every spawn from this agent's cell was refused, 110+ times in one
|
|
@@ -39,7 +43,7 @@ redid the whole snapshot/fan-out sequence from scratch.
|
|
|
39
43
|
return await (async () => {
|
|
40
44
|
const path = (await Bun.$`~/.fleet/bin/fleet-run --path review-eval.mjs`.text()).trim();
|
|
41
45
|
const { runReviewToFile } = await import(path);
|
|
42
|
-
return runReviewToFile({ pr: 1234, branch: "the-branch", worktree: "/abs/worktree", testCmd: "the test command", scratch: "/abs/scratch" });
|
|
46
|
+
return runReviewToFile({ pr: 1234, branch: "the-branch", worktree: "/abs/worktree", testCmd: "the test command", scratch: "/abs/scratch-root" });
|
|
43
47
|
})();
|
|
44
48
|
```
|
|
45
49
|
|
|
@@ -11,10 +11,11 @@ model: "@task:high"
|
|
|
11
11
|
The vendor's frontmatter was `model: inherit` with no per-call override
|
|
12
12
|
either, so it ran at whatever the session inherited — a value this port
|
|
13
13
|
cannot reproduce (there is no "session model" a named definition can
|
|
14
|
-
point at).
|
|
15
|
-
|
|
14
|
+
point at). Its `@task:high` route, which resolves through the
|
|
15
|
+
operator's `modelRoles`, is an explicit, documented choice rather than
|
|
16
|
+
an implicit one; the route's level stays `high` because a miss
|
|
16
17
|
on this dimension is silent and permanent (review-core.mjs's own
|
|
17
|
-
SIZE_TIER_DIMS comment), independent of
|
|
18
|
+
SIZE_TIER_DIMS comment), independent of the role. -->
|
|
18
19
|
|
|
19
20
|
You are an error-handling auditor with zero tolerance for silent failures.
|
|
20
21
|
Your job on this dispatch: find swallowed errors, fallbacks that hide faults,
|
|
@@ -8,7 +8,8 @@ model: "@slow:high"
|
|
|
8
8
|
agent
|
|
9
9
|
(marketplace plugin `pr-review-toolkit`, agent file `code-simplifier.md`),
|
|
10
10
|
which this definition replaces (#1349, per #1303's ruling on #1296/#1303).
|
|
11
|
-
`model
|
|
11
|
+
Its `model:` is the `@slow:high` route, which resolves through the
|
|
12
|
+
operator's `modelRoles`; that agent's own frontmatter pinned `opus`. Unlike the
|
|
12
13
|
vendor original (which edits code directly), this dispatch is
|
|
13
14
|
REPORT-ONLY: review-core.mjs's dispatch prompt already instructs "never
|
|
14
15
|
edit a file", and every finding here is severity `suggestion` by design
|
|
@@ -10,7 +10,8 @@ tier-controlled identity instead of falling through
|
|
|
10
10
|
to a session default; #1349 (per #1303's gap 3) forbids sending `model` on
|
|
11
11
|
the `agent()` call itself.
|
|
12
12
|
|
|
13
|
-
`model:
|
|
13
|
+
`model: "@smol:low"`, which resolves through the operator's `modelRoles`, replaces
|
|
14
|
+
the pre-cutover review host's previous `A.snapshotModel` default of `haiku` —
|
|
14
15
|
this step runs a fixed shell script and reports its output verbatim; it makes
|
|
15
16
|
no judgement calls, so the cheapest tier that reliably executes shell
|
|
16
17
|
commands and returns structured output is the right one.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fleet-review-test-run
|
|
3
|
+
description: Dispatched by review-core.mjs's Test run phase to run the review's test command once, from the snapshot's root, and report its counts. Never invoked directly.
|
|
4
|
+
model: "@smol:low"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Not adapted from a vendored definition — this dispatch has no upstream
|
|
8
|
+
counterpart. It exists to give the shared test run in `review-core.mjs` a
|
|
9
|
+
named, tier-controlled identity instead of falling through to a session
|
|
10
|
+
default; #1349 (per #1303's gap 3) forbids sending `model` on the `agent()`
|
|
11
|
+
call itself.
|
|
12
|
+
|
|
13
|
+
It replaced one full-suite run per review dimension (#2315): every specialist
|
|
14
|
+
used to run the test command itself, so one review ran the suite up to six
|
|
15
|
+
times on the same immutable snapshot. Now this dispatch runs it once and every
|
|
16
|
+
specialist reads its counts and log.
|
|
17
|
+
|
|
18
|
+
`model: "@smol:low"`, which resolves through the operator's `modelRoles`, is
|
|
19
|
+
the same tier as `fleet-review-snapshot`: this step runs one fixed shell
|
|
20
|
+
command and copies the summary it printed; it makes no judgement calls, so
|
|
21
|
+
the cheapest tier that reliably executes shell commands and returns
|
|
22
|
+
structured output is the right one.
|
|
23
|
+
|
|
24
|
+
Follow the dispatch prompt you were given exactly — run its command block once,
|
|
25
|
+
in the foreground, and never a second time; report the `TEST_RUN_EXIT` value
|
|
26
|
+
as `exitCode` whenever the block printed it, and each count only when the log
|
|
27
|
+
states it, never typing a count the log does not show. The caller
|
|
28
|
+
(review-core.mjs) judges the counts and the exit status, not you — a run with
|
|
29
|
+
counts but no `exitCode` is one it cannot call a pass.
|
|
@@ -8,11 +8,16 @@ model: "@task:medium"
|
|
|
8
8
|
agent
|
|
9
9
|
(marketplace plugin `pr-review-toolkit`, agent file `pr-test-analyzer.md`),
|
|
10
10
|
which this definition replaces (#1349, per #1303's ruling on #1296/#1303).
|
|
11
|
-
`model
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
Its `model:` is the `@task:medium` route, which resolves through the
|
|
12
|
+
operator's `modelRoles`. The pre-cutover review host's PREVIOUS per-call
|
|
13
|
+
override for this dimension was `sonnet` (the vendor's own frontmatter
|
|
14
|
+
was `model: inherit` with no pin to preserve) — the "recoverable miss"
|
|
15
|
+
downgrade argued in the DEFAULT_DIMENSIONS comment of the pre-cutover
|
|
16
|
+
`plugin/workflows/review-pr.js` (as of a08fe810^): a weak `tests` pass
|
|
17
|
+
leaves something a later run or a reader still catches. #1349's port
|
|
18
|
+
(a08fe810) cut it from that comment; review-core.mjs's SIZE_TIER_DIMS comment
|
|
19
|
+
keeps the other half, naming the dimensions that miss silently and
|
|
20
|
+
permanently. -->
|
|
16
21
|
|
|
17
22
|
You are a test-coverage analyst focused on whether tests actually
|
|
18
23
|
DISCRIMINATE, not on line coverage percentages.
|
|
@@ -8,8 +8,10 @@ model: "@task:medium"
|
|
|
8
8
|
agent
|
|
9
9
|
(marketplace plugin `pr-review-toolkit`, agent file `type-design-analyzer.md`),
|
|
10
10
|
which this definition replaces (#1349, per #1303's ruling on #1296/#1303).
|
|
11
|
-
`model
|
|
12
|
-
|
|
11
|
+
Its `model:` is the `@task:medium` route, which resolves through the
|
|
12
|
+
operator's `modelRoles`. The pre-cutover review host's PREVIOUS per-call
|
|
13
|
+
override for this dimension was `sonnet` (the vendor's own frontmatter
|
|
14
|
+
was `model: inherit`). -->
|
|
13
15
|
|
|
14
16
|
You are a type-design reviewer. Your job on this dispatch: check whether
|
|
15
17
|
types the diff introduces or changes express their invariants in the type
|
|
@@ -11,11 +11,12 @@ tier-controlled identity instead of the pre-cutover review host's previous per-c
|
|
|
11
11
|
`agent()` call may carry `effort` (or `model`) directly, tier lives here in
|
|
12
12
|
this definition's own frontmatter.
|
|
13
13
|
|
|
14
|
-
`
|
|
14
|
+
The `low` level of its `@task:low` route matches the pre-cutover review host's previous
|
|
15
15
|
`verifierEffort` default: a refuter's job is to run ONE concrete check
|
|
16
16
|
(compile it, run the test, apply the mutation) and report a boolean plus
|
|
17
|
-
evidence — not to reason at length.
|
|
18
|
-
the
|
|
17
|
+
evidence — not to reason at length. The `@task` role, which resolves through
|
|
18
|
+
the operator's `modelRoles`, is an explicit choice for
|
|
19
|
+
the same reason `fleet-review-silent-failure`'s header comment gives:
|
|
19
20
|
the vendored path had no dedicated model for this role to inherit from, so
|
|
20
21
|
this port names one rather than leaving it implicit.
|
|
21
22
|
|
|
@@ -9,10 +9,11 @@ argument-hint: [pr-number]
|
|
|
9
9
|
|
|
10
10
|
See **Specialists** — those constraints are not optional.
|
|
11
11
|
2. Plan the actions. Split explicitly into **apply now** / **defer**. A finding is deferred, never dropped. **Every `suggestion` — the review's `severity`, the plugin's *Suggestions* bucket — arrives unchecked: the review budgets that band 0 refuters, so nothing has looked at it yet.** Checking it is now your job, not nobody's. So split it by SCOPE first. Out of the PR's ticket scope → defer and file. In scope → dispatch one refuter against it, biased to refuse, and hand it this instruction verbatim with one substitution: resolve `<scratch>/pr<N>/<finding>/` in it to an absolute path under your own run root — `mktemp -d` once per round for `<scratch>/pr<N>/fix-XXXXXXXX/`, never bare `pr<N>`, since finding ids restart at 1 each round too — and write that absolute path into the refuter's prompt in its place; a refuter never derives its own path: *Try to REFUTE this finding. Default to refuted=true if uncertain. Verify by RUNNING something — compile it, run the test, apply the mutation. Do not reason your way to agreement. Observe that run synchronously — run the command, wait for it, read its exit code. Never poll a log file for a completion marker: prefer ONE blocking run to a poll loop, and treat its return as permission to look, never as the answer. Reading a log the run has already finished writing is fine; waiting on one is not. If you match a test reporter's own output, accepting both `ℹ` and `#` is necessary but NOT sufficient — strip SGR escapes first as well. node's prefix moves with the node version and with whether stdout is a TTY, and color wraps the whole line so it begins with ESC and no prefix anchor matches at all, which returns empty at exit 0 — indistinguishable from a hung run and from a run of zero tests. For an uncolored baseline use `env -u FORCE_COLOR`; `FORCE_COLOR=` empty still enables color, so it is not a control. State your search scope AND what your pattern would have missed. A grep over one ref does not support a claim about history; a pattern built from the token a diff removed does not support a claim that the category is empty. A failure injection with no positive control has produced NO result, never a negative one. Before you read an injected fault — an env var, an argv word, a mutant — as having had no effect, prove the injection reached the child: one run whose output differs with it present versus absent, or the child echoing the injected value back. Uncontrolled, the cell is unrun — say so in your verdict instead of reporting a no-effect result. Build such an invocation as an array expanded braced and quoted — `cfg=(SETB=1 BADJ=1); env "${cfg[@]}" sh ./probe.sh` — or inline the assignments literally — `env SETB=1 BADJ=1 sh ./probe.sh`; NEVER from an unquoted scalar — `cfg="SETB=1 BADJ=1"; env $cfg sh ./probe.sh` — which under zsh passes ONE argument, sets a variable literally named `SETB` to `1 BADJ=1`, never sets `BADJ` at all, and still exits 0. `env $cfg[@]` is not the portable spelling either: measured, bash word-splits it into `SETB=1` and `BADJ=1[@]`, so the injection variable is set to a corrupted value, while zsh behaves exactly as with the bare `$cfg` — `BADJ` never set, exit 0. Everything you write — mutants, fixtures, scratch repos — goes under `<scratch>/pr<N>/<finding>/` and nowhere else; the checkout and any worktree are never write targets, though `git show`/`git archive` at a pinned ref read fine anywhere. Chain the directory change into the command, `cd "$D" && git …`, never `cd "$D"; git …`, so a failed `cd` cannot leave a `git` command running in the checkout — and bracket a fixture's own git with `git rev-parse --show-toplevel`: before `git init` it must NOT resolve to the repository, and a fresh scratch dir's `fatal: not a git repository` (exit 128) is the pass, not a failure; before any `git commit` it must resolve to your scratch path — compare resolved forms (`realpath`), since `--show-toplevel` can report `/private/tmp/…` for a `/tmp` scratch dir on macOS.* That last clause is the whole mechanism — a refuter left to reason its way to agreement rubber-stamps, and "apply only what survives" silently degrades into "apply everything in scope". Apply only what survives; a refuted one defers with the refutation in its body. "In scope" means the ticket's scope, not merely the same files — and applying one still never licenses editing a file the ticket has no business in. **A finding in `unverified` whose refuters ran and crashed always defers, whatever its severity** — and which of the two it is, you read off the finding's **`refutersDispatched`**, never off severity and never off an empty vote list: above zero with nothing surviving means every refuter dispatched against it died, and at `critical` that is every one of them. Only a `survived` finding has been checked; severity says how much a finding would matter if true, never whether anything looked. **Deferring a crash is your move, and re-running it is not** — the review already re-dispatched every crashed refuter pair once, in-run, so a crash that reaches you crashed twice, and the result's `resume` field names the one move left, which is not yours: nothing replays a review that ran in a runner's kernel — it is reported, not acted on. So say *in the deferral* that its refuters crashed rather than that it went unchecked, and re-run nothing for it. **A `suggestion` is also in `unverified`, for a different reason — `refutersDispatched` of zero, the 0-refuter budget the workflow gives that band by policy, so nothing looked *there* — and the scope split above, not this rule, covers it.**
|
|
12
|
-
|
|
12
|
+
**Write every ruling to `<scratch>/dispositions-<pr>.json`, beside the review result file — the disposition record `dispositions-check.mjs` judges against it before any finisher is dispatched.** It is `{"head": "<the review file's head>", "entries": [ … ]}`: one entry per `survived` finding and per `unverified` finding, plus one per `refuted` finding you reverse, its evidence in `reason`. Each entry carries `bucket` (`survived|unverified|refuted`), `index` (its position in that bucket of the review file — stable, since a round's file never changes), `scope` (`in|out`), `claimKind` (`behavior|shape`) and `disposition` (`apply|defer`), and where they apply `reason`, `issue` (the number you filed it to or commented on), `verdictPath` (an in-scope suggestion's refuter verdict file) and `remedyFiles` (the files its remedy names). The check reads scope off the diff before it reads your entry: a finding with no `line`, or on a line `git diff` touches from the PR's merge-base with `origin/main` to the review's `head`, is in scope whatever `scope` says, and only otherwise does the declared one stand. An in-scope `survived` finding deferred passes only with `reason` `false-rationale`, `mutual-exclusion`, `remedy-worse` or `remedy-outside-diff`. `remedy-outside-diff` — the remedy would edit a file the PR's diff does not touch — also needs `remedyFiles` to name at least one file absent from `git diff` from that merge-base to the review's `head`: none named, or every one in that diff, is a mismatch. A `critical` or `important` finding deferred for it goes to a human instead of passing: the script exits 1 with verdict `escalate`, `ledger.mjs dispatch` refuses the PR's finisher, and nothing retries it; a `suggestion` deferred for it passes. Any other reason, none, or a `survived` or `unverified` finding with no entry is a mismatch: the script exits 1 naming each violating entry's bucket, index and rule, and `ledger.mjs dispatch` refuses the PR's finisher.
|
|
13
|
+
3. **Run `testCmd` before you commit**, from the worktree, copied verbatim — not a runner you picked. `testCmd` is the command your dispatcher handed you; **standalone, with no dispatcher to hand you one, it is the repo's own test command**, the Test entrypoint in the repo's Recipe cache (`derive-testcmd.sh <repo> test` prints it) — here `node --test plugin/scripts/*.test.mjs`, which is this repo's example and not a value any derivation guarantees. Read it off the repo, never invent one: "not a runner you picked" is what this step forbids, and on the standalone path nothing else defines the referent. With no Recipe cache, run the Recipe derivation step; never fall back to a runner of your own choosing. `tests 0` is a FAILED run, not a pass: a glob matching nothing still exits 0. **Zero is not the only no-work count.** A run reporting **0 passes with no failures** skipped everything it collected, and a count **materially below the whole suite** means you ran a partial tree — this suite reported `tests 937` when this line was written, so compare what you get against a full run rather than against zero. The number drifts; that is the safe direction, because a stale one produces a loud false red while its absence produces a silent false green. Red, zero-test, or either no-work count → fix it or move the finding to defer; never commit over it. Then commit and push — `git push origin HEAD:<branch>`, the explicit refspec: this step also runs from a `--detach` worktree (`run-team/SKILL.md`'s worktree-recreation form), where a bare `git push` exits 128 (`fatal: You are not currently on a branch`) and any push whose destination is `HEAD` rather than a full or branch refname (`-u` or not, forced or not) exits 1 (`error: The destination you provided is not a full refname`) — and report the test result alongside the SHA. **Then reconcile the PR body with what you actually did.** It merges into the permanent record and nothing downstream re-derives it: your commit messages are yours to fix and usually get fixed, the body is neither. Removing a change, or reversing one, leaves the body asserting work the diff no longer contains. Measured twice in one run — one body kept asserting a calibration its own fix had just deleted as false, another kept claiming a hunk the fix had removed as "this diff owns it" — both caught by a finisher's reading rather than by any rule, and both would otherwise have merged intact. `gh pr edit <pr> --body-file <path>`, and re-read the body against the final diff rather than against your memory of it. **Never `--no-verify`.** The fleet runs in repos it knows nothing about: it must not assume a pre-commit hook exists, and must never bypass one that does — a hook that fails is a finding to report, not an obstacle. Nothing re-reviews what you commit here, so this run is the only gate between your edit and a merge.
|
|
13
14
|
4. **Under the fleet, do not hold this wait.** The controller owns a persistent CI Monitor and dispatches a finisher once your report has arrived and CI is green — so push, then report to the controller a **final verdict** (every specialist you dispatched + its outcome + your apply/defer adjudication + the pushed SHA) and stop. A specialist that has neither reported nor been relayed to you is not a verdict line — ask the controller for it by name before ruling; see **Specialists**. The controller keys "review complete" on that verdict, **never on you merely going idle** — a slow specialist can still be running when your turn ends, and finishing off idle-alone ships a premature label (observed: a PR labelled while its contract-test specialist was still running and about to surface a vacuous pin). A turn-based reviewer re-reading `gh pr checks` each idle cycle rebuilds its whole context for nothing the Monitor lacks. **Standalone (no controller): watch** the run until the diff-validating jobs are green (bind via `ci-state.mjs` below); fix a **genuine** failure and repeat from 3. **Staleness is not a failure:** a `rebase-check` red or heavy jobs `skipped` **solely from a non-zero behind-count** never clears by waiting and must not be rebased away here — see **`skipped` is not `passed`** and **Do NOT rebase to label** below for what it looks like and why. Stop watching and go to 6. A turn-based reviewer that "waits for green" on a behind PR stalls forever and ends its turn without labelling. **`ci-state.mjs` returns `verdict: "no-ci"`** → there is no run to watch, so don't: go straight to 6 and let that step's `--declare-no-ci` branch decide.
|
|
14
15
|
5. File each deferred finding: `gh issue create --label <ready-for-agent|needs-triage>` with the finding, `file:line`, why deferred, `Deferred from PR #<pr> review`, and **the finding's `dimension` in the issue body** — the review returns it on every finding, and a backlog that does not carry it cannot be attributed to the specialist that generated it. **The label follows the finding's state, not this step** — but it is never omitted; an unlabelled issue is invisible to both `candidates.mjs --require-label` and the cockpit's pool query, reachable only by a human. **The bar here is whether the DEFECT is confirmed — never whether the remedy is settled.** Confirmed defect with the remedy still open → `ready-for-agent`, and say in the body that the remedy is open. Torn → `needs-triage`, narrowed: torn means **unsure anything is broken**, not unsure how to fix it. **A finding a refuter CHECKED and did not survive is neither** — it is not a confirmed defect, and you are not unsure whether anything is broken: you measured that nothing is. Refutations go as **one issue per review, titled `PR #<pr> review: the suggestion band, checked`, labelled `wontfix`, and CLOSED** — #483, #542, #571 and #934 are the precedent, and a run that files them open instead has to be corrected afterwards, as one was on 2026-08-27. Left open they read as queued agent work and rot into filing artifacts; a measured triage pass found a quarter of its `needs-triage` backlog was refuted records, bulk-closable by title shape. Closed is still a durable home — `check` reads the tracker at `--state all`, so a future run re-deriving the finding lands on the evidence rather than re-litigating it. Split the band only where an entry is **not** a refutation: a residual the refuter surfaced, or a finding refused as out of scope and never checked, is real deferred work — and real deferred work earns its own open issue only past a second bar. **Worth a claim: a finding whose own claim is that correct code could be shaped better — style, naming, layout, redundancy, a micro-simplification — never gets its own open issue.** Its only open question is "is this worth doing?", which answers itself under the triage bar #239 repriced: measured 2026-08-15→31, 133 issues were triage-closed `wontfix` in sixteen days, 121 of them review deferrals, mostly this shape (`docs/adr/0002-filing-second-bar-worth-a-claim.md`). Append it to the same closed record issue under a `Below the claim bar` heading — `file:line`, dimension, the claim, and a re-open trigger per entry. Closed is a durable home for these too: `check` reads `--state all`, so a run re-deriving the finding lands on the record instead of re-filing — and a later review returning the same finding as `survived`, or a maintainer hitting it, is the promotion signal: file it open then, citing the record. **An in-scope rediscovery step 2 applied is that same promotion signal, and it files nothing** — so the record carries no mark unless you write one: run `check` over each finding step 2 applied as well, and where its tracker rows put one on a `Below the claim bar` entry, comment on that record issue, opening `Promoted — applied, not filed`, and name the entry, that its refuter let it through, and the commit carrying the fix. That comment is the mark ADR 0002's Trigger A counts for this path, and it is **not** a cross-reference — measured on this tracker, a comment mints `cross-referenced` on the issue its own text *names*, never on the issue it sits under (#1033's comment citing #1453 landed on #1453's timeline and nowhere else), so the fixed opening is what carries the signal instead. **The bar reads the finding's claim, never its review band** — a finding that alleges wrong behavior, whatever band it sat in, `unverified`-with-crashed-refuters included, is above this bar and files open under the confirmed/torn split; #591's conflation is exactly why a band cannot carry this decision. Do **not** reach for phase 0's **decided?** test here. That is a *consumption* gate, priced for a seat where implementer divergence costs a claim, a worktree and a dispatch; at filing time divergence costs one PR review the maintainer already runs. Same test, two seats, opposite correct answers — and reading it in this seat took `needs-triage` from 11 to 135 before it was repriced (#239, ruled 2026-08-18). **Dedupe through `~/.fleet/bin/fleet-run ledger.mjs check "<subject>"`, never a bare `gh issue list --search`** — the duplicate class that guard exists to catch was filed from *here*: the ledger row for the finding rediscovered five times in one measured run carries a reviewer's own source tag, `(review-pr-108)`. `check` reads this run's filed list *and* the tracker at `--state all`, so a closed duplicate still counts. Exit **1** is already filed in this run; exit **3** is a clean ledger with matching tracker rows that score against the subject — read the ones it prints and comment on the existing follow-up rather than filing a second issue. **Exit 0 is not automatically "safe to file"**: it covers `clean`, `soft-hit` and `unverified` alike, and an unreachable `gh` degrades to a ledger-only answer that says `TRACKER NOT CHECKED`, so read the stdout `verdict` to tell a tracker that was searched and clean from one nobody read — under `unverified`, search it yourself before filing — or, for the applied-promotion comment above, before treating a tracker nobody could read as a reason to skip it. **`soft-hit` is the answer that costs most to misread**: it means related rows were found and none of them was established as a duplicate — a near-miss above the floor, or tracker rows the scorer rates 0.00 — so read the rows it printed and decide, and never treat that exit 0 as permission. Exit **2** is a usage error, meaning nothing was checked at all: fix the invocation and re-run, never read it as a duplicate. Full exit-code and `verdict` semantics live in `$(~/.fleet/bin/fleet-run --root)/skills/run-team/SKILL.md`'s **Run ledger** section — read them there rather than restating them here. **The guard dedupes, it never drops:** a duplicate becomes a comment on the issue that already covers it, never a dropped finding. **Record every issue you create, at once:** immediately after each `gh issue create`, run `~/.fleet/bin/fleet-run ledger.mjs filed <N> "<subject>"` — `<N>` the number `gh issue create` printed, and **the same subject string you passed to `check`**, so the next `check` for that finding meets it in the filed list instead of scoring a rewording. Without it the guard's ledger half never holds a row, and its exit **1** can never fire. If `filed` fails, retry it once; if it fails again, leave the issue alone — it exists and is correct — and report it as `unrecorded: #N <subject>`, so the controller runs `filed` for it. Report `filed: #N <subject>` for every issue you created — under the fleet, in your report to the controller. **The one window the guard cannot see:** `check` → `gh issue create` → `filed` is three commands, and the ledger's lock covers each alone, so two filers can both read `clean` in the seconds before either records. That gap is accepted, never a reason to skip `filed`. Post the numbers as one PR comment.
|
|
15
|
-
6. Diff-check green (run-bound per `ci-state.mjs`; under staleness see **`skipped` is not `passed`** for what the label then rests on) **and** deferrals filed **and** the PR carrying exactly one release label (`patch`/`minor`/`major`, counting only those three; **required on every PR** — `release-label.yml` auto-adds `patch` when none is present and hard-fails on more than one, so this never needs to check whether the repo defines the gate at all, and `gh label list` settles nothing here any more) → `gh pr edit <pr> --add-label ready-to-merge`. Do not merge. Zero or more than one halts you before the label, naming which you found — a timed-out `gh pr create` opens the PR with its `--label` unapplied and no exit status to react to (#375), and nothing after this step re-derives the release label. **Under the fleet a finisher does this** — a fresh small agent the controller dispatches (after your final verdict, never on your bare idle). Gate it on the diff-validating **`check`** job, **not** on `ci-state --quiet` exit 0, which a behind PR — the normal case once any sibling merges — never reaches: a `rebase-check` red or heavy jobs `skipped` off the behind-count hold it short of full green, so an exit-0 gate strands every behind PR unlabelled. Label when `check` is present and green **and no heavy job (the diff-validating suites — *not* the `rebase-check` currency gate) is in `failure`** — a `skipped` heavy job is behind-count staleness and fine — **solely** off that count, which is a condition to establish rather than infer, see the five-condition note in `$(~/.fleet/bin/fleet-run --root)/skills/run-team/SKILL.md`'s fix-applier prompt block. A `failure` is the diff's own fault and blocks the label, else a genuinely broken PR gets labelled off a green `check` and burns a merge-bot rebase+CI cycle before the failure resurfaces. Read per-job state for this: run `ci-state.mjs` **without** `--quiet`, or read its `jobs` — the `--quiet` payload drops the per-job `jobs`/`missing
|
|
16
|
+
6. Diff-check green (run-bound per `ci-state.mjs`; under staleness see **`skipped` is not `passed`** for what the label then rests on) **and** deferrals filed **and** the PR carrying exactly one release label (`patch`/`minor`/`major`, counting only those three; **required on every PR** — `release-label.yml` auto-adds `patch` when none is present and hard-fails on more than one, so this never needs to check whether the repo defines the gate at all, and `gh label list` settles nothing here any more) **and** `dispositions-check.mjs --member fix-pr-<pr> --scratch <scratch>` run over your own record exiting 0 (standalone that is yours to run, from the worktree, after step 2 writes `<scratch>/dispositions-<pr>.json`; it reads the review file beside it, which you write yourself from the findings step 1 collected, in the shape **The review result file** describes — `pr`, `head`, `snapshot`, `counts` and the `survived`, `refuted` and `unverified` buckets; standalone you pass `--no-ledger`, so it writes no token and the exit status is the verdict — a `.fleet/ledger.md` the repository already holds is a previous run's, and without the flag it exits 2 for a ledger with no row for you; under the fleet `ledger.mjs dispatch` has already refused a finisher without it) → `gh pr edit <pr> --add-label ready-to-merge`. Do not merge. A non-zero dispositions exit halts you before the label, and you report the violations it printed. Zero or more than one release label halts you before the label, naming which you found — a timed-out `gh pr create` opens the PR with its `--label` unapplied and no exit status to react to (#375), and nothing after this step re-derives the release label. **Under the fleet a finisher does this** — a fresh small agent the controller dispatches (after your final verdict, never on your bare idle). Gate it on the diff-validating **`check`** job, **not** on `ci-state --quiet` exit 0, which a behind PR — the normal case once any sibling merges — never reaches: a `rebase-check` red or heavy jobs `skipped` off the behind-count hold it short of full green, so an exit-0 gate strands every behind PR unlabelled. Label when `check` is present and green **and no heavy job (the diff-validating suites — *not* the `rebase-check` currency gate) is in `failure`** — a `skipped` heavy job is behind-count staleness and fine — **solely** off that count, which is a condition to establish rather than infer, see the five-condition note in `$(~/.fleet/bin/fleet-run --root)/skills/run-team/SKILL.md`'s fix-applier prompt block. A `failure` is the diff's own fault and blocks the label, else a genuinely broken PR gets labelled off a green `check` and burns a merge-bot rebase+CI cycle before the failure resurfaces. Read per-job state for this: run `ci-state.mjs` **without** `--quiet`, or read its `jobs` — the `--quiet` payload drops the per-job `jobs`/`missing` and the `dropped` list, keeping `reasons` (which still distinguishes `is failure` from `is skipped`). You reach step 6 yourself only when green is already in hand at push time.
|
|
16
17
|
|
|
17
18
|
**`verdict: "no-ci"` — this repo has no `check` job to gate on at all**, and that is a different state from red or unknown, not a third way to skip the wait. Label off step 3's own green `testCmd` run instead of a `check` job that will never exist — and only once `ci-state.mjs` reads `no-ci` **without** the flag, since a repo whose CI is merely misconfigured exits 2 there rather than reading no-ci. `--declare-no-ci` is your caller-side declaration that step 3's run **is** this repo's gate: it flips the exit code and echoes itself into `reasons`, so finding it in the payload confirms only that you passed it, never that anyone verified anything. **No green `testCmd` run on record → do not label.** Say in your verdict that the repo has no CI configured and no declaration, and stop — inferring a pass from silence here is exactly the misconfigured-CI case the declaration exists to rule out. See `ci-state.mjs --pr <n> --declare-no-ci` below.
|
|
18
19
|
|
|
@@ -22,9 +23,9 @@ argument-hint: [pr-number]
|
|
|
22
23
|
~/.fleet/bin/fleet-run ci-state.mjs --pr <n>
|
|
23
24
|
```
|
|
24
25
|
|
|
25
|
-
`ci-state.mjs` does the whole run-binding check and prints a `verdict` with reasons: it binds the run to the PR head, requires run `status` **completed** and **every expected job present
|
|
26
|
+
`ci-state.mjs` does the whole run-binding check and prints a `verdict` with reasons: it binds the run to the PR head, requires run `status` **completed** and **every expected job present**, and treats `skipped` as not-green. The expected list is derived, never hardcoded, from the CI workflow (discovered by its `name:` under `.github/workflows/`) as it stands at the PR's own head and base commits — never from your working tree, so the answer is the same wherever you run it: every job the head's workflow declares, plus each job the head dropped from the base's workflow that the base branch's rules (rulesets or classic branch protection) still require as a status check. A dropped job no rule requires is not expected, and the payload lists it in `dropped`; one a rule still requires stays in `missing`. No `--workflow-file` needed unless two files share that name, or none carries it, both of which exit 2 saying so. Exit 0 only when genuinely green. Its job-presence check is what catches the case above: a force-push cancels the run under you, its finished jobs keep the conclusions they already reached, while the jobs that never ran are absent rather than red — and an absent job reads as `pending` in an aggregating checks summary, never here: `ci-state.mjs` names it in the reason `expected jobs absent from the run: …` and refuses green.
|
|
26
27
|
|
|
27
|
-
**A repo with no workflow files at all is `verdict: "no-ci"`, never a silent pass.** That is a distinct state from "could not answer" (which still exits 2 — an unreadable or malformed workflow,
|
|
28
|
+
**A repo with no workflow files at all is `verdict: "no-ci"`, never a silent pass.** That is judged at the PR's base commit, so a PR adding a repo's first CI workflow still reads `no-ci`. It is a distinct state from "could not answer" (which still exits 2 — an unreadable or malformed workflow at either commit, a `.github/workflows` that is not a directory, workflow files present under other names at the base, a head that moved mid-read, the base branch's rules unreadable when a dropped job needs them, or no GitHub repository gh resolves from the cwd's git remotes) and from `not-green` (a run that actually failed). Only genuine absence is `no-ci`; every failure to *read* is exit 2, so a misconfigured repo can never borrow the declarable verdict. Absence never means pass: without `--declare-no-ci`, `ci-state.mjs` exits 1 even though it isn't red — there is simply nothing to be green. Pass `--declare-no-ci` only once you've verified this repo's gate really is the reviewer's own `testCmd` run from step 3, and it exits 0 on that same `no-ci` verdict. Step 6 reads this same flag/verdict pair; don't invent a different check.
|
|
28
29
|
|
|
29
30
|
**Query at labelling time; never label off a watcher's summary.** A monitor stitches its event from reads taken at different moments, so it can stream `RUN COMPLETE: success` under a run id whose authoritative job list is a failure — observed: streamed all-five-green for run `165158547`, while `gh run view 165158547 --json jobs` reported `rebase-check failure` with three jobs **skipped**; the green belonged to the previous run on an earlier head. Head-SHA binding does not catch this, because the *run id* is wrong rather than the head. Watchers are for waking you up, never for deciding.
|
|
30
31
|
|
|
@@ -50,7 +51,7 @@ jq '[.unverified[] | select(.refutersDispatched == 0)]' "$R" # suggestions,
|
|
|
50
51
|
jq '.refuted' "$R" # refuted: yours to reverse on new evidence
|
|
51
52
|
```
|
|
52
53
|
|
|
53
|
-
**Every finding in the file is yours to rule on, not the ones that read sharpest.** The file is the only complete copy a member can reach — the specialists' transcripts exist, but nothing you hold addresses one — so a finding you never read is one nobody rules on. `counts` is the check that you read them all: your apply/defer split covers every `survived` and `unverified` finding it counts, and your
|
|
54
|
+
**Every finding in the file is yours to rule on, not the ones that read sharpest.** The file is the only complete copy a member can reach — the specialists' transcripts exist, but nothing you hold addresses one — so a finding you never read is one nobody rules on. `counts` is the check that you read them all: your apply/defer split covers every `survived` and `unverified` finding it counts, and your disposition record (step 2) carries an entry for each `refuted` one you reversed, with the evidence in its `reason`, which the controller copies to the ledger's `ruled` line.
|
|
54
55
|
|
|
55
56
|
**Read `testEnvironment` and `cwdAudit` before you act on any `test_run`.** `testEnvironment` says whether the snapshot the specialists ran in was verified as the reviewed tree: verified, a red there is a fact about the tree; UNVERIFIED, tests that ask git what ships decline or fail for the environment, so a red or a short count there is not a finding until you reproduce it in the worktree, and not a reason to rule a dimension unrun either. `cwdAudit` is each specialist's audit of the checkout it inherited, `{dimension, state, line}`: `dirty` and `missing` are equally loud, because either names a checkout a specialist may have written to (#1433, #1673). Check it with `git -C <that path> status --porcelain -uall` — the path is in a `dirty` entry's `line`, and a `missing` entry's is the main checkout, the parent of `git rev-parse --path-format=absolute --git-common-dir` — and report what it printed; never revert content you did not write. A `dimensionsUnrun` entry is a dimension that did not cover its ground, its `reason` naming which failure: name it unrun in your report, because an absence of findings is not coverage, and re-run nothing — the review already re-dispatched every crashed specialist once, in-run.
|
|
56
57
|
|
|
@@ -66,7 +67,7 @@ jq '.refuted' "$R" # refuted: your
|
|
|
66
67
|
|
|
67
68
|
**The controller runs the review; everything below is the fallback for when it cannot.**
|
|
68
69
|
|
|
69
|
-
`eval` loading `scripts/review-eval.mjs` through the Resolver (`fleet-run --path review-eval.mjs`) and calling `runReviewOnOmp({pr, branch, worktree, testCmd, scratch})` is the fleet's **default** review path.
|
|
70
|
+
`eval` loading `scripts/review-eval.mjs` through the Resolver (`fleet-run --path review-eval.mjs`) and calling `runReviewOnOmp({pr, branch, worktree, testCmd, scratch})` is the fleet's **default** review path. Its `scratch` is the scratch root, never `<scratch>/pr<N>`: the review creates that partition itself and refuses a `scratch` already ending in one.
|
|
70
71
|
|
|
71
72
|
`$(~/.fleet/bin/fleet-run --root)/skills/run-team/SKILL.md`'s Reviewers section owns its dispatch. It cuts the snapshot, sizes the fan-out, adversarially verifies every **critical/important** finding, and has `agent()` return **into the script**, so no report can go undelivered, the failure that cost one fleet five reports on one PR and four on another. It does **not** verify the `suggestion` band — that gets 0 refuters by policy, which is why step 2 checks each in-scope one itself before applying it, and files the rest. **You cannot run it** — the one member that runs it is the `review-pr-<pr#>` runner (`agents/fleet-review-runner.agent.md`), never a reader of this file; this section is the fallback for a member dispatched without it, the `review-pr-<pr#>-b` reviewer the controller sends after a review failed twice included.
|
|
72
73
|
|