@v11g/agents-rock 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (572) hide show
  1. package/README.md +23 -5
  2. package/package.json +1 -1
  3. package/plugins/business-analyst/skills/business-analyst/README.md +1 -1
  4. package/plugins/business-analyst/skills/business-analyst/evals/evals.json +1 -1
  5. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_data.cpython-314.pyc +0 -0
  6. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_layout.cpython-314.pyc +0 -0
  7. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_page.cpython-314.pyc +0 -0
  8. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_checks.cpython-314.pyc +0 -0
  9. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_render.cpython-314.pyc +0 -0
  10. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/validate.cpython-314.pyc +0 -0
  11. package/plugins/business-analyst/skills/business-analyst/scripts/test/quality-gates.test.mjs +1 -1
  12. package/plugins/business-analyst/skills/business-analyst/scripts/test/review-browser.test.mjs +2 -2
  13. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_body.cpython-314.pyc +0 -0
  14. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_flow.cpython-314.pyc +0 -0
  15. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_package.cpython-314.pyc +0 -0
  16. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_xml.cpython-314.pyc +0 -0
  17. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_quotes.cpython-314.pyc +0 -0
  18. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_rules.cpython-314.pyc +0 -0
  19. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_schema.cpython-314.pyc +0 -0
  20. package/plugins/presales/.claude-plugin/plugin.json +9 -0
  21. package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/workflow-or-exact-stop.md +1 -1
  22. package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/evals.json +5 -5
  23. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/ba-facts-cli.test.mjs +5 -1
  24. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/ba-package-cli.test.mjs +5 -1
  25. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/browser.test.mjs +6 -2
  26. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/check-quotes-cli.test.mjs +5 -1
  27. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/drift-cli.test.mjs +5 -1
  28. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/inputs.test.mjs +6 -2
  29. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-config-cli.test.mjs +5 -1
  30. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-export-cli.test.mjs +5 -1
  31. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-gen-cli.test.mjs +5 -1
  32. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/record-cli.test.mjs +5 -1
  33. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/render.test.mjs +22 -18
  34. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/rerun-safety.test.mjs +5 -1
  35. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-quotes-cli.test.mjs +5 -1
  36. package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-strategy-cli.test.mjs +5 -1
  37. package/plugins/{solution-architect → presales}/skills/estimate/README.md +14 -4
  38. package/plugins/{solution-architect → presales}/skills/estimate/classic/references/writing.md +1 -1
  39. package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/roadmap.mjs +9 -5
  40. package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/estimate-math.test.mjs +11 -0
  41. package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/project-price.test.mjs +10 -0
  42. package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/xlsx-export.test.mjs +12 -12
  43. package/plugins/{solution-architect → presales}/skills/estimate/evals/evals.json +1 -1
  44. package/plugins/presales/skills/estimate/shared/assets/xlsx-export.js +392 -0
  45. package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/project-price.mjs +6 -4
  46. package/plugins/presales/skills/estimate/workflow-based/FLOW.md +176 -0
  47. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/assets/estimate-template.html +127 -10
  48. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/assets/estimator-system.xlsx +0 -0
  49. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/assets/score-review.html +164 -27
  50. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/build-template.mjs +9 -2
  51. package/plugins/presales/skills/estimate/workflow-based/scripts/build-workflow-template.mjs +76 -0
  52. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/build-xlsx-template.py +3 -3
  53. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/cites.mjs +60 -0
  54. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/groups.mjs +65 -0
  55. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/page-html.mjs +43 -0
  56. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/page-view.mjs +30 -4
  57. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/rollup.mjs +43 -12
  58. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/schema.mjs +23 -1
  59. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/score-diff.mjs +6 -1
  60. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/score-html.mjs +23 -4
  61. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/xlsx-group-rows.mjs +20 -0
  62. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/xlsx-rows.mjs +81 -0
  63. package/plugins/presales/skills/estimate/workflow-based/scripts/lib/xlsx-tasks.mjs +25 -0
  64. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/render.mjs +8 -10
  65. package/plugins/presales/skills/estimate/workflow-based/scripts/score-review.mjs +81 -0
  66. package/plugins/presales/skills/estimate/workflow-based/scripts/template/cites.js +46 -0
  67. package/plugins/presales/skills/estimate/workflow-based/scripts/template/effort.css +22 -0
  68. package/plugins/presales/skills/estimate/workflow-based/scripts/template/effort.mjs +37 -0
  69. package/plugins/presales/skills/estimate/workflow-based/scripts/template/estimate-page.css +10 -0
  70. package/plugins/presales/skills/estimate/workflow-based/scripts/template/estimate-page.js +16 -0
  71. package/plugins/presales/skills/estimate/workflow-based/scripts/template/feature-tasks.js +33 -0
  72. package/plugins/presales/skills/estimate/workflow-based/scripts/template/lavish.mjs +39 -0
  73. package/plugins/presales/skills/estimate/workflow-based/scripts/template/tasks.css +25 -0
  74. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/view.js +21 -2
  75. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/also-builds-browser.test.mjs +1 -3
  76. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/browser.test.mjs +10 -7
  77. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/build-pages.test.mjs +10 -15
  78. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/build-template.test.mjs +6 -2
  79. package/plugins/presales/skills/estimate/workflow-based/scripts/test/cites.test.mjs +64 -0
  80. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/cli.test.mjs +1 -0
  81. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/estimator-system.test.mjs +5 -5
  82. package/plugins/presales/skills/estimate/workflow-based/scripts/test/feature-tasks-browser.test.mjs +39 -0
  83. package/plugins/presales/skills/estimate/workflow-based/scripts/test/groups-browser.test.mjs +39 -0
  84. package/plugins/presales/skills/estimate/workflow-based/scripts/test/groups.test.mjs +156 -0
  85. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/link-picker-browser.test.mjs +1 -10
  86. package/plugins/presales/skills/estimate/workflow-based/scripts/test/open-lavish.test.mjs +54 -0
  87. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/page-html.test.mjs +7 -0
  88. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/pages-browser.test.mjs +25 -21
  89. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/render.test.mjs +5 -5
  90. package/plugins/presales/skills/estimate/workflow-based/scripts/test/review-effort.test.mjs +104 -0
  91. package/plugins/presales/skills/estimate/workflow-based/scripts/test/review-lavish.test.mjs +193 -0
  92. package/plugins/presales/skills/estimate/workflow-based/scripts/test/review-tasks.test.mjs +66 -0
  93. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/schema.test.mjs +15 -0
  94. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/score-review.test.mjs +10 -1
  95. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/stage.mjs +16 -8
  96. package/plugins/presales/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs +110 -0
  97. package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/validate.mjs +2 -0
  98. package/plugins/{solution-architect → presales}/skills/new-lead/README.md +1 -1
  99. package/plugins/{solution-architect → presales}/skills/new-lead/SKILL.md +1 -1
  100. package/plugins/{solution-architect → presales}/skills/new-lead/evals/evals.json +13 -13
  101. package/plugins/presales/skills/proposal/README.md +63 -0
  102. package/plugins/presales/skills/proposal/SKILL.md +91 -0
  103. package/plugins/presales/skills/proposal/assets/proposal-page.html +156 -0
  104. package/plugins/presales/skills/proposal/assets/roboto-widths.json +1 -0
  105. package/plugins/{solution-architect → presales}/skills/proposal/evals/evals.json +22 -22
  106. package/plugins/presales/skills/proposal/references/build.md +33 -0
  107. package/plugins/presales/skills/proposal/references/diagrams.md +123 -0
  108. package/plugins/presales/skills/proposal/references/interview.md +66 -0
  109. package/plugins/presales/skills/proposal/references/review.md +41 -0
  110. package/plugins/{solution-architect → presales}/skills/proposal/references/workflow.md +30 -22
  111. package/plugins/presales/skills/proposal/references/writing.md +167 -0
  112. package/plugins/presales/skills/proposal/scripts/build/arrows.mjs +70 -0
  113. package/plugins/presales/skills/proposal/scripts/build/brand.mjs +43 -0
  114. package/plugins/presales/skills/proposal/scripts/build/build.mjs +75 -0
  115. package/plugins/presales/skills/proposal/scripts/build/contents.mjs +42 -0
  116. package/plugins/presales/skills/proposal/scripts/build/docx-blocks.mjs +102 -0
  117. package/plugins/presales/skills/proposal/scripts/build/docx-doc.mjs +91 -0
  118. package/plugins/presales/skills/proposal/scripts/build/docx-inline.mjs +48 -0
  119. package/plugins/presales/skills/proposal/scripts/build/docx-table.mjs +75 -0
  120. package/plugins/presales/skills/proposal/scripts/build/figures.mjs +95 -0
  121. package/plugins/presales/skills/proposal/scripts/build/html.mjs +80 -0
  122. package/plugins/presales/skills/proposal/scripts/build/layout.mjs +48 -0
  123. package/plugins/presales/skills/proposal/scripts/build/notes.mjs +30 -0
  124. package/plugins/presales/skills/proposal/scripts/build/overlap.mjs +57 -0
  125. package/plugins/presales/skills/proposal/scripts/build/page.mjs +50 -0
  126. package/plugins/presales/skills/proposal/scripts/build/pdf.mjs +88 -0
  127. package/plugins/presales/skills/proposal/scripts/build/scope-ids.mjs +10 -0
  128. package/plugins/presales/skills/proposal/scripts/build/tool.mjs +35 -0
  129. package/plugins/{solution-architect → presales}/skills/proposal/scripts/derive.mjs +7 -1
  130. package/plugins/presales/skills/proposal/scripts/diagram/align.mjs +36 -0
  131. package/plugins/presales/skills/proposal/scripts/diagram/draw.mjs +81 -0
  132. package/plugins/presales/skills/proposal/scripts/diagram/grid.mjs +90 -0
  133. package/plugins/presales/skills/proposal/scripts/diagram/icons.mjs +30 -0
  134. package/plugins/presales/skills/proposal/scripts/diagram/index.mjs +23 -0
  135. package/plugins/presales/skills/proposal/scripts/diagram/layout.mjs +42 -0
  136. package/plugins/presales/skills/proposal/scripts/diagram/obstacles.mjs +49 -0
  137. package/plugins/presales/skills/proposal/scripts/diagram/pack.mjs +101 -0
  138. package/plugins/presales/skills/proposal/scripts/diagram/route.mjs +129 -0
  139. package/plugins/presales/skills/proposal/scripts/diagram/steps.mjs +74 -0
  140. package/plugins/presales/skills/proposal/scripts/diagram/style.mjs +61 -0
  141. package/plugins/presales/skills/proposal/scripts/diagram/text.mjs +28 -0
  142. package/plugins/presales/skills/proposal/scripts/lib/bans.mjs +82 -0
  143. package/plugins/presales/skills/proposal/scripts/lib/checks-client.mjs +74 -0
  144. package/plugins/presales/skills/proposal/scripts/lib/checks-doc.mjs +78 -0
  145. package/plugins/presales/skills/proposal/scripts/lib/checks.mjs +44 -0
  146. package/plugins/presales/skills/proposal/scripts/lib/citations.mjs +45 -0
  147. package/plugins/presales/skills/proposal/scripts/lib/diagram-spec.mjs +67 -0
  148. package/plugins/presales/skills/proposal/scripts/lib/figures.mjs +79 -0
  149. package/plugins/presales/skills/proposal/scripts/lib/load.mjs +42 -0
  150. package/plugins/presales/skills/proposal/scripts/lib/money.mjs +62 -0
  151. package/plugins/presales/skills/proposal/scripts/lib/parts.mjs +83 -0
  152. package/plugins/presales/skills/proposal/scripts/lib/price-source.mjs +74 -0
  153. package/plugins/presales/skills/proposal/scripts/lib/prose.mjs +55 -0
  154. package/plugins/presales/skills/proposal/scripts/lib/workbook.mjs +86 -0
  155. package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-checks.mjs +7 -2
  156. package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-cli.mjs +16 -18
  157. package/plugins/presales/skills/proposal/scripts/lib/workflow-md.mjs +35 -0
  158. package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-view.mjs +3 -3
  159. package/plugins/presales/skills/proposal/scripts/render.mjs +55 -0
  160. package/plugins/presales/skills/proposal/scripts/test/acme.mjs +28 -0
  161. package/plugins/presales/skills/proposal/scripts/test/bans.test.mjs +59 -0
  162. package/plugins/presales/skills/proposal/scripts/test/build.test.mjs +128 -0
  163. package/plugins/presales/skills/proposal/scripts/test/diagram.test.mjs +154 -0
  164. package/plugins/presales/skills/proposal/scripts/test/docs.test.mjs +13 -0
  165. package/plugins/presales/skills/proposal/scripts/test/e2e.test.mjs +20 -0
  166. package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/evals-fixtures.test.mjs +8 -5
  167. package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/figures.test.mjs +29 -1
  168. package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/diagrams/aws-on-neutral.json +60 -0
  169. package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/diagrams/booking.json +61 -0
  170. package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/proposal-fail.md +49 -0
  171. package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/proposal.md +72 -0
  172. package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/references.json +5 -0
  173. package/plugins/presales/skills/proposal/scripts/test/fixtures/workbook-recalculated.xlsx +0 -0
  174. package/plugins/presales/skills/proposal/scripts/test/fixtures/workbook-unrecalculated.xlsx +0 -0
  175. package/plugins/presales/skills/proposal/scripts/test/layout.test.mjs +89 -0
  176. package/plugins/presales/skills/proposal/scripts/test/parts.test.mjs +112 -0
  177. package/plugins/presales/skills/proposal/scripts/test/prices.test.mjs +122 -0
  178. package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/quality-gates.test.mjs +1 -1
  179. package/plugins/presales/skills/proposal/scripts/test/steps.test.mjs +38 -0
  180. package/plugins/presales/skills/proposal/scripts/test/validate.test.mjs +46 -0
  181. package/plugins/presales/skills/proposal/scripts/test/workbook.test.mjs +76 -0
  182. package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/workflow-checks.test.mjs +7 -2
  183. package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/workflow-view.test.mjs +15 -10
  184. package/plugins/{solution-architect → presales}/skills/proposal/scripts/validate.mjs +8 -3
  185. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_data.cpython-312.pyc +0 -0
  186. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_layout.cpython-312.pyc +0 -0
  187. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_page.cpython-312.pyc +0 -0
  188. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_checks.cpython-312.pyc +0 -0
  189. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_render.cpython-312.pyc +0 -0
  190. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/validate.cpython-312.pyc +0 -0
  191. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_body.cpython-312.pyc +0 -0
  192. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_flow.cpython-312.pyc +0 -0
  193. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_package.cpython-312.pyc +0 -0
  194. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_xml.cpython-312.pyc +0 -0
  195. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_quotes.cpython-312.pyc +0 -0
  196. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_rules.cpython-312.pyc +0 -0
  197. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_schema.cpython-312.pyc +0 -0
  198. package/plugins/solution-architect/.claude-plugin/plugin.json +0 -9
  199. package/plugins/solution-architect/skills/estimate/shared/assets/xlsx-export.js +0 -336
  200. package/plugins/solution-architect/skills/estimate/workflow-based/FLOW.md +0 -95
  201. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-components.html +0 -1071
  202. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-components-template.mjs +0 -85
  203. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-workflow-template.mjs +0 -51
  204. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-html.mjs +0 -44
  205. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/xlsx-rows.mjs +0 -53
  206. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/score-review.mjs +0 -46
  207. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/feature-tasks.js +0 -21
  208. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/feature-tasks-browser.test.mjs +0 -30
  209. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs +0 -59
  210. package/plugins/solution-architect/skills/proposal/README.md +0 -51
  211. package/plugins/solution-architect/skills/proposal/SKILL.md +0 -69
  212. package/plugins/solution-architect/skills/proposal/assets/proposal-template.html +0 -82
  213. package/plugins/solution-architect/skills/proposal/assets/proposal-workflow.html +0 -143
  214. package/plugins/solution-architect/skills/proposal/references/interview.md +0 -60
  215. package/plugins/solution-architect/skills/proposal/references/review.md +0 -40
  216. package/plugins/solution-architect/skills/proposal/references/writing.md +0 -104
  217. package/plugins/solution-architect/skills/proposal/scripts/lib/checks-client.mjs +0 -58
  218. package/plugins/solution-architect/skills/proposal/scripts/lib/checks-doc.mjs +0 -64
  219. package/plugins/solution-architect/skills/proposal/scripts/lib/checks.mjs +0 -21
  220. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-body.mjs +0 -42
  221. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-package.mjs +0 -56
  222. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-xml.mjs +0 -44
  223. package/plugins/solution-architect/skills/proposal/scripts/lib/figures.mjs +0 -34
  224. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-html.mjs +0 -39
  225. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-page.mjs +0 -30
  226. package/plugins/solution-architect/skills/proposal/scripts/render.mjs +0 -64
  227. package/plugins/solution-architect/skills/proposal/scripts/test/checks-client.test.mjs +0 -147
  228. package/plugins/solution-architect/skills/proposal/scripts/test/checks-doc.test.mjs +0 -152
  229. package/plugins/solution-architect/skills/proposal/scripts/test/docs.test.mjs +0 -57
  230. package/plugins/solution-architect/skills/proposal/scripts/test/docx.test.mjs +0 -68
  231. package/plugins/solution-architect/skills/proposal/scripts/test/e2e.test.mjs +0 -30
  232. package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-fail.md +0 -27
  233. package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-pass.md +0 -51
  234. package/plugins/solution-architect/skills/proposal/scripts/test/render.test.mjs +0 -70
  235. package/plugins/solution-architect/skills/proposal/scripts/test/validate.test.mjs +0 -41
  236. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-browser.test.mjs +0 -96
  237. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-docs.test.mjs +0 -25
  238. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-render.test.mjs +0 -75
  239. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/case.yaml +0 -0
  240. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/fixture.sh +0 -0
  241. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/inputs-written.md +0 -0
  242. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/no-proposal-md.md +0 -0
  243. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/skill-fired.md +0 -0
  244. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/validate-then-render.md +0 -0
  245. /package/plugins/{solution-architect → presales}/evals/proposal-workflow/prompt.md +0 -0
  246. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/case.yaml +0 -0
  247. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/fixture.sh +0 -0
  248. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/no-classic-fallback.md +0 -0
  249. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/nothing-written.md +0 -0
  250. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/skill-fired.md +0 -0
  251. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/stops-at-gate.md +0 -0
  252. /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/prompt.md +0 -0
  253. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/case.yaml +0 -0
  254. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/fixture.sh +0 -0
  255. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/no-estimation-md.md +0 -0
  256. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/pages-or-stop.md +0 -0
  257. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/routed-to-workflow.md +0 -0
  258. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/skill-fired.md +0 -0
  259. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/three-questions-max.md +0 -0
  260. /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/prompt.md +0 -0
  261. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/README.md +0 -0
  262. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/SKILL.md +0 -0
  263. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/OFL.txt +0 -0
  264. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
  265. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-mono-latin-600-normal.woff2 +0 -0
  266. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-sans-latin-400-normal.woff2 +0 -0
  267. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-sans-latin-500-normal.woff2 +0 -0
  268. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-sans-latin-600-normal.woff2 +0 -0
  269. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/mermaid-theme.json +0 -0
  270. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/section-help.json +0 -0
  271. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/viewer-template.html +0 -0
  272. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.json +0 -0
  273. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.md +0 -0
  274. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/greenfield-llm-triage-spec/triage-service-spec.md +0 -0
  275. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/transcript-citations/C1-kickoff-call.txt +0 -0
  276. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/transcript-citations/E1-intro-email.md +0 -0
  277. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/extract.md +0 -0
  278. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/interview.md +0 -0
  279. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/likec4.md +0 -0
  280. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/project-types.md +0 -0
  281. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/quality-goals.md +0 -0
  282. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/research.md +0 -0
  283. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/rewriting.md +0 -0
  284. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/viewer.md +0 -0
  285. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/writing.md +0 -0
  286. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/ba-facts.mjs +0 -0
  287. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/check-quotes.mjs +0 -0
  288. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/drift.mjs +0 -0
  289. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/ba-package.mjs +0 -0
  290. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/cdp.mjs +0 -0
  291. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/chrome.mjs +0 -0
  292. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/companion-links.mjs +0 -0
  293. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-kinds.mjs +0 -0
  294. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-links.mjs +0 -0
  295. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-routes.mjs +0 -0
  296. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-sections.mjs +0 -0
  297. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/drift.mjs +0 -0
  298. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/embed.mjs +0 -0
  299. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/er-entities.mjs +0 -0
  300. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/fonts.mjs +0 -0
  301. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/frontmatter.mjs +0 -0
  302. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/git-diff.mjs +0 -0
  303. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/inputs.mjs +0 -0
  304. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/likec4-config.mjs +0 -0
  305. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/likec4-extract.mjs +0 -0
  306. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/likec4-steps.mjs +0 -0
  307. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-defs.mjs +0 -0
  308. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-flows.mjs +0 -0
  309. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-inline.mjs +0 -0
  310. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-links.mjs +0 -0
  311. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-list.mjs +0 -0
  312. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-render.mjs +0 -0
  313. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-shape.mjs +0 -0
  314. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-tables.mjs +0 -0
  315. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-views.mjs +0 -0
  316. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-wide.mjs +0 -0
  317. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/nav.mjs +0 -0
  318. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/offline.mjs +0 -0
  319. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/port.mjs +0 -0
  320. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/quality-gate.mjs +0 -0
  321. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/section-help.mjs +0 -0
  322. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/slug-registry.mjs +0 -0
  323. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/state.mjs +0 -0
  324. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/strategy-sections.mjs +0 -0
  325. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-clusters.mjs +0 -0
  326. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-deployment.mjs +0 -0
  327. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-elections.mjs +0 -0
  328. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-links.mjs +0 -0
  329. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-model-tables.mjs +0 -0
  330. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-palette.mjs +0 -0
  331. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-provenance.mjs +0 -0
  332. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-quotes.mjs +0 -0
  333. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-strategy.mjs +0 -0
  334. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-tree.mjs +0 -0
  335. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/likec4-config.mjs +0 -0
  336. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/likec4-export.mjs +0 -0
  337. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/likec4-gen.mjs +0 -0
  338. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/record.mjs +0 -0
  339. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/render.mjs +0 -0
  340. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/serve.mjs +0 -0
  341. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/ba-package.test.mjs +0 -0
  342. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/companion-links.test.mjs +0 -0
  343. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-kinds.test.mjs +0 -0
  344. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-links.test.mjs +0 -0
  345. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-routes.test.mjs +0 -0
  346. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-sections.test.mjs +0 -0
  347. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/drift.test.mjs +0 -0
  348. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/embed.test.mjs +0 -0
  349. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/er-entities.test.mjs +0 -0
  350. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/extract-workflow.test.mjs +0 -0
  351. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/ARCHITECTURE.md +0 -0
  352. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/c4-src/broken/model.c4 +0 -0
  353. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/c4-src/pass/model.c4 +0 -0
  354. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/docs/adr/0001-sample.md +0 -0
  355. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/docs/estimate.html +0 -0
  356. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/docs/estimation.md +0 -0
  357. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/model-broken.json +0 -0
  358. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/model.json +0 -0
  359. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/threat-model.md +0 -0
  360. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/sample-model.json +0 -0
  361. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/sample.c4 +0 -0
  362. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fonts.test.mjs +0 -0
  363. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/frontmatter.test.mjs +0 -0
  364. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/git-diff.test.mjs +0 -0
  365. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-config.test.mjs +0 -0
  366. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-extract.test.mjs +0 -0
  367. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-steps.test.mjs +0 -0
  368. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-flows.test.mjs +0 -0
  369. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-links.test.mjs +0 -0
  370. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-provenance.test.mjs +0 -0
  371. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-render.test.mjs +0 -0
  372. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-tables.test.mjs +0 -0
  373. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-views.test.mjs +0 -0
  374. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-wide.test.mjs +0 -0
  375. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/nav.test.mjs +0 -0
  376. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/offline.test.mjs +0 -0
  377. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/quality-gate.test.mjs +0 -0
  378. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/quality-gates.test.mjs +0 -0
  379. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/research-workflow.test.mjs +0 -0
  380. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/rewriting.test.mjs +0 -0
  381. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/section-help.test.mjs +0 -0
  382. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/serve.test.mjs +0 -0
  383. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/state.test.mjs +0 -0
  384. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-clusters.test.mjs +0 -0
  385. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-deployment.test.mjs +0 -0
  386. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-elections.test.mjs +0 -0
  387. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-links.test.mjs +0 -0
  388. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-model-tables.test.mjs +0 -0
  389. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-provenance.test.mjs +0 -0
  390. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-quotes.test.mjs +0 -0
  391. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-strategy.test.mjs +0 -0
  392. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-tree.test.mjs +0 -0
  393. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/viewer-template.test.mjs +0 -0
  394. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/validate.mjs +0 -0
  395. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/workflows/extract.js +0 -0
  396. /package/plugins/{solution-architect → presales}/skills/analyze-requirements/workflows/research.js +0 -0
  397. /package/plugins/{solution-architect → presales}/skills/estimate/SKILL.md +0 -0
  398. /package/plugins/{solution-architect → presales}/skills/estimate/classic/FLOW.md +0 -0
  399. /package/plugins/{solution-architect → presales}/skills/estimate/classic/assets/estimate-template-agentic.html +0 -0
  400. /package/plugins/{solution-architect → presales}/skills/estimate/classic/assets/estimate-template.html +0 -0
  401. /package/plugins/{solution-architect → presales}/skills/estimate/classic/assets/scores-review-template.html +0 -0
  402. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/agentic-estimation.md +0 -0
  403. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/ai-multipliers.md +0 -0
  404. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/interview.md +0 -0
  405. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/scoring-guide.md +0 -0
  406. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/slicing.md +0 -0
  407. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/task-shapes.md +0 -0
  408. /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/techniques.md +0 -0
  409. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/compute.mjs +0 -0
  410. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/agentic-checks.mjs +0 -0
  411. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/checks.mjs +0 -0
  412. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/components.mjs +0 -0
  413. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/md-tables.mjs +0 -0
  414. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/redact.mjs +0 -0
  415. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/rollup.mjs +0 -0
  416. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/schema.mjs +0 -0
  417. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/score-csv.mjs +0 -0
  418. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/score-html.mjs +0 -0
  419. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/scoring-checks.mjs +0 -0
  420. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/render.mjs +0 -0
  421. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/score-review.mjs +0 -0
  422. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/baselines.test.mjs +0 -0
  423. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/browser-agentic.test.mjs +0 -0
  424. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/browser.test.mjs +0 -0
  425. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/compute.test.mjs +0 -0
  426. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/e2e.test.mjs +0 -0
  427. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/agentic-estimation-fail.md +0 -0
  428. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/agentic-estimation-pass.md +0 -0
  429. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/agentic-inputs.json +0 -0
  430. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/booking-inputs.json +0 -0
  431. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/estimation-fail.md +0 -0
  432. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/estimation-pass.md +0 -0
  433. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/measurements.jsonl +0 -0
  434. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/measurements.test.mjs +0 -0
  435. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/pricing.test.mjs +0 -0
  436. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/quality-gates.test.mjs +0 -0
  437. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/references.test.mjs +0 -0
  438. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/render.test.mjs +0 -0
  439. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/schema.test.mjs +0 -0
  440. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/score-review.test.mjs +0 -0
  441. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/scoring.test.mjs +0 -0
  442. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/url-state.test.mjs +0 -0
  443. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/validate.test.mjs +0 -0
  444. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/zip-store.test.mjs +0 -0
  445. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/zip.mjs +0 -0
  446. /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/validate.mjs +0 -0
  447. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/gate-check-northgate/northgate-email.md +0 -0
  448. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-agentic-halyard/measurements.jsonl +0 -0
  449. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-agentic-halyard/requirements.json +0 -0
  450. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-agentic-halyard/requirements.md +0 -0
  451. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-traditional-trellis/ARCHITECTURE.md +0 -0
  452. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-traditional-trellis/requirements.json +0 -0
  453. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-traditional-trellis/requirements.md +0 -0
  454. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +0 -0
  455. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.json +0 -0
  456. /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.md +0 -0
  457. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/agentic-task-schema.mjs +0 -0
  458. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/baselines.mjs +0 -0
  459. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/context-schema.mjs +0 -0
  460. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/estimate-math.mjs +0 -0
  461. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/inline.mjs +0 -0
  462. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/measurements.mjs +0 -0
  463. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/pricing.mjs +0 -0
  464. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/score-diff.mjs +0 -0
  465. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/scoring-schema.mjs +0 -0
  466. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/scoring.mjs +0 -0
  467. /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/zip.mjs +0 -0
  468. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/references/hidden-work-by-type.md +0 -0
  469. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/references/linking.md +0 -0
  470. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/compute.mjs +0 -0
  471. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/pair-findings.mjs +0 -0
  472. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/requirements.mjs +0 -0
  473. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/schema-components.mjs +0 -0
  474. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/also-builds.css +0 -0
  475. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/also-builds.js +0 -0
  476. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/arch-link.js +0 -0
  477. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/click.js +0 -0
  478. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/link-picker.css +0 -0
  479. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/link-picker.js +0 -0
  480. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/prelude.js +0 -0
  481. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/ARCHITECTURE-mini.md +0 -0
  482. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/feedback.json +0 -0
  483. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/inputs-pass.json +0 -0
  484. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/measurements.jsonl +0 -0
  485. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/requirements.json +0 -0
  486. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/page-view.test.mjs +0 -0
  487. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/quality-gates.test.mjs +0 -0
  488. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/requirements.test.mjs +0 -0
  489. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/rollup.test.mjs +0 -0
  490. /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/workflow-script.test.mjs +0 -0
  491. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/detail.html +0 -0
  492. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/index.html +0 -0
  493. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/start.sh +0 -0
  494. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/stats.mjs +0 -0
  495. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/vendor/reactflow-bundle.js +0 -0
  496. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/vendor-build/entry.jsx +0 -0
  497. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/vendor-build/package-lock.json +0 -0
  498. /package/plugins/{solution-architect → presales}/skills/new-lead/assets/vendor-build/package.json +0 -0
  499. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/ARCHITECTURE.md +0 -0
  500. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/brief.md +0 -0
  501. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/dist/index.html +0 -0
  502. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/estimation.json +0 -0
  503. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/proposal.md +0 -0
  504. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/requirements.json +0 -0
  505. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/sable-dental-booking/rfp.md +0 -0
  506. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/vellum-books-checkout/ARCHITECTURE.md +0 -0
  507. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/vellum-books-checkout/rfp.md +0 -0
  508. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads.json +0 -0
  509. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/fresh-lead-northwind/rfp-northwind.md +0 -0
  510. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/skips-to-proposal/leads/meridian-freight-portal/rfp.md +0 -0
  511. /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/skips-to-proposal/leads.json +0 -0
  512. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/init-root.mjs +0 -0
  513. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lead-upsert.mjs +0 -0
  514. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/enrich.mjs +0 -0
  515. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/map-nodes.mjs +0 -0
  516. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/map.mjs +0 -0
  517. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/port.mjs +0 -0
  518. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/registry.mjs +0 -0
  519. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/serve.mjs +0 -0
  520. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/e2e-workspace.test.mjs +0 -0
  521. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/enrich.test.mjs +0 -0
  522. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/ARCHITECTURE.md +0 -0
  523. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/brief.md +0 -0
  524. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/dist/index.html +0 -0
  525. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/dist/proposal-non-tech.html +0 -0
  526. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/dist/threat-model.html +0 -0
  527. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/estimation-inputs.json +0 -0
  528. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/estimation.json +0 -0
  529. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/notes.md +0 -0
  530. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/proposal-non-tech.md +0 -0
  531. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/rfp.md +0 -0
  532. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads.json +0 -0
  533. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/init-root.test.mjs +0 -0
  534. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/lead-upsert.test.mjs +0 -0
  535. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/map.test.mjs +0 -0
  536. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/port.test.mjs +0 -0
  537. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/registry-io.test.mjs +0 -0
  538. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/registry.test.mjs +0 -0
  539. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/serve.test.mjs +0 -0
  540. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/stats.test.mjs +0 -0
  541. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/validate-cli.test.mjs +0 -0
  542. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/vendor-bundle.test.mjs +0 -0
  543. /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/validate.mjs +0 -0
  544. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-rivet-gym/ARCHITECTURE.md +0 -0
  545. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-rivet-gym/brief.md +0 -0
  546. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/ARCHITECTURE.md +0 -0
  547. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/brief.md +0 -0
  548. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/estimation-inputs.json +0 -0
  549. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/estimation.json +0 -0
  550. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/ARCHITECTURE.md +0 -0
  551. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/brief.md +0 -0
  552. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/dist/mermaid.js +0 -0
  553. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation-inputs.json +0 -0
  554. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation.json +0 -0
  555. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation.md +0 -0
  556. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/ARCHITECTURE.md +0 -0
  557. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/brief.md +0 -0
  558. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/dist/mermaid.js +0 -0
  559. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation-inputs.json +0 -0
  560. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation.json +0 -0
  561. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation.md +0 -0
  562. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +0 -0
  563. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation-inputs.json +0 -0
  564. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation.json +0 -0
  565. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/measurements.jsonl +0 -0
  566. /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/requirements.json +0 -0
  567. /package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/jargon.mjs +0 -0
  568. /package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/sections.mjs +0 -0
  569. /package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-lead.mjs +0 -0
  570. /package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/fixtures/proposal-inputs-pass.json +0 -0
  571. /package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/workflow-stage.mjs +0 -0
  572. /package/plugins/{solution-architect → presales}/workflows/review-links.js +0 -0
@@ -5,8 +5,11 @@ copies the format of the proposal sent to Sin Kowa: Scope, one section per
5
5
  system (its workflow diagrams and a Feature | What it does table),
6
6
  Milestones, Assumptions & exclusions, Cost estimate. Every fact on it comes
7
7
  from data; you write only the sentences, in `proposal-inputs.json`. There
8
- is no proposal.md, and nobody edits one: the human reads the page, asks for
9
- changes in chat, and downloads the DOCX or PDF to send.
8
+ is no proposal.md, and nobody edits one: the human reads the built page, asks
9
+ for changes in chat, and downloads the Word or PDF file to send. The page is
10
+ built by the same pipeline as a classic proposal: CES cover, colours and
11
+ fonts, flows in the CES light theme, a download bar, the PDF printed from the
12
+ Word file (`references/build.md`).
10
13
 
11
14
  ## 1. Where each part comes from
12
15
 
@@ -14,11 +17,11 @@ changes in chat, and downloads the DOCX or PDF to send.
14
17
  | --- | --- |
15
18
  | Systems, workflows, features and what each does, scope.out | `requirements.json` (the BA package the estimate names) |
16
19
  | Milestone contents, assumptions, exclusions, price | `estimation.json` |
17
- | Title, byline, scope intro, one optional sentence per system, milestone client names and what each demonstrates | `proposal-inputs.json` (you) |
20
+ | Title, cover line, date, scope intro, one optional sentence per system, milestone client names and what each demonstrates | `proposal-inputs.json` (you) |
18
21
 
19
- Prices are USD. The team changes the currency, and adds an About-us or
20
- next-steps section if they want one, in the copy they send — never in a
21
- skill file.
22
+ Prices are USD. The page never carries a next-steps or about-us part, or a
23
+ quote validity date: validity is agreed in the meeting or by email. The six
24
+ mandatory parts of a classic proposal do not apply to this mode.
22
25
 
23
26
  ## 2. Flow
24
27
 
@@ -28,25 +31,29 @@ skill file.
28
31
  validation; a finding there → stop and name the estimate skill.
29
32
  2. **Interview, one question at a time, only what is unknown.** Client name;
30
33
  tech level (non-tech | low-tech | technical, as classic
31
- `references/interview.md` §1); the firm name (`firm` from the profile,
32
- classic §3 lookup — ask only the name if there is no profile). Then show
34
+ `references/interview.md` §1); then the pricing question (classic §3):
35
+ this page quotes the estimate's range and single number, so a PM price
36
+ file or a by-feature table means a classic proposal instead. Then show
33
37
  the milestones (`computed.features[].milestone`, with the features each
34
38
  finishes) and propose a client name and one "what it demonstrates" line
35
39
  for each; the user corrects them.
36
40
  3. **Write `proposal-inputs.json`** beside `estimation.json` (§3).
37
41
  4. **Validate:** `node scripts/validate.mjs --estimation <dir>/estimation.json
38
42
  --inputs <dir>/proposal-inputs.json` — fix findings, re-run until clean.
39
- 5. **Render:** `node scripts/render.mjs --estimation <dir>/estimation.json
40
- --inputs <dir>/proposal-inputs.json --mermaid-bundle <path> --out <dir>/dist`
41
- — the same mermaid bundle as classic step 8. It re-runs validation and
42
- writes nothing on a finding.
43
- 6. **Fresh-eyes review** of `dist/proposal.html` (`references/review.md`,
44
- Workflow mode); fix in `proposal-inputs.json`, steps 4–5 again.
45
- 7. **Serve and hand over.** `node ../analyze-requirements/scripts/serve.mjs <dir>`.
46
- Tell the user: the URL; that the page has Download PDF and Download DOCX
47
- buttons; that prices are USD and currency, About-us and next steps are
48
- theirs to change in the sent copy. Changes → edit `proposal-inputs.json`
49
- (or, for a fact, the BA package or estimate) → steps 4–7 again.
43
+ 5. **Draft:** `node scripts/render.mjs --estimation <dir>/estimation.json
44
+ --inputs <dir>/proposal-inputs.json --out <dir>/dist --draft` writes
45
+ `dist/proposal-draft.html`. It re-runs validation and writes nothing on a
46
+ finding.
47
+ 6. **Fresh-eyes review** of the draft (`references/review.md`, Workflow
48
+ mode); fix in `proposal-inputs.json`, steps 4–5 again.
49
+ 7. **Human review** of the served draft
50
+ (`node ../analyze-requirements/scripts/serve.mjs <dir>`); changes → edit
51
+ `proposal-inputs.json` (or, for a fact, the BA package or estimate) →
52
+ steps 4–7 again.
53
+ 8. **Final:** the same command without `--draft` (add `--workbook <xlsx>`
54
+ when the lead has an estimate workbook, for the Excel button) writes
55
+ proposal.html, proposal.docx and proposal.pdf. Delete the draft; report
56
+ the URL and that prices are USD.
50
57
 
51
58
  ## 3. `proposal-inputs.json`
52
59
 
@@ -54,7 +61,7 @@ skill file.
54
61
  {
55
62
  "client": "Sin Kowa",
56
63
  "title": "Sin Kowa Digital Transformation",
57
- "firm": "Code Engine Studio",
64
+ "subtitle": "Systems & Workflows proposal",
58
65
  "date": "2026-10-07",
59
66
  "techLevel": "non-tech",
60
67
  "jargonAllow": [],
@@ -66,8 +73,8 @@ skill file.
66
73
  }
67
74
  ```
68
75
 
69
- - `title` becomes "<title> — Systems & Workflows Proposal"; `date` is today
70
- (ISO) and shows as "Oct 7, 2026 · <firm>".
76
+ - `title` is the cover title; `subtitle` (optional) the line under it,
77
+ "Systems & Workflows proposal" by default; `date` is today (ISO).
71
78
  - `systems` is optional, keyed by the BA system id; the sentence follows the
72
79
  system's own purpose line.
73
80
  - `milestones` needs an entry for every milestone the estimate uses, keyed
@@ -84,5 +91,6 @@ The title counts as a sentence: it is the page heading.
84
91
  milestone name (`M1 - Walking skeleton`): name the thing in words.
85
92
  - `non-tech`: no word from the jargon list (`scripts/lib/jargon.mjs`) unless
86
93
  listed in `jargonAllow` because the client uses it.
94
+ - No validity wording, next steps or about-us text.
87
95
  - No timeline, rate, team or score: the estimate produces none for the
88
96
  client (the fresh-eyes review catches what no script can).
@@ -0,0 +1,167 @@
1
+ # Writing — frontmatter, parts, prices, sources, language
2
+
3
+ Read while writing proposal.md. The validator enforces everything below; a
4
+ document that satisfies this file passes `validate.mjs` by construction.
5
+ Write in English unless the client asked for another language.
6
+
7
+ ## 1. Frontmatter (flat keys; arrays as JSON)
8
+
9
+ ```yaml
10
+ ---
11
+ client: Acme Corp
12
+ title: Acme Booking Platform
13
+ subtitle: Proposal: online booking for your five clinics
14
+ prepared_for: Acme Corp, operations team
15
+ date: 2026-10-29
16
+ client_tech_level: non-tech
17
+ currency: USD
18
+ cloud: other
19
+ jargon_allow: []
20
+ references: references.json
21
+ fx: {"code": "EUR", "rate": 0.86}
22
+ source_architecture: ./ARCHITECTURE.md
23
+ source_estimation: ./estimation.json
24
+ ---
25
+ ```
26
+
27
+ `title` is the cover title; `subtitle` is the one line under it; `prepared_for`
28
+ is the cover "Prepared for"; `date` is an ISO date shown on the cover.
29
+ `client_tech_level` is `non-tech`, `low-tech` or `technical`; `cloud` is `aws`,
30
+ `other` or `none`. `jargon_allow` and `references` are optional (`references`
31
+ defaults to `references.json`); `fx` is used only for prices shown in another
32
+ currency (§3). Write no comments on a value line: the parser keeps them as
33
+ part of the value.
34
+
35
+ `valid_until` and `scenario` are refused: no validity date, one price. `order`
36
+ and `optional` are refused too: every proposal has the same contents (§2),
37
+ unless the client's reviewers set another order (`contents`, §2).
38
+
39
+ ## 2. Parts — the standard contents
40
+
41
+ Every proposal has the same contents: these seven `##` headings, written
42
+ exactly so, in this order, each once. Price comes early; the technical detail
43
+ follows it. References is last and the build makes it from the citations.
44
+
45
+ | # | `##` heading | Must hold |
46
+ | --- | --- | --- |
47
+ | 1 | Executive summary | The headline price as the source gives it (a range, or one number) |
48
+ | 2 | Proposed solution | What is built, in the client's terms: at most 400 words; it may carry the flow figure (a numbered process is a ```` ```steps ```` figure) |
49
+ | 3 | Price | A price table: by feature (default), by phase or as the PM's file, per the pricing answer; optional items under a `###` |
50
+ | 4 | Assumptions and exclusions | Short: at most 450 words; one line for anything that does not change the price |
51
+ | 5 | How it works | The building blocks and how they connect, in the client's terms |
52
+ | 6 | Hosting and security | Where it runs and how it is kept safe, and always a `### Monthly running costs` section |
53
+ | 7 | Delivery plan and acceptance | Milestones or phases and what ends each; durations only when the PM's file states them; the team when the PM or estimate gives one |
54
+ | 8 | References | Built from the citations — never written |
55
+
56
+ How it works and Hosting and security together hold at least one
57
+ ```` ```architecture ```` figure (`references/diagrams.md`) and a table with
58
+ Strengths and Weaknesses columns (two options or more) for each major choice;
59
+ a Trade-off table may follow.
60
+
61
+ Anything else the brief asks for is a `###` inside the part it belongs to:
62
+ background and objectives under Executive summary, AI and data safeguards
63
+ under Hosting and security, prices in another currency under Price, a deep
64
+ dive under How it works. Use `###` and deeper freely; a `##` that is not one
65
+ of the seven is refused. Never "next steps" or "about us" wording (a heading
66
+ or a sentence, at any level), and never a validity sentence.
67
+
68
+ **A reviewed order.** Only when the client's reviewers return the proposal
69
+ with their own contents, follow it with a `contents` frontmatter line: a JSON
70
+ list of `["id", "Heading"]` pairs in their order, for example
71
+ `contents: [["summary","Executive summary"],["scope-price","Pricing by requirement"],…]`.
72
+ The ids are the seven parts' (`summary`, `solution`, `scope-price`,
73
+ `assumptions`, `technology`, `hosting`, `plan`); each appears once, under the
74
+ heading given, and keeps its checks. A new id (`team`) adds a `##` part the
75
+ reviewers asked for; it must not be empty.
76
+
77
+ The build lays the contents out the same way every time (Word and PDF): a
78
+ one-page contents with page numbers, each part on a new page unless its
79
+ first page fits in the room left after the part before, headings kept with
80
+ what follows, short tables and lists kept whole. It prints a `layout` note
81
+ for a nearly empty page or a heading left at a page foot; fix the text and
82
+ rebuild.
83
+
84
+ Write as an advisor: short sentences, strengths and weaknesses both stated.
85
+ Do not promise a performance figure nobody has measured: give the expected
86
+ figure with its source and say the target is set after the first sprint's
87
+ measurement. The text must stand on its own: never "see PRD", "section
88
+ 12.3" or "open point 8". A requirement code may follow a feature name in
89
+ brackets: "Bulk import (M2.3)". A cross-reference ("Part B", "section 4") must
90
+ name a heading that exists; otherwise name the part in words. Never type a
91
+ figure number ("Figure 9"): the build numbers figures in page order.
92
+
93
+ ## 3. Prices — the rule that matters most
94
+
95
+ Run `derive.mjs` first and quote only its figures (proposal-figures.json):
96
+
97
+ - **Estimate** (default): the presented range and single number, splits by
98
+ milestone and by feature (its share of the range, grouped by system).
99
+ - **Ballpark workbook, roll-up**: `--workbook <recalculated xlsx>` for an
100
+ agentic estimate; its Project Roll-up range and single number.
101
+ - **Workbook feature rows**: `price-source.json`
102
+ `{"kind": "workbook-rows", "file": "<xlsx>", "sheet": "ballparkv2", "nameCol": "A", "priceCol": "J", "groupCol": "Q", "rows": [7, 18], "totalCell": "J19", "optionalPrefix": "Optional:"}`
103
+ — each feature in whole dollars, rounded so the rows add up to the total.
104
+ - **The PM's files**: `{"kind": "pm-file", "files": ["inputs/plan.md"], "total": 115000}`
105
+ — every currency-marked amount, every number in a Price, Cost, USD or Amount
106
+ column, and every duration the files state may be quoted; `total` is the
107
+ headline. Markdown and CSV only: an `.xlsx` file is refused (pass the CES
108
+ estimate workbook with `--workbook`, or export the PM sheet to CSV or Markdown).
109
+
110
+ The validator reads every price in the document — `$1,234`, `1,234 USD`, a
111
+ number in a column headed Price, Cost, USD or Amount — and refuses any that the
112
+ price source does not hold, unless its sentence or table cites a source, or it
113
+ is a bold total row equal to the sum of the rows above it. In the Price part
114
+ a citation does not excuse a table row: each row's amount must be in
115
+ the price source. Durations in weeks
116
+ or months in Executive summary, Price and Delivery plan and acceptance must be
117
+ stated by the PM's files. With prices in another currency, `fx` admits each figure converted at the
118
+ rate; cite the rate's source. Money is written `$8,000` (en-US grouping).
119
+ Internal scores, tiers, points and percentiles never appear.
120
+
121
+ ## 4. Sources
122
+
123
+ Cite as `[^key]` or `[^key;where]`, at most one per sentence (a table may
124
+ carry one, usually in its first row or the sentence before it). Each key is
125
+ in `references.json`:
126
+
127
+ ```json
128
+ {
129
+ "prd": { "client": true, "title": "Booking platform requirements", "publisher": "Acme Corp", "date": "20 October 2026" },
130
+ "pg-versioning": { "status": "verified", "title": "Versioning Policy", "publisher": "PostgreSQL Global Development Group",
131
+ "url": "https://www.postgresql.org/support/versioning/", "checked": "29 October 2026", "quote": "the passage the claim rests on" }
132
+ }
133
+ ```
134
+
135
+ Open each public source before citing it, copy the passage the claim rests on
136
+ into `quote`, then set `status: verified`; anything else is refused. Every
137
+ percentage needs a source in its sentence or table, or the plain words that
138
+ it is our assumption. Every price in Monthly running costs needs a source the
139
+ same way. Cite only what needs a source — an outside fact, a figure, the
140
+ client's requirement behind a claim — not every sentence; side-by-side
141
+ citations (`[^a][^b]`) are fine in a table cell that rests on several sources.
142
+
143
+ Each source gets one number, in the order it is first cited, and keeps it:
144
+ the same number marks every later citation, heads its one footnote at the
145
+ foot of the page where it is first cited (Word, PDF; the end of each part on
146
+ the web page), and numbers it under References. The footnote is short (title,
147
+ publisher, date); the URL and the day it was checked are in References. A
148
+ `;where` location shows in the footnote of the source's first citation only.
149
+
150
+ ## 5. Tech-level language
151
+
152
+ - **non-tech** — plain words only; the deny-list (`scripts/lib/jargon.mjs`)
153
+ fails validation; diagrams show what the client sees.
154
+ - **low-tech** — everyday product vocabulary is fine (website, app, database).
155
+ - **technical** — full stack detail welcome.
156
+
157
+ ## 6. Commands
158
+
159
+ Run from `.agents/skills/proposal/`:
160
+
161
+ ```
162
+ node scripts/derive.mjs --estimation <dir>/estimation.json [--prices <dir>/price-source.json | --workbook <xlsx>] --out <dir>/proposal-figures.json
163
+ node scripts/validate.mjs --md <dir>/proposal.md --estimation <dir>/estimation.json [--prices … | --workbook …]
164
+ node scripts/render.mjs --md <dir>/proposal.md --estimation <dir>/estimation.json [--prices … | --workbook …] --out <dir>/dist --draft
165
+ node scripts/render.mjs --md <dir>/proposal.md --estimation <dir>/estimation.json [--prices … | --workbook …] --out <dir>/dist
166
+ node ../analyze-requirements/scripts/serve.mjs <dir>
167
+ ```
@@ -0,0 +1,70 @@
1
+ // The arrow check every figure passes before a build: each declared link is
2
+ // drawn, and each arrow's line and head are still clearly visible at the
3
+ // size the figure is printed in the Word file and the PDF (its page scale).
4
+ // A flow whose arrows vanish at page size, or that silently drops a link,
5
+ // stops the build. These functions run inside the page.
6
+ const MIN_STROKE = 1.0; // px at page size: about 0.75 pt
7
+ const MIN_HEAD = 6.5; // px at page size
8
+
9
+ function arMarkerSize(el, sw) {
10
+ const ref = /url\(#([^)]+)\)/.exec(el.getAttribute('marker-end') ?? el.getAttribute('marker-start') ?? '');
11
+ const m = ref && document.getElementById(ref[1]);
12
+ if (!m) return null;
13
+ const w = Number(m.getAttribute('markerWidth') ?? 3);
14
+ return m.getAttribute('markerUnits') === 'userSpaceOnUse' ? w : w * sw;
15
+ }
16
+
17
+ function arEdges(svg) {
18
+ const sel = 'path.flowchart-link, [data-edge], path[marker-end], path[marker-start], line[marker-end]';
19
+ return [...new Set(svg.querySelectorAll(sel))];
20
+ }
21
+
22
+ // limits: { scale, expected } — expected is the number of links the source declares (or null).
23
+ function arCheck(svg, limits) {
24
+ const out = [];
25
+ const edges = arEdges(svg);
26
+ const drawn = svg.querySelectorAll('path.flowchart-link, [data-edge]').length;
27
+ if (limits.expected !== null && drawn < limits.expected) out.push(`${limits.expected - drawn} of ${limits.expected} declared links are not drawn`);
28
+ let thin = 0; let small = 0;
29
+ for (const el of edges) {
30
+ const sw = parseFloat(getComputedStyle(el).strokeWidth) || 1;
31
+ if (sw * limits.scale < limits.minStroke) thin += 1;
32
+ const head = arMarkerSize(el, sw);
33
+ if (head !== null && head * limits.scale < limits.minHead) small += 1;
34
+ }
35
+ if (thin) out.push(`${thin} arrow line(s) thinner than ${limits.minStroke} px at page size`);
36
+ if (small) out.push(`${small} arrowhead(s) smaller than ${limits.minHead} px at page size`);
37
+ return out;
38
+ }
39
+
40
+ // The smallest text on the figure, in px before scaling.
41
+ function arSmallestText(svg) {
42
+ const sizes = [...svg.querySelectorAll('text, foreignObject div, foreignObject span')].filter((t) => t.textContent.trim())
43
+ .map((t) => parseFloat(getComputedStyle(t).fontSize)).filter((n) => n > 0);
44
+ return sizes.length ? Math.min(...sizes) : null;
45
+ }
46
+
47
+ export const ARROW_LIMITS = { minStroke: MIN_STROKE, minHead: MIN_HEAD };
48
+ export const arrowScript = () => [arMarkerSize, arEdges, arCheck, arSmallestText].map(String).join('\n');
49
+
50
+ // Size checks the build makes itself, at the printed scale: a generated
51
+ // figure's smallest label must stay readable, and a tall architecture figure
52
+ // must still use most of the page width (lay it out as a landscape instead).
53
+ const MIN_TEXT = 7.5; // px at page size
54
+ const MIN_WIDTH_USE = 0.8;
55
+
56
+ export function sizeFindings({ lang, box, smallest }, page) {
57
+ const out = [];
58
+ const scale = Math.min(1, page.w / box.width, page.h / box.height);
59
+ if (lang !== 'figure' && smallest !== null && smallest * scale < MIN_TEXT) out.push(`labels print at ${(smallest * scale).toFixed(1)} px (min ${MIN_TEXT}): the figure is too large for the page — rearrange it or say less on it`);
60
+ const heightBound = page.h / box.height < page.w / box.width;
61
+ if (lang === 'architecture' && heightBound && (box.width * scale) / page.w < MIN_WIDTH_USE) out.push(`a tall figure: it prints at ${Math.round((box.width * scale * 100) / page.w)}% of the page width — arrange it in rows so it reads as a landscape`);
62
+ return out;
63
+ }
64
+
65
+ // Links a mermaid flowchart declares: one per arrow operator, chains counted.
66
+ export function mermaidLinks(code) {
67
+ if (!/^\s*(flowchart|graph)\b/.test(code)) return null;
68
+ return code.split('\n').filter((l) => !/^\s*(%%|classDef|class |style |subgraph|end\b|direction)/.test(l))
69
+ .reduce((n, l) => n + (l.match(/(?:--+>|-\.+->|==+>|---+|~~~)/g) ?? []).filter((op) => op !== '~~~').length, 0);
70
+ }
@@ -0,0 +1,43 @@
1
+ // Code Engine Studio brand for proposals: palette, fonts and logo from the
2
+ // repo's scripts/ces-brand/ and logo/ folders.
3
+ import { readFileSync } from 'node:fs';
4
+ import { fileURLToPath } from 'node:url';
5
+
6
+ const repo = (rel) => fileURLToPath(new URL(`../../../../../${rel}`, import.meta.url));
7
+ const b64 = (path) => readFileSync(path).toString('base64');
8
+
9
+ export const COLORS = { accent: 'F15927', ink: '273043', soft: 'FDF0EB', bg: 'FDFFFC', line: '9AA3B2', muted: '5D6577', rule: 'D9DDE3' };
10
+ export const FIRM = 'Code Engine Studio';
11
+ export const FONT_DIR = repo('scripts/ces-brand/fonts');
12
+ export const LOGO = repo('logo/CodeEngine_Orange.png');
13
+ export const TTF = {
14
+ roboto: `${FONT_DIR}/Roboto-Regular.ttf`, robotoBold: `${FONT_DIR}/Roboto-Bold.ttf`,
15
+ libre: `${FONT_DIR}/LibreBaskerville-Regular.ttf`, libreBold: `${FONT_DIR}/LibreBaskerville-Bold.ttf`,
16
+ };
17
+
18
+ export const fontCss = () => `@font-face{font-family:'Roboto';font-weight:400;src:url(data:font/woff2;base64,${b64(`${FONT_DIR}/roboto-400.woff2`)}) format('woff2')}`
19
+ + `@font-face{font-family:'Roboto';font-weight:700;src:url(data:font/ttf;base64,${b64(TTF.robotoBold)}) format('truetype')}`
20
+ + `@font-face{font-family:'Libre Baskerville';font-weight:400;src:url(data:font/woff2;base64,${b64(`${FONT_DIR}/libre-baskerville-400.woff2`)}) format('woff2')}`;
21
+
22
+ export const logoDataUri = () => `data:image/png;base64,${b64(LOGO)}`;
23
+
24
+ // Light diagram theme for mermaid, as in the proposals sent so far: white
25
+ // boxes, ink lines and text, CES orange only for emphasis, thick lines.
26
+ export const MERMAID_THEME = {
27
+ vars: {
28
+ fontFamily: "'Roboto', system-ui, sans-serif", fontSize: '16px', background: '#FFFFFF',
29
+ primaryColor: '#FFFFFF', primaryBorderColor: '#273043', primaryTextColor: '#273043', mainBkg: '#FFFFFF', nodeBorder: '#273043', textColor: '#273043',
30
+ secondaryColor: '#FDF0EB', secondaryBorderColor: '#F15927', secondaryTextColor: '#273043',
31
+ tertiaryColor: '#F5F6F8', tertiaryBorderColor: '#9AA3B2', tertiaryTextColor: '#273043',
32
+ lineColor: '#273043', edgeLabelBackground: '#FFFFFF', clusterBkg: '#F7F8FA', clusterBorder: '#9AA3B2', titleColor: '#273043',
33
+ noteBkgColor: '#FDF0EB', noteBorderColor: '#F15927', noteTextColor: '#273043',
34
+ actorBkg: '#FFFFFF', actorBorder: '#273043', actorTextColor: '#273043', actorLineColor: '#9AA3B2', signalColor: '#273043', signalTextColor: '#273043',
35
+ labelBoxBkgColor: '#FFFFFF', labelBoxBorderColor: '#273043', labelTextColor: '#273043', loopTextColor: '#273043', activationBkgColor: '#F5F6F8',
36
+ sequenceNumberColor: '#FFFFFF',
37
+ },
38
+ css: '.flowchart-link,.edgePath .path{stroke-width:2.2px!important} .node rect,.node polygon,.node circle{stroke-width:1.8px!important}'
39
+ + ' .messageLine0,.messageLine1{stroke-width:2.2px!important;stroke:#273043!important}'
40
+ + ' #arrowhead path,.arrowheadPath{fill:#273043!important;stroke:#273043!important}'
41
+ + ' .sequenceNumber{fill:#fff!important;font-weight:700} circle[id$="sequencenumber"]{fill:#F15927!important;stroke:#F15927!important}'
42
+ + ' .actor{stroke-width:1.8px!important} .messageText{font-size:16px!important;fill:#273043!important} text.actor>tspan{font-weight:700}',
43
+ };
@@ -0,0 +1,75 @@
1
+ // One build for both modes: figures drawn and overlap-checked, then the page,
2
+ // and in a final build the Word file, the PDF printed from it, and the lead's
3
+ // estimate workbook beside them. A draft is the page alone, for review.
4
+ // The Word file is printed up to three times (printed() below) so the
5
+ // contents carries real page numbers and short parts share a page.
6
+ import { copyFileSync, mkdirSync, writeFileSync } from 'node:fs';
7
+ import { basename, join } from 'node:path';
8
+ import { renderFigures } from './figures.mjs';
9
+ import { bodyHtml } from './html.mjs';
10
+ import { pageHtml } from './page.mjs';
11
+ import { writeDocx } from './docx-doc.mjs';
12
+ import { docxToPdf, pageFill, pdfPages } from './pdf.mjs';
13
+ import { headingPages, tocEntries } from './contents.mjs';
14
+ import { flowingParts, layoutNotes } from './layout.mjs';
15
+ import { checkPrinters } from './tool.mjs';
16
+
17
+ function downloadsFor(workbook) {
18
+ const out = [{ href: 'proposal.pdf', label: 'PDF' }, { href: 'proposal.docx', label: 'Word' }];
19
+ if (workbook) out.push({ href: basename(workbook), label: 'Excel (estimate workbook)' });
20
+ return out;
21
+ }
22
+
23
+ const plain = (html) => html.replace(/<[^>]+>/g, '').replace(/&amp;/g, '&').replace(/&#39;/g, "'").replace(/&quot;/g, '"');
24
+ const CONTENTS_PAGE = 2; // the cover is page 1
25
+
26
+ // The Word file with its contents page numbered, and the PDF printed from it.
27
+ // First print: every part on a new page, read for the parts short enough to
28
+ // follow the one before (layout.mjs). Second: with those parts flowing on,
29
+ // read for each contents entry's page. Third: with the numbers, read back to
30
+ // confirm them. Returns the files and the layout notes.
31
+ async function printed(doc, { docx, tool }) {
32
+ const toc = tocEntries(doc.toc);
33
+ const numbered = { ...doc, toc };
34
+ const print = async (opts) => { await writeDocx(docx, { tool, doc: numbered, ...opts }); return docxToPdf(docx); };
35
+ const first = await print({});
36
+ const partIdx = toc.map((t, i) => (t.level === 2 ? i : -1)).filter((i) => i >= 0);
37
+ const starts = headingPages(pdfPages(first), toc, { from: CONTENTS_PAGE });
38
+ const flow = starts.every(Boolean) ? flowingParts({ starts: partIdx.map((i) => starts[i]), fill: pageFill(first) }) : new Set();
39
+ const pages = flow.size ? headingPages(pdfPages(await print({ flow })), toc, { from: CONTENTS_PAGE }) : starts;
40
+ const pdf = await print({ flow, pages });
41
+ const text = pdfPages(pdf);
42
+ const again = headingPages(text, toc, { from: CONTENTS_PAGE });
43
+ const notes = [];
44
+ if (again[0] !== CONTENTS_PAGE + 1) notes.push(`contents: the first part prints on page ${again[0]}, not ${CONTENTS_PAGE + 1} — the contents runs over one page`);
45
+ toc.forEach((t, i) => {
46
+ if (!again[i]) notes.push(`contents: "${t.text}" was not found in the PDF; its page number is blank`);
47
+ else if (again[i] !== pages[i]) notes.push(`contents: "${t.text}" moved from page ${pages[i]} to ${again[i]} in the last print`);
48
+ });
49
+ notes.push(...layoutNotes({ pages: text, fill: pageFill(pdf), headings: doc.toc.map((t) => t.text) }));
50
+ return { files: [docx, pdf], notes };
51
+ }
52
+
53
+ async function finalFiles(doc, { out, tool, workbook }) {
54
+ const missing = checkPrinters();
55
+ if (missing.length) throw new Error(`the final build needs ${missing.join(' and ')} on PATH (LibreOffice prints the PDF)`);
56
+ const { files, notes } = await printed(doc, { docx: join(out, 'proposal.docx'), tool });
57
+ if (workbook) { copyFileSync(workbook, join(out, basename(workbook))); files.push(join(out, basename(workbook))); }
58
+ return { files, notes };
59
+ }
60
+
61
+ // job: { md (body), meta, refs, fences, lead, out, draft, workbook }.
62
+ // Returns { findings } when a figure fails the overlap check, else { files }
63
+ // and, in a final build, { notes } on the printed layout.
64
+ export async function buildProposal(job, tool) {
65
+ const { figures, findings } = await renderFigures({ fences: job.fences, lead: job.lead, tool });
66
+ if (findings.length) return { findings };
67
+ const { html, toc } = bodyHtml({ md: job.md, refs: job.refs, figures, tool });
68
+ mkdirSync(job.out, { recursive: true });
69
+ const page = join(job.out, job.draft ? 'proposal-draft.html' : 'proposal.html');
70
+ writeFileSync(page, pageHtml({ meta: job.meta, body: html, toc, draft: job.draft, downloads: downloadsFor(job.workbook) }));
71
+ if (job.draft) return { files: [page] };
72
+ const doc = { md: job.md, meta: job.meta, refs: job.refs, figures, toc: toc.map((t) => ({ text: plain(t.text), level: t.level })) };
73
+ const { files, notes } = await finalFiles(doc, { out: job.out, tool, workbook: job.workbook });
74
+ return { files: [page, ...files], notes };
75
+ }
@@ -0,0 +1,42 @@
1
+ // The contents page of the Word file and the PDF: always one page. It lists
2
+ // the parts (`##`) and, when they still fit, their sections (`###`), each with
3
+ // its page number. The page numbers come from the PDF itself: the first
4
+ // print is read back, each heading found on its page, and the Word file is
5
+ // written again with the numbers. The contents is one page in both prints,
6
+ // so no number moves.
7
+
8
+ // Heights in twips (1/20 pt), shared with the contents style in docx-doc.mjs.
9
+ // The page body is A4 less the 900-twip top and bottom margins and the footer.
10
+ export const TOC_STYLE = {
11
+ part: { size: 21, before: 110, after: 0 },
12
+ section: { size: 18, before: 24, after: 0, indent: 360 },
13
+ title: 900,
14
+ body: 16838 - 2 * 900 - 600,
15
+ };
16
+ const LINE = 1.1; // the document's line spacing (264/240)
17
+ const lineHeight = (s) => Math.round((s.size / 2) * 20 * LINE) + s.before + s.after;
18
+
19
+ // One page holds the parts always, and their sections only when every entry
20
+ // still fits. toc: [{ id, text, level: 2 | 3 }] in document order.
21
+ export function tocEntries(toc) {
22
+ const height = (list) => TOC_STYLE.title + list.reduce((h, t) => h + lineHeight(t.level === 2 ? TOC_STYLE.part : TOC_STYLE.section), 0);
23
+ return height(toc) <= TOC_STYLE.body ? toc : toc.filter((t) => t.level === 2);
24
+ }
25
+
26
+ const norm = (s) => s.normalize('NFKC').replace(/\s+/g, ' ').trim();
27
+
28
+ // The page (1-based) each entry's heading prints on, searching in order from
29
+ // the page after the contents; null when a heading is not found. A heading is
30
+ // a line of its own: the whole line, or its first line when it wraps.
31
+ // pages: the text of each page (pdftotext -layout, split on form feeds).
32
+ export function headingPages(pages, entries, { from }) {
33
+ let at = from;
34
+ return entries.map((e) => {
35
+ const want = norm(e.text);
36
+ for (let p = at; p < pages.length; p += 1) {
37
+ const hit = pages[p].split('\n').map(norm).some((line) => line === want || (line.length >= 24 && want.startsWith(line)));
38
+ if (hit) { at = p; return p + 1; }
39
+ }
40
+ return null;
41
+ });
42
+ }
@@ -0,0 +1,102 @@
1
+ // Block tokens (headings, paragraphs, lists, quotes, tables, figures) to docx
2
+ // paragraphs, on one spacing scale. Every block ends with the same gap
3
+ // (GAP); a list's items sit closer together; a figure gets a little more air.
4
+ // Each part starts on a new page under its orange rule, unless the build
5
+ // found it short enough to follow the part before (ctx.flow, layout.mjs). A heading, a lead-in
6
+ // line ("Recommended hardware:", a bold-only line) and a short sentence that
7
+ // introduces a table or figure stay with what follows; short lists and short
8
+ // tables stay whole (docx-table.mjs).
9
+ import { inlineRuns } from './docx-inline.mjs';
10
+ import { tableBlock } from './docx-table.mjs';
11
+ import { figureKey, PAGE } from './figures.mjs';
12
+ import { COLORS } from './brand.mjs';
13
+
14
+ // Twips (1/20 pt).
15
+ export const SPACE = { gap: 120, item: 40, after: 160, figure: 200, captionGap: 60, part: 480 };
16
+ const SHORT_LIST = 6;
17
+ const LEAD_IN = 300; // characters: a sentence this short introduces what follows
18
+
19
+ const LEVELS = [null, 'TITLE', 'HEADING_1', 'HEADING_2', 'HEADING_3', 'HEADING_4'];
20
+ const stripId = (tokens) => tokens.map((t) => (t.type === 'text' ? { ...t, text: t.text.replace(/\s*\{#[a-z-]+\}\s*$/, ''), tokens: undefined } : t));
21
+
22
+ // An empty paragraph of an exact height: the gap after a table or a quote
23
+ // (a little over GAP, which a line's own leading adds to between paragraphs),
24
+ // which also keeps two tables in a row from merging into one.
25
+ const spacer = (ctx, height = SPACE.after) => new ctx.d.Paragraph({ children: [], spacing: { before: 0, after: 0, line: height, lineRule: ctx.d.LineRuleType.EXACT } });
26
+
27
+ function figureBlocks(t, ctx) {
28
+ const fig = ctx.figures.get(figureKey(t.lang, t.text));
29
+ if (!fig) return [];
30
+ const { Paragraph, ImageRun, TextRun, AlignmentType } = ctx.d;
31
+ const w = Math.min(PAGE.w, fig.width);
32
+ const h = Math.round((fig.height * w) / fig.width);
33
+ const [fw, fh] = h > PAGE.h ? [Math.round((w * PAGE.h) / h), PAGE.h] : [w, h];
34
+ ctx.figN += 1;
35
+ return [
36
+ new Paragraph({ alignment: AlignmentType.CENTER, keepNext: true, spacing: { before: SPACE.figure - SPACE.gap, after: 0 }, children: [new ImageRun({ type: 'png', data: fig.png, transformation: { width: fw, height: fh } })] }),
37
+ new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: SPACE.captionGap, after: SPACE.figure }, children: [new TextRun({ text: `Figure ${ctx.figN}. `, bold: true, size: 17 }), new TextRun({ text: fig.caption, size: 17, color: COLORS.muted })] }),
38
+ ];
39
+ }
40
+
41
+ // Items close together, the list's last line followed by the block gap. A
42
+ // short list stays on one page; a long one keeps an item with its sub-items.
43
+ function listBlocks(t, ctx) {
44
+ ctx.listN += 1;
45
+ const plain = (it) => it.tokens.flatMap((x) => (x.type === 'text' || x.type === 'paragraph' ? (x.tokens ?? [x]) : []));
46
+ const whole = t.items.length <= SHORT_LIST;
47
+ const lines = t.items.flatMap((it) => {
48
+ const nested = it.tokens.filter((x) => x.type === 'list').flatMap((sub) => sub.items);
49
+ return [{ tokens: plain(it), level: 0, ordered: t.ordered, keep: nested.length > 0 }, ...nested.map((si) => ({ tokens: plain(si), level: 1, ordered: false, keep: false }))];
50
+ });
51
+ return lines.map((l, i) => {
52
+ const last = i === lines.length - 1;
53
+ return new ctx.d.Paragraph({
54
+ children: inlineRuns(l.tokens, ctx), numbering: { reference: l.ordered ? 'num' : 'bul', level: l.level, instance: ctx.listN },
55
+ spacing: { after: last ? SPACE.gap : SPACE.item }, keepNext: !last && (whole || l.keep),
56
+ });
57
+ });
58
+ }
59
+
60
+ // A shaded box with the accent rule; the spacer after it ends the box.
61
+ function quoteBlocks(t, ctx) {
62
+ const { Paragraph, ShadingType, BorderStyle } = ctx.d;
63
+ const paras = t.tokens.filter((x) => x.type === 'paragraph');
64
+ const pad = { style: BorderStyle.SINGLE, size: 4, color: COLORS.soft, space: 4 };
65
+ return [...paras.map((p, i) => new Paragraph({
66
+ children: inlineRuns(p.tokens, ctx), shading: { type: ShadingType.CLEAR, fill: COLORS.soft, color: 'auto' }, keepNext: i < paras.length - 1,
67
+ border: { left: { style: BorderStyle.SINGLE, size: 24, color: COLORS.accent, space: 6 }, top: pad, bottom: pad },
68
+ spacing: { before: 0, after: i < paras.length - 1 ? SPACE.gap - 20 : 0 }, indent: { left: 160, right: 160 },
69
+ })), spacer(ctx)];
70
+ }
71
+
72
+ const plainText = (t) => (t.text ?? '').replace(/\[\^[^\]]+\]/g, '').trim();
73
+
74
+ // A paragraph stays with the next block when it is a lead-in: bold only,
75
+ // ending in a colon, or a short sentence just before a table, list or figure.
76
+ function leadsIn(t, next) {
77
+ if (t.tokens.length === 1 && t.tokens[0].type === 'strong') return true;
78
+ if (/:$/.test(plainText(t))) return true;
79
+ return Boolean(next) && ['table', 'list', 'code'].includes(next.type) && plainText(t).length <= LEAD_IN;
80
+ }
81
+
82
+ function blockOf(t, ctx, next) {
83
+ const { Paragraph, HeadingLevel } = ctx.d;
84
+ if (t.type === 'heading') {
85
+ if (t.depth === 2) ctx.partN += 1;
86
+ const flows = t.depth === 2 && ctx.flow.has(ctx.partN);
87
+ return [new Paragraph({ heading: HeadingLevel[LEVELS[t.depth]], children: inlineRuns(stripId(t.tokens), ctx), keepNext: true, keepLines: true,
88
+ pageBreakBefore: t.depth === 2 && !flows, spacing: flows ? { before: SPACE.part, after: 200 } : undefined })];
89
+ }
90
+ if (t.type === 'paragraph') return [new Paragraph({ children: inlineRuns(t.tokens, ctx), spacing: { after: SPACE.gap }, keepNext: leadsIn(t, next) })];
91
+ if (t.type === 'list') return listBlocks(t, ctx);
92
+ if (t.type === 'blockquote') return quoteBlocks(t, ctx);
93
+ if (t.type === 'table') return [tableBlock(t, ctx), spacer(ctx)];
94
+ if (t.type === 'code') return figureBlocks(t, ctx);
95
+ return [];
96
+ }
97
+
98
+ // ctx: { d, refs, figures, notes, figN, listN, partN, flow } — the counters count up.
99
+ export function bodyBlocks(tokens, ctx) {
100
+ const blocks = tokens.filter((t) => t.type !== 'space');
101
+ return blocks.flatMap((t, i) => blockOf(t, ctx, blocks[i + 1]));
102
+ }