GitHub
OpenCastle illustration
Open Source · MIT Licensed

Write your AI config once.
Use it in every assistant.

Your team's assistant config is scattered across seven formats — CLAUDE.md, .cursor/rules, copilot-instructions.md — saying almost the same thing and drifting apart. OpenCastle compiles one source into all of them for Claude Code, Copilot, Cursor, Windsurf, OpenCode, Codex, and Antigravity, and tells you when they fall out of sync.

Everything you need to orchestrate AI agents at scale.

A hybrid framework for interactive IDE chat and automated batch execution — with instructions, skills, agent definitions, workflow templates, and quality gates battle-tested on a production codebase.

Team Lead Orchestrator

A single coordinator that analyzes, decomposes, delegates, and verifies work across specialist agents — never writes code itself.

Specialist Agents

From frontend developer to security expert, each with curated tools, a capability tier, and domain-specific skills.

On-Demand Skills

Modular knowledge files loaded per task. Keeps context windows lean while enabling deep domain expertise. Stack-specific skills are auto-selected during init from what your repository actually uses.

Workflow Templates

Reproducible execution plans for features, bug fixes, data pipelines, schema changes, security audits, and more.

Quality Gates

Validation gates — from secret scanning and blast radius checks to panel majority vote and final smoke tests. Sensitive files always get reviewed, even for 1-line changes.

Self-Improvement

Agents capture lessons learned from retries and failures, then graduate them into permanent instructions.

Specialized agents, intelligent routing.

Precisely developed specialist agents, each with its own model tier, tool access, and file partition. The Team Lead orchestrator routes tasks based on complexity scoring.

Team Lead
Architect
Security Expert
Developer
UI/UX Expert
Data Engineer
Content Engineer
Testing Expert
Performance Expert
DevOps & Release
Researcher
Writer
Reviewer

Agents declare a capability tier, not a model. Your assistant picks the model — it knows which ones your account can reach and what they cost today. A pinned model name can only be wrong later.

Premium
Orchestration, architecture, security review — the hardest reasoning
Standard
Feature work, schemas, UI, tests — the bulk of the work
Economy
Review passes, docs, copy — high volume, low ambiguity

One command. Your stack.

Run npx opencastle init and follow the guided onboarding. Select your IDEs, tech tools, and team tools. The CLI installs only the plugins you need.

# Install OpenCastle
$ npx opencastle init

# Select your IDEs:        VS Code / Cursor / Claude Code / OpenCode / Windsurf / Codex / Antigravity
# Select Tech Tools:       Sanity / Supabase / Prisma / Vercel / Netlify / NX / Turborepo / ...
# Select Team Tools:       Linear / Jira / Trello / Slack / Teams / Notion

# Key commands
$ npx opencastle sync     # Update framework, preserve customizations
$ npx opencastle add stripe  # Adopt a tool and recompile
$ npx opencastle convoy dashboard  # View observability dashboard
$ npx opencastle doctor     # Check system health and configuration

# See all commands: docs/cli

Convoy Engine. Crash-safe. Isolated. Observable.

Inspired by Steve Yegge's Gas Town, the Convoy Engine is a deterministic, crash-recoverable orchestrator backed by SQLite WAL-mode persistence. Each worker gets its own git worktree — no shared mutable state. Define your batch in convoy.yml, run it overnight, and resume exactly where you left off.

This part is experimental and may change. The compiler above does not depend on it — native background and cloud agents now cover much of what it was built for.

convoy.yml
name: "Overnight feature batch"
version: 1
concurrency: 2
adapter: claude
branch: feat/reviews

defaults:
  timeout: 30m
  max_retries: 1

tasks:
  - id: migrate-db
    agent: data-engineer
    prompt: |
      Create a new migration for a reviews table.
    timeout: 10m
    files: ["db/migrations/"]

  - id: build-component
    agent: ui-ux-expert
    prompt: |
      Build a ReviewCard component.
    timeout: 15m
    files: ["src/components/reviews/"]

  - id: wire-page
    agent: developer
    depends_on: [migrate-db, build-component]
    prompt: |
      Add reviews to the place detail page.
    files: ["src/pages/places/"]

gates:
  - npm run lint
  - npm run type-check
  - npm run test

Crash-Safe Execution

SQLite WAL-mode persistence means convoy state survives crashes, power loss, and OOM kills. Resume exactly where you left off with --resume.

Worktree Isolation

Each worker gets its own git worktree — no shared mutable state. Changes merge back in dependency order once the convoy completes.

Health Monitoring

Stuck and zombie workers are detected automatically. Failed tasks retry up to configurable limits before the convoy marks them as permanently failed.

Mixed Runtimes

Per-task adapter overrides let you run Copilot, Claude Code, Cursor, OpenCode, Windsurf, Codex, and Antigravity workers in the same convoy.

Validation Gates

Run lint, tests, and builds after all tasks complete. Gates must pass before the convoy is marked done — no silent failures.

Generate Convoy

Describe your goal in plain language. The Team Lead decomposes it into a valid convoy.yml spec with dependencies, file partitions, and self-contained agent instructions.

Track every delegation, every session, every lesson.

A real-time dashboard shows agent performance, model tier distribution, session timelines, and panel review outcomes.

opencastle.dev/dashboard
OpenCastle Observability Dashboard — showing session metrics, model tier distribution, and recent agent sessions
View live demo →

Plugins for your entire stack.

OpenCastle ships with 30 plugins — each bundling skills, MCP server configs, and agent tool mappings for popular tools and services. Choose your stack during onboarding and the CLI wires everything up.

Linear Issue tracking & task management
Jira Project tracking & sprint management
Trello Visual board task management
Supabase Database, auth & type generation
Convex Reactive database & real-time sync
Sanity Headless CMS & content queries
Contentful Headless CMS & content delivery
Strapi Open-source headless CMS
Next.js React framework for production
Expo React Native & EAS builds
Astro Static site generator & frontend framework
Slack Agent notifications & progress updates
Microsoft Teams Agent notifications & progress updates
Notion Knowledge base & workspace docs
Vercel Deployment & environment management
NX Monorepo build system & task runner
Chrome DevTools Browser testing & visual validation
Netlify Deployment & serverless functions
Turborepo Monorepo build system & caching
Prisma Type-safe ORM & migrations
Cypress E2E & component testing
Playwright Cross-browser E2E testing
Vitest Vite-native unit testing
Figma Design tokens & component specs
Resend Transactional email & React templates
Stripe Payments, billing & financial infrastructure
Sentry Error monitoring & performance tracing
Drizzle Type-safe SQL ORM & migrations
Cloudflare Workers, Pages & edge computing
Coolify Self-hosted PaaS & deployment

Reproducible execution plans for every task type.

Advanced workflow templates define phases, agent assignments, exit criteria, and file partitions. Handy prompt templates cover common tasks from brainstorming to PR reviews.

Template Pipeline
feature-implementation Brainstorm → Research → Foundation → Integration → Validation → QA Gate
bug-fix Triage & Reproduce → Root Cause Analysis → Fix → Verification
data-pipeline Source Analysis → Scraping → Processing → Validation → Import
security-audit Scope → Automated Checks → Manual Review → Panel Review → Remediation
performance-optimization Baseline Measurement → Analysis → Optimization → Verification
schema-changes Schema Analysis → Implementation → Query Updates → Page Integration → Verification
database-migration Planning → Migration → Type Generation → Code Integration → Rollback Test
refactoring Scope & Baseline → Test Coverage → Refactor → Verification → Panel Review

No code ships without verification.

When the convoy engine runs work for you, it puts it through layered validation — secret scanning through final smoke test — escalating to a structured dispute when agents cannot converge. These gates apply to convoy runs, not to the compiler.

01 Secret Scanning

Every diff is scanned for API keys, tokens, passwords, and connection strings before any other gate runs. Leaked secrets block immediately.

02 Deterministic Checks

Lint, type-check, unit tests, and build verification run automatically after every agent output. No false positives.

03 Blast Radius & Dependencies

Scope analysis flags unexpectedly large diffs and sensitive file changes. New npm packages are audited for vulnerabilities, licenses, and bundle size.

04 Fast Review

A single reviewer sub-agent validates every delegation. Sensitive files (auth, migrations, security headers) always get reviewed — even for 1-line changes.

05 Browser Testing

Chrome DevTools MCP validates UI changes at your project-defined responsive breakpoints. Screenshot evidence is mandatory.

06 Panel Majority Vote

Three isolated reviewer sub-agents evaluate high-stakes changes. 2/3 majority wins. BLOCK items become fix requests, not stop signals.

07 Final Smoke Test

After all tasks are done, the complete feature is verified end-to-end — catching integration issues that per-task testing misses.

08 Structured Disputes

When agents exhaust all automated resolution, formal dispute records package both perspectives and resolution options — giving humans clear action items.

A complete orchestration framework, out of the box.

57K words of curated knowledge, and everything you need to run a coordinated AI development team — from agent definitions to quality gates.

13
Specialist Agents
7
IDE Adapters
57
Skills & Integrations
1
Source of truth

Support OpenCastle

OpenCastle is free and open-source. If it saves you time, consider buying us a coffee to keep development going.