Contributing Guide

How to set up the development environment, add features, write tests, and submit pull requests.

Development Setup

1
Fork and clone
git clone https://github.com/YOUR_USERNAME/cdoing-agent.git cd cdoing-agent
2
Install dependencies
yarn install
3
Build all packages
yarn build
4
Start development mode
yarn dev
Runs all packages in watch mode with Turbo. Changes to any package automatically rebuild dependents.
5
Test your changes
yarn start
Builds core + ai and launches the CLI for manual testing.

Project Architecture at a Glance

Key Principle
Dependencies flow one way: core ← ai ← cli / vscode. Never import from a higher-level package into a lower-level one.
PackageWhen to Modify
@cdoing/coreAdding tools, changing permissions/sandbox, new context providers, indexing improvements
@cdoing/aiLLM provider changes, agent loop behavior, prompt engineering, context management
@cdoing/cliCLI commands, terminal UI, configuration, output formats
cdoing-vscodeVS Code commands, webview UI, inline editing, autocomplete

Common Contribution Types

Adding a New Tool

This is one of the most common contributions. Follow these steps:

1
Create packages/core/src/tools/my-tool.ts
import { BaseTool, ToolDefinition } from "./registry"; export class MyTool extends BaseTool { definition: ToolDefinition = { name: "my_tool", description: "Clear description of what this tool does", parameters: { type: "object", properties: { input: { type: "string", description: "What this parameter is for", }, }, required: ["input"], }, }; async execute(params: { input: string }): Promise<string> { // Your implementation here // Always return a string result return "Tool result"; } }
2
Export from core index
Add export { MyTool } from "./tools/my-tool"; to packages/core/src/index.ts.
3
Register in CLI tools
Add your tool to the registry in packages/cli/src/tools.ts.
4
Register in VS Code extension
Add your tool to packages/vscode-extension/src/chat-panel-provider.ts.

Adding a Context Provider

1
Create packages/core/src/context-providers/my-provider.ts
import { ContextProvider } from "./registry"; export class MyProvider implements ContextProvider { trigger = "@mycontext"; description = "Provides custom context"; async resolve(args: string): Promise<string> { // Fetch and return the context return "Context content here"; } getSuggestions(partial: string): string[] { return ["@mycontext option1", "@mycontext option2"]; } }
2
Register in the context registry
Add your provider to the registry in the context providers module.

Adding an LLM Provider

New LLM providers are added in packages/ai/src/provider.ts:

Code Style Guidelines

Pull Request Process

1
Create a feature branch
git checkout -b feature/my-new-feature
2
Make your changes
Follow the code style guidelines. Keep changes focused — one feature or fix per PR.
3
Build and test
yarn build yarn start # Manual testing
4
Write a clear commit message
git commit -m "feat(core): add my-tool for doing X Brief description of what the tool does and why it's useful."
5
Open a pull request
Include a description of the changes, why they're needed, and how to test them. Reference any related issues.

Commit Message Convention

Follow the conventional commits format:

type(scope): description Types: feat — New feature fix — Bug fix refactor — Code restructuring (no feature change) docs — Documentation only chore — Build, tooling, or dependency changes perf — Performance improvement Scopes: core — @cdoing/core package ai — @cdoing/ai package cli — @cdoing/cli package vscode — VS Code extension docs — Documentation

File Locations Reference

Quick reference for where to find and modify things:

Want to...Look at...
Add a new toolpackages/core/src/tools/
Change permission logicpackages/core/src/permissions/index.ts
Modify sandbox rulespackages/core/src/sandbox/
Add a context providerpackages/core/src/context-providers/
Change the indexerpackages/core/src/indexing/
Modify the agent looppackages/ai/src/agent-runner.ts
Add an LLM providerpackages/ai/src/provider.ts
Change the system promptpackages/ai/src/system-prompt.ts
Add a CLI flagpackages/cli/src/index.ts
Add a CLI subcommandpackages/cli/src/commands.ts
Modify chat UI (VS Code)packages/vscode-extension/src/webview/
Add a VS Code commandpackages/vscode-extension/src/extension.ts
Need Help?
Open an issue on the repository if you have questions or need guidance on implementing a feature. We're happy to help!