# ADW review — reviewer (correctness) + security-reviewer (security) run on every # PR in parallel. Verdicts only; neither merges. reviewer runs a different model # than the builder on purpose. Each posts a terse comment and applies its verdict # directly as a label the merge-gate reads (`reviewed` / `changes-requested`, # `security-cleared` / `risk:high`). Full tool access — bounded by the agent # charters (.claude/agents/*.md), not an allow-list. # # The reset job strips stale verdict labels first (except sticky `risk:high`), so # a new push can't inherit a prior review's pass — the reviewers re-earn it on the # current head. name: adw-review on: pull_request: types: [opened, synchronize, reopened] permissions: contents: read pull-requests: write concurrency: group: adw-review-${{ github.event.pull_request.number }} cancel-in-progress: true jobs: reset: runs-on: ubuntu-latest steps: - name: Strip stale verdict labels env: GH_TOKEN: ${{ github.token }} PR: ${{ github.event.pull_request.number }} REPO: ${{ github.repository }} run: | # risk:high is deliberately NOT stripped: once security-reviewer # escalates, only the owner de-escalates it. for l in reviewed security-cleared changes-requested; do gh pr edit "$PR" --repo "$REPO" --remove-label "$l" 2>/dev/null || true done reviewer: needs: reset runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - id: token uses: actions/create-github-app-token@v1 with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - uses: anthropics/claude-code-action@v1 with: github_token: ${{ steps.token.outputs.token }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} prompt: | Use the reviewer subagent to review PR #${{ github.event.pull_request.number }} in ${{ github.repository }}. Follow .claude/agents/reviewer.md: adversarial correctness review vs the spec, craft lenses. Do not merge. Post ONE terse PR comment: findings as one-line bullets (file:line — the defect), most severe first, no preamble/praise/restating; a clean pass is one line. Then apply your verdict as a label: on approve add `reviewed` and remove `changes-requested`; on request-changes add `changes-requested` and remove `reviewed`. You are a mission-critical gate — think. claude_args: --model claude-opus-4-8 --dangerously-skip-permissions security-reviewer: needs: reset runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - id: token uses: actions/create-github-app-token@v1 with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} - uses: anthropics/claude-code-action@v1 with: github_token: ${{ steps.token.outputs.token }} claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} prompt: | Use the security-reviewer subagent to review PR #${{ github.event.pull_request.number }} in ${{ github.repository }}. Follow .claude/agents/security-reviewer.md: sandbox, secrets, unsafe, injection, supply chain. Do not merge. Post ONE terse PR comment: only real findings as one-line bullets (file:line — the risk), most severe first; a clean pass is one line. Then apply your verdict: if nothing high-severity add `security-cleared`; on a high finding add `risk:high` and ensure `security-cleared` is absent (holds the merge for the owner). You are a mission-critical gate — think. claude_args: --model claude-opus-4-8 --dangerously-skip-permissions