opencastle 1.4.3 → 1.6.0

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 (235) hide show
  1. package/dist/cli/adapters/claude-code.d.ts.map +1 -1
  2. package/dist/cli/adapters/claude-code.js +1 -0
  3. package/dist/cli/adapters/claude-code.js.map +1 -1
  4. package/dist/cli/adapters/single-file-base.d.ts +8 -0
  5. package/dist/cli/adapters/single-file-base.d.ts.map +1 -1
  6. package/dist/cli/adapters/single-file-base.js +48 -22
  7. package/dist/cli/adapters/single-file-base.js.map +1 -1
  8. package/dist/cli/bootstrap-on-init.test.js +16 -5
  9. package/dist/cli/bootstrap-on-init.test.js.map +1 -1
  10. package/dist/cli/bootstrap.d.ts +17 -0
  11. package/dist/cli/bootstrap.d.ts.map +1 -1
  12. package/dist/cli/bootstrap.js +284 -312
  13. package/dist/cli/bootstrap.js.map +1 -1
  14. package/dist/cli/bootstrap.test.js +22 -16
  15. package/dist/cli/bootstrap.test.js.map +1 -1
  16. package/dist/cli/command-namespace.test.js +17 -0
  17. package/dist/cli/command-namespace.test.js.map +1 -1
  18. package/dist/cli/convoy/engine.d.ts +12 -0
  19. package/dist/cli/convoy/engine.d.ts.map +1 -1
  20. package/dist/cli/convoy/engine.git.test.js +55 -0
  21. package/dist/cli/convoy/engine.git.test.js.map +1 -1
  22. package/dist/cli/convoy/engine.js +47 -3
  23. package/dist/cli/convoy/engine.js.map +1 -1
  24. package/dist/cli/convoy/findings.d.ts +35 -0
  25. package/dist/cli/convoy/findings.d.ts.map +1 -0
  26. package/dist/cli/convoy/findings.js +100 -0
  27. package/dist/cli/convoy/findings.js.map +1 -0
  28. package/dist/cli/convoy/findings.test.d.ts +2 -0
  29. package/dist/cli/convoy/findings.test.d.ts.map +1 -0
  30. package/dist/cli/convoy/findings.test.js +75 -0
  31. package/dist/cli/convoy/findings.test.js.map +1 -0
  32. package/dist/cli/convoy/isolation.d.ts.map +1 -1
  33. package/dist/cli/convoy/isolation.js +2 -1
  34. package/dist/cli/convoy/isolation.js.map +1 -1
  35. package/dist/cli/convoy/worktree.d.ts +5 -0
  36. package/dist/cli/convoy/worktree.d.ts.map +1 -1
  37. package/dist/cli/convoy/worktree.js +12 -0
  38. package/dist/cli/convoy/worktree.js.map +1 -1
  39. package/dist/cli/detect.d.ts +4 -0
  40. package/dist/cli/detect.d.ts.map +1 -1
  41. package/dist/cli/detect.js +1 -1
  42. package/dist/cli/detect.js.map +1 -1
  43. package/dist/cli/docs-accuracy.test.js +34 -0
  44. package/dist/cli/docs-accuracy.test.js.map +1 -1
  45. package/dist/cli/doctor.d.ts +11 -0
  46. package/dist/cli/doctor.d.ts.map +1 -1
  47. package/dist/cli/doctor.js +74 -10
  48. package/dist/cli/doctor.js.map +1 -1
  49. package/dist/cli/doctor.test.js +82 -1
  50. package/dist/cli/doctor.test.js.map +1 -1
  51. package/dist/cli/init.d.ts.map +1 -1
  52. package/dist/cli/init.js +58 -53
  53. package/dist/cli/init.js.map +1 -1
  54. package/dist/cli/init.test.js +32 -28
  55. package/dist/cli/init.test.js.map +1 -1
  56. package/dist/cli/layers.d.ts +20 -0
  57. package/dist/cli/layers.d.ts.map +1 -1
  58. package/dist/cli/layers.js +53 -1
  59. package/dist/cli/layers.js.map +1 -1
  60. package/dist/cli/layers.test.js +67 -1
  61. package/dist/cli/layers.test.js.map +1 -1
  62. package/dist/cli/lessons.d.ts +10 -0
  63. package/dist/cli/lessons.d.ts.map +1 -1
  64. package/dist/cli/lessons.js +26 -1
  65. package/dist/cli/lessons.js.map +1 -1
  66. package/dist/cli/lessons.test.js +38 -1
  67. package/dist/cli/lessons.test.js.map +1 -1
  68. package/dist/cli/log.d.ts +2 -2
  69. package/dist/cli/log.d.ts.map +1 -1
  70. package/dist/cli/log.js +1 -1
  71. package/dist/cli/log.js.map +1 -1
  72. package/dist/cli/log.test.js +1 -1
  73. package/dist/cli/log.test.js.map +1 -1
  74. package/dist/cli/managed-paths.d.ts +1 -1
  75. package/dist/cli/managed-paths.d.ts.map +1 -1
  76. package/dist/cli/managed-paths.js +0 -1
  77. package/dist/cli/managed-paths.js.map +1 -1
  78. package/dist/cli/plan.test.js +10 -8
  79. package/dist/cli/plan.test.js.map +1 -1
  80. package/dist/cli/project-facts.d.ts +103 -0
  81. package/dist/cli/project-facts.d.ts.map +1 -0
  82. package/dist/cli/project-facts.js +577 -0
  83. package/dist/cli/project-facts.js.map +1 -0
  84. package/dist/cli/project-facts.test.d.ts +2 -0
  85. package/dist/cli/project-facts.test.d.ts.map +1 -0
  86. package/dist/cli/project-facts.test.js +209 -0
  87. package/dist/cli/project-facts.test.js.map +1 -0
  88. package/dist/cli/stack-config.js +1 -1
  89. package/dist/cli/stack-config.js.map +1 -1
  90. package/dist/cli/sync-check.test.js +14 -2
  91. package/dist/cli/sync-check.test.js.map +1 -1
  92. package/dist/orchestrator/plugins/notion/config.d.ts.map +1 -1
  93. package/dist/orchestrator/plugins/notion/config.js +21 -17
  94. package/dist/orchestrator/plugins/notion/config.js.map +1 -1
  95. package/package.json +1 -1
  96. package/src/cli/adapters/claude-code.ts +1 -0
  97. package/src/cli/adapters/single-file-base.ts +63 -31
  98. package/src/cli/bootstrap-on-init.test.ts +17 -5
  99. package/src/cli/bootstrap.test.ts +22 -16
  100. package/src/cli/bootstrap.ts +361 -373
  101. package/src/cli/command-namespace.test.ts +17 -0
  102. package/src/cli/convoy/engine.git.test.ts +59 -0
  103. package/src/cli/convoy/engine.ts +53 -2
  104. package/src/cli/convoy/findings.test.ts +86 -0
  105. package/src/cli/convoy/findings.ts +129 -0
  106. package/src/cli/convoy/isolation.ts +2 -1
  107. package/src/cli/convoy/worktree.ts +12 -0
  108. package/src/cli/detect.ts +1 -1
  109. package/src/cli/docs-accuracy.test.ts +42 -0
  110. package/src/cli/doctor.test.ts +101 -1
  111. package/src/cli/doctor.ts +77 -11
  112. package/src/cli/init.test.ts +31 -27
  113. package/src/cli/init.ts +62 -57
  114. package/src/cli/layers.test.ts +72 -1
  115. package/src/cli/layers.ts +52 -1
  116. package/src/cli/lessons.test.ts +48 -0
  117. package/src/cli/lessons.ts +27 -1
  118. package/src/cli/log.test.ts +1 -1
  119. package/src/cli/log.ts +2 -2
  120. package/src/cli/managed-paths.ts +0 -1
  121. package/src/cli/plan.test.ts +10 -8
  122. package/src/cli/project-facts.test.ts +228 -0
  123. package/src/cli/project-facts.ts +647 -0
  124. package/src/cli/stack-config.ts +1 -1
  125. package/src/cli/sync-check.test.ts +16 -2
  126. package/src/orchestrator/agent-workflows/data-pipeline.md +2 -2
  127. package/src/orchestrator/agent-workflows/feature-implementation.md +2 -2
  128. package/src/orchestrator/agent-workflows/schema-changes.md +1 -1
  129. package/src/orchestrator/agents/team-lead.agent.md +6 -6
  130. package/src/orchestrator/agents/testing-expert.agent.md +2 -2
  131. package/src/orchestrator/customizations/LESSONS-LEARNED.md +1 -1
  132. package/src/orchestrator/customizations/README.md +27 -84
  133. package/src/orchestrator/instructions/ai-optimization.instructions.md +6 -23
  134. package/src/orchestrator/instructions/general.instructions.md +22 -95
  135. package/src/orchestrator/plugins/astro/skills/astro-framework/SKILL.md +1 -3
  136. package/src/orchestrator/plugins/chrome-devtools/skills/browser-testing/SKILL.md +3 -5
  137. package/src/orchestrator/plugins/cloudflare/skills/cloudflare-platform/SKILL.md +2 -2
  138. package/src/orchestrator/plugins/contentful/skills/contentful-cms/SKILL.md +1 -1
  139. package/src/orchestrator/plugins/convex/skills/convex-database/SKILL.md +1 -3
  140. package/src/orchestrator/plugins/coolify/skills/coolify-deployment/SKILL.md +1 -1
  141. package/src/orchestrator/plugins/cypress/skills/cypress-testing/SKILL.md +1 -1
  142. package/src/orchestrator/plugins/drizzle/skills/drizzle-orm/SKILL.md +1 -1
  143. package/src/orchestrator/plugins/expo/skills/expo-development/SKILL.md +2 -2
  144. package/src/orchestrator/plugins/figma/skills/figma-design/SKILL.md +1 -3
  145. package/src/orchestrator/plugins/hetzner/skills/hetzner-cloud/SKILL.md +1 -1
  146. package/src/orchestrator/plugins/jira/skills/jira-management/SKILL.md +1 -3
  147. package/src/orchestrator/plugins/linear/skills/linear-task-management/SKILL.md +1 -3
  148. package/src/orchestrator/plugins/netlify/skills/netlify-deployment/SKILL.md +2 -2
  149. package/src/orchestrator/plugins/nextjs/skills/nextjs-framework/SKILL.md +13 -6
  150. package/src/orchestrator/plugins/notion/config.ts +21 -17
  151. package/src/orchestrator/plugins/notion/skills/notion-knowledge-management/SKILL.md +8 -16
  152. package/src/orchestrator/plugins/nx/skills/nx-workspace/SKILL.md +2 -4
  153. package/src/orchestrator/plugins/playwright/skills/playwright-testing/SKILL.md +1 -3
  154. package/src/orchestrator/plugins/prisma/skills/prisma-database/SKILL.md +1 -3
  155. package/src/orchestrator/plugins/resend/skills/resend-email/SKILL.md +2 -2
  156. package/src/orchestrator/plugins/sanity/skills/sanity-cms/SKILL.md +1 -3
  157. package/src/orchestrator/plugins/sentry/skills/sentry-monitoring/SKILL.md +1 -1
  158. package/src/orchestrator/plugins/slack/skills/slack-notifications/SKILL.md +1 -3
  159. package/src/orchestrator/plugins/strapi/skills/strapi-cms/SKILL.md +1 -3
  160. package/src/orchestrator/plugins/stripe/skills/stripe-payments/SKILL.md +4 -4
  161. package/src/orchestrator/plugins/supabase/skills/supabase-database/SKILL.md +3 -5
  162. package/src/orchestrator/plugins/teams/skills/teams-notifications/SKILL.md +1 -3
  163. package/src/orchestrator/plugins/trello/skills/trello-task-management/SKILL.md +1 -1
  164. package/src/orchestrator/plugins/turborepo/skills/turborepo-monorepo/SKILL.md +15 -88
  165. package/src/orchestrator/plugins/vercel/skills/vercel-deployment/SKILL.md +2 -2
  166. package/src/orchestrator/plugins/vitest/skills/vitest-testing/SKILL.md +17 -150
  167. package/src/orchestrator/prompts/assess-complexity.prompt.md +1 -0
  168. package/src/orchestrator/prompts/bootstrap-customizations.prompt.md +38 -238
  169. package/src/orchestrator/prompts/brainstorm.prompt.md +1 -1
  170. package/src/orchestrator/prompts/create-skill.prompt.md +13 -67
  171. package/src/orchestrator/prompts/fix-convoy.prompt.md +1 -0
  172. package/src/orchestrator/prompts/fix-prd.prompt.md +1 -0
  173. package/src/orchestrator/prompts/generate-prd.prompt.md +1 -0
  174. package/src/orchestrator/prompts/implement-feature.prompt.md +6 -6
  175. package/src/orchestrator/prompts/resolve-pr-comments.prompt.md +2 -2
  176. package/src/orchestrator/prompts/validate-convoy.prompt.md +1 -0
  177. package/src/orchestrator/prompts/validate-prd.prompt.md +1 -0
  178. package/src/orchestrator/skills/accessibility-standards/REFERENCE.md +17 -12
  179. package/src/orchestrator/skills/accessibility-standards/SKILL.md +1 -1
  180. package/src/orchestrator/skills/agent-hooks/HOOKS-REFERENCE.md +3 -5
  181. package/src/orchestrator/skills/agent-hooks/SKILL.md +8 -6
  182. package/src/orchestrator/skills/agent-memory/KNOWLEDGE-GRAPH.md +1 -1
  183. package/src/orchestrator/skills/agent-memory/SKILL.md +7 -16
  184. package/src/orchestrator/skills/api-patterns/SKILL.md +1 -1
  185. package/src/orchestrator/skills/code-commenting/SKILL.md +1 -1
  186. package/src/orchestrator/skills/context-map/REFERENCE.md +0 -2
  187. package/src/orchestrator/skills/context-map/SKILL.md +2 -2
  188. package/src/orchestrator/skills/data-engineering/REFERENCE.md +3 -9
  189. package/src/orchestrator/skills/data-engineering/SKILL.md +9 -16
  190. package/src/orchestrator/skills/decomposition/SKILL.md +1 -1
  191. package/src/orchestrator/skills/deployment-infrastructure/SKILL.md +4 -4
  192. package/src/orchestrator/skills/documentation-standards/SKILL.md +5 -3
  193. package/src/orchestrator/skills/fast-review/REFERENCE.md +0 -2
  194. package/src/orchestrator/skills/fast-review/SKILL.md +5 -5
  195. package/src/orchestrator/skills/frontend-design/REFERENCE.md +6 -28
  196. package/src/orchestrator/skills/frontend-design/SKILL.md +19 -9
  197. package/src/orchestrator/skills/git-workflow/SKILL.md +1 -1
  198. package/src/orchestrator/skills/memory-merger/SKILL.md +13 -15
  199. package/src/orchestrator/skills/observability-logging/SKILL.md +2 -2
  200. package/src/orchestrator/skills/orchestration-protocols/REFERENCE.md +5 -9
  201. package/src/orchestrator/skills/orchestration-protocols/SKILL.md +6 -6
  202. package/src/orchestrator/skills/panel-majority-vote/REFERENCE.md +1 -5
  203. package/src/orchestrator/skills/panel-majority-vote/SKILL.md +1 -1
  204. package/src/orchestrator/skills/panel-majority-vote/panel-report.template.md +0 -2
  205. package/src/orchestrator/skills/performance-optimization/SKILL.md +2 -2
  206. package/src/orchestrator/skills/project-consistency/SKILL.md +2 -2
  207. package/src/orchestrator/skills/project-consistency/TEMPLATES.md +0 -4
  208. package/src/orchestrator/skills/react-development/SKILL.md +3 -3
  209. package/src/orchestrator/skills/security-hardening/SKILL.md +5 -5
  210. package/src/orchestrator/skills/self-improvement/LESSON-CATEGORIES.md +0 -2
  211. package/src/orchestrator/skills/self-improvement/SKILL.md +1 -1
  212. package/src/orchestrator/skills/seo-patterns/SKILL.md +1 -1
  213. package/src/orchestrator/skills/session-checkpoints/CHECKPOINT-TEMPLATE.md +0 -2
  214. package/src/orchestrator/skills/session-checkpoints/SKILL.md +1 -1
  215. package/src/orchestrator/skills/team-lead-reference/SKILL.md +3 -3
  216. package/src/orchestrator/skills/technical-writing/SKILL.md +8 -13
  217. package/src/orchestrator/skills/testing-workflow/SKILL.md +6 -6
  218. package/src/orchestrator/skills/typescript-best-practices/SKILL.md +1 -1
  219. package/src/orchestrator/skills/unslop/SKILL.md +1 -1
  220. package/src/orchestrator/skills/validation-gates/REFERENCE.md +6 -31
  221. package/src/orchestrator/skills/validation-gates/SKILL.md +12 -26
  222. package/src/orchestrator/skills/writing-for-agents/SKILL.md +2 -2
  223. package/src/orchestrator/customizations/AGENT-EXPERTISE.md +0 -325
  224. package/src/orchestrator/customizations/AGENT-FAILURES.md +0 -69
  225. package/src/orchestrator/customizations/AGENT-PERFORMANCE.md +0 -55
  226. package/src/orchestrator/customizations/DISPUTES.md +0 -162
  227. package/src/orchestrator/customizations/KNOWLEDGE-GRAPH.md +0 -10
  228. package/src/orchestrator/customizations/agents/skill-matrix.md +0 -111
  229. package/src/orchestrator/customizations/logs/events.ndjson +0 -0
  230. package/src/orchestrator/customizations/project/decisions.md +0 -31
  231. package/src/orchestrator/customizations/project/docs-structure.md +0 -34
  232. package/src/orchestrator/customizations/project/roadmap.md +0 -24
  233. package/src/orchestrator/skills/documentation-standards/WRITING-GUIDE.md +0 -39
  234. package/src/orchestrator/skills/frontend-design/COMPONENTS.md +0 -113
  235. /package/src/orchestrator/{customizations/logs/README.md → skills/observability-logging/LOG-SCHEMA.md} +0 -0
@@ -123,10 +123,24 @@ describe('drift detection', () => {
123
123
  // change behavior, so it must never count as drift.
124
124
  const custom = join(projectRoot, '.opencastle')
125
125
  mkdirSync(custom, { recursive: true })
126
- writeFileSync(join(custom, 'project.instructions.md'), 'my own rules\n')
126
+ writeFileSync(join(custom, 'KNOWN-ISSUES.md'), 'my own notes\n')
127
127
 
128
128
  const report = await buildCheckReport(pkgRoot, projectRoot)
129
- expect(report.drift.filter((d) => d.path.startsWith('.opencastle'))).toEqual([])
129
+ expect(report.drift).toEqual([])
130
+ })
131
+
132
+ it('asks for a sync when the project facts every assistant loads change, never blaming the facts', async () => {
133
+ await install()
134
+ // project.instructions.md is the user's, and it is compiled into the
135
+ // always-loaded instructions: an edit is not drift of the file, but the
136
+ // compiled files no longer carry it until `sync` runs.
137
+ const custom = join(projectRoot, '.opencastle')
138
+ mkdirSync(custom, { recursive: true })
139
+ writeFileSync(join(custom, 'project.instructions.md'), '# Project Context\n\nDeploys with `make ship`.\n')
140
+
141
+ const report = await buildCheckReport(pkgRoot, projectRoot)
142
+ expect(report.drift.length).toBeGreaterThan(0)
143
+ expect(report.drift.map((d) => d.path)).not.toContain('.opencastle/project.instructions.md')
130
144
  })
131
145
 
132
146
  it('ignores unrelated files in the project', async () => {
@@ -4,7 +4,7 @@
4
4
 
5
5
  Standard execution plan for crawling, processing, and importing data.
6
6
 
7
- > **Project config:** For project-specific paths, data schema, CLI commands, and processing rules, see `data-pipeline-config.md`. For data model docs, see `docs-structure.md`.
7
+ > **Project config:** For project-specific paths, data schema, CLI commands, and processing rules, see `data-pipeline-config.md`. For data model docs, see Key Documentation in `.opencastle/project.instructions.md`.
8
8
 
9
9
  ## Phases
10
10
 
@@ -34,7 +34,7 @@ The Team Lead creates the branch before any delegation and delivers it as the De
34
34
 
35
35
  1. Analyze the target data source (website, API, file)
36
36
  2. Identify data fields available and their mapping to the place schema
37
- 3. Check the data model documentation (see `docs-structure.md`) for required fields
37
+ 3. Check the data model documentation (Key Documentation in `.opencastle/project.instructions.md`) for required fields
38
38
  4. Estimate record count
39
39
  5. Check for existing scraper patterns (see **data-engineering** skill)
40
40
  6. Create tracker issue with data source details
@@ -183,7 +183,7 @@ If there are no open questions, explicitly state: "No open questions — plan is
183
183
 
184
184
  ### Exit Criteria (per track)
185
185
 
186
- - [ ] 95% test coverage on new code
186
+ - [ ] New code meets the coverage threshold in the project's test config
187
187
  - [ ] Browser screenshots at all breakpoints
188
188
  - [ ] Security audit passes (or panel review scheduled)
189
189
  - [ ] Documentation updated
@@ -212,7 +212,7 @@ If there are no open questions, explicitly state: "No open questions — plan is
212
212
  - Final responsive sweep at all breakpoints (if UI changes)
213
213
  7. Move all issues to Done
214
214
  8. Update session checkpoint → delete checkpoint
215
- 9. Update `.opencastle/project/roadmap.md`
215
+ 9. Update `.opencastle/project/roadmap.md`, when the project keeps one
216
216
 
217
217
  ### Exit Criteria
218
218
 
@@ -33,7 +33,7 @@ The Team Lead creates the branch before any delegation and delivers it as the De
33
33
  ### Steps
34
34
 
35
35
  1. Read current CMS schema to understand existing types
36
- 2. Check the data model documentation (see `docs-structure.md`) for field documentation
36
+ 2. Check the data model documentation (Key Documentation in `.opencastle/project.instructions.md`) for field documentation
37
37
  3. Check the query library (see CMS customization) for queries that will be affected
38
38
  4. Verify schema changes don't conflict with existing content in the CMS
39
39
  5. Document field mapping (new vs existing fields)
@@ -40,9 +40,9 @@ Load on-demand **only when the phase is reached**.
40
40
  |-------|---------|
41
41
  | **team-lead-reference** | Session start — model routing, registry, pre-delegation, cost, DLQ, deepen-plan |
42
42
  | **session-checkpoints** | Session resume or checkpoint save |
43
- | **agent-hooks** | Step 3 — delegation prompt templates |
43
+ | **agent-hooks** | Session start/end, pre- and post-delegation checklists |
44
44
  | **task-management** | Step 2 — tracker conventions |
45
- | **decomposition** | Step 2–3 — dependency resolution, delegation specs |
45
+ | **decomposition** | Step 2–3 — dependency resolution, delegation spec templates |
46
46
  | **orchestration-protocols** | Step 4+ — steering, background agents, health-checks, escalation |
47
47
  | **context-map** | Step 2, 5+ files affected |
48
48
  | **validation-gates** | Step 4 — deterministic checks, browser testing, regression |
@@ -63,7 +63,7 @@ Developer | UI/UX Expert | Content Engineer | Data Engineer | Testing Expert | S
63
63
  **⛔ Hard gates:**
64
64
  - Log delegation record immediately after each return/spawn — **observability-logging** (`--mechanism sub-agent` or `--mechanism background`).
65
65
  - `tier` from the agent registry only; `model` is the one the assistant actually ran, when it says.
66
- - Empty/off-topic: retry max 3 → DLQ. Log failures (`--outcome failed`).
66
+ - Retries and escalation (FAIL, empty/off-topic output, DLQ): **fast-review**'s Handle Verdict table. Log failures (`--outcome failed`).
67
67
 
68
68
  **Partitioning:** Parallel agents never touch the same files. **Budget:** Target 5–7/session; 8 → warn; 9 → checkpoint; 10+ → STOP. **Pre-Delegation:** (1) Tracker issue, (2) clean partition, (3) dependencies Done, (4) file paths + criteria, (5) self-improvement reminder.
69
69
 
@@ -81,13 +81,13 @@ Developer | UI/UX Expert | Content Engineer | Data Engineer | Testing Expert | S
81
81
 
82
82
  **Step 2 — Decompose & Track:** No issue, no code. Break into single-responsibility units with Fibonacci scores (1–13). Map dependencies, file ownership, tracker issues with acceptance criteria. 5+ files → **context-map**. Consider deepen-plan (**team-lead-reference**).
83
83
 
84
- **Step 3 — Prompts:** Every delegation: issue ID, objective, file paths, acceptance criteria, patterns, self-improvement reminder. Score 5+ → load **decomposition**.
84
+ **Step 3 — Prompts:** Every delegation: issue ID, objective, file paths, acceptance criteria, patterns, self-improvement reminder — the Compact Delegation Envelope in **team-lead-reference**. Score 5+ → full delegation spec from **decomposition**.
85
85
 
86
- **Step 4 — Execute:** Per task: move → In Progress → delegate → log delegation ⛔ → monitor → verify (partition, lint/test/build, fast review PASS, UI browser-verified, high-stakes → panel, issues tracked, lessons captured) → log review ⛔ → Done. FAIL → re-delegate (max 3 → DLQ). Auto-PASS: research/docs-only, or ≤10 lines/≤2 files with gates passing.
86
+ **Step 4 — Execute:** Per task: move → In Progress → delegate → log delegation ⛔ → monitor → verify (partition, lint/test/build, fast review PASS, UI browser-verified, high-stakes → panel, issues tracked, lessons captured) → log review ⛔ → Done. FAIL → **fast-review**'s Handle Verdict table. Auto-PASS: research/docs-only, or ≤10 lines/≤2 files with gates passing.
87
87
 
88
88
  **Step 5 — Deliver:** Follow the workflow template's Delivery phase. Verify all Done → build/lint/test → commit feature branch → `GH_PAGER=cat gh pr create` — do NOT merge → link PR → clean checkpoint → call **Reviewer**.
89
89
 
90
- **On Resume:** Read `SESSION-CHECKPOINT.md`. Check `AGENT-FAILURES.md`, `DISPUTES.md`. List In Progress / Todo → continue.
90
+ **On Resume:** Read `SESSION-CHECKPOINT.md`. Check `.opencastle/AGENT-FAILURES.md` and `.opencastle/DISPUTES.md` when they exist. List In Progress / Todo → continue.
91
91
 
92
92
  ## Observability
93
93
 
@@ -17,7 +17,7 @@ Resolve skills via `.opencastle/agents/skill-matrix.json`.
17
17
  ## Rules
18
18
 
19
19
  1. **RED → GREEN → REFACTOR for every feature and fix.** The failing test comes before the production code.
20
- 2. **95% minimum coverage on all new code.**
20
+ 2. **New code meets the coverage threshold in the project's test config.**
21
21
  3. **Run the full suite before returning**, not only the tests you touched.
22
22
  4. **Never add a test-only method or hook to production code.** Refactor the interface instead.
23
23
  5. **Never assert on mock behavior.** Mock external APIs only, never internal modules.
@@ -32,7 +32,7 @@ Every suite covers: Initial State · User Interactions · State Transitions · E
32
32
 
33
33
  ## Verification
34
34
 
35
- All scenarios pass · 95% coverage · 3 consecutive green runs · browser-validated at every breakpoint · naming conventions followed
35
+ All scenarios pass · coverage threshold met · 3 consecutive green runs · browser-validated at every breakpoint · naming conventions followed
36
36
 
37
37
  ## Out of Scope
38
38
 
@@ -6,7 +6,7 @@ What agents on this project learned the hard way: a command that failed, a
6
6
  tool quirk, a convention written down nowhere else. **Read this before you
7
7
  start work**, then open the lessons that match your task.
8
8
 
9
- Each lesson is a file in [`lessons/`](lessons/). Add one with
9
+ Each lesson is a file in `.opencastle/lessons/`. Add one with
10
10
  `opencastle lesson --title ... --category ... --severity ... --problem ...`
11
11
  (and `--cite <path>` for the code it is about). Do not edit this index:
12
12
  it is rewritten from those files by every `opencastle sync`.
@@ -1,47 +1,33 @@
1
1
  # .opencastle/
2
2
 
3
- This directory is yours. It holds the project context the shipped skills read,
4
- the team's own instructions, skills, agents, prompts and workflows, and the team
5
- config. `opencastle sync` compiles it, together with OpenCastle's own content and
3
+ This directory is yours. It holds what the assistants need to know about this
4
+ project, the team's own instructions, skills, agents, prompts and workflows, and
5
+ the team config. `opencastle sync` compiles it, with OpenCastle's own content and
6
6
  any baseline the team extends, into the config every assistant reads.
7
7
 
8
8
  To change what the assistants are told, edit here — not the generated files.
9
- `opencastle sync --check` fails when someone edits a generated file in place or
10
- adds one by hand to a generated directory.
9
+ `opencastle sync --check` fails when someone edits a generated file in place.
11
10
 
12
- ## Why this exists
11
+ ## What is here
13
12
 
14
- Skills and instructions contain generic methodology (how to write migrations,
15
- how to test in a browser, how to run a panel review). This directory holds the
16
- concrete values those skills operate on — project IDs, table schemas, team
17
- UUIDs, endpoint inventories, and similar configuration that changes per project.
13
+ | Path | What it is |
14
+ |------|------------|
15
+ | `project.instructions.md` | The project: stack, structure, commands, routes, environment, and which skill covers which part. `init` wrote it from the code; correct it and add what the code cannot say |
16
+ | `stack/*.md` | Details the stack's skills read: the API's endpoints, the database's models and migrations, how tests and browser checks run, how it deploys |
17
+ | `KNOWN-ISSUES.md` | Problems and accepted risks found while working, checked before starting a task |
18
+ | `LESSONS-LEARNED.md` | Index of `lessons/`, one file per lesson, written by `opencastle lesson`. Rewritten by `sync`; never edit it by hand |
19
+ | `agents/agent-registry.md` | Which agent is for what, and on which tier |
20
+ | `agents/skill-matrix.json` | Which skills each agent loads, per capability slot |
21
+ | `config.json` | Team config, when you add one: `extends`, `exclude`, `mcpServers`, `policy`. Schema: <https://www.opencastle.dev/schema/config.json> |
22
+ | `lock.json`, `manifest.json` | What is installed and what every assistant is given. Written by `sync`; commit both |
18
23
 
19
- Skills reference these files by root-relative path, like
20
- `.opencastle/stack/api-config.md`, so agents load project context when they load
21
- a skill.
24
+ Created when there is something to put in them: `AGENT-FAILURES.md` and
25
+ `DISPUTES.md` (a delegation that failed for good, and a disagreement for a
26
+ person to decide), `project/decisions.md` and `project/roadmap.md`, and the
27
+ agent-memory files. `logs/`, the convoy database and worktrees are local and
28
+ gitignored.
22
29
 
23
- ## Contents
24
-
25
- | File | Purpose |
26
- |------|---------|
27
- | `README.md` | This file |
28
- | `config.json` | Team config, when you add one: `extends` (baselines), `exclude`, `mcpServers`, `policy`. Schema: <https://www.opencastle.dev/schema/config.json> |
29
- | `project.instructions.md` | High-level project context — apps, libraries, tech stack, ports, URLs |
30
- | `LESSONS-LEARNED.md` | Index of the lessons in `lessons/` — read before every session. Rewritten by `opencastle sync`; never edited by hand |
31
- | `lessons/` | One file per lesson: retries, workarounds and gotchas, written by `opencastle lesson` |
32
- | `KNOWN-ISSUES.md` | Tracked issues, limitations, and accepted risks discovered during sessions |
33
- | `DISPUTES.md` | Disagreements automated review could not settle, packaged for a person to decide |
34
- | `AGENT-FAILURES.md` | Dead letter queue for failed agent delegations |
35
- | `AGENT-PERFORMANCE.md` | Agent success tracking, log query recipes, performance metrics |
36
- | `AGENT-EXPERTISE.md` | Structured tracking of agent strengths/weaknesses across sessions |
37
- | `KNOWLEDGE-GRAPH.md` | Append-only relationship log for file dependencies, patterns, decisions |
38
- | `lock.json` | What every assistant is given. Written by every `sync`; commit it |
39
- | `manifest.json` | What is installed, and for which assistants. Written by `init` and `sync` |
40
-
41
- `sync` rewrites `LESSONS-LEARNED.md`, `lock.json` and `manifest.json`. It keeps
42
- your edits to everything else here.
43
-
44
- ### The team's own sources
30
+ ## The team's own sources
45
31
 
46
32
  `opencastle sync` compiles these into every assistant, in each one's own
47
33
  format. One with the same name as an item OpenCastle or a baseline ships
@@ -55,53 +41,10 @@ replaces it; `exclude` in `config.json` drops one.
55
41
  | `prompts/*.md` | A prompt — `/oc:<name>` in Claude Code and Copilot Chat |
56
42
  | `workflows/*.md` | A workflow template |
57
43
 
58
- ### `agents/` — Agent framework config
59
-
60
- Beside any agents of your own:
61
-
62
- | File | Purpose |
63
- |------|---------|
64
- | `agent-registry.md` | Specialist agents with model tier assignments and scope examples |
65
- | `skill-matrix.json` | Maps capability slots to concrete skill names per agent role (machine-readable) |
66
- | `skill-matrix.md` | Documentation companion explaining the skill matrix concept |
67
-
68
- ### `stack/` — Tech stack config
69
-
70
- Notes on the stack that the skills read. `opencastle init` writes the ones for
71
- what it detected, such as `testing-config.md`, or `supabase-config.md` when the
72
- project uses Supabase.
73
-
74
- ### `project/` — Project management config
75
-
76
- | File | Purpose |
77
- |------|---------|
78
- | `docs-structure.md` | Project documentation directory tree and practices |
79
- | `roadmap.md` | Project roadmap with planned features and their status |
80
- | `decisions.md` | Architecture Decision Records (ADRs) for the project |
81
- | `tracker-config.md` | Task tracker settings, when a tracker is set up |
82
-
83
- ### `logs/` — Append-only NDJSON session logs
84
-
85
- Structured logs agents append with `opencastle log` during sessions,
86
- delegations, reviews, panels and disputes. Gitignored, like the other run
87
- artefacts here.
88
-
89
- | File | Purpose |
90
- |------|---------|
91
- | `README.md` | The record schema |
92
- | `events.ndjson` | Every record, one JSON object per line |
93
-
94
- ## When to update
95
-
96
- Update these files when the project changes — new tables, new API routes, new
97
- apps, new tracker labels, etc. The skills themselves should rarely need editing;
98
- changing a project ID or adding a table column is a customization change, not a
99
- skill change.
100
-
101
- ## Bootstrap
44
+ ## Keeping it current
102
45
 
103
- `opencastle init` fills in what it can detect: frameworks, databases, CMS,
104
- deployment config and task tracking. On an existing codebase, run the
105
- `bootstrap-customizations` prompt next (`/oc:bootstrap-customizations` in
106
- Claude Code or Copilot Chat; in other assistants, ask for it by name) to fill
107
- in the rest from the code.
46
+ Update these files when the project changes — a new table, route, app or
47
+ environment. A file's "Still to describe" list is what `init` could not read
48
+ from the code; `/oc:bootstrap-customizations` (in Claude Code or Copilot Chat;
49
+ elsewhere, ask for the bootstrap-customizations prompt by name) has an agent fill
50
+ it in.
@@ -7,28 +7,11 @@ applyTo: '**'
7
7
 
8
8
  # AI Optimization
9
9
 
10
- Batch independent operations, gather context before acting, and avoid redundant tool calls.
11
-
12
- ## Key Rules
13
-
14
- - **Batch independent reads** — parallelize file reads, searches, and error checks in a single call instead of sequentially
15
- - **Don't batch dependent ops** — if step B needs step A's output, run them sequentially
16
- - **Gather context first** — read and search before editing; don't act on assumptions
17
- - **Read strategically** — prefer large ranges (500–2000 lines) over many micro-reads; use `grep_search` to locate, then read targeted ranges
18
- - **Combine searches** — use regex alternation (`word1|word2|word3`) instead of separate searches
19
- - **Don't re-read** — if a file or sub-agent result is already in context, use it directly
20
- - **Verify once per phase** — run tests/lint/errors after a batch of edits, not after each individual change
21
- - **Scale planning to complexity** — trivial (1–2 files) → act directly; large (10+ files) → full decomposition
22
- - **Trust sub-agent results** — don't re-search or re-read what a sub-agent already returned
23
- - **Include file paths in delegation prompts** — saves the sub-agent from wasting context on discovery
24
-
25
- ## Anti-Patterns
26
-
27
- 1. **Micro-reads** — reading tiny file sections repeatedly
28
- 2. **Sequential searches** — running independent searches one at a time
29
- 3. **Premature actions** — editing before gathering sufficient context
30
- 4. **Over-checking** — validating after every tiny change instead of batching
31
- 5. **Re-gathering delegated context** — re-reading files a sub-agent already analyzed
32
- 6. **Over-planning** — full decomposition for a 2-file fix
10
+ - **Batch what is independent** — reads, searches and checks that do not depend on each other go in one turn; what depends on an earlier result waits for it.
11
+ - **Read in large ranges** — search to locate, then read the range you need, not many small slices of one file.
12
+ - **Do not re-read** — a file or a sub-agent's result already in context is used as it is.
13
+ - **Verify once per phase** — run tests, lint and build after a batch of edits, not after each one.
14
+ - **Scale planning to the change** — one or two files: act; ten or more: decompose first.
15
+ - **Hand over what you know** — a delegation prompt names the files and facts the agent would otherwise rediscover.
33
16
 
34
17
  <!-- End of AI Optimization Instructions -->
@@ -9,112 +9,39 @@ applyTo: '**'
9
9
  ## Constitution
10
10
 
11
11
  1. **Never expose secrets** — no tokens, keys, or passwords in code, logs, commits, or terminal output. Use environment variables.
12
- 2. **Prefer boring solutions** — choose proven, simple approaches over clever ones. Complexity must justify itself.
12
+ 2. **Prefer boring solutions** — proven, simple approaches over clever ones. Complexity must justify itself.
13
13
  3. **Leave code better than you found it** — fix adjacent issues when the cost is low.
14
- 4. **Fail visibly** — surface errors clearly; never swallow exceptions silently.
15
- 5. **Verify, don't trust** — confirm outcomes with tools (tests, lint, build) rather than assuming success.
16
- 6. **Log every session** — append observability records to `.opencastle/logs/` before yielding to the user. No exceptions. Load the **observability-logging** skill for details.
14
+ 4. **Fail visibly** — surface errors; never swallow exceptions silently.
15
+ 5. **Verify, don't trust** — confirm outcomes with the project's own tests, lint and build rather than assuming success.
16
+ 6. **Log every session** — see Every session, below.
17
17
 
18
- ## Instruction Priority Hierarchy
18
+ ## Precedence
19
19
 
20
- **Project-specific instructions ALWAYS take precedence over external or general AI instructions.**
20
+ The project's own instructions win: the Project Context loaded with these, the rest of `.opencastle/`, and the project's rules outside OpenCastle's managed files. Then these standards. Then general habits.
21
21
 
22
- 1. **HIGHEST**: Project-specific instructions — `.opencastle/project.instructions.md`, and the project's own rules outside OpenCastle's managed files
23
- 2. **MEDIUM**: Project workspace conventions (resolve via the **codebase-tool** skill in the skill matrix)
24
- 3. **LOWER**: General AI assistant capabilities and suggestions
22
+ ## Working here
25
23
 
26
- ## General Coding Principles
27
-
28
- Clean code, readability, maintainability. TypeScript with proper types (never `as any`). DRY. Co-locate code that changes together; avoid barrel files. Shared code in shared libraries. Comment WHY, not WHAT (load **code-commenting** skill for patterns).
29
-
30
- ## Technology Standards
31
-
32
- Load the corresponding skill before writing code in that domain. See `.opencastle/agents/skill-matrix.json` for domain-to-skill mapping. Key domains: UI Components (**ui-library**), App Framework (**framework**), Accessibility (**accessibility-standards**), Performance (**performance-optimization**), Frontend Design (**frontend-design**).
33
-
34
- ## Task Decomposition
35
-
36
- Decompose → verify each step → batch edits → build once. Re-plan when execution diverges. Match verification to change type. Load **decomposition** skill for templates.
37
-
38
- ## Testing
39
-
40
- 95% minimum unit test coverage. Test plan before implementation. Browser testing mandatory for UI changes. Load **testing-workflow** and **browser-testing** skills.
41
-
42
- ## Build & Task Commands
43
-
44
- Always use the project's configured task runner. Load **codebase-tool** skill for exact commands. Direct CLI only for tools without task runner targets.
45
-
46
- ## Documentation
47
-
48
- Follow markdown formatting standards. Load **documentation-standards** skill for templates.
49
-
50
- ## AI Optimization
51
-
52
- Follow the **AI Optimization** instructions, which are always loaded with these.
53
-
54
- ## Project Context
55
-
56
- Read `.opencastle/project.instructions.md` — apps, stack, commands, ports — before planning.
57
-
58
- ## Git Workflow
59
-
60
- **NEVER push to `main`.** All changes via feature/fix branch → PR. Load **git-workflow** skill for branch naming and PR rules.
24
+ - **Commands.** Run the project's own commands — Key Commands in the Project Context — and go through its task runner (Nx, Turborepo) when it has one.
25
+ - **Domains.** Before writing code in a domain, load the skill for it: the Project Context's Domain Quick Reference maps domains to skills, and `.opencastle/agents/skill-matrix.json` maps each agent's capability slots. A slot with no skill bound means the project has nothing special there.
26
+ - **Tests.** Write the test with the change and meet the coverage the project's test config requires (**testing-workflow**). Check UI changes in a browser when the project has a UI (**browser-testing**).
27
+ - **Plans.** Decompose → verify each step → batch edits → build once; re-plan when execution diverges (**decomposition**).
28
+ - **Comments** say why, not what (**code-commenting**). Documents follow **documentation-standards**.
29
+ - **Git.** **Never push to `main`.** Every change goes through a branch and a pull request (**git-workflow**).
61
30
 
62
31
  ## Discovered Issues Policy
63
32
 
64
- **No issue gets ignored.** An untracked bug found during work is a quality-gate failure.
65
-
66
- When you hit a bug unrelated to your current task:
33
+ **No issue gets ignored.** When you hit a bug unrelated to your task:
67
34
 
68
35
  1. Search `.opencastle/KNOWN-ISSUES.md`, and the task tracker if tools are available. Already tracked? Move on.
69
- 2. Not tracked, and it is an upstream or platform limitation you cannot fix → add it to `.opencastle/KNOWN-ISSUES.md` with all six fields: Issue ID, Status, Severity, Evidence, Root Cause, Solution Options.
70
- 3. Not tracked, and it is fixable → open a tracker ticket labelled `bug` with symptoms, reproduction steps, and affected files. No tracker available? Add a `**Discovered Issues**` section to your output.
71
-
72
- A pre-existing issue is not somebody else's problem. If it is not tracked, track it.
73
-
74
- ## Observability Logging
75
-
76
- **Hard gate (Constitution rule 6).** Every session gets a record in
77
- `.opencastle/logs/events.ndjson`. No threshold, no "too small to log".
78
-
79
- - Log **before yielding** to the user — it is the last action before you respond.
80
- - Log **per task**, not per conversation. Three tasks means three records.
81
- - Never batch-log retrospectively across sessions.
82
- - `opencastle log --type session ...`, then confirm the append landed:
83
- `tail -1 .opencastle/logs/events.ndjson`.
84
-
85
- Load **observability-logging** for the record schemas and the other record types.
86
-
87
- ## Self-Improvement Protocol
88
-
89
- > **⛔ HARD GATE** — Read `.opencastle/LESSONS-LEARNED.md` before starting work. Add lessons via **self-improvement** skill when retries succeed.
90
-
91
- ## Universal Agent Rules
92
-
93
- 1. Never delegate (specialists complete their own work)
94
- 2. Follow the Discovered Issues Policy above
95
- 3. Read and update lessons
96
- 4. Log every session (Constitution rule 6)
97
-
98
- ## Standard Closing Items
99
-
100
- Every agent ends its output contract with these, after its own domain-specific items:
101
-
102
- - **Observability logged** — the `session` record always; `delegation`, `review`,
103
- `panel`, or `dispute` records if any of those happened
104
- - **Discovered issues** — anything found per the policy above, and what you did about it
105
- - **Lessons applied** — which entries in `.opencastle/LESSONS-LEARNED.md` shaped this
106
- work, and any new one you added
107
-
108
- ## Pre-Response Quality Gate
109
-
110
- > **⛔ STOP before responding.** Load **observability-logging** skill and run its pre-response checklist.
36
+ 2. An upstream or platform limitation you cannot fix → add it to `.opencastle/KNOWN-ISSUES.md` with Issue ID, Status, Severity, Evidence, Root Cause, Solution Options.
37
+ 3. Fixable → open a tracker ticket labelled `bug` with symptoms, reproduction steps and affected files; with no tracker, add a **Discovered Issues** section to your output.
111
38
 
112
- ## Governance Skills
39
+ ## Every session
113
40
 
114
- | Concern | Skill |
115
- |---------|-------|
116
- | Branching, PR rules, delivery, tracking | **git-workflow** |
117
- | Log commands, schemas, output contracts | **observability-logging** |
118
- | Lesson writing, categories, quality | **self-improvement** |
41
+ - **Before starting:** read `.opencastle/LESSONS-LEARNED.md` and the lessons that match your task.
42
+ - **Before responding:** log the session with `opencastle log --type session …`, one record per task, never batched afterwards; add `delegation`, `review`, `panel` or `dispute` records when those happened. **observability-logging** has the fields.
43
+ - **When a retry taught you something,** add a lesson (**self-improvement**).
44
+ - **Specialists finish their own work;** only the Team Lead delegates.
45
+ - **End your output** with what you logged, the issues you discovered and what you did about them, and the lessons you applied or added.
119
46
 
120
47
  <!-- End of Coding Standards -->
@@ -1,10 +1,8 @@
1
1
  ---
2
2
  name: astro-framework
3
- description: "Creates pages/layouts, defines content collections, configures hydration directives, and wires integrations. Use when adding or modifying Astro pages, layouts, components, or content collections. Trigger terms: Astro, content collection, client:load, client:visible, astro:content"
3
+ description: "Astro pages, layouts, content collections, hydration directives and integrations. Use when adding or changing Astro pages, components or content collections, or choosing a client: directive."
4
4
  ---
5
5
 
6
- <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
7
-
8
6
  # Astro Framework
9
7
 
10
8
  Docs: https://docs.astro.build
@@ -1,10 +1,8 @@
1
1
  ---
2
2
  name: browser-testing
3
- description: "Drive real browsers via Chrome DevTools MCP: navigate pages, capture snapshots, run responsive checks, and collect console/perf traces. Use when the user mentions: 'validate UI change in Chrome', 'capture a screenshot', 'run responsive checks', or 'collect console logs'. Trigger terms: browser testing, DevTools, console logs, screenshot, responsive testing"
3
+ description: "Browser testing through the Chrome DevTools MCP: navigation, DOM snapshots, scripted assertions, responsive checks, console and performance traces. Use when verifying a UI change in Chrome, checking breakpoints, or reading console errors."
4
4
  ---
5
5
 
6
- <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
7
-
8
6
  # Browser Testing with Chrome DevTools MCP
9
7
 
10
8
  Project test app, selectors, suites, and breakpoints: `.opencastle/stack/testing-config.md`. Docs: https://developer.chrome.com/docs/devtools
@@ -16,7 +14,7 @@ Screenshots are expensive. **MAX 3 per session**, reserved for evidence: a failu
16
14
  ## Tools
17
15
 
18
16
  - `navigate_page` — `{ type: 'url', url }` or `{ type: 'reload' }`
19
- - `click` / `type` / `wait_for` — `click` and `type` take a `uid` from a prior snapshot, not a CSS selector
17
+ - `click` / `fill` / `wait_for` — `click` and `fill` take a `uid` from a prior snapshot, not a CSS selector
20
18
  - `evaluate_script` — `{ function: '() => ...' }` (an arrow function *string*, not a raw expression)
21
19
  - `resize_page` — `{ width, height }`
22
20
  - `list_console_messages`
@@ -30,4 +28,4 @@ Navigate → `wait_for` anchor text → assert via `evaluate_script` → exercis
30
28
 
31
29
  ## Regression re-test
32
30
 
33
- Read the prior `result.json`, build + lint, then re-run the **entire** previous suite — a fix routinely regresses a different test. Every test must pass before writing the updated `result.json`. Do not stop on partial green.
31
+ Build + lint, then re-run the **entire** previous suite — a fix routinely regresses a different test. Every test must pass before reporting the result in the session output. Do not stop on partial green.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cloudflare-platform
3
- description: "Creates and deploys Cloudflare Workers, configures wrangler.toml bindings, sets up KV/D1/R2 storage and Durable Objects, manages Pages deployments, and implements edge function patterns. Use when building or deploying Cloudflare Workers, setting up Pages, working with KV/D1/R2 storage, configuring wrangler.toml, or deploying edge applications."
3
+ description: "Cloudflare Workers, Pages, wrangler bindings, KV/D1/R2 storage and Durable Objects. Use when building or deploying a Worker or Pages site, editing wrangler.toml, or using KV, D1, R2 or Durable Objects."
4
4
  ---
5
5
 
6
6
  # Cloudflare Platform
@@ -8,7 +8,7 @@ description: "Creates and deploys Cloudflare Workers, configures wrangler.toml b
8
8
  ## Workers
9
9
 
10
10
  - V8 isolates, not Node: `process`, `Buffer`, `fs` do not exist unless `compatibility_flags = ["nodejs_compat"]` is set. `compatibility_date` must be set or deploys fail.
11
- - Free tier bundle limit is 1MB. Cold starts are 0ms — keep dependencies minimal.
11
+ - Worker size limit is 3 MB compressed on the Free plan, 10 MB on Paid. Keep dependencies minimal.
12
12
  - `ctx.waitUntil(promise)` for side effects that must outlive the response (logging, analytics).
13
13
  - Bindings are reachable only via the handler's `env` argument, and must exist in both `wrangler.toml` and the `Env` interface.
14
14
  - Durable Objects need `[[durable_objects.bindings]]` **and** a `[[migrations]]` block with `new_classes = ["Counter"]` — the binding alone will not deploy.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: contentful-cms
3
- description: "Creates Contentful content types, queries entries via GraphQL/REST, runs CLI migrations, and manages assets and locales. Use when building or modifying Contentful content models, writing queries, or migrating content."
3
+ description: "Contentful content types, GraphQL/REST queries, CLI migrations, assets and locales. Use when changing a Contentful content model, querying Contentful, or migrating its content."
4
4
  ---
5
5
 
6
6
  # Contentful CMS
@@ -1,10 +1,8 @@
1
1
  ---
2
2
  name: convex-database
3
- description: "Convex reactive database patterns, schema design, real-time queries, mutations, actions, authentication, migrations, performance optimization, and component creation. Use when designing Convex schemas, writing queries/mutations, managing the Convex backend, setting up auth, migrating data, optimizing performance, or building Convex components."
3
+ description: "Convex schemas, queries, mutations, actions, auth, migrations and components. Use when designing a Convex schema, writing Convex functions, setting up Convex auth, or migrating Convex data."
4
4
  ---
5
5
 
6
- <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
7
-
8
6
  # Convex Database
9
7
 
10
8
  Project-specific schema, functions, and deployment details: `.opencastle/stack/database-config.md`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: coolify-deployment
3
- description: "Deploys applications, databases, and services on self-hosted Coolify instances, manages environments and env vars, runs infrastructure diagnostics, and performs batch operations. Use when deploying apps to Coolify, managing Coolify servers, debugging deployment issues, setting up databases, or managing Coolify infrastructure."
3
+ description: "Deploys and manages apps, databases and services on a self-hosted Coolify instance, with env vars, diagnostics and batch operations. Use when deploying to Coolify, debugging a Coolify deployment, or managing its servers."
4
4
  ---
5
5
 
6
6
  # Coolify Deployment
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cypress-testing
3
- description: "Writes Cypress E2E/component tests, configures `cy.intercept()` and `cy.session()`, authors custom commands, and wires CI artifacts. Use when creating E2E specs, component tests, or CI test pipelines. Trigger terms: cypress, e2e, component test, cy.intercept, cy.session"
3
+ description: "Cypress E2E and component tests: cy.intercept(), cy.session(), custom commands and CI artifacts. Use when writing or debugging Cypress specs, or running Cypress in CI."
4
4
  ---
5
5
 
6
6
  # Cypress Testing
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: drizzle-orm
3
- description: "Drizzle ORM schema definition, type-safe queries, relational queries, CRUD operations, transactions, migrations with drizzle-kit, and database setup for PostgreSQL, MySQL, and SQLite. Use when defining database schemas, writing queries or joins, managing migrations, setting up a new Drizzle project, or working with drizzle-kit."
3
+ description: "Drizzle ORM schemas, type-safe and relational queries, transactions and drizzle-kit migrations for PostgreSQL, MySQL and SQLite. Use when defining a Drizzle schema, writing Drizzle queries, or running drizzle-kit."
4
4
  ---
5
5
 
6
6
  # Drizzle ORM
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: expo-development
3
- description: "Scaffolds Expo/React Native apps, configures EAS Build profiles, manages native modules via CNG, sets up Expo Router navigation, and uses EAS Update for OTA deployments. Use when creating React Native apps with Expo, configuring EAS builds, setting up Expo Router, managing native modules, or deploying OTA updates."
3
+ description: "Expo and React Native apps: Continuous Native Generation, EAS Build and Update, Expo Router. Use when creating or configuring an Expo app, its EAS builds, native modules, routes or OTA updates."
4
4
  ---
5
5
 
6
6
  # Expo Development
@@ -16,7 +16,7 @@ description: "Scaffolds Expo/React Native apps, configures EAS Build profiles, m
16
16
  - `eas.json` profiles: development = `developmentClient: true` + `distribution: internal`; preview = `distribution: internal` + `channel`; production = `channel` + `autoIncrement: true`.
17
17
  - Set `runtimeVersion: { policy: "fingerprint" }` in app.json. `eas update --channel production` ships JS only — a runtimeVersion mismatch forces a new binary build, and native changes can never go OTA.
18
18
  - Rollback: `eas update:republish --group <previous-group-id>`. Diagnose failures via `eas build:list` then `eas build:view <id>`.
19
- - Secrets belong in EAS Secrets (`eas secret:create`), never `app.json`; device-side storage via `expo-secure-store`.
19
+ - Secrets belong in EAS environment variables with secret visibility (`eas env:create --visibility secret`; `eas secret:create` is deprecated), never `app.json`; device-side storage via `expo-secure-store`.
20
20
  - iOS signing failures: `eas credentials`. CI/CD lives in `.eas/workflows/`.
21
21
 
22
22
  ## Expo Router
@@ -1,10 +1,8 @@
1
1
  ---
2
2
  name: figma-design
3
- description: "Figma design-to-code workflows, design token extraction, component inspection, and asset export. Use when translating Figma designs into code, extracting design tokens, or referencing component specs."
3
+ description: "Figma design-to-code: design token extraction, component inspection and asset export. Use when implementing a Figma design, extracting its tokens, or checking a component's spec."
4
4
  ---
5
5
 
6
- <!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
7
-
8
6
  # Figma Design
9
7
 
10
8
  Project design system: the **frontend-design** skill. Docs: https://developers.figma.com/docs/figma-mcp-server/
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: hetzner-cloud
3
- description: "Provisions Hetzner Cloud servers, volumes, private networks, and firewalls via the hcloud CLI and the Pulumi/Terraform hcloud provider; plans CAX/arm64 sizing; configures backups, snapshots, and DR rebuilds. Use when creating or resizing Hetzner servers, attaching volumes, configuring private networks or firewalls, choosing server types, scripting hcloud commands, or authoring hcloud IaC resources."
3
+ description: "Hetzner Cloud servers, volumes, private networks, firewalls, backups and snapshots, through the hcloud CLI or Pulumi/Terraform. Use when provisioning, resizing or scripting Hetzner resources, or choosing a server type."
4
4
  ---
5
5
 
6
6
  # Hetzner Cloud