OpenCastle

Docs

OpenCastle Documentation

Everything you need to install, configure, and run your AI agent team — interactively through IDE chat or automated via the Convoy Engine.

See it in action

Quick Start

1

Install

npx opencastle init
2

Confirm what it found

It reads your repository first — which assistants already have config, which framework, database, and test runner you use — shows the plan, and asks once. Files you already wrote are never overwritten: your CLAUDE.md keeps its content and the generated config goes into a managed block below it. Prefer to choose by hand? npx opencastle init --customize.

3

Open your IDE

Open VS Code and reload the window (Cmd+Shift+P“Developer: Reload Window”). This loads the OpenCastle agents, skills, and instructions.

4

Bootstrap your project

If you have an existing codebase, run the bootstrap prompt first. It scans your project and generates tailored configuration.

In Copilot Chat, select the Team Lead agent and run the Bootstrap Customizations prompt. The Team Lead will scan your project, detect your tech stack, and generate tailored configuration files in .opencastle/.

Skip this step for brand-new projects — there’s nothing to detect yet.

5

Start building

You’re ready to go. Choose how you want to work:

A

Interactive recommended

Ask the Team Lead to implement a feature, fix a bug, or brainstorm ideas. It will decompose the work, delegate to specialist agents, and deliver a PR.

In Copilot Chat, select the Team Lead agent and run the Implement Feature prompt. Describe what you want to build.

B

Convoy autonomous

For larger tasks, generate a convoy spec first, review it, then execute it autonomously. The convoy engine runs tasks in parallel using isolated git worktrees.

1

Generate: Describe your goal: npx opencastle convoy "Add user reviews to the place detail page". It plans the work, produces a .convoy.yml spec, validates it, and executes — all in one command.

2

Review: Open the generated YAML file and verify the task breakdown, file partitions, and dependency order. Validation runs automatically when the convoy executes.

3

Execute: npx opencastle convoy run --file .opencastle/convoys/your-spec.convoy.yml

Staying in sync

Ask what needs doing

Run opencastle with no arguments. It reports which targets exist, whether the generated files are still current, which assistants are configured but not being compiled, and the one command to run next.

Recompile

opencastle sync regenerates every target from source. Your .opencastle/ customizations and anything outside a managed block are left alone.

Catch drift in CI

opencastle sync --check compiles to a scratch directory and compares. It writes nothing and exits non-zero when a generated file no longer matches its source — someone edited .cursor/rules/foo.mdc by hand, dropped a file into a generated directory, or upgraded without recompiling. Without it, drift is invisible: a stale rule file still loads fine.

Commit the generated config, like a lockfile — that is what gives the check something to compare, and what lets a teammate clone the repo and have working rules without running anything. Only .env and run artefacts are gitignored.

# .github/workflows/opencastle.yml
- uses: actions/setup-node@v4
  with: { node-version: 22 }
- run: npx opencastle sync --check

Adopt a new tool

opencastle add supabase updates the stored stack and recompiles, so the integration's skills and MCP config reach every target. opencastle add --list shows what is available.

Agentic Development

guide

Guide to agentic development and multi-agent orchestration. Vibecoding best practices, prompt patterns, specialist agents, quality gates, and how to coordinate AI agent teams.

CLI Reference

6 commands

Complete reference for every opencastle command — init, sync, add, doctor, remove, and the experimental convoy namespace.

Prompt Templates

8 prompts

Ready-to-use prompt templates for the Team Lead agent. Brainstorm ideas, implement features, fix bugs, resolve PR comments, and generate task specs.

Plugin Setup Guide

31 plugins

Configure plugins for your AI coding agents. Each plugin bundles skills, optional MCP server configs, and agent tool mappings.

Use Cases

1 recipe

Cookbook-style recipes for common projects. Follow step-by-step guides to build real applications with your AI agent team.