spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

Merge pull request #16938 from fvolcic/fix-committable-suggestions-docsBrowse files
refactor(code-review): improve issue flagging and agent behavior
Franklin Volcic authored on Jan 8, 2026 · GitHub committed on Jan 8, 2026 parents f34e253 + 4700be0 · commit 7b600bca3b42
1 changed file+15 -24compared with f34e253
Mplugins/code-review/commands/code-review.md
@@ -5,6 +5,10 @@
55
66 Provide a code review for the given pull request.
77
8+**Agent assumptions (applies to all agents and subagents):**
9+- All tools are functional and will work without error. Do not test tools or make exploratory calls.
10+- Only call a tool if it is required to complete the task. Every tool call should have a clear purpose.
11+
812 To do this, follow these steps precisely:
913
1014 1. Launch a haiku agent to check if any of the following are true:
@@ -34,15 +38,15 @@
3438 Agent 4: Opus bug agent (parallel subagent with agent 3)
3539 Look for problems that exist in the introduced code. This could be security issues, incorrect logic, etc. Only look for issues that fall within the changed code.
3640
37- **CRITICAL: We only want HIGH SIGNAL issues.** This means:
38- - Objective bugs that will cause incorrect behavior at runtime
41+ **CRITICAL: We only want HIGH SIGNAL issues.** Flag issues where:
42+ - The code will fail to compile or parse (syntax errors, type errors, missing imports, unresolved references)
43+ - The code will definitely produce wrong results regardless of inputs (clear logic errors)
3944 - Clear, unambiguous CLAUDE.md violations where you can quote the exact rule being broken
4045
41- We do NOT want:
42- - Subjective concerns or "suggestions"
43- - Style preferences not explicitly required by CLAUDE.md
44- - Potential issues that "might" be problems
45- - Anything requiring interpretation or judgment calls
46+ Do NOT flag:
47+ - Code style or quality concerns
48+ - Potential issues that depend on specific inputs or state
49+ - Subjective suggestions or improvements
4650
4751 If you are not certain an issue is real, do not flag it. False positives erode trust and waste reviewer time.
4852
@@ -57,24 +61,11 @@
5761 If NO issues were found, post a summary comment using `gh pr comment` (if `--comment` argument is provided):
5862 "No issues found. Checked for bugs and CLAUDE.md compliance."
5963
60-8. Post inline comments for each issue using `mcp__github_inline_comment__create_inline_comment`:
61- - `path`: the file path
62- - `line` (and `startLine` for ranges): select the buggy lines so the user sees them
63- - `body`: Brief description of the issue (no "Bug:" prefix). For small fixes (up to 5 lines changed), include a committable suggestion:
64- ```suggestion
65- corrected code here
66- ```
64+8. Post inline comments for each issue using `mcp__github_inline_comment__create_inline_comment`. For each comment:
65+ - Provide a brief description of the issue
66+ - For small, self-contained fixes, include a committable suggestion block
67+ - For larger fixes (6+ lines, structural changes, or changes spanning multiple locations), describe the issue and suggested fix without a suggestion block
6768
68- **Suggestions must be COMPLETE.** If a fix requires additional changes elsewhere (e.g., renaming a variable requires updating all usages), do NOT use a suggestion block. The author should be able to click "Commit suggestion" and have a working fix - no followup work required.
69-
70- For larger fixes (6+ lines, structural changes, or changes spanning multiple locations), do NOT use suggestion blocks. Instead:
71- 1. Describe what the issue is
72- 2. Explain the suggested fix at a high level
73- 3. Include a copyable prompt for Claude Code that the user can use to fix the issue, formatted as:
74- ```
75- Fix [file:line]: [brief description of issue and suggested fix]
76- ```
77-
7869 **IMPORTANT: Only post ONE comment per unique issue. Do not post duplicate comments.**
7970
8071 Use this list when evaluating issues in Steps 4 and 5 (these are false positives, do NOT flag):