opencastle 1.2.0 → 1.3.1

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 (195) hide show
  1. package/README.md +90 -125
  2. package/bin/cli.mjs +12 -1
  3. package/dist/cli/adapters/antigravity.d.ts +0 -1
  4. package/dist/cli/adapters/antigravity.d.ts.map +1 -1
  5. package/dist/cli/adapters/antigravity.js +2 -1
  6. package/dist/cli/adapters/antigravity.js.map +1 -1
  7. package/dist/cli/adapters/claude-code.d.ts +5 -4
  8. package/dist/cli/adapters/claude-code.d.ts.map +1 -1
  9. package/dist/cli/adapters/claude-code.js +7 -4
  10. package/dist/cli/adapters/claude-code.js.map +1 -1
  11. package/dist/cli/adapters/cursor.d.ts.map +1 -1
  12. package/dist/cli/adapters/cursor.js +8 -1
  13. package/dist/cli/adapters/cursor.js.map +1 -1
  14. package/dist/cli/adapters/opencode.d.ts +12 -5
  15. package/dist/cli/adapters/opencode.d.ts.map +1 -1
  16. package/dist/cli/adapters/opencode.js +17 -5
  17. package/dist/cli/adapters/opencode.js.map +1 -1
  18. package/dist/cli/adapters/rules-dir-base.d.ts +12 -1
  19. package/dist/cli/adapters/rules-dir-base.d.ts.map +1 -1
  20. package/dist/cli/adapters/rules-dir-base.js +43 -57
  21. package/dist/cli/adapters/rules-dir-base.js.map +1 -1
  22. package/dist/cli/adapters/rules-dir-base.test.js +27 -18
  23. package/dist/cli/adapters/rules-dir-base.test.js.map +1 -1
  24. package/dist/cli/adapters/single-file-base.d.ts +29 -0
  25. package/dist/cli/adapters/single-file-base.d.ts.map +1 -1
  26. package/dist/cli/adapters/single-file-base.js +49 -16
  27. package/dist/cli/adapters/single-file-base.js.map +1 -1
  28. package/dist/cli/adapters/vscode.d.ts +2 -1
  29. package/dist/cli/adapters/vscode.d.ts.map +1 -1
  30. package/dist/cli/adapters/vscode.js +2 -1
  31. package/dist/cli/adapters/vscode.js.map +1 -1
  32. package/dist/cli/adapters/windsurf.d.ts.map +1 -1
  33. package/dist/cli/adapters/windsurf.js +11 -1
  34. package/dist/cli/adapters/windsurf.js.map +1 -1
  35. package/dist/cli/agent-plugin.test.js +12 -0
  36. package/dist/cli/agent-plugin.test.js.map +1 -1
  37. package/dist/cli/baseline.d.ts.map +1 -1
  38. package/dist/cli/baseline.js +15 -8
  39. package/dist/cli/baseline.js.map +1 -1
  40. package/dist/cli/bootstrap.d.ts.map +1 -1
  41. package/dist/cli/bootstrap.js +20 -0
  42. package/dist/cli/bootstrap.js.map +1 -1
  43. package/dist/cli/ci.d.ts.map +1 -1
  44. package/dist/cli/ci.js +24 -8
  45. package/dist/cli/ci.js.map +1 -1
  46. package/dist/cli/codex-target.test.js +14 -1
  47. package/dist/cli/codex-target.test.js.map +1 -1
  48. package/dist/cli/command-namespace.test.js +33 -0
  49. package/dist/cli/command-namespace.test.js.map +1 -1
  50. package/dist/cli/convoy-cmd.d.ts.map +1 -1
  51. package/dist/cli/convoy-cmd.js +2 -1
  52. package/dist/cli/convoy-cmd.js.map +1 -1
  53. package/dist/cli/dispatcher.test.js +6 -0
  54. package/dist/cli/dispatcher.test.js.map +1 -1
  55. package/dist/cli/docs-accuracy.test.js +33 -8
  56. package/dist/cli/docs-accuracy.test.js.map +1 -1
  57. package/dist/cli/doctor.d.ts.map +1 -1
  58. package/dist/cli/doctor.js +9 -6
  59. package/dist/cli/doctor.js.map +1 -1
  60. package/dist/cli/doctor.test.js +2 -2
  61. package/dist/cli/doctor.test.js.map +1 -1
  62. package/dist/cli/explain.d.ts +5 -0
  63. package/dist/cli/explain.d.ts.map +1 -1
  64. package/dist/cli/explain.js +38 -2
  65. package/dist/cli/explain.js.map +1 -1
  66. package/dist/cli/init-own-files.test.d.ts +2 -0
  67. package/dist/cli/init-own-files.test.d.ts.map +1 -0
  68. package/dist/cli/init-own-files.test.js +133 -0
  69. package/dist/cli/init-own-files.test.js.map +1 -0
  70. package/dist/cli/init.d.ts.map +1 -1
  71. package/dist/cli/init.js +106 -7
  72. package/dist/cli/init.js.map +1 -1
  73. package/dist/cli/init.test.js +52 -27
  74. package/dist/cli/init.test.js.map +1 -1
  75. package/dist/cli/layers.d.ts.map +1 -1
  76. package/dist/cli/layers.js +13 -4
  77. package/dist/cli/layers.js.map +1 -1
  78. package/dist/cli/lesson.d.ts.map +1 -1
  79. package/dist/cli/lesson.js +6 -5
  80. package/dist/cli/lesson.js.map +1 -1
  81. package/dist/cli/managed-paths.d.ts.map +1 -1
  82. package/dist/cli/managed-paths.js +3 -1
  83. package/dist/cli/managed-paths.js.map +1 -1
  84. package/dist/cli/mcp-audit.d.ts.map +1 -1
  85. package/dist/cli/mcp-audit.js +2 -0
  86. package/dist/cli/mcp-audit.js.map +1 -1
  87. package/dist/cli/mcp-upgrade.test.js +24 -1
  88. package/dist/cli/mcp-upgrade.test.js.map +1 -1
  89. package/dist/cli/mcp.d.ts.map +1 -1
  90. package/dist/cli/mcp.js +22 -3
  91. package/dist/cli/mcp.js.map +1 -1
  92. package/dist/cli/prompt.d.ts.map +1 -1
  93. package/dist/cli/prompt.js +9 -7
  94. package/dist/cli/prompt.js.map +1 -1
  95. package/dist/cli/prompt.test.js +20 -2
  96. package/dist/cli/prompt.test.js.map +1 -1
  97. package/dist/cli/remove.d.ts.map +1 -1
  98. package/dist/cli/remove.js +3 -1
  99. package/dist/cli/remove.js.map +1 -1
  100. package/dist/cli/review.d.ts.map +1 -1
  101. package/dist/cli/review.js +7 -1
  102. package/dist/cli/review.js.map +1 -1
  103. package/dist/cli/sync-check.d.ts.map +1 -1
  104. package/dist/cli/sync-check.js +12 -3
  105. package/dist/cli/sync-check.js.map +1 -1
  106. package/dist/cli/sync-check.test.js +5 -4
  107. package/dist/cli/sync-check.test.js.map +1 -1
  108. package/dist/cli/sync.d.ts.map +1 -1
  109. package/dist/cli/sync.js +3 -2
  110. package/dist/cli/sync.js.map +1 -1
  111. package/dist/cli/team-commands.test.js +12 -0
  112. package/dist/cli/team-commands.test.js.map +1 -1
  113. package/dist/cli/team-sources.test.js +10 -0
  114. package/dist/cli/team-sources.test.js.map +1 -1
  115. package/dist/cli/types.d.ts +1 -1
  116. package/dist/cli/types.d.ts.map +1 -1
  117. package/dist/cli/update.d.ts.map +1 -1
  118. package/dist/cli/update.js +4 -3
  119. package/dist/cli/update.js.map +1 -1
  120. package/dist/cli/website-plugins.test.js +51 -2
  121. package/dist/cli/website-plugins.test.js.map +1 -1
  122. package/dist/cli/windsurf-target.test.d.ts +2 -0
  123. package/dist/cli/windsurf-target.test.d.ts.map +1 -0
  124. package/dist/cli/windsurf-target.test.js +62 -0
  125. package/dist/cli/windsurf-target.test.js.map +1 -0
  126. package/dist/orchestrator/plugins/coolify/config.d.ts.map +1 -1
  127. package/dist/orchestrator/plugins/coolify/config.js +13 -0
  128. package/dist/orchestrator/plugins/coolify/config.js.map +1 -1
  129. package/dist/orchestrator/plugins/registry.test.d.ts +2 -0
  130. package/dist/orchestrator/plugins/registry.test.d.ts.map +1 -0
  131. package/dist/orchestrator/plugins/registry.test.js +37 -0
  132. package/dist/orchestrator/plugins/registry.test.js.map +1 -0
  133. package/dist/orchestrator/plugins/sentry/config.d.ts.map +1 -1
  134. package/dist/orchestrator/plugins/sentry/config.js +13 -0
  135. package/dist/orchestrator/plugins/sentry/config.js.map +1 -1
  136. package/package.json +1 -1
  137. package/src/cli/adapters/antigravity.ts +2 -1
  138. package/src/cli/adapters/claude-code.ts +7 -4
  139. package/src/cli/adapters/cursor.ts +8 -1
  140. package/src/cli/adapters/opencode.ts +18 -6
  141. package/src/cli/adapters/rules-dir-base.test.ts +28 -18
  142. package/src/cli/adapters/rules-dir-base.ts +51 -90
  143. package/src/cli/adapters/single-file-base.ts +77 -16
  144. package/src/cli/adapters/vscode.ts +2 -1
  145. package/src/cli/adapters/windsurf.ts +11 -1
  146. package/src/cli/agent-plugin.test.ts +14 -0
  147. package/src/cli/baseline.ts +16 -6
  148. package/src/cli/bootstrap.ts +23 -0
  149. package/src/cli/ci.ts +25 -8
  150. package/src/cli/codex-target.test.ts +15 -1
  151. package/src/cli/command-namespace.test.ts +35 -0
  152. package/src/cli/convoy/TELEMETRY.md +64 -62
  153. package/src/cli/convoy-cmd.ts +2 -1
  154. package/src/cli/dispatcher.test.ts +7 -0
  155. package/src/cli/docs-accuracy.test.ts +34 -7
  156. package/src/cli/doctor.test.ts +2 -2
  157. package/src/cli/doctor.ts +9 -6
  158. package/src/cli/explain.ts +36 -2
  159. package/src/cli/init-own-files.test.ts +156 -0
  160. package/src/cli/init.test.ts +55 -27
  161. package/src/cli/init.ts +104 -7
  162. package/src/cli/layers.ts +13 -4
  163. package/src/cli/lesson.ts +6 -5
  164. package/src/cli/managed-paths.ts +3 -1
  165. package/src/cli/mcp-audit.ts +2 -0
  166. package/src/cli/mcp-upgrade.test.ts +26 -1
  167. package/src/cli/mcp.ts +22 -3
  168. package/src/cli/prompt.test.ts +21 -2
  169. package/src/cli/prompt.ts +11 -7
  170. package/src/cli/remove.ts +3 -0
  171. package/src/cli/review.ts +7 -1
  172. package/src/cli/sync-check.test.ts +5 -4
  173. package/src/cli/sync-check.ts +12 -3
  174. package/src/cli/sync.ts +3 -2
  175. package/src/cli/team-commands.test.ts +16 -0
  176. package/src/cli/team-sources.test.ts +11 -0
  177. package/src/cli/types.ts +1 -1
  178. package/src/cli/update.ts +4 -3
  179. package/src/cli/website-plugins.test.ts +55 -5
  180. package/src/cli/windsurf-target.test.ts +70 -0
  181. package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
  182. package/src/orchestrator/agents/team-lead.agent.md +2 -2
  183. package/src/orchestrator/customizations/README.md +58 -13
  184. package/src/orchestrator/customizations/logs/README.md +23 -18
  185. package/src/orchestrator/instructions/general.instructions.md +1 -1
  186. package/src/orchestrator/plugins/coolify/config.ts +13 -0
  187. package/src/orchestrator/plugins/registry.test.ts +42 -0
  188. package/src/orchestrator/plugins/sentry/config.ts +13 -0
  189. package/src/orchestrator/prompts/bootstrap-customizations.prompt.md +44 -49
  190. package/src/orchestrator/prompts/brainstorm.prompt.md +2 -2
  191. package/src/orchestrator/prompts/bug-fix.prompt.md +5 -4
  192. package/src/orchestrator/prompts/create-skill.prompt.md +29 -39
  193. package/src/orchestrator/prompts/generate-convoy.prompt.md +1 -1
  194. package/src/orchestrator/prompts/generate-prd.prompt.md +1 -1
  195. package/src/orchestrator/prompts/implement-feature.prompt.md +7 -6
package/README.md CHANGED
@@ -46,8 +46,7 @@ which framework and database you use, which test runner. Then it shows you what
46
46
  it found and asks once.
47
47
 
48
48
  ```
49
- 🏰 OpenCastle
50
-
49
+ …
51
50
  Found assistant config:
52
51
  • Claude Code (CLAUDE.md)
53
52
 
@@ -58,12 +57,22 @@ it found and asks once.
58
57
  nextjs, supabase, vitest, chrome-devtools
59
58
 
60
59
  Set this up? [Y/n]
60
+ …
61
+ ✓ Created 114 files
62
+ ✓ Created .gitignore with OpenCastle entries
63
+ ✓ Merged into your existing CLAUDE.md
64
+ your content is above the managed block and is never overwritten
65
+ …
61
66
  ```
62
67
 
63
- No questionnaire. Your existing files are never overwritten — OpenCastle tells
64
- you which ones it left alone.
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.
65
73
 
66
- Full walkthrough: **[docs/quickstart.md](docs/quickstart.md)** — five minutes.
74
+ Node.js 22.5 or newer. Full walkthrough, including CI and upgrading:
75
+ **[docs/quickstart.md](docs/quickstart.md)**.
67
76
 
68
77
  <br>
69
78
 
@@ -81,43 +90,24 @@ Running `opencastle` with no arguments is the one command worth remembering. It
81
90
  answers the question you actually have:
82
91
 
83
92
  ```
84
- 🏰 OpenCastle
93
+ 🏰 OpenCastle v1.0.0
85
94
 
86
- ! 2/3 targets in sync (sources are newer)
95
+ ! 2/3 targets installed — generated files no longer match their sources
87
96
  ✓ claude-code up to date
88
97
  ✓ cursor up to date
89
98
  ! vscode 4 paths missing
90
99
 
91
100
  Next: opencastle sync
92
- generated files are older than the framework sources
93
- ```
94
-
95
-
96
- ### Keep it in sync in CI
97
-
98
- `sync --check` compiles to a scratch directory and compares. It writes nothing and
99
- exits non-zero when a generated file no longer matches its source — someone edited
100
- `.cursor/rules/foo.mdc` by hand, added a file under a generated directory, or
101
- upgraded without recompiling.
102
-
103
- ```yaml
104
- # .github/workflows/opencastle.yml
105
- - uses: actions/setup-node@v4
106
- with: { node-version: 22 }
107
- - run: npx opencastle sync --check
101
+ 1 target missing generated files
108
102
  ```
109
103
 
110
- `opencastle ci` writes the whole workflow for you: it installs dependencies so
111
- baselines resolve, runs the project's own OpenCastle version, and adds `review`
112
- on pull requests.
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/).
113
109
 
114
- Commit the generated config, like a lockfile. That is what gives the check
115
- something to compare and what lets a teammate clone the repo and have working
116
- rules without running anything. Only `.env` and run artefacts are gitignored.
117
-
118
- Upgrading from 0.35 or earlier? Run `opencastle sync` once — it rewrites the
119
- `.gitignore` block, repairs the manifest, and adopts root files an older release
120
- generated, keeping a `.opencastle-backup` of each. See
110
+ Upgrading from 0.35 or earlier? Run `opencastle sync` once — see
121
111
  [the quickstart](docs/quickstart.md#upgrading-from-035-or-earlier).
122
112
 
123
113
  <br>
@@ -134,7 +124,7 @@ can share it across every repository it owns.
134
124
  "extends": ["@acme/opencastle-baseline"], // a devDependency; your lockfile pins it
135
125
  "exclude": ["skills/seo-patterns"],
136
126
  "mcpServers": {
137
- "acme-db": {
127
+ "acme-db": { // must be on the baseline's policy.mcp.allow
138
128
  "command": "npx",
139
129
  "args": ["-y", "@acme/db-mcp@2.2.0"],
140
130
  "env": { "ACME_DB_URL": "${ACME_DB_URL}" } // each assistant gets its own spelling
@@ -143,112 +133,93 @@ can share it across every repository it owns.
143
133
  }
144
134
  ```
145
135
 
146
- - **One standard, many repositories.** A baseline is an ordinary npm package
147
- carrying the organisation's instructions, skills, agents, MCP servers and
148
- policy — and, as `baseline init` lays it out, an Agent Plugin. Each repository installs it as a devDependency and names it in
149
- `extends`; the lockfile pins the version, and an upgrade bot opens one pull
150
- request per repository when it moves. What a repository adds under
151
- `.opencastle/` — `instructions/`, `skills/<name>/SKILL.md`, `agents/` —
152
- compiles into all seven assistants the same way.
153
- - **Policy only tightens.** A baseline can say which MCP servers may run, which
154
- hosts remote ones may reach, that every server is pinned to an exact version,
155
- which items no repository may drop, and how much context may load before a
156
- task. A repository can tighten it, never relax it, and can opt out of a
157
- baseline's server. A server that breaks its own layer's policy, or a
158
- credential written inline, is a compile error, and `doctor` and
159
- `sync --check` hold servers someone added to an MCP config by hand to the same
160
- policy.
161
- - **Team memory that merges and keeps current.** Agents record lessons with
162
- `opencastle lesson`, one file each in `.opencastle/lessons/`, citing the code
163
- a lesson is about; `doctor` names a lesson whose code has changed since.
164
- `opencastle promote` makes what one person's assistant learned the team's: a
165
- personal skill into the team's sources or a baseline, and Claude Code's auto
166
- memory for the repository into lessons — in the working tree, for the pull
167
- request to review.
168
- - **A lock you can review.** `sync` writes `.opencastle/lock.json`: which layers
169
- at which versions, where every skill and instruction came from, which MCP
170
- servers every assistant can start, and how many tokens load up front.
171
- `opencastle review` puts the change to it into sentences on the pull request,
172
- and marks with ⚠️ what deserves a careful look — a new MCP server, a widened
173
- allowlist, a new always-loaded instruction.
174
- - **Drift shows up on the pull request.** On GitHub Actions, `sync --check`
175
- annotates each drifted file with that file's own fix and writes a table to the
176
- run's summary page. Nothing to configure: it reads `GITHUB_ACTIONS`.
177
- - **MCP servers are pinned like dependencies.** Every server OpenCastle adds is
178
- the vendor's own remote server, the project's own copy of a tool it already
179
- uses (`npx --no`), or a package at an exact version — never `@latest`. Every
180
- laptop and every CI run starts the same server version. (A pin fixes the
181
- server's own version, not the versions of its dependencies, which npx resolves
182
- per machine.) Upgrading OpenCastle moves them forward in one reviewable diff,
183
- and an entry you edited is left alone.
184
- - **`doctor` audits what your agents launch**, including servers you added
185
- yourself: a package with no exact version, one that no longer exists on npm,
186
- a remote server your assistant cannot load, a credential written into the
187
- file, or a server the policy does not allow. It also checks the team's own
188
- sources: that they resolve, how much context every assistant loads against
189
- the budget, and whether instructions still name scripts and paths that exist.
190
- Each finding names the fix that works for it.
191
- - **Built on the open standards.** Codex and OpenCode read `AGENTS.md`; every
192
- skill is a `SKILL.md` folder named as the skill, in the Agent Skills format,
193
- wherever each assistant reads skills; every assistant gets its MCP servers in
194
- its own config. And [Agent Plugins 1.0](https://agent-plugins.org) packages
195
- them: a baseline is one, so Copilot, VS Code, Cursor, Codex and Kiro can
196
- install it as it is, while OpenCastle compiles it — and what the standard
197
- does not cover yet — into all seven assistants. Any Agent Plugin on npm can be
198
- extended the same way. `opencastle plugin` checks one against the spec,
199
- writes the manifest Claude Code reads instead, and writes the marketplace file
200
- for Claude Code, Copilot, Cursor and Codex. Each of the integrations ships as
201
- an Agent Plugin too.
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"`.
139
+
140
+ - **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.
202
162
 
203
163
  ```bash
204
164
  opencastle explain # what a new teammate's assistant gets, and what to set up
205
165
  opencastle ci --owners @acme/platform # CI check and review on every PR; owners for the lock
206
- opencastle baseline init # start the organisation's baseline package (an Agent Plugin)
207
- opencastle plugin check # check it the way every assistant loads it
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
208
168
  opencastle promote memory # what your assistant learned here, as lessons for the team
209
169
  opencastle fleet ~/src/* # which repositories run which baseline version
210
170
  ```
211
171
 
212
172
  The guide — layers, every config field, policy, the lock, a rollout recipe:
213
173
  **[opencastle.dev/docs/teams](https://www.opencastle.dev/docs/teams/)**. What is
214
- still open: **[docs/teams.md](docs/teams.md)**.
174
+ still open, and why things are the way they are: **[docs/teams.md](docs/teams.md)**.
215
175
 
216
176
  <br>
217
177
 
218
178
  ## Supported assistants
219
179
 
220
- | Assistant | Compiles to |
221
- |-----------|-------------|
222
- | **Claude Code** | `CLAUDE.md` + `.claude/` — commands as `/oc:<name>` |
223
- | **GitHub Copilot** | `.github/` — agents, skills, prompts as `/oc:<name>` |
224
- | **Cursor** | `.cursorrules` + `.cursor/rules/*.mdc` |
225
- | **Windsurf** | `.windsurfrules` + `.windsurf/rules/*.md` |
226
- | **OpenCode** | `AGENTS.md` + `.opencode/` + `opencode.json` |
227
- | **Codex CLI** | `AGENTS.md` + `.agents/skills/` + `.codex/` (MCP in `config.toml`) |
228
- | **Antigravity** | `GEMINI.md` + `.agents/` |
180
+ | Assistant | Instructions | Skills | MCP config |
181
+ |-----------|--------------|--------|------------|
182
+ | **Claude Code** | `CLAUDE.md`, `.claude/agents/`, commands in `.claude/commands/oc/` | `.claude/skills/` | `.mcp.json` |
183
+ | **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` | `.agents/skills/` | `.cursor/mcp.json` |
185
+ | **Windsurf** (Devin Desktop) | `.windsurfrules`, `.windsurf/rules/*.md` | `.agents/skills/` | `.devin/mcp_config.json` |
186
+ | **OpenCode** | `AGENTS.md`, `.opencode/` | `.agents/skills/` | `opencode.json` |
187
+ | **Codex CLI** | `AGENTS.md`, `.codex/` | `.agents/skills/` | `.codex/config.toml` (trusted projects only) |
188
+ | **Antigravity** | `GEMINI.md` (points to `AGENTS.md` when Codex or OpenCode is also selected), `.agents/` | `.agents/skills/` | `.agents/mcp_config.json` |
229
189
 
230
190
  Each target gets that assistant's native format, including its own frontmatter
231
- dialect for how a rule is scoped. MCP servers are configured per assistant too,
232
- in whichever shape it expects.
233
-
234
- Compiled commands share one namespace — `/oc:bug-fix`, `/oc:implement-feature`,
235
- and a team's own prompts as `/oc:<name>` — so a command of yours with the same
236
- name keeps working beside them. In `.claude/commands/` and `.github/prompts/`,
237
- OpenCastle writes only its `oc` files and leaves everything else alone.
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.
238
202
 
239
203
  <br>
240
204
 
241
205
  ## What gets compiled
242
206
 
243
207
  **Agents** — 13 role definitions (Developer, UI/UX, Data, Security, Testing,
244
- Reviewer, and others), each with a defined scope and output contract.
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.
245
211
 
246
212
  **Skills** — 31 domain skills plus 31 tool integrations, loaded on demand so
247
213
  they don't sit in the context window. Selected during init from what your
248
214
  repository actually uses.
249
215
 
250
- **Workflows** — 9 templates for recurring work: features, bug fixes, data
251
- pipelines, security audits, migrations.
216
+ **Workflows** — 8 templates for recurring work (features, bug fixes, data
217
+ pipelines, security audits, migrations, and more), plus a shared delivery
218
+ phase that ends each of them.
219
+
220
+ **Prompts** — 7 for people (brainstorm, implement-feature, bug-fix,
221
+ quick-refinement, resolve-pr-comments, bootstrap-customizations, create-skill)
222
+ and 7 steps the convoy planner runs.
252
223
 
253
224
  **Quality gates** — a review pass after each step, panel review for high-stakes
254
225
  changes, plus your own lint, test, and build commands.
@@ -263,7 +234,8 @@ can reach and what they cost today. A pinned model name can only be wrong later.
263
234
 
264
235
  For work too long to sit and watch, the convoy engine runs tasks in dependency
265
236
  order across isolated git worktrees, with SQLite persistence so a crash resumes
266
- instead of restarting.
237
+ instead of restarting. This part is experimental and may change; the compiler
238
+ above does not depend on it.
267
239
 
268
240
  ```bash
269
241
  opencastle convoy "Add user reviews to the place detail page"
@@ -271,29 +243,22 @@ opencastle convoy # where did the last run get to?
271
243
  opencastle convoy resume # continue after an interruption
272
244
  ```
273
245
 
274
- It plans the work, executes it, and runs your gates. Inspired by Steve Yegge's
246
+ It plans the work, executes it on Claude Code, Copilot, Cursor, OpenCode or
247
+ Codex, and runs your gates. Inspired by Steve Yegge's
275
248
  [Gas Town](https://github.com/steveyegge/gastown).
276
249
 
277
- This part is experimental and may change. The compiler above does not depend on
278
- it.
279
-
280
250
  <br>
281
251
 
282
252
  ## Architecture
283
253
 
284
- See **[ARCHITECTURE.md](ARCHITECTURE.md)** for how the adapters, skill matrix,
285
- and convoy engine fit together.
254
+ See **[ARCHITECTURE.md](ARCHITECTURE.md)** for how the adapters, team sources,
255
+ skill matrix and convoy engine fit together.
286
256
 
287
257
  <br>
288
258
 
289
259
  ## Contributing
290
260
 
291
- 1. Fork the repo
292
- 2. Create a branch — `feat/your-feature` or `fix/your-fix`
293
- 3. Make changes and ensure `npm test` and `npx tsc --noEmit` pass
294
- 4. Open a PR
295
-
296
- See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
261
+ See **[CONTRIBUTING.md](CONTRIBUTING.md)**.
297
262
 
298
263
  <br>
299
264
 
package/bin/cli.mjs CHANGED
@@ -11,6 +11,16 @@ const pkgRoot = resolve(__dirname, '..')
11
11
 
12
12
  const [, , command, ...rawArgs] = process.argv
13
13
 
14
+ // A reader that stops early — `opencastle explain | head` — closes the pipe, and
15
+ // the next write raised EPIPE as an unhandled error: a stack trace after the
16
+ // lines that were wanted. Stop quietly instead, as `cat` and `git` do.
17
+ for (const stream of [process.stdout, process.stderr]) {
18
+ stream.on('error', (err) => {
19
+ if (err && err.code === 'EPIPE') process.exit(0)
20
+ throw err
21
+ })
22
+ }
23
+
14
24
  /**
15
25
  * `--flag=value` and `--flag value` are the same thing.
16
26
  *
@@ -192,7 +202,8 @@ const commands = { ...VISIBLE, ...HIDDEN }
192
202
  // belongs to it too — `opencastle --json` is documented in the help text, in
193
203
  // status's own help, and on the website, and used to answer "Unknown command".
194
204
  if (!command || command.startsWith('-')) {
195
- const bare = ['--json', '--help', '-h']
205
+ // `--debug` is global; alone it is the status command with stack traces on.
206
+ const bare = ['--json', '--help', '-h', '--debug']
196
207
  if (!command || bare.includes(command)) {
197
208
  if (command === '--help' || command === '-h') {
198
209
  console.log(HELP)
@@ -9,7 +9,6 @@
9
9
  * agents/*.agent.md -> .agents/agents/<name>.md
10
10
  * agent-workflows/*.md -> .agents/workflows/<name>.md
11
11
  * prompts/*.prompt.md -> .agents/prompts/<name>.md
12
- * customizations/ -> .agents/customizations/ (scaffolded once)
13
12
  * mcp.json -> .agents/mcp_config.json (mcpServers format)
14
13
  *
15
14
  * Note: Antigravity's MCP integration officially reads ~/.gemini/antigravity/mcp_config.json
@@ -1 +1 @@
1
- {"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../../src/cli/adapters/antigravity.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,MAAM,gBAAgB,CAAA;AAEnC,QAAA,MAAQ,OAAO,kOAAE,MAAM,kOAAE,eAAe,4CAAE,eAAe,2CASvD,CAAA;AAEF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA"}
1
+ {"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../../src/cli/adapters/antigravity.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,eAAO,MAAM,MAAM,gBAAgB,CAAA;AAEnC,QAAA,MAAQ,OAAO,kOAAE,MAAM,kOAAE,eAAe,4CAAE,eAAe,2CAWvD,CAAA;AAEF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA"}
@@ -10,7 +10,6 @@ import { createSingleFileAdapter } from './single-file-base.js';
10
10
  * agents/*.agent.md -> .agents/agents/<name>.md
11
11
  * agent-workflows/*.md -> .agents/workflows/<name>.md
12
12
  * prompts/*.prompt.md -> .agents/prompts/<name>.md
13
- * customizations/ -> .agents/customizations/ (scaffolded once)
14
13
  * mcp.json -> .agents/mcp_config.json (mcpServers format)
15
14
  *
16
15
  * Note: Antigravity's MCP integration officially reads ~/.gemini/antigravity/mcp_config.json
@@ -28,6 +27,8 @@ const { install, update, getManagedPaths, getDoctorChecks } = createSingleFileAd
28
27
  workflowsDir: 'workflows',
29
28
  workflowPrefix: '',
30
29
  frameworkDirs: ['agents', 'skills', 'prompts', 'workflows'],
30
+ // Antigravity reads AGENTS.md as well as GEMINI.md, cumulatively.
31
+ alsoReads: { rootFile: 'AGENTS.md', writtenBy: ['codex', 'opencode'] },
31
32
  });
32
33
  export { install, update, getManagedPaths, getDoctorChecks };
33
34
  //# sourceMappingURL=antigravity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../../src/cli/adapters/antigravity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAE/D;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAA;AAEnC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,GAAG,uBAAuB,CAAC;IACpF,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,SAAS;IACjB,aAAa,EAAE,yBAAyB;IACxC,SAAS,EAAE,aAAa;IACxB,UAAU,EAAE,SAAS;IACrB,YAAY,EAAE,WAAW;IACzB,cAAc,EAAE,EAAE;IAClB,aAAa,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC;CAC5D,CAAC,CAAA;AAEF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA"}
1
+ {"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../../src/cli/adapters/antigravity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAE/D;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAA;AAEnC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,GAAG,uBAAuB,CAAC;IACpF,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,SAAS;IACjB,aAAa,EAAE,yBAAyB;IACxC,SAAS,EAAE,aAAa;IACxB,UAAU,EAAE,SAAS;IACrB,YAAY,EAAE,WAAW;IACzB,cAAc,EAAE,EAAE;IAClB,aAAa,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC;IAC3D,kEAAkE;IAClE,SAAS,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE;CACvE,CAAC,CAAA;AAEF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA"}
@@ -7,15 +7,16 @@
7
7
  * skills/<name>/SKILL.md → .claude/skills/<name>/SKILL.md (+ sibling resources, frontmatter preserved)
8
8
  * agent-workflows/*.md → .claude/commands/oc/workflow-<name>.md (/oc:workflow-<name>)
9
9
  * prompts/*.prompt.md → .claude/commands/oc/<name>.md (/oc:<name>)
10
- * customizations/ → .claude/customizations/ (scaffolded once)
11
10
  *
12
11
  * Commands go under `oc/`, which Claude Code turns into the `oc:` namespace.
13
12
  * The rest of `.claude/commands/` belongs to whoever writes there; `sync` never
14
13
  * touches it, beyond removing what a release before the namespace left at the top.
15
14
  *
16
- * Note: Claude Code has no "agents" concept. Agent definitions are embedded
17
- * as reference sections within CLAUDE.md so Claude can adopt personas
18
- * when asked.
15
+ * agents/*.agent.md → .claude/agents/<name>.agent.md (subagents)
16
+ *
17
+ * Each command keeps one line of frontmatter, its description, which is what
18
+ * Claude Code lists beside it in the `/` menu. Each agent keeps a name and a
19
+ * description, which is what makes it a subagent Claude Code can delegate to.
19
20
  */
20
21
  export declare const IDE_ID = "claude-code";
21
22
  declare const install: (_pkgRoot: string, _projectRoot: string, _stack?: import("../types.js").StackConfig, _repoInfo?: import("../types.js").RepoInfo, _source?: import("../layers.js").CompileSource) => Promise<import("../types.js").CopyResults>, update: (_pkgRoot: string, _projectRoot: string, _stack?: import("../types.js").StackConfig, _repoInfo?: import("../types.js").RepoInfo, _source?: import("../layers.js").CompileSource) => Promise<import("../types.js").CopyResults>, getManagedPaths: () => import("../types.js").ManagedPaths, getDoctorChecks: () => import("../types.js").DoctorCheck[], getLegacyOutputs: ((_projectRoot: string) => string[]) & ((_projectRoot: string) => string[]);
@@ -1 +1 @@
1
- {"version":3,"file":"claude-code.d.ts","sourceRoot":"","sources":["../../../src/cli/adapters/claude-code.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,MAAM,gBAAgB,CAAA;AAEnC,QAAA,MAAQ,OAAO,kOAAE,MAAM,kOAAE,eAAe,4CAAE,eAAe,6CAAE,gBAAgB,6EAUzE,CAAA;AAEF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAA"}
1
+ {"version":3,"file":"claude-code.d.ts","sourceRoot":"","sources":["../../../src/cli/adapters/claude-code.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,eAAO,MAAM,MAAM,gBAAgB,CAAA;AAEnC,QAAA,MAAQ,OAAO,kOAAE,MAAM,kOAAE,eAAe,4CAAE,eAAe,6CAAE,gBAAgB,6EAYzE,CAAA;AAEF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAA"}
@@ -9,15 +9,16 @@ import { CLAUDE_COMMANDS_DIR, legacyClaudeCommands } from '../command-namespace.
9
9
  * skills/<name>/SKILL.md → .claude/skills/<name>/SKILL.md (+ sibling resources, frontmatter preserved)
10
10
  * agent-workflows/*.md → .claude/commands/oc/workflow-<name>.md (/oc:workflow-<name>)
11
11
  * prompts/*.prompt.md → .claude/commands/oc/<name>.md (/oc:<name>)
12
- * customizations/ → .claude/customizations/ (scaffolded once)
13
12
  *
14
13
  * Commands go under `oc/`, which Claude Code turns into the `oc:` namespace.
15
14
  * The rest of `.claude/commands/` belongs to whoever writes there; `sync` never
16
15
  * touches it, beyond removing what a release before the namespace left at the top.
17
16
  *
18
- * Note: Claude Code has no "agents" concept. Agent definitions are embedded
19
- * as reference sections within CLAUDE.md so Claude can adopt personas
20
- * when asked.
17
+ * agents/*.agent.md → .claude/agents/<name>.agent.md (subagents)
18
+ *
19
+ * Each command keeps one line of frontmatter, its description, which is what
20
+ * Claude Code lists beside it in the `/` menu. Each agent keeps a name and a
21
+ * description, which is what makes it a subagent Claude Code can delegate to.
21
22
  */
22
23
  export const IDE_ID = 'claude-code';
23
24
  const { install, update, getManagedPaths, getDoctorChecks, getLegacyOutputs } = createSingleFileAdapter({
@@ -30,6 +31,8 @@ const { install, update, getManagedPaths, getDoctorChecks, getLegacyOutputs } =
30
31
  workflowPrefix: 'workflow-',
31
32
  frameworkDirs: ['agents', 'skills', CLAUDE_COMMANDS_DIR],
32
33
  legacyOutputs: (projectRoot) => legacyClaudeCommands(projectRoot),
34
+ commandDescriptions: true,
35
+ agentFrontmatter: true,
33
36
  });
34
37
  export { install, update, getManagedPaths, getDoctorChecks, getLegacyOutputs };
35
38
  //# sourceMappingURL=claude-code.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude-code.js","sourceRoot":"","sources":["../../../src/cli/adapters/claude-code.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAEnF;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAA;AAEnC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EA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AAO,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../src/cli/adapters/cursor.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,MAAM,iCAAiB,CAAA;AACpC,eAAO,MAAM,SAAS,QAAoB,CAAA;AAC1C,eAAO,MAAQ,OAAO,6NAAE,MAAM,6NAAE,eAAe,4CAAE,eAAe,2CAAY,CAAA"}
1
+ {"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../src/cli/adapters/cursor.ts"],"names":[],"mappings":"AAiCA,eAAO,MAAM,MAAM,iCAAiB,CAAA;AACpC,eAAO,MAAM,SAAS,QAAoB,CAAA;AAC1C,eAAO,MAAQ,OAAO,6NAAE,MAAM,6NAAE,eAAe,4CAAE,eAAe,2CAAY,CAAA"}
@@ -1,9 +1,15 @@
1
1
  import { createRulesDirAdapter } from './rules-dir-base.js';
2
2
  /**
3
- * Cursor adapter — a rules-directory IDE writing `.mdc` files.
3
+ * Cursor adapter — a rules-directory IDE writing `.mdc` files, and skills as
4
+ * Agent Skills.
4
5
  *
5
6
  * Cursor expresses scoping with an `alwaysApply` boolean plus an optional
6
7
  * `globs` array; a rule with neither is matched on its description.
8
+ *
9
+ * Skills go to `.agents/skills/`, the cross-assistant location Cursor reads
10
+ * beside `.cursor/skills/` — so with Codex or Antigravity also selected, all
11
+ * three read one copy. Releases before this one flattened each skill into
12
+ * `.cursor/rules/skills/<name>.mdc`; `sync` removes those.
7
13
  */
8
14
  const adapter = createRulesDirAdapter({
9
15
  ideId: 'cursor',
@@ -11,6 +17,7 @@ const adapter = createRulesDirAdapter({
11
17
  rootRulesFile: '.cursorrules',
12
18
  configDir: '.cursor',
13
19
  ruleExt: '.mdc',
20
+ skillsDir: '.agents/skills',
14
21
  renderFrontmatter({ description, applyTo, alwaysApply, tier }) {
15
22
  const lines = [];
16
23
  if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@
1
1
  /**
2
2
  * OpenCode adapter.
3
3
  *
4
- * Generates AGENTS.md (root instructions) and .opencode/ structure.
4
+ * Generates AGENTS.md (root instructions), the cross-assistant skills
5
+ * directory, and .opencode/ structure.
5
6
  *
6
7
  * copilot-instructions.md → AGENTS.md (combined with instructions/)
7
- * skills/<name>/SKILL.md → .opencode/skills/<name>/SKILL.md (+ sibling resources, frontmatter preserved)
8
+ * skills/<name>/SKILL.md → .agents/skills/<name>/SKILL.md (+ sibling resources, frontmatter preserved)
8
9
  * agents/*.agent.md → .opencode/agents/<name>.md
9
10
  * agent-workflows/*.md → .opencode/workflows/<name>.md
10
11
  * prompts/*.prompt.md → .opencode/prompts/<name>.md
11
- * customizations/ → .opencode/customizations/ (scaffolded once)
12
12
  * mcp.json → opencode.json (OpenCode format: type local/remote)
13
+ *
14
+ * OpenCode reads skills from `.opencode/skills/`, `.claude/skills/` and
15
+ * `.agents/skills/`. Writing them to `.agents/skills/` shares one copy with
16
+ * Codex, Cursor, Windsurf and Antigravity; OpenCode keeps one copy of a name it
17
+ * finds twice, unpredictably, so every extra directory was a chance of a stale
18
+ * one winning. Releases before this one wrote `.opencode/skills/`; `sync`
19
+ * removes it.
13
20
  */
14
21
  export declare const IDE_ID = "opencode";
15
- declare const install: (_pkgRoot: string, _projectRoot: string, _stack?: import("../types.js").StackConfig, _repoInfo?: import("../types.js").RepoInfo, _source?: import("../layers.js").CompileSource) => Promise<import("../types.js").CopyResults>, update: (_pkgRoot: string, _projectRoot: string, _stack?: import("../types.js").StackConfig, _repoInfo?: import("../types.js").RepoInfo, _source?: import("../layers.js").CompileSource) => Promise<import("../types.js").CopyResults>, getManagedPaths: () => import("../types.js").ManagedPaths, getDoctorChecks: () => import("../types.js").DoctorCheck[];
16
- export { install, update, getManagedPaths, getDoctorChecks };
22
+ declare const install: (_pkgRoot: string, _projectRoot: string, _stack?: import("../types.js").StackConfig, _repoInfo?: import("../types.js").RepoInfo, _source?: import("../layers.js").CompileSource) => Promise<import("../types.js").CopyResults>, update: (_pkgRoot: string, _projectRoot: string, _stack?: import("../types.js").StackConfig, _repoInfo?: import("../types.js").RepoInfo, _source?: import("../layers.js").CompileSource) => Promise<import("../types.js").CopyResults>, getManagedPaths: () => import("../types.js").ManagedPaths, getDoctorChecks: () => import("../types.js").DoctorCheck[], getLegacyOutputs: ((_projectRoot: string) => string[]) & ((_projectRoot: string) => string[]);
23
+ export { install, update, getManagedPaths, getDoctorChecks, getLegacyOutputs };
17
24
  //# sourceMappingURL=opencode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../../src/cli/adapters/opencode.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,QAAA,MAAQ,OAAO,kOAAE,MAAM,kOAAE,eAAe,4CAAE,eAAe,2CASvD,CAAA;AAEF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA"}
1
+ {"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../../src/cli/adapters/opencode.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,eAAO,MAAM,MAAM,aAAa,CAAA;AAIhC,QAAA,MAAQ,OAAO,kOAAE,MAAM,kOAAE,eAAe,4CAAE,eAAe,6CAAE,gBAAgB,6EAWzE,CAAA;AAEF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAA"}
@@ -1,27 +1,39 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { resolve } from 'node:path';
1
3
  import { createSingleFileAdapter } from './single-file-base.js';
2
4
  /**
3
5
  * OpenCode adapter.
4
6
  *
5
- * Generates AGENTS.md (root instructions) and .opencode/ structure.
7
+ * Generates AGENTS.md (root instructions), the cross-assistant skills
8
+ * directory, and .opencode/ structure.
6
9
  *
7
10
  * copilot-instructions.md → AGENTS.md (combined with instructions/)
8
- * skills/<name>/SKILL.md → .opencode/skills/<name>/SKILL.md (+ sibling resources, frontmatter preserved)
11
+ * skills/<name>/SKILL.md → .agents/skills/<name>/SKILL.md (+ sibling resources, frontmatter preserved)
9
12
  * agents/*.agent.md → .opencode/agents/<name>.md
10
13
  * agent-workflows/*.md → .opencode/workflows/<name>.md
11
14
  * prompts/*.prompt.md → .opencode/prompts/<name>.md
12
- * customizations/ → .opencode/customizations/ (scaffolded once)
13
15
  * mcp.json → opencode.json (OpenCode format: type local/remote)
16
+ *
17
+ * OpenCode reads skills from `.opencode/skills/`, `.claude/skills/` and
18
+ * `.agents/skills/`. Writing them to `.agents/skills/` shares one copy with
19
+ * Codex, Cursor, Windsurf and Antigravity; OpenCode keeps one copy of a name it
20
+ * finds twice, unpredictably, so every extra directory was a chance of a stale
21
+ * one winning. Releases before this one wrote `.opencode/skills/`; `sync`
22
+ * removes it.
14
23
  */
15
24
  export const IDE_ID = 'opencode';
16
- const { install, update, getManagedPaths, getDoctorChecks } = createSingleFileAdapter({
25
+ const LEGACY_SKILLS = '.opencode/skills/';
26
+ const { install, update, getManagedPaths, getDoctorChecks, getLegacyOutputs } = createSingleFileAdapter({
17
27
  rootFile: 'AGENTS.md',
18
28
  dotDir: '.opencode',
29
+ skillsDir: '.agents/skills',
19
30
  mcpConfigPath: 'opencode.json',
20
31
  mcpFormat: 'opencode',
21
32
  promptsDir: 'prompts',
22
33
  workflowsDir: 'workflows',
23
34
  workflowPrefix: '',
24
35
  frameworkDirs: ['agents', 'skills', 'prompts', 'workflows'],
36
+ legacyOutputs: (projectRoot) => (existsSync(resolve(projectRoot, LEGACY_SKILLS)) ? [LEGACY_SKILLS] : []),
25
37
  });
26
- export { install, update, getManagedPaths, getDoctorChecks };
38
+ export { install, update, getManagedPaths, getDoctorChecks, getLegacyOutputs };
27
39
  //# sourceMappingURL=opencode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../../src/cli/adapters/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAE/D;;;;;;;;;;;;GAYG;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAA;AAEhC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,GAAG,uBAAuB,CAAC;IACpF,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,WAAW;IACnB,aAAa,EAAE,eAAe;IAC9B,SAAS,EAAE,UAAU;IACrB,UAAU,EAAE,SAAS;IACrB,YAAY,EAAE,WAAW;IACzB,cAAc,EAAE,EAAE;IAClB,aAAa,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC;CAC5D,CAAC,CAAA;AAEF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA"}
1
+ {"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../../src/cli/adapters/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAE/D;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAA;AAEhC,MAAM,aAAa,GAAG,mBAAmB,CAAA;AAEzC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,GAAG,uBAAuB,CAAC;IACtG,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,WAAW;IACnB,SAAS,EAAE,gBAAgB;IAC3B,aAAa,EAAE,eAAe;IAC9B,SAAS,EAAE,UAAU;IACrB,UAAU,EAAE,SAAS;IACrB,YAAY,EAAE,WAAW;IACzB,cAAc,EAAE,EAAE;IAClB,aAAa,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC;IAC3D,aAAa,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;CACzG,CAAC,CAAA;AAEF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAA"}
@@ -7,7 +7,7 @@ import type { CopyResults, DoctorCheck, IdeChoice, ManagedPaths, RepoInfo, Stack
7
7
  * copilot-instructions.md → <rootRulesFile>
8
8
  * instructions/*.md → <configDir>/rules/*<ruleExt> (always applies)
9
9
  * agents/*.agent.md → <configDir>/rules/agents/*<ruleExt>
10
- * skills/{star}/SKILL.md → <configDir>/rules/skills/*<ruleExt>
10
+ * skills/{star}/SKILL.md → <skillsDir>/<name>/SKILL.md, as Agent Skills
11
11
  * agent-workflows/*.md → <configDir>/rules/agent-workflows/*<ruleExt>
12
12
  * prompts/*.prompt.md → <configDir>/rules/prompts/*<ruleExt>
13
13
  *
@@ -41,6 +41,17 @@ export interface RulesDirConfig {
41
41
  ruleExt: string;
42
42
  /** Renders the YAML frontmatter lines (without the `---` fences). */
43
43
  renderFrontmatter(scope: RuleScope): string[];
44
+ /**
45
+ * Where the IDE reads Agent Skills, relative to the project root.
46
+ *
47
+ * Cursor and Windsurf both read `SKILL.md` folders natively now. Flattened
48
+ * into rules, as every release before this one did, a skill lost its scripts
49
+ * and assets, could not be invoked by name, and was matched on its
50
+ * description as a rule instead of loaded as a skill.
51
+ */
52
+ skillsDir: string;
53
+ /** The project MCP config, when it is not `<configDir>/mcp.json`. */
54
+ mcpConfigPath?: string;
44
55
  }
45
56
  export interface RulesDirAdapter {
46
57
  IDE_ID: IdeChoice;