opencastle 1.7.1 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -151
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,7 +31,9 @@ Your team's AI assistant config is scattered across seven formats. Someone wrote
|
|
|
31
31
|
drift apart the moment anyone edits one of them.
|
|
32
32
|
|
|
33
33
|
OpenCastle compiles one source into all of them, and tells you when they fall
|
|
34
|
-
out of sync.
|
|
34
|
+
out of sync. It starts that source from your code: the stack with its versions,
|
|
35
|
+
the commands, the routes and the models, so your assistant knows the project on
|
|
36
|
+
its first task.
|
|
35
37
|
|
|
36
38
|
<br>
|
|
37
39
|
|
|
@@ -41,12 +43,9 @@ out of sync.
|
|
|
41
43
|
npx opencastle init
|
|
42
44
|
```
|
|
43
45
|
|
|
44
|
-
It reads
|
|
45
|
-
which framework and database you use, which test runner. Then it shows you what
|
|
46
|
-
it found and asks once.
|
|
46
|
+
It reads the repository, shows what it found, and asks once:
|
|
47
47
|
|
|
48
48
|
```
|
|
49
|
-
…
|
|
50
49
|
Found assistant config:
|
|
51
50
|
• Claude Code (CLAUDE.md)
|
|
52
51
|
|
|
@@ -55,123 +54,60 @@ it found and asks once.
|
|
|
55
54
|
|
|
56
55
|
Integrations detected:
|
|
57
56
|
nextjs, supabase, vitest, chrome-devtools
|
|
58
|
-
|
|
59
|
-
Set this up? [Y/n]
|
|
60
57
|
…
|
|
61
|
-
✓ Created
|
|
62
|
-
✓ Created .gitignore with OpenCastle entries
|
|
58
|
+
✓ Created 69 files
|
|
63
59
|
✓ Merged into your existing CLAUDE.md
|
|
64
60
|
your content is above the managed block and is never overwritten
|
|
65
|
-
…
|
|
66
61
|
```
|
|
67
62
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
every assistant.
|
|
73
|
-
|
|
74
|
-
Node.js 22.5 or newer. Full walkthrough, including CI and upgrading:
|
|
75
|
-
**[docs/quickstart.md](docs/quickstart.md)**.
|
|
63
|
+
Then, in Claude Code or Copilot Chat, type `/oc:bootstrap-customizations` once,
|
|
64
|
+
so an agent fills in what the code could not say, and `/oc:implement-feature`
|
|
65
|
+
for your first change. Node.js 22.5 or newer. The full walkthrough, with CI and
|
|
66
|
+
upgrading: **[docs/quickstart.md](docs/quickstart.md)**.
|
|
76
67
|
|
|
77
68
|
<br>
|
|
78
69
|
|
|
79
70
|
## Everyday use
|
|
80
71
|
|
|
81
72
|
```bash
|
|
82
|
-
opencastle # what
|
|
83
|
-
opencastle sync # recompile every target from source
|
|
84
|
-
opencastle sync --check # fail if anything drifted (for CI)
|
|
85
|
-
opencastle add stripe # adopt
|
|
86
|
-
opencastle doctor # diagnose setup problems, audit MCP servers
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Running `opencastle` with no arguments is the one command worth remembering. It
|
|
90
|
-
answers the question you actually have:
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
🏰 OpenCastle v1.0.0
|
|
94
|
-
|
|
95
|
-
! 2/3 targets installed — generated files no longer match their sources
|
|
96
|
-
✓ claude-code up to date
|
|
97
|
-
✓ cursor up to date
|
|
98
|
-
! vscode 4 paths missing
|
|
99
|
-
|
|
100
|
-
Next: opencastle sync
|
|
101
|
-
1 target missing generated files
|
|
73
|
+
npx opencastle # what is installed, what drifted, what to run next
|
|
74
|
+
npx opencastle sync # recompile every target from source
|
|
75
|
+
npx opencastle sync --check # fail if anything drifted (for CI)
|
|
76
|
+
npx opencastle add stripe # adopt an integration, recompile
|
|
77
|
+
npx opencastle doctor # diagnose setup problems, audit MCP servers
|
|
102
78
|
```
|
|
103
79
|
|
|
104
|
-
Commit the generated config, like a lockfile
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
([quickstart, step 4](docs/quickstart.md#4-keep-it-honest-in-ci)). Every command
|
|
108
|
-
and flag: [opencastle.dev/docs/cli](https://www.opencastle.dev/docs/cli/).
|
|
109
|
-
|
|
110
|
-
Upgrading from 0.35 or earlier? Run `opencastle sync` once — see
|
|
111
|
-
[the quickstart](docs/quickstart.md#upgrading-from-035-or-earlier).
|
|
80
|
+
Commit the generated config, like a lockfile. `npx opencastle ci` writes a
|
|
81
|
+
GitHub Actions workflow that runs `sync --check` on every pull request. Every
|
|
82
|
+
command and flag: [opencastle.dev/docs/cli](https://www.opencastle.dev/docs/cli/).
|
|
112
83
|
|
|
113
84
|
<br>
|
|
114
85
|
|
|
115
86
|
## Built for teams
|
|
116
87
|
|
|
117
|
-
Everyone keeps the assistant they like
|
|
118
|
-
can share it across every repository it owns.
|
|
119
|
-
|
|
120
|
-
```jsonc
|
|
121
|
-
// .opencastle/config.json
|
|
122
|
-
{
|
|
123
|
-
"$schema": "https://www.opencastle.dev/schema/config.json",
|
|
124
|
-
"extends": ["@acme/opencastle-baseline"], // a devDependency; your lockfile pins it
|
|
125
|
-
"exclude": ["skills/seo-patterns"],
|
|
126
|
-
"mcpServers": {
|
|
127
|
-
"acme-db": { // must be on the baseline's policy.mcp.allow
|
|
128
|
-
"command": "npx",
|
|
129
|
-
"args": ["-y", "@acme/db-mcp@2.2.0"],
|
|
130
|
-
"env": { "ACME_DB_URL": "${ACME_DB_URL}" } // each assistant gets its own spelling
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
`extends` takes npm packages, found in `node_modules`, or relative paths, which
|
|
137
|
-
resolve from `.opencastle/` — a `baseline/` directory at the project root is
|
|
138
|
-
`"../baseline"`.
|
|
88
|
+
Everyone keeps the assistant they like; the team keeps one reviewed source.
|
|
139
89
|
|
|
140
90
|
- **One standard, many repositories.** A baseline is an npm package with the
|
|
141
|
-
organisation's instructions, skills, agents, MCP servers and policy
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
repository
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
- **
|
|
150
|
-
`
|
|
151
|
-
and marks with ⚠️ what deserves a careful look, such as a new MCP server.
|
|
152
|
-
- **MCP servers pinned and audited.** Every server OpenCastle adds is the
|
|
153
|
-
vendor's remote server, the project's own copy of a tool (`npx --no`), or a
|
|
154
|
-
package at an exact version. `doctor` and `sync --check` audit every MCP
|
|
155
|
-
config, including servers you added by hand: no exact version, a package
|
|
156
|
-
OpenCastle knows is not on npm, a credential written into the file, a server
|
|
157
|
-
the policy does not allow.
|
|
158
|
-
- **Team memory.** Agents record lessons with `opencastle lesson`, one file each
|
|
159
|
-
in `.opencastle/lessons/`, citing the code they are about; `doctor` names a
|
|
160
|
-
lesson whose code has changed. `opencastle promote` turns a personal skill or
|
|
161
|
-
Claude Code's auto memory into the team's, for the pull request to review.
|
|
91
|
+
organisation's instructions, skills, agents, MCP servers and policy, which
|
|
92
|
+
every repository `extends`. It is also an [Agent Plugin](https://agent-plugins.org).
|
|
93
|
+
- **Policy only tightens.** Which MCP servers may run, which hosts they reach,
|
|
94
|
+
exact versions, what no repository may drop, how much context loads before a
|
|
95
|
+
task. A repository can tighten it, never relax it.
|
|
96
|
+
- **A lock you can review.** `sync` writes `.opencastle/lock.json`, and
|
|
97
|
+
`npx opencastle review` says on the pull request what a change does to every
|
|
98
|
+
assistant, marking with ⚠️ what deserves a careful look.
|
|
99
|
+
- **Team memory.** Lessons agents record cite the code they are about, and
|
|
100
|
+
`doctor` names one whose code has changed.
|
|
162
101
|
|
|
163
102
|
```bash
|
|
164
|
-
opencastle explain # what a new teammate's assistant gets, and what to set up
|
|
165
|
-
opencastle ci --owners @acme/platform #
|
|
166
|
-
opencastle baseline init acme-baseline --name @acme/opencastle-baseline
|
|
167
|
-
opencastle
|
|
168
|
-
opencastle promote memory # what your assistant learned here, as lessons for the team
|
|
169
|
-
opencastle fleet ~/src/* # which repositories run which baseline version
|
|
103
|
+
npx opencastle explain # what a new teammate's assistant gets, and what to set up
|
|
104
|
+
npx opencastle ci --owners @acme/platform # the check and the review on every pull request
|
|
105
|
+
npx opencastle baseline init acme-baseline --name @acme/opencastle-baseline
|
|
106
|
+
npx opencastle fleet ~/src/* # which repositories run which baseline version
|
|
170
107
|
```
|
|
171
108
|
|
|
172
|
-
|
|
173
|
-
**[opencastle.dev/docs/teams](https://www.opencastle.dev/docs/teams/)**.
|
|
174
|
-
still open, and why things are the way they are: **[docs/teams.md](docs/teams.md)**.
|
|
109
|
+
Layers, every config field, policy, the lock and a rollout recipe:
|
|
110
|
+
**[opencastle.dev/docs/teams](https://www.opencastle.dev/docs/teams/)**.
|
|
175
111
|
|
|
176
112
|
<br>
|
|
177
113
|
|
|
@@ -181,90 +117,67 @@ still open, and why things are the way they are: **[docs/teams.md](docs/teams.md
|
|
|
181
117
|
|-----------|--------------|--------|------------|
|
|
182
118
|
| **Claude Code** | `CLAUDE.md`, `.claude/agents/`, commands in `.claude/commands/oc/` | `.claude/skills/` | `.mcp.json` |
|
|
183
119
|
| **VS Code** (GitHub Copilot) | `.github/copilot-instructions.md`, `.github/instructions/`, `.github/agents/`, prompts `.github/prompts/oc.*.prompt.md` | `.github/skills/` | `.vscode/mcp.json` |
|
|
184
|
-
| **Cursor** | `.cursorrules`, `.cursor/rules/*.mdc`
|
|
120
|
+
| **Cursor** | `.cursorrules`, `.cursor/rules/*.mdc` — the instructions come from `CLAUDE.md` or `AGENTS.md` when one of those is written, since Cursor reads them too | `.agents/skills/` | `.cursor/mcp.json` |
|
|
185
121
|
| **Windsurf** (Devin Desktop) | `.windsurfrules`, `.windsurf/rules/*.md` | `.agents/skills/` | `.devin/mcp_config.json` |
|
|
186
122
|
| **OpenCode** | `AGENTS.md`, `.opencode/` | `.agents/skills/` | `opencode.json` |
|
|
187
123
|
| **Codex CLI** | `AGENTS.md`, `.codex/` | `.agents/skills/` | `.codex/config.toml` (trusted projects only) |
|
|
188
124
|
| **Antigravity** | `GEMINI.md` (points to `AGENTS.md` when Codex or OpenCode is also selected), `.agents/` | `.agents/skills/` | `.agents/mcp_config.json` |
|
|
189
125
|
|
|
190
|
-
Each target gets
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
In Claude Code and in VS Code's Copilot Chat, OpenCastle's prompts are slash
|
|
195
|
-
commands in one namespace — `/oc:bug-fix`, `/oc:implement-feature`, and a
|
|
196
|
-
team's own prompts as `/oc:<name>` — so a command of yours with the same name
|
|
197
|
-
keeps working beside them. In `.claude/commands/` and `.github/prompts/`,
|
|
198
|
-
OpenCastle writes only its `oc` files and leaves everything else alone. The
|
|
199
|
-
other assistants get the prompts as files (`.cursor/rules/prompts/`,
|
|
200
|
-
`.windsurf/rules/prompts/`, `.opencode/prompts/`, `.codex/prompts/`,
|
|
201
|
-
`.agents/prompts/`) that you ask for by name.
|
|
126
|
+
Each target gets its assistant's native format. In Claude Code and Copilot Chat
|
|
127
|
+
the prompts are slash commands under `/oc:`, beside your own; the others get
|
|
128
|
+
them as files you ask for by name.
|
|
202
129
|
|
|
203
130
|
<br>
|
|
204
131
|
|
|
205
132
|
## What gets compiled
|
|
206
133
|
|
|
207
|
-
**
|
|
208
|
-
|
|
209
|
-
gets the ones its stack needs: Content Engineer comes with a CMS, Data Engineer
|
|
210
|
-
with a database.
|
|
134
|
+
**Instructions** — a short set every assistant always loads, and your project's
|
|
135
|
+
facts, read from the code by `init`.
|
|
211
136
|
|
|
212
|
-
**
|
|
213
|
-
|
|
214
|
-
|
|
137
|
+
**Agents** — 13 role definitions (Team Lead, Developer, UI/UX, Data, Security,
|
|
138
|
+
Testing, Reviewer, and others), each with a scope and an output contract. Each
|
|
139
|
+
declares a capability *tier* — premium, standard or economy — rather than a
|
|
140
|
+
model name: your assistant picks the model.
|
|
215
141
|
|
|
216
|
-
**
|
|
217
|
-
|
|
218
|
-
|
|
142
|
+
**Skills** — 17 domain skills plus 31 tool integrations, loaded only when a task
|
|
143
|
+
needs them. The integrations are chosen during init from what your repository
|
|
144
|
+
uses.
|
|
219
145
|
|
|
220
146
|
**Prompts** — 7: brainstorm, implement-feature, bug-fix, resolve-pr-comments,
|
|
221
147
|
bootstrap-customizations and create-skill work in your session; convoy hands the
|
|
222
148
|
work to the convoy planner.
|
|
223
149
|
|
|
224
|
-
**
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
Agents declare a capability *tier* — premium, standard, or economy — rather than
|
|
228
|
-
a model name. Your assistant picks the model: it knows which ones your account
|
|
229
|
-
can reach and what they cost today. A pinned model name can only be wrong later.
|
|
150
|
+
**Workflows** — 6 templates for recurring work that needs more than a prompt:
|
|
151
|
+
database migrations, CMS schema changes, data pipelines, performance,
|
|
152
|
+
refactoring and security audits.
|
|
230
153
|
|
|
231
154
|
<br>
|
|
232
155
|
|
|
233
156
|
## Convoy Engine (experimental)
|
|
234
157
|
|
|
235
|
-
For multi-step work you would rather not sit and watch.
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
and may change; the compiler above does not depend on it.
|
|
158
|
+
For multi-step work you would rather not sit and watch. This part is
|
|
159
|
+
experimental and may change; the compiler does not depend on it.
|
|
160
|
+
`npx opencastle convoy "<task>"` plans the work without changing anything, shows
|
|
161
|
+
you the plan and asks once. Then it runs independent tasks at the same time,
|
|
162
|
+
each in its own git worktree, on the agent runtime `init` set up, and merges
|
|
163
|
+
them onto a branch of its own for you to review.
|
|
242
164
|
|
|
243
165
|
```bash
|
|
244
|
-
opencastle convoy "Add tags to notes, and reject a note without a title"
|
|
245
|
-
opencastle convoy
|
|
246
|
-
opencastle convoy resume # continue whatever is not done
|
|
247
|
-
opencastle convoy dashboard # the Observability dashboard, live
|
|
248
|
-
opencastle convoy run my.convoy.yml # run a spec you wrote
|
|
166
|
+
npx opencastle convoy "Add tags to notes, and reject a note without a title"
|
|
167
|
+
npx opencastle convoy dashboard # the Observability dashboard, live
|
|
249
168
|
```
|
|
250
169
|
|
|
251
|
-
Real runs
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
Steve Yegge's [Gas Town](https://github.com/gastownhall/gastown).
|
|
255
|
-
|
|
256
|
-
<br>
|
|
257
|
-
|
|
258
|
-
## Architecture
|
|
259
|
-
|
|
260
|
-
See **[ARCHITECTURE.md](ARCHITECTURE.md)** for how the adapters, team sources,
|
|
261
|
-
skill matrix and convoy engine fit together.
|
|
170
|
+
Real runs: [Use cases](https://www.opencastle.dev/docs/use-cases). How it works:
|
|
171
|
+
[ARCHITECTURE.md](ARCHITECTURE.md#convoy-architecture). Inspired by Steve
|
|
172
|
+
Yegge's [Gas Town](https://github.com/gastownhall/gastown).
|
|
262
173
|
|
|
263
174
|
<br>
|
|
264
175
|
|
|
265
176
|
## Contributing
|
|
266
177
|
|
|
267
|
-
|
|
178
|
+
How the adapters, team sources and convoy engine fit together:
|
|
179
|
+
**[ARCHITECTURE.md](ARCHITECTURE.md)**. How to contribute:
|
|
180
|
+
**[CONTRIBUTING.md](CONTRIBUTING.md)**.
|
|
268
181
|
|
|
269
182
|
<br>
|
|
270
183
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencastle",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Write your AI config once, for every assistant and every teammate: compiles instructions, agents, skills, commands and MCP servers for Claude Code, Copilot, Cursor, Windsurf, OpenCode, Codex and Antigravity, shared across your team's repositories.",
|
|
6
6
|
"bin": {
|