Skip to content

feat(cli): unify local review commands under /review - #11084

Merged
alex-alecu merged 29 commits into
Kilo-Org:mainfrom
maphew:main
Jul 1, 2026
Merged

feat(cli): unify local review commands under /review#11084
alex-alecu merged 29 commits into
Kilo-Org:mainfrom
maphew:main

Conversation

@maphew

@maphew maphew commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Makes /review the single local review command, defaulting to staged, unstaged, and untracked changes while supporting explicit uncommitted and branch scopes.
  • Preserves commit hash, base ref, and pull request review support with the stricter high-signal, no-edit review workflow.
  • Removes hidden legacy aliases and obsolete prompt files so command dispatch, suggestions, and telemetry consistently use review.

Related Issue

Fixes #10980

- Remove subtask: true from /review to prevent primary agent subagent error
- Add deprecation notice guiding users to /local-review-uncommitted or /local-review
- Reuse local-review-uncommitted template for seamless fallback behavior

Fixes Kilo-Org#10980
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

@maphew is attempting to deploy a commit to the Kilo Code Team on Vercel.

A member of the Team first needs to authorize it.

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

return `⚠️ DEPRECATION NOTICE: The /review command is deprecated. Please use /local-review-uncommitted for uncommitted changes or /local-review for branch reviews.
${uncommittedReview.template}`

P1 Badge Preserve argument-based /review scopes

When a user runs deprecated /review with an argument such as a commit SHA, branch, or PR URL, this now injects the /local-review-uncommitted template, whose instructions treat $ARGUMENTS only as free-form guidance and explicitly limit the scope to uncommitted changes. That silently reviews the wrong diff for existing /review <commit|branch|pr> invocations instead of preserving the old behavior or directing the user to an equivalent command before proceeding.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kilo-code-bot

kilo-code-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/opencode/src/kilocode/cli/cmd/command-display.ts 15 Added branch in slashMatches is a no-op: reviewCommandName(name) only matches when name === "review", which the existing cmd.name === name fallback already handles.

All previously flagged findings on this PR (merge-commit patch gap, option-injected base refs, numeric-commit-vs-PR ordering, legacy /local-review* alias/telemetry/dispatch handling, and the visual-regression path filter) were re-verified against the current HEAD (8b7b69b) and are confirmed fixed in the current code.

Files Reviewed (35 files)
  • .changeset/fix-review-command-issues.md
  • .github/workflows/visual-regression.yml
  • packages/kilo-docs/pages/automate/agent-manager-workflows.md
  • packages/kilo-docs/pages/automate/code-reviews/overview.md
  • packages/kilo-docs/pages/code-with-ai/platforms/cli.md
  • packages/kilo-docs/pages/code-with-ai/platforms/vscode/whats-new.md
  • packages/kilo-telemetry/src/telemetry.ts
  • packages/kilo-vscode/tests/unit/kilo-provider-utils.test.ts
  • packages/kilo-vscode/tests/unit/suggestion-recovery.test.ts
  • packages/kilo-vscode/webview-ui/src/stories/chat.stories.tsx
  • packages/kilo-vscode/webview-ui/src/stories/tool-call-lab.stories.tsx
  • packages/opencode/src/command/index.ts
  • packages/opencode/src/kilocode/cli/cmd/command-display.ts - 1 issue
  • packages/opencode/src/kilocode/cli/cmd/tui/feature-plugins/home/tips.ts
  • packages/opencode/src/kilocode/components/tips.tsx
  • packages/opencode/src/kilocode/review/command.ts
  • packages/opencode/src/kilocode/review/review.ts
  • packages/opencode/src/kilocode/review/review.txt (renamed from local-review.txt)
  • packages/opencode/src/kilocode/session/processor.ts
  • packages/opencode/src/kilocode/soul.txt
  • packages/opencode/src/kilocode/suggestion/tool.txt
  • packages/opencode/src/session/prompt.ts
  • packages/opencode/test/fixtures/recordings/kilocode/session/native-anthropic-tool-loop.json
  • packages/opencode/test/fixtures/recordings/kilocode/session/native-openai-oauth-tool-loop.json
  • packages/opencode/test/fixtures/recordings/kilocode/session/native-zen-tool-loop.json
  • packages/opencode/test/kilocode/cli/cmd/tui/attention.test.ts
  • packages/opencode/test/kilocode/review-command.test.ts
  • packages/opencode/test/kilocode/session-processor-review-telemetry.test.ts
  • packages/opencode/test/kilocode/session-prompt-queue.test.ts
  • packages/opencode/test/kilocode/sessions/remote-sender.test.ts
  • packages/opencode/test/kilocode/suggestion/auto-dismiss.test.ts
  • packages/opencode/test/kilocode/suggestion/suggestion.test.ts
  • packages/opencode/test/kilocode/suggestion/tool.test.ts
  • packages/opencode/test/session/prompt.test.ts
  • script/upstream/VERIFICATION_TEST.md
Previous Review Summaries (10 snapshots)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • .github/workflows/visual-regression.yml

Previous review (commit ac93273)

Status: 1 Issue Found | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
.github/workflows/visual-regression.yml 79 Switching to the local setup action leaves action-only changes outside the workflow path filter, so this CI gate can be skipped when its own install logic changes.
Files Reviewed (1 files)
  • .github/workflows/visual-regression.yml - 1 issue

Previous review (commit 98ca191)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (8 files)
  • packages/kilo-docs/pages/automate/code-reviews/overview.md
  • packages/kilo-docs/pages/code-with-ai/platforms/cli.md
  • packages/kilo-vscode/webview-ui/src/stories/chat.stories.tsx
  • packages/opencode/src/kilocode/soul.txt
  • packages/opencode/test/fixtures/recordings/kilocode/session/native-anthropic-tool-loop.json
  • packages/opencode/test/fixtures/recordings/kilocode/session/native-openai-oauth-tool-loop.json
  • packages/opencode/test/fixtures/recordings/kilocode/session/native-zen-tool-loop.json
  • packages/opencode/test/kilocode/review-command.test.ts

Previous review (commit fe3a763)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (5 files)
  • packages/opencode/src/command/index.ts
  • packages/opencode/src/kilocode/cli/cmd/command-display.ts
  • packages/opencode/src/kilocode/review/command.ts
  • packages/opencode/src/kilocode/review/review.txt
  • packages/opencode/src/kilocode/session/processor.ts

Previous review (commit 468190f)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • packages/opencode/test/fixtures/recordings/kilocode/session/native-anthropic-tool-loop.json
  • packages/opencode/test/fixtures/recordings/kilocode/session/native-openai-oauth-tool-loop.json
  • packages/opencode/test/fixtures/recordings/kilocode/session/native-zen-tool-loop.json

Previous review (commit ef3c23c)

Status: 1 Issue Found | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/kilocode/review/review.txt 145 The dead-code track now asks reviewers to flag non-dead-code size complaints.
Files Reviewed (7 files)
  • packages/kilo-docs/pages/automate/code-reviews/overview.md
  • packages/kilo-vscode/tests/unit/kilo-provider-utils.test.ts
  • packages/opencode/src/kilocode/review/review.txt - 1 issue
  • packages/opencode/test/kilocode/review-command.test.ts
  • packages/opencode/test/kilocode/session-prompt-queue.test.ts
  • packages/opencode/test/kilocode/sessions/remote-sender.test.ts
  • packages/opencode/test/session/prompt.test.ts

Previous review (commit 04c8780)

Status: 2 Issues Found | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/command/index.ts 108 Removing the legacy /local-review* registrations still breaks recovered pending suggestions from existing sessions.
packages/opencode/src/kilocode/review/review.txt 21 Numeric-only commit hashes are classified as pull request numbers before commit review can match.
Files Reviewed (22 files)
  • .changeset/fix-review-command-issues.md
  • packages/kilo-docs/pages/automate/agent-manager-workflows.md
  • packages/kilo-docs/pages/automate/code-reviews/overview.md
  • packages/kilo-docs/pages/code-with-ai/platforms/cli.md
  • packages/kilo-docs/pages/code-with-ai/platforms/vscode/whats-new.md
  • packages/kilo-vscode/tests/unit/suggestion-recovery.test.ts
  • packages/opencode/src/cli/cmd/tui/feature-plugins/home/tips-view.tsx
  • packages/opencode/src/command/index.ts - 1 issue
  • packages/opencode/src/kilocode/cli/cmd/tui/feature-plugins/home/tips.ts
  • packages/opencode/src/kilocode/components/tips.tsx
  • packages/opencode/src/kilocode/review/command.ts
  • packages/opencode/src/kilocode/review/local-review-uncommitted.txt
  • packages/opencode/src/kilocode/review/local-review.txt
  • packages/opencode/src/kilocode/review/review.txt - 1 issue
  • packages/opencode/test/kilocode/cli/cmd/tui/attention.test.ts
  • packages/opencode/test/kilocode/review-command-alias.test.ts
  • packages/opencode/test/kilocode/review-command.test.ts
  • packages/opencode/test/kilocode/session-prompt-queue.test.ts
  • packages/opencode/test/kilocode/sessions/remote-sender.test.ts
  • packages/opencode/test/kilocode/suggestion/auto-dismiss.test.ts
  • packages/opencode/test/kilocode/suggestion/suggestion.test.ts
  • packages/opencode/test/kilocode/suggestion/tool.test.ts

Previous review (commit 5978bf7)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (6 files)
  • packages/opencode/src/command/index.ts
  • packages/opencode/src/kilocode/review/command.ts
  • packages/opencode/src/kilocode/review/local-review-uncommitted.txt
  • packages/opencode/src/kilocode/review/local-review.txt
  • packages/opencode/test/kilocode/review-command-alias.test.ts
  • packages/opencode/test/kilocode/review-command.test.ts

Previous review (commit dfaca49)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/command/index.ts 108 Removing the legacy /local-review* registrations breaks recovered pending review suggestions from existing sessions.
Files Reviewed (16 files)
  • packages/opencode/src/command/index.ts — 1 issue
  • packages/opencode/src/kilocode/review/command.ts
  • packages/opencode/src/kilocode/review/review.txt
  • packages/opencode/src/kilocode/review/review.ts
  • packages/opencode/src/kilocode/suggestion/index.ts
  • packages/opencode/src/kilocode/suggestion/tool.ts
  • packages/opencode/src/kilocode/suggestion/tool.txt
  • packages/opencode/src/kilocode/soul.txt
  • packages/opencode/src/kilocode/cli/cmd/tui/feature-plugins/home/tips.ts
  • packages/opencode/src/kilocode/components/tips.tsx
  • packages/opencode/test/kilocode/review-command.test.ts
  • packages/opencode/test/kilocode/suggestion/suggestion.test.ts
  • packages/opencode/test/kilocode/suggestion/tool.test.ts
  • packages/opencode/test/kilocode/session-processor-review-telemetry.test.ts
  • packages/kilo-vscode/tests/unit/suggestion-recovery.test.ts
  • packages/kilo-telemetry/src/telemetry.ts

Previous review (commit 396845f)

Status: No Issues Found | Recommendation: Merge

What Changed Since Last Review

The PR was updated to replace the inline deprecated /review command body with a dedicated deprecatedReviewCommand() function and a new deprecated-review.txt prompt template. The new template adds a STEP 1 classification layer: if the user passes a commit SHA, branch name, tag, or PR URL, the agent outputs a clear redirect message instead of silently falling back to an uncommitted review. Free-form or empty input proceeds to STEP 2, which is the full uncommitted review workflow. The changeset description was also updated to be user-facing.

Previously Flagged Issues — All Resolved ✓

Issue Status
Dead PROMPT_REVIEW import (WARNING) ✅ Fixed — import removed
Duplicate localReviewUncommittedCommand() call (SUGGESTION) ✅ Fixed
No changeset (SUGGESTION) ✅ Fixed — .changeset/fix-review-command-issues.md added and updated
Files Reviewed (4 files)
  • packages/opencode/src/command/index.ts — clean; deprecated command registered via spread
  • packages/opencode/src/kilocode/review/command.ts — new deprecatedReviewCommand() export, no issues
  • packages/opencode/src/kilocode/review/deprecated-review.txt — new template; dual $ARGUMENTS is intentional (classification display + guidance), consistent with existing templates
  • .changeset/fix-review-command-issues.md — description updated to user-facing language

Reviewed by claude-sonnet-5-20260630 · Input: 88 · Output: 27.8K · Cached: 4.8M

Review guidance: REVIEW.md from base branch main

maphew and others added 2 commits June 10, 2026 10:26
…mand

When /review is called with a commit SHA, branch name, or PR URL, the
previous implementation silently fell through to /local-review-uncommitted,
reviewing uncommitted changes instead of the intended target.

The new deprecated-review template detects these argument patterns and
redirects the user to /local-review with their original arguments, rather
than silently reviewing the wrong diff scope.
@johnnyeric
johnnyeric requested a review from alex-alecu June 12, 2026 11:25
@IamCoder18

Copy link
Copy Markdown
Contributor

+1

This would be useful!

@alex-alecu

Copy link
Copy Markdown
Contributor

@maphew Thanks for your contribution! We are having today a sync to decide if we want to remove this command completely or the other way around: keeping only this command and removing /local-review and /local-review-uncommitted. Based on this, we will decide where we go with this PR.

@alex-alecu

Copy link
Copy Markdown
Contributor

@maphew We decided to remove completely /local-review and /local-review-uncommitted in favor of /review. Can you do that and update the prompt for /review to match as close as possible what we have in the other 2 removed commands? No worries if you don't do it 100% perfect, I can take it afterwards over the finish line

@maphew

maphew commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

That makes sense to me. Collapse complexity wherever possible! I'll get on it.

Consolidate `/local-review` and `/local-review-uncommitted` into a single `/review` command that uses subcommands (`uncommitted` or `branch`) to determine the review scope.

- Replace deprecated `/local-review-*` slash commands with `/review [scope]`
- Update documentation to reflect new command syntax
- Update telemetry to track the unified `review` command
- Update test suites to validate new command parsing and behavior
- Refactor review prompt templates and logic to support the new structure

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@maphew maphew changed the title fix(cli): redirect deprecated /review to /local-review-uncommitted feat(cli): unify local review commands under /review Jun 18, 2026
Comment thread packages/opencode/src/command/index.ts Outdated
Comment thread packages/opencode/src/command/index.ts Outdated
Comment thread packages/opencode/src/kilocode/review/command.ts
Comment thread packages/opencode/src/kilocode/review/review.txt Outdated
# Conflicts:
#	packages/opencode/src/kilocode/review/local-review-uncommitted.txt
#	packages/opencode/src/kilocode/review/review.txt
#	packages/opencode/test/kilocode/local-review-command.test.ts
#	packages/opencode/test/session/prompt.test.ts
Comment thread packages/opencode/src/kilocode/review/review.txt Outdated
@alex-alecu

Copy link
Copy Markdown
Contributor
Screenshot 2026-06-25 at 19 41 22

@maphew

Comment thread packages/opencode/src/kilocode/review/review.txt
Comment thread packages/opencode/src/kilocode/review/review.txt
Comment thread .github/workflows/visual-regression.yml
Comment thread packages/opencode/src/kilocode/cli/cmd/command-display.ts
@alex-alecu
alex-alecu merged commit 712de0e into Kilo-Org:main Jul 1, 2026
25 of 28 checks passed
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
feat(cli): unify local review commands under /review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bad UX: Tool execution failed Agent "code" is a primary agent and cannot be used as a subagent

4 participants