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,70 @@
1
+ ---
2
+ name: testing
3
+ description: Vitest, React Testing Library, and Playwright testing standards. Enforces TDD/BDD, test pyramid, zero brittle mocks, and complete assertion coverage.
4
+ ---
5
+
6
+ # Testing
7
+
8
+ ## Overview
9
+
10
+ Testing strategy across unit, component, integration, and end-to-end testing suites using Vitest, React Testing Library, and Playwright.
11
+
12
+ ## When to Use
13
+
14
+ Activate for any task involving unit tests, integration tests, E2E testing, TDD/BDD workflows, or fixing regression bugs.
15
+
16
+ ## Rules & Patterns
17
+
18
+ ### ️ The ContextOS Testing Pyramid
19
+
20
+ ```
21
+ /\
22
+ /E2E\ 10% — Playwright (Critical user journeys, auth, checkout)
23
+ /-----\
24
+ / Integ \ 20% — API & Component Integration (RTL + MSW / Supertest)
25
+ /---------\
26
+ / Unit \ 70% — Pure functions, Domain Entities, Utils (Vitest)
27
+ /-------------\
28
+ ```
29
+
30
+ ### Negative Constraints (What NOT to Do)
31
+
32
+ 1. **NEVER mock internal implementation details**: Mock ONLY external I/O boundaries (HTTP network requests via MSW, Database via test containers or in-memory DB).
33
+ 2. **NEVER test implementation details**: In React Testing Library, query by user-facing roles (`getByRole`, `getByLabelText`), NEVER by CSS selectors or internal component state.
34
+ 3. **NEVER write assertions without an expected failure mode**: Each test must test a single logical behavior and fail if that behavior breaks.
35
+ 4. **NEVER leave flaky tests or arbitrary sleep (`await delay(1000)`)**: Always use `waitFor()` or explicit event triggers with timeouts.
36
+ 5. **NEVER share mutable state between tests**: Every test must have isolated state via `beforeEach()` setup and clean reset.
37
+
38
+ ### AAA Standard Pattern
39
+
40
+ ```typescript
41
+ describe('Feature / Unit', () => {
42
+ it('should achieve expected outcome when given specific condition', async () => {
43
+ // 1. ARRANGE
44
+ const user = createTestUser({ role: 'admin' });
45
+ // 2. ACT
46
+ const result = await processOrder(user, sampleCart);
47
+ // 3. ASSERT
48
+ expect(result.status).toBe('confirmed');
49
+ });
50
+ });
51
+ ```
52
+
53
+ ## Code Examples
54
+
55
+ See `EXAMPLES.md` for detailed anti-patterns and production testing code.
56
+
57
+ ## Validation Checklist
58
+
59
+ - [ ] Tests follow Arrange-Act-Assert (AAA) structure
60
+ - [ ] No brittle CSS selectors or private state inspections
61
+ - [ ] Mocks isolated strictly to network/IO boundaries (MSW)
62
+ - [ ] Fast execution (< 5s for unit suite) with zero flaky sleeps
63
+
64
+ ## Common Mistakes
65
+
66
+ - Over-mocking modules instead of running real pure logic. See `TROUBLESHOOTING.md`.
67
+
68
+ ## Integration Notes
69
+
70
+ Interacts directly with `engineering-workflow` (Verify phase), `react`, and `typescript`.
@@ -0,0 +1,18 @@
1
+ # Testing Troubleshooting Guide
2
+
3
+ ## Common Issues & Fixes
4
+
5
+ ### 1. `act(...)` warning in React Testing Library
6
+
7
+ - **Cause**: An asynchronous state update triggered after the test completed.
8
+ - **Fix**: Ensure all async operations are awaited using `await waitFor(() => ...)` or `await screen.findByRole(...)`.
9
+
10
+ ### 2. Tests pass in isolation but fail in concurrent test runs
11
+
12
+ - **Cause**: Shared in-memory state or un-reset singleton.
13
+ - **Fix**: Reset all mocks and in-memory databases in `beforeEach(() => vi.clearAllMocks())` and `afterEach(() => cleanup())`.
14
+
15
+ ### 3. Playwright timeout waiting for selector
16
+
17
+ - **Cause**: Element is animating or blocked behind a modal/overlay.
18
+ - **Fix**: Use web-first assertions like `await expect(page.getByRole('button')).toBeVisible()` which automatically retry until timeout.
@@ -0,0 +1,11 @@
1
+ {
2
+ "skill": "testing",
3
+ "version": "1.0.0",
4
+ "checks": [
5
+ "Test pyramid ratio enforced (70% unit/integration)",
6
+ "AAA (Arrange-Act-Assert) pattern implemented",
7
+ "No internal state inspection or brittle selectors",
8
+ "MSW used for network boundaries",
9
+ "Zero shared state between test executions"
10
+ ]
11
+ }
@@ -0,0 +1,26 @@
1
+ name: testing
2
+ description: Vitest, React Testing Library, and Playwright testing standards. Enforces TDD/BDD, test pyramid, zero brittle mocks, and complete assertion coverage.
3
+ version: 1.0.0
4
+ category: engineering
5
+ requires:
6
+ - engineering-workflow
7
+ - typescript
8
+ triggers:
9
+ files:
10
+ - "*.test.ts"
11
+ - "*.test.tsx"
12
+ - "*.test.js"
13
+ - "*.spec.ts"
14
+ - "*.spec.tsx"
15
+ - "vitest.config.*"
16
+ - "playwright.config.*"
17
+ - "jest.config.*"
18
+ keywords:
19
+ - "test"
20
+ - "vitest"
21
+ - "playwright"
22
+ - "unit test"
23
+ - "e2e"
24
+ - "mock"
25
+ - "assert"
26
+ - "coverage"
@@ -0,0 +1,64 @@
1
+ # TypeScript Examples — Anti-patterns vs ContextOS Standard
2
+
3
+ ## Example 1: Type-Safe Parsing with Zod (No `any`)
4
+
5
+ ### Anti-pattern: Anti-pattern (Blind type assertion with `as`)
6
+
7
+ ```typescript
8
+ // BAD: using 'as User' bypasses runtime validation completely
9
+ async function fetchUser(id: string): Promise<User> {
10
+ const res = await fetch(`/api/users/${id}`);
11
+ const data = await res.json();
12
+ return data as User; // Runtime crash if payload changes!
13
+ }
14
+ ```
15
+
16
+ ### Best practice: ContextOS Standard (Runtime schema validation with Zod)
17
+
18
+ ```typescript
19
+ // GOOD: guaranteed runtime and compile-time type safety
20
+ import { z } from 'zod';
21
+
22
+ export const UserSchema = z.object({
23
+ id: z.string().uuid(),
24
+ name: z.string().min(1),
25
+ email: z.string().email(),
26
+ role: z.enum(['admin', 'member', 'guest']),
27
+ createdAt: z.string().datetime(),
28
+ });
29
+
30
+ export type User = z.infer<typeof UserSchema>;
31
+
32
+ export async function fetchUser(id: string): Promise<User> {
33
+ const res = await fetch(`/api/users/${id}`);
34
+ if (!res.ok) throw new Error(`Fetch failed with status ${res.status}`);
35
+ const raw: unknown = await res.json();
36
+ return UserSchema.parse(raw);
37
+ }
38
+ ```
39
+
40
+ ---
41
+
42
+ ## Example 2: Discriminated Unions for State Handling
43
+
44
+ ### Anti-pattern: Anti-pattern (Optional soup with boolean flags)
45
+
46
+ ```typescript
47
+ // BAD: impossible states can be represented (e.g. isLoading: true AND error: 'Failed')
48
+ interface AsyncState<T> {
49
+ data?: T;
50
+ isLoading: boolean;
51
+ error?: string;
52
+ }
53
+ ```
54
+
55
+ ### Best practice: ContextOS Standard (Discriminated Union)
56
+
57
+ ```typescript
58
+ // GOOD: impossible states are impossible at compile-time
59
+ export type AsyncState<T> =
60
+ | { readonly status: 'idle' }
61
+ | { readonly status: 'loading' }
62
+ | { readonly status: 'success'; readonly data: T }
63
+ | { readonly status: 'error'; readonly error: Error };
64
+ ```
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: TypeScript
3
+ description: >
4
+ ContextOS skill for TypeScript
5
+ ---
6
+
7
+ # TypeScript
8
+
9
+ ## Overview
10
+
11
+ Strict TypeScript engineering standard. Enforces noImplicitAny, discriminated unions, branded types, immutability, exhaustive switch checks, and zero unsafe any or as unknown as T casts.
12
+
13
+ ## When to Use
14
+
15
+ Activate on all TypeScript and JavaScript codebases to ensure compile-time type safety, robust domain modeling, and foolproof function contracts.
16
+
17
+ ## Negative Constraints (What NOT to Do)
18
+
19
+ 1. **NEVER use `any`**: Use `unknown` with type guards, discriminated unions, or Zod schemas.
20
+ 2. **NEVER use type assertions (`as Type` or `as unknown as Type`) to bypass safety**: Fix the underlying type signature or use runtime narrowing (`instanceof`, `typeof`, `in`).
21
+ 3. **NEVER use non-null assertions (`foo!.bar`)**: Handle `null` and `undefined` with optional chaining (`?.`) or explicit error guards.
22
+ 4. **NEVER export mutable global arrays or object constants**: Always mark constant objects and arrays with `as const` and `readonly`.
23
+ 5. **NEVER omit explicit return types on exported functions**: Exported public APIs must declare explicit return types to protect consumers.
24
+
25
+ ## Rules & Patterns
26
+
27
+ ## Strict Mode
28
+
29
+ Always use strict TypeScript configuration:
30
+
31
+ ```json
32
+ {
33
+ "compilerOptions": {
34
+ "strict": true,
35
+ "noUncheckedIndexedAccess": true,
36
+ "noImplicitReturns": true,
37
+ "noFallthroughCasesInSwitch": true
38
+ }
39
+ }
40
+ ```
41
+
42
+ ## Types
43
+
44
+ - **Prefer `interface`** for object shapes, `type` for unions/intersections
45
+ - **No `any`** — use `unknown` if type is truly unknown, then narrow
46
+ - **Explicit return types** for exported functions
47
+ - **Const assertions** — `as const` for literal types
48
+
49
+ ```typescript
50
+ // Good
51
+ interface User {
52
+ id: string;
53
+ name: string;
54
+ role: 'admin' | 'user';
55
+ }
56
+
57
+ // Unions
58
+ type Result<T> = { ok: true; data: T } | { ok: false; error: string };
59
+ ```
60
+
61
+ ## Utility Types
62
+
63
+ - `Partial<T>` — all properties optional
64
+ - `Required<T>` — all properties required
65
+ - `Pick<T, K>` — select specific properties
66
+ - `Omit<T, K>` — remove specific properties
67
+ - `Record<K, V>` — key-value map
68
+
69
+ ## Type Guards
70
+
71
+ ```typescript
72
+ function isUser(value: unknown): value is User {
73
+ return typeof value === 'object' && value !== null && 'id' in value;
74
+ }
75
+ ```
76
+
77
+ ## Generic Patterns
78
+
79
+ ```typescript
80
+ // Repository pattern
81
+ interface Repository<T extends { id: string }> {
82
+ findById(id: string): Promise<T | null>;
83
+ create(data: Omit<T, 'id'>): Promise<T>;
84
+ update(id: string, data: Partial<T>): Promise<T>;
85
+ delete(id: string): Promise<void>;
86
+ }
87
+ ```
88
+
89
+ ## Anti-Patterns
90
+
91
+ - [FAIL] `any` — use `unknown` + type guards
92
+ - [FAIL] Type assertions (`as`) — prefer type guards
93
+ - [FAIL] Non-null assertions (`!`) — handle null explicitly
94
+ - [FAIL] Enums — prefer union types or `as const` objects
95
+ - [FAIL] Complex generics without JSDoc — document intent
96
+
97
+
98
+ ## Code Examples
99
+
100
+ See `EXAMPLES.md` for detailed code examples.
101
+
102
+ ## Validation Checklist
103
+
104
+ What to verify during the review phase before completing the task.
105
+
106
+ ## Common Mistakes
107
+
108
+ Anti-patterns and things to explicitly avoid. See `TROUBLESHOOTING.md`.
109
+
110
+ ## Integration Notes
111
+
112
+ How this skill interacts with other skills.
@@ -0,0 +1,19 @@
1
+ # typescript Troubleshooting & Common Mistakes
2
+
3
+ ## 1. Excessive Use of `any` or `as unknown as T`
4
+
5
+ - **Symptom**: Runtime `TypeError: Cannot read properties of undefined` in supposedly typed TypeScript code.
6
+ - **Root Cause**: Bypassing type checking with `any` or forceful type assertions.
7
+ - **Fix**: Use `unknown` with type guards, Zod schemas, or discriminated unions.
8
+
9
+ ## 2. Non-Exhaustive Switch on Unions
10
+
11
+ - **Symptom**: New union member added but some switch statements fail to handle it, producing bugs.
12
+ - **Root Cause**: Missing exhaustive type checking in `default:` case.
13
+ - **Fix**: Add `default: const _exhaustive: never = action; throw new Error(_exhaustive);` to let the compiler catch missing branches.
14
+
15
+ ## 3. Inaccurate Generics Constraints
16
+
17
+ - **Symptom**: Generic functions that lose type inference and resolve to `unknown`.
18
+ - **Root Cause**: Over-specifying generics or missing `extends` constraints.
19
+ - **Fix**: Constrain generics narrowly: `function get<T, K extends keyof T>(obj: T, key: K): T[K]`.
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "rules_followed": {
6
+ "type": "boolean"
7
+ }
8
+ },
9
+ "required": [
10
+ "rules_followed"
11
+ ]
12
+ }
@@ -0,0 +1,10 @@
1
+ id: typescript
2
+ name: TypeScript
3
+ category: frontend
4
+ tags: [frontend, backend, types, static-analysis]
5
+ requires: []
6
+ optional: [zod, prisma]
7
+ conflicts: []
8
+ weight: 9
9
+ documents:
10
+ - typescript.md
@@ -0,0 +1,71 @@
1
+ # TypeScript — Best Practices
2
+
3
+ ## Strict Mode
4
+
5
+ Always use strict TypeScript configuration:
6
+
7
+ ```json
8
+ {
9
+ "compilerOptions": {
10
+ "strict": true,
11
+ "noUncheckedIndexedAccess": true,
12
+ "noImplicitReturns": true,
13
+ "noFallthroughCasesInSwitch": true
14
+ }
15
+ }
16
+ ```
17
+
18
+ ## Types
19
+
20
+ - **Prefer `interface`** for object shapes, `type` for unions/intersections
21
+ - **No `any`** — use `unknown` if type is truly unknown, then narrow
22
+ - **Explicit return types** for exported functions
23
+ - **Const assertions** — `as const` for literal types
24
+
25
+ ```typescript
26
+ // Good
27
+ interface User {
28
+ id: string;
29
+ name: string;
30
+ role: 'admin' | 'user';
31
+ }
32
+
33
+ // Unions
34
+ type Result<T> = { ok: true; data: T } | { ok: false; error: string };
35
+ ```
36
+
37
+ ## Utility Types
38
+
39
+ - `Partial<T>` — all properties optional
40
+ - `Required<T>` — all properties required
41
+ - `Pick<T, K>` — select specific properties
42
+ - `Omit<T, K>` — remove specific properties
43
+ - `Record<K, V>` — key-value map
44
+
45
+ ## Type Guards
46
+
47
+ ```typescript
48
+ function isUser(value: unknown): value is User {
49
+ return typeof value === 'object' && value !== null && 'id' in value;
50
+ }
51
+ ```
52
+
53
+ ## Generic Patterns
54
+
55
+ ```typescript
56
+ // Repository pattern
57
+ interface Repository<T extends { id: string }> {
58
+ findById(id: string): Promise<T | null>;
59
+ create(data: Omit<T, 'id'>): Promise<T>;
60
+ update(id: string, data: Partial<T>): Promise<T>;
61
+ delete(id: string): Promise<void>;
62
+ }
63
+ ```
64
+
65
+ ## Anti-Patterns
66
+
67
+ - [FAIL] `any` — use `unknown` + type guards
68
+ - [FAIL] Type assertions (`as`) — prefer type guards
69
+ - [FAIL] Non-null assertions (`!`) — handle null explicitly
70
+ - [FAIL] Enums — prefer union types or `as const` objects
71
+ - [FAIL] Complex generics without JSDoc — document intent
@@ -0,0 +1,21 @@
1
+ # ui-design Examples — Anti-patterns vs ContextOS Standard
2
+
3
+ ## Example 1: Component Token Consistency
4
+
5
+ ### Anti-pattern: Hardcoded Arbitrary Tailwind Utilities
6
+
7
+ ```tsx
8
+ // BAD: Inconsistent spacing, arbitrary colors, unmaintainable styling
9
+ <div className="p-[13px] bg-[#1a1b2e] rounded-[7px] text-[#99aab5] border border-[#2b2d42]">
10
+ <button className="px-[15px] py-[7px] bg-[#5865f2] hover:bg-[#4752c4]">Action</button>
11
+ </div>
12
+ ```
13
+
14
+ ### Best practice: ContextOS Standard (Semantic Theme Tokens)
15
+
16
+ ```tsx
17
+ // GOOD: Consistent scale utilities driven by Tailwind v4 @theme design tokens
18
+ <div className="p-4 bg-card rounded-lg text-muted-foreground border border-border">
19
+ <Button variant="primary" size="md">Action</Button>
20
+ </div>
21
+ ```
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: UI Design
3
+ description: >
4
+ ContextOS skill for UI Design
5
+ ---
6
+
7
+ # UI Design
8
+
9
+ ## Overview
10
+
11
+ Modern component library and design system engineering. Enforces design token hierarchies (spacing, radii, elevation), accessible component primitives (shadcn/ui, Radix), and responsive layout constraints.
12
+
13
+ ## When to Use
14
+
15
+ Activate when designing design systems, reusable UI component libraries, navigation bars, modals, data tables, and interactive dashboards.
16
+
17
+ ## Rules & Patterns
18
+ <!-- Source: ui.md -->
19
+
20
+ ## UI Design — Best Practices
21
+
22
+ ## Design System Foundations
23
+
24
+ ### Color
25
+
26
+ - **Never use generic colors** — curate a harmonious palette
27
+ - **Always tint** — no pure black (#000), no pure gray. Add a subtle warm or cool tint
28
+ - **Color roles**: primary (action), secondary (accent), neutral (text, borders), semantic (error, success, warning, info)
29
+ - **Dark mode**: design intentionally, not just invert. Surface hierarchy: background < surface < elevated
30
+ - **Contrast**: 4.5:1 minimum for body text, 3:1 for large text
31
+
32
+ ### Typography
33
+
34
+ - **Never use browser defaults** — choose a curated font (Inter, Outfit, Geist, Sora)
35
+ - **Type scale**: use a modular scale (1.25 ratio) — 12, 14, 16, 20, 24, 32, 40, 48
36
+ - **Font weights**: Regular (400), Medium (500), Semibold (600), Bold (700). Don't use all of them — pick 2-3
37
+ - **Line height**: 1.5 for body, 1.2 for headings, 1.6 for long-form text
38
+ - **Max line width**: 65-75 characters for readability
39
+
40
+ ### Spacing
41
+
42
+ - **Use a 4px grid** — all spacing should be multiples of 4
43
+ - **Spacing scale**: 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96
44
+ - **Consistency** — same spacing between similar elements
45
+ - **Whitespace is design** — don't fill every pixel
46
+
47
+ ### Layout
48
+
49
+ - **Grid system**: 12-column grid for desktop, 4-column for mobile
50
+ - **Visual hierarchy**: size, weight, color, spacing, position
51
+ - **F-pattern/Z-pattern** — for content-heavy pages
52
+ - **Group related items** — use proximity and boundaries
53
+
54
+ ## Component Patterns
55
+
56
+ ### Buttons
57
+
58
+ - Clear hierarchy: Primary > Secondary > Ghost/Text
59
+ - Consistent sizing: sm (32px), md (40px), lg (48px)
60
+ - States: default, hover, active, disabled, loading
61
+ - Always accessible: sufficient contrast, focus indicator
62
+
63
+ ### Forms
64
+
65
+ - Labels above inputs (not floating labels for critical forms)
66
+ - Clear error states with inline messages
67
+ - Logical tab order
68
+ - Progressive disclosure — don't show all fields at once
69
+
70
+ ### Cards
71
+
72
+ - Don't nest cards inside cards
73
+ - Clear visual hierarchy within the card
74
+ - Consistent padding and spacing
75
+ - Interactive cards need hover state
76
+
77
+ ### Navigation
78
+
79
+ - Maximum 7±2 items in primary nav
80
+ - Clear active state
81
+ - Mobile: bottom nav or hamburger (not both)
82
+ - Breadcrumbs for deep hierarchies
83
+
84
+ ## Animation Principles
85
+
86
+ - **Purpose**: guide attention, show relationships, provide feedback
87
+ - **Duration**: 150-300ms for micro-interactions, 300-500ms for transitions
88
+ - **Easing**: `ease-out` for entrances, `ease-in` for exits. Never `bounce` or `elastic`
89
+ - **Reduce motion**: respect `prefers-reduced-motion`
90
+
91
+ ## Anti-Patterns (from Impeccable)
92
+
93
+ - [FAIL] Gray text on colored backgrounds — destroys readability
94
+ - [FAIL] Pure black text on white (#000 on #fff) — too harsh, tint the black
95
+ - [FAIL] Cards nested inside cards — visual noise
96
+ - [FAIL] Bounce/elastic easing — feels dated
97
+ - [FAIL] Icon tile above every heading — SaaS template tell
98
+ - [FAIL] Purple-to-blue gradient on everything — overused
99
+ - [FAIL] Using Inter for everything — pick a font that matches your brand
100
+ - [FAIL] Rounded-square icons everywhere — lack of visual variety
101
+
102
+ ## Dark Mode
103
+
104
+ - Surface elevation through subtle lightening (not colored backgrounds)
105
+ - Reduce white contrast — use #E0E0E0, not #FFFFFF
106
+ - Shadows become less visible — use subtle borders or elevation changes
107
+ - Test all states in both modes
108
+
109
+
110
+ ## Code Examples
111
+
112
+ See `EXAMPLES.md` for detailed code examples.
113
+
114
+ ## Validation Checklist
115
+
116
+ What to verify during the review phase before completing the task.
117
+
118
+ ## Common Mistakes
119
+
120
+ Anti-patterns and things to explicitly avoid. See `TROUBLESHOOTING.md`.
121
+
122
+ ## Integration Notes
123
+
124
+ How this skill interacts with other skills.
@@ -0,0 +1,19 @@
1
+ # ui-design Troubleshooting & Common Mistakes
2
+
3
+ ## 1. Z-Index Chaos
4
+
5
+ - **Symptom**: Tooltips rendered underneath dialog overlays, or dropdowns hidden behind sticky headers.
6
+ - **Root Cause**: Ad-hoc hardcoded values (z-50, z-[999], z-[9999]).
7
+ - **Fix**: Use Radix / shadcn Portals for floating elements so they render at root DOM level, or declare strict z-index tokens.
8
+
9
+ ## 2. Inconsistent Component States
10
+
11
+ - **Symptom**: Buttons have hover states but lack focus-visible rings or disabled states.
12
+ - **Root Cause**: Styling only the default and hover states.
13
+ - **Fix**: Standardize state matrices for every interactive element: default, hover, focus-visible, active, disabled, loading.
14
+
15
+ ## 3. Ignoring Empty and Error Component States
16
+
17
+ - **Symptom**: Tables or list views show a blank white box when there are 0 records.
18
+ - **Root Cause**: Developers only design for the "ideal data" case.
19
+ - **Fix**: Every data component must explicitly render designed EmptyState and ErrorState fallbacks.
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "rules_followed": {
6
+ "type": "boolean"
7
+ }
8
+ },
9
+ "required": [
10
+ "rules_followed"
11
+ ]
12
+ }
@@ -0,0 +1,10 @@
1
+ id: ui-design
2
+ name: UI Design
3
+ category: design
4
+ tags: [design, ui, components, design-system, visual]
5
+ requires: []
6
+ optional: [react, tailwind, web-accessibility]
7
+ conflicts: []
8
+ weight: 7
9
+ documents:
10
+ - ui.md