Skip to content

Commit 2910d55

Browse files
committed
feat: add path-filtered CLI UX review and scope existing reviews by change type
## Summary - Add new `claude-ux-review` job that evaluates CLI user experience: help text, error messages, log/JSON output consistency, and behavioral consistency with existing commands - Path-filter all three Claude review jobs so they only run when relevant files change: - **Standard code review** (`code`): `src/**`, `integration/**`, `deno.json` - **Adversarial review** (`core`): `src/domain/**`, `src/infrastructure/**`, `src/libswamp/**` - **UX review** (`ux`): `src/cli/commands/**`, `src/presentation/**`, `src/domain/errors.ts`, `src/libswamp/**` - PRs that only touch docs, skills, workflows, or scripts skip all Claude reviews and auto-merge faster - UX review uses Sonnet for speed; standard and adversarial reviews remain on Opus ## Test plan - [ ] Open a PR that only changes README.md — verify all three Claude reviews are skipped and auto-merge proceeds - [ ] Open a PR that changes a file in `src/presentation/` — verify standard code review and UX review run, adversarial review is skipped - [ ] Open a PR that changes a file in `src/domain/` — verify all three reviews run - [ ] Verify UX review approves quickly on a PR that touches `src/libswamp/` internals without changing user-facing output shapes - [ ] Verify UX review catches a missing `--json` output field or inconsistent flag name
1 parent 7ad1595 commit 2910d55

1 file changed

Lines changed: 49 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
runs-on: ubuntu-latest
1818
outputs:
1919
skills: ${{ steps.filter.outputs.skills }}
20+
code: ${{ steps.filter.outputs.code }}
21+
core: ${{ steps.filter.outputs.core }}
2022
ux: ${{ steps.filter.outputs.ux }}
2123
steps:
2224
- name: Checkout code
@@ -32,10 +34,19 @@ jobs:
3234
- 'CLAUDE.md'
3335
- 'scripts/review_skills.ts'
3436
- 'scripts/eval_skill_triggers.ts'
37+
code:
38+
- 'src/**'
39+
- 'integration/**'
40+
- 'deno.json'
41+
core:
42+
- 'src/domain/**'
43+
- 'src/infrastructure/**'
44+
- 'src/libswamp/**'
3545
ux:
3646
- 'src/cli/commands/**'
3747
- 'src/presentation/**'
3848
- 'src/domain/errors.ts'
49+
- 'src/libswamp/**'
3950
4051
test:
4152
name: Lint, Test, and Format Check
@@ -148,6 +159,7 @@ jobs:
148159
# NOTE: For this to block merges, enable branch protection on main with:
149160
# "Require a pull request before merging" + "Require approving reviews"
150161
# Claude will use --request-changes to block or --approve to allow
162+
# This job runs on EVERY non-draft PR to ensure branch protection approval
151163
name: Claude Code Review
152164
needs: [test, deps-audit, skill-review]
153165
runs-on: ubuntu-latest
@@ -201,20 +213,36 @@ jobs:
201213
If there ARE blocking issues that must be addressed:
202214
```
203215
gh pr review ${{ github.event.pull_request.number }} --request-changes --body "your review here"
216+
touch /tmp/review-failed
204217
```
205218
206-
Your review body should clearly list any blocking issues at the top, followed by suggestions.
219+
Format your review body as:
220+
## Code Review
221+
222+
### Blocking Issues (if any)
223+
[numbered list]
224+
225+
### Suggestions (if any)
226+
[numbered list]
207227
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
208228
claude_args: |
209229
--model claude-opus-4-6
210-
--allowedTools Read,Glob,Grep,Bash(gh pr review:*),Bash(gh pr view:*),Bash(gh pr diff:*)
230+
--allowedTools Read,Glob,Grep,Bash(gh pr review:*),Bash(gh pr view:*),Bash(gh pr diff:*),Bash(touch /tmp/review-failed)
231+
232+
- name: Fail if changes requested
233+
run: |
234+
if [ -f /tmp/review-failed ]; then
235+
echo "::error::Code review requested changes — blocking merge"
236+
exit 1
237+
fi
211238
212239
claude-adversarial-review:
213240
name: Adversarial Code Review
214-
needs: [test, deps-audit, skill-review]
241+
needs: [changes, test, deps-audit, skill-review]
215242
runs-on: ubuntu-latest
216243
if: |
217244
!failure() && !cancelled() &&
245+
needs.changes.outputs.core == 'true' &&
218246
github.event.pull_request.draft == false
219247
concurrency:
220248
group: claude-adversarial-review-${{ github.event.pull_request.number }}
@@ -321,6 +349,7 @@ jobs:
321349
If there ARE critical or high severity findings:
322350
```
323351
gh pr review ${{ github.event.pull_request.number }} --request-changes --body "your review here"
352+
touch /tmp/review-failed
324353
```
325354
326355
Format your review body as:
@@ -340,7 +369,14 @@ jobs:
340369
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
341370
claude_args: |
342371
--model claude-opus-4-6
343-
--allowedTools Read,Glob,Grep,Bash(gh pr review:*),Bash(gh pr view:*),Bash(gh pr diff:*)
372+
--allowedTools Read,Glob,Grep,Bash(gh pr review:*),Bash(gh pr view:*),Bash(gh pr diff:*),Bash(touch /tmp/review-failed)
373+
374+
- name: Fail if changes requested
375+
run: |
376+
if [ -f /tmp/review-failed ]; then
377+
echo "::error::Adversarial review requested changes — blocking merge"
378+
exit 1
379+
fi
344380
345381
claude-ux-review:
346382
name: CLI UX Review
@@ -437,6 +473,7 @@ jobs:
437473
If there ARE blocking issues:
438474
```
439475
gh pr review ${{ github.event.pull_request.number }} --request-changes --body "your review here"
476+
touch /tmp/review-failed
440477
```
441478
442479
Format your review body as:
@@ -453,7 +490,14 @@ jobs:
453490
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
454491
claude_args: |
455492
--model claude-sonnet-4-6
456-
--allowedTools Read,Glob,Grep,Bash(gh pr review:*),Bash(gh pr view:*),Bash(gh pr diff:*)
493+
--allowedTools Read,Glob,Grep,Bash(gh pr review:*),Bash(gh pr view:*),Bash(gh pr diff:*),Bash(touch /tmp/review-failed)
494+
495+
- name: Fail if changes requested
496+
run: |
497+
if [ -f /tmp/review-failed ]; then
498+
echo "::error::UX review requested changes — blocking merge"
499+
exit 1
500+
fi
457501
458502
auto-merge:
459503
name: Auto-merge PR

0 commit comments

Comments
 (0)