opencastle 1.3.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 (112) hide show
  1. package/README.md +90 -125
  2. package/bin/cli.mjs +12 -1
  3. package/dist/cli/adapters/claude-code.d.ts +5 -3
  4. package/dist/cli/adapters/claude-code.d.ts.map +1 -1
  5. package/dist/cli/adapters/claude-code.js +7 -3
  6. package/dist/cli/adapters/claude-code.js.map +1 -1
  7. package/dist/cli/adapters/single-file-base.d.ts +18 -0
  8. package/dist/cli/adapters/single-file-base.d.ts.map +1 -1
  9. package/dist/cli/adapters/single-file-base.js +29 -4
  10. package/dist/cli/adapters/single-file-base.js.map +1 -1
  11. package/dist/cli/agent-plugin.test.js +12 -0
  12. package/dist/cli/agent-plugin.test.js.map +1 -1
  13. package/dist/cli/bootstrap.d.ts.map +1 -1
  14. package/dist/cli/bootstrap.js +20 -0
  15. package/dist/cli/bootstrap.js.map +1 -1
  16. package/dist/cli/ci.d.ts.map +1 -1
  17. package/dist/cli/ci.js +6 -4
  18. package/dist/cli/ci.js.map +1 -1
  19. package/dist/cli/command-namespace.test.js +33 -0
  20. package/dist/cli/command-namespace.test.js.map +1 -1
  21. package/dist/cli/convoy-cmd.d.ts.map +1 -1
  22. package/dist/cli/convoy-cmd.js +2 -1
  23. package/dist/cli/convoy-cmd.js.map +1 -1
  24. package/dist/cli/dispatcher.test.js +6 -0
  25. package/dist/cli/dispatcher.test.js.map +1 -1
  26. package/dist/cli/docs-accuracy.test.js +33 -8
  27. package/dist/cli/docs-accuracy.test.js.map +1 -1
  28. package/dist/cli/doctor.d.ts.map +1 -1
  29. package/dist/cli/doctor.js +9 -6
  30. package/dist/cli/doctor.js.map +1 -1
  31. package/dist/cli/init-own-files.test.d.ts +2 -0
  32. package/dist/cli/init-own-files.test.d.ts.map +1 -0
  33. package/dist/cli/init-own-files.test.js +133 -0
  34. package/dist/cli/init-own-files.test.js.map +1 -0
  35. package/dist/cli/init.d.ts.map +1 -1
  36. package/dist/cli/init.js +106 -7
  37. package/dist/cli/init.js.map +1 -1
  38. package/dist/cli/init.test.js +5 -4
  39. package/dist/cli/init.test.js.map +1 -1
  40. package/dist/cli/layers.d.ts.map +1 -1
  41. package/dist/cli/layers.js +13 -4
  42. package/dist/cli/layers.js.map +1 -1
  43. package/dist/cli/lesson.d.ts.map +1 -1
  44. package/dist/cli/lesson.js +6 -5
  45. package/dist/cli/lesson.js.map +1 -1
  46. package/dist/cli/prompt.d.ts.map +1 -1
  47. package/dist/cli/prompt.js +9 -7
  48. package/dist/cli/prompt.js.map +1 -1
  49. package/dist/cli/prompt.test.js +20 -2
  50. package/dist/cli/prompt.test.js.map +1 -1
  51. package/dist/cli/remove.d.ts.map +1 -1
  52. package/dist/cli/remove.js +3 -1
  53. package/dist/cli/remove.js.map +1 -1
  54. package/dist/cli/review.d.ts.map +1 -1
  55. package/dist/cli/review.js +7 -1
  56. package/dist/cli/review.js.map +1 -1
  57. package/dist/cli/sync-check.d.ts.map +1 -1
  58. package/dist/cli/sync-check.js +12 -3
  59. package/dist/cli/sync-check.js.map +1 -1
  60. package/dist/cli/sync.d.ts.map +1 -1
  61. package/dist/cli/sync.js +3 -2
  62. package/dist/cli/sync.js.map +1 -1
  63. package/dist/cli/update.d.ts.map +1 -1
  64. package/dist/cli/update.js +4 -3
  65. package/dist/cli/update.js.map +1 -1
  66. package/dist/cli/website-plugins.test.js +51 -2
  67. package/dist/cli/website-plugins.test.js.map +1 -1
  68. package/dist/orchestrator/plugins/coolify/config.d.ts.map +1 -1
  69. package/dist/orchestrator/plugins/coolify/config.js +13 -0
  70. package/dist/orchestrator/plugins/coolify/config.js.map +1 -1
  71. package/dist/orchestrator/plugins/sentry/config.d.ts.map +1 -1
  72. package/dist/orchestrator/plugins/sentry/config.js +13 -0
  73. package/dist/orchestrator/plugins/sentry/config.js.map +1 -1
  74. package/package.json +1 -1
  75. package/src/cli/adapters/claude-code.ts +7 -3
  76. package/src/cli/adapters/single-file-base.ts +47 -4
  77. package/src/cli/agent-plugin.test.ts +14 -0
  78. package/src/cli/bootstrap.ts +23 -0
  79. package/src/cli/ci.ts +6 -4
  80. package/src/cli/command-namespace.test.ts +35 -0
  81. package/src/cli/convoy/TELEMETRY.md +64 -62
  82. package/src/cli/convoy-cmd.ts +2 -1
  83. package/src/cli/dispatcher.test.ts +7 -0
  84. package/src/cli/docs-accuracy.test.ts +34 -7
  85. package/src/cli/doctor.ts +9 -6
  86. package/src/cli/init-own-files.test.ts +156 -0
  87. package/src/cli/init.test.ts +5 -4
  88. package/src/cli/init.ts +104 -7
  89. package/src/cli/layers.ts +13 -4
  90. package/src/cli/lesson.ts +6 -5
  91. package/src/cli/prompt.test.ts +21 -2
  92. package/src/cli/prompt.ts +11 -7
  93. package/src/cli/remove.ts +3 -0
  94. package/src/cli/review.ts +7 -1
  95. package/src/cli/sync-check.ts +12 -3
  96. package/src/cli/sync.ts +3 -2
  97. package/src/cli/update.ts +4 -3
  98. package/src/cli/website-plugins.test.ts +55 -5
  99. package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
  100. package/src/orchestrator/agents/team-lead.agent.md +2 -2
  101. package/src/orchestrator/customizations/README.md +58 -13
  102. package/src/orchestrator/customizations/logs/README.md +23 -18
  103. package/src/orchestrator/instructions/general.instructions.md +1 -1
  104. package/src/orchestrator/plugins/coolify/config.ts +13 -0
  105. package/src/orchestrator/plugins/sentry/config.ts +13 -0
  106. package/src/orchestrator/prompts/bootstrap-customizations.prompt.md +44 -49
  107. package/src/orchestrator/prompts/brainstorm.prompt.md +2 -2
  108. package/src/orchestrator/prompts/bug-fix.prompt.md +5 -4
  109. package/src/orchestrator/prompts/create-skill.prompt.md +29 -39
  110. package/src/orchestrator/prompts/generate-convoy.prompt.md +1 -1
  111. package/src/orchestrator/prompts/generate-prd.prompt.md +1 -1
  112. package/src/orchestrator/prompts/implement-feature.prompt.md +7 -6
@@ -23,39 +23,32 @@ Without customizations, agents operate blind — they don't know project's table
23
23
 
24
24
  ## Pre-Existing Setup
25
25
 
26
- ### `.opencastle.json` — Detection Data
26
+ ### `.opencastle/manifest.json` — Detection Data
27
27
 
28
- The project root contains **`.opencastle.json`** with a `repoInfo` field populated by `opencastle init`. It merges two sources:
28
+ `opencastle init` writes **`.opencastle/manifest.json`**. Two of its fields matter here:
29
29
 
30
- 1. **Auto-detected tooling** — init command scanned config files, `package.json` dependencies, and directory structures
31
- 2. **User-declared choices** — user selected CMS, database, project management, notifications via interactive questionnaire
30
+ 1. **`repoInfo`** — what init detected by scanning config files, `package.json` dependencies, and directory structures
31
+ 2. **`stack`** — the integrations installed: the ones init detected and the user confirmed, picked with `opencastle init --customize`, or added later with `opencastle add <pack>`
32
32
 
33
- Result: single unified view of project's tech stack:
33
+ Example:
34
34
 
35
35
  ```json
36
36
  {
37
+ "stack": {
38
+ "ides": ["vscode"],
39
+ "techTools": ["nextjs", "supabase", "vitest", "chrome-devtools"],
40
+ "teamTools": ["linear", "slack"]
41
+ },
37
42
  "repoInfo": {
38
43
  "packageManager": "pnpm",
39
- "monorepo": "nx",
40
44
  "language": "typescript",
41
- "frameworks": ["next", "astro"],
42
- "databases": ["prisma", "supabase"],
43
- "cms": ["sanity"],
45
+ "frameworks": ["next"],
46
+ "databases": ["supabase"],
44
47
  "deployment": ["vercel"],
45
- "testing": ["playwright", "vitest"],
46
- "cicd": ["github-actions"],
47
- "styling": ["css-modules", "tailwind"],
48
- "auth": ["next-auth", "supabase-auth"],
49
- "pm": ["linear"],
50
- "notifications": ["slack"],
48
+ "testing": ["vitest", "chrome-devtools"],
49
+ "styling": ["tailwind"],
51
50
  "mcpConfig": true,
52
- "configFiles": ["nx.json", "package.json", "tsconfig.json", "vercel.json"]
53
- },
54
- "stack": {
55
- "cms": "sanity",
56
- "db": "supabase",
57
- "pm": "linear",
58
- "notifications": "slack"
51
+ "configFiles": ["package.json", "tsconfig.json", "vercel.json", "vitest.config.ts"]
59
52
  }
60
53
  }
61
54
  ```
@@ -63,9 +56,8 @@ Result: single unified view of project's tech stack:
63
56
  **Use `repoInfo` to:**
64
57
  - Know which technologies are present — skip re-scanning, go straight to reading their config files
65
58
  - Identify `configFiles` to read for deep inspection
66
- - Know which `project/` config files to create if missing (e.g., if `repoInfo.pm` includes `"linear"`, ensure `project/linear-config.md` exists)
67
59
 
68
- **`stack` vs `repoInfo`:** The `stack` field holds the raw user questionnaire answers (used internally for MCP server filtering and skill selection). The `repoInfo` field is the combined view you should use — it includes everything from `stack` plus all auto-detected tooling.
60
+ **Use `stack` to:** know which integrations are installed. If `stack.teamTools` or `repoInfo.pm` names a tracker (`linear`, `jira`, `trello`), ensure `project/<tracker>-config.md` exists — init creates it only for a tracker it knew about at the time; one added later with `opencastle add` has none yet.
69
61
 
70
62
  **Still inspect:** `repoInfo` detects presence, not configuration details. You still need to read the actual config files for schemas, IDs, routes, etc.
71
63
 
@@ -82,15 +74,17 @@ Programmatic bootstrap running during `opencastle init` already created, partial
82
74
  | `stack/deployment-config.md` | Deployment platforms and config file paths | Env var names, cron jobs, security headers, caching strategy |
83
75
  | `stack/<provider>-config.md` | Database provider name and config file paths (e.g., `supabase-config.md`) | Table/schema inventory, RLS policies, auth integration details |
84
76
  | `stack/<provider>-config.md` | CMS provider name and config file paths (e.g., `sanity-config.md`) | Content model inventory, query patterns, project IDs |
77
+ | `stack/api-config.md` | Framework name and empty endpoint tables (only when init detected a framework) | Route handler and Server Action inventory |
78
+ | `project/<tracker>-config.md` | Template (only when init knew about the tracker) | Team IDs, workflow states, labels |
79
+ | `project/docs-structure.md` | The `.opencastle/` documentation files | The project's own docs directory |
80
+ | `agents/agent-registry.md`, `agents/skill-matrix.json`, `agents/skill-matrix.md` | Agent tiers and skill bindings for the installed integrations | Nothing in most projects — verify bindings |
85
81
  | `README.md`, `LESSONS-LEARNED.md`, `AGENT-FAILURES.md`, `AGENT-PERFORMANCE.md` | Full template content | Nothing — these are complete, just verify |
86
82
  | `logs/README.md`, `logs/events.ndjson` | Schema docs + empty log file | Nothing — these are complete |
87
83
 
88
- **Files that DON'T exist yet** (because they can't be auto-populated and must be created by you):
89
- - `stack/api-config.md` — requires reading actual route handlers and Server Actions
90
- - `project/linear-config.md` (or other tracker) — requires reading docs or team IDs
91
- - `project/docs-structure.md` — requires mapping the docs directory
92
- - `stack/data-pipeline-config.md` — requires reading pipeline scripts
93
- - `agents/agent-registry.md`, `agents/skill-matrix.json`, `agents/skill-matrix.md` — if `.github/agents/` and `.github/skills/` exist
84
+ **Files that may not exist yet** (create them only if the project needs them):
85
+ - `stack/api-config.md` — if the project has API routes or Server Actions but init detected no framework
86
+ - `project/<tracker>-config.md` — if a tracker is in use but has no config file (see `stack` above)
87
+ - `stack/data-pipeline-config.md` — init never creates it; requires reading pipeline scripts
94
88
 
95
89
  Any template file for technology NOT detected (no DB, no CMS, etc.) already removed.
96
90
 
@@ -105,7 +99,7 @@ Programmatic bootstrap already detected tech stack. **Skip re-scanning** — foc
105
99
  - **First**: Read all existing `.opencastle/` files to understand what's already filled in
106
100
  - Read `.opencastle/project.instructions.md` to see current tech stack table, gaps
107
101
  - Read each `stack/*.md` file — note any `<!-- TODO: verify -->` markers and empty table rows
108
- - Read `.opencastle.json` for `repoInfo` and `configFiles` — use `configFiles` as your reading list
102
+ - Read `.opencastle/manifest.json` for `repoInfo` and `configFiles` — use `configFiles` as your reading list
109
103
  - Note what's missing (empty sections, placeholders, TODO markers)
110
104
 
111
105
  #### 1.2 Deep Inspection
@@ -133,20 +127,20 @@ Target file structure for reference:
133
127
  ├── LESSONS-LEARNED.md # Already created — verify
134
128
  ├── AGENT-FAILURES.md # Already created — verify
135
129
  ├── AGENT-PERFORMANCE.md # Already created — verify
136
- ├── agents/ # Create if .github/agents/ and .github/skills/ exist
130
+ ├── agents/ # Already created — verify
137
131
  │ ├── agent-registry.md
138
132
  │ ├── skill-matrix.json
139
133
  │ └── skill-matrix.md
140
134
  ├── stack/ # Partial — update existing, create missing
141
- │ ├── api-config.md # Create — cannot be auto-populated
135
+ │ ├── api-config.md # Complete, or create if the project has API routes and it is missing
142
136
  │ ├── deployment-config.md # Already created — complete missing sections
143
137
  │ ├── testing-config.md # Already created — complete missing sections
144
138
  │ ├── <database>-config.md # Already created — complete schema/RLS details
145
139
  │ ├── <cms>-config.md # Already created — complete content model details
146
140
  │ └── data-pipeline-config.md # Create if pipelines exist
147
- ├── project/ # Create files that don't yet exist
148
- │ ├── docs-structure.md # Create if docs directory exists
149
- │ └── <tracker>-config.md # Create if task tracker configured
141
+ ├── project/ # Partial — update existing, create missing
142
+ │ ├── docs-structure.md # Already created — add the docs directory if one exists
143
+ │ └── <tracker>-config.md # Complete, or create if a tracker is in use and it is missing
150
144
  └── logs/ # Already created — do not touch
151
145
  ├── README.md
152
146
  └── events.ndjson
@@ -164,21 +158,22 @@ Target file structure for reference:
164
158
 
165
159
  3. **`LESSONS-LEARNED.md`**, **`AGENT-FAILURES.md`**, **`AGENT-PERFORMANCE.md`** — Already exist as templates. Verify they look correct — no changes needed.
166
160
 
167
- #### `agents/` — Agent Framework Config (create if `.github/agents/` exists)
161
+ #### `agents/` — Agent Framework Config (already created — verify)
162
+
163
+ `npx opencastle explain` lists the agents and skills compiled for this project, and where each assistant reads them.
168
164
 
169
- 4. **`agents/agent-registry.md`** — If `.github/agents/` exists with agent definitions:
170
- - List of agents with assigned model tiers
171
- - Scope descriptions
172
- - File partition examples
165
+ 4. **`agents/agent-registry.md`** — Already lists the agents with their tiers. **Complete**:
166
+ - Scope descriptions for this project
167
+ - File partition examples using this project's real paths
173
168
 
174
- 5. **`agents/skill-matrix.json`** — If `.github/skills/` exists with skill definitions:
175
- - Capability slot bindings and `directSkills` per agent role (in JSON format)
176
- - Which agents load which skills (slots for plugin skills, directSkills for process skills)
169
+ 5. **`agents/skill-matrix.json`** — Already holds capability slot bindings and `directSkills` per agent. **Verify**:
170
+ - Slot bindings point at skills that exist (`npx opencastle doctor` reports unresolved slots)
171
+ - Which agents load which skills (slots for integration skills, `directSkills` for process skills)
177
172
  - Note: `skill-matrix.md` is companion documentation file — JSON is source of truth
178
173
 
179
174
  #### `stack/` — Update Existing, Create Missing
180
175
 
181
- 6. **`stack/api-config.md`** — **Create** (cannot be auto-populated). If the project has API routes or Server Actions:
176
+ 6. **`stack/api-config.md`** — **Complete** it, or **create** it if the project has API routes or Server Actions and init did not:
182
177
  - Route handler inventory with HTTP methods
183
178
  - Server Actions inventory
184
179
  - External API integrations
@@ -223,12 +218,12 @@ Target file structure for reference:
223
218
 
224
219
  #### `project/` — Project Management Config (create missing files)
225
220
 
226
- 12. **`project/docs-structure.md`** — **Create** if a documentation directory exists:
221
+ 12. **`project/docs-structure.md`** — Already exists. **Complete** if the project has its own documentation directory:
227
222
  - Full directory tree
228
223
  - Purpose of each document
229
224
  - Documentation conventions
230
225
 
231
- 13. **Task tracker config** in `project/` (e.g., `project/linear-config.md`, `project/jira-config.md`) — **Create** if task tracking is configured:
226
+ 13. **Task tracker config** in `project/` (e.g., `project/linear-config.md`, `project/jira-config.md`) — **Complete** it, or **create** it if task tracking is in use and it is missing:
232
227
  - Team / project IDs
233
228
  - Workflow state IDs
234
229
  - Label / category IDs
@@ -242,7 +237,7 @@ Target file structure for reference:
242
237
 
243
238
  After generating all files:
244
239
 
245
- 1. **Check skill references** — For each skill in `.github/skills/`, verify it references the correct customization file (or note if a reference needs to be added)
240
+ 1. **Check skill references** — For each skill `npx opencastle explain` lists, verify it references the correct customization file (or note if a reference needs to be added)
246
241
  2. **Check for gaps** — Is there project-specific knowledge that doesn't fit any file? Create an appropriate new file
247
242
  3. **Check for staleness** — Does the generated content match the current state of the code? Flag anything uncertain with `<!-- TODO: verify -->`
248
243
 
@@ -265,7 +260,7 @@ Now that your `.opencastle/` configuration is complete, here's what you can do:
265
260
  2. **Implement a feature** — Use the **"Implement Feature"** prompt (`/oc:implement-feature` in Claude Code and Copilot) to have the Team Lead orchestrate a full feature build with task tracking, delegation, and verification
266
261
  3. **Fix a bug** — Use the **"Bug Fix"** prompt (`/oc:bug-fix`) for structured triage, root cause analysis, and fix with tracker tracking
267
262
  4. **Brainstorm first** — Not sure how to approach something? Use the **"Brainstorm"** prompt (`/oc:brainstorm`) to explore requirements and trade-offs before committing to a plan
268
- 5. **Generate a convoy spec** — Use the **"Generate Convoy"** prompt (`/oc:generate-convoy`) to create a `.convoy.yml` spec for autonomous convoy execution with `npx opencastle convoy run --file <spec>` CLI command.
263
+ 5. **Plan a larger change with the convoy engine (experimental)** — `npx opencastle convoy "<task>"` writes a PRD and a convoy spec to `.opencastle/convoys/<name>.convoy.yml`, then asks before running it
269
264
 
270
265
  ## Guidelines
271
266
 
@@ -126,12 +126,12 @@ Not every task needs brainstorm. Skip this prompt; go directly to `implement-fea
126
126
  - The task is a simple config change or docs update
127
127
  - Technical approach is obvious and unambiguous
128
128
  - The scope is a single file or component with no design decisions
129
- - The task is well-understood and can be expressed as a convoy spec directly → use `generate-convoy` instead
129
+ - The task is well-understood and can be expressed as a convoy spec directly → use `implement-feature`, which writes the spec
130
130
 
131
131
  ## After Brainstorming
132
132
 
133
133
  Once the brainstorm is complete and the user confirms (or you're confident in the approach):
134
134
 
135
- 1. **Transition to planning** — use the brainstorm report as input for `implement-feature` (which will choose between direct delegation and convoy execution based on task count)
135
+ 1. **Transition to planning** — use the brainstorm report as input for `implement-feature`, which writes a convoy spec for all project work, whatever its size, for the user to run with `npx opencastle convoy run -f .opencastle/convoys/<name>.convoy.yml` (the convoy engine is experimental)
136
136
  2. **Preserve context** — include the brainstorm report in delegation prompts so agents understand *why* an approach was chosen
137
137
  3. **Reference in tracker** — link the brainstorm findings in the tracker issue description
@@ -56,11 +56,12 @@ Every bug gets tracked. Create tracker issue with:
56
56
 
57
57
  ### 4. Implement the Fix
58
58
 
59
- All bug fixes execute via convoy engine — even single-task fixes — for observability, crash recovery.
59
+ All bug fixes execute via OpenCastle's convoy engine — even single-task fixes — for observability, crash recovery. The convoy engine is experimental; say so when you hand the spec over.
60
60
 
61
- 1. **Generate a convoy spec** — use the `generate-convoy` prompt with the root cause analysis, fix approach, and file paths as context.
62
- 2. **Hand the spec to the user** — tell them to run: `npx opencastle convoy run -f .opencastle/convoys/<name>.convoy.yml`
63
- 3. **After convoy completes** — proceed to Step 5 (validation).
61
+ 1. **Write the convoy spec** — plan the fix by the rules in the `generate-convoy` prompt, with the root cause analysis, fix approach, and file paths as context. 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. Use plain file paths (no `*` or `?`).
62
+ 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.
63
+ 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).
64
+ 4. **After convoy completes** — proceed to Step 5 (validation).
64
65
 
65
66
  #### Convoy Task Prompt Must Include
66
67
 
@@ -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