Skip to content

Commit 4baf57a

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 90818f2 commit 4baf57a

1 file changed

Lines changed: 59 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 59 additions & 2 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
@@ -149,10 +160,11 @@ jobs:
149160
# "Require a pull request before merging" + "Require approving reviews"
150161
# Claude will use --request-changes to block or --approve to allow
151162
name: Claude Code Review
152-
needs: [test, deps-audit, skill-review]
163+
needs: [changes, test, deps-audit, skill-review]
153164
runs-on: ubuntu-latest
154165
if: |
155166
!failure() && !cancelled() &&
167+
needs.changes.outputs.code == 'true' &&
156168
github.event.pull_request.draft == false
157169
concurrency:
158170
group: claude-review-${{ github.event.pull_request.number }}
@@ -209,12 +221,24 @@ jobs:
209221
--model claude-opus-4-6
210222
--allowedTools Read,Glob,Grep,Bash(gh pr review:*),Bash(gh pr view:*),Bash(gh pr diff:*)
211223
224+
- name: Fail if changes requested
225+
run: |
226+
REVIEW_STATE=$(gh api "/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews" \
227+
--jq '[.[] | select(.user.login == "github-actions[bot]" and .state == "CHANGES_REQUESTED")] | length')
228+
if [ "$REVIEW_STATE" -gt 0 ]; then
229+
echo "::error::Code review requested changes — blocking merge"
230+
exit 1
231+
fi
232+
env:
233+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
234+
212235
claude-adversarial-review:
213236
name: Adversarial Code Review
214-
needs: [test, deps-audit, skill-review]
237+
needs: [changes, test, deps-audit, skill-review]
215238
runs-on: ubuntu-latest
216239
if: |
217240
!failure() && !cancelled() &&
241+
needs.changes.outputs.core == 'true' &&
218242
github.event.pull_request.draft == false
219243
concurrency:
220244
group: claude-adversarial-review-${{ github.event.pull_request.number }}
@@ -342,6 +366,17 @@ jobs:
342366
--model claude-opus-4-6
343367
--allowedTools Read,Glob,Grep,Bash(gh pr review:*),Bash(gh pr view:*),Bash(gh pr diff:*)
344368
369+
- name: Fail if changes requested
370+
run: |
371+
REVIEW_STATE=$(gh api "/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews" \
372+
--jq '[.[] | select(.user.login == "github-actions[bot]" and .state == "CHANGES_REQUESTED")] | length')
373+
if [ "$REVIEW_STATE" -gt 0 ]; then
374+
echo "::error::Adversarial review requested changes — blocking merge"
375+
exit 1
376+
fi
377+
env:
378+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
379+
345380
claude-ux-review:
346381
name: CLI UX Review
347382
needs: [changes, test]
@@ -455,6 +490,28 @@ jobs:
455490
--model claude-sonnet-4-6
456491
--allowedTools Read,Glob,Grep,Bash(gh pr review:*),Bash(gh pr view:*),Bash(gh pr diff:*)
457492
493+
- name: Fail if changes requested
494+
run: |
495+
REVIEW_STATE=$(gh api "/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews" \
496+
--jq '[.[] | select(.user.login == "github-actions[bot]" and .state == "CHANGES_REQUESTED")] | length')
497+
if [ "$REVIEW_STATE" -gt 0 ]; then
498+
echo "::error::UX review requested changes — blocking merge"
499+
exit 1
500+
fi
501+
env:
502+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
503+
504+
- name: Fail if changes requested
505+
run: |
506+
REVIEW_STATE=$(gh api "/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews" \
507+
--jq '[.[] | select(.user.login == "github-actions[bot]" and .state == "CHANGES_REQUESTED")] | length')
508+
if [ "$REVIEW_STATE" -gt 0 ]; then
509+
echo "::error::UX review requested changes — blocking merge"
510+
exit 1
511+
fi
512+
env:
513+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
514+
458515
auto-merge:
459516
name: Auto-merge PR
460517
needs:

0 commit comments

Comments
 (0)