@@ -138,6 +138,10 @@ jobs:
138138
139139 mkdir -p .claude-review/context
140140
141+ # Prioritize src/ files for context (most likely to need review)
142+ sort -t/ -k1,1 -s < "${{ steps.review_input.outputs.changed_files_path }}" | \
143+ awk '/^src\//{print; next} {rest[NR]=$0} END{for(i in rest) print rest[i]}' > .claude-review/sorted_files.txt
144+
141145 while IFS= read -r path; do
142146 [[ -z "$path" ]] && continue
143147 COUNT=$((COUNT + 1))
@@ -154,10 +158,10 @@ jobs:
154158 [[ -z "$CONTENT" ]] && continue
155159
156160 LINE_COUNT="$(printf '%s' "$CONTENT" | wc -l | tr -d ' ')"
157- if [[ "$LINE_COUNT" -le 400 ]]; then
161+ if [[ "$LINE_COUNT" -le 1500 ]]; then
158162 printf '%s' "$CONTENT" > ".claude-review/context/$SAFE_NAME"
159163 fi
160- done < "${{ steps.review_input.outputs.changed_files_path }}"
164+ done < .claude-review/sorted_files.txt
161165
162166 echo "context_dir=.claude-review/context" >> "$GITHUB_OUTPUT"
163167
@@ -177,7 +181,7 @@ jobs:
177181 plugins : " code-review@claude-code-plugins"
178182 claude_args : >
179183 --dangerously-skip-permissions
180- --max-turns 90
184+ --max-turns 20
181185 --allowedTools
182186 "Bash"
183187 prompt : |
@@ -227,8 +231,14 @@ jobs:
227231 - Do NOT restate the full PR summary.
228232 - If there are no high-confidence findings, leave .claude-review/output.md empty and STOP.
229233
230- Review standard:
231- - Prefer correctness, reliability, cleanup/finalization gaps, inconsistent behavior, edge cases, and meaningful test gaps.
234+ Review standard (in priority order per CLAUDE.md "Code Review Priorities"):
235+ 1. Correctness (logic bugs, numerical issues, array bounds)
236+ 2. Precision discipline (stp vs wp mixing)
237+ 3. Memory management (@:ALLOCATE/@:DEALLOCATE pairing, GPU pointer setup)
238+ 4. MPI correctness (halo exchange, buffer sizing, GPU_UPDATE calls)
239+ 5. GPU code (GPU_* Fypp macros only, no raw pragmas)
240+ 6. Physics consistency (pressure formula matches model_eqns)
241+ 7. Compiler portability (4 CI-gated compilers + AMD flang for GPU)
232242 - Avoid style nitpicks.
233243 - A finding is valid only if it is supported by changed lines, with changed-file context used only to confirm it.
234244
0 commit comments