| name | review-pr |
| description | Use this skill when reviewing a pull request to ForgeLM, whether your own (self-review before requesting review) or someone else's. Applies the code-review standard, catches anti-patterns, and produces actionable feedback. Triggered by requests like "review this PR", "check if PR |
Skill: Review a ForgeLM Pull Request
Following docs/standards/code-review.md. This skill is equally useful for self-review (run it before requesting review) and peer review.
When to use
- Before opening a PR (self-review pass)
- When asked to review someone else's PR
- When a PR has been sitting with review comments and you want to check what's left
Do not use for:
- Making the changes yourself (that's a different task)
- Deciding whether to merge (human maintainer call)
The seven-question review
Go through these in order. If any answer is "no" or "unclear," block the PR. Question 7 fires only when a regex changes; the other six apply to every PR.
1. Does it match the architecture?
Check against docs/standards/architecture.md:
2. Does it match the coding standard?
Check against docs/standards/coding.md:
3. Are error paths correct?
Check against docs/standards/error-handling.md:
4. Is observability correct?
Check against docs/standards/logging-observability.md:
5. Are tests real?
Check against docs/standards/testing.md:
6. Is documentation correct?
Check against docs/standards/documentation.md + localization.md:
7. Does any new / modified regex pass regex.md?
Trigger: any change to re.compile, re.match, re.sub, re.findall, re.split. Phase 11/11.5/12 review cycles burned ~10 iterations on regex correctness — this skill exists to spend zero on the next PR.
Run git diff --unified=0 origin/main..HEAD -- '*.py' | grep -E '^\+.*re\.(compile|match|search|sub|findall|split|fullmatch)' to surface the deltas, then for each:
If the regex runs on operator-controlled input, paste the pathological-input benchmark output into the PR description so reviewers see the linearity proof.
Scope and hygiene
Beyond the six questions:
How to write feedback
For reviewers (including Codex as reviewer):
Specific > abstract
❌ "Docstrings need improvement"
✅ "trainer.py:142 — the docstring says 'trains the model' but the function also saves a checkpoint; please state the full contract"
Suggest concrete changes
Use GitHub's suggestion blocks:
```suggestion
def train_with_revert(config: ForgeConfig, ...) -> TrainResult:
"""Train and conditionally revert on safety regression.
Args:
config: Validated run configuration.
Returns:
TrainResult with metrics and revert status.
"""
```
Distinguish blocking from optional
- Blocking: state the standard violated, link to it.
- Optional: prefix with
Nit:, Style:, or FYI:.
Separate questions from demands
Q: why is this Optional — can the caller guarantee non-None?
Blocking: this needs to use Optional[int] to match codebase convention
Self-review workflow
Before clicking "Create PR":
-
Read the diff in GitHub's web UI (not just git diff) — rendering reveals issues the CLI hides.
-
Grep for new TODO / FIXME / XXX — add owner + issue link or remove.
-
Grep for print( in non-CLI code — remove or justify.
-
Click through each test file — does each new test actually assert something?
-
Click the doc diffs — renders correctly? Links work?
-
Run the one-liner:
ruff format . && ruff check . && pytest tests/ && \
forgelm --config config_template.yaml --dry-run
-
Read your PR description — does it state the one concern clearly?
Escalation
When you as reviewer disagree with the author:
- State the specific disagreement.
- Link to a standard or prior art.
- If unresolved after a round, request a third reviewer or move to an issue.
Default stance: a blocked PR is better than a bad merge.
Pitfalls
- Over-reviewing style fixes that ruff will catch on next push. Don't waste author's time on auto-fixable stuff.
- Rubber-stamping. "LGTM!" without going through the six questions is worse than no review.
- Scope creep in review. "While you're in here, also fix X" — X is a separate PR.
- Accepting "I'll fix it in a follow-up." Follow-ups slip. Require fixes in this PR unless genuinely outside scope.
- Ignoring CI warnings. Yellow status = broken status. Check.
Related skills
add-config-field, add-trainer-feature, add-test, sync-bilingual-docs — the skills whose output this reviews
cut-release — what happens to merged PRs eventually