@nextsparkjs/ai-workflow 0.1.0-beta.86

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 (271) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +86 -0
  3. package/claude/_docs/workflows-optimizations.md +359 -0
  4. package/claude/agents/api-tester.md +636 -0
  5. package/claude/agents/architecture-supervisor.md +1381 -0
  6. package/claude/agents/backend-developer.md +1021 -0
  7. package/claude/agents/backend-validator.md +417 -0
  8. package/claude/agents/bdd-docs-writer.md +737 -0
  9. package/claude/agents/block-developer.md +677 -0
  10. package/claude/agents/code-reviewer.md +1460 -0
  11. package/claude/agents/db-developer.md +721 -0
  12. package/claude/agents/db-validator.md +407 -0
  13. package/claude/agents/demo-video-generator.md +493 -0
  14. package/claude/agents/documentation-writer.md +1291 -0
  15. package/claude/agents/frontend-developer.md +1259 -0
  16. package/claude/agents/frontend-validator.md +777 -0
  17. package/claude/agents/functional-validator.md +630 -0
  18. package/claude/agents/mock-analyst.md +387 -0
  19. package/claude/agents/product-manager.md +971 -0
  20. package/claude/agents/qa-automation.md +1762 -0
  21. package/claude/agents/release-manager.md +634 -0
  22. package/claude/agents/selectors-translator.md +262 -0
  23. package/claude/agents/unit-test-writer.md +785 -0
  24. package/claude/agents/visual-comparator.md +329 -0
  25. package/claude/agents/workflow-maintainer.md +373 -0
  26. package/claude/commands/do/README.md +88 -0
  27. package/claude/commands/do/create-api.md +64 -0
  28. package/claude/commands/do/create-entity.md +66 -0
  29. package/claude/commands/do/create-migration.md +64 -0
  30. package/claude/commands/do/create-plugin.md +56 -0
  31. package/claude/commands/do/create-theme.md +70 -0
  32. package/claude/commands/do/mock-data.md +67 -0
  33. package/claude/commands/do/reset-db.md +71 -0
  34. package/claude/commands/do/setup-scheduled-action.md +75 -0
  35. package/claude/commands/do/sync-code-review.md +117 -0
  36. package/claude/commands/do/update-selectors.md +112 -0
  37. package/claude/commands/do/use-skills.md +90 -0
  38. package/claude/commands/do/validate-blocks.md +69 -0
  39. package/claude/commands/how-to/README.md +261 -0
  40. package/claude/commands/how-to/add-metadata.md +692 -0
  41. package/claude/commands/how-to/add-taxonomies.md +806 -0
  42. package/claude/commands/how-to/add-translations.md +571 -0
  43. package/claude/commands/how-to/create-api.md +577 -0
  44. package/claude/commands/how-to/create-block.md +575 -0
  45. package/claude/commands/how-to/create-child-entities.md +771 -0
  46. package/claude/commands/how-to/create-entity.md +597 -0
  47. package/claude/commands/how-to/create-migrations.md +605 -0
  48. package/claude/commands/how-to/create-plugin.md +654 -0
  49. package/claude/commands/how-to/customize-app.md +481 -0
  50. package/claude/commands/how-to/customize-dashboard.md +553 -0
  51. package/claude/commands/how-to/customize-theme.md +438 -0
  52. package/claude/commands/how-to/define-features-flows.md +632 -0
  53. package/claude/commands/how-to/deploy.md +507 -0
  54. package/claude/commands/how-to/handle-file-uploads.md +681 -0
  55. package/claude/commands/how-to/implement-search.md +1001 -0
  56. package/claude/commands/how-to/install-plugins.md +352 -0
  57. package/claude/commands/how-to/manage-test-coverage.md +984 -0
  58. package/claude/commands/how-to/run-tests.md +400 -0
  59. package/claude/commands/how-to/set-app-languages.md +601 -0
  60. package/claude/commands/how-to/set-plans-and-permissions.md +575 -0
  61. package/claude/commands/how-to/set-scheduled-actions.md +527 -0
  62. package/claude/commands/how-to/set-user-roles-and-permissions.md +550 -0
  63. package/claude/commands/how-to/setup-authentication.md +388 -0
  64. package/claude/commands/how-to/setup-claude-code.md +512 -0
  65. package/claude/commands/how-to/setup-database.md +274 -0
  66. package/claude/commands/how-to/setup-email-providers.md +598 -0
  67. package/claude/commands/how-to/setup-mobile-dev.md +627 -0
  68. package/claude/commands/how-to/start.md +455 -0
  69. package/claude/commands/how-to/use-devtools.md +639 -0
  70. package/claude/commands/how-to/use-superadmin.md +622 -0
  71. package/claude/commands/session/README.md +193 -0
  72. package/claude/commands/session/block-create.md +190 -0
  73. package/claude/commands/session/block-list.md +203 -0
  74. package/claude/commands/session/block-update.md +192 -0
  75. package/claude/commands/session/block-validate.md +218 -0
  76. package/claude/commands/session/close.md +146 -0
  77. package/claude/commands/session/commit.md +174 -0
  78. package/claude/commands/session/db-entity.md +206 -0
  79. package/claude/commands/session/db-fix.md +212 -0
  80. package/claude/commands/session/db-sample.md +206 -0
  81. package/claude/commands/session/demo.md +178 -0
  82. package/claude/commands/session/doc-bdd.md +207 -0
  83. package/claude/commands/session/doc-feature.md +218 -0
  84. package/claude/commands/session/doc-read.md +225 -0
  85. package/claude/commands/session/execute.md +204 -0
  86. package/claude/commands/session/explain.md +202 -0
  87. package/claude/commands/session/fix-bug.md +210 -0
  88. package/claude/commands/session/fix-build.md +182 -0
  89. package/claude/commands/session/fix-test.md +189 -0
  90. package/claude/commands/session/pending.md +232 -0
  91. package/claude/commands/session/refine.md +188 -0
  92. package/claude/commands/session/resume.md +192 -0
  93. package/claude/commands/session/review.md +192 -0
  94. package/claude/commands/session/scope-change.md +181 -0
  95. package/claude/commands/session/start-blocks.md +347 -0
  96. package/claude/commands/session/start.md +476 -0
  97. package/claude/commands/session/status.md +169 -0
  98. package/claude/commands/session/test-fix.md +221 -0
  99. package/claude/commands/session/test-run.md +203 -0
  100. package/claude/commands/session/test-write.md +242 -0
  101. package/claude/commands/session/validate.md +162 -0
  102. package/claude/config/context.json +54 -0
  103. package/claude/config/github.json +69 -0
  104. package/claude/config/github.schema.json +106 -0
  105. package/claude/config/team.json +46 -0
  106. package/claude/config/team.schema.json +106 -0
  107. package/claude/config/workspace.json +49 -0
  108. package/claude/config/workspace.schema.json +64 -0
  109. package/claude/scripts/.gitkeep +0 -0
  110. package/claude/sessions/.gitkeep +0 -0
  111. package/claude/skills/README.md +228 -0
  112. package/claude/skills/accessibility/SKILL.md +573 -0
  113. package/claude/skills/api-bypass-layers/SKILL.md +550 -0
  114. package/claude/skills/asana-integration/SKILL.md +499 -0
  115. package/claude/skills/better-auth/SKILL.md +666 -0
  116. package/claude/skills/billing-subscriptions/SKILL.md +660 -0
  117. package/claude/skills/block-decision-matrix/SKILL.md +359 -0
  118. package/claude/skills/clickup-integration/SKILL.md +434 -0
  119. package/claude/skills/core-theme-responsibilities/SKILL.md +485 -0
  120. package/claude/skills/create-plugin/SKILL.md +425 -0
  121. package/claude/skills/create-theme/SKILL.md +331 -0
  122. package/claude/skills/cypress-api/SKILL.md +511 -0
  123. package/claude/skills/cypress-api/scripts/generate-api-controller.py +329 -0
  124. package/claude/skills/cypress-api/scripts/generate-api-test.py +930 -0
  125. package/claude/skills/cypress-e2e/SKILL.md +526 -0
  126. package/claude/skills/cypress-e2e/scripts/extract-selectors.py +383 -0
  127. package/claude/skills/cypress-e2e/scripts/generate-uat-test.py +788 -0
  128. package/claude/skills/cypress-selectors/SKILL.md +309 -0
  129. package/claude/skills/cypress-selectors/scripts/extract-missing.py +243 -0
  130. package/claude/skills/cypress-selectors/scripts/generate-block-selectors.py +283 -0
  131. package/claude/skills/cypress-selectors/scripts/validate-selectors.py +145 -0
  132. package/claude/skills/database-migrations/SKILL.md +335 -0
  133. package/claude/skills/database-migrations/scripts/generate-sample-data.py +284 -0
  134. package/claude/skills/database-migrations/scripts/validate-migration.py +323 -0
  135. package/claude/skills/design-system/SKILL.md +682 -0
  136. package/claude/skills/documentation/SKILL.md +540 -0
  137. package/claude/skills/entity-api/SKILL.md +482 -0
  138. package/claude/skills/entity-system/SKILL.md +635 -0
  139. package/claude/skills/entity-system/scripts/generate-child-migration.py +298 -0
  140. package/claude/skills/entity-system/scripts/generate-metas-migration.py +233 -0
  141. package/claude/skills/entity-system/scripts/generate-migration.py +382 -0
  142. package/claude/skills/entity-system/scripts/generate-sample-data.py +418 -0
  143. package/claude/skills/entity-system/scripts/scaffold-entity.py +661 -0
  144. package/claude/skills/github/SKILL.md +467 -0
  145. package/claude/skills/i18n-nextintl/SKILL.md +302 -0
  146. package/claude/skills/i18n-nextintl/scripts/add-translation.py +243 -0
  147. package/claude/skills/i18n-nextintl/scripts/extract-hardcoded.py +246 -0
  148. package/claude/skills/i18n-nextintl/scripts/validate-translations.py +260 -0
  149. package/claude/skills/impact-analysis/SKILL.md +203 -0
  150. package/claude/skills/jest-unit/SKILL.md +306 -0
  151. package/claude/skills/jest-unit/references/component-testing.md +371 -0
  152. package/claude/skills/jest-unit/references/mocking-patterns.md +380 -0
  153. package/claude/skills/jest-unit/references/service-hook-testing.md +454 -0
  154. package/claude/skills/jira-integration/SKILL.md +539 -0
  155. package/claude/skills/mock-analysis/SKILL.md +276 -0
  156. package/claude/skills/monorepo-architecture/SKILL.md +162 -0
  157. package/claude/skills/nextjs-api-development/SKILL.md +364 -0
  158. package/claude/skills/nextjs-api-development/scripts/generate-crud-tests.py +456 -0
  159. package/claude/skills/nextjs-api-development/scripts/scaffold-endpoint.py +481 -0
  160. package/claude/skills/nextjs-api-development/scripts/validate-api.py +283 -0
  161. package/claude/skills/notion-integration/SKILL.md +641 -0
  162. package/claude/skills/npm-development-workflow/SKILL.md +480 -0
  163. package/claude/skills/page-builder-blocks/SKILL.md +483 -0
  164. package/claude/skills/page-builder-blocks/scripts/scaffold-block.py +444 -0
  165. package/claude/skills/permissions-system/SKILL.md +619 -0
  166. package/claude/skills/plugins/SKILL.md +340 -0
  167. package/claude/skills/plugins/references/plugin-templates.md +414 -0
  168. package/claude/skills/plugins/references/plugin-testing.md +353 -0
  169. package/claude/skills/plugins/references/plugin-types.md +198 -0
  170. package/claude/skills/plugins/scripts/scaffold-plugin.py +443 -0
  171. package/claude/skills/pom-patterns/SKILL.md +452 -0
  172. package/claude/skills/pom-patterns/scripts/generate-pom.py +392 -0
  173. package/claude/skills/rate-limiting/SKILL.md +342 -0
  174. package/claude/skills/react-best-practices/AGENTS.md +2410 -0
  175. package/claude/skills/react-best-practices/README.md +123 -0
  176. package/claude/skills/react-best-practices/SKILL.md +125 -0
  177. package/claude/skills/react-best-practices/metadata.json +15 -0
  178. package/claude/skills/react-best-practices/rules/_sections.md +46 -0
  179. package/claude/skills/react-best-practices/rules/_template.md +28 -0
  180. package/claude/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  181. package/claude/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
  182. package/claude/skills/react-best-practices/rules/async-api-routes.md +38 -0
  183. package/claude/skills/react-best-practices/rules/async-defer-await.md +80 -0
  184. package/claude/skills/react-best-practices/rules/async-dependencies.md +36 -0
  185. package/claude/skills/react-best-practices/rules/async-parallel.md +28 -0
  186. package/claude/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  187. package/claude/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  188. package/claude/skills/react-best-practices/rules/bundle-conditional.md +31 -0
  189. package/claude/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  190. package/claude/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  191. package/claude/skills/react-best-practices/rules/bundle-preload.md +50 -0
  192. package/claude/skills/react-best-practices/rules/client-event-listeners.md +74 -0
  193. package/claude/skills/react-best-practices/rules/client-localstorage-schema.md +71 -0
  194. package/claude/skills/react-best-practices/rules/client-passive-event-listeners.md +48 -0
  195. package/claude/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
  196. package/claude/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
  197. package/claude/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
  198. package/claude/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
  199. package/claude/skills/react-best-practices/rules/js-cache-storage.md +70 -0
  200. package/claude/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
  201. package/claude/skills/react-best-practices/rules/js-early-exit.md +50 -0
  202. package/claude/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
  203. package/claude/skills/react-best-practices/rules/js-index-maps.md +37 -0
  204. package/claude/skills/react-best-practices/rules/js-length-check-first.md +49 -0
  205. package/claude/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
  206. package/claude/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
  207. package/claude/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  208. package/claude/skills/react-best-practices/rules/rendering-activity.md +26 -0
  209. package/claude/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  210. package/claude/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
  211. package/claude/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
  212. package/claude/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  213. package/claude/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  214. package/claude/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
  215. package/claude/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
  216. package/claude/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
  217. package/claude/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
  218. package/claude/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  219. package/claude/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  220. package/claude/skills/react-best-practices/rules/rerender-memo.md +44 -0
  221. package/claude/skills/react-best-practices/rules/rerender-transitions.md +40 -0
  222. package/claude/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
  223. package/claude/skills/react-best-practices/rules/server-cache-lru.md +41 -0
  224. package/claude/skills/react-best-practices/rules/server-cache-react.md +76 -0
  225. package/claude/skills/react-best-practices/rules/server-parallel-fetching.md +83 -0
  226. package/claude/skills/react-best-practices/rules/server-serialization.md +38 -0
  227. package/claude/skills/react-patterns/SKILL.md +677 -0
  228. package/claude/skills/registry-system/SKILL.md +331 -0
  229. package/claude/skills/scheduled-actions/SKILL.md +431 -0
  230. package/claude/skills/scope-enforcement/SKILL.md +542 -0
  231. package/claude/skills/scope-enforcement/scripts/validate-scope.py +357 -0
  232. package/claude/skills/server-actions/SKILL.md +493 -0
  233. package/claude/skills/service-layer/SKILL.md +587 -0
  234. package/claude/skills/session-management/SKILL.md +266 -0
  235. package/claude/skills/session-management/scripts/create-session.py +166 -0
  236. package/claude/skills/session-management/scripts/iteration-close.sh +105 -0
  237. package/claude/skills/session-management/scripts/iteration-init.sh +180 -0
  238. package/claude/skills/session-management/scripts/session-archive.sh +87 -0
  239. package/claude/skills/session-management/scripts/session-close.sh +133 -0
  240. package/claude/skills/session-management/scripts/session-init.sh +225 -0
  241. package/claude/skills/session-management/scripts/session-list.sh +163 -0
  242. package/claude/skills/session-management/scripts/split-plan.sh +116 -0
  243. package/claude/skills/shadcn-components/SKILL.md +586 -0
  244. package/claude/skills/shadcn-theming/SKILL.md +446 -0
  245. package/claude/skills/suspense-loading/SKILL.md +280 -0
  246. package/claude/skills/tailwind-theming/SKILL.md +479 -0
  247. package/claude/skills/tanstack-query/SKILL.md +608 -0
  248. package/claude/skills/test-coverage/SKILL.md +239 -0
  249. package/claude/skills/web-design-guidelines/SKILL.md +39 -0
  250. package/claude/skills/zod-validation/SKILL.md +537 -0
  251. package/claude/templates/blocks/progress.md +86 -0
  252. package/claude/templates/iteration/changes.md +61 -0
  253. package/claude/templates/iteration/progress.md +55 -0
  254. package/claude/templates/log.md +31 -0
  255. package/claude/templates/story/context.md +77 -0
  256. package/claude/templates/story/pendings.md +37 -0
  257. package/claude/templates/story/plan.md +299 -0
  258. package/claude/templates/story/requirements.md +109 -0
  259. package/claude/templates/story/scope.json +10 -0
  260. package/claude/templates/story/tests.md +91 -0
  261. package/claude/templates/task/progress.md +58 -0
  262. package/claude/templates/task/requirements.md +54 -0
  263. package/claude/workflows/README.md +154 -0
  264. package/claude/workflows/blocks.md +614 -0
  265. package/claude/workflows/story.md +1207 -0
  266. package/claude/workflows/task.md +927 -0
  267. package/claude/workflows/tweak.md +527 -0
  268. package/cursor/.gitkeep +0 -0
  269. package/package.json +34 -0
  270. package/scripts/setup.mjs +282 -0
  271. package/scripts/sync.mjs +209 -0
@@ -0,0 +1,221 @@
1
+ # /session:test:fix
2
+
3
+ Fix failing Cypress tests iteratively until all pass.
4
+
5
+ **Aliases:** Wrapper for `/session:fix:test` focused on Cypress
6
+
7
+ ---
8
+
9
+ ## Syntax
10
+
11
+ ```
12
+ /session:test:fix [--spec <pattern>] [--max-retries <n>]
13
+ ```
14
+
15
+ ---
16
+
17
+ ## Behavior
18
+
19
+ Runs Cypress tests, analyzes failures, applies fixes, and retries until all pass.
20
+
21
+ ---
22
+
23
+ ## Flow
24
+
25
+ ```
26
+ ┌─────────────────────────────────────────────────────────────────┐
27
+ │ /session:test:fix │
28
+ ├─────────────────────────────────────────────────────────────────┤
29
+ │ │
30
+ │ 1. Run Cypress tests │
31
+ │ ↓ │
32
+ │ 2. Identify failures │
33
+ │ ↓ │
34
+ │ 3. For each failure: │
35
+ │ │ │
36
+ │ ├─► Selector issue? │
37
+ │ │ - Update data-cy in component │
38
+ │ │ - Update selector in test │
39
+ │ │ │
40
+ │ ├─► Timing issue? │
41
+ │ │ - Add cy.wait or cy.intercept │
42
+ │ │ │
43
+ │ ├─► Assertion issue? │
44
+ │ │ - Update expected value │
45
+ │ │ │
46
+ │ └─► Implementation bug? │
47
+ │ - Fix source code │
48
+ │ ↓ │
49
+ │ 4. Re-run failed tests │
50
+ │ │ │
51
+ │ ├─► Still failing: Go to step 3 │
52
+ │ │ │
53
+ │ └─► All pass: Run full suite │
54
+ │ ↓ │
55
+ │ 5. Report final status │
56
+ │ │
57
+ └─────────────────────────────────────────────────────────────────┘
58
+ ```
59
+
60
+ ---
61
+
62
+ ## Example Output
63
+
64
+ ```
65
+ 🔧 FIX CYPRESS TESTS
66
+
67
+ ─────────────────────────────────────────
68
+
69
+ 📋 ITERATION 1
70
+
71
+ Running Cypress tests...
72
+ ❌ 3 tests failing
73
+
74
+ Failures:
75
+ 1. [UAT] products.cy.ts:45 - "should upload images"
76
+ Error: Element [data-cy=image-upload] not found
77
+
78
+ 2. [UAT] products.cy.ts:78 - "should filter by category"
79
+ Error: Expected 5, got 3
80
+
81
+ 3. [API] products.cy.ts:23 - "should create with category"
82
+ Error: Expected 201, got 400
83
+
84
+ ─────────────────────────────────────────
85
+
86
+ 🔍 ANALYZING FAILURE 1/3
87
+
88
+ Test: should upload images
89
+ Type: Selector not found
90
+
91
+ Analysis:
92
+ - Component uses: data-cy="upload-image"
93
+ - Test expects: data-cy="image-upload"
94
+
95
+ Action: Update test selector
96
+
97
+ Fix applied:
98
+ ```typescript
99
+ // Before
100
+ cy.get('[data-cy=image-upload]')
101
+
102
+ // After
103
+ cy.get('[data-cy=upload-image]')
104
+ ```
105
+
106
+ ✓ Test file updated
107
+
108
+ ─────────────────────────────────────────
109
+
110
+ 🔍 ANALYZING FAILURE 2/3
111
+
112
+ Test: should filter by category
113
+ Type: Assertion mismatch
114
+
115
+ Analysis:
116
+ - Sample data has 3 products in "Electronics"
117
+ - Test expects 5
118
+
119
+ Action: Update test data or assertion
120
+
121
+ Options:
122
+ [1] Update assertion to match data (3)
123
+ [2] Add more sample data
124
+ [3] The data is wrong - fix sample
125
+
126
+ > 1
127
+
128
+ Fix applied:
129
+ ```typescript
130
+ // Before
131
+ pom.verifyProductCount(5);
132
+
133
+ // After
134
+ pom.verifyProductCount(3);
135
+ ```
136
+
137
+ ✓ Test file updated
138
+
139
+ ─────────────────────────────────────────
140
+
141
+ 🔍 ANALYZING FAILURE 3/3
142
+
143
+ Test: should create with category
144
+ Type: Implementation bug
145
+
146
+ Analysis:
147
+ - API returns 400: "categoryId required"
148
+ - Test sends categoryId correctly
149
+ - Bug: API validation not reading categoryId
150
+
151
+ Action: Fix API implementation
152
+
153
+ Fix applied in: core/api/v1/products/route.ts:34
154
+ ```typescript
155
+ // Before
156
+ const { name, price } = await req.json();
157
+
158
+ // After
159
+ const { name, price, categoryId } = await req.json();
160
+ ```
161
+
162
+ ✓ Implementation fixed
163
+
164
+ ─────────────────────────────────────────
165
+
166
+ 📋 ITERATION 2
167
+
168
+ Re-running failed tests...
169
+ ✓ All 3 previously failed tests now pass
170
+
171
+ Running full suite...
172
+ ✓ 20/20 tests passing
173
+
174
+ ─────────────────────────────────────────
175
+
176
+ 📊 SUMMARY
177
+
178
+ Iterations: 2
179
+ Tests fixed: 3
180
+ - 1 selector fix (test)
181
+ - 1 assertion fix (test)
182
+ - 1 implementation fix (source)
183
+
184
+ Files modified:
185
+ ├─ cypress/e2e/uat/products.cy.ts (2 changes)
186
+ └─ core/api/v1/products/route.ts (1 change)
187
+
188
+ All tests passing.
189
+ ```
190
+
191
+ ---
192
+
193
+ ## Fix Categories
194
+
195
+ | Category | Fix Location | Common Causes |
196
+ |----------|--------------|---------------|
197
+ | Selector | Test or Component | Changed markup, typo |
198
+ | Timing | Test | Async operations, loading |
199
+ | Assertion | Test | Changed behavior, data |
200
+ | Implementation | Source | Bug in code |
201
+
202
+ ---
203
+
204
+ ## Options
205
+
206
+ | Option | Description |
207
+ |--------|-------------|
208
+ | `--spec <pattern>` | Fix specific spec |
209
+ | `--max-retries <n>` | Max fix iterations (default: 5) |
210
+ | `--test-only` | Only fix test code, not source |
211
+ | `--source-only` | Only fix source code |
212
+
213
+ ---
214
+
215
+ ## Related Commands
216
+
217
+ | Command | Action |
218
+ |---------|--------|
219
+ | `/session:test:write` | Write new tests |
220
+ | `/session:test:run` | Run tests |
221
+ | `/session:fix:build` | Fix build errors |
@@ -0,0 +1,203 @@
1
+ # /session:test:run
2
+
3
+ Execute Cypress test suite with options for specific tests or full run.
4
+
5
+ ---
6
+
7
+ ## Syntax
8
+
9
+ ```
10
+ /session:test:run [--spec <pattern>] [--tags <tags>]
11
+ ```
12
+
13
+ ---
14
+
15
+ ## Behavior
16
+
17
+ Runs Cypress tests and reports results with detailed analysis.
18
+
19
+ ---
20
+
21
+ ## Flow
22
+
23
+ ```
24
+ ┌─────────────────────────────────────────────────────────────────┐
25
+ │ /session:test:run │
26
+ ├─────────────────────────────────────────────────────────────────┤
27
+ │ │
28
+ │ 1. Determine tests to run │
29
+ │ - All tests, or filtered │
30
+ │ ↓ │
31
+ │ 2. Start dev server (if not running) │
32
+ │ ↓ │
33
+ │ 3. Execute Cypress tests │
34
+ │ ↓ │
35
+ │ 4. Collect results │
36
+ │ - Passed/Failed/Skipped │
37
+ │ - Screenshots on failure │
38
+ │ ↓ │
39
+ │ 5. Analyze failures (if any) │
40
+ │ ↓ │
41
+ │ 6. Report summary │
42
+ │ │
43
+ └─────────────────────────────────────────────────────────────────┘
44
+ ```
45
+
46
+ ---
47
+
48
+ ## Example Output
49
+
50
+ ```
51
+ 🧪 RUN TESTS
52
+
53
+ ─────────────────────────────────────────
54
+
55
+ 🚀 STARTING TEST RUN
56
+
57
+ Server: http://localhost:3000 ✓
58
+ Browser: Chrome (headless)
59
+ Spec pattern: cypress/e2e/**/*.cy.ts
60
+
61
+ ─────────────────────────────────────────
62
+
63
+ 📋 EXECUTING TESTS
64
+
65
+ API Tests:
66
+ ├─ products.cy.ts
67
+ │ ├─ ✓ should create a product (1.2s)
68
+ │ ├─ ✓ should get product by ID (0.8s)
69
+ │ ├─ ✓ should update product (0.9s)
70
+ │ ├─ ✓ should delete product (0.7s)
71
+ │ ├─ ✓ should work with API key (1.1s)
72
+ │ └─ ✓ should reject unauthenticated (0.5s)
73
+
74
+ UAT Tests:
75
+ ├─ products.cy.ts
76
+ │ ├─ ✓ should create a new product (3.2s)
77
+ │ ├─ ❌ should upload product images (timeout)
78
+ │ ├─ ✓ should assign categories (2.1s)
79
+ │ ├─ ✓ should display with pagination (2.5s)
80
+ │ └─ ✓ should show for team members (1.8s)
81
+
82
+ ─────────────────────────────────────────
83
+
84
+ ❌ FAILURE ANALYSIS
85
+
86
+ Test: should upload product images
87
+ File: cypress/e2e/uat/products.cy.ts:45
88
+
89
+ Error:
90
+ Timed out waiting for element: [data-cy=image-upload]
91
+
92
+ Screenshot: cypress/screenshots/products-upload-fail.png
93
+
94
+ Possible causes:
95
+ 1. Element not rendered (check component)
96
+ 2. Selector changed (verify data-cy)
97
+ 3. Async loading issue (add wait)
98
+
99
+ ─────────────────────────────────────────
100
+
101
+ 📊 SUMMARY
102
+
103
+ Passed: 10
104
+ Failed: 1
105
+ Skipped: 0
106
+
107
+ Duration: 14.8s
108
+
109
+ Coverage:
110
+ ├─ API: 100% (6/6)
111
+ └─ UAT: 80% (4/5)
112
+
113
+ ─────────────────────────────────────────
114
+
115
+ Options:
116
+ [1] Fix failing test (/session:test:fix)
117
+ [2] View failure screenshot
118
+ [3] Re-run failed test only
119
+ ```
120
+
121
+ ---
122
+
123
+ ## Run with Tags
124
+
125
+ ```
126
+ /session:test:run --tags @api
127
+ ```
128
+
129
+ Output:
130
+
131
+ ```
132
+ 🧪 RUN TESTS
133
+
134
+ Filter: @api tag only
135
+
136
+ ─────────────────────────────────────────
137
+
138
+ 📋 EXECUTING TESTS
139
+
140
+ Specs matching @api: 3 files
141
+ Tests matching @api: 18 tests
142
+
143
+ ├─ products.cy.ts (6 tests)
144
+ │ ├─ ✓ @api @crud should create
145
+ │ ├─ ✓ @api @crud should read
146
+ │ └─ ...
147
+ ├─ categories.cy.ts (6 tests)
148
+ └─ users.cy.ts (6 tests)
149
+
150
+ ─────────────────────────────────────────
151
+
152
+ 📊 SUMMARY
153
+
154
+ Passed: 18
155
+ Failed: 0
156
+
157
+ Duration: 8.2s
158
+
159
+ All @api tests passing.
160
+ ```
161
+
162
+ ---
163
+
164
+ ## Run Specific Spec
165
+
166
+ ```
167
+ /session:test:run --spec "cypress/e2e/uat/products.cy.ts"
168
+ ```
169
+
170
+ ---
171
+
172
+ ## Options
173
+
174
+ | Option | Description |
175
+ |--------|-------------|
176
+ | `--spec <pattern>` | Run specific spec files |
177
+ | `--tags <tags>` | Filter by grep tags |
178
+ | `--headed` | Run with visible browser |
179
+ | `--record` | Record to Cypress Cloud |
180
+ | `--parallel` | Run in parallel |
181
+
182
+ ---
183
+
184
+ ## Test Tags Reference
185
+
186
+ | Tag | Description |
187
+ |-----|-------------|
188
+ | `@api` | API tests |
189
+ | `@uat` | UAT tests |
190
+ | `@crud` | CRUD operations |
191
+ | `@auth` | Authentication tests |
192
+ | `@smoke` | Smoke tests (critical path) |
193
+ | `@regression` | Full regression suite |
194
+
195
+ ---
196
+
197
+ ## Related Commands
198
+
199
+ | Command | Action |
200
+ |---------|--------|
201
+ | `/session:test:write` | Write new tests |
202
+ | `/session:test:fix` | Fix failing tests |
203
+ | `/session:validate` | Full validation |
@@ -0,0 +1,242 @@
1
+ # /session:test:write
2
+
3
+ Write or update Cypress tests (API and UAT) for a feature.
4
+
5
+ ---
6
+
7
+ ## Required Skills
8
+
9
+ **[MANDATORY]** Read these skills before executing:
10
+ - `.claude/skills/cypress-api/SKILL.md` - API testing patterns
11
+ - `.claude/skills/cypress-e2e/SKILL.md` - E2E/UAT testing patterns
12
+ - `.claude/skills/cypress-selectors/SKILL.md` - data-cy selector conventions
13
+ - `.claude/skills/pom-patterns/SKILL.md` - Page Object Model patterns
14
+
15
+ ---
16
+
17
+ ## Syntax
18
+
19
+ ```
20
+ /session:test:write [--type <api|uat|both>]
21
+ ```
22
+
23
+ ---
24
+
25
+ ## Behavior
26
+
27
+ Generates Cypress tests based on session requirements and existing patterns.
28
+
29
+ ---
30
+
31
+ ## Flow
32
+
33
+ ```
34
+ ┌─────────────────────────────────────────────────────────────────┐
35
+ │ /session:test:write │
36
+ ├─────────────────────────────────────────────────────────────────┤
37
+ │ │
38
+ │ 1. Load session context │
39
+ │ - Read requirements.md (ACs) │
40
+ │ - Read plan.md (entities) │
41
+ │ ↓ │
42
+ │ 2. Check for existing POMs │
43
+ │ - Reuse if available │
44
+ │ - Create if needed │
45
+ │ ↓ │
46
+ │ 3. Generate API tests │
47
+ │ - CRUD operations │
48
+ │ - Auth scenarios │
49
+ │ - Error cases │
50
+ │ ↓ │
51
+ │ 4. Generate UAT tests │
52
+ │ - User flows from ACs │
53
+ │ - Visual verification │
54
+ │ ↓ │
55
+ │ 5. Validate selectors exist │
56
+ │ ↓ │
57
+ │ 6. Create test files │
58
+ │ │
59
+ └─────────────────────────────────────────────────────────────────┘
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Example Output
65
+
66
+ ```
67
+ 🧪 WRITE TESTS
68
+
69
+ Session: stories/2026-01-11-new-products-entity
70
+ Type: both (API + UAT)
71
+
72
+ ─────────────────────────────────────────
73
+
74
+ 📋 ANALYZING REQUIREMENTS
75
+
76
+ ACs to cover:
77
+ ├─ AC1: Admin can create a new product
78
+ ├─ AC2: Admin can upload product images
79
+ ├─ AC3: Admin can assign products to categories
80
+ ├─ AC4: Products are listed with pagination
81
+ └─ AC5: Team members can view products
82
+
83
+ Entity: products
84
+ API Endpoints: 5 (CRUD + list)
85
+
86
+ ─────────────────────────────────────────
87
+
88
+ 🔍 CHECKING EXISTING POMs
89
+
90
+ ├─ DashboardPOM: exists ✓
91
+ ├─ EntityFormPOM: exists ✓
92
+ └─ ProductsPOM: not found
93
+
94
+ Creating ProductsPOM...
95
+ ✓ Created: cypress/support/pom/ProductsPOM.ts
96
+
97
+ ─────────────────────────────────────────
98
+
99
+ 📝 GENERATING API TESTS
100
+
101
+ File: cypress/e2e/api/products.cy.ts
102
+
103
+ ```typescript
104
+ import { BaseAPIController } from '@/cypress/support/api/BaseAPIController';
105
+
106
+ describe('@api @products Products API', () => {
107
+ const api = new ProductsAPIController();
108
+
109
+ describe('@crud CRUD Operations', () => {
110
+ it('@create should create a product', () => {
111
+ api.create({
112
+ name: 'Test Product',
113
+ price: 99.99,
114
+ categoryId: fixtures.categoryId
115
+ }).then((response) => {
116
+ expect(response.status).to.eq(201);
117
+ expect(response.body.name).to.eq('Test Product');
118
+ });
119
+ });
120
+
121
+ it('@read should get product by ID', () => {
122
+ api.getById(fixtures.productId).then((response) => {
123
+ expect(response.status).to.eq(200);
124
+ });
125
+ });
126
+
127
+ it('@update should update product', () => {
128
+ api.update(fixtures.productId, { name: 'Updated' })
129
+ .then((response) => {
130
+ expect(response.status).to.eq(200);
131
+ });
132
+ });
133
+
134
+ it('@delete should delete product', () => {
135
+ api.delete(fixtures.productId).then((response) => {
136
+ expect(response.status).to.eq(200);
137
+ });
138
+ });
139
+ });
140
+
141
+ describe('@auth Authentication', () => {
142
+ it('@apikey should work with API key', () => {
143
+ // API key authentication test
144
+ });
145
+
146
+ it('@session should work with session', () => {
147
+ // Session authentication test
148
+ });
149
+
150
+ it('@unauthorized should reject unauthenticated', () => {
151
+ api.unauthorized().create({}).then((response) => {
152
+ expect(response.status).to.eq(401);
153
+ });
154
+ });
155
+ });
156
+ });
157
+ ```
158
+
159
+ ─────────────────────────────────────────
160
+
161
+ 📝 GENERATING UAT TESTS
162
+
163
+ File: cypress/e2e/uat/products.cy.ts
164
+
165
+ ```typescript
166
+ import { ProductsPOM } from '@/cypress/support/pom/ProductsPOM';
167
+
168
+ describe('@uat @products Products Management', () => {
169
+ const pom = new ProductsPOM();
170
+
171
+ beforeEach(() => {
172
+ cy.login('admin@test.com');
173
+ });
174
+
175
+ describe('@ac1 Create Product', () => {
176
+ it('should create a new product', () => {
177
+ pom.navigateToList();
178
+ pom.clickNewProduct();
179
+ pom.fillForm({
180
+ name: 'New Product',
181
+ price: '49.99',
182
+ description: 'Test description'
183
+ });
184
+ pom.submitForm();
185
+ pom.verifySuccessToast('Product created');
186
+ });
187
+ });
188
+
189
+ describe('@ac4 List Products', () => {
190
+ it('should display products with pagination', () => {
191
+ pom.navigateToList();
192
+ pom.verifyProductsDisplayed();
193
+ pom.verifyPaginationControls();
194
+ pom.goToNextPage();
195
+ pom.verifyPageChanged();
196
+ });
197
+ });
198
+ });
199
+ ```
200
+
201
+ ─────────────────────────────────────────
202
+
203
+ ✅ SELECTOR VALIDATION
204
+
205
+ - [x] data-cy="products-list" exists
206
+ - [x] data-cy="new-product-btn" exists
207
+ - [x] data-cy="product-form" exists
208
+ - [x] data-cy="submit-btn" exists
209
+
210
+ ─────────────────────────────────────────
211
+
212
+ 📊 SUMMARY
213
+
214
+ Files created:
215
+ ├─ cypress/e2e/api/products.cy.ts (12 tests)
216
+ ├─ cypress/e2e/uat/products.cy.ts (8 tests)
217
+ └─ cypress/support/pom/ProductsPOM.ts
218
+
219
+ Total tests: 20
220
+ ACs covered: 5/5
221
+
222
+ Next: /session:test:run to execute tests
223
+ ```
224
+
225
+ ---
226
+
227
+ ## Options
228
+
229
+ | Option | Description |
230
+ |--------|-------------|
231
+ | `--type <type>` | api, uat, or both (default: both) |
232
+ | `--ac <number>` | Generate for specific AC |
233
+ | `--from-pom` | Use existing POM without changes |
234
+
235
+ ---
236
+
237
+ ## Related Commands
238
+
239
+ | Command | Action |
240
+ |---------|--------|
241
+ | `/session:test:run` | Run the tests |
242
+ | `/session:test:fix` | Fix failing tests |