@orion-qa/orion 3.0.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (637) hide show
  1. package/.claude/agents/automation-strategist.md +1 -0
  2. package/.claude/agents/change-agent.md +1 -0
  3. package/.claude/agents/codebase-analyst.md +2 -1
  4. package/.claude/agents/environment-discovery.md +1 -0
  5. package/.claude/agents/evidence-validator.md +1 -0
  6. package/.claude/agents/executor.md +1 -0
  7. package/.claude/agents/failure-analyst.md +2 -1
  8. package/.claude/agents/implementer.md +2 -1
  9. package/.claude/agents/requirement-analyst.md +1 -0
  10. package/.claude/agents/reviewer.md +1 -0
  11. package/.claude/agents/test-reporter.md +1 -0
  12. package/.claude/settings.json +25 -0
  13. package/.claude/skills/appium/SKILL.md +1 -1
  14. package/.claude/skills/appium/templates/README.md +6 -9
  15. package/.claude/skills/appium/templates/ci/github-actions-android.yml +8 -2
  16. package/.claude/skills/appium/templates/ci/github-actions-ios.yml +8 -2
  17. package/.claude/skills/appium/templates/ci/github-actions-windows.yml +9 -2
  18. package/.claude/skills/appium/templates/project-java/.env.example +4 -0
  19. package/.claude/skills/appium/templates/project-java/pom.xml +2 -0
  20. package/.claude/skills/appium/templates/project-java/src/test/java/automation/{framework/Config.java → config/Env.java} +43 -52
  21. package/.claude/skills/appium/templates/project-java/src/test/java/automation/config/Flags.java +45 -0
  22. package/.claude/skills/appium/templates/project-java/src/test/java/automation/config/Paths.java +14 -0
  23. package/.claude/skills/appium/templates/project-java/src/test/java/automation/desc/SignInDesc.java +30 -0
  24. package/.claude/skills/appium/templates/project-java/src/test/java/automation/{framework → driver}/DriverFactory.java +19 -13
  25. package/.claude/skills/appium/templates/project-java/src/test/java/automation/{framework → driver}/DriverManager.java +12 -9
  26. package/.claude/skills/appium/templates/project-java/src/test/java/automation/fixtures/BaseTest.java +75 -0
  27. package/.claude/skills/appium/templates/project-java/src/test/java/automation/{screens → pageObjects}/BaseScreen.java +12 -12
  28. package/.claude/skills/appium/templates/project-java/src/test/java/automation/pageObjects/HomeScreen.java +26 -0
  29. package/.claude/skills/appium/templates/project-java/src/test/java/automation/pageObjects/LoginScreen.java +63 -0
  30. package/.claude/skills/appium/templates/project-java/src/test/java/automation/pageObjects/ShellScreen.java +26 -0
  31. package/.claude/skills/appium/templates/project-java/src/test/java/automation/setup/AuthSetup.java +49 -0
  32. package/.claude/skills/appium/templates/project-java/src/test/java/automation/testData/TestData.java +78 -0
  33. package/.claude/skills/appium/templates/project-java/src/test/java/automation/tests/ui/SignInTest.java +45 -0
  34. package/.claude/skills/appium/templates/project-java/src/test/java/automation/tests/unit/UtilsTest.java +34 -0
  35. package/.claude/skills/appium/templates/project-java/src/test/java/automation/{framework → utils}/AutomationError.java +4 -4
  36. package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/Case.java +20 -0
  37. package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/CaseTransformer.java +54 -0
  38. package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/Dates.java +42 -0
  39. package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/Log.java +45 -0
  40. package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/MissingSettingError.java +13 -0
  41. package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/RandomData.java +41 -0
  42. package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/Redact.java +33 -0
  43. package/.claude/skills/appium/templates/project-java/src/test/java/automation/utils/TestDescription.java +25 -0
  44. package/.claude/skills/appium/templates/project-java/src/test/resources/testData/testData.properties +7 -0
  45. package/.claude/skills/appium/templates/project-java/testng.xml +11 -4
  46. package/.claude/skills/architecture-analysis/SKILL.md +3 -2
  47. package/.claude/skills/automation-implementation/SKILL.md +8 -5
  48. package/.claude/skills/automation-implementation/references/patterns.md +46 -24
  49. package/.claude/skills/automation-review/references/assertion-guard.md +1 -1
  50. package/.claude/skills/code-review/SKILL.md +5 -2
  51. package/.claude/skills/code-review/references/pattern-rules.md +12 -7
  52. package/.claude/skills/documentation/SKILL.md +23 -18
  53. package/.claude/skills/execution/SKILL.md +7 -3
  54. package/.claude/skills/httpclient/templates/README.md +6 -7
  55. package/.claude/skills/httpclient/templates/csharp-nunit/.env.example +4 -0
  56. package/.claude/skills/httpclient/templates/csharp-nunit/Automation.csproj +7 -3
  57. package/.claude/skills/httpclient/templates/csharp-nunit/Config/Env.cs +62 -0
  58. package/.claude/skills/httpclient/templates/csharp-nunit/Config/Flags.cs +35 -0
  59. package/.claude/skills/httpclient/templates/csharp-nunit/Config/Paths.cs +22 -0
  60. package/.claude/skills/httpclient/templates/csharp-nunit/Fixtures/BaseTest.cs +22 -0
  61. package/.claude/skills/httpclient/templates/csharp-nunit/Resources/Desc/ProductsDesc.cs +22 -0
  62. package/.claude/skills/httpclient/templates/csharp-nunit/Resources/TestData/TestData.cs +61 -0
  63. package/.claude/skills/httpclient/templates/csharp-nunit/Resources/TestData/testData.json +9 -0
  64. package/.claude/skills/httpclient/templates/csharp-nunit/Services/ApiClient.cs +48 -0
  65. package/.claude/skills/httpclient/templates/csharp-nunit/Services/HealthApi.cs +11 -0
  66. package/.claude/skills/httpclient/templates/csharp-nunit/{Api → Services}/ProductsApi.cs +8 -5
  67. package/.claude/skills/httpclient/templates/csharp-nunit/Tests/Api/ProductsTests.cs +61 -0
  68. package/.claude/skills/httpclient/templates/csharp-nunit/Tests/Unit/UtilsTests.cs +40 -0
  69. package/.claude/skills/httpclient/templates/csharp-nunit/Utils/AutomationError.cs +15 -0
  70. package/.claude/skills/httpclient/templates/csharp-nunit/Utils/Dates.cs +18 -0
  71. package/.claude/skills/httpclient/templates/csharp-nunit/Utils/Log.cs +37 -0
  72. package/.claude/skills/httpclient/templates/csharp-nunit/Utils/RandomData.cs +26 -0
  73. package/.claude/skills/httpclient/templates/csharp-nunit/Utils/Redact.cs +22 -0
  74. package/.claude/skills/httpclient/templates/csharp-nunit/Utils/TestDescription.cs +55 -0
  75. package/.claude/skills/javascript/references/sources.md +1 -1
  76. package/.claude/skills/k6/SKILL.md +1 -1
  77. package/.claude/skills/k6/templates/README.md +5 -3
  78. package/.claude/skills/k6/templates/project/{data/cases.js → resources/desc/products.desc.js} +1 -1
  79. package/.claude/skills/k6/templates/project/resources/testData/testData.js +32 -0
  80. package/.claude/skills/k6/templates/project/{lib/config.js → src/config/env.js} +10 -5
  81. package/.claude/skills/k6/templates/project/{lib → src/services}/products-api.js +7 -5
  82. package/.claude/skills/k6/templates/project/{load → tests/load}/products.js +8 -8
  83. package/.claude/skills/karate/templates/README.md +4 -5
  84. package/.claude/skills/karate/templates/java-junit5/.env.example +2 -0
  85. package/.claude/skills/karate/templates/java-junit5/pom.xml +4 -0
  86. package/.claude/skills/karate/templates/java-junit5/src/test/java/{support → config}/EnvSettings.java +1 -1
  87. package/.claude/skills/karate/templates/java-junit5/src/test/java/karate-config.js +13 -6
  88. package/.claude/skills/karate/templates/java-junit5/src/test/java/logback-test.xml +1 -1
  89. package/.claude/skills/karate/templates/java-junit5/src/test/java/{api → tests}/ApiTest.java +7 -4
  90. package/.claude/skills/karate/templates/java-junit5/src/test/java/{api → tests/api}/health.feature +3 -3
  91. package/.claude/skills/karate/templates/java-junit5/src/test/java/tests/api/products.feature +29 -0
  92. package/.claude/skills/karate/templates/java-junit5/src/test/java/{support → utils}/MaskingLogModifier.java +1 -1
  93. package/.claude/skills/karate/templates/java-junit5/src/test/resources/testData/newProduct.js +7 -0
  94. package/.claude/skills/karate/templates/java-junit5/src/test/resources/testData/testData.json +6 -0
  95. package/.claude/skills/newman/templates/README.md +4 -5
  96. package/.claude/skills/newman/templates/collection/.env.example +2 -0
  97. package/.claude/skills/newman/templates/collection/collections/api.postman_collection.json +165 -145
  98. package/.claude/skills/newman/templates/collection/package.json +2 -1
  99. package/.claude/skills/newman/templates/collection/resources/desc/products.desc.json +53 -0
  100. package/.claude/skills/newman/templates/collection/resources/testData/testData.json +10 -0
  101. package/.claude/skills/newman/templates/collection/run.js +41 -31
  102. package/.claude/skills/newman/templates/collection/src/config/env.js +37 -0
  103. package/.claude/skills/orion/SKILL.md +19 -12
  104. package/.claude/skills/orion/references/assess-fix.md +35 -0
  105. package/.claude/skills/orion/references/batch.md +64 -0
  106. package/.claude/skills/orion/references/blockers.md +1 -1
  107. package/.claude/skills/orion/references/capabilities.md +1 -1
  108. package/.claude/skills/orion/references/conversation.md +65 -20
  109. package/.claude/skills/orion/references/delivery-formats.md +24 -36
  110. package/.claude/skills/orion/references/doctor.md +1 -1
  111. package/.claude/skills/orion/references/hosts.md +1 -0
  112. package/.claude/skills/orion/references/modes.md +7 -3
  113. package/.claude/skills/orion/references/plain-language.md +55 -0
  114. package/.claude/skills/orion/references/project-context-files.md +8 -2
  115. package/.claude/skills/orion/references/recovery-loop.md +8 -0
  116. package/.claude/skills/orion/references/setup-card.md +29 -8
  117. package/.claude/skills/orion/references/status-lines.md +9 -4
  118. package/.claude/skills/orion/references/task-brief.md +1 -0
  119. package/.claude/skills/orion/references/work-branch.md +3 -1
  120. package/.claude/skills/orion/scripts/batch_detect.mjs +98 -0
  121. package/.claude/skills/orion/scripts/batch_state.mjs +179 -0
  122. package/.claude/skills/orion/scripts/browser_setup.mjs +41 -21
  123. package/.claude/skills/orion/scripts/cases_export.py +724 -0
  124. package/.claude/skills/orion/scripts/codemap.mjs +116 -0
  125. package/.claude/skills/orion/scripts/done_check.mjs +195 -0
  126. package/.claude/skills/orion/scripts/env_check.mjs +8 -3
  127. package/.claude/skills/orion/scripts/env_check.py +12 -5
  128. package/.claude/skills/orion/scripts/fix_plan.mjs +170 -0
  129. package/.claude/skills/orion/scripts/graph.mjs +400 -0
  130. package/.claude/skills/orion/scripts/hooks/lean_guard.mjs +162 -0
  131. package/.claude/skills/orion/scripts/lib/inside.mjs +31 -0
  132. package/.claude/skills/orion/scripts/lib/scan.mjs +357 -0
  133. package/.claude/skills/orion/scripts/lib/table.mjs +116 -0
  134. package/.claude/skills/orion/scripts/parity_check.mjs +166 -0
  135. package/.claude/skills/orion/scripts/quiet.mjs +160 -0
  136. package/.claude/skills/orion/scripts/report_check.mjs +77 -0
  137. package/.claude/skills/orion/scripts/results_parse.mjs +209 -0
  138. package/.claude/skills/orion/scripts/reuse_check.mjs +251 -0
  139. package/.claude/skills/orion/scripts/rules.mjs +92 -0
  140. package/.claude/skills/orion/scripts/run_state.mjs +238 -0
  141. package/.claude/skills/orion/scripts/suite_check.mjs +267 -0
  142. package/.claude/skills/orion/scripts/timing_profile.mjs +128 -0
  143. package/.claude/skills/orion/scripts/usage_report.mjs +315 -0
  144. package/.claude/skills/orion/templates/project-context/assessment.md +45 -0
  145. package/.claude/skills/orion/templates/project-context/defects.md +5 -0
  146. package/.claude/skills/orion/templates/project-context/report.md +45 -0
  147. package/.claude/skills/orion/templates/project-context/retry-policy.md +6 -0
  148. package/.claude/skills/orion/templates/project-context/run.md +4 -1
  149. package/.claude/skills/orion/templates/project-context/test-case-map.md +5 -0
  150. package/.claude/skills/orion/templates/project-context/test-design.md +24 -0
  151. package/.claude/skills/pact/SKILL.md +2 -2
  152. package/.claude/skills/pact/templates/README.md +4 -2
  153. package/.claude/skills/pact/templates/project/package.json +2 -2
  154. package/.claude/skills/pact/templates/project/{data/cases.js → resources/desc/products.desc.js} +3 -3
  155. package/.claude/skills/pact/templates/project/resources/testData/testData.js +21 -0
  156. package/.claude/skills/pact/templates/project/src/config/env.js +32 -0
  157. package/.claude/skills/pact/templates/project/src/{products-client.js → services/products-client.js} +4 -2
  158. package/.claude/skills/pact/templates/project/tests/contract/products.contract.test.js +46 -0
  159. package/.claude/skills/pact/templates/project/{verify → tests/verify}/products.verify.js +7 -22
  160. package/.claude/skills/playwright/SKILL.md +6 -6
  161. package/.claude/skills/playwright/templates/README.md +29 -10
  162. package/.claude/skills/playwright/templates/ci/Jenkinsfile +1 -1
  163. package/.claude/skills/playwright/templates/ci/azure-pipelines.yml +1 -1
  164. package/.claude/skills/playwright/templates/ci/github-actions-javascript.yml +1 -1
  165. package/.claude/skills/playwright/templates/ci/github-actions.yml +1 -1
  166. package/.claude/skills/playwright/templates/ci/gitlab-ci.yml +1 -1
  167. package/.claude/skills/playwright/templates/dotnet/.env.example +7 -0
  168. package/.claude/skills/playwright/templates/dotnet/.runsettings +17 -0
  169. package/.claude/skills/playwright/templates/dotnet/Automation.csproj +8 -0
  170. package/.claude/skills/playwright/templates/dotnet/Config/Env.cs +89 -0
  171. package/.claude/skills/playwright/templates/dotnet/Config/Flags.cs +56 -0
  172. package/.claude/skills/playwright/templates/dotnet/Config/Paths.cs +31 -0
  173. package/.claude/skills/playwright/templates/dotnet/Fixtures/ApiBaseTest.cs +39 -0
  174. package/.claude/skills/playwright/templates/dotnet/Fixtures/BaseTest.cs +72 -0
  175. package/.claude/skills/playwright/templates/dotnet/PageObjects/BasePage.cs +63 -0
  176. package/.claude/skills/playwright/templates/dotnet/PageObjects/HomePage.cs +21 -0
  177. package/.claude/skills/playwright/templates/dotnet/PageObjects/LoginPage.cs +54 -0
  178. package/.claude/skills/playwright/templates/dotnet/PageObjects/ShellPage.cs +29 -0
  179. package/.claude/skills/playwright/templates/dotnet/Resources/Desc/SignInDesc.cs +23 -0
  180. package/.claude/skills/playwright/templates/dotnet/Resources/TestData/TestData.cs +74 -0
  181. package/.claude/skills/playwright/templates/dotnet/Resources/TestData/testData.json +19 -0
  182. package/.claude/skills/playwright/templates/dotnet/Services/ApiClient.cs +51 -0
  183. package/.claude/skills/playwright/templates/dotnet/Setup/AuthSetup.cs +63 -0
  184. package/.claude/skills/playwright/templates/dotnet/Tests/Api/SessionTests.cs +18 -0
  185. package/.claude/skills/playwright/templates/dotnet/Tests/Ui/SignInTests.cs +48 -0
  186. package/.claude/skills/playwright/templates/dotnet/Tests/Unit/UtilsTests.cs +40 -0
  187. package/.claude/skills/playwright/templates/dotnet/Utils/AutomationError.cs +15 -0
  188. package/.claude/skills/playwright/templates/dotnet/Utils/Dates.cs +18 -0
  189. package/.claude/skills/playwright/templates/dotnet/Utils/Log.cs +37 -0
  190. package/.claude/skills/playwright/templates/dotnet/Utils/RandomData.cs +26 -0
  191. package/.claude/skills/playwright/templates/dotnet/Utils/Redact.cs +22 -0
  192. package/.claude/skills/playwright/templates/dotnet/Utils/TestDescription.cs +55 -0
  193. package/.claude/skills/playwright/templates/dotnet/gitignore +6 -1
  194. package/.claude/skills/playwright/templates/javascript/.env.example +8 -0
  195. package/.claude/skills/playwright/templates/javascript/fixtures/index.js +85 -0
  196. package/.claude/skills/playwright/templates/javascript/fixtures/session.js +82 -0
  197. package/.claude/skills/playwright/templates/javascript/gitignore +7 -0
  198. package/.claude/skills/playwright/templates/javascript/jsconfig.json +12 -0
  199. package/.claude/skills/playwright/templates/javascript/package.json +7 -3
  200. package/.claude/skills/playwright/templates/javascript/pageObjects/basePage.js +62 -0
  201. package/.claude/skills/playwright/templates/javascript/pageObjects/homePage.js +19 -0
  202. package/.claude/skills/playwright/templates/javascript/pageObjects/loginPage.js +44 -0
  203. package/.claude/skills/playwright/templates/javascript/pageObjects/shellPage.js +26 -0
  204. package/.claude/skills/playwright/templates/javascript/playwright.config.js +45 -24
  205. package/.claude/skills/playwright/templates/javascript/reporters/summaryReporter.js +233 -0
  206. package/.claude/skills/playwright/templates/javascript/resources/desc/signIn.desc.js +33 -0
  207. package/.claude/skills/playwright/templates/javascript/resources/testData/testData.js +45 -0
  208. package/.claude/skills/playwright/templates/javascript/setup/auth.setup.js +17 -0
  209. package/.claude/skills/playwright/templates/javascript/setup/auth.teardown.js +16 -0
  210. package/.claude/skills/playwright/templates/javascript/src/config/env.js +107 -0
  211. package/.claude/skills/playwright/templates/javascript/src/config/flags.js +70 -0
  212. package/.claude/skills/playwright/templates/javascript/src/config/loadEnv.js +21 -0
  213. package/.claude/skills/playwright/templates/javascript/src/config/paths.js +22 -0
  214. package/.claude/skills/playwright/templates/javascript/src/services/apiClient.js +68 -0
  215. package/.claude/skills/playwright/templates/javascript/tests/api/session.spec.js +15 -0
  216. package/.claude/skills/playwright/templates/javascript/tests/ui/signIn.spec.js +35 -0
  217. package/.claude/skills/playwright/templates/javascript/tests/unit/summaryReporter.test.js +34 -0
  218. package/.claude/skills/playwright/templates/javascript/tests/unit/utils.test.js +31 -0
  219. package/.claude/skills/playwright/templates/javascript/utils/date.js +28 -0
  220. package/.claude/skills/playwright/templates/javascript/{src → utils}/errors.js +1 -0
  221. package/.claude/skills/playwright/templates/javascript/utils/formFill.js +29 -0
  222. package/.claude/skills/playwright/templates/javascript/utils/logger.js +33 -0
  223. package/.claude/skills/playwright/templates/javascript/utils/random.js +37 -0
  224. package/.claude/skills/playwright/templates/javascript/utils/redact.js +35 -0
  225. package/.claude/skills/playwright/templates/javascript/utils/titles.js +38 -0
  226. package/.claude/skills/playwright/templates/project/.env.example +8 -0
  227. package/.claude/skills/playwright/templates/project/fixtures/index.ts +86 -0
  228. package/.claude/skills/playwright/templates/project/fixtures/session.ts +78 -0
  229. package/.claude/skills/playwright/templates/project/gitignore +9 -2
  230. package/.claude/skills/playwright/templates/project/package.json +8 -6
  231. package/.claude/skills/playwright/templates/project/pageObjects/basePage.ts +57 -0
  232. package/.claude/skills/playwright/templates/project/pageObjects/homePage.ts +20 -0
  233. package/.claude/skills/playwright/templates/project/pageObjects/loginPage.ts +47 -0
  234. package/.claude/skills/playwright/templates/project/pageObjects/shellPage.ts +22 -0
  235. package/.claude/skills/playwright/templates/project/playwright.config.ts +49 -23
  236. package/.claude/skills/playwright/templates/project/reporters/summaryReporter.ts +241 -0
  237. package/.claude/skills/playwright/templates/project/resources/desc/signIn.desc.ts +32 -0
  238. package/.claude/skills/playwright/templates/project/resources/testData/testData.ts +42 -0
  239. package/.claude/skills/playwright/templates/project/setup/auth.setup.ts +16 -0
  240. package/.claude/skills/playwright/templates/project/setup/auth.teardown.ts +15 -0
  241. package/.claude/skills/playwright/templates/project/src/config/env.ts +109 -0
  242. package/.claude/skills/playwright/templates/project/src/config/flags.ts +70 -0
  243. package/.claude/skills/playwright/templates/project/src/config/loadEnv.ts +17 -0
  244. package/.claude/skills/playwright/templates/project/src/config/paths.ts +19 -0
  245. package/.claude/skills/playwright/templates/project/src/services/apiClient.ts +70 -0
  246. package/.claude/skills/playwright/templates/project/tests/api/session.spec.ts +14 -0
  247. package/.claude/skills/playwright/templates/project/tests/ui/signIn.spec.ts +34 -0
  248. package/.claude/skills/playwright/templates/project/tests/unit/summaryReporter.test.ts +33 -0
  249. package/.claude/skills/playwright/templates/project/tests/unit/utils.test.ts +30 -0
  250. package/.claude/skills/playwright/templates/project/tsconfig.json +3 -8
  251. package/.claude/skills/playwright/templates/project/utils/date.ts +25 -0
  252. package/.claude/skills/playwright/templates/project/utils/formFill.ts +27 -0
  253. package/.claude/skills/playwright/templates/project/utils/logger.ts +32 -0
  254. package/.claude/skills/playwright/templates/project/utils/random.ts +34 -0
  255. package/.claude/skills/playwright/templates/project/utils/redact.ts +32 -0
  256. package/.claude/skills/playwright/templates/project/utils/titles.ts +42 -0
  257. package/.claude/skills/playwright/templates/python/.env.example +8 -0
  258. package/.claude/skills/playwright/templates/python/conftest.py +91 -16
  259. package/.claude/skills/playwright/templates/python/gitignore +5 -0
  260. package/.claude/skills/playwright/templates/python/page_objects/__init__.py +1 -0
  261. package/.claude/skills/playwright/templates/python/page_objects/base_page.py +57 -0
  262. package/.claude/skills/playwright/templates/python/page_objects/home_page.py +22 -0
  263. package/.claude/skills/playwright/templates/python/page_objects/login_page.py +42 -0
  264. package/.claude/skills/playwright/templates/python/page_objects/shell_page.py +21 -0
  265. package/.claude/skills/playwright/templates/python/pytest.ini +5 -2
  266. package/.claude/skills/playwright/templates/python/requirements.txt +1 -0
  267. package/.claude/skills/playwright/templates/python/resources/__init__.py +1 -0
  268. package/.claude/skills/playwright/templates/python/resources/desc/__init__.py +1 -0
  269. package/.claude/skills/playwright/templates/python/resources/desc/sign_in_desc.py +27 -0
  270. package/.claude/skills/playwright/templates/python/resources/test_data/__init__.py +1 -0
  271. package/.claude/skills/playwright/templates/python/resources/test_data/test_data.py +41 -0
  272. package/.claude/skills/playwright/templates/python/setup/__init__.py +1 -0
  273. package/.claude/skills/playwright/templates/python/setup/auth.py +53 -0
  274. package/.claude/skills/playwright/templates/python/src/__init__.py +1 -0
  275. package/.claude/skills/playwright/templates/python/src/config/__init__.py +1 -0
  276. package/.claude/skills/playwright/templates/python/src/config/env.py +109 -0
  277. package/.claude/skills/playwright/templates/python/src/config/flags.py +63 -0
  278. package/.claude/skills/playwright/templates/python/src/config/load_env.py +16 -0
  279. package/.claude/skills/playwright/templates/python/src/config/paths.py +25 -0
  280. package/.claude/skills/playwright/templates/python/src/services/__init__.py +1 -0
  281. package/.claude/skills/playwright/templates/python/src/services/api_client.py +60 -0
  282. package/.claude/skills/playwright/templates/python/tests/api/test_session.py +14 -0
  283. package/.claude/skills/playwright/templates/python/tests/ui/test_sign_in.py +36 -0
  284. package/.claude/skills/playwright/templates/python/tests/unit/test_utils.py +32 -0
  285. package/.claude/skills/playwright/templates/python/utils/__init__.py +1 -0
  286. package/.claude/skills/playwright/templates/python/utils/dates.py +23 -0
  287. package/.claude/skills/playwright/templates/python/{framework → utils}/errors.py +3 -2
  288. package/.claude/skills/playwright/templates/python/utils/form_fill.py +26 -0
  289. package/.claude/skills/playwright/templates/python/utils/logger.py +40 -0
  290. package/.claude/skills/playwright/templates/python/utils/markers.py +6 -0
  291. package/.claude/skills/playwright/templates/python/utils/random_data.py +35 -0
  292. package/.claude/skills/playwright/templates/python/utils/redact.py +30 -0
  293. package/.claude/skills/playwright/templates/python/utils/titles.py +53 -0
  294. package/.claude/skills/quality-checks/SKILL.md +11 -11
  295. package/.claude/skills/quality-checks/templates/README.md +14 -12
  296. package/.claude/skills/quality-checks/templates/playwright-js/pageObjects/scannedPage.js +21 -0
  297. package/.claude/skills/quality-checks/templates/playwright-js/resources/desc/quality.desc.js +63 -0
  298. package/.claude/skills/quality-checks/templates/playwright-js/resources/testData/qualityData.js +32 -0
  299. package/.claude/skills/quality-checks/templates/playwright-js/src/checks/accessibility.js +50 -0
  300. package/.claude/skills/quality-checks/templates/playwright-js/src/checks/pageHealth.js +38 -0
  301. package/.claude/skills/quality-checks/templates/playwright-js/src/checks/performance.js +21 -0
  302. package/.claude/skills/quality-checks/templates/playwright-js/src/services/graphqlClient.js +28 -0
  303. package/.claude/skills/quality-checks/templates/playwright-js/tests/api/graphql.spec.js +23 -0
  304. package/.claude/skills/quality-checks/templates/playwright-js/tests/ui/quality.spec.js +50 -0
  305. package/.claude/skills/quality-checks/templates/playwright-ts/pageObjects/scannedPage.ts +20 -0
  306. package/.claude/skills/quality-checks/templates/playwright-ts/resources/desc/quality.desc.ts +59 -0
  307. package/.claude/skills/quality-checks/templates/playwright-ts/{src/data/quality.data.ts → resources/testData/qualityData.ts} +3 -2
  308. package/.claude/skills/quality-checks/templates/playwright-ts/tests/api/graphql.spec.ts +22 -0
  309. package/.claude/skills/quality-checks/templates/playwright-ts/tests/ui/quality.spec.ts +49 -0
  310. package/.claude/skills/requests/templates/README.md +6 -7
  311. package/.claude/skills/requests/templates/python-pytest/.env.example +4 -0
  312. package/.claude/skills/requests/templates/python-pytest/conftest.py +24 -9
  313. package/.claude/skills/requests/templates/python-pytest/pytest.ini +6 -3
  314. package/.claude/skills/requests/templates/python-pytest/requirements.txt +1 -0
  315. package/.claude/skills/requests/templates/python-pytest/resources/__init__.py +1 -0
  316. package/.claude/skills/requests/templates/python-pytest/resources/desc/__init__.py +1 -0
  317. package/.claude/skills/requests/templates/python-pytest/resources/desc/products_desc.py +27 -0
  318. package/.claude/skills/requests/templates/python-pytest/resources/test_data/__init__.py +1 -0
  319. package/.claude/skills/requests/templates/python-pytest/resources/test_data/test_data.py +27 -0
  320. package/.claude/skills/requests/templates/python-pytest/src/__init__.py +1 -0
  321. package/.claude/skills/requests/templates/python-pytest/src/config/__init__.py +1 -0
  322. package/.claude/skills/requests/templates/python-pytest/src/config/env.py +39 -0
  323. package/.claude/skills/requests/templates/python-pytest/src/config/flags.py +35 -0
  324. package/.claude/skills/requests/templates/python-pytest/src/config/load_env.py +16 -0
  325. package/.claude/skills/requests/templates/python-pytest/src/config/paths.py +16 -0
  326. package/.claude/skills/requests/templates/python-pytest/src/services/__init__.py +1 -0
  327. package/.claude/skills/requests/templates/python-pytest/{api/client.py → src/services/api_client.py} +19 -10
  328. package/.claude/skills/requests/templates/python-pytest/{api → src/services}/products_api.py +3 -9
  329. package/.claude/skills/requests/templates/python-pytest/tests/api/test_products.py +35 -0
  330. package/.claude/skills/requests/templates/python-pytest/tests/unit/test_utils.py +32 -0
  331. package/.claude/skills/requests/templates/python-pytest/utils/__init__.py +1 -0
  332. package/.claude/skills/requests/templates/python-pytest/utils/dates.py +23 -0
  333. package/.claude/skills/{selenium/templates/python-pytest/framework → requests/templates/python-pytest/utils}/errors.py +4 -3
  334. package/.claude/skills/requests/templates/python-pytest/utils/logger.py +40 -0
  335. package/.claude/skills/requests/templates/python-pytest/utils/random_data.py +35 -0
  336. package/.claude/skills/requests/templates/python-pytest/utils/redact.py +30 -0
  337. package/.claude/skills/requests/templates/python-pytest/utils/titles.py +53 -0
  338. package/.claude/skills/requirement-analysis/SKILL.md +1 -1
  339. package/.claude/skills/rest-assured/SKILL.md +1 -1
  340. package/.claude/skills/rest-assured/templates/README.md +6 -7
  341. package/.claude/skills/rest-assured/templates/ci/github-actions.yml +5 -2
  342. package/.claude/skills/rest-assured/templates/java-testng/.env.example +3 -0
  343. package/.claude/skills/rest-assured/templates/java-testng/pom.xml +7 -0
  344. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/{api/ApiConfig.java → config/Env.java} +35 -22
  345. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/config/Flags.java +17 -0
  346. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/config/Paths.java +14 -0
  347. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/desc/ProductsDesc.java +26 -0
  348. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/fixtures/BaseTest.java +29 -0
  349. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/services/ApiSpec.java +31 -0
  350. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/services/HealthApi.java +17 -0
  351. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/{api → services}/ProductsApi.java +19 -14
  352. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/{data → testData}/ProductBuilder.java +4 -8
  353. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/testData/TestData.java +64 -0
  354. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/tests/api/ProductsTest.java +49 -0
  355. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/tests/unit/UtilsTest.java +34 -0
  356. package/.claude/skills/{selenium/templates/java-testng/src/test/java/automation/framework → rest-assured/templates/java-testng/src/test/java/automation/utils}/AutomationError.java +4 -4
  357. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Case.java +20 -0
  358. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/CaseTransformer.java +54 -0
  359. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Dates.java +42 -0
  360. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Log.java +45 -0
  361. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/MissingSettingError.java +13 -0
  362. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/RandomData.java +41 -0
  363. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/Redact.java +33 -0
  364. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/utils/TestDescription.java +25 -0
  365. package/.claude/skills/rest-assured/templates/java-testng/src/test/resources/testData/testData.properties +14 -0
  366. package/.claude/skills/rest-assured/templates/java-testng/testng.xml +14 -0
  367. package/.claude/skills/selenium/SKILL.md +1 -1
  368. package/.claude/skills/selenium/templates/README.md +25 -13
  369. package/.claude/skills/selenium/templates/ci/github-actions-java.yml +5 -2
  370. package/.claude/skills/selenium/templates/csharp-nunit/.env.example +15 -0
  371. package/.claude/skills/selenium/templates/csharp-nunit/Automation.csproj +7 -0
  372. package/.claude/skills/selenium/templates/csharp-nunit/{Framework/Config.cs → Config/Env.cs} +33 -34
  373. package/.claude/skills/selenium/templates/csharp-nunit/Config/Flags.cs +39 -0
  374. package/.claude/skills/selenium/templates/csharp-nunit/Config/Paths.cs +31 -0
  375. package/.claude/skills/selenium/templates/csharp-nunit/{Framework → Driver}/DriverFactory.cs +16 -13
  376. package/.claude/skills/selenium/templates/csharp-nunit/Driver/DriverManager.cs +27 -0
  377. package/.claude/skills/selenium/templates/csharp-nunit/Fixtures/BaseTest.cs +56 -0
  378. package/.claude/skills/selenium/templates/csharp-nunit/{Pages → PageObjects}/BasePage.cs +44 -14
  379. package/.claude/skills/selenium/templates/csharp-nunit/PageObjects/HomePage.cs +21 -0
  380. package/.claude/skills/selenium/templates/csharp-nunit/PageObjects/LoginPage.cs +53 -0
  381. package/.claude/skills/selenium/templates/csharp-nunit/PageObjects/ShellPage.cs +22 -0
  382. package/.claude/skills/selenium/templates/csharp-nunit/Resources/Desc/SignInDesc.cs +23 -0
  383. package/.claude/skills/selenium/templates/csharp-nunit/Resources/TestData/TestData.cs +74 -0
  384. package/.claude/skills/selenium/templates/csharp-nunit/Resources/TestData/testData.json +14 -0
  385. package/.claude/skills/selenium/templates/csharp-nunit/Services/ApiClient.cs +71 -0
  386. package/.claude/skills/selenium/templates/csharp-nunit/Setup/AuthSetup.cs +104 -0
  387. package/.claude/skills/selenium/templates/csharp-nunit/Tests/Api/SessionTests.cs +23 -0
  388. package/.claude/skills/selenium/templates/csharp-nunit/Tests/Ui/SignInTests.cs +42 -0
  389. package/.claude/skills/selenium/templates/csharp-nunit/Tests/Unit/UtilsTests.cs +40 -0
  390. package/.claude/skills/selenium/templates/csharp-nunit/Utils/AutomationError.cs +15 -0
  391. package/.claude/skills/selenium/templates/csharp-nunit/Utils/Dates.cs +18 -0
  392. package/.claude/skills/selenium/templates/csharp-nunit/Utils/FormFill.cs +20 -0
  393. package/.claude/skills/selenium/templates/csharp-nunit/Utils/Log.cs +37 -0
  394. package/.claude/skills/selenium/templates/csharp-nunit/Utils/RandomData.cs +26 -0
  395. package/.claude/skills/selenium/templates/csharp-nunit/Utils/Redact.cs +22 -0
  396. package/.claude/skills/selenium/templates/csharp-nunit/Utils/TestDescription.cs +55 -0
  397. package/.claude/skills/selenium/templates/csharp-nunit/gitignore +6 -2
  398. package/.claude/skills/selenium/templates/java-testng/.env.example +12 -0
  399. package/.claude/skills/selenium/templates/java-testng/gitignore +5 -2
  400. package/.claude/skills/selenium/templates/java-testng/pom.xml +2 -0
  401. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/{framework/Config.java → config/Env.java} +45 -55
  402. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/config/Flags.java +50 -0
  403. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/config/Paths.java +20 -0
  404. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/desc/SignInDesc.java +30 -0
  405. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/{framework → driver}/DriverFactory.java +15 -12
  406. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/{framework → driver}/DriverManager.java +4 -7
  407. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/fixtures/BaseTest.java +87 -0
  408. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/{pages → pageObjects}/BasePage.java +41 -17
  409. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/pageObjects/HomePage.java +32 -0
  410. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/pageObjects/LoginPage.java +69 -0
  411. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/pageObjects/ShellPage.java +34 -0
  412. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/services/ApiClient.java +93 -0
  413. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/setup/AuthSetup.java +125 -0
  414. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/testData/TestData.java +88 -0
  415. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/tests/api/SessionTest.java +23 -0
  416. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/tests/ui/SignInTest.java +46 -0
  417. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/tests/unit/UtilsTest.java +34 -0
  418. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/AutomationError.java +18 -0
  419. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/Case.java +20 -0
  420. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/CaseTransformer.java +54 -0
  421. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/Dates.java +42 -0
  422. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/FormFill.java +25 -0
  423. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/Log.java +45 -0
  424. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/MissingSettingError.java +13 -0
  425. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/RandomData.java +41 -0
  426. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/Redact.java +33 -0
  427. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/utils/TestDescription.java +25 -0
  428. package/.claude/skills/selenium/templates/java-testng/src/test/resources/testData/testData.properties +11 -0
  429. package/.claude/skills/selenium/templates/java-testng/testng.xml +15 -5
  430. package/.claude/skills/selenium/templates/python-pytest/.env.example +12 -0
  431. package/.claude/skills/selenium/templates/python-pytest/conftest.py +63 -12
  432. package/.claude/skills/selenium/templates/python-pytest/gitignore +7 -2
  433. package/.claude/skills/selenium/templates/python-pytest/page_objects/__init__.py +1 -0
  434. package/.claude/skills/selenium/templates/python-pytest/{pages → page_objects}/base_page.py +20 -20
  435. package/.claude/skills/selenium/templates/python-pytest/page_objects/home_page.py +17 -0
  436. package/.claude/skills/selenium/templates/python-pytest/{pages → page_objects}/login_page.py +12 -14
  437. package/.claude/skills/selenium/templates/python-pytest/page_objects/shell_page.py +16 -0
  438. package/.claude/skills/selenium/templates/python-pytest/pytest.ini +6 -2
  439. package/.claude/skills/selenium/templates/python-pytest/requirements.txt +1 -0
  440. package/.claude/skills/selenium/templates/python-pytest/resources/__init__.py +1 -0
  441. package/.claude/skills/selenium/templates/python-pytest/resources/desc/__init__.py +1 -0
  442. package/.claude/skills/selenium/templates/python-pytest/resources/desc/sign_in_desc.py +27 -0
  443. package/.claude/skills/selenium/templates/python-pytest/resources/test_data/__init__.py +1 -0
  444. package/.claude/skills/selenium/templates/python-pytest/resources/test_data/test_data.py +25 -0
  445. package/.claude/skills/selenium/templates/python-pytest/setup/__init__.py +1 -0
  446. package/.claude/skills/selenium/templates/python-pytest/setup/auth.py +60 -0
  447. package/.claude/skills/selenium/templates/python-pytest/src/__init__.py +1 -0
  448. package/.claude/skills/selenium/templates/python-pytest/src/config/__init__.py +1 -0
  449. package/.claude/skills/selenium/templates/python-pytest/src/config/env.py +68 -0
  450. package/.claude/skills/selenium/templates/python-pytest/src/config/flags.py +40 -0
  451. package/.claude/skills/selenium/templates/python-pytest/src/config/load_env.py +16 -0
  452. package/.claude/skills/selenium/templates/python-pytest/src/config/paths.py +25 -0
  453. package/.claude/skills/selenium/templates/python-pytest/src/driver/__init__.py +1 -0
  454. package/.claude/skills/selenium/templates/python-pytest/{framework → src/driver}/driver_factory.py +11 -18
  455. package/.claude/skills/selenium/templates/python-pytest/{framework → src/driver}/driver_manager.py +3 -3
  456. package/.claude/skills/selenium/templates/python-pytest/src/services/__init__.py +1 -0
  457. package/.claude/skills/selenium/templates/python-pytest/src/services/api_client.py +89 -0
  458. package/.claude/skills/selenium/templates/python-pytest/tests/api/test_session.py +11 -0
  459. package/.claude/skills/selenium/templates/python-pytest/tests/ui/test_sign_in.py +34 -0
  460. package/.claude/skills/selenium/templates/python-pytest/tests/unit/test_utils.py +32 -0
  461. package/.claude/skills/selenium/templates/python-pytest/utils/__init__.py +1 -0
  462. package/.claude/skills/selenium/templates/python-pytest/utils/dates.py +23 -0
  463. package/.claude/skills/selenium/templates/python-pytest/utils/errors.py +28 -0
  464. package/.claude/skills/selenium/templates/python-pytest/utils/form_fill.py +29 -0
  465. package/.claude/skills/selenium/templates/python-pytest/utils/logger.py +40 -0
  466. package/.claude/skills/selenium/templates/python-pytest/utils/markers.py +6 -0
  467. package/.claude/skills/selenium/templates/python-pytest/utils/random_data.py +35 -0
  468. package/.claude/skills/selenium/templates/python-pytest/utils/redact.py +30 -0
  469. package/.claude/skills/selenium/templates/python-pytest/utils/titles.py +53 -0
  470. package/.claude/skills/self-healing/SKILL.md +2 -2
  471. package/.claude/skills/test-design/SKILL.md +1 -1
  472. package/.claude/skills/test-reporting/references/tool-mapping.md +13 -9
  473. package/.claude/skills/ui-observation/SKILL.md +8 -6
  474. package/.claude/skills/ui-observation/references/login-methods.md +1 -1
  475. package/.claude-plugin/plugin.json +15 -2
  476. package/.codex/agents/automation-strategist.toml +1 -0
  477. package/.codex/agents/change-agent.toml +1 -0
  478. package/.codex/agents/codebase-analyst.toml +1 -0
  479. package/.codex/agents/environment-discovery.toml +1 -0
  480. package/.codex/agents/evidence-validator.toml +1 -0
  481. package/.codex/agents/executor.toml +1 -0
  482. package/.codex/agents/failure-analyst.toml +1 -0
  483. package/.codex/agents/implementer.toml +2 -1
  484. package/.codex/agents/requirement-analyst.toml +1 -0
  485. package/.codex/agents/reviewer.toml +1 -0
  486. package/.codex/agents/test-reporter.toml +1 -0
  487. package/.codex/hooks.json +15 -0
  488. package/.cursor/commands/orion.md +1 -1
  489. package/.cursor/hooks.json +10 -0
  490. package/.devin/hooks.v1.json +13 -0
  491. package/.gemini/agents/automation-strategist.md +1 -0
  492. package/.gemini/agents/change-agent.md +1 -0
  493. package/.gemini/agents/codebase-analyst.md +1 -0
  494. package/.gemini/agents/environment-discovery.md +1 -0
  495. package/.gemini/agents/evidence-validator.md +1 -0
  496. package/.gemini/agents/executor.md +1 -0
  497. package/.gemini/agents/failure-analyst.md +1 -0
  498. package/.gemini/agents/implementer.md +2 -1
  499. package/.gemini/agents/requirement-analyst.md +1 -0
  500. package/.gemini/agents/reviewer.md +1 -0
  501. package/.gemini/agents/test-reporter.md +1 -0
  502. package/.gemini/commands/orion.toml +2 -2
  503. package/.github/hooks/orion-lean.json +13 -0
  504. package/.github/prompts/orion.prompt.md +2 -2
  505. package/.windsurf/workflows/orion.md +2 -2
  506. package/AGENTS.md +6 -6
  507. package/README.md +55 -140
  508. package/assets/architecture.svg +104 -0
  509. package/assets/run-flow.svg +1 -1
  510. package/bin/orion.mjs +6 -6
  511. package/hosts/gemini-extension/gemini-extension.json +1 -1
  512. package/hosts/gemini-extension/hooks/hooks.json +16 -0
  513. package/hosts/gemini-extension/policies/platform.toml +5 -0
  514. package/package.json +6 -1
  515. package/.claude/skills/appium/templates/project-java/src/test/java/automation/data/Cases.java +0 -37
  516. package/.claude/skills/appium/templates/project-java/src/test/java/automation/data/SignInData.java +0 -25
  517. package/.claude/skills/appium/templates/project-java/src/test/java/automation/flows/SignInFlow.java +0 -34
  518. package/.claude/skills/appium/templates/project-java/src/test/java/automation/framework/Account.java +0 -19
  519. package/.claude/skills/appium/templates/project-java/src/test/java/automation/screens/HomeScreen.java +0 -36
  520. package/.claude/skills/appium/templates/project-java/src/test/java/automation/screens/LoginScreen.java +0 -57
  521. package/.claude/skills/appium/templates/project-java/src/test/java/automation/tests/BaseTest.java +0 -33
  522. package/.claude/skills/appium/templates/project-java/src/test/java/automation/tests/SmokeTest.java +0 -17
  523. package/.claude/skills/httpclient/templates/csharp-nunit/Api/ApiClient.cs +0 -61
  524. package/.claude/skills/httpclient/templates/csharp-nunit/Api/ApiConfig.cs +0 -61
  525. package/.claude/skills/httpclient/templates/csharp-nunit/Api/ApiError.cs +0 -17
  526. package/.claude/skills/httpclient/templates/csharp-nunit/Data/Cases.cs +0 -41
  527. package/.claude/skills/httpclient/templates/csharp-nunit/Data/HealthData.cs +0 -11
  528. package/.claude/skills/httpclient/templates/csharp-nunit/Data/ProductBuilder.cs +0 -16
  529. package/.claude/skills/httpclient/templates/csharp-nunit/Data/ProductsData.cs +0 -17
  530. package/.claude/skills/httpclient/templates/csharp-nunit/Tests/HealthTests.cs +0 -18
  531. package/.claude/skills/httpclient/templates/csharp-nunit/Tests/ProductsTests.cs +0 -48
  532. package/.claude/skills/k6/templates/project/data/builders.js +0 -8
  533. package/.claude/skills/karate/templates/java-junit5/src/test/java/api/products.feature +0 -33
  534. package/.claude/skills/pact/templates/project/test/contract/products.contract.test.js +0 -45
  535. package/.claude/skills/playwright/templates/dotnet/Components/AccountMenu.cs +0 -23
  536. package/.claude/skills/playwright/templates/dotnet/Data/Cases.cs +0 -43
  537. package/.claude/skills/playwright/templates/dotnet/Data/SignInData.cs +0 -24
  538. package/.claude/skills/playwright/templates/dotnet/Flows/SignInFlow.cs +0 -51
  539. package/.claude/skills/playwright/templates/dotnet/Framework/AutomationError.cs +0 -17
  540. package/.claude/skills/playwright/templates/dotnet/Framework/Config.cs +0 -91
  541. package/.claude/skills/playwright/templates/dotnet/Pages/BasePage.cs +0 -57
  542. package/.claude/skills/playwright/templates/dotnet/Pages/HomePage.cs +0 -26
  543. package/.claude/skills/playwright/templates/dotnet/Pages/LoginPage.cs +0 -45
  544. package/.claude/skills/playwright/templates/dotnet/Tests/SmokeTests.cs +0 -47
  545. package/.claude/skills/playwright/templates/javascript/src/components/account-menu.component.js +0 -30
  546. package/.claude/skills/playwright/templates/javascript/src/config.js +0 -53
  547. package/.claude/skills/playwright/templates/javascript/src/data/accounts.js +0 -23
  548. package/.claude/skills/playwright/templates/javascript/src/data/cases.js +0 -49
  549. package/.claude/skills/playwright/templates/javascript/src/data/sign-in.data.js +0 -12
  550. package/.claude/skills/playwright/templates/javascript/src/flows/sign-in.flow.js +0 -53
  551. package/.claude/skills/playwright/templates/javascript/src/pages/base.page.js +0 -59
  552. package/.claude/skills/playwright/templates/javascript/src/pages/home.page.js +0 -31
  553. package/.claude/skills/playwright/templates/javascript/src/pages/login.page.js +0 -56
  554. package/.claude/skills/playwright/templates/javascript/tests/fixtures.js +0 -20
  555. package/.claude/skills/playwright/templates/javascript/tests/smoke.spec.js +0 -22
  556. package/.claude/skills/playwright/templates/project/src/components/account-menu.component.ts +0 -27
  557. package/.claude/skills/playwright/templates/project/src/config.ts +0 -56
  558. package/.claude/skills/playwright/templates/project/src/data/accounts.ts +0 -21
  559. package/.claude/skills/playwright/templates/project/src/data/cases.ts +0 -55
  560. package/.claude/skills/playwright/templates/project/src/data/sign-in.data.ts +0 -10
  561. package/.claude/skills/playwright/templates/project/src/flows/sign-in.flow.ts +0 -51
  562. package/.claude/skills/playwright/templates/project/src/pages/base.page.ts +0 -52
  563. package/.claude/skills/playwright/templates/project/src/pages/home.page.ts +0 -30
  564. package/.claude/skills/playwright/templates/project/src/pages/login.page.ts +0 -53
  565. package/.claude/skills/playwright/templates/project/tests/fixtures.ts +0 -25
  566. package/.claude/skills/playwright/templates/project/tests/smoke.spec.ts +0 -22
  567. package/.claude/skills/playwright/templates/python/components/__init__.py +0 -1
  568. package/.claude/skills/playwright/templates/python/components/account_menu.py +0 -22
  569. package/.claude/skills/playwright/templates/python/data/accounts.py +0 -14
  570. package/.claude/skills/playwright/templates/python/data/cases.py +0 -33
  571. package/.claude/skills/playwright/templates/python/data/sign_in_data.py +0 -9
  572. package/.claude/skills/playwright/templates/python/flows/sign_in.py +0 -63
  573. package/.claude/skills/playwright/templates/python/framework/config.py +0 -86
  574. package/.claude/skills/playwright/templates/python/pages/base_page.py +0 -51
  575. package/.claude/skills/playwright/templates/python/pages/home_page.py +0 -21
  576. package/.claude/skills/playwright/templates/python/pages/login_page.py +0 -40
  577. package/.claude/skills/playwright/templates/python/tests/test_smoke.py +0 -26
  578. package/.claude/skills/quality-checks/templates/playwright-ts/src/pages/scanned.page.ts +0 -16
  579. package/.claude/skills/quality-checks/templates/playwright-ts/tests/quality.spec.ts +0 -58
  580. package/.claude/skills/requests/templates/python-pytest/api/config.py +0 -43
  581. package/.claude/skills/requests/templates/python-pytest/api/errors.py +0 -15
  582. package/.claude/skills/requests/templates/python-pytest/data/builders.py +0 -16
  583. package/.claude/skills/requests/templates/python-pytest/data/cases.py +0 -30
  584. package/.claude/skills/requests/templates/python-pytest/data/health_data.py +0 -6
  585. package/.claude/skills/requests/templates/python-pytest/data/products_data.py +0 -10
  586. package/.claude/skills/requests/templates/python-pytest/tests/test_health.py +0 -12
  587. package/.claude/skills/requests/templates/python-pytest/tests/test_products.py +0 -25
  588. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/api/ApiError.java +0 -18
  589. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/api/ApiSpec.java +0 -29
  590. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/api/HealthApi.java +0 -21
  591. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/data/Cases.java +0 -45
  592. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/data/HealthData.java +0 -12
  593. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/data/ProductsData.java +0 -16
  594. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/tests/HealthTest.java +0 -15
  595. package/.claude/skills/rest-assured/templates/java-testng/src/test/java/automation/tests/ProductsTest.java +0 -37
  596. package/.claude/skills/selenium/templates/csharp-nunit/Components/AccountMenu.cs +0 -26
  597. package/.claude/skills/selenium/templates/csharp-nunit/Data/Cases.cs +0 -43
  598. package/.claude/skills/selenium/templates/csharp-nunit/Data/SignInData.cs +0 -24
  599. package/.claude/skills/selenium/templates/csharp-nunit/Flows/SignInFlow.cs +0 -51
  600. package/.claude/skills/selenium/templates/csharp-nunit/Framework/AutomationError.cs +0 -17
  601. package/.claude/skills/selenium/templates/csharp-nunit/Framework/DriverManager.cs +0 -26
  602. package/.claude/skills/selenium/templates/csharp-nunit/Pages/HomePage.cs +0 -28
  603. package/.claude/skills/selenium/templates/csharp-nunit/Pages/LoginPage.cs +0 -58
  604. package/.claude/skills/selenium/templates/csharp-nunit/Tests/BaseTest.cs +0 -22
  605. package/.claude/skills/selenium/templates/csharp-nunit/Tests/SmokeTests.cs +0 -37
  606. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/components/AccountMenu.java +0 -37
  607. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/data/Cases.java +0 -48
  608. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/data/SignInData.java +0 -36
  609. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/flows/SignInFlow.java +0 -60
  610. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/framework/Account.java +0 -19
  611. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/pages/HomePage.java +0 -45
  612. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/pages/LoginPage.java +0 -78
  613. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/tests/BaseTest.java +0 -33
  614. package/.claude/skills/selenium/templates/java-testng/src/test/java/automation/tests/SmokeTest.java +0 -33
  615. package/.claude/skills/selenium/templates/python-pytest/components/__init__.py +0 -1
  616. package/.claude/skills/selenium/templates/python-pytest/components/account_menu.py +0 -19
  617. package/.claude/skills/selenium/templates/python-pytest/data/accounts.py +0 -14
  618. package/.claude/skills/selenium/templates/python-pytest/data/cases.py +0 -33
  619. package/.claude/skills/selenium/templates/python-pytest/data/sign_in_data.py +0 -9
  620. package/.claude/skills/selenium/templates/python-pytest/flows/__init__.py +0 -0
  621. package/.claude/skills/selenium/templates/python-pytest/flows/sign_in.py +0 -61
  622. package/.claude/skills/selenium/templates/python-pytest/framework/__init__.py +0 -0
  623. package/.claude/skills/selenium/templates/python-pytest/framework/config.py +0 -90
  624. package/.claude/skills/selenium/templates/python-pytest/pages/__init__.py +0 -0
  625. package/.claude/skills/selenium/templates/python-pytest/pages/home_page.py +0 -23
  626. package/.claude/skills/selenium/templates/python-pytest/tests/test_smoke.py +0 -25
  627. /package/.claude/skills/karate/templates/java-junit5/src/test/java/{api → tests/api}/delete-product.feature +0 -0
  628. /package/.claude/skills/playwright/templates/{python/data/__init__.py → dotnet/auth/.gitkeep} +0 -0
  629. /package/.claude/skills/playwright/templates/{python/flows/__init__.py → javascript/auth/.gitkeep} +0 -0
  630. /package/.claude/skills/playwright/templates/{python/framework/__init__.py → project/auth/.gitkeep} +0 -0
  631. /package/.claude/skills/playwright/templates/project/{src → utils}/errors.ts +0 -0
  632. /package/.claude/skills/playwright/templates/python/{pages/__init__.py → auth/.gitkeep} +0 -0
  633. /package/.claude/skills/quality-checks/templates/playwright-ts/src/checks/{page-health.ts → pageHealth.ts} +0 -0
  634. /package/.claude/skills/quality-checks/templates/playwright-ts/src/{api/graphql.ts → services/graphqlClient.ts} +0 -0
  635. /package/.claude/skills/{requests/templates/python-pytest/api/__init__.py → selenium/templates/csharp-nunit/auth/.gitkeep} +0 -0
  636. /package/.claude/skills/{requests/templates/python-pytest/data/__init__.py → selenium/templates/java-testng/auth/.gitkeep} +0 -0
  637. /package/.claude/skills/selenium/templates/python-pytest/{data/__init__.py → auth/.gitkeep} +0 -0
@@ -5,10 +5,13 @@ A run does only what the user asked for and stops at that mode's stop point. It
5
5
  | Mode | Start (command or plain words) | Agents, in order | Gates | Stops when | Approvals that can come up | Writes |
6
6
  |---|---|---|---|---|---|---|
7
7
  | **full** (default) | `/orion <story>` · "automate this story" | requirement-analyst → environment-discovery ∥ codebase-analyst → automation-strategist → implementer → reviewer → executor (+ failure-analyst) → evidence-validator → you (report) → test-reporter only if you ask to share | 1–8 | you accept the report (H13), or decline it | as they arise, except that exploring the test URL and running the new tests on this machine are part of the request; running the rest of the suite or CI is H6 | the existing suite, extended in place on a local work branch (`work-branch.md`); PR only with H4 |
8
- | **build** | `/orion build <story>` · "write the tests / give me the script", with a test URL; the workspace has no suite for this app (or it is the agent install) | requirement-analyst → environment-discovery (opens the URL first) → automation-strategist (test cases from the sentence and the live site; default stack Playwright + TypeScript unless named) → implementer (starter template + UI map, in `sut/<app>/`) → reviewer (one round) → executor (3 runs on this machine) → you (deliver) | 1, 2, 4, 5, 6, 7, 8; 3 `greenfield: <template>` | the suite in `sut/<app>/` passes 3 runs (or is delivered with its failures and known issues), and you accept it or ask for changes | the setup card (go / change) before anything starts, and the test-case table (go / change) before code; the confirmed card covers exploring the URL, installing the runner and browser in `sut/<app>/`, and running the new tests here. Asked: H5 production, H3/H4 git, H8 an expected value, H10 installs outside `sut/<app>/` | `sut/<app>/` only (`work-branch.md`); a zip, PR, chat code or test-case files only when asked (`delivery-formats.md`); never a commit or push without H3 |
8
+ | **build** | `/orion build <story>` · "write the tests / give me the script", with a test URL; the workspace has no suite for this app (or it is the agent install) | requirement-analyst → environment-discovery (opens the URL first) → automation-strategist (test cases from the sentence and the live site; default stack Playwright + JavaScript unless named) → implementer (starter template + UI map, in `sut/<app>/`) → reviewer (one round) → executor (3 runs on this machine) → you (deliver) | 1, 2, 4, 5, 6, 7, 8; 3 `greenfield: <template>` | the suite in `sut/<app>/` passes 3 runs (or is delivered with its failures and known issues), and you accept it or ask for changes | the setup card (go / change) before anything starts, and the test-case table (go / change) before code; the confirmed card covers exploring the URL, installing the runner and browser in `sut/<app>/`, and running the new tests here. Asked: H5 production, H3/H4 git, H8 an expected value, H10 installs outside `sut/<app>/` | `sut/<app>/` only (`work-branch.md`); a zip, PR, chat code or test-case files only when asked (`delivery-formats.md`); never a commit or push without H3 |
9
9
  | **analyze** | `/orion analyze <repo or folder>` · "analyse / what's the stack of …" | environment-discovery ∥ codebase-analyst → evidence-validator | 2, 3, 7; others `n/a — analyze` | the analysis report is shown | none (read-only); H11 if it would need a database | none (facts may be written to `project-context/` on hosts with files) |
10
- | **design** | `/orion design <story>` · "only the test cases" | requirement-analyst → environment-discovery ∥ codebase-analyst → automation-strategist → evidence-validator | 1–4, 7, 8; 5, 6 `n/a — design` | you accept the test design (H13); then, unless a format was named, one line offers the test cases as a file (`delivery-formats.md`) | H1, H2; exploring the test URL the user gave is part of the request (no URL → the map is `not observed` and the design says its cases are `not checked against the app`) | the test-case files you ask for (CSV, Excel, Gherkin, Markdown, a TestRail / Xray / Zephyr Scale / Azure Test Plans import file) under `project-context/test-designs/<story>/`, `.xlsx` by an implementer render task (no test code); writing into the tool itself only on request (H9, test-reporter) |
10
+ | **design** | `/orion design <story>` · "only the test cases" | requirement-analyst → environment-discovery ∥ codebase-analyst → automation-strategist → evidence-validator | 1–4, 7, 8; 5, 6 `n/a — design` | you accept the test design (H13); then, unless a format was named, one line offers the test cases as a file (`delivery-formats.md`) | H1, H2; exploring the test URL the user gave is part of the request (no URL → the map is `not observed` and the design says its cases are `not checked against the app`) | the test-case files you ask for (Excel, CSV, PDF, Word, HTML, Markdown, Gherkin, JSON, a TestRail / Xray / Zephyr Scale / Azure Test Plans import file) under `project-context/test-designs/<story>/`, all by `cases_export.py`; writing into the tool itself only on request (H9, test-reporter) |
11
11
  | **review** | `/orion review <PR, branch, diff or files>` · "review these tests" | reviewer | 5 (review part only) | the findings are shown | none | none; fixes only if you then start a full run |
12
+ | **assess** | `/orion assess [folder]` · "assess / review my framework", "what's wrong with our tests" | codebase-analyst (with `suite_check --existing`, `reuse_check`, `graph`) → executor baseline run (+ failure-analyst on failures) → reviewer (`mode: assess`, whole suite) → evidence-validator ([assess-fix.md](assess-fix.md)) | 3, 6, 5 (review part), 7 | the assessment is saved and shown | H6 for the baseline run; H5 never (no production) | `project-context/assessments/` only |
13
+ | **fix** | `/orion fix A-<id> [resume]` · "fix F-2 and F-5" | per ticked batch: implementer (`mode: fix`) → reviewer → executor → `parity_check` ([assess-fix.md](assess-fix.md)) | 5, 6, 7 per batch | every ticked batch is verified, reverted or skipped, and the before/after report is shown | **H14** (which items), H8 for items that change what a test checks, H3 local commits on `orion/fix-A-<id>`; push and PR (H3, H4) asked separately | the ticked items' files, on the fix branch only |
14
+ | **batch** | `/orion batch <keys · epic · JQL · stories.csv/.xlsx> [resume B-<id>]` · 4+ stories, an epic, a query or a stories file (2–3 stories: asked first), by [batch.md](batch.md)'s rules | the full flow per story in waves: requirement-analyst ×n → environment-discovery once per shared screen → automation-strategist ×n → implementer (foundation, then K stories in parallel work copies) → reviewer and executor per story → evidence-validator once | 1–8 per story | every story is accepted, blocked or skipped, or the budget cap stops it at a wave | the Batch plan card (`go`), test-case pages; H3, H6, H13 once for the batch | `project-context/batches/B-<id>/`, the stories' tests in their work copies, merged one by one into the batch branch |
12
15
  | **triage** | `/orion triage <log, run or failing test>` · "why did this fail" | failure-analyst (+ evidence-validator) | 6 (analysis part), 7 | the classification, evidence and any defect draft or heal proposal are shown | H9 to file a defect; a heal is applied only in a full run (H7, H8 for expected values) | none |
13
16
  | **run** | `/orion run <suite, tag or files>` · "run the smoke tests" | codebase-analyst first if the run command isn't known yet → executor (+ failure-analyst on failures) → evidence-validator | 3 (only if needed), 6, 7 | the run record and classifications are shown | H6 always; H5 for production; H10 if dependencies are missing | none (test reports only) |
14
17
  | **report** | `/orion report <scope>` | test-reporter (`aggregate`) | — | the report is shown | H9 only if you ask to publish it | none unless published |
@@ -33,8 +36,9 @@ When a request is exactly one specialist's job, send it to that specialist alone
33
36
  | "Publish / export / build a report" | test-reporter (report mode, or `publish` / `export-cases` / `file-defects` with H9) | H9 per batch | publishes only validated material |
34
37
 
35
38
  ## Rules for every mode
39
+ - **Plain words always work.** The commands in the Start column are optional shortcuts. Pick the mode from what the message means ([plain-language.md](plain-language.md)), never ask the user to type a command, and offer next steps in plain words.
36
40
  - **Always deliver.** A run that reaches Gate 5 ends with code: reviewed and run, or labelled `draft · not run · known issues: …` (one revision at most, then deliver; see the skill's step 6). Never end with "implementation stopped" and nothing to show.
37
- - **Stop point is a hard stop.** At the stop point, show the result and what the next step would be (for example "to automate these test cases, run `/orion <story>`"; on a host without write tools, how to get runnable tests: see hosts.md, "On Copilot Studio"), then wait. Say plainly what wasn't produced ("no test code written, 0 tests run"). Never start the next mode's agents without the user asking.
41
+ - **Stop point is a hard stop.** At the stop point, show the result and what the next step would be (for example "to automate these test cases, just say **automate them**"; on a host without write tools, how to get runnable tests: see hosts.md, "On Copilot Studio"), then wait. Say plainly what wasn't produced ("no test code written, 0 tests run"). Never start the next mode's agents without the user asking.
38
42
  - **The user can narrow a running full run** ("stop after the test cases", "just analyse"): finish the current agent, record the remaining gates as `n/a — stopped by user at <gate>`, show what exists, and wait. "Stop", "cancel" or "pause" halts at once (AGENTS.md rule 9).
39
43
  - **Gates a mode doesn't use** are recorded `n/a — <mode>` in the run file, never skipped silently and never marked ✓.
40
44
  - **Every mode ends with evidence:** a claim without a file:line, command or connector row is `unknown` (AGENTS.md rule 3); modes with Gate 7 run the evidence-validator before showing the result.
@@ -0,0 +1,55 @@
1
+ # Plain language: the user never needs a command
2
+
3
+ People say what they want in their own words, with typos, in another language, half a sentence or an emoji. Nobody has to remember `/orion design` or `show TS-3`: those are optional shortcuts. Read every message for what it **means**, act on it, and keep your own replies free of syntax to learn.
4
+
5
+ ## Rules
6
+ 1. **Meaning, not syntax.** Map the message to the closest row below by what it asks for, never by its exact words. "can u just do the test cases for PR-1 no code" is design mode; "why's checkout red" is triage; "the 3rd one is wrong, it should say Invalid email" changes TS-3's expected result.
7
+ 2. **Never ask the user to type a command.** No "run `/orion …`", no "type `show TS-3`". Offer the next step in plain words the user can echo or ignore: "Say **go**, or tell me what to change." A shortcut may appear once as a tip in brackets, never as the only way.
8
+ 3. **Point at things the way people do.** A case is "TS-3", "3", "#3", "the third one", "case 3", "the login one", "the last one", "the one about the alert": match by number, then by words of its title. Two matches → name both and ask which, in one line.
9
+ 4. **Safe and read-only → just do it.** Showing a case, explaining, a status, a file to review in, a map of the code: do it without asking.
10
+ 5. **Writes, costs or anything on the approval list → confirm the reading in one line**, then wait for the yes (AGENTS.md rule 2): "You'd like the 8 cases pushed to Jira as linked tasks under PR-1. **Push them?** Reply **yes**." A yes counts only when typed after that question, however it is worded: yes, yep, sure, do it, go ahead, 👍. A vague "ok" confirms only what was just shown ([conversation.md](conversation.md) item 8).
11
+ 6. **Two real readings → one question with numbered options**, the likelier first: "Do you mean 1 **re-run** the failing test, or 2 **fix** it (I'll ask before changing it)?" A number, or the words, answers it.
12
+ 7. **Mixed messages are split, in order.** "yes but drop the 4th and make login High" → drop TS-4, set TS-1 to High, show the changed rows, ask again; the "yes" applies only once the user has seen the changed table.
13
+ 8. **Stop words always win.** "stop", "wait", "hold on", "cancel", "pause", "enough", "no no no" halt at once (AGENTS.md rule 9), whatever else the message says.
14
+ 9. **Any language.** Answer in the user's language; the files, test names and report stay in the project's language.
15
+ 10. **Never guess silently.** If a message fits no row and no safe reading, ask one short question with up to three numbered guesses.
16
+
17
+ ## What people say → what happens
18
+ | They might say | It means | Shortcut (optional) |
19
+ |---|---|---|
20
+ | "automate this story", "write tests for PR-1 on https://…", "test login and cart on this site" | full or build: setup card, test cases, tests, 3 runs | `/orion <story>` · `/orion build …` |
21
+ | "just the test cases", "no code yet", "design the tests", "what should we test for this" | design: stops at the accepted cases | `/orion design <story>` |
22
+ | "what's in this repo", "what framework is this", "analyse our tests" | analyze: stack and structure, read-only | `/orion analyze <folder>` |
23
+ | "how good are our tests", "what's wrong with our framework", "audit the suite" | assess: findings and a fix plan | `/orion assess` |
24
+ | "fix those", "fix 2 and 5", "do the quick wins" (after an assessment) | fix: the ticked findings, asked first | `/orion fix A-<id>` |
25
+ | "review this PR", "check these tests", "is this test any good" | review: findings only | `/orion review …` |
26
+ | "why did this fail", "checkout is red", "here's the log, what happened" | triage: the cause with evidence | `/orion triage …` |
27
+ | "run the smoke tests", "run everything tagged @cart", "rerun login" | run: asks once, then runs | `/orion run …` |
28
+ | "do all the stories in the sprint", "these 6 tickets", "the whole epic" | batch: a plan card first | `/orion batch …` |
29
+ | "just check these locators", "only write the defect for this bug", "export last run's results to TestRail" (one small job) | task: that one job, its own approvals only ([modes.md](modes.md), task mode) | — |
30
+ | "how did last sprint go", "summary of runs", "trend" | report across runs | `/orion report …` |
31
+ | "is everything set up", "check the install", "is the browser ok" | doctor: the check table | `/orion doctor` |
32
+ | "Java please", "BDD, and connect Jira", "use my repo at …", "no login needed" (after the setup card) | changes only those card lines, then the setup goes on | `3 Hybrid, 4 Java` |
33
+ | "go", "looks good", "yes do it", "write them" (after the card or the table) | approves exactly what was shown | `go` |
34
+ | "show me the third one", "steps for the login case", "all of them in full" | the case card(s) | `show TS-3` · `show all` |
35
+ | "the 3rd should expect 'Invalid email'", "add a locked-out user", "remove the last one", "login is High" | change, add, drop, priority; the changed rows, then ask again | `change TS-3: …` · `add: …` · `drop TS-4` |
36
+ | "give me an excel", "send it as a PDF", "I need it for TestRail", "word doc please" | the file in that format ([delivery-formats.md](delivery-formats.md)) | — |
37
+ | "here's my filled sheet", "I reviewed the excel" | read the Review column back, show the changes, ask once | — |
38
+ | "put them in Jira", "push to Xray", "add them to TestRail" | the push preview, then a yes (H9) | — |
39
+ | "don't push", "skip that", "not now" | writes nothing, moves on | — |
40
+ | "where are we", "what's happening", "still running?" | one status line from the run file | — |
41
+ | "continue", "carry on", "pick up where you left off" | resume from the run file (SKILL step 1r) | `continue` |
42
+ | "how much did that cost", "how long has it been" | the budget line (`run_state.mjs budget`) | — |
43
+ | "show me the details", "what did each agent do", "hide that again" | the board on, or off | `details` · `details off` |
44
+ | "yes", "accept", "ship it" (after the result) | accepts the result | `yes` |
45
+ | "that's not right", "change …", "not yet" (after the result) | asks what to change, or applies it | `changes` |
46
+ | "commit it", "make a branch", "open a PR" | asked first, one line each (H3, H4) | — |
47
+ | "how do you keep costs down", "what makes you different", "why is this cheaper" | the short answer in **Explaining Orion** below | — |
48
+
49
+ ## Explaining Orion (when asked)
50
+ Answer in at most five short lines, in plain words, with the numbers below only where they were measured:
51
+ - **Quiet Runner:** test runs show only the failures with their context and the counts; the full log is kept for when it's needed (a passing run 2.3 KB → 0.7 KB; real runs' output roughly halved).
52
+ - **Code Map:** your suite as one line per file, with line numbers, so agents open only what they change (a 13 KB suite → 1.6 KB).
53
+ - **Smart Reading:** each step reads only the part of Orion's rules it needs (the setup rules 16 KB → 1.5 KB).
54
+ - **Reuse Ladder:** reuse what you have, then extend it, then combine it, and only then write the smallest new code; copied code fails the finish check.
55
+ - **Done Check and Lean Guard:** "done" is checked by a script, not the agent's word, and wasteful habits are blocked during a run on every tool with hooks.
@@ -13,8 +13,14 @@
13
13
  | runs/R-<id>.md | orchestrator (board, gate table, log, metrics for one run) |
14
14
  | retry-policy.md | user (defaults in task-brief.md) |
15
15
  | ui-maps/<story>.md | orchestrator, from the UI map in environment-discovery's Gate 2 RESULT; rows appended from implementer (`top-up`) and failure-analyst (`heal`). Page structure, locators and test-environment text only; never secret values. Screenshots stay in `.ui-map/`, not here |
16
- | test-designs/<story>/ | orchestrator: the accepted test cases in the formats the user asked for (CSV, Gherkin, Markdown, tool import CSV; `delivery-formats.md`); `.xlsx` from an implementer render task. Synthetic data only |
17
- | test-case-map.md | orchestrator, from test-reporter's RESULT (TS-n ↔ external key ↔ test file:line) |
16
+ | test-designs/<story>/ | orchestrator: the accepted test cases in the formats the user asked for (Excel, CSV, PDF, Word, HTML, Markdown, Gherkin, JSON, tool import CSV), all from `cases_export.py` (`delivery-formats.md`). Synthetic data only |
17
+ | batches/B-<id>/batch.json, batch.md | orchestrator, through `batch_state.mjs` only (batch mode, `batch.md`): the stories, their states, screens, cases, runs and cost, the shared screens, the budget; `batch.md` is the readable view it rewrites |
18
+ | test-designs/<story>/design.md | orchestrator, at Gate 4 on every run (template `test-design.md`): intent, the accepted cases with AC(s), layer, screens, desc entry, status |
19
+ | runs/<run id>.report.md | orchestrator, with the `documentation` skill after Gate 7 (template `report.md`): the verdict, facts, coverage, what needs attention, what was added, how to run it; engineer details folded |
20
+ | test-case-map.md | orchestrator, from the implementer's and test-reporter's RESULTs (template): `<story>:TS-n` ↔ AC(s) ↔ desc entry ↔ test file:line ↔ external key ↔ last result |
21
+ | results/<run id>-<n>.json | executor, by running `results_parse.mjs` on the runner's reports after each counted run (the one file a specialist writes here: a script's output, not a judgement). Per test: id, file, title, status, duration, attempts, failure signature; secrets masked |
22
+ | defects.md | orchestrator: one line per defect draft the user accepted (template), with its test, results file and failure signature |
23
+ | ui-maps/screens/<screen key>.md | orchestrator, from environment-discovery: a screen several stories use, kept once and referred to by story maps |
18
24
 
19
25
  Fact line: `- <fact> — <tag> — <evidence location>` with tag one of confirmed, inferred, unknown, needs-user.
20
26
  Newest confirmed evidence wins; the old fact moves to `## History` with the date. Secrets are never written, not even masked.
@@ -19,4 +19,12 @@ executor RESULT with failures
19
19
  NEEDS_ADAPTER → new-technology path (H12)
20
20
  UNKNOWN → ESCALATE with what was checked
21
21
  ~~~
22
+ ## Observation correction (AGENTS.md rule 6; not H8)
23
+ A new test that fails every counted run at the same assertion, when the expected value it checks was taken from exploring (the design row's source is the site, not the story's words, an imported case or the user), may be wrong because the first look was wrong (in rehearsal 3, 2026-11-18, a leftover alert was recorded as the result of a malformed email). Before any heal or question:
24
+ 1. **Look again at that one step** (`ui-observation` heal mode): a newly loaded page, the snapshot before the action, the action, the snapshot after; save both under `.ui-map/` and name them.
25
+ 2. **All of these must hold**, each with its evidence in the run file: the test is new in this run (not in the base branch, not a case the user brought); its expected value's source is the site; it failed 3 of 3 at the same assertion; the fresh look contradicts the UI-map row the value came from; the corrected check is the same kind and strength (same matcher, same or more assertions; only the expected value or the observed state changes) and still checks what the case's title says (a "refused" case still checks that sign-in is refused); this test has had no correction before.
26
+ 3. **Then correct, don't ask:** the UI-map row (with the new snapshot), the design row's expected result, the test data or desc entry and the test; record `observation correction TS-n: <old> → <new>, evidence <snapshots>` in `decisions.md` (not as an approval); the reviewer's assertion guard accepts the diff on that record; rerun the test 3 times with retries off and redo its fail check.
27
+ 4. **Say it in the result**, one ⚠️ line: "⚠️ TS-4 corrected: the site blocks a malformed email itself, with no alert (my first look was wrong); it now checks that."
28
+ Any condition missing, a second failure after the correction, or a value that came from the story or the user: the normal path (an app defect when the app contradicts the requirement; otherwise ask, H8).
29
+
22
30
  Attempt counts per test live in the run file (`runs/<run id>.md`, `Retries` column). Limits come from `project-context/retry-policy.md`. A heal never changes an assertion; if the only way to pass is changing one, stop and ask (H8).
@@ -1,14 +1,18 @@
1
1
  # Setup card: the first reply to a request to build or design tests
2
2
 
3
+ ## When to send it
4
+
3
5
  **When:** the first reply to a request to write, extend or design tests (modes full, build and design in [modes.md](modes.md)), with or without `/orion`. **Not** for a greeting (capability card), `doctor`, `report`, `review`, `triage`, `run`, `analyze` or a one-specialist task: those start their own work, and ask only what that work needs.
4
6
 
5
7
  Send it **word for word**. Replace only the `<…>` parts. Never drop, merge, reorder or reword a line, never answer a question for the user, and never explore, install or write anything before the reply. The one thing you may look at first is whether the open workspace already holds a test suite (its manifest files: `package.json`, `pom.xml`, `*.csproj`, `pyproject.toml`, `requirements.txt` with a test runner), to fill line 1's default, and whether that project's `.env` already holds an account (`node .claude/skills/orion/scripts/env_check.mjs sut/<site>`, which prints set, empty or missing per name, never a value; `env_check.py` is the same for Python; the platform's deny rules block `grep`, `cat` and Read on `.env`) to fill line 7's. Nothing about the browser or other dependencies goes on the card: that's the setup message after it. `<site>` is always the same folder name the setup scripts use: the host name without `www.`, its first part (`www.saucedemo.com` → `saucedemo`, `test.shop.example` → `test`), or for an IP address or `localhost` the whole host with dots as dashes (`127.0.0.1` → `127-0-0-1`); never a name of your own. A blocker that stops the whole request on this host ([blockers.md](blockers.md), for example no way to run tests at all) goes in one line above the card, never instead of it. Then wait.
6
8
 
7
9
  In a Claude Code **plugin** install these scripts aren't in the repo: run them from this skill's own folder (the skill's base directory, `…/skills/orion/scripts/`).
8
10
 
11
+ ## The setup message (after the card)
12
+
9
13
  **The setup message** (after the card, its own message; a separate approval, H10: installs outside the test project and the AI tool's settings; D-070). The card is only about the work. Once the user has answered it (and after writing a pasted account), check what **the chosen tool and this run** need, then send one message listing only what's missing, with nothing else in it, and wait. Checks, all presence-only:
10
14
  - **Browser for exploring** (a web page to explore): `node .claude/skills/orion/scripts/browser_check.mjs --host <host> <URL>` (reads the host's MCP settings, never `.env`).
11
- - **Test project packages**: the chosen tool's project in `sut/<site>/` (or the suite being extended) and its packages installed (`node_modules`, a restored Maven/Gradle/NuGet/pip environment); a new project needs its starter and `npm install` (or the tool's equivalent).
15
+ - **Test project packages**: the chosen tool's project in `sut/<site>/`, or **for an existing suite the suite itself** (never a new `sut/<site>/` beside it), and its packages installed (`node_modules`, a restored Maven/Gradle/NuGet/pip environment); a new project needs its starter and `npm install` (or the tool's equivalent).
12
16
  - **A browser to run tests**: Chrome or Edge installed (the check's `browser:` line); otherwise Playwright's own browser, a one-time download to the user's folder.
13
17
  - **The tool's runtime**: `node -v`, `java -version`, `mvn -v`, `dotnet --version`, `python --version` as the tool needs. A missing runtime is installed by the user, not by you: list it with its download page.
14
18
 
@@ -18,35 +22,52 @@ Nothing missing: no message; carry on. Otherwise:
18
22
  2. **Test project:** <tool> in `sut/<site>/` (<the install command>, about a minute).
19
23
  3. **Browser for the tests:** <Playwright's Chromium, a one-time download of about 150 MB to your user folder>.
20
24
  4. **You install:** <runtime> (<download page>); I can't install it for you.
25
+ 5. **<Jira> (to read <PR-1>):** not connected. To connect it: <its row from connect-tools.md, one line>. I won't wait for it: I'll design the cases from your request and the site now, and re-check them against <PR-1> once it's connected.
21
26
  Reply **yes** to set up all, **yes, not 1** to skip one, or **no**."
22
27
  Number only the items that are missing, in this order. Item 1 is offered only when the check printed `setup in the chat`; when it didn't, item 1 is "**Browser for exploring:** <its `ready: no` reason>; to fix it: <its Fix>", for the user to do. On Cursor and VS Code, after item 1 is set up or when the check says ready, the same message also asks, as its last line before the reply line: "And please confirm `browser_run_code_unsafe` and the other unused browser tools are switched off (<where>); it runs any code on this machine." (once per workspace, recorded). Windsurf and other tools whose settings live elsewhere (exit 3): "**Browser for exploring:** I can't see your tool's MCP settings; make sure its `playwright` entry points at `sut/<site>/.env`."
23
28
 
24
- Nothing else goes in this message: an unanswered card line (for example line 7, the login, which has no default) is asked in its own message **after** the setup is done, never alongside it. Only a yes typed after this message counts; the card's "go" never approves it, and it's never bundled with the card or another question. Record message and reply in `decisions.md`. On yes, do the items approved, in order: item 1 with `node .claude/skills/orion/scripts/browser_setup.mjs <URL>` from the workspace root (never edit the file yourself; if it exits 1 or 2, give its warning in one line and use the test project's Playwright); items 2 and 3 with the install commands (the host shows its own prompts). Then one line on what was set up and what needs a reload ("Set up: the browser for saucedemo (starts after you reload Cursor), Playwright in `sut/saucedemo/`. Carrying on.") and carry on. A skipped item 1 means the test project's Playwright for this run. **no**, or a skipped item the run can't do without: say in one line what that stops (for example "Without the test project I can't explore or run tests: I'll design the test cases from your description and mark the screens not observed") and carry on with what's possible; don't ask again in this run. "done" or "reloaded" means: run the checks again, then continue.
29
+ Nothing else goes in this message: an unanswered card line (for example line 7, the login, which has no default) is asked in its own message **after** the setup is done, never alongside it. Only a yes typed after this message counts; the card's "go" never approves it, and it's never bundled with the card or another question. Record message and reply in `decisions.md`. On yes, do the items approved, in order: item 1 with `node .claude/skills/orion/scripts/browser_setup.mjs <URL>` from the workspace root (an existing suite: add `--env-file <its own env file>`, so the browser signs in with the suite's account and no `sut/<site>/` is created) (never edit the file yourself; if it exits 1 or 2, give its warning in one line and use the test project's Playwright); items 2 and 3 with the install commands (the host shows its own prompts). Then one line on what was set up and what needs a reload ("**All set:** the browser for saucedemo (starts after you reload Cursor), Playwright in `sut/saucedemo/`. Exploring now.") and carry on. The tracker item (5) is never waited for: it is the user's to do whenever they like, so after **yes** (or **no**, or any reply that isn't "done") the run carries on without it, by [conversation.md](conversation.md) item 2a, in the same turn: explore, then the test-case table titled "Story <PR-1> not read: cases from your request and the site". Never end the turn after this message with only "connect <Jira> or paste the story". A skipped item 1 means the test project's Playwright for this run. **no**, or a skipped item the run can't do without: say in one line what that stops (for example "Without the test project I can't explore or run tests: I'll design the test cases from your description and mark the screens not observed") and carry on with what's possible; don't ask again in this run. "done" or "reloaded" means: run the checks again, then continue.
30
+
31
+ ## The card (send it word for word)
25
32
 
26
33
  ```markdown
27
- Thanks! 8 quick questions before I start. Reply **go** for the bold defaults, or answer by number (e.g. `3 Hybrid, 4 Java`).
34
+ **Thanks, let's get this right.** 8 quick questions, each with a default. Reply **go** to accept them all, or tell me what to change in your own words (like *Java please* or *BDD, and connect Jira*).
28
35
 
29
36
  1. **Existing test repo?** Share the link or folder and I'll add to it · **<no, start new in `sut/<site>/` | yes, the suite open here (`<folder>`)>**
30
37
  2. **Existing test cases?** Jira, Xray, TestRail, Zephyr, Azure Test Plans, Trello, Excel or CSV · **no, I'll design them and show you first**
31
38
  3. **Style:** **page objects** · Hybrid (one test over a table of data) · BDD (Gherkin)
32
- 4. **Tool:** **Playwright + TypeScript** · Selenium · Appium · API tests · load (k6) · contract (Pact) · in Java, C#, Python or JavaScript
39
+ 4. **Tool:** **Playwright + JavaScript** · Playwright + TypeScript · Selenium · Appium · API tests · load (k6) · contract (Pact) · in Java, C# or Python
33
40
  5. **Connect:** **none** · Jira · Xray · TestRail · Zephyr · Trello · GitHub · GitLab · Bitbucket · Azure DevOps
34
41
  6. **Site and scope:** <the URL, or "Which URL? (a test environment, not production)"> · <the scope in the user's words>
35
42
  7. **Login:**<account default> paste it (kept only in a git-ignored `.env`), say "I'll add it" to fill it in yourself, or "demo login" if the page shows one
36
43
  8. **Extras:** **none** · accessibility · visual changes · console errors and broken links · page load time
37
44
 
38
- Anything that writes to your repo or your tools asks you first.
45
+ **You stay in control:** nothing is written to your repo or your tools without your yes.
39
46
  ```
40
47
 
48
+ ## Filling in the defaults
49
+
50
+ **Every line the request already answers shows that answer as its bold default, never the generic one** (the user must never see the card ignore what they typed): a named tool or language ("in Java", "with Selenium", "API tests") on line 4; a site on line 6; a story link or issue key on lines 5 and 6; an account on line 7; a named extra ("check accessibility") on line 8; a repo link or folder on line 1; a cases file or "from Jira/TestRail" on line 2. Before sending the card, check each line against the request once.
51
+
52
+ **An existing suite or a connected tool turns a line into a statement, not a question** (the same 8 lines, in the same order; the user can still change any of them in their reply):
53
+ - **Lines 3 and 4, when line 1's default is the suite open here:** what the suite already uses, from its files (a quick look at its config, folders and one test; no exploring): `3. **Style:** <e.g. page objects in `pages/`, data in `data/`>, as your suite does` and `4. **Tool:** <e.g. Playwright + TypeScript>, as your suite does`. Never offer other tools for an existing suite; a different tool is only by the user's own words.
54
+ - **Line 2, when the request names where the cases are** ("get all the test cases from Jira"): `2. **Existing test cases?** **yes, from <Jira> (<the project, filter or keys named>)**`.
55
+ - **Line 5, when a tool is already connected in this chat** (its read tools answered, e.g. the Jira search already returned issues, or the request uses it and its tools are available): `5. **Connected:** <Jira (read-only)> · add another: Xray · TestRail · …`. A connected tool is never asked again in the same chat (conversation.md 1a).
56
+ - **Line 5, when the request names a story in a tracker** (a Jira link such as `…atlassian.net/browse/PR-1`, an issue key, an Azure DevOps work item or a GitHub issue): `5. **Connect:** **<Jira> (to read <PR-1> from your request)** · or none: paste the story`. Never `none` as the default when the request links a story. On **go**, a tracker that isn't connected yet is item 5 of the setup message (its row from [connect-tools.md](connect-tools.md)), which the run never waits for (conversation.md item 2a); connected, the story is read before anything else.
57
+ - **Line 7, when the request already holds the account** (a user name and a password typed in it): `7. **Login:** **the account in your request** (written only to the git-ignored `.env`, never repeated)`, and conversation item 6 applies (write it, say once it may be worth rotating). Never ask for it again.
58
+ - **Line 7, an existing suite:** its own env file (the one its config loads, e.g. `env-files/.env.dev`), checked with `env_check.mjs <that file>`; never `sut/<site>/.env`.
59
+
41
60
  The `<…>` in line 1 is one of the two defaults: "no, start new in `sut/<site>/`" when the workspace holds no suite (or is the agent install), else "yes, the suite open here (`<folder>`)". `<account default>` in line 7 is " **the account already in `sut/<site>/.env`** · or" when the check prints `E2E_USER: set` and `E2E_PASSWORD: set` (the quick setup writes saucedemo.com's public demo login there), else nothing.
42
61
 
62
+ ## After the reply
63
+
43
64
  After the reply:
44
65
  - **go** accepts every bold default. Answers by number (`3 Hybrid, 4 Java`) or in words change only those lines; show just the changed lines back in one short line and continue.
45
- - **Say a limit only when the user picks the option it applies to**, in one line, never on the card: Appium needs a connected device or emulator; BDD step code needs an adapter first (H12); extras run with Playwright + TypeScript only; agent-built suites in Selenium, Java, C#, Python or JavaScript start from starters that run, and are newer than Playwright + TypeScript; k6 and Pact are new (their starters ran here; no agent has built one yet), and a real k6 load run is asked separately with users and duration (H6).
66
+ - **Say a limit only when the user picks the option it applies to**, in one line, never on the card: Appium needs a connected device or emulator; BDD step code needs an adapter first (H12); extras run with Playwright (JavaScript or TypeScript) only; agent-built suites in Selenium, Appium, Java, C# or Python start from starters that run, and are newer than Playwright; k6 and Pact are new (their starters ran here; no agent has built one yet), and a real k6 load run is asked separately with users and duration (H6).
46
67
  - **Line 1**, a repo link or folder: handled as [work-branch.md](work-branch.md), "An existing framework" (a remote link is cloned once into `sut/<repo-name>/` on hosts with a shell); then analysed before anything is written and extended in its own style.
47
68
  - **Line 2**, shared test cases: imported ([test-case-import.md](../../requirement-analysis/references/test-case-import.md)) and shown back as the case table.
48
- - **Line 3**: Page Object Model and Hybrid are both built from the starter template; Hybrid drives each test from the cases file's data rows ([patterns.md](../../automation-implementation/references/patterns.md), "Hybrid"). BDD: feature files are written; their step code needs an adapter (H12), asked before anything is added.
69
+ - **Line 3**: Page Object Model and Hybrid are both built from the starter template; Hybrid drives each test from data rows in the test-data folder ([patterns.md](../../automation-implementation/references/patterns.md), "Hybrid"). BDD: feature files are written; their step code needs an adapter (H12), asked before anything is added.
49
70
  - **Line 5**: a tool is connected read-only; any write to it asks first (AGENTS rule 2). A tool that isn't connected yet gets its one-time setup in one message ([connect-tools.md](connect-tools.md)), then the run continues.
50
71
  - **Line 7**, "I'll add it": once the test project exists, write `.env` with the names and empty values (`E2E_USER=`, `E2E_PASSWORD=`), tell the user the path in one line and wait; check with `env_check.mjs sut/<site>` (both names `set`), never by reading values.
51
- - **A choice that can't be done here is said plainly in one line, never dropped:** BDD step code (adapter first, H12); Xray Server/Data Center (CSV export instead); extra checks with a stack other than Playwright + TypeScript ("not yet"); Appium without a device; on Copilot Studio, TestRail and Xray (no shell: share a CSV export instead), k6 and Pact runs, cloning a repo and running tests outside CI ([hosts.md](hosts.md)); a GitLab merge request where `gitlab-write` isn't set up (only Claude Code has it: you open the MR from the pushed branch).
72
+ - **A choice that can't be done here is said plainly in one line, never dropped:** BDD step code (adapter first, H12); Xray Server/Data Center (CSV export instead); extra checks with a stack other than Playwright ("not yet"); Appium without a device; on Copilot Studio, TestRail and Xray (no shell: share a CSV export instead), k6 and Pact runs, cloning a repo and running tests outside CI ([hosts.md](hosts.md)); a GitLab merge request where `gitlab-write` isn't set up (only Claude Code has it: you open the MR from the pushed branch).
52
73
  - The second and last stop before the result is the test-case table: "Shall I write these?" ([conversation.md](conversation.md) item 3).
@@ -5,7 +5,7 @@ The user wants results and questions, not a narration of the machinery. Everythi
5
5
  ## Hosts that show their own activity (Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI, Windsurf, Grok Build)
6
6
  - **No narration, three milestones.** The host already shows each file read, command and tool call. Write only: the one question you need, a result the user can use, a blocker, the deliverable. No "I'll…" lines between tool calls ("I'll pull, free the port and install", "I'll write the suite, then review it"): the first text the user sees is the setup card.
7
7
  - **Milestone lines** (a long run otherwise shows minutes of tool output and no sentence): one line, at most three times in a build or full run, each a result that just happened plus what comes next, never a plan: after exploring ("Signed in and mapped 4 pages; all 23 locators matched exactly one element. Designing the test cases."), after the code is reviewed ("8 tests written and reviewed in `sut/shop/tests`. Running them 3 times."), and after a slow install ("Playwright and Chromium installed in `sut/shop/`."). No milestone may restate one already sent.
8
- - **No step names, icons or prefixes** in chat: never `Understand ·`, `Design ·`, `Mode:`, `Confirmed:`, `⛔`, `📖` or the like. The steps and gates are internal; they live in the run file.
8
+ - **No step names, icons or prefixes** in chat: never `Understand ·`, `Design ·`, `Mode:`, `Confirmed:`, `⛔`, `📖` or the like. Two exceptions: the one-line confirmation of a decision the user just made, led by **Approved:**, **Updated:**, **Understood, …** or **All set:** ([conversation.md](conversation.md), Voice), and the result: its bold verdict (✅ ⚠️ ❌) and "⚠️ " on its attention lines, the same marks as the report ([conversation.md](conversation.md), "What the user sees"). The steps and gates are internal; they live in the run file.
9
9
  - Each message is plain sentences: what you found or did, then what you need (if anything). Numbers come from accepted RESULTs and the run file's `Run state` (UI map, test design, executor's `executed / planned`); no number without its source.
10
10
 
11
11
  ## Copilot Studio (and any host that shows nothing while it works)
@@ -24,9 +24,14 @@ One short plain sentence when a long step starts, because a connected-agent call
24
24
  [user: go]
25
25
  Signed in and mapped 3 pages: login, 6 products each with Add to cart, the cart. All 14 locators matched exactly one element. Designing the test cases.
26
26
  [the test-case table: ID · What it checks · Type · Priority · Expected]
27
- 8 test cases, from your request and what the site shows. Shall I write these? Say go, or e.g. "add: locked-out user", "drop TS-4".
27
+ 8 test cases, from your request and what the site shows. **Shall I write these?** Reply **go**, or change any case: "add: locked-out user", "drop TS-4".
28
28
  [user: go]
29
29
  8 tests written and reviewed in sut/saucedemo/tests. Running them 3 times.
30
- `npx playwright test` ran 3 times: 7 pass every time; TS-6 fails because the app shows a different locked-out message (defect draft below). A wrong expected value made TS-2 fail, as it should. Login is automated.
31
- Accept? (yes / changes) What next: 1 open the report · 2 the test cases as Excel or a TestRail / Xray / Zephyr / Azure import file · 3 commit to a new branch (I'll ask first)
30
+ **⚠️ Ready, with notes**: 8 tests in `sut/saucedemo/tests`, ran 3 times: 7 pass every time; each failed when its check was broken.
31
+ Login: automated, signed in once per run and the session reused.
32
+ Coverage: log in → TS-1, TS-2 · add to cart → TS-3 to TS-5 · cart → TS-6 to TS-8.
33
+ ⚠️ TS-6 fails every time: the app shows a different locked-out message than the story says. A defect draft is in the report; reply "file it" to send it to Jira.
34
+ Report: `project-context/runs/R-20261113-1010-cart.report.md`
35
+ **Accept?** Reply **yes**, or tell me what to change. What next: 1 open the report · 2 the test cases as Excel, PDF, Word or any file · 3 commit to a new branch (I'll ask first)
32
36
  ```
37
+ With the story read from a connected tracker, choice 2 becomes "push the 8 test cases to Jira, linked to PR-1 (I'll show exactly what first)" and the files move to 3. The coverage line is never a table, even when the report's is.
@@ -15,6 +15,7 @@
15
15
  - budget: maxTurns <n>; return partial if exceeded
16
16
  - stop if: auth failure, ambiguity, scope change → blocked / needs_user (use only the 11 failure classes, e.g. NEEDS_AUTHENTICATION or NEEDS_PERMISSION; never invent one)
17
17
  ```
18
+ Name files in `inputs`; don't paste their content into the brief. On Claude Code the usage report shows each brief's size (`brief_bytes`): a brief over 8 KB usually carries text the agent could read itself.
18
19
 
19
20
  ## Accept a RESULT only if (stop at first failure)
20
21
  1. Template present, every field filled. An empty reply or text without a RESULT block is no RESULT: a failed call, never a success (hosts.md: one unchanged retry, then ⛔ Blocked).
@@ -18,6 +18,8 @@ How new test code moves from the implementer to review, execution and the PR. Th
18
18
  | A remote link (GitHub, Bitbucket, GitLab, Azure Repos) and a host with a shell | cloned once, before Gate 3, with `git clone <url> sut/<repo-name>` from the workspace root (Claude Code: an implementer `clone` task; single-agent: your own step). Cloning only reads, and the user's own git sign-in is used; nothing reaches the remote, so it isn't H3. The clone is then the existing suite: Gate 3 maps it, tests go on a local work branch in it, a push is H3 and a PR H4. A clone that fails (no access, sign-in needed, not found) is a blocker: what failed and the one fix ("clone it yourself and open the folder here, or give your git account access"); never ask for a password or token in the chat |
19
19
  | A remote link on Copilot Studio | not cloned: the repo is read with the GitHub read tool and written only on the work branch (By host, below) |
20
20
 
21
+ **In an existing suite, Orion adds nothing of its own around it.** No `sut/<site>/` folder, no `.env` or `.gitignore` of its own (the suite's env file and ignore file are used as they are; the browser setup takes `--env-file <the suite's env file>`), and no Orion layer the suite doesn't have (desc files, a test-data folder, a setup project): the suite's own equivalents are used. New files follow the Conventions rows of `architecture-profile.md` (folder, file-name pattern, class and method names), e.g. `pages/PerformancePage.ts` beside `pages/PIMPage.ts`; a screen that already has a page object gets methods added to it, never a second file. No package is added to `package.json` without H10 naming it; the suite's config and ignore file aren't edited; no helper or exploration script is left in its folders (exploring writes only to the git-ignored `.ui-map/`). Before every RESULT the implementer runs `git status --porcelain` and lists every changed or new file; a file outside the plan is removed or explained.
22
+
21
23
  ## Brief fields (Gate 5 onward)
22
24
  - `worktree:` absolute path the implementer returned in its RESULT `Artifacts` (Claude Code), or `none`
23
25
  - `base:` commit SHA the work started from (`git rev-parse HEAD` before the first edit)
@@ -37,7 +39,7 @@ Reviewer, executor, implementer (heals) and change-agent all work on the **same*
37
39
 
38
40
  In `sut/<app>/` inside the agent install there is no branch to create: the folder is the hand-off, and nothing is committed.
39
41
 
40
- The worktree has no installed dependencies (they are git-ignored). The executor installs them with the project's lockfile or manifest command (`execution` step 2: `npm ci`, `mvn -q dependency:resolve`, `pip install -r`, `dotnet restore`); the host's `ask` rule for installs applies (H10). If the user declines, run in CI.
42
+ The worktree has no installed dependencies (they are git-ignored). For a Node suite whose dependencies this work doesn't change, the executor links the suite's own `node_modules` into the worktree (`execution` step 2): one set of packages, the suite's versions, nothing duplicated. Otherwise it installs them with the project's lockfile or manifest command (`execution` step 2: `npm ci`, `mvn -q dependency:resolve`, `pip install -r`, `dotnet restore`); the host's `ask` rule for installs applies (H10). If the user declines, run in CI.
41
43
 
42
44
  ## Whose account, which repo
43
45
  Every user connects their **own** GitHub, Jira or Azure DevOps account; the agents act with that user's permissions on that user's repo. The first write question of a run names the account handle, the repo and the branch, and repeats any readiness gap from environment-discovery 6b, e.g. *"`main` in `org/repo` isn't protected: the agents still never push to it, but nothing on GitHub would stop it. Continue?"* No push access → NEEDS_PERMISSION, no write. No manual-trigger CI → tests can't run in CI: say so and stop after Gate 5 with the tests on the work branch (Copilot Studio), or offer a local run (other hosts, H6).
@@ -0,0 +1,98 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Is this request one story or a batch? The rules the orchestrator applies on every host (references/batch.md), as a
4
+ * script where a shell exists; `check_batch_detect.py` keeps the two the same. Reads only the user's own message (and
5
+ * a file it names): keys inside a story fetched from a tracker never count.
6
+ *
7
+ * Usage (from the workspace root):
8
+ * node .claude/skills/orion/scripts/batch_detect.mjs --text "<the user's message>" [--file <stories.csv|.xlsx>] [--json]
9
+ * (--text - reads the message from stdin)
10
+ * Decision:
11
+ * single one story, or none named (a pasted story, one key, one big story with many cases: split into ≤ 8-case tasks)
12
+ * ask 2 or 3 stories: one question, batch suggested ("Run these 3 stories as a batch? yes / one at a time")
13
+ * batch 4+ stories, an epic, a JQL query, a file with 2+ story rows, or "all/every … stories" with a source
14
+ * A key counts only when the message asks for it: keys named as context ("blocked by SHOP-3", "like SHOP-9",
15
+ * "depends on", "related to", "see", "after", "duplicate of", "parent") don't.
16
+ * Output: one line per field (or JSON): decision, stories, source, workflow (build | design), split (stories with > 8
17
+ * cases), reason. Exit code: 0 decided · 2 wrong arguments or an unreadable file.
18
+ */
19
+ import fs from 'node:fs';
20
+ import path from 'node:path';
21
+ import { readRows } from './lib/table.mjs';
22
+
23
+ const KEY = /\b([A-Z][A-Z0-9]{1,9}-\d{1,6})\b/g;
24
+ const CONTEXT = /\b(blocked by|blocks|depends on|dependent on|related to|relates to|see|like|similar to|same as|after|before|duplicate of|duplicates|parent|child of|caused by|follow[- ]up (?:of|to)|from|as in|cloned from|split from)\s+(?:story\s+|ticket\s+|issue\s+)?$/i;
25
+ const EPIC = /\bepic\s+([A-Z][A-Z0-9]{1,9}-\d{1,6})\b|\b([A-Z][A-Z0-9]{1,9}-\d{1,6})\s+epic\b|\bstories (?:in|under|of) (?:the )?epic\b/i;
26
+ const JQL = /\b(jql\b|project\s*=\s*\w+|sprint\s+in\s+|fixVersion\s*=|issuetype\s*=|labels?\s*=)/i;
27
+ const ALL = /\b(?:(?:all|these|those|the following|the \d+|\d+)\s+(?:\w+\s+){0,2}(?:stories|tickets|issues)|(?:every|each)\s+(?:\w+\s+){0,2}(?:story|ticket|issue))\b/i;
28
+ const DESIGN = /\b(test cases only|only (?:the )?test cases|just (?:the )?test cases|design only|only design|no code|cases,? not (?:the )?code)\b/i;
29
+ const CASE_ROW = /^\s*(?:[-*•]|\d+[.)]|TC[-_ ]?\d+|TS[-_ ]?\d+)\s+\S/;
30
+
31
+ /** Story keys the message asks for, in order, without the ones named only as context. */
32
+ export function storyKeys(text) {
33
+ const keys = [];
34
+ // A key that starts a line of a pasted case list ("TC-12 check the total") is a case id, not a story.
35
+ const body = text.split('\n').map((l) => (CASE_ROW.test(l) ? l.replace(/^\s*(?:[-*•]\s*|\d+[.)]\s*)?[A-Z][A-Z0-9]{1,9}-\d{1,6}\b/, ' ') : l)).join('\n');
36
+ for (const m of body.matchAll(KEY)) {
37
+ const before = body.slice(Math.max(0, m.index - 40), m.index);
38
+ if (CONTEXT.test(before)) continue;
39
+ if (!keys.includes(m[1])) keys.push(m[1]);
40
+ }
41
+ return keys;
42
+ }
43
+
44
+ /** Rows of a stories file grouped by story: [{ key, cases }] (the key column: story, key, issue, id). */
45
+ export function storiesInFile(file) {
46
+ const rows = readRows(file);
47
+ if (!rows.length) return [];
48
+ const head = rows[0].map((h) => String(h).trim().toLowerCase());
49
+ let col = head.findIndex((h) => /^(story|story key|key|issue|issue key|jira|requirement)$/.test(h));
50
+ const body = col >= 0 ? rows.slice(1) : rows;
51
+ if (col < 0) col = 0;
52
+ const byKey = new Map();
53
+ for (const r of body) {
54
+ const k = String(r[col] ?? '').trim().match(/^[A-Z][A-Z0-9]{1,9}-\d{1,6}$/)?.[0];
55
+ if (!k) continue;
56
+ byKey.set(k, (byKey.get(k) || 0) + 1);
57
+ }
58
+ return [...byKey].map(([key, cases]) => ({ key, cases }));
59
+ }
60
+
61
+ /** The decision for one request. */
62
+ export function detect(text, file = null) {
63
+ const workflow = DESIGN.test(text) ? 'design' : 'build';
64
+ const pastedCases = text.split('\n').filter((l) => CASE_ROW.test(l)).length;
65
+ if (file) {
66
+ const stories = storiesInFile(file);
67
+ const split = stories.filter((s) => s.cases > 8).map((s) => s.key);
68
+ if (stories.length >= 2) return { decision: stories.length <= 3 ? 'ask' : 'batch', stories: stories.map((s) => s.key), source: `file ${path.basename(file)}`, workflow, split, reason: `${stories.length} stories in the file` };
69
+ return { decision: 'single', stories: stories.map((s) => s.key), source: `file ${path.basename(file)}`, workflow, split, reason: stories.length ? `one story in the file (${stories[0].cases} cases)` : 'no story keys in the file: one story' };
70
+ }
71
+ const epic = text.match(EPIC);
72
+ if (epic) return { decision: 'batch', stories: [], source: `epic ${epic[1] || epic[2] || '(named)'}`, workflow, split: [], reason: 'an epic: its stories are listed from the tracker' };
73
+ if (JQL.test(text)) return { decision: 'batch', stories: [], source: 'jql', workflow, split: [], reason: 'a tracker query: its stories are listed from the tracker' };
74
+ const keys = storyKeys(text);
75
+ if (keys.length >= 4) return { decision: 'batch', stories: keys, source: 'message', workflow, split: [], reason: `${keys.length} stories named` };
76
+ if (keys.length >= 2) return { decision: 'ask', stories: keys, source: 'message', workflow, split: [], reason: `${keys.length} stories named` };
77
+ if (keys.length < 2 && ALL.test(text) && /\b(sprint|board|backlog|release|version|label|component)\b/i.test(text)) {
78
+ return { decision: 'batch', stories: [], source: 'tracker list', workflow, split: [], reason: '"all/every … stories" of a sprint, board or release' };
79
+ }
80
+ const split = pastedCases > 8 ? [keys[0] || 'the story'] : [];
81
+ return { decision: 'single', stories: keys, source: 'message', workflow, split, reason: pastedCases > 8 ? `one story with ${pastedCases} cases: split into tasks of ≤ 8` : 'one story' };
82
+ }
83
+
84
+ function main() {
85
+ const a = process.argv.slice(2);
86
+ const opt = (n) => { const i = a.indexOf(n); return i >= 0 ? a[i + 1] : undefined; };
87
+ let text = opt('--text');
88
+ const file = opt('--file');
89
+ if (text === undefined) { console.log('usage: batch_detect.mjs --text "<message>" [--file <stories.csv|.xlsx>] [--json]'); process.exit(2); }
90
+ if (text === '-') text = fs.readFileSync(0, 'utf8');
91
+ if (file && !fs.existsSync(file)) { console.log(`can't read ${file}`); process.exit(2); }
92
+ let r;
93
+ try { r = detect(text, file); } catch (e) { console.log(`can't read ${file}: ${e.message}`); process.exit(2); }
94
+ if (a.includes('--json')) { console.log(JSON.stringify(r)); return; }
95
+ for (const [k, v] of Object.entries(r)) console.log(`${k}: ${Array.isArray(v) ? v.join(', ') || 'none' : v}`);
96
+ }
97
+
98
+ if (process.argv[1] && path.resolve(process.argv[1]).endsWith('batch_detect.mjs')) main();
@@ -0,0 +1,179 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * The state of a batch of stories (references/batch.md), in one authoritative file, so a batch stopped by the usage
4
+ * limit, a budget cap or a new chat resumes where it was: `project-context/batches/B-<YYYYMMDD>-<HHMM>-<slug>/batch.json`,
5
+ * with a readable `batch.md` next to it rewritten on every change. The orchestrator keeps only `summary` in its context
6
+ * between waves, never the agents' RESULT bodies.
7
+ *
8
+ * Usage (from the workspace root):
9
+ * node .claude/skills/orion/scripts/batch_state.mjs init <slug> (--stories K1,K2,… | --from <stories.csv|.xlsx>)
10
+ * [--budget <USD>] [--parallel <K>] [--workflow build|design] → prints the batch.json path
11
+ * node .claude/skills/orion/scripts/batch_state.mjs <batch.json> <action> …
12
+ * Actions:
13
+ * set <story> <field>=<value> … story fields: state, screens (comma list), cases, run, usd, note
14
+ * set batch <field>=<value> … batch fields: spent_usd, budget_usd, parallel, foundation, wave
15
+ * screen <name> explored a shared screen was explored once (its map is in project-context/ui-maps/screens/)
16
+ * next the next wave and the stories (or screens) to start now, at most `parallel`
17
+ * summary one status line for the user
18
+ * resume-plan what is done, what is open, the next step
19
+ * Story states, in order: pending → analysed → designed → approved → built → verified → accepted; or blocked, skipped.
20
+ * Waves: plan (pending), screens (unexplored shared screens), strategy (analysed), approval (designed: the user's
21
+ * checkpoint, pages of ≤ 10), foundation (once, after all approvals), build (approved, `parallel` at a time), verify
22
+ * (built), integration (verified → accepted, one by one). A design-only batch ends at approval.
23
+ * Budget: when spent_usd reaches budget_usd, `next` says `stop: budget` (the batch stops at a wave boundary).
24
+ * Exit code: 0 done · 1 not found (story, file) · 2 wrong arguments.
25
+ */
26
+ import fs from 'node:fs';
27
+ import path from 'node:path';
28
+ import { insideWorkspace } from './lib/inside.mjs';
29
+ import { readRows } from './lib/table.mjs';
30
+
31
+ const STATES = ['pending', 'analysed', 'designed', 'approved', 'built', 'verified', 'accepted', 'blocked', 'skipped'];
32
+ const WAVES = ['plan', 'screens', 'strategy', 'approval', 'foundation', 'build', 'verify', 'integration'];
33
+ const STORY_FIELDS = ['state', 'screens', 'cases', 'run', 'usd', 'note'];
34
+ const BATCH_FIELDS = ['spent_usd', 'budget_usd', 'parallel', 'foundation', 'wave'];
35
+ const KEY = /^[A-Z][A-Z0-9]{1,9}-\d{1,6}$/;
36
+ const pad = (n) => String(n).padStart(2, '0');
37
+
38
+ function fail(msg, code = 2) { console.log(msg); process.exit(code); }
39
+
40
+ function load(file) {
41
+ try { return JSON.parse(fs.readFileSync(file, 'utf8')); } catch { return fail(`can't read ${file}`, 1); }
42
+ }
43
+
44
+ /** The readable view of a batch. */
45
+ export function render(b) {
46
+ const lines = [`# Batch ${b.id}`, '', `- workflow: ${b.workflow} · parallel: ${b.parallel} · budget: ${b.budget_usd === null ? 'none' : `USD ${b.budget_usd}`} · spent: USD ${b.spent_usd}`,
47
+ `- foundation: ${b.foundation || 'not built'} · status: ${summary(b)}`, '', '| Story | State | Screens | Cases | Run | USD | Note |', '|---|---|---|---|---|---|---|'];
48
+ for (const s of b.stories) lines.push(`| ${s.key} | ${s.state} | ${s.screens.join(', ') || '—'} | ${s.cases ?? '—'} | ${s.run || '—'} | ${s.usd ?? '—'} | ${s.note || ''} |`);
49
+ const screens = Object.entries(b.screens);
50
+ if (screens.length) {
51
+ lines.push('', '| Shared screen | Explored | Used by |', '|---|---|---|');
52
+ for (const [name, sc] of screens) lines.push(`| ${name} | ${sc.explored ? 'yes' : 'no'} | ${b.stories.filter((s) => s.screens.includes(name)).map((s) => s.key).join(', ')} |`);
53
+ }
54
+ return `${lines.join('\n')}\n`;
55
+ }
56
+
57
+ function save(file, b) {
58
+ fs.writeFileSync(file, `${JSON.stringify(b, null, 2)}\n`);
59
+ fs.writeFileSync(path.join(path.dirname(file), 'batch.md'), render(b));
60
+ }
61
+
62
+ const live = (b) => b.stories.filter((s) => !['blocked', 'skipped'].includes(s.state));
63
+ const at = (b, state) => live(b).filter((s) => s.state === state);
64
+ const done = (b) => b.stories.filter((s) => s.state === (b.workflow === 'design' ? 'approved' : 'accepted')).length;
65
+
66
+ /** The next wave and what to start in it. */
67
+ export function next(b) {
68
+ if (b.budget_usd !== null && b.spent_usd >= b.budget_usd) return { wave: 'stop', start: [], why: `budget: USD ${b.spent_usd} spent of ${b.budget_usd}` };
69
+ const k = b.parallel;
70
+ if (at(b, 'pending').length) return { wave: 'plan', start: at(b, 'pending').slice(0, Math.max(k, 6)).map((s) => s.key), why: 'requirement analysis, up to 6 at a time' };
71
+ const unexplored = Object.entries(b.screens).filter(([, s]) => !s.explored).map(([n]) => n);
72
+ if (unexplored.length) return { wave: 'screens', start: unexplored.slice(0, 1), why: 'each shared screen explored once, one at a time (one browser)' };
73
+ if (at(b, 'analysed').length) return { wave: 'strategy', start: at(b, 'analysed').slice(0, Math.max(k, 6)).map((s) => s.key), why: 'test design per story, from the shared screens' };
74
+ if (at(b, 'designed').length) return { wave: 'approval', start: at(b, 'designed').slice(0, 10).map((s) => s.key), why: 'the user approves the test-case tables, up to 10 stories per page' };
75
+ if (b.workflow === 'design') return { wave: 'done', start: [], why: `${done(b)} of ${b.stories.length} stories designed and approved` };
76
+ if (at(b, 'approved').length && !b.foundation) return { wave: 'foundation', start: ['foundation'], why: 'shared page objects, fixtures and helpers built once, before any story' };
77
+ if (at(b, 'approved').length) return { wave: 'build', start: at(b, 'approved').slice(0, k).map((s) => s.key), why: `stories built ${k} at a time, each in its own work copy from the foundation` };
78
+ if (at(b, 'built').length) return { wave: 'verify', start: at(b, 'built').slice(0, Math.min(k, 2)).map((s) => s.key), why: 'review and 3 runs per story, at most 2 runs at a time on a shared environment' };
79
+ if (at(b, 'verified').length) return { wave: 'integration', start: at(b, 'verified').slice(0, 1).map((s) => s.key), why: 'merged one at a time, graph check and one regression run, then accepted' };
80
+ return { wave: 'done', start: [], why: `${done(b)} of ${b.stories.length} stories accepted` };
81
+ }
82
+
83
+ /** One status line. */
84
+ export function summary(b) {
85
+ const n = next(b);
86
+ const idx = WAVES.indexOf(n.wave);
87
+ const wave = idx >= 0 ? `Wave ${idx + 1}/${b.workflow === 'design' ? 4 : WAVES.length} ${n.wave}: ${n.start.join(', ')}` : n.wave === 'stop' ? `Stopped: ${n.why}` : 'Done';
88
+ const blocked = b.stories.filter((s) => s.state === 'blocked').map((s) => s.key);
89
+ return `${wave} · ${done(b)} of ${b.stories.length} done${blocked.length ? ` · blocked: ${blocked.join(', ')}` : ''} · USD ${b.spent_usd}${b.budget_usd !== null ? ` of ${b.budget_usd}` : ''}`;
90
+ }
91
+
92
+ function init(a) {
93
+ const slug = a[0];
94
+ if (!slug || !/^[a-z0-9][a-z0-9-]{0,40}$/.test(slug)) fail('init needs a slug: lowercase letters, digits and dashes');
95
+ const opt = (n) => { const i = a.indexOf(n); return i >= 0 ? a[i + 1] : undefined; };
96
+ let keys = [];
97
+ if (opt('--stories')) keys = opt('--stories').split(',').map((s) => s.trim()).filter(Boolean);
98
+ else if (opt('--from')) {
99
+ const rows = readRows(opt('--from'));
100
+ const head = (rows[0] || []).map((h) => String(h).trim().toLowerCase());
101
+ const col = Math.max(0, head.findIndex((h) => /^(story|story key|key|issue|issue key|jira|requirement)$/.test(h)));
102
+ for (const r of rows) { const k = String(r[col] ?? '').trim(); if (KEY.test(k) && !keys.includes(k)) keys.push(k); }
103
+ } else fail('init needs --stories K1,K2,… or --from <stories.csv|.xlsx>');
104
+ const bad = keys.filter((k) => !KEY.test(k));
105
+ if (bad.length || !keys.length) fail(bad.length ? `not story keys: ${bad.join(', ')}` : 'no stories');
106
+ const budget = opt('--budget') !== undefined ? Number(opt('--budget')) : null;
107
+ const parallel = opt('--parallel') !== undefined ? Number(opt('--parallel')) : 4;
108
+ const workflow = opt('--workflow') || 'build';
109
+ if ((budget !== null && !(budget > 0)) || !(parallel >= 1 && parallel <= 6) || !['build', 'design'].includes(workflow)) fail('--budget > 0, --parallel 1 to 6, --workflow build or design');
110
+ const d = new Date();
111
+ const id = `B-${d.getFullYear()}${pad(d.getMonth() + 1)}${pad(d.getDate())}-${pad(d.getHours())}${pad(d.getMinutes())}-${slug}`;
112
+ const dir = path.join('project-context', 'batches', id);
113
+ insideWorkspace(dir, 'the batch folder');
114
+ fs.mkdirSync(dir, { recursive: true });
115
+ const b = { id, workflow, parallel, budget_usd: budget, spent_usd: 0, foundation: null, screens: {},
116
+ stories: keys.map((key) => ({ key, state: 'pending', screens: [], cases: null, run: null, usd: null, note: '' })) };
117
+ const file = path.join(dir, 'batch.json');
118
+ save(file, b);
119
+ console.log(file);
120
+ }
121
+
122
+ function setFields(b, target, pairs) {
123
+ const s = target === 'batch' ? null : b.stories.find((x) => x.key === target);
124
+ if (target !== 'batch' && !s) fail(`no story ${target} in ${b.id}`, 1);
125
+ for (const p of pairs) {
126
+ const i = p.indexOf('=');
127
+ if (i < 1) fail(`expected field=value, got ${p}`);
128
+ const [f, v] = [p.slice(0, i), p.slice(i + 1)];
129
+ if (/password|secret|token|bearer|eyJ[A-Za-z0-9_-]{10,}/i.test(v)) fail(`refused: the value of ${f} looks like a secret`);
130
+ if (s) {
131
+ if (!STORY_FIELDS.includes(f)) fail(`story fields: ${STORY_FIELDS.join(', ')}`);
132
+ if (f === 'state' && !STATES.includes(v)) fail(`states: ${STATES.join(', ')}`);
133
+ if (f === 'screens') {
134
+ s.screens = v.split(',').map((x) => x.trim()).filter(Boolean);
135
+ for (const n of s.screens) if (!b.screens[n]) b.screens[n] = { explored: false };
136
+ } else if (f === 'cases' || f === 'usd') {
137
+ if (!(Number(v) >= 0)) fail(`${f} is a number`);
138
+ if (f === 'usd') b.spent_usd = Math.round((b.spent_usd - (s.usd || 0) + Number(v)) * 100) / 100;
139
+ s[f] = Number(v);
140
+ } else s[f] = v;
141
+ } else {
142
+ if (!BATCH_FIELDS.includes(f)) fail(`batch fields: ${BATCH_FIELDS.join(', ')}`);
143
+ if (['spent_usd', 'budget_usd', 'parallel'].includes(f)) {
144
+ if (!(Number(v) >= 0) || (f === 'parallel' && !(Number(v) >= 1 && Number(v) <= 6))) fail(`${f}: a number${f === 'parallel' ? ' from 1 to 6' : ''}`);
145
+ b[f] = Number(v);
146
+ } else b[f] = v;
147
+ }
148
+ }
149
+ }
150
+
151
+ function main() {
152
+ const a = process.argv.slice(2);
153
+ if (a[0] === 'init') return init(a.slice(1));
154
+ const [file, action, ...rest] = a;
155
+ if (!file || !action) fail('usage: batch_state.mjs init <slug> … | <batch.json> set|screen|next|summary|resume-plan …');
156
+ insideWorkspace(file, 'the batch file');
157
+ const b = load(file);
158
+ if (action === 'set') {
159
+ if (rest.length < 2) fail('set <story|batch> <field>=<value> …');
160
+ setFields(b, rest[0], rest.slice(1));
161
+ save(file, b);
162
+ console.log(summary(b));
163
+ } else if (action === 'screen') {
164
+ if (rest[1] !== 'explored' || !b.screens[rest[0]]) fail(b.screens[rest[0]] ? 'screen <name> explored' : `no shared screen ${rest[0]} (screens come from a story's screens= field)`, b.screens[rest[0]] ? 2 : 1);
165
+ b.screens[rest[0]].explored = true;
166
+ save(file, b);
167
+ console.log(summary(b));
168
+ } else if (action === 'next') {
169
+ const n = next(b);
170
+ console.log(`wave: ${n.wave}\nstart: ${n.start.join(', ') || 'none'}\nwhy: ${n.why}`);
171
+ } else if (action === 'summary') console.log(summary(b));
172
+ else if (action === 'resume-plan') {
173
+ for (const st of STATES) { const ks = b.stories.filter((s) => s.state === st).map((s) => s.key); if (ks.length) console.log(`${st}: ${ks.join(', ')}`); }
174
+ const n = next(b);
175
+ console.log(`next: ${n.wave} · ${n.start.join(', ') || 'none'} (${n.why})`);
176
+ } else fail(`unknown action ${action}`);
177
+ }
178
+
179
+ if (process.argv[1] && path.resolve(process.argv[1]).endsWith('batch_state.mjs')) main();