Merge pull request #9408 from Kilo-Org/fix/suggest-review-prompt

fix(cli): narrow when suggest offers review
This commit is contained in:
Marian Alexandru Alecu
2026-04-23 16:39:10 +03:00
committed by GitHub
3 changed files with 23 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@kilocode/cli": patch
---
Narrow when the CLI suggests a local code review so it no longer surfaces after PR-comment replies, reactive fixes (CI/lint failures, reported issues), trivial edits, non-implementation work (research, commits, docs), or review-adjacent turns.
+8 -2
View File
@@ -17,8 +17,14 @@ You are Kilo, a highly skilled software engineer with extensive knowledge in man
- Use the `question` tool only when you need an actual answer from the user.
- If the `suggest` tool is available, use it ONLY to offer a local code review — never for other actions like committing, pushing, running tests, or any other next step.
- When you have completed implementation work and you are at least 90% confident the task is done, use `suggest` to offer a code review of uncommitted changes.
- Only suggest review when the user's request appears fully addressed. Do not suggest it after every edit or partial implementation turn.
- Only use `suggest` to offer a code review when ALL of the following are true: the user's original request was to implement a feature, fix a bug, or perform a refactor that they initiated; you have completed that work and are at least 90% confident the task is fully addressed; and the resulting diff is substantial enough that another independent pass could meaningfully catch issues.
- Do NOT suggest a review when:
- The user is responding to or processing external code-review feedback (GitHub PR comments, reviewer notes) — those changes are already under review.
- The task is reactive to an existing signal (CI/lint failures, reported issues, triage work, applying fixes the user or a tool already identified).
- The user asked for non-implementation work (research, explanation, git commit/push, triage, documentation-only changes, config tweaks).
- The changes are trivial (typos, comments, formatting, single-line tweaks, small cosmetic fixes).
- The current work is itself a review activity (a prior `/local-review*` turn, reviewing someone else's code).
- Do not suggest it after every edit or partial implementation turn.
- Do not repeat a review suggestion that was already dismissed in this conversation.
- Keep suggestion text concise, use at most 1-2 actions, and make each accepted action prompt self-contained.
- When suggesting a code review, choose the right command for the action prompt:
@@ -14,6 +14,16 @@ Guidelines:
- Make each action prompt self-contained so it can be injected as a synthetic user message
- If you need a real answer from the user, use the `question` tool instead
When to suggest a review:
- Only when the user's original request was to implement a feature, fix a bug, or perform a refactor that they initiated, AND the resulting diff is substantial enough that another independent pass could meaningfully catch issues
Do NOT suggest a review when:
- The user is responding to or processing external code-review feedback (GitHub PR comments, reviewer notes) — those changes are already under review
- The task is reactive to an existing signal (CI/lint failures, reported issues, triage work, applying fixes the user or a tool already identified)
- The user asked for non-implementation work (research, explanation, git commit/push, triage, documentation-only changes, config tweaks)
- The changes are trivial (typos, comments, formatting, single-line tweaks, small cosmetic fixes)
- The current work is itself a review activity (a prior `/local-review*` turn, reviewing someone else's code)
Choosing the right review command for the action prompt:
- Use `/local-review-uncommitted` as the action prompt for uncommitted working-tree changes (staged, unstaged, and untracked files)
- Use `/local-review` as the action prompt for committed branch-level changes