@kensaurus/skills 0.0.0-stage → 2.0.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 (423) hide show
  1. package/.claude-plugin/marketplace.json +53 -0
  2. package/.claude-plugin/plugin.json +40 -0
  3. package/.cursor-plugin/plugin.json +38 -0
  4. package/.mcp.json +28 -0
  5. package/CHANGELOG.md +1761 -0
  6. package/LICENSE +21 -0
  7. package/NOTICE +13 -0
  8. package/README.md +820 -2
  9. package/SECURITY.md +55 -0
  10. package/agents/code-reviewer.md +60 -0
  11. package/agents/completion-judge.md +89 -0
  12. package/agents/db-migrator.md +125 -0
  13. package/agents/debugger.md +47 -0
  14. package/agents/deploy-checker.md +100 -0
  15. package/agents/perf-monitor.md +74 -0
  16. package/assets/favicon.png +0 -0
  17. package/assets/logo-light.png +0 -0
  18. package/assets/logo.png +0 -0
  19. package/assets/logo.svg +6 -0
  20. package/assets/og.png +0 -0
  21. package/bin/install.mjs +1127 -0
  22. package/bin/kenji.js +2 -0
  23. package/commands/adr.md +17 -0
  24. package/commands/aeo-plan.md +18 -0
  25. package/commands/arch-boundaries.md +17 -0
  26. package/commands/aso-plan.md +18 -0
  27. package/commands/auth-flows.md +19 -0
  28. package/commands/backup-plan.md +17 -0
  29. package/commands/burndown-full.md +25 -0
  30. package/commands/capacitor-plan.md +18 -0
  31. package/commands/codemod-safety.md +22 -0
  32. package/commands/commit.md +18 -0
  33. package/commands/complete-everything.md +40 -0
  34. package/commands/cost-plan.md +19 -0
  35. package/commands/deadcode-plan.md +26 -0
  36. package/commands/deadcode.md +32 -0
  37. package/commands/debug-issue.md +17 -0
  38. package/commands/deps-plan.md +18 -0
  39. package/commands/docs-plan.md +17 -0
  40. package/commands/doctrine.md +19 -0
  41. package/commands/error-plan.md +19 -0
  42. package/commands/feedback-to-closure.md +36 -0
  43. package/commands/fix-issue.md +76 -0
  44. package/commands/gate-logic.md +26 -0
  45. package/commands/green-repo.md +36 -0
  46. package/commands/grill-me.md +19 -0
  47. package/commands/gtm-plan.md +21 -0
  48. package/commands/gtm-weekly.md +17 -0
  49. package/commands/gtm.md +22 -0
  50. package/commands/handoff.md +15 -0
  51. package/commands/housekeep-backlog.md +18 -0
  52. package/commands/housekeep-files.md +22 -0
  53. package/commands/housekeep-gates.md +18 -0
  54. package/commands/instant-nav.md +11 -0
  55. package/commands/integrity-plan.md +19 -0
  56. package/commands/launch-kit.md +16 -0
  57. package/commands/mcp-guide.md +40 -0
  58. package/commands/mobile-plan.md +19 -0
  59. package/commands/native-rn-monorepo/README.md +78 -0
  60. package/commands/native-rn-monorepo/android-build.md +26 -0
  61. package/commands/native-rn-monorepo/android-install.md +32 -0
  62. package/commands/native-rn-monorepo/android-logcat.md +37 -0
  63. package/commands/native-rn-monorepo/ios-ci-logs.md +56 -0
  64. package/commands/native-rn-monorepo/ios-ci-status.md +52 -0
  65. package/commands/native-rn-monorepo/ios-ci-trigger.md +59 -0
  66. package/commands/native-rn-monorepo/rn-reset.md +50 -0
  67. package/commands/native-rn-monorepo/rn-ship-ios.md +67 -0
  68. package/commands/native-rn-monorepo/rn-verify.md +53 -0
  69. package/commands/perf-plan.md +18 -0
  70. package/commands/plan-mode.md +74 -0
  71. package/commands/pr.md +16 -0
  72. package/commands/pricing-plan.md +20 -0
  73. package/commands/privacy-plan.md +18 -0
  74. package/commands/readability.md +12 -0
  75. package/commands/readme.md +15 -0
  76. package/commands/refactor.md +15 -0
  77. package/commands/release-prep.md +17 -0
  78. package/commands/research.md +25 -0
  79. package/commands/responsive-audit.md +21 -0
  80. package/commands/review-code.md +18 -0
  81. package/commands/rls-plan.md +18 -0
  82. package/commands/secrets-plan.md +18 -0
  83. package/commands/security-plan.md +19 -0
  84. package/commands/ship-and-observe.md +36 -0
  85. package/commands/skill-conflicts.md +19 -0
  86. package/commands/slop-plan.md +18 -0
  87. package/commands/stub-plan.md +18 -0
  88. package/commands/test-mutation.md +16 -0
  89. package/commands/test-plan.md +17 -0
  90. package/commands/test.md +29 -0
  91. package/commands/thirdparty-web-interface-guidelines.md +185 -0
  92. package/commands/uiux-plan.md +18 -0
  93. package/commands/uiux.md +45 -0
  94. package/commands/update-deps.md +21 -0
  95. package/commands/validation-plan.md +19 -0
  96. package/commands-portable/fix-issue.md +72 -0
  97. package/commands-portable/plan-mode.md +92 -0
  98. package/commands-portable/research.md +91 -0
  99. package/docs/screenshots/README.md +5 -0
  100. package/docs/screenshots/audit-dark.png +0 -0
  101. package/docs/screenshots/build-dark.png +0 -0
  102. package/docs/screenshots/grill-dark.png +0 -0
  103. package/docs/screenshots/hero-dark.png +0 -0
  104. package/docs/screenshots/hero-light.png +0 -0
  105. package/docs/screenshots/ship-dark.png +0 -0
  106. package/docs/screenshots/src/showcase.html +320 -0
  107. package/hooks/completion-gate.mjs +258 -0
  108. package/hooks/cursor-hooks.json +13 -0
  109. package/hooks/hooks.json +15 -0
  110. package/install.sh +21 -0
  111. package/llms.txt +40 -0
  112. package/mcp/README.md +266 -0
  113. package/mcp/VERSIONS.md +41 -0
  114. package/mcp/mcp-full.json.template +124 -0
  115. package/mcp/mcp.json.template +29 -0
  116. package/mcp/pinned-versions.json +27 -0
  117. package/package.json +93 -4
  118. package/rules/approved-plan-execution.mdc +65 -0
  119. package/rules/full-stack-ship-discipline.mdc +37 -0
  120. package/rules/native-rn-monorepo/README.md +63 -0
  121. package/rules/native-rn-monorepo/_project.mdc +69 -0
  122. package/rules/native-rn-monorepo/native-android.mdc +72 -0
  123. package/rules/native-rn-monorepo/native-ios.mdc +61 -0
  124. package/rules/native-rn-monorepo/react-native-js.mdc +78 -0
  125. package/rules/native-rn-monorepo/web.mdc +60 -0
  126. package/rules/project-starter/components.mdc +54 -0
  127. package/rules/project-starter/data-fetching.mdc +77 -0
  128. package/rules/project-starter/git.mdc +41 -0
  129. package/rules/project-starter/supabase.mdc +37 -0
  130. package/rules/project-starter/tailwind.mdc +48 -0
  131. package/rules/project-starter/typescript.mdc +36 -0
  132. package/rules/project-starter/web-performance.mdc +42 -0
  133. package/rules/senior-engineer.mdc +30 -0
  134. package/rules/shell-first-search.mdc +19 -0
  135. package/rules/skill-workflows.mdc +35 -0
  136. package/rules/verification-before-completion.mdc +57 -0
  137. package/skills/audit-accessibility/SKILL.md +441 -0
  138. package/skills/audit-agent-speed/SKILL.md +181 -0
  139. package/skills/audit-agent-speed/scripts/stop-typecheck.mjs +151 -0
  140. package/skills/audit-analytics/SKILL.md +138 -0
  141. package/skills/audit-auth-flows/SKILL.md +267 -0
  142. package/skills/audit-backend-architecture/SKILL.md +266 -0
  143. package/skills/audit-backend-architecture/references/patterns.md +386 -0
  144. package/skills/audit-bundle-size/SKILL.md +296 -0
  145. package/skills/audit-cicd/SKILL.md +218 -0
  146. package/skills/audit-code-quality/SKILL.md +314 -0
  147. package/skills/audit-code-review/SKILL.md +289 -0
  148. package/skills/audit-codemod-safety/SKILL.md +159 -0
  149. package/skills/audit-db-schema/SKILL.md +465 -0
  150. package/skills/audit-db-schema/references/details.md +110 -0
  151. package/skills/audit-doctrine/SKILL.md +189 -0
  152. package/skills/audit-env-parity/SKILL.md +133 -0
  153. package/skills/audit-fe-api/SKILL.md +458 -0
  154. package/skills/audit-gate-logic/SKILL.md +219 -0
  155. package/skills/audit-i18n/SKILL.md +339 -0
  156. package/skills/audit-infra-cost/SKILL.md +142 -0
  157. package/skills/audit-langfuse-llm/SKILL.md +468 -0
  158. package/skills/audit-langfuse-llm/references/details.md +226 -0
  159. package/skills/audit-llm-security/SKILL.md +147 -0
  160. package/skills/audit-monetization-iap/SKILL.md +137 -0
  161. package/skills/audit-payment-system/SKILL.md +268 -0
  162. package/skills/audit-payment-system/references/checklist.md +283 -0
  163. package/skills/audit-performance/SKILL.md +383 -0
  164. package/skills/audit-performance/references/loading-priority-2026.md +81 -0
  165. package/skills/audit-realworld/SKILL.md +287 -0
  166. package/skills/audit-registry-listing/SKILL.md +122 -0
  167. package/skills/audit-resilience/SKILL.md +154 -0
  168. package/skills/audit-responsive/SKILL.md +221 -0
  169. package/skills/audit-responsive/references/checklist.md +166 -0
  170. package/skills/audit-security/SKILL.md +289 -0
  171. package/skills/audit-skill-conflicts/SKILL.md +178 -0
  172. package/skills/audit-ui-states/SKILL.md +146 -0
  173. package/skills/audit-uiux-design-system/SKILL.md +475 -0
  174. package/skills/audit-uiux-design-system/references/details.md +71 -0
  175. package/skills/audit-ux/SKILL.md +379 -0
  176. package/skills/audit-ux/references/details.md +245 -0
  177. package/skills/audit-ux-journeys/SKILL.md +215 -0
  178. package/skills/audit-ux-journeys/references/checklist.md +179 -0
  179. package/skills/backend-db-performance/SKILL.md +441 -0
  180. package/skills/backend-error-handling/SKILL.md +489 -0
  181. package/skills/backend-error-handling/references/details.md +58 -0
  182. package/skills/backend-observability/SKILL.md +88 -0
  183. package/skills/backend-patterns/SKILL.md +499 -0
  184. package/skills/backend-patterns/references/architecture-patterns.md +298 -0
  185. package/skills/backend-realtime/SKILL.md +403 -0
  186. package/skills/backend-realtime/references/patterns.md +74 -0
  187. package/skills/burndown-full/SKILL.md +174 -0
  188. package/skills/complete-everything/SKILL.md +295 -0
  189. package/skills/data-pipeline/SKILL.md +109 -0
  190. package/skills/data-visualization/SKILL.md +488 -0
  191. package/skills/debug-error/SKILL.md +322 -0
  192. package/skills/debug-fe-be-integration/SKILL.md +459 -0
  193. package/skills/debug-sentry-monitor/SKILL.md +497 -0
  194. package/skills/debug-sentry-monitor/references/details.md +165 -0
  195. package/skills/deploy-npm/SKILL.md +394 -0
  196. package/skills/deploy-npm/references/example-mushi-mushi.md +52 -0
  197. package/skills/deploy-verify/SKILL.md +489 -0
  198. package/skills/design-api/SKILL.md +379 -0
  199. package/skills/design-canvas/SKILL.md +155 -0
  200. package/skills/design-email/SKILL.md +370 -0
  201. package/skills/design-frontend/SKILL.md +143 -0
  202. package/skills/design-generative-art/SKILL.md +474 -0
  203. package/skills/design-mobile-first/SKILL.md +506 -0
  204. package/skills/design-motion/SKILL.md +333 -0
  205. package/skills/design-motion/references/delight-interactions.md +191 -0
  206. package/skills/design-prd/SKILL.md +443 -0
  207. package/skills/design-system/SKILL.md +457 -0
  208. package/skills/design-theme/SKILL.md +226 -0
  209. package/skills/design-theme/themes/tsumagoi-ranch.md +150 -0
  210. package/skills/docs-adr/SKILL.md +168 -0
  211. package/skills/docs-coauthor/SKILL.md +368 -0
  212. package/skills/docs-comparison-pages/SKILL.md +117 -0
  213. package/skills/docs-domain-modeling/SKILL.md +97 -0
  214. package/skills/docs-launch-kit/SKILL.md +139 -0
  215. package/skills/docs-writer/SKILL.md +469 -0
  216. package/skills/enhance-agent-guardrails/SKILL.md +164 -0
  217. package/skills/enhance-arch-boundaries/SKILL.md +154 -0
  218. package/skills/enhance-capacitor-ui/SKILL.md +463 -0
  219. package/skills/enhance-capacitor-ui/references/details.md +750 -0
  220. package/skills/enhance-email-deliverability/SKILL.md +143 -0
  221. package/skills/enhance-growth-loops/SKILL.md +122 -0
  222. package/skills/enhance-lifecycle-email/SKILL.md +130 -0
  223. package/skills/enhance-motion/SKILL.md +193 -0
  224. package/skills/enhance-onboarding/SKILL.md +148 -0
  225. package/skills/enhance-pwa/SKILL.md +304 -0
  226. package/skills/enhance-readability/SKILL.md +146 -0
  227. package/skills/enhance-readme/SKILL.md +496 -0
  228. package/skills/enhance-readme/package-lock.json +187 -0
  229. package/skills/enhance-readme/package.json +17 -0
  230. package/skills/enhance-readme/scripts/generate-readme-blocks.mjs +199 -0
  231. package/skills/enhance-readme/scripts/record-readme-tour.mjs +442 -0
  232. package/skills/enhance-skill-prompts/SKILL.md +167 -0
  233. package/skills/enhance-skill-prompts/references/exemplar-audit-auth-flows.md +311 -0
  234. package/skills/enhance-web-conversion/SKILL.md +155 -0
  235. package/skills/enhance-web-forms/SKILL.md +154 -0
  236. package/skills/enhance-web-instant-nav/SKILL.md +138 -0
  237. package/skills/enhance-web-instant-nav/references/bfcache-blockers.md +23 -0
  238. package/skills/enhance-web-instant-nav/references/early-hints.md +33 -0
  239. package/skills/enhance-web-instant-nav/references/speculation-rules.md +44 -0
  240. package/skills/enhance-web-landing/SKILL.md +459 -0
  241. package/skills/enhance-web-landing/references/details.md +773 -0
  242. package/skills/enhance-web-redesign/SKILL.md +228 -0
  243. package/skills/enhance-web-seo/SKILL.md +276 -0
  244. package/skills/enhance-web-ui/SKILL.md +473 -0
  245. package/skills/enhance-web-ui/references/details.md +674 -0
  246. package/skills/enhance-web-ux/HEURISTICS.md +242 -0
  247. package/skills/enhance-web-ux/PATTERNS.md +375 -0
  248. package/skills/enhance-web-ux/SKILL.md +464 -0
  249. package/skills/enhance-web-ux/examples.md +222 -0
  250. package/skills/enhance-web-ux/references/details.md +406 -0
  251. package/skills/enhance-web-web3d/SKILL.md +397 -0
  252. package/skills/enhance-web-web3d/references/css-canvas-effects.md +180 -0
  253. package/skills/handoff/SKILL.md +66 -0
  254. package/skills/housekeep-backlog/SKILL.md +149 -0
  255. package/skills/housekeep-dead-code/SKILL.md +387 -0
  256. package/skills/housekeep-dead-code/references/ratchet-ci.md +205 -0
  257. package/skills/housekeep-dead-code/references/supabase-hygiene.md +152 -0
  258. package/skills/housekeep-design/SKILL.md +207 -0
  259. package/skills/housekeep-files/SKILL.md +220 -0
  260. package/skills/housekeep-files/references/naming-and-catalog.md +86 -0
  261. package/skills/housekeep-files/scripts/housekeep-files.ps1 +360 -0
  262. package/skills/housekeep-files/scripts/housekeep-files.sh +238 -0
  263. package/skills/housekeep-gates/SKILL.md +174 -0
  264. package/skills/iterate-agent-harness/SKILL.md +137 -0
  265. package/skills/iterate-gtm-weekly/SKILL.md +103 -0
  266. package/skills/iterate-post-launch/SKILL.md +292 -0
  267. package/skills/meta-mcp-builder/SKILL.md +313 -0
  268. package/skills/meta-skill-creator/SKILL.md +304 -0
  269. package/skills/mobile-capacitor-platform/SKILL.md +104 -0
  270. package/skills/mobile-emulator-start/SKILL.md +296 -0
  271. package/skills/mobile-emulator-test/SKILL.md +491 -0
  272. package/skills/mobile-emulator-test/references/details.md +478 -0
  273. package/skills/mobile-rn-performance/SKILL.md +107 -0
  274. package/skills/mobile-rn-screen/SKILL.md +476 -0
  275. package/skills/mobile-rn-screen/references/details.md +785 -0
  276. package/skills/mushi-health/SKILL.md +206 -0
  277. package/skills/mushi-integration/SKILL.md +257 -0
  278. package/skills/plan-aeo-readiness/SKILL.md +166 -0
  279. package/skills/plan-antislop/SKILL.md +281 -0
  280. package/skills/plan-aso/SKILL.md +149 -0
  281. package/skills/plan-backup-dr/SKILL.md +131 -0
  282. package/skills/plan-capacitor-hardening/SKILL.md +217 -0
  283. package/skills/plan-data-integrity/SKILL.md +187 -0
  284. package/skills/plan-dead-code/SKILL.md +386 -0
  285. package/skills/plan-dead-code/references/knip-config.md +214 -0
  286. package/skills/plan-dead-code/references/output-templates.md +133 -0
  287. package/skills/plan-dead-code/references/preservation-contract.md +50 -0
  288. package/skills/plan-dead-code/references/residue-greps.md +84 -0
  289. package/skills/plan-dependency-provenance/SKILL.md +200 -0
  290. package/skills/plan-docs-sync/SKILL.md +143 -0
  291. package/skills/plan-docs-sync/references/drift-taxonomy.md +43 -0
  292. package/skills/plan-docs-sync/references/output-templates.md +33 -0
  293. package/skills/plan-docs-sync/references/preservation-contract.md +17 -0
  294. package/skills/plan-error-handling/SKILL.md +205 -0
  295. package/skills/plan-gtm/SKILL.md +276 -0
  296. package/skills/plan-gtm/references/benchmarks-2026.md +183 -0
  297. package/skills/plan-input-validation/SKILL.md +179 -0
  298. package/skills/plan-llm-cost-guardrails/SKILL.md +176 -0
  299. package/skills/plan-mobile-readiness/SKILL.md +171 -0
  300. package/skills/plan-perf-audit/SKILL.md +145 -0
  301. package/skills/plan-perf-audit/references/audit-scope.md +51 -0
  302. package/skills/plan-perf-audit/references/output-templates.md +33 -0
  303. package/skills/plan-perf-audit/references/preservation-contract.md +13 -0
  304. package/skills/plan-pricing/SKILL.md +173 -0
  305. package/skills/plan-privacy-compliance/SKILL.md +148 -0
  306. package/skills/plan-rls-audit/SKILL.md +231 -0
  307. package/skills/plan-secrets-audit/SKILL.md +181 -0
  308. package/skills/plan-security-audit/SKILL.md +168 -0
  309. package/skills/plan-security-audit/references/output-templates.md +36 -0
  310. package/skills/plan-security-audit/references/owasp-supabase-scope.md +55 -0
  311. package/skills/plan-security-audit/references/preservation-contract.md +18 -0
  312. package/skills/plan-stub-checker/SKILL.md +216 -0
  313. package/skills/plan-stub-checker/references/detection-methodology.md +75 -0
  314. package/skills/plan-stub-checker/references/detection-taxonomy.md +34 -0
  315. package/skills/plan-stub-checker/references/output-templates.md +63 -0
  316. package/skills/plan-stub-checker/references/preservation-contract.md +24 -0
  317. package/skills/plan-test-coverage/SKILL.md +170 -0
  318. package/skills/plan-test-coverage/references/methodology.md +54 -0
  319. package/skills/plan-test-coverage/references/output-templates.md +34 -0
  320. package/skills/plan-test-coverage/references/preservation-contract.md +15 -0
  321. package/skills/plan-uiux-unification/SKILL.md +230 -0
  322. package/skills/plan-uiux-unification/references/output-templates.md +67 -0
  323. package/skills/plan-uiux-unification/references/phase-workbook.md +85 -0
  324. package/skills/plan-uiux-unification/references/preservation-contract.md +24 -0
  325. package/skills/protocol-browser-anti-stall/SKILL.md +211 -0
  326. package/skills/protocol-browser-anti-stall/references/mcp-to-cli-map.md +113 -0
  327. package/skills/protocol-browser-anti-stall/references/playwright-session-coordination.md +170 -0
  328. package/skills/research/SKILL.md +422 -0
  329. package/skills/test-exploratory/SKILL.md +165 -0
  330. package/skills/test-exploratory/references/charter-template.md +29 -0
  331. package/skills/test-load/SKILL.md +126 -0
  332. package/skills/test-mutation/SKILL.md +160 -0
  333. package/skills/test-playwright/SKILL.md +354 -0
  334. package/skills/test-qa/SKILL.md +364 -0
  335. package/skills/test-qa/references/details.md +268 -0
  336. package/skills/test-red-team/SKILL.md +387 -0
  337. package/skills/test-red-team/references/owasp-attack-checklist.md +193 -0
  338. package/skills/test-unit/SKILL.md +259 -0
  339. package/skills/test-unit/references/details.md +267 -0
  340. package/skills/test-visual-regression/SKILL.md +132 -0
  341. package/skills/thirdparty-emil-design-eng/ATTRIBUTION.md +20 -0
  342. package/skills/thirdparty-emil-design-eng/SKILL.md +21 -0
  343. package/skills/thirdparty-emil-design-eng/references/emil-design-eng.md +676 -0
  344. package/skills/thirdparty-ui-ux-pro-max/ATTRIBUTION.md +22 -0
  345. package/skills/thirdparty-ui-ux-pro-max/SKILL.md +304 -0
  346. package/skills/thirdparty-ui-ux-pro-max/data/charts.csv +26 -0
  347. package/skills/thirdparty-ui-ux-pro-max/data/colors.csv +97 -0
  348. package/skills/thirdparty-ui-ux-pro-max/data/icons.csv +101 -0
  349. package/skills/thirdparty-ui-ux-pro-max/data/landing.csv +31 -0
  350. package/skills/thirdparty-ui-ux-pro-max/data/products.csv +97 -0
  351. package/skills/thirdparty-ui-ux-pro-max/data/react-performance.csv +45 -0
  352. package/skills/thirdparty-ui-ux-pro-max/data/stacks/astro.csv +54 -0
  353. package/skills/thirdparty-ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  354. package/skills/thirdparty-ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  355. package/skills/thirdparty-ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  356. package/skills/thirdparty-ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  357. package/skills/thirdparty-ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  358. package/skills/thirdparty-ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  359. package/skills/thirdparty-ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  360. package/skills/thirdparty-ui-ux-pro-max/data/stacks/react.csv +54 -0
  361. package/skills/thirdparty-ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  362. package/skills/thirdparty-ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  363. package/skills/thirdparty-ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  364. package/skills/thirdparty-ui-ux-pro-max/data/stacks/vue.csv +50 -0
  365. package/skills/thirdparty-ui-ux-pro-max/data/styles.csv +68 -0
  366. package/skills/thirdparty-ui-ux-pro-max/data/typography.csv +58 -0
  367. package/skills/thirdparty-ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  368. package/skills/thirdparty-ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  369. package/skills/thirdparty-ui-ux-pro-max/data/web-interface.csv +31 -0
  370. package/skills/thirdparty-ui-ux-pro-max/scripts/core.py +253 -0
  371. package/skills/thirdparty-ui-ux-pro-max/scripts/design_system.py +1067 -0
  372. package/skills/thirdparty-ui-ux-pro-max/scripts/search.py +114 -0
  373. package/skills/thirdparty-web-interface-guidelines/ATTRIBUTION.md +23 -0
  374. package/skills/thirdparty-web-interface-guidelines/SKILL.md +190 -0
  375. package/skills/workflow-build-feature/SKILL.md +118 -0
  376. package/skills/workflow-coding-discipline/SKILL.md +140 -0
  377. package/skills/workflow-environment-ready/SKILL.md +128 -0
  378. package/skills/workflow-feature-flag/SKILL.md +262 -0
  379. package/skills/workflow-feedback-to-closure/SKILL.md +165 -0
  380. package/skills/workflow-fix-and-ship/SKILL.md +136 -0
  381. package/skills/workflow-git-commit/SKILL.md +200 -0
  382. package/skills/workflow-green-repo/SKILL.md +166 -0
  383. package/skills/workflow-grilling/SKILL.md +73 -0
  384. package/skills/workflow-gtm/SKILL.md +153 -0
  385. package/skills/workflow-housekeep/SKILL.md +453 -0
  386. package/skills/workflow-housekeep/references/templates.md +109 -0
  387. package/skills/workflow-launch-ready/SKILL.md +145 -0
  388. package/skills/workflow-merge-conflicts/SKILL.md +62 -0
  389. package/skills/workflow-onboard/SKILL.md +99 -0
  390. package/skills/workflow-parallel-agents/SKILL.md +164 -0
  391. package/skills/workflow-pr/SKILL.md +197 -0
  392. package/skills/workflow-quality-gate/SKILL.md +147 -0
  393. package/skills/workflow-refactor/SKILL.md +274 -0
  394. package/skills/workflow-release-prep/SKILL.md +207 -0
  395. package/skills/workflow-ship-and-observe/SKILL.md +164 -0
  396. package/skills/workflow-spec-tdd/SKILL.md +141 -0
  397. package/skills/workflow-spec-tdd/references/spec-template.md +126 -0
  398. package/skills/workflow-spec-tdd/references/tdd-patterns.md +167 -0
  399. package/skills-cursor/babysit/SKILL.md +17 -0
  400. package/skills-cursor/canvas/SKILL.md +142 -0
  401. package/skills-cursor/canvas/sdk/canvas-tokens.d.ts +235 -0
  402. package/skills-cursor/canvas/sdk/chart-primitives.d.ts +200 -0
  403. package/skills-cursor/canvas/sdk/dag-layout.d.ts +102 -0
  404. package/skills-cursor/canvas/sdk/diff-view.d.ts +130 -0
  405. package/skills-cursor/canvas/sdk/form-primitives.d.ts +194 -0
  406. package/skills-cursor/canvas/sdk/hooks.d.ts +117 -0
  407. package/skills-cursor/canvas/sdk/index.d.ts +47 -0
  408. package/skills-cursor/canvas/sdk/theme.d.ts +61 -0
  409. package/skills-cursor/canvas/sdk/todo-list.d.ts +49 -0
  410. package/skills-cursor/canvas/sdk/ui-primitives.d.ts +549 -0
  411. package/skills-cursor/canvas/sdk/ui-primitives.test.d.ts +2 -0
  412. package/skills-cursor/create-hook/SKILL.md +238 -0
  413. package/skills-cursor/create-rule/SKILL.md +185 -0
  414. package/skills-cursor/create-skill/SKILL.md +269 -0
  415. package/skills-cursor/create-skill/references/authoring-guide.md +182 -0
  416. package/skills-cursor/create-subagent/SKILL.md +228 -0
  417. package/skills-cursor/migrate-to-skills/SKILL.md +121 -0
  418. package/skills-cursor/shell/SKILL.md +22 -0
  419. package/skills-cursor/split-to-prs/SKILL.md +47 -0
  420. package/skills-cursor/statusline/SKILL.md +193 -0
  421. package/skills-cursor/update-cli-config/SKILL.md +85 -0
  422. package/skills-cursor/update-cursor-settings/SKILL.md +137 -0
  423. package/skills.sh.json +296 -0
@@ -0,0 +1,266 @@
1
+ ---
2
+ name: audit-backend-architecture
3
+ description: >
4
+ Read-only backend-architecture audit and pattern advisor, gated by stack.
5
+ Use when "audit backend architecture", "which pattern should I use", "am I
6
+ over-engineering", or "sync vs event-driven". Enforced boundaries →
7
+ enhance-arch-boundaries.
8
+ license: MIT
9
+ effort: high
10
+ ---
11
+
12
+ # audit-backend-architecture — Distributed-Systems Pattern Maturity Audit
13
+
14
+ **Degree of freedom: MIXED** — Fit, presence, and adopt/defer `[HIGH freedom]`;
15
+ Phase 0 topology probes `[LOW freedom — run exactly]`. Never mark a
16
+ pattern Missing if its tier is N/A.
17
+
18
+ Read-only. Assess and recommend; do not change code. Per-call timeouts,
19
+ retry+jitter, idempotency keys, cancellation → **`audit-resilience`**. This
20
+ skill checks whether the *patterns* exist and whether they *fit*.
21
+
22
+ Two lenses:
23
+
24
+ 1. **Conformance** (Phase 2) — Implemented / Partial / Missing / N/A with `file:line`.
25
+ 2. **Fit / decision** (Phase 3) — Adopt now / Adopt when [trigger] / Defer
26
+ (premature). *"Don't build this yet"* is a first-class finding.
27
+
28
+ ---
29
+
30
+ ## Core principle — start simple, earn every pattern
31
+
32
+ Each pattern solves a *specific* problem and carries a *specific* cost. The current
33
+ consensus is **modular-monolith-first**: >90% of systems are well served by a
34
+ well-structured monolith; **premature decomposition is the #1 failure mode**. A
35
+ pattern is "Missing" only if the **measurable trigger** is present — otherwise
36
+ adopting it is over-engineering, flagged as loudly as a real gap.
37
+
38
+ - **Fit beats presence.** "No service mesh / no CQRS" is a finding *only* when a trigger is present.
39
+ - **Decide per interaction, not per system.** Sync vs event-driven is chosen per
40
+ boundary-crossing call (see references/patterns.md → Communication style).
41
+ - **Distributed monolith is worse than a monolith.** Shared DB + coupled deploys
42
+ pays the distributed tax with none of the independence.
43
+ - **Reversible steps.** Prefer modular monolith, façade, outbox over premature
44
+ service split or event-sourcing everywhere.
45
+
46
+ ## How to reason — Observe → Interpret → Classify → Severity
47
+
48
+ 1. **Observe** — topology signals + the `file:line` (or "searched, none found")
49
+ 2. **Interpret** — is there a present pain, a named future trigger, or no trigger?
50
+ 3. **Classify** — Implemented / Partial / Missing / N/A, then Adopt now / Adopt when / Defer
51
+ 4. **Severity** — dual-write, cascade-outage, silent inconsistency = Critical; Missing with no trigger = over-engineering, not a gap
52
+
53
+ ## Worked example
54
+
55
+ > **Observe:** T1 Next.js + Supabase. `orders/service.ts` writes the row then
56
+ > publishes to a queue in a second step. Product page hits the DB on every
57
+ > request. No k8s, mesh, or multi-service fleet.
58
+ > **Interpret:** a crash between write and publish loses the fulfillment event
59
+ > (dual-write). Hot reads have no cache. Mesh and CQRS have no trigger.
60
+ > **Classify:** Outbox = Adopt now; cache-aside = Adopt now; mesh / CQRS = Defer (T1 N/A).
61
+ > **Severity:** Critical for dual-write; High for the uncached hot path.
62
+ > **Finding:** Outbox (#6) | orders/service.ts | Critical | Adopt now — close
63
+ > dual-write. Mesh | N/A (T1) | Defer — no 10+ service fleet.
64
+
65
+ ---
66
+
67
+ ## Phase 0 — Detect topology (gates every later finding) [LOW freedom — run exactly]
68
+
69
+ Architecture advice is only correct in context. Flagging "no service mesh" on a
70
+ Next.js + Supabase app is noise; missing it on a 40-service Kubernetes fleet is
71
+ critical. **Classify the repo first**, then apply only the patterns that fit.
72
+ Never report a pattern as "Missing" if its topology tier is `N/A`.
73
+
74
+ ```bash
75
+ # Deploy target / runtime
76
+ rg -n --hidden -g '!node_modules' -l "vercel\.json|netlify\.toml|next\.config|supabase/config" # serverless/PaaS
77
+ fd -H -t f 'Dockerfile|docker-compose\.ya?ml|Containerfile' # containers
78
+ fd -H -t d 'k8s|kustomize|charts|helm' ; rg -n "apiVersion:\s*(apps|networking)" -g '*.{yaml,yml}' -l # kubernetes
79
+ # Service count / boundaries
80
+ fd -H -t f 'package.json|go.mod|pyproject.toml|pom.xml|Cargo.toml' | rg -v node_modules # count deployable units
81
+ # Messaging / eventing
82
+ rg -n "kafka|rabbitmq|amqp|nats|sqs|sns|pubsub|kinesis|redpanda|temporal|inngest|trigger\.dev" -l
83
+ # Inter-service transport
84
+ rg -n "grpc|@grpc|protobuf|\.proto|graphql|apollo|federation|trpc" -l
85
+ # Mesh / gateway infra
86
+ rg -n "istio|linkerd|consul|envoy|kong|apisig|traefik|nginx-ingress|api-?gateway|ztunnel|waypoint" -l
87
+ ```
88
+
89
+ Record a **topology profile** and pick the tier:
90
+
91
+ | Tier | Signals | Patterns in scope |
92
+ |---|---|---|
93
+ | **T1 — Serverless / modular monolith** | single deployable, Next/Supabase/edge fns, no broker | Gateway concerns (as middleware), BFF-lite, circuit breaker, idempotency/outbox-lite, hexagonal, strangler, tracing/SLO, contract tests |
94
+ | **T2 — Containers, few services** | Dockerfiles, 2–10 services, maybe a broker | + real gateway, BFF-per-client, bulkhead, outbox+relay, saga, backpressure, ACL, mTLS |
95
+ | **T3 — Kubernetes / microservices / event-driven** | k8s manifests, broker, gRPC/federation, 10+ services | + sidecar/service mesh (ambient), CQRS/event-sourcing, cell-based, full saga orchestration, CDC |
96
+
97
+ If there are **no** backend services (static site / pure frontend), stop and report reduced
98
+ applicability — hand any API-client concerns to `audit-fe-api`.
99
+
100
+ ---
101
+
102
+ ## Phase 1 — Research current patterns [HIGH freedom]
103
+
104
+ Follow `/research`: confirm current-year conventions and the *installed* libraries for the detected
105
+ stack (gateway/proxy, breaker/bulkhead libs, outbox/CDC tooling, saga/workflow engines, mesh mode).
106
+ Anchor recommendations to versions actually in the manifest — never propose a library the repo can't
107
+ run.
108
+
109
+ ---
110
+
111
+ ## Phase 2 — Architecture maturity matrix [HIGH freedom]
112
+
113
+ For **each in-scope pattern**, mark `Implemented / Partial / Missing / N/A` with `file:line`, a
114
+ one-line "why it matters", and the fix-delegate. **Detailed detection commands, "good vs. red-flag"
115
+ signals, and fix targets for every pattern are in [references/patterns.md](references/patterns.md)** —
116
+ load it and work through the applicable rows.
117
+
118
+ | # | Pattern | Tier | This audit checks (structural) | Fix via |
119
+ |---|---|---|---|---|
120
+ | 1 | **API gateway** | T1+ | Auth, rate-limit, CORS, transform, logging, monitoring, caching enforced in **one** edge layer, not per-route copy-paste | `backend-patterns`, `audit-security` |
121
+ | 2 | **BFF / API composition** | T1+ | Per-client shaping vs. one general API; over/under-fetch; who owns aggregation; federation at 5+ teams | `backend-patterns`, `design-api` |
122
+ | 3 | **Circuit breaker** | T1+ | A breaker exists around downstream calls (presence/architecture only) | `audit-resilience` → `backend-patterns` |
123
+ | 4 | **Bulkhead** | T2+ | Per-dependency resource pools; one slow dep can't exhaust shared pool | `backend-patterns` |
124
+ | 5 | **Backpressure / load shedding** | T2+ | Queue-based load leveling, bounded queues, shed/429 under overload | `backend-patterns` |
125
+ | 6 | **Outbox + relay/CDC** | T1+ | Dual-write closed: state + event commit atomically; relay (poll/Debezium) publishes | `backend-patterns` |
126
+ | 7 | **Saga** | T2+ | Multi-service workflows use local txns + **compensation**; saga-pivot ordering; orchestration vs choreography | `backend-patterns` |
127
+ | 8 | **CQRS + event sourcing** | T3 (selective) | Applied only where read/write loads diverge; immutable event log + materialized views | `backend-patterns`, `audit-db-schema` |
128
+ | 9 | **Hexagonal / ports-and-adapters** | T1+ | Domain logic isolated from framework/IO behind ports; adapters swappable; testable without infra | `workflow-refactor`, `backend-patterns` |
129
+ | 10 | **Anti-corruption layer** | T2+ | 3rd-party/legacy models translated at the boundary, not leaked into the domain | `backend-patterns` |
130
+ | 11 | **Strangler-fig migration** | any (if legacy) | Incremental replacement behind a façade vs. big-bang rewrite | `workflow-refactor` |
131
+ | 12 | **Sidecar / service mesh** | T3 | mTLS, retries, L7 policy via mesh; prefer **ambient/sidecarless** for net-new; not hand-rolled per service | `backend-patterns`, `audit-security` |
132
+ | 13 | **Cell-based architecture** | T3 (scale) | Blast-radius isolation, shared-nothing cells, cell-scoped routing/identity | `backend-patterns` |
133
+ | 14 | **Zero-trust / mTLS / service identity** | T2+ | Service-to-service auth, no implicit trust inside the network | `audit-security` |
134
+ | 15 | **Distributed tracing + SLOs** | T1+ | OpenTelemetry trace/correlation IDs across hops; RED/USE metrics; SLOs/error budgets | `backend-observability` |
135
+ | 16 | **Contract testing** | T2+ | Consumer-driven contracts (Pact/OpenAPI) between clients↔BFF and service↔service | `test-unit`, `audit-fe-api` |
136
+
137
+ ### Communication & data-flow choices (decide per interaction, not per system)
138
+
139
+ These are *selection* decisions, not "missing features" — the answer depends on each interaction and
140
+ the stage. Detection + trade-offs in references/patterns.md.
141
+
142
+ | # | Pattern | Tier | This audit checks | Fix via |
143
+ |---|---|---|---|---|
144
+ | 17 | **Communication style** (sync request/response vs async event-driven) | T1+ | Each cross-boundary call fits the interaction: sync for "need the answer now / strong consistency / query"; async for "multiple reactors / independent scaling / background". Symptom to flag: one request making 5 blocking downstream calls | `backend-patterns` |
145
+ | 18 | **Cache-aside** | T1+ | Hot read-heavy paths (product/profile/config) check cache→DB-on-miss with a TTL/invalidation story; no stale-forever or thundering-herd | `backend-patterns`, `backend-db-performance` |
146
+ | 19 | **Database-per-service / data ownership** | T2+ (owned schemas at T1) | Each service/module owns its data; no cross-service table reads. **Anti-pattern:** shared DB + coupled deploys = distributed monolith | `backend-patterns`, `audit-db-schema` |
147
+
148
+ Rules:
149
+ - **Evidence or it didn't happen** — every verdict cites `file:line` or "searched, none found".
150
+ - **N/A is a first-class verdict** — record *why* (topology tier), don't silently drop a row.
151
+ - **Don't double-count** `audit-resilience`'s per-call concerns; link to it instead.
152
+
153
+ ---
154
+
155
+ ## Phase 3 — Decide: fit, not just presence [HIGH freedom]
156
+
157
+ A pattern being "Missing" is only actionable if the codebase has the **trigger** that justifies it.
158
+ For every candidate pattern, classify it into one of three buckets from the detected symptoms:
159
+
160
+ - **Adopt now** — a real, present pain maps to this pattern (evidence: `file:line` + the symptom).
161
+ - **Adopt when [trigger]** — not yet, but name the concrete signal that should flip it on.
162
+ - **Defer (premature)** — no trigger present; adopting now is over-engineering. Say so plainly.
163
+
164
+ ### Maturity ladder (climb only when the rung's trigger fires)
165
+
166
+ | Stage | Shape | Add these when the trigger appears |
167
+ |---|---|---|
168
+ | **0. Modular monolith** | one deploy, clean module boundaries, owned schemas | this is the correct default for most systems |
169
+ | **1. Fast & reliable monolith** | + **cache-aside** (read latency/DB load), **outbox** (dual-write), sync request/response with timeouts + a breaker | reads are hot / an event must not be lost |
170
+ | **2. Decoupled** | + **async event-driven** for side effects, **BFF** per client, **CQRS** on the *one* read/write-divergent area | a request fans out to many blocking calls; reads & writes scale differently |
171
+ | **3. Distributed** | + **database-per-service**, **saga** for multi-step transactions, **backpressure** | a module needs independent deploy/scale; a workflow spans services |
172
+ | **4. Fleet** | + **service mesh** (ambient), **cell-based**, full orchestration | 10+ services, ~50+ engineers, blast-radius/residency needs |
173
+
174
+ ### Symptom → pattern (the decision table)
175
+
176
+ | Observed symptom | Likely pattern | Not this (yet) |
177
+ |---|---|---|
178
+ | Repeated 100ms DB hits on hot read paths | **cache-aside** | CQRS, read replicas |
179
+ | DB write + broker publish as two steps | **outbox (+CDC)** | 2PC, event sourcing |
180
+ | One request makes 5 blocking downstream calls | **async event-driven** for non-critical hops | full EDA rewrite |
181
+ | Reads and writes scale/optimize very differently | **CQRS** on that slice | event sourcing everywhere |
182
+ | Multi-step transaction across services can half-complete | **saga + compensation** | distributed 2PC |
183
+ | Modernizing a legacy system with risk | **strangler-fig** behind a façade | big-bang rewrite |
184
+ | Two teams blocked on one deploy cadence | **database-per-service** split | service-per-noun |
185
+ | Services share tables and deploy together | **fix the distributed monolith** (own schemas first) | more services |
186
+
187
+ **Over-engineering guardrails (flag these as findings too):**
188
+ - CQRS / event sourcing where reads and writes don't actually diverge → remove complexity.
189
+ - Microservices / mesh / cell-based below the size + differential-scaling threshold → stay modular monolith.
190
+ - Wholesale event-driven for simple two-party interactions → a single durable queue (or a sync call) is enough.
191
+ - A split that produces a distributed monolith (shared DB, coupled deploys) → worse than the monolith.
192
+
193
+ ---
194
+
195
+ ## Phase 4 — Prioritized report + decision (read-only) [HIGH freedom]
196
+
197
+ ```markdown
198
+ ## Backend Architecture Audit — [repo] — [date]
199
+ **Topology:** [tier + evidence: N services · broker? · k8s? · transport]
200
+ **Stage on the ladder:** [0–4] · **In scope:** [patterns] · **N/A (out of tier):** [list + why]
201
+
202
+ ### Adopt now (present pain → pattern, with evidence)
203
+ | Pattern | Symptom (file:line) | Payoff | Fix via |
204
+ |---|---|---|---|
205
+ | Cache-aside | product page: 100ms DB read per request, no cache (api/products.ts:40) | ~10ms cached reads, DB load ↓ | backend-patterns |
206
+
207
+ ### Adopt when (named trigger, not yet)
208
+ | Pattern | Trigger to watch for |
209
+ |---|---|
210
+ | Database-per-service | orders + billing need independent deploy cadence / separate teams |
211
+
212
+ ### Defer — would be over-engineering now
213
+ | Pattern | Why premature |
214
+ |---|---|
215
+ | CQRS / event sourcing | reads and writes don't diverge; a repository is simpler |
216
+ | Service mesh / cell-based | single modular deploy; no 10+-service fleet |
217
+
218
+ ### Critical (data loss / cascading outage / silent inconsistency)
219
+ | Gap | Pattern | file:line | Why it bites in prod | Fix via |
220
+ |---|---|---|---|---|
221
+ | Payment writes DB then publishes to Kafka separately | Outbox (#6) | orders/service.ts:88 | Dual-write: crash between = paid order, no fulfillment event | backend-patterns |
222
+ | No breaker/bulkhead around payment provider | #3/#4 | ... | One slow provider exhausts the pool → whole API 503s | audit-resilience/backend-patterns |
223
+
224
+ ### High / Medium (maturity matrix)
225
+ | Pattern | Implemented | Partial | Missing | N/A | Fix via |
226
+ |---|---|---|---|---|---|
227
+ | API gateway | ... | ... | ... | | backend-patterns |
228
+ | BFF / composition | ... | ... | ... | | design-api |
229
+ | Hexagonal | ... | ... | ... | | workflow-refactor |
230
+
231
+ ### Lift-to-production roadmap (ordered)
232
+ 1. Close dual-write with Outbox (+ idempotent consumers) → backend-patterns
233
+ 2. Breaker + bulkhead on every external dependency → audit-resilience → backend-patterns
234
+ 3. Centralize gateway concerns (auth/rate-limit/CORS/logging) → backend-patterns / audit-security
235
+ 4. Distributed tracing + SLOs before scaling → backend-observability
236
+ 5. [T3] Adopt ambient mesh for mTLS/L7 instead of hand-rolled retries → backend-patterns
237
+ ```
238
+
239
+ **Forbidden:** declaring "production-grade" from passing tests alone; flagging T3-only patterns
240
+ (mesh, cell-based, CQRS) against a T1 monolith; re-auditing per-call timeouts/retries that
241
+ `audit-resilience` owns; recommending a saga without compensation logic; recommending CQRS/event
242
+ sourcing where read and write loads don't actually diverge; **recommending any pattern without naming
243
+ its trigger** (fit before presence — a "Missing" with no trigger is over-engineering, not a gap);
244
+ recommending a service split that yields a **distributed monolith** (shared DB + coupled deploys).
245
+
246
+ ---
247
+
248
+ ## Self-critique before reporting [LOW freedom — do not skip]
249
+
250
+ 1. **Evidenced** — `file:line` or "searched, none found", not "they probably need a mesh"
251
+ 2. **Tier respected** — T3-only rows are N/A on T1, with why
252
+ 3. **Trigger named** — every Adopt now / Adopt when / Defer cites a symptom or its absence
253
+ 4. **Right owner** — per-call timeout/retry → `audit-resilience`; mechanical layer rules → `enhance-arch-boundaries`
254
+ 5. **Nothing changed** until approved
255
+
256
+ ## Related
257
+
258
+ - `audit-resilience` — per-call runtime resilience (timeouts, retry+backoff+jitter, idempotency keys, cancellation, PII); this audit defers those to it
259
+ - `backend-patterns` — implement the architecture: gateway, BFF, outbox, saga, bulkhead, hexagonal (see its `references/architecture-patterns.md`)
260
+ - `design-api` — API contract, versioning, error shapes, pagination
261
+ - `audit-security` — auth, CORS, rate-limit-as-abuse-control, mTLS/zero-trust, injection
262
+ - `backend-observability` — tracing, correlation IDs, RED/USE metrics, SLOs, PII redaction
263
+ - `audit-db-schema` — the data-model side of CQRS / event sourcing / outbox tables / db-per-service
264
+ - `backend-db-performance` — cache-aside, query optimization, read replicas for hot paths
265
+ - `workflow-refactor` — hexagonal restructure and strangler-fig migration; modular-monolith boundaries
266
+ - `complete-everything` — close the audited gaps to done with verification
@@ -0,0 +1,386 @@
1
+ # Backend architecture patterns — detection reference
2
+
3
+ Per-pattern detection for `audit-backend-architecture`. For each in-scope pattern (per the Phase 0
4
+ topology tier) mark **Implemented / Partial / Missing / N/A** with `file:line`. Detection commands use
5
+ ripgrep (`rg`); adapt globs to the stack. Cross-skill fix targets are named in backticks (not links).
6
+
7
+ Legend — **Applies:** lowest topology tier where the pattern is in scope (T1 serverless/monolith ·
8
+ T2 containers/few-services · T3 k8s/microservices/event-driven).
9
+
10
+ ---
11
+
12
+ ## 1. API Gateway · Applies: T1+
13
+
14
+ **Purpose.** One edge layer owns cross-cutting concerns for all clients: authentication, rate
15
+ limiting, CORS, request/response transformation, structured logging, monitoring, and caching. The
16
+ failure mode is these being copy-pasted per route/function and drifting.
17
+
18
+ **Detect**
19
+ ```bash
20
+ rg -n "cors\(|Access-Control-Allow" -g '*.{ts,js,py,go}' # CORS: central vs per-handler
21
+ rg -n "verifyJwt|requireAuth|getSession|auth\(\)|withAuth" -g '*.{ts,js}' -c # auth check spread
22
+ rg -n "ratelimit|rateLimit|Ratelimit|throttle" -g '*.{ts,js,py}' -c
23
+ rg -n "kong|apisix|traefik|envoy|nginx|api-?gateway|middleware" -l
24
+ ```
25
+ **Good.** Auth/rate-limit/CORS/logging applied once in shared middleware or a gateway (Kong/APISIX/
26
+ Traefik/Envoy, Next middleware, an edge layer); consistent error shape; cache headers/TTL centralized.
27
+ **Red flags.** `Access-Control-Allow-Origin: *` per handler; auth re-implemented in each route; no
28
+ single place to add a rate limit; logging ad hoc per function.
29
+ **Fix via** `backend-patterns` (middleware/gateway), `audit-security` (authz/CORS correctness).
30
+
31
+ ---
32
+
33
+ ## 2. BFF / API composition / GraphQL federation · Applies: T1+
34
+
35
+ **Purpose.** A client-specific layer shapes payloads per surface (web/mobile/partner) so clients
36
+ don't over/under-fetch. Owned by the client team; sits **behind** the gateway (gateway = policy, BFF =
37
+ shaping). At 5+ domain teams, GraphQL federation replaces N hand-rolled BFFs.
38
+ **Detect**
39
+ ```bash
40
+ fd -H 'bff|for-frontend|edge-api' ; rg -n "aggregat|composition|orchestrat" -g '*.{ts,js}' -l
41
+ rg -n "graphql|apollo|@apollo/gateway|federation|subgraph|trpc" -l
42
+ ```
43
+ **Good.** Distinct shaping for distinct clients OR a single shared API that genuinely serves all
44
+ clients equally; aggregation isolated from domain logic; N+1 handled (batch/DataLoader).
45
+ **Red flags.** Mobile forced to consume a heavy web payload; auth/throttling re-done inside each BFF
46
+ (that's gateway work); a "general-purpose API" bent painfully to every client; distributed joins in
47
+ the client.
48
+ **Fix via** `backend-patterns` (composition), `design-api` (contract/versioning).
49
+
50
+ ---
51
+
52
+ ## 3. Circuit breaker · Applies: T1+ · (defers to `audit-resilience`)
53
+
54
+ **Purpose.** Repeated downstream failure trips a breaker so callers fail fast instead of piling up
55
+ threads waiting on a dead dependency (cascading failure). **This audit only confirms a breaker exists
56
+ architecturally around each external dependency** — per-call tuning belongs to `audit-resilience`.
57
+ **Detect**
58
+ ```bash
59
+ rg -n "circuit.?breaker|CircuitBreaker|opossum|cockatiel|resilience4j|polly|hystrix|gobreaker" -g '*.{ts,js,py,go,java,cs}' -c
60
+ ```
61
+ **Good.** Every synchronous outbound dependency wrapped; breaker has a fallback; half-open recovery.
62
+ **Red flags.** Bare `fetch`/`axios` to a third party with no breaker and no timeout; retries without a
63
+ breaker (retry storm).
64
+ **Fix via** `audit-resilience` (full runtime review) → `backend-patterns`.
65
+
66
+ ---
67
+
68
+ ## 4. Bulkhead · Applies: T2+
69
+
70
+ **Purpose.** Isolate resource pools (threads, connections, concurrency) per dependency so one slow
71
+ service can't exhaust system-wide capacity. The ship's-hull metaphor: one flooded compartment doesn't
72
+ sink the vessel.
73
+ **Detect**
74
+ ```bash
75
+ rg -n "semaphore|bulkhead|maxConcurren|pool.?size|poolSize|Sema(phore)?\(|limit.?concurrency|p-limit" -g '*.{ts,js,py,go,java}' -c
76
+ rg -n "max_connections|connectionLimit|pool" -g '*.{ts,js,py,go,ini,toml,yaml}' -c # DB/HTTP pools
77
+ ```
78
+ **Good.** Separate connection/thread pools or concurrency limits per downstream; a saturated
79
+ dependency degrades only its own calls.
80
+ **Red flags.** One global HTTP client / DB pool shared by fast and slow dependencies; unbounded
81
+ concurrency to any single dependency.
82
+ **Fix via** `backend-patterns`.
83
+
84
+ ---
85
+
86
+ ## 5. Backpressure / load shedding / queue-based load leveling · Applies: T2+
87
+
88
+ **Purpose.** Under overload, absorb bursts through a bounded queue and **shed** excess (429/503 fast)
89
+ instead of accepting unbounded work and collapsing.
90
+ **Detect**
91
+ ```bash
92
+ rg -n "queue|bull|bee-queue|sqs|rabbitmq|kafka|backpressure|highWaterMark|drop|shed|429|Retry-After" -g '*.{ts,js,py,go}' -c
93
+ ```
94
+ **Good.** Bounded queues; producer slows or requests rejected with `Retry-After` when full; async
95
+ load leveling between spiky producers and steady consumers.
96
+ **Red flags.** Unbounded in-memory queues/arrays growing under load; accepting all traffic then OOM;
97
+ no 429 path.
98
+ **Fix via** `backend-patterns`.
99
+
100
+ ---
101
+
102
+ ## 6. Outbox + relay/CDC · Applies: T1+
103
+
104
+ **Purpose.** Solve the **dual-write problem**: writing business state to the DB *and* publishing an
105
+ event to a broker as two separate operations means one can succeed and the other fail. The outbox
106
+ writes the event to an outbox table **in the same transaction** as the state change; a relay
107
+ (polling, or Debezium CDC off the WAL) publishes it afterward.
108
+ **Detect**
109
+ ```bash
110
+ rg -n "outbox|transactional.?outbox|debezium|cdc|wal|logical.?replication" -g '*.{ts,js,py,go,sql}' -l
111
+ # Red-flag heuristic: DB write and broker publish adjacent, not in one txn
112
+ rg -n "publish|producer\.send|sqs.*send|kafka.*produce|emit\(" -g '*.{ts,js,py,go}' -C3
113
+ ```
114
+ **Good.** State + event in one ACID transaction; relay publishes and marks sent; consumers idempotent
115
+ (dedup window 24–72h) for at-least-once delivery.
116
+ **Red flags.** `await db.save(x); await broker.publish(evt)` with no shared transaction; "we'll retry
117
+ the publish" with no durable record; fire-and-forget events after a commit.
118
+ **Fix via** `backend-patterns` (outbox + relay), `audit-db-schema` (outbox table/index).
119
+
120
+ ---
121
+
122
+ ## 7. Saga · Applies: T2+
123
+
124
+ **Purpose.** Multi-service business transactions without 2PC: a sequence of local transactions, each
125
+ triggering the next, with **compensating transactions** to undo prior steps on failure. Choreography
126
+ (events, <5 linear steps) vs orchestration (Temporal/Step Functions/Camel — branching, per-step
127
+ timeout/retry, synchronous result). Respect the **saga pivot**: compensatable steps before the
128
+ irreversible pivot (e.g. payment capture); retriable steps after — once past the pivot, run to
129
+ completion, don't compensate.
130
+ **Detect**
131
+ ```bash
132
+ rg -n "saga|compensat|orchestrat|temporal|stepfunction|state.?machine|workflow" -g '*.{ts,js,py,go,java}' -l
133
+ ```
134
+ **Good.** Each step commits locally + emits; compensation coded as deliberately as the happy path;
135
+ stuck-saga timeout detection; observability (saga age, compensation rate, DLQ).
136
+ **Red flags.** Multi-service writes with no rollback story; assuming distributed atomicity; a "saga"
137
+ with no compensation; compensating an irreversible step.
138
+ **Fix via** `backend-patterns` (+ pair with Outbox #6 so step events actually publish).
139
+
140
+ ---
141
+
142
+ ## 8. CQRS + event sourcing · Applies: T3 (selective)
143
+
144
+ **Purpose.** Separate the write model (commands → events) from read models (materialized views).
145
+ Event sourcing stores state as an immutable event log (replayable, auditable). **Apply only where
146
+ read and write loads genuinely diverge** — it is not a default.
147
+ **Detect**
148
+ ```bash
149
+ rg -n "cqrs|command.?handler|query.?handler|event.?store|eventsourc|projection|materializ|aggregate" -g '*.{ts,js,py,go,java,cs}' -l
150
+ ```
151
+ **Good.** CQRS scoped to high-divergence areas; read models rebuilt from events; clear command/query
152
+ split.
153
+ **Red flags.** CQRS/event-sourcing applied everywhere "because microservices" (accidental
154
+ complexity); projections with no rebuild path; event log mutated in place.
155
+ **Fix via** `backend-patterns`, `audit-db-schema`.
156
+
157
+ ---
158
+
159
+ ## 9. Hexagonal / ports-and-adapters · Applies: T1+
160
+
161
+ **Purpose.** Domain/business logic depends on **ports** (interfaces), never directly on framework, DB,
162
+ or HTTP. Adapters implement ports at the edges. Result: logic is testable without infrastructure and
163
+ the framework/vendor is swappable.
164
+ **Detect**
165
+ ```bash
166
+ rg -n "port|adapter|domain/|application/|infrastructure/|hexagonal|ports.?and.?adapters" -l
167
+ # Leak heuristic: framework/ORM imports inside domain/business layers
168
+ rg -n "import .*(express|next|prisma|supabase|axios|fetch)" -g 'src/{domain,core,application}/**'
169
+ ```
170
+ **Good.** Domain layer imports no framework/IO; repositories/gateways behind interfaces; unit tests
171
+ run with in-memory adapters, no DB.
172
+ **Red flags.** Prisma/Supabase/HTTP clients imported straight into business logic; controllers with
173
+ domain rules inline; can't test a use-case without spinning up the DB.
174
+ **Fix via** `workflow-refactor` (restructure), `backend-patterns`.
175
+
176
+ ---
177
+
178
+ ## 10. Anti-corruption layer (ACL) · Applies: T2+
179
+
180
+ **Purpose.** Translate a third-party or legacy model into your domain's language at the boundary, so
181
+ their schema/quirks don't leak into and corrupt your model (DDD).
182
+ **Detect**
183
+ ```bash
184
+ rg -n "anti.?corruption|acl|translat|mapper|adapter|dto|normaliz" -g '*.{ts,js,py,go}' -l
185
+ ```
186
+ **Good.** External payloads mapped to internal types at one boundary; domain never references vendor
187
+ field names/shapes.
188
+ **Red flags.** Stripe/Salesforce/legacy JSON shapes passed raw through the domain; vendor enums used
189
+ as domain enums.
190
+ **Fix via** `backend-patterns`.
191
+
192
+ ---
193
+
194
+ ## 11. Strangler-fig migration · Applies: any (only if a legacy system is being replaced)
195
+
196
+ **Purpose.** Incrementally replace a legacy system behind a façade/router — route slice by slice to
197
+ the new implementation — instead of a risky big-bang rewrite.
198
+ **Detect**
199
+ ```bash
200
+ rg -n "legacy|strangler|proxy|facade|feature.?flag|routing|v1|v2|deprecat" -g '*.{ts,js,py,go,yaml}' -l
201
+ ```
202
+ **Good.** A façade routes traffic; new/old coexist; slices migrated + verified incrementally;
203
+ decommission plan.
204
+ **Red flags.** A months-long rewrite branch with no incremental cutover; old and new diverging with
205
+ no router.
206
+ **Fix via** `workflow-refactor` (+ `workflow-feature-flag` for gated cutover).
207
+
208
+ ---
209
+
210
+ ## 12. Sidecar / service mesh · Applies: T3
211
+
212
+ **Purpose.** Offload mTLS, retries, timeouts, L7 routing/traffic-splitting, and telemetry to a mesh
213
+ instead of hand-rolling them in every service. Prefer **ambient / sidecarless** (e.g. Istio
214
+ ambient: node-level ztunnel for mTLS + optional per-namespace waypoint proxies for L7) over per-pod
215
+ sidecars for net-new clusters.
216
+ **Detect**
217
+ ```bash
218
+ rg -n "istio|linkerd|consul-connect|envoy|ztunnel|waypoint|sidecar|VirtualService|DestinationRule|PeerAuthentication" -g '*.{yaml,yml}' -l
219
+ ```
220
+ **Good.** mTLS + identity-based authz from the mesh; retries/circuit-breaking/traffic-splitting via
221
+ mesh policy; consistent observability; ambient mode for new clusters.
222
+ **Red flags.** Every service hand-rolling mTLS/retries/telemetry; classic per-pod sidecars adopted
223
+ for a net-new cluster without reason; no service identity.
224
+ **Fix via** `backend-patterns`, `audit-security` (mTLS/zero-trust).
225
+
226
+ ---
227
+
228
+ ## 13. Cell-based architecture · Applies: T3 (scale / residency)
229
+
230
+ **Purpose.** Partition the system into shared-nothing **cells** (own compute + data + config) mapped
231
+ to regions/tenant tiers, so a failure or noisy neighbor is contained to one cell's blast radius.
232
+ Regional/tenant routing directs users to their cell.
233
+ **Detect**
234
+ ```bash
235
+ rg -n "cell|shard|tenant|region|partition|blast.?radius|shuffle.?shard" -g '*.{ts,js,py,go,yaml,tf}' -l
236
+ ```
237
+ **Good.** Cells share nothing at runtime; same artifact deployed to all cells; cell-scoped
238
+ identity/routing; centralized observability with cell labels.
239
+ **Red flags.** One global cluster/DB as a single failure domain at scale; cross-cell runtime coupling;
240
+ no per-cell routing.
241
+ **Fix via** `backend-patterns` (usually an infra/platform initiative — flag, don't force).
242
+
243
+ ---
244
+
245
+ ## 14. Zero-trust / mTLS / service identity · Applies: T2+
246
+
247
+ **Purpose.** No implicit trust inside the network: services authenticate each other (mTLS + workload
248
+ identity), not "it's on the VPC so it's fine".
249
+ **Detect**
250
+ ```bash
251
+ rg -n "mtls|mutual.?tls|spiffe|spire|PeerAuthentication|serviceaccount|workload.?identity|client.?cert" -l
252
+ ```
253
+ **Good.** Service-to-service calls authenticated; secrets scoped per workload; internal endpoints not
254
+ implicitly trusted.
255
+ **Red flags.** Internal APIs with no auth ("private network"); shared god-tokens between services;
256
+ plaintext internal traffic.
257
+ **Fix via** `audit-security` (+ mesh #12 for enforcement).
258
+
259
+ ---
260
+
261
+ ## 15. Distributed tracing + SLOs · Applies: T1+
262
+
263
+ **Purpose.** A request is traceable across hops (OpenTelemetry trace/correlation IDs); RED
264
+ (Rate/Errors/Duration) and USE (Utilization/Saturation/Errors) metrics exist; SLOs and error budgets
265
+ define "healthy".
266
+ **Detect**
267
+ ```bash
268
+ rg -n "opentelemetry|@opentelemetry|otel|traceparent|trace.?id|correlation.?id|x-request-id|span|SLO|error.?budget" -g '*.{ts,js,py,go}' -l
269
+ ```
270
+ **Good.** Trace/correlation ID propagated end-to-end; spans around external calls; dashboards +
271
+ alerts; SLOs defined before scaling.
272
+ **Red flags.** Logs with no correlation ID; can't follow a request across services; alerting on
273
+ symptoms only; no SLO.
274
+ **Fix via** `backend-observability`.
275
+
276
+ ---
277
+
278
+ ## 16. Contract testing · Applies: T2+
279
+
280
+ **Purpose.** Consumer-driven contracts (Pact) or schema contracts (OpenAPI/GraphQL) verify that
281
+ clients↔BFF and service↔service agree, so an upstream change can't silently break a downstream.
282
+ **Detect**
283
+ ```bash
284
+ rg -n "pact|contract.?test|openapi|swagger|schemathesis|dredd|json.?schema|consumer.?driven" -l
285
+ ```
286
+ **Good.** Contracts versioned + verified in CI; provider verification gates deploys; breaking changes
287
+ caught before release.
288
+ **Red flags.** Integration relies on manual testing; "it worked in staging"; no schema/contract
289
+ between producer and consumer.
290
+ **Fix via** `test-unit` (write/verify), `audit-fe-api` (FE↔BE contract drift).
291
+
292
+ ---
293
+
294
+ ## 17. Communication style — sync request/response vs async event-driven · Applies: T1+
295
+
296
+ **Purpose.** Choose the model **per interaction that crosses a boundary**, not for the whole system.
297
+ Sync (REST/gRPC) trades loose coupling for immediate certainty; async (queue/pub-sub) trades certainty
298
+ for decoupling and independent scaling. Mature systems are hybrid: sync at the edge, async for side
299
+ effects, bridged by the outbox (#6).
300
+ **Decide** — signals that point each way:
301
+
302
+ | Signal | Leans |
303
+ |---|---|
304
+ | Caller needs an immediate success/failure answer | **sync** request/response |
305
+ | Strong consistency is a hard business requirement | **sync** |
306
+ | The interaction is a simple, well-known two-party contract; it's a query | **sync** (REST for edge/cacheable, gRPC for internal high-throughput) |
307
+ | Multiple unrelated services must react to the same fact | **async** event-driven (pub/sub) |
308
+ | Producer and consumer scale / fail independently; work is background | **async** (queue for one consumer, event stream for many) |
309
+ | New consumers should be addable without changing the producer | **async** |
310
+
311
+ **Detect**
312
+ ```bash
313
+ rg -n "fetch\(|axios|got\(|httpx|HttpClient|grpc|\.rpc\(" -g '*.{ts,js,py,go}' -c # sync calls
314
+ rg -n "publish|emit\(|producer\.send|queue|kafka|rabbitmq|sqs|sns|nats|pubsub|EventBridge" -c # async
315
+ # Anti-pattern heuristic: many blocking downstream calls inside one handler
316
+ rg -n "await .*(fetch|axios|rpc|client\.)" -g '*.{ts,js}' -C1
317
+ ```
318
+ **Good.** Each cross-boundary call matches the interaction; a durable queue/DLQ for async; sync calls
319
+ have timeouts + a breaker (see `audit-resilience`).
320
+ **Red flags.** One request making 5+ blocking downstream calls (should be async/parallel); wholesale
321
+ EDA for a simple two-party call (needless complexity); async with no dead-letter queue (silent loss);
322
+ "everything sync" (cascading failure) or "everything async" (eventual consistency + debugging pain
323
+ everywhere).
324
+ **Fix via** `backend-patterns` (see references/architecture-patterns.md → sync-vs-async).
325
+
326
+ ---
327
+
328
+ ## 18. Cache-aside (lazy loading) · Applies: T1+
329
+
330
+ **Purpose.** For hot, read-heavy, tolerably-stale data (product details, user profile, config), check
331
+ the cache first; on a miss, read the DB and populate the cache. Turns ~100ms DB reads into ~10ms cache
332
+ reads and sheds DB load. The correctness lives in **invalidation**, not the read.
333
+ **Detect**
334
+ ```bash
335
+ rg -n "redis|memcached|upstash|unstable_cache|revalidate|cache\.(get|set)|lru|node-cache" -g '*.{ts,js,py,go}' -l
336
+ # Red-flag heuristic: hot read straight to the DB with no cache
337
+ rg -n "findUnique|findFirst|SELECT .* WHERE id" -g '*.{ts,js,py,sql}' -C2
338
+ ```
339
+ **Good.** Read-through on hot paths with an explicit TTL; a clear invalidation path on write
340
+ (delete/update the key, or tag-based revalidate); protection against stampede/thundering-herd on
341
+ popular keys (single-flight / jittered TTL).
342
+ **Red flags.** Every read hitting the DB on a hot path; caches with no TTL and no invalidation (stale
343
+ forever); caching user-specific/private data under a shared key; cache write *before* the DB commit.
344
+ **Fix via** `backend-patterns`, `backend-db-performance`.
345
+
346
+ ---
347
+
348
+ ## 19. Database-per-service / data ownership · Applies: T2+ (owned schemas already matter at T1)
349
+
350
+ **Purpose.** Each service (or, in a modular monolith, each module) **owns its data**; others reach it
351
+ only through its API/events, never by reading its tables. This is what makes independent deployment
352
+ and scaling real. At T1 the same discipline applies logically (separate schemas / clear ownership)
353
+ even on one physical database.
354
+ **Detect**
355
+ ```bash
356
+ rg -n "JOIN .*\." -g '*.{sql,ts,js,py}' -l # cross-domain joins (ownership leak?)
357
+ rg -n "schema|search_path|DATABASE_URL|datasource" -g '*.{ts,js,py,prisma,toml,env}' -l
358
+ ```
359
+ **Good.** One writer per table/aggregate; cross-service data via API/events (or an outbox); modular
360
+ monolith with separated schemas and interface-only access between modules.
361
+ **Red flags — the distributed monolith:** multiple services reading/writing the same tables; services
362
+ that *must* deploy together; shared ORM models across service boundaries. This is **worse** than a
363
+ monolith — the distributed tax with none of the independence. Fix ownership *before* splitting further.
364
+ **Fix via** `backend-patterns`, `audit-db-schema`.
365
+
366
+ ---
367
+
368
+ ## Decision framework — fit before presence (used in Phase 3)
369
+
370
+ A pattern is only "Missing" (actionable) when the codebase shows the **trigger** that justifies its
371
+ cost. Otherwise adopting it is over-engineering — flag *that* instead.
372
+
373
+ **Maturity ladder** (climb a rung only when its trigger fires):
374
+
375
+ | Stage | Default shape | Trigger to add the next patterns |
376
+ |---|---|---|
377
+ | 0 | Modular monolith, owned schemas, sync + timeouts | *(correct default for >90% of systems)* |
378
+ | 1 | + cache-aside, + outbox | hot read paths hit the DB repeatedly; an event must not be lost on crash |
379
+ | 2 | + async event-driven side effects, + BFF, + CQRS (one slice) | a request fans out to many blocking calls; reads & writes scale/optimize differently |
380
+ | 3 | + database-per-service, + saga, + backpressure | a module needs independent deploy/scale; a workflow spans services and can half-complete |
381
+ | 4 | + service mesh (ambient), + cell-based, + orchestration | 10+ services, ~50+ engineers, blast-radius / data-residency needs |
382
+
383
+ **Anti-over-engineering (each is a finding):** CQRS/event-sourcing without read/write divergence;
384
+ microservices/mesh/cell-based below the size + differential-scaling threshold; wholesale EDA for
385
+ two-party interactions; any split that yields a distributed monolith. When in doubt, **stay on the
386
+ lower rung** — reversible, cheaper, and almost always sufficient.