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
@@ -1,10 +1,8 @@
1
1
  ---
2
2
  name: jira-management
3
- description: "Create and update Jira issues, epics, and sprints; manage backlog and sprint transitions. Use when you say: 'create a ticket', 'open a story', 'link an epic', 'start a sprint', or 'search the backlog'."
3
+ description: "Jira issues, epics, sprints, backlog and workflow transitions. Use when creating or updating Jira issues, linking epics, moving work through a sprint, or searching the backlog."
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
  # Task Management with Jira
9
7
 
10
8
  Project keys, workflow state IDs, and board config: `.opencastle/project/jira-config.md`. Docs: https://developer.atlassian.com/cloud/jira/platform/
@@ -1,10 +1,8 @@
1
1
  ---
2
2
  name: linear-task-management
3
- description: "Creates and names Linear issues, assigns labels and priorities, manages status transitions, and links issues to PRs. Use when decomposing features into tasks or resuming interrupted sessions. Trigger terms: tickets, backlog, task breakdown, project board, sprint planning"
3
+ description: "Linear issue conventions: naming, labels, priorities, status transitions and PR links. Use when creating or updating Linear issues, breaking a feature into Linear tasks, or resuming work tracked in Linear."
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
  # Task Management with Linear
9
7
 
10
8
  Team, workflow states and labels: `.opencastle/project/linear-config.md`. Docs: https://linear.app/docs/mcp
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: netlify-deployment
3
- description: "Deploy sites, configure serverless and edge functions, and verify builds on Netlify. Use when the user mentions: 'deploy preview', 'configure netlify.toml', or 'debug a failed deploy'. Trigger terms: build error, Netlify Functions, deploy logs, deploy preview"
3
+ description: "Netlify deploys, deploy previews, netlify.toml, serverless and edge functions. Use when deploying to Netlify, configuring netlify.toml or functions, or debugging a failed Netlify build."
4
4
  ---
5
5
 
6
6
  # Netlify Deployment
7
7
 
8
8
  Project deployment architecture, env vars, and key files: `.opencastle/stack/deployment-config.md`. Docs: https://docs.netlify.com
9
9
 
10
- `main` → production (auto). `feature/*`, `fix/*` → deploy preview at a unique URL (auto).
10
+ `main` → production (auto). Every other branch (`feat/*`, `fix/*`, …) → deploy preview at a unique URL (auto).
11
11
 
12
12
  ## Hard limits
13
13
 
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  name: nextjs-framework
3
- description: "Explains how to configure App Router, implement server/client components, optimize data fetching, and secure routes. Use when the user mentions: 'add an authenticated route', 'migrate to App Router', 'optimize fetch caching', or 'fix RSC hydration'."
3
+ description: "Next.js App Router conventions, server and client components, data fetching, caching and route protection, by Next version. Use when building or debugging a Next.js app, its caching, middleware/proxy or hydration 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
  # Next.js Framework
9
7
 
8
+ Check the `next` version in `package.json` first: caching and the request-interception file changed in 15 and 16.
9
+
10
+ The integration configures `next-devtools-mcp` (MCP server `next-devtools`). With the dev server running it reports build and runtime errors, logs, and route and page metadata — read those before guessing at a failure.
11
+
10
12
  ### Critical rule
11
13
 
12
14
  **Never use `next/dynamic` with `{ ssr: false }` inside a Server Component** — it crashes at build/runtime. Extract it into a `'use client'` wrapper and import that from the server normally.
@@ -24,12 +26,17 @@ export function MapClient(props: MapProps) { return <Map {...props} />; }
24
26
  - `error.tsx` must be a Client Component, and needs to exist per segment — otherwise an unhandled error takes down the page. `template.tsx` re-mounts on navigation where `layout.tsx` persists. `default.tsx` is the parallel-route fallback.
25
27
  - Independent fetches awaited in sequence become a waterfall — use `Promise.all()`. Fetching in `useEffect` where a Server Component could fetch costs an extra roundtrip plus a loading flash.
26
28
  - `getServerSideProps` / `getStaticProps` are Pages Router only; App Router uses async Server Components.
27
- - Auth: check the session at the top of an async Server Component and `redirect('/login')` before returning any UI. Middleware with `matcher: ['/dashboard/:path*']` covers whole subtrees.
29
+ - 15+: `params`, `searchParams`, `cookies()` and `headers()` are async — await them.
30
+ - Auth: check the session at the top of an async Server Component and `redirect('/login')` before returning any UI. Request interception with `matcher: ['/dashboard/:path*']` covers whole subtrees: `middleware.ts` up to 15, `proxy.ts` (exporting `proxy`) from 16.
28
31
  - Dynamic segments: `[slug]`, catch-all `[...slug]`, optional catch-all `[[...slug]]`.
29
32
  - Put providers in a `Providers` Client Component rather than growing `layout.tsx`; `'use client'` on everything defeats RSC.
30
33
 
31
- ### Caching layers
34
+ ### Caching, by version
35
+
36
+ - **14 and earlier:** `fetch` is cached by default (opt out with `cache: 'no-store'`), GET Route Handlers are static by default.
37
+ - **15:** nothing is cached unless you ask. `fetch`, GET Route Handlers and client navigations are uncached by default; opt in with `cache: 'force-cache'`, `export const dynamic = 'force-static'`, or `staleTimes`.
38
+ - **16:** the 15 defaults, plus Cache Components (`cacheComponents: true`): opt in with `"use cache"` on a function or component, `cacheLife()` for lifetime and `cacheTag()` for tags. `revalidateTag(tag, profile)` takes a `cacheLife` profile (e.g. `'max'`) and serves stale while it refreshes; `updateTag(tag)`, Server Actions only, expires the tag so the user reads their own write.
32
39
 
33
- Four tiers: per-request `fetch` memoization (automatic) → Data Cache (cross-request, cached by default, opt out with `cache: 'no-store'`) → Full Route Cache (static HTML + RSC payload at build) → client Router Cache (prefetched and visited routes). Tag with `fetch(url, { next: { tags: ['posts'] } })`, then invalidate from a Server Action via `revalidateTag('posts')` or `revalidatePath('/posts')`.
40
+ Tag with `fetch(url, { next: { tags: ['posts'] } })` (or `cacheTag`), invalidate from a Server Action with `revalidateTag` / `revalidatePath('/posts')`.
34
41
 
35
42
  Docs: https://nextjs.org/docs
@@ -15,31 +15,35 @@ export const config: PluginConfig = {
15
15
  },
16
16
  authType: 'oauth',
17
17
  envVars: [],
18
+ // The hosted server's tool names (developers.notion.com/docs/mcp-supported-tools):
19
+ // `notion-update-page` both edits a page and appends to it.
18
20
  agentToolMap: {
19
21
  'team-lead': [
20
- 'Notion/search',
21
- 'Notion/create_page',
22
- 'Notion/update_page',
23
- 'Notion/query_database',
24
- 'Notion/append_block_children',
22
+ 'Notion/notion-search',
23
+ 'Notion/notion-fetch',
24
+ 'Notion/notion-create-pages',
25
+ 'Notion/notion-update-page',
26
+ 'Notion/notion-query-data-sources',
25
27
  ],
26
28
  'researcher': [
27
- 'Notion/search',
28
- 'Notion/create_page',
29
- 'Notion/append_block_children',
30
- 'Notion/query_database',
29
+ 'Notion/notion-search',
30
+ 'Notion/notion-fetch',
31
+ 'Notion/notion-create-pages',
32
+ 'Notion/notion-update-page',
33
+ 'Notion/notion-query-data-sources',
31
34
  ],
32
35
  'writer': [
33
- 'Notion/search',
34
- 'Notion/create_page',
35
- 'Notion/update_page',
36
- 'Notion/append_block_children',
36
+ 'Notion/notion-search',
37
+ 'Notion/notion-fetch',
38
+ 'Notion/notion-create-pages',
39
+ 'Notion/notion-update-page',
37
40
  ],
38
41
  'architect': [
39
- 'Notion/search',
40
- 'Notion/create_page',
41
- 'Notion/update_page',
42
- 'Notion/query_database',
42
+ 'Notion/notion-search',
43
+ 'Notion/notion-fetch',
44
+ 'Notion/notion-create-pages',
45
+ 'Notion/notion-update-page',
46
+ 'Notion/notion-query-data-sources',
43
47
  ],
44
48
  },
45
49
  docsUrl: 'https://www.opencastle.dev/docs/plugins#notion',
@@ -1,31 +1,23 @@
1
1
  ---
2
2
  name: notion-knowledge-management
3
- description: "Creates Notion pages and databases, applies templates for research docs, ADRs, and specs, and manages team knowledge bases. Use when creating Notion pages, structuring databases, documenting decisions, or capturing research findings."
3
+ description: "Notion pages, databases and team knowledge bases through the hosted Notion MCP, with templates for research docs, ADRs, specs and meeting notes. Use when reading, creating or updating Notion pages or querying a Notion database."
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
  # Knowledge Management with Notion
9
7
 
10
- MCP endpoint `https://mcp.notion.com/mcp` (OAuth). Tools: `search`, `create_page`, `update_page`, `append_block_children`, `query_database`. Docs: https://developers.notion.com/docs/mcp
8
+ Hosted Notion MCP at `https://mcp.notion.com/mcp` (OAuth, acting as the signed-in user). Tools: `notion-search`, `notion-fetch`, `notion-create-pages`, `notion-update-page`, `notion-query-data-sources`, `notion-create-comment`. Full list: https://developers.notion.com/docs/mcp-supported-tools
11
9
 
12
10
  ## Gotchas
13
11
 
14
- - **`search` only returns pages explicitly shared with the integration.** An empty result usually means missing access, not a missing page — ask the user to share the parent page rather than creating a duplicate.
15
- - Notion's index lags writes. A page you just created can be absent from `search` for ~30s; retry before concluding the create failed.
16
- - `create_page` needs a real `parent` (`{ "page_id": "..." }`) obtained from `search` first — always search for the parent before creating, then verify the new page by searching its exact title and confirming `parent` matches.
17
- - Page titles are a rich-text array, not a string:
18
- `"properties": { "title": [{ "type": "text", "text": { "content": "[Spec] Price Range Filter" } }] }`
19
- - Databases take `query_database` (with `filter` / `sorts`); ordinary pages take `append_block_children`. Using the wrong one fails.
20
-
21
- ```json
22
- // query_database
23
- { "database_id": "db_id", "filter": { "property": "Status", "select": { "equals": "In Progress" } }, "sorts": [{ "timestamp": "last_edited_time", "direction": "descending" }] }
24
- ```
12
+ - Results are limited to what the connected account can open. An empty `notion-search` usually means missing access, not a missing page — ask the user to share the parent rather than creating a duplicate.
13
+ - `notion-create-pages` needs a `parent` (page or database), so find it with `notion-search` first, then `notion-fetch` the new page to confirm it landed under that parent.
14
+ - Content is Notion-flavored Markdown, not block JSON. `notion-fetch` a page before `notion-update-page` so an edit keeps mentions, links and inline dates.
15
+ - A database holds one or more **data sources** (`collection://…` URLs). `notion-fetch` the database to get the data source and its schema, then read rows with `notion-query-data-sources`.
16
+ - `notion-search` and `notion-query-data-sources` share a rate limit of about 20 calls per 10 seconds; batch reads instead of looping.
25
17
 
26
18
  ## Document conventions
27
19
 
28
- Place pages under the right parent (e.g. Engineering/Specs) and close the loop by appending implementation links back to the spec. Required sections per type:
20
+ Place pages under the right parent (e.g. Engineering/Specs) and close the loop by adding implementation links back to the spec. Required sections per type:
29
21
 
30
22
  - **Research** — Summary, Sources (URL + why relevant), Key Findings, Implications, Open Questions.
31
23
  - **ADR** — `ADR-NNN: <title>`, Status (Proposed | Accepted | Deprecated | Superseded), Date, Context, Decision, Consequences, Alternatives Considered (with why rejected).
@@ -1,10 +1,8 @@
1
1
  ---
2
2
  name: nx-workspace
3
- description: "Run and generate NX targets, configure project.json, and visualize dependency graphs. Use when you say: 'run affected tests', 'nx generate a library', 'configure project.json', or 'show dependency graph'."
3
+ description: "Nx workspace rules: running targets, affected commands, generators, project.json and the Nx MCP tools. Use when running or generating anything in an Nx monorepo, editing project.json, or reading its dependency graph."
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
  # NX Workspace
9
7
 
10
8
  Docs: https://nx.dev/getting-started/intro. Project name → location mapping: `.opencastle/project.instructions.md`.
@@ -21,7 +19,7 @@ Always `npx nx run <project>:<target>` for one project, `npx nx affected -t <tar
21
19
 
22
20
  ## Requirements
23
21
 
24
- - Minimum coverage **95%** for new components/functions. Reports land in `reports/coverage/jest/`.
22
+ - Coverage must meet the threshold in the project's test config; reports land in the path that config sets.
25
23
  - Lint always with `--fix`. CSS/SCSS uses a separate target: `npx nx run <project>:lint-styles --fix`.
26
24
  - `npx nx run <project>:test -u` updates snapshots. `npx nx format --fix` after any generation.
27
25
 
@@ -1,10 +1,8 @@
1
1
  ---
2
2
  name: playwright-testing
3
- description: "Playwright E2E testing patterns, cross-browser configuration, page objects, and CI setup. Use when creating E2E specs, visual regression suites, or configuring Playwright in CI. Trigger terms: playwright, e2e, trace, page object, cross-browser"
3
+ description: "Playwright E2E tests: page objects, cross-browser projects, traces and CI setup. Use when writing or debugging Playwright specs, or configuring Playwright in CI."
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
  # Playwright Testing
9
7
 
10
8
  Project test config and breakpoints: `.opencastle/stack/testing-config.md`. Docs: https://playwright.dev/docs/intro
@@ -1,10 +1,8 @@
1
1
  ---
2
2
  name: prisma-database
3
- description: "Prisma ORM schema design, migrations, client generation, and query patterns. Use when designing database schemas, writing migrations, querying data, or managing Prisma Client."
3
+ description: "Prisma schema design, migrations, client generation and query patterns. Use when changing a Prisma schema, writing a migration, or querying with Prisma Client."
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
  # Prisma Database
9
7
 
10
8
  Project schema and connection details: `.opencastle/stack/database-config.md`. Docs: https://www.prisma.io/docs
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: resend-email
3
- description: "Resend transactional email patterns, React Email templates, domain configuration, and webhook handling. Use when sending emails, building email templates, or configuring email delivery."
3
+ description: "Resend transactional email, React Email templates, domain setup and webhooks. Use when sending email with Resend, building an email template, or configuring email delivery."
4
4
  ---
5
5
 
6
6
  # Resend Email
@@ -27,4 +27,4 @@ Failures here are nearly always DNS propagation, a wrong API key scope, or a mis
27
27
 
28
28
  ## Templates
29
29
 
30
- `npm install resend @react-email/components`. Build templates from `@react-email/components` primitives (`Html`, `Head`, `Body`, `Container`, `Heading`, `Text`, `Button`) — plain HTML/CSS is unreliable across clients. Preview locally with `npx email dev`.
30
+ `npm install resend @react-email/components`. Build templates from `@react-email/components` primitives (`Html`, `Head`, `Body`, `Container`, `Heading`, `Text`, `Button`) — plain HTML/CSS is unreliable across clients. Preview locally with `npx react-email dev` — the preview server is the `react-email` package, which `@react-email/components` does not install.
@@ -1,10 +1,8 @@
1
1
  ---
2
2
  name: sanity-cms
3
- description: "Manages Sanity CMS schemas, GROQ queries, dataset exports/imports, and Studio configuration. Use when updating Sanity schemas, running GROQ or Vision queries, exporting datasets, modifying content models, or configuring a headless CMS with Sanity.io."
3
+ description: "Sanity schemas, GROQ queries, Studio configuration and dataset imports and exports. Use when changing a Sanity content model, writing GROQ, or moving Sanity datasets."
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
  # Sanity CMS
9
7
 
10
8
  Project config, schemas, plugins, document types, and GROQ examples: `.opencastle/stack/sanity-config.md`. Docs: https://www.sanity.io/docs
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: sentry-monitoring
3
- description: "Sentry error monitoring, SDK initialization, performance tracing, source maps, session replay, and release tracking. Use when adding Sentry to a project, capturing errors with context, setting up distributed tracing, configuring source maps, or debugging production issues."
3
+ description: "Sentry SDK setup, error capture with context, tracing, source maps, session replay and releases. Use when adding Sentry to a project, configuring tracing or source maps, or debugging a production error in Sentry."
4
4
  ---
5
5
 
6
6
  # Sentry Monitoring
@@ -1,10 +1,8 @@
1
1
  ---
2
2
  name: slack-notifications
3
- description: "Slack MCP integration for agent-to-human notifications and bi-directional communication. Use when agents need to post progress updates, request approvals, or read user responses via Slack channels and threads."
3
+ description: "Slack MCP for agent-to-human messages: progress updates, approval requests and reading replies. Use when an agent needs to notify people or get an approval through Slack."
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
  # Slack Notifications
9
7
 
10
8
  Package `@kazuph/mcp-slack` (stdio). Docs: https://api.slack.com/docs. Channel mappings: `.opencastle/stack/notifications-config.md`
@@ -1,10 +1,8 @@
1
1
  ---
2
2
  name: strapi-cms
3
- description: "Builds Strapi content types, extends controllers and services, implements lifecycle hooks, and configures REST/GraphQL APIs. Use when creating content types, writing custom controllers, developing Strapi plugins, or querying the API."
3
+ description: "Strapi content types, custom controllers and services, lifecycle hooks, and REST/GraphQL APIs. Use when changing a Strapi content model, extending its API, or building a Strapi plugin."
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
  # Strapi CMS
9
7
 
10
8
  Project config, content types, and deployment details: `.opencastle/stack/cms-config.md`. Docs: https://docs.strapi.io/
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: stripe-payments
3
- description: "Stripe payment integration patterns, Checkout Sessions, billing/subscriptions, Connect platforms, and API best practices. Use when building, modifying, or reviewing any Stripe integration — including accepting payments, building marketplaces, setting up subscriptions, or implementing secure key handling."
3
+ description: "Stripe integration rules: API selection, Checkout Sessions, subscriptions, Connect, webhooks and key handling. Use when building, changing or reviewing a Stripe integration."
4
4
  ---
5
5
 
6
6
  # Stripe Payments
7
7
 
8
- Latest API version: **2026-03-25.dahlia**. Pin it explicitly on the client unless told otherwise.
8
+ Read the API version before writing code: the account's pinned version (Workbench, or the `Stripe-Version` header on any response) and the Stripe changelog (below) for anything newer. Pin the chosen version explicitly on the client unless told otherwise.
9
9
 
10
10
  ## Never use
11
11
 
@@ -23,10 +23,10 @@ Charges API, Sources API, Tokens API, legacy Card Element, Payment Element in ca
23
23
 
24
24
  - Verify webhook signatures against the **raw** request body (`await request.text()`) — a parsed JSON body fails verification.
25
25
  - Restricted keys (`rk_`) over secret keys (`sk_`); neither ever ships client-side (use ephemeral keys). Always pass `state` in Connect OAuth.
26
- - Stripe.js is evergreen, biannual, and hard-paired to its API version — no override: `https://js.stripe.com/dahlia/stripe.js`. Java/Go/.NET SDKs also fix the version to the release; bump the package instead of setting `apiVersion`.
26
+ - Stripe.js is versioned by release name in its URL (`https://js.stripe.com/<release>/stripe.js`) and hard-paired to that release's API version — no override. Java/Go/.NET SDKs also fix the version to the release; bump the package instead of setting `apiVersion`.
27
27
  - Store Stripe object IDs in columns accommodating 255 chars with case-sensitive collation.
28
28
  - Breaking changes to grep for: `paymentIntent.charges` removed 2022-11-15 → `stripe.charges.retrieve(pi.latest_charge)`; `invoice.lines.data` → `stripe.invoices.listLineItems()` 2023-08-16.
29
- - Test locally with `stripe listen --forward-to localhost:3000/api/webhooks` and `stripe trigger <event> --api-version 2026-03-25.dahlia`; probe a new version with the `Stripe-Version` header before promoting it to default.
29
+ - Test locally with `stripe listen --forward-to localhost:3000/api/webhooks` and `stripe trigger <event> --api-version <version>`; probe a new version with the `Stripe-Version` header before promoting it to default.
30
30
  - `stripe plugin install projects` then `stripe projects init` writes `stripe-project.json` and a `.stripe/` directory of local skills — prefer those local skills afterwards.
31
31
 
32
32
  Docs: [changelog](https://docs.stripe.com/changelog) · [integration options](https://docs.stripe.com/payments/payment-methods/integration-options) · [go-live checklist](https://docs.stripe.com/get-started/checklist/go-live)
@@ -1,10 +1,8 @@
1
1
  ---
2
2
  name: supabase-database
3
- description: "Generates Supabase database migrations, writes RLS policies with auth.uid(), configures auth integration, and generates TypeScript types. Use when creating tables, writing migrations, configuring RLS, or implementing Supabase auth."
3
+ description: "Supabase migrations, RLS policies, auth integration and generated TypeScript types. Use when creating Supabase tables or migrations, writing RLS policies, or wiring Supabase auth."
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
  # Supabase Database
9
7
 
10
8
  Project schema, roles, migration history, auth flow, and key files: `.opencastle/stack/supabase-config.md`. Docs: https://supabase.com/docs
@@ -14,7 +12,7 @@ Project schema, roles, migration history, auth flow, and key files: `.opencastle
14
12
  - **`ENABLE ROW LEVEL SECURITY` with no policy denies everything.** Enabling and adding policies must land in the same migration.
15
13
  - Policies are per-operation. `FOR SELECT USING (...)` does not cover writes; `INSERT` needs `WITH CHECK`, not `USING`.
16
14
  - `auth.uid()` is the owner check (`auth.uid() = id`). It is `NULL` for the `anon` role, so any policy relying on it silently blocks anonymous access.
17
- - Test every policy against **all three** roles — `anon`, `user`, `admin`. A policy that works as your own user tells you nothing about `anon`.
15
+ - Policies target the Postgres roles `anon`, `authenticated` and `service_role` (which bypasses RLS). Test every policy as `anon` and as `authenticated`, plus any app-level role your policies check. A policy that works as your own user tells you nothing about `anon`.
18
16
  - Reference `auth.users(id)` with `ON DELETE CASCADE` on profile-style tables, or deleted users leave orphans.
19
17
 
20
18
  Confirm RLS coverage before shipping:
@@ -25,7 +23,7 @@ SELECT tablename, rowsecurity FROM pg_tables WHERE schemaname = 'public';
25
23
 
26
24
  ## Migration workflow
27
25
 
28
- 1. Name migrations `YYYYMMDD_add_profiles.sql`; comment intent and rollback considerations inline.
26
+ 1. Create the file with `supabase migration new add_profiles` (it writes `supabase/migrations/<14-digit timestamp>_add_profiles.sql`); comment intent and rollback considerations inline.
29
27
  2. Apply to a local/ephemeral DB; run smoke tests plus per-role RLS checks.
30
28
  3. Review the SQL for destructive actions (table drops, column rewrites) — those need a backfill script and phased rollout, never a single migration.
31
29
  4. Re-run in CI against a test replica with the full suite.
@@ -1,10 +1,8 @@
1
1
  ---
2
2
  name: teams-notifications
3
- description: "Microsoft Teams MCP integration for agent-to-human notifications and bi-directional communication. Use when agents need to post progress updates, request approvals, or read user responses via Teams channels and chats."
3
+ description: "Microsoft Teams MCP for agent-to-human messages: progress updates, approval requests and reading replies. Use when an agent needs to notify people or get an approval through Teams."
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
  # Teams Notifications
9
7
 
10
8
  ## MCP Server
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: trello-task-management
3
- description: "Create and manage Trello cards, checklists, and boards for kanban workflows. Use when the user says: 'create a kanban board', 'add a task card', 'move card to sprint', or 'track project board'."
3
+ description: "Trello cards, checklists and boards for kanban tracking. Use when creating or moving Trello cards, adding checklists, or tracking work on a Trello board."
4
4
  ---
5
5
 
6
6
  # Task Management with Trello
@@ -1,42 +1,23 @@
1
1
  ---
2
2
  name: turborepo-monorepo
3
- description: "Configure pipelines, set up local/remote caching, and run scoped tasks in a Turborepo monorepo. Use when you say: 'enable remote caching', 'optimize pipeline inputs/outputs', or 'filter builds to affected packages'."
3
+ description: "Turborepo task pipelines, caching and package filtering. Use when editing turbo.json, running tasks for changed or filtered packages, or debugging cache misses and remote caching."
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
  # Turborepo Monorepo
9
7
 
10
8
  ## Commands
11
9
 
12
- ### Running Tasks
13
-
14
10
  ```bash
15
- turbo run build # Build all packages
16
- turbo run test # Test all packages
17
- turbo run lint # Lint all packages
18
- turbo run build --filter=web # Build specific package
19
- turbo run build --filter=./apps/* # Build all apps
20
- turbo run build --filter=...[HEAD~1] # Only affected since last commit
11
+ turbo run build # Build all packages
12
+ turbo run build --filter=web # One package
13
+ turbo run build --filter=./apps/* # All apps
14
+ turbo run build test lint --affected # Only packages changed vs the default branch (CI)
15
+ turbo run build --dry-run # Preview what would run
16
+ turbo run build --graph # Visualize task graph
17
+ turbo run build --force # Ignore cache, rebuild all
21
18
  ```
22
19
 
23
- ### Common Patterns
24
-
25
- ```bash
26
- turbo run build test lint # Run multiple tasks
27
- turbo run build --dry-run # Preview what would run
28
- turbo run build --graph # Visualize task graph
29
- turbo run build --force # Ignore cache, rebuild all
30
- turbo run build --concurrency=4 # Limit parallelism
31
- ```
32
-
33
- ### Forbidden Commands
34
-
35
- ```bash
36
- # NEVER use these directly — always go through turbo:
37
- npm run build # Skips caching and parallelism
38
- cd apps/web && npm test # Skips dependency resolution
39
- ```
20
+ Run tasks through `turbo run` (or a root script that wraps it). `cd apps/web && npm test` skips caching and dependency order.
40
21
 
41
22
  ## Pipeline Configuration (turbo.json)
42
23
 
@@ -63,69 +44,15 @@ cd apps/web && npm test # Skips dependency resolution
63
44
  }
64
45
  ```
65
46
 
66
- ### Key Concepts
67
-
68
47
  - `^build` — run `build` in dependencies first (topological)
69
- - `dependsOn` — declare task dependencies
70
- - `outputs` — files to cache (miss = rebuild)
71
- - `inputs` — files to hash for cache key (default: all tracked files)
72
- - `cache: false` — never cache (use for `dev`, `start`)
73
- - `persistent: true` — long-running tasks (dev servers)
48
+ - `outputs` — files to cache; leave them out and a cache hit restores no files
49
+ - `inputs` — files hashed for the cache key (default: all tracked files in the package)
50
+ - `cache: false` + `persistent: true` — long-running tasks (dev servers)
74
51
 
75
52
  ## Caching
76
53
 
77
- ### Local Cache
78
-
79
- Turborepo caches task outputs automatically in `node_modules/.cache/turbo`. Cache keys are computed from:
80
-
81
- 1. Task inputs (source files)
82
- 2. Environment variables
83
- 3. Dependencies' build outputs
84
- 4. `turbo.json` configuration
85
-
86
- ### Remote Cache
87
-
88
- ```bash
89
- turbo login # Authenticate
90
- turbo link # Link project to remote cache
91
- turbo run build --remote-only # Force remote cache usage
92
- ```
93
-
94
- - Shares cache across CI and team members
95
- - Vercel Remote Cache or self-hosted (Ducktape, TurboCache)
96
- - Set `TURBO_TOKEN` and `TURBO_TEAM` in CI environment
97
-
98
- ## Quick Workflow: Setup remote caching in CI
99
- 1. Add `TURBO_TOKEN` and `TURBO_TEAM` to your CI secrets.
100
- 2. Locally run `turbo login` and `turbo link` to verify the project is linked.
101
- 3. Add `turbo run build --remote` to the CI pipeline and watch for cache hit/miss logs.
102
- 4. If cache misses persist: verify `inputs`/`outputs` in `turbo.json`, stable env vars, then re-run.
103
-
104
- **Validation (recommended):** run `turbo run build --dry-run` locally or in CI to preview the task graph and catch misconfigured inputs/outputs before executing.
105
-
106
-
107
- ## Package Workspace Structure
108
-
109
- ```
110
- monorepo/
111
- ├── turbo.json
112
- ├── package.json # Root workspace config
113
- ├── apps/
114
- │ ├── web/ # Next.js app
115
- │ └── docs/ # Documentation site
116
- ├── packages/
117
- │ ├── ui/ # Shared UI components
118
- │ ├── config/ # Shared config (ESLint, TS)
119
- │ └── utils/ # Shared utilities
120
- ```
121
-
122
- ## Best Practices
54
+ The local cache lives in `.turbo/cache` (Turborepo 2.0+). Keys hash task inputs, declared env vars, dependencies' outputs and `turbo.json`. An env var the build reads but `env` does not declare causes stale hits; one that changes every run causes constant misses.
123
55
 
124
- - Always use `turbo run` instead of directly invoking package scripts
125
- - Define `outputs` for every cacheable task — missing outputs mean missing cache
126
- - Use `--filter` to scope commands to affected packages
127
- - Set `inputs` to narrow cache keys and avoid unnecessary rebuilds
128
- - Use `--dry-run` to debug pipeline configuration
129
- - Add `TURBO_TOKEN` and `TURBO_TEAM` to CI for remote caching
130
- - Never commit `.turbo/` or `node_modules/.cache/turbo`
56
+ Remote cache: `turbo login` and `turbo link` locally; in CI set `TURBO_TOKEN` and `TURBO_TEAM` and a plain `turbo run` reads and writes it. Persistent misses → check `inputs`/`outputs`/`env` in `turbo.json`, then compare runs with `--dry-run=json`.
131
57
 
58
+ Never commit `.turbo/`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: vercel-deployment
3
- description: "Vercel deployment workflows, environment management, domain configuration, and build troubleshooting. Use when deploying, checking deployment status, reviewing build logs, or managing environments."
3
+ description: "Vercel deployments, environments, domains and build troubleshooting through the Vercel MCP. Use when deploying to Vercel, checking a deployment, reading its build or runtime logs, or managing its environments."
4
4
  ---
5
5
 
6
6
  # Vercel Deployment
@@ -14,7 +14,7 @@ Branch → Environment mapping:
14
14
  | Branch pattern | Environment |
15
15
  |----------------|-------------|
16
16
  | `main` | Production deployment (auto) |
17
- | `feature/*`, `fix/*` | Preview deployment (auto) |
17
+ | Any other branch (`feat/*`, `fix/*`, …) | Preview deployment (auto) |
18
18
 
19
19
  ## MCP Tools
20
20