opencode-agent-kit 1.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 (361) hide show
  1. package/README.md +796 -0
  2. package/bin/commands/init.mjs +221 -0
  3. package/bin/init.mjs +21 -0
  4. package/package.json +22 -0
  5. package/template/.opencode/agent-docs/backend/README.md +0 -0
  6. package/template/.opencode/agent-docs/backend/node/BACKEND_PATTERNS.md +82 -0
  7. package/template/.opencode/agent-docs/backend/node/BACKEND_QUICK_START.md +49 -0
  8. package/template/.opencode/agent-docs/frontend/next/README.md +0 -0
  9. package/template/.opencode/agent-docs/frontend/nuxt/API_PATTERNS.md +807 -0
  10. package/template/.opencode/agent-docs/frontend/nuxt/CHEATSHEET.md +676 -0
  11. package/template/.opencode/agent-docs/frontend/nuxt/COMPLETION_REPORT.md +613 -0
  12. package/template/.opencode/agent-docs/frontend/nuxt/EXAMPLES.md +956 -0
  13. package/template/.opencode/agent-docs/frontend/nuxt/INDEX.md +596 -0
  14. package/template/.opencode/agent-docs/frontend/nuxt/MCP_GUIDE.md +881 -0
  15. package/template/.opencode/agent-docs/frontend/nuxt/MENTOR_CURRICULUM_30_DAYS.md +256 -0
  16. package/template/.opencode/agent-docs/frontend/nuxt/MENTOR_CURRICULUM_CHECKLIST.md +156 -0
  17. package/template/.opencode/agent-docs/frontend/nuxt/MENTOR_WEEKLY_ASSIGNMENTS.md +191 -0
  18. package/template/.opencode/agent-docs/frontend/nuxt/QUICK_START.md +509 -0
  19. package/template/.opencode/agent-docs/frontend/nuxt/README.md +506 -0
  20. package/template/.opencode/agent-docs/frontend/nuxt/README_AGENTS.md +140 -0
  21. package/template/.opencode/agent-docs/frontend/nuxt/README_DOCS.md +65 -0
  22. package/template/.opencode/agent-docs/frontend/nuxt/SUMMARY.md +474 -0
  23. package/template/.opencode/agent-docs/frontend/nuxt/TEAM_OPERATING_GUIDE.md +54 -0
  24. package/template/.opencode/agent-docs/frontend/nuxt/TESTING_GUIDE.md +904 -0
  25. package/template/.opencode/agent-docs/frontend/nuxt/WORKFLOWS.md +758 -0
  26. package/template/.opencode/agent-docs/frontend/react/API_PATTERNS.md +187 -0
  27. package/template/.opencode/agent-docs/frontend/react/CHEATSHEET.md +87 -0
  28. package/template/.opencode/agent-docs/frontend/react/INDEX.md +45 -0
  29. package/template/.opencode/agent-docs/frontend/react/QUICK_START.md +43 -0
  30. package/template/.opencode/agent-docs/frontend/react/README.md +159 -0
  31. package/template/.opencode/agent-docs/frontend/vue/README.md +0 -0
  32. package/template/.opencode/agent-docs/mobile/android/README.md +45 -0
  33. package/template/.opencode/agent-docs/mobile/flutter/README.md +44 -0
  34. package/template/.opencode/agents/android-developer.md +418 -0
  35. package/template/.opencode/agents/code-igniter-3-fullstack.md +345 -0
  36. package/template/.opencode/agents/code-reviewer.md +517 -0
  37. package/template/.opencode/agents/database-specialist.md +455 -0
  38. package/template/.opencode/agents/devops-specialist.md +562 -0
  39. package/template/.opencode/agents/flutter-developer.md +556 -0
  40. package/template/.opencode/agents/it-leader.md +911 -0
  41. package/template/.opencode/agents/laravel-advanced.md +691 -0
  42. package/template/.opencode/agents/node-backend-developer.md +343 -0
  43. package/template/.opencode/agents/nuxt-frontend-developer-mentor.md +402 -0
  44. package/template/.opencode/agents/nuxt-frontend-developer.md +1573 -0
  45. package/template/.opencode/agents/react-frontend-developer.md +1017 -0
  46. package/template/.opencode/agents/seo-specialist.md +681 -0
  47. package/template/.opencode/agents/ui-ux-designer.md +783 -0
  48. package/template/.opencode/commands/android-build/command.md +25 -0
  49. package/template/.opencode/commands/android-test/command.md +23 -0
  50. package/template/.opencode/commands/build-fix.md +29 -0
  51. package/template/.opencode/commands/checkpoint.md +74 -0
  52. package/template/.opencode/commands/code-review.md +40 -0
  53. package/template/.opencode/commands/e2e.md +363 -0
  54. package/template/.opencode/commands/eval.md +120 -0
  55. package/template/.opencode/commands/evolve.md +193 -0
  56. package/template/.opencode/commands/flutter-build/command.md +25 -0
  57. package/template/.opencode/commands/flutter-test/command.md +24 -0
  58. package/template/.opencode/commands/go-build.md +183 -0
  59. package/template/.opencode/commands/go-review.md +148 -0
  60. package/template/.opencode/commands/go-test.md +268 -0
  61. package/template/.opencode/commands/gpc-release/command.md +30 -0
  62. package/template/.opencode/commands/instinct-export.md +91 -0
  63. package/template/.opencode/commands/instinct-import.md +142 -0
  64. package/template/.opencode/commands/instinct-status.md +86 -0
  65. package/template/.opencode/commands/learn.md +70 -0
  66. package/template/.opencode/commands/multi-backend.md +158 -0
  67. package/template/.opencode/commands/multi-execute.md +310 -0
  68. package/template/.opencode/commands/multi-frontend.md +158 -0
  69. package/template/.opencode/commands/multi-plan.md +261 -0
  70. package/template/.opencode/commands/multi-workflow.md +183 -0
  71. package/template/.opencode/commands/orchestrate.md +172 -0
  72. package/template/.opencode/commands/plan.md +113 -0
  73. package/template/.opencode/commands/pm2.md +271 -0
  74. package/template/.opencode/commands/python-review.md +297 -0
  75. package/template/.opencode/commands/refactor-clean.md +28 -0
  76. package/template/.opencode/commands/sessions.md +305 -0
  77. package/template/.opencode/commands/setup-pm.md +80 -0
  78. package/template/.opencode/commands/skill-create.md +174 -0
  79. package/template/.opencode/commands/tdd.md +326 -0
  80. package/template/.opencode/commands/test-coverage.md +27 -0
  81. package/template/.opencode/commands/update-codemaps.md +17 -0
  82. package/template/.opencode/commands/update-docs.md +31 -0
  83. package/template/.opencode/commands/verify.md +59 -0
  84. package/template/.opencode/config.example.json +309 -0
  85. package/template/.opencode/config.json +341 -0
  86. package/template/.opencode/contexts/dev.md +20 -0
  87. package/template/.opencode/contexts/research.md +26 -0
  88. package/template/.opencode/contexts/review.md +22 -0
  89. package/template/.opencode/hooks/hooks.json +169 -0
  90. package/template/.opencode/instructions/INSTRUCTIONS.md +388 -0
  91. package/template/.opencode/package.json +5 -0
  92. package/template/.opencode/rules/README.md +82 -0
  93. package/template/.opencode/rules/android/gradle.md +62 -0
  94. package/template/.opencode/rules/android/testing.md +27 -0
  95. package/template/.opencode/rules/common/agents.md +49 -0
  96. package/template/.opencode/rules/common/coding-style.md +48 -0
  97. package/template/.opencode/rules/common/git-workflow.md +45 -0
  98. package/template/.opencode/rules/common/hooks.md +30 -0
  99. package/template/.opencode/rules/common/patterns.md +31 -0
  100. package/template/.opencode/rules/common/performance.md +55 -0
  101. package/template/.opencode/rules/common/security.md +29 -0
  102. package/template/.opencode/rules/common/testing.md +29 -0
  103. package/template/.opencode/rules/flutter/state-management.md +57 -0
  104. package/template/.opencode/rules/flutter/testing.md +42 -0
  105. package/template/.opencode/rules/golang/coding-style.md +26 -0
  106. package/template/.opencode/rules/golang/hooks.md +11 -0
  107. package/template/.opencode/rules/golang/patterns.md +39 -0
  108. package/template/.opencode/rules/golang/security.md +28 -0
  109. package/template/.opencode/rules/golang/testing.md +25 -0
  110. package/template/.opencode/rules/mobile/performance.md +36 -0
  111. package/template/.opencode/rules/python/coding-style.md +37 -0
  112. package/template/.opencode/rules/python/hooks.md +14 -0
  113. package/template/.opencode/rules/python/patterns.md +34 -0
  114. package/template/.opencode/rules/python/security.md +25 -0
  115. package/template/.opencode/rules/python/testing.md +33 -0
  116. package/template/.opencode/rules/typescript/coding-style.md +58 -0
  117. package/template/.opencode/rules/typescript/hooks.md +15 -0
  118. package/template/.opencode/rules/typescript/patterns.md +45 -0
  119. package/template/.opencode/rules/typescript/security.md +21 -0
  120. package/template/.opencode/rules/typescript/testing.md +11 -0
  121. package/template/.opencode/skills/api-documentation/SKILL.md +188 -0
  122. package/template/.opencode/skills/backend-patterns/SKILL.md +587 -0
  123. package/template/.opencode/skills/building-components/SKILL.md +37 -0
  124. package/template/.opencode/skills/building-components/references/accessibility.mdx +819 -0
  125. package/template/.opencode/skills/building-components/references/as-child.mdx +324 -0
  126. package/template/.opencode/skills/building-components/references/composition.mdx +239 -0
  127. package/template/.opencode/skills/building-components/references/data-attributes.mdx +413 -0
  128. package/template/.opencode/skills/building-components/references/definitions.mdx +258 -0
  129. package/template/.opencode/skills/building-components/references/design-tokens.mdx +57 -0
  130. package/template/.opencode/skills/building-components/references/docs.mdx +155 -0
  131. package/template/.opencode/skills/building-components/references/marketplaces.mdx +144 -0
  132. package/template/.opencode/skills/building-components/references/npm.mdx +166 -0
  133. package/template/.opencode/skills/building-components/references/polymorphism.mdx +583 -0
  134. package/template/.opencode/skills/building-components/references/principles.mdx +61 -0
  135. package/template/.opencode/skills/building-components/references/registry.mdx +169 -0
  136. package/template/.opencode/skills/building-components/references/state.mdx +99 -0
  137. package/template/.opencode/skills/building-components/references/styling.mdx +286 -0
  138. package/template/.opencode/skills/building-components/references/types.mdx +191 -0
  139. package/template/.opencode/skills/clickhouse-io/SKILL.md +429 -0
  140. package/template/.opencode/skills/coding-standards/SKILL.md +520 -0
  141. package/template/.opencode/skills/configure-ecc/SKILL.md +298 -0
  142. package/template/.opencode/skills/continuous-learning/SKILL.md +110 -0
  143. package/template/.opencode/skills/continuous-learning/config.json +18 -0
  144. package/template/.opencode/skills/continuous-learning/evaluate-session.sh +60 -0
  145. package/template/.opencode/skills/continuous-learning-v2/SKILL.md +284 -0
  146. package/template/.opencode/skills/continuous-learning-v2/agents/observer.md +137 -0
  147. package/template/.opencode/skills/continuous-learning-v2/agents/start-observer.sh +134 -0
  148. package/template/.opencode/skills/continuous-learning-v2/config.json +41 -0
  149. package/template/.opencode/skills/continuous-learning-v2/hooks/observe.sh +153 -0
  150. package/template/.opencode/skills/continuous-learning-v2/scripts/instinct-cli.py +489 -0
  151. package/template/.opencode/skills/continuous-learning-v2/scripts/test_parse_instinct.py +82 -0
  152. package/template/.opencode/skills/dart-add-unit-test/SKILL.md +122 -0
  153. package/template/.opencode/skills/dart-build-cli-app/SKILL.md +185 -0
  154. package/template/.opencode/skills/dart-collect-coverage/SKILL.md +141 -0
  155. package/template/.opencode/skills/dart-fix-runtime-errors/SKILL.md +166 -0
  156. package/template/.opencode/skills/dart-generate-test-mocks/SKILL.md +155 -0
  157. package/template/.opencode/skills/dart-migrate-to-checks-package/SKILL.md +126 -0
  158. package/template/.opencode/skills/dart-resolve-package-conflicts/SKILL.md +116 -0
  159. package/template/.opencode/skills/dart-run-static-analysis/SKILL.md +104 -0
  160. package/template/.opencode/skills/dart-use-pattern-matching/SKILL.md +146 -0
  161. package/template/.opencode/skills/django-patterns/SKILL.md +733 -0
  162. package/template/.opencode/skills/django-security/SKILL.md +592 -0
  163. package/template/.opencode/skills/django-tdd/SKILL.md +728 -0
  164. package/template/.opencode/skills/django-verification/SKILL.md +460 -0
  165. package/template/.opencode/skills/eval-harness/SKILL.md +227 -0
  166. package/template/.opencode/skills/firebase-basics/SKILL.md +103 -0
  167. package/template/.opencode/skills/firebase-basics/references/additional-skills.md +113 -0
  168. package/template/.opencode/skills/firebase-basics/references/cli-usage.md +31 -0
  169. package/template/.opencode/skills/firebase-basics/references/client-library-usage.md +45 -0
  170. package/template/.opencode/skills/firebase-basics/references/core-concepts.md +61 -0
  171. package/template/.opencode/skills/firebase-basics/references/iac-usage.md +40 -0
  172. package/template/.opencode/skills/firebase-basics/references/iam-security.md +74 -0
  173. package/template/.opencode/skills/firebase-basics/references/mcp-usage.md +63 -0
  174. package/template/.opencode/skills/flutter/SKILL.md +292 -0
  175. package/template/.opencode/skills/flutter-add-integration-test/SKILL.md +163 -0
  176. package/template/.opencode/skills/flutter-add-widget-preview/SKILL.md +145 -0
  177. package/template/.opencode/skills/flutter-add-widget-test/SKILL.md +154 -0
  178. package/template/.opencode/skills/flutter-apply-architecture-best-practices/SKILL.md +162 -0
  179. package/template/.opencode/skills/flutter-build-responsive-layout/SKILL.md +139 -0
  180. package/template/.opencode/skills/flutter-fix-layout-issues/SKILL.md +130 -0
  181. package/template/.opencode/skills/flutter-implement-json-serialization/SKILL.md +153 -0
  182. package/template/.opencode/skills/flutter-setup-declarative-routing/SKILL.md +255 -0
  183. package/template/.opencode/skills/flutter-setup-localization/SKILL.md +210 -0
  184. package/template/.opencode/skills/flutter-use-http-package/SKILL.md +174 -0
  185. package/template/.opencode/skills/frontend-design/SKILL.md +89 -0
  186. package/template/.opencode/skills/frontend-patterns/SKILL.md +631 -0
  187. package/template/.opencode/skills/golang-patterns/SKILL.md +673 -0
  188. package/template/.opencode/skills/golang-testing/SKILL.md +719 -0
  189. package/template/.opencode/skills/impeccable/SKILL.md +165 -0
  190. package/template/.opencode/skills/impeccable/agents/impeccable-asset-producer.md +101 -0
  191. package/template/.opencode/skills/impeccable/reference/adapt.md +190 -0
  192. package/template/.opencode/skills/impeccable/reference/animate.md +175 -0
  193. package/template/.opencode/skills/impeccable/reference/audit.md +133 -0
  194. package/template/.opencode/skills/impeccable/reference/bolder.md +113 -0
  195. package/template/.opencode/skills/impeccable/reference/brand.md +118 -0
  196. package/template/.opencode/skills/impeccable/reference/clarify.md +174 -0
  197. package/template/.opencode/skills/impeccable/reference/codex.md +105 -0
  198. package/template/.opencode/skills/impeccable/reference/cognitive-load.md +106 -0
  199. package/template/.opencode/skills/impeccable/reference/color-and-contrast.md +105 -0
  200. package/template/.opencode/skills/impeccable/reference/colorize.md +154 -0
  201. package/template/.opencode/skills/impeccable/reference/craft.md +123 -0
  202. package/template/.opencode/skills/impeccable/reference/critique.md +273 -0
  203. package/template/.opencode/skills/impeccable/reference/delight.md +302 -0
  204. package/template/.opencode/skills/impeccable/reference/distill.md +111 -0
  205. package/template/.opencode/skills/impeccable/reference/document.md +427 -0
  206. package/template/.opencode/skills/impeccable/reference/extract.md +69 -0
  207. package/template/.opencode/skills/impeccable/reference/harden.md +347 -0
  208. package/template/.opencode/skills/impeccable/reference/heuristics-scoring.md +234 -0
  209. package/template/.opencode/skills/impeccable/reference/interaction-design.md +195 -0
  210. package/template/.opencode/skills/impeccable/reference/layout.md +141 -0
  211. package/template/.opencode/skills/impeccable/reference/live.md +622 -0
  212. package/template/.opencode/skills/impeccable/reference/motion-design.md +109 -0
  213. package/template/.opencode/skills/impeccable/reference/onboard.md +234 -0
  214. package/template/.opencode/skills/impeccable/reference/optimize.md +258 -0
  215. package/template/.opencode/skills/impeccable/reference/overdrive.md +130 -0
  216. package/template/.opencode/skills/impeccable/reference/personas.md +179 -0
  217. package/template/.opencode/skills/impeccable/reference/polish.md +242 -0
  218. package/template/.opencode/skills/impeccable/reference/product.md +62 -0
  219. package/template/.opencode/skills/impeccable/reference/quieter.md +99 -0
  220. package/template/.opencode/skills/impeccable/reference/responsive-design.md +114 -0
  221. package/template/.opencode/skills/impeccable/reference/shape.md +165 -0
  222. package/template/.opencode/skills/impeccable/reference/spatial-design.md +100 -0
  223. package/template/.opencode/skills/impeccable/reference/teach.md +156 -0
  224. package/template/.opencode/skills/impeccable/reference/typeset.md +124 -0
  225. package/template/.opencode/skills/impeccable/reference/typography.md +159 -0
  226. package/template/.opencode/skills/impeccable/reference/ux-writing.md +107 -0
  227. package/template/.opencode/skills/impeccable/scripts/cleanup-deprecated.mjs +284 -0
  228. package/template/.opencode/skills/impeccable/scripts/command-metadata.json +94 -0
  229. package/template/.opencode/skills/impeccable/scripts/critique-storage.mjs +242 -0
  230. package/template/.opencode/skills/impeccable/scripts/design-parser.mjs +820 -0
  231. package/template/.opencode/skills/impeccable/scripts/detect-csp.mjs +198 -0
  232. package/template/.opencode/skills/impeccable/scripts/detect.mjs +21 -0
  233. package/template/.opencode/skills/impeccable/scripts/impeccable-paths.mjs +110 -0
  234. package/template/.opencode/skills/impeccable/scripts/is-generated.mjs +69 -0
  235. package/template/.opencode/skills/impeccable/scripts/live-accept.mjs +595 -0
  236. package/template/.opencode/skills/impeccable/scripts/live-browser-session.js +123 -0
  237. package/template/.opencode/skills/impeccable/scripts/live-browser.js +4860 -0
  238. package/template/.opencode/skills/impeccable/scripts/live-complete.mjs +75 -0
  239. package/template/.opencode/skills/impeccable/scripts/live-completion.mjs +18 -0
  240. package/template/.opencode/skills/impeccable/scripts/live-inject.mjs +446 -0
  241. package/template/.opencode/skills/impeccable/scripts/live-poll.mjs +200 -0
  242. package/template/.opencode/skills/impeccable/scripts/live-resume.mjs +48 -0
  243. package/template/.opencode/skills/impeccable/scripts/live-server.mjs +838 -0
  244. package/template/.opencode/skills/impeccable/scripts/live-session-store.mjs +254 -0
  245. package/template/.opencode/skills/impeccable/scripts/live-status.mjs +47 -0
  246. package/template/.opencode/skills/impeccable/scripts/live-wrap.mjs +632 -0
  247. package/template/.opencode/skills/impeccable/scripts/live.mjs +247 -0
  248. package/template/.opencode/skills/impeccable/scripts/load-context.mjs +141 -0
  249. package/template/.opencode/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
  250. package/template/.opencode/skills/impeccable/scripts/pin.mjs +214 -0
  251. package/template/.opencode/skills/iterative-retrieval/SKILL.md +202 -0
  252. package/template/.opencode/skills/java-coding-standards/SKILL.md +138 -0
  253. package/template/.opencode/skills/jetpack-compose/.skillfish.json +10 -0
  254. package/template/.opencode/skills/jetpack-compose/SKILL.md +420 -0
  255. package/template/.opencode/skills/jpa-patterns/SKILL.md +141 -0
  256. package/template/.opencode/skills/nutrient-document-processing/SKILL.md +165 -0
  257. package/template/.opencode/skills/nuxt-ui/SKILL.md +334 -0
  258. package/template/.opencode/skills/nuxt-ui/references/components.md +377 -0
  259. package/template/.opencode/skills/nuxt-ui/references/composables.md +127 -0
  260. package/template/.opencode/skills/nuxt-ui/references/layouts/chat.md +266 -0
  261. package/template/.opencode/skills/nuxt-ui/references/layouts/dashboard.md +220 -0
  262. package/template/.opencode/skills/nuxt-ui/references/layouts/docs.md +141 -0
  263. package/template/.opencode/skills/nuxt-ui/references/layouts/editor.md +168 -0
  264. package/template/.opencode/skills/nuxt-ui/references/layouts/page.md +260 -0
  265. package/template/.opencode/skills/nuxt-ui/references/theming.md +427 -0
  266. package/template/.opencode/skills/postgres-patterns/SKILL.md +146 -0
  267. package/template/.opencode/skills/project-guidelines-example/SKILL.md +345 -0
  268. package/template/.opencode/skills/python-patterns/SKILL.md +749 -0
  269. package/template/.opencode/skills/python-testing/SKILL.md +815 -0
  270. package/template/.opencode/skills/security-review/SKILL.md +494 -0
  271. package/template/.opencode/skills/security-review/cloud-infrastructure-security.md +361 -0
  272. package/template/.opencode/skills/shadcn-ui/README.md +248 -0
  273. package/template/.opencode/skills/shadcn-ui/SKILL.md +326 -0
  274. package/template/.opencode/skills/shadcn-ui/examples/auth-layout.tsx +177 -0
  275. package/template/.opencode/skills/shadcn-ui/examples/data-table.tsx +313 -0
  276. package/template/.opencode/skills/shadcn-ui/examples/form-pattern.tsx +177 -0
  277. package/template/.opencode/skills/shadcn-ui/resources/component-catalog.md +481 -0
  278. package/template/.opencode/skills/shadcn-ui/resources/customization-guide.md +516 -0
  279. package/template/.opencode/skills/shadcn-ui/resources/migration-guide.md +463 -0
  280. package/template/.opencode/skills/shadcn-ui/resources/setup-guide.md +412 -0
  281. package/template/.opencode/skills/shadcn-ui/scripts/verify-setup.sh +134 -0
  282. package/template/.opencode/skills/springboot-patterns/SKILL.md +304 -0
  283. package/template/.opencode/skills/springboot-security/SKILL.md +119 -0
  284. package/template/.opencode/skills/springboot-tdd/SKILL.md +157 -0
  285. package/template/.opencode/skills/springboot-verification/SKILL.md +100 -0
  286. package/template/.opencode/skills/strategic-compact/SKILL.md +63 -0
  287. package/template/.opencode/skills/strategic-compact/suggest-compact.sh +52 -0
  288. package/template/.opencode/skills/tdd-workflow/SKILL.md +409 -0
  289. package/template/.opencode/skills/vercel-composition-patterns/AGENTS.md +946 -0
  290. package/template/.opencode/skills/vercel-composition-patterns/SKILL.md +89 -0
  291. package/template/.opencode/skills/vercel-composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
  292. package/template/.opencode/skills/vercel-composition-patterns/rules/architecture-compound-components.md +112 -0
  293. package/template/.opencode/skills/vercel-composition-patterns/rules/patterns-children-over-render-props.md +87 -0
  294. package/template/.opencode/skills/vercel-composition-patterns/rules/patterns-explicit-variants.md +100 -0
  295. package/template/.opencode/skills/vercel-composition-patterns/rules/react19-no-forwardref.md +42 -0
  296. package/template/.opencode/skills/vercel-composition-patterns/rules/state-context-interface.md +191 -0
  297. package/template/.opencode/skills/vercel-composition-patterns/rules/state-decouple-implementation.md +113 -0
  298. package/template/.opencode/skills/vercel-composition-patterns/rules/state-lift-state.md +125 -0
  299. package/template/.opencode/skills/vercel-react-best-practices/AGENTS.md +2934 -0
  300. package/template/.opencode/skills/vercel-react-best-practices/SKILL.md +136 -0
  301. package/template/.opencode/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  302. package/template/.opencode/skills/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
  303. package/template/.opencode/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
  304. package/template/.opencode/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
  305. package/template/.opencode/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
  306. package/template/.opencode/skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
  307. package/template/.opencode/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
  308. package/template/.opencode/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
  309. package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
  310. package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
  311. package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
  312. package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  313. package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
  314. package/template/.opencode/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
  315. package/template/.opencode/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
  316. package/template/.opencode/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
  317. package/template/.opencode/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
  318. package/template/.opencode/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
  319. package/template/.opencode/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
  320. package/template/.opencode/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
  321. package/template/.opencode/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
  322. package/template/.opencode/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
  323. package/template/.opencode/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
  324. package/template/.opencode/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
  325. package/template/.opencode/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
  326. package/template/.opencode/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
  327. package/template/.opencode/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
  328. package/template/.opencode/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
  329. package/template/.opencode/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
  330. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
  331. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  332. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
  333. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
  334. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  335. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  336. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
  337. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
  338. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  339. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
  340. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
  341. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  342. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
  343. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
  344. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  345. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  346. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
  347. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  348. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  349. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
  350. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  351. package/template/.opencode/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
  352. package/template/.opencode/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
  353. package/template/.opencode/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
  354. package/template/.opencode/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
  355. package/template/.opencode/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
  356. package/template/.opencode/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
  357. package/template/.opencode/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
  358. package/template/.opencode/skills/verification-loop/SKILL.md +120 -0
  359. package/template/.opencode/skills/web-design-guidelines/SKILL.md +39 -0
  360. package/template/AGENTS.md +32 -0
  361. package/template/opencode.json +354 -0
@@ -0,0 +1,25 @@
1
+ # Android Build Command
2
+
3
+ Build and install an Android app.
4
+
5
+ ## Usage
6
+ ```
7
+ /android-build [variant=debug]
8
+ ```
9
+
10
+ ## Behavior
11
+ 1. Detects Gradle wrapper (`./gradlew`) or system Gradle
12
+ 2. Runs `./gradlew assemble{Variant}` with version catalog
13
+ 3. Reports build status and APK/AAB path
14
+ 4. On success, suggests install command
15
+
16
+ ## Variants
17
+ - `debug` — Default, builds unsigned debug APK
18
+ - `release` — Builds signed release app bundle
19
+ - `bundle` — Builds Android App Bundle (AAB)
20
+ - `profile` — Builds profile variant for performance testing
21
+
22
+ ## Verification
23
+ - Check Gradle daemon health
24
+ - Verify compileSdk/targetSdk alignment
25
+ - Validate version catalog consistency
@@ -0,0 +1,23 @@
1
+ # Android Test Command
2
+
3
+ Run Android tests with coverage.
4
+
5
+ ## Usage
6
+ ```
7
+ /android-test [type=all]
8
+ ```
9
+
10
+ ## Test Types
11
+ - `unit` — Run `./gradlew test` (JVM unit tests)
12
+ - `instrumented` — Run `./gradlew connectedAndroidTest` (device/emulator required)
13
+ - `all` — Run both unit + instrumented tests
14
+
15
+ ## Coverage
16
+ - Unit test coverage via JaCoCo
17
+ - Min coverage target: 80%
18
+ - Generate HTML report at `app/build/reports/`
19
+
20
+ ## Verification
21
+ - All tests pass (green)
22
+ - No flaky tests
23
+ - Edge states covered (loading, error, empty)
@@ -0,0 +1,29 @@
1
+ # Build and Fix
2
+
3
+ Incrementally fix TypeScript and build errors:
4
+
5
+ 1. Run build: npm run build or pnpm build
6
+
7
+ 2. Parse error output:
8
+ - Group by file
9
+ - Sort by severity
10
+
11
+ 3. For each error:
12
+ - Show error context (5 lines before/after)
13
+ - Explain the issue
14
+ - Propose fix
15
+ - Apply fix
16
+ - Re-run build
17
+ - Verify error resolved
18
+
19
+ 4. Stop if:
20
+ - Fix introduces new errors
21
+ - Same error persists after 3 attempts
22
+ - User requests pause
23
+
24
+ 5. Show summary:
25
+ - Errors fixed
26
+ - Errors remaining
27
+ - New errors introduced
28
+
29
+ Fix one error at a time for safety!
@@ -0,0 +1,74 @@
1
+ # Checkpoint Command
2
+
3
+ Create or verify a checkpoint in your workflow.
4
+
5
+ ## Usage
6
+
7
+ `/checkpoint [create|verify|list] [name]`
8
+
9
+ ## Create Checkpoint
10
+
11
+ When creating a checkpoint:
12
+
13
+ 1. Run `/verify quick` to ensure current state is clean
14
+ 2. Create a git stash or commit with checkpoint name
15
+ 3. Log checkpoint to `.claude/checkpoints.log`:
16
+
17
+ ```bash
18
+ echo "$(date +%Y-%m-%d-%H:%M) | $CHECKPOINT_NAME | $(git rev-parse --short HEAD)" >> .claude/checkpoints.log
19
+ ```
20
+
21
+ 4. Report checkpoint created
22
+
23
+ ## Verify Checkpoint
24
+
25
+ When verifying against a checkpoint:
26
+
27
+ 1. Read checkpoint from log
28
+ 2. Compare current state to checkpoint:
29
+ - Files added since checkpoint
30
+ - Files modified since checkpoint
31
+ - Test pass rate now vs then
32
+ - Coverage now vs then
33
+
34
+ 3. Report:
35
+ ```
36
+ CHECKPOINT COMPARISON: $NAME
37
+ ============================
38
+ Files changed: X
39
+ Tests: +Y passed / -Z failed
40
+ Coverage: +X% / -Y%
41
+ Build: [PASS/FAIL]
42
+ ```
43
+
44
+ ## List Checkpoints
45
+
46
+ Show all checkpoints with:
47
+ - Name
48
+ - Timestamp
49
+ - Git SHA
50
+ - Status (current, behind, ahead)
51
+
52
+ ## Workflow
53
+
54
+ Typical checkpoint flow:
55
+
56
+ ```
57
+ [Start] --> /checkpoint create "feature-start"
58
+ |
59
+ [Implement] --> /checkpoint create "core-done"
60
+ |
61
+ [Test] --> /checkpoint verify "core-done"
62
+ |
63
+ [Refactor] --> /checkpoint create "refactor-done"
64
+ |
65
+ [PR] --> /checkpoint verify "feature-start"
66
+ ```
67
+
68
+ ## Arguments
69
+
70
+ $ARGUMENTS:
71
+ - `create <name>` - Create named checkpoint
72
+ - `verify <name>` - Verify against named checkpoint
73
+ - `list` - Show all checkpoints
74
+ - `clear` - Remove old checkpoints (keeps last 5)
@@ -0,0 +1,40 @@
1
+ # Code Review
2
+
3
+ Comprehensive security and quality review of uncommitted changes:
4
+
5
+ 1. Get changed files: git diff --name-only HEAD
6
+
7
+ 2. For each changed file, check for:
8
+
9
+ **Security Issues (CRITICAL):**
10
+ - Hardcoded credentials, API keys, tokens
11
+ - SQL injection vulnerabilities
12
+ - XSS vulnerabilities
13
+ - Missing input validation
14
+ - Insecure dependencies
15
+ - Path traversal risks
16
+
17
+ **Code Quality (HIGH):**
18
+ - Functions > 50 lines
19
+ - Files > 800 lines
20
+ - Nesting depth > 4 levels
21
+ - Missing error handling
22
+ - console.log statements
23
+ - TODO/FIXME comments
24
+ - Missing JSDoc for public APIs
25
+
26
+ **Best Practices (MEDIUM):**
27
+ - Mutation patterns (use immutable instead)
28
+ - Emoji usage in code/comments
29
+ - Missing tests for new code
30
+ - Accessibility issues (a11y)
31
+
32
+ 3. Generate report with:
33
+ - Severity: CRITICAL, HIGH, MEDIUM, LOW
34
+ - File location and line numbers
35
+ - Issue description
36
+ - Suggested fix
37
+
38
+ 4. Block commit if CRITICAL or HIGH issues found
39
+
40
+ Never approve code with security vulnerabilities!
@@ -0,0 +1,363 @@
1
+ ---
2
+ description: Generate and run end-to-end tests with Playwright. Creates test journeys, runs tests, captures screenshots/videos/traces, and uploads artifacts.
3
+ ---
4
+
5
+ # E2E Command
6
+
7
+ This command invokes the **e2e-runner** agent to generate, maintain, and execute end-to-end tests using Playwright.
8
+
9
+ ## What This Command Does
10
+
11
+ 1. **Generate Test Journeys** - Create Playwright tests for user flows
12
+ 2. **Run E2E Tests** - Execute tests across browsers
13
+ 3. **Capture Artifacts** - Screenshots, videos, traces on failures
14
+ 4. **Upload Results** - HTML reports and JUnit XML
15
+ 5. **Identify Flaky Tests** - Quarantine unstable tests
16
+
17
+ ## When to Use
18
+
19
+ Use `/e2e` when:
20
+ - Testing critical user journeys (login, trading, payments)
21
+ - Verifying multi-step flows work end-to-end
22
+ - Testing UI interactions and navigation
23
+ - Validating integration between frontend and backend
24
+ - Preparing for production deployment
25
+
26
+ ## How It Works
27
+
28
+ The e2e-runner agent will:
29
+
30
+ 1. **Analyze user flow** and identify test scenarios
31
+ 2. **Generate Playwright test** using Page Object Model pattern
32
+ 3. **Run tests** across multiple browsers (Chrome, Firefox, Safari)
33
+ 4. **Capture failures** with screenshots, videos, and traces
34
+ 5. **Generate report** with results and artifacts
35
+ 6. **Identify flaky tests** and recommend fixes
36
+
37
+ ## Example Usage
38
+
39
+ ```
40
+ User: /e2e Test the market search and view flow
41
+
42
+ Agent (e2e-runner):
43
+ # E2E Test Generation: Market Search and View Flow
44
+
45
+ ## Test Scenario Identified
46
+
47
+ **User Journey:** Market Search → View Results → Click Market → View Details
48
+
49
+ **Test Coverage:**
50
+ 1. Navigate to markets page
51
+ 2. Perform semantic search
52
+ 3. Verify search results
53
+ 4. Click on first result
54
+ 5. Verify market details page loads
55
+ 6. Verify chart renders
56
+
57
+ ## Generated Test Code
58
+
59
+ ```typescript
60
+ // tests/e2e/markets/search-and-view.spec.ts
61
+ import { test, expect } from '@playwright/test'
62
+ import { MarketsPage } from '../../pages/MarketsPage'
63
+ import { MarketDetailsPage } from '../../pages/MarketDetailsPage'
64
+
65
+ test.describe('Market Search and View Flow', () => {
66
+ test('user can search markets and view details', async ({ page }) => {
67
+ // 1. Navigate to markets page
68
+ const marketsPage = new MarketsPage(page)
69
+ await marketsPage.goto()
70
+
71
+ // Verify page loaded
72
+ await expect(page).toHaveTitle(/Markets/)
73
+ await expect(page.locator('h1')).toContainText('Markets')
74
+
75
+ // 2. Perform semantic search
76
+ await marketsPage.searchMarkets('election')
77
+
78
+ // Wait for API response
79
+ await page.waitForResponse(resp =>
80
+ resp.url().includes('/api/markets/search') && resp.status() === 200
81
+ )
82
+
83
+ // 3. Verify search results
84
+ const marketCards = marketsPage.marketCards
85
+ await expect(marketCards.first()).toBeVisible()
86
+ const resultCount = await marketCards.count()
87
+ expect(resultCount).toBeGreaterThan(0)
88
+
89
+ // Take screenshot of search results
90
+ await page.screenshot({ path: 'artifacts/search-results.png' })
91
+
92
+ // 4. Click on first result
93
+ const firstMarketTitle = await marketCards.first().textContent()
94
+ await marketCards.first().click()
95
+
96
+ // 5. Verify market details page loads
97
+ await expect(page).toHaveURL(/\/markets\/[a-z0-9-]+/)
98
+
99
+ const detailsPage = new MarketDetailsPage(page)
100
+ await expect(detailsPage.marketName).toBeVisible()
101
+ await expect(detailsPage.marketDescription).toBeVisible()
102
+
103
+ // 6. Verify chart renders
104
+ await expect(detailsPage.priceChart).toBeVisible()
105
+
106
+ // Verify market name matches
107
+ const detailsTitle = await detailsPage.marketName.textContent()
108
+ expect(detailsTitle?.toLowerCase()).toContain(
109
+ firstMarketTitle?.toLowerCase().substring(0, 20) || ''
110
+ )
111
+
112
+ // Take screenshot of market details
113
+ await page.screenshot({ path: 'artifacts/market-details.png' })
114
+ })
115
+
116
+ test('search with no results shows empty state', async ({ page }) => {
117
+ const marketsPage = new MarketsPage(page)
118
+ await marketsPage.goto()
119
+
120
+ // Search for non-existent market
121
+ await marketsPage.searchMarkets('xyznonexistentmarket123456')
122
+
123
+ // Verify empty state
124
+ await expect(page.locator('[data-testid="no-results"]')).toBeVisible()
125
+ await expect(page.locator('[data-testid="no-results"]')).toContainText(
126
+ /no.*results|no.*markets/i
127
+ )
128
+
129
+ const marketCount = await marketsPage.marketCards.count()
130
+ expect(marketCount).toBe(0)
131
+ })
132
+
133
+ test('can clear search and see all markets again', async ({ page }) => {
134
+ const marketsPage = new MarketsPage(page)
135
+ await marketsPage.goto()
136
+
137
+ // Initial market count
138
+ const initialCount = await marketsPage.marketCards.count()
139
+
140
+ // Perform search
141
+ await marketsPage.searchMarkets('trump')
142
+ await page.waitForLoadState('networkidle')
143
+
144
+ // Verify filtered results
145
+ const filteredCount = await marketsPage.marketCards.count()
146
+ expect(filteredCount).toBeLessThan(initialCount)
147
+
148
+ // Clear search
149
+ await marketsPage.searchInput.clear()
150
+ await page.waitForLoadState('networkidle')
151
+
152
+ // Verify all markets shown again
153
+ const finalCount = await marketsPage.marketCards.count()
154
+ expect(finalCount).toBe(initialCount)
155
+ })
156
+ })
157
+ ```
158
+
159
+ ## Running Tests
160
+
161
+ ```bash
162
+ # Run the generated test
163
+ npx playwright test tests/e2e/markets/search-and-view.spec.ts
164
+
165
+ Running 3 tests using 3 workers
166
+
167
+ ✓ [chromium] › search-and-view.spec.ts:5:3 › user can search markets and view details (4.2s)
168
+ ✓ [chromium] › search-and-view.spec.ts:52:3 › search with no results shows empty state (1.8s)
169
+ ✓ [chromium] › search-and-view.spec.ts:67:3 › can clear search and see all markets again (2.9s)
170
+
171
+ 3 passed (9.1s)
172
+
173
+ Artifacts generated:
174
+ - artifacts/search-results.png
175
+ - artifacts/market-details.png
176
+ - playwright-report/index.html
177
+ ```
178
+
179
+ ## Test Report
180
+
181
+ ```
182
+ ╔══════════════════════════════════════════════════════════════╗
183
+ ║ E2E Test Results ║
184
+ ╠══════════════════════════════════════════════════════════════╣
185
+ ║ Status: ✅ ALL TESTS PASSED ║
186
+ ║ Total: 3 tests ║
187
+ ║ Passed: 3 (100%) ║
188
+ ║ Failed: 0 ║
189
+ ║ Flaky: 0 ║
190
+ ║ Duration: 9.1s ║
191
+ ╚══════════════════════════════════════════════════════════════╝
192
+
193
+ Artifacts:
194
+ 📸 Screenshots: 2 files
195
+ 📹 Videos: 0 files (only on failure)
196
+ 🔍 Traces: 0 files (only on failure)
197
+ 📊 HTML Report: playwright-report/index.html
198
+
199
+ View report: npx playwright show-report
200
+ ```
201
+
202
+ ✅ E2E test suite ready for CI/CD integration!
203
+ ```
204
+
205
+ ## Test Artifacts
206
+
207
+ When tests run, the following artifacts are captured:
208
+
209
+ **On All Tests:**
210
+ - HTML Report with timeline and results
211
+ - JUnit XML for CI integration
212
+
213
+ **On Failure Only:**
214
+ - Screenshot of the failing state
215
+ - Video recording of the test
216
+ - Trace file for debugging (step-by-step replay)
217
+ - Network logs
218
+ - Console logs
219
+
220
+ ## Viewing Artifacts
221
+
222
+ ```bash
223
+ # View HTML report in browser
224
+ npx playwright show-report
225
+
226
+ # View specific trace file
227
+ npx playwright show-trace artifacts/trace-abc123.zip
228
+
229
+ # Screenshots are saved in artifacts/ directory
230
+ open artifacts/search-results.png
231
+ ```
232
+
233
+ ## Flaky Test Detection
234
+
235
+ If a test fails intermittently:
236
+
237
+ ```
238
+ ⚠️ FLAKY TEST DETECTED: tests/e2e/markets/trade.spec.ts
239
+
240
+ Test passed 7/10 runs (70% pass rate)
241
+
242
+ Common failure:
243
+ "Timeout waiting for element '[data-testid="confirm-btn"]'"
244
+
245
+ Recommended fixes:
246
+ 1. Add explicit wait: await page.waitForSelector('[data-testid="confirm-btn"]')
247
+ 2. Increase timeout: { timeout: 10000 }
248
+ 3. Check for race conditions in component
249
+ 4. Verify element is not hidden by animation
250
+
251
+ Quarantine recommendation: Mark as test.fixme() until fixed
252
+ ```
253
+
254
+ ## Browser Configuration
255
+
256
+ Tests run on multiple browsers by default:
257
+ - ✅ Chromium (Desktop Chrome)
258
+ - ✅ Firefox (Desktop)
259
+ - ✅ WebKit (Desktop Safari)
260
+ - ✅ Mobile Chrome (optional)
261
+
262
+ Configure in `playwright.config.ts` to adjust browsers.
263
+
264
+ ## CI/CD Integration
265
+
266
+ Add to your CI pipeline:
267
+
268
+ ```yaml
269
+ # .github/workflows/e2e.yml
270
+ - name: Install Playwright
271
+ run: npx playwright install --with-deps
272
+
273
+ - name: Run E2E tests
274
+ run: npx playwright test
275
+
276
+ - name: Upload artifacts
277
+ if: always()
278
+ uses: actions/upload-artifact@v3
279
+ with:
280
+ name: playwright-report
281
+ path: playwright-report/
282
+ ```
283
+
284
+ ## PMX-Specific Critical Flows
285
+
286
+ For PMX, prioritize these E2E tests:
287
+
288
+ **🔴 CRITICAL (Must Always Pass):**
289
+ 1. User can connect wallet
290
+ 2. User can browse markets
291
+ 3. User can search markets (semantic search)
292
+ 4. User can view market details
293
+ 5. User can place trade (with test funds)
294
+ 6. Market resolves correctly
295
+ 7. User can withdraw funds
296
+
297
+ **🟡 IMPORTANT:**
298
+ 1. Market creation flow
299
+ 2. User profile updates
300
+ 3. Real-time price updates
301
+ 4. Chart rendering
302
+ 5. Filter and sort markets
303
+ 6. Mobile responsive layout
304
+
305
+ ## Best Practices
306
+
307
+ **DO:**
308
+ - ✅ Use Page Object Model for maintainability
309
+ - ✅ Use data-testid attributes for selectors
310
+ - ✅ Wait for API responses, not arbitrary timeouts
311
+ - ✅ Test critical user journeys end-to-end
312
+ - ✅ Run tests before merging to main
313
+ - ✅ Review artifacts when tests fail
314
+
315
+ **DON'T:**
316
+ - ❌ Use brittle selectors (CSS classes can change)
317
+ - ❌ Test implementation details
318
+ - ❌ Run tests against production
319
+ - ❌ Ignore flaky tests
320
+ - ❌ Skip artifact review on failures
321
+ - ❌ Test every edge case with E2E (use unit tests)
322
+
323
+ ## Important Notes
324
+
325
+ **CRITICAL for PMX:**
326
+ - E2E tests involving real money MUST run on testnet/staging only
327
+ - Never run trading tests against production
328
+ - Set `test.skip(process.env.NODE_ENV === 'production')` for financial tests
329
+ - Use test wallets with small test funds only
330
+
331
+ ## Integration with Other Commands
332
+
333
+ - Use `/plan` to identify critical journeys to test
334
+ - Use `/tdd` for unit tests (faster, more granular)
335
+ - Use `/e2e` for integration and user journey tests
336
+ - Use `/code-review` to verify test quality
337
+
338
+ ## Related Agents
339
+
340
+ This command invokes the `e2e-runner` agent located at:
341
+ `~/.claude/agents/e2e-runner.md`
342
+
343
+ ## Quick Commands
344
+
345
+ ```bash
346
+ # Run all E2E tests
347
+ npx playwright test
348
+
349
+ # Run specific test file
350
+ npx playwright test tests/e2e/markets/search.spec.ts
351
+
352
+ # Run in headed mode (see browser)
353
+ npx playwright test --headed
354
+
355
+ # Debug test
356
+ npx playwright test --debug
357
+
358
+ # Generate test code
359
+ npx playwright codegen http://localhost:3000
360
+
361
+ # View report
362
+ npx playwright show-report
363
+ ```
@@ -0,0 +1,120 @@
1
+ # Eval Command
2
+
3
+ Manage eval-driven development workflow.
4
+
5
+ ## Usage
6
+
7
+ `/eval [define|check|report|list] [feature-name]`
8
+
9
+ ## Define Evals
10
+
11
+ `/eval define feature-name`
12
+
13
+ Create a new eval definition:
14
+
15
+ 1. Create `.claude/evals/feature-name.md` with template:
16
+
17
+ ```markdown
18
+ ## EVAL: feature-name
19
+ Created: $(date)
20
+
21
+ ### Capability Evals
22
+ - [ ] [Description of capability 1]
23
+ - [ ] [Description of capability 2]
24
+
25
+ ### Regression Evals
26
+ - [ ] [Existing behavior 1 still works]
27
+ - [ ] [Existing behavior 2 still works]
28
+
29
+ ### Success Criteria
30
+ - pass@3 > 90% for capability evals
31
+ - pass^3 = 100% for regression evals
32
+ ```
33
+
34
+ 2. Prompt user to fill in specific criteria
35
+
36
+ ## Check Evals
37
+
38
+ `/eval check feature-name`
39
+
40
+ Run evals for a feature:
41
+
42
+ 1. Read eval definition from `.claude/evals/feature-name.md`
43
+ 2. For each capability eval:
44
+ - Attempt to verify criterion
45
+ - Record PASS/FAIL
46
+ - Log attempt in `.claude/evals/feature-name.log`
47
+ 3. For each regression eval:
48
+ - Run relevant tests
49
+ - Compare against baseline
50
+ - Record PASS/FAIL
51
+ 4. Report current status:
52
+
53
+ ```
54
+ EVAL CHECK: feature-name
55
+ ========================
56
+ Capability: X/Y passing
57
+ Regression: X/Y passing
58
+ Status: IN PROGRESS / READY
59
+ ```
60
+
61
+ ## Report Evals
62
+
63
+ `/eval report feature-name`
64
+
65
+ Generate comprehensive eval report:
66
+
67
+ ```
68
+ EVAL REPORT: feature-name
69
+ =========================
70
+ Generated: $(date)
71
+
72
+ CAPABILITY EVALS
73
+ ----------------
74
+ [eval-1]: PASS (pass@1)
75
+ [eval-2]: PASS (pass@2) - required retry
76
+ [eval-3]: FAIL - see notes
77
+
78
+ REGRESSION EVALS
79
+ ----------------
80
+ [test-1]: PASS
81
+ [test-2]: PASS
82
+ [test-3]: PASS
83
+
84
+ METRICS
85
+ -------
86
+ Capability pass@1: 67%
87
+ Capability pass@3: 100%
88
+ Regression pass^3: 100%
89
+
90
+ NOTES
91
+ -----
92
+ [Any issues, edge cases, or observations]
93
+
94
+ RECOMMENDATION
95
+ --------------
96
+ [SHIP / NEEDS WORK / BLOCKED]
97
+ ```
98
+
99
+ ## List Evals
100
+
101
+ `/eval list`
102
+
103
+ Show all eval definitions:
104
+
105
+ ```
106
+ EVAL DEFINITIONS
107
+ ================
108
+ feature-auth [3/5 passing] IN PROGRESS
109
+ feature-search [5/5 passing] READY
110
+ feature-export [0/4 passing] NOT STARTED
111
+ ```
112
+
113
+ ## Arguments
114
+
115
+ $ARGUMENTS:
116
+ - `define <name>` - Create new eval definition
117
+ - `check <name>` - Run and check evals
118
+ - `report <name>` - Generate full report
119
+ - `list` - Show all evals
120
+ - `clean` - Remove old eval logs (keeps last 10 runs)