@v11g/agents-rock 1.0.12 → 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 (574) 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/references/linking.md +3 -2
  51. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/build-template.mjs +9 -2
  52. package/plugins/presales/skills/estimate/workflow-based/scripts/build-workflow-template.mjs +76 -0
  53. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/build-xlsx-template.py +3 -3
  54. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/cites.mjs +60 -0
  55. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/groups.mjs +65 -0
  56. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/page-html.mjs +43 -0
  57. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/page-view.mjs +30 -4
  58. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/rollup.mjs +43 -12
  59. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/schema-components.mjs +17 -0
  60. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/schema.mjs +23 -1
  61. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/score-diff.mjs +6 -1
  62. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/score-html.mjs +23 -4
  63. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/xlsx-group-rows.mjs +20 -0
  64. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/xlsx-rows.mjs +81 -0
  65. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/xlsx-tasks.mjs +25 -0
  66. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/render.mjs +8 -10
  67. package/plugins/presales/skills/estimate/workflow-based/scripts/score-review.mjs +81 -0
  68. package/plugins/presales/skills/estimate/workflow-based/scripts/template/cites.js +46 -0
  69. package/plugins/presales/skills/estimate/workflow-based/scripts/template/effort.css +22 -0
  70. package/plugins/presales/skills/estimate/workflow-based/scripts/template/effort.mjs +37 -0
  71. package/plugins/presales/skills/estimate/workflow-based/scripts/template/estimate-page.css +10 -0
  72. package/plugins/presales/skills/estimate/workflow-based/scripts/template/estimate-page.js +16 -0
  73. package/plugins/presales/skills/estimate/workflow-based/scripts/template/feature-tasks.js +33 -0
  74. package/plugins/presales/skills/estimate/workflow-based/scripts/template/lavish.mjs +39 -0
  75. package/plugins/presales/skills/estimate/workflow-based/scripts/template/tasks.css +25 -0
  76. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/view.js +21 -2
  77. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/also-builds-browser.test.mjs +6 -4
  78. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/browser.test.mjs +10 -7
  79. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/build-pages.test.mjs +10 -15
  80. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/build-template.test.mjs +6 -2
  81. package/plugins/presales/skills/estimate/workflow-based/scripts/test/cites.test.mjs +64 -0
  82. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/cli.test.mjs +1 -0
  83. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/estimator-system.test.mjs +5 -5
  84. package/plugins/presales/skills/estimate/workflow-based/scripts/test/feature-tasks-browser.test.mjs +39 -0
  85. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/inputs-pass.json +8 -8
  86. package/plugins/presales/skills/estimate/workflow-based/scripts/test/groups-browser.test.mjs +39 -0
  87. package/plugins/presales/skills/estimate/workflow-based/scripts/test/groups.test.mjs +156 -0
  88. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/link-picker-browser.test.mjs +1 -10
  89. package/plugins/presales/skills/estimate/workflow-based/scripts/test/open-lavish.test.mjs +54 -0
  90. package/plugins/presales/skills/estimate/workflow-based/scripts/test/page-html.test.mjs +21 -0
  91. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/pages-browser.test.mjs +25 -21
  92. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/render.test.mjs +5 -5
  93. package/plugins/presales/skills/estimate/workflow-based/scripts/test/review-effort.test.mjs +104 -0
  94. package/plugins/presales/skills/estimate/workflow-based/scripts/test/review-lavish.test.mjs +193 -0
  95. package/plugins/presales/skills/estimate/workflow-based/scripts/test/review-tasks.test.mjs +66 -0
  96. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/rollup.test.mjs +8 -0
  97. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/schema.test.mjs +18 -0
  98. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/score-review.test.mjs +10 -1
  99. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/stage.mjs +16 -8
  100. package/plugins/presales/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs +110 -0
  101. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/validate.mjs +2 -0
  102. package/plugins/{solution-architect → presales}/skills/new-lead/README.md +1 -1
  103. package/plugins/{solution-architect → presales}/skills/new-lead/SKILL.md +1 -1
  104. package/plugins/{solution-architect → presales}/skills/new-lead/evals/evals.json +13 -13
  105. package/plugins/presales/skills/proposal/README.md +63 -0
  106. package/plugins/presales/skills/proposal/SKILL.md +91 -0
  107. package/plugins/presales/skills/proposal/assets/proposal-page.html +156 -0
  108. package/plugins/presales/skills/proposal/assets/roboto-widths.json +1 -0
  109. package/plugins/{solution-architect → presales}/skills/proposal/evals/evals.json +22 -22
  110. package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation-inputs.json +35 -8
  111. package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation.json +35 -8
  112. package/plugins/presales/skills/proposal/references/build.md +33 -0
  113. package/plugins/presales/skills/proposal/references/diagrams.md +123 -0
  114. package/plugins/presales/skills/proposal/references/interview.md +66 -0
  115. package/plugins/presales/skills/proposal/references/review.md +41 -0
  116. package/plugins/{solution-architect → presales}/skills/proposal/references/workflow.md +30 -22
  117. package/plugins/presales/skills/proposal/references/writing.md +167 -0
  118. package/plugins/presales/skills/proposal/scripts/build/arrows.mjs +70 -0
  119. package/plugins/presales/skills/proposal/scripts/build/brand.mjs +43 -0
  120. package/plugins/presales/skills/proposal/scripts/build/build.mjs +75 -0
  121. package/plugins/presales/skills/proposal/scripts/build/contents.mjs +42 -0
  122. package/plugins/presales/skills/proposal/scripts/build/docx-blocks.mjs +102 -0
  123. package/plugins/presales/skills/proposal/scripts/build/docx-doc.mjs +91 -0
  124. package/plugins/presales/skills/proposal/scripts/build/docx-inline.mjs +48 -0
  125. package/plugins/presales/skills/proposal/scripts/build/docx-table.mjs +75 -0
  126. package/plugins/presales/skills/proposal/scripts/build/figures.mjs +95 -0
  127. package/plugins/presales/skills/proposal/scripts/build/html.mjs +80 -0
  128. package/plugins/presales/skills/proposal/scripts/build/layout.mjs +48 -0
  129. package/plugins/presales/skills/proposal/scripts/build/notes.mjs +30 -0
  130. package/plugins/presales/skills/proposal/scripts/build/overlap.mjs +57 -0
  131. package/plugins/presales/skills/proposal/scripts/build/page.mjs +50 -0
  132. package/plugins/presales/skills/proposal/scripts/build/pdf.mjs +88 -0
  133. package/plugins/presales/skills/proposal/scripts/build/scope-ids.mjs +10 -0
  134. package/plugins/presales/skills/proposal/scripts/build/tool.mjs +35 -0
  135. package/plugins/{solution-architect → presales}/skills/proposal/scripts/derive.mjs +7 -1
  136. package/plugins/presales/skills/proposal/scripts/diagram/align.mjs +36 -0
  137. package/plugins/presales/skills/proposal/scripts/diagram/draw.mjs +81 -0
  138. package/plugins/presales/skills/proposal/scripts/diagram/grid.mjs +90 -0
  139. package/plugins/presales/skills/proposal/scripts/diagram/icons.mjs +30 -0
  140. package/plugins/presales/skills/proposal/scripts/diagram/index.mjs +23 -0
  141. package/plugins/presales/skills/proposal/scripts/diagram/layout.mjs +42 -0
  142. package/plugins/presales/skills/proposal/scripts/diagram/obstacles.mjs +49 -0
  143. package/plugins/presales/skills/proposal/scripts/diagram/pack.mjs +101 -0
  144. package/plugins/presales/skills/proposal/scripts/diagram/route.mjs +129 -0
  145. package/plugins/presales/skills/proposal/scripts/diagram/steps.mjs +74 -0
  146. package/plugins/presales/skills/proposal/scripts/diagram/style.mjs +61 -0
  147. package/plugins/presales/skills/proposal/scripts/diagram/text.mjs +28 -0
  148. package/plugins/presales/skills/proposal/scripts/lib/bans.mjs +82 -0
  149. package/plugins/presales/skills/proposal/scripts/lib/checks-client.mjs +74 -0
  150. package/plugins/presales/skills/proposal/scripts/lib/checks-doc.mjs +78 -0
  151. package/plugins/presales/skills/proposal/scripts/lib/checks.mjs +44 -0
  152. package/plugins/presales/skills/proposal/scripts/lib/citations.mjs +45 -0
  153. package/plugins/presales/skills/proposal/scripts/lib/diagram-spec.mjs +67 -0
  154. package/plugins/presales/skills/proposal/scripts/lib/figures.mjs +79 -0
  155. package/plugins/presales/skills/proposal/scripts/lib/load.mjs +42 -0
  156. package/plugins/presales/skills/proposal/scripts/lib/money.mjs +62 -0
  157. package/plugins/presales/skills/proposal/scripts/lib/parts.mjs +83 -0
  158. package/plugins/presales/skills/proposal/scripts/lib/price-source.mjs +74 -0
  159. package/plugins/presales/skills/proposal/scripts/lib/prose.mjs +55 -0
  160. package/plugins/presales/skills/proposal/scripts/lib/workbook.mjs +86 -0
  161. package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-checks.mjs +7 -2
  162. package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-cli.mjs +16 -18
  163. package/plugins/presales/skills/proposal/scripts/lib/workflow-md.mjs +35 -0
  164. package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-view.mjs +3 -3
  165. package/plugins/presales/skills/proposal/scripts/render.mjs +55 -0
  166. package/plugins/presales/skills/proposal/scripts/test/acme.mjs +28 -0
  167. package/plugins/presales/skills/proposal/scripts/test/bans.test.mjs +59 -0
  168. package/plugins/presales/skills/proposal/scripts/test/build.test.mjs +128 -0
  169. package/plugins/presales/skills/proposal/scripts/test/diagram.test.mjs +154 -0
  170. package/plugins/presales/skills/proposal/scripts/test/docs.test.mjs +13 -0
  171. package/plugins/presales/skills/proposal/scripts/test/e2e.test.mjs +20 -0
  172. package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/evals-fixtures.test.mjs +8 -5
  173. package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/figures.test.mjs +29 -1
  174. package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/diagrams/aws-on-neutral.json +60 -0
  175. package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/diagrams/booking.json +61 -0
  176. package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/proposal-fail.md +49 -0
  177. package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/proposal.md +72 -0
  178. package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/references.json +5 -0
  179. package/plugins/presales/skills/proposal/scripts/test/fixtures/workbook-recalculated.xlsx +0 -0
  180. package/plugins/presales/skills/proposal/scripts/test/fixtures/workbook-unrecalculated.xlsx +0 -0
  181. package/plugins/presales/skills/proposal/scripts/test/layout.test.mjs +89 -0
  182. package/plugins/presales/skills/proposal/scripts/test/parts.test.mjs +112 -0
  183. package/plugins/presales/skills/proposal/scripts/test/prices.test.mjs +122 -0
  184. package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/quality-gates.test.mjs +1 -1
  185. package/plugins/presales/skills/proposal/scripts/test/steps.test.mjs +38 -0
  186. package/plugins/presales/skills/proposal/scripts/test/validate.test.mjs +46 -0
  187. package/plugins/presales/skills/proposal/scripts/test/workbook.test.mjs +76 -0
  188. package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/workflow-checks.test.mjs +7 -2
  189. package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/workflow-view.test.mjs +15 -10
  190. package/plugins/{solution-architect → presales}/skills/proposal/scripts/validate.mjs +8 -3
  191. package/src/cli/install.mjs +18 -2
  192. package/src/cli/registry.mjs +8 -0
  193. package/src/cli/targets.mjs +4 -2
  194. package/src/cli/uninstall.mjs +11 -1
  195. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_data.cpython-312.pyc +0 -0
  196. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_layout.cpython-312.pyc +0 -0
  197. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_page.cpython-312.pyc +0 -0
  198. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_checks.cpython-312.pyc +0 -0
  199. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_render.cpython-312.pyc +0 -0
  200. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/validate.cpython-312.pyc +0 -0
  201. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_body.cpython-312.pyc +0 -0
  202. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_flow.cpython-312.pyc +0 -0
  203. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_package.cpython-312.pyc +0 -0
  204. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_xml.cpython-312.pyc +0 -0
  205. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_quotes.cpython-312.pyc +0 -0
  206. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_rules.cpython-312.pyc +0 -0
  207. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_schema.cpython-312.pyc +0 -0
  208. package/plugins/solution-architect/.claude-plugin/plugin.json +0 -9
  209. package/plugins/solution-architect/skills/estimate/shared/assets/xlsx-export.js +0 -336
  210. package/plugins/solution-architect/skills/estimate/workflow-based/FLOW.md +0 -91
  211. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-components.html +0 -1058
  212. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-components-template.mjs +0 -80
  213. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-workflow-template.mjs +0 -51
  214. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-html.mjs +0 -44
  215. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/xlsx-rows.mjs +0 -51
  216. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/score-review.mjs +0 -46
  217. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs +0 -58
  218. package/plugins/solution-architect/skills/proposal/README.md +0 -51
  219. package/plugins/solution-architect/skills/proposal/SKILL.md +0 -69
  220. package/plugins/solution-architect/skills/proposal/assets/proposal-template.html +0 -82
  221. package/plugins/solution-architect/skills/proposal/assets/proposal-workflow.html +0 -143
  222. package/plugins/solution-architect/skills/proposal/references/interview.md +0 -60
  223. package/plugins/solution-architect/skills/proposal/references/review.md +0 -40
  224. package/plugins/solution-architect/skills/proposal/references/writing.md +0 -104
  225. package/plugins/solution-architect/skills/proposal/scripts/lib/checks-client.mjs +0 -58
  226. package/plugins/solution-architect/skills/proposal/scripts/lib/checks-doc.mjs +0 -64
  227. package/plugins/solution-architect/skills/proposal/scripts/lib/checks.mjs +0 -21
  228. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-body.mjs +0 -42
  229. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-package.mjs +0 -56
  230. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-xml.mjs +0 -44
  231. package/plugins/solution-architect/skills/proposal/scripts/lib/figures.mjs +0 -34
  232. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-html.mjs +0 -39
  233. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-page.mjs +0 -30
  234. package/plugins/solution-architect/skills/proposal/scripts/render.mjs +0 -64
  235. package/plugins/solution-architect/skills/proposal/scripts/test/checks-client.test.mjs +0 -147
  236. package/plugins/solution-architect/skills/proposal/scripts/test/checks-doc.test.mjs +0 -152
  237. package/plugins/solution-architect/skills/proposal/scripts/test/docs.test.mjs +0 -57
  238. package/plugins/solution-architect/skills/proposal/scripts/test/docx.test.mjs +0 -68
  239. package/plugins/solution-architect/skills/proposal/scripts/test/e2e.test.mjs +0 -30
  240. package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-fail.md +0 -27
  241. package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-pass.md +0 -51
  242. package/plugins/solution-architect/skills/proposal/scripts/test/render.test.mjs +0 -70
  243. package/plugins/solution-architect/skills/proposal/scripts/test/validate.test.mjs +0 -41
  244. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-browser.test.mjs +0 -96
  245. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-docs.test.mjs +0 -25
  246. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-render.test.mjs +0 -75
  247. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/case.yaml +0 -0
  248. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/fixture.sh +0 -0
  249. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/inputs-written.md +0 -0
  250. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/no-proposal-md.md +0 -0
  251. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/skill-fired.md +0 -0
  252. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/validate-then-render.md +0 -0
  253. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/prompt.md +0 -0
  254. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/case.yaml +0 -0
  255. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/fixture.sh +0 -0
  256. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/no-classic-fallback.md +0 -0
  257. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/nothing-written.md +0 -0
  258. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/skill-fired.md +0 -0
  259. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/stops-at-gate.md +0 -0
  260. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/prompt.md +0 -0
  261. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/case.yaml +0 -0
  262. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/fixture.sh +0 -0
  263. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/no-estimation-md.md +0 -0
  264. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/pages-or-stop.md +0 -0
  265. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/routed-to-workflow.md +0 -0
  266. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/skill-fired.md +0 -0
  267. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/three-questions-max.md +0 -0
  268. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/prompt.md +0 -0
  269. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/README.md +0 -0
  270. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/SKILL.md +0 -0
  271. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/OFL.txt +0 -0
  272. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
  273. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-mono-latin-600-normal.woff2 +0 -0
  274. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-sans-latin-400-normal.woff2 +0 -0
  275. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-sans-latin-500-normal.woff2 +0 -0
  276. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-sans-latin-600-normal.woff2 +0 -0
  277. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/mermaid-theme.json +0 -0
  278. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/section-help.json +0 -0
  279. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/viewer-template.html +0 -0
  280. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.json +0 -0
  281. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.md +0 -0
  282. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/greenfield-llm-triage-spec/triage-service-spec.md +0 -0
  283. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/transcript-citations/C1-kickoff-call.txt +0 -0
  284. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/transcript-citations/E1-intro-email.md +0 -0
  285. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/extract.md +0 -0
  286. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/interview.md +0 -0
  287. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/likec4.md +0 -0
  288. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/project-types.md +0 -0
  289. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/quality-goals.md +0 -0
  290. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/research.md +0 -0
  291. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/rewriting.md +0 -0
  292. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/viewer.md +0 -0
  293. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/writing.md +0 -0
  294. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/ba-facts.mjs +0 -0
  295. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/check-quotes.mjs +0 -0
  296. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/drift.mjs +0 -0
  297. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/ba-package.mjs +0 -0
  298. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/cdp.mjs +0 -0
  299. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/chrome.mjs +0 -0
  300. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/companion-links.mjs +0 -0
  301. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-kinds.mjs +0 -0
  302. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-links.mjs +0 -0
  303. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-routes.mjs +0 -0
  304. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-sections.mjs +0 -0
  305. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/drift.mjs +0 -0
  306. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/embed.mjs +0 -0
  307. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/er-entities.mjs +0 -0
  308. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/fonts.mjs +0 -0
  309. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/frontmatter.mjs +0 -0
  310. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/git-diff.mjs +0 -0
  311. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/inputs.mjs +0 -0
  312. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/likec4-config.mjs +0 -0
  313. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/likec4-extract.mjs +0 -0
  314. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/likec4-steps.mjs +0 -0
  315. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-defs.mjs +0 -0
  316. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-flows.mjs +0 -0
  317. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-inline.mjs +0 -0
  318. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-links.mjs +0 -0
  319. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-list.mjs +0 -0
  320. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-render.mjs +0 -0
  321. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-shape.mjs +0 -0
  322. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-tables.mjs +0 -0
  323. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-views.mjs +0 -0
  324. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-wide.mjs +0 -0
  325. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/nav.mjs +0 -0
  326. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/offline.mjs +0 -0
  327. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/port.mjs +0 -0
  328. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/quality-gate.mjs +0 -0
  329. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/section-help.mjs +0 -0
  330. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/slug-registry.mjs +0 -0
  331. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/state.mjs +0 -0
  332. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/strategy-sections.mjs +0 -0
  333. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-clusters.mjs +0 -0
  334. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-deployment.mjs +0 -0
  335. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-elections.mjs +0 -0
  336. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-links.mjs +0 -0
  337. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-model-tables.mjs +0 -0
  338. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-palette.mjs +0 -0
  339. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-provenance.mjs +0 -0
  340. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-quotes.mjs +0 -0
  341. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-strategy.mjs +0 -0
  342. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-tree.mjs +0 -0
  343. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/likec4-config.mjs +0 -0
  344. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/likec4-export.mjs +0 -0
  345. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/likec4-gen.mjs +0 -0
  346. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/record.mjs +0 -0
  347. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/render.mjs +0 -0
  348. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/serve.mjs +0 -0
  349. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/ba-package.test.mjs +0 -0
  350. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/companion-links.test.mjs +0 -0
  351. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-kinds.test.mjs +0 -0
  352. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-links.test.mjs +0 -0
  353. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-routes.test.mjs +0 -0
  354. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-sections.test.mjs +0 -0
  355. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/drift.test.mjs +0 -0
  356. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/embed.test.mjs +0 -0
  357. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/er-entities.test.mjs +0 -0
  358. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/extract-workflow.test.mjs +0 -0
  359. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/ARCHITECTURE.md +0 -0
  360. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/c4-src/broken/model.c4 +0 -0
  361. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/c4-src/pass/model.c4 +0 -0
  362. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/docs/adr/0001-sample.md +0 -0
  363. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/docs/estimate.html +0 -0
  364. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/docs/estimation.md +0 -0
  365. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/model-broken.json +0 -0
  366. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/model.json +0 -0
  367. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/threat-model.md +0 -0
  368. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/sample-model.json +0 -0
  369. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/sample.c4 +0 -0
  370. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fonts.test.mjs +0 -0
  371. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/frontmatter.test.mjs +0 -0
  372. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/git-diff.test.mjs +0 -0
  373. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-config.test.mjs +0 -0
  374. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-extract.test.mjs +0 -0
  375. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-steps.test.mjs +0 -0
  376. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-flows.test.mjs +0 -0
  377. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-links.test.mjs +0 -0
  378. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-provenance.test.mjs +0 -0
  379. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-render.test.mjs +0 -0
  380. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-tables.test.mjs +0 -0
  381. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-views.test.mjs +0 -0
  382. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-wide.test.mjs +0 -0
  383. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/nav.test.mjs +0 -0
  384. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/offline.test.mjs +0 -0
  385. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/quality-gate.test.mjs +0 -0
  386. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/quality-gates.test.mjs +0 -0
  387. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/research-workflow.test.mjs +0 -0
  388. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/rewriting.test.mjs +0 -0
  389. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/section-help.test.mjs +0 -0
  390. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/serve.test.mjs +0 -0
  391. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/state.test.mjs +0 -0
  392. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-clusters.test.mjs +0 -0
  393. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-deployment.test.mjs +0 -0
  394. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-elections.test.mjs +0 -0
  395. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-links.test.mjs +0 -0
  396. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-model-tables.test.mjs +0 -0
  397. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-provenance.test.mjs +0 -0
  398. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-quotes.test.mjs +0 -0
  399. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-strategy.test.mjs +0 -0
  400. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-tree.test.mjs +0 -0
  401. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/viewer-template.test.mjs +0 -0
  402. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/validate.mjs +0 -0
  403. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/workflows/extract.js +0 -0
  404. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/workflows/research.js +0 -0
  405. /package/plugins/{solution-architect → presales}/skills/estimate/SKILL.md +0 -0
  406. /package/plugins/{solution-architect → presales}/skills/estimate/classic/FLOW.md +0 -0
  407. /package/plugins/{solution-architect → presales}/skills/estimate/classic/assets/estimate-template-agentic.html +0 -0
  408. /package/plugins/{solution-architect → presales}/skills/estimate/classic/assets/estimate-template.html +0 -0
  409. /package/plugins/{solution-architect → presales}/skills/estimate/classic/assets/scores-review-template.html +0 -0
  410. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/agentic-estimation.md +0 -0
  411. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/ai-multipliers.md +0 -0
  412. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/interview.md +0 -0
  413. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/scoring-guide.md +0 -0
  414. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/slicing.md +0 -0
  415. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/task-shapes.md +0 -0
  416. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/techniques.md +0 -0
  417. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/compute.mjs +0 -0
  418. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/agentic-checks.mjs +0 -0
  419. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/checks.mjs +0 -0
  420. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/components.mjs +0 -0
  421. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/md-tables.mjs +0 -0
  422. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/redact.mjs +0 -0
  423. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/rollup.mjs +0 -0
  424. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/schema.mjs +0 -0
  425. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/score-csv.mjs +0 -0
  426. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/score-html.mjs +0 -0
  427. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/scoring-checks.mjs +0 -0
  428. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/render.mjs +0 -0
  429. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/score-review.mjs +0 -0
  430. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/baselines.test.mjs +0 -0
  431. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/browser-agentic.test.mjs +0 -0
  432. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/browser.test.mjs +0 -0
  433. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/compute.test.mjs +0 -0
  434. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/e2e.test.mjs +0 -0
  435. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/agentic-estimation-fail.md +0 -0
  436. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/agentic-estimation-pass.md +0 -0
  437. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/agentic-inputs.json +0 -0
  438. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/booking-inputs.json +0 -0
  439. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/estimation-fail.md +0 -0
  440. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/estimation-pass.md +0 -0
  441. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/measurements.jsonl +0 -0
  442. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/measurements.test.mjs +0 -0
  443. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/pricing.test.mjs +0 -0
  444. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/quality-gates.test.mjs +0 -0
  445. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/references.test.mjs +0 -0
  446. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/render.test.mjs +0 -0
  447. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/schema.test.mjs +0 -0
  448. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/score-review.test.mjs +0 -0
  449. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/scoring.test.mjs +0 -0
  450. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/url-state.test.mjs +0 -0
  451. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/validate.test.mjs +0 -0
  452. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/zip-store.test.mjs +0 -0
  453. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/zip.mjs +0 -0
  454. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/validate.mjs +0 -0
  455. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/gate-check-northgate/northgate-email.md +0 -0
  456. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-agentic-halyard/measurements.jsonl +0 -0
  457. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-agentic-halyard/requirements.json +0 -0
  458. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-agentic-halyard/requirements.md +0 -0
  459. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-traditional-trellis/ARCHITECTURE.md +0 -0
  460. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-traditional-trellis/requirements.json +0 -0
  461. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-traditional-trellis/requirements.md +0 -0
  462. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +0 -0
  463. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.json +0 -0
  464. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.md +0 -0
  465. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/agentic-task-schema.mjs +0 -0
  466. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/baselines.mjs +0 -0
  467. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/context-schema.mjs +0 -0
  468. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/estimate-math.mjs +0 -0
  469. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/inline.mjs +0 -0
  470. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/measurements.mjs +0 -0
  471. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/pricing.mjs +0 -0
  472. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/score-diff.mjs +0 -0
  473. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/scoring-schema.mjs +0 -0
  474. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/scoring.mjs +0 -0
  475. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/zip.mjs +0 -0
  476. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/references/hidden-work-by-type.md +0 -0
  477. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/compute.mjs +0 -0
  478. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/pair-findings.mjs +0 -0
  479. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/requirements.mjs +0 -0
  480. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/also-builds.css +0 -0
  481. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/also-builds.js +0 -0
  482. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/arch-link.js +0 -0
  483. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/click.js +0 -0
  484. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/link-picker.css +0 -0
  485. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/link-picker.js +0 -0
  486. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/prelude.js +0 -0
  487. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/ARCHITECTURE-mini.md +0 -0
  488. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/feedback.json +0 -0
  489. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/measurements.jsonl +0 -0
  490. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/requirements.json +0 -0
  491. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/page-view.test.mjs +0 -0
  492. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/quality-gates.test.mjs +0 -0
  493. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/requirements.test.mjs +0 -0
  494. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/workflow-script.test.mjs +0 -0
  495. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/detail.html +0 -0
  496. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/index.html +0 -0
  497. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/start.sh +0 -0
  498. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/stats.mjs +0 -0
  499. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/vendor/reactflow-bundle.js +0 -0
  500. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/vendor-build/entry.jsx +0 -0
  501. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/vendor-build/package-lock.json +0 -0
  502. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/vendor-build/package.json +0 -0
  503. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/ARCHITECTURE.md +0 -0
  504. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/brief.md +0 -0
  505. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/dist/index.html +0 -0
  506. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/estimation.json +0 -0
  507. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/proposal.md +0 -0
  508. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/requirements.json +0 -0
  509. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/sable-dental-booking/rfp.md +0 -0
  510. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/vellum-books-checkout/ARCHITECTURE.md +0 -0
  511. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/vellum-books-checkout/rfp.md +0 -0
  512. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads.json +0 -0
  513. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/fresh-lead-northwind/rfp-northwind.md +0 -0
  514. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/skips-to-proposal/leads/meridian-freight-portal/rfp.md +0 -0
  515. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/skips-to-proposal/leads.json +0 -0
  516. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/init-root.mjs +0 -0
  517. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lead-upsert.mjs +0 -0
  518. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/enrich.mjs +0 -0
  519. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/map-nodes.mjs +0 -0
  520. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/map.mjs +0 -0
  521. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/port.mjs +0 -0
  522. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/registry.mjs +0 -0
  523. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/serve.mjs +0 -0
  524. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/e2e-workspace.test.mjs +0 -0
  525. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/enrich.test.mjs +0 -0
  526. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/ARCHITECTURE.md +0 -0
  527. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/brief.md +0 -0
  528. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/dist/index.html +0 -0
  529. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/dist/proposal-non-tech.html +0 -0
  530. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/dist/threat-model.html +0 -0
  531. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/estimation-inputs.json +0 -0
  532. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/estimation.json +0 -0
  533. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/notes.md +0 -0
  534. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/proposal-non-tech.md +0 -0
  535. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/rfp.md +0 -0
  536. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads.json +0 -0
  537. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/init-root.test.mjs +0 -0
  538. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/lead-upsert.test.mjs +0 -0
  539. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/map.test.mjs +0 -0
  540. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/port.test.mjs +0 -0
  541. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/registry-io.test.mjs +0 -0
  542. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/registry.test.mjs +0 -0
  543. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/serve.test.mjs +0 -0
  544. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/stats.test.mjs +0 -0
  545. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/validate-cli.test.mjs +0 -0
  546. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/vendor-bundle.test.mjs +0 -0
  547. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/validate.mjs +0 -0
  548. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-rivet-gym/ARCHITECTURE.md +0 -0
  549. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-rivet-gym/brief.md +0 -0
  550. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/ARCHITECTURE.md +0 -0
  551. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/brief.md +0 -0
  552. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/estimation-inputs.json +0 -0
  553. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/estimation.json +0 -0
  554. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/ARCHITECTURE.md +0 -0
  555. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/brief.md +0 -0
  556. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/dist/mermaid.js +0 -0
  557. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation-inputs.json +0 -0
  558. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation.json +0 -0
  559. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation.md +0 -0
  560. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/ARCHITECTURE.md +0 -0
  561. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/brief.md +0 -0
  562. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/dist/mermaid.js +0 -0
  563. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation-inputs.json +0 -0
  564. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation.json +0 -0
  565. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation.md +0 -0
  566. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +0 -0
  567. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/measurements.jsonl +0 -0
  568. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/requirements.json +0 -0
  569. /package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/jargon.mjs +0 -0
  570. /package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/sections.mjs +0 -0
  571. /package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-lead.mjs +0 -0
  572. /package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/fixtures/proposal-inputs-pass.json +0 -0
  573. /package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/workflow-stage.mjs +0 -0
  574. /package/plugins/{solution-architect → presales}/workflows/review-links.js +0 -0
@@ -1,34 +0,0 @@
1
- // Client-facing figures derived from estimation.json — the proposal never
2
- // invents a number. The range is the estimate's own presented range, so the
3
- // proposal and the workbook always quote the same figures. Milestone splits
4
- // follow the roadmap's effort shares; there are no durations, because the
5
- // estimate produces none.
6
- export const round100 = (n) => Math.round(n / 100) * 100;
7
- export const formatMoney = (n) => `$${n.toLocaleString('en-US')}`;
8
-
9
- const split = (cost, share) => ({ low: round100(cost.low * share), high: round100(cost.high * share) });
10
-
11
- // The rows sit above a bold Total line the client reads against them, so
12
- // they must add up to it exactly: every milestone but the last is its share
13
- // rounded to $100, and the last takes whatever remains (R59).
14
- function splitCosts(cost, roadmap) {
15
- if (roadmap.length === 0) return [];
16
- const heads = roadmap.slice(0, -1).map((b) => split(cost, b.share));
17
- const taken = (bound) => heads.reduce((sum, c) => sum + c[bound], 0);
18
- return [...heads, { low: cost.low - taken('low'), high: cost.high - taken('high') }];
19
- }
20
-
21
- export function deriveFigures(estimation) {
22
- const { price, roadmap } = estimation.computed;
23
- if (!price || price.p50 === 0) {
24
- throw new Error('estimate is not priced (no scored features) — a proposal cannot quote it');
25
- }
26
- const cost = { low: price.presentLow, high: price.presentHigh };
27
- const bands = roadmap ?? [];
28
- const costs = splitCosts(cost, bands);
29
- return {
30
- cost,
31
- singleNumber: price.singleNumber,
32
- milestones: bands.map((b, i) => ({ name: b.milestone, cost: costs[i], share: b.share })),
33
- };
34
- }
@@ -1,39 +0,0 @@
1
- // The workflow proposal's body and menu, rendered in Node from the page data
2
- // (workflow-view.mjs), so the page script only draws diagrams and builds the
3
- // downloads. Every value goes through esc().
4
- import { escapeHtml as esc } from '../../../analyze-requirements/scripts/lib/md-render.mjs';
5
-
6
- const para = (text) => (text ? `<p>${esc(text)}</p>` : '');
7
- const cells = (tag, row) => row.map((c) => `<${tag}>${esc(c)}</${tag}>`).join('');
8
- const table = (head, rows) => `<table><thead><tr>${cells('th', head)}</tr></thead><tbody>${rows.map((r) => `<tr>${cells('td', r)}</tr>`).join('')}</tbody></table>`;
9
- const bullets = (items) => `<ul>${items.map((t) => `<li>${esc(t)}</li>`).join('')}</ul>`;
10
- const flowHtml = (f) => `<p class="flow-name">${esc(f.label)}</p><div class="diagram-shell"><div class="mermaid-canvas">${esc(f.code)}</div></div>`;
11
-
12
- function scopeHtml({ scope }) {
13
- const head = scope.mapLabel ? ['System', scope.mapLabel] : ['System'];
14
- const rows = scope.systems.map((s) => (scope.mapLabel ? [s.name, s.map] : [s.name]));
15
- return `<section id="scope"><h2>Scope: what this proposal covers</h2>${para(scope.intro)}${table(head, rows)}${para(scope.outLine)}</section>`;
16
- }
17
-
18
- function systemHtml(s) {
19
- const features = table(['Feature', 'What it does'], s.features.map((f) => [f.name, f.does]));
20
- return `<section id="${s.anchor}" class="system"><h2><span class="sysno">System ${s.no}:</span> ${esc(s.name)}</h2>${para(s.purpose)}${para(s.extra)}${s.flows.map(flowHtml).join('')}${features}</section>`;
21
- }
22
-
23
- function closingHtml({ milestones, register, cost }) {
24
- const ms = table(['Milestone', 'Includes', 'What it demonstrates'], milestones.rows.map((m) => [m.title, m.includes, m.demonstrates]));
25
- const price = (label, value, note) => `<div><span>${esc(label)}</span><b>${esc(value)}</b><span>${esc(note)}</span></div>`;
26
- return `<section id="milestones"><h2>Milestones</h2>${para(milestones.lead)}${ms}</section>`
27
- + `<section id="register"><h2>Assumptions &amp; exclusions</h2>${para(register.lead)}<h3>Assumptions</h3>${bullets(register.assumptions)}<h3>Exclusions</h3>${bullets(register.exclusions)}</section>`
28
- + `<section id="cost"><h2>Cost estimate</h2>${para(cost.lead)}<div class="price">${price('Range', cost.range, cost.rangeNote)}${price('If one fixed number is needed', cost.single, cost.singleNote)}</div></section>`;
29
- }
30
-
31
- export function contentHtml(view) {
32
- return `<h1>${esc(view.title)}</h1><p class="byline">${esc(view.byline)}</p>${scopeHtml(view)}${view.systems.map(systemHtml).join('')}${closingHtml(view)}`;
33
- }
34
-
35
- export function navHtml(view) {
36
- const links = [['scope', 'Scope'], ...view.systems.map((s) => [s.anchor, `System ${s.no}: ${s.name}`]),
37
- ['milestones', 'Milestones'], ['register', 'Assumptions & exclusions'], ['cost', 'Cost estimate']];
38
- return links.map(([id, text]) => `<a href="#${id}">${esc(text)}</a>`).join('\n');
39
- }
@@ -1,30 +0,0 @@
1
- // Fills the workflow proposal template: the body and menu rendered in Node,
2
- // the page data for the DOCX, the mermaid bundle, and the DOCX writer (the
3
- // shared zip writer plus the three docx modules, imports stripped).
4
- import { readFileSync } from 'node:fs';
5
- import { embed } from '../../../analyze-requirements/scripts/lib/embed.mjs';
6
- import { buildFontFaces } from '../../../analyze-requirements/scripts/lib/fonts.mjs';
7
- import { escapeHtml } from '../../../analyze-requirements/scripts/lib/md-render.mjs';
8
- import { inlineModule, withZip } from '../../../estimate/shared/lib/inline.mjs';
9
- import { contentHtml, navHtml } from './workflow-html.mjs';
10
-
11
- const here = (rel) => new URL(rel, import.meta.url);
12
- const DOCX_MODULES = ['./docx-xml.mjs', './docx-body.mjs', './docx-package.mjs'];
13
- const noImports = (src) => src.replace(/^import [^\n]*\n/gm, '');
14
-
15
- export const docxScript = () => withZip(DOCX_MODULES.map((m) => inlineModule(noImports(readFileSync(here(m), 'utf8')))).join('\n'));
16
-
17
- // Every "<" escaped: nothing in the data can close or comment out its script tag.
18
- const island = (value) => JSON.stringify(value).replaceAll('<', '\\u003c');
19
-
20
- export function workflowPage({ view, bundle }) {
21
- return embed({
22
- template: readFileSync(here('../../assets/proposal-workflow.html'), 'utf8'),
23
- slots: {
24
- TITLE: escapeHtml(`Proposal — ${view.client}`),
25
- FONTS: buildFontFaces(here('../../../analyze-requirements/assets/fonts/').pathname),
26
- NAV: navHtml(view), CONTENT: contentHtml(view), DATA: island(view),
27
- MERMAID_BUNDLE: bundle, DOCX: docxScript(),
28
- },
29
- });
30
- }
@@ -1,64 +0,0 @@
1
- import { readFileSync, writeFileSync } from 'node:fs';
2
- import { join } from 'node:path';
3
- import { embed } from '../../analyze-requirements/scripts/lib/embed.mjs';
4
- import { buildFontFaces } from '../../analyze-requirements/scripts/lib/fonts.mjs';
5
- import { renderMarkdown, escapeHtml } from '../../analyze-requirements/scripts/lib/md-render.mjs';
6
- import { parseFrontmatter } from '../../analyze-requirements/scripts/lib/frontmatter.mjs';
7
- import { checkProposal } from './lib/checks.mjs';
8
- import { isWorkflow } from './lib/workflow-lead.mjs';
9
- import { renderWorkflow } from './lib/workflow-cli.mjs';
10
-
11
- function parseArgs(argv) {
12
- const args = {};
13
- for (let i = 0; i < argv.length; i += 1) {
14
- if (argv[i].startsWith('--')) args[argv[i].slice(2)] = argv[++i];
15
- }
16
- return args;
17
- }
18
-
19
- const archFontsDir = new URL('../../analyze-requirements/assets/fonts/', import.meta.url).pathname;
20
- const templatePath = new URL('../assets/proposal-template.html', import.meta.url).pathname;
21
-
22
- const args = parseArgs(process.argv.slice(2));
23
- const estimation = JSON.parse(readFileSync(args.estimation, 'utf8'));
24
- // A workflow-mode estimate gets the Systems & Workflows page (spec 4); no proposal.md.
25
- if (isWorkflow(estimation)) process.exit(renderWorkflow(args));
26
- const md = readFileSync(args.md, 'utf8');
27
-
28
- // Validation blocks rendering — same hard rule as the estimate skill,
29
- // enforced in code with no skip flag.
30
- const findings = checkProposal({ md, estimation });
31
- if (findings.length) {
32
- console.error(findings.join('\n'));
33
- process.exit(1);
34
- }
35
-
36
- if (typeof args['mermaid-bundle'] !== 'string') {
37
- console.error('--mermaid-bundle is required (see analyze-requirements references/viewer.md §1)');
38
- process.exit(1);
39
- }
40
- const bundle = readFileSync(args['mermaid-bundle'], 'utf8');
41
- if (bundle.includes('</script')) {
42
- console.error('mermaid bundle carries a literal </script — rebuild it (analyze-requirements references/viewer.md §1)');
43
- process.exit(1);
44
- }
45
-
46
- const { data: fm } = parseFrontmatter(md);
47
- const { html: content, headings } = renderMarkdown(md);
48
- const nav = headings.filter((h) => h.level === 2)
49
- .map((h) => `<a href="#${h.slug}">${escapeHtml(h.text)}</a>`).join('\n');
50
-
51
- const html = embed({
52
- template: readFileSync(templatePath, 'utf8'),
53
- slots: {
54
- TITLE: escapeHtml(`Proposal — ${fm.client}`),
55
- FONTS: buildFontFaces(archFontsDir),
56
- NAV: nav,
57
- CONTENT: content,
58
- MERMAID_BUNDLE: bundle,
59
- },
60
- });
61
-
62
- const outPath = join(args.out, 'proposal.html');
63
- writeFileSync(outPath, html);
64
- console.log(outPath);
@@ -1,147 +0,0 @@
1
- import { test } from 'node:test';
2
- import assert from 'node:assert/strict';
3
- import { checkClient } from '../lib/checks-client.mjs';
4
- import { checkProposal } from '../lib/checks.mjs';
5
- import { parseFrontmatter } from '../../../analyze-requirements/scripts/lib/frontmatter.mjs';
6
- import { JARGON } from '../lib/jargon.mjs';
7
-
8
- // Synthetic estimation in the new price/roadmap shape (same as
9
- // figures.test.mjs): figures are cost 8000/12000, singleNumber 10000,
10
- // M1 6000/9000, M2 2000/3000.
11
- const estimation = {
12
- inputs: { features: [] },
13
- computed: {
14
- price: { presentLow: 8000, presentHigh: 12000, singleNumber: 10000, p50: 7998 },
15
- roadmap: [
16
- { milestone: 'M1', features: ['a'], share: 0.75 },
17
- { milestone: 'M2', features: ['b'], share: 0.25 },
18
- ],
19
- },
20
- };
21
-
22
- const md = `---
23
- client: Acme Corp
24
- client_tech_level: non-tech
25
- currency: USD
26
- valid_until: 2099-12-31
27
- source_architecture: ../ARCHITECTURE.md
28
- source_estimation: ../estimation.json
29
- ---
30
-
31
- ## Executive Summary
32
- New booking system for $8,000 – $12,000.
33
- ## Background & Objectives
34
- Bookings are manual today.
35
- ## Proposed Solution
36
- \`\`\`mermaid
37
- graph LR; A[Your customers] --> B[New system]
38
- \`\`\`
39
- ## Scope
40
- | Feature | What you get |
41
- | --- | --- |
42
- | Booking | Online appointments |
43
- ## Out of Scope & Assumptions
44
- - Text-message reminders are out.
45
- ## Delivery Approach
46
- M1 covers booking; M2 covers notifications. Weekly demos.
47
- ## Investment & Timeline
48
- | Milestone | Investment |
49
- | --- | --- |
50
- | M1 | $6,000 – $9,000 |
51
- | M2 | $2,000 – $3,000 |
52
-
53
- Total: $8,000 – $12,000.
54
- ## About Code Engine Studio
55
- We build software. Contact: hello@example.com
56
- ## Next Steps
57
- Valid until 2099-12-31. Reply to accept.
58
- `;
59
-
60
- // checkClient takes already-parsed frontmatter — parse fresh for each
61
- // variant so tests that edit the frontmatter block (jargon_allow, tech
62
- // level) see their own change.
63
- const run = (doc) => {
64
- const { data: fm } = parseFrontmatter(doc);
65
- return checkClient({ md: doc, fm, estimation }, []);
66
- };
67
-
68
- test('a document whose numbers all trace to the figures passes', () => {
69
- assert.deepEqual(run(md), []);
70
- });
71
-
72
- test('an invented money amount is a finding', () => {
73
- assert.ok(run(md.replace('$6,000', '$6,500')).some((f) => f.includes('6,500') || f.includes('6500')));
74
- });
75
-
76
- test('the headline cost range must be present', () => {
77
- const noTotals = md.replace('New booking system for $8,000 – $12,000.', 'A fair price for a new booking system.');
78
- const findings = run(noTotals);
79
- assert.ok(findings.some((f) => f.includes('8,000')));
80
- assert.ok(findings.some((f) => f.includes('12,000')));
81
- });
82
-
83
- test('headline ranges must live in the Executive Summary itself', () => {
84
- const buried = md.replace('New booking system for $8,000 – $12,000.', 'A fair price, fast.');
85
- const findings = run(buried);
86
- assert.ok(findings.some((f) => /Executive Summary/.test(f)));
87
- });
88
-
89
- test('provenance markup is a leak', () => {
90
- assert.ok(run(md.replace('| Feature | What you get |', '| Feature | src |')).some((f) => f.includes('src')));
91
- assert.ok(run(md.replace('Weekly demos.', '| observed |')).some((f) => f.includes('observed')));
92
- });
93
-
94
- test('stated and proposed provenance cells are leaks too', () => {
95
- assert.ok(run(md.replace('Weekly demos.', '| proposed |')).some((f) => f.includes('proposed')));
96
- });
97
-
98
- test('non-tech jargon fails, jargon_allow overrides per term', () => {
99
- const jargony = md.replace('Weekly demos.', 'We deploy the API to Kubernetes.');
100
- const findings = run(jargony);
101
- assert.ok(findings.some((f) => /kubernetes/i.test(f)));
102
- assert.ok(findings.some((f) => /\bapi\b/i.test(f)));
103
- const allowed = jargony.replace('valid_until: 2099-12-31', 'valid_until: 2099-12-31\njargon_allow: ["api", "kubernetes"]');
104
- assert.deepEqual(run(allowed), []);
105
- });
106
-
107
- test('technical clients skip the jargon scan; the About section is exempt', () => {
108
- const techDoc = md.replace('client_tech_level: non-tech', 'client_tech_level: technical')
109
- .replace('Weekly demos.', 'We deploy the API to Kubernetes.');
110
- assert.deepEqual(run(techDoc), []);
111
- const aboutJargon = md.replace('We build software.', 'We build software and Kubernetes platforms.');
112
- assert.deepEqual(run(aboutJargon), []);
113
- });
114
-
115
- test('plural jargon is still jargon', () => {
116
- const plural = md.replace('Weekly demos.', 'We expose several endpoints.');
117
- assert.ok(run(plural).some((f) => /endpoint/i.test(f)));
118
- });
119
-
120
- test('the deny-list is lowercase and non-trivial', () => {
121
- assert.ok(JARGON.length >= 12);
122
- for (const term of JARGON) assert.equal(term, term.toLowerCase());
123
- });
124
-
125
- // This one is about the whole pipeline's crash-safety on a document with no
126
- // frontmatter at all, not about client-safety specifically — checkProposal
127
- // returns early before ever touching estimation shape, so it stays safe
128
- // regardless of the scenario-vs-price schema.
129
- test('a document with no frontmatter is a finding, not a crash', () => {
130
- assert.deepEqual(checkProposal({ md: '## Executive Summary\nHi.', estimation, today: new Date('2026-08-06') }),
131
- ['frontmatter: no frontmatter block']);
132
- });
133
-
134
- // R55/load-bearing: checkProposal must run the client-safety checks itself —
135
- // frontmatter no longer carries a scenario key to gate on, so checkClient
136
- // has to run whenever the estimate is priced. Break the gate in checks.mjs
137
- // (e.g. restore the old `fm.scenario && estimation.computed.scenarios[...]`
138
- // condition) and this test goes red because the invented figure below is
139
- // never caught.
140
- test('checkProposal refuses an invented money figure through the pipeline', () => {
141
- const invented = md.replace(
142
- 'New booking system for $8,000 – $12,000.',
143
- 'New booking system for $8,000 – $12,000, plus a $6,500 setup fee.',
144
- );
145
- const findings = checkProposal({ md: invented, estimation, today: new Date('2026-08-06') });
146
- assert.ok(findings.some((f) => f.includes('6,500')), findings.join('\n'));
147
- });
@@ -1,152 +0,0 @@
1
- import { test } from 'node:test';
2
- import assert from 'node:assert/strict';
3
- import { sectionText, tables, SECTIONS } from '../lib/sections.mjs';
4
- import { checkDoc } from '../lib/checks-doc.mjs';
5
-
6
- const TODAY = new Date('2026-08-06');
7
-
8
- function validFm() {
9
- return {
10
- client: 'Acme Corp',
11
- client_tech_level: 'non-tech',
12
- currency: 'USD',
13
- valid_until: '2099-12-31',
14
- source_architecture: '../ARCHITECTURE.md',
15
- source_estimation: '../estimation.json',
16
- };
17
- }
18
-
19
- function fullDoc() {
20
- return `
21
- ## Executive Summary
22
-
23
- We fix scheduling for $8,000 – $12,000.
24
-
25
- ## Background & Objectives
26
-
27
- Bookings are manual today.
28
-
29
- ## Proposed Solution
30
-
31
- \`\`\`mermaid
32
- graph LR; A[You] --> B[New system]
33
- \`\`\`
34
-
35
- ## Scope
36
-
37
- | Feature | What you get |
38
- | --- | --- |
39
- | Booking | Online appointments |
40
-
41
- ## Out of Scope & Assumptions
42
-
43
- - SMS reminders are out.
44
-
45
- ## Delivery Approach
46
-
47
- Two milestones, weekly demos.
48
-
49
- ## Investment & Timeline
50
-
51
- | Milestone | Investment |
52
- | --- | --- |
53
- | M1 | $6,000 – $9,000 |
54
- | M2 | $2,000 – $3,000 |
55
-
56
- ## About Code Engine Studio
57
-
58
- We build software. Contact: hello@example.com
59
-
60
- ## Next Steps
61
-
62
- Valid until 2099-12-31. Reply to accept.
63
- `;
64
- }
65
-
66
- const check = ({ fm = validFm(), md = fullDoc(), today = TODAY } = {}) => checkDoc({ fm, md, today });
67
-
68
- test('a complete document produces no findings', () => {
69
- assert.deepEqual(check(), []);
70
- });
71
-
72
- test('sectionText slices one section and returns null for missing ones', () => {
73
- const md = fullDoc();
74
- assert.match(sectionText(md, 'Scope'), /Online appointments/);
75
- assert.doesNotMatch(sectionText(md, 'Scope'), /SMS reminders/);
76
- assert.equal(sectionText(md, 'Signature'), null);
77
- });
78
-
79
- test('tables groups pipe rows and drops the separator', () => {
80
- const [t] = tables(sectionText(fullDoc(), 'Scope'));
81
- assert.deepEqual(t.header, ['Feature', 'What you get']);
82
- assert.deepEqual(t.rows, [['Booking', 'Online appointments']]);
83
- });
84
-
85
- test('every missing or empty section is a finding', () => {
86
- const noScope = fullDoc().replace(/## Scope[\s\S]*?(?=## Out of Scope)/, '');
87
- assert.ok(check({ md: noScope }).some((f) => f.includes('Scope')));
88
- const emptyScope = fullDoc().replace('| Booking | Online appointments |\n', '')
89
- .replace('## Scope\n\n| Feature | What you get |\n| --- | --- |', '## Scope');
90
- assert.ok(check({ md: emptyScope }).some((f) => f.includes('Scope')));
91
- });
92
-
93
- test('frontmatter contract: missing key, bad tech level', () => {
94
- const noCurrency = validFm();
95
- delete noCurrency.currency;
96
- assert.ok(check({ fm: noCurrency }).some((f) => f.includes('currency')));
97
- assert.ok(check({ fm: { ...validFm(), client_tech_level: 'wizard' } })
98
- .some((f) => f.includes('client_tech_level')));
99
- });
100
-
101
- test('valid_until must be a future ISO date', () => {
102
- assert.ok(check({ fm: { ...validFm(), valid_until: '2020-01-01' } })
103
- .some((f) => f.includes('valid_until')));
104
- assert.ok(check({ fm: { ...validFm(), valid_until: 'someday' } })
105
- .some((f) => f.includes('valid_until')));
106
- });
107
-
108
- test('placeholders and empty tables are findings', () => {
109
- assert.ok(check({ md: fullDoc().replace('We fix scheduling for $8,000 – $12,000.', 'TBD') })
110
- .some((f) => /placeholder/i.test(f)));
111
- assert.ok(check({ md: `${fullDoc()}\n| A | B |\n| --- | --- |\n` })
112
- .some((f) => /empty table/i.test(f)));
113
- });
114
-
115
- test('Proposed Solution must carry a mermaid diagram', () => {
116
- const noDiagram = fullDoc().replace(/```mermaid[\s\S]*?```/, 'A drawing.');
117
- assert.ok(check({ md: noDiagram }).some((f) => f.includes('mermaid')));
118
- });
119
-
120
- test('the proposal has nine sections and no Team', () => {
121
- assert.equal(SECTIONS.length, 9);
122
- assert.ok(!SECTIONS.includes('Team'));
123
- assert.deepEqual(SECTIONS.slice(0, 3), ['Executive Summary', 'Background & Objectives', 'Proposed Solution']);
124
- });
125
-
126
- test('frontmatter no longer requires a scenario', () => {
127
- const fm = validFm();
128
- delete fm.scenario;
129
- const out = checkDoc({ fm, md: fullDoc(), today: new Date('2026-09-25') });
130
- assert.ok(!out.some((f) => /scenario/i.test(f)), out.join('\n'));
131
- });
132
-
133
- test('a leftover scenario key in frontmatter is refused', () => {
134
- const fm = { ...validFm(), scenario: '2eng-max5x' };
135
- const out = checkDoc({ fm, md: fullDoc(), today: new Date('2026-09-25') });
136
- assert.ok(out.some((f) => /scenario.*removed/i.test(f)), out.join('\n'));
137
- });
138
-
139
- test('an Investment table with a Duration column is refused', () => {
140
- const md = fullDoc().replace(
141
- '## Investment & Timeline\n\n',
142
- '## Investment & Timeline\n\n| Milestone | Duration | Investment |\n|---|---|---|\n| M1 | 2 months | $32,300 |\n\n',
143
- );
144
- const out = checkDoc({ fm: validFm(), md, today: new Date('2026-09-25') });
145
- assert.ok(out.some((f) => /Duration column/i.test(f)), out.join('\n'));
146
- });
147
-
148
- test('a proposal still carrying a Team section is refused', () => {
149
- const md = `${fullDoc()}\n## Team\n\nTwo senior engineers.\n`;
150
- const out = checkDoc({ fm: validFm(), md, today: new Date('2026-09-25') });
151
- assert.ok(out.some((f) => /Team section was removed/i.test(f)), out.join('\n'));
152
- });
@@ -1,57 +0,0 @@
1
- import { test } from 'node:test';
2
- import assert from 'node:assert/strict';
3
- import { readFileSync } from 'node:fs';
4
- import { JARGON } from '../lib/jargon.mjs';
5
-
6
- const doc = (p) => readFileSync(new URL(`../../${p}`, import.meta.url), 'utf8');
7
- const REFS = ['references/interview.md', 'references/writing.md', 'references/review.md'];
8
-
9
- test('no skill doc carries placeholders', () => {
10
- for (const f of ['SKILL.md', 'README.md', ...REFS]) {
11
- assert.doesNotMatch(doc(f), /\bTBD\b|\bTODO\b/, f);
12
- }
13
- });
14
-
15
- test('SKILL.md names the pipeline, both hard prerequisites, and the review gate', () => {
16
- const skill = doc('SKILL.md');
17
- assert.match(skill, /^name: proposal$/m);
18
- for (const needle of ['ARCHITECTURE.md', 'estimation.json', 'derive.mjs', 'validate.mjs',
19
- 'render.mjs', 'serve.mjs', 'references/interview.md', 'references/writing.md',
20
- 'references/review.md', 'mermaid', 'Human review']) {
21
- assert.ok(skill.includes(needle), `SKILL.md missing: ${needle}`);
22
- }
23
- });
24
-
25
- test('interview.md carries the prereq gate, tech levels, and profile scopes', () => {
26
- const d = doc('references/interview.md');
27
- for (const needle of ['non-tech', 'low-tech', 'technical',
28
- 'valid', 'proposal-profile.json', '.claude/', 'stop']) {
29
- assert.ok(d.includes(needle), `interview.md missing: ${needle}`);
30
- }
31
- assert.doesNotMatch(d, /scenario/i);
32
- });
33
-
34
- test('writing.md states every validator rule family and the nine sections', () => {
35
- const d = doc('references/writing.md');
36
- for (const needle of ['Executive Summary', 'Background & Objectives', 'Proposed Solution',
37
- 'Scope', 'Out of Scope & Assumptions', 'Delivery Approach', 'Investment & Timeline',
38
- 'About', 'Next Steps', 'valid_until', 'jargon_allow', 'proposal-figures.json',
39
- 'Never write a number', 'rates', 'carries no timeline']) {
40
- assert.ok(d.includes(needle), `writing.md missing: ${needle}`);
41
- }
42
- assert.doesNotMatch(d, /\*\*Team\*\*/);
43
- for (const term of ['kubernetes', 'api']) {
44
- assert.ok(JARGON.includes(term), `jargon list lost its anchor term: ${term}`);
45
- }
46
- });
47
-
48
- test('review.md dispatches a fresh-eyes subagent with the five-point charter', () => {
49
- const d = doc('references/review.md');
50
- for (const needle of ['fresh', 'tech level', 'hype', 'leak', 'contradiction', 'one']) {
51
- assert.ok(d.toLowerCase().includes(needle), `review.md missing: ${needle}`);
52
- }
53
- // The estimate produces no timeline; a review that asks for one pushes the
54
- // author to promise a duration nothing downstream can back.
55
- assert.doesNotMatch(d, /how long/i, 'review.md must not ask how long delivery takes');
56
- assert.match(d, /delivery duration or date/, 'a duration must be listed as a leak');
57
- });
@@ -1,68 +0,0 @@
1
- import { test } from 'node:test';
2
- import assert from 'node:assert/strict';
3
- import { execFileSync, spawnSync } from 'node:child_process';
4
- import { mkdtempSync, readFileSync, writeFileSync } from 'node:fs';
5
- import { tmpdir } from 'node:os';
6
- import { join } from 'node:path';
7
- import { loadLead } from '../lib/workflow-lead.mjs';
8
- import { proposalView } from '../lib/workflow-view.mjs';
9
- import { buildDocx } from '../lib/docx-package.mjs';
10
- import { readZip } from '../../../estimate/classic/scripts/test/zip.mjs';
11
- import { lead, passInputs } from './workflow-stage.mjs';
12
-
13
- const { est, req } = loadLead(lead().estimation);
14
- const view = proposalView({ est, req, inputs: passInputs() });
15
- // A real 1x1 PNG, standing in for a drawn diagram.
16
- const PNG = Uint8Array.from(Buffer.from('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==', 'base64'));
17
- const drawn = { bytes: PNG, width: 1200, height: 300 };
18
- // Three workflows in page order; the second one was not drawn.
19
- const docx = () => readZip(Buffer.from(buildDocx(view, [drawn, null, drawn])));
20
- const count = (xml, re) => (xml.match(re) ?? []).length;
21
-
22
- test('the package has every part Word needs, and one PNG per drawn workflow', () => {
23
- const files = docx();
24
- assert.deepEqual([...files.keys()], ['[Content_Types].xml', '_rels/.rels', 'word/document.xml', 'word/_rels/document.xml.rels',
25
- 'word/styles.xml', 'word/numbering.xml', 'word/media/image1.png', 'word/media/image3.png']);
26
- const rels = files.get('word/_rels/document.xml.rels').toString('utf8');
27
- assert.match(rels, /Id="rIdImg1"[^>]*Target="media\/image1\.png"/);
28
- assert.doesNotMatch(rels, /rIdImg2/);
29
- });
30
-
31
- test('document.xml follows the page: headings, tables, lists, in order', () => {
32
- const xml = docx().get('word/document.xml').toString('utf8');
33
- assert.equal(count(xml, /<w:pStyle w:val="Heading1"\/>/g), 6); // scope, 2 systems, milestones, register, cost
34
- assert.equal(count(xml, /<w:tbl>/g), 5); // scope, 2 feature tables, milestones, cost
35
- assert.equal(count(xml, /<w:numId w:val="1"\/>/g), 4); // 2 assumptions + 2 exclusions
36
- const order = ['Scope: what this proposal covers', 'System 1: Warehouse operations', 'System 2: Orders &amp; invoicing', 'Milestones', 'Cost estimate'];
37
- const at = order.map((h) => xml.indexOf(`<w:t xml:space="preserve">${h}</w:t>`));
38
- assert.ok(at.every((x, i) => x > 0 && (i === 0 || x > at[i - 1])), JSON.stringify(at));
39
- });
40
-
41
- test('drawn workflows become images; an undrawn one falls back to its steps', () => {
42
- const xml = docx().get('word/document.xml').toString('utf8');
43
- assert.deepEqual([...xml.matchAll(/r:embed="(\w+)"/g)].map((m) => m[1]), ['rIdImg1', 'rIdImg3']);
44
- assert.match(xml, /Order received → Quote → Invoice → Paid/);
45
- const [, cx] = /<wp:extent cx="(\d+)"/.exec(xml);
46
- assert.equal(Number(cx), 9638 * 635); // 1200 px is wider than the page: scaled to the text width
47
- });
48
-
49
- test('the price, no IDs, no undefined, and text is escaped', () => {
50
- const xml = docx().get('word/document.xml').toString('utf8');
51
- assert.match(xml, /\$39,000 – \$48,500/);
52
- assert.doesNotMatch(xml, /undefined|\b(?:FEAT|FR|SYS|WF|ASM)-\d|M\d - /);
53
- const v = structuredClone(view);
54
- v.systems[0].features[0].name = 'A <b> & "c"\u0007';
55
- const odd = readZip(Buffer.from(buildDocx(v, [null, null, null]))).get('word/document.xml').toString('utf8');
56
- assert.match(odd, /A &lt;b&gt; &amp; "c"<\/w:t>/);
57
- });
58
-
59
- const soffice = spawnSync('soffice', ['--version']).status === 0;
60
- test('LibreOffice opens the file and reads the text back', { skip: soffice ? false : 'no soffice on PATH' }, () => {
61
- const dir = mkdtempSync(join(tmpdir(), 'proposal-docx-'));
62
- writeFileSync(join(dir, 'p.docx'), buildDocx(view, [drawn, null, drawn]));
63
- execFileSync('soffice', ['--headless', `-env:UserInstallation=file://${dir}/lo`, '--convert-to', 'txt:Text', '--outdir', dir, join(dir, 'p.docx')], { stdio: 'ignore' });
64
- const text = readFileSync(join(dir, 'p.txt'), 'utf8');
65
- for (const s of ['Systems & Workflows Proposal', 'System 2: Orders & invoicing', 'Short-pack alert', 'Invoice from the floor', '$39,000 – $48,500']) {
66
- assert.ok(text.includes(s), s);
67
- }
68
- });
@@ -1,30 +0,0 @@
1
- import { test } from 'node:test';
2
- import assert from 'node:assert/strict';
3
- import { readFileSync, writeFileSync, mkdtempSync } from 'node:fs';
4
- import { execFileSync } from 'node:child_process';
5
- import { tmpdir } from 'node:os';
6
- import { join } from 'node:path';
7
-
8
- const script = (p) => new URL(p, import.meta.url).pathname;
9
-
10
- test('compute → derive → validate → render runs clean end to end', () => {
11
- const dir = mkdtempSync(join(tmpdir(), 'proposal-e2e-'));
12
- const json = join(dir, 'estimation.json');
13
- execFileSync('node', [script('../../../estimate/classic/scripts/compute.mjs'),
14
- '--inputs', script('../../../estimate/classic/scripts/test/fixtures/booking-inputs.json'), '--out', json]);
15
- execFileSync('node', [script('../derive.mjs'),
16
- '--estimation', json, '--out', join(dir, 'proposal-figures.json')]);
17
- execFileSync('node', [script('../validate.mjs'),
18
- '--md', script('./fixtures/proposal-pass.md'), '--estimation', json]);
19
- const bundle = join(dir, 'mermaid.js');
20
- writeFileSync(bundle, 'globalThis.mermaid={initialize(){},run(){}};');
21
- execFileSync('node', [script('../render.mjs'), '--md', script('./fixtures/proposal-pass.md'),
22
- '--estimation', json, '--mermaid-bundle', bundle, '--out', dir]);
23
- const html = readFileSync(join(dir, 'proposal.html'), 'utf8');
24
- assert.match(html, /Proposal — Acme Corp/);
25
- // The figures file is an authoring aid; the rendered numbers must
26
- // nevertheless agree with it, because both derive from estimation.json.
27
- const figures = JSON.parse(readFileSync(join(dir, 'proposal-figures.json'), 'utf8'));
28
- assert.match(html, new RegExp(figures.cost.low.toLocaleString('en-US')));
29
- assert.match(html, new RegExp(figures.cost.high.toLocaleString('en-US')));
30
- });
@@ -1,27 +0,0 @@
1
- ---
2
- client: Acme Corp
3
- client_tech_level: non-tech
4
- scenario: 2eng-max5x
5
- currency: USD
6
- valid_until: 2020-01-01
7
- source_architecture: ../ARCHITECTURE.md
8
- source_estimation: ../estimation.json
9
- ---
10
-
11
- # Acme Corp — Proposal
12
-
13
- ## Executive Summary
14
- TBD — we deploy the backend API for $9,999.
15
-
16
- ## Scope
17
- | Feature | src |
18
- | --- | --- |
19
- | Booking | observed |
20
-
21
- ## Investment & Timeline
22
- | Milestone | Duration | Investment |
23
- | --- | --- | --- |
24
- | M1 | 2 months | $9,999 |
25
-
26
- ## Team
27
- Two senior engineers.