Make no-comment the default for /code-review

Change the default behavior of /code-review to output to the terminal
instead of posting a PR comment. Users can use the --comment flag to
explicitly post the review as a PR comment when desired.

This is more suitable for local development workflows where posting
comments to the PR is not always needed.
This commit is contained in:
Claude
2025-12-15 17:50:32 +00:00
parent eb87245010
commit e4f682030b
2 changed files with 21 additions and 7 deletions

View File

@@ -22,23 +22,29 @@ Performs automated code review on a pull request using multiple specialized agen
- **Agent #4**: Analyze git blame/history for context-based issues - **Agent #4**: Analyze git blame/history for context-based issues
5. Scores each issue 0-100 for confidence level 5. Scores each issue 0-100 for confidence level
6. Filters out issues below 80 confidence threshold 6. Filters out issues below 80 confidence threshold
7. Posts review comment with high-confidence issues only 7. Outputs review (to terminal by default, or as PR comment with `--comment` flag)
**Usage:** **Usage:**
```bash ```bash
/code-review /code-review [--comment]
``` ```
**Options:**
- `--comment`: Post the review as a comment on the pull request (default: outputs to terminal only)
**Example workflow:** **Example workflow:**
```bash ```bash
# On a PR branch, run: # On a PR branch, run locally (outputs to terminal):
/code-review /code-review
# Post review as PR comment:
/code-review --comment
# Claude will: # Claude will:
# - Launch 4 review agents in parallel # - Launch 4 review agents in parallel
# - Score each issue for confidence # - Score each issue for confidence
# - Post comment with issues ≥80 confidence # - Output issues ≥80 confidence (to terminal or PR depending on flag)
# - Skip posting if no high-confidence issues found # - Skip if no high-confidence issues found
``` ```
**Features:** **Features:**
@@ -114,17 +120,23 @@ This plugin is included in the Claude Code repository. The command is automatica
### Standard PR review workflow: ### Standard PR review workflow:
```bash ```bash
# Create PR with changes # Create PR with changes
# Run local review (outputs to terminal)
/code-review /code-review
# Review the automated feedback # Review the automated feedback
# Make any necessary fixes # Make any necessary fixes
# Optionally post as PR comment
/code-review --comment
# Merge when ready # Merge when ready
``` ```
### As part of CI/CD: ### As part of CI/CD:
```bash ```bash
# Trigger on PR creation or update # Trigger on PR creation or update
# Automatically posts review comments # Use --comment flag to post review comments
/code-review --comment
# Skip if review already exists # Skip if review already exists
``` ```

View File

@@ -52,7 +52,9 @@ Note: Still review Claude generated PR's.
6. Filter out any issues that were not validated in step 5. This step will give us our list of high signal issues for our review. 6. Filter out any issues that were not validated in step 5. This step will give us our list of high signal issues for our review.
7. Finally, comment on the pull request. 7. Finally, output the review.
- If the `--comment` argument is provided, post the review as a comment on the pull request using `gh pr comment`
- Otherwise (default), output the review directly to the terminal for local viewing
When writing your comment, follow these guidelines: When writing your comment, follow these guidelines:
a. Keep your output brief a. Keep your output brief
b. Avoid emojis b. Avoid emojis