Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .agents/routines/context-refresh-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ routine's context.
- Link every entry (`#1234`, `PR adcp-client#456`)
- Status values: `active`, `blocked`, `review`, `shipped`, `deferred`
- Drop stale entries — staleness is a feature
- **Bullet labels must be factual nouns.** Not "**X gaps**",
"**X risks**", "**X concerns**", "**Tier-N X**", or
"**Stakeholder X**". Say what the work *is*, not how it's
framed. Example: "**Compliance storyboard remediation**", not
"**Compliance storyboard gaps**". The lint flags these, and
any gap/risk/concern/tier framing belongs in
`internal-context.md` instead.

## Open a PR

Expand Down
28 changes: 27 additions & 1 deletion .agents/routines/triage-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,35 @@ A single cohesive PR of 200 non-breaking lines is easier to review
than three PRs of 60 lines with dependencies and cross-links. The
bot's job is to reduce maintainer clicks, not multiply them.

## Pre-PR build + test gate — mandatory before expert review

The expert review is expensive; don't run it on broken code. Before
spawning experts, make sure the diff actually compiles and the
unit tests pass.

1. Run the repo's build + fast test tier:
- `npm run precommit` — prefer this (bundled build + typecheck +
unit tests); falls back to `npm run build && npm test` if not
defined
- If the diff touches only `docs/**` or `static/**`, skip build
and run the relevant doc check instead (e.g., `npm run
docs:check` or `mintlify broken-links`)
2. **If build or tests fail:** read the errors, fix the code,
re-run. Cap at **2 build→fix iterations.** If still failing,
abandon the PR and Flag for human review with the build log
in the comment.
3. Do **not** skip tests locally because "CI will run them." The
point of this gate is to not ship known-broken code even as a
draft, because (a) review noise, (b) a human reviewer may
admin-merge a draft that looks fine, (c) a green CI on push
is the baseline for the auto-fix loop — a red PR at push time
is indistinguishable from drift after the fact.
4. Only once build + tests pass on the final diff: proceed to
pre-PR expert review.

## Pre-PR expert review — mandatory before `gh pr create`

After the branch is pushed but **before** opening the PR, run a
After build + tests are green but **before** opening the PR, run a
second expert pass on the actual diff. The Step 4 synthesis
reviewed the plan; this step reviews the code. They catch
different things — protocol drift, broken tests, overlong files,
Expand Down
4 changes: 4 additions & 0 deletions .changeset/triage-build-test-gate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

Triage routine now runs a mandatory pre-PR build + test gate (npm run precommit or equivalent) before expert review, with 2 build→fix iterations. Also elevates bullet-label boundary framing ("**X gaps**") from CI warning to hard error in the current-context lint, and adds an explicit rule to the context-refresh prompt.
1 change: 0 additions & 1 deletion server/tests/unit/rules-loader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ describe('Rules Loader', () => {
expect(rules).toContain('## Partner Directory');

// Knowledge
expect(rules).toContain('## AdCP Agent Types');
expect(rules).toContain('## Prebid Expertise');
expect(rules).toContain('## Trusted Match Protocol (TMP)');

Expand Down
Loading