What your team's AI learned,
in every teammate's assistant.
Every assistant now remembers what it learns, on one laptop. OpenCastle makes it the team's: instructions, skills and agents in the repository, and what agents remember about the project turned into lessons when the agent stops, reviewed in the pull request with the work. A new teammate's assistant starts where a senior's is. It works with the assistant your company uses: Claude Code, Copilot, Cursor, Windsurf, OpenCode, Codex or Antigravity, and moves with you if you switch.
A new teammate's assistant starts where a senior's is.
What the assistants know is part of your engineering standard, so it gets what the rest of the standard gets: one reviewed source shared across your repositories, a memory the team keeps, a policy, a CI check, and a record of every change.
Shared memory, apart from personal
Agents save what they learn as they always do. When an agent stops, a hook in Claude Code or VS Code turns what is about the project into a lesson, reviewed in the pull request with the work, and leaves what is about the person. Claude Code, Copilot, Cursor and Windsurf load the lessons before every task on their own.
One standard, every repository
Put your instructions, skills, agents, MCP servers and policy in a baseline package — an Agent Plugin. Each repository installs it as a devDependency and extends it; your lockfile pins it and your upgrade bot rolls it out.
Policy that only tightens
Which MCP servers may run, which hosts remote ones may reach, exact versions, items no repository may drop, a context budget. A repository can tighten it, never relax it, and servers added by hand are held to it too.
A lock you can review
.opencastle/lock.json records which layers ran at which versions, where every skill and instruction came from, and every MCP server. With CODEOWNERS on it, every change it records goes to its owners.
Everything shows up on the pull request
sync --check annotates each hand-edited or stale file with its own fix, and opencastle review turns dozens of regenerated files into sentences, marking with ⚠️ what deserves a careful look: a new MCP server, a widened allowlist, a new always-loaded instruction.
MCP servers pinned and audited
Every server OpenCastle adds is the vendor’s remote server, the project’s own copy, or an exact version. Doctor audits every config, including servers you added: unpinned or missing packages, credentials written inline, servers the policy does not allow.
# .opencastle/config.json — extend your organisation's baseline { "extends": ["@acme/opencastle-baseline"], "exclude": ["skills/seo-patterns"] } # Compile it into every assistant and write .opencastle/lock.json $ npx opencastle sync # Write the CI check — drift, policy and a review on every PR — and make @acme/platform the lock's owner $ npx opencastle ci --owners @acme/platform
How the layers, policy and lock fit together, with a worked example: OpenCastle for Teams.
Agent Plugins in every assistant — even the ones that do not read them yet.
The formats assistants read are converging on open standards: AGENTS.md, Agent Skills, MCP, and Agent Plugins 1.0 to package them. OpenCastle writes each one wherever an assistant reads it, and compiles what the standards do not cover yet — agents, commands, policy — assistant by assistant.
Agent Plugins 1.0
Your baseline is an Agent Plugin: Copilot, VS Code, Cursor, Codex and Kiro install it as it is, and OpenCastle compiles it into the assistants that do not read plugins yet. Extend any Agent Plugin from npm the same way.
Agent Skills
Every skill is a SKILL.md folder named as the skill, where each assistant looks for skills — one .agents/skills/ for Codex, Cursor, Windsurf, OpenCode and Antigravity, .claude/skills/ for Claude Code, .github/skills/ for Copilot.
AGENTS.md
Codex CLI and OpenCode read AGENTS.md, and Antigravity reads it beside GEMINI.md. Claude Code gets the same content in CLAUDE.md; Copilot, Cursor and Windsurf get it as their own instruction and rule files.
MCP
Every server written to each assistant’s own project config, in its own syntax — JSON for six, [mcp_servers] tables in .codex/config.toml for Codex — with each secret passed the way that assistant takes it, and doctor flagging one it would send as literal text.
Claude Code’s copies, compiled
Claude Code reads its own plugin manifest. opencastle plugin build writes .claude-plugin/plugin.json and .mcp.json from the portable files, and check fails the pull request when they fall behind.
One marketplace, four assistants
opencastle plugin index writes the marketplace file Claude Code and Copilot CLI read, Cursor’s team marketplace and Codex’s — so a repository of plugins is added once in each.
# Your standard as an Agent Plugin, and an OpenCastle baseline $ npx opencastle baseline init plugins/ai-standard --name @acme/ai-standard # Check it the way assistants load it, and write Claude Code's copies $ npx opencastle plugin check plugins/ai-standard $ npx opencastle plugin build plugins/ai-standard # List everything in plugins/ as one marketplace for Claude Code, Copilot, Cursor and Codex $ npx opencastle plugin index
What each standard covers, which assistants read Agent Plugins, and how to publish and distribute one: Agent Plugins & open standards.
What every assistant on the team gets.
One source compiles into instructions, specialist agents, on-demand skills, workflow templates, and quality gates — in each assistant's native format.
Team Lead Orchestrator
A single coordinator that analyzes, decomposes, delegates, and verifies work across specialist agents — its instructions leave every code change to them.
Specialist Agents
From developer and UI/UX expert to security expert, each with a capability tier, domain-specific skills and, in Copilot, a curated tool list.
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 record what they learn from retries and failures — one file per lesson, citing the code it is about when there is some — and doctor flags a lesson when a file it cites changes. Mature lessons are merged into skills and instructions, then archived.
Specialized agents, intelligent routing.
Specialist agents, each with its own capability tier and skills, working in the files its task is assigned. The Team Lead scores each task's complexity to decide how it runs: one agent for a small change, a convoy for more.
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.
One command. Your stack.
Run npx opencastle init. It reads your repository — the assistants you
already have config for, your framework, database and test runner — shows the plan and
asks once. --customize lets you choose by hand.
# Set up OpenCastle $ npx opencastle init … Found assistant config: • Claude Code (CLAUDE.md) • Cursor (.cursorrules) … Integrations detected: nextjs, supabase, vitest, chrome-devtools Set this up? [Y/n] … # Another assistant or tool: choose by hand $ npx opencastle init --customize # Key commands $ npx opencastle sync # Recompile every assistant, keep your customizations $ npx opencastle sync --check # In CI: fail on drift, annotate the PR $ npx opencastle add stripe # Adopt a tool and recompile $ npx opencastle explain # What every assistant here is given, and what to set up $ npx opencastle doctor # Check the setup, MCP servers and team sources # See all commands: docs/cli
Describe the work. Review the branch.
npx opencastle convoy "<task>" plans multi-step work, shows you the plan and
asks once. Agents then work in parallel, each in a git worktree of its own, on the agent CLI
opencastle init set up. Each finished task is merged onto one branch, your checks run
on the merged result at the end, and your checkout is never touched. Inspired by Steve Yegge's
Gas Town.
This part is experimental and may change. The compiler above does not depend on it. Real runs, with their time and cost, are in Use cases.
$ npx opencastle convoy "Add tags to notes…" --yes
…
Branch convoy/note-tags (from main) · 5 tasks · up to 3 at once
▶ [notes-http-layer] developer
▶ [notes-data-layer] developer
✓ [notes-http-layer] (1m 40s) · $0.67
✓ [notes-data-layer] (2m 27s) · $0.91
▶ [readme-docs] writer
▶ [notes-http-tests] testing-expert
▶ [notes-unit-tests] testing-expert
✓ [readme-docs] (39s) · $0.13
✓ [notes-http-tests] (1m 47s) · $0.67
✓ [notes-unit-tests] (2m 25s) · $0.83
Gates:
✓ npm run test
…
✓ Convoy done in 4m 53s — 5/5 tasks done
Gates: 1/1 passed
Spent: 3.2M tokens · $3.21
…
Review: git diff main...convoy/note-tags
Merge: git merge convoy/note-tags A plan you read first
Planning changes no code: agents size the request and draft the tasks, with a PRD
first when the work is not small, and code checks the plan. You see who does what, after what, touching which files, and answer
Run it? [Y/n].
Worktrees and one branch
Each task runs in its own git worktree and is merged onto the run's branch as it finishes, one at a time. You review and merge that branch like any other.
No waiting on the slowest
A task starts as soon as the tasks it depends on are done. Tasks that claim the same files never run side by side.
Reviewed, then checked
Each change gets a read-only review before it merges; the smallest can pass on size, and
one the reviewer cannot finish is recorded as unreviewed. Your typecheck,
lint, test and build scripts run on the merged
result, and a failure gets one fix attempt.
Stop and resume
Runs are recorded in SQLite. After Ctrl+C, a failure or a crash,
opencastle convoy resume runs what is not done and keeps the rest.
Five runtimes, by tier
Claude Code, Copilot, Cursor, OpenCode or Codex, on macOS and Linux; Windows is supported, not yet tested. On Claude Code each agent runs on the model its tier needs, and reviews on the cheapest.
Every run, task and event, on one page.
npx opencastle convoy dashboard (experimental) is a read-only page over a project's
convoy runs. Across every run: success rate, duration, tokens and cost, and tasks by agent, model
and tier. For each run: every task with what it waits for and why it failed, each review with the
attempt it read, each round of checks, retries, and the event timeline, live while a run works.
Every figure is read from the runs' own records; one a runtime did not report is marked as
estimated, or as not reported. A run started in a terminal
starts it for you.
Integrations for your stack.
OpenCastle ships with 33 integrations — each bundling a skill and, where
the tool has an MCP server, its config and which agents may use it. init adds
the ones it detects in your repository; opencastle add adopts another.
Setup for each: Integrations.
Reproducible execution plans for every task type.
Advanced workflow templates define phases, agent assignments, exit criteria and,
where work runs in parallel, file partitions. In Claude Code each one is a command, as below; Cursor and
Windsurf get them as rules their agent loads when a task fits, and the other
assistants as files beside their agents. Handy prompt templates cover common tasks
from brainstorming to resolving PR comments; in Claude Code and Copilot they are
commands under one namespace — /oc:brainstorm, /oc:bug-fix —
that never collide with your own.
| Command in Claude Code | Phases |
|---|
No code ships without verification.
Layered validation — secret scanning through final smoke test. In an interactive session the gates are instructions the Team Lead follows (the validation-gates skill); when the experimental convoy engine runs the work, it reviews changes and runs your checks itself.
01 Secret Scanning
Each delegation's diff is scanned for API keys, tokens, passwords, and connection strings before the other gates. A leaked secret blocks it.
02 Deterministic Checks
Your own lint, tests and build pass with zero errors before a change is done. A convoy runs your typecheck, lint, test and build scripts on the merged result.
03 Blast Radius & Dependencies
A change that grew past its task is caught and split. New dependencies are audited for vulnerabilities, licences and maintenance.
04 Fast Review
A single reviewer sub-agent checks each delegation; only research, docs-only and tiny changes skip it. Sensitive files (auth, migrations, security headers) always get reviewed — even for 1-line changes.
05 Browser Testing
Chrome DevTools MCP, which init adds by default, checks UI changes in a real browser at your project-defined responsive breakpoints.
06 Panel Majority Vote
Three isolated reviewers check changes to auth, payments, migrations and data deletion. The majority decides, and every must-fix any one of them raises gets fixed.
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 A Person Decides
A review that stays blocked stops the work: you get what blocks
it, with each side's evidence, instead of a third retry. A convoy
records it in .opencastle/DISPUTES.md.
A complete orchestration framework, out of the box.
37K words of curated knowledge, and everything you need to run a coordinated AI development team — from agent definitions to quality gates.
Support OpenCastle
OpenCastle is free and open-source. If it saves you time, consider buying us a coffee to keep development going.