You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Execute these steps in order. If a step has no work, state that and continue to the next step.
68
+
Post all review findings in a single summary comment only — never as inline PR review comments.
69
+
</commitment>
64
70
65
-
First, run these checks on files changed in this PR:
66
-
1. `uv run prek run --from-ref origin/main` - linting/formatting issues
67
-
2. `uv run mypy <changed_files>` - type checking issues
71
+
<step name="lint_and_typecheck">
72
+
Run checks on files changed in this PR and auto-fix what you can.
68
73
69
-
If there are prek issues:
70
-
- For SAFE auto-fixable issues (formatting, import sorting, trailing whitespace, etc.), run `uv run prek run --from-ref origin/main` again to auto-fix them
71
-
- For issues that prek cannot auto-fix, do NOT attempt to fix them manually — report them as remaining issues in your summary
74
+
1. Run `uv run prek run --from-ref origin/main` to check linting/formatting.
75
+
If there are auto-fixable issues, run it again to fix them.
76
+
Report any issues prek cannot auto-fixin your summary.
72
77
73
-
If there are mypy issues:
74
-
- Fix type annotation issues (missing return types, Optional/None unions, import errors for type hints, incorrect types)
75
-
- Do NOT add `type: ignore` comments - always fix the root cause
78
+
2. Run `uv run mypy <changed_files>` to check types.
${{ github.event.action == 'synchronize' && 'This is a RE-REVIEW after new commits. First, get the list of changed files in this latest push using `gh pr diff`. Review ONLY the changed files. Check ALL existing review comments and resolve ones that are now fixed.' || 'This is the INITIAL REVIEW.' }}
94
+
2. For each unresolved thread:
95
+
a. Read the file at that path to check if the issue still exists
96
+
b. If fixed → resolve it: `gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "<THREAD_ID>"}) { thread { isResolved } } }'`
97
+
c. If still present → leave it
95
98
96
-
Review this PR focusing ONLY on:
97
-
1. Critical bugs or logic errors
99
+
Read the actual code before deciding. If there are no unresolved threads, skip to the next step.
100
+
</step>
101
+
102
+
<step name="review">
103
+
Review the diff (`gh pr diff ${{ github.event.pull_request.number }}`) for:
104
+
1. Bugs that will crash at runtime
98
105
2. Security vulnerabilities
99
106
3. Breaking API changes
100
-
4. Test failures (methods with typos that wont run)
101
-
5. Stale documentation — if files or directories were moved, renamed, or deleted, check that `.claude/rules/`, `CLAUDE.md`, and `AGENTS.md` don't reference paths that no longer exist
102
-
6. New language support — if new language modules are added under `languages/`, check that `.github/workflows/duplicate-code-detector.yml` includes the new language in its file filters, search patterns, and cross-module checks
103
-
104
-
IMPORTANT:
105
-
- First check existing review comments using `gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/comments`. For each existing comment, check if the issue still exists in the current code.
106
-
- If an issue is fixed, use `gh api --method PATCH repos/${{ github.repository }}/pulls/comments/COMMENT_ID -f body="✅ Fixed in latest commit"` to resolve it.
107
-
- Only create NEW inline comments for HIGH-PRIORITY issues found in changed files.
108
-
- Limit to 5-7 NEW comments maximum per review.
109
-
- Use CLAUDE.md for project-specific guidance.
110
-
- Use `mcp__github_inline_comment__create_inline_comment` sparingly for critical code issues only.
111
107
112
-
## STEP 3: Coverage analysis
108
+
Ignore style issues, type hints, and log message wording.
109
+
Record findings for the summary comment. Refer to CLAUDE.md for project conventions.
110
+
</step>
113
111
112
+
<step name="coverage">
114
113
Analyze test coverage for changed files:
115
114
116
-
1. Get the list of Python files changed in this PR (excluding tests):
0 commit comments