@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,154 @@
1
+ ---
2
+ name: enhance-arch-boundaries
3
+ description: >
4
+ Enforce architecture boundaries in CI with dependency-cruiser or
5
+ eslint-boundaries: layer direction, feature isolation, forbidden imports.
6
+ Use when "enforce module boundaries" or "stop spaghetti imports". Advice
7
+ only → audit-backend-architecture.
8
+ license: MIT
9
+ effort: high
10
+ ---
11
+
12
+ # enhance-arch-boundaries — Architecture as a fitness function
13
+
14
+ **Degree of freedom: MIXED.** Recovering the model
15
+ `[HIGH freedom]`; do-not-invent, shrink-only baseline, and deliberate-violation
16
+ probes `[LOW freedom — run exactly]`.
17
+
18
+ Codify the repo's intended structure as rules that block merge. **Import
19
+ spaghetti is how agents degrade architecture: each import looks locally
20
+ reasonable, no single diff is wrong, and after forty sessions the
21
+ layering is gone.** A rule in AGENTS.md is advisory. A dependency-cruiser
22
+ rule in the aggregator gate is physics.
23
+
24
+ ## This skill vs neighbors
25
+
26
+ | Skill | Owns |
27
+ |---|---|
28
+ | **enhance-arch-boundaries** (this) | Mechanical boundary rules + shrink-only baseline |
29
+ | `audit-backend-architecture` | Advises which pattern to adopt — does not enforce |
30
+ | `housekeep-gates` | Wires this check into the aggregator |
31
+ | `docs-adr` | Records *why* the model was chosen |
32
+ | `enhance-agent-guardrails` | Broader guard install; this owns the import graph |
33
+
34
+ ## How to reason
35
+
36
+ 1. **Observe** — folder layout, existing conventions, any architecture audit
37
+ 2. **Interpret** — what layering does the repo already mean to have?
38
+ 3. **Classify** — recoverable model / no intended structure (stop) / inventing (forbidden)
39
+ 4. **Severity** — client → server-only / service-role is the worst edge
40
+
41
+ ## Worked example
42
+
43
+ > **Observe:** `app/dashboard/page.tsx` imports `@/lib/supabase/admin`
44
+ > (service-role). No boundary rule.
45
+ > **Interpret:** the intended split exists in folder names but is not physics.
46
+ > **Classify:** forbidden edge — client → server-only.
47
+ > **Fix:** dependency-cruiser / eslint-boundaries rule; grandfather other
48
+ > violations into a shrink-only baseline; probe a new forbidden import fails CI.
49
+
50
+ ---
51
+
52
+ ## Phase 0 — Recover the intended architecture (do not invent one) [LOW freedom — stop if none]
53
+
54
+ The rules must encode the architecture the repo *means* to have.
55
+
56
+ - Read folder structure and existing conventions (`features/*`, `app/`,
57
+ `lib/`, `server/`, `components/`, monorepo packages).
58
+ - Read `audit-backend-architecture` output if it exists — that is the
59
+ drift to stop.
60
+ - Confirm with the user in one pass: layers and allowed direction (e.g.
61
+ `ui → application → domain → infrastructure`, never reverse), feature
62
+ units that must stay isolated, special zones (server-only, secrets,
63
+ generated).
64
+
65
+ State the model in ten lines before writing any rule. If the repo
66
+ genuinely has no intended structure, **stop and say so** — enforcing a
67
+ structure nobody chose creates fights, not quality. Propose a minimal
68
+ layering first.
69
+
70
+ ---
71
+
72
+ ## Phase 1 — Install the rule set [HIGH freedom; mapped to the confirmed model]
73
+
74
+ Tool by stack: **dependency-cruiser** (framework-agnostic JS/TS),
75
+ **eslint-plugin-boundaries** (when living inside ESLint is preferable),
76
+ Nx module-boundary tags, import-linter (Python).
77
+
78
+ Core rules, each mapped to the confirmed model:
79
+
80
+ - **Layer direction** — lower layers cannot import upward; skipping
81
+ layers flagged where the model says so.
82
+ - **Feature isolation** — features import each other only via a public
83
+ surface (`features/x/index.ts`), never deep paths. Shared code goes
84
+ through `shared/`, not sideways.
85
+ - **No circular dependencies** — anywhere. Cycles are where "change one
86
+ thing" stops being possible.
87
+ - **Forbidden edges** — client importing server-only / service-role
88
+ modules (cross-ref `plan-rls-audit` / `plan-secrets-audit`), UI
89
+ importing the DB layer directly, production importing test utilities,
90
+ anything importing generated internals.
91
+ - **No orphans** — modules nothing reaches (feeds `workflow-housekeep`).
92
+ - **Dependency hygiene** — no `devDependencies` from shipped code;
93
+ deprecated internals marked un-importable so migration ratchets.
94
+
95
+ ---
96
+
97
+ ## Phase 2 — Grandfather, then ratchet [LOW freedom — shrink-only baseline]
98
+
99
+ Do not weaken the rules to fit existing violations, and do not block the
100
+ repo on fixing them all.
101
+
102
+ - Capture existing violations into the tool's **known-violations
103
+ baseline** so CI is green today.
104
+ - The baseline is a **shrink-only ratchet**: new violations fail;
105
+ existing ones are tracked debt; the baseline file can only get smaller
106
+ without review — same reset policy as `housekeep-gates`.
107
+ - File the grandfathered list as a burndown, worst edges first (cycles
108
+ and client→server-secrets before cosmetic layer skips).
109
+
110
+ ---
111
+
112
+ ## Phase 3 — Wire and make agent-legible [HIGH freedom]
113
+
114
+ - Add the check to CI wired into the aggregator gate (`housekeep-gates`)
115
+ and mirror it in local hooks (same command, two callers).
116
+ - Generate the dependency **graph visualization** into docs; regenerate
117
+ it on the scheduled run so it cannot go stale.
118
+ - Write the ten-line model + "how to fix a boundary violation" into
119
+ agent rules *referencing the mechanical check* — the rule text
120
+ explains, the gate enforces.
121
+ - Record the architecture decision as an ADR (`docs-adr`) so a future
122
+ session knows the layering was chosen, by whom, and why the rejected
123
+ alternative lost.
124
+
125
+ ---
126
+
127
+ ## Definition of Done
128
+
129
+ - [ ] Intended model recovered from the repo + confirmed with the user (or the no-structure finding raised)
130
+ - [ ] Rules installed: layer direction, feature isolation via public surfaces, no cycles, forbidden edges (incl. server-only → client), no orphans, dep hygiene
131
+ - [ ] Existing violations grandfathered into a shrink-only baseline; burndown filed worst-first
132
+ - [ ] Check in the aggregator gate + local hooks with one shared command
133
+ - [ ] Graph visualization generated into docs with a regeneration schedule
134
+ - [ ] Agent rules updated to state the model and point at the gate; decision recorded via `docs-adr`
135
+ - [ ] Deliberate-violation probe: a test import that breaks each rule class fails CI
136
+
137
+ ## Self-critique before claiming done [LOW freedom — do not skip]
138
+
139
+ 1. **Model confirmed** — or you stopped; you did not invent a layering
140
+ 2. **Baseline shrink-only** — new violations fail; no silent growth
141
+ 3. **Probe per rule class** — a test import failed CI
142
+ 4. **Right owner** — pattern advice → `audit-backend-architecture`; why → `docs-adr`
143
+ 5. **Aggregator wired** — `housekeep-gates`
144
+
145
+ ## Output format
146
+
147
+ 1. **Architecture model** — ten-line statement of layers, directions, features, special zones
148
+ 2. **Rule set** — rule | what it forbids | why (mapped to the model)
149
+ 3. **Grandfathered baseline** — count by rule | worst-first burndown
150
+ 4. **Wiring** — gate job, hook parity, graph location, agent-rule text added
151
+ 5. **Probe evidence** — violation per rule class | CI result
152
+
153
+ Applied directly (enhance-family). Pause for approval only on the model
154
+ confirmation and before committing the baseline.
@@ -0,0 +1,463 @@
1
+ ---
2
+ name: enhance-capacitor-ui
3
+ description: >
4
+ Separate desktop and mobile UI in hybrid apps shipped as PWA + iOS + Android
5
+ (Capacitor, Tauri, Expo Web, Ionic, RN-Web). Use when a UI sweep "improved
6
+ one surface and broke the other": desktop polished but mobile cramped, or
7
+ the reverse.
8
+ license: MIT
9
+ paths:
10
+ - "**/ios/**"
11
+ - "**/android/**"
12
+ - "**/app.json"
13
+ - "**/app.config.*"
14
+ - "**/capacitor.config.*"
15
+ - "**/*.gradle"
16
+ - "**/Podfile"
17
+ ---
18
+
19
+ > Surface router: `/uiux`. You are here: `enhance-capacitor-ui`. Native iOS/Android (SwiftUI / Compose, no web layer) is out of scope — use Apple HIG / Material directly.
20
+
21
+ # Enhance Web ↔ Mobile UI
22
+
23
+ **Degree of freedom: MIXED.** Axis/tier judgment `[HIGH freedom]`; probes, SSR first-paint, and six-cell verify `[LOW freedom — run exactly]`.
24
+
25
+ Separate the mobile and desktop design contracts of a hybrid app so that a
26
+ UIUX sweep on one surface cannot silently degrade the other. This is not a
27
+ "add a `useIsMobile` hook" skill. It establishes three orthogonal axes,
28
+ one source of truth, mode tokens, container-query primitives, and a
29
+ chrome allow-list — so per-form-factor / per-platform polish is a
30
+ predictable, reviewable change instead of a regression.
31
+
32
+ > **Vague-but-visceral cross-surface feedback ("looks great on web,
33
+ > atrocious on iPhone", "the iPad version is just a stretched phone",
34
+ > "Android dock feels wrong", "everything wraps on tablet") almost always
35
+ > points to **axis conflation** — one boolean (`isMobile`) is being asked
36
+ > to answer three different questions. Start at the architecture, not at
37
+ > the broken page.**
38
+
39
+ > If browser/native automation is used, first follow the
40
+ > `protocol-browser-anti-stall` skill when present.
41
+
42
+ ## How to reason
43
+
44
+ 1. **Inventory** — which surfaces ship; how the code answers "is mobile?"
45
+ 2. **Separate** — form factor vs platform vs pointer (never one boolean)
46
+ 3. **Allow-list** — viewport queries only in chrome; containers elsewhere
47
+ 4. **Verify** — six-cell matrix + SSR first-paint + live `data-*` on `<html>`
48
+
49
+ ## Worked example
50
+
51
+ > **Inventory:** Capacitor PWA + iOS + Android; 18 `useIsMobile` sites; cards use `lg:grid-cols-2`.
52
+ > **Separate:** sheet vs popover is compact OR coarse pointer, not `viewport < 768`.
53
+ > **Allow-list:** `app-shell` / docks keep `md:`; Card becomes `@container` + `@4xl:`.
54
+ > **Verify:** card in a 320px side panel on a 1920 monitor stays compact; no FOUC of both navs.
55
+
56
+ ## Self-critique before reporting
57
+
58
+ - **Three axes** — no leftover `useIsMobile` answering platform or hover
59
+ - **SSR** — chrome visibility is CSS-gated; no JS-only first paint
60
+ - **Six cells** — compact/medium/expanded × web/iOS/Android viewed
61
+ - **Right owner** — one-surface polish → `enhance-web-ui`; native SwiftUI/Compose is out of scope
62
+
63
+ ---
64
+
65
+ ## Rules
66
+
67
+ > **Three orthogonal axes — never conflate them.**
68
+ > 1. **Form factor** (compact / medium / expanded) = how much screen space
69
+ > do I have? — drives layout density, chrome strategy, navigation
70
+ > pattern (bottom dock vs side rail vs persistent sidebar).
71
+ > 2. **Platform** (web / ios / android) = which OS visual language am I
72
+ > inside? — drives motion curves, tap-highlight, overlay radii,
73
+ > safe-area math, haptic affordances.
74
+ > 3. **Pointer capability** (fine / coarse, hover / no-hover) = can the
75
+ > user hover and click precisely? — drives hover-reveal affordances,
76
+ > drag-handle sizes, hit-target floors.
77
+ > A single `useIsMobile` boolean answering all three is the root cause
78
+ > of most cross-surface regressions. Encode the three axes separately.
79
+
80
+ > **One source of truth.** Detect the three axes once, in a single
81
+ > `useViewportContext()` (or equivalent) hook, and write them to
82
+ > `<html data-form-factor data-platform data-can-hover>` so CSS, server
83
+ > components, and SSR-rendered HTML all read the same answer. Banning
84
+ > ad-hoc `useMatchMedia` / `pathname.startsWith("/desktop")` /
85
+ > `Capacitor.isNativePlatform()` branches scattered across components.
86
+
87
+ > **Token modes, not per-component conditionals.** Platform differences
88
+ > that are *visual* (overlay radius, press-scale, tap-highlight color)
89
+ > live in `:root[data-platform="ios"]` blocks as CSS variable overrides,
90
+ > not in `if (platform === "ios")` JSX branches. Components consume the
91
+ > token; the platform layer paints it. (Ionic Modes, Konsta UI pattern.)
92
+
93
+ > **Page chrome = viewport queries; component micro-layout = container
94
+ > queries.** App-level chrome (bottom dock vs side rail vs sidebar)
95
+ > reacts to the *viewport* — only the app shell knows the global form
96
+ > factor. Cards, tiles, grids, hero blocks inside the content column
97
+ > react to their *container* — they may be in the main column, a side
98
+ > panel, a split-pane, a modal. Use `md:` / `lg:` only in the chrome
99
+ > allow-list (typically: app-shell, bottom-nav, side-nav, side-rail).
100
+ > Use `@md:` / `@lg:` (container queries) everywhere else. Tailwind 4
101
+ > ships container queries built-in; Tailwind 3 needs the plugin.
102
+
103
+ > **Per-form-factor squint test.** "Looks good at 1440" is one cell of
104
+ > a six-cell grid (3 form factors × 3 platforms minimum, plus pointer
105
+ > on/off). Before declaring an enhancement done, view it at compact
106
+ > (≤640px), medium (768–1023px), and expanded (≥1024px), on web + iOS
107
+ > WebView + Android WebView (or the closest available native shell).
108
+ > Any cell that looks "templated" or "broken" was not actually
109
+ > enhanced — it was avoided.
110
+
111
+ > **Tier across surfaces, not across the app.** A learning / consumer
112
+ > / lifestyle app should be **tier-A vibrant** on the *compact* form
113
+ > factor (color carries gamification meaning — Duolingo) and may
114
+ > legitimately become **tier-C calm** on the *expanded* form factor
115
+ > (more chrome, more data density, less novelty). The mistake is
116
+ > applying one saturation tier across all surfaces. Pick a tier per
117
+ > form factor; document it. (See `enhance-web-ui` § Domain Colour
118
+ > Tier.)
119
+
120
+ > **Never ship mock, dead, or rogue platform branches.** Platform-mode
121
+ > tokens must be wired to the *real* `Capacitor.getPlatform()` result
122
+ > (or your stack's equivalent). Don't fork visual logic on a static
123
+ > `process.env.MODE === "ios"` literal — the same bundle ships to all
124
+ > three surfaces and the platform is only known at runtime.
125
+
126
+ > **Guardrail the chrome allow-list.** Once `md:` / `lg:` are restricted
127
+ > to the chrome allow-list, an ESLint `no-restricted-syntax` rule + a
128
+ > Cursor / AGENTS rule (`responsive-design-axes.mdc`) keeps them there.
129
+ > A future enhancer (human or AI) will reach for `lg:grid-cols-2` in a
130
+ > primitive within a week unless the rule warns them.
131
+
132
+ > **Patch the axis primitive, not the consumer.** Same rule as
133
+ > `enhance-web-ui` *Primitive-First Patch Rule*, scoped to axes: if
134
+ > twelve cards each carry their own `lg:flex-row` branch, the bug is
135
+ > that the card primitive isn't a `@container`. Patch the primitive
136
+ > once, delete the twelve consumer branches.
137
+
138
+ ---
139
+
140
+ ## Workflow Checklist
141
+
142
+ Copy and track:
143
+
144
+ ```
145
+ WEB↔MOBILE SEPARATION /<repo or surface>
146
+ - [ ] 0. SURFACE INVENTORY: shipping targets (PWA / iOS / Android / Mac
147
+ Catalyst / Tauri), Capacitor or shell version, breakpoint system,
148
+ Tailwind 3 vs 4 (container queries built-in?)
149
+ - [ ] 1. AXES AUDIT: how does the codebase currently answer "is mobile?",
150
+ "is iOS?", "can hover?" — count the call sites, list the helpers
151
+ - [ ] 2. CHROME vs CONTENT MAP: which files own page-level chrome (allow
152
+ `md:`/`lg:`), which files are content/primitives (must use `@md:`)
153
+ - [ ] 3. PROBE: grep bare `md:`/`lg:` outside the allow-list, count
154
+ `useIsMobile` / `isNative` / `pathname.startsWith` branches,
155
+ inspect SSR first-paint at /compact and /expanded
156
+ - [ ] 4. GAP MAP: current state vs three-layer architecture (context →
157
+ tokens → primitives) — what's missing, what's duplicated
158
+ - [ ] 5. PLAN: six-step rollout (context hook → mode tokens → form-factor
159
+ gates → container-query primitives → heuristic guide → guardrail)
160
+ - [ ] 6. IMPLEMENT: smallest diff per step; SSR-safe defaults at every
161
+ boundary
162
+ - [ ] 7. VERIFY: six-cell matrix (3 form factors × 3 platforms), plus
163
+ SSR/first-paint check, plus reduced-motion, plus dark/light if
164
+ supported
165
+ - [ ] 8. WRITE-UP: surface → before pain → axis violated → primitive →
166
+ after behaviour
167
+ ```
168
+
169
+ ---
170
+
171
+ ## Step 0 — Surface Inventory [HIGH freedom]
172
+
173
+ Before any change, write down what the app actually ships to. This prevents
174
+ designing for surfaces that don't exist (and forgetting ones that do).
175
+
176
+ | Surface | Detection | Notes |
177
+ |---------|-----------|-------|
178
+ | PWA / browser | default | Includes desktop browser AND iOS/Android Safari/Chrome |
179
+ | iOS native (WebView) | `Capacitor.getPlatform() === "ios"` | Capacitor / Ionic shells |
180
+ | Android native (WebView) | `Capacitor.getPlatform() === "android"` | Capacitor / Ionic shells |
181
+ | Mac Catalyst | iPad-class iOS surface running on macOS | Form factor matters more than platform |
182
+ | iPad / large iOS | iOS + ≥768px | Often misses iPad-specific layout if you only test iPhone |
183
+ | Foldable / split-screen | window resize event mid-session | Form factor changes at runtime, must subscribe |
184
+
185
+ Extract from the project:
186
+
187
+ - `package.json` → Capacitor / Tauri / Ionic / Expo / RN-Web version.
188
+ - `capacitor.config.*` → `webDir`, deployment targets, custom URL scheme.
189
+ - `tailwind.config.*` or `globals.css` `@theme` → existing breakpoints,
190
+ whether container queries are configured.
191
+ - Any `useIsMobile` / `useBreakpoint` / `usePlatform` hook → catalogue.
192
+
193
+ ---
194
+
195
+ ## Step 1 — Axes Audit (find the conflation) [HIGH freedom]
196
+
197
+ Run these probes; expect to find 5–30 hits per probe in any non-trivial
198
+ hybrid app. Each hit is a candidate for axis-separation.
199
+
200
+ ```bash
201
+ # How does the codebase currently answer "is mobile?" — count the call sites
202
+ rg -n 'useIsMobile|isMobile|isDesktop|breakpoint\.lg|matchMedia.*768|window\.innerWidth' \
203
+ --glob '!**/node_modules/**' --glob '!**/dist/**' | wc -l
204
+
205
+ # How does it answer "is iOS?"
206
+ rg -n 'Capacitor\.getPlatform|isNativePlatform|navigator\.platform|isIOS|isAndroid' \
207
+ --glob '!**/node_modules/**'
208
+
209
+ # How does it answer "can the user hover?"
210
+ rg -n 'matchMedia.*hover|useCanHover|"hover:|@media \(hover' \
211
+ --glob '!**/node_modules/**'
212
+
213
+ # Bare viewport prefixes outside the chrome allow-list (proxy for
214
+ # axis-conflation in primitives)
215
+ rg -n '\b(md|lg|xl|2xl):' \
216
+ --glob 'design-system/**' \
217
+ --glob 'components/**/!(@(app-shell|bottom-nav|side-nav|side-rail))*' \
218
+ | wc -l
219
+ ```
220
+
221
+ Build the conflation table:
222
+
223
+ | Hit (file:line) | Question being asked | Axis it should map to | Current proxy | Fix shape |
224
+ |-----------------|----------------------|-----------------------|---------------|-----------|
225
+ | `Card.tsx:42` `lg:flex-row` | "is the card slot wide?" | container size | viewport `lg:` | `@md:flex-row` after Card becomes `@container` |
226
+ | `Toast.tsx:18` `useIsMobile()` | "should I show a sheet or a side toast?" | form factor | viewport `md:` | `data-form-factor="compact"` token + Tailwind `ff-compact:` variant |
227
+ | `Button.tsx:30` `if (Capacitor.getPlatform() === "ios")` rounded-2xl | "what's the OS visual language?" | platform | runtime branch | `--btn-radius` token under `:root[data-platform="ios"]` |
228
+ | `IconBtn.tsx:15` `hover:bg-muted` | "show hover paint" | pointer capability | bare `hover:` | `can-hover:hover:bg-muted` (axis-aware variant) |
229
+
230
+ If the table has > 10 rows, the project needs the full architecture; if
231
+ < 5, you may be able to land just steps 1–3 (context hook + mode tokens +
232
+ gate the chrome).
233
+
234
+ ---
235
+
236
+ ## Step 2 — Chrome vs Content Map (the allow-list) [HIGH freedom]
237
+
238
+ The single most important architectural decision in this skill: **which
239
+ files are allowed to read the viewport, and which must read their
240
+ container.** Write the list down before touching anything.
241
+
242
+ Default allow-list (files that may use bare `md:` / `lg:` / `xl:`):
243
+
244
+ ```
245
+ components/app-shell.tsx # the only file that knows global form factor
246
+ components/bottom-nav.tsx # mobile dock; `md:hidden` is correct here
247
+ components/side-rail.tsx # tablet rail; `hidden md:flex` is correct
248
+ components/desktop-side-nav.tsx # desktop sidebar; `hidden lg:flex`
249
+ app/layout.tsx # SSR root, sets data-form-factor first-paint fallback
250
+ ```
251
+
252
+ Default content list (files that must use `@md:` / `@lg:` container
253
+ queries OR axis-token variants):
254
+
255
+ ```
256
+ design-system/primitives/** # Card, Button, Input, OptionCard, etc.
257
+ features/**/components/** # feature-level UI
258
+ app/**/page.tsx # route content (page chrome lives in layout)
259
+ ```
260
+
261
+ Any time someone adds a 5th file to the chrome allow-list, that's a code
262
+ review smell: usually it should have been a content file with a
263
+ container query, not a chrome file with a viewport query.
264
+
265
+ ---
266
+
267
+ ## Step 3 — Probe live (SSR first-paint + runtime axes) [LOW freedom — run exactly]
268
+
269
+ ### 3a. SSR / hydration first-paint check
270
+
271
+ Hybrid web apps render twice: first on the server (no `window`, no
272
+ `Capacitor.getPlatform()`), then on the client. If the form factor /
273
+ platform decision is made in *render*, you ship a flash of wrong
274
+ chrome on every navigation.
275
+
276
+ | Probe | Where to look | Failure shape |
277
+ |-------|---------------|---------------|
278
+ | First-paint at /compact | View page source (Next.js `?_rsc` or curl) | If both `<BottomNav>` AND `<DesktopSideNav>` render, then JS hides one — you have FOUC |
279
+ | First-paint at /expanded | Same | If neither renders, then JS reveals one — you have a 200ms gap of no nav |
280
+ | Capacitor first-paint | iOS/Android WebView devtools | If `data-platform=""` for the first 50ms, your platform-specific tokens haven't applied yet |
281
+
282
+ Fix shape: render *both* chrome variants on the server (dual-mount), gate
283
+ visibility purely with CSS via a viewport `@media` query. The CSS query
284
+ runs synchronously at first paint, no JS needed. The form-factor `data-`
285
+ attribute is then written by JS *after* hydration, used only for axis-
286
+ specific tweaks not chrome visibility.
287
+
288
+ ### 3b. Runtime axes probe (in the browser console, in each shell)
289
+
290
+ ```js
291
+ // Generic, framework-free; works in DevTools console / playwright-cli / native WebView
292
+ const html = document.documentElement;
293
+ console.table({
294
+ formFactor: html.dataset.formFactor || '(not set)',
295
+ platform: html.dataset.platform || '(not set)',
296
+ canHover: html.dataset.canHover || '(not set)',
297
+ viewport: `${innerWidth}x${innerHeight}`,
298
+ ua: navigator.userAgent.slice(0, 80),
299
+ });
300
+ // Then resize the window and re-run — does formFactor flip live?
301
+ // On iOS Safari: rotate device — does formFactor flip?
302
+ // On Capacitor iOS: send to background and resume — does any value get stale?
303
+ ```
304
+
305
+ Any `(not set)` cell at first paint is a bug — your context hook is
306
+ running too late.
307
+
308
+ ### 3c. Container-query gate
309
+
310
+ For any primitive you are about to convert from `lg:` to `@lg:`, measure
311
+ the rendered widths *before* the change and *after*. If the change is
312
+ correct, the primitive should:
313
+
314
+ - Render the wider layout when its parent slot is wide (container > N px).
315
+ - Render the narrower layout when its parent slot is narrow.
316
+ - Be **independent** of the global viewport — drop it inside a 320 px
317
+ side panel on a 1920 px monitor and it should look like the compact
318
+ variant.
319
+
320
+ ```js
321
+ // In the browser console / Playwright evaluate
322
+ const cards = [...document.querySelectorAll('[data-card]')];
323
+ console.table(cards.map(c => ({
324
+ rect: Math.round(c.getBoundingClientRect().width),
325
+ layout: getComputedStyle(c).gridTemplateColumns || getComputedStyle(c).flexDirection,
326
+ })));
327
+ // Expect: layout flips at the container threshold, not the viewport
328
+ ```
329
+
330
+ ---
331
+
332
+ ## Hidden Failure Modes (the cross-surface ones)
333
+
334
+ Parallel to `enhance-web-ui` H1–H16 but specific to multi-surface
335
+ contracts. Each entry has a **detection probe** and a **fix shape**.
336
+ Generic across stacks.
337
+
338
+ ### M1. Axis conflation in a single boolean
339
+
340
+ **Symptom:** "Mobile sheet renders on iPad landscape", "desktop side
341
+ panel renders on touch laptop", "iOS-style overlay shows on Android".
342
+
343
+ **Detection:** `rg -n 'useIsMobile|isMobile' --type ts | wc -l` returns
344
+ > 5. Read each call site and ask: "is this asking about screen size,
345
+ about platform, about pointer capability, or about the *combination*?"
346
+
347
+ **Fix shape:** Replace the single boolean with three answers from
348
+ `useViewportContext()` (or equivalent). Update each call site
349
+ explicitly:
350
+
351
+ ```ts
352
+ // before
353
+ if (isMobile) return <Sheet>{children}</Sheet>;
354
+ return <Popover>{children}</Popover>;
355
+
356
+ // after — three axes addressed independently
357
+ const { formFactor, canHover } = useViewportContext();
358
+ if (formFactor === "compact") return <Sheet>{children}</Sheet>;
359
+ if (!canHover) return <Sheet>{children}</Sheet>;
360
+ return <Popover>{children}</Popover>;
361
+ ```
362
+
363
+ Most "mobile" branches are actually "compact form factor OR coarse
364
+ pointer", which is *not* the same as `viewport < 768`.
365
+
366
+ ### M2. Tier-A heuristics applied to expanded form factor (or vice versa)
367
+
368
+ **Symptom:** "Phone looks like a B2B dashboard", "desktop looks like a
369
+ toy". Result of running a single UIUX sweep that picked one saturation
370
+ tier and applied it across all form factors.
371
+
372
+ **Detection:** Take the desktop screenshot, take the phone screenshot,
373
+ side by side. If both surfaces use the same `/8` background tint and
374
+ the same primary CTA chrome, you've ignored form factor. Tier-A on
375
+ phone (`/15–/25` tints, solid CTAs, semantic hue per category) and
376
+ tier-C on desktop (`/6–/12` tints, one accent, achromatic chrome) is
377
+ *correct* for a learning / consumer / lifestyle app — not a bug.
378
+
379
+ **Fix shape:** Document the per-form-factor tier in your `HEURISTICS.md`.
380
+ Pick the tier per `data-form-factor` selector at the token layer:
381
+
382
+ ```css
383
+ :root[data-form-factor="compact"] {
384
+ --surface-tier-mix: 0.20; /* tier-A vibrant */
385
+ --cta-bg: var(--color-cta); /* solid */
386
+ }
387
+ :root[data-form-factor="expanded"] {
388
+ --surface-tier-mix: 0.08; /* tier-C restrained */
389
+ --cta-bg: transparent; /* outline */
390
+ --cta-border: var(--color-cta);
391
+ }
392
+ ```
393
+
394
+ Then primitives consume `--surface-tier-mix` and `--cta-bg` once;
395
+ the form factor decides which tier paints.
396
+
397
+ ### M3. No `data-platform` on `<html>` (token forks living in components)
398
+
399
+ **Symptom:** Buttons forked per platform inside JSX
400
+ (`if (platform === "ios") rounded-2xl else rounded-md`). Five
401
+ components do this; the sixth forgets and the bug ships to one shell.
402
+
403
+ **Detection:** `rg -n 'getPlatform\(\)|isNativePlatform' --type tsx`
404
+ returns > 3 hits in component code (not in the context hook itself).
405
+
406
+ **Fix shape:** Detect platform once, write `<html data-platform>`,
407
+ declare per-platform token overrides in CSS:
408
+
409
+ ```css
410
+ :root[data-platform="ios"] {
411
+ --radius-overlay: 1.25rem;
412
+ --press-scale: 0.96;
413
+ --tap-highlight: transparent;
414
+ -webkit-tap-highlight-color: transparent;
415
+ }
416
+ :root[data-platform="android"] {
417
+ --radius-overlay: 1.75rem; /* M3 corner-extra-large */
418
+ --press-scale: 1; /* Android uses ripple, not scale */
419
+ --tap-highlight: rgba(0, 0, 0, 0.08);
420
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
421
+ }
422
+ ```
423
+
424
+ Components reference `var(--radius-overlay)` once; the platform layer
425
+ picks which value paints. Delete the JSX forks.
426
+
427
+ ### M4. Bare `md:` for component micro-layout
428
+
429
+ **Symptom:** A card that flips to two columns at viewport-`lg:` looks
430
+ broken when dropped into a 400 px side panel on a 1920 px monitor —
431
+ the card is narrow but the viewport says "go two-column", so the
432
+ content overflows.
433
+
434
+ **Detection:** Grep for `md:grid-cols-2` / `lg:flex-row` /
435
+ `xl:items-center` inside `design-system/primitives/**` or
436
+ `features/**/components/**`. Anything outside the chrome allow-list
437
+ is a candidate.
438
+
439
+ **Fix shape:** Make the primitive a `@container` and convert
440
+ `md:` → `@md:`, `lg:` → `@lg:`. Pick the container-query breakpoint
441
+ that matches the *effective slot width*, not the viewport:
442
+
443
+ ```tsx
444
+ // before — viewport-coupled, breaks in side panels
445
+ <Card className="grid lg:grid-cols-[1fr_2fr]">…</Card>
446
+
447
+ // after — slot-coupled, works anywhere
448
+ <Card className="@container grid @4xl:grid-cols-[1fr_2fr]">…</Card>
449
+ // ^^^^^^^^^^^ ^^^^^^
450
+ // container root container threshold
451
+ ```
452
+
453
+ Picking the threshold: if the previous viewport `lg:` (1024 px) worked
454
+ because the main column was ~896 px wide at that viewport, the new
455
+ container threshold is `@4xl:` (~896 px). Container queries don't
456
+ inherit Tailwind's viewport scale; they have their own (`@xs` 320, `@sm`
457
+ 384, `@md` 448, `@lg` 512, `@xl` 576, `@2xl` 672, `@3xl` 768,
458
+ `@4xl` 896, `@5xl` 1024, `@6xl` 1152, `@7xl` 1280). Choose the one that
459
+ matches the slot's typical width, not the viewport's.
460
+
461
+ ## Further reading
462
+
463
+ - [M5. `(hover: hover)` media queries copy-pasted across components and more](references/details.md)