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
@@ -15,42 +15,42 @@ Scaffold new skill for AI agent configuration. Skills encode domain-specific kno
15
15
 
16
16
  ---
17
17
 
18
- ## Skill Types
18
+ ## Where Team Skills Live
19
19
 
20
- OpenCastle has two skill kinds with different locations, registration paths:
20
+ A skill you create is a team skill: one source file, compiled for every assistant in the project.
21
21
 
22
- | Type | Location | Bound Via | Purpose |
23
- |------|----------|-----------|---------|
24
- | **Process skill** | `skills/<name>/SKILL.md` | `directSkills` in skill-matrix.json | Stack-agnostic methodology (testing workflow, self-improvement, validation gates) |
25
- | **Plugin skill** | `plugins/<plugin>/SKILL.md` | Capability slot in the skill matrix | Technology-specific knowledge (CMS queries, database patterns, deployment config) |
22
+ | What | Where |
23
+ |------|-------|
24
+ | **The skill** | `.opencastle/skills/<name>/SKILL.md`, plus any companion files (e.g. `REFERENCE.md`) beside it |
25
+ | **Compiled copies** | Written by `npx opencastle sync` into each assistant's skill directory, and listed in each assistant's skill index — never edit them; the next sync replaces them |
26
26
 
27
- > **Rule of thumb:** If skill would need rewriting when switching technologies (e.g., Supabase → Convex), it belongs in a **plugin**. If useful regardless of stack, it's a **process skill**.
27
+ Agents load a skill when a task matches its `description`, so the description is what makes it found.
28
+
29
+ > **Rule of thumb:** If skill would need rewriting when switching technologies (e.g., Supabase → Convex), it is **technology-specific**: name the technology in its name and description. If useful regardless of stack, it is a **process skill**: keep it stack-agnostic.
28
30
 
29
31
  ---
30
32
 
31
33
  ## Workflow
32
34
 
33
- ### Step 1: Classify the Skill
34
-
35
- Determine the type:
35
+ ### Step 1: Check What Exists
36
36
 
37
- | Question | If Yes → | If No → |
38
- |----------|----------|---------|
39
- | Is this tied to a specific technology/tool? | Plugin skill | Process skill |
40
- | Would switching tech stacks invalidate this content? | Plugin skill | Process skill |
41
- | Does a plugin already exist for this tool in `plugins/`? | Add `SKILL.md` to existing plugin | Create new plugin or process skill |
37
+ | Question | If Yes → |
38
+ |----------|----------|
39
+ | Does a compiled skill already cover this? (`npx opencastle explain` lists every skill) | Improve it instead of adding a second one. A team skill with the same name as one of OpenCastle's replaces it for every assistant — copy the compiled `SKILL.md` into `.opencastle/skills/<name>/` and edit it there |
40
+ | Is it about a tool OpenCastle has an integration for? (`npx opencastle add --list`) | `npx opencastle add <pack>` installs that integration's skill; write a team skill only for what it lacks |
41
+ | Is it tied to a specific technology? | Technology-specific skill |
42
+ | Would switching tech stacks invalidate this content? | Technology-specific skill |
42
43
 
43
44
  ### Step 2: Name the Skill
44
45
 
45
- - Use `kebab-case`
46
- - **Process skills:** descriptive domain name (e.g., `testing-workflow`, `context-map`, `security-hardening`)
47
- - **Plugin skills:** `skillName` field in the plugin's `config.ts` (e.g., `sanity-cms`, `supabase-database`, `nx-workspace`)
48
- - Check existing skills in `skills/`, `plugins/` to avoid overlap
46
+ - Use `kebab-case`; the directory name is the skill's name
47
+ - **Process skills:** descriptive domain name (e.g., `deploy-runbook`, `release-checklist`, `incident-triage`)
48
+ - **Technology-specific skills:** lead with the technology (e.g., `supabase-rls`, `stripe-webhooks`)
49
+ - Check `.opencastle/skills/` and `npx opencastle explain` to avoid overlap
49
50
 
50
51
  ### Step 3: Create the Skill File
51
52
 
52
- **Process skill:** Create `skills/<skill-name>/SKILL.md`
53
- **Plugin skill:** Create `plugins/<plugin-name>/SKILL.md`
53
+ Create `.opencastle/skills/<skill-name>/SKILL.md`.
54
54
 
55
55
  Use this template:
56
56
 
@@ -98,31 +98,21 @@ description: "<Verb1> X, <verb2> Y, and <verb3> Z. Use when <scenario1>, <scenar
98
98
 
99
99
  If skill has large code examples (>30 lines), schema tables, or verbose reference material, create companion `REFERENCE.md` in same directory; link to it from SKILL.md. Keep SKILL.md as lean operational overview. Companion files must start with backlink: `> Parent: [SKILL.md](./SKILL.md)`.
100
100
 
101
- ### Step 4: Register the Skill
102
-
103
- Registration differs by type:
104
-
105
- #### Process Skill
106
-
107
- 1. **Add to skill matrix** — Add skill name to `directSkills` array of each relevant agent in `.opencastle/agents/skill-matrix.json`
108
- 2. **Optional: reference in instructions** — If skill should load by default, add to appropriate `.github/instructions/` file
109
-
110
- #### Plugin Skill
101
+ ### Step 4: Compile the Skill
111
102
 
112
- 1. **Set `skillName` in plugin's `config.ts`** — Connects skill to plugin
113
- 2. **Update skill matrix** — Add entry to matching capability slot's `entries` array in `.opencastle/agents/skill-matrix.json`
114
- 3. **No agent changes** — Agents resolve plugin skills through capability slots automatically
103
+ 1. **Run `npx opencastle sync`** — compiles the skill for every assistant in the project and adds it to each skill index. It reports `Compiled this project's own sources`.
104
+ 2. **Optional: load it by default** — to have an agent load the skill for every task rather than when a task matches it, add the skill name to that agent's `directSkills` array in `.opencastle/agents/skill-matrix.json` (agents are keyed by display name, e.g. `"Developer"`). Sync keeps this edit.
105
+ 3. **Commit** `.opencastle/skills/<skill-name>/` with the compiled files, so teammates get the skill on clone.
115
106
 
116
107
  ### Step 5: Validate
117
108
 
118
- - [ ] File created at correct path (`skills/` or `plugins/`)
119
- - [ ] Frontmatter has `name` and `description` fields
109
+ - [ ] File created at `.opencastle/skills/<skill-name>/SKILL.md`
110
+ - [ ] Frontmatter has `name` and `description` fields; `name` equals the directory name
120
111
  - [ ] Description is single line (no line breaks)
121
112
  - [ ] Content follows template structure
122
113
  - [ ] No overlap with existing skills
123
- - [ ] Skill matrix updated (`directSkills` array or capability slot binding)
124
- - [ ] For process skills: at least one agent's `directSkills` array includes it in skill-matrix.json
125
- - [ ] For plugin skills: `config.ts` `skillName` matches `name` in frontmatter
114
+ - [ ] `npx opencastle sync --check` passes — the compiled copies match the source
115
+ - [ ] `npx opencastle doctor` passes — it checks that every script and path a team skill names exists
126
116
  - [ ] Run `npx tessl skill review <path>` — target 100 score (see Scoring Criteria below)
127
117
 
128
118
  ## Scoring Criteria
@@ -8,7 +8,7 @@ output: json
8
8
 
9
9
  # Generate Task Plan
10
10
 
11
- You are the Team Lead. User wants to run `opencastle convoy run --file <spec>` to execute batch of tasks autonomously via convoy engine. Your job: produce JSON task plan. CLI will convert it to valid convoy spec — **you do not need to know YAML syntax**. Derive short, descriptive, kebab-case filename from user's goal (2–4 words max), e.g. `auth-refactor` or `add-search`.
11
+ You are the Team Lead. User wants to execute batch of tasks autonomously via OpenCastle's convoy engine (experimental). Your job: produce JSON task plan. `opencastle convoy` runs this step, converts your JSON into a convoy spec and writes it to `.opencastle/convoys/<name>.convoy.yml` — **you do not need to know YAML syntax**. Outside chain mode (below), the file is named after your `name`, kebab-cased, so keep `name` short and descriptive (2–4 words), e.g. `Auth refactor` → `auth-refactor.convoy.yml`.
12
12
 
13
13
  > **⚠️ OUTPUT FORMAT: Your entire response must be a single ` ```json ` fenced code block. Do NOT output any text, explanations, summaries, or DAG diagrams before or after the JSON block. The parser only reads the ` ```json ` fence — everything else causes a failure.**
14
14
 
@@ -135,7 +135,7 @@ Phase 3 — Verification (depends on Phase 2):
135
135
  ## Success Criteria
136
136
 
137
137
  Measurable, binary checks confirming feature is shippable:
138
- - [ ] All acceptance criteria in User Stories All acceptance criteria in User Stories & Acceptance Criteria pass Acceptance Criteria pass
138
+ - [ ] All acceptance criteria in User Stories & Acceptance Criteria pass
139
139
  - [ ] TypeScript compiles with zero errors
140
140
  - [ ] Lint passes with zero warnings
141
141
  - [ ] Unit test coverage ≥ 95% on all new/changed files
@@ -37,14 +37,15 @@ Every subtask must be tracked. **No issue = no implementation.** This step produ
37
37
  5. **Link to roadmap** — Reference the roadmap section in the issue description so context is never lost
38
38
  6. **Verify issues exist** — List all created issue IDs. If count is 0, do NOT proceed to Step 2.5
39
39
 
40
- ### 2.5 Generate Convoy Spec (BLOCKING — decides how Step 3 proceeds)
40
+ ### 2.5 Write the Convoy Spec (BLOCKING — decides how Step 3 proceeds)
41
41
 
42
- All project-related work executes via the convoy engine — regardless of subtask count.
42
+ All project-related work executes via OpenCastle's convoy engine — regardless of subtask count. The convoy engine is experimental; say so when you hand the spec over.
43
43
 
44
- 1. **Generate the spec** — use the `generate-convoy` prompt with the decomposed task list. The spec IS the implementation plan; even single-task fixes go through convoy for observability.
45
- 2. **Hand the spec to the user** — tell them to run: `npx opencastle convoy run -f .opencastle/convoys/<name>.convoy.yml`
46
- 3. **The convoy engine handles** isolated git worktrees, parallel execution, merge queue ordering, crash recovery, and structured logging automatically.
47
- 4. **After convoy completes** — proceed to Step 4 (validation) and Step 5 (delivery/PR).
44
+ 1. **Write the spec** — plan the decomposed task list by the rules in the `generate-convoy` prompt: self-contained task prompts, plain file paths (no `*` or `?`), no two tasks in the same phase sharing a path, `depends_on` for ordering. That prompt returns JSON, which the CLI converts only when `npx opencastle convoy "<task>"` runs it; here, write the spec yourself as YAML to `.opencastle/convoys/<name>.convoy.yml`, with `version: 1` and the same fields. The spec IS the implementation plan; even single-task fixes go through convoy for observability.
45
+ 2. **Check the spec** — run `npx opencastle convoy run -f .opencastle/convoys/<name>.convoy.yml --dry-run`. It parses the spec and prints the execution plan without starting an agent. It does not check file paths, so check the rule above yourself: the engine refuses glob paths and overlapping paths when the run starts.
46
+ 3. **Hand the spec to the user** — tell them the convoy engine is experimental, and to run: `npx opencastle convoy run -f .opencastle/convoys/<name>.convoy.yml`. It runs each task in a git worktree made from the last commit, so the work it builds on must be committed; it also needs a signed-in agent runtime (Copilot, Claude Code, Cursor, OpenCode or Codex; `--adapter <name>` picks one).
47
+ 4. **The convoy engine handles** isolated git worktrees, parallel execution, merge queue ordering, crash recovery, and structured logging automatically.
48
+ 5. **After convoy completes** — proceed to Step 4 (validation) and Step 5 (delivery/PR).
48
49
 
49
50
  ### 3. Implementation Rules
50
51