- Simplified README.md by moving detailed command docs, workflows, and development info to dedicated user-guide/ and developer-guide/ directories. - Created index.md files for both guides to improve navigation. - Extracted individual command guides (e.g., chat.md, edit.md) into user-guide/ for focused, maintainable documentation. - Moved architecture, configuration, and troubleshooting to developer-guide/. - Updated README links to point to the new docs structure.
49 lines
1.7 KiB
Markdown
49 lines
1.7 KiB
Markdown
# 🔍 Review Guide
|
|
|
|
The `review` command provides an AI-powered code review of your current repository or a specific directory. It analyzes your changes (git diff) and repository status to provide meaningful feedback.
|
|
|
|
### Key Features
|
|
|
|
- **Automated Code Review**: Get an instant review of your changes without waiting for a teammate.
|
|
- **Context-Aware**: Analyzes your staged and unstaged changes using `git diff` and `git status`.
|
|
- **Actionable Feedback**: Provides a concise summary and 3-5 specific, actionable improvements.
|
|
|
|
### Usage
|
|
|
|
```bash
|
|
# Review staged changes
|
|
git add feature.go
|
|
grokkit review
|
|
|
|
# Review all changes
|
|
grokkit review
|
|
|
|
# Get detailed review
|
|
grokkit review --debug # See API timing info
|
|
```
|
|
|
|
**Output includes:**
|
|
- Summary of changes
|
|
- 3-5 actionable improvements
|
|
- Potential bugs or issues
|
|
- Best practice suggestions
|
|
|
|
### Options
|
|
|
|
| Flag | Description |
|
|
|------|-------------|
|
|
| `--model`, `-m` | Override the default model (e.g., `grok-4`) |
|
|
|
|
### How it Works
|
|
|
|
1. **Change Analysis**: Grokkit runs `git status` and `git diff` to see what you've changed.
|
|
2. **Review Request**: It sends these changes to Grok with a specialized code review prompt.
|
|
3. **AI Evaluation**: Grok reviews the code for logic errors, style issues, and potential bugs.
|
|
4. **Summary and Tips**: You get a high-level summary and specific suggestions for improvement.
|
|
|
|
### Best Practices
|
|
|
|
- **Review small diffs**: For the most focused and useful feedback, run `review` frequently on smaller sets of changes.
|
|
- **Combine with Lint**: Run `grokkit lint` first to catch basic syntax and style issues, then use `review` for deeper logic analysis.
|
|
- **Model selection**: More complex changes may benefit from the deeper reasoning capabilities of `grok-4`.
|