Skip to content

feat(agents): pre-PR build+test gate + tighter current-context lint#3023

Merged
bokelley merged 3 commits intomainfrom
bokelley/triage-build-test-gate
Apr 24, 2026
Merged

feat(agents): pre-PR build+test gate + tighter current-context lint#3023
bokelley merged 3 commits intomainfrom
bokelley/triage-build-test-gate

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Summary

Closes the loop on tonight's bot-PR failures (#3006 shipped with unresolved `workos` reference, #3007 shipped with `vi.mock` hoisting bug — both would have been caught by running the build locally).

  1. Pre-PR build+test gate in `triage-prompt.md` — routine now runs `npm run precommit` (or equivalent) before the expert-review step. Fails the PR if the build is red after 2 fix iterations. Expert review is expensive; don't spawn subagents on broken code.

  2. Context-refresh rule in `context-refresh-prompt.md` — bullet labels must be factual nouns (`Compliance storyboard remediation`, not `...gaps`).

  3. LABEL_BAN lint upgrade in `validate-agent-context.mjs` — hard-fails when `gap`/`risk`/`concern`/`narrative`/`stakeholder` appears inside a bold span. Tier and editorial are deliberately omitted (legitimate product terms: "Tier-2 Production Verified", "editorial workflow").

Sibling repos (adcp-client, adcp-client-python, adcp-go) get the build+test-gate mirror in a follow-up.

Follow-up not in this PR

CI auto-fix loop for `claude/*` branches when the base moves after push. Brian flagged this — "things change underneath." Deferred because it needs a new routine or event-type handling, and tonight's gate already addresses push-time correctness.

Test plan

  • CI green
  • `node .github/scripts/validate-agent-context.mjs` passes on current main's file
  • Next bot-opened PR includes a visible build-gate outcome in the PR body

🤖 Generated with Claude Code

bokelley and others added 3 commits April 24, 2026 07:35
…ontext lint

Three related changes to the triage/refresh pipeline:

1. triage-prompt.md — adds a "Pre-PR build + test gate" section
   before the expert review. Runs `npm run precommit` (or equivalent
   for doc-only diffs), capped at 2 build→fix iterations. Rationale:
   expert review is expensive; don't spawn subagents on broken code.
   And a red PR at push time makes the planned CI auto-fix loop
   indistinguishable from drift-after-merge.

2. context-refresh-prompt.md — adds an explicit rule: bullet labels
   must be factual nouns ("**Compliance storyboard remediation**"),
   not editorial framing ("**Compliance storyboard gaps**"). The
   lint now enforces this at the error level.

3. validate-agent-context.mjs — adds LABEL_BAN regex that hard-fails
   when gap/risk/concern/narrative/stakeholder appears inside a
   bold span. Tier and editorial are deliberately omitted (AdCP has
   legitimate product-level uses: "Tier-2 Production Verified",
   "editorial workflow"). Single-line regex — won't span paragraphs.

Sibling repos (adcp-client, adcp-client-python, adcp-go) get the
build+test-gate mirror in a follow-up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
#2921 removed the hardcoded AdCP Agent Types section from
server/src/addie/rules/knowledge.md (Addie now defers to search_docs
for taxonomy questions). This assertion was pre-existing broken on
main after #2921 merged; not specific to any PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley bokelley merged commit 4c33055 into main Apr 24, 2026
10 checks passed
@bokelley bokelley deleted the bokelley/triage-build-test-gate branch April 24, 2026 11:46
bokelley added a commit to adcontextprotocol/adcp-client that referenced this pull request Apr 24, 2026
…#871)

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>
bokelley added a commit to adcontextprotocol/adcp-client-python that referenced this pull request Apr 24, 2026
…#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>
bokelley added a commit to adcontextprotocol/adcp-go that referenced this pull request Apr 24, 2026
…#87)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant