You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+13-17Lines changed: 13 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Contributing to Codebuff
2
2
3
-
Hey there! 👋 Thanks for wanting to contribute to Codebuff. Whether you're squashing bugs, building cool features, or making our docs better, we're excited to have you aboard!
3
+
Hey there! 👋 Thanks for contributing to Codebuff. Bug fixes, features, and documentation improvements are welcome.
4
4
5
5
## Getting Started
6
6
@@ -147,15 +147,13 @@ Not sure where to start? Here are some great ways to jump in:
147
147
148
148
### Development Workflow
149
149
150
-
Here's how we like to work together:
150
+
1.**Fork and branch** - Create a fork and a new branch
151
+
2.**Follow style guidelines** - See below
152
+
3.**Test** - Write tests for new features, run `bun test`
153
+
4.**Type check** - Run `bun run typecheck`
154
+
5.**Submit a PR** - Clear description of changes
151
155
152
-
1.**Fork and branch** - Create your own fork and a new branch for your changes
153
-
2.**Code away** - Follow our style guidelines (more on that below)
154
-
3.**Test it** - Write tests for new features and run `bun test` to make sure everything works
155
-
4.**Type check** - Run `bun run typecheck` to catch any TypeScript issues
156
-
5.**Submit a PR** - Open a pull request with a clear description of what you built and why
157
-
158
-
_Pro tip: Small, focused PRs are easier to review and merge quickly!_
156
+
Small PRs merge faster.
159
157
160
158
### Code Style Guidelines
161
159
@@ -218,27 +216,25 @@ test: add unit tests for file operations
218
216
219
217
## Areas Where We Need Help
220
218
221
-
There are tons of ways to make Codebuff better! Here are some areas where your skills could really shine:
222
-
223
219
### 🤖 **Agent Development**
224
220
225
-
Build specialized agents in `.agents/` for different languages, frameworks, or workflows. Think React experts, Python debuggers, or Git wizards!
221
+
Build agents in `.agents/` for different languages, frameworks, or workflows.
226
222
227
223
### 🔧 **Tool System**
228
224
229
-
Add new capabilities in `common/src/tools` and the SDK helpers - file operations, API integrations, development environment helpers. The sky's the limit!
225
+
Add capabilities in `common/src/tools` and SDK helpers: file operations, API integrations, dev environment helpers.
230
226
231
227
### 📦 **SDK Improvements**
232
228
233
-
Make the SDK in `sdk/` even more powerful with new methods, better TypeScript support, or killer integration examples.
229
+
New methods, better TypeScript support, integration examples in `sdk/`.
234
230
235
-
### 💻 **CLI Magic**
231
+
### 💻 **CLI**
236
232
237
-
Enhance the user experience in `cli/` with smoother commands, better error messages, or interactive features that make developers smile.
Copy file name to clipboardExpand all lines: README.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,17 +83,17 @@ To get started building your own agents, run:
83
83
codebuff init-agents
84
84
```
85
85
86
-
> 💡 **Tip**: This command creates a comprehensive agent development guide at `.agents/README.md`(293 lines) with detailed documentation, complete examples, and full TypeScript type definitions. Start there for complete guidance.
86
+
> 💡 **Tip**: This creates an agent development guide at `.agents/README.md` with examples and TypeScript types.
├── my-custom-agent.ts # Working agent template to edit
93
-
├── package.json # NPM package configuration
94
-
├── LICENSE # Apache-2.0 license for publishing
95
-
├── examples/ # 3 example agents (basic → advanced)
96
-
└── types/ # Complete TypeScript definitions
91
+
├── README.md # Agent development guide
92
+
├── my-custom-agent.ts # Working agent template
93
+
├── package.json # NPM package config
94
+
├── LICENSE # Apache-2.0 license
95
+
├── examples/ # 3 example agents
96
+
└── types/ # TypeScript definitions
97
97
```
98
98
99
99
You can write agent definition files that give you maximum control over agent behavior.
@@ -146,7 +146,7 @@ const client = new CodebuffClient({
146
146
// 2. Do a coding task...
147
147
const result =awaitclient.run({
148
148
agent: 'base', // Codebuff's base coding agent
149
-
prompt: 'Add comprehensive error handling to all API endpoints',
149
+
prompt: 'Add error handling to all API endpoints',
150
150
handleEvent: (event) => {
151
151
console.log('Progress', event)
152
152
},
@@ -174,13 +174,13 @@ Learn more about the SDK [here](https://www.npmjs.com/package/@codebuff/sdk).
174
174
175
175
## Why choose Codebuff
176
176
177
-
**Deep customizability**: Create sophisticated agent workflows with TypeScript generators that mix AI generation with programmatic control. Define custom agents that spawn subagents, implement conditional logic, and orchestrate complex multi-step processes that adapt to your specific use cases.
177
+
**Custom workflows**: TypeScript generators let you mix AI generation with programmatic control. Agents can spawn subagents, branch on conditions, and run multi-step processes.
178
178
179
179
**Any model on OpenRouter**: Unlike Claude Code which locks you into Anthropic's models, Codebuff supports any model available on [OpenRouter](https://openrouter.ai/models) - from Claude and GPT to specialized models like Qwen, DeepSeek, and others. Switch models for different tasks or use the latest releases without waiting for platform updates.
180
180
181
181
**Reuse any published agent**: Compose existing [published agents](https://www.codebuff.com/store) to get a leg up. Codebuff agents are the new MCP!
182
182
183
-
**Fully customizable SDK**: Build Codebuff's capabilities directly into your applications with a complete TypeScript SDK. Create custom tools, integrate with your CI/CD pipeline, build AI-powered development environments, or embed intelligent coding assistance into your products.
183
+
**SDK**: Build Codebuffinto your applications. Create custom tools, integrate with CI/CD, or embed coding assistance into your products.
Copy file name to clipboardExpand all lines: web/src/content/advanced/how-does-it-work.mdx
+32-3Lines changed: 32 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,37 @@ order: 2
7
7
8
8
# How does Codebuff actually work?
9
9
10
-
Codebuff scans your repo with tree-sitter and builds a quick index of the code. That index makes it fast to find files when you ask for help.
10
+
Codebuff runs multiple agents, each tuned for a specific task.
11
11
12
-
The server is stateless. It proxies requests to Anthropic, OpenAI, or Gemini over websockets and streams results back to the CLI.
12
+
## The Orchestrator
13
13
14
-
We use a fast model to pick files, load the right snippets into context, and let Claude Sonnet propose an edit. The main agent can hand work to other agents for planning or file search when needed.
14
+
The main agent ("Buffy") runs on Claude Opus 4.5. It reads your prompt, gathers context, and spawns subagents. The orchestrator is available in several variants:
-[**Researcher**](/publishers/codebuff/agents/researcher) (Grok 4 Fast) - web and docs lookup
26
+
-[**Thinker**](/publishers/codebuff/agents/thinker) (GPT-5.1, Gemini 2.5 Pro) - works through hard problems
27
+
-[**Editor**](/publishers/codebuff/agents/editor) (GPT-5.1, Claude Opus 4.5) - writes and modifies code
28
+
-[**Reviewer**](/publishers/codebuff/agents/reviewer) (Claude Sonnet 4.5) - catches bugs and style issues
29
+
-[**Commander**](/publishers/codebuff/agents/commander) (Grok 4 Fast or Claude Sonnet 4.5) - runs terminal commands
30
+
31
+
## Best-of-N Selection (Max Mode)
32
+
33
+
In Max mode, Codebuff spawns multiple editors with different strategies. A selector compares the outputs and picks the best one.
34
+
35
+
## The Pipeline
36
+
37
+
1. Tree-sitter scans your repo and builds a code map
38
+
2. File pickers and searchers find relevant code
39
+
3. Thinkers analyze the problem if needed
40
+
4. Editors generate changes
41
+
5. Reviewers check for issues; commanders run tests
42
+
43
+
The server is stateless. It streams requests to model providers (Anthropic, OpenAI, Google, xAI) over websockets. Your code stays local; only relevant context is sent.
0 commit comments