@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,5 @@
1
+ {
2
+ "brief": { "client": true, "title": "Online booking brief", "publisher": "Acme Corp", "date": "1 October 2026" },
3
+ "reminders-study": { "status": "verified", "title": "Appointment reminders and missed visits", "publisher": "Example Health Review", "date": "2024", "url": "https://example.org/reminders", "checked": "29 October 2026", "quote": "reminders cut missed appointments by about a third" },
4
+ "unchecked": { "status": "found", "title": "A blog post nobody opened", "publisher": "Somewhere", "url": "https://example.org/blog" }
5
+ }
@@ -0,0 +1,89 @@
1
+ // The print layout rules that need no LibreOffice: the one-page contents,
2
+ // finding each heading's page, which parts share a page, the page faults the
3
+ // build reports, how long tables keep together, and one number per source.
4
+ import { test } from 'node:test';
5
+ import assert from 'node:assert/strict';
6
+ import { headingPages, tocEntries } from '../build/contents.mjs';
7
+ import { flowingParts, layoutNotes } from '../build/layout.mjs';
8
+ import { inkDepth } from '../build/pdf.mjs';
9
+ import { keepRow } from '../build/docx-table.mjs';
10
+ import { citedOrder, footnoteText, referenceList, sourceNumbers } from '../build/notes.mjs';
11
+
12
+ const parts = (n) => Array.from({ length: n }, (_, i) => ({ id: `p${i}`, text: `Part ${i}`, level: 2 }));
13
+ const withSections = (n, each) => parts(n).flatMap((p) => [p, ...Array.from({ length: each }, (_, j) => ({ id: `${p.id}-${j}`, text: `${p.text}.${j}`, level: 3 }))]);
14
+
15
+ test('the contents lists the sections while everything fits on one page', () => {
16
+ const toc = withSections(8, 2);
17
+ assert.deepEqual(tocEntries(toc), toc);
18
+ });
19
+
20
+ test('the contents drops to the parts alone when the sections would run over the page', () => {
21
+ const toc = withSections(8, 9);
22
+ assert.deepEqual(tocEntries(toc).map((t) => t.level), Array(8).fill(2));
23
+ });
24
+
25
+ test('each heading is found on its page, in order, from the page after the contents', () => {
26
+ const pages = ['cover', 'Contents\nPrice ..... 4\nHow it works ..... 5', 'Executive summary\ntext', 'Price\n| Part | Price |', 'Assumptions\nHow it works\nmore'];
27
+ const entries = [{ text: 'Executive summary' }, { text: 'Price' }, { text: 'How it works' }, { text: 'Missing' }];
28
+ assert.deepEqual(headingPages(pages, entries, { from: 2 }), [3, 4, 5, null]);
29
+ });
30
+
31
+ test('a heading that wraps is found by its first line', () => {
32
+ const pages = ['', '', 'Steps 3 to 7 up close: the desk checks\nevery invoice and guesses nothing'];
33
+ assert.deepEqual(headingPages(pages, [{ text: 'Steps 3 to 7 up close: the desk checks every invoice and guesses nothing' }], { from: 2 }), [3]);
34
+ });
35
+
36
+ test('a part flows on after the part before only when its first page fits in the room left', () => {
37
+ const fill = (...used) => used.map((body) => ({ body, notes: 0 }));
38
+ // pages: 3 summary (0.6) | 4-5 solution, ends at 0.3 | 6 assumptions (0.3) | 7 references
39
+ const starts = [3, 4, 6, 7];
40
+ assert.deepEqual([...flowingParts({ starts, fill: fill(1, 1, 0.6, 1, 0.3, 0.3, 0.5) })], [2]);
41
+ assert.deepEqual([...flowingParts({ starts, fill: fill(1, 1, 0.6, 1, 0.7, 0.3, 0.7) })], [], 'no room on the solution\'s last page');
42
+ assert.deepEqual([...flowingParts({ starts, fill: fill(1, 1, 0.6, 1, 0.7, 0.3, 0.2) })], [3], 'a short References follows the last part');
43
+ assert.deepEqual([...flowingParts({ starts: [3, 4], fill: fill(1, 1, 0.1, 0.1) })], [1], 'the first part always opens its own page');
44
+ });
45
+
46
+ test('footnotes count as used room when a part would flow on', () => {
47
+ const starts = [3, 4, 6, 7];
48
+ const fill = [1, 1, 0.6, 1, 0.3, 0.3, 0.7].map((body, i) => ({ body, notes: i === 4 ? 0.4 : 0 }));
49
+ assert.deepEqual([...flowingParts({ starts, fill })], []);
50
+ });
51
+
52
+ test('the page read: footnotes after a wide gap at the foot are not body', () => {
53
+ const rows = Array(100).fill(false);
54
+ for (let y = 0; y < 40; y += 1) rows[y] = true;
55
+ for (let y = 90; y < 96; y += 1) rows[y] = true;
56
+ const d = inkDepth(rows);
57
+ assert.equal(d.body, 0.4);
58
+ assert.equal(d.notes, 0.06);
59
+ assert.deepEqual(inkDepth(Array(10).fill(false)), { body: 0, notes: 0 });
60
+ });
61
+
62
+ test('the build reports a nearly empty page and a heading stranded at a page foot', () => {
63
+ const pages = ['cover', 'Text\nPrice\nCode Engine Studio · Proposal: X · page 2', 'Price table'];
64
+ const fill = [{ body: 0.5, notes: 0 }, { body: 0.9, notes: 0 }, { body: 0.05, notes: 0 }];
65
+ const out = layoutNotes({ pages, fill, headings: ['Price'] });
66
+ assert.ok(out.some((n) => /page 2 ends with the heading "Price"/.test(n)), out.join('\n'));
67
+ assert.ok(out.some((n) => /page 3 is nearly empty/.test(n)), out.join('\n'));
68
+ });
69
+
70
+ test('a short table stays whole; a long one keeps its header with two rows and never leaves its last row alone', () => {
71
+ assert.deepEqual([0, 1, 2, 3].map((i) => keepRow(i, 3)), [true, true, true, false]);
72
+ const keep = Array.from({ length: 31 }, (_, i) => keepRow(i, 30));
73
+ assert.deepEqual(keep.map((k, i) => (k ? i : -1)).filter((i) => i >= 0), [0, 1, 2, 29]);
74
+ });
75
+
76
+ test('one number per source, in the order first cited; fenced code holds no citations', () => {
77
+ const md = 'A claim.[^b] Another.[^a]\n\n```architecture\ncaption: x [^z]\n```\n\nAgain.[^b] And.[^c]\n';
78
+ assert.deepEqual(citedOrder(md), ['b', 'a', 'c']);
79
+ assert.deepEqual([...sourceNumbers(md)], [['b', 1], ['a', 2], ['c', 3]]);
80
+ const refs = { a: { client: true, title: 'Brief', date: '1 May' }, b: { title: 'Price list', publisher: 'AWS', date: '2026', url: 'https://x' }, c: { title: 'C', url: 'https://c' } };
81
+ assert.equal(referenceList(md, refs).length, 3);
82
+ });
83
+
84
+ test('a footnote is short: the URL lives in References only', () => {
85
+ const refs = { b: { title: 'Price list', publisher: 'AWS', date: '2026', url: 'https://x.example' }, c: { title: 'C', url: 'https://c' } };
86
+ assert.equal(footnoteText(refs, 'b'), 'Price list. AWS, 2026.');
87
+ assert.equal(footnoteText(refs, 'c'), 'C.');
88
+ assert.match(referenceList('x[^b]', refs)[0], /https:\/\/x\.example/);
89
+ });
@@ -0,0 +1,112 @@
1
+ // The standard contents: seven fixed `##` headings in a fixed order, the
2
+ // monthly running costs inside Hosting and security, References built last.
3
+ import { test } from 'node:test';
4
+ import assert from 'node:assert/strict';
5
+ import { CONTENTS, contentsOf, partOf, runningCosts, splitParts } from '../lib/parts.mjs';
6
+ import { acmeMd, findingsFor } from './acme.mjs';
7
+
8
+ const has = (out, re) => assert.ok(out.some((f) => re.test(f)), `expected ${re}:\n${out.join('\n')}`);
9
+
10
+ test('the acme proposal passes clean', () => {
11
+ assert.deepEqual(findingsFor(acmeMd()), []);
12
+ });
13
+
14
+ test('the standard contents: price early, the technical detail after it', () => {
15
+ assert.deepEqual(CONTENTS.map((p) => p.heading), ['Executive summary', 'Proposed solution', 'Price', 'Assumptions and exclusions',
16
+ 'How it works', 'Hosting and security', 'Delivery plan and acceptance']);
17
+ const heads = [...acmeMd().matchAll(/^## (.+)$/gm)].map((m) => m[1]);
18
+ assert.deepEqual(heads, CONTENTS.map((p) => p.heading));
19
+ });
20
+
21
+ test('a part is its fixed heading, case and spacing aside; nothing else is a part', () => {
22
+ assert.equal(partOf('Price'), 'scope-price');
23
+ assert.equal(partOf('how it works'), 'technology');
24
+ assert.equal(partOf(' Hosting and security '), 'hosting');
25
+ for (const h of ['Features and price', 'Investment', 'Technology', 'Delivery plan', 'Assumptions and out of scope', 'Background and objectives', 'How it works {#technology}']) assert.equal(partOf(h), null, h);
26
+ });
27
+
28
+ test('a ## inside a fence is not a part', () => {
29
+ assert.deepEqual(splitParts('## Price\ntext\n```mermaid\n## not a heading\n```\n').map((p) => p.id), ['scope-price']);
30
+ });
31
+
32
+ test('a heading outside the standard contents is refused; a ### inside a part is free', () => {
33
+ has(findingsFor(acmeMd().replace('### Background and objectives', '## Background and objectives')), /## Background and objectives: not in the standard contents/);
34
+ has(findingsFor(acmeMd().replace('## Price', '## Features and price')), /## Features and price: not in the standard contents/);
35
+ has(findingsFor(acmeMd().replace('## Price', '## Features and price')), /missing part: ## Price/);
36
+ });
37
+
38
+ test('every part is required, once each', () => {
39
+ const md = acmeMd().replace(/## Hosting and security[\s\S]*?(?=## Delivery)/, '').replace(/## Delivery plan and acceptance[\s\S]*$/, '');
40
+ const out = findingsFor(md);
41
+ has(out, /missing part: ## Delivery plan and acceptance/);
42
+ has(out, /missing part: ## Hosting and security/);
43
+ has(findingsFor(`${acmeMd()}\n## Price\n\nAgain.\n`), /## Price appears 2 times/);
44
+ });
45
+
46
+ test('the parts run in the standard order, whatever the brief', () => {
47
+ const techFirst = acmeMd().replace(/(## Price[\s\S]*?)(## How it works[\s\S]*?)(## Hosting and security)/, '$2$1$3');
48
+ has(findingsFor(techFirst), /parts out of order: the contents run Executive summary → Proposed solution → Price → Assumptions and exclusions → How it works → Hosting and security → Delivery plan and acceptance → References/);
49
+ });
50
+
51
+ test('order and optional are retired frontmatter keys', () => {
52
+ has(findingsFor(acmeMd().replace('cloud: other', 'cloud: other\norder: brief')), /"order" is retired/);
53
+ has(findingsFor(acmeMd().replace('cloud: other', 'cloud: other\noptional: ["context"]')), /"optional" is retired/);
54
+ });
55
+
56
+ test('Hosting and security holds the monthly running costs under their fixed ### heading', () => {
57
+ has(findingsFor(acmeMd().replace('### Monthly running costs', '### What it costs')), /Hosting and security: needs a ### Monthly running costs section/);
58
+ const parts = splitParts(acmeMd());
59
+ assert.match(runningCosts(parts)[0].text, /billed to your own account/);
60
+ });
61
+
62
+ test('a running cost needs the source of its price', () => {
63
+ has(findingsFor(acmeMd().replace('we size it with you before go-live.', 'about $40 a month.')), /running costs: .* needs the source of its price/);
64
+ assert.deepEqual(findingsFor(acmeMd().replace('we size it with you before go-live.', 'about $40 a month.[^reminders-study]')), []);
65
+ });
66
+
67
+ test('the solution part stays short; the detail goes in How it works', () => {
68
+ const long = acmeMd().replace('One new system with two parts', `${'The booking page shows every free slot. '.repeat(70)}One new system with two parts`);
69
+ has(findingsFor(long), /Proposed solution: \d+ words — keep it short/);
70
+ });
71
+
72
+ test('How it works and Hosting and security need an architecture figure and a strengths / weaknesses table', () => {
73
+ const md = acmeMd().replace(/```architecture[\s\S]*?```\n/, '').replace(/\| Option \| Strengths[\s\S]*?\n\n/, '');
74
+ const out = findingsFor(md);
75
+ has(out, /needs at least one architecture diagram/);
76
+ has(out, /needs a strengths \/ weaknesses table/);
77
+ });
78
+
79
+ test('Price needs a price table; assumptions stay short', () => {
80
+ has(findingsFor(acmeMd().replace(/\| Feature \| What you get[\s\S]*?\n\n/, 'Prices follow.\n\n')), /Price: needs a price table/);
81
+ has(findingsFor(acmeMd().replace('- Recurring bookings are not included.', `- ${'Every word counts here. '.repeat(120)}`)), /Assumptions and exclusions: \d+ words — keep it short/);
82
+ });
83
+
84
+ test('frontmatter contract: required keys and enums', () => {
85
+ const out = findingsFor(acmeMd().replace('cloud: other\n', 'cloud: azure\n').replace(/subtitle: .*\n/, ''));
86
+ has(out, /missing "subtitle"/);
87
+ has(out, /cloud must be aws \| other \| none/);
88
+ });
89
+
90
+ // A client's reviewers may set the order and headings: frontmatter `contents`.
91
+ const REVIEWED = '[["summary","Executive summary"],["scope-price","Pricing by requirement"],["assumptions","Assumptions and exclusions"],["plan","Delivery plan and acceptance"],["team","Team breakdown"],["technology","How it works"],["solution","Proposed solution"],["hosting","Hosting and security"]]';
92
+ function reviewed() {
93
+ const md = acmeMd().replace('cloud: other', `cloud: other\ncontents: ${REVIEWED}`).replace('## Price\n', '## Pricing by requirement\n');
94
+ const part = (h) => new RegExp(`(## ${h}\\n[\\s\\S]*?)(?=\\n## |$)`).exec(md)[1];
95
+ const [sum, sol, price, asm, tech, host, plan] = ['Executive summary', 'Proposed solution', 'Pricing by requirement', 'Assumptions and exclusions', 'How it works', 'Hosting and security', 'Delivery plan and acceptance'].map(part);
96
+ const head = md.slice(0, md.indexOf('## Executive summary'));
97
+ return `${head}${[sum, price, asm, plan, '## Team breakdown\n\nRoles to be named by the project team.\n', tech, sol, host].join('\n')}\n`;
98
+ }
99
+
100
+ test('frontmatter contents sets the order and headings of the parts', () => {
101
+ assert.deepEqual(findingsFor(reviewed()), []);
102
+ const parts = splitParts(reviewed(), contentsOf({ contents: JSON.parse(REVIEWED) }));
103
+ assert.deepEqual(parts.map((p) => p.id), ['summary', 'scope-price', 'assumptions', 'plan', 'team', 'technology', 'solution', 'hosting']);
104
+ });
105
+
106
+ test('frontmatter contents keeps every standard part, once, and the order it gives', () => {
107
+ has(findingsFor(reviewed().replace('["solution","Proposed solution"],', '')), /contents leaves out the standard part "solution"/);
108
+ has(findingsFor(reviewed().replace('contents: [', 'contents: [["team","Team"],')), /contents lists "team" twice/);
109
+ has(findingsFor(reviewed().replace(/contents: .*/, 'contents: ["summary"]')), /contents must be a JSON list/);
110
+ const swapped = reviewed().replace('["technology","How it works"],["solution","Proposed solution"]', '["solution","Proposed solution"],["technology","How it works"]');
111
+ has(findingsFor(swapped), /parts out of order: the contents run Executive summary → Pricing by requirement/);
112
+ });
@@ -0,0 +1,122 @@
1
+ // Every price traces to the price source, cites one, or sums the rows above;
2
+ // the summary quotes the headline; durations come from the PM's files.
3
+ import { test } from 'node:test';
4
+ import assert from 'node:assert/strict';
5
+ import { writeFileSync, mkdtempSync, copyFileSync } from 'node:fs';
6
+ import { tmpdir } from 'node:os';
7
+ import { join } from 'node:path';
8
+ import { priceSourceFigures } from '../lib/price-source.mjs';
9
+ import { acmeMd, findingsFor } from './acme.mjs';
10
+
11
+ const has = (out, re) => assert.ok(out.some((f) => re.test(f)), `expected ${re}:\n${out.join('\n')}`);
12
+ const fixture = (name) => new URL(`./fixtures/${name}`, import.meta.url).pathname;
13
+
14
+ test('an invented price is refused; a cited one passes', () => {
15
+ has(findingsFor(acmeMd().replace('$3,600 – $5,000', '$3,600 – $5,500')), /price \$5,500 .* does not come from the price source/);
16
+ const cited = acmeMd().replace('Two milestones.', 'Hosting is about $20 a month.[^reminders-study] Two milestones.');
17
+ assert.deepEqual(findingsFor(cited), []);
18
+ });
19
+
20
+ test('a table citation does not vouch for a scope-price row outside the price source', () => {
21
+ const cited = acmeMd().replace('| Online booking | Customers pick a free slot; double-booking is impossible | $6,400 – $9,000 |', '| Online booking | Customers pick a free slot; double-booking is impossible[^reminders-study] | $6,400 – $9,000 |');
22
+ assert.deepEqual(findingsFor(cited), []);
23
+ const wrong = cited.replace('| **Total**', '| Extras | Anything else | $99,999 |\n| **Total**');
24
+ const out = findingsFor(wrong);
25
+ has(out, /price \$99,999 in "Price" does not come from the price source/);
26
+ assert.ok(!out.some((f) => /\$99,999.*cites no source/.test(f)), out.join('\n'));
27
+ });
28
+
29
+ test('the summary must quote the headline as the source gives it', () => {
30
+ const out = findingsFor(acmeMd().replace('for **$10,000 – $14,000**', 'for a fair price'));
31
+ has(out, /headline price 10,000 is missing/);
32
+ has(out, /headline price 14,000 is missing/);
33
+ });
34
+
35
+ test('a bold total row may be the sum of the rows it closes', () => {
36
+ const md = acmeMd().replace('| **Total** | | **$10,000 – $14,000** |', '| Setup | Accounts and training | $1,250 |\n| **Total** | | **$1,250** |');
37
+ assert.ok(!findingsFor(md).some((f) => /\$1,250/.test(f)), 'a single-row total is its own sum');
38
+ has(findingsFor(md.replace('**$1,250**', '**$1,350**')), /\$1,350/);
39
+ });
40
+
41
+ test('a duration in the plan needs a source that states it', () => {
42
+ has(findingsFor(acmeMd().replace('Two milestones.', 'Two milestones over 12 weeks.')), /"12 weeks" in "Delivery plan and acceptance"/);
43
+ });
44
+
45
+ test('a percentage needs a source or the words that it is our assumption', () => {
46
+ has(findingsFor(acmeMd().replace('Two milestones.', 'Two milestones; 40% of the work is in the first.')), /a percentage needs its source/);
47
+ assert.deepEqual(findingsFor(acmeMd().replace('Two milestones.', 'Two milestones; we assume 40% of the work is in the first.')), []);
48
+ });
49
+
50
+ test('the PM file is the source of every amount and duration it states', () => {
51
+ const dir = mkdtempSync(join(tmpdir(), 'proposal-pm-'));
52
+ writeFileSync(join(dir, 'plan.md'), '| Phase | Duration | Price (USD) |\n|---|---|---:|\n| Build | 8 weeks | 9,000 |\n| Pilot | 2 to 4 weeks | 3,000 |\n| **Total** | | **12,000** |\n');
53
+ writeFileSync(join(dir, 'price-source.json'), JSON.stringify({ kind: 'pm-file', files: ['plan.md'], total: 12000 }));
54
+ const pm = priceSourceFigures(join(dir, 'price-source.json'));
55
+ assert.deepEqual(pm.headline, [12000]);
56
+ assert.deepEqual(pm.durations, [2, 4, 8]);
57
+ const md = acmeMd().replace('**$10,000 – $14,000**', '**$12,000**').replace(/\$[\d,]+ – \$[\d,]+/g, '$9,000').replace('Two milestones.', 'Build takes 8 weeks, the pilot 2 to 4 weeks.');
58
+ const out = findingsFor(md, { priceSource: pm });
59
+ assert.ok(!out.some((f) => /weeks|12,000|9,000/.test(f)), out.join('\n'));
60
+ writeFileSync(join(dir, 'price-source.json'), JSON.stringify({ kind: 'pm-file', files: ['plan.md'], total: 99000 }));
61
+ assert.throws(() => priceSourceFigures(join(dir, 'price-source.json')), /total 99000 is not stated/);
62
+ });
63
+
64
+ test('the PM file counts only currency-marked or price-column numbers as prices', () => {
65
+ const dir = mkdtempSync(join(tmpdir(), 'proposal-pm-'));
66
+ writeFileSync(join(dir, 'plan.md'), 'Kickoff in 2026 with a team of 150 people, call 5551234.\n\n| Phase | Price (USD) |\n|---|---:|\n| Build | 9,000 |\n| Pilot | 3,000 |\n\nExtra training costs $750.\n');
67
+ const spec = (total) => JSON.stringify({ kind: 'pm-file', files: ['plan.md'], total });
68
+ writeFileSync(join(dir, 'price-source.json'), spec(12000));
69
+ assert.throws(() => priceSourceFigures(join(dir, 'price-source.json')), /total 12000 is not stated/);
70
+ for (const stray of [2026, 150, 5551234]) {
71
+ writeFileSync(join(dir, 'price-source.json'), spec(stray));
72
+ assert.throws(() => priceSourceFigures(join(dir, 'price-source.json')), /is not stated as a price/, String(stray));
73
+ }
74
+ writeFileSync(join(dir, 'price-source.json'), spec(750));
75
+ assert.deepEqual(priceSourceFigures(join(dir, 'price-source.json')).amounts, [750, 3000, 9000]);
76
+ });
77
+
78
+ test('a CSV price file is read by its price column', () => {
79
+ const dir = mkdtempSync(join(tmpdir(), 'proposal-pm-'));
80
+ writeFileSync(join(dir, 'plan.csv'), 'Phase,Duration,Price (USD)\nBuild,8 weeks,"9,000"\nPilot,2 weeks,3000\n');
81
+ writeFileSync(join(dir, 'price-source.json'), JSON.stringify({ kind: 'pm-file', files: ['plan.csv'], total: 9000 }));
82
+ const f = priceSourceFigures(join(dir, 'price-source.json'));
83
+ assert.deepEqual(f.amounts, [3000, 9000]);
84
+ assert.deepEqual(f.durations, [2, 8]);
85
+ });
86
+
87
+ test('a quoted CSV field with a comma keeps the price column aligned', () => {
88
+ const dir = mkdtempSync(join(tmpdir(), 'proposal-pm-'));
89
+ writeFileSync(join(dir, 'plan.csv'), 'Phase,Duration,Price (USD)\n"Build, core",8 weeks,9000\nPilot,"2, maybe 4 weeks",3000\n');
90
+ writeFileSync(join(dir, 'price-source.json'), JSON.stringify({ kind: 'pm-file', files: ['plan.csv'], total: 9000 }));
91
+ assert.deepEqual(priceSourceFigures(join(dir, 'price-source.json')).amounts, [3000, 9000]);
92
+ });
93
+
94
+ test('an .xlsx PM file is refused with the way forward', () => {
95
+ const dir = mkdtempSync(join(tmpdir(), 'proposal-pm-'));
96
+ copyFileSync(fixture('workbook-recalculated.xlsx'), join(dir, 'pm-prices.xlsx'));
97
+ writeFileSync(join(dir, 'price-source.json'), JSON.stringify({ kind: 'pm-file', files: ['pm-prices.xlsx'], total: 1000 }));
98
+ assert.throws(() => priceSourceFigures(join(dir, 'price-source.json')), /pm-prices\.xlsx is an \.xlsx file.*--workbook.*CSV or Markdown/);
99
+ });
100
+
101
+ test('both file price sources expose their total as the cost range the lead value reads', () => {
102
+ const dir = mkdtempSync(join(tmpdir(), 'proposal-cost-'));
103
+ writeFileSync(join(dir, 'plan.md'), '| Phase | Price (USD) |\n|---|---:|\n| Build | 9,000 |\n');
104
+ writeFileSync(join(dir, 'price-source.json'), JSON.stringify({ kind: 'pm-file', files: ['plan.md'], total: 9000 }));
105
+ assert.deepEqual(priceSourceFigures(join(dir, 'price-source.json')).cost, { low: 9000, high: 9000 });
106
+ writeFileSync(join(dir, 'price-source.json'), JSON.stringify({ kind: 'workbook-rows', file: fixture('workbook-recalculated.xlsx'), sheet: 'Project Roll-up', nameCol: 'B', priceCol: 'C', groupCol: 'A', rows: [56, 56], totalCell: 'C56' }));
107
+ const f = priceSourceFigures(join(dir, 'price-source.json'));
108
+ assert.deepEqual(f.cost, { low: f.total, high: f.total });
109
+ });
110
+
111
+ test('workbook feature rows: whole dollars that add up to the rounded total', () => {
112
+ const dir = mkdtempSync(join(tmpdir(), 'proposal-rows-'));
113
+ writeFileSync(join(dir, 'price-source.json'), JSON.stringify({ kind: 'workbook-rows', file: fixture('workbook-recalculated.xlsx'), sheet: 'Project Roll-up', nameCol: 'B', priceCol: 'C', groupCol: 'A', rows: [56, 56], totalCell: 'C56' }));
114
+ const f = priceSourceFigures(join(dir, 'price-source.json'));
115
+ assert.equal(f.items.reduce((s, x) => s + x.price, 0), f.total);
116
+ assert.deepEqual(f.headline, [f.total]);
117
+ });
118
+
119
+ test('an estimate splits its range over features by their points', () => {
120
+ const out = findingsFor(acmeMd());
121
+ assert.deepEqual(out, []);
122
+ });
@@ -7,7 +7,7 @@ import {
7
7
 
8
8
  const base = new URL('../..', import.meta.url).pathname;
9
9
 
10
- for (const file of moduleFiles(base, ['scripts/lib', 'scripts'])) {
10
+ for (const file of moduleFiles(base, ['scripts/lib', 'scripts', 'scripts/build', 'scripts/diagram'])) {
11
11
  test(`gates: ${file.replace(base, '')}`, () => {
12
12
  assert.deepEqual(violations(readFileSync(file, 'utf8')), []);
13
13
  });
@@ -0,0 +1,38 @@
1
+ // Step flows (```steps): every step-to-step arrow drawn, including the elbow
2
+ // from one row to the next, and arrows sized for the printed scale.
3
+ import { test } from 'node:test';
4
+ import assert from 'node:assert/strict';
5
+ import { parseSteps, stepsSvg } from '../diagram/steps.mjs';
6
+ import { arrowSize } from '../diagram/style.mjs';
7
+ import { mermaidLinks } from '../build/arrows.mjs';
8
+
9
+ const BODY = 'per-row: 3\nhighlight: 5\nOpen a job | Pick a recent job\nAdd the scan | One image per floor\nSet the scale | One known object\nDraw the plan | Walls and rooms\nThe app calculates | Every area\nExport | Three versions';
10
+
11
+ test('a steps fence parses options and steps', () => {
12
+ const s = parseSteps(BODY);
13
+ assert.equal(s.perRow, 3);
14
+ assert.equal(s.highlight, 5);
15
+ assert.deepEqual(s.steps[0], { title: 'Open a job', detail: 'Pick a recent job' });
16
+ assert.equal(s.steps.length, 6);
17
+ });
18
+
19
+ test('every step joins the next: n - 1 arrows, the row break as an elbow', () => {
20
+ const { svg, edges } = stepsSvg(BODY, 'Flow');
21
+ assert.equal(edges, 5);
22
+ const paths = [...svg.matchAll(/<path data-edge="(\d)" d="M([^"]+)"/g)];
23
+ assert.deepEqual(paths.map((m) => Number(m[1])), [0, 1, 2, 3, 4]);
24
+ assert.equal(paths[2][2].split(' L').length, 4, 'step 3 to step 4 is an elbow of four points');
25
+ assert.match(svg, /<circle [^>]*fill="#F15927"\/><text [^>]*>5<\/text>/);
26
+ assert.match(svg, /fill="#FDF0EB" stroke="#F15927"/, 'the highlighted step uses the accent colours');
27
+ });
28
+
29
+ test('arrows grow with the scale a figure is printed at', () => {
30
+ assert.deepEqual(arrowSize(600, 300), { stroke: 2.4, head: 13 });
31
+ const big = arrowSize(1356, 1600);
32
+ assert.ok(big.stroke * 0.5 >= 1.0 && big.head * 0.5 >= 6.5, JSON.stringify(big));
33
+ });
34
+
35
+ test('mermaid links are counted per arrow, invisible links not', () => {
36
+ assert.equal(mermaidLinks('flowchart LR\n a --> b --> c\n c -.->|"no"| d\n r1 ~~~ r2\n classDef hot fill:#fff'), 3);
37
+ assert.equal(mermaidLinks('sequenceDiagram\n a->>b: hi'), null);
38
+ });
@@ -0,0 +1,46 @@
1
+ // Layer 1 of the evaluation: the skill refuses to output. validate.mjs exits 1
2
+ // and names each violation; render.mjs refuses the same document and writes
3
+ // nothing, before any build tool is even loaded.
4
+ import { test } from 'node:test';
5
+ import assert from 'node:assert/strict';
6
+ import { existsSync } from 'node:fs';
7
+ import { spawnSync } from 'node:child_process';
8
+ import { join } from 'node:path';
9
+ import { stageAcme } from './acme.mjs';
10
+
11
+ const cli = (name) => new URL(`../${name}.mjs`, import.meta.url).pathname;
12
+ const run = (name, args) => spawnSync('node', [cli(name), ...args], { encoding: 'utf8', env: { ...process.env, PROPOSAL_TOOL_DIR: '/nonexistent' } });
13
+
14
+ test('the pass fixture validates clean', () => {
15
+ const lead = stageAcme();
16
+ const r = run('validate', ['--md', lead.md, '--estimation', lead.estimation]);
17
+ assert.equal(r.status, 0, r.stderr);
18
+ assert.match(r.stdout, /proposal deliverable valid/);
19
+ });
20
+
21
+ test('the fail fixture exits 1 and names every violation class', () => {
22
+ const lead = stageAcme();
23
+ const r = run('validate', ['--md', join(lead.dir, 'proposal-fail.md'), '--estimation', lead.estimation]);
24
+ assert.equal(r.status, 1);
25
+ for (const re of [/missing part: ## Assumptions and exclusions/, /"Next steps" part is never/, /"About" part is never/, /valid_until was removed/,
26
+ /validity wording/, /"PRD" points into a client document/, /price \$9,999/, /a percentage needs its source/, /was not opened and checked/,
27
+ /AWS icon on a figure that is not AWS/, /placeholder/, /"src"/, /jargon/, /"12 weeks"/, /headline price/]) {
28
+ assert.match(r.stderr, re);
29
+ }
30
+ });
31
+
32
+ test('render refuses a failing proposal and writes nothing', () => {
33
+ const lead = stageAcme();
34
+ const out = join(lead.dir, 'dist');
35
+ const r = run('render', ['--md', join(lead.dir, 'proposal-fail.md'), '--estimation', lead.estimation, '--out', out]);
36
+ assert.equal(r.status, 1);
37
+ assert.match(r.stderr, /"Next steps" part is never/);
38
+ assert.equal(existsSync(out), false);
39
+ });
40
+
41
+ test('render with a valid proposal but no build tools says how to install them', () => {
42
+ const lead = stageAcme();
43
+ const r = run('render', ['--md', lead.md, '--estimation', lead.estimation, '--out', join(lead.dir, 'dist'), '--draft']);
44
+ assert.notEqual(r.status, 0);
45
+ assert.match(r.stderr, /npm install --save-exact marked@18\.1\.1/);
46
+ });
@@ -0,0 +1,76 @@
1
+ // Agentic estimates carry no price; their price lives in the CES Ballpark
2
+ // Estimator v2 workbook filled beside them. These tests pin the second price
3
+ // source: read the recalculated workbook's own figures, never recompute them.
4
+ import { test } from 'node:test';
5
+ import assert from 'node:assert/strict';
6
+ import { readFileSync, writeFileSync, mkdtempSync } from 'node:fs';
7
+ import { execFileSync } from 'node:child_process';
8
+ import { tmpdir } from 'node:os';
9
+ import { join } from 'node:path';
10
+ import { readWorkbookPrice } from '../lib/workbook.mjs';
11
+ import { deriveFigures } from '../lib/figures.mjs';
12
+ import { acmeMd, findingsFor } from './acme.mjs';
13
+
14
+ const fixture = (name) => new URL(`./fixtures/${name}`, import.meta.url).pathname;
15
+ const recalculated = fixture('workbook-recalculated.xlsx');
16
+
17
+ // Same shape compute.mjs writes for an agentic estimate: a roadmap, a zero price.
18
+ const agentic = () => ({
19
+ inputs: { deliveryMode: 'agentic', features: [] },
20
+ computed: {
21
+ price: { presentLow: 0, presentHigh: 0, singleNumber: 0, p50: 0 },
22
+ roadmap: [
23
+ { milestone: 'M1 - Walking skeleton', features: ['F01'], share: 0.75 },
24
+ { milestone: 'M2 - Weekly work', features: ['F02'], share: 0.25 },
25
+ ],
26
+ },
27
+ });
28
+
29
+ test('reads the presented range and single number from Project Roll-up', () => {
30
+ assert.deepEqual(readWorkbookPrice(recalculated), { presentLow: 64500, presentHigh: 78500, singleNumber: 72000 });
31
+ });
32
+
33
+ test('a workbook saved without recalculation is refused, not read as $0', () => {
34
+ assert.throws(() => readWorkbookPrice(fixture('workbook-unrecalculated.xlsx')), /no cached value.*recalculate/i);
35
+ });
36
+
37
+ test('a file that is not an xlsx is refused', () => {
38
+ assert.throws(() => readWorkbookPrice(fixture('acme/proposal.md')), /not an xlsx/i);
39
+ });
40
+
41
+ test('an agentic estimate is quoted at the workbook price, split by its roadmap', () => {
42
+ const f = deriveFigures(agentic(), { workbookPrice: readWorkbookPrice(recalculated) });
43
+ assert.deepEqual(f.cost, { low: 64500, high: 78500 });
44
+ assert.equal(f.singleNumber, 72000);
45
+ assert.equal(f.source, 'workbook');
46
+ assert.deepEqual(f.milestones.map((m) => m.cost), [{ low: 48400, high: 58900 }, { low: 16100, high: 19600 }]);
47
+ });
48
+
49
+ test('a priced estimate refuses a workbook: one estimate, one price', () => {
50
+ const priced = agentic();
51
+ priced.computed.price = { presentLow: 8000, presentHigh: 12000, singleNumber: 10000, p50: 7998 };
52
+ assert.throws(() => deriveFigures(priced, { workbookPrice: readWorkbookPrice(recalculated) }), /already priced/);
53
+ });
54
+
55
+ test('an agentic estimate with no workbook is still refused', () => {
56
+ assert.throws(() => deriveFigures(agentic()), /estimate is not priced/);
57
+ });
58
+
59
+ test('the client checks accept workbook amounts and refuse others', () => {
60
+ const md = acmeMd().replace(/\$[\d,]+/g, '$9,999');
61
+ const findings = findingsFor(md, { estimation: agentic(), workbookPrice: readWorkbookPrice(recalculated) });
62
+ assert.ok(findings.some((f) => /price \$9,999 .*\(workbook\)/.test(f)), findings.join('\n'));
63
+ assert.ok(findings.some((f) => /headline price 64,500 is missing/.test(f)), findings.join('\n'));
64
+ });
65
+
66
+ test('derive.mjs --workbook writes workbook-sourced figures', () => {
67
+ const dir = mkdtempSync(join(tmpdir(), 'proposal-workbook-'));
68
+ const est = join(dir, 'estimation.json');
69
+ const out = join(dir, 'proposal-figures.json');
70
+ writeFileSync(est, JSON.stringify(agentic()));
71
+ const cli = new URL('../derive.mjs', import.meta.url).pathname;
72
+ execFileSync('node', [cli, '--estimation', est, '--workbook', recalculated, '--out', out]);
73
+ const written = JSON.parse(readFileSync(out, 'utf8'));
74
+ assert.equal(written.cost.low, 64500);
75
+ assert.equal(written.source, 'workbook');
76
+ });
@@ -15,10 +15,9 @@ test('the sin-kowa-mini lead and its sentences pass', () => {
15
15
  assert.deepEqual(proposalFindings(staged).findings, []);
16
16
  });
17
17
 
18
- test('W1: client, title, firm, scope intro, ISO date and tech level are required', () => {
18
+ test('W1: client, title, scope intro, ISO date and tech level are required', () => {
19
19
  const out = check((i) => { delete i.firm; i.scopeIntro = ' '; i.date = '7 Oct 2026'; i.techLevel = 'expert'; });
20
20
  assert.deepEqual(out, [
21
- 'proposal-inputs.json: missing "firm"',
22
21
  'proposal-inputs.json: missing "scopeIntro"',
23
22
  'proposal-inputs.json: "date" must be an ISO date (YYYY-MM-DD)',
24
23
  'proposal-inputs.json: "techLevel" must be non-tech | low-tech | technical',
@@ -96,3 +95,9 @@ test('W6: a stale estimate, a missing BA package or bad inputs JSON stop before
96
95
  assert.equal(findings.length, 1);
97
96
  assert.match(findings[0], /^proposal-inputs\.json: /);
98
97
  });
98
+
99
+ test('W5: no validity wording, next steps or about-us text in a sentence', () => {
100
+ const out = check((i) => { i.scopeIntro = 'This proposal is valid until 1 December 2026.'; i.systems['SYS-002'] = 'Next steps: sign and return.'; });
101
+ assert.ok(out.some((f) => /scopeIntro: validity wording/.test(f)), out.join('\n'));
102
+ assert.ok(out.some((f) => /systems.SYS-002: no next steps/.test(f)), out.join('\n'));
103
+ });
@@ -2,7 +2,7 @@ import { test } from 'node:test';
2
2
  import assert from 'node:assert/strict';
3
3
  import { loadLead } from '../lib/workflow-lead.mjs';
4
4
  import { proposalView, flowCode } from '../lib/workflow-view.mjs';
5
- import { contentHtml, navHtml } from '../lib/workflow-html.mjs';
5
+ import { workflowMarkdown } from '../lib/workflow-md.mjs';
6
6
  import { noFlowsAt } from '../../../estimate/workflow-based/scripts/test/stage.mjs';
7
7
  import { lead, passInputs } from './workflow-stage.mjs';
8
8
 
@@ -39,7 +39,7 @@ test('register, cost and byline come from the estimate and the inputs', () => {
39
39
  test('nothing on the page carries an internal ID or engineer milestone name', () => {
40
40
  const v = view();
41
41
  assert.doesNotMatch(JSON.stringify(v), ID);
42
- assert.doesNotMatch(contentHtml(v) + navHtml(v), ID);
42
+ assert.doesNotMatch(workflowMarkdown(v), ID);
43
43
  });
44
44
 
45
45
  test('flow code quotes labels, keeps branch labels and survives a quote in a name', () => {
@@ -51,21 +51,26 @@ test('markup in a name is shown as text, never as HTML', () => {
51
51
  const v = view();
52
52
  v.systems[0].features[0].name = '<img src=x onerror=alert(1)>';
53
53
  v.scope.intro = 'Fish & <b>chips</b>';
54
- const html = contentHtml(v);
55
- assert.doesNotMatch(html, /<img|<b>chips/);
56
- assert.match(html, /&lt;img src=x onerror=alert\(1\)&gt;/);
57
- assert.match(html, /Fish &amp; &lt;b&gt;chips&lt;\/b&gt;/);
54
+ const md = workflowMarkdown(v);
55
+ assert.doesNotMatch(md, /<img|<b>chips/);
56
+ assert.match(md, /&lt;img src=x onerror=alert\(1\)&gt;/);
57
+ assert.match(md, /Fish &amp; &lt;b&gt;chips&lt;\/b&gt;/);
58
58
  });
59
59
 
60
60
  test('without a map label the scope table has one column', () => {
61
61
  const v = view();
62
62
  v.scope.mapLabel = null;
63
- assert.match(contentHtml(v), /<thead><tr><th>System<\/th><\/tr><\/thead>/);
63
+ assert.match(workflowMarkdown(v), /^\| System \|\n\| --- \|$/m);
64
64
  });
65
65
 
66
- test('the menu links every section in page order', () => {
67
- const links = [...navHtml(view()).matchAll(/href="#([\w-]+)"/g)].map((m) => m[1]);
68
- assert.deepEqual(links, ['scope', 'system-1', 'system-2', 'milestones', 'register', 'cost']);
66
+ test('the parts run in the workflow layout: scope, each system, milestones, register, cost', () => {
67
+ const parts = [...workflowMarkdown(view()).matchAll(/^## (.+)$/gm)].map((m) => m[1]);
68
+ assert.deepEqual(parts, ['Scope: what this proposal covers', 'System 1: Warehouse operations', 'System 2: Orders &amp; invoicing', 'Milestones', 'Assumptions & exclusions', 'Cost estimate']);
69
+ });
70
+
71
+ test('each workflow becomes a captioned mermaid figure in its system part', () => {
72
+ const md = workflowMarkdown(view());
73
+ assert.match(md, /### Main workflow · Order to cash\n\n```mermaid\n%% caption: Orders &amp; invoicing: Order to cash\nflowchart LR/);
69
74
  });
70
75
 
71
76
  test('a system the PO document draws no workflow for: no flows, features still listed', () => {
@@ -1,5 +1,6 @@
1
1
  import { readFileSync } from 'node:fs';
2
2
  import { checkProposal } from './lib/checks.mjs';
3
+ import { loadProposal } from './lib/load.mjs';
3
4
  import { isWorkflow } from './lib/workflow-lead.mjs';
4
5
  import { validateWorkflow } from './lib/workflow-cli.mjs';
5
6
 
@@ -13,9 +14,13 @@ function parseArgs(argv) {
13
14
 
14
15
  const args = parseArgs(process.argv.slice(2));
15
16
  const estimation = JSON.parse(readFileSync(args.estimation, 'utf8'));
16
- if (isWorkflow(estimation)) process.exit(validateWorkflow(args));
17
- const md = readFileSync(args.md, 'utf8');
18
- const findings = checkProposal({ md, estimation });
17
+ // The Systems & Workflows page is built from proposal-inputs.json; a
18
+ // proposal.md (--md) is the classic document, whatever the estimate's mode.
19
+ if (args.inputs || (!args.md && isWorkflow(estimation))) process.exit(validateWorkflow(args));
20
+ // --workbook: the recalculated Ballpark v2 workbook an agentic estimate is
21
+ // quoted at; --prices: price-source.json (a workbook's feature rows or the PM's files).
22
+ const lead = loadProposal(args);
23
+ const findings = [...lead.errors, ...checkProposal(lead)];
19
24
  if (findings.length) {
20
25
  console.error(findings.join('\n'));
21
26
  process.exit(1);