Skip to content

mvp-0.0.1

mvp-0.0.1 #18

# .github/workflows/claude-code-review.yml
# Non-blocking strict review: comments on the PR using gh CLI; never fails the job.
name: Claude code review (strict, non-blocking)
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
group: claude-review-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
claude-review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write # needed for gh pr comment
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Load CLAUDE.md rules
id: rules
shell: bash
run: |
echo 'guidelines<<EOF' >> "$GITHUB_OUTPUT"
sed -n '1,6000p' CLAUDE.md >> "$GITHUB_OUTPUT"
echo 'EOF' >> "$GITHUB_OUTPUT"
- name: Run claude (repo-wide checklist, then publish via gh CLI)
id: claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
prompt: |
You are a STRICT reviewer enforcing every rule in CLAUDE.md across the repository.
Scope:
- Enumerate:
git ls-files '*.scala' '*.sbt' '.scalafmt.conf' 'build.sbt' 'project/*.sbt' 'project/*.scala' 'project/build.properties'
- Apply ALL rules to each file (not just diffs).
Output:
- One markdown report grouped by file.
- For each rule: ✅ PASS or ❌ FAIL with minimal patch/diff.
- A short "Top 10 Fixes" section.
- Final line MUST be:
CLAUDE_RULES_STATUS: PASS # or FAIL
PUBLISHING (MANDATORY):
- Use the PR number from $PR_NUMBER.
- Post your full markdown report as a single PR comment with one Bash command:
gh pr comment "$PR_NUMBER" --body-file - <<'MD'
<PASTE YOUR FULL MARKDOWN REPORT HERE>
MD
Rules to enforce:
---
${{ steps.rules.outputs.guidelines }}
---
claude_args: >-
--allowedTools
"Read"
"Edit"
"MultiEdit"
"Bash(git ls-files:*)"
"Bash(rg:*)"
"Bash(find:*)"
"Bash(sed:*)"
"Bash(xargs:*)"
"Bash(gh pr view:*)"
"Bash(gh pr comment:*)"
--max-turns 10
--verbose
env:
GH_TOKEN: ${{ github.token }} # gh CLI auth
PR_NUMBER: ${{ github.event.pull_request.number }}
- name: Soft gate summary (never fail)
if: always()
env:
GH_TOKEN: ${{ github.token }}
run: |
echo "### Claude strict review" >> "$GITHUB_STEP_SUMMARY"
echo "Report should be posted via gh pr comment on PR #${{ github.event.pull_request.number }}." >> "$GITHUB_STEP_SUMMARY"