@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
@@ -0,0 +1,83 @@
1
+ // The standard contents of every proposal: seven `##` parts with fixed
2
+ // headings in a fixed order, price early and the technical detail after it,
3
+ // then References, which the build makes from the citations. Anything else
4
+ // is a `###` inside one of the seven. Hosting and security always holds the
5
+ // monthly running costs, under their own fixed `###` heading.
6
+ export const CONTENTS = [
7
+ { id: 'summary', heading: 'Executive summary' },
8
+ { id: 'solution', heading: 'Proposed solution' },
9
+ { id: 'scope-price', heading: 'Price' },
10
+ { id: 'assumptions', heading: 'Assumptions and exclusions' },
11
+ { id: 'technology', heading: 'How it works' },
12
+ { id: 'hosting', heading: 'Hosting and security' },
13
+ { id: 'plan', heading: 'Delivery plan and acceptance' },
14
+ ];
15
+ export const REFERENCES = 'References';
16
+ export const RUNNING_COSTS = 'Monthly running costs';
17
+
18
+ export const PART_NAMES = Object.fromEntries(CONTENTS.map((p) => [p.id, p.heading]));
19
+
20
+ export const headingText = (raw) => raw.trim();
21
+
22
+ // A client's own review can set the contents: frontmatter `contents` is a
23
+ // JSON list of [id, heading] pairs in the order the parts run. Each standard
24
+ // part appears once, under the heading given (its checks follow its id); a
25
+ // new id is an extra `##` part the reviewers asked for. Without the key, the
26
+ // standard contents apply.
27
+ const ID = /^[a-z][a-z0-9-]*$/;
28
+ export function contentsOf(fm) {
29
+ const list = fm?.contents;
30
+ if (list === undefined) return CONTENTS;
31
+ if (!Array.isArray(list) || !list.every((e) => Array.isArray(e) && e.length === 2 && ID.test(e[0]) && typeof e[1] === 'string' && e[1].trim())) return CONTENTS;
32
+ return list.map(([id, heading]) => ({ id, heading: heading.trim() }));
33
+ }
34
+
35
+ // Findings on a `contents` key; empty when it is absent or well formed.
36
+ export function contentsFindings(fm) {
37
+ if (fm?.contents === undefined) return [];
38
+ const list = fm.contents;
39
+ if (!Array.isArray(list) || !list.every((e) => Array.isArray(e) && e.length === 2 && ID.test(e[0]) && typeof e[1] === 'string' && e[1].trim())) {
40
+ return ['frontmatter: contents must be a JSON list of ["id", "Heading"] pairs'];
41
+ }
42
+ const out = [];
43
+ const ids = list.map((e) => e[0]);
44
+ ids.filter((id, i) => ids.indexOf(id) !== i).forEach((id) => out.push(`frontmatter: contents lists "${id}" twice`));
45
+ for (const p of CONTENTS) if (!ids.includes(p.id)) out.push(`frontmatter: contents leaves out the standard part "${p.id}" (${p.heading})`);
46
+ return out;
47
+ }
48
+
49
+ // A part is its heading in the contents, matched exactly (case and spacing aside).
50
+ const norm = (s) => s.trim().replace(/\s+/g, ' ').toLowerCase();
51
+ export const partOf = (heading, contents = CONTENTS) => contents.find((p) => norm(p.heading) === norm(heading))?.id ?? null;
52
+
53
+ // The `##` parts in document order, each with its own text up to the next `##`.
54
+ // Fenced code is skipped so a `##` inside a fence is not a heading.
55
+ export function splitParts(body, contents = CONTENTS) {
56
+ const parts = [];
57
+ let fence = false;
58
+ for (const line of body.split('\n')) {
59
+ if (/^```/.test(line)) fence = !fence;
60
+ const h = !fence && /^##\s+(.+)$/.exec(line);
61
+ if (h) parts.push({ heading: headingText(h[1]), id: partOf(h[1], contents), raw: h[1], text: '' });
62
+ else if (parts.length) parts[parts.length - 1].text += `${line}\n`;
63
+ }
64
+ return parts;
65
+ }
66
+
67
+ // The `###` sections of one part's text, each with its text up to the next
68
+ // `###` or `##`.
69
+ export function subsections(text) {
70
+ const out = [];
71
+ let fence = false;
72
+ for (const line of text.split('\n')) {
73
+ if (/^```/.test(line)) fence = !fence;
74
+ const h = !fence && /^###\s+(.+)$/.exec(line);
75
+ if (h) out.push({ heading: h[1].trim(), text: '' });
76
+ else if (out.length) out[out.length - 1].text += `${line}\n`;
77
+ }
78
+ return out;
79
+ }
80
+
81
+ // The monthly running costs: the fixed `###` inside Hosting and security.
82
+ export const runningCosts = (parts) => parts.filter((p) => p.id === 'hosting')
83
+ .flatMap((p) => subsections(p.text)).filter((s) => norm(s.heading) === norm(RUNNING_COSTS));
@@ -0,0 +1,74 @@
1
+ // The other price sources a proposal may quote, named in price-source.json
2
+ // beside proposal.md (references/writing.md §3):
3
+ // workbook-rows: a per-feature price table read from a workbook's cached
4
+ // cells (a Ballpark sheet), shown in whole dollars by largest remainder so
5
+ // the shown rows add up to the rounded workbook total.
6
+ // pm-file: the PM's own price and plan files (Markdown or CSV); every
7
+ // currency-marked amount, price-column number and duration they state may
8
+ // be quoted, and `total` names the headline.
9
+ import { readFileSync } from 'node:fs';
10
+ import { dirname, resolve } from 'node:path';
11
+ import { sheetCells } from './workbook.mjs';
12
+ import { pricesIn } from './money.mjs';
13
+
14
+ const KINDS = ['workbook-rows', 'pm-file'];
15
+
16
+ function largestRemainder(values, target) {
17
+ const floors = values.map(Math.floor);
18
+ const order = values.map((v, i) => i).sort((a, b) => (values[b] - floors[b]) - (values[a] - floors[a]));
19
+ for (const i of order.slice(0, target - floors.reduce((s, n) => s + n, 0))) floors[i] += 1;
20
+ return floors;
21
+ }
22
+
23
+ function workbookRows(spec, dir) {
24
+ const cells = sheetCells(resolve(dir, spec.file), spec.sheet);
25
+ const [first, last] = spec.rows;
26
+ const rows = [];
27
+ for (let r = first; r <= last; r += 1) {
28
+ const name = String(cells.get(`${spec.nameCol}${r}`) ?? '').trim();
29
+ const exact = cells.get(`${spec.priceCol}${r}`);
30
+ if (!name || typeof exact !== 'number') throw new Error(`price source: ${spec.sheet}!${spec.priceCol}${r} has no cached price for "${name}" — recalculate the workbook`);
31
+ rows.push({ name, group: cells.get(`${spec.groupCol}${r}`) ?? null, exact, optional: Boolean(spec.optionalPrefix) && name.startsWith(spec.optionalPrefix) });
32
+ }
33
+ return { rows, total: cells.get(spec.totalCell) };
34
+ }
35
+
36
+ function rowsFigures(spec, dir) {
37
+ const { rows, total } = workbookRows(spec, dir);
38
+ if (typeof total !== 'number' || Math.abs(rows.reduce((s, x) => s + x.exact, 0) - total) > 0.5) {
39
+ throw new Error(`price source: the rows do not add up to ${spec.totalCell}`);
40
+ }
41
+ const shown = largestRemainder(rows.map((x) => x.exact), Math.round(total));
42
+ const items = rows.map((x, i) => ({ name: x.name, group: x.group, price: shown[i], optional: x.optional }));
43
+ const core = items.filter((x) => !x.optional).reduce((s, x) => s + x.price, 0);
44
+ const groups = [...new Set(items.filter((x) => !x.optional).map((x) => x.group))]
45
+ .map((g) => ({ group: g, price: items.filter((x) => !x.optional && x.group === g).reduce((s, x) => s + x.price, 0) }));
46
+ return { source: 'workbook-rows', workbook: spec.file, items, groups, core, optional: Math.round(total) - core, total: Math.round(total), cost: { low: Math.round(total), high: Math.round(total) }, headline: [Math.round(total)] };
47
+ }
48
+
49
+ const DURATION = /(\d+)(?:\s*(?:to|-|–)\s*(\d+))?\s*(weeks?|months?|days?)\b/gi;
50
+
51
+ const csvCells = (line) => [...line.matchAll(/(?:"((?:[^"]|"")*)"|([^,]*))(?:,|$)/g)].slice(0, -1).map((m) => (m[1] ?? m[2]).replaceAll('""', '"').trim());
52
+
53
+ // A CSV file is read as the Markdown table it stands for, so one reader finds
54
+ // the currency-marked amounts and the price-column numbers.
55
+ function pmText(path, name) {
56
+ if (/\.xlsx$/i.test(path)) throw new Error(`price source: ${name} is an .xlsx file — pass the CES estimate workbook with --workbook, or export the PM sheet to CSV or Markdown`);
57
+ const text = readFileSync(path, 'utf8');
58
+ return /\.csv$/i.test(path) ? text.split(/\r?\n/).filter(Boolean).flatMap((l, i) => (i === 1 ? [`|${csvCells(l).map(() => '---').join('|')}|`] : []).concat(`| ${csvCells(l).join(' | ')} |`)).join('\n') : text;
59
+ }
60
+
61
+ function pmFigures(spec, dir) {
62
+ const texts = spec.files.map((f) => pmText(resolve(dir, f), f));
63
+ const amounts = new Set(texts.flatMap((t) => pricesIn(t).map((x) => x.n)));
64
+ const durations = new Set(texts.flatMap((t) => [...t.matchAll(DURATION)].flatMap((m) => [Number(m[1]), m[2] && Number(m[2])].filter(Boolean))));
65
+ if (!amounts.has(spec.total)) throw new Error(`price source: total ${spec.total} is not stated as a price in the PM files`);
66
+ return { source: 'pm-file', files: spec.files, amounts: [...amounts].sort((a, b) => a - b), durations: [...durations].sort((a, b) => a - b), total: spec.total, cost: { low: spec.total, high: spec.total }, headline: [spec.total] };
67
+ }
68
+
69
+ // Figures from price-source.json; paths in it are relative to its own folder.
70
+ export function priceSourceFigures(path) {
71
+ const spec = JSON.parse(readFileSync(path, 'utf8'));
72
+ if (!KINDS.includes(spec.kind)) throw new Error(`price source: "kind" must be ${KINDS.join(' | ')}`);
73
+ return spec.kind === 'workbook-rows' ? rowsFigures(spec, dirname(path)) : pmFigures(spec, dirname(path));
74
+ }
@@ -0,0 +1,55 @@
1
+ // Plain-text views of proposal.md for the checks: the body without its
2
+ // frontmatter, the body without fenced code, and the units a rule applies to
3
+ // (a sentence of prose, or one table row).
4
+ export const CITE = /\[\^([a-z0-9-]+)(?:;([^\]]+))?\]/g;
5
+
6
+ export const body = (md) => md.replace(/^---\n[\s\S]*?\n---\n?/, '');
7
+ export const unfenced = (text) => text.replace(/^```[\s\S]*?^```/gm, '');
8
+ export const fences = (text, lang) => [...text.matchAll(/^```(\w+)\n([\s\S]*?)^```/gm)].filter((m) => !lang || m[1] === lang).map((m) => m[2]);
9
+
10
+ // Sentences of prose and whole table rows, each with `sourced`: a sentence
11
+ // carries its own citation; a table row is sourced when its table, or the
12
+ // paragraph just before it, cites a source (one citation per table, as the
13
+ // sent proposals do). A citation right after a full stop closes that sentence.
14
+ const HAS_CITE = new RegExp(CITE.source);
15
+
16
+ // `assumed`: the sentence, or the paragraph before a table, says the figure
17
+ // is our own assumption — an honest label in place of a source.
18
+ const ASSUMED = /\bassum/i;
19
+
20
+ function tableUnits(rows, before) {
21
+ const sourced = HAS_CITE.test(before) || rows.some((r) => HAS_CITE.test(r));
22
+ return rows.filter((r) => !/^\s*\|?[\s:|-]+\|?\s*$/.test(r)).map((r) => ({ text: r, row: true, sourced, assumed: ASSUMED.test(before) || ASSUMED.test(r) }));
23
+ }
24
+
25
+ export function citedUnits(text) {
26
+ const out = [];
27
+ let table = [];
28
+ let before = '';
29
+ for (const line of [...unfenced(text).split('\n'), '']) {
30
+ if (/^\s*\|/.test(line)) { table.push(line); continue; }
31
+ if (table.length) { out.push(...tableUnits(table, before)); table = []; }
32
+ if (!line.trim()) continue;
33
+ before = line;
34
+ out.push(...line.split(/(?<=[.!?](?:\[\^[^\]]+\])?)\s+(?=[A-Z(*"“])/).map((t) => ({ text: t, row: false, sourced: HAS_CITE.test(t), assumed: ASSUMED.test(t) })));
35
+ }
36
+ return out;
37
+ }
38
+
39
+ export const units = (text) => citedUnits(text).map((u) => u.text);
40
+
41
+ export const words = (text) => unfenced(text).replace(/[|#*>`-]/g, ' ').split(/\s+/).filter((w) => /\w/.test(w)).length;
42
+
43
+ // Figure fences: ```architecture / ```mermaid / ```figure / ```steps, each with
44
+ // "key: value" meta lines first (mermaid writes them as "%% key: value").
45
+ export function figureFences(text) {
46
+ return [...text.matchAll(/^```(architecture|mermaid|figure|steps)\n([\s\S]*?)^```/gm)].map((m) => {
47
+ const meta = {};
48
+ const rest = m[2].split('\n').filter((l) => {
49
+ const kv = /^(?:%%\s*)?(file|caption):\s*(.*)$/.exec(l);
50
+ if (kv) meta[kv[1]] = kv[2].trim();
51
+ return !kv;
52
+ });
53
+ return { lang: m[1], meta, body: rest.join('\n').trim(), inner: m[2], raw: m[0] };
54
+ });
55
+ }
@@ -0,0 +1,86 @@
1
+ // The second price source: the CES Ballpark Estimator v2 workbook an agentic
2
+ // lead fills beside its estimate. An agentic estimate carries no price, so the
3
+ // workbook's own Project Roll-up figures are quoted instead — read from the
4
+ // cached values a recalculation left behind, never recomputed here.
5
+ // Dependency-free: an xlsx is a zip of XML parts, and node:zlib inflates them.
6
+ import { readFileSync } from 'node:fs';
7
+ import { inflateRawSync } from 'node:zlib';
8
+
9
+ const SHEET = 'Project Roll-up';
10
+ const CELLS = { presentLow: 'C56', presentHigh: 'D56', singleNumber: 'C57' };
11
+ const EOCD = 0x06054b50;
12
+ const CENTRAL = 0x02014b50;
13
+
14
+ function centralDirectory(buf) {
15
+ for (let i = buf.length - 22; i >= Math.max(0, buf.length - 65557); i -= 1) {
16
+ if (buf.readUInt32LE(i) === EOCD) return { count: buf.readUInt16LE(i + 10), offset: buf.readUInt32LE(i + 16) };
17
+ }
18
+ throw new Error('not an xlsx (no zip directory found)');
19
+ }
20
+
21
+ // Map every part name to its decompressed text, walking the central directory.
22
+ function unzip(buf) {
23
+ const { count, offset } = centralDirectory(buf);
24
+ const parts = new Map();
25
+ let p = offset;
26
+ for (let n = 0; n < count && buf.readUInt32LE(p) === CENTRAL; n += 1) {
27
+ const method = buf.readUInt16LE(p + 10);
28
+ const size = buf.readUInt32LE(p + 20);
29
+ const nameLen = buf.readUInt16LE(p + 28);
30
+ const skip = nameLen + buf.readUInt16LE(p + 30) + buf.readUInt16LE(p + 32);
31
+ const name = buf.toString('utf8', p + 46, p + 46 + nameLen);
32
+ const local = buf.readUInt32LE(p + 42);
33
+ const start = local + 30 + buf.readUInt16LE(local + 26) + buf.readUInt16LE(local + 28);
34
+ const raw = buf.subarray(start, start + size);
35
+ parts.set(name, (method === 8 ? inflateRawSync(raw) : raw).toString('utf8'));
36
+ p += 46 + skip;
37
+ }
38
+ return parts;
39
+ }
40
+
41
+ function sheetPart(parts, name) {
42
+ const sheet = new RegExp(`<sheet\\b[^>]*name="${name}"[^>]*>`).exec(parts.get('xl/workbook.xml') ?? '');
43
+ const rid = sheet && /r:id="([^"]+)"/.exec(sheet[0]);
44
+ if (!rid) throw new Error(`workbook has no "${name}" sheet`);
45
+ const rel = new RegExp(`<Relationship\\b[^>]*Id="${rid[1]}"[^>]*>`).exec(parts.get('xl/_rels/workbook.xml.rels') ?? '');
46
+ const target = rel && /Target="([^"]+)"/.exec(rel[0])[1];
47
+ return parts.get(target.startsWith('/') ? target.slice(1) : `xl/${target}`);
48
+ }
49
+
50
+ // Shared strings in order, so a cell with t="s" can be read as text.
51
+ function sharedStrings(parts) {
52
+ const xml = parts.get('xl/sharedStrings.xml') ?? '';
53
+ return [...xml.matchAll(/<si>([\s\S]*?)<\/si>/g)].map((m) => [...m[1].matchAll(/<t[^>]*>([^<]*)<\/t>/g)].map((t) => t[1]).join('')
54
+ .replaceAll('&amp;', '&').replaceAll('&lt;', '<').replaceAll('&gt;', '>').replaceAll('&quot;', '"').replaceAll('&apos;', "'"));
55
+ }
56
+
57
+ // Every cached cell value of one sheet: ref -> number or text.
58
+ export function sheetCells(path, name) {
59
+ const parts = unzip(readFileSync(path));
60
+ const strings = sharedStrings(parts);
61
+ const cells = new Map();
62
+ for (const m of sheetPart(parts, name).matchAll(/<c\b([^>]*?)(?:\/>|>([\s\S]*?)<\/c>)/g)) {
63
+ const ref = /\br="([A-Z]+\d+)"/.exec(m[1])?.[1];
64
+ const type = /\bt="([^"]+)"/.exec(m[1])?.[1];
65
+ const v = m[2] && (/<v>([^<]*)<\/v>/.exec(m[2])?.[1] ?? /<t[^>]*>([^<]*)<\/t>/.exec(m[2])?.[1]);
66
+ if (ref && v !== undefined && v !== null) cells.set(ref, type === 's' ? strings[Number(v)] : type === 'str' || type === 'inlineStr' ? v : Number(v));
67
+ }
68
+ return cells;
69
+ }
70
+
71
+ function cachedNumber(xml, ref) {
72
+ const cell = new RegExp(`<c\\b[^>]*\\br="${ref}"[^>]*(?:/>|>([\\s\\S]*?)</c>)`).exec(xml);
73
+ const v = cell?.[1] && /<v>([^<]*)<\/v>/.exec(cell[1]);
74
+ const n = v ? Number(v[1]) : NaN;
75
+ if (!Number.isFinite(n) || n <= 0) {
76
+ throw new Error(`${SHEET}!${ref} has no cached value — recalculate the workbook (LibreOffice) before quoting it`);
77
+ }
78
+ return Math.round(n);
79
+ }
80
+
81
+ export function readWorkbookPrice(path) {
82
+ const buf = readFileSync(path);
83
+ if (buf.length < 22 || buf.readUInt32LE(0) !== 0x04034b50) throw new Error(`not an xlsx: ${path}`);
84
+ const xml = sheetPart(unzip(buf), SHEET);
85
+ return Object.fromEntries(Object.entries(CELLS).map(([key, ref]) => [key, cachedNumber(xml, ref)]));
86
+ }
@@ -5,6 +5,7 @@
5
5
  import { milestoneView } from '../../../estimate/workflow-based/scripts/lib/page-view.mjs';
6
6
  import { JARGON } from './jargon.mjs';
7
7
  import { escapeRegExp } from './sections.mjs';
8
+ import { validityWording, outOfPlaceWording } from './bans.mjs';
8
9
 
9
10
  const TECH_LEVELS = ['non-tech', 'low-tech', 'technical'];
10
11
  const CODES = 'USD|SGD|EUR|GBP|AUD|NZD|CAD|CHF|JPY|CNY|RMB|HKD|MYR|RM|IDR|INR|THB|VND|KRW|TWD';
@@ -16,7 +17,7 @@ const ID = /\b(?:FEAT|FR|NFR|SYS|WF|BR|ASM|INT|SC|Q)-\d+|\bM\d+ - /;
16
17
  const filled = (v) => typeof v === 'string' && v.trim() !== '';
17
18
 
18
19
  function checkRequired(inputs, out) {
19
- for (const key of ['client', 'title', 'firm', 'scopeIntro']) {
20
+ for (const key of ['client', 'title', 'scopeIntro']) {
20
21
  if (!filled(inputs[key])) out.push(`proposal-inputs.json: missing "${key}"`);
21
22
  }
22
23
  if (!/^\d{4}-\d{2}-\d{2}$/.test(inputs.date ?? '') || Number.isNaN(Date.parse(inputs.date))) {
@@ -39,7 +40,7 @@ function checkKeys({ inputs, est, req }, out) {
39
40
  }
40
41
 
41
42
  export function sentences(inputs) {
42
- const out = [['title', inputs.title], ['scopeIntro', inputs.scopeIntro]];
43
+ const out = [['title', inputs.title], ['subtitle', inputs.subtitle], ['scopeIntro', inputs.scopeIntro]];
43
44
  for (const [id, text] of Object.entries(inputs.systems ?? {})) out.push([`systems.${id}`, text]);
44
45
  for (const [id, m] of Object.entries(inputs.milestones ?? {})) {
45
46
  out.push([`milestones.${id}.name`, m?.name], [`milestones.${id}.demonstrates`, m?.demonstrates]);
@@ -57,6 +58,10 @@ function checkSentences(inputs, out) {
57
58
  if (money) out.push(`${where}: price "${money[0]}" — prices come only from the estimate`);
58
59
  const id = ID.exec(text);
59
60
  if (id) out.push(`${where}: internal ID "${id[0]}" — name the thing in words`);
61
+ const validity = validityWording(text);
62
+ if (validity) out.push(`${where}: ${validity}`);
63
+ const wording = outOfPlaceWording(text);
64
+ if (wording) out.push(`${where}: ${wording}`);
60
65
  if (inputs.techLevel !== 'non-tech') continue;
61
66
  for (const term of jargonIn(text, allow)) out.push(`${where}: jargon for a non-tech client: "${term}" (rewrite plainly or add to jargonAllow)`);
62
67
  }
@@ -1,15 +1,16 @@
1
1
  // validate.mjs and render.mjs in workflow mode: estimation.json (with the
2
2
  // BA package it names) plus proposal-inputs.json. Same rule as classic:
3
3
  // render re-runs validation and writes nothing on a finding.
4
- import { readFileSync, writeFileSync, mkdirSync } from 'node:fs';
5
- import { join } from 'node:path';
6
4
  import { proposalFindings } from './workflow-lead.mjs';
7
5
  import { proposalView } from './workflow-view.mjs';
8
- import { workflowPage } from './workflow-page.mjs';
6
+ import { workflowMarkdown } from './workflow-md.mjs';
7
+ import { figureFences } from './prose.mjs';
8
+ import { loadTool } from '../build/tool.mjs';
9
+ import { buildProposal } from '../build/build.mjs';
9
10
 
10
11
  const USAGE = {
11
12
  validate: 'usage: validate.mjs --estimation estimation.json --inputs proposal-inputs.json',
12
- render: 'usage: render.mjs --estimation estimation.json --inputs proposal-inputs.json --mermaid-bundle <path> --out <lead>/dist',
13
+ render: 'usage: render.mjs --estimation estimation.json --inputs proposal-inputs.json --out <lead>/dist [--draft] [--workbook <xlsx>] [--tool-dir <dir>]',
13
14
  };
14
15
 
15
16
  function report(findings) {
@@ -25,22 +26,19 @@ export function validateWorkflow(args) {
25
26
  return 0;
26
27
  }
27
28
 
28
- function readBundle(path) {
29
- if (typeof path !== 'string') return { error: '--mermaid-bundle is required (see analyze-requirements references/viewer.md §1)' };
30
- const bundle = readFileSync(path, 'utf8');
31
- if (bundle.includes('</script')) return { error: 'mermaid bundle carries a literal </script — rebuild it (analyze-requirements references/viewer.md §1)' };
32
- return { bundle };
33
- }
34
-
35
- export function renderWorkflow(args) {
29
+ export async function renderWorkflow(args, toolDir) {
36
30
  if (typeof args.inputs !== 'string' || typeof args.out !== 'string') return report([USAGE.render]);
37
31
  const { findings, ...lead } = proposalFindings(args);
38
32
  if (findings.length) return report(findings);
39
- const { bundle, error } = readBundle(args['mermaid-bundle']);
40
- if (error) return report([error]);
41
- mkdirSync(args.out, { recursive: true });
42
- const out = join(args.out, 'proposal.html');
43
- writeFileSync(out, workflowPage({ view: proposalView(lead), bundle }));
44
- console.log(out);
33
+ const view = proposalView(lead);
34
+ const md = workflowMarkdown(view);
35
+ const job = {
36
+ md, refs: {}, fences: figureFences(md), lead: { diagrams: new Map() }, out: args.out, draft: Boolean(args.draft), workbook: args.workbook,
37
+ meta: { title: lead.inputs.title, subtitle: lead.inputs.subtitle ?? 'Systems & Workflows proposal', preparedFor: lead.inputs.client, date: lead.inputs.date },
38
+ };
39
+ const built = await buildProposal(job, loadTool(toolDir));
40
+ if (built.findings) return report(built.findings);
41
+ console.log(built.files.join('\n'));
42
+ if (built.notes?.length) console.error(['layout — fix before sending:', ...built.notes.map((n) => ` ${n}`)].join('\n'));
45
43
  return 0;
46
44
  }
@@ -0,0 +1,35 @@
1
+ // The Systems & Workflows page as proposal markdown, so it is built by the
2
+ // same pipeline as a classic proposal (CES cover, colours, light flows,
3
+ // downloads, PDF from Word). The layout is the workflow mode's own: scope,
4
+ // one part per system with its flows and features, milestones, assumptions
5
+ // and exclusions, and the cost. Every value comes from workflow-view.mjs.
6
+ // Data is text, never markup: HTML is escaped and a pipe cannot split a cell.
7
+ const text = (s) => String(s ?? '').replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\n+/g, ' ').trim();
8
+ const cell = (s) => text(s).replace(/\|/g, '\\|');
9
+ const line = (s) => text(s).replace(/^#+\s*/, '');
10
+ const table = (head, rows) => [`| ${head.map(cell).join(' | ')} |`, `| ${head.map(() => '---').join(' | ')} |`, ...rows.map((r) => `| ${r.map(cell).join(' | ')} |`)].join('\n');
11
+
12
+ function scopeMd({ 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 ['## Scope: what this proposal covers', line(scope.intro), table(head, rows), line(scope.outLine)];
16
+ }
17
+
18
+ function systemMd(s) {
19
+ const flows = s.flows.flatMap((f) => [`### ${line(f.label)}`, ['```mermaid', `%% caption: ${line(s.name)}: ${line(f.label.replace(/^.*· /, ''))}`, f.code, '```'].join('\n')]);
20
+ return [`## System ${s.no}: ${line(s.name)}`, line(s.purpose), line(s.extra), ...flows,
21
+ table(['Feature', 'What it does'], s.features.map((f) => [f.name, f.does]))].filter(Boolean);
22
+ }
23
+
24
+ function closingMd({ milestones, register, cost }) {
25
+ return [
26
+ '## Milestones', line(milestones.lead), table(['Milestone', 'Includes', 'What it demonstrates'], milestones.rows.map((m) => [m.title, m.includes, m.demonstrates])),
27
+ '## Assumptions & exclusions', line(register.lead), '### Assumptions', ...register.assumptions.map((a) => `- ${line(a)}`),
28
+ '### Exclusions', ...register.exclusions.map((x) => `- ${line(x)}`),
29
+ '## Cost estimate', line(cost.lead), table(['Range', 'If one fixed number is needed'], [[cost.range, cost.single], [cost.rangeNote, cost.singleNote]]),
30
+ ];
31
+ }
32
+
33
+ export function workflowMarkdown(view) {
34
+ return [...scopeMd(view), ...view.systems.flatMap(systemMd), ...closingMd(view)].join('\n\n').concat('\n');
35
+ }
@@ -61,7 +61,7 @@ function milestonesView(est, inputs) {
61
61
  function costView(est) {
62
62
  const { price } = est.computed;
63
63
  return {
64
- lead: `The estimate scores the work behind all ${est.inputs.features.length} features above and rolls it up into a project range, including design, testing, project management and contingency.`,
64
+ lead: `The price covers the work behind all ${est.inputs.features.length} features above, including design, testing, project management and contingency.`,
65
65
  range: `${formatMoney(price.presentLow)} – ${formatMoney(price.presentHigh)}`, rangeNote: 'expected cost to worst realistic case, USD',
66
66
  single: formatMoney(price.singleNumber), singleNote: 'confident figure: 80% chance the project comes in at or under',
67
67
  };
@@ -69,12 +69,12 @@ function costView(est) {
69
69
 
70
70
  export function proposalView({ est, req, inputs }) {
71
71
  return {
72
- client: inputs.client, title: `${inputs.title} — Systems & Workflows Proposal`, byline: `${longDate(inputs.date)} · ${inputs.firm}`,
72
+ client: inputs.client, title: `${inputs.title} — Systems & Workflows Proposal`, byline: `${longDate(inputs.date)} · ${inputs.firm ?? 'Code Engine Studio'}`,
73
73
  file: `${slug(inputs.client)}-proposal.docx`,
74
74
  scope: scopeView({ req, inputs }),
75
75
  systems: req.systems.map((s, i) => systemView(s, i, { req, inputs })),
76
76
  milestones: milestonesView(est, inputs),
77
- register: { lead: 'These carry over from the estimate, so the price and the scope never drift apart.', ...registerView(est, req) },
77
+ register: { lead: 'The price rests on these assumptions and leaves out these items.', ...registerView(est, req) },
78
78
  cost: costView(est),
79
79
  };
80
80
  }
@@ -0,0 +1,55 @@
1
+ // Builds the proposal into <lead>/dist: --draft writes proposal-draft.html for
2
+ // review; without it, proposal.html with proposal.docx, proposal.pdf (printed
3
+ // from the Word file) and, when the lead has one, the estimate workbook.
4
+ // Validation runs first and nothing is written on a finding.
5
+ import { existsSync, readFileSync } from 'node:fs';
6
+ import { dirname, resolve } from 'node:path';
7
+ import { checkProposal } from './lib/checks.mjs';
8
+ import { loadProposal } from './lib/load.mjs';
9
+ import { body, figureFences } from './lib/prose.mjs';
10
+ import { isWorkflow } from './lib/workflow-lead.mjs';
11
+ import { renderWorkflow } from './lib/workflow-cli.mjs';
12
+ import { loadTool } from './build/tool.mjs';
13
+ import { buildProposal } from './build/build.mjs';
14
+
15
+ function parseArgs(argv) {
16
+ const args = {};
17
+ for (let i = 0; i < argv.length; i += 1) {
18
+ if (!argv[i].startsWith('--')) continue;
19
+ const flag = argv[i].slice(2);
20
+ args[flag] = flag === 'draft' ? true : argv[++i];
21
+ }
22
+ return args;
23
+ }
24
+
25
+ // The Excel button: the workbook the price came from, when there is one.
26
+ function workbookOf(args, lead) {
27
+ if (args.workbook) return resolve(args.workbook);
28
+ const file = lead.priceSource?.workbook;
29
+ const path = file && resolve(dirname(resolve(args.prices)), file);
30
+ return path && existsSync(path) ? path : undefined;
31
+ }
32
+
33
+ function fail(lines) {
34
+ console.error(lines.join('\n'));
35
+ process.exit(1);
36
+ }
37
+
38
+ const args = parseArgs(process.argv.slice(2));
39
+ if (!args.estimation || !args.out) fail(['usage: render.mjs --md proposal.md --estimation estimation.json [--prices price-source.json | --workbook <xlsx>] --out <lead>/dist [--draft] [--tool-dir <dir>]']);
40
+ const estimation = JSON.parse(readFileSync(args.estimation, 'utf8'));
41
+ const toolDir = args['tool-dir'] ?? process.env.PROPOSAL_TOOL_DIR;
42
+ if (args.inputs || (!args.md && isWorkflow(estimation))) process.exit(await renderWorkflow(args, toolDir));
43
+ const lead = loadProposal(args);
44
+ const findings = [...lead.errors, ...checkProposal(lead)];
45
+ if (findings.length) fail(findings);
46
+ const { fm } = lead;
47
+ const md = body(lead.md);
48
+ const job = {
49
+ md, refs: lead.refs, fences: figureFences(md), lead, out: args.out, draft: Boolean(args.draft), workbook: workbookOf(args, lead),
50
+ meta: { title: fm.title, subtitle: fm.subtitle, preparedFor: fm.prepared_for, date: fm.date },
51
+ };
52
+ const built = await buildProposal(job, loadTool(toolDir));
53
+ if (built.findings) fail(built.findings);
54
+ console.log(built.files.join('\n'));
55
+ if (built.notes?.length) console.error(['layout — fix before sending:', ...built.notes.map((n) => ` ${n}`)].join('\n'));
@@ -0,0 +1,28 @@
1
+ // The acme fixture lead (fixtures/acme): a small classic proposal on the
2
+ // estimate skill's booking estimate, with its references and diagram spec.
3
+ import { mkdtempSync, readFileSync, writeFileSync, cpSync } from 'node:fs';
4
+ import { tmpdir } from 'node:os';
5
+ import { join } from 'node:path';
6
+ import { execFileSync } from 'node:child_process';
7
+ import { checkProposal } from '../lib/checks.mjs';
8
+ import { loadProposal } from '../lib/load.mjs';
9
+
10
+ const here = (p) => new URL(p, import.meta.url).pathname;
11
+ export const ACME = here('./fixtures/acme');
12
+ export const acmeMd = () => readFileSync(join(ACME, 'proposal.md'), 'utf8');
13
+
14
+ // A temp copy of the lead with a computed estimation.json; edit(md) may rewrite proposal.md.
15
+ export function stageAcme(edit) {
16
+ const dir = mkdtempSync(join(tmpdir(), 'proposal-acme-'));
17
+ cpSync(ACME, dir, { recursive: true });
18
+ execFileSync('node', [here('../../../estimate/classic/scripts/compute.mjs'), '--inputs', here('../../../estimate/classic/scripts/test/fixtures/booking-inputs.json'), '--out', join(dir, 'estimation.json')]);
19
+ if (edit) writeFileSync(join(dir, 'proposal.md'), edit(acmeMd()));
20
+ return { dir, md: join(dir, 'proposal.md'), estimation: join(dir, 'estimation.json') };
21
+ }
22
+
23
+ const staged = stageAcme();
24
+ // Findings for the acme lead with proposal.md replaced by md.
25
+ export function findingsFor(md, extra = {}) {
26
+ const lead = loadProposal({ md: staged.md, estimation: staged.estimation });
27
+ return checkProposal({ ...lead, md, ...extra });
28
+ }
@@ -0,0 +1,59 @@
1
+ // What a proposal never carries, and what the gate refuses outright.
2
+ import { test } from 'node:test';
3
+ import assert from 'node:assert/strict';
4
+ import { acmeMd, findingsFor } from './acme.mjs';
5
+
6
+ const has = (out, re) => assert.ok(out.some((f) => re.test(f)), `expected ${re}:\n${out.join('\n')}`);
7
+ const append = (text) => `${acmeMd()}\n${text}\n`;
8
+
9
+ test('a Next steps or About part is refused, whatever it is called', () => {
10
+ has(findingsFor(append('## Next steps\n\nSign and return.')), /"Next steps" part is never/);
11
+ has(findingsFor(append('## About Code Engine Studio\n\nWe build software.')), /"About" part is never/);
12
+ has(findingsFor(append('## Why choose us\n\nWe build software.')), /"About" part is never/);
13
+ });
14
+
15
+ test('Next steps is refused as a sub-heading and in prose too', () => {
16
+ has(findingsFor(acmeMd().replace('## Delivery plan and acceptance\n', '## Delivery plan and acceptance\n\n### Next steps\n\nSign and return.\n')), /no next steps or about-us text/);
17
+ has(findingsFor(acmeMd().replace('Two milestones.', 'Two milestones. Next steps: sign and return.')), /no next steps or about-us text/);
18
+ has(findingsFor(acmeMd().replace('Two milestones.', 'Two milestones. About us: we build software.')), /no next steps or about-us text/);
19
+ });
20
+
21
+ test('a hand-written References part is refused: the build makes it', () => {
22
+ has(findingsFor(append('## References\n\n1. A source.')), /References list is built from the citations/);
23
+ });
24
+
25
+ test('no validity date, in frontmatter or in the text', () => {
26
+ has(findingsFor(acmeMd().replace('cloud: other', 'cloud: other\nvalid_until: 2099-01-01')), /valid_until was removed/);
27
+ for (const s of ['This proposal is valid until 1 December 2026.', 'Prices hold until the end of the year.', 'The quote is valid for 30 days.']) {
28
+ has(findingsFor(acmeMd().replace('Two milestones.', `Two milestones. ${s}`)), /validity wording/);
29
+ }
30
+ });
31
+
32
+ test('pointers into client documents are refused; a requirement code in brackets is fine', () => {
33
+ for (const s of ['As the PRD says, it must be fast.', 'See open point 8.', 'As in section 12.3, it must be fast.']) {
34
+ has(findingsFor(acmeMd().replace('Two milestones.', `Two milestones. ${s}`)), /points into a client document/);
35
+ }
36
+ assert.deepEqual(findingsFor(acmeMd().replace('| Online booking |', '| Online booking (M2.3) |')), []);
37
+ });
38
+
39
+ test('internal IDs and scoring never leak', () => {
40
+ has(findingsFor(acmeMd().replace('Two milestones.', 'Two milestones (FEAT-001).')), /internal ID "FEAT-001"/);
41
+ has(findingsFor(acmeMd().replace('| Feature | What you get | Price (USD) |', '| Feature | What you get | Score |')), /estimate scoring/);
42
+ has(findingsFor(acmeMd().replace('| Hosted online (proposed) |', '| stated |')), /provenance cell "stated"/);
43
+ });
44
+
45
+ test('non-tech jargon fails; jargon_allow overrides per term', () => {
46
+ const md = acmeMd().replace('Two milestones.', 'Two milestones and an API.');
47
+ has(findingsFor(md), /jargon for a non-tech client: "api"/);
48
+ assert.deepEqual(findingsFor(md.replace('cloud: other', 'cloud: other\njargon_allow: ["api"]')), []);
49
+ });
50
+
51
+ test('a cross-reference must name a part that exists', () => {
52
+ has(findingsFor(acmeMd().replace('Two milestones.', 'Two milestones, priced in part B.')), /"part B" refers to a part no heading carries/);
53
+ has(findingsFor(acmeMd().replace('Two milestones.', 'Two milestones, see section 4.')), /"section 4" refers to a part/);
54
+ assert.deepEqual(findingsFor(acmeMd().replace('### Background and objectives', '### 4. Background and objectives').replace('Two milestones.', 'Two milestones, see section 4.')), []);
55
+ });
56
+
57
+ test('a typed figure number is refused: the build numbers figures', () => {
58
+ has(findingsFor(acmeMd().replace('Two milestones.', 'Two milestones, as Figure 2 shows.')), /"Figure 2": the build numbers figures/);
59
+ });