contextos-agents 1.5.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 (310) hide show
  1. package/.agents/AGENTS.md +421 -0
  2. package/.agents/adapters/aider/export.js +137 -0
  3. package/.agents/adapters/claude/export.js +55 -0
  4. package/.agents/adapters/copilot/export.js +107 -0
  5. package/.agents/adapters/cursor/export.js +210 -0
  6. package/.agents/adapters/gemini/export.js +115 -0
  7. package/.agents/adapters/shared.js +119 -0
  8. package/.agents/adapters/zed/export.js +111 -0
  9. package/.agents/core/profiles/backend.yaml +47 -0
  10. package/.agents/core/profiles/enterprise.yaml +46 -0
  11. package/.agents/core/profiles/frontend.yaml +46 -0
  12. package/.agents/core/profiles/hackathon.yaml +45 -0
  13. package/.agents/core/profiles/mvp.yaml +43 -0
  14. package/.agents/core/profiles/startup.yaml +48 -0
  15. package/.agents/core/skills/adapters/EXAMPLES.md +19 -0
  16. package/.agents/core/skills/adapters/SKILL.md +105 -0
  17. package/.agents/core/skills/adapters/TROUBLESHOOTING.md +7 -0
  18. package/.agents/core/skills/adapters/VALIDATION.json +12 -0
  19. package/.agents/core/skills/adapters/skill.yaml +10 -0
  20. package/.agents/core/skills/architecture-diagrams/SKILL.md +108 -0
  21. package/.agents/core/skills/architecture-diagrams/VALIDATION.json +12 -0
  22. package/.agents/core/skills/architecture-diagrams/skill.yaml +8 -0
  23. package/.agents/core/skills/brutalist-design/SKILL.md +150 -0
  24. package/.agents/core/skills/brutalist-design/VALIDATION.json +12 -0
  25. package/.agents/core/skills/brutalist-design/skill.yaml +8 -0
  26. package/.agents/core/skills/context-manager/EXAMPLES.md +19 -0
  27. package/.agents/core/skills/context-manager/SKILL.md +126 -0
  28. package/.agents/core/skills/context-manager/TROUBLESHOOTING.md +7 -0
  29. package/.agents/core/skills/context-manager/VALIDATION.json +12 -0
  30. package/.agents/core/skills/context-manager/skill.yaml +10 -0
  31. package/.agents/core/skills/context-os/EXAMPLES.md +21 -0
  32. package/.agents/core/skills/context-os/SKILL.md +169 -0
  33. package/.agents/core/skills/context-os/TROUBLESHOOTING.md +7 -0
  34. package/.agents/core/skills/context-os/VALIDATION.json +12 -0
  35. package/.agents/core/skills/context-os/packs.yaml +59 -0
  36. package/.agents/core/skills/context-os/references/context-rules.md +68 -0
  37. package/.agents/core/skills/context-os/references/pipeline.md +119 -0
  38. package/.agents/core/skills/context-os/references/project-graph.md +103 -0
  39. package/.agents/core/skills/context-os/rules.yaml +135 -0
  40. package/.agents/core/skills/context-os/skill.yaml +10 -0
  41. package/.agents/core/skills/database/EXAMPLES.md +74 -0
  42. package/.agents/core/skills/database/SKILL.md +101 -0
  43. package/.agents/core/skills/database/TROUBLESHOOTING.md +18 -0
  44. package/.agents/core/skills/database/VALIDATION.json +11 -0
  45. package/.agents/core/skills/database/skill.yaml +25 -0
  46. package/.agents/core/skills/ddd/EXAMPLES.md +42 -0
  47. package/.agents/core/skills/ddd/SKILL.md +247 -0
  48. package/.agents/core/skills/ddd/TROUBLESHOOTING.md +19 -0
  49. package/.agents/core/skills/ddd/VALIDATION.json +12 -0
  50. package/.agents/core/skills/ddd/ddd.md +178 -0
  51. package/.agents/core/skills/ddd/skill.yaml +10 -0
  52. package/.agents/core/skills/decisions/EXAMPLES.md +35 -0
  53. package/.agents/core/skills/decisions/SKILL.md +90 -0
  54. package/.agents/core/skills/decisions/TROUBLESHOOTING.md +13 -0
  55. package/.agents/core/skills/decisions/VALIDATION.json +12 -0
  56. package/.agents/core/skills/decisions/skill.yaml +10 -0
  57. package/.agents/core/skills/docker/EXAMPLES.md +56 -0
  58. package/.agents/core/skills/docker/SKILL.md +63 -0
  59. package/.agents/core/skills/docker/TROUBLESHOOTING.md +18 -0
  60. package/.agents/core/skills/docker/VALIDATION.json +11 -0
  61. package/.agents/core/skills/docker/skill.yaml +23 -0
  62. package/.agents/core/skills/engineering-workflow/EXAMPLES.md +57 -0
  63. package/.agents/core/skills/engineering-workflow/SKILL.md +343 -0
  64. package/.agents/core/skills/engineering-workflow/TROUBLESHOOTING.md +19 -0
  65. package/.agents/core/skills/engineering-workflow/VALIDATION.json +12 -0
  66. package/.agents/core/skills/engineering-workflow/skill.yaml +13 -0
  67. package/.agents/core/skills/fastapi/EXAMPLES.md +36 -0
  68. package/.agents/core/skills/fastapi/SKILL.md +148 -0
  69. package/.agents/core/skills/fastapi/TROUBLESHOOTING.md +19 -0
  70. package/.agents/core/skills/fastapi/VALIDATION.json +12 -0
  71. package/.agents/core/skills/fastapi/fastapi.md +112 -0
  72. package/.agents/core/skills/fastapi/skill.yaml +10 -0
  73. package/.agents/core/skills/gemini-precision/SKILL.md +169 -0
  74. package/.agents/core/skills/gemini-precision/VALIDATION.json +12 -0
  75. package/.agents/core/skills/gemini-precision/skill.yaml +9 -0
  76. package/.agents/core/skills/generators/EXAMPLES.md +19 -0
  77. package/.agents/core/skills/generators/SKILL.md +112 -0
  78. package/.agents/core/skills/generators/TROUBLESHOOTING.md +7 -0
  79. package/.agents/core/skills/generators/VALIDATION.json +12 -0
  80. package/.agents/core/skills/generators/skill.yaml +10 -0
  81. package/.agents/core/skills/generators/templates/API.md +77 -0
  82. package/.agents/core/skills/generators/templates/ARCHITECTURE.md +70 -0
  83. package/.agents/core/skills/generators/templates/DATABASE.md +42 -0
  84. package/.agents/core/skills/generators/templates/DECISION.md +46 -0
  85. package/.agents/core/skills/generators/templates/PRD.md +67 -0
  86. package/.agents/core/skills/generators/templates/PROJECT_GRAPH.md +56 -0
  87. package/.agents/core/skills/generators/templates/ROADMAP.md +51 -0
  88. package/.agents/core/skills/generators/templates/TASKS.md +43 -0
  89. package/.agents/core/skills/generators/templates/UI.md +73 -0
  90. package/.agents/core/skills/graphify/EXAMPLES.md +73 -0
  91. package/.agents/core/skills/graphify/SKILL.md +130 -0
  92. package/.agents/core/skills/graphify/VALIDATION.json +12 -0
  93. package/.agents/core/skills/graphify/skill.yaml +13 -0
  94. package/.agents/core/skills/gstack-roles/EXAMPLES.md +23 -0
  95. package/.agents/core/skills/gstack-roles/SKILL.md +152 -0
  96. package/.agents/core/skills/gstack-roles/TROUBLESHOOTING.md +13 -0
  97. package/.agents/core/skills/gstack-roles/VALIDATION.json +12 -0
  98. package/.agents/core/skills/gstack-roles/skill.yaml +12 -0
  99. package/.agents/core/skills/impeccable-design/EXAMPLES.md +26 -0
  100. package/.agents/core/skills/impeccable-design/SKILL.md +201 -0
  101. package/.agents/core/skills/impeccable-design/TROUBLESHOOTING.md +19 -0
  102. package/.agents/core/skills/impeccable-design/VALIDATION.json +12 -0
  103. package/.agents/core/skills/impeccable-design/skill.yaml +14 -0
  104. package/.agents/core/skills/interview-me/SKILL.md +97 -0
  105. package/.agents/core/skills/interview-me/VALIDATION.json +12 -0
  106. package/.agents/core/skills/interview-me/skill.yaml +8 -0
  107. package/.agents/core/skills/microservices/EXAMPLES.md +38 -0
  108. package/.agents/core/skills/microservices/SKILL.md +164 -0
  109. package/.agents/core/skills/microservices/TROUBLESHOOTING.md +19 -0
  110. package/.agents/core/skills/microservices/VALIDATION.json +12 -0
  111. package/.agents/core/skills/microservices/microservices.md +119 -0
  112. package/.agents/core/skills/microservices/skill.yaml +10 -0
  113. package/.agents/core/skills/minimalist-design/SKILL.md +113 -0
  114. package/.agents/core/skills/minimalist-design/VALIDATION.json +12 -0
  115. package/.agents/core/skills/minimalist-design/skill.yaml +8 -0
  116. package/.agents/core/skills/nestjs/EXAMPLES.md +40 -0
  117. package/.agents/core/skills/nestjs/SKILL.md +139 -0
  118. package/.agents/core/skills/nestjs/TROUBLESHOOTING.md +19 -0
  119. package/.agents/core/skills/nestjs/VALIDATION.json +12 -0
  120. package/.agents/core/skills/nestjs/nestjs.md +103 -0
  121. package/.agents/core/skills/nestjs/skill.yaml +10 -0
  122. package/.agents/core/skills/nextjs/EXAMPLES.md +40 -0
  123. package/.agents/core/skills/nextjs/SKILL.md +163 -0
  124. package/.agents/core/skills/nextjs/TROUBLESHOOTING.md +19 -0
  125. package/.agents/core/skills/nextjs/VALIDATION.json +12 -0
  126. package/.agents/core/skills/nextjs/nextjs.md +67 -0
  127. package/.agents/core/skills/nextjs/skill.yaml +10 -0
  128. package/.agents/core/skills/node/EXAMPLES.md +80 -0
  129. package/.agents/core/skills/node/SKILL.md +128 -0
  130. package/.agents/core/skills/node/TROUBLESHOOTING.md +19 -0
  131. package/.agents/core/skills/node/VALIDATION.json +12 -0
  132. package/.agents/core/skills/node/node.md +87 -0
  133. package/.agents/core/skills/node/skill.yaml +10 -0
  134. package/.agents/core/skills/performance/EXAMPLES.md +30 -0
  135. package/.agents/core/skills/performance/SKILL.md +75 -0
  136. package/.agents/core/skills/performance/TROUBLESHOOTING.md +19 -0
  137. package/.agents/core/skills/performance/VALIDATION.json +12 -0
  138. package/.agents/core/skills/performance/performance.md +52 -0
  139. package/.agents/core/skills/performance/skill.yaml +10 -0
  140. package/.agents/core/skills/ponytail-mindset/EXAMPLES.md +45 -0
  141. package/.agents/core/skills/ponytail-mindset/SKILL.md +193 -0
  142. package/.agents/core/skills/ponytail-mindset/TROUBLESHOOTING.md +19 -0
  143. package/.agents/core/skills/ponytail-mindset/VALIDATION.json +12 -0
  144. package/.agents/core/skills/ponytail-mindset/skill.yaml +14 -0
  145. package/.agents/core/skills/react/EXAMPLES.md +79 -0
  146. package/.agents/core/skills/react/SKILL.md +132 -0
  147. package/.agents/core/skills/react/TROUBLESHOOTING.md +19 -0
  148. package/.agents/core/skills/react/VALIDATION.json +12 -0
  149. package/.agents/core/skills/react/react.md +93 -0
  150. package/.agents/core/skills/react/skill.yaml +10 -0
  151. package/.agents/core/skills/react-best-practices/SKILL.md +155 -0
  152. package/.agents/core/skills/react-best-practices/VALIDATION.json +12 -0
  153. package/.agents/core/skills/react-best-practices/skill.yaml +10 -0
  154. package/.agents/core/skills/redesign-audit/SKILL.md +117 -0
  155. package/.agents/core/skills/redesign-audit/VALIDATION.json +12 -0
  156. package/.agents/core/skills/redesign-audit/skill.yaml +8 -0
  157. package/.agents/core/skills/security/EXAMPLES.md +64 -0
  158. package/.agents/core/skills/security/SKILL.md +158 -0
  159. package/.agents/core/skills/security/TROUBLESHOOTING.md +19 -0
  160. package/.agents/core/skills/security/VALIDATION.json +12 -0
  161. package/.agents/core/skills/security/security.md +106 -0
  162. package/.agents/core/skills/security/skill.yaml +10 -0
  163. package/.agents/core/skills/soft-design/SKILL.md +108 -0
  164. package/.agents/core/skills/soft-design/VALIDATION.json +12 -0
  165. package/.agents/core/skills/soft-design/skill.yaml +8 -0
  166. package/.agents/core/skills/state-management/EXAMPLES.md +56 -0
  167. package/.agents/core/skills/state-management/SKILL.md +48 -0
  168. package/.agents/core/skills/state-management/TROUBLESHOOTING.md +18 -0
  169. package/.agents/core/skills/state-management/VALIDATION.json +11 -0
  170. package/.agents/core/skills/state-management/skill.yaml +22 -0
  171. package/.agents/core/skills/subagent-orchestrator/SKILL.md +100 -0
  172. package/.agents/core/skills/subagent-orchestrator/VALIDATION.json +12 -0
  173. package/.agents/core/skills/subagent-orchestrator/skill.yaml +8 -0
  174. package/.agents/core/skills/system-design/EXAMPLES.md +75 -0
  175. package/.agents/core/skills/system-design/SKILL.md +419 -0
  176. package/.agents/core/skills/system-design/TROUBLESHOOTING.md +19 -0
  177. package/.agents/core/skills/system-design/VALIDATION.json +12 -0
  178. package/.agents/core/skills/system-design/skill.yaml +13 -0
  179. package/.agents/core/skills/system-design/system-design.md +112 -0
  180. package/.agents/core/skills/testing/EXAMPLES.md +71 -0
  181. package/.agents/core/skills/testing/SKILL.md +70 -0
  182. package/.agents/core/skills/testing/TROUBLESHOOTING.md +18 -0
  183. package/.agents/core/skills/testing/VALIDATION.json +11 -0
  184. package/.agents/core/skills/testing/skill.yaml +26 -0
  185. package/.agents/core/skills/typescript/EXAMPLES.md +64 -0
  186. package/.agents/core/skills/typescript/SKILL.md +112 -0
  187. package/.agents/core/skills/typescript/TROUBLESHOOTING.md +19 -0
  188. package/.agents/core/skills/typescript/VALIDATION.json +12 -0
  189. package/.agents/core/skills/typescript/skill.yaml +10 -0
  190. package/.agents/core/skills/typescript/typescript.md +71 -0
  191. package/.agents/core/skills/ui-design/EXAMPLES.md +21 -0
  192. package/.agents/core/skills/ui-design/SKILL.md +124 -0
  193. package/.agents/core/skills/ui-design/TROUBLESHOOTING.md +19 -0
  194. package/.agents/core/skills/ui-design/VALIDATION.json +12 -0
  195. package/.agents/core/skills/ui-design/skill.yaml +10 -0
  196. package/.agents/core/skills/ui-design/ui.md +88 -0
  197. package/.agents/core/skills/ui-ux-pro/EXAMPLES.md +62 -0
  198. package/.agents/core/skills/ui-ux-pro/SKILL.md +375 -0
  199. package/.agents/core/skills/ui-ux-pro/TROUBLESHOOTING.md +19 -0
  200. package/.agents/core/skills/ui-ux-pro/VALIDATION.json +12 -0
  201. package/.agents/core/skills/ui-ux-pro/skill.yaml +13 -0
  202. package/.agents/core/skills/ux-design/EXAMPLES.md +36 -0
  203. package/.agents/core/skills/ux-design/SKILL.md +116 -0
  204. package/.agents/core/skills/ux-design/TROUBLESHOOTING.md +19 -0
  205. package/.agents/core/skills/ux-design/VALIDATION.json +12 -0
  206. package/.agents/core/skills/ux-design/skill.yaml +10 -0
  207. package/.agents/core/skills/ux-design/ux.md +80 -0
  208. package/.agents/core/skills/vercel-optimize/SKILL.md +83 -0
  209. package/.agents/core/skills/vercel-optimize/VALIDATION.json +12 -0
  210. package/.agents/core/skills/vercel-optimize/skill.yaml +10 -0
  211. package/.agents/core/skills/web-accessibility/EXAMPLES.md +39 -0
  212. package/.agents/core/skills/web-accessibility/SKILL.md +170 -0
  213. package/.agents/core/skills/web-accessibility/TROUBLESHOOTING.md +19 -0
  214. package/.agents/core/skills/web-accessibility/VALIDATION.json +12 -0
  215. package/.agents/core/skills/web-accessibility/accessibility.md +63 -0
  216. package/.agents/core/skills/web-accessibility/skill.yaml +10 -0
  217. package/.agents/ctx.js +370 -0
  218. package/.agents/generated/claude/skills/adapters/SKILL.md +126 -0
  219. package/.agents/generated/claude/skills/architecture-diagrams/SKILL.md +101 -0
  220. package/.agents/generated/claude/skills/brutalist-design/SKILL.md +145 -0
  221. package/.agents/generated/claude/skills/context-manager/SKILL.md +147 -0
  222. package/.agents/generated/claude/skills/context-os/SKILL.md +191 -0
  223. package/.agents/generated/claude/skills/database/SKILL.md +191 -0
  224. package/.agents/generated/claude/skills/ddd/SKILL.md +305 -0
  225. package/.agents/generated/claude/skills/decisions/SKILL.md +134 -0
  226. package/.agents/generated/claude/skills/docker/SKILL.md +135 -0
  227. package/.agents/generated/claude/skills/engineering-workflow/SKILL.md +414 -0
  228. package/.agents/generated/claude/skills/fastapi/SKILL.md +200 -0
  229. package/.agents/generated/claude/skills/gemini-precision/SKILL.md +161 -0
  230. package/.agents/generated/claude/skills/generators/SKILL.md +133 -0
  231. package/.agents/generated/claude/skills/graphify/SKILL.md +198 -0
  232. package/.agents/generated/claude/skills/gstack-roles/SKILL.md +184 -0
  233. package/.agents/generated/claude/skills/impeccable-design/SKILL.md +241 -0
  234. package/.agents/generated/claude/skills/interview-me/SKILL.md +90 -0
  235. package/.agents/generated/claude/skills/microservices/SKILL.md +218 -0
  236. package/.agents/generated/claude/skills/minimalist-design/SKILL.md +108 -0
  237. package/.agents/generated/claude/skills/nestjs/SKILL.md +195 -0
  238. package/.agents/generated/claude/skills/nextjs/SKILL.md +219 -0
  239. package/.agents/generated/claude/skills/node/SKILL.md +224 -0
  240. package/.agents/generated/claude/skills/performance/SKILL.md +121 -0
  241. package/.agents/generated/claude/skills/ponytail-mindset/SKILL.md +252 -0
  242. package/.agents/generated/claude/skills/react/SKILL.md +227 -0
  243. package/.agents/generated/claude/skills/react-best-practices/SKILL.md +146 -0
  244. package/.agents/generated/claude/skills/redesign-audit/SKILL.md +112 -0
  245. package/.agents/generated/claude/skills/security/SKILL.md +237 -0
  246. package/.agents/generated/claude/skills/soft-design/SKILL.md +103 -0
  247. package/.agents/generated/claude/skills/state-management/SKILL.md +120 -0
  248. package/.agents/generated/claude/skills/subagent-orchestrator/SKILL.md +93 -0
  249. package/.agents/generated/claude/skills/system-design/SKILL.md +507 -0
  250. package/.agents/generated/claude/skills/testing/SKILL.md +157 -0
  251. package/.agents/generated/claude/skills/typescript/SKILL.md +192 -0
  252. package/.agents/generated/claude/skills/ui-design/SKILL.md +161 -0
  253. package/.agents/generated/claude/skills/ui-ux-pro/SKILL.md +451 -0
  254. package/.agents/generated/claude/skills/ux-design/SKILL.md +168 -0
  255. package/.agents/generated/claude/skills/vercel-optimize/SKILL.md +76 -0
  256. package/.agents/generated/claude/skills/web-accessibility/SKILL.md +225 -0
  257. package/.agents/generated/gemini/skills/adapters/SKILL.md +135 -0
  258. package/.agents/generated/gemini/skills/architecture-diagrams/SKILL.md +107 -0
  259. package/.agents/generated/gemini/skills/brutalist-design/SKILL.md +151 -0
  260. package/.agents/generated/gemini/skills/context-manager/SKILL.md +156 -0
  261. package/.agents/generated/gemini/skills/context-os/SKILL.md +200 -0
  262. package/.agents/generated/gemini/skills/database/SKILL.md +200 -0
  263. package/.agents/generated/gemini/skills/ddd/SKILL.md +314 -0
  264. package/.agents/generated/gemini/skills/decisions/SKILL.md +143 -0
  265. package/.agents/generated/gemini/skills/docker/SKILL.md +144 -0
  266. package/.agents/generated/gemini/skills/engineering-workflow/SKILL.md +423 -0
  267. package/.agents/generated/gemini/skills/fastapi/SKILL.md +209 -0
  268. package/.agents/generated/gemini/skills/gemini-precision/SKILL.md +167 -0
  269. package/.agents/generated/gemini/skills/generators/SKILL.md +142 -0
  270. package/.agents/generated/gemini/skills/graphify/SKILL.md +205 -0
  271. package/.agents/generated/gemini/skills/gstack-roles/SKILL.md +193 -0
  272. package/.agents/generated/gemini/skills/impeccable-design/SKILL.md +250 -0
  273. package/.agents/generated/gemini/skills/interview-me/SKILL.md +96 -0
  274. package/.agents/generated/gemini/skills/microservices/SKILL.md +227 -0
  275. package/.agents/generated/gemini/skills/minimalist-design/SKILL.md +114 -0
  276. package/.agents/generated/gemini/skills/nestjs/SKILL.md +204 -0
  277. package/.agents/generated/gemini/skills/nextjs/SKILL.md +298 -0
  278. package/.agents/generated/gemini/skills/node/SKILL.md +323 -0
  279. package/.agents/generated/gemini/skills/performance/SKILL.md +185 -0
  280. package/.agents/generated/gemini/skills/ponytail-mindset/SKILL.md +261 -0
  281. package/.agents/generated/gemini/skills/react/SKILL.md +332 -0
  282. package/.agents/generated/gemini/skills/react-best-practices/SKILL.md +152 -0
  283. package/.agents/generated/gemini/skills/redesign-audit/SKILL.md +118 -0
  284. package/.agents/generated/gemini/skills/security/SKILL.md +355 -0
  285. package/.agents/generated/gemini/skills/soft-design/SKILL.md +109 -0
  286. package/.agents/generated/gemini/skills/state-management/SKILL.md +129 -0
  287. package/.agents/generated/gemini/skills/subagent-orchestrator/SKILL.md +99 -0
  288. package/.agents/generated/gemini/skills/system-design/SKILL.md +631 -0
  289. package/.agents/generated/gemini/skills/testing/SKILL.md +166 -0
  290. package/.agents/generated/gemini/skills/typescript/SKILL.md +275 -0
  291. package/.agents/generated/gemini/skills/ui-design/SKILL.md +170 -0
  292. package/.agents/generated/gemini/skills/ui-ux-pro/SKILL.md +460 -0
  293. package/.agents/generated/gemini/skills/ux-design/SKILL.md +177 -0
  294. package/.agents/generated/gemini/skills/vercel-optimize/SKILL.md +82 -0
  295. package/.agents/generated/gemini/skills/web-accessibility/SKILL.md +300 -0
  296. package/.agents/mcp/runtime.py +454 -0
  297. package/.agents/mcp/server.mjs +189373 -0
  298. package/.agents/plugins.js +574 -0
  299. package/.agents/profiles.js +267 -0
  300. package/.agents/resolver.js +336 -0
  301. package/.agents/skills-index.json +200 -0
  302. package/.agents/skills.json +6 -0
  303. package/.agents/validate.js +500 -0
  304. package/LICENSE +21 -0
  305. package/README.md +415 -0
  306. package/benchmarks/gemini-issues.js +533 -0
  307. package/bin/index.js +458 -0
  308. package/package.json +70 -0
  309. package/registry.json +53 -0
  310. package/registry.schema.json +32 -0
@@ -0,0 +1,332 @@
1
+ ---
2
+ name: React
3
+ description: >
4
+ ContextOS skill for React
5
+ ---
6
+ # React Engineering & Performance Best Practices
7
+
8
+ ## Overview
9
+
10
+ Enforces declarative, component-driven UI architecture with optimal re-render cycles, state colocation, responsive optimistic updates, and robust accessibility standards.
11
+
12
+ ## When to Use
13
+
14
+ Activate whenever creating, refactoring, or optimizing React functional components, custom hooks, context providers, or UI interaction states.
15
+
16
+ ## Negative Constraints (What NOT to Do)
17
+
18
+ 1. **NEVER use `useEffect` to synchronize or compute derived state**: Calculate derived state inline during render. Use `useMemo` only for computationally intensive derivations.
19
+ 2. **NEVER use array indices as `key` props on dynamic or reorderable lists**: Always use stable, unique entity identifiers (`item.id`).
20
+ 3. **NEVER mutate React state directly**: Always return new immutable references (`[...prev, newItem]` or `{ ...prev, key: value }`).
21
+ 4. **NEVER declare subcomponents inside the render body of parent components**: Declare components at module scope or in dedicated files to prevent DOM node remounting and lost focus state.
22
+ 5. **NEVER create memory leaks in `useEffect`**: Always provide clean-up functions for event listeners, `AbortController`, timers, and websocket subscriptions.
23
+ 6. **NEVER lift state higher than necessary**: Colocate state to the nearest common ancestor or leaf component to prevent wasteful re-renders of unrelated subtrees.
24
+
25
+ ## Rules & Patterns
26
+
27
+ ### 1. State Colocation & Re-render Optimization
28
+
29
+ - **State Colocation**: Keep state as close as possible to the components that consume it.
30
+ - **Composition to Prevent Re-renders**: Pass expensive static subtrees as `children` to wrapper components holding state so the children do not re-render when the wrapper updates.
31
+
32
+ ```tsx
33
+ export function ExpandableCard({ title, children }: { title: string; children: React.ReactNode }) {
34
+ const [isOpen, setIsOpen] = useState(false);
35
+
36
+ return (
37
+ <div className="rounded-xl border p-4">
38
+ <button
39
+ type="button"
40
+ onClick={() => setIsOpen(v => !v)}
41
+ className="flex w-full justify-between font-semibold"
42
+ aria-expanded={isOpen}
43
+ >
44
+ <span>{title}</span>
45
+ <span>{isOpen ? '−' : '+'}</span>
46
+ </button>
47
+ {isOpen && <div className="mt-3 pt-3 border-t">{children}</div>}
48
+ </div>
49
+ );
50
+ }
51
+ ```
52
+
53
+ ### 2. Optimistic UI Updates & Concurrent Actions (`useOptimistic`, `useTransition`)
54
+
55
+ - Provide instantaneous visual feedback for user actions without waiting for server network roundtrips.
56
+
57
+ ```tsx
58
+ import { useOptimistic, useTransition } from 'react';
59
+
60
+ export function TodoList({ todos, onAdd }: { todos: Todo[]; onAdd: (text: string) => Promise<void> }) {
61
+ const [isPending, startTransition] = useTransition();
62
+ const [optimisticTodos, addOptimisticTodo] = useOptimistic(
63
+ todos,
64
+ (state, newText: string) => [...state, { id: 'temp-' + Date.now(), text: newText, isPending: true }]
65
+ );
66
+
67
+ const handleAction = async (formData: FormData) => {
68
+ const text = formData.get('todo') as string;
69
+ if (!text?.trim()) return;
70
+
71
+ startTransition(async () => {
72
+ addOptimisticTodo(text);
73
+ await onAdd(text);
74
+ });
75
+ };
76
+
77
+ return (
78
+ <form action={handleAction} className="space-y-4">
79
+ <input name="todo" placeholder="Add a new task..." className="border p-2 rounded" />
80
+ <button type="submit" disabled={isPending} className="bg-primary text-white px-4 py-2 rounded">
81
+ {isPending ? 'Saving...' : 'Add'}
82
+ </button>
83
+ <ul className="divide-y">
84
+ {optimisticTodos.map(todo => (
85
+ <li key={todo.id} className={todo.isPending ? 'opacity-50 italic' : ''}>
86
+ {todo.text}
87
+ </li>
88
+ ))}
89
+ </ul>
90
+ </form>
91
+ );
92
+ }
93
+ ```
94
+
95
+ ### 3. Derived State vs. Effects Anti-Pattern
96
+
97
+ ```tsx
98
+ // [GOOD] Computed directly during render (or memoized if expensive)
99
+ function SearchResults({ query, items }: { query: string; items: Item[] }) {
100
+ const filtered = useMemo(() => {
101
+ const q = query.trim().toLowerCase();
102
+ if (!q) return items;
103
+ return items.filter(i => i.title.toLowerCase().includes(q));
104
+ }, [query, items]);
105
+
106
+ return <List items={filtered} />;
107
+ }
108
+ ```
109
+
110
+ ## Code Examples
111
+
112
+ See `EXAMPLES.md` for detailed code examples and hook implementations.
113
+
114
+ ## Validation Checklist
115
+
116
+ - [ ] Zero `useEffect` hooks used for derived calculations.
117
+ - [ ] Every list mapping has a unique, non-index entity ID key.
118
+ - [ ] Subcomponents declared in parent render functions are extracted to top-level scope.
119
+ - [ ] Effects with event listeners, timers, or abortable requests include clean-up returns.
120
+ - [ ] Reusable components are composed cleanly via `children` or render props.
121
+
122
+ ## Common Mistakes
123
+
124
+ - Setting state inside `useEffect` based on prop changes rather than deriving values inline.
125
+ - Declaring nested components within component bodies.
126
+ - Using index keys causing input focus loss or animations breaking on list mutations.
127
+
128
+ ## Integration Notes
129
+
130
+ - Pairs with `typescript` for type safety on props, generics, and ref forwarding.
131
+ - Pairs with `ui-ux-pro` and `web-accessibility` for UI tokens and ARIA standards.
132
+
133
+
134
+ <!-- Source: react.md -->
135
+
136
+ # React — Best Practices
137
+
138
+ ## Component Architecture
139
+
140
+ - **Prefer function components** with hooks over class components
141
+ - **One component per file** — name file same as component
142
+ - **Composition over inheritance** — use children and render props
143
+ - **Keep components small** — if > 150 lines, split it
144
+
145
+ ## Hooks
146
+
147
+ - **useState** for local state, **useReducer** for complex state
148
+ - **useEffect** — always specify dependencies, clean up subscriptions
149
+ - **Custom hooks** — extract reusable logic into `use*` functions
150
+ - **useMemo/useCallback** — only when you have measured a performance problem
151
+
152
+ ## State Management
153
+
154
+ - **Local state first** — don't reach for global state until you need it
155
+ - **Lift state up** — find the closest common ancestor
156
+ - **Context** — for cross-cutting concerns (theme, auth, locale)
157
+ - **External store** (Zustand, Jotai) — for truly global, frequently updated state
158
+
159
+ ## Patterns
160
+
161
+ ### Container/Presenter
162
+
163
+ ```tsx
164
+ // Container — handles logic
165
+ function UserListContainer() {
166
+ const users = useUsers();
167
+ return <UserList users={users} />;
168
+ }
169
+
170
+ // Presenter — handles display
171
+ function UserList({ users }: { users: User[] }) {
172
+ return <ul>{users.map(u => <UserItem key={u.id} user={u} />)}</ul>;
173
+ }
174
+ ```
175
+
176
+ ### Error Boundaries
177
+
178
+ - Wrap major sections in Error Boundaries
179
+ - Provide meaningful fallback UI
180
+ - Log errors to monitoring service
181
+
182
+ ### Loading States
183
+
184
+ - Always handle: `loading`, `error`, `empty`, `data` states
185
+ - Use Suspense where supported
186
+ - Show skeleton screens, not spinners
187
+
188
+ ## Performance
189
+
190
+ - **React.memo** — only for expensive renders with stable props
191
+ - **Code splitting** — lazy load routes and heavy components
192
+ - **Virtualization** — for lists > 100 items
193
+ - **Image optimization** — use next/image or lazy loading
194
+ - **Avoid** — inline object/array creation in JSX props
195
+
196
+ ## Anti-Patterns (Avoid)
197
+
198
+ - [FAIL] Props drilling more than 2 levels — use Context or state management
199
+ - [FAIL] useEffect for derived state — use useMemo instead
200
+ - [FAIL] Index as key — use stable unique IDs
201
+ - [FAIL] Mutating state directly — always create new references
202
+ - [FAIL] God components — split into smaller, focused components
203
+ - [FAIL] Business logic in components — extract to hooks or services
204
+
205
+ ## Testing
206
+
207
+ - **React Testing Library** — test behavior, not implementation
208
+ - Test user interactions, not component internals
209
+ - Mock API calls, not React hooks
210
+ - Use `screen.getByRole` over `getByTestId`
211
+
212
+ ## File Structure
213
+
214
+ ```
215
+ components/
216
+ Button/
217
+ Button.tsx
218
+ Button.test.tsx
219
+ Button.module.css
220
+ index.ts
221
+ hooks/
222
+ useAuth.ts
223
+ useDebounce.ts
224
+ services/
225
+ api.ts
226
+ types/
227
+ user.ts
228
+ ```
229
+
230
+ <!-- Source: EXAMPLES.md -->
231
+
232
+ # React Examples — Anti-patterns vs ContextOS Standard
233
+
234
+ ## Example 1: Derived State vs. useEffect
235
+
236
+ ### Anti-pattern: Anti-pattern (Redundant state + extra render with useEffect)
237
+
238
+ ```tsx
239
+ // BAD: causes an unnecessary extra render cycle and potential state desync
240
+ function OrderSummary({ items }: { items: CartItem[] }) {
241
+ const [total, setTotal] = useState(0);
242
+
243
+ useEffect(() => {
244
+ const calculated = items.reduce((sum, item) => sum + item.price * item.quantity, 0);
245
+ setTotal(calculated);
246
+ }, [items]);
247
+
248
+ return <div>Total: ${total}</div>;
249
+ }
250
+ ```
251
+
252
+ ### Best practice: ContextOS Standard (Inline derived calculation / useMemo)
253
+
254
+ ```tsx
255
+ // GOOD: calculated instantly during render with zero extra render pass
256
+ function OrderSummary({ items }: { items: CartItem[] }) {
257
+ const total = useMemo(
258
+ () => items.reduce((sum, item) => sum + item.price * item.quantity, 0),
259
+ [items]
260
+ );
261
+
262
+ return <div>Total: ${total.toFixed(2)}</div>;
263
+ }
264
+ ```
265
+
266
+ ---
267
+
268
+ ## Example 2: Custom Hook Encapsulation
269
+
270
+ ### Anti-pattern: Anti-pattern (Scattered listener logic inside component)
271
+
272
+ ```tsx
273
+ // BAD: window listener logic cluttering UI component
274
+ function NavHeader() {
275
+ const [isScrolled, setIsScrolled] = useState(false);
276
+ useEffect(() => {
277
+ const handleScroll = () => setIsScrolled(window.scrollY > 50);
278
+ window.addEventListener('scroll', handleScroll);
279
+ return () => window.removeEventListener('scroll', handleScroll);
280
+ }, []);
281
+ return <header className={isScrolled ? 'scrolled' : ''}>Header</header>;
282
+ }
283
+ ```
284
+
285
+ ### Best practice: ContextOS Standard (Reusable Custom Hook)
286
+
287
+ ```tsx
288
+ // GOOD: extracted into a reusable, testable custom hook
289
+ export function useScrollThreshold(threshold = 50): boolean {
290
+ const [isPassed, setIsPassed] = useState(() => typeof window !== 'undefined' && window.scrollY > threshold);
291
+
292
+ useEffect(() => {
293
+ let ticking = false;
294
+ const handleScroll = () => {
295
+ if (!ticking) {
296
+ window.requestAnimationFrame(() => {
297
+ setIsPassed(window.scrollY > threshold);
298
+ ticking = false;
299
+ });
300
+ ticking = true;
301
+ }
302
+ };
303
+
304
+ window.addEventListener('scroll', handleScroll, { passive: true });
305
+ return () => window.removeEventListener('scroll', handleScroll);
306
+ }, [threshold]);
307
+
308
+ return isPassed;
309
+ }
310
+ ```
311
+
312
+ <!-- Source: TROUBLESHOOTING.md -->
313
+
314
+ # react Troubleshooting & Common Mistakes
315
+
316
+ ## 1. Infinite Render Loops in useEffect
317
+
318
+ - **Symptom**: Browser freezes, "Maximum update depth exceeded" error.
319
+ - **Root Cause**: Creating new object or array literals inside component body and passing them to useEffect dependency array.
320
+ - **Fix**: Colocate state, compute derived state during render without useEffect, or use primitive dependency values.
321
+
322
+ ## 2. Stale Closures in Callbacks
323
+
324
+ - **Symptom**: Event handler or setTimeout accesses outdated state values.
325
+ - **Root Cause**: Callback closing over initial state without updated dependency.
326
+ - **Fix**: Use functional state updates (`setCount(c => c + 1)`) or `useRef` for mutable references.
327
+
328
+ ## 3. Prop Drilling vs Context Performance
329
+
330
+ - **Symptom**: Changing a small state variable causes the entire component tree to re-render.
331
+ - **Root Cause**: Storing rapidly changing state in a single monolithic React Context.
332
+ - **Fix**: Split contexts by domain or migrate client UI state to Zustand with granular selectors.
@@ -0,0 +1,152 @@
1
+ ---
2
+ name: react-best-practices
3
+ description: >
4
+ React and Next.js performance optimization guidelines from Vercel Engineering.
5
+ ---
6
+ # Vercel React Best Practices
7
+
8
+ ## Overview
9
+
10
+ Comprehensive performance optimization guide for React and Next.js applications, maintained by Vercel. Contains 70 rules across 8 categories, prioritized by impact to guide automated refactoring, code generation, and production review.
11
+
12
+ ## When to Use
13
+
14
+ - When authoring new React functional components or Next.js App Router pages.
15
+ - When implementing data fetching (client or server-side Server Actions, RSC).
16
+ - When reviewing pull requests for rendering bottlenecks or memory leaks.
17
+ - When optimizing bundle size, eliminating network waterfalls, or improving Core Web Vitals (LCP, INP, CLS).
18
+
19
+ ## Rules & Patterns
20
+
21
+ ### Rule Categories by Priority
22
+
23
+ | Priority | Category | Impact | Prefix |
24
+ |----------|----------|--------|--------|
25
+ | 1 | Eliminating Waterfalls | CRITICAL | `async-` |
26
+ | 2 | Bundle Size Optimization | CRITICAL | `bundle-` |
27
+ | 3 | Server-Side Performance | HIGH | `server-` |
28
+ | 4 | Client-Side Data Fetching | MEDIUM-HIGH | `client-` |
29
+ | 5 | Re-render Optimization | MEDIUM | `rerender-` |
30
+ | 6 | Rendering Performance | MEDIUM | `rendering-` |
31
+ | 7 | JavaScript Performance | LOW-MEDIUM | `js-` |
32
+ | 8 | Advanced Patterns | LOW | `advanced-` |
33
+
34
+ ### 1. Eliminating Waterfalls (CRITICAL)
35
+
36
+ - `async-cheap-condition-before-await` - Check cheap sync conditions before awaiting flags or remote values.
37
+ - `async-defer-await` - Move await into branches where actually used.
38
+ - `async-parallel` - Use `Promise.all()` for independent asynchronous operations.
39
+ - `async-dependencies` - Use better-all for partial dependencies.
40
+ - `async-api-routes` - Start promises early, await late in API routes.
41
+ - `async-suspense-boundaries` - Use Suspense to stream content progressively.
42
+
43
+ ### 2. Bundle Size Optimization (CRITICAL)
44
+
45
+ - `bundle-barrel-imports` - Import directly from specific modules, avoid broad barrel files (`index.ts`).
46
+ - `bundle-analyzable-paths` - Prefer statically analyzable import paths to avoid bloated traces.
47
+ - `bundle-dynamic-imports` - Use `next/dynamic` or `React.lazy()` for heavy interactive components.
48
+ - `bundle-defer-third-party` - Load analytics and logging scripts after hydration.
49
+ - `bundle-conditional` - Load modules only when feature flags or user actions require them.
50
+ - `bundle-preload` - Preload assets on hover or focus for perceived instant navigation.
51
+
52
+ ### 3. Server-Side Performance (HIGH)
53
+
54
+ - `server-auth-actions` - Always authenticate server actions like API routes.
55
+ - `server-cache-react` - Use `React.cache()` for per-request deduplication.
56
+ - `server-cache-lru` - Use LRU cache for cross-request caching.
57
+ - `server-dedup-props` - Avoid duplicate serialization in RSC props.
58
+ - `server-hoist-static-io` - Hoist static I/O to module level.
59
+ - `server-no-shared-module-state` - Avoid module-level mutable request state in RSC/SSR.
60
+ - `server-serialization` - Minimize data passed across the server-client boundary.
61
+ - `server-parallel-fetching` - Restructure components to parallelize fetches.
62
+ - `server-after-nonblocking` - Use `after()` for non-blocking operations like analytics logging.
63
+
64
+ ### 4. Client-Side Data Fetching (MEDIUM-HIGH)
65
+
66
+ - `client-swr-dedup` - Use SWR or TanStack Query for automatic request deduplication.
67
+ - `client-event-listeners` - Deduplicate global event listeners.
68
+ - `client-passive-event-listeners` - Use passive listeners for scroll and touch.
69
+ - `client-localstorage-schema` - Version and minimize data stored in localStorage.
70
+
71
+ ### 5. Re-render Optimization (MEDIUM)
72
+
73
+ - `rerender-defer-reads` - Don't subscribe to state only used in callbacks.
74
+ - `rerender-memo` - Extract expensive work into memoized components.
75
+ - `rerender-memo-with-default-value` - Hoist default non-primitive props.
76
+ - `rerender-dependencies` - Use primitive dependencies in effects and callbacks.
77
+ - `rerender-derived-state` - Subscribe to derived booleans, not raw high-frequency values.
78
+ - `rerender-derived-state-no-effect` - Derive state during render, never in `useEffect`.
79
+ - `rerender-functional-setstate` - Use functional `setState` for stable callback references.
80
+ - `rerender-lazy-state-init` - Pass initializer functions to `useState` for expensive computations.
81
+ - `rerender-transitions` - Use `startTransition` for non-urgent state updates.
82
+ - `rerender-use-deferred-value` - Defer expensive renders to keep input responsive.
83
+ - `rerender-no-inline-components` - Never define subcomponents inside component render bodies.
84
+
85
+ ### 6. Rendering Performance (MEDIUM)
86
+
87
+ - `rendering-content-visibility` - Use `content-visibility: auto` for long offscreen lists.
88
+ - `rendering-hoist-jsx` - Extract static JSX elements outside components.
89
+ - `rendering-conditional-render` - Use ternary (`condition ? <Comp /> : null`), not `&&` to avoid 0 rendering.
90
+ - `rendering-usetransition-loading` - Prefer `useTransition` for loading state indicators.
91
+
92
+ ### 7. JavaScript Performance (LOW-MEDIUM)
93
+
94
+ - `js-index-maps` - Build `Map` for repeated lookups instead of repeated array searches.
95
+ - `js-cache-property-access` - Cache object properties in tight loops.
96
+ - `js-early-exit` - Return early from functions to avoid nested complexity.
97
+ - `js-hoist-regexp` - Hoist RegExp creation outside loops and functions.
98
+ - `js-set-map-lookups` - Use `Set` / `Map` for O(1) lookups.
99
+
100
+ ### 8. Advanced Patterns (LOW)
101
+
102
+ - `advanced-effect-event-deps` - Don't put `useEffectEvent` results in effect deps.
103
+ - `advanced-event-handler-refs` - Store event handlers in refs for stable listener attachments.
104
+ - `advanced-init-once` - Initialize app singletons once per lifecycle.
105
+
106
+ ## Code Examples
107
+
108
+ ```tsx
109
+ // [GOOD] Parallel server fetching without waterfall
110
+ import { cache } from 'react';
111
+
112
+ export const getUser = cache(async (id: string) => {
113
+ return db.user.findUnique({ where: { id } });
114
+ });
115
+
116
+ export default async function UserPage({ params }: { params: { id: string } }) {
117
+ // Parallel dispatch
118
+ const userPromise = getUser(params.id);
119
+ const postsPromise = getPosts(params.id);
120
+
121
+ const [user, posts] = await Promise.all([userPromise, postsPromise]);
122
+
123
+ return (
124
+ <main>
125
+ <h1>{user.name}</h1>
126
+ <PostList posts={posts} />
127
+ </main>
128
+ );
129
+ }
130
+ ```
131
+
132
+ ## Validation Checklist
133
+
134
+ - [ ] All independent async fetches use `Promise.all()` instead of sequential `await`.
135
+ - [ ] Direct imports used instead of barrel file imports for large libraries.
136
+ - [ ] No `useEffect` used for deriving computed state from props or state.
137
+ - [ ] Heavy interactive modals/drawers loaded dynamically via `next/dynamic`.
138
+ - [ ] Server actions perform authentication checks before data mutations.
139
+ - [ ] Zero subcomponents defined inside the body of parent components.
140
+
141
+ ## Common Mistakes
142
+
143
+ - Writing sequential `await fetchA(); await fetchB();` creating avoidable network waterfalls.
144
+ - Importing from package root barrel files triggering full bundle inclusion.
145
+ - Setting state inside `useEffect` in response to prop changes.
146
+ - Serializing full database models with sensitive or unused fields to Client Components.
147
+
148
+ ## Integration Notes
149
+
150
+ - Pairs with `react` and `nextjs` skills for idiomatic App Router patterns.
151
+ - Complements `performance` for Lighthouse and Core Web Vitals verification.
152
+
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: redesign-audit
3
+ description: >
4
+ Audits and upgrades existing web codebases with high-end typography, color, layout, and interaction polish.
5
+ ---
6
+ # Redesign Skill & UI Audit
7
+
8
+ ## Overview
9
+
10
+ A systematic redesign and auditing protocol designed to elevate existing websites, dashboards, and web applications to world-class agency quality. It diagnoses and eradicates generic AI design fingerprints, sloppy typography, inconsistent palettes, and absent interaction states without breaking business logic or underlying component contracts.
11
+
12
+ ## When to Use
13
+
14
+ - When auditing an existing UI codebase for design quality, responsiveness, or accessibility.
15
+ - When modernizing a legacy application or uplifting generic templates.
16
+ - When tasked to "redesign", "clean up the layout", "audit UI", or "make it look expensive and modern".
17
+
18
+ ## Rules & Patterns
19
+
20
+ ### 1. Workflow: Scan → Diagnose → Fix
21
+
22
+ 1. **Scan:** Read the codebase. Identify the framework, styling method (Tailwind v3/v4, vanilla CSS, CSS Modules), and established design tokens.
23
+ 2. **Diagnose:** Run through the design audit categories. Catalog generic patterns, missing states, and optical alignment flaws.
24
+ 3. **Fix:** Apply surgical, targeted upgrades working within the existing stack. Do not rewrite from scratch.
25
+
26
+ ### 2. Design Audit Categories
27
+
28
+ #### Typography
29
+
30
+ - **Replace Browser Defaults:** Swap generic `Inter`, `Roboto`, or system fonts with expressive typefaces (`Geist`, `Outfit`, `Cabinet Grotesk`, `Satoshi`).
31
+ - **Presence & Scale:** Increase display text size, tighten letter-spacing (`-0.02em` to `-0.04em`), reduce line-height on headlines.
32
+ - **Reading Comfort:** Limit body text to 65 characters per line (`max-w-prose`), increase line-height to 1.6.
33
+ - **Figures:** Enable tabular figures (`font-variant-numeric: tabular-nums`) for numbers in tables and data readouts.
34
+ - **Orphan Prevention:** Apply `text-wrap: balance` on headlines and `text-wrap: pretty` on paragraphs.
35
+
36
+ #### Color and Surfaces
37
+
38
+ - **No Pure Black Backgrounds:** Replace `#000000` with tinted dark charcoal (`#0A0A0A`, `#121212`).
39
+ - **Desaturate Accents:** Keep accent saturation below 80% so it blends harmoniously with neutrals.
40
+ - **Single Accent Color:** Commit to one dominant accent hue; remove conflicting secondary tints.
41
+ - **Tinted Shadows:** Tint shadows to match the background hue rather than harsh black opacity.
42
+ - **Background Depth:** Prevent sterile flat sections by layering subtle noise overlays, ambient gradients, or masked imagery.
43
+
44
+ #### Layout and Space
45
+
46
+ - **Asymmetry & Bento Grids:** Break repetitive 3-column Bootstrap grids with asymmetrical spans or offset cards.
47
+ - **Mobile Viewport Bug Fix:** Never use `height: 100vh`; always use `min-height: 100dvh`.
48
+ - **Vertical Alignment:** Pin action buttons to the bottom of card groups (`mt-auto` or grid alignment) to maintain horizontal baseline harmony across differing text heights.
49
+ - **Optical Centering:** Adjust icons, badges, and play buttons optically by 1-2px rather than relying solely on pure mathematical centering.
50
+
51
+ #### Interactivity and States
52
+
53
+ - **Interactive Feedback:** Add 200-300ms transitions, distinct hover shifts, and physical active presses (`scale(0.98)`).
54
+ - **Visible Focus Rings:** Mandatory `:focus-visible` styling for keyboard navigation.
55
+ - **States Completeness:** Always provide designed skeleton loaders, empty states, and inline error messages.
56
+
57
+ #### Content & Code Quality
58
+
59
+ - **Eradicate AI Clichés:** Remove buzzwords ("Elevate", "Seamless", "Unleash", "Next-Gen") and placeholder latin text.
60
+ - **Semantic HTML:** Replace nested div containers with `<nav>`, `<main>`, `<article>`, `<section>`, `<aside>`.
61
+ - **Relative Units:** Use `rem`, `%`, and CSS Grid rather than hardcoded pixel widths.
62
+
63
+ ### 3. Fix Priority
64
+
65
+ 1. **Font Swap:** Biggest instant aesthetic elevation with lowest regression risk.
66
+ 2. **Palette Cleanup:** Eliminate clashing or oversaturated colors.
67
+ 3. **States & Feedback:** Add hover, active, focus, loading, and empty states.
68
+ 4. **Layout & Alignment:** Fix container widths, baseline alignment, and mobile viewport heights.
69
+ 5. **Component Polish:** Replace generic cards and accordion boxes with modern minimal equivalents.
70
+
71
+ ## Code Examples
72
+
73
+ ```tsx
74
+ // [BEFORE] Generic, misaligned card with generic shadow
75
+ <div className="bg-white border rounded shadow p-4">
76
+ <h2>{title}</h2>
77
+ <p>{desc}</p>
78
+ <button className="bg-blue-500 text-white p-2">Click</button>
79
+ </div>
80
+
81
+ // [AFTER] Polished card with optical baseline alignment, tinted surface, and micro-interaction
82
+ <div className="flex flex-col bg-[#FFFFFF] dark:bg-[#121212] border border-black/5 dark:border-white/10 rounded-2xl p-6 hover:shadow-[0_4px_20px_rgba(0,0,0,0.04)] transition-all duration-200">
83
+ <h3 className="font-semibold text-lg tracking-tight text-neutral-900 dark:text-neutral-100 text-balance mb-2">
84
+ {title}
85
+ </h3>
86
+ <p className="text-sm text-neutral-600 dark:text-neutral-400 leading-relaxed text-pretty mb-6">
87
+ {desc}
88
+ </p>
89
+ <button
90
+ type="button"
91
+ className="mt-auto inline-flex items-center justify-center font-medium text-sm px-4 py-2.5 rounded-xl bg-neutral-900 dark:bg-neutral-100 text-white dark:text-black hover:bg-neutral-800 active:scale-[0.98] transition-transform duration-150 focus-visible:ring-2 focus-visible:ring-neutral-400"
92
+ >
93
+ Continue
94
+ </button>
95
+ </div>
96
+ ```
97
+
98
+ ## Validation Checklist
99
+
100
+ - [ ] All headings have `text-wrap: balance` and appropriate negative letter tracking.
101
+ - [ ] No pure black `#000000` backgrounds or oversaturated accent colors (>80% saturation).
102
+ - [ ] All interactive elements include `:hover`, `:active`, and `:focus-visible` styles.
103
+ - [ ] Cards in side-by-side grids align primary CTA buttons along the same bottom baseline.
104
+ - [ ] Viewport containers use `100dvh` instead of `100vh`.
105
+ - [ ] All lists, tables, and feeds have a designed empty state.
106
+
107
+ ## Common Mistakes
108
+
109
+ - Rewriting components from scratch and breaking existing prop contracts or unit tests.
110
+ - Forcing full-width sections without `max-w` constraints on ultra-wide screens.
111
+ - Leaving action buttons at random heights inside differing text content cards.
112
+ - Introducing external UI libraries without checking existing `package.json` dependencies.
113
+
114
+ ## Integration Notes
115
+
116
+ - Complements `impeccable-design` for hard 50-rule QA verification.
117
+ - Works alongside `ui-ux-pro` for token generation and color theory.
118
+