@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,10 +1,33 @@
1
1
  ---
2
2
  name: sungen-locale
3
- description: 'Bootstrap i18n for a screen/flow — audit hardcoded selector text, detect locale-switch mechanism via live Playwright, generate test-data overlay file. Auto-loaded by /sungen:locale command.'
3
+ description: 'Bootstrap i18n for a screen/flow — audit hardcoded selector text, detect locale-switch mechanism via Playwright (web) or device locale (mobile), generate test-data overlay file. Auto-loaded by /sungen:locale command.'
4
4
  user-invocable: false
5
5
  ---
6
6
 
7
- ## Goal
7
+ ## Platform Detection (do this FIRST)
8
+
9
+ Read `qa/capabilities.yaml` and check the `platform` field.
10
+
11
+ - If `platform: mobile` → follow the **mobile path** (see "Mobile path" section below)
12
+ - If `platform: web` or field absent → follow the **web path** (standard, below)
13
+
14
+ ### Mobile path
15
+
16
+ When `platform: mobile`:
17
+
18
+ 1. **Live capture**: use **Appium MCP** (`select_device` → `appium_session_management(create)` with device at base locale → `appium_get_page_source` / `appium_screenshot`) — NOT Playwright browser tools
19
+ 2. **Locale-switch mechanism**: **device locale** — `appium:language` / `appium:locale` caps + `noReset:false` (set by wdio `resolveLocaleCaps` at runtime). No URL prefix, query param, or browser-storage injection
20
+ 3. **Phases skipped for mobile**: audit (Phase 1), capture base (Phase 2), detect mechanism (Phase 3) are unchanged. Phases 3.5 (browser storage diff), 3.6 (storage verify), 6d (Pages URL update), 6f (locale-config.json / locale-fixture) are **web-only** — skip them. wdio `resolveLocaleCaps` handles runtime locale automatically
21
+ 4. **OFFLINE mode**: scaffold overlay template + ask user to fill manually if device unreachable or `--offline` flag given
22
+ 5. **Hand-off**: print `SUNGEN_ENV=<locale> npm run test:mobile`. Include note: "If the device locale code differs from the overlay env name, set `SUNGEN_LOCALE=<code>` — wdio `resolveLocaleCaps` reads it as an override."
23
+ 6. **Phase 6 (mobile) writes only**: 6a selectors `{{var}}`, 6b base `test-data/<feature>.yaml`, 6c overlay `test-data/<feature>.<locale>.yaml`. Skip 6d (Pages URL) and 6f (locale-config.json)
24
+ 7. **Compile**: `sungen generate --screen <name>` (appium adapter auto-selected in mobile project)
25
+
26
+ **Stop here for mobile.** Do not continue to the web path below.
27
+
28
+ ---
29
+
30
+ ## Goal (Web)
8
31
 
9
32
  Take a screen/flow whose `selectors/*.yaml` and `.feature` files were authored against the default locale (usually Vietnamese) and prepare it to run against a second locale. Output:
10
33
 
@@ -37,8 +60,14 @@ For each `.feature` file under the screen, read the matching `selectors/<feature
37
60
  Classify each candidate:
38
61
  - **`name` field of `role`-type selector** → very likely locale-dependent
39
62
  - **`value` field of `text`-type selector** → very likely locale-dependent
63
+ {{#cap parallel-subagents}}
40
64
  - **`value` of `locator`-type selector** that contains `:has-text("…")` → check if the text is in target language
41
65
  - **`value` of `page`-type selector** → URL — handled separately in Phase 3
66
+ {{/cap}}
67
+ {{^cap parallel-subagents}}
68
+ - **`value` of `locator`-type selector** that contains `:has-text("…")` → check if text is in target language
69
+ - **`value` of `page`-type selector** → URL — handled in Phase 3
70
+ {{/cap}}
42
71
  - **CSS / href / attribute selectors** (e.g. `a[href="/awards"]`) → skip, locale-invariant
43
72
 
44
73
  Print the candidate list as a table:
@@ -52,22 +81,49 @@ event date | name | 26/12/2025 | maybe (date format)
52
81
  nav kudos | name | Sun* Kudos | brand — skip
53
82
  ```
54
83
 
84
+ {{#cap parallel-subagents}}
55
85
  If there are zero candidates and no `{{var}}` either, the screen has no localizable text → tell user and stop.
86
+ {{/cap}}
87
+ {{^cap parallel-subagents}}
88
+ If zero candidates and zero `{{var}}` already in place → screen has no localizable text. Tell user, stop.
89
+ {{/cap}}
56
90
 
57
91
  ## Phase 2 — Capture base locale (LIVE only)
58
92
 
93
+ {{#cap parallel-subagents}}
59
94
  1. Read `playwright.config.ts` for `baseURL`. Read `Path:` from `.feature` for the entry-point path.
60
95
  2. If the screen has `@auth:<role>` tags, load `specs/.auth/<role>.json` via `browser_set_storage_state` first.
61
96
  3. `browser_navigate(baseURL + entryPath)` then `browser_wait_for` something stable.
97
+ {{/cap}}
98
+ {{^cap parallel-subagents}}
99
+ 1. Read `playwright.config.ts` for `baseURL`. Read `Path:` from `.feature` for entry path.
100
+ 2. If screen has `@auth:<role>` tags, load `specs/.auth/<role>.json` via `browser_set_storage_state` first.
101
+ 3. `browser_navigate(baseURL + entryPath)` then `browser_wait_for` for something stable.
102
+ {{/cap}}
62
103
  4. Capture:
63
104
  - `browser_snapshot()` — DOM accessibility tree
64
105
  - `browser_evaluate(() => location.href)` — full URL
65
106
  - `browser_evaluate(() => ({ localStorage: {...localStorage}, cookies: document.cookie }))` — storage state hash
107
+ {{#cap parallel-subagents}}
66
108
  5. For each candidate from Phase 1: verify the hardcoded text actually appears on the page (string contains check against snapshot text). Drop candidates that don't appear (probably stale selectors or false positives).
109
+ {{/cap}}
110
+ {{^cap parallel-subagents}}
111
+ 5. For each Phase-1 candidate: verify the hardcoded text actually appears on the page. Drop ones that don't (stale selectors / false positives).
112
+ {{/cap}}
67
113
 
114
+ {{#cap parallel-subagents}}
68
115
  Save state to memory as `baseLocale = { url, snapshot, storage }`.
116
+ {{/cap}}
117
+ {{^cap parallel-subagents}}
118
+ Save state in memory as `baseLocale = { url, snapshot, storage }`.
119
+ {{/cap}}
69
120
 
121
+ {{#cap parallel-subagents}}
70
122
  If page redirects to `/login` (auth blocker) → stop. Print: *"Auth blocked — cannot capture live page. Fall back to OFFLINE mode by re-running once auth works, or pick `Offline-only` next time."*
123
+ {{/cap}}
124
+ {{^cap parallel-subagents}}
125
+ If page redirects to `/login` (auth blocker) → stop. Print: *"Auth blocked — cannot capture live page. Re-run with `--offline` flag, or unblock auth first."*
126
+ {{/cap}}
71
127
 
72
128
  ## Phase 3 — Switch locale (LIVE only) — detect mechanism + storage delta
73
129
 
@@ -87,39 +143,80 @@ const before = await browser_evaluate(() => ({
87
143
  Then try mechanisms in order. First one that produces visibly different text wins. For EACH attempt, capture `after` state and diff against `before`.
88
144
 
89
145
  **3a. URL prefix**
146
+ {{#cap parallel-subagents}}
90
147
  - `browser_navigate(baseURL + '/' + locale + entryPath)` (e.g. `https://saa-2025.../en/`)
148
+ {{/cap}}
149
+ {{^cap parallel-subagents}}
150
+ - `browser_navigate(baseURL + '/' + locale + entryPath)`
151
+ {{/cap}}
91
152
  - Wait, snapshot
153
+ {{#cap parallel-subagents}}
92
154
  - Compare text content with baseLocale snapshot for a known-changed element
155
+ {{/cap}}
156
+ {{^cap parallel-subagents}}
157
+ - Compare a known Phase-1 candidate's text vs baseLocale
158
+ {{/cap}}
93
159
  - If text differs and page didn't 404 → **URL prefix mechanism**. Save `localePrefix = '/' + locale`.
94
160
 
95
161
  **3b. Query param** (only if 3a failed)
96
162
  - `browser_navigate(baseURL + entryPath + '?lang=' + locale)` (also try `?locale=`, `?lng=`, `?l=`, `?language=`)
97
163
  - Same diff check
164
+ {{#cap parallel-subagents}}
98
165
  - If text differs → **Query param mechanism**. Save `localeQuery = '?lang=' + locale` (or whichever variant worked).
166
+ {{/cap}}
167
+ {{^cap parallel-subagents}}
168
+ - If text differs → **Query param mechanism**. Save the variant that worked.
169
+ {{/cap}}
99
170
 
100
171
  **3c. Language switcher UI** (only if 3a + 3b failed)
172
+ {{#cap parallel-subagents}}
101
173
  - Look in base-locale snapshot for buttons/links matching: `'Select language'`, `'Language'`, `'言語'`, `'Ngôn ngữ'`, role=combobox
102
174
  - If found, ask user: *"Detected possible language switcher: [X]. Click it and proceed?"*
103
175
  - On confirm: `browser_click` the switcher, then `browser_click` the locale option
176
+ {{/cap}}
177
+ {{^cap parallel-subagents}}
178
+ - Look in base-locale snapshot for buttons matching: `'Select language'`, `'Language'`, `'言語'`, `'Ngôn ngữ'`, role=combobox
179
+ - If found, ask user before clicking
180
+ - `browser_click` the switcher, then the locale option
181
+ {{/cap}}
104
182
  - Verify text changed
183
+ {{#cap parallel-subagents}}
105
184
  - If yes → **UI switcher mechanism**. Save selector + option details.
185
+ {{/cap}}
186
+ {{^cap parallel-subagents}}
187
+ - If yes → **UI switcher mechanism**.
188
+ {{/cap}}
106
189
 
190
+ {{#cap parallel-subagents}}
107
191
  **3d. None detected**
108
192
  - AskUserQuestion: *"Couldn't auto-detect locale switching. Either (a) demo it for me in browser then I'll snapshot, (b) provide locale URL manually, (c) skip — assume URL prefix `/<locale>`."*
193
+ {{/cap}}
194
+ {{^cap parallel-subagents}}
195
+ **3d. None detected** — ask user how to proceed manually.
196
+ {{/cap}}
109
197
 
110
198
  ### Phase 3.5 — Storage diff (always run after Phase 3 succeeds)
111
199
 
200
+ {{#cap parallel-subagents}}
112
201
  After locale text confirmed switched, capture `after` state and diff:
202
+ {{/cap}}
203
+ {{^cap parallel-subagents}}
204
+ After locale text confirmed switched, capture `after` state and diff per area:
205
+ {{/cap}}
113
206
 
114
207
  ```js
115
208
  const after = await browser_evaluate(() => ({
116
209
  sessionStorage: { ...sessionStorage },
117
210
  localStorage: { ...localStorage },
118
211
  cookies: document.cookie,
212
+ {{#cap parallel-subagents}}
119
213
  url: location.href,
214
+ {{/cap}}
120
215
  }));
216
+ {{#cap parallel-subagents}}
121
217
 
122
218
  // Diff each storage area:
219
+ {{/cap}}
123
220
  const sessionDiff = diffEntries(before.sessionStorage, after.sessionStorage);
124
221
  const localDiff = diffEntries(before.localStorage, after.localStorage);
125
222
  const cookieDiff = diffCookies(before.cookies, after.cookies);
@@ -127,48 +224,109 @@ const cookieDiff = diffCookies(before.cookies, after.cookies);
127
224
 
128
225
  **Filter noise** — only keep entries where:
129
226
  - Key name contains `lang|locale|language|i18n|intl` (case-insensitive), OR
227
+ {{#cap parallel-subagents}}
130
228
  - Value matches a locale code pattern: `^[a-z]{2}(-[A-Z]{2})?$` or matches the target locale code exactly
229
+ {{/cap}}
230
+ {{^cap parallel-subagents}}
231
+ - Value matches `^[a-z]{2}(-[A-Z]{2})?$` or equals the target locale code
232
+ {{/cap}}
131
233
 
234
+ {{#cap parallel-subagents}}
132
235
  Drop known noise:
133
236
  - Auth tokens: `sb-*`, `*-token`, `*-jwt`, `*-session-id`
134
237
  - Analytics: `_ga*`, `_gid`, `_fbp`
135
238
  - App state: `csrf*`, `last-*`, `visit-*`
239
+ {{/cap}}
240
+ {{^cap parallel-subagents}}
241
+ Drop noise: auth tokens (`sb-*`, `*-token`, `*-jwt`), analytics (`_ga*`, `_gid`, `_fbp`), app state (`csrf*`, `last-*`).
242
+ {{/cap}}
136
243
 
244
+ {{#cap parallel-subagents}}
137
245
  **Auto-confidence scoring** per remaining entry:
138
246
  - High confidence: key name contains locale-related word AND value is a locale code matching target → KEEP, no user prompt
139
247
  - Medium: only one signal matches → present to user for confirmation
140
248
  - Low: neither matches but key changed → present to user, default to skip
141
-
249
+ {{/cap}}
250
+ {{^cap parallel-subagents}}
251
+ **Auto-confidence per entry:**
252
+ - High: key name contains locale-related word AND value is a locale code → KEEP, no prompt
253
+ - Medium: only one signal matches → ask user
254
+ - Low: neither matches but key changed → ask user, default skip
255
+ {{/cap}}
256
+
257
+ {{#cap parallel-subagents}}
142
258
  ### Phase 3.6 — Verification (always run after Phase 3.5)
259
+ {{/cap}}
260
+ {{^cap parallel-subagents}}
261
+ ### Phase 3.6 — Verification
262
+ {{/cap}}
143
263
 
264
+ {{#cap parallel-subagents}}
144
265
  For each high/medium-confidence storage entry, verify by replaying in a FRESH context:
266
+ {{/cap}}
267
+ {{^cap parallel-subagents}}
268
+ For each high/medium-confidence storage entry, verify by setting it manually + reloading:
269
+ {{/cap}}
145
270
 
146
271
  ```js
272
+ {{#cap parallel-subagents}}
147
273
  // 1. Capture current page state (have JWT in memory) — note: can't replay JWT separately
148
274
  // 2. Open new browser_navigate to baseURL but pre-set the detected key via addInitScript
149
275
  // 3. Snapshot new page and confirm a known target-locale string appears
150
276
 
151
277
  // Pseudo-code — real impl uses Playwright MCP `browser_evaluate` with init pattern
278
+ {{/cap}}
279
+ {{^cap parallel-subagents}}
280
+ await browser_evaluate(`() => sessionStorage.setItem('saa-language-preference', 'en')`);
281
+ await browser_navigate(baseURL); // reload triggers app to read storage on boot
282
+ await browser_snapshot();
283
+ // confirm a known target-locale string appears
284
+ {{/cap}}
152
285
  ```
153
286
 
287
+ {{#cap parallel-subagents}}
154
288
  Actually since MCP browser sessions don't expose `addInitScript` directly, use a softer verification:
155
289
  - Manually set the candidate key via `browser_evaluate(() => sessionStorage.setItem('key', 'value'))`
156
290
  - Hard reload the page: `browser_navigate(baseURL)` to force re-init
157
291
  - Snapshot, look for known target-locale text
158
292
  - Caveat: hard reload kills any in-memory JWT — auth blocker amplifies failure surface. Skip verification if the screen has `@auth:*` tags and the staging app has known JWT-persistence issues.
293
+ {{/cap}}
294
+ {{^cap parallel-subagents}}
295
+ Caveat: hard reload kills any in-memory JWT (auth blocker amplifies failure surface). Skip verification if the screen has `@auth:*` tags and JWT persistence is known broken in the app.
296
+ {{/cap}}
159
297
 
298
+ {{#cap parallel-subagents}}
160
299
  If verification fails / can't run → drop confidence by one tier, ask user.
300
+ {{/cap}}
301
+ {{^cap parallel-subagents}}
302
+ If verification fails → drop confidence one tier, ask user.
303
+ {{/cap}}
161
304
 
305
+ {{#cap parallel-subagents}}
162
306
  Save mechanism + verified storage delta to memory for use in Phase 6.
307
+ {{/cap}}
308
+ {{^cap parallel-subagents}}
309
+ Save mechanism + verified storage delta to memory for Phase 6.
310
+ {{/cap}}
163
311
 
164
312
  ## Phase 4 — Diff base ↔ target (LIVE only)
165
313
 
166
314
  For each candidate from Phase 1 that survived Phase 2:
315
+ {{#cap parallel-subagents}}
167
316
  - Find the SAME element in the target-locale snapshot (match by `role`+position, by `aria-label` if available, by neighbor structure)
317
+ {{/cap}}
318
+ {{^cap parallel-subagents}}
319
+ - Find the SAME element in target-locale snapshot (match by `role`+position, by `aria-label`, by neighbor structure)
320
+ {{/cap}}
168
321
  - Extract its text → `targetText`
169
322
  - Pair: `(selectorKey, hardcoded baseText, observed targetText)`
170
323
 
324
+ {{#cap parallel-subagents}}
171
325
  If matching fails for a candidate → mark as "needs manual" — flag for user input rather than skip.
326
+ {{/cap}}
327
+ {{^cap parallel-subagents}}
328
+ If matching fails for a candidate → mark "needs manual" — flag for user input rather than skip silently.
329
+ {{/cap}}
172
330
 
173
331
  Result: list of triples `{ selectorKey, baseText, targetText, confidence }`.
174
332
 
@@ -181,20 +339,47 @@ selector key | base text | target text | proposed
181
339
  -------------------+--------------------------+----------------------+------------------+-------
182
340
  nav about | Giới thiệu SAA 2025 | About SAA 2025 | nav_about | [✓]
183
341
  nav awards | Thông tin giải thưởng | Awards Info | nav_awards | [✓]
342
+ {{#cap parallel-subagents}}
184
343
  event location | Au Co Arts Centre, Hanoi | Au Co Arts Centre… | event_location | (already has {{}})
344
+ {{/cap}}
185
345
  nav kudos | Sun* Kudos | Sun* Kudos | — | [skip — same]
186
346
  event date | 26/12/2025 | 26/12/2025 | — | [skip — same]
187
347
  ```
188
348
 
349
+ {{#cap parallel-subagents}}
189
350
  Propose **var names** by snake_casing the selector key. Avoid collisions with existing test-data keys.
351
+ {{/cap}}
352
+ {{^cap parallel-subagents}}
353
+ Var names: snake_case the selector key. Avoid collisions with existing test-data keys.
354
+ {{/cap}}
190
355
 
356
+ {{#cap parallel-subagents}}
191
357
  Auto-skip rows where `baseText === targetText` (brand names, dates that don't change between locales).
358
+ {{/cap}}
359
+ {{^cap parallel-subagents}}
360
+ Auto-skip rows where `baseText === targetText` (brand names, locale-invariant numbers).
361
+ {{/cap}}
192
362
 
363
+ {{#cap parallel-subagents}}
193
364
  Ask user via AskUserQuestion: *"Review the table above. Confirm to apply / edit individual rows / re-run capture / cancel."*
365
+ {{/cap}}
366
+ {{^cap parallel-subagents}}
367
+ Ask user: *"Review the table. Confirm to apply / edit individual rows / re-run capture / cancel."*
368
+ {{/cap}}
194
369
 
370
+ {{#cap parallel-subagents}}
195
371
  If user wants to edit a row → fall through to a per-row prompt asking for `var name` or `targetText` correction.
372
+ {{/cap}}
373
+ {{^cap parallel-subagents}}
374
+ If user wants to edit a row → fall through to a per-row prompt for `var name` or `targetText` correction.
375
+ {{/cap}}
196
376
 
377
+ {{#cap parallel-subagents}}
197
378
  In OFFLINE mode this phase is the same table but `target text` column is blank — user fills via subsequent prompts or by editing the overlay file after the skill finishes.
379
+ {{/cap}}
380
+ {{^cap parallel-subagents}}
381
+ OFFLINE mode: same table but `target text` column blank — user fills via subsequent prompts or by editing the overlay file after the skill finishes.
382
+ {{/cap}}
198
383
 
199
384
  ## Phase 6 — Apply changes (always, after confirmation)
200
385
 
@@ -206,7 +391,12 @@ Replace `name: '<baseText>'` with `name: '{{<varName>}}'`. Preserve quoting styl
206
391
 
207
392
  **6b. Update `test-data/<feature>.yaml`** (base locale, complete dictionary)
208
393
 
394
+ {{#cap parallel-subagents}}
209
395
  Append new keys at the end, grouped under a `# === i18n: <screen> ===` comment. Example:
396
+ {{/cap}}
397
+ {{^cap parallel-subagents}}
398
+ Append new keys at the end, grouped under a `# === i18n: <screen> ===` comment:
399
+ {{/cap}}
210
400
 
211
401
  ```yaml
212
402
  # === i18n: home ===
@@ -226,10 +416,17 @@ nav_awards: 'Awards Info'
226
416
 
227
417
  **6d. (URL/query mechanism only) Update Pages selectors**
228
418
 
419
+ {{#cap parallel-subagents}}
229
420
  If Phase 3 detected URL prefix:
421
+ {{/cap}}
422
+ {{^cap parallel-subagents}}
423
+ URL prefix:
424
+ {{/cap}}
230
425
 
231
426
  ```yaml
427
+ {{#cap parallel-subagents}}
232
428
  # selectors/<feature>.yaml — Pages block becomes locale-aware
429
+ {{/cap}}
233
430
  home:
234
431
  type: 'page'
235
432
  value: '{{base_path}}/'
@@ -238,24 +435,64 @@ awards:
238
435
  value: '{{base_path}}/awards'
239
436
  ```
240
437
 
438
+ {{#cap parallel-subagents}}
241
439
  And add to test-data:
440
+ {{/cap}}
441
+ {{^cap parallel-subagents}}
442
+ Add to test-data:
443
+ {{/cap}}
242
444
  ```yaml
445
+ {{#cap parallel-subagents}}
243
446
  # test-data/<feature>.yaml (base)
447
+ {{/cap}}
448
+ {{^cap parallel-subagents}}
449
+ # base
450
+ {{/cap}}
244
451
  base_path: ''
245
452
 
453
+ {{#cap parallel-subagents}}
246
454
  # test-data/<feature>.<locale>.yaml (overlay)
455
+ {{/cap}}
456
+ {{^cap parallel-subagents}}
457
+ # overlay
458
+ {{/cap}}
247
459
  base_path: '/en'
248
460
  ```
249
461
 
462
+ {{#cap parallel-subagents}}
250
463
  If Phase 3 detected query param: similar but with `query_suffix: ''` / `query_suffix: '?lang=en'` appended to each page value.
464
+ {{/cap}}
465
+ {{^cap parallel-subagents}}
466
+ Query param mechanism: append `query_suffix` similarly.
467
+ {{/cap}}
251
468
 
469
+ {{#cap parallel-subagents}}
252
470
  If Phase 3 detected UI switcher: do NOT modify Pages. Instead, write the storage delta from Phase 3.5 into `specs/generated/locale-config.json` (sibling of `specs/generated/base.ts` + `specs/generated/locale-fixture.ts`) (see 6f below).
471
+ {{/cap}}
472
+ {{^cap parallel-subagents}}
473
+ UI switcher: do NOT modify Pages. Write storage delta into `specs/generated/locale-config.json` (sibling of generated `base.ts` + `locale-fixture.ts`) (6f).
474
+ {{/cap}}
253
475
 
476
+ {{#cap parallel-subagents}}
254
477
  **6f. Storage injection config — `specs/generated/locale-config.json` (sibling of `specs/generated/base.ts` + `specs/generated/locale-fixture.ts`)**
478
+ {{/cap}}
479
+ {{^cap parallel-subagents}}
480
+ **6f. Storage injection config — `specs/generated/locale-config.json` (sibling of generated `base.ts` + `locale-fixture.ts`)**
481
+ {{/cap}}
255
482
 
483
+ {{#cap parallel-subagents}}
256
484
  Always write `specs/generated/locale-config.json` (sibling of `specs/generated/base.ts` + `specs/generated/locale-fixture.ts`) with the verified storage delta from Phase 3.5/3.6. This file is consumed by `specs/locale-fixture.ts` (auto-generated alongside `specs/base.ts`) — the fixture wraps Playwright's context, calls `addInitScript` to seed sessionStorage / localStorage, and `addCookies` for any cookies, BEFORE the first page navigation. Without this file, `SUNGEN_ENV=<locale>` only swaps test-data overlay — the browser would still boot in base locale.
485
+ {{/cap}}
486
+ {{^cap parallel-subagents}}
487
+ Always write `specs/generated/locale-config.json` (sibling of generated `base.ts` + `locale-fixture.ts`) with the verified storage delta from Phase 3.5/3.6. Consumed by `specs/locale-fixture.ts` (auto-generated alongside `specs/base.ts`), which wraps Playwright's context and calls `addInitScript` + `addCookies` BEFORE the first navigation.
488
+ {{/cap}}
257
489
 
490
+ {{#cap parallel-subagents}}
258
491
  Schema (only include areas that actually changed):
492
+ {{/cap}}
493
+ {{^cap parallel-subagents}}
494
+ Schema:
495
+ {{/cap}}
259
496
 
260
497
  ```json
261
498
  {
@@ -265,10 +502,16 @@ Schema (only include areas that actually changed):
265
502
  },
266
503
  "localStorage": {},
267
504
  "cookies": [],
505
+ {{#cap parallel-subagents}}
268
506
  "notes": "Detected by /sungen:locale on YYYY-MM-DD. App persists locale in sessionStorage; initial trigger uses ?language=<code> query param."
507
+ {{/cap}}
508
+ {{^cap parallel-subagents}}
509
+ "notes": "Detected by /sungen:locale on YYYY-MM-DD. ..."
510
+ {{/cap}}
269
511
  }
270
512
  ```
271
513
 
514
+ {{#cap parallel-subagents}}
272
515
  Notes on the schema:
273
516
  - Use the literal placeholder `"${SUNGEN_ENV}"` (or `"{{SUNGEN_ENV}}"`) when the stored value equals the locale code itself. The fixture substitutes `process.env.SUNGEN_ENV` at runtime, so the same file works for `en`, `ja`, etc.
274
517
  - Use a hardcoded literal (e.g. `"en_US"`) when the stored value is fixed regardless of which locale runs.
@@ -277,12 +520,26 @@ Notes on the schema:
277
520
  - `notes` is free-form, informational; the fixture ignores it.
278
521
 
279
522
  Multi-locale projects: the same `locale-config.json` works for every locale because the value templating uses `${SUNGEN_ENV}`. No per-locale file needed.
523
+ {{/cap}}
524
+ {{^cap parallel-subagents}}
525
+ Use `"${SUNGEN_ENV}"` (or `"{{SUNGEN_ENV}}"`) as placeholder for runtime substitution. Use hardcoded literals when the stored value is fixed regardless of locale. Drop auth tokens / session IDs even if the Phase 3.5 diff captured them.
526
+ {{/cap}}
280
527
 
528
+ {{#cap parallel-subagents}}
281
529
  The file lives at `specs/generated/locale-config.json` (sibling of `specs/generated/base.ts` + `specs/generated/locale-fixture.ts`) (sibling of `specs/base.ts`). If a different output directory is used, mirror the existing `specs/base.ts` location.
530
+ {{/cap}}
531
+ {{^cap parallel-subagents}}
532
+ Multi-locale projects use the same file — placeholder gets substituted at runtime per locale.
533
+ {{/cap}}
282
534
 
283
535
  **6e. Compile**
284
536
 
537
+ {{#cap parallel-subagents}}
285
538
  Run `sungen generate --screen <name>` (or `--flow`) and report any compile errors back to the user. The selectors changed so compile must succeed before run-test.
539
+ {{/cap}}
540
+ {{^cap parallel-subagents}}
541
+ Run `sungen generate --screen <name>` (or `--flow`) and report any compile errors. Selectors changed → compile MUST succeed before run-test.
542
+ {{/cap}}
286
543
 
287
544
  ## Phase 7 — Hand off
288
545
 
@@ -301,16 +558,31 @@ Suggest:
301
558
 
302
559
  ## Multi-feature screens
303
560
 
561
+ {{#cap parallel-subagents}}
304
562
  If the screen has multiple `.feature` files (e.g. `home.feature` + `home-modal.feature`), repeat Phase 1 → Phase 6 for each feature file with its own selectors + test-data pair. Phase 2 + 3 (live capture + locale switch detection) run **once per screen** — the mechanism is the same. Phase 4 (text diff) runs per feature because each has its own scope of UI.
563
+ {{/cap}}
564
+ {{^cap parallel-subagents}}
565
+ If the screen has multiple `.feature` files (e.g. `home.feature` + `home-modal.feature`), repeat Phase 1 → Phase 6 for each feature file with its own selectors + test-data pair. Phase 2 + 3 run **once per screen** — mechanism is the same. Phase 4 runs per feature because UI scope differs.
566
+ {{/cap}}
305
567
 
306
568
  ## What NOT to do
307
569
 
308
570
  - Do not edit `.feature` files. The i18n shape is already correct there (`{{var}}` was the convention from the start). Only selectors + test-data need surgery.
571
+ {{#cap parallel-subagents}}
309
572
  - Do not write a separate selectors file per locale (`home.en.yaml`). One selectors file with `{{var}}` works across all locales — that's the whole point.
310
573
  - Do not delete keys from the base `test-data/<feature>.yaml`. Always append. Existing tests rely on base values being complete.
311
574
  - Do not run tests in this skill. Hand off to `/sungen:run-test` for execution.
575
+ {{/cap}}
576
+ {{^cap parallel-subagents}}
577
+ - Do not write a separate selectors file per locale (`home.en.yaml`). One selectors file with `{{var}}` works across all locales.
578
+ - Do not delete keys from the base `test-data/<feature>.yaml`. Always append.
579
+ - Do not run tests in this skill. Hand off to `/sungen:run-test`.
580
+ {{/cap}}
312
581
  - Do not commit. Hand off to user.
313
582
 
583
+ {{#cap parallel-subagents}}
314
584
  ## Memory link
315
585
 
316
586
  Related: [[saa-auth-blocker]] — Live mode will not work on SAA staging while the upstream Supabase `persistSession: false` issue is open. Default to Offline mode on SAA until that ships.
587
+
588
+ {{/cap}}
@@ -48,13 +48,23 @@ When running Phase 0 for a **flow** (`qa/flows/<name>/`), check existing screen
48
48
 
49
49
  ### Steps
50
50
 
51
+ {{#cap parallel-subagents}}
52
+ 1. **Confirm with the user** via `AskUserQuestion`: *"Generate selectors from the live page via Playwright MCP now?"* — offer **Yes, scan live page** / **Skip (use existing selectors.yaml)** / **Cancel**.
53
+ {{/cap}}
54
+ {{^cap parallel-subagents}}
51
55
  1. **Confirm with the user**: *"Generate selectors from the live page via Playwright MCP now?"* — offer **Yes, scan live page** / **Skip (use existing selectors.yaml)** / **Cancel**.
56
+ {{/cap}}
52
57
  2. **Collect references**: parse the `.feature` file for every `[Reference]` element + its type (e.g. `[Submit] button`, `[Email] field`). Deduplicate.
53
58
  3. **Ensure page selector**: if missing, ask user for URL path and write it first.
54
59
  4. **Navigate**:
55
60
  - Read `baseURL` from `playwright.config.ts`.
56
61
  - `browser_navigate` to the page URL.
62
+ {{#cap parallel-subagents}}
63
+ - If redirected to login → run **Phase 0.5: Auth Persistence** first (see below), then re-navigate to the target page.
64
+ {{/cap}}
65
+ {{^cap parallel-subagents}}
57
66
  - If redirected to login → **ask the user to log in manually in the MCP browser**, wait for confirmation, then continue. Never use `sungen makeauth`. Never inject cookies via `browser_evaluate`.
67
+ {{/cap}}
58
68
  5. **Snapshot**: Wait for the page to fully load before snapshotting.
59
69
  - Check if the page is still loading (spinner visible, skeleton placeholders, empty table with 0 rows). If so, use `browser_wait_for` to wait until content is rendered.
60
70
  - Then take **ONE** `browser_snapshot`. All Phase 0 selectors come from this single snapshot.
@@ -90,6 +100,7 @@ When running Phase 0 for a **flow** (`qa/flows/<name>/`), check existing screen
90
100
 
91
101
  ---
92
102
 
103
+ {{^cap parallel-subagents}}
93
104
  ## Phase 0 (Provisional): Figma-Only Selector Generation (no live page)
94
105
 
95
106
  **Trigger**: Phase 0 decision tree (in `run-test` command) determined the live page is not reachable AND `requirements/spec_figma.md` exists.
@@ -151,6 +162,7 @@ When `run-test` is called again and the live page is now reachable:
151
162
 
152
163
  ---
153
164
 
165
+ {{/cap}}
154
166
  ## Phase 0.5: Auth Persistence (MCP alternative to `sungen makeauth`)
155
167
 
156
168
  Capture an authenticated session from the MCP browser into `specs/.auth/<role>.json` — the same path `sungen makeauth` writes to, which compiled tests already reference via `test.use({ storageState })` based on `@auth:<role>` tags. No `playwright.config.ts` edits needed. Run once per auth lifetime, not on every selector fix.
@@ -168,7 +180,12 @@ Skip if `specs/.auth/<role>.json` already exists and a probe navigation reaches
168
180
  1. **Resolve the role**:
169
181
  - Look at the `.feature` file for `@auth:<role>` tags (feature-level or scenario-level). Pick the role for the scenario being run. If no tag exists, default to `user`.
170
182
  - Target file: `specs/.auth/<role>.json`. Create `specs/.auth/` if missing.
183
+ {{#cap parallel-subagents}}
184
+ - If the file already exists → use `AskUserQuestion` to confirm overwrite (mirrors the `(y/N)` prompt in `sungen makeauth`).
185
+ {{/cap}}
186
+ {{^cap parallel-subagents}}
171
187
  - If the file already exists → confirm overwrite with the user (mirrors the `(y/N)` prompt in `sungen makeauth`).
188
+ {{/cap}}
172
189
  2. **Navigate to login**:
173
190
  - Read `baseURL` from `playwright.config.ts` (fall back to `APP_BASE_URL` env, then `http://localhost:3000` — same resolution order as `sungen makeauth`).
174
191
  - `browser_navigate` to `<baseURL>/login`. If the app uses a different login path, ask the user.
@@ -23,7 +23,12 @@ Populate `selectors.yaml` from the live app before compiling so tests don't fail
23
23
  - User re-scans after a UI change.
24
24
 
25
25
  ### Steps
26
+ {{#cap parallel-subagents}}
26
27
  1. **Confirm** via `AskUserQuestion`: *"Generate selectors from the live app via Appium MCP now?"* —
28
+ {{/cap}}
29
+ {{^cap parallel-subagents}}
30
+ 1. **Confirm**: *"Generate selectors from the live app via Appium MCP now?"* —
31
+ {{/cap}}
27
32
  **Yes, scan device** / **Skip (use existing)** / **Cancel**.
28
33
  2. **Collect references**: parse the `.feature` for every `[Reference]` + type. Deduplicate.
29
34
  3. **Launch the app** (delegate to `sungen-capture-mobile` or inline):
@@ -9,7 +9,12 @@ user-invocable: false
9
9
  - **Write incrementally — never emit the whole suite in one response.** Build the `.feature` in batches via successive `Write`/`Edit` (≈10–15 scenarios per call). For **Full coverage**, write tier-by-tier: `Write` Tier 1 → `Edit` append Tier 2 → `Edit` append Tier 3.
10
10
  → One huge `Write` can exceed the model's output-token cap → `API Error: Claude's response exceeded the N output token maximum`. Single-pass full coverage only fits when `CLAUDE_CODE_MAX_OUTPUT_TOKENS ≥ 64000`; otherwise batch. Batching also lets the audit/reviewer run per batch — higher quality.
11
11
 
12
+ {{#cap parallel-subagents}}
12
13
  - **Sharded (parallel) generation — keep each shard self-contained.** When `create-test` fans out one `sungen-generator` sub-agent per shard (a viewpoint theme like `VP-SEC`, or a `spec.md` section — see create-test Steps 5a–5c), you are generating **only your shard**: emit your scenarios under **your own `VP-` prefix** (disjoint namespace, so ids never collide), as a **headerless fragment** (no `Feature:` line — the orchestrator owns the single header). Do not reference or renumber other shards. The orchestrator concatenates fragments in stable order (spec-section / theme order), dedups by title, and unions test-data. Small fragments also stay under the output-token cap by construction.
14
+ {{/cap}}
15
+ {{^cap parallel-subagents}}
16
+ - **Generate group-by-group (sequential here).** Copilot has no sub-agents, so generate one viewpoint group/theme at a time, tier-by-tier, keeping each `VP-` theme in its own id prefix. (The Claude Code variant fans these out as parallel `sungen-generator` shards and merges — same output shape, just no speedup. Keep each theme self-contained so it would merge cleanly either way.)
17
+ {{/cap}}
13
18
 
14
19
  - `spec_figma.md` exists → read file only, **NEVER** call `mcp__figma__*`
15
20
  → PAT auth flow already done by `sungen-capture` (mode figma-pat); re-calling fails or duplicates work.
@@ -37,14 +37,17 @@ export default defineConfig({
37
37
  testDir: './specs/generated',
38
38
  /* Output directory for test artifacts (screenshots, videos, traces). */
39
39
  outputDir: './test-results',
40
- /* Run tests in files in parallel */
41
- fullyParallel: true,
40
+ /* Sequential by default. Scenarios are per-scenario ISOLATED (each test gets a fresh page), so a
41
+ failure never cascades — but we run one-at-a-time (workers: 1) so a heavy live site isn't hit by
42
+ concurrent workers (which causes flaky timeouts / ad-consent races). Once your suite is stable
43
+ and your target tolerates concurrency, raise `workers` (and set `fullyParallel: true`) for speed. */
44
+ fullyParallel: false,
42
45
  /* Fail the build on CI if you accidentally left test.only in the source code. */
43
46
  forbidOnly: !!process.env.CI,
44
47
  /* Retry on CI only */
45
48
  retries: process.env.CI ? 2 : 0,
46
- /* Opt out of parallel tests on CI. */
47
- workers: process.env.CI ? 1 : 2,
49
+ /* One worker sequential execution, no cross-test contention on the target site. */
50
+ workers: 1,
48
51
  /* Global timeout per test */
49
52
  timeout: 15_000,
50
53
  /* Reporter to use. See https://playwright.dev/docs/test-reporters */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sun-asterisk/sungen",
3
- "version": "3.2.2",
3
+ "version": "3.2.3-beta.3",
4
4
  "description": "Deterministic E2E Test Compiler - Gherkin + Selectors → Playwright tests",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -12,7 +12,7 @@
12
12
  "copy-templates": "mkdir -p dist/generators/test-generator/adapters/playwright/templates/steps && mkdir -p dist/generators/test-generator/templates && mkdir -p dist/orchestrator/templates && mkdir -p dist/dashboard/templates && cp -r src/generators/test-generator/adapters/playwright/templates/*.hbs dist/generators/test-generator/adapters/playwright/templates/ 2>/dev/null || true && cp -r src/generators/test-generator/adapters/playwright/templates/steps dist/generators/test-generator/adapters/playwright/templates/ && mkdir -p dist/generators/test-generator/adapters/appium/templates/steps && cp -r src/generators/test-generator/adapters/appium/templates/*.hbs dist/generators/test-generator/adapters/appium/templates/ 2>/dev/null || true && cp -r src/generators/test-generator/adapters/appium/templates/steps dist/generators/test-generator/adapters/appium/templates/ && cp src/generators/test-generator/templates/*.hbs dist/generators/test-generator/templates/ 2>/dev/null || true && cp -r src/orchestrator/templates/* dist/orchestrator/templates/ && cp src/dashboard/templates/index.html dist/dashboard/templates/index.html && mkdir -p dist/harness/catalog && cp src/harness/catalog/*.yaml dist/harness/catalog/",
13
13
  "build:dashboard": "cd ../../dashboard && npm install --silent && npm run build && cd - && cp ../../dashboard/dist/index.html src/dashboard/templates/index.html",
14
14
  "dev": "tsx src/cli/index.ts",
15
- "test": "tsx tests/golden/run.ts && tsx tests/audit/run.ts && tsx tests/ingest/run.ts && tsx tests/eval/run.ts && tsx tests/exporter/run.ts && tsx tests/exporter/feature-parser-category.run.ts && tsx tests/exporter/api-detail-sheet.run.ts && tsx tests/api-runtime/base-path-url-join.run.ts && tsx tests/capabilities/run.ts && tsx tests/openapi/run.ts && tsx tests/packaging/run.ts",
15
+ "test": "tsx tests/golden/run.ts && tsx tests/audit/run.ts && tsx tests/ingest/run.ts && tsx tests/eval/run.ts && tsx tests/exporter/run.ts && tsx tests/exporter/feature-parser-category.run.ts && tsx tests/exporter/api-detail-sheet.run.ts && tsx tests/exporter/mobile-app-id.run.ts && tsx tests/api-runtime/base-path-url-join.run.ts && tsx tests/capabilities/run.ts && tsx tests/openapi/run.ts && tsx tests/packaging/run.ts && tsx tests/generate-hint/run.ts && tsx tests/template-assertion/run.ts && tsx tests/journey/run.ts && tsx tests/harness/serial-cascade.run.ts && tsx src/orchestrator/ai-skills/golden-skills.test.ts",
16
16
  "test:update": "tsx tests/golden/run.ts --update && tsx tests/audit/run.ts --update && tsx tests/ingest/run.ts --update",
17
17
  "prepublishOnly": "npm run build:dashboard && npm run build"
18
18
  },
@@ -33,7 +33,7 @@
33
33
  "node": ">=18.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@sungen/driver-ui": "3.2.2",
36
+ "@sungen/driver-ui": "3.2.3-beta.3",
37
37
  "@anthropic-ai/sdk": "^0.71.0",
38
38
  "@babel/parser": "^7.28.5",
39
39
  "@babel/traverse": "^7.28.5",