Update code reviewer docs for platforms

This commit is contained in:
Dennis Meister
2026-02-18 12:09:53 +01:00
parent d030883961
commit e051ed2842
6 changed files with 589 additions and 39 deletions
+9 -1
View File
@@ -6,7 +6,15 @@ export const AutomateNav: NavSection[] = [
links: [
{ href: "/automate", children: "Overview" },
{ href: "/automate/integrations", children: "Integrations" },
{ href: "/automate/code-reviews", children: "Code Reviews" },
{
href: "/automate/code-reviews/overview",
children: "Code Reviews",
subLinks: [
{ href: "/automate/code-reviews/overview", children: "Code Reviews Overview" },
{ href: "/automate/code-reviews/github", children: "GitHub" },
{ href: "/automate/code-reviews/gitlab", children: "GitLab" },
],
},
{ href: "/automate/agent-manager", children: "Agent Manager" },
{ href: "/automate/kiloclaw", children: "KiloClaw" },
],
@@ -0,0 +1,114 @@
---
title: "GitHub Code Reviews"
description: "Set up automated AI code reviews on GitHub pull requests"
---
# GitHub Code Reviews
Kilo's Code Reviews integrate with GitHub via a **GitHub App** to automatically review pull requests with AI. When a PR is opened, updated, or marked ready for review, the Review Agent analyzes the changes and posts feedback directly on the pull request.
## Prerequisites
- A Kilo Code account at [app.kilo.ai](https://app.kilo.ai)
- A GitHub account with access to the repositories you want to review
- Kilo Code credits for AI model usage
## Setup
### Step 1: Install the GitHub App
1. Go to the **Integrations** page:
- **Personal**: [app.kilo.ai/integrations/github](https://app.kilo.ai/integrations/github)
- **Organization**: Your organization → Integrations → GitHub
2. Click **Install GitHub App**
3. Choose which GitHub account or organization to install the app on
4. Select repository access:
- **All repositories** — the app can access all current and future repos
- **Only select repositories** — choose specific repos
5. Click **Install**
The GitHub App requests the following permissions:
| Permission | Access | Purpose |
| ------------------- | ------------ | -------------------------------- |
| Pull requests | Read & Write | Post review comments |
| Repository contents | Read | Analyze code |
| Issues | Read & Write | Post summary comments, reactions |
| Metadata | Read | List repositories |
### Step 2: Configure the Review Agent
1. Go to **Code Reviews**:
- **Personal**: [app.kilo.ai/code-reviews](https://app.kilo.ai/code-reviews)
- **Organization**: Your organization → Code Reviews
2. Toggle **Enable AI Code Review** to on
3. Configure your preferences:
- **AI Model** — Select from available models (default: Claude Sonnet 4.5)
- **Review Style** — Strict, Balanced, or Lenient
- **Repository Selection** — All repositories or select specific ones
- **Focus Areas** — Security, performance, bugs, style, testing, documentation
- **Max Review Time** — 5 to 30 minutes
- **Custom Instructions** — Add team-specific review guidelines
4. Click **Save Configuration**
### Step 3: Open a Pull Request
Once configured, the Review Agent automatically runs when:
| PR Event | Triggers Review |
| ------------------------ | --------------- |
| PR opened | ✅ Yes |
| New commits pushed to PR | ✅ Yes |
| PR reopened | ✅ Yes |
| Draft PR marked ready | ✅ Yes |
| Draft PR opened | ❌ Skipped |
| PR closed | ❌ No |
## What to Expect
When a review triggers:
1. A 👀 reaction appears on the PR — this means Kilo is reviewing
2. The AI model analyzes the diff and changed files
3. The agent posts:
- A **summary comment** with overall findings
- **Inline comments** on specific lines with issues and suggestions
- Severity tags (critical, warning, info)
### When You Push New Commits
- The previous review is **automatically cancelled** (no stale feedback)
- A new review starts for the latest commit
- If a previous summary comment exists, it is **updated in place**
## Repository Selection
- **All repositories** — Every repo accessible to the GitHub App triggers reviews
- **Selected repositories** — Only repos you choose in the configuration
The repository list is synced from GitHub and can be refreshed from the configuration page.
## Troubleshooting
### Reviews are not triggering
1. Verify the GitHub App is installed and has access to the repository
2. Check that the Review Agent is **enabled** in the Code Reviews configuration
3. Ensure the repository is in the allowed list (if using "Selected repositories" mode)
4. Confirm the PR is not a draft
### Reviews are failing
- Check the Code Reviews page for error details on specific reviews
- Ensure you have sufficient Kilo Code credits
- Very large PRs may time out — try increasing the max review time
### The GitHub App is missing permissions
1. Go to your GitHub Settings → Applications → KiloConnect → Configure
2. Verify the app has the required permissions listed above
3. If permissions were changed, you may need to re-authorize
### Duplicate comments
The system automatically deduplicates reviews for the same PR and commit SHA. If you see duplicate comments, this may be from a previous version — push a new commit to trigger a fresh review.
@@ -0,0 +1,174 @@
---
title: "GitLab Code Reviews"
description: "Set up automated AI code reviews on GitLab merge requests"
---
# GitLab Code Reviews
Kilo's Code Reviews integrate with GitLab to automatically review merge requests with AI. When an MR is opened, updated, or reopened, the Review Agent analyzes the changes and posts feedback directly on the merge request — as summary notes and inline discussion comments.
Both **GitLab.com** and **self-hosted GitLab instances** are supported.
## Prerequisites
- A Kilo Code account at [app.kilo.ai](https://app.kilo.ai)
- A GitLab account with **Maintainer** role (or higher) on the projects you want to review
- Kilo Code credits for AI model usage
> **Why Maintainer role?** Kilo creates a bot account (Project Access Token) on each project so that review comments appear from a bot, not your personal account. This requires Maintainer access.
## Setup
### Step 1: Connect GitLab
You can connect using **OAuth** or a **Personal Access Token (PAT)**.
#### Option A: OAuth (GitLab.com)
1. Go to the **Integrations** page:
- **Personal**: [app.kilo.ai/integrations/gitlab](https://app.kilo.ai/integrations/gitlab)
- **Organization**: Your organization → Integrations → GitLab
2. Click **Connect GitLab**
3. Authorize the application on GitLab
4. You'll be redirected back to Kilo with the connection active
#### Option A: OAuth (Self-Hosted)
For self-hosted GitLab instances using OAuth, you need to register an OAuth application first:
1. In your GitLab instance, go to **Admin Area → Applications** (or **User Settings → Applications**)
2. Create a new application:
- **Name**: `Kilo Code`
- **Redirect URI**: `https://app.kilo.ai/api/integrations/gitlab/callback`
- **Scopes**: `api`, `read_user`, `read_repository`, `write_repository`
- **Confidential**: Yes
3. Copy the **Application ID** and **Secret**
4. In Kilo, go to the GitLab integration page
5. Enter your **Instance URL**, **Client ID**, and **Client Secret**
6. Click **Connect** and authorize
#### Option B: Personal Access Token
1. In GitLab, go to **User Settings → Access Tokens**
2. Create a token with the `api` scope
3. Copy the token
4. In Kilo, go to the GitLab integration page
5. Paste the token (and enter your Instance URL for self-hosted)
6. Click **Connect**
> PAT tokens cannot be refreshed automatically. When your token expires, create a new one in GitLab and reconnect in Kilo.
### Step 2: Configure the Review Agent
1. Go to **Code Reviews**:
- **Personal**: [app.kilo.ai/code-reviews](https://app.kilo.ai/code-reviews)
- **Organization**: Your organization → Code Reviews
2. Toggle **Enable AI Code Review** to on
3. Configure your preferences:
- **AI Model** — Select from available models (default: Claude Sonnet 4.5)
- **Review Style** — Strict, Balanced, or Lenient
- **Repository Selection** — All repositories or select specific ones
- **Focus Areas** — Security, performance, bugs, style, testing, documentation
- **Max Review Time** — 5 to 30 minutes
- **Custom Instructions** — Add team-specific review guidelines
4. Click **Save Configuration**
When you select repositories, Kilo **automatically creates webhooks** on each project.
### Step 3: Open a Merge Request
Once configured, the Review Agent automatically runs when:
| MR Event | Triggers Review |
| ------------------------ | --------------- |
| MR opened | ✅ Yes |
| New commits pushed to MR | ✅ Yes |
| MR reopened | ✅ Yes |
| Draft or WIP MR opened | ❌ Skipped |
| MR closed | ❌ No |
| MR merged | ❌ No |
## What to Expect
When a review triggers:
1. A 👀 reaction appears on the MR — this means Kilo is reviewing
2. The AI model analyzes the diff and changed files
3. The agent posts:
- A **summary note** on the MR with overall findings
- **Inline discussion comments** on specific lines with issues and suggestions
- Severity tags (critical, warning, info)
### When You Push New Commits
- The previous review is **automatically cancelled** (no stale feedback)
- A new review starts for the latest commit
- If a previous summary note exists, it is **updated in place**
## How the Bot Identity Works
Review comments are posted by a **Kilo Code Review Bot** — not by your personal GitLab account. This bot is created automatically as a Project Access Token on each project.
- Created automatically the first time a project is reviewed
- Valid for 365 days and rotated automatically before expiry
- If you manually revoke the bot token in GitLab, Kilo creates a new one on the next review
- Requires **Maintainer role** on the project
## Webhooks
Kilo manages webhooks automatically:
- **Created** when you add a project to code reviews
- **Deleted** when you remove a project or disable reviews
You don't need to set up webhooks manually. If automatic webhook creation fails due to permissions, you can add the webhook manually in **GitLab → Project → Settings → Webhooks**:
- **URL**: `https://app.kilo.ai/api/webhooks/gitlab`
- **Secret token**: Available in your integration settings
- **Trigger**: Merge request events
## Disconnecting
1. Go to the GitLab integration page
2. Click **Disconnect**
3. Your tokens are cleared, but webhook configuration is preserved so reconnecting restores your setup
> Disconnecting from Kilo does not revoke OAuth tokens on GitLab's side. You can manually revoke them from **GitLab → User Settings → Applications → Authorized Applications**.
## Troubleshooting
### Reviews are not triggering
1. Verify the GitLab integration is connected and active
2. Check that the Review Agent is **enabled** in Code Reviews
3. Ensure the project is in the allowed list
4. Confirm the MR is not a draft or WIP
5. Check that a webhook exists on the GitLab project (Project → Settings → Webhooks)
### "Permission denied" or "Cannot create bot token" errors
You need **Maintainer role** on the GitLab project. Both webhook creation and bot token creation require Maintainer access or higher.
### Reviews are failing
- Check the Code Reviews page for error details
- Ensure you have sufficient Kilo Code credits
- Large MRs may time out — increase the max review time setting
### No projects listed after connecting
- Click the refresh button to sync projects from GitLab
- Ensure your GitLab account has access to the projects you expect
- The integration shows projects where you are a member
### Token expired
- **OAuth**: Tokens refresh automatically. If refresh fails, reconnect from the integration page.
- **PAT**: Create a new token in GitLab and reconnect in Kilo.
### Self-hosted connection issues
- Verify your instance URL is accessible from the internet
- Ensure HTTPS is configured
- Check that OAuth application scopes include all required scopes
- Verify the redirect URI matches: `https://app.kilo.ai/api/integrations/gitlab/callback`
@@ -5,22 +5,21 @@ description: "Automate code reviews with AI assistance"
# Code Reviews
Kilo's **Code Reviews** feature automatically analyzes your pull requests using an AI model of your choice. It can review code the moment a PR is opened or updated, surface issues, and provide structured feedback across performance, security, style, and test coverage.
Kilo's **Code Reviews** feature automatically analyzes your pull or merge requests using an AI model of your choice. It can review code the moment a PR/MR is opened or updated, surface issues, and provide structured feedback across performance, security, style, and test coverage.
## What Code Reviews Enable
## Supported Platforms
- Automated AI review on every pull request
- Consistent feedback based on your teams standards
- Automatic detection of bugs, security risks, and anti-patterns
- Deep reasoning over changed files, diffs, and repo context
- Customizable review strictness and focus areas
| Platform | Integration Type | Details |
| -------- | ---------------- | ------------------------------ |
| GitHub | GitHub App | [GitHub Setup Guide](./github) |
| GitLab | OAuth or PAT | [GitLab Setup Guide](./gitlab) |
## Prerequisites
Before enabling Code Reviews:
- **GitHub Integration must be configured**
Connect your account via the [Integrations tab](https://app.kilo.ai/integrations) so that the Review Agent can access your repositories.
- **A platform integration must be configured:** Connect your GitHub or GitLab account via the [Integrations page](https://app.kilo.ai/integrations) so that the Review Agent can access your repositories.
- **Kilo Code credits:** The AI model uses credits when analyzing your code.
## Cost
@@ -29,27 +28,21 @@ Before enabling Code Reviews:
- [Kilo Discord](https://discord.gg/hZnd57qN)
- **Kilo Code credits are still used** when the agent performs model reasoning during a review.
## How to Use
## Getting Started
1. Go to the **Review Agent** section in your Kilo Code [personal](https://app.kilo.ai/profile) or [Organization](https://app.kilo.ai/organizations) dashboard.
2. Toggle **Enable AI Code Review** to automatically review PRs on open/update.
3. Choose an **AI Model** (e.g., Grok Code Fast 1).
4. Select a **Review Style**:
- Strict
- Balanced
- Lenient
1. Go to the **Code Reviews** page in your [personal dashboard](https://app.kilo.ai/profile) or [organization dashboard](https://app.kilo.ai/organizations).
2. Toggle **Enable AI Code Review** to on.
3. Choose an **AI Model** (e.g., Claude Sonnet 4.5).
4. Select a **Review Style** — Strict, Balanced, or Lenient.
5. Choose which **repositories** should receive automatic reviews.
6. Optionally select **Focus Areas** such as:
- Security vulnerabilities
- Performance issues
- Bug detection
- Code style
- Test coverage
- Documentation gaps
6. Optionally select **Focus Areas** such as security, performance, bugs, style, testing, or documentation.
7. Set a **maximum review time** (530 minutes).
8. Add **custom instructions** to shape how the agent reviews your code.
Once configured, the Review Agent will run automatically on PR events.
Once configured, the Review Agent runs automatically on PR/MR events. For platform-specific setup, see:
- [GitHub Code Reviews](./github.md)
- [GitLab Code Reviews](./gitlab.md)
## Local Code Reviews
@@ -70,19 +63,16 @@ The CLI provides two commands for local code reviews:
## How Code Reviews Work
- When a pull request is opened or updated:
1. The Review Agent receives the PR metadata, diff, and file context.
2. The selected model analyzes all changes.
3. The agent applies your chosen review style and focus areas.
4. It generates a structured review with:
- Inline comments
- Summary findings
- Suggested fixes
- Risk and severity tagging
- Reviews respect the **maximum time limit** you set.
- Only repositories youve selected will trigger automatic analysis.
When a pull request or merge request is opened or updated:
Reviews are posted directly in GitHub as if coming from a team reviewer.
1. The Review Agent receives the PR/MR metadata, diff, and file context.
2. The selected model analyzes all changes.
3. The agent applies your chosen review style and focus areas.
4. It generates a structured review with: - Inline comments - Summary findings - Suggested fixes - Risk and severity tagging
5. Reviews respect the **maximum time limit** you set.
6. Only repositories youve selected will trigger automatic analysis.
Reviews are posted directly in your platform (GitHub or GitLab) as if coming from a team reviewer.
## Review Styles
@@ -102,7 +92,7 @@ Reviews are posted directly in GitHub as if coming from a team reviewer.
- Flags only critical issues
- Encouraging and lightweight
- Ideal for exploratory PRs, prototypes, or early WIP reviews
- Ideal for exploratory PRs/MRs, prototypes, or early WIP reviews
## Focus Areas
@@ -0,0 +1,70 @@
---
title: "Automate"
description: "Automate your development workflows with Kilo Code"
---
# {% $markdoc.frontmatter.title %}
{% callout type="generic" %}
Automate repetitive tasks, set up AI-powered code reviews, and extend Kilo Code's capabilities with integrations and MCP servers.
{% /callout %}
## Code Reviews
Automated AI code reviews for every pull request:
- [**Code Reviews**](/docs/automate/code-reviews/overview) — AI-powered PR reviews
- Automated analysis on PR open/update
- Customizable review styles (Strict, Balanced, Lenient)
- Focus areas: Security, Performance, Bug Detection, Style, Tests, Documentation
## Agent Manager
Manage and orchestrate multiple AI agents:
- [**Agent Manager**](/docs/automate/agent-manager) — Control panel for running agents
- Local and cloud-synced sessions
- Parallel Mode with Git worktree isolation
- Resume existing sessions
## MCP (Model Context Protocol)
Connect Kilo Code to external tools and services:
- [**MCP Overview**](/docs/automate/mcp/overview) — Introduction to the Model Context Protocol
- [**What is MCP?**](/docs/automate/mcp/what-is-mcp) — Understanding MCP architecture
- [**Using MCP in Kilo Code**](/docs/automate/mcp/using-in-kilo-code) — Configuration guide
- [**STDIO & SSE Transports**](/docs/automate/mcp/server-transports) — Local and remote server options
- [**MCP vs API**](/docs/automate/mcp/mcp-vs-api) — When to use MCP
- [**Using MCP in CLI**](/docs/automate/mcp/using-in-cli) — CLI-specific MCP setup
## Integrations
Connect Kilo Code with your development tools:
- [**Integrations**](/docs/automate/integrations) — Available integrations overview
- GitHub integration for deployments and code reviews
- GitHub Actions for CI/CD workflows
- Custom integrations via MCP
## Extending Kilo
Customize and extend Kilo Code's capabilities:
- [**Local Models**](/docs/automate/extending/local-models) — Run local AI models
- [**Shell Integration**](/docs/automate/extending/shell-integration) — Shell command integration
- [**Auto-Launch**](/docs/automate/extending/auto-launch) — Automatic agent startup
## Common Automation Patterns
- **PR-triggered reviews** — Automatically review code on every pull request
- **Scheduled scans** — Run security or code quality scans on a schedule
- **CI/CD integration** — Integrate with GitHub Actions and other CI systems
- **Custom MCP servers** — Build your own tools and integrations
## Get Started
1. Set up the [Agent Manager](/docs/automate/agent-manager) for local automation
2. Configure [MCP servers](/docs/automate/mcp/using-in-kilo-code) for external integrations
3. Enable [Code Reviews](/docs/automate/code-reviews) for your repositories
4. Explore [integrations](/docs/automate/integrations) to connect your toolchain
@@ -0,0 +1,194 @@
---
title: "Improving Your Score"
description: "Tips and strategies to improve your AI adoption score"
---
# Improving Your Score
This guide provides actionable strategies to improve each dimension of your AI Adoption Score. Click on any dimension in the dashboard to see personalized suggestions based on your team's usage patterns.
## Improving Frequency
**Goal:** Help developers build AI into their daily workflow, not just reach for it on hard problems.
### Expand Beyond the IDE
A lot of development work happens in the terminal—git operations, debugging, scripting. Bringing AI to those contexts increases daily touchpoints.
**Action:** Install the Kilo CLI to enable AI-assisted terminal workflows:
```bash
npm install -g @kilocode/cli
```
Teams that use both IDE and CLI surfaces tend to show higher daily engagement because AI is available wherever they're working.
### Start with Autocomplete
Autocomplete is low-friction by design. It doesn't require explicit prompting—it just works in the background.
**Action:** Encourage your team to lean on autocomplete for:
- Boilerplate code
- Repetitive patterns
- Common syntax
- Test scaffolding
Building muscle memory with autocomplete leads to consistent daily usage without requiring behavior change.
### Tie AI to Existing Routines
The teams with the strongest Frequency scores usually aren't doing anything flashy—they've woven AI into things they already do.
**Action:** Identify daily tasks where AI can help:
- **Stand-up prep** — Summarize recent changes or generate status updates
- **Context checks** — Quickly understand unfamiliar code
- **PR descriptions** — Generate first drafts of pull request descriptions
- **Documentation** — Create or update inline comments
Small, repeated use cases add up faster than occasional heavy lifts.
---
## Improving Depth
**Goal:** Move AI from a side tool to an integrated part of how your team ships code.
### Chain Your Workflows
Depth increases when AI touches multiple stages of the same task. Each handoff reinforces context and keeps AI in the loop from idea to merge.
**Action:** Adopt the "chain" workflow pattern:
1. **Plan** — Use Architect mode to design a feature
2. **Build** — Use Code mode to implement it
3. **Review** — Use Code Reviews to critique it
{% callout type="tip" %}
Linking coding → review → deploy actions significantly boosts your Depth score.
{% /callout %}
### Give AI Better Context
If acceptance rates are low, the issue is often context. The AI is making suggestions without understanding your codebase.
**Action:** Enable [Managed Indexing](/docs/advanced-usage/managed-indexing) to give the model vector-backed search across your repository.
Better context leads to:
- More relevant suggestions
- Higher acceptance rates
- Greater trust in AI output
- Deeper integration over time
### Validate AI Output in Real Environments
Generated code that never runs is hard to trust. Teams that can verify AI output against live environments tend to retain more of that code long-term.
**Action:** Use [Kilo Deploy](/docs/advanced-usage/deploy) to spin up live URLs for branches, allowing your team to verify changes before merging.
---
## Improving Coverage
**Goal:** Get more of your team using more of the platform.
### Introduce Specialist Agents
Most teams start with Code mode and stop there. But Kilo's other modes unlock additional value.
**Action:** Introduce your team to specialized modes:
| Mode | Use Case |
| ---------------- | -------------------------------------------------------- |
| **Orchestrator** | Delegate and execute subtasks over long-horizon projects |
| **Architect** | Design and plan before implementation |
| **Debug** | Systematic error diagnosis |
| **Ask** | Quick questions and explanations |
This increases efficacy and improves trust in AI-facilitated tasking.
### Activate Unused Seats
Coverage is partly a numbers game. If you have team members who haven't logged in or aren't using the tool, your score will reflect that.
**Action:** Check your Organization Dashboard for inactive seats. Consider whether those team members need:
- A reminder that access exists
- A walkthrough or onboarding session
- Guidance on where to start
- Pairing with an enthusiastic team member
### Spread Usage Across the Week
Spiky usage—heavy on Mondays, quiet the rest of the week—limits your Coverage score.
**Action:** Make [Code Reviews](/docs/automate/code-reviews/overview) part of your PR process. Reviews happen throughout the week, so AI usage naturally follows.
Other ways to spread usage:
- Daily stand-up preparation with AI
- End-of-day documentation or commit messages
- Mid-week design reviews using Architect mode
---
## Common Patterns and Anti-Patterns
### Patterns That Drive Adoption
| Pattern | Why It Works |
| -------------------------------- | -------------------------------------------------- |
| **Pair AI with existing tools** | Developers don't have to learn new workflows |
| **Start with quick wins** | Autocomplete and commit messages build confidence |
| **Champion-led adoption** | Enthusiastic team members model effective usage |
| **Weekly check-ins on AI usage** | Keeps AI top-of-mind without being prescriptive |
| **Celebrate retained code** | Recognize when AI contributions ship to production |
### Anti-Patterns to Avoid
| Anti-Pattern | Why It Fails |
| ----------------------------------- | --------------------------------------------- |
| **Mandating specific usage levels** | Creates resentment without changing habits |
| **Focusing only on power users** | Neglects the majority who need onboarding |
| **Ignoring context quality** | Leads to poor suggestions and abandoned usage |
| **Measuring without acting** | Scores drop when no one addresses gaps |
| **All-or-nothing adoption** | Teams need gradual, sustainable change |
---
## Quick Wins by Score Range
### If You're at 020 (Minimal Adoption)
1. Ensure all team members have access and are logged in
2. Run a 30-minute "Getting Started" session
3. Ask everyone to try autocomplete for one week
4. Check back on completion rates
### If You're at 2150 (Early Adoption)
1. Identify your most active users and learn what they're doing
2. Introduce Code Reviews to spread usage
3. Enable Managed Indexing for better context
4. Set a monthly score goal (e.g., "reach 55 by next month")
### If You're at 5175 (Growing Adoption)
1. Introduce chained workflows (plan → build → review)
2. Focus on Depth—are suggestions being accepted and retained?
3. Address any inactive seats or low-usage pockets
4. Consider Kilo Deploy to validate AI output
### If You're at 7690 (Strong Adoption)
1. You're doing well—maintain momentum
2. Look at retention rates: what percentage of AI code ships unaltered?
3. Expand to edge cases: CI/CD, documentation, testing
4. Share your practices with other teams
## Next Steps
- [Use the dashboard for team leadership](/docs/plans/adoption-dashboard/for-team-leads)
- [Return to the dashboard overview](/docs/plans/adoption-dashboard/overview)