@v11g/agents-rock 1.0.13 → 1.0.14

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 (572) hide show
  1. package/README.md +23 -5
  2. package/package.json +1 -1
  3. package/plugins/business-analyst/skills/business-analyst/README.md +1 -1
  4. package/plugins/business-analyst/skills/business-analyst/evals/evals.json +1 -1
  5. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_data.cpython-314.pyc +0 -0
  6. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_layout.cpython-314.pyc +0 -0
  7. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_page.cpython-314.pyc +0 -0
  8. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_checks.cpython-314.pyc +0 -0
  9. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_render.cpython-314.pyc +0 -0
  10. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/validate.cpython-314.pyc +0 -0
  11. package/plugins/business-analyst/skills/business-analyst/scripts/test/quality-gates.test.mjs +1 -1
  12. package/plugins/business-analyst/skills/business-analyst/scripts/test/review-browser.test.mjs +2 -2
  13. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_body.cpython-314.pyc +0 -0
  14. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_flow.cpython-314.pyc +0 -0
  15. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_package.cpython-314.pyc +0 -0
  16. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_xml.cpython-314.pyc +0 -0
  17. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_quotes.cpython-314.pyc +0 -0
  18. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_rules.cpython-314.pyc +0 -0
  19. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_schema.cpython-314.pyc +0 -0
  20. package/plugins/presales/.claude-plugin/plugin.json +9 -0
  21. package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/workflow-or-exact-stop.md +1 -1
  22. package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/evals.json +5 -5
  23. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/ba-facts-cli.test.mjs +5 -1
  24. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/ba-package-cli.test.mjs +5 -1
  25. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/browser.test.mjs +6 -2
  26. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/check-quotes-cli.test.mjs +5 -1
  27. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/drift-cli.test.mjs +5 -1
  28. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/inputs.test.mjs +6 -2
  29. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-config-cli.test.mjs +5 -1
  30. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-export-cli.test.mjs +5 -1
  31. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-gen-cli.test.mjs +5 -1
  32. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/record-cli.test.mjs +5 -1
  33. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/render.test.mjs +22 -18
  34. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/rerun-safety.test.mjs +5 -1
  35. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-quotes-cli.test.mjs +5 -1
  36. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-strategy-cli.test.mjs +5 -1
  37. package/plugins/{solution-architect → presales}/skills/estimate/README.md +14 -4
  38. package/plugins/{solution-architect → presales}/skills/estimate/classic/references/writing.md +1 -1
  39. package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/roadmap.mjs +9 -5
  40. package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/estimate-math.test.mjs +11 -0
  41. package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/project-price.test.mjs +10 -0
  42. package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/xlsx-export.test.mjs +12 -12
  43. package/plugins/{solution-architect → presales}/skills/estimate/evals/evals.json +1 -1
  44. package/plugins/presales/skills/estimate/shared/assets/xlsx-export.js +392 -0
  45. package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/project-price.mjs +6 -4
  46. package/plugins/presales/skills/estimate/workflow-based/FLOW.md +176 -0
  47. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/assets/estimate-template.html +127 -10
  48. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/assets/estimator-system.xlsx +0 -0
  49. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/assets/score-review.html +164 -27
  50. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/build-template.mjs +9 -2
  51. package/plugins/presales/skills/estimate/workflow-based/scripts/build-workflow-template.mjs +76 -0
  52. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/build-xlsx-template.py +3 -3
  53. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/cites.mjs +60 -0
  54. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/groups.mjs +65 -0
  55. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/page-html.mjs +43 -0
  56. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/page-view.mjs +30 -4
  57. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/rollup.mjs +43 -12
  58. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/schema.mjs +23 -1
  59. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/score-diff.mjs +6 -1
  60. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/score-html.mjs +23 -4
  61. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/xlsx-group-rows.mjs +20 -0
  62. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/xlsx-rows.mjs +81 -0
  63. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/xlsx-tasks.mjs +25 -0
  64. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/render.mjs +8 -10
  65. package/plugins/presales/skills/estimate/workflow-based/scripts/score-review.mjs +81 -0
  66. package/plugins/presales/skills/estimate/workflow-based/scripts/template/cites.js +46 -0
  67. package/plugins/presales/skills/estimate/workflow-based/scripts/template/effort.css +22 -0
  68. package/plugins/presales/skills/estimate/workflow-based/scripts/template/effort.mjs +37 -0
  69. package/plugins/presales/skills/estimate/workflow-based/scripts/template/estimate-page.css +10 -0
  70. package/plugins/presales/skills/estimate/workflow-based/scripts/template/estimate-page.js +16 -0
  71. package/plugins/presales/skills/estimate/workflow-based/scripts/template/feature-tasks.js +33 -0
  72. package/plugins/presales/skills/estimate/workflow-based/scripts/template/lavish.mjs +39 -0
  73. package/plugins/presales/skills/estimate/workflow-based/scripts/template/tasks.css +25 -0
  74. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/view.js +21 -2
  75. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/also-builds-browser.test.mjs +1 -3
  76. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/browser.test.mjs +10 -7
  77. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/build-pages.test.mjs +10 -15
  78. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/build-template.test.mjs +6 -2
  79. package/plugins/presales/skills/estimate/workflow-based/scripts/test/cites.test.mjs +64 -0
  80. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/cli.test.mjs +1 -0
  81. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/estimator-system.test.mjs +5 -5
  82. package/plugins/presales/skills/estimate/workflow-based/scripts/test/feature-tasks-browser.test.mjs +39 -0
  83. package/plugins/presales/skills/estimate/workflow-based/scripts/test/groups-browser.test.mjs +39 -0
  84. package/plugins/presales/skills/estimate/workflow-based/scripts/test/groups.test.mjs +156 -0
  85. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/link-picker-browser.test.mjs +1 -10
  86. package/plugins/presales/skills/estimate/workflow-based/scripts/test/open-lavish.test.mjs +54 -0
  87. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/page-html.test.mjs +7 -0
  88. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/pages-browser.test.mjs +25 -21
  89. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/render.test.mjs +5 -5
  90. package/plugins/presales/skills/estimate/workflow-based/scripts/test/review-effort.test.mjs +104 -0
  91. package/plugins/presales/skills/estimate/workflow-based/scripts/test/review-lavish.test.mjs +193 -0
  92. package/plugins/presales/skills/estimate/workflow-based/scripts/test/review-tasks.test.mjs +66 -0
  93. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/schema.test.mjs +15 -0
  94. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/score-review.test.mjs +10 -1
  95. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/stage.mjs +16 -8
  96. package/plugins/presales/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs +110 -0
  97. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/validate.mjs +2 -0
  98. package/plugins/{solution-architect → presales}/skills/new-lead/README.md +1 -1
  99. package/plugins/{solution-architect → presales}/skills/new-lead/SKILL.md +1 -1
  100. package/plugins/{solution-architect → presales}/skills/new-lead/evals/evals.json +13 -13
  101. package/plugins/presales/skills/proposal/README.md +63 -0
  102. package/plugins/presales/skills/proposal/SKILL.md +91 -0
  103. package/plugins/presales/skills/proposal/assets/proposal-page.html +156 -0
  104. package/plugins/presales/skills/proposal/assets/roboto-widths.json +1 -0
  105. package/plugins/{solution-architect → presales}/skills/proposal/evals/evals.json +22 -22
  106. package/plugins/presales/skills/proposal/references/build.md +33 -0
  107. package/plugins/presales/skills/proposal/references/diagrams.md +123 -0
  108. package/plugins/presales/skills/proposal/references/interview.md +66 -0
  109. package/plugins/presales/skills/proposal/references/review.md +41 -0
  110. package/plugins/{solution-architect → presales}/skills/proposal/references/workflow.md +30 -22
  111. package/plugins/presales/skills/proposal/references/writing.md +167 -0
  112. package/plugins/presales/skills/proposal/scripts/build/arrows.mjs +70 -0
  113. package/plugins/presales/skills/proposal/scripts/build/brand.mjs +43 -0
  114. package/plugins/presales/skills/proposal/scripts/build/build.mjs +75 -0
  115. package/plugins/presales/skills/proposal/scripts/build/contents.mjs +42 -0
  116. package/plugins/presales/skills/proposal/scripts/build/docx-blocks.mjs +102 -0
  117. package/plugins/presales/skills/proposal/scripts/build/docx-doc.mjs +91 -0
  118. package/plugins/presales/skills/proposal/scripts/build/docx-inline.mjs +48 -0
  119. package/plugins/presales/skills/proposal/scripts/build/docx-table.mjs +75 -0
  120. package/plugins/presales/skills/proposal/scripts/build/figures.mjs +95 -0
  121. package/plugins/presales/skills/proposal/scripts/build/html.mjs +80 -0
  122. package/plugins/presales/skills/proposal/scripts/build/layout.mjs +48 -0
  123. package/plugins/presales/skills/proposal/scripts/build/notes.mjs +30 -0
  124. package/plugins/presales/skills/proposal/scripts/build/overlap.mjs +57 -0
  125. package/plugins/presales/skills/proposal/scripts/build/page.mjs +50 -0
  126. package/plugins/presales/skills/proposal/scripts/build/pdf.mjs +88 -0
  127. package/plugins/presales/skills/proposal/scripts/build/scope-ids.mjs +10 -0
  128. package/plugins/presales/skills/proposal/scripts/build/tool.mjs +35 -0
  129. package/plugins/{solution-architect → presales}/skills/proposal/scripts/derive.mjs +7 -1
  130. package/plugins/presales/skills/proposal/scripts/diagram/align.mjs +36 -0
  131. package/plugins/presales/skills/proposal/scripts/diagram/draw.mjs +81 -0
  132. package/plugins/presales/skills/proposal/scripts/diagram/grid.mjs +90 -0
  133. package/plugins/presales/skills/proposal/scripts/diagram/icons.mjs +30 -0
  134. package/plugins/presales/skills/proposal/scripts/diagram/index.mjs +23 -0
  135. package/plugins/presales/skills/proposal/scripts/diagram/layout.mjs +42 -0
  136. package/plugins/presales/skills/proposal/scripts/diagram/obstacles.mjs +49 -0
  137. package/plugins/presales/skills/proposal/scripts/diagram/pack.mjs +101 -0
  138. package/plugins/presales/skills/proposal/scripts/diagram/route.mjs +129 -0
  139. package/plugins/presales/skills/proposal/scripts/diagram/steps.mjs +74 -0
  140. package/plugins/presales/skills/proposal/scripts/diagram/style.mjs +61 -0
  141. package/plugins/presales/skills/proposal/scripts/diagram/text.mjs +28 -0
  142. package/plugins/presales/skills/proposal/scripts/lib/bans.mjs +82 -0
  143. package/plugins/presales/skills/proposal/scripts/lib/checks-client.mjs +74 -0
  144. package/plugins/presales/skills/proposal/scripts/lib/checks-doc.mjs +78 -0
  145. package/plugins/presales/skills/proposal/scripts/lib/checks.mjs +44 -0
  146. package/plugins/presales/skills/proposal/scripts/lib/citations.mjs +45 -0
  147. package/plugins/presales/skills/proposal/scripts/lib/diagram-spec.mjs +67 -0
  148. package/plugins/presales/skills/proposal/scripts/lib/figures.mjs +79 -0
  149. package/plugins/presales/skills/proposal/scripts/lib/load.mjs +42 -0
  150. package/plugins/presales/skills/proposal/scripts/lib/money.mjs +62 -0
  151. package/plugins/presales/skills/proposal/scripts/lib/parts.mjs +83 -0
  152. package/plugins/presales/skills/proposal/scripts/lib/price-source.mjs +74 -0
  153. package/plugins/presales/skills/proposal/scripts/lib/prose.mjs +55 -0
  154. package/plugins/presales/skills/proposal/scripts/lib/workbook.mjs +86 -0
  155. package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-checks.mjs +7 -2
  156. package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-cli.mjs +16 -18
  157. package/plugins/presales/skills/proposal/scripts/lib/workflow-md.mjs +35 -0
  158. package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-view.mjs +3 -3
  159. package/plugins/presales/skills/proposal/scripts/render.mjs +55 -0
  160. package/plugins/presales/skills/proposal/scripts/test/acme.mjs +28 -0
  161. package/plugins/presales/skills/proposal/scripts/test/bans.test.mjs +59 -0
  162. package/plugins/presales/skills/proposal/scripts/test/build.test.mjs +128 -0
  163. package/plugins/presales/skills/proposal/scripts/test/diagram.test.mjs +154 -0
  164. package/plugins/presales/skills/proposal/scripts/test/docs.test.mjs +13 -0
  165. package/plugins/presales/skills/proposal/scripts/test/e2e.test.mjs +20 -0
  166. package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/evals-fixtures.test.mjs +8 -5
  167. package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/figures.test.mjs +29 -1
  168. package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/diagrams/aws-on-neutral.json +60 -0
  169. package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/diagrams/booking.json +61 -0
  170. package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/proposal-fail.md +49 -0
  171. package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/proposal.md +72 -0
  172. package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/references.json +5 -0
  173. package/plugins/presales/skills/proposal/scripts/test/fixtures/workbook-recalculated.xlsx +0 -0
  174. package/plugins/presales/skills/proposal/scripts/test/fixtures/workbook-unrecalculated.xlsx +0 -0
  175. package/plugins/presales/skills/proposal/scripts/test/layout.test.mjs +89 -0
  176. package/plugins/presales/skills/proposal/scripts/test/parts.test.mjs +112 -0
  177. package/plugins/presales/skills/proposal/scripts/test/prices.test.mjs +122 -0
  178. package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/quality-gates.test.mjs +1 -1
  179. package/plugins/presales/skills/proposal/scripts/test/steps.test.mjs +38 -0
  180. package/plugins/presales/skills/proposal/scripts/test/validate.test.mjs +46 -0
  181. package/plugins/presales/skills/proposal/scripts/test/workbook.test.mjs +76 -0
  182. package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/workflow-checks.test.mjs +7 -2
  183. package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/workflow-view.test.mjs +15 -10
  184. package/plugins/{solution-architect → presales}/skills/proposal/scripts/validate.mjs +8 -3
  185. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_data.cpython-312.pyc +0 -0
  186. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_layout.cpython-312.pyc +0 -0
  187. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_page.cpython-312.pyc +0 -0
  188. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_checks.cpython-312.pyc +0 -0
  189. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_render.cpython-312.pyc +0 -0
  190. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/validate.cpython-312.pyc +0 -0
  191. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_body.cpython-312.pyc +0 -0
  192. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_flow.cpython-312.pyc +0 -0
  193. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_package.cpython-312.pyc +0 -0
  194. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_xml.cpython-312.pyc +0 -0
  195. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_quotes.cpython-312.pyc +0 -0
  196. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_rules.cpython-312.pyc +0 -0
  197. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_schema.cpython-312.pyc +0 -0
  198. package/plugins/solution-architect/.claude-plugin/plugin.json +0 -9
  199. package/plugins/solution-architect/skills/estimate/shared/assets/xlsx-export.js +0 -336
  200. package/plugins/solution-architect/skills/estimate/workflow-based/FLOW.md +0 -95
  201. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-components.html +0 -1071
  202. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-components-template.mjs +0 -85
  203. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-workflow-template.mjs +0 -51
  204. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-html.mjs +0 -44
  205. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/xlsx-rows.mjs +0 -53
  206. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/score-review.mjs +0 -46
  207. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/feature-tasks.js +0 -21
  208. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/feature-tasks-browser.test.mjs +0 -30
  209. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs +0 -59
  210. package/plugins/solution-architect/skills/proposal/README.md +0 -51
  211. package/plugins/solution-architect/skills/proposal/SKILL.md +0 -69
  212. package/plugins/solution-architect/skills/proposal/assets/proposal-template.html +0 -82
  213. package/plugins/solution-architect/skills/proposal/assets/proposal-workflow.html +0 -143
  214. package/plugins/solution-architect/skills/proposal/references/interview.md +0 -60
  215. package/plugins/solution-architect/skills/proposal/references/review.md +0 -40
  216. package/plugins/solution-architect/skills/proposal/references/writing.md +0 -104
  217. package/plugins/solution-architect/skills/proposal/scripts/lib/checks-client.mjs +0 -58
  218. package/plugins/solution-architect/skills/proposal/scripts/lib/checks-doc.mjs +0 -64
  219. package/plugins/solution-architect/skills/proposal/scripts/lib/checks.mjs +0 -21
  220. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-body.mjs +0 -42
  221. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-package.mjs +0 -56
  222. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-xml.mjs +0 -44
  223. package/plugins/solution-architect/skills/proposal/scripts/lib/figures.mjs +0 -34
  224. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-html.mjs +0 -39
  225. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-page.mjs +0 -30
  226. package/plugins/solution-architect/skills/proposal/scripts/render.mjs +0 -64
  227. package/plugins/solution-architect/skills/proposal/scripts/test/checks-client.test.mjs +0 -147
  228. package/plugins/solution-architect/skills/proposal/scripts/test/checks-doc.test.mjs +0 -152
  229. package/plugins/solution-architect/skills/proposal/scripts/test/docs.test.mjs +0 -57
  230. package/plugins/solution-architect/skills/proposal/scripts/test/docx.test.mjs +0 -68
  231. package/plugins/solution-architect/skills/proposal/scripts/test/e2e.test.mjs +0 -30
  232. package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-fail.md +0 -27
  233. package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-pass.md +0 -51
  234. package/plugins/solution-architect/skills/proposal/scripts/test/render.test.mjs +0 -70
  235. package/plugins/solution-architect/skills/proposal/scripts/test/validate.test.mjs +0 -41
  236. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-browser.test.mjs +0 -96
  237. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-docs.test.mjs +0 -25
  238. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-render.test.mjs +0 -75
  239. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/case.yaml +0 -0
  240. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/fixture.sh +0 -0
  241. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/inputs-written.md +0 -0
  242. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/no-proposal-md.md +0 -0
  243. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/skill-fired.md +0 -0
  244. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/validate-then-render.md +0 -0
  245. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/prompt.md +0 -0
  246. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/case.yaml +0 -0
  247. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/fixture.sh +0 -0
  248. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/no-classic-fallback.md +0 -0
  249. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/nothing-written.md +0 -0
  250. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/skill-fired.md +0 -0
  251. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/stops-at-gate.md +0 -0
  252. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/prompt.md +0 -0
  253. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/case.yaml +0 -0
  254. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/fixture.sh +0 -0
  255. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/no-estimation-md.md +0 -0
  256. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/pages-or-stop.md +0 -0
  257. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/routed-to-workflow.md +0 -0
  258. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/skill-fired.md +0 -0
  259. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/three-questions-max.md +0 -0
  260. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/prompt.md +0 -0
  261. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/README.md +0 -0
  262. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/SKILL.md +0 -0
  263. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/OFL.txt +0 -0
  264. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
  265. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-mono-latin-600-normal.woff2 +0 -0
  266. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-sans-latin-400-normal.woff2 +0 -0
  267. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-sans-latin-500-normal.woff2 +0 -0
  268. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-sans-latin-600-normal.woff2 +0 -0
  269. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/mermaid-theme.json +0 -0
  270. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/section-help.json +0 -0
  271. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/viewer-template.html +0 -0
  272. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.json +0 -0
  273. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.md +0 -0
  274. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/greenfield-llm-triage-spec/triage-service-spec.md +0 -0
  275. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/transcript-citations/C1-kickoff-call.txt +0 -0
  276. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/transcript-citations/E1-intro-email.md +0 -0
  277. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/extract.md +0 -0
  278. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/interview.md +0 -0
  279. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/likec4.md +0 -0
  280. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/project-types.md +0 -0
  281. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/quality-goals.md +0 -0
  282. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/research.md +0 -0
  283. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/rewriting.md +0 -0
  284. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/viewer.md +0 -0
  285. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/writing.md +0 -0
  286. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/ba-facts.mjs +0 -0
  287. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/check-quotes.mjs +0 -0
  288. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/drift.mjs +0 -0
  289. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/ba-package.mjs +0 -0
  290. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/cdp.mjs +0 -0
  291. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/chrome.mjs +0 -0
  292. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/companion-links.mjs +0 -0
  293. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-kinds.mjs +0 -0
  294. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-links.mjs +0 -0
  295. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-routes.mjs +0 -0
  296. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-sections.mjs +0 -0
  297. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/drift.mjs +0 -0
  298. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/embed.mjs +0 -0
  299. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/er-entities.mjs +0 -0
  300. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/fonts.mjs +0 -0
  301. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/frontmatter.mjs +0 -0
  302. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/git-diff.mjs +0 -0
  303. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/inputs.mjs +0 -0
  304. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/likec4-config.mjs +0 -0
  305. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/likec4-extract.mjs +0 -0
  306. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/likec4-steps.mjs +0 -0
  307. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-defs.mjs +0 -0
  308. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-flows.mjs +0 -0
  309. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-inline.mjs +0 -0
  310. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-links.mjs +0 -0
  311. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-list.mjs +0 -0
  312. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-render.mjs +0 -0
  313. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-shape.mjs +0 -0
  314. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-tables.mjs +0 -0
  315. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-views.mjs +0 -0
  316. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-wide.mjs +0 -0
  317. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/nav.mjs +0 -0
  318. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/offline.mjs +0 -0
  319. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/port.mjs +0 -0
  320. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/quality-gate.mjs +0 -0
  321. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/section-help.mjs +0 -0
  322. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/slug-registry.mjs +0 -0
  323. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/state.mjs +0 -0
  324. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/strategy-sections.mjs +0 -0
  325. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-clusters.mjs +0 -0
  326. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-deployment.mjs +0 -0
  327. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-elections.mjs +0 -0
  328. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-links.mjs +0 -0
  329. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-model-tables.mjs +0 -0
  330. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-palette.mjs +0 -0
  331. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-provenance.mjs +0 -0
  332. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-quotes.mjs +0 -0
  333. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-strategy.mjs +0 -0
  334. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-tree.mjs +0 -0
  335. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/likec4-config.mjs +0 -0
  336. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/likec4-export.mjs +0 -0
  337. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/likec4-gen.mjs +0 -0
  338. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/record.mjs +0 -0
  339. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/render.mjs +0 -0
  340. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/serve.mjs +0 -0
  341. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/ba-package.test.mjs +0 -0
  342. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/companion-links.test.mjs +0 -0
  343. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-kinds.test.mjs +0 -0
  344. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-links.test.mjs +0 -0
  345. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-routes.test.mjs +0 -0
  346. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-sections.test.mjs +0 -0
  347. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/drift.test.mjs +0 -0
  348. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/embed.test.mjs +0 -0
  349. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/er-entities.test.mjs +0 -0
  350. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/extract-workflow.test.mjs +0 -0
  351. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/ARCHITECTURE.md +0 -0
  352. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/c4-src/broken/model.c4 +0 -0
  353. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/c4-src/pass/model.c4 +0 -0
  354. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/docs/adr/0001-sample.md +0 -0
  355. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/docs/estimate.html +0 -0
  356. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/docs/estimation.md +0 -0
  357. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/model-broken.json +0 -0
  358. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/model.json +0 -0
  359. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/threat-model.md +0 -0
  360. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/sample-model.json +0 -0
  361. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/sample.c4 +0 -0
  362. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fonts.test.mjs +0 -0
  363. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/frontmatter.test.mjs +0 -0
  364. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/git-diff.test.mjs +0 -0
  365. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-config.test.mjs +0 -0
  366. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-extract.test.mjs +0 -0
  367. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-steps.test.mjs +0 -0
  368. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-flows.test.mjs +0 -0
  369. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-links.test.mjs +0 -0
  370. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-provenance.test.mjs +0 -0
  371. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-render.test.mjs +0 -0
  372. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-tables.test.mjs +0 -0
  373. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-views.test.mjs +0 -0
  374. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-wide.test.mjs +0 -0
  375. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/nav.test.mjs +0 -0
  376. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/offline.test.mjs +0 -0
  377. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/quality-gate.test.mjs +0 -0
  378. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/quality-gates.test.mjs +0 -0
  379. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/research-workflow.test.mjs +0 -0
  380. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/rewriting.test.mjs +0 -0
  381. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/section-help.test.mjs +0 -0
  382. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/serve.test.mjs +0 -0
  383. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/state.test.mjs +0 -0
  384. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-clusters.test.mjs +0 -0
  385. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-deployment.test.mjs +0 -0
  386. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-elections.test.mjs +0 -0
  387. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-links.test.mjs +0 -0
  388. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-model-tables.test.mjs +0 -0
  389. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-provenance.test.mjs +0 -0
  390. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-quotes.test.mjs +0 -0
  391. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-strategy.test.mjs +0 -0
  392. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-tree.test.mjs +0 -0
  393. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/viewer-template.test.mjs +0 -0
  394. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/validate.mjs +0 -0
  395. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/workflows/extract.js +0 -0
  396. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/workflows/research.js +0 -0
  397. /package/plugins/{solution-architect → presales}/skills/estimate/SKILL.md +0 -0
  398. /package/plugins/{solution-architect → presales}/skills/estimate/classic/FLOW.md +0 -0
  399. /package/plugins/{solution-architect → presales}/skills/estimate/classic/assets/estimate-template-agentic.html +0 -0
  400. /package/plugins/{solution-architect → presales}/skills/estimate/classic/assets/estimate-template.html +0 -0
  401. /package/plugins/{solution-architect → presales}/skills/estimate/classic/assets/scores-review-template.html +0 -0
  402. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/agentic-estimation.md +0 -0
  403. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/ai-multipliers.md +0 -0
  404. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/interview.md +0 -0
  405. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/scoring-guide.md +0 -0
  406. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/slicing.md +0 -0
  407. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/task-shapes.md +0 -0
  408. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/techniques.md +0 -0
  409. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/compute.mjs +0 -0
  410. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/agentic-checks.mjs +0 -0
  411. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/checks.mjs +0 -0
  412. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/components.mjs +0 -0
  413. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/md-tables.mjs +0 -0
  414. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/redact.mjs +0 -0
  415. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/rollup.mjs +0 -0
  416. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/schema.mjs +0 -0
  417. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/score-csv.mjs +0 -0
  418. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/score-html.mjs +0 -0
  419. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/scoring-checks.mjs +0 -0
  420. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/render.mjs +0 -0
  421. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/score-review.mjs +0 -0
  422. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/baselines.test.mjs +0 -0
  423. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/browser-agentic.test.mjs +0 -0
  424. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/browser.test.mjs +0 -0
  425. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/compute.test.mjs +0 -0
  426. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/e2e.test.mjs +0 -0
  427. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/agentic-estimation-fail.md +0 -0
  428. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/agentic-estimation-pass.md +0 -0
  429. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/agentic-inputs.json +0 -0
  430. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/booking-inputs.json +0 -0
  431. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/estimation-fail.md +0 -0
  432. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/estimation-pass.md +0 -0
  433. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/measurements.jsonl +0 -0
  434. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/measurements.test.mjs +0 -0
  435. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/pricing.test.mjs +0 -0
  436. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/quality-gates.test.mjs +0 -0
  437. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/references.test.mjs +0 -0
  438. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/render.test.mjs +0 -0
  439. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/schema.test.mjs +0 -0
  440. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/score-review.test.mjs +0 -0
  441. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/scoring.test.mjs +0 -0
  442. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/url-state.test.mjs +0 -0
  443. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/validate.test.mjs +0 -0
  444. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/zip-store.test.mjs +0 -0
  445. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/zip.mjs +0 -0
  446. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/validate.mjs +0 -0
  447. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/gate-check-northgate/northgate-email.md +0 -0
  448. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-agentic-halyard/measurements.jsonl +0 -0
  449. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-agentic-halyard/requirements.json +0 -0
  450. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-agentic-halyard/requirements.md +0 -0
  451. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-traditional-trellis/ARCHITECTURE.md +0 -0
  452. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-traditional-trellis/requirements.json +0 -0
  453. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-traditional-trellis/requirements.md +0 -0
  454. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +0 -0
  455. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.json +0 -0
  456. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.md +0 -0
  457. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/agentic-task-schema.mjs +0 -0
  458. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/baselines.mjs +0 -0
  459. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/context-schema.mjs +0 -0
  460. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/estimate-math.mjs +0 -0
  461. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/inline.mjs +0 -0
  462. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/measurements.mjs +0 -0
  463. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/pricing.mjs +0 -0
  464. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/score-diff.mjs +0 -0
  465. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/scoring-schema.mjs +0 -0
  466. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/scoring.mjs +0 -0
  467. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/zip.mjs +0 -0
  468. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/references/hidden-work-by-type.md +0 -0
  469. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/references/linking.md +0 -0
  470. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/compute.mjs +0 -0
  471. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/pair-findings.mjs +0 -0
  472. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/requirements.mjs +0 -0
  473. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/schema-components.mjs +0 -0
  474. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/also-builds.css +0 -0
  475. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/also-builds.js +0 -0
  476. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/arch-link.js +0 -0
  477. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/click.js +0 -0
  478. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/link-picker.css +0 -0
  479. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/link-picker.js +0 -0
  480. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/prelude.js +0 -0
  481. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/ARCHITECTURE-mini.md +0 -0
  482. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/feedback.json +0 -0
  483. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/inputs-pass.json +0 -0
  484. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/measurements.jsonl +0 -0
  485. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/requirements.json +0 -0
  486. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/page-view.test.mjs +0 -0
  487. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/quality-gates.test.mjs +0 -0
  488. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/requirements.test.mjs +0 -0
  489. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/rollup.test.mjs +0 -0
  490. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/workflow-script.test.mjs +0 -0
  491. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/detail.html +0 -0
  492. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/index.html +0 -0
  493. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/start.sh +0 -0
  494. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/stats.mjs +0 -0
  495. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/vendor/reactflow-bundle.js +0 -0
  496. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/vendor-build/entry.jsx +0 -0
  497. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/vendor-build/package-lock.json +0 -0
  498. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/vendor-build/package.json +0 -0
  499. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/ARCHITECTURE.md +0 -0
  500. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/brief.md +0 -0
  501. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/dist/index.html +0 -0
  502. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/estimation.json +0 -0
  503. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/proposal.md +0 -0
  504. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/requirements.json +0 -0
  505. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/sable-dental-booking/rfp.md +0 -0
  506. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/vellum-books-checkout/ARCHITECTURE.md +0 -0
  507. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/vellum-books-checkout/rfp.md +0 -0
  508. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads.json +0 -0
  509. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/fresh-lead-northwind/rfp-northwind.md +0 -0
  510. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/skips-to-proposal/leads/meridian-freight-portal/rfp.md +0 -0
  511. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/skips-to-proposal/leads.json +0 -0
  512. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/init-root.mjs +0 -0
  513. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lead-upsert.mjs +0 -0
  514. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/enrich.mjs +0 -0
  515. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/map-nodes.mjs +0 -0
  516. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/map.mjs +0 -0
  517. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/port.mjs +0 -0
  518. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/registry.mjs +0 -0
  519. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/serve.mjs +0 -0
  520. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/e2e-workspace.test.mjs +0 -0
  521. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/enrich.test.mjs +0 -0
  522. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/ARCHITECTURE.md +0 -0
  523. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/brief.md +0 -0
  524. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/dist/index.html +0 -0
  525. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/dist/proposal-non-tech.html +0 -0
  526. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/dist/threat-model.html +0 -0
  527. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/estimation-inputs.json +0 -0
  528. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/estimation.json +0 -0
  529. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/notes.md +0 -0
  530. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/proposal-non-tech.md +0 -0
  531. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/rfp.md +0 -0
  532. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads.json +0 -0
  533. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/init-root.test.mjs +0 -0
  534. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/lead-upsert.test.mjs +0 -0
  535. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/map.test.mjs +0 -0
  536. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/port.test.mjs +0 -0
  537. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/registry-io.test.mjs +0 -0
  538. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/registry.test.mjs +0 -0
  539. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/serve.test.mjs +0 -0
  540. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/stats.test.mjs +0 -0
  541. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/validate-cli.test.mjs +0 -0
  542. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/vendor-bundle.test.mjs +0 -0
  543. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/validate.mjs +0 -0
  544. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-rivet-gym/ARCHITECTURE.md +0 -0
  545. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-rivet-gym/brief.md +0 -0
  546. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/ARCHITECTURE.md +0 -0
  547. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/brief.md +0 -0
  548. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/estimation-inputs.json +0 -0
  549. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/estimation.json +0 -0
  550. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/ARCHITECTURE.md +0 -0
  551. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/brief.md +0 -0
  552. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/dist/mermaid.js +0 -0
  553. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation-inputs.json +0 -0
  554. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation.json +0 -0
  555. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation.md +0 -0
  556. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/ARCHITECTURE.md +0 -0
  557. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/brief.md +0 -0
  558. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/dist/mermaid.js +0 -0
  559. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation-inputs.json +0 -0
  560. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation.json +0 -0
  561. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation.md +0 -0
  562. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +0 -0
  563. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation-inputs.json +0 -0
  564. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation.json +0 -0
  565. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/measurements.jsonl +0 -0
  566. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/requirements.json +0 -0
  567. /package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/jargon.mjs +0 -0
  568. /package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/sections.mjs +0 -0
  569. /package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-lead.mjs +0 -0
  570. /package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/fixtures/proposal-inputs-pass.json +0 -0
  571. /package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/workflow-stage.mjs +0 -0
  572. /package/plugins/{solution-architect → presales}/workflows/review-links.js +0 -0
@@ -0,0 +1,65 @@
1
+ // Feature groups (optional): several BA features scored and priced as one
2
+ // unit. requirements.json keeps every feature; estimation-inputs.json lists
3
+ // them all in features[] (ids only) and scores each group once. Component
4
+ // builds stay per feature. Without featureGroups nothing here applies and
5
+ // every feature is scored and priced on its own, as before.
6
+ import { checkScoredFeature } from '../../../shared/lib/scoring-schema.mjs';
7
+
8
+ const GROUP_ID = /^GRP-\d+$/;
9
+ const SCORE_FIELDS = ['scores', 'scoreNote', 'scoreProvenance'];
10
+ const nonEmpty = (v) => typeof v === 'string' && v.trim() !== '';
11
+
12
+ export const isGrouped = (inputs) => inputs.featureGroups !== undefined;
13
+
14
+ // feature id → its group, for every member of every group.
15
+ export function groupOf(inputs) {
16
+ const out = {};
17
+ for (const g of inputs.featureGroups ?? []) for (const id of g.members ?? []) out[id] ??= g;
18
+ return out;
19
+ }
20
+
21
+ // The shared score rules name the unit "feature"; a group's findings say "group".
22
+ function checkGroupScores(g, guide, out) {
23
+ const mine = [];
24
+ checkScoredFeature(g, guide, mine);
25
+ out.push(...mine.map((m) => m.replace(/^feature /, 'group ')));
26
+ }
27
+
28
+ function checkGroupShape(g, i, out) {
29
+ const id = nonEmpty(g?.id) ? g.id : `#${i}`;
30
+ if (!GROUP_ID.test(g?.id ?? '')) out.push(`group ${id}: id must look like GRP-01`);
31
+ if (!nonEmpty(g?.name)) out.push(`group ${id}: name must be a non-empty string`);
32
+ if (!(Array.isArray(g?.members) && g.members.length)) out.push(`group ${id}: members must list at least one feature`);
33
+ }
34
+
35
+ // Every feature belongs to exactly one group; members are known features.
36
+ function checkMembership(groups, featureIds, out) {
37
+ const seen = {};
38
+ for (const g of groups) {
39
+ for (const id of Array.isArray(g.members) ? g.members : []) {
40
+ if (!featureIds.has(id)) out.push(`group ${g.id}: member ${id} is not in features[]`);
41
+ if (seen[id]) out.push(`feature ${id}: in ${seen[id]} and ${g.id} — a feature belongs to one group`);
42
+ seen[id] ??= g.id;
43
+ }
44
+ }
45
+ for (const id of featureIds) if (!seen[id]) out.push(`feature ${id}: in no group — every feature belongs to one group`);
46
+ }
47
+
48
+ // Members carry no scores of their own: the group is the priced unit.
49
+ function checkMembers(features, out) {
50
+ for (const f of features) {
51
+ for (const key of SCORE_FIELDS) if (key in f) out.push(`feature ${f.id}: ${key} belongs on its group when featureGroups is set`);
52
+ }
53
+ }
54
+
55
+ export function checkGroups(inputs, guide, out) {
56
+ const groups = inputs.featureGroups;
57
+ if (!(Array.isArray(groups) && groups.length)) { out.push('featureGroups must be a non-empty list when present'); return; }
58
+ groups.forEach((g, i) => checkGroupShape(g, i, out));
59
+ const ids = groups.map((g) => g?.id);
60
+ ids.filter((id, i) => id && ids.indexOf(id) !== i).forEach((id) => out.push(`group ${id}: duplicate id`));
61
+ const features = inputs.features ?? [];
62
+ checkMembership(groups.filter((g) => g && typeof g === 'object'), new Set(features.map((f) => f.id)), out);
63
+ checkMembers(features, out);
64
+ for (const g of groups) if (g && typeof g === 'object') checkGroupScores(g, guide, out);
65
+ }
@@ -0,0 +1,43 @@
1
+ // Fills the estimate template. The page is internal (spec 3 E2): the client
2
+ // gets the proposal. Numbers come from estimation.json through
3
+ // page-view.mjs; the templates only format them.
4
+ import { embed } from '../../../../analyze-requirements/scripts/lib/embed.mjs';
5
+ import { systemData, citeRows } from './score-html.mjs';
6
+ import { priceView, milestoneView, registerView, groupsView } from './page-view.mjs';
7
+ import { xlsxRows, coverageRows } from './xlsx-rows.mjs';
8
+
9
+ const json = (v) => JSON.stringify(v).replaceAll('</script', '<\\/script');
10
+
11
+ function common(est, req) {
12
+ return { currency: est.inputs.currency ?? 'USD', view: priceView(est), milestones: milestoneView(est), register: registerView(est, req), ...(est.computed.groups ? { groups: groupsView(est) } : {}) };
13
+ }
14
+
15
+ // Task rows: [name, low, expected, high hours, confidence, assumptions, features, source, id].
16
+ export function taskTable(est) {
17
+ const out = {};
18
+ for (const c of est.inputs.components) {
19
+ const done = est.computed.components[c.id]?.tasks ?? {};
20
+ if (c.tasks?.length) out[c.id] = c.tasks.map((t) => [t.name, done[t.id].low, done[t.id].e, done[t.id].high, done[t.id].confidence, (t.assumptions ?? []).join('; '), t.features, t.source ?? '', t.id]);
21
+ }
22
+ return out;
23
+ }
24
+
25
+ // What the estimate page needs beyond the price: the workbook export's data,
26
+ // the component names its task tables show, and the components that build nothing.
27
+ function xlsxData(est, req, assets) {
28
+ return {
29
+ rows: xlsxRows(est, req), coverage: coverageRows(req), levels: est.inputs.contextLevels, template: assets.xlsxTemplate,
30
+ // overheads ride with the register so the page template needs no new hook
31
+ register: { project: est.inputs.project, ...registerView(est, req), overheads: est.inputs.overheadRates ? est.computed.price.overheads.lines : null },
32
+ };
33
+ }
34
+ const idle = (est) => est.inputs.components.filter((c) => c.notEstimated).map((c) => ({ name: c.name, reason: c.notEstimated }));
35
+
36
+ export function workflowHtml({ est, req, assets }) {
37
+ const data = { project: est.inputs.project, mapLabel: req.mapLabel, systems: req.systems.map((s) => systemData(s, req)) };
38
+ const page = {
39
+ ...common(est, req), data, tasks: taskTable(est), cites: citeRows(est.inputs),
40
+ comps: est.inputs.components.map((c) => ({ id: c.id, name: c.name })), idle: idle(est), xlsx: xlsxData(est, req, assets),
41
+ };
42
+ return embed({ template: assets.template, slots: { TITLE: est.inputs.project, DATA: json(page), XLSX: assets.xlsxSrc } });
43
+ }
@@ -34,21 +34,47 @@ function effort(computed) {
34
34
  return { components: comps.length, tasks, hours, rate: hours ? round2(computed.price.p50 / hours) : null };
35
35
  }
36
36
 
37
+ // The scored units: feature groups when the estimate has them, else features.
38
+ const scoredUnits = (inputs) => inputs.featureGroups ?? inputs.features;
39
+
37
40
  export function priceView(est) {
38
41
  const { inputs, computed } = est;
39
- const avg = (k) => round2(mean(inputs.features.map((f) => f.scores[k].n)));
42
+ const units = scoredUnits(inputs);
43
+ const avg = (k) => round2(mean(units.map((f) => f.scores[k].n)));
40
44
  return {
41
- price: computed.price, featureCount: inputs.features.length, context: contextRows(inputs),
42
- overheads: overheadRows(computed.price), avgUnc: avg('unc'), avgRisk: avg('risk'), effort: effort(computed),
45
+ price: computed.price, featureCount: inputs.features.length, ...(inputs.featureGroups ? { groupCount: units.length } : {}),
46
+ context: contextRows(inputs), overheads: overheadRows(computed.price), avgUnc: avg('unc'), avgRisk: avg('risk'), effort: effort(computed),
43
47
  };
44
48
  }
45
49
 
50
+ // The groups section both pages print, or null for an ungrouped estimate.
51
+ export function groupsView(est) {
52
+ const groups = est.computed.groups;
53
+ if (!groups) return null;
54
+ const byId = Object.fromEntries((est.inputs.featureGroups ?? []).map((g) => [g.id, g]));
55
+ return Object.entries(groups).map(([id, g]) => ({
56
+ id, name: g.name, note: byId[id]?.scoreNote ?? '', milestone: g.milestone,
57
+ members: g.members.map((m) => ({ id: m, name: est.computed.features[m]?.name ?? m, system: est.computed.features[m]?.system ?? null })),
58
+ scores: Object.fromEntries(Object.entries(byId[id].scores).map(([k, v]) => [k, v.n])),
59
+ scoreTotal: g.scoreTotal, tier: g.tier, point: g.point, low: g.priceLow, high: g.priceHigh, flag: g.flag,
60
+ }));
61
+ }
62
+
63
+ // A feature's share of the feature build: its own point, or an equal share
64
+ // of its group's point (a group is priced once, not per member).
65
+ function pointOf(id, computed) {
66
+ const f = computed.features[id];
67
+ if (!f.group) return f.point;
68
+ const g = computed.groups[f.group];
69
+ return g.point / g.members.length;
70
+ }
71
+
46
72
  // A milestone's range is its share of the feature build applied to the
47
73
  // presented range — the mockup's rule.
48
74
  function milestoneRow(name, feats, computed) {
49
75
  const mine = feats.filter(([, f]) => f.milestone === name);
50
76
  const total = computed.price.featurePoints;
51
- const share = total ? mine.reduce((n, [, f]) => n + f.point, 0) / total : 0;
77
+ const share = total ? mine.reduce((n, [id]) => n + pointOf(id, computed), 0) / total : 0;
52
78
  return {
53
79
  name, title: name.replace(/^M(\d+) - /, '$1. '),
54
80
  features: mine.map(([id, f]) => ({ id, name: f.name, system: f.system })),
@@ -1,5 +1,5 @@
1
1
  // Turns validated workflow-mode inputs into estimation.json: a price per
2
- // feature from its five scores, hours per component from agentic baselines,
2
+ // feature (or per feature group, when featureGroups is set) from its five scores, hours per component from agentic baselines,
3
3
  // and the project price. Names and systems come from the BA package.
4
4
  import { round2 } from '../../../shared/lib/estimate-math.mjs';
5
5
  import { featurePrice } from '../../../shared/lib/pricing.mjs';
@@ -7,6 +7,7 @@ import { projectPrice } from '../../../shared/lib/project-price.mjs';
7
7
  import { agenticTask } from '../../../shared/lib/baselines.mjs';
8
8
  import { scoreNumbers, scoreSummary } from '../../../shared/lib/scoring.mjs';
9
9
  import { featureProvenance } from './requirements.mjs';
10
+ import { isGrouped, groupOf } from './groups.mjs';
10
11
 
11
12
  const sortedMap = (entries) => Object.fromEntries(entries.sort(([a], [b]) => a.localeCompare(b)));
12
13
  const builders = (featureId, components) => components.filter((c) => (c.builds ?? []).some((b) => b.feature === featureId));
@@ -19,21 +20,49 @@ export function mainBuilder(featureId, components) {
19
20
  .sort((a, b) => a.builds.length - b.builds.length || String(a.milestone).localeCompare(String(b.milestone), undefined, { numeric: true }))[0];
20
21
  }
21
22
 
22
- function featureRow(feature, ctx) {
23
- const n = scoreNumbers(feature.scores);
23
+ // One scored unit (a feature, or a group of them) → its price; the project
24
+ // roll-up sums these.
25
+ function pricedUnit(unit, ctx) {
26
+ const n = scoreNumbers(unit.scores);
24
27
  const p = featurePrice(n);
25
- const req = ctx.req.features[feature.id];
26
28
  ctx.priced.push({ point: p.point, spread: p.spread, unc: n.unc, risk: n.risk });
29
+ return {
30
+ ...scoreSummary(unit),
31
+ point: round2(p.point), spread: round2(p.spread), priceLow: round2(p.low), priceHigh: round2(p.high), flag: p.flag,
32
+ };
33
+ }
34
+
35
+ function featureFacts(id, ctx) {
36
+ const req = ctx.req.features[id];
27
37
  return {
28
38
  name: req.name,
29
- system: ctx.req.systemById[ctx.req.systemOf[feature.id]]?.name ?? null,
39
+ system: ctx.req.systemById[ctx.req.systemOf[id]]?.name ?? null,
30
40
  provenance: featureProvenance(req),
31
- milestone: mainBuilder(feature.id, ctx.components)?.milestone ?? null,
32
- builtBy: builders(feature.id, ctx.components).map((c) => c.id).sort(),
33
- ...scoreSummary(feature),
34
- point: round2(p.point), spread: round2(p.spread), priceLow: round2(p.low), priceHigh: round2(p.high), flag: p.flag,
41
+ milestone: mainBuilder(id, ctx.components)?.milestone ?? null,
42
+ builtBy: builders(id, ctx.components).map((c) => c.id).sort(),
43
+ };
44
+ }
45
+
46
+ // A grouped feature names its group and carries no score or price.
47
+ function featureRow(feature, ctx) {
48
+ const facts = featureFacts(feature.id, ctx);
49
+ const group = ctx.groupOf?.[feature.id];
50
+ return group ? { ...facts, group: group.id } : { ...facts, ...pricedUnit(feature, ctx) };
51
+ }
52
+
53
+ // A group lands in its members' latest milestone: it is finished when its
54
+ // last member is.
55
+ function groupRow(g, ctx) {
56
+ const members = g.members.map((id) => featureFacts(id, ctx));
57
+ const milestones = [...new Set(members.map((m) => m.milestone).filter(Boolean))].sort(byMilestone);
58
+ return {
59
+ name: g.name, members: [...g.members],
60
+ milestone: milestones.at(-1) ?? null,
61
+ builtBy: [...new Set(members.flatMap((m) => m.builtBy))].sort(),
62
+ ...pricedUnit(g, ctx),
35
63
  };
36
64
  }
65
+ const byMilestone = (a, b) => a.localeCompare(b, undefined, { numeric: true });
37
66
 
38
67
  function componentRow(c, ctx) {
39
68
  const tasks = {};
@@ -58,9 +87,11 @@ function roundedPrice(price) {
58
87
 
59
88
  export function computeWorkflowEstimation(inputs, req, measurements) {
60
89
  const agentContext = { ...inputs.agentContext, repository: inputs.agentContext.repository ?? inputs.project };
61
- const ctx = { req, components: inputs.components, priced: [], agentic: { records: measurements ?? [], agentContext } };
90
+ const grouped = isGrouped(inputs);
91
+ const ctx = { req, components: inputs.components, priced: [], agentic: { records: measurements ?? [], agentContext }, groupOf: grouped ? groupOf(inputs) : null };
62
92
  const features = sortedMap(inputs.features.map((f) => [f.id, featureRow(f, ctx)]));
93
+ const groups = grouped ? { groups: sortedMap(inputs.featureGroups.map((g) => [g.id, groupRow(g, ctx)])) } : {};
63
94
  const components = sortedMap(inputs.components.map((c) => [c.id, componentRow(c, ctx)]));
64
- const price = projectPrice({ features: ctx.priced, levels: inputs.contextLevels ?? {} });
65
- return { inputs, computed: { features, components, price: roundedPrice(price) } };
95
+ const price = projectPrice({ features: ctx.priced, levels: inputs.contextLevels ?? {}, overheads: inputs.overheadRates });
96
+ return { inputs, computed: { features, ...groups, components, price: roundedPrice(price) } };
66
97
  }
@@ -5,6 +5,9 @@ import { loadGuide } from '../../../shared/lib/scoring.mjs';
5
5
  import { checkScoredFeature } from '../../../shared/lib/scoring-schema.mjs';
6
6
  import { checkContext } from '../../../shared/lib/context-schema.mjs';
7
7
  import { checkComponents } from './schema-components.mjs';
8
+ import { citeFindings } from './cites.mjs';
9
+ import { isGrouped, checkGroups } from './groups.mjs';
10
+ import { OVERHEADS } from '../../../shared/lib/project-price.mjs';
8
11
 
9
12
  const FEATURE_BANNED = ['tasks', 'component', 'milestone', 'provenance'];
10
13
  const nonEmpty = (v) => typeof v === 'string' && v.trim() !== '';
@@ -26,13 +29,17 @@ function checkFeatureIds(inputs, req, out) {
26
29
  for (const id of Object.keys(req.features)) if (!have.has(id)) out.push(`requirements ${id}: not scored`);
27
30
  }
28
31
 
32
+ // With featureGroups the groups carry the scores (groups.mjs); without them
33
+ // every feature is scored on its own.
29
34
  function checkFeatures(inputs, guide, out) {
35
+ const grouped = isGrouped(inputs);
30
36
  for (const f of inputs.features ?? []) {
31
37
  for (const key of FEATURE_BANNED) {
32
38
  if (key in f) out.push(`feature ${f.id}: "${key}" belongs on components in workflow mode`);
33
39
  }
34
- checkScoredFeature(f, guide, out);
40
+ if (!grouped) checkScoredFeature(f, guide, out);
35
41
  }
42
+ if (grouped) checkGroups(inputs, guide, out);
36
43
  }
37
44
 
38
45
  // Familiarity is fixed at level 1 (spec D12) unless a human stated otherwise.
@@ -55,6 +62,19 @@ function checkExclusions(inputs, out) {
55
62
  if (!(Array.isArray(inputs.exclusions) && inputs.exclusions.every(nonEmpty))) out.push('exclusions must be a list of non-empty strings');
56
63
  }
57
64
 
65
+ // Overhead percentages a reviewer restated for this project (the roll-up's
66
+ // cost lines); each names a default line and needs the reason it changed.
67
+ function checkOverheadRates(inputs, out) {
68
+ if (inputs.overheadRates === undefined) return;
69
+ const rates = inputs.overheadRates;
70
+ if (!rates || typeof rates !== 'object' || Array.isArray(rates)) { out.push('overheadRates must be an object of line: fraction'); return; }
71
+ for (const [key, v] of Object.entries(rates)) {
72
+ if (!(key in OVERHEADS)) out.push(`overheadRates.${key}: not an overhead line (${Object.keys(OVERHEADS).join(', ')})`);
73
+ if (!(typeof v === 'number' && v >= 0 && v <= 1)) out.push(`overheadRates.${key}: must be a fraction from 0 to 1`);
74
+ }
75
+ if (!nonEmpty(inputs.overheadSource)) out.push('overheadRates needs overheadSource: who restated them and why');
76
+ }
77
+
58
78
  export function checkWorkflowInputs(inputs, req) {
59
79
  const out = [];
60
80
  checkMode(inputs, req, out);
@@ -62,9 +82,11 @@ export function checkWorkflowInputs(inputs, req) {
62
82
  checkFeatureIds(inputs, req, out);
63
83
  checkFeatures(inputs, loadGuide(), out);
64
84
  checkComponents(inputs, out);
85
+ out.push(...citeFindings(inputs, req));
65
86
  checkContext(inputs, out, { required: true });
66
87
  checkFamiliarity(inputs, out);
67
88
  checkAssumptions(inputs, out);
68
89
  checkExclusions(inputs, out);
90
+ checkOverheadRates(inputs, out);
69
91
  return out;
70
92
  }
@@ -39,6 +39,11 @@ function unreasoned(inputs, feedback, diff) {
39
39
  .map((c) => ({ ...c, oldCite: inputs.features.find((f) => f.id === c.id).scores[c.field].cite }));
40
40
  }
41
41
 
42
+ // Tech, Size and Uncertainty speak to the amount of work; when one moves, the
43
+ // feature's tasks get another look. Deps and Risk leave the work as it was.
44
+ const WORK_FACTORS = ['tech', 'size', 'unc'];
45
+ const tasksToReview = (diff) => [...new Set(diff.filter((c) => WORK_FACTORS.includes(c.field)).map((c) => c.id))];
46
+
42
47
  export function readFeedback({ inputs, feedback, guide }) {
43
48
  const known = new Set(inputs.features.map((f) => f.id));
44
49
  // The page sends scoreNote '' when the engineer wrote no note: unchanged, not erased.
@@ -48,7 +53,7 @@ export function readFeedback({ inputs, feedback, guide }) {
48
53
  const diff = diffScores(inputs, fb);
49
54
  const links = diffLinks(inputs, fb);
50
55
  return {
51
- diff, needsReason: unreasoned(inputs, fb, diff), features: applyDiff({ draft: inputs, diff, guide }),
56
+ diff, needsReason: unreasoned(inputs, fb, diff), tasksToReview: tasksToReview(diff), features: applyDiff({ draft: inputs, diff, guide }),
52
57
  links, components: applyLinks(inputs, links), asks: fb.addComponent ?? [],
53
58
  };
54
59
  }
@@ -5,6 +5,7 @@ import { createHash } from 'node:crypto';
5
5
  import { embed } from '../../../../analyze-requirements/scripts/lib/embed.mjs';
6
6
  import { inlineModule, extractExports } from '../../../shared/lib/inline.mjs';
7
7
  import { SCORE_FACTORS } from '../../../shared/lib/scoring.mjs';
8
+ import { groupOf } from './groups.mjs';
8
9
 
9
10
  const flow = (w) => ({ id: w.id, name: w.name, steps: w.steps ?? [], branches: w.branches ?? [] });
10
11
 
@@ -24,28 +25,46 @@ export const MATH_EXPORTS = ['WEIGHTS', 'BANDS', 'MODEL_PARAMS', 'weightedScore'
24
25
 
25
26
  const isParent = (c, components) => components.some((x) => x.parent === c.id);
26
27
 
28
+ // A grouped feature shows its group's scores; groupOf tells the page to
29
+ // price the group once and give each member an equal share.
30
+ function scoreRows(inputs) {
31
+ const group = groupOf(inputs);
32
+ const scored = (f) => group[f.id] ?? f;
33
+ return Object.fromEntries(inputs.features.map((f) => [f.id, SCORE_FACTORS.map((k) => scored(f).scores[k].n)]));
34
+ }
35
+ // Each score's reason and the tasks it rests on (lib/cites.mjs checks them).
36
+ export function citeRows(inputs) {
37
+ const group = groupOf(inputs);
38
+ const cite = (s) => ({ text: s.cite, tasks: s.tasks ?? [] });
39
+ return Object.fromEntries(inputs.features.map((f) => [f.id, Object.fromEntries(SCORE_FACTORS.map((k) => [k, cite((group[f.id] ?? f).scores[k])]))]));
40
+ }
41
+ const groupMap = (inputs) => (inputs.featureGroups
42
+ ? { groupOf: Object.fromEntries(Object.entries(groupOf(inputs)).map(([id, g]) => [id, { id: g.id, name: g.name, size: g.members.length }])) }
43
+ : {});
44
+
27
45
  export function pageData({ inputs, req, guide }) {
28
46
  const comps = inputs.components.filter((c) => !isParent(c, inputs.components));
29
47
  const nameOf = Object.fromEntries(inputs.components.map((c) => [c.id, c.name]));
30
48
  const implementsMap = Object.fromEntries(comps.map((c) => [c.id, (c.builds ?? []).map((b) => b.feature)]));
31
- const scores = Object.fromEntries(inputs.features.map((f) => [f.id, SCORE_FACTORS.map((k) => f.scores[k].n)]));
49
+ const scores = scoreRows(inputs);
32
50
  return {
51
+ ...groupMap(inputs),
33
52
  data: { project: inputs.project, mapLabel: req.mapLabel, systems: req.systems.map((s) => systemData(s, req)) },
34
53
  eng: comps.map((c) => ({
35
54
  id: c.id, name: c.name, container: c.parent ? nameOf[c.parent] : c.name, milestone: c.milestone ?? '', does: c.notEstimated ?? '',
36
55
  })),
37
56
  arch: 'index.html',
38
57
  c3: Object.fromEntries(inputs.components.filter((c) => isParent(c, inputs.components)).map((c) => [c.name, c.id])),
39
- implements: implementsMap, scores, anchor: guide, baseline: fingerprint([scores, implementsMap]),
58
+ implements: implementsMap, scores, cites: citeRows(inputs), anchor: guide, baseline: fingerprint([scores, implementsMap]),
40
59
  };
41
60
  }
42
61
 
43
- export function toHtml({ inputs, req, guide, template, mathSrc }) {
62
+ export function toHtml({ inputs, req, guide, tasks = {}, template, mathSrc }) {
44
63
  return embed({
45
64
  template,
46
65
  slots: {
47
66
  TITLE: inputs.project,
48
- DATA: JSON.stringify(pageData({ inputs, req, guide })).replaceAll('</script', '<\\/script'),
67
+ DATA: JSON.stringify({ ...pageData({ inputs, req, guide }), tasks }).replaceAll('</script', '<\\/script'),
49
68
  MATH: inlineModule(extractExports(mathSrc, MATH_EXPORTS)),
50
69
  },
51
70
  });
@@ -0,0 +1,20 @@
1
+ import { mainBuilder } from './rollup.mjs';
2
+ import { featureProvenance } from './requirements.mjs';
3
+ import { containerName } from './xlsx-tasks.mjs';
4
+
5
+ // With featureGroups the workbook prices what the estimate prices: one row
6
+ // per group, its members named in the SUB-FEATURE and WHAT IT COVERS columns
7
+ // and their components' tasks under it.
8
+ export function groupRows(est, req, owners) {
9
+ const { inputs, computed } = est;
10
+ return inputs.featureGroups.map((g) => {
11
+ const systems = [...new Set(g.members.map((id) => computed.features[id]?.system).filter(Boolean))];
12
+ return {
13
+ id: g.id, system: systems.join(' / '), group: g.id, code: g.members.join(', '), name: g.name,
14
+ does: g.members.map((id) => `${id} ${req.features[id].name}`).join('; '), scores: g.scores, scoreNote: g.scoreNote ?? '',
15
+ scoreProvenance: g.scoreProvenance, provenance: g.members.every((id) => featureProvenance(req.features[id]) === 'stated') ? 'stated' : 'proposed',
16
+ milestone: computed.groups[g.id].milestone ?? '', container: containerName(mainBuilder(g.members[0], inputs.components), inputs.components),
17
+ tasks: g.members.flatMap((id) => owners[id] ?? []),
18
+ };
19
+ });
20
+ }
@@ -0,0 +1,81 @@
1
+ // Feeds the shared v2 workbook export (shared/assets/xlsx-export.js) rows in
2
+ // the shape the classic page passes it: one per feature, its tasks under it.
3
+ // Workflow tasks live on components, so each component's tasks go under the
4
+ // first feature it builds — listed once, never dropped. Rows come grouped by
5
+ // system, for the workbook's SYSTEM / MODULE column.
6
+ import { mainBuilder } from './rollup.mjs';
7
+ import { featureProvenance } from './requirements.mjs';
8
+ import { containerName, taskOwners } from './xlsx-tasks.mjs';
9
+ import { groupRows } from './xlsx-group-rows.mjs';
10
+
11
+ // The pages' order: systems as requirements.json lists them, each system's
12
+ // features in its own order, then any feature no system claims. Each placed
13
+ // feature also gets a group code (M<system>) and a sub-feature code
14
+ // (M<system>.<n>) in that same order, unless the package gives a `code` on the
15
+ // system or feature (a scoped copy keeps the full package's codes that way);
16
+ // a loose feature gets neither.
17
+ function systemOrder(inputs, req) {
18
+ const codeOf = (id, group, j) => req.features[id]?.code ?? `${group}.${j + 1}`;
19
+ const placed = req.systems.flatMap((s, i) => {
20
+ const group = s.code ?? `M${i + 1}`;
21
+ return (s.features ?? []).map((id, j) => [id, s.name, group, codeOf(id, group, j)]);
22
+ });
23
+ const ids = new Set(inputs.features.map((f) => f.id));
24
+ const loose = inputs.features.filter((f) => !placed.some(([id]) => id === f.id)).map((f) => [f.id, '', '', '']);
25
+ const seen = new Set(); // a feature two systems list is priced once, under the first
26
+ return [...placed.filter(([id]) => ids.has(id) && !seen.has(id) && seen.add(id)), ...loose];
27
+ }
28
+
29
+
30
+
31
+ // A package may list its source document's items (`sourceItems`: code, group,
32
+ // text, priority, the feature that builds it, a status). A feature that builds
33
+ // any of them shows their groups and codes instead of the computed ones;
34
+ // Should and Could items carry (S) and (C).
35
+ const MARK = { Should: ' (S)', Could: ' (C)' };
36
+ function sourceCodes(req, id) {
37
+ const refs = (req.raw.sourceItems ?? []).filter((i) => i.feature === id);
38
+ if (!refs.length) return null;
39
+ return { group: [...new Set(refs.map((i) => i.group))].join(', '), code: refs.map((i) => i.code + (MARK[i.priority] ?? '')).join(', ') };
40
+ }
41
+
42
+ // One row per source item, for the workbook's coverage tab; null when the
43
+ // package lists none, so the tab is only added where it means something.
44
+ export function coverageRows(req) {
45
+ const items = req.raw.sourceItems;
46
+ if (!Array.isArray(items) || !items.length) return null;
47
+ return items.map((i) => ({
48
+ group: i.group, code: i.code, text: i.text ?? '', priority: i.priority ?? '', status: i.status ?? '',
49
+ feature: i.feature ? `${i.feature} ${req.features[i.feature]?.name ?? i.featureName ?? ''}`.trim() : '',
50
+ system: i.feature ? (req.systemById[req.systemOf[i.feature]]?.name ?? i.systemName ?? '') : '',
51
+ }));
52
+ }
53
+
54
+ // What the feature covers, for the workbook's WHAT IT COVERS column: its own
55
+ // `does` sentence without a trailing source tag such as "(PRD M1.1 · Must)",
56
+ // whose codes the FEATURE GROUP and SUB-FEATURE columns already carry.
57
+ // The tag may hold brackets of its own, so the bracket that closes the text
58
+ // is matched back to the one that opens it.
59
+ function covers(does) {
60
+ const text = (does ?? '').trimEnd();
61
+ if (!text.endsWith(')')) return text;
62
+ let depth = 0;
63
+ for (let i = text.length - 1; i >= 0; i -= 1) {
64
+ depth += { ')': 1, '(': -1 }[text[i]] ?? 0;
65
+ if (depth === 0) return text.slice(0, i).trimEnd();
66
+ }
67
+ return text;
68
+ }
69
+
70
+ export function xlsxRows(est, req) {
71
+ const { inputs, computed } = est;
72
+ const owners = taskOwners(inputs, computed);
73
+ if (inputs.featureGroups) return groupRows(est, req, owners);
74
+ const byId = Object.fromEntries(inputs.features.map((f) => [f.id, f]));
75
+ return systemOrder(inputs, req).map(([id, ...rest]) => [byId[id], ...rest]).map(([f, system, group, code]) => ({
76
+ id: f.id, system, group, code, ...sourceCodes(req, f.id), name: req.features[f.id].name, does: covers(req.features[f.id].does), scores: f.scores, scoreNote: f.scoreNote ?? '',
77
+ scoreProvenance: f.scoreProvenance, provenance: featureProvenance(req.features[f.id]),
78
+ milestone: computed.features[f.id].milestone ?? '', container: containerName(mainBuilder(f.id, inputs.components), inputs.components),
79
+ tasks: owners[f.id] ?? [],
80
+ }));
81
+ }
@@ -0,0 +1,25 @@
1
+ // Shared by the workbook's feature rows and group rows: a component's
2
+ // container name, and each task placed under the first feature it serves.
3
+ export function containerName(c, components) {
4
+ if (!c) return '';
5
+ return (c.parent && components.find((x) => x.id === c.parent))?.name ?? c.name;
6
+ }
7
+
8
+ function taskRow(t, done) {
9
+ return {
10
+ name: t.name, category: t.shape, o: done[t.id].low, m: done[t.id].e, p: done[t.id].high,
11
+ confidence: done[t.id].confidence, assumptions: t.assumptions ?? [],
12
+ };
13
+ }
14
+
15
+ // Feature id → its task rows, in roster order then task order.
16
+ export function taskOwners(inputs, computed) {
17
+ const owners = {};
18
+ for (const c of inputs.components) {
19
+ for (const t of c.tasks ?? []) {
20
+ const first = inputs.features.find((f) => t.features.includes(f.id));
21
+ (owners[first.id] ??= []).push(taskRow(t, computed.components[c.id].tasks));
22
+ }
23
+ }
24
+ return owners;
25
+ }
@@ -1,13 +1,13 @@
1
- // Workflow-mode pages: estimate.html (Workflow-based) and
2
- // estimate-components.html (Component-based), both internal, written into the
3
- // lead's dist/ beside the architecture viewer. Validation runs first: an
1
+ // The workflow-mode estimate page, estimate.html: internal, written into the
2
+ // lead's dist/ beside the architecture viewer, with each feature's tasks and
3
+ // the workbook download. Validation runs first: an
4
4
  // unvalidated estimate never renders (spec 3 W13).
5
5
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
6
6
  import { join } from 'node:path';
7
7
  import { loadPair } from './lib/requirements.mjs';
8
8
  import { pairFindings } from './lib/pair-findings.mjs';
9
- import { workflowHtml, componentsHtml } from './lib/page-html.mjs';
10
- import { loadGuide } from '../../shared/lib/scoring.mjs';
9
+ import { citeWarnings } from './lib/cites.mjs';
10
+ import { workflowHtml } from './lib/page-html.mjs';
11
11
  import { withZip } from '../../shared/lib/inline.mjs';
12
12
 
13
13
  const asset = (rel) => readFileSync(new URL(rel, import.meta.url), 'utf8');
@@ -28,15 +28,13 @@ if (!args.inputs || !args.json || !args.out) {
28
28
  const { inputs, req } = loadPair(args.inputs);
29
29
  const findings = pairFindings(inputs, req, args.json);
30
30
  if (findings.length) { console.error(findings.join('\n')); process.exit(1); }
31
+ for (const w of citeWarnings(inputs)) console.error(`warning: ${w}`);
31
32
  const est = JSON.parse(readFileSync(args.json, 'utf8'));
32
33
  const assets = {
33
- template: asset('../assets/estimate-components.html'), guide: loadGuide(),
34
- mathSrc: asset('../../shared/lib/pricing.mjs'), xlsxSrc: withZip(asset('../../shared/assets/xlsx-export.js')),
34
+ template: asset('../assets/estimate-template.html'), xlsxSrc: withZip(asset('../../shared/assets/xlsx-export.js')),
35
35
  xlsxTemplate: readFileSync(new URL('../assets/estimator-system.xlsx', import.meta.url)).toString('base64'),
36
36
  };
37
37
  mkdirSync(args.out, { recursive: true });
38
- writeFileSync(join(args.out, 'estimate.html'), workflowHtml({ est, req, template: asset('../assets/estimate-template.html') }));
39
- writeFileSync(join(args.out, 'estimate-components.html'), componentsHtml({ est, req, assets }));
38
+ writeFileSync(join(args.out, 'estimate.html'), workflowHtml({ est, req, assets }));
40
39
  if (!existsSync(join(args.out, 'index.html'))) console.log('Architecture viewer not found in dist/ — C2/C3 links will not open until it is rendered.');
41
40
  console.log(join(args.out, 'estimate.html'));
42
- console.log(join(args.out, 'estimate-components.html'));
@@ -0,0 +1,81 @@
1
+ // Score review round-trip for workflow mode. --write renders the review page
2
+ // from inputs + the BA package; --read folds the page's feedback JSON back
3
+ // into scores, component links and asks. It scores nothing itself.
4
+ import { readFileSync, writeFileSync } from 'node:fs';
5
+ import { spawnSync } from 'node:child_process';
6
+ import { loadPair } from './lib/requirements.mjs';
7
+ import { toHtml } from './lib/score-html.mjs';
8
+ import { readFeedback } from './lib/score-diff.mjs';
9
+ import { loadGuide } from '../../shared/lib/scoring.mjs';
10
+ import { loadMeasurements, resolveMeasurementsPath } from '../../shared/lib/measurements.mjs';
11
+ import { computeWorkflowEstimation } from './lib/rollup.mjs';
12
+ import { taskTable } from './lib/page-html.mjs';
13
+ import { checkAgenticTask } from '../../shared/lib/agentic-task-schema.mjs';
14
+
15
+ const templatePath = new URL('../assets/score-review.html', import.meta.url).pathname;
16
+ const LAVISH = 'lavish-axi@0.1.97';
17
+ const mathPath = new URL('../../shared/lib/pricing.mjs', import.meta.url).pathname;
18
+
19
+ function parseArgs(argv) {
20
+ const args = {};
21
+ for (let i = 0; i < argv.length; i += 1) {
22
+ if (!argv[i].startsWith('--')) continue;
23
+ const next = argv[i + 1];
24
+ args[argv[i].slice(2)] = next === undefined || next.startsWith('--') ? true : argv[++i];
25
+ }
26
+ return args;
27
+ }
28
+
29
+ function requirePair(path) {
30
+ const pair = loadPair(path);
31
+ if (!pair.req) { console.error('requirements: file not found (inputs.requirements must point at the BA package)'); process.exit(1); }
32
+ return pair;
33
+ }
34
+
35
+ // Each card's task table: the same task hours the estimate page shows. No tasks yet, no table.
36
+ function taskHours(inputs, req) {
37
+ if (!inputs.components.some((c) => c.tasks?.length)) return {};
38
+ const findings = [];
39
+ for (const c of inputs.components) for (const t of c.tasks ?? []) checkAgenticTask(t, findings);
40
+ if (findings.length) { console.error(findings.join('\n')); process.exit(1); }
41
+ return taskTable(computeWorkflowEstimation(inputs, req, loadMeasurements(resolveMeasurementsPath(inputs)).records));
42
+ }
43
+
44
+ function write(args) {
45
+ const { inputs, req } = requirePair(args.write);
46
+ if (inputs.featureGroups) {
47
+ console.error('score-review: featureGroups is set — groups are scored as a unit outside the review page (see FLOW.md, Feature groups)');
48
+ process.exit(1);
49
+ }
50
+ const html = toHtml({ inputs, req, guide: loadGuide(), tasks: taskHours(inputs, req), template: readFileSync(templatePath, 'utf8'), mathSrc: readFileSync(mathPath, 'utf8') });
51
+ writeFileSync(args.out, html);
52
+ console.log(args.out);
53
+ if (!args['no-open']) openInLavish(args.out);
54
+ }
55
+
56
+ // The review happens in Lavish, so writing the page opens it there too.
57
+ // LAVISH_AXI_FAKE is the test seam: a node script run in place of lavish-axi.
58
+ function openInLavish(file) {
59
+ const env = { ...process.env, LAVISH_AXI_TELEMETRY: '0' };
60
+ const [cmd, pre] = process.env.LAVISH_AXI_FAKE ? ['node', [process.env.LAVISH_AXI_FAKE]] : ['npx', ['-y', LAVISH]];
61
+ const r = spawnSync(cmd, [...pre, file], { stdio: 'inherit', env });
62
+ if (r.status !== 0) {
63
+ console.error(`score-review: Lavish did not start; serve the page with analyze-requirements serve.mjs and take feedback in chat (FLOW.md step 7)`);
64
+ return;
65
+ }
66
+ console.log(`next: npx -y ${LAVISH} poll ${file} (background job; see FLOW.md step 7)`);
67
+ }
68
+
69
+ function read(args) {
70
+ const { inputs } = requirePair(args.inputs);
71
+ const feedback = JSON.parse(readFileSync(args.read, 'utf8'));
72
+ console.log(JSON.stringify(readFeedback({ inputs, feedback, guide: loadGuide() }), null, 2));
73
+ }
74
+
75
+ const args = parseArgs(process.argv.slice(2));
76
+ if (args.write && args.out) write(args);
77
+ else if (args.read && args.inputs) read(args);
78
+ else {
79
+ console.error('usage: score-review.mjs --write estimation-inputs.json --out review.html [--no-open]\n score-review.mjs --read feedback.json --inputs estimation-inputs.json');
80
+ process.exit(1);
81
+ }