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.
Files changed (2) hide show
  1. package/README.md +64 -151
  2. 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 your repository first: which assistants you already have config for,
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 114 files
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
- What you wrote in `CLAUDE.md`, `.cursorrules`, `AGENTS.md` and the other root
69
- files stays above a managed block. A file of yours inside a directory OpenCastle
70
- generates (`.cursor/rules/`, `.claude/agents/`, …) is named by `init` and
71
- removed by the next `sync`; move it into `.opencastle/` and it compiles for
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's installed, what drifted, what to run next
83
- opencastle sync # recompile every target from source
84
- opencastle sync --check # fail if anything drifted (for CI)
85
- opencastle add stripe # adopt a new tool, recompile
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, and let CI check it:
105
- `npm i -D opencastle && npx opencastle ci` writes a GitHub Actions workflow that
106
- runs `sync --check` on every pull request
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. The team keeps one reviewed source, and
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. As
142
- `baseline init` lays it out, it is also an [Agent Plugin](https://agent-plugins.org),
143
- so Copilot, VS Code, Cursor, Codex and Kiro can install it as it is. What a
144
- repository adds under `.opencastle/` compiles into all seven assistants.
145
- - **Policy only tightens.** A baseline says which MCP servers may run, which
146
- hosts remote ones may reach, that every server is pinned, which items no
147
- repository may drop, and how much context may load before a task. A
148
- repository can tighten it, never relax it.
149
- - **A lock you can review.** `sync` writes `.opencastle/lock.json`.
150
- `opencastle review` turns a change to it into sentences on the pull request
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 # CI check and review on every PR; owners for the lock
166
- opencastle baseline init acme-baseline --name @acme/opencastle-baseline # the organisation's baseline
167
- opencastle plugin check acme-baseline # check it the way every assistant loads it
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
- The guide — layers, every config field, policy, the lock, a rollout recipe:
173
- **[opencastle.dev/docs/teams](https://www.opencastle.dev/docs/teams/)**. What is
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` (instructions from `CLAUDE.md` or `AGENTS.md` instead, which Cursor also reads, when Claude Code, Codex or OpenCode is also selected) | `.agents/skills/` | `.cursor/mcp.json` |
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 that assistant's native format, including its own frontmatter
191
- dialect for how a rule is scoped, and its MCP servers in the shape it expects.
192
- `opencastle explain` lists the paths for the assistants a project compiles for.
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
- **Agents** — 13 role definitions (Developer, UI/UX, Data, Security, Testing,
208
- Reviewer, and others), each with a defined scope and output contract. A project
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
- **Skills** — 17 domain skills plus 31 tool integrations, loaded on demand so
213
- they don't sit in the context window. The integrations are chosen during init
214
- from what your repository actually uses.
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
- **Workflows** — 6 templates for recurring work that needs more than a prompt
217
- (database migrations, CMS schema changes, data pipelines, performance,
218
- refactoring, security audits), each ending with the same delivery phase.
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
- **Quality gates** — a review pass after each step, panel review for high-stakes
225
- changes, plus your own lint, test, and build commands.
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. `opencastle convoy "<task>"`
236
- plans the work without changing anything, shows you the plan and asks once. Then it
237
- runs independent tasks at the same time, each in its own git worktree, on the
238
- runtime `opencastle init` set up: Claude Code, Codex, Cursor, OpenCode or Copilot.
239
- Each finished task is merged onto a branch of its own, your project's checks run
240
- once at the end, and your checkout is never touched. This part is experimental
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" # plan, show, ask, run
245
- opencastle convoy # the last run and the one next step
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, with their time and cost: [Use cases](https://www.opencastle.dev/docs/use-cases).
252
- Every command and flag: [CLI reference](https://www.opencastle.dev/docs/cli#convoy).
253
- How it works: [ARCHITECTURE.md](ARCHITECTURE.md#convoy-architecture). Inspired by
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
- See **[CONTRIBUTING.md](CONTRIBUTING.md)**.
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.1",
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": {