Add local AI review skill (/ai-review-local)#227
Conversation
New skill that calls the OpenAI Chat Completions API to review code changes locally before opening a PR. Enables iterative review/revision cycles with Claude Code to catch methodology, edge-case, and pattern issues before CI review. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Fix missing f-string on timeout error message - Clarify docs: skill creates review artifacts, may auto-commit - Step 7: offer to address findings at any severity, not just P0/P1 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
PR ReviewOverall assessment: ⛔ Blocker Executive Summary
MethodologyNo estimator/math/SE changes were introduced. One tooling issue still affects methodology review coverage:
Code QualityI did not treat use of
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
Path to Approval
|
- P0: Add secret scan (canonical patterns) before API upload
- P1: Fix base branch detection using gh repo view instead of @{upstream}
- P1: Swap workflow order: /pre-merge-check before /ai-review-local
- P2: Fix visualization submodule path matching in _needed_sections()
- P3: Remove dead commit-log artifact, fix constraints section wording,
remove misleading commit-message text from prompt adaptation
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Step 7: show full findings summary grouped by severity before prompting - Add data-transmission privacy note to skill docs - Add maintenance comment on PREFIX_TO_SECTIONS mapping Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Add 29 unit tests for openai_review.py (registry extraction, path matching, prompt adaptation, compilation, mapping coverage) - Validate prompt substitutions warn on source drift - Document skill/script contract in module docstring - Add maintenance comment on PREFIX_TO_SECTIONS mapping Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: Executive summary
Methodology Code Quality
Performance Maintainability
Tech Debt Security Documentation/Tests
Path to Approval
|
- Use validated comparison-ref with fallback chain (local → origin → fetch) matching push-pr-update pattern, instead of bare branch name - Remove /pre-merge-check from post-review next steps (it runs before /ai-review-local per CLAUDE.md workflow order) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment✅ Looks good Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
CI installs the package via pip into a temp directory, so .claude/scripts/openai_review.py isn't at the expected path. Tests now discover the script via git repo root fallback and skip the entire module when the script is not found. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Summary
/ai-review-localskill that calls the OpenAI Chat Completions API (gpt-5.4) to review code changes locally before opening a PR.claude/scripts/openai_review.py— standalone Python script (stdlib only) that compiles the review prompt, selectively extracts REGISTRY.md sections via prefix-based matching, and calls the API--full-registry,--dry-run, and--modeloverride.gitignoreto allow.claude/scripts/to be committedCLAUDE.mdworkflow to include/ai-review-localin pre-submission stepsMethodology references (required if estimator / math changes)
Validation
Security / privacy
OPENAI_API_KEYfrom the environment and never logs it. Diffs and selected registry text are transmitted to OpenAI when not using--dry-run.Generated with Claude Code