@v11g/agents-rock 1.0.9 → 1.0.10

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 (246) hide show
  1. package/README.md +1 -0
  2. package/package.json +2 -2
  3. package/plugins/business-analyst/.claude-plugin/plugin.json +1 -1
  4. package/plugins/business-analyst/evals/ba-interview-conflict/graders/conflict-quoted.md +15 -0
  5. package/plugins/business-analyst/evals/ba-interview-conflict/graders/no-internal-ids.md +9 -0
  6. package/plugins/business-analyst/evals/ba-interview-conflict/graders/one-question.md +15 -0
  7. package/plugins/business-analyst/evals/ba-interview-conflict/graders/skill-fired.md +7 -0
  8. package/plugins/business-analyst/evals/ba-interview-conflict/prompt.md +31 -0
  9. package/plugins/business-analyst/evals/ba-interview-first-turn/graders/no-internal-ids.md +9 -0
  10. package/plugins/business-analyst/evals/ba-interview-first-turn/graders/no-setup-questions.md +16 -0
  11. package/plugins/business-analyst/evals/ba-interview-first-turn/graders/one-scope-question.md +19 -0
  12. package/plugins/business-analyst/evals/ba-interview-first-turn/graders/skill-fired.md +7 -0
  13. package/plugins/business-analyst/evals/ba-interview-first-turn/prompt.md +31 -0
  14. package/plugins/business-analyst/evals/ba-review-page/case.yaml +4 -0
  15. package/plugins/business-analyst/evals/ba-review-page/fixture.sh +12 -0
  16. package/plugins/business-analyst/evals/ba-review-page/graders/decide-in-interview.md +26 -0
  17. package/plugins/business-analyst/evals/ba-review-page/graders/skill-fired.md +7 -0
  18. package/plugins/business-analyst/evals/ba-review-page/prompt.md +9 -0
  19. package/plugins/business-analyst/skills/business-analyst/README.md +8 -0
  20. package/plugins/business-analyst/skills/business-analyst/SKILL.md +47 -16
  21. package/plugins/business-analyst/skills/business-analyst/assets/review-page.html +68 -0
  22. package/plugins/business-analyst/skills/business-analyst/evals/evals.json +1 -1
  23. package/plugins/business-analyst/skills/business-analyst/references/frameworks.md +3 -2
  24. package/plugins/business-analyst/skills/business-analyst/references/interview.md +156 -8
  25. package/plugins/business-analyst/skills/business-analyst/references/review.md +18 -4
  26. package/plugins/business-analyst/skills/business-analyst/references/writing.md +49 -8
  27. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_data.cpython-312.pyc +0 -0
  28. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_layout.cpython-312.pyc +0 -0
  29. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_page.cpython-312.pyc +0 -0
  30. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_checks.cpython-312.pyc +0 -0
  31. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_render.cpython-312.pyc +0 -0
  32. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/validate.cpython-312.pyc +0 -0
  33. package/plugins/business-analyst/skills/business-analyst/scripts/lib/checks.mjs +12 -6
  34. package/plugins/business-analyst/skills/business-analyst/scripts/lib/review-data.mjs +66 -0
  35. package/plugins/business-analyst/skills/business-analyst/scripts/lib/review-layout.mjs +53 -0
  36. package/plugins/business-analyst/skills/business-analyst/scripts/lib/review-page.mjs +78 -0
  37. package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-checks.mjs +73 -0
  38. package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-md.mjs +53 -0
  39. package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-render.mjs +72 -0
  40. package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-rules.mjs +90 -0
  41. package/plugins/business-analyst/skills/business-analyst/scripts/review.mjs +48 -0
  42. package/plugins/business-analyst/skills/business-analyst/scripts/review.py +60 -0
  43. package/plugins/business-analyst/skills/business-analyst/scripts/review_data.py +81 -0
  44. package/plugins/business-analyst/skills/business-analyst/scripts/review_layout.py +50 -0
  45. package/plugins/business-analyst/skills/business-analyst/scripts/review_page.py +115 -0
  46. package/plugins/business-analyst/skills/business-analyst/scripts/scope.mjs +24 -0
  47. package/plugins/business-analyst/skills/business-analyst/scripts/scope.py +35 -0
  48. package/plugins/business-analyst/skills/business-analyst/scripts/scope_checks.py +168 -0
  49. package/plugins/business-analyst/skills/business-analyst/scripts/scope_render.py +140 -0
  50. package/plugins/business-analyst/skills/business-analyst/scripts/test/checks.test.mjs +27 -0
  51. package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-workflow-pass.json +78 -0
  52. package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-workflow-pass.md +136 -0
  53. package/plugins/business-analyst/skills/business-analyst/scripts/test/python-parity.test.mjs +88 -0
  54. package/plugins/business-analyst/skills/business-analyst/scripts/test/quality-gates.test.mjs +26 -0
  55. package/plugins/business-analyst/skills/business-analyst/scripts/test/review-browser.test.mjs +106 -0
  56. package/plugins/business-analyst/skills/business-analyst/scripts/test/review-fixture.mjs +32 -0
  57. package/plugins/business-analyst/skills/business-analyst/scripts/test/review-page.test.mjs +340 -0
  58. package/plugins/business-analyst/skills/business-analyst/scripts/test/review-parity.test.mjs +79 -0
  59. package/plugins/business-analyst/skills/business-analyst/scripts/test/scope-cases.mjs +58 -0
  60. package/plugins/business-analyst/skills/business-analyst/scripts/test/scope-checks.test.mjs +31 -0
  61. package/plugins/business-analyst/skills/business-analyst/scripts/test/scope-md.test.mjs +140 -0
  62. package/plugins/business-analyst/skills/business-analyst/scripts/validate.mjs +1 -1
  63. package/plugins/business-analyst/skills/business-analyst/scripts/validate.py +17 -8
  64. package/plugins/solution-architect/evals/proposal-workflow/case.yaml +6 -0
  65. package/plugins/solution-architect/evals/proposal-workflow/fixture.sh +6 -0
  66. package/plugins/solution-architect/evals/proposal-workflow/graders/inputs-written.md +23 -0
  67. package/plugins/solution-architect/evals/proposal-workflow/graders/no-proposal-md.md +7 -0
  68. package/plugins/solution-architect/evals/proposal-workflow/graders/skill-fired.md +7 -0
  69. package/plugins/solution-architect/evals/proposal-workflow/graders/validate-then-render.md +16 -0
  70. package/plugins/solution-architect/evals/proposal-workflow/prompt.md +10 -0
  71. package/plugins/solution-architect/evals/workflow-gate-no-architecture/case.yaml +4 -0
  72. package/plugins/solution-architect/evals/workflow-gate-no-architecture/fixture.sh +6 -0
  73. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/no-classic-fallback.md +10 -0
  74. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/nothing-written.md +7 -0
  75. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/skill-fired.md +7 -0
  76. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/stops-at-gate.md +11 -0
  77. package/plugins/solution-architect/evals/workflow-gate-no-architecture/prompt.md +7 -0
  78. package/plugins/solution-architect/evals/workflow-happy-path/case.yaml +4 -0
  79. package/plugins/solution-architect/evals/workflow-happy-path/fixture.sh +6 -0
  80. package/plugins/solution-architect/evals/workflow-happy-path/graders/no-estimation-md.md +7 -0
  81. package/plugins/solution-architect/evals/workflow-happy-path/graders/pages-or-stop.md +16 -0
  82. package/plugins/solution-architect/evals/workflow-happy-path/graders/routed-to-workflow.md +12 -0
  83. package/plugins/solution-architect/evals/workflow-happy-path/graders/skill-fired.md +7 -0
  84. package/plugins/solution-architect/evals/workflow-happy-path/graders/three-questions-max.md +14 -0
  85. package/plugins/solution-architect/evals/workflow-happy-path/graders/workflow-or-exact-stop.md +15 -0
  86. package/plugins/solution-architect/evals/workflow-happy-path/prompt.md +9 -0
  87. package/plugins/solution-architect/skills/analyze-requirements/assets/viewer-template.html +11 -1
  88. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/browser.test.mjs +27 -0
  89. package/plugins/solution-architect/skills/estimate/README.md +18 -3
  90. package/plugins/solution-architect/skills/estimate/SKILL.md +18 -75
  91. package/plugins/solution-architect/skills/estimate/classic/FLOW.md +77 -0
  92. package/plugins/solution-architect/skills/estimate/classic/assets/estimate-template.html +1337 -0
  93. package/plugins/solution-architect/skills/estimate/{references → classic/references}/task-shapes.md +1 -1
  94. package/plugins/solution-architect/skills/estimate/{references → classic/references}/writing.md +2 -2
  95. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/compute.mjs +1 -1
  96. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/checks.mjs +1 -1
  97. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/roadmap.mjs +1 -1
  98. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/rollup.mjs +5 -5
  99. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/schema.mjs +4 -26
  100. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-csv.mjs +2 -2
  101. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-html.mjs +2 -2
  102. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/render.mjs +8 -7
  103. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/score-review.mjs +3 -3
  104. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/baselines.test.mjs +3 -3
  105. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/browser-agentic.test.mjs +2 -2
  106. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/browser.test.mjs +2 -2
  107. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/compute.test.mjs +1 -1
  108. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/e2e.test.mjs +6 -6
  109. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/estimate-math.test.mjs +3 -3
  110. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/measurements.test.mjs +1 -1
  111. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/pricing.test.mjs +1 -1
  112. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/project-price.test.mjs +1 -1
  113. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/quality-gates.test.mjs +7 -1
  114. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/references.test.mjs +6 -6
  115. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/render.test.mjs +3 -3
  116. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/schema.test.mjs +1 -1
  117. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/score-review.test.mjs +6 -6
  118. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/scoring.test.mjs +1 -1
  119. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/url-state.test.mjs +2 -2
  120. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/validate.test.mjs +1 -1
  121. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/xlsx-export.test.mjs +3 -3
  122. package/plugins/solution-architect/skills/estimate/classic/scripts/test/zip-store.test.mjs +26 -0
  123. package/plugins/solution-architect/skills/estimate/evals/evals.json +37 -2
  124. package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +28 -0
  125. package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.json +79 -0
  126. package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.md +141 -0
  127. package/plugins/solution-architect/skills/estimate/shared/assets/xlsx-export.js +336 -0
  128. package/plugins/solution-architect/skills/estimate/shared/lib/agentic-task-schema.mjs +24 -0
  129. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/context-schema.mjs +2 -2
  130. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/inline.mjs +8 -0
  131. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/scoring-schema.mjs +1 -1
  132. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/scoring.mjs +1 -1
  133. package/plugins/solution-architect/skills/estimate/shared/lib/zip.mjs +60 -0
  134. package/plugins/solution-architect/skills/estimate/workflow-based/FLOW.md +91 -0
  135. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-components.html +994 -0
  136. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-template.html +440 -0
  137. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimator-system.xlsx +0 -0
  138. package/plugins/solution-architect/skills/estimate/workflow-based/assets/score-review.html +838 -0
  139. package/plugins/solution-architect/skills/estimate/workflow-based/references/hidden-work-by-type.md +429 -0
  140. package/plugins/solution-architect/skills/estimate/workflow-based/references/linking.md +59 -0
  141. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-components-template.mjs +80 -0
  142. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-template.mjs +60 -0
  143. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-workflow-template.mjs +51 -0
  144. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-xlsx-template.py +144 -0
  145. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/compute.mjs +32 -0
  146. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-html.mjs +44 -0
  147. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-view.mjs +71 -0
  148. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/pair-findings.mjs +19 -0
  149. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/requirements.mjs +33 -0
  150. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/rollup.mjs +66 -0
  151. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/schema-components.mjs +69 -0
  152. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/schema.mjs +70 -0
  153. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/score-diff.mjs +54 -0
  154. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/score-html.mjs +52 -0
  155. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/xlsx-rows.mjs +51 -0
  156. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/render.mjs +42 -0
  157. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/score-review.mjs +46 -0
  158. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/arch-link.js +9 -0
  159. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/click.js +28 -0
  160. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/prelude.js +4 -0
  161. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/view.js +63 -0
  162. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/browser.test.mjs +127 -0
  163. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/build-pages.test.mjs +43 -0
  164. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/build-template.test.mjs +18 -0
  165. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/cli.test.mjs +48 -0
  166. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/estimator-system.test.mjs +66 -0
  167. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/ARCHITECTURE-mini.md +31 -0
  168. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/feedback.json +19 -0
  169. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/inputs-pass.json +80 -0
  170. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/measurements.jsonl +0 -0
  171. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/requirements.json +79 -0
  172. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/page-view.test.mjs +54 -0
  173. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/pages-browser.test.mjs +209 -0
  174. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/quality-gates.test.mjs +25 -0
  175. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/render.test.mjs +54 -0
  176. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/requirements.test.mjs +33 -0
  177. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/rollup.test.mjs +80 -0
  178. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/schema.test.mjs +61 -0
  179. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/score-review.test.mjs +108 -0
  180. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/stage.mjs +32 -0
  181. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/workflow-script.test.mjs +24 -0
  182. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs +58 -0
  183. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/validate.mjs +19 -0
  184. package/plugins/solution-architect/skills/proposal/README.md +13 -0
  185. package/plugins/solution-architect/skills/proposal/SKILL.md +8 -0
  186. package/plugins/solution-architect/skills/proposal/assets/proposal-workflow.html +143 -0
  187. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +31 -0
  188. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation-inputs.json +468 -0
  189. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation.json +773 -0
  190. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/measurements.jsonl +0 -0
  191. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/requirements.json +79 -0
  192. package/plugins/solution-architect/skills/proposal/references/review.md +11 -0
  193. package/plugins/solution-architect/skills/proposal/references/workflow.md +88 -0
  194. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-body.mjs +42 -0
  195. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-package.mjs +56 -0
  196. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-xml.mjs +44 -0
  197. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-checks.mjs +71 -0
  198. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-cli.mjs +46 -0
  199. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-html.mjs +39 -0
  200. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-lead.mjs +45 -0
  201. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-page.mjs +30 -0
  202. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-view.mjs +80 -0
  203. package/plugins/solution-architect/skills/proposal/scripts/render.mjs +5 -1
  204. package/plugins/solution-architect/skills/proposal/scripts/test/docx.test.mjs +68 -0
  205. package/plugins/solution-architect/skills/proposal/scripts/test/e2e.test.mjs +2 -2
  206. package/plugins/solution-architect/skills/proposal/scripts/test/evals-fixtures.test.mjs +9 -2
  207. package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-inputs-pass.json +17 -0
  208. package/plugins/solution-architect/skills/proposal/scripts/test/render.test.mjs +2 -2
  209. package/plugins/solution-architect/skills/proposal/scripts/test/validate.test.mjs +2 -2
  210. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-browser.test.mjs +96 -0
  211. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-checks.test.mjs +98 -0
  212. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-docs.test.mjs +25 -0
  213. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-render.test.mjs +75 -0
  214. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-stage.mjs +15 -0
  215. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-view.test.mjs +78 -0
  216. package/plugins/solution-architect/skills/proposal/scripts/validate.mjs +4 -1
  217. package/plugins/solution-architect/workflows/review-links.js +61 -0
  218. package/plugins/solution-architect/skills/estimate/assets/estimate-template.html +0 -1677
  219. /package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/estimate-template-agentic.html +0 -0
  220. /package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/scores-review-template.html +0 -0
  221. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/agentic-estimation.md +0 -0
  222. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/ai-multipliers.md +0 -0
  223. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/interview.md +0 -0
  224. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/scoring-guide.md +0 -0
  225. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/slicing.md +0 -0
  226. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/techniques.md +0 -0
  227. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/agentic-checks.mjs +0 -0
  228. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/components.mjs +0 -0
  229. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/md-tables.mjs +0 -0
  230. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/redact.mjs +0 -0
  231. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/scoring-checks.mjs +0 -0
  232. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-estimation-fail.md +0 -0
  233. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-estimation-pass.md +0 -0
  234. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-inputs.json +0 -0
  235. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/booking-inputs.json +0 -0
  236. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/estimation-fail.md +0 -0
  237. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/estimation-pass.md +0 -0
  238. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/measurements.jsonl +0 -0
  239. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/zip.mjs +0 -0
  240. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/validate.mjs +0 -0
  241. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/baselines.mjs +0 -0
  242. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/estimate-math.mjs +0 -0
  243. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/measurements.mjs +0 -0
  244. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/pricing.mjs +0 -0
  245. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/project-price.mjs +0 -0
  246. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/score-diff.mjs +0 -0
@@ -0,0 +1,79 @@
1
+ // Python twin of review.mjs: same bytes, same refusals, same exit codes.
2
+ import { test } from 'node:test';
3
+ import assert from 'node:assert/strict';
4
+ import { spawnSync } from 'node:child_process';
5
+ import { existsSync, mkdtempSync, readFileSync, writeFileSync } from 'node:fs';
6
+ import { tmpdir } from 'node:os';
7
+ import { join } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+ import { noFlows } from './scope-cases.mjs';
10
+ import { DATE, decided, drafted } from './review-fixture.mjs';
11
+
12
+ const SCRIPT = {
13
+ node: fileURLToPath(new URL('../review.mjs', import.meta.url)),
14
+ python3: fileURLToPath(new URL('../review.py', import.meta.url)),
15
+ };
16
+
17
+ // Runs one review command in a fresh dir; `rest` builds the flags after the script.
18
+ function runIn(cmd, pkg, rest) {
19
+ const dir = mkdtempSync(join(tmpdir(), 'ba-review-parity-'));
20
+ const json = join(dir, 'r.json');
21
+ const out = join(dir, 'p.html');
22
+ writeFileSync(json, JSON.stringify(pkg));
23
+ const r = spawnSync(cmd, [SCRIPT[cmd], ...rest(json, out)], { encoding: 'utf8' });
24
+ return { code: r.status, out: r.stdout.replace(out, 'OUT'), err: r.stderr, html: existsSync(out) ? readFileSync(out, 'utf8') : null };
25
+ }
26
+
27
+ const page = (json, out) => ['page', '--json', json, '--out', out, '--date', DATE];
28
+ const both = (pkg, rest = page) => ['node', 'python3'].map((cmd) => runIn(cmd, pkg, rest));
29
+
30
+ const unicode = () => {
31
+ const pkg = decided();
32
+ pkg.features[0].name = 'Café order — <stage> & "pack"';
33
+ return pkg;
34
+ };
35
+ const classic = () => {
36
+ const pkg = decided();
37
+ for (const k of ['systems', 'features', 'scopeMode', 'mapLabel']) delete pkg[k];
38
+ return pkg;
39
+ };
40
+ const leak = () => {
41
+ const pkg = decided();
42
+ pkg.features[3].source = 'PO in interview, see FR-004';
43
+ return pkg;
44
+ };
45
+
46
+ const pipeline = (pkg) => pkg.workflows.find((w) => w.name === 'Order pipeline');
47
+ const branchy = () => {
48
+ const pkg = decided();
49
+ pipeline(pkg).branches.unshift({ from: 'Extra box', to: 'Courier' });
50
+ pipeline(pkg).branches.push({ from: 'Pack', to: 'Extra box', label: 'needs a box' },
51
+ { from: 'Loop B', to: 'Loop A' }, { from: 'Loop A', to: 'Loop B' });
52
+ return pkg;
53
+ };
54
+
55
+ export const PAGE_CASES = [
56
+ ['siblings, a child before its parent, a cycle', branchy, 0],
57
+ ['a decided package', decided, 0],
58
+ ['markup and non-ascii text', unicode, 0],
59
+ ['undecided drafts', drafted, 1],
60
+ ['an id in a ★ New source', leak, 1],
61
+ ['a system with no workflow', () => noFlows().pkg, 0],
62
+ ['classic mode', classic, 0],
63
+ ];
64
+
65
+ for (const [name, make, code] of PAGE_CASES) {
66
+ test(`review.py page matches review.mjs: ${name}`, () => {
67
+ const [n, p] = both(make());
68
+ assert.deepEqual(p, n);
69
+ assert.equal(n.code, code);
70
+ });
71
+ }
72
+
73
+ test('review.py refuses apply and a bare flag like review.mjs', () => {
74
+ for (const rest of [(json) => ['apply', '--json', json], (json) => ['page', '--json', json, '--out']]) {
75
+ const [n, p] = both(decided(), rest);
76
+ assert.deepEqual(p, n);
77
+ assert.equal(n.code, 1);
78
+ }
79
+ });
@@ -0,0 +1,58 @@
1
+ // One broken variant of the workflow pass fixture per scope rule (spec §5).
2
+ // Shared by scope-checks.test.mjs and python-parity.test.mjs.
3
+ import { readFileSync } from 'node:fs';
4
+
5
+ const fx = (f) => readFileSync(new URL(`./fixtures/${f}`, import.meta.url), 'utf8');
6
+ export const loadWorkflow = () => ({
7
+ pkg: JSON.parse(fx('requirements-workflow-pass.json')),
8
+ md: fx('requirements-workflow-pass.md'),
9
+ });
10
+
11
+ const toClassic = (pkg) => {
12
+ for (const k of ['systems', 'features', 'scopeMode', 'mapLabel']) delete pkg[k];
13
+ };
14
+ const pkgCase = (name, finding, edit) => ({ name, finding, edit: (c) => { edit(c.pkg); return c; } });
15
+ const mdCase = (name, finding, edit) => ({ name, finding, edit: (c) => ({ ...c, md: edit(c.md) }) });
16
+
17
+ export const CASES = [
18
+ pkgCase('illegal scopeMode', 'scopeMode must be workflow|classic', (p) => { p.scopeMode = 'list'; }),
19
+ pkgCase('workflow without systems', 'scopeMode workflow needs systems and features', (p) => { delete p.systems; }),
20
+ pkgCase('classic with systems', 'systems/features only in workflow mode', (p) => { p.scopeMode = 'classic'; }),
21
+ pkgCase('bad feature id', 'features: bad id F-1', (p) => { p.features[0].id = 'F-1'; }),
22
+ pkgCase('system lists an as-is workflow', 'SYS-001: workflow WF-001 is not a to-be workflow', (p) => { p.systems[0].workflows.push('WF-001'); }),
23
+ pkgCase('workflow in two systems', 'WF-002: belongs to SYS-001 and SYS-002', (p) => { p.systems[1].workflows.push('WF-002'); }),
24
+ pkgCase('feature in no system', 'FEAT-002: listed by no system', (p) => { p.systems[0].features.pop(); }),
25
+ pkgCase('unknown feature step', 'FEAT-002: unknown step WF-002:Short-pack', (p) => { p.features[1].steps = ['WF-002:Short-pack']; }),
26
+ pkgCase('branch from unknown step', 'WF-002: branch from unknown step Packing', (p) => { p.workflows[1].branches[0].from = 'Packing'; }),
27
+ pkgCase('sub starts nowhere', 'WF-004: sub.startsAt unknown', (p) => { p.workflows[3].sub.startsAt = 'WF-003:Intake'; }),
28
+ pkgCase('sub rejoins as-is', 'WF-004: sub.rejoins is not a to-be workflow', (p) => { p.workflows[3].sub.rejoins = 'WF-001'; }),
29
+ pkgCase('replaces unknown', 'WF-002: replaces unknown as-is workflow WF-009', (p) => { p.workflows[1].replaces = ['WF-009']; }),
30
+ pkgCase('in-scope FR in no feature', 'FR-003: in scope but in no feature', (p) => { p.features[2].requirements = []; }),
31
+ pkgCase('feature cites missing FR', 'FEAT-003: dangling reference FR-099', (p) => { p.features[2].requirements = ['FR-003', 'FR-099']; }),
32
+ pkgCase('duplicate feature name', 'duplicate feature name: Order intake & quotation', (p) => { p.features[1].name = 'order intake & quotation'; }),
33
+ pkgCase('tech word in name', 'FEAT-001: name uses a tech word (API)', (p) => { p.features[0].name = 'Order APIs'; }),
34
+ pkgCase('system without source', 'SYS-001: missing source', (p) => { delete p.systems[0].source; }),
35
+ pkgCase('illegal feature label', 'FEAT-001: illegal label "maybe"', (p) => { p.features[0].label = 'maybe'; }),
36
+ pkgCase('recommended without question', 'FEAT-004: recommended without a paired open question', (p) => { p.features[3].label = 'recommended'; p.openQuestions[0].affects = ['INT-001']; }),
37
+ mdCase('frontmatter mode missing', 'md: scopeMode does not match json', (md) => md.replace('scopeMode: workflow\n', '')),
38
+ mdCase('hand-edited scope', 'md: To-be scope is stale — run scope', (md) => md.replace('n3["Paid"]', 'n3["Settled"]')),
39
+ { name: 'classic with scope section', finding: 'md: To-be scope only in workflow mode', edit: (c) => { toClassic(c.pkg); return c; } },
40
+ mdCase('wrong Feature cell', 'md: FR-002 Feature column says Pack alert, json says Short-pack alert', (md) => md.replace('| in | Short-pack alert |', '| in | Pack alert |')),
41
+ pkgCase('feature without does', 'FEAT-001: missing does', (p) => { delete p.features[0].does; }),
42
+ pkgCase('feature without name', 'FEAT-002: missing name', (p) => { delete p.features[1].name; }),
43
+ pkgCase('system without purpose', 'SYS-001: missing purpose', (p) => { delete p.systems[0].purpose; }),
44
+ mdCase('unbalanced scope markers', 'md: scope markers unbalanced', (md) => md.replace('<!-- scope:end -->', '')),
45
+ mdCase('no Feature column', 'md: FR table has no Feature column', (md) => md.replace('| Label | Scope | Feature |', '| Label | Scope |')),
46
+ ];
47
+
48
+ // SYS-002 as an input that lists features but draws no workflow: the
49
+ // system owns none and its features sit on no step.
50
+ export function noFlows() {
51
+ const { pkg, md } = loadWorkflow();
52
+ const gone = new Set(['WF-003', 'WF-004']);
53
+ pkg.workflows = pkg.workflows.filter((w) => !gone.has(w.id));
54
+ pkg.systems[1].workflows = [];
55
+ for (const f of pkg.features.slice(2, 4)) f.steps = [];
56
+ for (const fr of pkg.requirements) if (gone.has(fr.traces?.workflow)) delete fr.traces.workflow;
57
+ return { pkg, md };
58
+ }
@@ -0,0 +1,31 @@
1
+ import { test } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { checkPackage } from '../lib/checks.mjs';
4
+ import { CASES, loadWorkflow, noFlows } from './scope-cases.mjs';
5
+
6
+ test('the workflow pass pair has no findings', () => {
7
+ const { pkg, md } = loadWorkflow();
8
+ assert.deepEqual(checkPackage({ pkg, md }), []);
9
+ });
10
+
11
+ test('a classic package without scope fields is untouched', () => {
12
+ const { pkg, md } = loadWorkflow();
13
+ for (const k of ['systems', 'features', 'scopeMode', 'mapLabel']) delete pkg[k];
14
+ const plain = md.replace(/<!-- scope:start -->[\s\S]*?<!-- scope:end -->\n*/, '').replace('scopeMode: workflow\n', '');
15
+ const findings = checkPackage({ pkg, md: plain });
16
+ assert.ok(findings.some((f) => f.includes('WF-002') && f.includes('absent')), 'classic still requires to-be workflow ids in md');
17
+ assert.ok(!findings.some((f) => f.includes('scope')));
18
+ });
19
+
20
+ for (const c of CASES) {
21
+ test(`scope rule: ${c.name}`, () => {
22
+ const { pkg, md } = c.edit(loadWorkflow());
23
+ const findings = checkPackage({ pkg, md });
24
+ assert.ok(findings.includes(c.finding), `expected "${c.finding}" in:\n${findings.join('\n')}`);
25
+ });
26
+ }
27
+
28
+ test('a system with no workflow and features on no step are valid', () => {
29
+ const { pkg } = noFlows();
30
+ assert.deepEqual(checkPackage({ pkg, md: null }), []);
31
+ });
@@ -0,0 +1,140 @@
1
+ import { test } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { execFileSync } from 'node:child_process';
4
+ import { mkdtempSync, readFileSync, writeFileSync } from 'node:fs';
5
+ import { tmpdir } from 'node:os';
6
+ import { join } from 'node:path';
7
+ import { fileURLToPath } from 'node:url';
8
+ import { applyScope } from '../lib/scope-md.mjs';
9
+ import { mermaid } from '../lib/scope-render.mjs';
10
+ import { checkPackage } from '../lib/checks.mjs';
11
+ import { loadWorkflow, noFlows } from './scope-cases.mjs';
12
+
13
+ const script = fileURLToPath(new URL('../scope.mjs', import.meta.url));
14
+ const BLOCK = /<!-- scope:start -->[\s\S]*?<!-- scope:end -->\n*/;
15
+ const strip = (md) => md.replace(BLOCK, '');
16
+ const OLD_HERE = '> **Product owner? Start here:** [To-be scope](#to-be-scope) shows the systems, '
17
+ + 'workflows and features we propose to build. Items marked ⚠ are our draft; tell us in chat what to change.';
18
+
19
+ test('applyScope rebuilds the fixture from a file without the section', () => {
20
+ const { pkg, md } = loadWorkflow();
21
+ assert.equal(applyScope(strip(md), pkg), md);
22
+ });
23
+
24
+ test('applyScope is idempotent', () => {
25
+ const { pkg, md } = loadWorkflow();
26
+ assert.equal(applyScope(md, pkg), md);
27
+ });
28
+
29
+ test('classic mode removes the section', () => {
30
+ const { pkg, md } = loadWorkflow();
31
+ pkg.scopeMode = 'classic';
32
+ const out = applyScope(md, pkg);
33
+ assert.equal(out, strip(md));
34
+ });
35
+
36
+ test('an old Start-here line is removed on re-run', () => {
37
+ const { pkg, md } = loadWorkflow();
38
+ const old = md.replace(/^(# .*)$/m, `$1\n\n${OLD_HERE}`);
39
+ assert.equal(applyScope(old, pkg), md);
40
+ });
41
+
42
+ test('the section carries ids for engineers', () => {
43
+ const section = loadWorkflow().md.match(BLOCK)[0];
44
+ assert.match(section, /^### SYS-002 Orders & invoicing$/m);
45
+ assert.match(section, /^\*\*Main workflow: WF-003 Order to cash\*\*$/m);
46
+ assert.match(section, /^\| SYS-001 \| Warehouse operations \|/m);
47
+ });
48
+
49
+ test('no draft marks anywhere; features list their requirements', () => {
50
+ const { md } = loadWorkflow();
51
+ assert.doesNotMatch(md, /⚠|please confirm|Start here/);
52
+ assert.match(md, /\| FEAT-004 \| Invoice from packed quantities \| .* \| Shipped \(in Order pipeline\); Invoice → Paid \| FR-004 \|/);
53
+ });
54
+
55
+ test('mermaid: loops back to an existing step and side exits to a new one', () => {
56
+ const out = mermaid({ steps: ['A', 'B'], branches: [{ from: 'B', to: 'A', label: 'retry' }, { from: 'A', to: 'C' }] });
57
+ assert.equal(out, '```mermaid\nflowchart LR\n n0 --> n1\n n1 -.->|retry| n0\n n0 -.-> n2\n n0["A"]\n n1["B"]\n n2["C"]\n```');
58
+ });
59
+
60
+ test('scope.mjs refuses a broken scope and leaves the md alone', () => {
61
+ const dir = mkdtempSync(join(tmpdir(), 'ba-scope-'));
62
+ const { pkg, md } = loadWorkflow();
63
+ pkg.features[1].steps = ['WF-002:Nowhere'];
64
+ writeFileSync(join(dir, 'r.json'), JSON.stringify(pkg));
65
+ writeFileSync(join(dir, 'r.md'), 'untouched');
66
+ assert.throws(() => execFileSync('node', [script, '--json', join(dir, 'r.json'), '--md', join(dir, 'r.md')], { stdio: 'pipe' }));
67
+ assert.equal(readFileSync(join(dir, 'r.md'), 'utf8'), 'untouched');
68
+ assert.ok(md.length > 0);
69
+ });
70
+
71
+ test('a pipe inside feature text is escaped so the table holds', () => {
72
+ const { pkg, md } = loadWorkflow();
73
+ pkg.features[0].does = 'Moves an order | shows each stage';
74
+ const out = applyScope(md, pkg);
75
+ assert.match(out, /\| FEAT-001 \| Order pipeline & stage engine \| Moves an order \\\| shows each stage \|/);
76
+ });
77
+
78
+ test('a step name with a colon resolves and renders', () => {
79
+ const { pkg, md } = loadWorkflow();
80
+ pkg.workflows[1].steps[1] = 'Pack: scan vs order';
81
+ pkg.workflows[1].branches = [{ from: 'Pack: scan vs order', to: 'Short-pack alert' }];
82
+ pkg.features[0].steps[1] = 'WF-002:Pack: scan vs order';
83
+ assert.deepEqual(checkPackage({ pkg, md: applyScope(md, pkg) }), []);
84
+ assert.match(applyScope(md, pkg), /Order In → Pack: scan vs order → Pack Review/);
85
+ });
86
+
87
+ test('markers moved by hand stay where they are on re-run', () => {
88
+ const { pkg, md } = loadWorkflow();
89
+ const section = md.match(BLOCK)[0];
90
+ const moved = md.replace(section, '').replace('## Part 2 — Process & Domain\n\n', `## Part 2 — Process & Domain\n\n${section}`);
91
+ assert.equal(applyScope(moved, pkg), moved);
92
+ });
93
+
94
+ test('a QUICK file (no Part 2) gets the section before Part 3', () => {
95
+ const { pkg, md } = loadWorkflow();
96
+ const quick = strip(md).replace(/## Part 2[\s\S]*?(?=## Part 3)/, '');
97
+ const out = applyScope(quick, pkg);
98
+ assert.ok(out.indexOf('<!-- scope:end -->') < out.indexOf('## Part 3'));
99
+ assert.ok(out.indexOf('## Part 1') < out.indexOf('<!-- scope:start -->'));
100
+ });
101
+
102
+ test('optional fields absent: no map column, no Replaces line', () => {
103
+ const { pkg, md } = loadWorkflow();
104
+ delete pkg.mapLabel;
105
+ for (const w of pkg.workflows) delete w.replaces;
106
+ const section = applyScope(md, pkg).match(BLOCK)[0];
107
+ assert.match(section, /\| ID \| System \| Purpose \|\n\| --- \| --- \| --- \|\n/);
108
+ assert.doesNotMatch(section, /Replaces today's/);
109
+ });
110
+
111
+ test('scope.mjs refuses unbalanced markers and leaves the md alone', () => {
112
+ const dir = mkdtempSync(join(tmpdir(), 'ba-scope-'));
113
+ const { pkg, md } = loadWorkflow();
114
+ const broken = md.replace('<!-- scope:end -->', '');
115
+ writeFileSync(join(dir, 'r.json'), JSON.stringify(pkg));
116
+ writeFileSync(join(dir, 'r.md'), broken);
117
+ assert.throws(() => execFileSync('node', [script, '--json', join(dir, 'r.json'), '--md', join(dir, 'r.md')], { stdio: 'pipe' }));
118
+ assert.equal(readFileSync(join(dir, 'r.md'), 'utf8'), broken);
119
+ });
120
+
121
+ test('a pipe inside a feature name passes the Feature column check', () => {
122
+ const { pkg, md } = loadWorkflow();
123
+ pkg.features[0].name = 'Pack | ship';
124
+ const out = applyScope(md, pkg).replace('| in | Order pipeline & stage engine |', '| in | Pack \\| ship |');
125
+ assert.deepEqual(checkPackage({ pkg, md: out }), []);
126
+ });
127
+
128
+ test('a system with no workflow shows its feature table only; no step reads —', () => {
129
+ const { pkg, md } = noFlows();
130
+ const out = applyScope(md, pkg);
131
+ assert.ok(out.includes('### SYS-002 Orders & invoicing\n\nQuotation through to a paid invoice.\n\n| ID | Feature |'));
132
+ assert.ok(out.includes('| FEAT-003 | Order intake & quotation | Captures email and phone orders and prices them | — | FR-003 |'));
133
+ });
134
+
135
+ test('a system with no workflows key renders like an empty list', () => {
136
+ const { pkg, md } = noFlows();
137
+ const want = applyScope(md, pkg);
138
+ delete pkg.systems[1].workflows;
139
+ assert.equal(applyScope(md, pkg), want);
140
+ });
@@ -10,7 +10,7 @@ function parseArgs(argv) {
10
10
  }
11
11
 
12
12
  const args = parseArgs(process.argv.slice(2));
13
- const md = readFileSync(args.md, 'utf8');
13
+ const md = args.md ? readFileSync(args.md, 'utf8') : null;
14
14
  const pkg = JSON.parse(readFileSync(args.json, 'utf8'));
15
15
  const findings = checkPackage({ pkg, md });
16
16
  if (findings.length) {
@@ -7,6 +7,9 @@ import math
7
7
  import re
8
8
  import sys
9
9
 
10
+ from scope_checks import check_scope, scope_ids
11
+ from scope_render import check_scope_md
12
+
10
13
  STATUSES = ['DRAFT', 'CLARIFICATION_REQUIRED', 'ANALYZED', 'VALIDATED', 'READY_FOR_ARCHITECTURE']
11
14
  DEPTHS = ['QUICK', 'STANDARD', 'DEEP']
12
15
  MODES = ['greenfield', 'existing']
@@ -59,7 +62,7 @@ AMBIGUOUS = [
59
62
 
60
63
  PARTS = ['Part 1', 'Part 2', 'Part 3', 'Part 4', 'Part 5']
61
64
  QUICK_PARTS = ['Part 1', 'Part 3', 'Part 5']
62
- ID_TOKEN = re.compile(r'\b(?:G|ACT|WF|FR|BR|SC|NFR|INT|DAT|CON|ASM|Q|CONFLICT)-\d{3}\b')
65
+ ID_TOKEN = re.compile(r'\b(?:G|ACT|WF|FR|BR|SC|NFR|INT|DAT|CON|ASM|Q|CONFLICT|SYS|FEAT)-\d{3}\b')
63
66
 
64
67
 
65
68
  def rows(pkg, name):
@@ -228,7 +231,7 @@ def check_md(pkg, md):
228
231
  elif not bodies[key].strip():
229
232
  findings.append(f'md: empty section "## {part}"')
230
233
  md_ids = {m.group(0) for m in ID_TOKEN.finditer(md)}
231
- for rid in collect_ids(pkg):
234
+ for rid in collect_ids(pkg) + scope_ids(pkg):
232
235
  if rid not in md_ids:
233
236
  findings.append(f'md: id {rid} absent from requirements.md')
234
237
  fm_status = frontmatter(md, 'status')
@@ -253,16 +256,20 @@ def check_package(pkg, md):
253
256
  schema_findings = check_schema(pkg)
254
257
  if schema_findings:
255
258
  return schema_findings
256
- ids = set(collect_ids(pkg))
257
- return [
259
+ ids = set(collect_ids(pkg)) | set(scope_ids(pkg))
260
+ scope = check_scope(pkg, ids)
261
+ json_findings = [
258
262
  *check_duplicates(pkg),
259
263
  *check_refs(pkg, ids),
260
264
  *check_labels(pkg),
261
265
  *check_ambiguity(pkg),
262
266
  *check_readiness(pkg),
263
- *check_md(pkg, md),
264
- *check_md_orphan_ids(None, md, ids),
267
+ *scope,
265
268
  ]
269
+ if md is None:
270
+ return json_findings
271
+ return [*json_findings, *check_md(pkg, md), *check_md_orphan_ids(None, md, ids),
272
+ *([] if scope else check_scope_md(pkg, md))]
266
273
 
267
274
 
268
275
  def main(argv):
@@ -273,8 +280,10 @@ def main(argv):
273
280
  args[argv[i][2:]] = argv[i + 1]
274
281
  i += 1
275
282
  i += 1
276
- with open(args['md'], encoding='utf-8') as f:
277
- md = f.read()
283
+ md = None
284
+ if args.get('md'):
285
+ with open(args['md'], encoding='utf-8') as f:
286
+ md = f.read()
278
287
  with open(args['json'], encoding='utf-8') as f:
279
288
  pkg = json.load(f)
280
289
  findings = check_package(pkg, md)
@@ -0,0 +1,6 @@
1
+ # Run with --scaffold --allow-tools Write: Write is a gated tool, and the
2
+ # agent must write proposal-inputs.json for inputs-written to pass.
3
+ schema_version: "1.1"
4
+ name: proposal-workflow
5
+ context:
6
+ scaffold_script: fixture.sh
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ # Seeds the empty workspace as the sin-kowa-mini lead folder with a finished
3
+ # workflow-mode estimate: BA package, architecture, estimate inputs and output.
4
+ set -euo pipefail
5
+ src="$(cd "$(dirname "$0")/../../skills/proposal/evals/fixtures/workflow-sin-kowa-mini" && pwd)"
6
+ cp "$src/requirements.json" "$src/ARCHITECTURE.md" "$src/estimation-inputs.json" "$src/estimation.json" "$src/measurements.jsonl" .
@@ -0,0 +1,23 @@
1
+ ---
2
+ type: llm
3
+ focus:
4
+ source: file
5
+ path: proposal-inputs.json
6
+ ---
7
+
8
+ Workflow mode: the agent writes only the sentences, in proposal-inputs.json
9
+ beside estimation.json. You are shown that file. The estimate's milestones
10
+ are "M1 - Walking skeleton", "M2 - Money" and "M3 - Operations".
11
+
12
+ PASS if the file has client "Sin Kowa", title "Sin Kowa Digital
13
+ Transformation", firm "Code Engine Studio", an ISO date, techLevel
14
+ "non-tech", a non-empty scopeIntro, and a "milestones" entry for each of
15
+ the three milestone names with a "name" and a "demonstrates" sentence; and
16
+ no sentence in it carries a price, a currency amount or an internal ID such
17
+ as FEAT-001 or SYS-002.
18
+ The keys of "systems" ARE system IDs (e.g. "SYS-001") and the keys of
19
+ "milestones" are the estimate's milestone names: both are required by the
20
+ format and are not sentences. Check only the string values for prices and
21
+ IDs.
22
+ FAIL if the file is missing or empty, or if any required key or milestone
23
+ entry is missing.
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: file_exists
3
+ path: "proposal.md"
4
+ exists: false
5
+ ---
6
+
7
+ Workflow mode never writes proposal.md (spec 4 P2).
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: tool_used
3
+ tool: Skill
4
+ min: 1
5
+ ---
6
+
7
+ The skill must actually be invoked, not merely described.
@@ -0,0 +1,16 @@
1
+ ---
2
+ type: llm
3
+ focus: last_message
4
+ ---
5
+
6
+ This sandbox has no Bash, so the scripts cannot run here. You are shown the
7
+ agent's final message.
8
+
9
+ PASS if the message names both `validate.mjs --estimation … --inputs …` and
10
+ `render.mjs --estimation … --inputs … --mermaid-bundle … --out …/dist`, with
11
+ validate before render, as the next step; or says it cannot run them here
12
+ and stopped. Naming them with placeholder paths (`<dir>/estimation.json`)
13
+ counts. Raising other concerns, or ending with a question to the user, does
14
+ not make it fail.
15
+ FAIL if it claims proposal.html was rendered or served, or names neither
16
+ command.
@@ -0,0 +1,10 @@
1
+ ---
2
+ max_turns: 40
3
+ allowed_tools: [Read, Glob, Grep, Write, Skill, AskUserQuestion, TodoWrite]
4
+ ---
5
+
6
+ Use the proposal skill. The estimate for sin-kowa-mini is done
7
+ (estimation.json in this folder). The client is Sin Kowa, they are not
8
+ technical, and we are Code Engine Studio — no need to save a firm profile.
9
+ Title it "Sin Kowa Digital Transformation". Propose the milestone names and
10
+ what each one demonstrates yourself; I'll correct them on the page.
@@ -0,0 +1,4 @@
1
+ schema_version: "1.1"
2
+ name: workflow-gate-no-architecture
3
+ context:
4
+ scaffold_script: fixture.sh
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ # Seeds the empty workspace as the sin-kowa-mini lead folder without
3
+ # ARCHITECTURE.md, so workflow mode must stop at its first gate.
4
+ set -euo pipefail
5
+ src="$(cd "$(dirname "$0")/../../skills/estimate/evals/fixtures/workflow-sin-kowa-mini" && pwd)"
6
+ cp "$src/requirements.json" "$src/requirements.md" .
@@ -0,0 +1,10 @@
1
+ ---
2
+ type: regex
3
+ pattern: '\b(QUICK|DEEP)\b|technique'
4
+ flags: i
5
+ match: not_contains
6
+ target: last_message
7
+ ---
8
+
9
+ No depth question (QUICK/STANDARD/DEEP) and no technique menu: those belong
10
+ to the classic flow.
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: file_exists
3
+ path: "*.{json,html,md}"
4
+ exists: false
5
+ ---
6
+
7
+ The gate stops before any file is written.
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: tool_used
3
+ tool: Skill
4
+ min: 1
5
+ ---
6
+
7
+ The skill must actually be invoked, not merely described.
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: llm
3
+ ---
4
+
5
+ The lead folder has requirements.json with scopeMode "workflow" but no
6
+ ARCHITECTURE.md.
7
+
8
+ PASS if the final reply says workflow mode needs the architecture document
9
+ and to run (or create) it first, and stops there.
10
+ FAIL if it starts estimating anyway, asks estimation questions, or falls back
11
+ to the classic interview.
@@ -0,0 +1,7 @@
1
+ ---
2
+ max_turns: 15
3
+ allowed_tools: [Read, Glob, Grep, Skill, AskUserQuestion, TodoWrite]
4
+ ---
5
+
6
+ Use the estimate skill. requirements.json and requirements.md for
7
+ sin-kowa-mini are ready in this folder, scope is PO-approved. Estimate it.
@@ -0,0 +1,4 @@
1
+ schema_version: "1.1"
2
+ name: workflow-happy-path
3
+ context:
4
+ scaffold_script: fixture.sh
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ # Seeds the empty workspace as the sin-kowa-mini lead folder: the BA package
3
+ # plus the architecture document.
4
+ set -euo pipefail
5
+ src="$(cd "$(dirname "$0")/../../skills/estimate/evals/fixtures/workflow-sin-kowa-mini" && pwd)"
6
+ cp "$src/requirements.json" "$src/requirements.md" "$src/ARCHITECTURE.md" .
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: file_exists
3
+ path: "estimation.md"
4
+ exists: false
5
+ ---
6
+
7
+ Workflow mode never writes estimation.md (spec 3 E1).
@@ -0,0 +1,16 @@
1
+ ---
2
+ type: llm
3
+ focus: trace
4
+ ---
5
+
6
+ Workflow mode renders two internal pages into the lead's dist/ folder:
7
+ estimate.html and estimate-components.html.
8
+
9
+ PASS if either (a) the agent ran workflow-based/scripts/render.mjs, both
10
+ files exist in dist/, and the closing question names both page URLs, or
11
+ (b) the agent stopped at a gate (architecture not reviewed, or the
12
+ dynamic-workflows /config message) before compute.mjs ran, and wrote neither
13
+ estimate.html nor estimate-components.html. A stop at a gate with no page
14
+ written is a PASS even if no render was attempted.
15
+ FAIL if it wrote a classic estimate.html, rendered without validating, or
16
+ closed without naming the pages after rendering them.
@@ -0,0 +1,12 @@
1
+ ---
2
+ type: llm
3
+ focus: trace
4
+ ---
5
+
6
+ The lead has requirements.json with scopeMode "workflow" and an
7
+ ARCHITECTURE.md the user says they reviewed.
8
+
9
+ PASS if the agent followed the workflow-based flow (it read
10
+ workflow-based/FLOW.md or names workflow mode) and never offered the classic
11
+ depth question (QUICK/STANDARD/DEEP) or the delivery-mode opt-out.
12
+ FAIL if it ran the classic interview or asked to pick a depth or delivery mode.
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: tool_used
3
+ tool: Skill
4
+ min: 1
5
+ ---
6
+
7
+ The skill must actually be invoked, not merely described.
@@ -0,0 +1,14 @@
1
+ ---
2
+ type: llm
3
+ focus: trace
4
+ ---
5
+
6
+ Workflow mode asks at most three things: whether a human reviewed
7
+ ARCHITECTURE.md (the user already said yes, so re-asking is allowed but not
8
+ required), the score-review hand-off, and a closing "anything to change?".
9
+
10
+ PASS if every question the agent asked the user is one of those three.
11
+ Asking no question at all is a PASS: a run that stops at a gate asks nothing.
12
+ FAIL if it asked about depth, delivery mode, agent or model, milestones,
13
+ scope confirmation, review channel, stack familiarity, deadline or budget.
14
+ Stating a fixed choice ("agentic + STANDARD") is not a question.
@@ -0,0 +1,15 @@
1
+ ---
2
+ type: llm
3
+ focus: trace
4
+ ---
5
+
6
+ Workflow mode needs the Workflow tool for its link review. This sandbox
7
+ may not provide it.
8
+
9
+ PASS if either (a) the agent invoked the review-links workflow
10
+ (/solution-architect:review-links) before scoring, or (b) its reply says
11
+ "Workflow mode needs dynamic workflows for the link review. Turn them on in
12
+ /config (Dynamic workflows), then run /estimate again." (wording may differ
13
+ only trivially) and it did not go on to estimate.
14
+ FAIL if it skipped the review silently, replaced it with its own subagent
15
+ review, or estimated without the workflow and without the stop message.
@@ -0,0 +1,9 @@
1
+ ---
2
+ max_turns: 40
3
+ allowed_tools: [Read, Glob, Grep, Skill, AskUserQuestion, TodoWrite]
4
+ ---
5
+
6
+ Use the estimate skill. The BA package for sin-kowa-mini is done and the PO
7
+ signed off the scope (requirements.json, requirements.md in this folder).
8
+ The architecture document is in ARCHITECTURE.md — I reviewed it myself this
9
+ morning. Give me the estimate.