Skip to content
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

Commit ce799ab

Browse files
committed
Make changes suggested by Howon, includiing some significant clarifications to the Generate improvements page.
1 parent e30d68e commit ce799ab

File tree

3 files changed

+58
-28
lines changed

3 files changed

+58
-28
lines changed

docs/guides/code-review-overview.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ a real repository, see [Quickstart](/getting-started/quickstart).
1919
After you [integrate CodeRabbit with your repository](/platforms), CodeRabbit proceeds
2020
to automatically review every subsequent pull request, as soon as each one is created.
2121

22-
A CodeRabbit code review consists of a single, multi-part comment attached to the pull request.
23-
The comment contains a detailed summary and analysis of the changes,
24-
as well as a listing of problems or areas for potential improvement that it found.
22+
CodeRabbit performs code reviews by attaching comments to the pull request.
23+
These comments contain detailed summaries and analyses of the changes,
24+
as well as listing out problems or areas for potential improvement that it found.
2525

26-
CodeRabbit uses [a variety of open-source linters and security tools](/tools) to provide this analysis. CodeRabbit
27-
also consults an ensemble of models to further analyze and critique the proposed changes,
26+
CodeRabbit uses [a variety of open-source linters and security tools](/tools) and a custom
27+
code verification agent to provide this analysis. CodeRabbit
28+
also consults several models to further analyze and critique the proposed changes,
2829
using all of the content of your repository as context. The code-review comment that CodeRabbit attaches
2930
to your pull request synthesizes and summarizes all of the information collected from these different sources.
3031

@@ -41,14 +42,6 @@ perform a code review:
4142
- If an open pull request that CodeRabbit has already reviewed gets modified with another
4243
commit, then CodeRabbit performs an incremental review that focuses on the new commit.
4344

44-
### Example code reviews {#examples}
45-
46-
The following real pull requests, hosted on GitHub, demonstrate some example CodeRabbit
47-
review comments.
48-
49-
- [A modest refactoring of Markdown-based documentation source](https://github.com/coderabbitai/coderabbit-docs/pull/325), demonstrating a CodeRabbit graph analysis.
50-
- [A large change that added many files](https://github.com/tyaga001/devtoolsacademy/pull/44), demonstrating incremental automated reviews of subsequent commits.
51-
5245
## Interact with CodeRabbit reviews {#interact}
5346

5447
After CodeRabbit attaches its initial code-review comment to a pull request, you can

docs/guides/commands.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,19 +96,31 @@ pull request:
9696
@coderabbitai resolve
9797
```
9898

99-
## Generate summary text {#summary}
99+
## Update information about the pull request {#update}
100100

101-
To have CodeRabbit add or update a generated summary of the branch’s proposed changes
101+
The commands in this section request CodeRabbit to generate and post updated information
102+
about the pull request itself.
103+
104+
### Update the summary text {#summary}
105+
106+
To have CodeRabbit update the generated summary of the branch’s proposed changes
102107
to the pull request’s description, post the following comment:
103-
pull request:
104108

105109
```text
106110
@coderabbitai summary
107111
```
108112

109-
CodeRabbit appends the summary text to the description under the heading
110-
"Summary by CodeRabbit". If CodeRabbit has previously added a summary under that
111-
heading, then it replaces it with the new summary.
113+
CodeRabbit updates the summary text to the description under the heading
114+
"Summary by CodeRabbit".
115+
116+
### Diagram the pull request history {#diagram}
117+
118+
To have CodeRabbit post a comment that contains a sequence diagram which visualizes the
119+
history of the pull request under review, post the following comment:
120+
121+
```text
122+
@coderabbitai generate sequence diagram
123+
```
112124

113125
## Get information about CodeRabbit {#info}
114126

docs/guides/generate-improvements.md

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,33 @@ import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx';
99
<ProPlanNotice />
1010
```
1111

12-
During a code review, you can command CodeRabbit to address its own review comments
13-
by generating its own code improvements, which it publishes on separate branches.
12+
This page is about using CodeRabbit to generate improvements to code under review.
1413

1514
For a general overview of performing code reviews with CodeRabbit, see [Review pull requests](/guides/code-review-overview).
1615

1716
## Overview of CodeRabbit code generation {#overview}
1817

19-
You can command CodeRabbit to generate any code changes necessary to address its own code review suggestions,
20-
or you can command it specifically to address inline documentation gaps.
18+
:::note
19+
This feature is available only on GitHub.
20+
:::
21+
22+
You can request CodeRabbit to generate improvements to a branch that it is currently reviewing.
23+
24+
To do this, write out your request prompt in a comment addressed to `@coderabbitai`,
25+
such as with the following examples:
2126

22-
After you give it a code-generation command, CodeRabbit delivers its suggested improvements by taking these steps:
27+
- `@coderabbitai Please implement the changes you suggested in your code review.`
28+
- `@coderabbitai Add input validation with proper error messages to these new functions.`
29+
- `@coderabbitai Break this large function into smaller, more focused methods.`
2330

31+
Beyond this kind of free-form request, you can also give CodeRabbit keyword-based
32+
commands for common code-generation requests, as described in [Code generation commands](#commands).
33+
This includes the `plan` keyword, which acts as shorthand for the first prompt on the
34+
previous list.
35+
36+
After you give it a code-generation prompt or command, CodeRabbit delivers its suggested improvements by taking these steps:
37+
38+
1. CodeRabbit posts a comment or two to the pull request, detailing its improvement plans.
2439
1. CodeRabbit publishes a new branch, based on the open pull request's branch, to the remote repository.
2540
1. CodeRabbit opens a new pull request based on this new branch, and links to it from the original pull request.
2641

@@ -40,6 +55,10 @@ your workflow.
4055

4156
## Code generation commands {#commands}
4257

58+
This section lists short commands that you can give CodeRabbit to have it accomplish
59+
common code-generation tasks. For more complex tasks, you can instead write out full
60+
prompts, as described in the previous section.
61+
4362
For a complete CodeRabbit command reference, see [Code review command reference](/reference/review-commands).
4463

4564
### Generate inline documentation {#docstrings}
@@ -58,10 +77,6 @@ the Git platforms and programming languages that this feature supports, see
5877

5978
### Generate solutions to open review comments {#plan}
6079

61-
:::note
62-
This feature is available only on GitHub.
63-
:::
64-
6580
To have CodeRabbit generate and add a new repository branch with code improvements
6681
that try to address its own code review comments, post the following comment to the
6782
pull request:
@@ -70,6 +85,16 @@ pull request:
7085
@coderabbitai plan
7186
```
7287

88+
Using this keyword is essentially shorthand for writing out a prompt like like the following:
89+
90+
```text
91+
@coderabbitai Implement the changes that you suggested and apply them to this pull request.
92+
```
93+
94+
If you want to give CodeRabbit more specific implement instructions other than a general
95+
request to implement its own suggestions, then you can write out those instructions
96+
as a full prompt, instead of using the one-word `plan` command.
97+
7398
## What's next {#whats-next}
7499

75100
- [Control and manage code reviews](/guides/commands)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy