Process code review findings interactively - fix or skip issues from monty-code-review output...
/monty-code-review:code-review to generate a review document.*_review.md file with severity-tagged issues to process.This skill is the second step in the code review workflow:
Step 1: /monty-code-review:code-review β Creates *_review.md
Step 2: /process-code-review:process-review *_review.md β Fix/skip issues
Step 3: /backend-atomic-commit:pre-commit β Run pre-commit checks and fix issues
Before applying fixes, read local typing policy docs when present (for example
docs/python-typing-3.14-best-practices.md, TY_MIGRATION_GUIDE.md,
AGENTS.md) and align type-check behavior with those rules.
/process-code-review:process-review myfile_review.md - Interactive mode (default)/process-code-review:process-review --dry-run myfile_review.md - Preview only, no changes/process-code-review:process-review --auto myfile_review.md - Auto-fix all issues/process-code-review:process-review --auto --severity=NIT myfile_review.md - Auto-fix only NITs/process-code-review:process-review --severity=BLOCKING api_review.md - Process only BLOCKING issuesWhen this skill is active and you are asked to process a review document:
Read the review file and extract all issues. Look for:
[BLOCKING], [SHOULD_FIX], [NIT]Common patterns to look for:
### [BLOCKING] Issue Title
**Location:** path/to/file.py:L120-L145
**Current code:**
...
**Problem:**
...
**Proposed fix:**
...
Use TodoWrite to track all issues:
Example todo list structure:
[BLOCKING] C1. N+1 Query Pattern - pending
[BLOCKING] C2. Missing Org Scoping - pending
[SHOULD_FIX] S1. Performance Issue - pending
[NIT] N1. Docstring Missing - pending
For each issue, starting with highest severity, display:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[SEVERITY] Issue Title (N of M)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Location: file.py:L120-L145
Current Code:
<code snippet from review>
Problem:
<description of issue>
Proposed Fix:
<suggested code or approach>
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
In default interactive mode, ask Fix this issue or skip it? and wait.
With --auto, continue through the selected findings without per-issue approval;
stop for consequential ambiguity or actions outside the authorized scope.
--dry-run only reports proposals and never changes source or review status.
Read the source file to understand current state
Apply the proposed fix using Edit tool
Run the affected quality checks described below; do not run a duplicate formatter/linter pass solely because the next section names it again.
Update the review document to mark the issue as FIXED:
### [BLOCKING] Issue Title
**Status:** β
FIXED (YYYY-MM-DD)
Update TodoWrite to mark as completed
Move to the next issue
Do NOT modify the source file
Ask for optional reason (or use "Deferred")
Update the review document to mark the issue as IGNORED:
### [BLOCKING] Issue Title
**Status:** βοΈ IGNORED (YYYY-MM-DD)
**Reason:** [User's reason or "Deferred"]
Update TodoWrite to mark as completed (skipped)
Move to the next issue
After each fix, run quality checks:
ruff check <file> --fix - Auto-fix linting issuesruff format <file> - Format codety if configured; else pyright; else mypy) - Type checkpython manage.py check - Django system checks (if applicable)For touched files, "baseline acceptable" is not allowed. Resolve all active type-gate errors before moving on. If repo policy requires wider type checks before merge, run them before final completion.
Fix check failures caused by the change and required touched-file gate errors. Report unrelated failures without expanding the task. Reuse passing checks for unchanged inputs; rerun affected checks after edits and any required wider gates before completion.
When all issues are processed, provide a summary:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Review Processing Complete
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Total Issues: 13
β
Fixed: 8
βοΈ Skipped: 3
π
Deferred: 2
Files Modified:
- optimo_core/services/wellbeing_service.py
- optimo_core/schemas/wellbeing.py
Next Steps:
Run /backend-atomic-commit:pre-commit to run pre-commit checks and fix issues.
Review document remains uncommitted (working documentation).
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Use these markers when updating review documents:
| Status | Marker | Meaning |
|---|---|---|
| Open | (no marker) | Issue not yet addressed |
| Fixed | β FIXED | Issue has been resolved in code |
| Ignored | βοΈ IGNORED | Issue intentionally skipped |
| Won't Fix | π« WON'T FIX | Issue acknowledged but will not be fixed |
| Deferred | π DEFERRED | Issue to be addressed in future work |
Always include the date: **Status:** β
FIXED (2025-01-15)
Process issues in this order:
[BLOCKING] - Must fix before merge
[SHOULD_FIX] - Important but not blocking
[NIT] - Minor style/structure issues
Before marking a review as complete, verify:
.bin/ruff check --fix.bin/ruff formatParse arguments to adjust behavior:
| Flag | Description |
|---|---|
--dry-run |
Show all issues and proposed fixes without modifying any files |
--auto |
Apply all fixes without prompting (use with caution) |
--severity=<LEVEL> |
Filter to only process issues of specified severity |
| (no flags) | Interactive mode - prompt for each issue (default) |
--severity=BLOCKING - Only process BLOCKING issues--severity=SHOULD_FIX - Only process SHOULD_FIX issues--severity=NIT - Only process NIT issues# Preview all issues without making changes
/process-code-review:process-review --dry-run api_review.md
# Auto-fix everything (careful!)
/process-code-review:process-review --auto api_review.md
# Auto-fix only minor issues, prompt for important ones
/process-code-review:process-review --auto --severity=NIT api_review.md
# Focus on critical issues only
/process-code-review:process-review --severity=BLOCKING api_review.md
# Dry-run to see only BLOCKING issues
/process-code-review:process-review --dry-run --severity=BLOCKING api_review.md
Flags can be combined:
--dry-run --severity=BLOCKING: Preview only BLOCKING issues--auto --severity=NIT: Auto-fix only NITs (safe for minor style fixes)/backend-atomic-commit:pre-commit to run pre-commit checks on staged changesThis skill integrates with:
The three-step workflow ensures:
Use this mode only when the user explicitly asks to post processed findings to GitHub PR comments.
MUST_01: use one authoritative top-level review summary.MUST_02: avoid redundant inline comments (one anchor per root-cause cluster).MUST_03: run pre/post dedupe audit against both endpoints:/pulls/{pr}/comments/issues/{pr}/commentsMUST_04: keep diagrams/ascii blocks fenced in markdown.MUST_05: if line anchor fails with 422, fallback to file-level inline comment.SHOULD_01: default inline comment cap is 5 unless user requests more.SHOULD_02: prefer editing existing submitted review in place for formatting fixes.SHOULD_03: do not post extra PR-level chatter comments.STEP_01: pre-audit existing reviews and comments by current user.STEP_02: map findings to non-overlapping anchor set.STEP_03: post review/comments once.STEP_04: run duplicate detector and delete redundant comments if any.