@v11g/agents-rock 1.0.8 → 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 (314) hide show
  1. package/README.md +2 -1
  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/reasoning/.claude-plugin/plugin.json +1 -1
  65. package/plugins/reasoning/evals/format-handoff-folder/graders/folder-named.md +8 -0
  66. package/plugins/reasoning/evals/format-handoff-folder/graders/skill-fired.md +7 -0
  67. package/plugins/reasoning/evals/format-handoff-folder/prompt.md +9 -0
  68. package/plugins/reasoning/evals/format-ids-and-supports/graders/ids-in-chat.md +8 -0
  69. package/plugins/reasoning/evals/format-ids-and-supports/graders/skill-fired.md +7 -0
  70. package/plugins/reasoning/evals/format-ids-and-supports/graders/supports-resolve.md +11 -0
  71. package/plugins/reasoning/evals/format-ids-and-supports/prompt.md +8 -0
  72. package/plugins/reasoning/evals/format-root-candidate-status/graders/candidate-status.md +11 -0
  73. package/plugins/reasoning/evals/format-root-candidate-status/graders/skill-fired.md +7 -0
  74. package/plugins/reasoning/evals/format-root-candidate-status/prompt.md +8 -0
  75. package/plugins/reasoning/evals/format-unsaved-continues/graders/analysis-completes.md +9 -0
  76. package/plugins/reasoning/evals/format-unsaved-continues/graders/not-saved-stated.md +9 -0
  77. package/plugins/reasoning/evals/format-unsaved-continues/graders/skill-fired.md +7 -0
  78. package/plugins/reasoning/evals/format-unsaved-continues/prompt.md +8 -0
  79. package/plugins/reasoning/skills/problem-router/README.md +6 -0
  80. package/plugins/reasoning/skills/problem-router/SKILL.md +4 -0
  81. package/plugins/reasoning/skills/problem-router/references/contract.md +114 -19
  82. package/plugins/reasoning/skills/problem-solving/README.md +6 -0
  83. package/plugins/reasoning/skills/problem-solving/SKILL.md +2 -0
  84. package/plugins/reasoning/skills/problem-solving/references/contract.md +114 -19
  85. package/plugins/reasoning/skills/problem-solving/references/interview.md +2 -0
  86. package/plugins/reasoning/skills/systemic-design/README.md +3 -0
  87. package/plugins/reasoning/skills/systemic-design/SKILL.md +2 -0
  88. package/plugins/reasoning/skills/systemic-design/references/contract.md +114 -19
  89. package/plugins/reasoning/skills/systemic-design/references/interview.md +2 -0
  90. package/plugins/reasoning/skills/systems-thinking/README.md +3 -0
  91. package/plugins/reasoning/skills/systems-thinking/SKILL.md +2 -0
  92. package/plugins/reasoning/skills/systems-thinking/frameworks/leverage-points.md +15 -6
  93. package/plugins/reasoning/skills/systems-thinking/references/contract.md +114 -19
  94. package/plugins/reasoning/skills/systems-thinking/references/interview.md +2 -0
  95. package/plugins/solution-architect/.claude-plugin/plugin.json +1 -1
  96. package/plugins/solution-architect/evals/proposal-workflow/case.yaml +6 -0
  97. package/plugins/solution-architect/evals/proposal-workflow/fixture.sh +6 -0
  98. package/plugins/solution-architect/evals/proposal-workflow/graders/inputs-written.md +23 -0
  99. package/plugins/solution-architect/evals/proposal-workflow/graders/no-proposal-md.md +7 -0
  100. package/plugins/solution-architect/evals/proposal-workflow/graders/skill-fired.md +7 -0
  101. package/plugins/solution-architect/evals/proposal-workflow/graders/validate-then-render.md +16 -0
  102. package/plugins/solution-architect/evals/proposal-workflow/prompt.md +10 -0
  103. package/plugins/solution-architect/evals/workflow-gate-no-architecture/case.yaml +4 -0
  104. package/plugins/solution-architect/evals/workflow-gate-no-architecture/fixture.sh +6 -0
  105. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/no-classic-fallback.md +10 -0
  106. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/nothing-written.md +7 -0
  107. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/skill-fired.md +7 -0
  108. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/stops-at-gate.md +11 -0
  109. package/plugins/solution-architect/evals/workflow-gate-no-architecture/prompt.md +7 -0
  110. package/plugins/solution-architect/evals/workflow-happy-path/case.yaml +4 -0
  111. package/plugins/solution-architect/evals/workflow-happy-path/fixture.sh +6 -0
  112. package/plugins/solution-architect/evals/workflow-happy-path/graders/no-estimation-md.md +7 -0
  113. package/plugins/solution-architect/evals/workflow-happy-path/graders/pages-or-stop.md +16 -0
  114. package/plugins/solution-architect/evals/workflow-happy-path/graders/routed-to-workflow.md +12 -0
  115. package/plugins/solution-architect/evals/workflow-happy-path/graders/skill-fired.md +7 -0
  116. package/plugins/solution-architect/evals/workflow-happy-path/graders/three-questions-max.md +14 -0
  117. package/plugins/solution-architect/evals/workflow-happy-path/graders/workflow-or-exact-stop.md +15 -0
  118. package/plugins/solution-architect/evals/workflow-happy-path/prompt.md +9 -0
  119. package/plugins/solution-architect/skills/analyze-requirements/assets/viewer-template.html +11 -1
  120. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/cdp.mjs +4 -1
  121. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/quality-gate.mjs +16 -1
  122. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/browser.test.mjs +27 -0
  123. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/quality-gate.test.mjs +9 -0
  124. package/plugins/solution-architect/skills/estimate/README.md +38 -18
  125. package/plugins/solution-architect/skills/estimate/SKILL.md +16 -69
  126. package/plugins/solution-architect/skills/estimate/classic/FLOW.md +77 -0
  127. package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/estimate-template-agentic.html +111 -138
  128. package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/estimate-template.html +219 -445
  129. package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/scores-review-template.html +5 -4
  130. package/plugins/solution-architect/skills/estimate/{references → classic/references}/agentic-estimation.md +4 -2
  131. package/plugins/solution-architect/skills/estimate/classic/references/ai-multipliers.md +57 -0
  132. package/plugins/solution-architect/skills/estimate/{references → classic/references}/interview.md +56 -35
  133. package/plugins/solution-architect/skills/estimate/{references → classic/references}/scoring-guide.md +40 -4
  134. package/plugins/solution-architect/skills/estimate/{references → classic/references}/task-shapes.md +1 -1
  135. package/plugins/solution-architect/skills/estimate/{references → classic/references}/techniques.md +29 -21
  136. package/plugins/solution-architect/skills/estimate/{references → classic/references}/writing.md +77 -45
  137. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/compute.mjs +1 -1
  138. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/checks.mjs +38 -6
  139. package/plugins/solution-architect/skills/estimate/classic/scripts/lib/redact.mjs +112 -0
  140. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/roadmap.mjs +4 -5
  141. package/plugins/solution-architect/skills/estimate/classic/scripts/lib/rollup.mjs +129 -0
  142. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/schema.mjs +31 -38
  143. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-csv.mjs +3 -3
  144. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-html.mjs +3 -3
  145. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/render.mjs +9 -8
  146. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/score-review.mjs +3 -3
  147. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/baselines.test.mjs +3 -3
  148. package/plugins/solution-architect/skills/estimate/classic/scripts/test/browser-agentic.test.mjs +143 -0
  149. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/browser.test.mjs +211 -52
  150. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/compute.test.mjs +58 -33
  151. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/e2e.test.mjs +55 -3
  152. package/plugins/solution-architect/skills/estimate/classic/scripts/test/estimate-math.test.mjs +44 -0
  153. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-estimation-fail.md +0 -10
  154. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-estimation-pass.md +0 -10
  155. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-inputs.json +1 -7
  156. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/booking-inputs.json +11 -10
  157. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/estimation-fail.md +6 -0
  158. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/estimation-pass.md +17 -21
  159. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/measurements.test.mjs +1 -1
  160. package/plugins/solution-architect/skills/estimate/classic/scripts/test/pricing.test.mjs +88 -0
  161. package/plugins/solution-architect/skills/estimate/classic/scripts/test/project-price.test.mjs +93 -0
  162. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/quality-gates.test.mjs +7 -1
  163. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/references.test.mjs +88 -26
  164. package/plugins/solution-architect/skills/estimate/classic/scripts/test/render.test.mjs +405 -0
  165. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/schema.test.mjs +114 -61
  166. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/score-review.test.mjs +37 -4
  167. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/scoring.test.mjs +1 -1
  168. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/url-state.test.mjs +2 -2
  169. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/validate.test.mjs +104 -10
  170. package/plugins/solution-architect/skills/estimate/classic/scripts/test/xlsx-export.test.mjs +475 -0
  171. package/plugins/solution-architect/skills/estimate/classic/scripts/test/zip-store.test.mjs +26 -0
  172. package/plugins/solution-architect/skills/estimate/evals/evals.json +44 -9
  173. package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +28 -0
  174. package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.json +79 -0
  175. package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.md +141 -0
  176. package/plugins/solution-architect/skills/estimate/shared/assets/xlsx-export.js +336 -0
  177. package/plugins/solution-architect/skills/estimate/shared/lib/agentic-task-schema.mjs +24 -0
  178. package/plugins/solution-architect/skills/estimate/shared/lib/context-schema.mjs +35 -0
  179. package/plugins/solution-architect/skills/estimate/shared/lib/estimate-math.mjs +31 -0
  180. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/inline.mjs +13 -5
  181. package/plugins/solution-architect/skills/estimate/shared/lib/pricing.mjs +78 -0
  182. package/plugins/solution-architect/skills/estimate/shared/lib/project-price.mjs +96 -0
  183. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/scoring-schema.mjs +1 -1
  184. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/scoring.mjs +3 -3
  185. package/plugins/solution-architect/skills/estimate/shared/lib/zip.mjs +60 -0
  186. package/plugins/solution-architect/skills/estimate/workflow-based/FLOW.md +91 -0
  187. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-components.html +994 -0
  188. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-template.html +440 -0
  189. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimator-system.xlsx +0 -0
  190. package/plugins/solution-architect/skills/estimate/workflow-based/assets/score-review.html +838 -0
  191. package/plugins/solution-architect/skills/estimate/workflow-based/references/hidden-work-by-type.md +429 -0
  192. package/plugins/solution-architect/skills/estimate/workflow-based/references/linking.md +59 -0
  193. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-components-template.mjs +80 -0
  194. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-template.mjs +60 -0
  195. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-workflow-template.mjs +51 -0
  196. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-xlsx-template.py +144 -0
  197. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/compute.mjs +32 -0
  198. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-html.mjs +44 -0
  199. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-view.mjs +71 -0
  200. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/pair-findings.mjs +19 -0
  201. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/requirements.mjs +33 -0
  202. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/rollup.mjs +66 -0
  203. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/schema-components.mjs +69 -0
  204. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/schema.mjs +70 -0
  205. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/score-diff.mjs +54 -0
  206. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/score-html.mjs +52 -0
  207. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/xlsx-rows.mjs +51 -0
  208. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/render.mjs +42 -0
  209. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/score-review.mjs +46 -0
  210. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/arch-link.js +9 -0
  211. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/click.js +28 -0
  212. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/prelude.js +4 -0
  213. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/view.js +63 -0
  214. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/browser.test.mjs +127 -0
  215. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/build-pages.test.mjs +43 -0
  216. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/build-template.test.mjs +18 -0
  217. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/cli.test.mjs +48 -0
  218. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/estimator-system.test.mjs +66 -0
  219. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/ARCHITECTURE-mini.md +31 -0
  220. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/feedback.json +19 -0
  221. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/inputs-pass.json +80 -0
  222. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/measurements.jsonl +0 -0
  223. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/requirements.json +79 -0
  224. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/page-view.test.mjs +54 -0
  225. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/pages-browser.test.mjs +209 -0
  226. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/quality-gates.test.mjs +25 -0
  227. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/render.test.mjs +54 -0
  228. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/requirements.test.mjs +33 -0
  229. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/rollup.test.mjs +80 -0
  230. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/schema.test.mjs +61 -0
  231. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/score-review.test.mjs +108 -0
  232. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/stage.mjs +32 -0
  233. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/workflow-script.test.mjs +24 -0
  234. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs +58 -0
  235. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/validate.mjs +19 -0
  236. package/plugins/solution-architect/skills/new-lead/SKILL.md +4 -3
  237. package/plugins/solution-architect/skills/proposal/README.md +22 -7
  238. package/plugins/solution-architect/skills/proposal/SKILL.md +18 -7
  239. package/plugins/solution-architect/skills/proposal/assets/proposal-workflow.html +143 -0
  240. package/plugins/solution-architect/skills/proposal/evals/evals.json +29 -11
  241. package/plugins/solution-architect/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/ARCHITECTURE.md +65 -0
  242. package/plugins/solution-architect/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/brief.md +21 -0
  243. package/plugins/solution-architect/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/estimation-inputs.json +126 -0
  244. package/plugins/solution-architect/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/estimation.json +215 -0
  245. package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation-inputs.json +224 -34
  246. package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation.json +103 -114
  247. package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation.md +48 -22
  248. package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation-inputs.json +211 -33
  249. package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation.json +102 -117
  250. package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation.md +48 -25
  251. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +31 -0
  252. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation-inputs.json +468 -0
  253. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation.json +773 -0
  254. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/measurements.jsonl +0 -0
  255. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/requirements.json +79 -0
  256. package/plugins/solution-architect/skills/proposal/references/interview.md +3 -6
  257. package/plugins/solution-architect/skills/proposal/references/review.md +16 -4
  258. package/plugins/solution-architect/skills/proposal/references/workflow.md +88 -0
  259. package/plugins/solution-architect/skills/proposal/references/writing.md +33 -31
  260. package/plugins/solution-architect/skills/proposal/scripts/derive.mjs +1 -1
  261. package/plugins/solution-architect/skills/proposal/scripts/lib/checks-client.mjs +5 -22
  262. package/plugins/solution-architect/skills/proposal/scripts/lib/checks-doc.mjs +18 -8
  263. package/plugins/solution-architect/skills/proposal/scripts/lib/checks.mjs +6 -2
  264. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-body.mjs +42 -0
  265. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-package.mjs +56 -0
  266. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-xml.mjs +44 -0
  267. package/plugins/solution-architect/skills/proposal/scripts/lib/figures.mjs +24 -33
  268. package/plugins/solution-architect/skills/proposal/scripts/lib/sections.mjs +1 -1
  269. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-checks.mjs +71 -0
  270. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-cli.mjs +46 -0
  271. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-html.mjs +39 -0
  272. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-lead.mjs +45 -0
  273. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-page.mjs +30 -0
  274. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-view.mjs +80 -0
  275. package/plugins/solution-architect/skills/proposal/scripts/render.mjs +5 -1
  276. package/plugins/solution-architect/skills/proposal/scripts/test/checks-client.test.mjs +50 -47
  277. package/plugins/solution-architect/skills/proposal/scripts/test/checks-doc.test.mjs +99 -40
  278. package/plugins/solution-architect/skills/proposal/scripts/test/docs.test.mjs +11 -5
  279. package/plugins/solution-architect/skills/proposal/scripts/test/docx.test.mjs +68 -0
  280. package/plugins/solution-architect/skills/proposal/scripts/test/e2e.test.mjs +3 -3
  281. package/plugins/solution-architect/skills/proposal/scripts/test/evals-fixtures.test.mjs +46 -0
  282. package/plugins/solution-architect/skills/proposal/scripts/test/figures.test.mjs +67 -54
  283. package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-fail.md +6 -1
  284. package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-inputs-pass.json +17 -0
  285. package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-pass.md +8 -12
  286. package/plugins/solution-architect/skills/proposal/scripts/test/render.test.mjs +3 -3
  287. package/plugins/solution-architect/skills/proposal/scripts/test/validate.test.mjs +5 -4
  288. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-browser.test.mjs +96 -0
  289. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-checks.test.mjs +98 -0
  290. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-docs.test.mjs +25 -0
  291. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-render.test.mjs +75 -0
  292. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-stage.mjs +15 -0
  293. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-view.test.mjs +78 -0
  294. package/plugins/solution-architect/skills/proposal/scripts/validate.mjs +4 -1
  295. package/plugins/solution-architect/workflows/review-links.js +61 -0
  296. package/plugins/solution-architect/skills/estimate/references/ai-multipliers.md +0 -101
  297. package/plugins/solution-architect/skills/estimate/scripts/lib/estimate-math.mjs +0 -89
  298. package/plugins/solution-architect/skills/estimate/scripts/lib/redact.mjs +0 -64
  299. package/plugins/solution-architect/skills/estimate/scripts/lib/rollup.mjs +0 -154
  300. package/plugins/solution-architect/skills/estimate/scripts/lib/scenario-schema.mjs +0 -39
  301. package/plugins/solution-architect/skills/estimate/scripts/test/estimate-math.test.mjs +0 -131
  302. package/plugins/solution-architect/skills/estimate/scripts/test/render.test.mjs +0 -251
  303. package/plugins/solution-architect/skills/estimate/scripts/test/xlsx-export.test.mjs +0 -254
  304. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/slicing.md +0 -0
  305. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/agentic-checks.mjs +0 -0
  306. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/components.mjs +0 -0
  307. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/md-tables.mjs +0 -0
  308. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/scoring-checks.mjs +0 -0
  309. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/measurements.jsonl +0 -0
  310. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/zip.mjs +0 -0
  311. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/validate.mjs +0 -0
  312. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/baselines.mjs +0 -0
  313. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/measurements.mjs +0 -0
  314. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/score-diff.mjs +0 -0
@@ -0,0 +1,78 @@
1
+ // Per-feature pricing, transcribed from Estimator v2's Ballpark Estimator
2
+ // sheet. Size is deliberately the lightest weight and uncertainty the
3
+ // heaviest: in agent-assisted delivery, volume of code is cheap and unclear
4
+ // requirements are not. Bands are continuous — each band's price high is the
5
+ // next band's price low — which is what removes the tier cliff v1 had.
6
+
7
+ export const WEIGHTS = { tech: 0.20, size: 0.10, deps: 0.20, unc: 0.30, risk: 0.20 };
8
+
9
+ export const BANDS = [
10
+ { tier: 'S', start: 5, end: 11.5, priceLow: 500, priceHigh: 1500 },
11
+ { tier: 'M', start: 11.5, end: 17.5, priceLow: 1500, priceHigh: 4000 },
12
+ { tier: 'L', start: 17.5, end: 22.5, priceLow: 4000, priceHigh: 10000 },
13
+ { tier: 'XL', start: 22.5, end: 25, priceLow: 10000, priceHigh: 25000 },
14
+ ];
15
+
16
+ export const MODEL_PARAMS = {
17
+ baseSpread: 0.15,
18
+ perUncertaintyPoint: 0.07,
19
+ perRiskPoint: 0.03,
20
+ deepEstimateAbove: 6000,
21
+ deepEstimateSpread: 0.4,
22
+ };
23
+
24
+ export function weightedScore(scores) {
25
+ return Object.keys(WEIGHTS).reduce((sum, k) => sum + scores[k] * WEIGHTS[k], 0) * 5;
26
+ }
27
+
28
+ // v2 uses MATCH(score, band starts, 1): the last band whose start is at or
29
+ // below the score. A score exactly on a boundary therefore takes the upper
30
+ // band, and anything at or above the final start stays XL.
31
+ export function bandFor(score) {
32
+ return BANDS.reduce((best, b) => (score >= b.start ? b : best), BANDS[0]);
33
+ }
34
+
35
+ export function pointEstimate(score) {
36
+ const b = bandFor(Math.min(score, BANDS[BANDS.length - 1].end));
37
+ const through = (Math.min(score, b.end) - b.start) / (b.end - b.start);
38
+ return b.priceLow + through * (b.priceHigh - b.priceLow);
39
+ }
40
+
41
+ export function spreadFor({ unc, risk }, params = MODEL_PARAMS) {
42
+ return params.baseSpread
43
+ + Math.max(0, unc - 1) * params.perUncertaintyPoint
44
+ + Math.max(0, risk - 1) * params.perRiskPoint;
45
+ }
46
+
47
+ function flagFor({ score, point, spread, size }, params) {
48
+ const xl = BANDS[BANDS.length - 1].start;
49
+ if (score >= xl && size === 5) return 'SPLIT into sub-features';
50
+ if (score >= xl) return 'Deep estimate required';
51
+ if (spread >= params.deepEstimateSpread) return 'Deep estimate recommended';
52
+ if (point >= params.deepEstimateAbove) return 'Deep estimate recommended';
53
+ return '';
54
+ }
55
+
56
+ export function featurePrice(scores, params = MODEL_PARAMS) {
57
+ const score = weightedScore(scores);
58
+ const point = pointEstimate(score);
59
+ const spread = spreadFor(scores, params);
60
+ return {
61
+ score,
62
+ tier: bandFor(score).tier,
63
+ point,
64
+ spread,
65
+ low: point * (1 - spread),
66
+ high: point * (1 + spread),
67
+ flag: flagFor({ score, point, spread, size: scores.size }, params),
68
+ };
69
+ }
70
+
71
+ // The score review page re-tiers an edited row in the browser and groups
72
+ // rows by identical total, so the total is rounded here rather than at each
73
+ // call site — float noise would split two identically scored features into
74
+ // separate groups.
75
+ export function tierFor(scores) {
76
+ const total = Math.round(weightedScore(scores) * 100) / 100;
77
+ return { total, tier: bandFor(total).tier };
78
+ }
@@ -0,0 +1,96 @@
1
+ // Estimator v2's Project Roll-up sheet. Feature build effort is roughly half
2
+ // of a project; everything here is the other half. Context factors combine
3
+ // additively (1 + the sum of the deviations) because multiplying five
4
+ // factors together produces numbers nobody can defend.
5
+
6
+ export const CONTEXT_FACTORS = {
7
+ codebaseMaturity: [1.0, 1.1, 1.2, 1.45],
8
+ stackFamiliarity: [1.0, 1.15, 1.35, 1.35],
9
+ specQuality: [0.95, 1.0, 1.2, 1.45],
10
+ compliance: [1.0, 1.15, 1.4, 1.4],
11
+ clientDecisions: [1.0, 1.1, 1.25, 1.4],
12
+ };
13
+ export const CONTEXT_CAP = 2.5;
14
+
15
+ export const OVERHEADS = {
16
+ foundation: 0.12, discovery: 0.06, ux: 0.08, qa: 0.08,
17
+ devops: 0.05, docs: 0.03, pm: 0.10,
18
+ };
19
+ export const INTEGRATION = { perFeature: 0.02, cap: 0.25 };
20
+ export const CONTINGENCY = { base: 0.05, perUncertaintyPoint: 0.02, perRiskPoint: 0.02 };
21
+ export const ROUNDING = 500;
22
+ const Z = { p20: -0.84, p80: 0.84, p95: 1.645 };
23
+
24
+ // A level outside 1-4, or absent, prices as 1.0 — v2's IFERROR(INDEX(..),1).
25
+ const multiplierFor = (mults, level) => mults[level - 1] ?? 1;
26
+
27
+ export function contextMultiplier(levels, factors = CONTEXT_FACTORS, cap = CONTEXT_CAP) {
28
+ const deviations = Object.entries(factors)
29
+ .reduce((sum, [k, mults]) => sum + (multiplierFor(mults, levels[k]) - 1), 0);
30
+ return Math.min(cap, 1 + deviations);
31
+ }
32
+
33
+ export function overheadFor(featureCount, lines = OVERHEADS, integration = INTEGRATION) {
34
+ const all = { ...lines, integration: Math.min(integration.cap, integration.perFeature * featureCount) };
35
+ return { lines: all, totalPct: Object.values(all).reduce((a, b) => a + b, 0) };
36
+ }
37
+
38
+ export function contingencyRate({ avgUnc, avgRisk }, params = CONTINGENCY) {
39
+ return params.base + avgUnc * params.perUncertaintyPoint + avgRisk * params.perRiskPoint;
40
+ }
41
+
42
+ const mean = (xs) => (xs.length ? xs.reduce((a, b) => a + b, 0) / xs.length : 0);
43
+ const ceilTo = (n, step) => Math.ceil(n / step) * step;
44
+
45
+ // The percentile spread and its rounded, client-facing presentation. All seven
46
+ // fields derive from p50, sigma and the rounding step alone — nothing else
47
+ // projectPrice computes feeds them — which is what makes this a clean seam.
48
+ function percentileBlock(p50, sigma, rounding) {
49
+ return {
50
+ p20: p50 + Z.p20 * sigma,
51
+ p80: p50 + Z.p80 * sigma,
52
+ p95: p50 + Z.p95 * sigma,
53
+ presentLow: ceilTo(p50, rounding),
54
+ presentHigh: ceilTo(p50 + Z.p95 * sigma, rounding),
55
+ singleNumber: ceilTo(p50 + Z.p80 * sigma, rounding),
56
+ impliedAccuracy: p50 === 0 ? 0 : sigma / p50,
57
+ };
58
+ }
59
+
60
+ // The money arithmetic: points through p50 — context, overheads, contingency.
61
+ // Split out purely to hold projectPrice under the function-length gate; it
62
+ // has no meaning of its own outside that one caller.
63
+ function moneyArithmetic(features, levels) {
64
+ const featurePoints = features.reduce((sum, f) => sum + f.point, 0);
65
+ const multiplier = contextMultiplier(levels);
66
+ const adjustedBase = featurePoints * multiplier;
67
+ const { lines, totalPct } = overheadFor(features.length);
68
+ const overheadAmount = adjustedBase * totalPct;
69
+ const rate = contingencyRate({
70
+ avgUnc: mean(features.map((f) => f.unc)), avgRisk: mean(features.map((f) => f.risk)),
71
+ });
72
+ const contingencyAmount = (adjustedBase + overheadAmount) * rate;
73
+ const p50 = adjustedBase + overheadAmount + contingencyAmount;
74
+ return {
75
+ featurePoints, multiplier, adjustedBase, lines, totalPct, overheadAmount, rate, contingencyAmount, p50,
76
+ };
77
+ }
78
+
79
+ export function projectPrice({ features, levels, rounding = ROUNDING }) {
80
+ const {
81
+ featurePoints, multiplier, adjustedBase, lines, totalPct, overheadAmount, rate, contingencyAmount, p50,
82
+ } = moneyArithmetic(features, levels);
83
+ const buildSigma = Math.sqrt(features.reduce((sum, f) => sum + (f.point * f.spread) ** 2, 0));
84
+ const sigma = featurePoints === 0 ? 0 : buildSigma * p50 / featurePoints;
85
+ return {
86
+ featurePoints,
87
+ contextMultiplier: multiplier,
88
+ adjustedBase,
89
+ overheads: { lines, totalPct, amount: overheadAmount },
90
+ contingencyRate: rate,
91
+ contingencyAmount,
92
+ p50,
93
+ sigma,
94
+ ...percentileBlock(p50, sigma, rounding),
95
+ };
96
+ }
@@ -18,7 +18,7 @@ function checkScore({ id, key, score, guide }, out) {
18
18
  if (!nonEmpty(score.cite)) out.push(`feature ${id}: scores.${key}.cite is required`);
19
19
  }
20
20
 
21
- function checkScoredFeature(feature, guide, out) {
21
+ export function checkScoredFeature(feature, guide, out) {
22
22
  const s = feature.scores;
23
23
  if (typeof s !== 'object' || s === null) { out.push(`feature ${feature.id}: scores object is required at STANDARD/DEEP depth`); return; }
24
24
  if (Object.keys(s).sort().join() !== [...SCORE_FACTORS].sort().join()) {
@@ -1,16 +1,16 @@
1
1
  // Factor scores are human judgments recorded in estimation-inputs.json.
2
2
  // This module owns their vocabulary, the rubric loader (references/
3
3
  // scoring-guide.md is the single source of anchor text), and the two
4
- // derived facts compute copies into estimation.json: Σ and tier.
4
+ // derived facts compute copies into estimation.json: score and tier.
5
5
  import { readFileSync } from 'node:fs';
6
6
  import { escapeHtml } from '../../../analyze-requirements/scripts/lib/md-inline.mjs';
7
- import { tierFor } from './estimate-math.mjs';
7
+ import { tierFor } from './pricing.mjs';
8
8
 
9
9
  export const SCORE_FACTORS = ['tech', 'size', 'deps', 'unc', 'risk'];
10
10
  export const FACTOR_LABELS = {
11
11
  tech: 'Tech complexity', size: 'Feature size', deps: 'Dependencies', unc: 'Uncertainty', risk: 'Risk',
12
12
  };
13
- const GUIDE_PATH = new URL('../../references/scoring-guide.md', import.meta.url);
13
+ const GUIDE_PATH = new URL('../../classic/references/scoring-guide.md', import.meta.url);
14
14
 
15
15
  const cells = (line) => line.split('|').slice(1, -1).map((c) => c.trim());
16
16
 
@@ -0,0 +1,60 @@
1
+ // Minimal zip writer: stored (uncompressed) entries, which every zip reader
2
+ // accepts. Written once as ESM and shipped twice: imported by Node tests, and
3
+ // inlined ahead of the page scripts that build a file (the estimate's xlsx
4
+ // export, the proposal's docx) through withZip() in inline.mjs.
5
+ const CRC_TABLE = (() => {
6
+ const t = new Uint32Array(256);
7
+ for (let n = 0; n < 256; n++) {
8
+ let c = n;
9
+ for (let k = 0; k < 8; k++) c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
10
+ t[n] = c >>> 0;
11
+ }
12
+ return t;
13
+ })();
14
+ export function crc32(bytes) {
15
+ let c = 0xffffffff;
16
+ for (let i = 0; i < bytes.length; i++) c = CRC_TABLE[(c ^ bytes[i]) & 0xff] ^ (c >>> 8);
17
+ return (c ^ 0xffffffff) >>> 0;
18
+ }
19
+
20
+ // entry: { name: Uint8Array, data: Uint8Array, crc, offset }
21
+ function zipHeader(entry, central) {
22
+ const b = new Uint8Array(central ? 46 : 30);
23
+ const v = new DataView(b.buffer);
24
+ v.setUint32(0, central ? 0x02014b50 : 0x04034b50, true);
25
+ const at = central ? 6 : 4; // version-needed field; central adds version-made-by first
26
+ v.setUint16(at, 20, true);
27
+ v.setUint32(at + 10, entry.crc, true);
28
+ v.setUint32(at + 14, entry.data.length, true);
29
+ v.setUint32(at + 18, entry.data.length, true);
30
+ v.setUint16(at + 22, entry.name.length, true);
31
+ if (central) v.setUint32(42, entry.offset, true);
32
+ return b;
33
+ }
34
+ function zipEnd(count, cdSize, cdStart) {
35
+ const b = new Uint8Array(22);
36
+ const v = new DataView(b.buffer);
37
+ v.setUint32(0, 0x06054b50, true);
38
+ v.setUint16(8, count, true);
39
+ v.setUint16(10, count, true);
40
+ v.setUint32(12, cdSize, true);
41
+ v.setUint32(16, cdStart, true);
42
+ return b;
43
+ }
44
+ export function zipStore(files) {
45
+ const enc = new TextEncoder();
46
+ const chunks = [];
47
+ const centrals = [];
48
+ let offset = 0;
49
+ for (const [path, data] of files) {
50
+ const entry = { name: enc.encode(path), data, crc: crc32(data), offset };
51
+ chunks.push(zipHeader(entry, false), entry.name, data);
52
+ centrals.push(zipHeader(entry, true), entry.name);
53
+ offset += 30 + entry.name.length + data.length;
54
+ }
55
+ const cdSize = centrals.reduce((s, b) => s + b.length, 0);
56
+ const all = [...chunks, ...centrals, zipEnd(files.size, cdSize, offset)];
57
+ const out = new Uint8Array(all.reduce((s, b) => s + b.length, 0));
58
+ all.reduce((at, b) => (out.set(b, at), at + b.length), 0);
59
+ return out;
60
+ }
@@ -0,0 +1,91 @@
1
+ # estimate — workflow mode
2
+
3
+ You are here because `requirements.json#scopeMode` is `"workflow"`. The
4
+ business-analyst package already holds the systems, to-be workflows and
5
+ features the PO confirmed. Your job: price those features, link each to
6
+ the components that build it, and get an engineer's scores.
7
+
8
+ Paths below are relative to this folder (`estimate/workflow-based/`);
9
+ run the scripts from here.
10
+
11
+ ## Hard rules
12
+
13
+ 1. Features carry ids and scores only. Names, systems and steps come from
14
+ `requirements.json`; never copy them into `estimation-inputs.json`.
15
+ 2. Components carry the work: `builds[{ feature, why }]`, `milestone`,
16
+ agentic `tasks`. A feature's milestone is derived, never written.
17
+ 3. Agent judges, script computes: every number comes from
18
+ `scripts/compute.mjs`. `scripts/validate.mjs` must exit 0.
19
+ 4. This mode is agentic + STANDARD. Do not ask about depth or delivery.
20
+ 5. Three questions, no more: the architecture gate, the score review, and
21
+ the closing "anything to change?".
22
+
23
+ ## Flow
24
+
25
+ 1. **Gates.** Stop with the message if any fails. A stop is the message and
26
+ one line on what passed: no other questions, no offer to run classic
27
+ instead, no review of the documents.
28
+ - no `ARCHITECTURE.md` in the lead folder → "Workflow mode needs the
29
+ architecture document. Run it first."
30
+ - the `Workflow` tool is not in your tool list → "Workflow mode needs
31
+ dynamic workflows for the link review. Turn them on in /config
32
+ (Dynamic workflows), then run /estimate again."
33
+ - **Q1** (AskUserQuestion): "Components come from ARCHITECTURE.md §6.
34
+ Has a human reviewed that document?" — no → stop.
35
+ 2. **Setup.** Write `scopeMode: "workflow"`, `requirements` (relative path
36
+ to the package), `deliveryMode: "agentic"`, `depth: "STANDARD"`,
37
+ `agentContext: { agent, model }` from the session you are running in,
38
+ `project` = the lead name. Write `assumptions` from the package's ASM-
39
+ and Q- items (`source` = that id); anything you add gets `source: "new"`.
40
+ 3. **Link.** Read `references/linking.md` (core rubric). For every feature,
41
+ write `components[].builds` with a `why` per link. Components are §6
42
+ rows; `parent` = their container; a container with no components may
43
+ build features itself.
44
+ 4. **Review.** Run `/solution-architect:review-links` with
45
+ `args = { inputs, architecture, requirements, linking }` (absolute
46
+ paths). Apply the returned findings (add/drop links, fix tasks named
47
+ under "task"). One cycle; do not re-run.
48
+ 5. **Score.** Five scores per feature with a cite each, plus `scoreNote`
49
+ and `scoreProvenance: "proposed"` (`../classic/references/scoring-guide.md`
50
+ anchors verbatim). Context factors: derive four as the classic interview
51
+ does (`../classic/references/interview.md` §4); `stackFamiliarity` is level 1
52
+ with cite "not assessed — adjust in the exported workbook".
53
+ 6. **Score review (Q2).** `node scripts/score-review.mjs --write
54
+ estimation-inputs.json --out <lead>/dist/score-review.html`, serve it with the
55
+ analyze-requirements `serve.mjs`, give the URL. It sits beside the
56
+ architecture viewer so its C2/C3 links open. When the engineer pastes
57
+ the feedback block: save it, `node scripts/score-review.mjs --read
58
+ feedback.json --inputs estimation-inputs.json`, apply `features`,
59
+ `components`; for each `needsReason` entry ask once in chat why; for
60
+ each `asks` entry propose a component from §6 (or a new one, marked
61
+ proposed) and redo steps 3–4 for that feature only. A component left
62
+ building nothing gets `notEstimated` with a reason.
63
+ 7. **Tasks.** For every component that builds something: agentic tasks
64
+ (`shape` from `../classic/references/task-shapes.md`, `scope`,
65
+ `seedMinutes`), and a `milestone` ("M1 - <name>", ordered). Components
66
+ that build nothing get `notEstimated` with a reason. Write
67
+ `exclusions` — the commercial items the price leaves out that the BA scope
68
+ does not name (hosting and subscriptions, post-launch support, security
69
+ testing, hardware), one sentence each.
70
+ 8. **Compute.** `node scripts/compute.mjs --inputs estimation-inputs.json --out estimation.json`
71
+ 9. **Validate.** `node scripts/validate.mjs --inputs estimation-inputs.json --json estimation.json` → exit 0.
72
+ 10. **Render + serve.** `node scripts/render.mjs --inputs estimation-inputs.json
73
+ --json estimation.json --out <lead>/dist` writes `estimate.html`
74
+ (Workflow-based) and `estimate-components.html` (Component-based, with
75
+ the xlsx download) beside the architecture viewer; it re-runs
76
+ validation and refuses on findings. Serve `<lead>/dist` with the
77
+ analyze-requirements `serve.mjs`.
78
+ 11. **Close (Q3).** AskUserQuestion: "Estimate ready: <presented range>.
79
+ <n> features, <m> components, milestones <list>. Assumptions: <k> (<j>
80
+ from the BA package, <k−j> new). Pages: <url>/estimate.html ·
81
+ <url>/estimate-components.html. Anything to change?" Options: Done ·
82
+ Change a score or a link · Add a component · Open the review page again.
83
+ A change → edit → steps 8–10 → ask again. Both pages are internal; the
84
+ client gets the proposal.
85
+
86
+ ## Not asked, and why
87
+
88
+ Depth, delivery mode, agent/model, scope confirm, milestones, review
89
+ channel, task approval, stack familiarity, deadline/budget, show pricing
90
+ working: each is fixed, derived, PO-confirmed already, or shown in Q3.
91
+ See the spec's §2 table.