@sun-asterisk/sungen 3.2.2 → 3.2.3-beta.3

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 (355) hide show
  1. package/dist/capabilities/discover.d.ts.map +1 -1
  2. package/dist/capabilities/discover.js +26 -3
  3. package/dist/capabilities/discover.js.map +1 -1
  4. package/dist/cli/commands/add-flow.d.ts.map +1 -1
  5. package/dist/cli/commands/add-flow.js +2 -0
  6. package/dist/cli/commands/add-flow.js.map +1 -1
  7. package/dist/cli/commands/add.d.ts.map +1 -1
  8. package/dist/cli/commands/add.js +4 -0
  9. package/dist/cli/commands/add.js.map +1 -1
  10. package/dist/cli/commands/capability.d.ts.map +1 -1
  11. package/dist/cli/commands/capability.js +61 -0
  12. package/dist/cli/commands/capability.js.map +1 -1
  13. package/dist/cli/commands/delivery.d.ts.map +1 -1
  14. package/dist/cli/commands/delivery.js +89 -2
  15. package/dist/cli/commands/delivery.js.map +1 -1
  16. package/dist/cli/commands/eval.js +3 -3
  17. package/dist/cli/commands/eval.js.map +1 -1
  18. package/dist/cli/commands/gate.d.ts +3 -0
  19. package/dist/cli/commands/gate.d.ts.map +1 -0
  20. package/dist/cli/commands/gate.js +83 -0
  21. package/dist/cli/commands/gate.js.map +1 -0
  22. package/dist/cli/commands/generate.d.ts.map +1 -1
  23. package/dist/cli/commands/generate.js +2 -1
  24. package/dist/cli/commands/generate.js.map +1 -1
  25. package/dist/cli/commands/init.d.ts.map +1 -1
  26. package/dist/cli/commands/init.js +32 -2
  27. package/dist/cli/commands/init.js.map +1 -1
  28. package/dist/cli/commands/journey.d.ts +3 -0
  29. package/dist/cli/commands/journey.d.ts.map +1 -0
  30. package/dist/cli/commands/journey.js +114 -0
  31. package/dist/cli/commands/journey.js.map +1 -0
  32. package/dist/cli/commands/update.d.ts.map +1 -1
  33. package/dist/cli/commands/update.js +10 -3
  34. package/dist/cli/commands/update.js.map +1 -1
  35. package/dist/cli/index.js +4 -0
  36. package/dist/cli/index.js.map +1 -1
  37. package/dist/dashboard/snapshot-builder.d.ts.map +1 -1
  38. package/dist/dashboard/snapshot-builder.js +10 -1
  39. package/dist/dashboard/snapshot-builder.js.map +1 -1
  40. package/dist/exporters/csv-exporter.d.ts.map +1 -1
  41. package/dist/exporters/csv-exporter.js +3 -1
  42. package/dist/exporters/csv-exporter.js.map +1 -1
  43. package/dist/exporters/json-exporter.js +3 -1
  44. package/dist/exporters/json-exporter.js.map +1 -1
  45. package/dist/exporters/mobile-app-id.d.ts +22 -0
  46. package/dist/exporters/mobile-app-id.d.ts.map +1 -0
  47. package/dist/exporters/mobile-app-id.js +37 -0
  48. package/dist/exporters/mobile-app-id.js.map +1 -0
  49. package/dist/exporters/spec-parser.d.ts.map +1 -1
  50. package/dist/exporters/spec-parser.js +6 -2
  51. package/dist/exporters/spec-parser.js.map +1 -1
  52. package/dist/generators/test-generator/adapters/adapter-interface.d.ts +3 -0
  53. package/dist/generators/test-generator/adapters/adapter-interface.d.ts.map +1 -1
  54. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/scroll-action.hbs +7 -4
  55. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/toggle-action.hbs +20 -3
  56. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/checked-assertion.hbs +4 -1
  57. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/not-checked-assertion.hbs +4 -1
  58. package/dist/generators/test-generator/adapters/appium/templates/test-file.hbs +3 -0
  59. package/dist/generators/test-generator/code-generator.d.ts.map +1 -1
  60. package/dist/generators/test-generator/code-generator.js +48 -9
  61. package/dist/generators/test-generator/code-generator.js.map +1 -1
  62. package/dist/generators/test-generator/template-engine.d.ts +3 -0
  63. package/dist/generators/test-generator/template-engine.d.ts.map +1 -1
  64. package/dist/generators/test-generator/template-engine.js +11 -1
  65. package/dist/generators/test-generator/template-engine.js.map +1 -1
  66. package/dist/generators/test-generator/utils/selector-resolver.d.ts +11 -1
  67. package/dist/generators/test-generator/utils/selector-resolver.d.ts.map +1 -1
  68. package/dist/generators/test-generator/utils/selector-resolver.js +33 -0
  69. package/dist/generators/test-generator/utils/selector-resolver.js.map +1 -1
  70. package/dist/harness/audit.d.ts.map +1 -1
  71. package/dist/harness/audit.js +8 -1
  72. package/dist/harness/audit.js.map +1 -1
  73. package/dist/harness/catalog/universal-viewpoints.yaml +15 -0
  74. package/dist/harness/eval/skill-lint.d.ts +3 -3
  75. package/dist/harness/eval/skill-lint.d.ts.map +1 -1
  76. package/dist/harness/eval/skill-lint.js +88 -68
  77. package/dist/harness/eval/skill-lint.js.map +1 -1
  78. package/dist/harness/journey.d.ts +88 -0
  79. package/dist/harness/journey.d.ts.map +1 -0
  80. package/dist/harness/journey.js +414 -0
  81. package/dist/harness/journey.js.map +1 -0
  82. package/dist/harness/quality-gates.d.ts +13 -0
  83. package/dist/harness/quality-gates.d.ts.map +1 -1
  84. package/dist/harness/quality-gates.js +23 -0
  85. package/dist/harness/quality-gates.js.map +1 -1
  86. package/dist/harness/sensors.d.ts +1 -1
  87. package/dist/harness/sensors.d.ts.map +1 -1
  88. package/dist/harness/sensors.js +32 -9
  89. package/dist/harness/sensors.js.map +1 -1
  90. package/dist/orchestrator/ai-rules-updater.d.ts +11 -3
  91. package/dist/orchestrator/ai-rules-updater.d.ts.map +1 -1
  92. package/dist/orchestrator/ai-rules-updater.js +44 -180
  93. package/dist/orchestrator/ai-rules-updater.js.map +1 -1
  94. package/dist/orchestrator/ai-skills/adapters.d.ts +28 -0
  95. package/dist/orchestrator/ai-skills/adapters.d.ts.map +1 -0
  96. package/dist/orchestrator/ai-skills/adapters.js +34 -0
  97. package/dist/orchestrator/ai-skills/adapters.js.map +1 -0
  98. package/dist/orchestrator/ai-skills/build.d.ts +10 -0
  99. package/dist/orchestrator/ai-skills/build.d.ts.map +1 -0
  100. package/dist/orchestrator/ai-skills/build.js +128 -0
  101. package/dist/orchestrator/ai-skills/build.js.map +1 -0
  102. package/dist/orchestrator/ai-skills/cap-stripper.d.ts +27 -0
  103. package/dist/orchestrator/ai-skills/cap-stripper.d.ts.map +1 -0
  104. package/dist/orchestrator/ai-skills/cap-stripper.js +78 -0
  105. package/dist/orchestrator/ai-skills/cap-stripper.js.map +1 -0
  106. package/dist/orchestrator/ai-skills/commands.d.ts +22 -0
  107. package/dist/orchestrator/ai-skills/commands.d.ts.map +1 -0
  108. package/dist/orchestrator/ai-skills/commands.js +109 -0
  109. package/dist/orchestrator/ai-skills/commands.js.map +1 -0
  110. package/dist/orchestrator/ai-skills/generator.d.ts +23 -0
  111. package/dist/orchestrator/ai-skills/generator.d.ts.map +1 -0
  112. package/dist/orchestrator/ai-skills/generator.js +79 -0
  113. package/dist/orchestrator/ai-skills/generator.js.map +1 -0
  114. package/dist/orchestrator/ai-skills/golden-skills.test.d.ts +2 -0
  115. package/dist/orchestrator/ai-skills/golden-skills.test.d.ts.map +1 -0
  116. package/dist/orchestrator/ai-skills/golden-skills.test.js +183 -0
  117. package/dist/orchestrator/ai-skills/golden-skills.test.js.map +1 -0
  118. package/dist/orchestrator/ai-skills/resolve-assistants.d.ts +8 -0
  119. package/dist/orchestrator/ai-skills/resolve-assistants.d.ts.map +1 -0
  120. package/dist/orchestrator/ai-skills/resolve-assistants.js +28 -0
  121. package/dist/orchestrator/ai-skills/resolve-assistants.js.map +1 -0
  122. package/dist/orchestrator/ai-skills/writer.d.ts +15 -0
  123. package/dist/orchestrator/ai-skills/writer.d.ts.map +1 -0
  124. package/dist/orchestrator/ai-skills/writer.js +129 -0
  125. package/dist/orchestrator/ai-skills/writer.js.map +1 -0
  126. package/dist/orchestrator/flow-manager.d.ts +11 -0
  127. package/dist/orchestrator/flow-manager.d.ts.map +1 -1
  128. package/dist/orchestrator/flow-manager.js +147 -29
  129. package/dist/orchestrator/flow-manager.js.map +1 -1
  130. package/dist/orchestrator/mobile-runtime-scaffolder.d.ts +59 -0
  131. package/dist/orchestrator/mobile-runtime-scaffolder.d.ts.map +1 -0
  132. package/dist/orchestrator/mobile-runtime-scaffolder.js +298 -0
  133. package/dist/orchestrator/mobile-runtime-scaffolder.js.map +1 -0
  134. package/dist/orchestrator/project-initializer.d.ts +44 -7
  135. package/dist/orchestrator/project-initializer.d.ts.map +1 -1
  136. package/dist/orchestrator/project-initializer.js +147 -79
  137. package/dist/orchestrator/project-initializer.js.map +1 -1
  138. package/dist/orchestrator/screen-manager.d.ts +30 -0
  139. package/dist/orchestrator/screen-manager.d.ts.map +1 -1
  140. package/dist/orchestrator/screen-manager.js +205 -22
  141. package/dist/orchestrator/screen-manager.js.map +1 -1
  142. package/dist/orchestrator/templates/ai-src/README.md +58 -0
  143. package/dist/orchestrator/templates/{ai-instructions/claude-cmd-add-flow.md → ai-src/commands/add-flow.md} +63 -2
  144. package/dist/orchestrator/templates/{ai-instructions/claude-cmd-add-screen.md → ai-src/commands/add-screen.md} +171 -6
  145. package/dist/orchestrator/templates/{ai-instructions/claude-cmd-create-test.md → ai-src/commands/create-test.md} +118 -4
  146. package/{src/orchestrator/templates/ai-instructions/claude-cmd-dashboard.md → dist/orchestrator/templates/ai-src/commands/dashboard.md} +25 -3
  147. package/{src/orchestrator/templates/ai-instructions/claude-cmd-delivery.md → dist/orchestrator/templates/ai-src/commands/delivery.md} +67 -3
  148. package/dist/orchestrator/templates/ai-src/commands/design.md +29 -0
  149. package/{src/orchestrator/templates/ai-instructions/claude-cmd-feedback.md → dist/orchestrator/templates/ai-src/commands/feedback.md} +34 -3
  150. package/dist/orchestrator/templates/{ai-instructions/claude-cmd-locale.md → ai-src/commands/locale.md} +56 -4
  151. package/{src/orchestrator/templates/ai-instructions/claude-cmd-review.md → dist/orchestrator/templates/ai-src/commands/review.md} +57 -2
  152. package/{src/orchestrator/templates/ai-instructions/claude-cmd-run-test.md → dist/orchestrator/templates/ai-src/commands/run-test.md} +116 -5
  153. package/dist/orchestrator/templates/ai-src/config/codex.md +8 -0
  154. package/{src/orchestrator/templates/ai-instructions/claude-skill-capture-mobile.md → dist/orchestrator/templates/ai-src/skills/sungen-capture-mobile/SKILL.md} +11 -0
  155. package/dist/orchestrator/templates/{ai-instructions/github-skill-sungen-error-mapping.md → ai-src/skills/sungen-error-mapping/SKILL.md} +49 -9
  156. package/{src/orchestrator/templates/ai-instructions/claude-skill-harness-audit.md → dist/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md} +5 -5
  157. package/{src/orchestrator/templates/ai-instructions/claude-skill-locale.md → dist/orchestrator/templates/ai-src/skills/sungen-locale/SKILL.md} +275 -3
  158. package/{src/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix.md → dist/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md} +17 -0
  159. package/dist/orchestrator/templates/{ai-instructions/claude-skill-selector-fix-mobile.md → ai-src/skills/sungen-selector-fix-mobile/SKILL.md} +5 -0
  160. package/dist/orchestrator/templates/{ai-instructions/claude-skill-tc-generation.md → ai-src/skills/sungen-tc-generation/SKILL.md} +5 -0
  161. package/dist/orchestrator/templates/playwright.config.ts +7 -4
  162. package/package.json +3 -3
  163. package/src/capabilities/discover.ts +29 -3
  164. package/src/cli/commands/add-flow.ts +2 -0
  165. package/src/cli/commands/add.ts +4 -0
  166. package/src/cli/commands/capability.ts +64 -1
  167. package/src/cli/commands/delivery.ts +89 -2
  168. package/src/cli/commands/eval.ts +3 -3
  169. package/src/cli/commands/gate.ts +44 -0
  170. package/src/cli/commands/generate.ts +2 -1
  171. package/src/cli/commands/init.ts +50 -3
  172. package/src/cli/commands/journey.ts +72 -0
  173. package/src/cli/commands/update.ts +14 -4
  174. package/src/cli/index.ts +4 -0
  175. package/src/dashboard/snapshot-builder.ts +10 -1
  176. package/src/exporters/csv-exporter.ts +3 -1
  177. package/src/exporters/json-exporter.ts +3 -1
  178. package/src/exporters/mobile-app-id.ts +34 -0
  179. package/src/exporters/spec-parser.ts +6 -2
  180. package/src/generators/test-generator/adapters/adapter-interface.ts +3 -0
  181. package/src/generators/test-generator/adapters/appium/templates/steps/actions/scroll-action.hbs +7 -4
  182. package/src/generators/test-generator/adapters/appium/templates/steps/actions/toggle-action.hbs +20 -3
  183. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/checked-assertion.hbs +4 -1
  184. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/not-checked-assertion.hbs +4 -1
  185. package/src/generators/test-generator/adapters/appium/templates/test-file.hbs +3 -0
  186. package/src/generators/test-generator/code-generator.ts +49 -9
  187. package/src/generators/test-generator/template-engine.ts +14 -1
  188. package/src/generators/test-generator/utils/selector-resolver.ts +51 -1
  189. package/src/harness/audit.ts +9 -2
  190. package/src/harness/catalog/universal-viewpoints.yaml +15 -0
  191. package/src/harness/eval/skill-lint.ts +71 -60
  192. package/src/harness/journey.ts +434 -0
  193. package/src/harness/quality-gates.ts +20 -0
  194. package/src/harness/sensors.ts +25 -8
  195. package/src/orchestrator/ai-rules-updater.ts +35 -197
  196. package/src/orchestrator/ai-skills/adapters.ts +52 -0
  197. package/src/orchestrator/ai-skills/build.ts +103 -0
  198. package/src/orchestrator/ai-skills/cap-stripper.ts +85 -0
  199. package/src/orchestrator/ai-skills/commands.ts +112 -0
  200. package/src/orchestrator/ai-skills/generator.ts +47 -0
  201. package/src/orchestrator/ai-skills/golden-skills.test.ts +124 -0
  202. package/src/orchestrator/ai-skills/resolve-assistants.ts +18 -0
  203. package/src/orchestrator/ai-skills/writer.ts +92 -0
  204. package/src/orchestrator/flow-manager.ts +165 -29
  205. package/src/orchestrator/mobile-runtime-scaffolder.ts +277 -0
  206. package/src/orchestrator/project-initializer.ts +159 -86
  207. package/src/orchestrator/screen-manager.ts +237 -22
  208. package/src/orchestrator/templates/ai-src/README.md +58 -0
  209. package/src/orchestrator/templates/{ai-instructions/claude-cmd-add-flow.md → ai-src/commands/add-flow.md} +63 -2
  210. package/src/orchestrator/templates/{ai-instructions/claude-cmd-add-screen.md → ai-src/commands/add-screen.md} +171 -6
  211. package/src/orchestrator/templates/{ai-instructions/claude-cmd-create-test.md → ai-src/commands/create-test.md} +118 -4
  212. package/{dist/orchestrator/templates/ai-instructions/claude-cmd-dashboard.md → src/orchestrator/templates/ai-src/commands/dashboard.md} +25 -3
  213. package/{dist/orchestrator/templates/ai-instructions/claude-cmd-delivery.md → src/orchestrator/templates/ai-src/commands/delivery.md} +67 -3
  214. package/src/orchestrator/templates/ai-src/commands/design.md +29 -0
  215. package/{dist/orchestrator/templates/ai-instructions/claude-cmd-feedback.md → src/orchestrator/templates/ai-src/commands/feedback.md} +34 -3
  216. package/src/orchestrator/templates/{ai-instructions/claude-cmd-locale.md → ai-src/commands/locale.md} +56 -4
  217. package/{dist/orchestrator/templates/ai-instructions/claude-cmd-review.md → src/orchestrator/templates/ai-src/commands/review.md} +57 -2
  218. package/{dist/orchestrator/templates/ai-instructions/claude-cmd-run-test.md → src/orchestrator/templates/ai-src/commands/run-test.md} +116 -5
  219. package/src/orchestrator/templates/ai-src/config/codex.md +8 -0
  220. package/{dist/orchestrator/templates/ai-instructions/claude-skill-capture-mobile.md → src/orchestrator/templates/ai-src/skills/sungen-capture-mobile/SKILL.md} +11 -0
  221. package/{dist/orchestrator/templates/ai-instructions/claude-skill-error-mapping.md → src/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md} +49 -9
  222. package/{dist/orchestrator/templates/ai-instructions/claude-skill-harness-audit.md → src/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md} +5 -5
  223. package/{dist/orchestrator/templates/ai-instructions/claude-skill-locale.md → src/orchestrator/templates/ai-src/skills/sungen-locale/SKILL.md} +275 -3
  224. package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix.md → src/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md} +17 -0
  225. package/src/orchestrator/templates/{ai-instructions/claude-skill-selector-fix-mobile.md → ai-src/skills/sungen-selector-fix-mobile/SKILL.md} +5 -0
  226. package/src/orchestrator/templates/{ai-instructions/claude-skill-tc-generation.md → ai-src/skills/sungen-tc-generation/SKILL.md} +5 -0
  227. package/src/orchestrator/templates/playwright.config.ts +7 -4
  228. package/dist/orchestrator/templates/ai-instructions/claude-cmd-design.md +0 -12
  229. package/dist/orchestrator/templates/ai-instructions/claude-skill-selector-fix.md +0 -347
  230. package/dist/orchestrator/templates/ai-instructions/copilot-cmd-add-flow.md +0 -86
  231. package/dist/orchestrator/templates/ai-instructions/copilot-cmd-add-screen.md +0 -131
  232. package/dist/orchestrator/templates/ai-instructions/copilot-cmd-create-test.md +0 -93
  233. package/dist/orchestrator/templates/ai-instructions/copilot-cmd-dashboard.md +0 -65
  234. package/dist/orchestrator/templates/ai-instructions/copilot-cmd-delivery.md +0 -83
  235. package/dist/orchestrator/templates/ai-instructions/copilot-cmd-design.md +0 -13
  236. package/dist/orchestrator/templates/ai-instructions/copilot-cmd-feedback.md +0 -24
  237. package/dist/orchestrator/templates/ai-instructions/copilot-cmd-locale.md +0 -70
  238. package/dist/orchestrator/templates/ai-instructions/copilot-cmd-review.md +0 -38
  239. package/dist/orchestrator/templates/ai-instructions/copilot-cmd-run-test.md +0 -155
  240. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mobile.md +0 -184
  241. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-harness-audit.md +0 -85
  242. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-locale.md +0 -291
  243. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix-mobile.md +0 -316
  244. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-selector-keys.md +0 -221
  245. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +0 -617
  246. package/src/orchestrator/templates/ai-instructions/claude-cmd-design.md +0 -12
  247. package/src/orchestrator/templates/ai-instructions/claude-skill-api-design.md +0 -62
  248. package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-figma-mcp.md +0 -82
  249. package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-figma-pat.md +0 -117
  250. package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-live.md +0 -60
  251. package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mode-local.md +0 -38
  252. package/src/orchestrator/templates/ai-instructions/claude-skill-capture.md +0 -35
  253. package/src/orchestrator/templates/ai-instructions/claude-skill-dashboard.md +0 -121
  254. package/src/orchestrator/templates/ai-instructions/claude-skill-delivery.md +0 -141
  255. package/src/orchestrator/templates/ai-instructions/claude-skill-error-mapping.md +0 -157
  256. package/src/orchestrator/templates/ai-instructions/claude-skill-gherkin-syntax.md +0 -446
  257. package/src/orchestrator/templates/ai-instructions/claude-skill-ingest-legacy.md +0 -79
  258. package/src/orchestrator/templates/ai-instructions/claude-skill-mobile-gestures.md +0 -109
  259. package/src/orchestrator/templates/ai-instructions/claude-skill-selector-fix.md +0 -347
  260. package/src/orchestrator/templates/ai-instructions/claude-skill-tc-review.md +0 -320
  261. package/src/orchestrator/templates/ai-instructions/claude-skill-test-design-techniques.md +0 -118
  262. package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-a-data-entry.md +0 -203
  263. package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-b-data-ops.md +0 -179
  264. package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-c-data-explore.md +0 -233
  265. package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-d-display.md +0 -226
  266. package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-e-identity.md +0 -177
  267. package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint.md +0 -118
  268. package/src/orchestrator/templates/ai-instructions/copilot-cmd-add-flow.md +0 -86
  269. package/src/orchestrator/templates/ai-instructions/copilot-cmd-add-screen.md +0 -131
  270. package/src/orchestrator/templates/ai-instructions/copilot-cmd-create-test.md +0 -93
  271. package/src/orchestrator/templates/ai-instructions/copilot-cmd-dashboard.md +0 -65
  272. package/src/orchestrator/templates/ai-instructions/copilot-cmd-delivery.md +0 -83
  273. package/src/orchestrator/templates/ai-instructions/copilot-cmd-design.md +0 -13
  274. package/src/orchestrator/templates/ai-instructions/copilot-cmd-feedback.md +0 -24
  275. package/src/orchestrator/templates/ai-instructions/copilot-cmd-locale.md +0 -70
  276. package/src/orchestrator/templates/ai-instructions/copilot-cmd-review.md +0 -38
  277. package/src/orchestrator/templates/ai-instructions/copilot-cmd-run-test.md +0 -155
  278. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-api-design.md +0 -62
  279. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mobile.md +0 -184
  280. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-mcp.md +0 -82
  281. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-pat.md +0 -117
  282. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-live.md +0 -60
  283. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-local.md +0 -38
  284. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture.md +0 -35
  285. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-dashboard.md +0 -121
  286. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md +0 -141
  287. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-error-mapping.md +0 -157
  288. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md +0 -446
  289. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-harness-audit.md +0 -85
  290. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-ingest-legacy.md +0 -79
  291. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-locale.md +0 -291
  292. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-mobile-gestures.md +0 -109
  293. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix-mobile.md +0 -316
  294. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-selector-keys.md +0 -221
  295. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +0 -617
  296. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-tc-review.md +0 -320
  297. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-test-design-techniques.md +0 -118
  298. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-a-data-entry.md +0 -203
  299. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-b-data-ops.md +0 -179
  300. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-c-data-explore.md +0 -233
  301. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-d-display.md +0 -226
  302. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-e-identity.md +0 -177
  303. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint.md +0 -118
  304. /package/dist/orchestrator/templates/{ai-instructions/claude-agent-challenge.md → ai-src/agents/challenge.md} +0 -0
  305. /package/dist/orchestrator/templates/{ai-instructions/claude-agent-discovery.md → ai-src/agents/discovery.md} +0 -0
  306. /package/dist/orchestrator/templates/{ai-instructions/claude-agent-generator.md → ai-src/agents/generator.md} +0 -0
  307. /package/dist/orchestrator/templates/{ai-instructions/claude-agent-reviewer.md → ai-src/agents/reviewer.md} +0 -0
  308. /package/dist/orchestrator/templates/{ai-instructions/claude-config.md → ai-src/config/claude.md} +0 -0
  309. /package/dist/orchestrator/templates/{ai-instructions/copilot-config.md → ai-src/config/copilot.md} +0 -0
  310. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-api-design.md → ai-src/skills/sungen-api-design/SKILL.md} +0 -0
  311. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture.md → ai-src/skills/sungen-capture/SKILL.md} +0 -0
  312. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-figma-mcp.md → ai-src/skills/sungen-capture/mode-figma-mcp.md} +0 -0
  313. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-figma-pat.md → ai-src/skills/sungen-capture/mode-figma-pat.md} +0 -0
  314. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-live.md → ai-src/skills/sungen-capture/mode-live.md} +0 -0
  315. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-capture-mode-local.md → ai-src/skills/sungen-capture/mode-local.md} +0 -0
  316. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-dashboard.md → ai-src/skills/sungen-dashboard/SKILL.md} +0 -0
  317. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-delivery.md → ai-src/skills/sungen-delivery/SKILL.md} +0 -0
  318. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-gherkin-syntax.md → ai-src/skills/sungen-gherkin-syntax/SKILL.md} +0 -0
  319. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-ingest-legacy.md → ai-src/skills/sungen-ingest-legacy/SKILL.md} +0 -0
  320. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-mobile-gestures.md → ai-src/skills/sungen-mobile-gestures/SKILL.md} +0 -0
  321. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-selector-keys.md → ai-src/skills/sungen-selector-keys/SKILL.md} +0 -0
  322. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-tc-review.md → ai-src/skills/sungen-tc-review/SKILL.md} +0 -0
  323. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-test-design-techniques.md → ai-src/skills/sungen-test-design-techniques/SKILL.md} +0 -0
  324. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint.md → ai-src/skills/sungen-viewpoint/SKILL.md} +0 -0
  325. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-a-data-entry.md → ai-src/skills/sungen-viewpoint/group-a-data-entry.md} +0 -0
  326. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-b-data-ops.md → ai-src/skills/sungen-viewpoint/group-b-data-ops.md} +0 -0
  327. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-c-data-explore.md → ai-src/skills/sungen-viewpoint/group-c-data-explore.md} +0 -0
  328. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-d-display.md → ai-src/skills/sungen-viewpoint/group-d-display.md} +0 -0
  329. /package/dist/orchestrator/templates/{ai-instructions/claude-skill-viewpoint-group-e-identity.md → ai-src/skills/sungen-viewpoint/group-e-identity.md} +0 -0
  330. /package/src/orchestrator/templates/{ai-instructions/claude-agent-challenge.md → ai-src/agents/challenge.md} +0 -0
  331. /package/src/orchestrator/templates/{ai-instructions/claude-agent-discovery.md → ai-src/agents/discovery.md} +0 -0
  332. /package/src/orchestrator/templates/{ai-instructions/claude-agent-generator.md → ai-src/agents/generator.md} +0 -0
  333. /package/src/orchestrator/templates/{ai-instructions/claude-agent-reviewer.md → ai-src/agents/reviewer.md} +0 -0
  334. /package/src/orchestrator/templates/{ai-instructions/claude-config.md → ai-src/config/claude.md} +0 -0
  335. /package/src/orchestrator/templates/{ai-instructions/copilot-config.md → ai-src/config/copilot.md} +0 -0
  336. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-api-design.md → src/orchestrator/templates/ai-src/skills/sungen-api-design/SKILL.md} +0 -0
  337. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture.md → src/orchestrator/templates/ai-src/skills/sungen-capture/SKILL.md} +0 -0
  338. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-mcp.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-figma-mcp.md} +0 -0
  339. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-figma-pat.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-figma-pat.md} +0 -0
  340. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-live.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-live.md} +0 -0
  341. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mode-local.md → src/orchestrator/templates/ai-src/skills/sungen-capture/mode-local.md} +0 -0
  342. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-dashboard.md → src/orchestrator/templates/ai-src/skills/sungen-dashboard/SKILL.md} +0 -0
  343. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md → src/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md} +0 -0
  344. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md → src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md} +0 -0
  345. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-ingest-legacy.md → src/orchestrator/templates/ai-src/skills/sungen-ingest-legacy/SKILL.md} +0 -0
  346. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-mobile-gestures.md → src/orchestrator/templates/ai-src/skills/sungen-mobile-gestures/SKILL.md} +0 -0
  347. /package/src/orchestrator/templates/{ai-instructions/claude-skill-selector-keys.md → ai-src/skills/sungen-selector-keys/SKILL.md} +0 -0
  348. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-tc-review.md → src/orchestrator/templates/ai-src/skills/sungen-tc-review/SKILL.md} +0 -0
  349. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-test-design-techniques.md → src/orchestrator/templates/ai-src/skills/sungen-test-design-techniques/SKILL.md} +0 -0
  350. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/SKILL.md} +0 -0
  351. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-a-data-entry.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-a-data-entry.md} +0 -0
  352. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-b-data-ops.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-b-data-ops.md} +0 -0
  353. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-c-data-explore.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-c-data-explore.md} +0 -0
  354. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-d-display.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-d-display.md} +0 -0
  355. /package/{dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-e-identity.md → src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-e-identity.md} +0 -0
@@ -1,64 +1,148 @@
1
1
  ---
2
2
  name: add-screen
3
- description: 'Add a new Sungen screen or a sub-feature to an existing one — scaffolds directories, helps fill spec.md, and can capture visuals from Figma (pre-launch) or live page via the capture skills'
4
- argument-hint: "[screen-name] [url-path] [--feature <name>] [--figma <url>]"
5
- allowed-tools: Read, Grep, Bash, Glob, Edit, Write, AskUserQuestion, mcp__playwright__browser_navigate, mcp__playwright__browser_take_screenshot, mcp__playwright__browser_snapshot, mcp__figma__get_design_context, mcp__figma__get_variable_defs, mcp__figma__get_screenshot
3
+ description: "Add a new Sungen screen or a sub-feature to an existing one — scaffolds directories, helps fill spec.md, and can capture visuals via Figma (pre-launch) or Playwright MCP (web) / Appium MCP (mobile)"
4
+ argument-hint: "[screen-name] [url-path] [--feature <name>] [--figma <url>] [--reach <steps>] [--platform android|ios]"
5
+ order: 10
6
+ claude-tools: "Read, Grep, Bash, Glob, Edit, Write, AskUserQuestion, mcp__playwright__browser_navigate, mcp__playwright__browser_take_screenshot, mcp__playwright__browser_snapshot, mcp__figma__get_design_context, mcp__figma__get_variable_defs, mcp__figma__get_screenshot"
7
+ copilot-tools: "[vscode, execute, read, agent, edit, search, web, browser, todo, 'playwright/*']"
8
+ codex-trigger: "Run when the user asks to add or scaffold a NEW screen/page to test. Step 1 of the sungen workflow. Do NOT use for flows, creating test cases, or running tests."
6
9
  ---
10
+ {{^cap parallel-subagents}}
11
+ **Input**: Screen name and URL path (e.g., `/sungen-add-screen login /login`).
12
+ Optionally include a Figma URL: `/sungen-add-screen login /login --figma https://www.figma.com/design/...`.
13
+ To add a sub-feature file to an existing screen: `/sungen-add-screen awards --feature modal`.
7
14
 
15
+ {{/cap}}
8
16
  You are adding a new Sungen screen for test generation, or extending an existing screen with an additional `.feature` file (sub-feature).
9
17
 
10
18
  ## Parameters
11
19
 
20
+ {{#cap parallel-subagents}}
12
21
  Parse from `$ARGUMENTS`:
13
22
  - **screen** — screen name (e.g., `login`, `dashboard`, `settings`)
14
23
  - **path** — URL path (e.g., `/login`, `/dashboard`, `/settings`) - optional when `--figma` is provided or when adding a sub-feature to an existing screen
15
24
  - **`--feature <name>`** — sub-feature name to add to an existing screen (e.g., `modal`, `filter`, `create-flow`). Creates `<screen>-<feature>.feature` + matching `selectors/<screen>-<feature>.yaml` + `test-data/<screen>-<feature>.yaml` without touching the screen's other files. Use this when one screen has multiple `.feature` files (e.g. main listing + modal + filter panel).
25
+ {{/cap}}
26
+ {{^cap parallel-subagents}}
27
+ - **screen** — ${input:screen:screen name (e.g., login, dashboard)}
28
+ - **path** — ${input:path:URL path (e.g., /login, /dashboard)} — optional when --figma is provided or when adding a sub-feature
29
+ - **`--feature <name>`** — sub-feature name to add to an existing screen (e.g., `modal`, `filter`, `create-flow`). Creates `<screen>-<feature>.feature` + matching `selectors/<screen>-<feature>.yaml` + `test-data/<screen>-<feature>.yaml` without touching the screen's other files. Use this when one screen has multiple `.feature` files.
30
+ {{/cap}}
16
31
  - **`--figma <url>`** — Figma share URL (optional)
32
+ {{#cap parallel-subagents}}
17
33
  - **`--refresh`** — bypass Figma cache and re-fetch (optional, use with `--figma`)
34
+ {{/cap}}
35
+ {{^cap parallel-subagents}}
36
+ - **`--refresh`** — bypass Figma cache and re-fetch (optional, use with --figma)
37
+ {{/cap}}
18
38
  - **`--scale <n>`** — PNG export scale factor, default 2 (optional)
39
+ {{#cap parallel-subagents}}
19
40
  - **`--hi-res`** — export at 4× scale, shorthand for `--scale 4` (optional)
20
41
 
21
42
  If **screen** is missing, ask: "What is the screen name? (e.g., `login`, `dashboard`)"
22
43
  If **path** is missing and **`--feature`** is NOT used and `--figma` was NOT provided, ask: "What is the URL path? (e.g., `/login`, `/dashboard`)"
44
+ {{/cap}}
45
+ {{^cap parallel-subagents}}
46
+ - **`--hi-res`** — export at 4× scale, shorthand for --scale 4 (optional)
47
+ {{/cap}}
23
48
 
24
49
  **Mode detection** — before invoking the CLI, check whether `qa/screens/<screen>/` already exists:
25
50
  - Screen does NOT exist → fresh screen creation (need `--path` unless `--figma` provided)
26
51
  - Screen exists AND `--feature <name>` provided → sub-feature mode (skip spec.md, only generate the 3 new files)
27
52
  - Screen exists AND no `--feature` → ask the user whether they meant to add a sub-feature (offer `--feature <suggested-name>`) or refresh visuals only (with `--figma`)
28
53
 
54
+ ## Platform Detection
55
+
56
+ Read `qa/capabilities.yaml` and check the `platform` field.
57
+
58
+ - If `platform: mobile` → follow the **mobile path** (see "Mobile capture" step below, uses Appium MCP)
59
+ - If `platform: web` or field absent → follow the **web path** (standard, uses Playwright MCP)
60
+
61
+ For **mobile** projects:
62
+ - **Live capture**: use **Appium MCP** (`select_device` → `appium_session_management(create)` → `appium_screenshot`)
63
+ - **Navigation**: use `--reach "<steps>"` to describe UI navigation (e.g., `"tap [My Page] tab > tap [Settings] row"`)
64
+ - **Device platform**: Optional `--platform android|ios` (defaults to Android if omitted)
65
+
29
66
  ## Steps
30
67
 
31
68
  ### 1. Scaffold the screen (or sub-feature)
32
69
 
70
+ {{#cap parallel-subagents}}
33
71
  **Standard path (no `--figma`, no `--feature`):**
72
+ {{/cap}}
73
+ {{^cap parallel-subagents}}
74
+ **Standard path (no --figma, no --feature):**
75
+
76
+ Run with #tool:terminal:
77
+ {{/cap}}
34
78
  ```bash
79
+ {{#cap parallel-subagents}}
35
80
  sungen add --screen <screen> --path <path>
81
+ {{/cap}}
82
+ {{^cap parallel-subagents}}
83
+ sungen add --screen ${input:screen} --path ${input:path}
84
+ {{/cap}}
36
85
  ```
37
86
 
38
87
  **Sub-feature mode (`--feature <name>` provided):**
88
+ {{^cap parallel-subagents}}
89
+
90
+ Run with #tool:terminal:
91
+ {{/cap}}
39
92
  ```bash
93
+ {{#cap parallel-subagents}}
40
94
  sungen add --screen <screen> --feature <name> [--path <path>]
41
95
  # Generates qa/screens/<screen>/{features,selectors,test-data}/<screen>-<name>.{feature,yaml,yaml}
42
96
  # Existing screen files (awards.feature, spec.md, …) are untouched.
43
97
  # --path is optional — defaults to /<screen> when omitted. Pass --path only if the sub-feature lives at a different URL.
98
+ {{/cap}}
99
+ {{^cap parallel-subagents}}
100
+ sungen add --screen ${input:screen} --feature <name> [--path ${input:path}]
101
+ # Generates qa/screens/${input:screen}/{features,selectors,test-data}/${input:screen}-<name>.{feature,yaml,yaml}
102
+ # Existing screen files (spec.md, awards.feature, …) are untouched.
103
+ # --path is optional — defaults to /${input:screen} when omitted.
104
+ {{/cap}}
44
105
  ```
45
106
 
107
+ {{#cap parallel-subagents}}
46
108
  **Figma branch (when `--figma <url>` is in `$ARGUMENTS`):**
109
+ {{/cap}}
110
+ {{^cap parallel-subagents}}
111
+ **Figma branch (when --figma \<url\> is provided):**
112
+ {{/cap}}
47
113
 
114
+ {{#cap parallel-subagents}}
48
115
  Invoke the `sungen-capture` skill (mode figma-pat) by running:
116
+ {{/cap}}
117
+ {{^cap parallel-subagents}}
118
+ Run with #tool:terminal:
119
+ {{/cap}}
49
120
  ```bash
121
+ {{#cap parallel-subagents}}
50
122
  sungen add --screen <screen> --figma '<url>' [--path <path>] [--feature <name>] [--refresh] [--scale <n>]
51
123
  # Single-quote the URL — Figma links contain `&` which bash otherwise treats as a background operator.
124
+ {{/cap}}
125
+ {{^cap parallel-subagents}}
126
+ sungen add --screen ${input:screen} --figma <figma-url> [--path ${input:path}] [--feature <name>] [--refresh] [--scale <n>]
127
+ {{/cap}}
52
128
  # --feature can be combined with --figma when the new sub-feature has its own Figma frame.
53
129
  ```
54
130
 
55
131
  This CLI command automatically:
56
132
  1. Parses the Figma URL and fetches the design node.
133
+ {{#cap parallel-subagents}}
57
134
  2. Downloads frame + variant PNGs to `qa/screens/<screen>/requirements/ui/`.
58
135
  3. Writes `qa/screens/<screen>/requirements/spec_figma.md` (auto-generated, always overwritten on re-run).
59
136
  4. Creates `qa/screens/<screen>/requirements/spec.md` stub **only if the file does not already exist** — never overwrites existing human content.
137
+ {{/cap}}
138
+ {{^cap parallel-subagents}}
139
+ 2. Downloads frame + variant PNGs to `qa/screens/${input:screen}/requirements/ui/`.
140
+ 3. Writes `qa/screens/${input:screen}/requirements/spec_figma.md` (auto-generated, always overwritten on re-run).
141
+ 4. Creates `qa/screens/${input:screen}/requirements/spec.md` stub **only if the file does not already exist** — never overwrites existing human content.
142
+ {{/cap}}
60
143
 
61
144
  **Important coexistence rules:**
145
+ {{#cap parallel-subagents}}
62
146
  - `--figma` and `--path` can be passed together: `--path` provides the live URL for `run-test`; `--figma` provides design context.
63
147
  - `spec.md` is the human-authored source of truth. Never modify it automatically.
64
148
  - `spec_figma.md` is auto-generated — always overwritten; tell the user to copy useful sections into `spec.md`.
@@ -66,56 +150,137 @@ This CLI command automatically:
66
150
 
67
151
  **If Figma auth is missing**, the command will fail with a message like:
68
152
  > Figma PAT is not configured. Run: sungen figma auth set
69
-
153
+ {{/cap}}
154
+ {{^cap parallel-subagents}}
155
+ - `--figma` and `--path` can be passed together.
156
+ - `spec.md` is the human-authored source of truth — never modify it automatically.
157
+ - `spec_figma.md` is auto-generated — tell the user to copy useful sections into `spec.md`.
158
+ - `--capture` (Playwright screenshot) and `--figma` can be used simultaneously.
159
+ {{/cap}}
160
+
161
+ {{#cap parallel-subagents}}
70
162
  In that case, guide the user to run `sungen figma auth set` and retry.
163
+ {{/cap}}
164
+ {{^cap parallel-subagents}}
165
+ **If Figma auth is missing**, guide the user to run `sungen figma auth set` and retry.
166
+ {{/cap}}
71
167
 
72
168
  ### 1a. Synthesize narrative sections (Figma branch only)
73
169
 
170
+ {{#cap parallel-subagents}}
74
171
  After `sungen add --figma` succeeds, the envelope of `spec_figma.md` is deterministic but the narrative below the `<!-- SYNTHESIS-BELOW -->` marker is empty. Invoke the `sungen-capture` skill (mode figma-pat) to fill it:
172
+ {{/cap}}
173
+ {{^cap parallel-subagents}}
174
+ After `sungen add --figma` succeeds, the envelope of `spec_figma.md` is deterministic but the narrative below the `<!-- SYNTHESIS-BELOW -->` marker is empty. Invoke the `sungen-capture` skill (mode figma-pat):
175
+ {{/cap}}
75
176
 
177
+ {{#cap parallel-subagents}}
76
178
  1. Read `qa/screens/<screen>/requirements/spec_figma.md` — note `file_key`, `node_id`, `figma_version_id` from frontmatter.
179
+ {{/cap}}
180
+ {{^cap parallel-subagents}}
181
+ 1. Read `qa/screens/${input:screen}/requirements/spec_figma.md` frontmatter for `file_key`, `node_id`, `figma_version_id`.
182
+ {{/cap}}
77
183
  2. Read the cached raw node JSON at `.sungen/figma-cache/<file_key>/<figma_version_id>/<safe_node_id>-raw.json` (colons in node_id become underscores).
78
184
  3. Follow the skill's 7-section template (Purpose / ASCII Layout / Regions / Actions / Form Fields / Data Columns / Navigation) and **replace** everything from the marker to EOF.
79
185
  4. Preserve the envelope above the marker byte-for-byte.
80
186
 
187
+ {{#cap parallel-subagents}}
81
188
  **Review gate.** Before moving on, show the user the synthesized narrative and use `AskUserQuestion`:
189
+ {{/cap}}
190
+ {{^cap parallel-subagents}}
191
+ **Review gate.** Before moving on, show the user the synthesized narrative and ask:
192
+ {{/cap}}
82
193
 
194
+ {{#cap parallel-subagents}}
83
195
  - **Approve** — narrative looks right, continue to Step 2
84
196
  - **Edit** — user will tweak `spec_figma.md` now; wait for confirmation before continuing
85
197
  - **Cancel** — abort; advise the user that `spec.md` was NOT modified and they can re-run `sungen add --figma --refresh` later
198
+ {{/cap}}
199
+ {{^cap parallel-subagents}}
200
+ - **1) Approve** — narrative looks right, continue to Step 2
201
+ - **2) Edit** — user will tweak `spec_figma.md` now; wait for confirmation before continuing
202
+ - **3) Cancel** — abort; advise the user that `spec.md` was NOT modified and they can re-run `sungen add --figma --refresh` later
203
+ {{/cap}}
86
204
 
87
205
  ### 2. Capture visual source
88
206
 
207
+ {{#cap parallel-subagents}}
89
208
  **If Figma branch (Step 1) already downloaded PNGs** → visuals already exist. Use `AskUserQuestion` to offer:
90
209
  - **Continue** — Figma visuals are enough (Recommended)
91
210
  - **Also capture live page** — supplement Figma with real page scan (invoke `sungen-capture` skill (mode live))
92
-
211
+ {{/cap}}
212
+ {{^cap parallel-subagents}}
213
+ **If Figma branch (Step 1) already downloaded PNGs** → visuals already exist. Offer:
214
+ - **1) Continue** — Figma visuals are enough (Recommended)
215
+ - **2) Also capture live page** — supplement Figma with real page scan (invoke `sungen-capture` skill (mode live))
216
+ {{/cap}}
217
+
218
+ {{#cap parallel-subagents}}
93
219
  **If standard path (no `--figma`)** → go straight to source selection. Use `AskUserQuestion`: *"Pick a visual source for this screen:"*
94
220
  - **Figma design** (Recommended for pre-launch) — invoke `sungen-capture` skill (mode figma-mcp)
95
221
  - **Live page scan** (dev/staging is up) — invoke `sungen-capture` skill (mode live)
96
222
  - **Skip** — user will drop images manually into `requirements/ui/` later
97
-
223
+ {{/cap}}
224
+ {{^cap parallel-subagents}}
225
+ **If standard path (no --figma)** → go straight to source selection:
226
+ - **1) Figma design** (Recommended for pre-launch) — invoke `sungen-capture` skill (mode figma-mcp)
227
+ - **2) Live page scan** (dev/staging is up) — invoke `sungen-capture` skill (mode live)
228
+ - **3) Skip** — user will drop images manually into `requirements/ui/` later
229
+ {{/cap}}
230
+
231
+ {{#cap parallel-subagents}}
98
232
  Each capture skill writes outputs into `qa/screens/<screen>/requirements/ui/` and reports back a summary. Do not inline capture logic here — always delegate to the skill so behavior stays consistent with `/sungen:create-test`.
233
+ {{/cap}}
234
+ {{^cap parallel-subagents}}
235
+ Each capture skill writes outputs into `qa/screens/${input:screen}/requirements/ui/` and reports back. Do not inline capture logic here — delegate to the skill so behavior stays consistent with `/sungen-create-test`.
236
+ {{/cap}}
99
237
 
100
238
  ### 3. Fill spec.md
101
239
 
102
240
  **Skip this step when `--feature` was used** — the screen's existing `spec.md` is reused for all sub-features; only suggest the user append a new section for the sub-feature if useful (e.g. `## Modal — Confirm Withdrawal`).
103
241
 
242
+ {{#cap parallel-subagents}}
104
243
  For fresh screen creation, use `AskUserQuestion`: *"Fill `spec.md` now? (You can reference the captured visuals)"* — offer **Yes, fill now (Recommended)** / **Skip, fill later**.
244
+ {{/cap}}
245
+ {{^cap parallel-subagents}}
246
+ For fresh screen creation, ask: *"Fill `spec.md` now? (You can reference the captured visuals)"* — offer **1) Yes, fill now (Recommended)** / **2) Skip, fill later**.
247
+ {{/cap}}
105
248
 
249
+ {{#cap parallel-subagents}}
106
250
  If yes → open `qa/screens/<screen>/requirements/spec.md` and help the user fill sections, fields, validation rules, business rules, and states. Reference the captured visuals from Step 2 to suggest field names, form elements, and UI states. Especially prompt for the optional **Figma URL** and **Live URL** fields in Overview — those unlock auto-capture without re-asking next run.
251
+ {{/cap}}
252
+ {{^cap parallel-subagents}}
253
+ If yes → open `qa/screens/${input:screen}/requirements/spec.md` and help the user fill sections, fields, validation rules, business rules, and states. Reference the captured visuals from Step 2 to suggest field names, form elements, and UI states. Especially prompt for the optional **Figma URL** and **Live URL** fields in Overview — those unlock auto-capture without re-asking next run.
254
+ {{/cap}}
107
255
 
108
256
  ### 4. Next steps
109
257
 
258
+ {{#cap parallel-subagents}}
110
259
  Tell the user what was created. When `--feature` was used, list the 3 new files explicitly (`features/<screen>-<name>.feature`, `selectors/<screen>-<name>.yaml`, `test-data/<screen>-<name>.yaml`) and remind that `/sungen:create-test` currently operates at the screen level — it will see both the parent feature and the new sub-feature and ask which one to update.
260
+ {{/cap}}
261
+ {{^cap parallel-subagents}}
262
+ Tell the user what was created. When `--feature` was used, list the 3 new files explicitly (`features/${input:screen}-<name>.feature`, `selectors/${input:screen}-<name>.yaml`, `test-data/${input:screen}-<name>.yaml`) and remind that `/sungen-create-test` currently operates at the screen level — it will see both the parent feature and the new sub-feature and ask which one to update.
263
+ {{/cap}}
111
264
 
265
+ {{#cap parallel-subagents}}
112
266
  Then use `AskUserQuestion` to offer next steps:
267
+ {{/cap}}
268
+ {{^cap parallel-subagents}}
269
+ Then offer next steps:
270
+ {{/cap}}
113
271
 
272
+ {{#cap parallel-subagents}}
114
273
  - **`/sungen:create-test <screen>`** — Create test cases from requirements/designs (Recommended)
274
+ {{/cap}}
275
+ {{^cap parallel-subagents}}
276
+ - **`/sungen-create-test ${input:screen}`** — Create test cases from requirements/designs (Recommended)
277
+ {{/cap}}
115
278
  - **Done for now** — I'll come back later
116
279
 
280
+ {{#cap parallel-subagents}}
117
281
  If user picks `/sungen:create-test`, **you MUST use the Skill tool** to invoke it. Do NOT generate test cases yourself — the skill auto-loads `sungen-gherkin-syntax` and `sungen-tc-generation`.
118
282
 
283
+ {{/cap}}
119
284
  ## CLI Reference
120
285
 
121
286
  ```
@@ -1,10 +1,13 @@
1
1
  ---
2
2
  name: create-test
3
- description: 'Create or update test cases for a Sungen screen — generates feature + test-data files (tier-based: critical+high first, expand later)'
3
+ description: "Create or update test cases for a Sungen screen — generates feature + test-data files (tier-based: critical+high first, expand later)"
4
4
  argument-hint: [screen-name]
5
- allowed-tools: Read, Grep, Bash, Glob, Write, AskUserQuestion, Skill, mcp__playwright__browser_navigate, mcp__playwright__browser_snapshot, mcp__playwright__browser_take_screenshot
5
+ order: 20
6
+ claude-tools: "Read, Grep, Bash, Glob, Write, AskUserQuestion, Skill, mcp__playwright__browser_navigate, mcp__playwright__browser_snapshot, mcp__playwright__browser_take_screenshot"
7
+ copilot-tools: "[vscode, execute, read, agent, edit, search, web, browser, todo, 'playwright/*']"
8
+ codex-trigger: "Run when the user asks to CREATE, generate, write, or author test cases / a .feature file for a screen or flow. Step 2 (after add-screen/add-flow, before run-test). Do NOT use for executing, running, or compiling existing tests."
6
9
  ---
7
-
10
+ {{#cap parallel-subagents}}
8
11
  ## ⛔ HARD RULE — No Figma MCP when PAT data exists
9
12
 
10
13
  If `spec_figma.md` exists OR the user provides a Figma URL for the PAT flow:
@@ -12,25 +15,55 @@ If `spec_figma.md` exists OR the user provides a Figma URL for the PAT flow:
12
15
  - Run `sungen add --screen <screen> --figma '<url>'` via Bash (**single-quote the URL**) then invoke the `sungen-capture` skill (**mode figma-pat**).
13
16
 
14
17
  ---
18
+ {{/cap}}
19
+ {{^cap parallel-subagents}}
20
+ **Input**: Screen or flow name (e.g., `/sungen-create-test admin-users`).
21
+ {{/cap}}
15
22
 
16
23
  ## Role
17
24
 
25
+ {{#cap parallel-subagents}}
18
26
  You are a **Senior QA Engineer** specialized in test case design. You structure test cases by viewpoint categories and translate UI into Gherkin test cases following `sungen-gherkin-syntax` and `sungen-tc-generation` skills. **Tier 1 (critical+high) first** — expand coverage later. Focus on **Gherkin scenarios and test data only** — selectors are handled during `/sungen:run-test`.
27
+ {{/cap}}
28
+ {{^cap parallel-subagents}}
29
+ You are a **Senior QA Engineer**. You structure test cases by viewpoint categories and translate UI into Gherkin test cases following the `sungen-gherkin-syntax` and `sungen-tc-generation` skills. **Tier 1 (critical+high) first** — expand coverage later. **Gherkin scenarios and test data only** — selectors are handled during `/sungen-run-test`.
30
+ {{/cap}}
19
31
 
32
+ {{#cap parallel-subagents}}
20
33
  **Quality is built in, not a second command.** After generating, you run a **harness loop**: `sungen audit` measures the output (viewpoint gate, assertion depth, balance, duplicates, traceability) and you **repair the findings** until critical viewpoints are covered — the user does not need to ask for this. Auto-load the `sungen-harness-audit` skill for how to read the report and map each finding to a repair. (`/sungen:design` is an **alias** of this command.)
34
+ {{/cap}}
35
+ {{^cap parallel-subagents}}
36
+ **Quality is built in.** After generating, run a **harness loop**: `sungen audit` measures the output and you **repair the findings** until critical viewpoints are covered — the user does not ask for this. Use the `sungen-harness-audit` skill. (`/sungen-design` is an **alias** of this command.)
37
+ {{/cap}}
21
38
 
22
39
  ## Parameters
23
40
 
41
+ {{#cap parallel-subagents}}
24
42
  Parse **name** from `$ARGUMENTS`. If missing, ask the user.
43
+ {{/cap}}
44
+ {{^cap parallel-subagents}}
45
+ - **name** — ${input:name:screen or flow name (e.g., login, award-submission)}
46
+ {{/cap}}
25
47
 
48
+ {{#cap parallel-subagents}}
26
49
  **Auto-detect context**: check if `qa/api/<name>/` or `qa/api/flows/<name>/` exists → **API unit mode** (below). Else if `qa/flows/<name>/` → flow mode. Else `qa/screens/<name>/` → screen mode. This determines paths, generation strategy, and CLI commands.
50
+ {{/cap}}
51
+ {{^cap parallel-subagents}}
52
+ **Auto-detect context**: check if `qa/api/<name>/` or `qa/api/flows/<name>/` exists → **API unit mode** (below). Else if `qa/flows/<name>/` → flow mode (base path: `qa/flows/<name>/`). Else `qa/screens/<name>/` → screen mode (base path: `qa/screens/<name>/`).
53
+ {{/cap}}
27
54
 
28
55
  ## API unit mode (driver-api)
29
56
 
57
+ {{#cap parallel-subagents}}
30
58
  If the unit is **api-first** (`qa/api/<name>/` or `qa/api/flows/<name>/`), the design loop differs — **no visual capture, no selectors**; the contract is the named-endpoint catalog. **Follow the `sungen-api-design` skill end-to-end** instead of the screen/flow steps below: `sungen context --area <name>` (discover) → API viewpoint overview → generate `@api`/`@cases`/flow/`@concurrent`/`@query` scenarios → **`sungen audit --area <name>` gate + the `sungen-reviewer` sub-agent + repair loop to businessDepth ≥ 0.7** → record + trace. Then jump to the "Converge" next-step options (recommend `/sungen:run-test <name>`). The capture / viewpoint-group / selector steps do **not** apply.
59
+ {{/cap}}
60
+ {{^cap parallel-subagents}}
61
+ If the unit is **api-first** (`qa/api/<name>/` or `qa/api/flows/<name>/`), the design loop differs — **no visual capture, no selectors**; the contract is the named-endpoint catalog. **Follow the `sungen-api-design` skill end-to-end** instead of the screen/flow steps: `sungen context --area <name>` (discover) → API viewpoint overview → generate `@api`/`@cases`/flow/`@concurrent`/`@query` scenarios → **`sungen audit --area <name>` gate + reviewer + repair loop to businessDepth ≥ 0.7** → record + trace. Then recommend `/sungen-run-test <name>`. The capture / viewpoint-group / selector steps do **not** apply.
62
+ {{/cap}}
31
63
 
32
64
  ## Steps
33
65
 
66
+ {{#cap parallel-subagents}}
34
67
  1. **Flow**: Verify `qa/flows/<name>/` exists. If not → `/sungen:add-flow` first.
35
68
  **Screen**: Verify `qa/screens/<name>/` exists. If not → `/sungen:add-screen` first.
36
69
  2. Check if `.feature` file already has scenarios.
@@ -39,30 +72,67 @@ If the unit is **api-first** (`qa/api/<name>/` or `qa/api/flows/<name>/`), the d
39
72
  - **Tier 1 — Critical & High priority** — ~10-15 scenarios/section: happy paths, core validation, security basics **(Recommended)**
40
73
  - **Full coverage (incremental)** — Tier 1 + 2 + 3, written tier-by-tier in batches (`Write` T1 → `Edit` append T2 → `Edit` append T3). Safe on any output-token budget.
41
74
  - **Full coverage (single pass)** — generate everything in one go (~40-60 scenarios/section). Faster, but **only if you raised your output cap** (`CLAUDE_CODE_MAX_OUTPUT_TOKENS ≥ 64000`) — otherwise it errors mid-generation. For power users on a high-token model/config.
75
+ {{/cap}}
76
+ {{^cap parallel-subagents}}
77
+ 1. **Flow**: Verify `qa/flows/${input:name}/` exists. If not → `/sungen-add-flow` first.
78
+ **Screen**: Verify `qa/screens/${input:name}/` exists. If not → `/sungen-add-screen` first.
79
+ 2. Check if `.feature` already has scenarios.
80
+ - If yes → summarize existing coverage and ask update mode (options depend on which tiers already exist — see `sungen-tc-generation` skill for details).
81
+ - If no → fresh creation. **Write the feature file incrementally** (successive writes/edits, ≈10-15 scenarios per call) — never emit the whole suite in one response, or it can exceed the model's output-token cap (`response exceeded the N output token maximum`). Ask generation scope:
82
+ - **1) Tier 1 — Critical & High priority** — ~10-15 scenarios/section: happy paths, core validation, security basics **(Recommended)**
83
+ - **2) Full coverage (incremental)** — Tier 1 + 2 + 3, written tier-by-tier in batches. Safe on any output-token budget.
84
+ - **3) Full coverage (single pass)** — everything in one go (~40-60 scenarios/section). Faster, but **only if you raised your output cap** (`CLAUDE_CODE_MAX_OUTPUT_TOKENS ≥ 64000`) — otherwise it errors mid-generation. For power users on a high-token model/config.
85
+ {{/cap}}
42
86
  3. **Read project context + screen requirements**
43
87
 
44
88
  **Project context** — check `qa/context.md` (project root, not screen-specific):
45
89
  - If exists → read it. Extract: roles, testing strategy directives, global business rules, error patterns.
46
90
  - Summarize what you found in one line (e.g. `"Roles: admin/staff/user | Strategy: focus security, skip VP-UI T1 | 2 global rules"`).
91
+ {{#cap parallel-subagents}}
47
92
  - These are carried into the Coverage Map when invoking `sungen-tc-generation`.
93
+ {{/cap}}
94
+ {{^cap parallel-subagents}}
95
+ - These are carried into the Coverage Map when invoking the `sungen-tc-generation` skill.
96
+ {{/cap}}
48
97
  - If absent → continue without it, no action needed.
49
98
 
99
+ {{#cap parallel-subagents}}
50
100
  **Screen requirements** — check `qa/<screens|flows>/<name>/requirements/`:
101
+ {{/cap}}
102
+ {{^cap parallel-subagents}}
103
+ **Screen requirements** — check `<base>/${input:name}/requirements/`:
104
+ {{/cap}}
51
105
  - If `spec.md` exists → read it as PRIMARY source (sections, fields, validation rules, business rules, states).
106
+ {{#cap parallel-subagents}}
52
107
  - If `test-viewpoint.md` exists → read it. If it only contains HTML comments (scaffold template), use `AskUserQuestion` to ask:
53
108
  - **Fill test-viewpoint.md first** — I'll help you identify edge cases, known issues, and design decisions for this screen before generating tests
54
109
  - **Continue without it** — generate tests from spec and other sources only
55
110
 
56
111
  **Context discovery (prefer an isolated agent).** Reading all sources here can flood this context. **Claude Code:** spawn the **`sungen-discovery`** sub-agent (Task tool, `subagent_type: sungen-discovery`) to read spec/figma/ui/live in isolation and return a **compact discovery report** (sources, completeness, conflicts, recommended route, key facts); use that report instead of pasting raw sources. **Copilot / no sub-agents:** do the reading inline as below.
112
+ {{/cap}}
113
+ {{^cap parallel-subagents}}
114
+ - If `test-viewpoint.md` exists → read it. If it only contains HTML comments (scaffold template), ask:
115
+ - **1) Fill test-viewpoint.md first** — identify edge cases, known issues, and design decisions before generating tests
116
+ - **2) Continue without it** — generate tests from spec and other sources only
117
+ {{/cap}}
57
118
 
58
119
  **Auto-detect visual source** — do NOT ask the user to pick a source. Instead, check what already exists and use it:
59
120
  1. If `spec_figma.md` exists → read it as Figma supplement (PAT flow already completed during `add-screen`). Do NOT call any `mcp__figma__*` tool.
60
121
  2. If `ui/` has images (`.png`, `.jpg`, etc.) → read them for visual context (layout, element positions, states).
122
+ {{#cap parallel-subagents}}
61
123
  3. If neither exists → use `AskUserQuestion` to ask: *"No visual source found. Pick one:"* — then invoke the **`sungen-capture`** skill with the matching **mode** (read only that mode's file):
62
124
  - **Figma PAT** — ask for URL, run `sungen add --screen <screen> --figma '<url>'` via Bash, then `sungen-capture` **mode figma-pat**
63
125
  - **Figma MCP** — `sungen-capture` **mode figma-mcp**
64
126
  - **Live page scan** — `sungen-capture` **mode live**
65
127
  - **Skip** — generate from spec.md only
128
+ {{/cap}}
129
+ {{^cap parallel-subagents}}
130
+ 3. If neither exists → ask: *"No visual source found. Pick one:"* — then invoke the **`sungen-capture`** skill with the matching **mode** (read only that mode's file):
131
+ - **1) Figma PAT** — ask for URL, run `sungen add --screen ${input:name} --figma '<url>'`, then `sungen-capture` **mode figma-pat**
132
+ - **2) Figma MCP** — `sungen-capture` **mode figma-mcp**
133
+ - **3) Live page scan** — `sungen-capture` **mode live**
134
+ - **4) Skip** — generate from spec.md only
135
+ {{/cap}}
66
136
 
67
137
  (When `spec_figma.md` exists, that is also `sungen-capture` **mode figma-pat**; when `ui/` images exist, that is **mode local**.)
68
138
 
@@ -70,6 +140,7 @@ If the unit is **api-first** (`qa/api/<name>/` or `qa/api/flows/<name>/`), the d
70
140
 
71
141
  Summarize what you found in requirements and present to the user.
72
142
 
143
+ {{#cap parallel-subagents}}
73
144
  4. Follow the `sungen-tc-generation` skill for section identification, viewpoint generation, and output format. **Viewpoint loading discipline:** `sungen-viewpoint` is a **router** — from the page-type (form / list / detail / auth / dashboard …) read **only the matching group file(s)** (e.g. a login screen → group-e-identity; a product list → group-c-data-explore), never all five groups. This keeps the generation context lean. **For flows**, use the "Flow Test Generation" section in the skill. When requirements exist, use the "Requirements-Driven Generation" strategy. **For Tier 1**, apply the **Lightweight Guard** — verify required fields, validation rules, business rules, security checks, and key state transitions all have TCs after generation. **For Tier 2+**, **MUST** apply the full **Mapping Contract** — walk every `spec.md` section top-to-bottom and produce the indicated TCs per Table 1; handle `test-viewpoint.md` per Table 2. Do not silently skip sections.
74
145
  5. Generate `.feature` + `test-data.yaml` following `sungen-gherkin-syntax` and `sungen-tc-generation`. **Partition the work into shards and generate them in parallel** when there are ≥2.
75
146
 
@@ -111,24 +182,67 @@ If the unit is **api-first** (`qa/api/<name>/` or `qa/api/flows/<name>/`), the d
111
182
  - **Ledger each phase** (so `sungen trace` can map the whole process): pick one `runId` at the start (e.g. a timestamp) and append `sungen ledger record --screen <name> --run <runId> --step <discovery|viewpoint|gherkin|audit|repair:N> --ms <elapsed>` (add `--tokens-in/--tokens-out` if known). The `--run` id groups this invocation so `trace`/`ledger report` show THIS run, not a mix of past runs. Do this for **every** phase, not just repair.
112
183
 
113
184
  6. **Converge — show the trace.** Run `sungen trace --screen <name>` and present to the user: the process map (phases + repair rounds), bottlenecks, and the **HUMAN-LOOP FOCUS** (@manual scenarios they must verify) + audit score & gate status & residual/cross-screen gaps. Then use `AskUserQuestion` to offer next steps based on which tier was just generated:
114
-
185
+ {{/cap}}
186
+ {{^cap parallel-subagents}}
187
+ 4. Follow the `sungen-tc-generation` skill for section identification, viewpoint generation, and output format. **For flows**, use the "Flow Test Generation" section in the skill. When requirements exist, use the "Requirements-Driven Generation" strategy. **For Tier 1**, apply the **Lightweight Guard** — verify required fields, validation rules, business rules, security checks, and key state transitions all have TCs after generation. **For Tier 2+**, **MUST** apply the full **Mapping Contract** — walk every `spec.md` section top-to-bottom and produce the indicated TCs per Table 1; handle `test-viewpoint.md` per Table 2. Do not silently skip sections. Present sections as a numbered list and let user pick.
188
+ 5. Generate or update `.feature` + `test-data.yaml` following `sungen-gherkin-syntax` and `sungen-tc-generation` skills. Generate **group-by-group** (one viewpoint group at a time, tier-by-tier `Write`/`Edit` batches) to stay under the output-token cap. **For flows**: use `[Screen:Element]` namespace format, namespace test-data by phase, add `@flow` tag.
189
+ > **No parallel fan-out here.** Copilot has no sub-agents, so generation is sequential (the Claude Code variant fans out one `sungen-generator` per viewpoint group and merges). Same output, no speedup.
190
+ 5.4. **Depth self-check (deterministic — BEFORE the audit).** Run `sungen depth-lint --screen ${input:name}`. It splits every shallow business-critical scenario into **DEEPEN IN PLACE** (add a real value assertion — the printed `template` is a theme-keyed hint, apply judgment to the actual claim; never fake one onto a visibility/behavior scenario) and **CROSS-SCREEN** (route to a flow / tag `@manual:Mx` + reason — removes it from the depth denominator honestly). Act on both, re-run until `deepen` is empty (or only honest over-counts remain), THEN gate. Lifts first-pass `businessDepth` mechanically instead of via 2–3 repair rounds.
191
+ 5.5. **Quality gate & repair (harness — always run).** Per `sungen-harness-audit`: run `sungen audit --screen ${input:name}` (structural), THEN do an **independent semantic review inline** using the `sungen-reviewer` criteria (does each scenario's steps PROVE its title/viewpoint? observable Thens? business-critical assertion depth?). Merge both sets of issues; if gate FAILs / findings exist, repair (budget 3) and re-audit — GATE missing theme → generate it (cross-screen → **automate it in the flow** via `/sungen:add-flow`, NOT a full `@manual` screen duplicate — `sungen audit` flags an automatable `@manual` as `MANUAL-AUTOMATABLE`; reserve `@manual:Mx` for true judgment/missing-capability); DEPTH → add data assertions; BALANCE → add business-core first; TRACE → align VP ids. Never fake a pass.
192
+ 5.6. **Record.** `sungen manifest --screen ${input:name}`. Ledger **each phase** (not just repair) — pick one `runId` at the start and pass it so `trace`/`ledger report` show THIS run, not a mix: `sungen ledger record --screen ${input:name} --run <runId> --step <discovery|viewpoint|gherkin|audit|repair:N> --ms <elapsed>`. On re-run, start with `sungen manifest --screen ${input:name} --diff` and only regenerate changed sections.
193
+ 6. **Converge — show the trace.** Run `sungen trace --screen ${input:name}` and present: process map (phases + repair rounds), bottlenecks, **HUMAN-LOOP FOCUS** (@manual to verify), audit score + gate + residual gaps. Then offer next steps based on which tier was just generated:
194
+ {{/cap}}
195
+
196
+ {{#cap parallel-subagents}}
115
197
  > The harness gate + reviewer already ran above — you do **not** need `/sungen:review` as a next step (it's the independent checkpoint for hand/prompt-authored or pre-delivery cases). Recommend `run-test` or expanding coverage.
198
+ {{/cap}}
199
+ {{^cap parallel-subagents}}
200
+ > The harness gate + reviewer already ran above — `/sungen-review` is the independent checkpoint (hand/prompt-authored or pre-delivery), not a needed next step here.
201
+ {{/cap}}
116
202
 
203
+ {{#cap parallel-subagents}}
117
204
  **Optional — exploration mode (Loop 2).** The suite above is the deterministic, official output. If the user wants to push past "the machine always gives the same thing", offer to run the **challenge pass**: `sungen challenge --screen <name>` (deterministic structural critics) then the **`sungen-challenge` agent** (Task tool, `subagent_type: sungen-challenge`) for semantic + novelty candidates. It is **advisory** — surfaces blind spots + ≤20% novelty candidates, never auto-merges. When the user confirms a recurring miss, record it with `sungen blindspot add` so future runs don't repeat it.
205
+ {{/cap}}
206
+ {{^cap parallel-subagents}}
207
+ **Optional — exploration mode (Loop 2).** The suite above is the deterministic official output. To push past "same output every time", offer the **challenge pass**: run `sungen challenge --screen ${input:name}` (deterministic structural critics), then apply the `sungen-challenge` criteria inline for semantic + novelty candidates. Advisory only — surfaces blind spots + ≤20% novelty candidates, never auto-merges. Record a confirmed recurring miss with `sungen blindspot add` so future runs don't repeat it.
208
+ {{/cap}}
118
209
 
119
210
  **After Tier 1 generation:**
211
+ {{#cap parallel-subagents}}
120
212
  - **`/sungen:run-test <name>`** — Generate selectors and run tests now (Recommended)
121
213
  - **`/sungen:create-test <name>`** — Expand coverage: add @normal + @low scenarios (Tier 2)
214
+ {{/cap}}
215
+ {{^cap parallel-subagents}}
216
+ - **`/sungen-run-test ${input:name}`** — Generate selectors and run tests now (Recommended)
217
+ - **`/sungen-create-test ${input:name}`** — Expand coverage: add @normal + @low scenarios (Tier 2)
218
+ {{/cap}}
122
219
  - **Done for now** — I'll come back later
123
220
 
124
221
  **After Tier 2 generation:**
222
+ {{#cap parallel-subagents}}
125
223
  - **`/sungen:create-test <name>`** — Deep coverage: add BVA combos, cross-field validation, negative inputs, race conditions (Tier 3) (Recommended)
126
224
  - **`/sungen:run-test <name>`** — Generate selectors and run tests now
225
+ {{/cap}}
226
+ {{^cap parallel-subagents}}
227
+ - **`/sungen-create-test ${input:name}`** — Deep coverage: add BVA combos, cross-field validation, negative inputs, race conditions (Tier 3) (Recommended)
228
+ - **`/sungen-run-test ${input:name}`** — Generate selectors and run tests now
229
+ {{/cap}}
127
230
  - **Done for now** — I'll come back later
128
231
 
129
232
  **After Tier 3 or Full generation:**
233
+ {{#cap parallel-subagents}}
130
234
  - **`/sungen:run-test <name>`** — Generate selectors and run tests now (Recommended)
131
235
  - **`/sungen:create-test <name>`** — Add more sections if the screen changed
236
+ {{/cap}}
237
+ {{^cap parallel-subagents}}
238
+ - **`/sungen-run-test ${input:name}`** — Generate selectors and run tests now (Recommended)
239
+ - **`/sungen-create-test ${input:name}`** — Add more sections if the screen changed
240
+ {{/cap}}
132
241
  - **Done for now** — I'll come back later
133
242
 
243
+ {{#cap parallel-subagents}}
134
244
  **No selectors.yaml** — selectors are generated during `/sungen:run-test`.
245
+ {{/cap}}
246
+ {{^cap parallel-subagents}}
247
+ **No selectors.yaml** — selectors are generated during `/sungen-run-test`.
248
+ {{/cap}}
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  name: dashboard
3
- description: 'Build a single-file HTML dashboard with test cases + pass/fail results, history trends, compare runs, and CSV/XLSX export.'
3
+ description: "Build a single-file HTML dashboard with test cases + pass/fail results, history trends, compare runs, and CSV/XLSX export."
4
4
  argument-hint: "[screen-name...] (omit for all)"
5
- allowed-tools: Bash, Read, AskUserQuestion
5
+ order: 60
6
+ claude-tools: "Bash, Read, AskUserQuestion"
7
+ copilot-tools: "[read, execute, edit, vscode/askQuestions]"
8
+ codex-trigger: "Run when the user asks to OPEN or view the sungen results dashboard."
6
9
  ---
7
-
8
10
  ## Role
9
11
 
10
12
  You are a **QA Reporting Engineer**. Your job is to invoke the deterministic `sungen dashboard` CLI which builds a self-contained HTML report. The HTML is shareable as-is (open via `file://`, no server required).
@@ -19,10 +21,20 @@ Parse **screens** from `$ARGUMENTS`:
19
21
 
20
22
  ### 1. Invoke the CLI
21
23
 
24
+ {{#cap parallel-subagents}}
22
25
  Prefer the local `./bin/sungen.js` when it exists (this is the canonical entry point when developing sungen itself, and ships any unpublished features the global package doesn't have yet). Fall back to `npx sungen` for downstream projects that consume sungen as a dependency.
26
+ {{/cap}}
27
+ {{^cap parallel-subagents}}
28
+ Prefer the local `./bin/sungen.js` when it exists (sungen monorepo dev). Fall back to `npx sungen` for downstream projects.
29
+ {{/cap}}
23
30
 
24
31
  ```bash
32
+ {{#cap parallel-subagents}}
25
33
  # Local-first dispatcher — works in both the sungen monorepo and consumer projects:
34
+ {{/cap}}
35
+ {{^cap parallel-subagents}}
36
+ # Local-first dispatcher — works in both monorepo and consumer projects:
37
+ {{/cap}}
26
38
  [ -x ./bin/sungen.js ] && ./bin/sungen.js dashboard <screens> || npx sungen dashboard <screens>
27
39
  ```
28
40
 
@@ -40,9 +52,19 @@ The CLI handles:
40
52
 
41
53
  ### 2. Show the result + offer next steps
42
54
 
55
+ {{#cap parallel-subagents}}
43
56
  Forward the CLI's summary verbatim, then use `AskUserQuestion`:
57
+ {{/cap}}
58
+ {{^cap parallel-subagents}}
59
+ Forward the CLI's summary verbatim, then ask the user what they want next:
60
+ {{/cap}}
44
61
 
62
+ {{#cap parallel-subagents}}
45
63
  - **Open the dashboard** — Suggest `npx sungen dashboard --open` to open in the default browser, or just open `qa/dashboard/index.html` manually.
64
+ {{/cap}}
65
+ {{^cap parallel-subagents}}
66
+ - **Open the dashboard** — Suggest `npx sungen dashboard --open` or open `qa/dashboard/index.html` manually.
67
+ {{/cap}}
46
68
  - **Re-run after a test run** — Run `/sungen:run-test <screen>` to refresh `test-results/results.json`, then re-invoke `/sungen:dashboard`.
47
69
  - **Build for a single screen** — Run `/sungen:dashboard <screen>` to scope the report.
48
70
  - **Share the file** — The HTML at `qa/dashboard/index.html` can be emailed / Slacked / committed; recipients open it directly without any server.