Prompt file imported from fairagro/m4.2_sql_to_arc (
.cursor/commands/code-review.md). Copyright stays with the author.
code-review
Produce a first-party critical review of a local base...HEAD diff (default base main) or a GitHub pull request.
Output: write a report under /tmp via m42-ai (body starts with <!-- m42-ai:code-review -->, numbered findings
with Path bullets — no Findings index table); for a PR, publish a formal COMMENT Pull Request Review when auth
works. Do not triage Copilot/Bugbot threads (use /review-fixer). Do not commit, push, or auto-approve.
Input: optional base ref, and/or PR number/URL.
Steps
- Read and follow
.agents/skills/code-review/SKILL.md. - Use
docs/ai_review_policy.mdfor severity language; do not duplicate Ruff/mypy/Bandit/etc. findings. - Prefer
uv run --project scripts/ai m42-ai code-review-context|code-review-report-write|code-review-publish. - If publishing to a PR and
GH_TOKENis missing with no TTY, ask the user tosource ./scripts/set-dev-tokens.shand wait — keep the/tmpreport if auth fails.
