Skip to content

Commit 8fcc5ee

Browse files
bokelleyclaude
andauthored
feat(agents): triage runs pre-PR build+test gate before expert review (#271)
Mirrors adcontextprotocol/adcp#3023. Routine now runs the repo's build+test tier before spawning expert subagents, capped at 2 build→fix iterations. Prevents shipping known-broken drafts and keeps the auto-fix loop's "red PR = drift" signal clean. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 46dd708 commit 8fcc5ee

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.agents/routines/triage-prompt.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,28 @@ related fixes, or "items 1-5 after PR #N" — decide:
253253
A single cohesive PR is easier to review than three PRs with
254254
dependencies. The bot reduces maintainer clicks, not multiplies them.
255255

256+
## Pre-PR build + test gate — mandatory before expert review
257+
258+
The expert review is expensive; don't run it on broken code. Before
259+
spawning experts, make sure the diff actually compiles and the
260+
unit tests pass.
261+
262+
1. Run the repo's build + fast test tier (see PR constraints below
263+
for exact commands). If the diff only touches docs/markdown, skip
264+
build and run the relevant doc check instead.
265+
2. **If build or tests fail:** read the errors, fix the code,
266+
re-run. Cap at **2 build→fix iterations.** If still failing,
267+
abandon the PR and Flag for human review with the build log
268+
in the comment.
269+
3. Do **not** skip tests locally because "CI will run them." The
270+
point of this gate is to not ship known-broken code even as a
271+
draft, because (a) review noise, (b) a human reviewer may
272+
admin-merge a draft that looks fine, (c) a green CI on push
273+
is the baseline for the auto-fix loop — a red PR at push time
274+
is indistinguishable from drift after the fact.
275+
4. Only once build + tests pass on the final diff: proceed to
276+
pre-PR expert review.
277+
256278
## Pre-PR expert review — mandatory before `gh pr create`
257279

258280
After the branch is pushed but **before** opening the PR, run a

0 commit comments

Comments
 (0)