@v11g/agents-rock 1.0.9 → 1.0.11

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 (347) hide show
  1. package/README.md +3 -1
  2. package/package.json +2 -2
  3. package/plugins/business-analyst/.claude-plugin/plugin.json +2 -2
  4. package/plugins/business-analyst/evals/ba-interview-conflict/graders/conflict-quoted.md +15 -0
  5. package/plugins/business-analyst/evals/ba-interview-conflict/graders/no-internal-ids.md +9 -0
  6. package/plugins/business-analyst/evals/ba-interview-conflict/graders/one-question.md +15 -0
  7. package/plugins/business-analyst/evals/ba-interview-conflict/graders/skill-fired.md +7 -0
  8. package/plugins/business-analyst/evals/ba-interview-conflict/prompt.md +31 -0
  9. package/plugins/business-analyst/evals/ba-interview-first-turn/graders/no-internal-ids.md +9 -0
  10. package/plugins/business-analyst/evals/ba-interview-first-turn/graders/no-setup-questions.md +16 -0
  11. package/plugins/business-analyst/evals/ba-interview-first-turn/graders/one-scope-question.md +19 -0
  12. package/plugins/business-analyst/evals/ba-interview-first-turn/graders/skill-fired.md +7 -0
  13. package/plugins/business-analyst/evals/ba-interview-first-turn/prompt.md +31 -0
  14. package/plugins/business-analyst/evals/ba-review-page/case.yaml +4 -0
  15. package/plugins/business-analyst/evals/ba-review-page/fixture.sh +12 -0
  16. package/plugins/business-analyst/evals/ba-review-page/graders/decide-in-interview.md +26 -0
  17. package/plugins/business-analyst/evals/ba-review-page/graders/skill-fired.md +7 -0
  18. package/plugins/business-analyst/evals/ba-review-page/prompt.md +9 -0
  19. package/plugins/business-analyst/evals/draft-scope-rich/case.yaml +4 -0
  20. package/plugins/business-analyst/evals/draft-scope-rich/fixture.sh +5 -0
  21. package/plugins/business-analyst/evals/draft-scope-rich/graders/conflict-question.md +11 -0
  22. package/plugins/business-analyst/evals/draft-scope-rich/graders/keep-and-exclude.md +14 -0
  23. package/plugins/business-analyst/evals/draft-scope-rich/graders/noise-and-shape.md +13 -0
  24. package/plugins/business-analyst/evals/draft-scope-rich/graders/problem-not-solution.md +13 -0
  25. package/plugins/business-analyst/evals/draft-scope-rich/graders/share-kept.md +11 -0
  26. package/plugins/business-analyst/evals/draft-scope-rich/graders/skill-fired.md +7 -0
  27. package/plugins/business-analyst/evals/draft-scope-rich/graders/vague-word.md +13 -0
  28. package/plugins/business-analyst/evals/draft-scope-rich/inputs/C1.txt +10 -0
  29. package/plugins/business-analyst/evals/draft-scope-rich/inputs/E1.txt +5 -0
  30. package/plugins/business-analyst/evals/draft-scope-rich/inputs/E2.txt +5 -0
  31. package/plugins/business-analyst/evals/draft-scope-rich/inputs/E3.txt +5 -0
  32. package/plugins/business-analyst/evals/draft-scope-rich/prompt.md +9 -0
  33. package/plugins/business-analyst/evals/draft-scope-thin/case.yaml +4 -0
  34. package/plugins/business-analyst/evals/draft-scope-thin/fixture.sh +4 -0
  35. package/plugins/business-analyst/evals/draft-scope-thin/graders/no-invention.md +18 -0
  36. package/plugins/business-analyst/evals/draft-scope-thin/graders/skill-fired.md +7 -0
  37. package/plugins/business-analyst/evals/draft-scope-thin/inputs/E1.txt +5 -0
  38. package/plugins/business-analyst/evals/draft-scope-thin/prompt.md +8 -0
  39. package/plugins/business-analyst/skills/business-analyst/README.md +8 -0
  40. package/plugins/business-analyst/skills/business-analyst/SKILL.md +47 -16
  41. package/plugins/business-analyst/skills/business-analyst/assets/review-page.html +68 -0
  42. package/plugins/business-analyst/skills/business-analyst/evals/evals.json +1 -1
  43. package/plugins/business-analyst/skills/business-analyst/references/frameworks.md +3 -2
  44. package/plugins/business-analyst/skills/business-analyst/references/interview.md +156 -8
  45. package/plugins/business-analyst/skills/business-analyst/references/review.md +18 -4
  46. package/plugins/business-analyst/skills/business-analyst/references/writing.md +49 -8
  47. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_data.cpython-312.pyc +0 -0
  48. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_layout.cpython-312.pyc +0 -0
  49. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_page.cpython-312.pyc +0 -0
  50. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_checks.cpython-312.pyc +0 -0
  51. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_render.cpython-312.pyc +0 -0
  52. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/validate.cpython-312.pyc +0 -0
  53. package/plugins/business-analyst/skills/business-analyst/scripts/lib/checks.mjs +12 -6
  54. package/plugins/business-analyst/skills/business-analyst/scripts/lib/review-data.mjs +66 -0
  55. package/plugins/business-analyst/skills/business-analyst/scripts/lib/review-layout.mjs +53 -0
  56. package/plugins/business-analyst/skills/business-analyst/scripts/lib/review-page.mjs +78 -0
  57. package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-checks.mjs +73 -0
  58. package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-md.mjs +53 -0
  59. package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-render.mjs +72 -0
  60. package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-rules.mjs +90 -0
  61. package/plugins/business-analyst/skills/business-analyst/scripts/review.mjs +48 -0
  62. package/plugins/business-analyst/skills/business-analyst/scripts/review.py +60 -0
  63. package/plugins/business-analyst/skills/business-analyst/scripts/review_data.py +81 -0
  64. package/plugins/business-analyst/skills/business-analyst/scripts/review_layout.py +50 -0
  65. package/plugins/business-analyst/skills/business-analyst/scripts/review_page.py +115 -0
  66. package/plugins/business-analyst/skills/business-analyst/scripts/scope.mjs +24 -0
  67. package/plugins/business-analyst/skills/business-analyst/scripts/scope.py +35 -0
  68. package/plugins/business-analyst/skills/business-analyst/scripts/scope_checks.py +168 -0
  69. package/plugins/business-analyst/skills/business-analyst/scripts/scope_render.py +140 -0
  70. package/plugins/business-analyst/skills/business-analyst/scripts/test/checks.test.mjs +27 -0
  71. package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-workflow-pass.json +78 -0
  72. package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-workflow-pass.md +136 -0
  73. package/plugins/business-analyst/skills/business-analyst/scripts/test/python-parity.test.mjs +88 -0
  74. package/plugins/business-analyst/skills/business-analyst/scripts/test/quality-gates.test.mjs +26 -0
  75. package/plugins/business-analyst/skills/business-analyst/scripts/test/review-browser.test.mjs +106 -0
  76. package/plugins/business-analyst/skills/business-analyst/scripts/test/review-fixture.mjs +32 -0
  77. package/plugins/business-analyst/skills/business-analyst/scripts/test/review-page.test.mjs +340 -0
  78. package/plugins/business-analyst/skills/business-analyst/scripts/test/review-parity.test.mjs +79 -0
  79. package/plugins/business-analyst/skills/business-analyst/scripts/test/scope-cases.mjs +58 -0
  80. package/plugins/business-analyst/skills/business-analyst/scripts/test/scope-checks.test.mjs +31 -0
  81. package/plugins/business-analyst/skills/business-analyst/scripts/test/scope-md.test.mjs +140 -0
  82. package/plugins/business-analyst/skills/business-analyst/scripts/validate.mjs +1 -1
  83. package/plugins/business-analyst/skills/business-analyst/scripts/validate.py +17 -8
  84. package/plugins/business-analyst/skills/draft-scope/SKILL.md +46 -0
  85. package/plugins/business-analyst/skills/draft-scope/references/credits.md +12 -0
  86. package/plugins/business-analyst/skills/draft-scope/references/draft-schema.md +44 -0
  87. package/plugins/business-analyst/skills/draft-scope/references/rules.md +24 -0
  88. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_body.cpython-312.pyc +0 -0
  89. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_flow.cpython-312.pyc +0 -0
  90. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_package.cpython-312.pyc +0 -0
  91. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_xml.cpython-312.pyc +0 -0
  92. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_quotes.cpython-312.pyc +0 -0
  93. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_rules.cpython-312.pyc +0 -0
  94. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_schema.cpython-312.pyc +0 -0
  95. package/plugins/business-analyst/skills/draft-scope/scripts/build_docx.py +36 -0
  96. package/plugins/business-analyst/skills/draft-scope/scripts/check.py +53 -0
  97. package/plugins/business-analyst/skills/draft-scope/scripts/docx_body.py +58 -0
  98. package/plugins/business-analyst/skills/draft-scope/scripts/docx_flow.py +52 -0
  99. package/plugins/business-analyst/skills/draft-scope/scripts/docx_package.py +62 -0
  100. package/plugins/business-analyst/skills/draft-scope/scripts/docx_xml.py +44 -0
  101. package/plugins/business-analyst/skills/draft-scope/scripts/draft_quotes.py +49 -0
  102. package/plugins/business-analyst/skills/draft-scope/scripts/draft_rules.py +106 -0
  103. package/plugins/business-analyst/skills/draft-scope/scripts/draft_schema.py +87 -0
  104. package/plugins/business-analyst/skills/draft-scope/scripts/test/build-docx.test.mjs +76 -0
  105. package/plugins/business-analyst/skills/draft-scope/scripts/test/check-rules.test.mjs +131 -0
  106. package/plugins/business-analyst/skills/draft-scope/scripts/test/check-shape.test.mjs +70 -0
  107. package/plugins/business-analyst/skills/draft-scope/scripts/test/fixtures/draft-pass.json +40 -0
  108. package/plugins/business-analyst/skills/draft-scope/scripts/test/fixtures/sources/C1.txt +7 -0
  109. package/plugins/business-analyst/skills/draft-scope/scripts/test/fixtures/sources/E1.txt +5 -0
  110. package/plugins/business-analyst/skills/draft-scope/scripts/test/gates.test.mjs +39 -0
  111. package/plugins/business-analyst/skills/draft-scope/scripts/test/helpers.mjs +30 -0
  112. package/plugins/business-analyst/skills/draft-scope/scripts/test/skill-files.test.mjs +59 -0
  113. package/plugins/business-analyst/skills/draft-scope/steps/assumptions.md +24 -0
  114. package/plugins/business-analyst/skills/draft-scope/steps/check.md +24 -0
  115. package/plugins/business-analyst/skills/draft-scope/steps/discover.md +53 -0
  116. package/plugins/business-analyst/skills/draft-scope/steps/draft.md +64 -0
  117. package/plugins/solution-architect/.claude-plugin/plugin.json +1 -1
  118. package/plugins/solution-architect/evals/proposal-workflow/case.yaml +6 -0
  119. package/plugins/solution-architect/evals/proposal-workflow/fixture.sh +6 -0
  120. package/plugins/solution-architect/evals/proposal-workflow/graders/inputs-written.md +23 -0
  121. package/plugins/solution-architect/evals/proposal-workflow/graders/no-proposal-md.md +7 -0
  122. package/plugins/solution-architect/evals/proposal-workflow/graders/skill-fired.md +7 -0
  123. package/plugins/solution-architect/evals/proposal-workflow/graders/validate-then-render.md +16 -0
  124. package/plugins/solution-architect/evals/proposal-workflow/prompt.md +10 -0
  125. package/plugins/solution-architect/evals/workflow-gate-no-architecture/case.yaml +4 -0
  126. package/plugins/solution-architect/evals/workflow-gate-no-architecture/fixture.sh +6 -0
  127. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/no-classic-fallback.md +10 -0
  128. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/nothing-written.md +7 -0
  129. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/skill-fired.md +7 -0
  130. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/stops-at-gate.md +11 -0
  131. package/plugins/solution-architect/evals/workflow-gate-no-architecture/prompt.md +7 -0
  132. package/plugins/solution-architect/evals/workflow-happy-path/case.yaml +4 -0
  133. package/plugins/solution-architect/evals/workflow-happy-path/fixture.sh +6 -0
  134. package/plugins/solution-architect/evals/workflow-happy-path/graders/no-estimation-md.md +7 -0
  135. package/plugins/solution-architect/evals/workflow-happy-path/graders/pages-or-stop.md +16 -0
  136. package/plugins/solution-architect/evals/workflow-happy-path/graders/routed-to-workflow.md +12 -0
  137. package/plugins/solution-architect/evals/workflow-happy-path/graders/skill-fired.md +7 -0
  138. package/plugins/solution-architect/evals/workflow-happy-path/graders/three-questions-max.md +14 -0
  139. package/plugins/solution-architect/evals/workflow-happy-path/graders/workflow-or-exact-stop.md +15 -0
  140. package/plugins/solution-architect/evals/workflow-happy-path/prompt.md +9 -0
  141. package/plugins/solution-architect/skills/analyze-requirements/SKILL.md +8 -7
  142. package/plugins/solution-architect/skills/analyze-requirements/assets/section-help.json +5 -5
  143. package/plugins/solution-architect/skills/analyze-requirements/assets/viewer-template.html +26 -4
  144. package/plugins/solution-architect/skills/analyze-requirements/evals/evals.json +50 -6
  145. package/plugins/solution-architect/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.json +31 -0
  146. package/plugins/solution-architect/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.md +17 -0
  147. package/plugins/solution-architect/skills/analyze-requirements/evals/fixtures/transcript-citations/C1-kickoff-call.txt +16 -0
  148. package/plugins/solution-architect/skills/analyze-requirements/evals/fixtures/transcript-citations/E1-intro-email.md +9 -0
  149. package/plugins/solution-architect/skills/analyze-requirements/references/extract.md +108 -0
  150. package/plugins/solution-architect/skills/analyze-requirements/references/interview.md +39 -5
  151. package/plugins/solution-architect/skills/analyze-requirements/references/project-types.md +1 -1
  152. package/plugins/solution-architect/skills/analyze-requirements/references/quality-goals.md +84 -0
  153. package/plugins/solution-architect/skills/analyze-requirements/references/research.md +1 -1
  154. package/plugins/solution-architect/skills/analyze-requirements/references/rewriting.md +7 -2
  155. package/plugins/solution-architect/skills/analyze-requirements/references/viewer.md +10 -6
  156. package/plugins/solution-architect/skills/analyze-requirements/references/writing.md +45 -3
  157. package/plugins/solution-architect/skills/analyze-requirements/scripts/ba-facts.mjs +32 -0
  158. package/plugins/solution-architect/skills/analyze-requirements/scripts/check-quotes.mjs +39 -0
  159. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/ba-package.mjs +75 -0
  160. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/doc-links.mjs +19 -7
  161. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/doc-routes.mjs +1 -1
  162. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/inputs.mjs +42 -11
  163. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/md-render.mjs +15 -4
  164. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/section-help.mjs +1 -1
  165. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/strategy-sections.mjs +30 -0
  166. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-provenance.mjs +14 -2
  167. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-quotes.mjs +55 -0
  168. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-strategy.mjs +65 -0
  169. package/plugins/solution-architect/skills/analyze-requirements/scripts/render.mjs +18 -5
  170. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/ba-facts-cli.test.mjs +55 -0
  171. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/ba-package-cli.test.mjs +101 -0
  172. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/ba-package.test.mjs +115 -0
  173. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/browser.test.mjs +77 -2
  174. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/check-quotes-cli.test.mjs +49 -0
  175. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/doc-links.test.mjs +49 -4
  176. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/extract-workflow.test.mjs +69 -0
  177. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/inputs.test.mjs +14 -0
  178. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/md-render.test.mjs +19 -5
  179. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/record-cli.test.mjs +1 -1
  180. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/render.test.mjs +69 -2
  181. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/rewriting.test.mjs +1 -1
  182. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/section-help.test.mjs +6 -0
  183. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-provenance.test.mjs +19 -0
  184. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-quotes-cli.test.mjs +58 -0
  185. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-quotes.test.mjs +81 -0
  186. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-strategy-cli.test.mjs +32 -0
  187. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-strategy.test.mjs +118 -0
  188. package/plugins/solution-architect/skills/analyze-requirements/scripts/validate.mjs +17 -6
  189. package/plugins/solution-architect/skills/analyze-requirements/workflows/extract.js +51 -0
  190. package/plugins/solution-architect/skills/estimate/README.md +18 -3
  191. package/plugins/solution-architect/skills/estimate/SKILL.md +18 -75
  192. package/plugins/solution-architect/skills/estimate/classic/FLOW.md +77 -0
  193. package/plugins/solution-architect/skills/estimate/classic/assets/estimate-template.html +1337 -0
  194. package/plugins/solution-architect/skills/estimate/{references → classic/references}/task-shapes.md +1 -1
  195. package/plugins/solution-architect/skills/estimate/{references → classic/references}/writing.md +2 -2
  196. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/compute.mjs +1 -1
  197. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/checks.mjs +1 -1
  198. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/roadmap.mjs +1 -1
  199. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/rollup.mjs +5 -5
  200. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/schema.mjs +4 -26
  201. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-csv.mjs +2 -2
  202. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-html.mjs +2 -2
  203. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/render.mjs +8 -7
  204. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/score-review.mjs +3 -3
  205. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/baselines.test.mjs +3 -3
  206. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/browser-agentic.test.mjs +2 -2
  207. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/browser.test.mjs +2 -2
  208. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/compute.test.mjs +1 -1
  209. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/e2e.test.mjs +6 -6
  210. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/estimate-math.test.mjs +3 -3
  211. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/measurements.test.mjs +1 -1
  212. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/pricing.test.mjs +1 -1
  213. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/project-price.test.mjs +1 -1
  214. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/quality-gates.test.mjs +7 -1
  215. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/references.test.mjs +6 -6
  216. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/render.test.mjs +3 -3
  217. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/schema.test.mjs +1 -1
  218. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/score-review.test.mjs +6 -6
  219. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/scoring.test.mjs +1 -1
  220. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/url-state.test.mjs +2 -2
  221. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/validate.test.mjs +1 -1
  222. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/xlsx-export.test.mjs +3 -3
  223. package/plugins/solution-architect/skills/estimate/classic/scripts/test/zip-store.test.mjs +26 -0
  224. package/plugins/solution-architect/skills/estimate/evals/evals.json +37 -2
  225. package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +28 -0
  226. package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.json +79 -0
  227. package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.md +141 -0
  228. package/plugins/solution-architect/skills/estimate/shared/assets/xlsx-export.js +336 -0
  229. package/plugins/solution-architect/skills/estimate/shared/lib/agentic-task-schema.mjs +24 -0
  230. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/context-schema.mjs +2 -2
  231. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/inline.mjs +8 -0
  232. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/scoring-schema.mjs +1 -1
  233. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/scoring.mjs +1 -1
  234. package/plugins/solution-architect/skills/estimate/shared/lib/zip.mjs +60 -0
  235. package/plugins/solution-architect/skills/estimate/workflow-based/FLOW.md +91 -0
  236. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-components.html +994 -0
  237. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-template.html +440 -0
  238. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimator-system.xlsx +0 -0
  239. package/plugins/solution-architect/skills/estimate/workflow-based/assets/score-review.html +838 -0
  240. package/plugins/solution-architect/skills/estimate/workflow-based/references/hidden-work-by-type.md +429 -0
  241. package/plugins/solution-architect/skills/estimate/workflow-based/references/linking.md +59 -0
  242. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-components-template.mjs +80 -0
  243. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-template.mjs +60 -0
  244. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-workflow-template.mjs +51 -0
  245. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-xlsx-template.py +144 -0
  246. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/compute.mjs +32 -0
  247. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-html.mjs +44 -0
  248. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-view.mjs +71 -0
  249. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/pair-findings.mjs +19 -0
  250. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/requirements.mjs +33 -0
  251. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/rollup.mjs +66 -0
  252. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/schema-components.mjs +69 -0
  253. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/schema.mjs +70 -0
  254. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/score-diff.mjs +54 -0
  255. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/score-html.mjs +52 -0
  256. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/xlsx-rows.mjs +51 -0
  257. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/render.mjs +42 -0
  258. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/score-review.mjs +46 -0
  259. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/arch-link.js +9 -0
  260. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/click.js +28 -0
  261. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/prelude.js +4 -0
  262. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/view.js +63 -0
  263. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/browser.test.mjs +127 -0
  264. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/build-pages.test.mjs +43 -0
  265. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/build-template.test.mjs +18 -0
  266. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/cli.test.mjs +48 -0
  267. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/estimator-system.test.mjs +66 -0
  268. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/ARCHITECTURE-mini.md +31 -0
  269. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/feedback.json +19 -0
  270. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/inputs-pass.json +80 -0
  271. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/measurements.jsonl +0 -0
  272. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/requirements.json +79 -0
  273. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/page-view.test.mjs +54 -0
  274. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/pages-browser.test.mjs +209 -0
  275. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/quality-gates.test.mjs +25 -0
  276. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/render.test.mjs +54 -0
  277. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/requirements.test.mjs +33 -0
  278. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/rollup.test.mjs +80 -0
  279. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/schema.test.mjs +61 -0
  280. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/score-review.test.mjs +108 -0
  281. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/stage.mjs +32 -0
  282. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/workflow-script.test.mjs +24 -0
  283. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs +58 -0
  284. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/validate.mjs +19 -0
  285. package/plugins/solution-architect/skills/proposal/README.md +13 -0
  286. package/plugins/solution-architect/skills/proposal/SKILL.md +8 -0
  287. package/plugins/solution-architect/skills/proposal/assets/proposal-workflow.html +143 -0
  288. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +31 -0
  289. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation-inputs.json +468 -0
  290. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation.json +773 -0
  291. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/measurements.jsonl +0 -0
  292. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/requirements.json +79 -0
  293. package/plugins/solution-architect/skills/proposal/references/review.md +11 -0
  294. package/plugins/solution-architect/skills/proposal/references/workflow.md +88 -0
  295. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-body.mjs +42 -0
  296. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-package.mjs +56 -0
  297. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-xml.mjs +44 -0
  298. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-checks.mjs +71 -0
  299. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-cli.mjs +46 -0
  300. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-html.mjs +39 -0
  301. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-lead.mjs +45 -0
  302. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-page.mjs +30 -0
  303. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-view.mjs +80 -0
  304. package/plugins/solution-architect/skills/proposal/scripts/render.mjs +5 -1
  305. package/plugins/solution-architect/skills/proposal/scripts/test/docx.test.mjs +68 -0
  306. package/plugins/solution-architect/skills/proposal/scripts/test/e2e.test.mjs +2 -2
  307. package/plugins/solution-architect/skills/proposal/scripts/test/evals-fixtures.test.mjs +9 -2
  308. package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-inputs-pass.json +17 -0
  309. package/plugins/solution-architect/skills/proposal/scripts/test/render.test.mjs +2 -2
  310. package/plugins/solution-architect/skills/proposal/scripts/test/validate.test.mjs +2 -2
  311. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-browser.test.mjs +96 -0
  312. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-checks.test.mjs +98 -0
  313. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-docs.test.mjs +25 -0
  314. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-render.test.mjs +75 -0
  315. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-stage.mjs +15 -0
  316. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-view.test.mjs +78 -0
  317. package/plugins/solution-architect/skills/proposal/scripts/validate.mjs +4 -1
  318. package/plugins/solution-architect/workflows/review-links.js +61 -0
  319. package/plugins/solution-architect/skills/estimate/assets/estimate-template.html +0 -1677
  320. /package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/estimate-template-agentic.html +0 -0
  321. /package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/scores-review-template.html +0 -0
  322. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/agentic-estimation.md +0 -0
  323. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/ai-multipliers.md +0 -0
  324. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/interview.md +0 -0
  325. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/scoring-guide.md +0 -0
  326. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/slicing.md +0 -0
  327. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/techniques.md +0 -0
  328. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/agentic-checks.mjs +0 -0
  329. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/components.mjs +0 -0
  330. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/md-tables.mjs +0 -0
  331. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/redact.mjs +0 -0
  332. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/scoring-checks.mjs +0 -0
  333. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-estimation-fail.md +0 -0
  334. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-estimation-pass.md +0 -0
  335. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-inputs.json +0 -0
  336. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/booking-inputs.json +0 -0
  337. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/estimation-fail.md +0 -0
  338. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/estimation-pass.md +0 -0
  339. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/measurements.jsonl +0 -0
  340. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/zip.mjs +0 -0
  341. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/validate.mjs +0 -0
  342. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/baselines.mjs +0 -0
  343. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/estimate-math.mjs +0 -0
  344. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/measurements.mjs +0 -0
  345. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/pricing.mjs +0 -0
  346. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/project-price.mjs +0 -0
  347. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/score-diff.mjs +0 -0
@@ -0,0 +1,106 @@
1
+ """Rules check.py applies to a well-shaped draft: references, coverage, limits, banned words."""
2
+ import re
3
+
4
+
5
+ def source_refs(draft):
6
+ """(where, id) for every field that must name a source."""
7
+ for i, p in enumerate(draft['problems']):
8
+ for j, q in enumerate(p['quotes']):
9
+ yield f'problems[{i}].quotes[{j}]', q['source']
10
+ for j, x in enumerate(draft['scope']['exclusions']):
11
+ yield f'scope.exclusions[{j}]', x['source']
12
+ for i, s in enumerate(draft['systems']):
13
+ for key in ('workflows', 'features'):
14
+ for j, x in enumerate(s[key]):
15
+ yield f'systems[{i}].{key}[{j}]', x['source']
16
+ for i, a in enumerate(draft['assumptions']):
17
+ yield f'assumptions[{i}]', a['source']
18
+
19
+
20
+ def problem_refs(draft):
21
+ """(where, id) for every field that must name a problem."""
22
+ for i, s in enumerate(draft['systems']):
23
+ yield f'systems[{i}]', s['problem']
24
+ for j, f in enumerate(s['features']):
25
+ yield f'systems[{i}].features[{j}]', f['problem']
26
+
27
+
28
+ def ref_findings(draft):
29
+ sources = {s['id'] for s in draft['sources']}
30
+ problems = {p['id'] for p in draft['problems']}
31
+ features = {f['name'] for s in draft['systems'] for f in s['features']}
32
+ out = [f'{w}: unknown source {r}' for w, r in source_refs(draft) if r not in sources]
33
+ out += [f'{w}: unknown problem {r}' for w, r in problem_refs(draft) if r not in problems]
34
+ out += [f"assumptions[{i}]: unknown feature {a['feature']}"
35
+ for i, a in enumerate(draft['assumptions']) if a['feature'] not in features]
36
+ for i, q in enumerate(draft['questions']):
37
+ out += [f'questions[{i}]: unknown ref {r}' for r in q['refs'] if r not in sources | problems]
38
+ return out
39
+
40
+
41
+ MAX_PROBLEMS = 6
42
+ MAX_ASSUMPTIONS = 8
43
+ BANNED = ['fast', 'quick', 'easy', 'simple', 'user-friendly', 'intuitive', 'flexible', 'robust',
44
+ 'seamless', 'efficient', 'optimal', 'appropriate', 'various', 'etc', 'some', 'many',
45
+ 'several', 'as needed']
46
+ QUOTED = re.compile('|'.join([r'"[^"]*"', r'“[^”]*”', r"(?<!\w)'[^']*'(?!\w)", r'‘[^’]*’']))
47
+
48
+
49
+ def words(text):
50
+ return len([w for w in text.split() if any(c.isalnum() for c in w)])
51
+
52
+
53
+ def coverage_findings(draft):
54
+ hit = {f['problem'] for s in draft['systems'] for f in s['features']}
55
+ hit |= {r for q in draft['questions'] for r in q['refs']}
56
+ return [f"{p['id']}: no feature or client question points at it"
57
+ for p in draft['problems'] if p['id'] not in hit]
58
+
59
+
60
+ def count_findings(draft):
61
+ n, a = len(draft['problems']), len(draft['assumptions'])
62
+ out = [f'problems: {n}, at least 1'] if n < 1 else []
63
+ out += [f"{p['id']}: no quote" for p in draft['problems'] if not p['quotes']]
64
+ out += [f'problems: {n}, at most {MAX_PROBLEMS}'] if n > MAX_PROBLEMS else []
65
+ return out + ([f'assumptions: {a}, at most {MAX_ASSUMPTIONS}'] if a > MAX_ASSUMPTIONS else [])
66
+
67
+
68
+ def limit_findings(draft):
69
+ out = count_findings(draft)
70
+ for i, s in enumerate(draft['systems']):
71
+ for j, w in enumerate(s['workflows']):
72
+ out += [f'systems[{i}].workflows[{j}]: no steps'] if not w['steps'] else []
73
+ out += [f'systems[{i}].workflows[{j}]: step "{st}" has {words(st)} words, at most 5'
74
+ for st in w['steps'] if not 1 <= words(st) <= 5]
75
+ out += [f"systems[{i}].features[{j}]: name \"{f['name']}\" has {words(f['name'])} words, 2 to 6"
76
+ for j, f in enumerate(s['features']) if not 2 <= words(f['name']) <= 6]
77
+ return out
78
+
79
+
80
+ def text_fields(draft):
81
+ """(where, text) for every field the PO reads that is not a quote."""
82
+ yield 'scope.covered', draft['scope']['covered']
83
+ for i, p in enumerate(draft['problems']):
84
+ yield f'problems[{i}].text', p['text']
85
+ for j, x in enumerate(draft['scope']['exclusions']):
86
+ yield f'scope.exclusions[{j}].text', x['text']
87
+ for i, s in enumerate(draft['systems']):
88
+ yield f'systems[{i}].name', s['name']
89
+ yield f'systems[{i}].purpose', s['purpose']
90
+ for j, f in enumerate(s['features']):
91
+ yield f'systems[{i}].features[{j}].name', f['name']
92
+ yield f'systems[{i}].features[{j}].does', f['does']
93
+ for i, a in enumerate(draft['assumptions']):
94
+ yield f'assumptions[{i}].text', a['text']
95
+ for i, q in enumerate(draft['questions']):
96
+ for key in ('text', 'why', 'assume'):
97
+ yield f'questions[{i}].{key}', q[key]
98
+
99
+
100
+ def word_findings(draft):
101
+ out = []
102
+ for where, text in text_fields(draft):
103
+ plain = QUOTED.sub(' ', text)
104
+ out += [f'{where}: vague word "{w}"' for w in BANNED
105
+ if re.search(rf'(?<![\w-]){re.escape(w)}(?![\w-])', plain, re.IGNORECASE)]
106
+ return out
@@ -0,0 +1,87 @@
1
+ """Shape of draft.json (references/draft-schema.md): required fields, types, ids and kinds."""
2
+ import re
3
+
4
+ SOURCE_ID = re.compile(r'^[ECN][1-9][0-9]*$')
5
+ PROBLEM_ID = re.compile(r'^P[1-9][0-9]*$')
6
+ KINDS = ('email', 'call', 'note')
7
+ FLOW_KINDS = ('main', 'side', 'sub')
8
+ REASONS = ('owned-elsewhere', 'later-phase', 'no-detail')
9
+
10
+ TOP = [('client', str), ('date', str), ('sources', list), ('problems', list),
11
+ ('scope', dict), ('systems', list), ('assumptions', list), ('questions', list)]
12
+ SCOPE = [('covered', str), ('exclusions', list)]
13
+ ITEMS = {
14
+ 'sources': [('id', str), ('kind', str), ('date', str), ('who', str), ('file', str)],
15
+ 'problems': [('id', str), ('text', str), ('quotes', list)],
16
+ 'systems': [('name', str), ('purpose', str), ('problem', str), ('workflows', list), ('features', list)],
17
+ 'assumptions': [('text', str), ('feature', str), ('source', str)],
18
+ 'questions': [('text', str), ('why', str), ('assume', str), ('refs', list)],
19
+ }
20
+ NESTED = {
21
+ 'quotes': [('source', str), ('text', str)],
22
+ 'workflows': [('kind', str), ('steps', list), ('source', str)],
23
+ 'features': [('name', str), ('does', str), ('problem', str), ('source', str)],
24
+ 'exclusions': [('text', str), ('reason', str), ('source', str)],
25
+ }
26
+
27
+
28
+ def missing(obj, fields, where):
29
+ if not isinstance(obj, dict):
30
+ return [f'{where}: not an object']
31
+ return [f'{where}: {key} missing or not {kind.__name__}'
32
+ for key, kind in fields if not isinstance(obj.get(key), kind)]
33
+
34
+
35
+ def nested_items(draft):
36
+ """(where, item, fields) for every item inside problems, systems and scope."""
37
+ for i, p in enumerate(draft['problems']):
38
+ for j, q in enumerate(p['quotes']):
39
+ yield f'problems[{i}].quotes[{j}]', q, NESTED['quotes']
40
+ for i, s in enumerate(draft['systems']):
41
+ for key in ('workflows', 'features'):
42
+ for j, x in enumerate(s[key]):
43
+ yield f'systems[{i}].{key}[{j}]', x, NESTED[key]
44
+ for j, x in enumerate(draft['scope']['exclusions']):
45
+ yield f'scope.exclusions[{j}]', x, NESTED['exclusions']
46
+
47
+
48
+ def outer_findings(draft):
49
+ out = missing(draft, TOP, 'draft')
50
+ if out:
51
+ return out
52
+ out = missing(draft['scope'], SCOPE, 'scope')
53
+ for name, fields in ITEMS.items():
54
+ for i, item in enumerate(draft[name]):
55
+ out += missing(item, fields, f'{name}[{i}]')
56
+ return out
57
+
58
+
59
+ def id_findings(draft):
60
+ out = []
61
+ for name, pattern in (('sources', SOURCE_ID), ('problems', PROBLEM_ID)):
62
+ ids = [x['id'] for x in draft[name]]
63
+ out += [f'{name}: bad id {i}' for i in ids if not pattern.match(i)]
64
+ out += [f'{name}: duplicate id {i}' for i in sorted(set(ids)) if ids.count(i) > 1]
65
+ return out
66
+
67
+
68
+ def enum_findings(draft):
69
+ out = [f"sources: {s['id']} kind {s['kind']} is not email, call or note"
70
+ for s in draft['sources'] if s['kind'] not in KINDS]
71
+ for i, s in enumerate(draft['systems']):
72
+ out += [f"systems[{i}].workflows[{j}]: kind {w['kind']} is not main, side or sub"
73
+ for j, w in enumerate(s['workflows']) if w['kind'] not in FLOW_KINDS]
74
+ out += [f"scope.exclusions[{j}]: reason {x['reason']} is not owned-elsewhere, later-phase or no-detail"
75
+ for j, x in enumerate(draft['scope']['exclusions']) if x['reason'] not in REASONS]
76
+ return out
77
+
78
+
79
+ def shape_findings(draft):
80
+ out = outer_findings(draft)
81
+ if out:
82
+ return out
83
+ for where, item, fields in nested_items(draft):
84
+ out += missing(item, fields, where)
85
+ if out:
86
+ return out
87
+ return id_findings(draft) + enum_findings(draft)
@@ -0,0 +1,76 @@
1
+ import { test } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { execFileSync } from 'node:child_process';
4
+ import { join } from 'node:path';
5
+ import { py, stage } from './helpers.mjs';
6
+
7
+ const READ = 'import sys, zipfile; z = zipfile.ZipFile(sys.argv[1]); print("\\n".join(z.namelist())); print("@@"); print(z.read("word/document.xml").decode())';
8
+
9
+ function built(mutate) {
10
+ const dir = stage(mutate);
11
+ const out = join(dir, 'draft-scope.docx');
12
+ const r = py('build_docx.py', ['--draft', join(dir, 'draft.json'), '--out', out]);
13
+ assert.equal(r.code, 0, r.err);
14
+ const [names, xml] = execFileSync('python3', ['-c', READ, out], { encoding: 'utf8' }).split('@@\n');
15
+ return { names: names.trim().split('\n'), xml, text: xml.replace(/<[^>]+>/g, ' ').replace(/\s+/g, ' ') };
16
+ }
17
+
18
+ test('the package holds the Word parts, content types first', () => {
19
+ const { names } = built();
20
+ assert.equal(names[0], '[Content_Types].xml');
21
+ for (const p of ['_rels/.rels', 'word/document.xml', 'word/_rels/document.xml.rels', 'word/styles.xml', 'word/numbering.xml']) {
22
+ assert.ok(names.includes(p), p);
23
+ }
24
+ });
25
+
26
+ test('sections come in the document order of the spec', () => {
27
+ const { text } = built();
28
+ const order = ['Riverside Bakery — Scope draft', 'Sources', 'Problems we heard', 'Scope', 'Exclusions',
29
+ 'System 1: Orders', 'System 2: Stock', 'Assumptions', 'Questions for the client'];
30
+ let at = -1;
31
+ for (const h of order) {
32
+ const i = text.indexOf(h, at + 1);
33
+ assert.ok(i > at, `${h} missing or out of order`);
34
+ at = i;
35
+ }
36
+ });
37
+
38
+ test('step lines are table boxes', () => {
39
+ const { text, xml } = built();
40
+ assert.match(text, /Main workflow Order In → Bake → Pack → Courier Handoff/);
41
+ assert.match(text, /Custom cake: starts at Order In, rejoins at Bake, ~30% of orders Quote → Confirm Design/);
42
+ assert.equal((xml.match(/<w:tcBorders>/g) ?? []).length, 6, 'one bordered cell per step');
43
+ const long = built((d) => {
44
+ d.systems[0].workflows = [{ kind: 'side', steps: ['A1', 'B2', 'C3', 'D4', 'E5', 'F6', 'G7'], returnsTo: 'Order In', source: 'C1' }];
45
+ });
46
+ assert.match(long.text, /Side path, back to Order In A1 → B2 → C3 → D4 → E5 F6 → G7/);
47
+ const flow = long.xml.split('Side path, back to Order In')[1].split('</w:tbl>')[0];
48
+ assert.equal((flow.match(/<w:cantSplit\/>/g) ?? []).length, 2, '7 steps wrap onto 2 rows');
49
+ });
50
+
51
+ test('tables carry their columns and rows', () => {
52
+ const { text } = built();
53
+ assert.match(text, /Feature What it does From Order board Shows every order/);
54
+ assert.match(text, /Exclusion Reason From Delivery routes Owned by someone else C1/);
55
+ assert.match(text, /Question Why it matters If no answer, assume About Last time you ran out of flour/);
56
+ assert.match(text, /"Last month we ran out twice on a Saturday and had to close the cake counter by noon\." \(E1\)/);
57
+ });
58
+
59
+ test('empty sections say None', () => {
60
+ const { text } = built((d) => { d.scope.exclusions = []; d.assumptions = []; d.systems[1].features = []; });
61
+ assert.match(text, /Exclusions None\./);
62
+ assert.match(text, /System 2: Stock Keeps flour on hand for weekend baking; closes P1 None\./);
63
+ assert.match(text, /Assumptions None\./);
64
+ });
65
+
66
+ test('special characters are escaped', () => {
67
+ const { xml } = built((d) => { d.client = 'Bread & <Butter>\u0001'; });
68
+ assert.match(xml, /Bread &amp; &lt;Butter&gt; — Scope draft/);
69
+ assert.doesNotMatch(xml, /\u0001/);
70
+ });
71
+
72
+ test('wrong arguments print usage and exit 2', () => {
73
+ const r = py('build_docx.py', ['--draft']);
74
+ assert.equal(r.code, 2);
75
+ assert.match(r.err, /usage: build_docx\.py --draft <draft\.json> --out <draft-scope\.docx>/);
76
+ });
@@ -0,0 +1,131 @@
1
+ import { test } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { rmSync, writeFileSync } from 'node:fs';
4
+ import { join } from 'node:path';
5
+ import { check, stage } from './helpers.mjs';
6
+
7
+ const quote = (d) => d.problems[1].quotes[0];
8
+
9
+ test('a reworded quote is reported with the closest source sentence', () => {
10
+ const r = check(stage((d) => { quote(d).text = 'When a ticket is lost the customer calls us.'; }));
11
+ assert.equal(r.code, 1);
12
+ assert.match(r.err, /^problems\[1\]\.quotes\[0\]: not word for word in C1; closest: "Dana: When a ticket gets lost the customer calls us and we have no idea where the cake is\."$/m);
13
+ });
14
+
15
+ test('normalised quotes match: line breaks, extra spaces, part of a sentence', () => {
16
+ const r = check(stage((d) => {
17
+ quote(d).text = 'When a ticket gets lost the customer\ncalls us and we have no idea where the cake is.';
18
+ d.problems[0].quotes[0].text = 'Last month we ran out twice on a Saturday';
19
+ }));
20
+ assert.equal(r.code, 0, r.err);
21
+ const c = check(stage((d) => { quote(d).text = 'the customer calls us'; }));
22
+ assert.equal(c.code, 0, c.err);
23
+ });
24
+
25
+ test('a missing source file is reported once', () => {
26
+ const dir = stage();
27
+ rmSync(join(dir, 'sources', 'C1.txt'));
28
+ const r = check(dir);
29
+ assert.equal(r.code, 1);
30
+ assert.match(r.err, /^sources: C1 file sources\/C1\.txt not found$/m);
31
+ });
32
+
33
+ test('a problem no feature or question points at is reported', () => {
34
+ const r = check(stage((d) => {
35
+ d.problems.push({ id: 'P3', text: 'We cannot see which cakes are custom', quotes: [{ source: 'C1', text: 'About 30% of orders are custom cakes.' }] });
36
+ }));
37
+ assert.equal(r.code, 1);
38
+ assert.match(r.err, /^P3: no feature or client question points at it$/m);
39
+ });
40
+
41
+ test('a client question alone covers a problem', () => {
42
+ const r = check(stage((d) => {
43
+ d.problems.push({ id: 'P3', text: 'We cannot see which cakes are custom', quotes: [{ source: 'C1', text: 'About 30% of orders are custom cakes.' }] });
44
+ d.questions.push({ text: 'Last time a custom cake was late, where did it wait?', why: 'Shapes the custom-cake steps', assume: 'Same steps as other orders', refs: ['P3'] });
45
+ }));
46
+ assert.equal(r.code, 0, r.err);
47
+ });
48
+
49
+ test('limits: 7 problems, 9 assumptions, a 6-word step, 1- and 7-word feature names', () => {
50
+ const r = check(stage((d) => {
51
+ for (let n = 3; n <= 7; n++) d.problems.push({ id: `P${n}`, text: 'x', quotes: [quote(d)] });
52
+ d.questions[0].refs = d.problems.map((p) => p.id);
53
+ d.assumptions = Array.from({ length: 9 }, () => d.assumptions[0]);
54
+ d.systems[0].workflows[0].steps[0] = 'Take the order in from WhatsApp';
55
+ d.systems[0].features[0].name = 'Board';
56
+ d.systems[1].features[0].name = 'Alert for flour when it drops low';
57
+ }));
58
+ assert.equal(r.code, 1);
59
+ assert.match(r.err, /^problems: 7, at most 6$/m);
60
+ assert.match(r.err, /^assumptions: 9, at most 8$/m);
61
+ assert.match(r.err, /^systems\[0\]\.workflows\[0\]: step "Take the order in from WhatsApp" has 6 words, at most 5$/m);
62
+ assert.match(r.err, /^systems\[0\]\.features\[0\]: name "Board" has 1 words, 2 to 6$/m);
63
+ assert.match(r.err, /^systems\[1\]\.features\[0\]: name "Alert for flour when it drops low" has 7 words, 2 to 6$/m);
64
+ });
65
+
66
+ test('no problems at all is reported', () => {
67
+ const r = check(stage((d) => { d.problems = []; d.systems.forEach((s) => { s.problem = 'P1'; s.features = []; }); d.assumptions = []; d.questions = []; }));
68
+ assert.equal(r.code, 1);
69
+ assert.match(r.err, /^problems: 0, at least 1$/m);
70
+ });
71
+
72
+ test('a banned word outside quotes is reported with its place', () => {
73
+ const r = check(stage((d) => {
74
+ d.systems[0].purpose = 'A seamless way to track orders; closes P2';
75
+ d.questions[0].assume = 'Some bags left';
76
+ }));
77
+ assert.equal(r.code, 1);
78
+ assert.match(r.err, /^systems\[0\]\.purpose: vague word "seamless"$/m);
79
+ assert.match(r.err, /^questions\[0\]\.assume: vague word "some"$/m);
80
+ });
81
+
82
+ test('vague word inside quotes is allowed', () => {
83
+ const r = check(stage((d) => {
84
+ d.questions[0].text = 'You wrote "deliveries must be fast": by what time of day?';
85
+ d.questions[0].why = 'Sets the promise in “quick” terms';
86
+ }));
87
+ assert.equal(r.code, 0, r.err);
88
+ });
89
+
90
+ test('banned words match whole words only', () => {
91
+ const r = check(stage((d) => { d.systems[1].purpose = 'Keeps flour on hand for breakfast baking; closes P1'; }));
92
+ assert.equal(r.code, 0, r.err);
93
+ });
94
+
95
+ function withNote(text, quotes) {
96
+ const dir = stage((d) => {
97
+ d.sources.push({ id: 'N1', kind: 'note', date: '2026-09-12', who: 'Dana Lee — reply', file: 'sources/N1.txt' });
98
+ d.problems[0].quotes.push(...quotes.map((q) => ({ source: 'N1', text: q })));
99
+ });
100
+ writeFileSync(join(dir, 'sources', 'N1.txt'), text);
101
+ return check(dir);
102
+ }
103
+
104
+ test('reply markers, dashes, case and wrapping quote marks still match', () => {
105
+ const r = withNote('Hi,\n> We need the orders\n> to arrive by 9am.\nThe oven broke — again.\n',
106
+ ['we need the orders to arrive by 9am', '“the oven broke - again”']);
107
+ assert.equal(r.code, 0, r.err);
108
+ });
109
+
110
+ test('a quote hint never carries a reply marker', () => {
111
+ const r = withNote('Hi,\n> We need the orders to arrive by 9am.\n', ['we need lorries by 9am']);
112
+ assert.equal(r.code, 1);
113
+ assert.match(r.err, /closest: "We need the orders to arrive by 9am\."$/m);
114
+ });
115
+
116
+ test('a vague word in single quotes is allowed, an apostrophe is not a quote', () => {
117
+ const ok = check(stage((d) => {
118
+ d.questions[0].text = "You wrote 'fast': by what time of day?";
119
+ d.questions[0].why = 'Sets the ‘quick’ promise';
120
+ }));
121
+ assert.equal(ok.code, 0, ok.err);
122
+ const bad = check(stage((d) => { d.questions[0].assume = "Dana's cakes go out fast"; }));
123
+ assert.match(bad.err, /^questions\[0\]\.assume: vague word "fast"$/m);
124
+ });
125
+
126
+ test('a workflow with no steps and a problem with no quote are reported', () => {
127
+ const r = check(stage((d) => { d.systems[0].workflows[0].steps = []; d.problems[1].quotes = []; }));
128
+ assert.equal(r.code, 1);
129
+ assert.match(r.err, /^systems\[0\]\.workflows\[0\]: no steps$/m);
130
+ assert.match(r.err, /^P2: no quote$/m);
131
+ });
@@ -0,0 +1,70 @@
1
+ import { test } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { writeFileSync } from 'node:fs';
4
+ import { join } from 'node:path';
5
+ import { check, py, stage } from './helpers.mjs';
6
+
7
+ test('the pass fixture is clean', () => {
8
+ const r = check(stage());
9
+ assert.equal(r.code, 0, r.err);
10
+ assert.match(r.out, /^draft clean$/m);
11
+ });
12
+
13
+ test('wrong arguments print usage and exit 2', () => {
14
+ const r = py('check.py', ['--nope']);
15
+ assert.equal(r.code, 2);
16
+ assert.match(r.err, /usage: check\.py --draft <draft\.json>/);
17
+ });
18
+
19
+ test('a file that is not JSON exits 1', () => {
20
+ const dir = stage();
21
+ writeFileSync(join(dir, 'draft.json'), '{ nope');
22
+ const r = check(dir);
23
+ assert.equal(r.code, 1);
24
+ assert.match(r.err, /draft\.json: /);
25
+ });
26
+
27
+ test('missing or mistyped fields are named with their place', () => {
28
+ const r = check(stage((d) => { delete d.client; }));
29
+ assert.equal(r.code, 1);
30
+ assert.match(r.err, /^draft: client missing or not str$/m);
31
+ const f = check(stage((d) => { delete d.systems[0].features[0].does; }));
32
+ assert.match(f.err, /^systems\[0\]\.features\[0\]: does missing or not str$/m);
33
+ const q = check(stage((d) => { d.questions[0].refs = 'P1'; }));
34
+ assert.match(q.err, /^questions\[0\]: refs missing or not list$/m);
35
+ });
36
+
37
+ test('ids and kinds outside their lists are reported', () => {
38
+ const r = check(stage((d) => {
39
+ d.sources[0].kind = 'fax';
40
+ d.problems[0].id = 'Problem1';
41
+ d.systems[0].workflows[0].kind = 'loop';
42
+ d.scope.exclusions[0].reason = 'nope';
43
+ }));
44
+ assert.equal(r.code, 1);
45
+ assert.match(r.err, /^sources: E1 kind fax is not email, call or note$/m);
46
+ assert.match(r.err, /^problems: bad id Problem1$/m);
47
+ assert.match(r.err, /^systems\[0\]\.workflows\[0\]: kind loop is not main, side or sub$/m);
48
+ assert.match(r.err, /^scope\.exclusions\[0\]: reason nope is not owned-elsewhere, later-phase or no-detail$/m);
49
+ });
50
+
51
+ test('references to unknown sources, problems and features are reported', () => {
52
+ const r = check(stage((d) => {
53
+ d.systems[0].features[0].source = 'E9';
54
+ d.systems[1].problem = 'P7';
55
+ d.assumptions[0].feature = 'Nope';
56
+ d.questions[0].refs = ['P1', 'X3'];
57
+ }));
58
+ assert.equal(r.code, 1);
59
+ assert.match(r.err, /^systems\[0\]\.features\[0\]: unknown source E9$/m);
60
+ assert.match(r.err, /^systems\[1\]: unknown problem P7$/m);
61
+ assert.match(r.err, /^assumptions\[0\]: unknown feature Nope$/m);
62
+ assert.match(r.err, /^questions\[0\]: unknown ref X3$/m);
63
+ });
64
+
65
+ test('duplicate source and problem ids are reported', () => {
66
+ const r = check(stage((d) => { d.sources[1].id = 'E1'; d.problems[1].id = 'P1'; }));
67
+ assert.equal(r.code, 1);
68
+ assert.match(r.err, /^sources: duplicate id E1$/m);
69
+ assert.match(r.err, /^problems: duplicate id P1$/m);
70
+ });
@@ -0,0 +1,40 @@
1
+ {
2
+ "client": "Riverside Bakery",
3
+ "date": "2026-10-08",
4
+ "sources": [
5
+ { "id": "E1", "kind": "email", "date": "2026-09-02", "who": "Dana Lee — Running out of flour", "file": "sources/E1.txt" },
6
+ { "id": "C1", "kind": "call", "date": "2026-09-10", "who": "Dana Lee (owner)", "file": "sources/C1.txt" }
7
+ ],
8
+ "problems": [
9
+ { "id": "P1", "text": "We run out of flour before we notice",
10
+ "quotes": [{ "source": "E1", "text": "Last month we ran out twice on a Saturday and had to close the cake counter by noon." }] },
11
+ { "id": "P2", "text": "We lose track of an order once its paper ticket is gone",
12
+ "quotes": [{ "source": "C1", "text": "When a ticket gets lost the customer calls us and we have no idea where the cake is." }] }
13
+ ],
14
+ "scope": {
15
+ "covered": "Order tracking from the WhatsApp order to the courier handoff, and flour stock.",
16
+ "exclusions": [{ "text": "Delivery routes", "reason": "owned-elsewhere", "source": "C1" }]
17
+ },
18
+ "systems": [
19
+ { "name": "Orders", "purpose": "Tracks each order from WhatsApp to the courier handoff; closes P2", "problem": "P2",
20
+ "workflows": [
21
+ { "kind": "main", "steps": ["Order In", "Bake", "Pack", "Courier Handoff"], "source": "C1" },
22
+ { "kind": "sub", "name": "Custom cake", "steps": ["Quote", "Confirm Design"],
23
+ "startsAt": "Order In", "rejoinsAt": "Bake", "share": "~30% of orders", "source": "C1" }
24
+ ],
25
+ "features": [
26
+ { "name": "Order board", "does": "Shows every order and its stage, so staff answer a customer's call without searching paper tickets", "problem": "P2", "source": "C1" }
27
+ ] },
28
+ { "name": "Stock", "purpose": "Keeps flour on hand for weekend baking; closes P1", "problem": "P1",
29
+ "workflows": [],
30
+ "features": [
31
+ { "name": "Low-flour alert", "does": "Warns the owner when flour drops below a set level, before a Saturday runs out", "problem": "P1", "source": "E1" }
32
+ ] }
33
+ ],
34
+ "assumptions": [
35
+ { "text": "Orders keep arriving by WhatsApp; staff copy each one onto the board", "feature": "Order board", "source": "C1" }
36
+ ],
37
+ "questions": [
38
+ { "text": "Last time you ran out of flour, how much was left the day before?", "why": "Sets the alert level", "assume": "Alert at 2 bags", "refs": ["P1", "E1"] }
39
+ ]
40
+ }
@@ -0,0 +1,7 @@
1
+ Call 2026-09-10 · Dana Lee (owner), Sam (our PO)
2
+
3
+ Dana: Orders come in by WhatsApp, that stays. About 30% of orders are custom cakes.
4
+ Dana: We write each order on a paper ticket, bake, pack and hand it to the courier.
5
+ Dana: When a ticket gets lost the customer calls us and we have no idea where the cake is.
6
+ Sam: Who plans the delivery routes?
7
+ Dana: The courier company handles routes, not us.
@@ -0,0 +1,5 @@
1
+ From: Dana Lee, owner, Riverside Bakery
2
+ Date: 2026-09-02
3
+ Subject: Running out of flour
4
+
5
+ Hi, can you build us an app so we stop running out of flour? Last month we ran out twice on a Saturday and had to close the cake counter by noon.
@@ -0,0 +1,39 @@
1
+ import { test } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { readdirSync, readFileSync } from 'node:fs';
4
+ import { fileURLToPath } from 'node:url';
5
+
6
+ const dir = fileURLToPath(new URL('..', import.meta.url));
7
+ const files = readdirSync(dir).filter((f) => f.endsWith('.py'));
8
+
9
+ // A function runs from its `def` line to the next top-level line.
10
+ function functions(src) {
11
+ const lines = src.split('\n');
12
+ const out = [];
13
+ lines.forEach((l, i) => {
14
+ const m = /^def (\w+)\(([^)]*)\)/.exec(l);
15
+ if (!m) return;
16
+ let end = i + 1;
17
+ while (end < lines.length && (lines[end] === '' || /^\s/.test(lines[end]))) end += 1;
18
+ while (lines[end - 1] === '') end -= 1;
19
+ out.push({ name: m[1], params: m[2].split(',').filter((p) => p.trim()).length, lines: end - i });
20
+ });
21
+ return out;
22
+ }
23
+
24
+ test('there are Python scripts to gate', () => {
25
+ assert.ok(files.length >= 8, files.join(', '));
26
+ });
27
+
28
+ for (const f of files) {
29
+ test(`gates: ${f}`, () => {
30
+ const src = readFileSync(dir + f, 'utf8');
31
+ const fns = functions(src);
32
+ assert.ok(src.split('\n').length <= 200, `${f}: over 200 lines`);
33
+ assert.ok(fns.length <= 10, `${f}: ${fns.length} functions`);
34
+ for (const fn of fns) {
35
+ assert.ok(fn.lines <= 20, `${f} ${fn.name}: ${fn.lines} lines`);
36
+ assert.ok(fn.params <= 3, `${f} ${fn.name}: ${fn.params} params`);
37
+ }
38
+ });
39
+ }
@@ -0,0 +1,30 @@
1
+ // Runs the draft-scope Python scripts and stages a draft with its sources.
2
+ import { execFileSync } from 'node:child_process';
3
+ import { cpSync, mkdtempSync, readFileSync, writeFileSync } from 'node:fs';
4
+ import { tmpdir } from 'node:os';
5
+ import { join } from 'node:path';
6
+ import { fileURLToPath } from 'node:url';
7
+
8
+ const scripts = fileURLToPath(new URL('..', import.meta.url));
9
+ const fixtures = fileURLToPath(new URL('./fixtures', import.meta.url));
10
+
11
+ export function py(script, args) {
12
+ try {
13
+ const out = execFileSync('python3', [join(scripts, script), ...args], { encoding: 'utf8', stdio: 'pipe' });
14
+ return { code: 0, out, err: '' };
15
+ } catch (e) {
16
+ return { code: e.status, out: e.stdout ?? '', err: e.stderr ?? '' };
17
+ }
18
+ }
19
+
20
+ // A temp folder holding draft.json (the pass fixture, changed by mutate) and sources/.
21
+ export function stage(mutate) {
22
+ const dir = mkdtempSync(join(tmpdir(), 'draft-scope-'));
23
+ cpSync(join(fixtures, 'sources'), join(dir, 'sources'), { recursive: true });
24
+ const draft = JSON.parse(readFileSync(join(fixtures, 'draft-pass.json'), 'utf8'));
25
+ if (mutate) mutate(draft);
26
+ writeFileSync(join(dir, 'draft.json'), JSON.stringify(draft, null, 2));
27
+ return dir;
28
+ }
29
+
30
+ export const check = (dir) => py('check.py', ['--draft', join(dir, 'draft.json')]);
@@ -0,0 +1,59 @@
1
+ import { test } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { existsSync, readFileSync } from 'node:fs';
4
+ import { fileURLToPath } from 'node:url';
5
+
6
+ const at = (rel) => fileURLToPath(new URL(`../../${rel}`, import.meta.url));
7
+ const skill = () => readFileSync(at('SKILL.md'), 'utf8');
8
+ const FILES = ['steps/discover.md', 'steps/draft.md', 'steps/assumptions.md', 'steps/check.md',
9
+ 'references/rules.md', 'references/draft-schema.md', 'references/credits.md'];
10
+
11
+ test('SKILL.md front matter names the skill and its trigger', () => {
12
+ const head = skill().split('---')[1];
13
+ assert.match(head, /^name: draft-scope$/m);
14
+ assert.match(head, /^description: .*emails.*call transcripts.*DOCX.*business-analyst/m);
15
+ });
16
+
17
+ test('SKILL.md points at every step and reference file, and each exists', () => {
18
+ for (const f of FILES) {
19
+ assert.ok(skill().includes(f), `SKILL.md does not mention ${f}`);
20
+ assert.ok(existsSync(at(f)), `${f} missing`);
21
+ }
22
+ });
23
+
24
+ test('SKILL.md names both script commands', () => {
25
+ assert.match(skill(), /python3 scripts\/check\.py --draft /);
26
+ assert.match(skill(), /python3 scripts\/build_docx\.py --draft .* --out /);
27
+ });
28
+
29
+ test('credits name the borrowed repo and its licence', () => {
30
+ const credits = readFileSync(at('references/credits.md'), 'utf8');
31
+ assert.match(credits, /phuryn\/pm-skills/);
32
+ assert.match(credits, /MIT/);
33
+ });
34
+
35
+ test('the skill reads nothing from the business-analyst skill', () => {
36
+ for (const f of ['SKILL.md', ...FILES]) {
37
+ assert.doesNotMatch(readFileSync(at(f), 'utf8'), /skills\/business-analyst\//, f);
38
+ }
39
+ });
40
+
41
+ test('discover note follows the summarize-interview template', () => {
42
+ const note = readFileSync(at('steps/discover.md'), 'utf8');
43
+ const labels = ['**Current Solution**:', '**What They Like About Current Solution**:',
44
+ '**Problems With Current Solution**:', '**Key Insights**:', '**Action Items**:', '**Open points**:'];
45
+ let at0 = -1;
46
+ for (const l of labels) {
47
+ const i = note.indexOf(l);
48
+ assert.ok(i > at0, `${l} missing or out of order`);
49
+ at0 = i;
50
+ }
51
+ assert.doesNotMatch(note, /^Quotes:/m);
52
+ assert.match(note, /plain Markdown, the shape above without the surrounding code fence/);
53
+ });
54
+
55
+ test('skipped small talk is never mentioned, not even as skipped', () => {
56
+ for (const f of ['steps/discover.md', 'steps/check.md']) {
57
+ assert.match(readFileSync(at(f), 'utf8'), /never\s+mention\s+what\s+you\s+skipped/i, f);
58
+ }
59
+ });