# OpenCastle

A command-line tool that compiles one shared AI assistant configuration into the separate formats used by Claude Code, Cursor, GitHub Copilot and other coding assistants, flagging drift.

OpenCastle solves the problem of a team's AI assistant configuration being duplicated across several incompatible formats, such as CLAUDE.md, Cursor's rules directory and GitHub Copilot's instructions file, which tend to drift apart as people edit them individually. It reads a repository to detect which assistants already have configuration and which framework, database and test runner are in use, then compiles one shared source into every detected target without overwriting files that already exist.

Running it with no arguments reports which targets are in sync and which have drifted because their source is newer, and a sync command recompiles every target. A sync-and-check mode compiles to a scratch directory and compares against the committed generated files, exiting with an error in continuous integration if a generated file was hand-edited or a source changed without being recompiled.

Website: http://www.opencastle.dev/
