Repository navigation
ci: gate pull requests on an adversarial review and a fixed body - #1894
Merged
joshunrau merged 9 commits intoNov 10, 2026
Merged
Conversation
Cut the sections that duplicated a nested AGENTS.md, a playbook or an eslint rule: the DNP package list, the code-philosophy section, the route-tree rule, and the lint-enforced halves of the formatting, tests, coverage and translation rules. The scoped-run tips move to testing-strategy.md, which had no copy. Set agentGuidance: false in turbo.json and drop the managed Turborepo block it maintained. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
writing-agent-docs and troubleshooting follow the gerund names of the other skills, with the directories, .claude/skills symlinks, display names and cross-references updated to match. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Three skills carry the process: adversarial-review runs a prosecutor and a defence sub-agent over the branch against upstream main and returns only confirmed findings; opening-pr writes the body a reviewer can read in seconds, with the review block and what was fixed or declined; finishing-changes links them in order. The pr-body workflow checks every body and closes a PR whose block is missing, stale, or drops a finding, or that carries a Verification or Notes section. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agents working in this repo now follow one process from change to pull request: a green
pnpm check, an adversarial review of the branch against upstream main, and a PR body in a fixed shape that a workflow enforces by closing any PR without it. The rootAGENTS.mdshrinks to the rules that have no other home, and the skills lose theirodc-prefix.Changes
AGENTS.mdkeeps only rules that bind every directory. The map of nested docs moves to.agents/docs/index.mdand the coding guidelines to.agents/docs/coding-guidelines.md, both pulled in with@imports. Turbo no longer rewrites its managed block into the file.pnpm checkruns lint, coverage and e2e in sequence and is what "done" means. The old "every change needs a unit and an e2e test" rule is gone: coverage stays at 100% and e2e covers important functionality.finishing-changes(wasodc-done) owns the close-out order, ending with the review and the PR.writing-agent-docs(wasodc-agent-docs) andtroubleshooting(wasodc-debugging) are renames only.adding-dependenciesholds the ask-first, catalog and release-age rules that used to sit in the root file.adversarial-reviewruns a prosecutor sub-agent over the branch's code files and a defence sub-agent over its findings, and returns only what the defence could not refute. Neither runs lint or tests.opening-prwrites the body: an opening paragraph, Changes in effect terms, Decisions and Risks only when there are any, and the review block with every confirmed finding under Fixed or Declined. Verification, Validation, Notes and Implementation-notes sections are refused.PR Bodyworkflow checks the body on open, edit, push and reopen. It closes the PR, with a comment naming each rule broken, when the review block is missing, names a commit other than the head, drops a finding, or a forbidden section is present. It runs onpull_request_targetso it can act on fork PRs, checks outmainonly, and reads nothing but the event payload.Decisions
editedevent skips the head-stamp comparison. The body is edited for a new head before that head is pushed, so an edit can only be checked once the push'ssynchronizerun arrives, which still compares it.writing-skills-for-agentsmethod instead.Risks
pull_request_targetruns with a write token. The job never checks out or executes the PR's code, so a PR cannot reach the token. Accepted.pull-requests: write, which repository Actions settings can deny. Check that setting after merge; the close step fails visibly in the job if it is denied.Adversarial review
Reviewed at commit 3697377. pnpm check: green.
Findings
editedrun compared a body rewritten for a new head against the old head, so the prescribed edit-then-push order got the PR closed before the push — skip the head comparison onedited, whichsynchronizethen performs.asinstead of parsed at the boundary, so a malformed payload failed inside the checks with a misleading reason — narrow it at read time and throw a named error.# Validationcomment in a shell snippet closed the PR — skip fenced lines and require a space after the hashes.Fixed
action === 'edited'skips only the head comparison; a missing stamp still fails.parseEventnarrows the payload and names what is missing.outsideFencesdrops fenced lines before the heading test, whose pattern now needs a space.[0-9a-f]{40}and the comparison isincludes.