opencode-skills-collection 3.0.35 → 3.0.37

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 (238) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +15 -1
  2. package/bundled-skills/accesslint-audit/SKILL.md +115 -0
  3. package/bundled-skills/accesslint-diff/SKILL.md +81 -0
  4. package/bundled-skills/accesslint-scan/SKILL.md +47 -0
  5. package/bundled-skills/composition-patterns/SKILL.md +87 -0
  6. package/bundled-skills/composition-patterns/rules/_sections.md +29 -0
  7. package/bundled-skills/composition-patterns/rules/_template.md +24 -0
  8. package/bundled-skills/composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
  9. package/bundled-skills/composition-patterns/rules/architecture-compound-components.md +112 -0
  10. package/bundled-skills/composition-patterns/rules/patterns-children-over-render-props.md +87 -0
  11. package/bundled-skills/composition-patterns/rules/patterns-explicit-variants.md +100 -0
  12. package/bundled-skills/composition-patterns/rules/react19-no-forwardref.md +42 -0
  13. package/bundled-skills/composition-patterns/rules/state-context-interface.md +191 -0
  14. package/bundled-skills/composition-patterns/rules/state-decouple-implementation.md +113 -0
  15. package/bundled-skills/composition-patterns/rules/state-lift-state.md +125 -0
  16. package/bundled-skills/debugging-toolkit/SKILL.md +35 -0
  17. package/bundled-skills/deploy-to-vercel/SKILL.md +304 -0
  18. package/bundled-skills/deploy-to-vercel/resources/deploy-codex.sh +301 -0
  19. package/bundled-skills/deploy-to-vercel/resources/deploy.sh +301 -0
  20. package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
  21. package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
  22. package/bundled-skills/docs/maintainers/backups/README-2026-06-02.md +687 -0
  23. package/bundled-skills/docs/maintainers/repo-growth-seo.md +4 -4
  24. package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
  25. package/bundled-skills/docs/users/bundles.md +245 -1
  26. package/bundled-skills/docs/users/claude-code-skills.md +1 -1
  27. package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
  28. package/bundled-skills/docs/users/getting-started.md +1 -1
  29. package/bundled-skills/docs/users/kiro-integration.md +1 -1
  30. package/bundled-skills/docs/users/plugins.md +21 -13
  31. package/bundled-skills/docs/users/specialized-plugin-roadmap.md +95 -0
  32. package/bundled-skills/docs/users/usage.md +4 -4
  33. package/bundled-skills/docs/users/visual-guide.md +4 -4
  34. package/bundled-skills/polis-protocol/SKILL.md +93 -0
  35. package/bundled-skills/python-development/SKILL.md +35 -0
  36. package/bundled-skills/radix-ui-design-system/SKILL.md +2 -2
  37. package/bundled-skills/react-native-skills/SKILL.md +120 -0
  38. package/bundled-skills/react-native-skills/rules/_sections.md +86 -0
  39. package/bundled-skills/react-native-skills/rules/_template.md +28 -0
  40. package/bundled-skills/react-native-skills/rules/animation-derived-value.md +53 -0
  41. package/bundled-skills/react-native-skills/rules/animation-gesture-detector-press.md +95 -0
  42. package/bundled-skills/react-native-skills/rules/animation-gpu-properties.md +65 -0
  43. package/bundled-skills/react-native-skills/rules/design-system-compound-components.md +66 -0
  44. package/bundled-skills/react-native-skills/rules/fonts-config-plugin.md +71 -0
  45. package/bundled-skills/react-native-skills/rules/imports-design-system-folder.md +68 -0
  46. package/bundled-skills/react-native-skills/rules/js-hoist-intl.md +61 -0
  47. package/bundled-skills/react-native-skills/rules/list-performance-callbacks.md +44 -0
  48. package/bundled-skills/react-native-skills/rules/list-performance-function-references.md +132 -0
  49. package/bundled-skills/react-native-skills/rules/list-performance-images.md +53 -0
  50. package/bundled-skills/react-native-skills/rules/list-performance-inline-objects.md +97 -0
  51. package/bundled-skills/react-native-skills/rules/list-performance-item-expensive.md +94 -0
  52. package/bundled-skills/react-native-skills/rules/list-performance-item-memo.md +82 -0
  53. package/bundled-skills/react-native-skills/rules/list-performance-item-types.md +104 -0
  54. package/bundled-skills/react-native-skills/rules/list-performance-virtualize.md +67 -0
  55. package/bundled-skills/react-native-skills/rules/monorepo-native-deps-in-app.md +46 -0
  56. package/bundled-skills/react-native-skills/rules/monorepo-single-dependency-versions.md +63 -0
  57. package/bundled-skills/react-native-skills/rules/navigation-native-navigators.md +188 -0
  58. package/bundled-skills/react-native-skills/rules/react-compiler-destructure-functions.md +50 -0
  59. package/bundled-skills/react-native-skills/rules/react-compiler-reanimated-shared-values.md +48 -0
  60. package/bundled-skills/react-native-skills/rules/react-state-dispatcher.md +91 -0
  61. package/bundled-skills/react-native-skills/rules/react-state-fallback.md +56 -0
  62. package/bundled-skills/react-native-skills/rules/react-state-minimize.md +65 -0
  63. package/bundled-skills/react-native-skills/rules/rendering-no-falsy-and.md +74 -0
  64. package/bundled-skills/react-native-skills/rules/rendering-text-in-text-component.md +36 -0
  65. package/bundled-skills/react-native-skills/rules/scroll-position-no-state.md +82 -0
  66. package/bundled-skills/react-native-skills/rules/state-ground-truth.md +80 -0
  67. package/bundled-skills/react-native-skills/rules/ui-expo-image.md +66 -0
  68. package/bundled-skills/react-native-skills/rules/ui-image-gallery.md +104 -0
  69. package/bundled-skills/react-native-skills/rules/ui-measure-views.md +78 -0
  70. package/bundled-skills/react-native-skills/rules/ui-menus.md +174 -0
  71. package/bundled-skills/react-native-skills/rules/ui-native-modals.md +77 -0
  72. package/bundled-skills/react-native-skills/rules/ui-pressable.md +61 -0
  73. package/bundled-skills/react-native-skills/rules/ui-safe-area-scroll.md +65 -0
  74. package/bundled-skills/react-native-skills/rules/ui-scrollview-content-inset.md +45 -0
  75. package/bundled-skills/react-native-skills/rules/ui-styling.md +87 -0
  76. package/bundled-skills/skill-issue/SKILL.md +73 -0
  77. package/bundled-skills/tdd-workflows/SKILL.md +35 -0
  78. package/bundled-skills/vercel-cli-with-tokens/SKILL.md +361 -0
  79. package/bundled-skills/vercel-optimize/CONTRIBUTING.md +41 -0
  80. package/bundled-skills/vercel-optimize/SKILL.md +331 -0
  81. package/bundled-skills/vercel-optimize/lib/auth-route.mjs +23 -0
  82. package/bundled-skills/vercel-optimize/lib/budget-summary.mjs +182 -0
  83. package/bundled-skills/vercel-optimize/lib/citations.mjs +139 -0
  84. package/bundled-skills/vercel-optimize/lib/cost-coverage.mjs +143 -0
  85. package/bundled-skills/vercel-optimize/lib/dedup-recs.mjs +325 -0
  86. package/bundled-skills/vercel-optimize/lib/deep-dive.mjs +350 -0
  87. package/bundled-skills/vercel-optimize/lib/display-labels.mjs +185 -0
  88. package/bundled-skills/vercel-optimize/lib/extract-claims.mjs +550 -0
  89. package/bundled-skills/vercel-optimize/lib/framework-support.mjs +67 -0
  90. package/bundled-skills/vercel-optimize/lib/gates/build-minutes-fanout.mjs +69 -0
  91. package/bundled-skills/vercel-optimize/lib/gates/cold-start.mjs +66 -0
  92. package/bundled-skills/vercel-optimize/lib/gates/contract.mjs +79 -0
  93. package/bundled-skills/vercel-optimize/lib/gates/cwv-poor.mjs +87 -0
  94. package/bundled-skills/vercel-optimize/lib/gates/external-api-slow.mjs +55 -0
  95. package/bundled-skills/vercel-optimize/lib/gates/hard-gates.mjs +73 -0
  96. package/bundled-skills/vercel-optimize/lib/gates/index.mjs +45 -0
  97. package/bundled-skills/vercel-optimize/lib/gates/isr-overrevalidation.mjs +62 -0
  98. package/bundled-skills/vercel-optimize/lib/gates/middleware-heavy.mjs +51 -0
  99. package/bundled-skills/vercel-optimize/lib/gates/observability-events-attribution.mjs +56 -0
  100. package/bundled-skills/vercel-optimize/lib/gates/platform-bot-protection.mjs +115 -0
  101. package/bundled-skills/vercel-optimize/lib/gates/platform-fluid-compute.mjs +83 -0
  102. package/bundled-skills/vercel-optimize/lib/gates/region-misconfig.mjs +64 -0
  103. package/bundled-skills/vercel-optimize/lib/gates/route-errors.mjs +80 -0
  104. package/bundled-skills/vercel-optimize/lib/gates/scanner-driven.mjs +122 -0
  105. package/bundled-skills/vercel-optimize/lib/gates/select-candidates.mjs +134 -0
  106. package/bundled-skills/vercel-optimize/lib/gates/slow-route.mjs +88 -0
  107. package/bundled-skills/vercel-optimize/lib/gates/types.d.ts +38 -0
  108. package/bundled-skills/vercel-optimize/lib/gates/uncached-route.mjs +93 -0
  109. package/bundled-skills/vercel-optimize/lib/gates/usage-spike-triage.mjs +121 -0
  110. package/bundled-skills/vercel-optimize/lib/grade-recommendation.mjs +155 -0
  111. package/bundled-skills/vercel-optimize/lib/impact-label.mjs +126 -0
  112. package/bundled-skills/vercel-optimize/lib/impact-magnitude.mjs +60 -0
  113. package/bundled-skills/vercel-optimize/lib/investigation-brief.mjs +610 -0
  114. package/bundled-skills/vercel-optimize/lib/observation-safety.mjs +174 -0
  115. package/bundled-skills/vercel-optimize/lib/project-facts.mjs +99 -0
  116. package/bundled-skills/vercel-optimize/lib/queries.mjs +315 -0
  117. package/bundled-skills/vercel-optimize/lib/reconcile-candidates.mjs +372 -0
  118. package/bundled-skills/vercel-optimize/lib/render-report.mjs +955 -0
  119. package/bundled-skills/vercel-optimize/lib/repo-root.mjs +86 -0
  120. package/bundled-skills/vercel-optimize/lib/route-normalize.mjs +220 -0
  121. package/bundled-skills/vercel-optimize/lib/sanitizers/bot-protection-certainty.mjs +38 -0
  122. package/bundled-skills/vercel-optimize/lib/sanitizers/cache-tag-invalidation-certainty.mjs +30 -0
  123. package/bundled-skills/vercel-optimize/lib/sanitizers/count-correct.mjs +52 -0
  124. package/bundled-skills/vercel-optimize/lib/sanitizers/function-duration-invocations.mjs +38 -0
  125. package/bundled-skills/vercel-optimize/lib/sanitizers/index.mjs +79 -0
  126. package/bundled-skills/vercel-optimize/lib/sanitizers/middleware-conflict.mjs +36 -0
  127. package/bundled-skills/vercel-optimize/lib/sanitizers/missing-citation.mjs +16 -0
  128. package/bundled-skills/vercel-optimize/lib/sanitizers/pre-release.mjs +74 -0
  129. package/bundled-skills/vercel-optimize/lib/sanitizers/rate-limit.mjs +67 -0
  130. package/bundled-skills/vercel-optimize/lib/sanitizers/rendering-mode-mislabel.mjs +38 -0
  131. package/bundled-skills/vercel-optimize/lib/sanitizers/undeclared-dep.mjs +78 -0
  132. package/bundled-skills/vercel-optimize/lib/sanitizers/vercel-directive-strip.mjs +37 -0
  133. package/bundled-skills/vercel-optimize/lib/sanitizers/window-units.mjs +32 -0
  134. package/bundled-skills/vercel-optimize/lib/scanners/cache-components-suspense-dedupe.mjs +109 -0
  135. package/bundled-skills/vercel-optimize/lib/scanners/edge-heavy-import.mjs +94 -0
  136. package/bundled-skills/vercel-optimize/lib/scanners/force-dynamic.mjs +42 -0
  137. package/bundled-skills/vercel-optimize/lib/scanners/headers-in-page.mjs +44 -0
  138. package/bundled-skills/vercel-optimize/lib/scanners/index.mjs +35 -0
  139. package/bundled-skills/vercel-optimize/lib/scanners/large-static-asset.mjs +92 -0
  140. package/bundled-skills/vercel-optimize/lib/scanners/max-age-without-s-maxage.mjs +42 -0
  141. package/bundled-skills/vercel-optimize/lib/scanners/middleware-broad-matcher.mjs +55 -0
  142. package/bundled-skills/vercel-optimize/lib/scanners/missing-cache-headers.mjs +90 -0
  143. package/bundled-skills/vercel-optimize/lib/scanners/prisma-include-tree.mjs +42 -0
  144. package/bundled-skills/vercel-optimize/lib/scanners/region-pin-in-config.mjs +88 -0
  145. package/bundled-skills/vercel-optimize/lib/scanners/source-maps-production.mjs +36 -0
  146. package/bundled-skills/vercel-optimize/lib/scanners/sveltekit-prerender-missing.mjs +43 -0
  147. package/bundled-skills/vercel-optimize/lib/scanners/turbo-force-bypass.mjs +129 -0
  148. package/bundled-skills/vercel-optimize/lib/scanners/unoptimized-image.mjs +113 -0
  149. package/bundled-skills/vercel-optimize/lib/scanners/use-cache-date-stamp.mjs +106 -0
  150. package/bundled-skills/vercel-optimize/lib/support-topics.mjs +355 -0
  151. package/bundled-skills/vercel-optimize/lib/throttle.mjs +273 -0
  152. package/bundled-skills/vercel-optimize/lib/util.mjs +17 -0
  153. package/bundled-skills/vercel-optimize/lib/vercel.mjs +784 -0
  154. package/bundled-skills/vercel-optimize/lib/verify-claim.mjs +1296 -0
  155. package/bundled-skills/vercel-optimize/lib/workspace-resolver.mjs +521 -0
  156. package/bundled-skills/vercel-optimize/references/candidates.md +176 -0
  157. package/bundled-skills/vercel-optimize/references/data-collection.md +218 -0
  158. package/bundled-skills/vercel-optimize/references/docs-library.json +683 -0
  159. package/bundled-skills/vercel-optimize/references/doctrine.md +105 -0
  160. package/bundled-skills/vercel-optimize/references/observability-plus.md +108 -0
  161. package/bundled-skills/vercel-optimize/references/playbooks/README.md +53 -0
  162. package/bundled-skills/vercel-optimize/references/playbooks/ai-application.md +32 -0
  163. package/bundled-skills/vercel-optimize/references/playbooks/api-service.md +30 -0
  164. package/bundled-skills/vercel-optimize/references/playbooks/content-site.md +30 -0
  165. package/bundled-skills/vercel-optimize/references/playbooks/ecommerce.md +30 -0
  166. package/bundled-skills/vercel-optimize/references/playbooks/marketing.md +30 -0
  167. package/bundled-skills/vercel-optimize/references/playbooks/saas.md +31 -0
  168. package/bundled-skills/vercel-optimize/references/playbooks/sveltekit.md +75 -0
  169. package/bundled-skills/vercel-optimize/references/recommendations.md +203 -0
  170. package/bundled-skills/vercel-optimize/references/scanner-patterns.md +251 -0
  171. package/bundled-skills/vercel-optimize/references/scoring.md +205 -0
  172. package/bundled-skills/vercel-optimize/references/support-topics/README.md +46 -0
  173. package/bundled-skills/vercel-optimize/references/support-topics/astro-edge-middleware-scope.md +22 -0
  174. package/bundled-skills/vercel-optimize/references/support-topics/astro-output-mode-and-isr.md +22 -0
  175. package/bundled-skills/vercel-optimize/references/support-topics/auth-preserving-parallelization.md +22 -0
  176. package/bundled-skills/vercel-optimize/references/support-topics/bot-protection-product-guardrails.md +22 -0
  177. package/bundled-skills/vercel-optimize/references/support-topics/build-minutes-monorepo-fanout.md +23 -0
  178. package/bundled-skills/vercel-optimize/references/support-topics/cache-components-static-shell-boundaries.md +22 -0
  179. package/bundled-skills/vercel-optimize/references/support-topics/cache-components-suspense-dedupe-pitfall.md +23 -0
  180. package/bundled-skills/vercel-optimize/references/support-topics/cdn-cache-auth-safety.md +22 -0
  181. package/bundled-skills/vercel-optimize/references/support-topics/cold-start-initialization-bundle.md +22 -0
  182. package/bundled-skills/vercel-optimize/references/support-topics/core-web-vitals-client-bottlenecks.md +22 -0
  183. package/bundled-skills/vercel-optimize/references/support-topics/database-egress-pooling-region.md +22 -0
  184. package/bundled-skills/vercel-optimize/references/support-topics/dynamic-rendering-traps.md +22 -0
  185. package/bundled-skills/vercel-optimize/references/support-topics/external-api-critical-path-platform.md +22 -0
  186. package/bundled-skills/vercel-optimize/references/support-topics/external-api-critical-path.md +22 -0
  187. package/bundled-skills/vercel-optimize/references/support-topics/fast-data-transfer-payloads.md +22 -0
  188. package/bundled-skills/vercel-optimize/references/support-topics/fluid-compute-caveats.md +22 -0
  189. package/bundled-skills/vercel-optimize/references/support-topics/function-duration-io-and-after.md +22 -0
  190. package/bundled-skills/vercel-optimize/references/support-topics/function-invocation-reduction.md +22 -0
  191. package/bundled-skills/vercel-optimize/references/support-topics/function-region-misconfiguration-ttfb.md +23 -0
  192. package/bundled-skills/vercel-optimize/references/support-topics/image-optimization-cost-control.md +22 -0
  193. package/bundled-skills/vercel-optimize/references/support-topics/isr-revalidation-static-generation.md +22 -0
  194. package/bundled-skills/vercel-optimize/references/support-topics/middleware-proxy-edge-cost.md +22 -0
  195. package/bundled-skills/vercel-optimize/references/support-topics/next-fetch-revalidate-floor.md +22 -0
  196. package/bundled-skills/vercel-optimize/references/support-topics/next-font-cls-self-hosting.md +23 -0
  197. package/bundled-skills/vercel-optimize/references/support-topics/next-heavy-ui-lazy-load-boundaries.md +23 -0
  198. package/bundled-skills/vercel-optimize/references/support-topics/next-image-lcp-preload-sizes.md +23 -0
  199. package/bundled-skills/vercel-optimize/references/support-topics/next-route-handler-get-cache-defaults.md +22 -0
  200. package/bundled-skills/vercel-optimize/references/support-topics/next-script-third-party-strategy.md +23 -0
  201. package/bundled-skills/vercel-optimize/references/support-topics/nextjs-version-cache-semantics.md +22 -0
  202. package/bundled-skills/vercel-optimize/references/support-topics/not-found-catchall-request-waste.md +23 -0
  203. package/bundled-skills/vercel-optimize/references/support-topics/nuxt-route-rules-cache-isr.md +22 -0
  204. package/bundled-skills/vercel-optimize/references/support-topics/observability-events-cost-attribution.md +22 -0
  205. package/bundled-skills/vercel-optimize/references/support-topics/post-response-work-waituntil.md +22 -0
  206. package/bundled-skills/vercel-optimize/references/support-topics/route-error-durable-offload.md +22 -0
  207. package/bundled-skills/vercel-optimize/references/support-topics/route-error-runtime-limits.md +22 -0
  208. package/bundled-skills/vercel-optimize/references/support-topics/runtime-cache-reusable-data.md +22 -0
  209. package/bundled-skills/vercel-optimize/references/support-topics/sveltekit-isr-prerender-safety.md +22 -0
  210. package/bundled-skills/vercel-optimize/references/support-topics/sveltekit-split-cold-start-tradeoff.md +22 -0
  211. package/bundled-skills/vercel-optimize/references/support-topics/usage-spike-triage.md +22 -0
  212. package/bundled-skills/vercel-optimize/references/support-topics/use-cache-date-stamp-isr-write-amplifier.md +23 -0
  213. package/bundled-skills/vercel-optimize/references/support-topics/use-cache-remote-shared-origin-data.md +22 -0
  214. package/bundled-skills/vercel-optimize/references/support-topics/workflow-resumable-stream-routes.md +23 -0
  215. package/bundled-skills/vercel-optimize/references/verification.md +102 -0
  216. package/bundled-skills/vercel-optimize/references/voice.md +76 -0
  217. package/bundled-skills/vercel-optimize/scripts/budget-summary.mjs +56 -0
  218. package/bundled-skills/vercel-optimize/scripts/build-docs.mjs +74 -0
  219. package/bundled-skills/vercel-optimize/scripts/check-citations.mjs +81 -0
  220. package/bundled-skills/vercel-optimize/scripts/check-docs-fresh.mjs +93 -0
  221. package/bundled-skills/vercel-optimize/scripts/collect-signals.mjs +576 -0
  222. package/bundled-skills/vercel-optimize/scripts/collect-sub-agent-outputs.mjs +296 -0
  223. package/bundled-skills/vercel-optimize/scripts/deep-dive.mjs +319 -0
  224. package/bundled-skills/vercel-optimize/scripts/gate-investigations.mjs +166 -0
  225. package/bundled-skills/vercel-optimize/scripts/merge-signals.mjs +192 -0
  226. package/bundled-skills/vercel-optimize/scripts/prepare-investigation-brief.mjs +231 -0
  227. package/bundled-skills/vercel-optimize/scripts/reconcile-candidates.mjs +62 -0
  228. package/bundled-skills/vercel-optimize/scripts/render-report.mjs +437 -0
  229. package/bundled-skills/vercel-optimize/scripts/scan-codebase.mjs +313 -0
  230. package/bundled-skills/vercel-optimize/scripts/verify-and-regen.mjs +346 -0
  231. package/bundled-skills/vercel-optimize/scripts/verify-finding.mjs +19 -0
  232. package/bundled-skills/vercel-react-view-transitions/SKILL.md +327 -0
  233. package/bundled-skills/vercel-react-view-transitions/references/css-recipes.md +242 -0
  234. package/bundled-skills/vercel-react-view-transitions/references/implementation.md +182 -0
  235. package/bundled-skills/vercel-react-view-transitions/references/nextjs.md +176 -0
  236. package/bundled-skills/vercel-react-view-transitions/references/patterns.md +262 -0
  237. package/package.json +2 -2
  238. package/skills_index.json +312 -0
@@ -0,0 +1,23 @@
1
+ ---
2
+ id: next-image-lcp-preload-sizes
3
+ title: Next.js image LCP preload and sizes
4
+ status: active
5
+ candidateKinds: ["cwv_poor"]
6
+ frameworks: ["next@*"]
7
+ metrics: ["LCP"]
8
+ priority: 86
9
+ citations: ["https://nextjs.org/docs/app/api-reference/components/image", "https://web.dev/articles/optimize-lcp"]
10
+ maxBriefChars: 850
11
+ ---
12
+
13
+ ## Investigation Brief
14
+ For poor LCP, identify whether the LCP element is an image before touching unrelated JavaScript. Hero images need correct sizing, priority behavior, and source-cache hygiene.
15
+
16
+ ## Evidence To Check
17
+ Inspect above-the-fold media for `next/image`, `fill` without `sizes`, deprecated `priority` on Next.js 16, missing `preload` or `fetchPriority`, oversized dimensions, and remote-image TTL/source behavior.
18
+
19
+ ## Do Not Recommend When
20
+ Do not preload multiple possible LCP images or route tiny icons/SVG UI assets through image optimization. Do not change quality or TTL without checking source-update semantics.
21
+
22
+ ## Verification
23
+ Name the LCP value, image element or component, current props/config, and the exact line to change.
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: next-route-handler-get-cache-defaults
3
+ title: Next.js Route Handler GET cache defaults
4
+ status: active
5
+ candidateKinds: ["uncached_route", "cache_header_gap"]
6
+ frameworks: ["next@>=15.0.0"]
7
+ priority: 91
8
+ citations: ["https://nextjs.org/docs/app/api-reference/file-conventions/route", "https://vercel.com/docs/caching/cdn-cache"]
9
+ maxBriefChars: 850
10
+ ---
11
+
12
+ ## Investigation Brief
13
+ On Next.js 15+, GET Route Handlers are dynamic by default. For hot public GET handlers, verify whether uncached behavior is intentional before recommending cache headers or route config.
14
+
15
+ ## Evidence To Check
16
+ Use method share, cache result, and source. Check `GET`, `revalidate`, `dynamic`, request headers, cookies, auth, query params, and response `Cache-Control`.
17
+
18
+ ## Do Not Recommend When
19
+ Do not cache POST-style handlers, webhooks, per-user APIs, streaming responses, search requests with user-specific params, or handlers that read auth/cookies.
20
+
21
+ ## Verification
22
+ Name the Next.js version, GET share, cache result mix, and the exact handler or header line that makes public caching safe.
@@ -0,0 +1,23 @@
1
+ ---
2
+ id: next-script-third-party-strategy
3
+ title: Next.js third-party script strategy
4
+ status: active
5
+ candidateKinds: ["cwv_poor"]
6
+ frameworks: ["next@*"]
7
+ metrics: ["LCP", "INP"]
8
+ priority: 85
9
+ citations: ["https://nextjs.org/docs/app/api-reference/components/script", "https://web.dev/articles/optimize-inp"]
10
+ maxBriefChars: 850
11
+ ---
12
+
13
+ ## Investigation Brief
14
+ Third-party scripts are only actionable when they line up with the poor metric and route. For LCP or INP, prove a specific script blocks critical rendering, hydration, or interaction.
15
+
16
+ ## Evidence To Check
17
+ Inspect `next/script`, raw `<script>`, tag managers, chat widgets, analytics, and consent code. Check `beforeInteractive`, `afterInteractive`, `lazyOnload`, and whether the script is route-local or global.
18
+
19
+ ## Do Not Recommend When
20
+ Do not move required bot detection, consent, auth, or payment scripts later without product evidence. Do not recommend `worker` for App Router.
21
+
22
+ ## Verification
23
+ Name the poor metric, script source, current strategy, and the exact route or layout line to change.
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: nextjs-version-cache-semantics
3
+ title: Next.js cache semantics by version
4
+ status: active
5
+ candidateKinds: ["uncached_route"]
6
+ frameworks: ["next@>=15.0.0"]
7
+ priority: 85
8
+ citations: ["https://nextjs.org/docs/app/api-reference/directives/use-cache", "https://nextjs.org/docs/app/api-reference/functions/cacheLife", "https://nextjs.org/docs/app/building-your-application/caching"]
9
+ maxBriefChars: 800
10
+ ---
11
+
12
+ ## Investigation Brief
13
+ On Next.js 15+, match the fix to the cache primitive already in use.
14
+
15
+ ## Evidence To Check
16
+ Check `'use cache'`, `cacheLife`, `cacheTag`, `fetch` cache options, route handlers, and dynamic APIs.
17
+
18
+ ## Do Not Recommend When
19
+ Do not suggest APIs outside the detected Next.js version. Do not claim `cacheLife()` emits CDN `Cache-Control` headers or that missing `cacheLife()` alone makes a `'use cache'` route run per request. Omitted `cacheLife()` calls use the default profile.
20
+
21
+ ## Verification
22
+ Name the detected Next.js version and exact cache primitive or route header.
@@ -0,0 +1,23 @@
1
+ ---
2
+ id: not-found-catchall-request-waste
3
+ title: Not-found and catch-all request waste
4
+ status: active
5
+ candidateKinds: ["uncached_route"]
6
+ frameworks: ["*"]
7
+ routePatterns: ["(^|/)404$", "not-found", "\\[\\.\\.\\."]
8
+ priority: 92
9
+ citations: ["https://vercel.com/docs/routing/", "https://vercel.com/docs/redirects/bulk-redirects/", "https://vercel.com/docs/vercel-firewall/vercel-waf/custom-rules", "https://vercel.com/docs/vercel-firewall/vercel-waf/managed-rulesets"]
10
+ maxBriefChars: 850
11
+ ---
12
+
13
+ ## Investigation Brief
14
+ High-volume 404 or catch-all traffic is often request waste. First determine whether the traffic is legacy URLs, bots, broken links, or a real product route.
15
+
16
+ ## Evidence To Check
17
+ Use route volume, method share, cache result, bot share, and top request paths. Inspect redirects, rewrites, catch-all routes, sitemap/robots output, and any WAF rules already logging or blocking the pattern.
18
+
19
+ ## Do Not Recommend When
20
+ Do not block or redirect legitimate product routes, search crawlers, or unknown traffic without a log-mode validation path. Do not replace a useful 404 page with a blanket rewrite.
21
+
22
+ ## Verification
23
+ Name the dominant bad path pattern, observed request or bot volume, and the redirect, routing, or WAF rule that would stop the wasted function path.
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: nuxt-route-rules-cache-isr
3
+ title: Nuxt routeRules cache and ISR
4
+ status: active
5
+ candidateKinds: ["uncached_route", "isr_overrevalidation", "rendering_candidate"]
6
+ frameworks: ["nuxt@>=3.0.0"]
7
+ priority: 90
8
+ citations: ["https://vercel.com/docs/frameworks/full-stack/nuxt", "https://nuxt.com/docs/4.x/api/utils/define-route-rules", "https://nuxt.com/docs/4.x/guide/concepts/rendering"]
9
+ maxBriefChars: 850
10
+ ---
11
+
12
+ ## Investigation Brief
13
+ For Nuxt on Vercel, route-level caching usually belongs in `routeRules`. Match the lever to the route: prerender for static pages, ISR for shared content, and SSR for request-specific views.
14
+
15
+ ## Evidence To Check
16
+ Inspect `nuxt.config`, inline route rules, server routes, pages, auth/session reads, and observed cache or ISR read/write patterns. Verify whether the route should be Vercel cache-backed ISR rather than generic SWR.
17
+
18
+ ## Do Not Recommend When
19
+ Do not cache authenticated, cart, checkout, preview, or per-user routes. Do not add routeRules without proving the route is public and the freshness window is acceptable.
20
+
21
+ ## Verification
22
+ Name the observed route signal, current routeRule or missing rule, chosen cache mode, and exact config line.
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: observability-events-cost-attribution
3
+ title: Observability Events cost attribution
4
+ status: active
5
+ candidateKinds: ["observability_events_attribution"]
6
+ frameworks: ["*"]
7
+ priority: 92
8
+ citations: ["https://vercel.com/docs/observability/observability-plus", "https://vercel.com/docs/alerts"]
9
+ maxBriefChars: 900
10
+ ---
11
+
12
+ ## Investigation Brief
13
+ Observability Events is the metered SKU under Observability Plus. When the current bill shows a large Observability Events share, event volume is the lever. Reduce upstream: lift cache hit rate, narrow middleware matchers, and reduce unnecessary custom-span cardinality.
14
+
15
+ ## Evidence To Check
16
+ Verify the share from `usage.services`. Cross-reference `requestsByRouteCache`, `middlewareCount`, external API span counts, and third-party tracing (`tracesSampleRate=1`).
17
+
18
+ ## Do Not Recommend When
19
+ Skip below 15% share. Skip when cache hit rate is already >90% across hot routes — the lever is elsewhere. Do not propose sampling unless the specific metered signal has a documented sampling control.
20
+
21
+ ## Verification
22
+ Name the share, upstream drivers, and concrete remediation per driver, not generic "reduce events".
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: post-response-work-waituntil
3
+ title: Post-response work with waitUntil
4
+ status: active
5
+ candidateKinds: ["slow_route", "external_api_slow"]
6
+ frameworks: ["next@<15.0.0", "sveltekit@*", "astro@*", "nuxt@*", "unknown@*"]
7
+ priority: 78
8
+ citations: ["https://vercel.com/docs/functions/functions-api-reference/vercel-functions-package"]
9
+ maxBriefChars: 800
10
+ ---
11
+
12
+ ## Investigation Brief
13
+ For stacks without Next.js `after()`, check whether non-critical work can run after the response instead of extending user-visible latency.
14
+
15
+ ## Evidence To Check
16
+ Inspect the listed route for analytics, logging, notifications, cache warming, metrics, or webhook side effects that happen after the response data is ready.
17
+
18
+ ## Do Not Recommend When
19
+ Do not move work that decides the response, must fail the request, changes visible state synchronously, or needs a durable retry guarantee.
20
+
21
+ ## Verification
22
+ Name the blocking side effect, the observed latency or upstream signal, and the exact line that can move behind `waitUntil`.
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: route-error-durable-offload
3
+ title: Durable offload for timeout-heavy routes
4
+ status: active
5
+ candidateKinds: ["route_errors"]
6
+ frameworks: ["*"]
7
+ priority: 84
8
+ citations: ["https://vercel.com/docs/workflow", "https://workflow-sdk.dev/docs/foundations/starting-workflows", "https://workflow-sdk.dev/docs/foundations/workflows-and-steps", "https://vercel.com/docs/queues", "https://vercel.com/docs/functions/limitations"]
9
+ maxBriefChars: 850
10
+ ---
11
+
12
+ ## Investigation Brief
13
+ Timeout-heavy routes often need a job boundary, not a higher limit. Workflow fits durable multi-step work that can continue after the response; return a run ID instead of waiting on `returnValue`.
14
+
15
+ ## Evidence To Check
16
+ Use `errorStatusPattern`, `errorCodes`, and source flow. Look for fan-out, polling, batch work, AI jobs, uploads, sleeps, approval, multi-step side effects. If Workflow is already used, check whether the route waits or streams progress.
17
+
18
+ ## Do Not Recommend When
19
+ Do not offload work that must finish before responding. Do not claim savings from offload alone: Workflow Steps/Storage bill separately, and invoked functions still use compute billing.
20
+
21
+ ## Verification
22
+ Name the timeout/error class, long-running operation, post-enqueue response contract, and queue or workflow boundary that preserves semantics.
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: route-error-runtime-limits
3
+ title: Route errors and runtime limits
4
+ status: active
5
+ candidateKinds: ["route_errors"]
6
+ frameworks: ["*"]
7
+ priority: 90
8
+ citations: ["https://vercel.com/docs/functions", "https://vercel.com/docs/functions/limitations", "https://vercel.com/docs/cli/inspect"]
9
+ maxBriefChars: 850
10
+ ---
11
+
12
+ ## Investigation Brief
13
+ Route error candidates are reliability findings with cost impact. Determine whether the failures are app exceptions, timeouts, payload limits, or deployment-specific regressions.
14
+
15
+ ## Evidence To Check
16
+ Use `errorStatusPattern`, `errorCodes`, and `errorsByDeployment`. In source, inspect the path most likely to throw, time out, or exceed a platform limit.
17
+
18
+ ## Do Not Recommend When
19
+ Do not frame high 5xx volume as a performance tuning issue. Do not suggest increasing limits before proving the route needs more headroom.
20
+
21
+ ## Verification
22
+ Name the error class, deployment concentration if present, and the file line that triggers or fails to handle it.
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: runtime-cache-reusable-data
3
+ title: Runtime Cache for reusable server data
4
+ status: active
5
+ candidateKinds: ["slow_route", "external_api_slow"]
6
+ frameworks: ["*"]
7
+ priority: 84
8
+ citations: ["https://vercel.com/docs/caching/runtime-cache", "https://vercel.com/docs/functions/functions-api-reference/vercel-functions-package"]
9
+ maxBriefChars: 850
10
+ ---
11
+
12
+ ## Investigation Brief
13
+ Runtime Cache is only useful when the same server-side result is reused across requests. Treat it as a measured alternative when CDN response caching is unsafe or incomplete.
14
+
15
+ ## Evidence To Check
16
+ Use p75/p95 latency, call count, caller routes, and transfer bytes. In source, identify database queries, external API calls, or expensive computations that return the same result for many viewers.
17
+
18
+ ## Do Not Recommend When
19
+ Skip per-user data, mutations, secrets, one-off requests, or unknown freshness. Skip Runtime Cache when CDN caching solves the route. For Next with Cache Components, check `use cache: remote` first; use Runtime Cache only as a justified fallback.
20
+
21
+ ## Verification
22
+ Name the reusable data, observed route or hostname pressure, required freshness window, and the exact call site to wrap.
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: sveltekit-isr-prerender-safety
3
+ title: SvelteKit ISR and prerender safety
4
+ status: active
5
+ candidateKinds: ["uncached_route", "isr_overrevalidation"]
6
+ frameworks: ["sveltekit@*"]
7
+ priority: 90
8
+ citations: ["https://vercel.com/docs/frameworks/full-stack/sveltekit", "https://svelte.dev/docs/kit/adapter-vercel", "https://svelte.dev/docs/kit/page-options"]
9
+ maxBriefChars: 850
10
+ ---
11
+
12
+ ## Investigation Brief
13
+ For SvelteKit, the right lever is often `prerender` or adapter ISR on public consumer pages. First prove every visitor can safely see the same response for the configured interval.
14
+
15
+ ## Evidence To Check
16
+ Inspect `+page`, `+page.server`, `+server`, layouts, `prerender`, `ssr`, and adapter `isr` config. Compare route cache results, ISR writes, and whether the route reads cookies, auth, or per-user locals.
17
+
18
+ ## Do Not Recommend When
19
+ Do not use ISR for dashboards, carts, checkout, account data, drafts, or any route whose output varies per visitor. Do not add ISR when `prerender = true` already makes it irrelevant.
20
+
21
+ ## Verification
22
+ Name the route, current SvelteKit page option or adapter config, observed cache or ISR signal, and the exact file line to change.
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: sveltekit-split-cold-start-tradeoff
3
+ title: SvelteKit split function cold-start tradeoff
4
+ status: active
5
+ candidateKinds: ["cold_start", "slow_route"]
6
+ frameworks: ["sveltekit@*"]
7
+ priority: 82
8
+ citations: ["https://vercel.com/docs/frameworks/full-stack/sveltekit", "https://svelte.dev/docs/kit/adapter-vercel"]
9
+ maxBriefChars: 800
10
+ ---
11
+
12
+ ## Investigation Brief
13
+ SvelteKit bundles routes together by default to avoid excessive cold starts. Treat `split: true` as a targeted tradeoff, not a blanket optimization.
14
+
15
+ ## Evidence To Check
16
+ Use cold-start share, cold-vs-warm latency, deployment concentration, and source bundle pressure. Check adapter options and whether a large dependency belongs to one route or the whole app.
17
+
18
+ ## Do Not Recommend When
19
+ Do not split every route without evidence of function size pressure or route-local initialization cost. Do not split if cold starts are already the dominant problem.
20
+
21
+ ## Verification
22
+ Name the cold-start signal, route or dependency that motivates the split, and the exact adapter config line.
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: usage-spike-triage
3
+ title: Usage spike triage
4
+ status: active
5
+ candidateKinds: ["usage_spike_triage"]
6
+ frameworks: ["*"]
7
+ priority: 95
8
+ citations: ["https://vercel.com/docs/alerts", "https://vercel.com/docs/spend-management", "https://vercel.com/docs/bot-management"]
9
+ maxBriefChars: 950
10
+ ---
11
+
12
+ ## Investigation Brief
13
+ A single-day or single-SKU spike needs cause before fix. Branches: bot or AI crawler on a cacheable route, viral moment, pricing-model migration, or code regression.
14
+
15
+ ## Evidence To Check
16
+ Confirm SKU and day from `usage.breakdown.data`. Cross-check firewall/bot data, traffic curve, SKU rename timing, and deploy log around the spike day. Spend Management and Alerts are monitoring tools; they do not replace finding the traffic or deploy cause.
17
+
18
+ ## Do Not Recommend When
19
+ Do not propose a code fix until the branch is identified. Do not rate-limit a viral moment or revert a deploy for third-party crawler traffic.
20
+
21
+ ## Verification
22
+ Name SKU, day, value, window mean, branch, and one supporting datum.
@@ -0,0 +1,23 @@
1
+ ---
2
+ id: use-cache-date-stamp-isr-write-amplifier
3
+ title: "'use cache' date-stamp ISR write amplifier"
4
+ status: active
5
+ candidateKinds: ["use_cache_date_stamp"]
6
+ frameworks: ["next@>=15.0.0"]
7
+ scannerPatterns: ["use-cache-date-stamp"]
8
+ priority: 88
9
+ citations: ["https://nextjs.org/docs/app/api-reference/directives/use-cache", "https://nextjs.org/docs/app/api-reference/functions/cacheLife"]
10
+ maxBriefChars: 900
11
+ ---
12
+
13
+ ## Investigation Brief
14
+ `'use cache'` keys on argument identity and prerender output. A `new Date()`, `Date.now()`, or `Math.random()` baked into the cached output forces a fresh ISR write on every regeneration even when the data is unchanged.
15
+
16
+ ## Evidence To Check
17
+ Check the scanner finding's `subtype`: `module-scope` (module-level date) or `in-cache-fn` (inside the cached body). Cross-reference `isrWritesByRoute` — a stable write rate against low reads is the symptom.
18
+
19
+ ## Do Not Recommend When
20
+ Skip if the date is inside `useEffect`/`useCallback`/`useMemo`. Skip if `'use cache'` is only a comment. Skip if the date is the intended cache key.
21
+
22
+ ## Verification
23
+ Name the file, the specific primitive call, and the replacement: build-time constant or client-side `useEffect`.
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: use-cache-remote-shared-origin-data
3
+ title: Remote cache for shared origin data
4
+ status: active
5
+ candidateKinds: ["external_api_slow", "slow_route", "uncached_route"]
6
+ frameworks: ["next@>=16.0.0"]
7
+ priority: 87
8
+ citations: ["https://vercel.com/docs/caching/runtime-cache", "https://nextjs.org/docs/app/api-reference/directives/use-cache-remote"]
9
+ maxBriefChars: 950
10
+ ---
11
+
12
+ ## Investigation Brief
13
+ For Next 16 candidates, check whether shared origin data or reusable route-handler work belongs in remote cache. Default `'use cache'` is not cross-request on Vercel. Use `'use cache: remote'` or `generateStaticParams`.
14
+
15
+ ## Evidence To Check
16
+ Hostname p75, caller routes, call count, bytes. Verify data is shared and tolerates the freshness window. Confirm `'use cache: remote'`.
17
+
18
+ ## Do Not Recommend When
19
+ Skip per-user, mutation, secret, or freshness-critical data. Skip when upstream is fast or rarely called. Avoid sub-ms reads (Edge Config) — overhead exceeds source latency.
20
+
21
+ ## Verification
22
+ Name hostname, shared data, freshness window, and exact boundary. State `'use cache: remote'`.
@@ -0,0 +1,23 @@
1
+ ---
2
+ id: workflow-resumable-stream-routes
3
+ title: Workflow resumable stream routes
4
+ status: active
5
+ candidateKinds: ["slow_route"]
6
+ frameworks: ["*"]
7
+ routePatterns: ["(^|/)api/.*/stream/?$", "(^|/)chat/.*/stream/?$", "\\[id\\].*/stream"]
8
+ priority: 98
9
+ citations: ["https://workflow-sdk.dev/docs/ai/resumable-streams", "https://workflow-sdk.dev/docs/foundations/streaming", "https://vercel.com/docs/workflow"]
10
+ maxBriefChars: 850
11
+ ---
12
+
13
+ ## Investigation Brief
14
+ Stream-shaped routes may be Workflow SDK reconnection endpoints. Long wall-clock duration can be the live client connection.
15
+
16
+ ## Evidence To Check
17
+ Look for `WorkflowChatTransport`, `getRun`, `run.getReadable`, `startIndex`, `x-workflow-run-id`, `x-workflow-stream-tail-index`, `getWritable`, or `createUIMessageStreamResponse`. Compare CPU, TTFB, wall-clock. Check full replay, missing tail-index, unreleased locks, or unclosed streams.
18
+
19
+ ## Do Not Recommend When
20
+ Do not cache stream endpoints or remove resumability. Do not call high duration a bug when CPU is low, TTFB is healthy, and the route only holds a client connection.
21
+
22
+ ## Verification
23
+ Name whether the route starts or reconnects a run, then cite the exact waste: replay, missing tail-index, lock leak, unclosed stream, high CPU, or avoidable pre-first-byte work.
@@ -0,0 +1,102 @@
1
+ # Verification
2
+
3
+ How claims in recommendations are mechanically verified, and when the recommender re-runs after a low pass rate.
4
+
5
+ ## Table of contents
6
+
7
+ - [Why mechanical verification](#why-mechanical-verification)
8
+ - [Claim types](#claim-types)
9
+ - [Dispositions](#dispositions)
10
+ - [Re-gen trigger and accept criteria](#re-gen-trigger-and-accept-criteria)
11
+ - [Verifier implementation](#verifier-implementation)
12
+
13
+ ## Why mechanical verification
14
+
15
+ The recommender is an LLM. LLMs hallucinate counts, miscount file occurrences, and confuse code snippets between similar-looking files. Mechanical verification — grep + filesystem reads + JSON checks against `signals.json` and `references/docs-library.json` — catches these failures before the customer sees them.
16
+
17
+ The contract: every numeric claim, file reference, code snippet, citation URL, and contradiction-with-other-claims is verified. The LLM is not asked to judge whether its own output is correct.
18
+
19
+ ## Claim types
20
+
21
+ The verifier extracts claims from `why`, `fix`, `currentBehavior`, `desiredBehavior`, and `verify` fields. Each matched claim runs through one of these handlers:
22
+
23
+ | # | Claim type | Pattern in rec | Verification |
24
+ |---|---|---|---|
25
+ | 1 | `pattern_count` | "N fetch() calls in file X" | grep/ast-grep in X, exact count match |
26
+ | 2 | `pattern_exists` | "uses JSON.parse(JSON.stringify())" | grep, boolean |
27
+ | 3 | `pattern_absent` | "no Cache-Control header" | grep, verify absence (with guards — see below) |
28
+ | 4 | `file_exists` | "app/not-found.tsx exists" | fs.access |
29
+ | 5 | `finding_count` | "2 unoptimized images" | finding count vs `verifiedFindings.json` |
30
+ | 6 | `contradiction` | Claim A vs Claim B | Substring conflict check |
31
+ | 7 | `code_snippet` | Code fence labeled "Before:" | substring search in cited file |
32
+ | 8 | `arithmetic` | "20% of 100K = 20K" | math check |
33
+ | 9 | `repo_count` | "11 unstable_cache usages across 8 files" | grep repo, count distinct files |
34
+ | 10 | `cited_count_literal` | "60+ icons in packages/ui/src/icons" | glob directory, count by extension |
35
+ | 11 | `citation_in_library` | Any URL in `citations[]` | URL ∈ `references/docs-library.json` |
36
+ | 12 | `citation_applies_to_version` | Any URL in `citations[]` | URL's `applicableFrameworks` matches `signals.json.stack.framework@frameworkVersion` |
37
+ | 13 | `cache_vary_matches_dynamic_inputs` | CDN cache rec touches route files that read Vercel geolocation | Fails unless the rec varies by a coarse Vercel geolocation header such as `X-Vercel-IP-Country`, `X-Vercel-IP-Country-Region`, or `X-Vercel-IP-City` |
38
+ | 13a | `cache_vary_cardinality_safe` | CDN cache rec sets `Vary` on request-specific geography | Fails on high-cardinality `X-Vercel-IP-Latitude` / `X-Vercel-IP-Longitude` / `X-Vercel-IP-Postal-Code` |
39
+ | 14 | `next_cached_not_found_causal_support` | Rec claims `notFound()` inside `'use cache'` caused 5xx | Fails unless backed by Next-specific docs or runtime stack evidence |
40
+ | 15 | `next_stable_cache_api_for_version` | Next.js 16 cache rec includes code examples | Fails on `unstable_cacheLife` / `unstable_cacheTag` or one-arg `revalidateTag()` |
41
+ | 16 | `next_cache_components_runtime_cache_preference` | Next.js rec uses Runtime Cache APIs while `cacheComponents=true` | Fails unless `use cache: remote` is used or Runtime Cache is framed as a fallback |
42
+ | 17 | `next_cache_components_route_segment_config` | Next.js 16 rec suggests removed route segment config while `cacheComponents=true` | Fails on `dynamicParams`, `dynamic`, `revalidate`, or `fetchCache` recommendations |
43
+ | 17a | `next_route_revalidate_static_prereq` | Rec suggests route-level `export const revalidate` for a Next.js page/layout route | Fails when the route chain contains request-time APIs or common auth helpers that can force dynamic rendering |
44
+ | 18 | `next_cache_lifetime_freshness_supported` | Rec lengthens a tagged Cache Components lifetime with `cacheLife()` | Fails unless every affected `cacheTag()` has matching `revalidateTag()` / `updateTag()` evidence |
45
+ | 19 | `next_cache_life_cdn_header_semantics` | Rec claims `cacheLife()` emits CDN/Cache-Control headers or that missing `cacheLife()` alone makes a route run per request | Fails unless rewritten to the documented Cache Components lifetime behavior or backed by production header evidence |
46
+ | 20 | `next_cache_tag_invalidation_supported` | Cache-lifetime rec claims existing tag invalidation | Fails unless every claimed `cacheTag()` has matching `revalidateTag()` / `updateTag()` evidence |
47
+ | 21 | `cache_rec_not_error_dominated_or_acknowledged` | CDN cache rec targets a route with function 5xx metrics | Fails unless the rec excludes or acknowledges error traffic |
48
+ | 22 | `cache_control_header_syntax` | CDN cache rec includes `Cache-Control`, `CDN-Cache-Control`, or `Vercel-CDN-Cache-Control` values | Fails on empty directives such as a trailing comma |
49
+ | 23 | `cache_policy_positive_or_no_ready_rec` | Cache candidate emits a ready recommendation | Fails unless it names a positive cache policy; no-store-only belongs in no-change/observation output |
50
+ | 24 | `cache_404_long_ttl_safety` | CDN cache rec mentions a 404 or not-found branch | Fails unless the rec keeps the 404/not-found branch uncached, short-lived, or explicitly separate |
51
+ | 25 | `immutable_dynamic_route_safety` | Dynamic route rec uses browser `immutable` caching | Fails unless the URL is byte-versioned or the directive is scoped to Vercel's CDN |
52
+ | 26 | `auth_guard_parallelization_safety` | Parallelization rec touches private/auth/ownership data | Fails if private data can be fetched before the auth or ownership guard |
53
+ | 27 | `parallelization_impact_not_overclaimed` | Parallelization rec promises a helper-sized latency drop | Fails unless helper/span timing was measured |
54
+ | 28 | `parallelization_not_cpu_bound_work` | Parallelization rec targets CPU or compile work | Fails unless measured wait/I/O time proves there is independent work to overlap |
55
+ | 29 | `runtime_error_cause_supported` | Route-error rec names a runtime exception/root cause | Fails unless runtime logs or stack evidence support the cause |
56
+ | 30 | `turbo_build_cache_safety` | Rec enables Turbo build caching | Fails when the package build script has migration side effects or Turbo outputs omit framework build output |
57
+
58
+ Verifier guards:
59
+
60
+ - **`snippet_in_wrong_file`**: code snippet found, but in a different file from the cited path → disposition `unsupported` (don't fail the rec; the LLM was close, but the source file claim is wrong).
61
+ - **`line-number-as-count`**: "filename:42" matched against a `pattern_count` claim → skip; this is a line-number, not a count.
62
+ - **`prose-of-absence`**: "no cache headers" without an explicit grep confirmation → `unsupported`; absence claims require evidence.
63
+ - **`pattern_count` for abstracted DB calls**: `db.method()` in a file with DB imports + await helpers but literal count 0 → `unsupported` (import-chain resolution is out of scope).
64
+
65
+ ## Dispositions
66
+
67
+ Each verified claim resolves to one of four states:
68
+
69
+ | Disposition | Meaning | Counted toward `passRate`? |
70
+ |---|---|---|
71
+ | `verified` | Claim matches reality | yes (counts as pass) |
72
+ | `failed` | Claim contradicts reality | yes (counts as fail) |
73
+ | `unsupported` | Claim can't be checked mechanically (see guards above) | no |
74
+ | `unverifiable` | Out of scope (e.g., external API behavior, runtime-only) | no |
75
+
76
+ `passRate = verified / (verified + failed)`. Unsupported and unverifiable don't count either way.
77
+
78
+ ## Re-gen trigger and accept criteria
79
+
80
+ After verification:
81
+
82
+ | Condition | Action |
83
+ |---|---|
84
+ | `passRate < 0.8 AND verifiableClaimCount >= 2` | Re-run Step 3.3 (the recommender) with `topFailures` injected as feedback |
85
+ | Project-config contradiction, cache-safety failure, or framework-semantic failure | Hard re-run. The customer report holds back the original rec until re-gen fixes it or abstains |
86
+ | `passRate >= 0.8` OR `verifiableClaimCount < 2` | Accept the run, proceed to Step 4 |
87
+
88
+ _(Floor lowered 5 → 2 in May 2026 audit: a rec with 1/1 failed claim is just as broken as 1/5, and the old floor let many small recs escape re-gen entirely.)_
89
+
90
+ Re-gen accept criteria:
91
+
92
+ - `regenPassRate >= originalPassRate` AND
93
+ - Rec count not gutted (regen doesn't drop more than 50% of recs) AND
94
+ - Findings still cited (no rec orphaning)
95
+
96
+ If re-gen makes things worse, keep the original output unless the trigger was hard safety (`project_config_contradiction`, `cache_vary_safety`, or `semantic_safety`). Hard-safety failures must not ship to the customer report.
97
+
98
+ ## Verifier implementation
99
+
100
+ `scripts/verify-and-regen.mjs` invokes `lib/extract-claims.mjs` and `lib/verify-claim.mjs` in-process for each verifiable claim. Pure functions, no network, no LLM — deterministic.
101
+
102
+ For `citation_in_library` and `citation_applies_to_version`, the script uses `lib/citations.mjs`'s `isKnownUrl()` and `sanitizeCitations()` helpers (already tested). For everything else, it shells out to grep + ast-grep via execFile.
@@ -0,0 +1,76 @@
1
+ # Voice
2
+
3
+ Use Vercel's customer-facing voice: sharp teammate, clear, competent, no fluff.
4
+
5
+ Write for a user deciding what to fix next. Lead with the observed signal, the specific change, and how to verify it. Do not explain the skill's internals unless the user asked for debug details.
6
+
7
+ ## Rules
8
+
9
+ - Use plain words. Prefer "use" over "leverage," "reduce" over "optimize" when the action is specific.
10
+ - Be direct. No apologetic preambles, no marketing language, no "For context" wrap-up paragraphs.
11
+ - Keep every recommendation tied to a route, file, metric, or project setting.
12
+ - Use observed numbers only. Never invent savings, traffic, latency, or percentages.
13
+ - Use cost magnitude language, not precise savings: "hundreds of dollars per month at current traffic," not "$340/mo."
14
+ - Use precise performance language when measured: "95th percentile duration is 1,240ms."
15
+ - Frame prerequisites as engineering constraints, not upsells. Explain the decision impact: what the missing data prevents, what the limited fallback can still do, and what the user should choose next.
16
+ - Use short bullets and tables. Avoid long paragraphs in reports and final chat messages.
17
+ - Write full sentences with punctuation in reports.
18
+
19
+ ## Avoid
20
+
21
+ - `seamlessly`, `effortlessly`, `powerful`, `robust`, `leverage`, `unleash`, `blazing`, `lightning-fast`, `turnkey`, `holistic`, `best-in-class`, `next-generation`, `cutting-edge`, `world-class`, `streamline`, `elevate`, `harness`, `crafted`, `myriad`, `plethora`, `empower`, `utilize`
22
+ - Filler adverbs: `just`, `simply`, `actually`
23
+ - Hedge starts: `Consider`, `You may want to`, `It is important to note`
24
+ - Rhetorical reframes: `It's not X, it's Y`
25
+ - Unicode arrows in prose: `->`, `→`, `⇒`
26
+ - Internal process terms in customer output: `sub-agent`, `abstention`, `abstained`, `passRate`, `quality score`, `sanitizer`
27
+
28
+ Use customer-facing replacements:
29
+
30
+ | Internal | Customer-facing |
31
+ |---|---|
32
+ | `sub-agent` | `investigation` |
33
+ | `abstained` | `found no supported change` |
34
+ | `abstention` | `investigated, no change recommended` |
35
+ | `passRate` | `verification result` |
36
+ | `quality score` | `review result` |
37
+ | `inv` | `function invocations` or `requests`, based on the metric |
38
+ | `p95` | `95th percentile` |
39
+ | `perf` | `performance` |
40
+ | `CWV` | `Core Web Vitals` |
41
+
42
+ ## Product names
43
+
44
+ Use these spellings:
45
+
46
+ | Right | Wrong |
47
+ |---|---|
48
+ | `Observability Plus` | `OPlus`, `Oplus`, `O11y Plus`, `o11y+`, `obs+` |
49
+ | `Vercel Functions` | `serverless functions` when referring to Vercel's product |
50
+ | `fluid compute` mid-sentence | `Fluid Compute` mid-sentence |
51
+ | `BotID` | `Bot ID`, `botID` |
52
+ | `AI Gateway` | `Vercel AI Gateway`, `ai gateway` |
53
+ | `AI SDK` | `Vercel AI SDK` |
54
+ | `Edge Config` | `EdgeConfig` |
55
+ | `Routing Middleware` | `Edge Middleware` |
56
+ | `Web Analytics` | `Vercel Analytics` |
57
+ | `Hobby`, `Pro`, `Enterprise` | `hobby`, `pro`, `enterprise` as plan names |
58
+
59
+ Mirror billing names from the user's dashboard. If a dashboard still says `Edge Requests`, use `Edge Requests`; do not rename it.
60
+
61
+ ## Recommendation shape
62
+
63
+ | Field | Pattern |
64
+ |---|---|
65
+ | `what` | Verb + change + scope. Example: `Add shared caching to /api/products`. |
66
+ | `why` | State the metric and code evidence. Example: `The route handled 1,200,000 requests with a 0% cache hit rate; src/app/api/products/route.ts returns no Cache-Control header.` |
67
+ | `fix` | Numbered steps. Start each step with a verb. |
68
+ | `verify` | Tell the user exactly which metric or command to re-check. |
69
+
70
+ Good:
71
+
72
+ > Add `Cache-Control: s-maxage=300, stale-while-revalidate=86400` to `/api/products`. The route handled 1,200,000 GET requests with a 0% cache hit rate.
73
+
74
+ Bad:
75
+
76
+ > Consider leveraging a robust caching strategy to unlock better performance.
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+ // Mid-flow checkpoint: should the orchestrator ask the user to raise the budget?
3
+ // JSON output is the contract the orchestrator parses; markdown is human-only.
4
+
5
+ import { readFile } from 'node:fs/promises';
6
+ import { createHash } from 'node:crypto';
7
+ import { buildBudgetSummary, renderBudgetSummaryMarkdown } from '../lib/budget-summary.mjs';
8
+
9
+ async function main() {
10
+ const args = parseArgs(process.argv.slice(2));
11
+ if (!args.gatePath) {
12
+ console.error('usage: node scripts/budget-summary.mjs <gate.json> [--format json|markdown] [--no-prompt]');
13
+ process.exit(1);
14
+ }
15
+ const gate = JSON.parse(await readFile(args.gatePath, 'utf-8'));
16
+ const summary = buildBudgetSummary(gate);
17
+ // --no-prompt: CI / non-interactive hosts collapse the checkpoint to a logging hop.
18
+ if (args.noPrompt) {
19
+ summary.shouldAsk = false;
20
+ summary.reason = 'forced false via --no-prompt (non-interactive host)';
21
+ summary.printContract = null;
22
+ summary.questionText = '';
23
+ summary.questionPayload = null;
24
+ summary.options = [];
25
+ summary.chatPreview = `Audit scope: no question needed — ${summary.reason}.`;
26
+ summary.exactChatMessage = {
27
+ body: summary.chatPreview,
28
+ lineCount: summary.chatPreview.split('\n').length,
29
+ sha256: createHash('sha256').update(summary.chatPreview).digest('hex'),
30
+ };
31
+ summary.printCheck = null;
32
+ }
33
+ if (args.format === 'markdown') {
34
+ process.stdout.write(renderBudgetSummaryMarkdown(summary) + '\n');
35
+ } else {
36
+ process.stdout.write(JSON.stringify(summary, null, 2) + '\n');
37
+ }
38
+ }
39
+
40
+ function parseArgs(argv) {
41
+ const out = { positional: [], format: 'json' };
42
+ for (let i = 0; i < argv.length; i++) {
43
+ const a = argv[i];
44
+ if (a === '--format') out.format = argv[++i];
45
+ else if (a.startsWith('--format=')) out.format = a.slice('--format='.length);
46
+ else if (a === '--no-prompt') out.noPrompt = true;
47
+ else out.positional.push(a);
48
+ }
49
+ out.gatePath = out.positional[0];
50
+ return out;
51
+ }
52
+
53
+ main().catch((err) => {
54
+ console.error('[budget-summary] FAILED:', err.message);
55
+ process.exit(1);
56
+ });