@v11g/agents-rock 1.0.8 → 1.0.10

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 (314) hide show
  1. package/README.md +2 -1
  2. package/package.json +2 -2
  3. package/plugins/business-analyst/.claude-plugin/plugin.json +1 -1
  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/skills/business-analyst/README.md +8 -0
  20. package/plugins/business-analyst/skills/business-analyst/SKILL.md +47 -16
  21. package/plugins/business-analyst/skills/business-analyst/assets/review-page.html +68 -0
  22. package/plugins/business-analyst/skills/business-analyst/evals/evals.json +1 -1
  23. package/plugins/business-analyst/skills/business-analyst/references/frameworks.md +3 -2
  24. package/plugins/business-analyst/skills/business-analyst/references/interview.md +156 -8
  25. package/plugins/business-analyst/skills/business-analyst/references/review.md +18 -4
  26. package/plugins/business-analyst/skills/business-analyst/references/writing.md +49 -8
  27. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_data.cpython-312.pyc +0 -0
  28. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_layout.cpython-312.pyc +0 -0
  29. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_page.cpython-312.pyc +0 -0
  30. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_checks.cpython-312.pyc +0 -0
  31. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_render.cpython-312.pyc +0 -0
  32. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/validate.cpython-312.pyc +0 -0
  33. package/plugins/business-analyst/skills/business-analyst/scripts/lib/checks.mjs +12 -6
  34. package/plugins/business-analyst/skills/business-analyst/scripts/lib/review-data.mjs +66 -0
  35. package/plugins/business-analyst/skills/business-analyst/scripts/lib/review-layout.mjs +53 -0
  36. package/plugins/business-analyst/skills/business-analyst/scripts/lib/review-page.mjs +78 -0
  37. package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-checks.mjs +73 -0
  38. package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-md.mjs +53 -0
  39. package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-render.mjs +72 -0
  40. package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-rules.mjs +90 -0
  41. package/plugins/business-analyst/skills/business-analyst/scripts/review.mjs +48 -0
  42. package/plugins/business-analyst/skills/business-analyst/scripts/review.py +60 -0
  43. package/plugins/business-analyst/skills/business-analyst/scripts/review_data.py +81 -0
  44. package/plugins/business-analyst/skills/business-analyst/scripts/review_layout.py +50 -0
  45. package/plugins/business-analyst/skills/business-analyst/scripts/review_page.py +115 -0
  46. package/plugins/business-analyst/skills/business-analyst/scripts/scope.mjs +24 -0
  47. package/plugins/business-analyst/skills/business-analyst/scripts/scope.py +35 -0
  48. package/plugins/business-analyst/skills/business-analyst/scripts/scope_checks.py +168 -0
  49. package/plugins/business-analyst/skills/business-analyst/scripts/scope_render.py +140 -0
  50. package/plugins/business-analyst/skills/business-analyst/scripts/test/checks.test.mjs +27 -0
  51. package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-workflow-pass.json +78 -0
  52. package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-workflow-pass.md +136 -0
  53. package/plugins/business-analyst/skills/business-analyst/scripts/test/python-parity.test.mjs +88 -0
  54. package/plugins/business-analyst/skills/business-analyst/scripts/test/quality-gates.test.mjs +26 -0
  55. package/plugins/business-analyst/skills/business-analyst/scripts/test/review-browser.test.mjs +106 -0
  56. package/plugins/business-analyst/skills/business-analyst/scripts/test/review-fixture.mjs +32 -0
  57. package/plugins/business-analyst/skills/business-analyst/scripts/test/review-page.test.mjs +340 -0
  58. package/plugins/business-analyst/skills/business-analyst/scripts/test/review-parity.test.mjs +79 -0
  59. package/plugins/business-analyst/skills/business-analyst/scripts/test/scope-cases.mjs +58 -0
  60. package/plugins/business-analyst/skills/business-analyst/scripts/test/scope-checks.test.mjs +31 -0
  61. package/plugins/business-analyst/skills/business-analyst/scripts/test/scope-md.test.mjs +140 -0
  62. package/plugins/business-analyst/skills/business-analyst/scripts/validate.mjs +1 -1
  63. package/plugins/business-analyst/skills/business-analyst/scripts/validate.py +17 -8
  64. package/plugins/reasoning/.claude-plugin/plugin.json +1 -1
  65. package/plugins/reasoning/evals/format-handoff-folder/graders/folder-named.md +8 -0
  66. package/plugins/reasoning/evals/format-handoff-folder/graders/skill-fired.md +7 -0
  67. package/plugins/reasoning/evals/format-handoff-folder/prompt.md +9 -0
  68. package/plugins/reasoning/evals/format-ids-and-supports/graders/ids-in-chat.md +8 -0
  69. package/plugins/reasoning/evals/format-ids-and-supports/graders/skill-fired.md +7 -0
  70. package/plugins/reasoning/evals/format-ids-and-supports/graders/supports-resolve.md +11 -0
  71. package/plugins/reasoning/evals/format-ids-and-supports/prompt.md +8 -0
  72. package/plugins/reasoning/evals/format-root-candidate-status/graders/candidate-status.md +11 -0
  73. package/plugins/reasoning/evals/format-root-candidate-status/graders/skill-fired.md +7 -0
  74. package/plugins/reasoning/evals/format-root-candidate-status/prompt.md +8 -0
  75. package/plugins/reasoning/evals/format-unsaved-continues/graders/analysis-completes.md +9 -0
  76. package/plugins/reasoning/evals/format-unsaved-continues/graders/not-saved-stated.md +9 -0
  77. package/plugins/reasoning/evals/format-unsaved-continues/graders/skill-fired.md +7 -0
  78. package/plugins/reasoning/evals/format-unsaved-continues/prompt.md +8 -0
  79. package/plugins/reasoning/skills/problem-router/README.md +6 -0
  80. package/plugins/reasoning/skills/problem-router/SKILL.md +4 -0
  81. package/plugins/reasoning/skills/problem-router/references/contract.md +114 -19
  82. package/plugins/reasoning/skills/problem-solving/README.md +6 -0
  83. package/plugins/reasoning/skills/problem-solving/SKILL.md +2 -0
  84. package/plugins/reasoning/skills/problem-solving/references/contract.md +114 -19
  85. package/plugins/reasoning/skills/problem-solving/references/interview.md +2 -0
  86. package/plugins/reasoning/skills/systemic-design/README.md +3 -0
  87. package/plugins/reasoning/skills/systemic-design/SKILL.md +2 -0
  88. package/plugins/reasoning/skills/systemic-design/references/contract.md +114 -19
  89. package/plugins/reasoning/skills/systemic-design/references/interview.md +2 -0
  90. package/plugins/reasoning/skills/systems-thinking/README.md +3 -0
  91. package/plugins/reasoning/skills/systems-thinking/SKILL.md +2 -0
  92. package/plugins/reasoning/skills/systems-thinking/frameworks/leverage-points.md +15 -6
  93. package/plugins/reasoning/skills/systems-thinking/references/contract.md +114 -19
  94. package/plugins/reasoning/skills/systems-thinking/references/interview.md +2 -0
  95. package/plugins/solution-architect/.claude-plugin/plugin.json +1 -1
  96. package/plugins/solution-architect/evals/proposal-workflow/case.yaml +6 -0
  97. package/plugins/solution-architect/evals/proposal-workflow/fixture.sh +6 -0
  98. package/plugins/solution-architect/evals/proposal-workflow/graders/inputs-written.md +23 -0
  99. package/plugins/solution-architect/evals/proposal-workflow/graders/no-proposal-md.md +7 -0
  100. package/plugins/solution-architect/evals/proposal-workflow/graders/skill-fired.md +7 -0
  101. package/plugins/solution-architect/evals/proposal-workflow/graders/validate-then-render.md +16 -0
  102. package/plugins/solution-architect/evals/proposal-workflow/prompt.md +10 -0
  103. package/plugins/solution-architect/evals/workflow-gate-no-architecture/case.yaml +4 -0
  104. package/plugins/solution-architect/evals/workflow-gate-no-architecture/fixture.sh +6 -0
  105. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/no-classic-fallback.md +10 -0
  106. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/nothing-written.md +7 -0
  107. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/skill-fired.md +7 -0
  108. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/stops-at-gate.md +11 -0
  109. package/plugins/solution-architect/evals/workflow-gate-no-architecture/prompt.md +7 -0
  110. package/plugins/solution-architect/evals/workflow-happy-path/case.yaml +4 -0
  111. package/plugins/solution-architect/evals/workflow-happy-path/fixture.sh +6 -0
  112. package/plugins/solution-architect/evals/workflow-happy-path/graders/no-estimation-md.md +7 -0
  113. package/plugins/solution-architect/evals/workflow-happy-path/graders/pages-or-stop.md +16 -0
  114. package/plugins/solution-architect/evals/workflow-happy-path/graders/routed-to-workflow.md +12 -0
  115. package/plugins/solution-architect/evals/workflow-happy-path/graders/skill-fired.md +7 -0
  116. package/plugins/solution-architect/evals/workflow-happy-path/graders/three-questions-max.md +14 -0
  117. package/plugins/solution-architect/evals/workflow-happy-path/graders/workflow-or-exact-stop.md +15 -0
  118. package/plugins/solution-architect/evals/workflow-happy-path/prompt.md +9 -0
  119. package/plugins/solution-architect/skills/analyze-requirements/assets/viewer-template.html +11 -1
  120. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/cdp.mjs +4 -1
  121. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/quality-gate.mjs +16 -1
  122. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/browser.test.mjs +27 -0
  123. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/quality-gate.test.mjs +9 -0
  124. package/plugins/solution-architect/skills/estimate/README.md +38 -18
  125. package/plugins/solution-architect/skills/estimate/SKILL.md +16 -69
  126. package/plugins/solution-architect/skills/estimate/classic/FLOW.md +77 -0
  127. package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/estimate-template-agentic.html +111 -138
  128. package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/estimate-template.html +219 -445
  129. package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/scores-review-template.html +5 -4
  130. package/plugins/solution-architect/skills/estimate/{references → classic/references}/agentic-estimation.md +4 -2
  131. package/plugins/solution-architect/skills/estimate/classic/references/ai-multipliers.md +57 -0
  132. package/plugins/solution-architect/skills/estimate/{references → classic/references}/interview.md +56 -35
  133. package/plugins/solution-architect/skills/estimate/{references → classic/references}/scoring-guide.md +40 -4
  134. package/plugins/solution-architect/skills/estimate/{references → classic/references}/task-shapes.md +1 -1
  135. package/plugins/solution-architect/skills/estimate/{references → classic/references}/techniques.md +29 -21
  136. package/plugins/solution-architect/skills/estimate/{references → classic/references}/writing.md +77 -45
  137. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/compute.mjs +1 -1
  138. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/checks.mjs +38 -6
  139. package/plugins/solution-architect/skills/estimate/classic/scripts/lib/redact.mjs +112 -0
  140. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/roadmap.mjs +4 -5
  141. package/plugins/solution-architect/skills/estimate/classic/scripts/lib/rollup.mjs +129 -0
  142. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/schema.mjs +31 -38
  143. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-csv.mjs +3 -3
  144. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-html.mjs +3 -3
  145. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/render.mjs +9 -8
  146. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/score-review.mjs +3 -3
  147. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/baselines.test.mjs +3 -3
  148. package/plugins/solution-architect/skills/estimate/classic/scripts/test/browser-agentic.test.mjs +143 -0
  149. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/browser.test.mjs +211 -52
  150. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/compute.test.mjs +58 -33
  151. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/e2e.test.mjs +55 -3
  152. package/plugins/solution-architect/skills/estimate/classic/scripts/test/estimate-math.test.mjs +44 -0
  153. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-estimation-fail.md +0 -10
  154. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-estimation-pass.md +0 -10
  155. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-inputs.json +1 -7
  156. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/booking-inputs.json +11 -10
  157. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/estimation-fail.md +6 -0
  158. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/estimation-pass.md +17 -21
  159. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/measurements.test.mjs +1 -1
  160. package/plugins/solution-architect/skills/estimate/classic/scripts/test/pricing.test.mjs +88 -0
  161. package/plugins/solution-architect/skills/estimate/classic/scripts/test/project-price.test.mjs +93 -0
  162. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/quality-gates.test.mjs +7 -1
  163. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/references.test.mjs +88 -26
  164. package/plugins/solution-architect/skills/estimate/classic/scripts/test/render.test.mjs +405 -0
  165. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/schema.test.mjs +114 -61
  166. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/score-review.test.mjs +37 -4
  167. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/scoring.test.mjs +1 -1
  168. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/url-state.test.mjs +2 -2
  169. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/validate.test.mjs +104 -10
  170. package/plugins/solution-architect/skills/estimate/classic/scripts/test/xlsx-export.test.mjs +475 -0
  171. package/plugins/solution-architect/skills/estimate/classic/scripts/test/zip-store.test.mjs +26 -0
  172. package/plugins/solution-architect/skills/estimate/evals/evals.json +44 -9
  173. package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +28 -0
  174. package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.json +79 -0
  175. package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.md +141 -0
  176. package/plugins/solution-architect/skills/estimate/shared/assets/xlsx-export.js +336 -0
  177. package/plugins/solution-architect/skills/estimate/shared/lib/agentic-task-schema.mjs +24 -0
  178. package/plugins/solution-architect/skills/estimate/shared/lib/context-schema.mjs +35 -0
  179. package/plugins/solution-architect/skills/estimate/shared/lib/estimate-math.mjs +31 -0
  180. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/inline.mjs +13 -5
  181. package/plugins/solution-architect/skills/estimate/shared/lib/pricing.mjs +78 -0
  182. package/plugins/solution-architect/skills/estimate/shared/lib/project-price.mjs +96 -0
  183. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/scoring-schema.mjs +1 -1
  184. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/scoring.mjs +3 -3
  185. package/plugins/solution-architect/skills/estimate/shared/lib/zip.mjs +60 -0
  186. package/plugins/solution-architect/skills/estimate/workflow-based/FLOW.md +91 -0
  187. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-components.html +994 -0
  188. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-template.html +440 -0
  189. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimator-system.xlsx +0 -0
  190. package/plugins/solution-architect/skills/estimate/workflow-based/assets/score-review.html +838 -0
  191. package/plugins/solution-architect/skills/estimate/workflow-based/references/hidden-work-by-type.md +429 -0
  192. package/plugins/solution-architect/skills/estimate/workflow-based/references/linking.md +59 -0
  193. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-components-template.mjs +80 -0
  194. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-template.mjs +60 -0
  195. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-workflow-template.mjs +51 -0
  196. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-xlsx-template.py +144 -0
  197. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/compute.mjs +32 -0
  198. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-html.mjs +44 -0
  199. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-view.mjs +71 -0
  200. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/pair-findings.mjs +19 -0
  201. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/requirements.mjs +33 -0
  202. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/rollup.mjs +66 -0
  203. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/schema-components.mjs +69 -0
  204. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/schema.mjs +70 -0
  205. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/score-diff.mjs +54 -0
  206. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/score-html.mjs +52 -0
  207. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/xlsx-rows.mjs +51 -0
  208. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/render.mjs +42 -0
  209. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/score-review.mjs +46 -0
  210. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/arch-link.js +9 -0
  211. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/click.js +28 -0
  212. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/prelude.js +4 -0
  213. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/view.js +63 -0
  214. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/browser.test.mjs +127 -0
  215. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/build-pages.test.mjs +43 -0
  216. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/build-template.test.mjs +18 -0
  217. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/cli.test.mjs +48 -0
  218. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/estimator-system.test.mjs +66 -0
  219. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/ARCHITECTURE-mini.md +31 -0
  220. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/feedback.json +19 -0
  221. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/inputs-pass.json +80 -0
  222. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/measurements.jsonl +0 -0
  223. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/requirements.json +79 -0
  224. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/page-view.test.mjs +54 -0
  225. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/pages-browser.test.mjs +209 -0
  226. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/quality-gates.test.mjs +25 -0
  227. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/render.test.mjs +54 -0
  228. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/requirements.test.mjs +33 -0
  229. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/rollup.test.mjs +80 -0
  230. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/schema.test.mjs +61 -0
  231. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/score-review.test.mjs +108 -0
  232. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/stage.mjs +32 -0
  233. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/workflow-script.test.mjs +24 -0
  234. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs +58 -0
  235. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/validate.mjs +19 -0
  236. package/plugins/solution-architect/skills/new-lead/SKILL.md +4 -3
  237. package/plugins/solution-architect/skills/proposal/README.md +22 -7
  238. package/plugins/solution-architect/skills/proposal/SKILL.md +18 -7
  239. package/plugins/solution-architect/skills/proposal/assets/proposal-workflow.html +143 -0
  240. package/plugins/solution-architect/skills/proposal/evals/evals.json +29 -11
  241. package/plugins/solution-architect/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/ARCHITECTURE.md +65 -0
  242. package/plugins/solution-architect/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/brief.md +21 -0
  243. package/plugins/solution-architect/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/estimation-inputs.json +126 -0
  244. package/plugins/solution-architect/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/estimation.json +215 -0
  245. package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation-inputs.json +224 -34
  246. package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation.json +103 -114
  247. package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation.md +48 -22
  248. package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation-inputs.json +211 -33
  249. package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation.json +102 -117
  250. package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation.md +48 -25
  251. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +31 -0
  252. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation-inputs.json +468 -0
  253. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation.json +773 -0
  254. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/measurements.jsonl +0 -0
  255. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/requirements.json +79 -0
  256. package/plugins/solution-architect/skills/proposal/references/interview.md +3 -6
  257. package/plugins/solution-architect/skills/proposal/references/review.md +16 -4
  258. package/plugins/solution-architect/skills/proposal/references/workflow.md +88 -0
  259. package/plugins/solution-architect/skills/proposal/references/writing.md +33 -31
  260. package/plugins/solution-architect/skills/proposal/scripts/derive.mjs +1 -1
  261. package/plugins/solution-architect/skills/proposal/scripts/lib/checks-client.mjs +5 -22
  262. package/plugins/solution-architect/skills/proposal/scripts/lib/checks-doc.mjs +18 -8
  263. package/plugins/solution-architect/skills/proposal/scripts/lib/checks.mjs +6 -2
  264. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-body.mjs +42 -0
  265. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-package.mjs +56 -0
  266. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-xml.mjs +44 -0
  267. package/plugins/solution-architect/skills/proposal/scripts/lib/figures.mjs +24 -33
  268. package/plugins/solution-architect/skills/proposal/scripts/lib/sections.mjs +1 -1
  269. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-checks.mjs +71 -0
  270. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-cli.mjs +46 -0
  271. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-html.mjs +39 -0
  272. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-lead.mjs +45 -0
  273. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-page.mjs +30 -0
  274. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-view.mjs +80 -0
  275. package/plugins/solution-architect/skills/proposal/scripts/render.mjs +5 -1
  276. package/plugins/solution-architect/skills/proposal/scripts/test/checks-client.test.mjs +50 -47
  277. package/plugins/solution-architect/skills/proposal/scripts/test/checks-doc.test.mjs +99 -40
  278. package/plugins/solution-architect/skills/proposal/scripts/test/docs.test.mjs +11 -5
  279. package/plugins/solution-architect/skills/proposal/scripts/test/docx.test.mjs +68 -0
  280. package/plugins/solution-architect/skills/proposal/scripts/test/e2e.test.mjs +3 -3
  281. package/plugins/solution-architect/skills/proposal/scripts/test/evals-fixtures.test.mjs +46 -0
  282. package/plugins/solution-architect/skills/proposal/scripts/test/figures.test.mjs +67 -54
  283. package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-fail.md +6 -1
  284. package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-inputs-pass.json +17 -0
  285. package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-pass.md +8 -12
  286. package/plugins/solution-architect/skills/proposal/scripts/test/render.test.mjs +3 -3
  287. package/plugins/solution-architect/skills/proposal/scripts/test/validate.test.mjs +5 -4
  288. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-browser.test.mjs +96 -0
  289. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-checks.test.mjs +98 -0
  290. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-docs.test.mjs +25 -0
  291. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-render.test.mjs +75 -0
  292. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-stage.mjs +15 -0
  293. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-view.test.mjs +78 -0
  294. package/plugins/solution-architect/skills/proposal/scripts/validate.mjs +4 -1
  295. package/plugins/solution-architect/workflows/review-links.js +61 -0
  296. package/plugins/solution-architect/skills/estimate/references/ai-multipliers.md +0 -101
  297. package/plugins/solution-architect/skills/estimate/scripts/lib/estimate-math.mjs +0 -89
  298. package/plugins/solution-architect/skills/estimate/scripts/lib/redact.mjs +0 -64
  299. package/plugins/solution-architect/skills/estimate/scripts/lib/rollup.mjs +0 -154
  300. package/plugins/solution-architect/skills/estimate/scripts/lib/scenario-schema.mjs +0 -39
  301. package/plugins/solution-architect/skills/estimate/scripts/test/estimate-math.test.mjs +0 -131
  302. package/plugins/solution-architect/skills/estimate/scripts/test/render.test.mjs +0 -251
  303. package/plugins/solution-architect/skills/estimate/scripts/test/xlsx-export.test.mjs +0 -254
  304. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/slicing.md +0 -0
  305. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/agentic-checks.mjs +0 -0
  306. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/components.mjs +0 -0
  307. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/md-tables.mjs +0 -0
  308. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/scoring-checks.mjs +0 -0
  309. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/measurements.jsonl +0 -0
  310. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/zip.mjs +0 -0
  311. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/validate.mjs +0 -0
  312. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/baselines.mjs +0 -0
  313. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/measurements.mjs +0 -0
  314. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/score-diff.mjs +0 -0
@@ -17,6 +17,46 @@ framework that ran. Nothing else appears at the top level.
17
17
  An empty `evidence` list is a finding, not an omission: it means nothing
18
18
  in the input supports the analysis, and the output says so.
19
19
 
20
+ ## Ids and links
21
+
22
+ Every entry carries an `id`, unique within the run:
23
+
24
+ | Entry | Prefix |
25
+ | ----- | ------ |
26
+ | `evidence` | `e` — `e1`, `e2`, … |
27
+ | `assumptions` | `a` |
28
+ | `open_questions` | `q` |
29
+ | any item inside the framework block | `c` |
30
+
31
+ Number in order of first appearance. An entry keeps its id when the
32
+ result is re-run after an interview answer; a new entry takes the next
33
+ free number. Never reuse an id within a run.
34
+
35
+ Framework block items follow one rule, for every block:
36
+
37
+ - An item that is a string becomes `{id, text}`.
38
+ - A single-value field that holds a claim (`rca.symptom`, `pdca.metric`,
39
+ …) is an item too. The router block's `problem_class`,
40
+ `reasoning_skill`, `recommended_framework` and `confidence` stay plain
41
+ values — they are routing labels, not claims. A `null` stays `null`.
42
+ - An item that is an object (`{step, owner_role, when, signal}`,
43
+ `{from, to, assumption}`, …) gains `id` and keeps its fields.
44
+ - A field that refers to another item (`links.from`, `links.to`, the
45
+ entry an intervention targets, the element a leverage point sits on)
46
+ holds that item's id, not its text.
47
+ - A cause labelled `root` or `root_candidate` carries the label as
48
+ `status`.
49
+
50
+ Links:
51
+
52
+ - `evidence` and `assumptions` entries carry `supports: [ids]` — the `c`
53
+ items they back. An empty list is a finding: the entry backs nothing.
54
+ - `open_questions` entries carry `blocks: [ids]` — the `c` items the
55
+ question holds back.
56
+
57
+ "Name the `evidence` entry that ties this cause to the symptom" is
58
+ answered by an id in that entry's `supports`.
59
+
20
60
  ## Framework blocks
21
61
 
22
62
  | Block | Fields |
@@ -65,43 +105,98 @@ evidence.
65
105
 
66
106
  ## Rendering
67
107
 
68
- In chat by default: markdown headings, one per core field, then the
69
- framework block.
108
+ In chat: markdown headings, one per core field, then the framework block.
109
+ Each entry's id renders as a tag after it — `[e1]`, `[c4]` — so the human
110
+ can refer to it. Its `supports` or `blocks` list renders right after the
111
+ tag as `-> [c1, c2]`; an empty list renders as `-> []`, never as prose in
112
+ its place.
70
113
 
71
114
  A structure containing a cycle gets a diagram; one without gets prose.
72
115
  Prose renders a cycle as a list, and a list loses the closure — `A -> B ->
73
116
  C -> A` read top to bottom does not show that it comes back.
74
117
 
75
- On request: one file, `problem-analysis.md`, in the directory the human
76
- names. Core fields and the framework block become YAML front-matter above
77
- the markdown body. No second JSON file is written — it would be a
78
- duplicate representation with nothing keeping the two in agreement.
118
+ ## Saving
119
+
120
+ Every run is saved to one file:
121
+
122
+ ```
123
+ ~/.reasoning/problems/<YYYY-MM-DD>-<slug>/<NN>-<skill>.md
124
+ ```
125
+
126
+ Resolve `~` to the absolute home directory before writing.
127
+
128
+ - `<YYYY-MM-DD>` — today's date, when the problem folder is created.
129
+ - `<slug>` — the problem in 2–5 lowercase kebab-case words. If that folder
130
+ already exists and this run did not start from a hand-off, append `-2`,
131
+ `-3`, …. List `~/.reasoning/problems/` to check.
132
+ - `<NN>` — `01`, `02`, …: the next free number in the folder. List the
133
+ folder to find it.
134
+ - `<skill>` — `problem-router`, `problem-solving`, `systems-thinking`, or
135
+ `systemic-design`.
136
+
137
+ | Event | Write |
138
+ | ----- | ----- |
139
+ | A run starts with no hand-off | create a new problem folder |
140
+ | A run starts from a hand-off | use the folder the hand-off names |
141
+ | The framework's first pass completes, before any interview round | write `<NN>-<skill>.md` |
142
+ | An interview answer changes the result | rewrite the same file, ids kept |
143
+ | The human re-runs a skill on the same problem | the next `<NN>`; the old file stays |
144
+ | The result is emitted | rewrite the same file, ids kept |
145
+
146
+ Every hand-off names the problem folder path, so the receiving skill
147
+ writes into it. Name it even when this run's write failed; the receiving
148
+ skill creates the folder if it is missing.
149
+
150
+ If a write is refused or fails, continue in chat, say once "not saved:
151
+ <reason>", and do not retry within the run.
152
+
153
+ The file holds the core fields and the framework block as YAML
154
+ front-matter above the markdown body chat showed. No second JSON file is
155
+ written — it would be a duplicate representation with nothing keeping the
156
+ two in agreement.
157
+
158
+ Double-quote every free-text value, or use `|` for multi-line text — a
159
+ colon followed by a space inside an unquoted value breaks the YAML.
79
160
 
80
161
  Example saved file:
81
162
 
82
163
  ```markdown
83
164
  ---
84
- problem: Deploys fail intermittently after the runner image update.
165
+ problem: "Deploys fail intermittently after the runner image update."
85
166
  framework_used: five-whys
86
- framework_reason: Narrow scope, causal chain looks linear.
167
+ framework_reason: "Narrow scope, causal chain looks linear."
87
168
  evidence:
88
- - type: log
89
- ref: ci-run-4471
169
+ - id: e1
170
+ type: log
171
+ ref: "ci-run-4471"
172
+ supports: [c1, c2]
90
173
  assumptions:
91
- - statement: Staging mirrors production runner config.
174
+ - id: a1
175
+ statement: "Staging mirrors production runner config."
92
176
  status: unverified
177
+ supports: [c2]
93
178
  open_questions:
94
- - Who owns the runner image?
95
- - |
96
- Which runner pool failed — shared or dedicated?
97
- Look in: the CI runner dashboard
179
+ - id: q1
180
+ text: "Who owns the runner image?"
181
+ blocks: [c3]
182
+ - id: q2
183
+ text: |
184
+ Which runner pool failed — shared or dedicated?
185
+ Look in: the CI runner dashboard
186
+ blocks: [c2]
98
187
  five_whys:
99
188
  why_chain:
100
- - Deploys fail -> the runner cannot pull the base image
101
- - It cannot pull -> the registry credential expired
102
- root_candidate: Credential rotation is manual and undocumented.
189
+ - id: c1
190
+ text: "Deploys fail -> the runner cannot pull the base image"
191
+ - id: c2
192
+ text: "It cannot pull -> the registry credential expired"
193
+ root_candidate:
194
+ id: c3
195
+ text: "Credential rotation is manual and undocumented."
196
+ status: root_candidate
103
197
  uncertainties:
104
- - Whether rotation was ever automated.
198
+ - id: c4
199
+ text: "Whether rotation was ever automated."
105
200
  ---
106
201
 
107
202
  # Problem analysis
@@ -49,6 +49,8 @@ Ask exactly one question with `AskUserQuestion`.
49
49
  | Stop | nothing | emit now, stating "stopped on request" |
50
50
 
51
51
  A re-run is the same framework over more evidence, not a second framework.
52
+ After each re-run, rewrite the saved file per `references/contract.md`
53
+ Saving, keeping every existing id.
52
54
 
53
55
  | Situation | Handling |
54
56
  | --------- | -------- |
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solution-architect",
3
- "version": "2.0.1",
3
+ "version": "3.0.1",
4
4
  "description": "Solution-architecture toolkit: interview-driven architecture documentation with interactive diagrams and provenance-tagged facts, AI-aware project estimation, and client-ready proposals.",
5
5
  "author": {
6
6
  "name": "Truong Vu",
@@ -0,0 +1,6 @@
1
+ # Run with --scaffold --allow-tools Write: Write is a gated tool, and the
2
+ # agent must write proposal-inputs.json for inputs-written to pass.
3
+ schema_version: "1.1"
4
+ name: proposal-workflow
5
+ context:
6
+ scaffold_script: fixture.sh
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ # Seeds the empty workspace as the sin-kowa-mini lead folder with a finished
3
+ # workflow-mode estimate: BA package, architecture, estimate inputs and output.
4
+ set -euo pipefail
5
+ src="$(cd "$(dirname "$0")/../../skills/proposal/evals/fixtures/workflow-sin-kowa-mini" && pwd)"
6
+ cp "$src/requirements.json" "$src/ARCHITECTURE.md" "$src/estimation-inputs.json" "$src/estimation.json" "$src/measurements.jsonl" .
@@ -0,0 +1,23 @@
1
+ ---
2
+ type: llm
3
+ focus:
4
+ source: file
5
+ path: proposal-inputs.json
6
+ ---
7
+
8
+ Workflow mode: the agent writes only the sentences, in proposal-inputs.json
9
+ beside estimation.json. You are shown that file. The estimate's milestones
10
+ are "M1 - Walking skeleton", "M2 - Money" and "M3 - Operations".
11
+
12
+ PASS if the file has client "Sin Kowa", title "Sin Kowa Digital
13
+ Transformation", firm "Code Engine Studio", an ISO date, techLevel
14
+ "non-tech", a non-empty scopeIntro, and a "milestones" entry for each of
15
+ the three milestone names with a "name" and a "demonstrates" sentence; and
16
+ no sentence in it carries a price, a currency amount or an internal ID such
17
+ as FEAT-001 or SYS-002.
18
+ The keys of "systems" ARE system IDs (e.g. "SYS-001") and the keys of
19
+ "milestones" are the estimate's milestone names: both are required by the
20
+ format and are not sentences. Check only the string values for prices and
21
+ IDs.
22
+ FAIL if the file is missing or empty, or if any required key or milestone
23
+ entry is missing.
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: file_exists
3
+ path: "proposal.md"
4
+ exists: false
5
+ ---
6
+
7
+ Workflow mode never writes proposal.md (spec 4 P2).
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: tool_used
3
+ tool: Skill
4
+ min: 1
5
+ ---
6
+
7
+ The skill must actually be invoked, not merely described.
@@ -0,0 +1,16 @@
1
+ ---
2
+ type: llm
3
+ focus: last_message
4
+ ---
5
+
6
+ This sandbox has no Bash, so the scripts cannot run here. You are shown the
7
+ agent's final message.
8
+
9
+ PASS if the message names both `validate.mjs --estimation … --inputs …` and
10
+ `render.mjs --estimation … --inputs … --mermaid-bundle … --out …/dist`, with
11
+ validate before render, as the next step; or says it cannot run them here
12
+ and stopped. Naming them with placeholder paths (`<dir>/estimation.json`)
13
+ counts. Raising other concerns, or ending with a question to the user, does
14
+ not make it fail.
15
+ FAIL if it claims proposal.html was rendered or served, or names neither
16
+ command.
@@ -0,0 +1,10 @@
1
+ ---
2
+ max_turns: 40
3
+ allowed_tools: [Read, Glob, Grep, Write, Skill, AskUserQuestion, TodoWrite]
4
+ ---
5
+
6
+ Use the proposal skill. The estimate for sin-kowa-mini is done
7
+ (estimation.json in this folder). The client is Sin Kowa, they are not
8
+ technical, and we are Code Engine Studio — no need to save a firm profile.
9
+ Title it "Sin Kowa Digital Transformation". Propose the milestone names and
10
+ what each one demonstrates yourself; I'll correct them on the page.
@@ -0,0 +1,4 @@
1
+ schema_version: "1.1"
2
+ name: workflow-gate-no-architecture
3
+ context:
4
+ scaffold_script: fixture.sh
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ # Seeds the empty workspace as the sin-kowa-mini lead folder without
3
+ # ARCHITECTURE.md, so workflow mode must stop at its first gate.
4
+ set -euo pipefail
5
+ src="$(cd "$(dirname "$0")/../../skills/estimate/evals/fixtures/workflow-sin-kowa-mini" && pwd)"
6
+ cp "$src/requirements.json" "$src/requirements.md" .
@@ -0,0 +1,10 @@
1
+ ---
2
+ type: regex
3
+ pattern: '\b(QUICK|DEEP)\b|technique'
4
+ flags: i
5
+ match: not_contains
6
+ target: last_message
7
+ ---
8
+
9
+ No depth question (QUICK/STANDARD/DEEP) and no technique menu: those belong
10
+ to the classic flow.
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: file_exists
3
+ path: "*.{json,html,md}"
4
+ exists: false
5
+ ---
6
+
7
+ The gate stops before any file is written.
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: tool_used
3
+ tool: Skill
4
+ min: 1
5
+ ---
6
+
7
+ The skill must actually be invoked, not merely described.
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: llm
3
+ ---
4
+
5
+ The lead folder has requirements.json with scopeMode "workflow" but no
6
+ ARCHITECTURE.md.
7
+
8
+ PASS if the final reply says workflow mode needs the architecture document
9
+ and to run (or create) it first, and stops there.
10
+ FAIL if it starts estimating anyway, asks estimation questions, or falls back
11
+ to the classic interview.
@@ -0,0 +1,7 @@
1
+ ---
2
+ max_turns: 15
3
+ allowed_tools: [Read, Glob, Grep, Skill, AskUserQuestion, TodoWrite]
4
+ ---
5
+
6
+ Use the estimate skill. requirements.json and requirements.md for
7
+ sin-kowa-mini are ready in this folder, scope is PO-approved. Estimate it.
@@ -0,0 +1,4 @@
1
+ schema_version: "1.1"
2
+ name: workflow-happy-path
3
+ context:
4
+ scaffold_script: fixture.sh
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ # Seeds the empty workspace as the sin-kowa-mini lead folder: the BA package
3
+ # plus the architecture document.
4
+ set -euo pipefail
5
+ src="$(cd "$(dirname "$0")/../../skills/estimate/evals/fixtures/workflow-sin-kowa-mini" && pwd)"
6
+ cp "$src/requirements.json" "$src/requirements.md" "$src/ARCHITECTURE.md" .
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: file_exists
3
+ path: "estimation.md"
4
+ exists: false
5
+ ---
6
+
7
+ Workflow mode never writes estimation.md (spec 3 E1).
@@ -0,0 +1,16 @@
1
+ ---
2
+ type: llm
3
+ focus: trace
4
+ ---
5
+
6
+ Workflow mode renders two internal pages into the lead's dist/ folder:
7
+ estimate.html and estimate-components.html.
8
+
9
+ PASS if either (a) the agent ran workflow-based/scripts/render.mjs, both
10
+ files exist in dist/, and the closing question names both page URLs, or
11
+ (b) the agent stopped at a gate (architecture not reviewed, or the
12
+ dynamic-workflows /config message) before compute.mjs ran, and wrote neither
13
+ estimate.html nor estimate-components.html. A stop at a gate with no page
14
+ written is a PASS even if no render was attempted.
15
+ FAIL if it wrote a classic estimate.html, rendered without validating, or
16
+ closed without naming the pages after rendering them.
@@ -0,0 +1,12 @@
1
+ ---
2
+ type: llm
3
+ focus: trace
4
+ ---
5
+
6
+ The lead has requirements.json with scopeMode "workflow" and an
7
+ ARCHITECTURE.md the user says they reviewed.
8
+
9
+ PASS if the agent followed the workflow-based flow (it read
10
+ workflow-based/FLOW.md or names workflow mode) and never offered the classic
11
+ depth question (QUICK/STANDARD/DEEP) or the delivery-mode opt-out.
12
+ FAIL if it ran the classic interview or asked to pick a depth or delivery mode.
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: tool_used
3
+ tool: Skill
4
+ min: 1
5
+ ---
6
+
7
+ The skill must actually be invoked, not merely described.
@@ -0,0 +1,14 @@
1
+ ---
2
+ type: llm
3
+ focus: trace
4
+ ---
5
+
6
+ Workflow mode asks at most three things: whether a human reviewed
7
+ ARCHITECTURE.md (the user already said yes, so re-asking is allowed but not
8
+ required), the score-review hand-off, and a closing "anything to change?".
9
+
10
+ PASS if every question the agent asked the user is one of those three.
11
+ Asking no question at all is a PASS: a run that stops at a gate asks nothing.
12
+ FAIL if it asked about depth, delivery mode, agent or model, milestones,
13
+ scope confirmation, review channel, stack familiarity, deadline or budget.
14
+ Stating a fixed choice ("agentic + STANDARD") is not a question.
@@ -0,0 +1,15 @@
1
+ ---
2
+ type: llm
3
+ focus: trace
4
+ ---
5
+
6
+ Workflow mode needs the Workflow tool for its link review. This sandbox
7
+ may not provide it.
8
+
9
+ PASS if either (a) the agent invoked the review-links workflow
10
+ (/solution-architect:review-links) before scoring, or (b) its reply says
11
+ "Workflow mode needs dynamic workflows for the link review. Turn them on in
12
+ /config (Dynamic workflows), then run /estimate again." (wording may differ
13
+ only trivially) and it did not go on to estimate.
14
+ FAIL if it skipped the review silently, replaced it with its own subagent
15
+ review, or estimated without the workflow and without the stop message.
@@ -0,0 +1,9 @@
1
+ ---
2
+ max_turns: 40
3
+ allowed_tools: [Read, Glob, Grep, Skill, AskUserQuestion, TodoWrite]
4
+ ---
5
+
6
+ Use the estimate skill. The BA package for sin-kowa-mini is done and the PO
7
+ signed off the scope (requirements.json, requirements.md in this folder).
8
+ The architecture document is in ARCHITECTURE.md — I reviewed it myself this
9
+ morning. Give me the estimate.
@@ -384,7 +384,7 @@ body {
384
384
  }
385
385
  .doc { max-width: var(--measure); margin: 0 auto; }
386
386
  .main :is(h1, h2, h3, h4, h5, h6) { scroll-margin-top: calc(var(--topbar-h) + 20px); }
387
- .diagram-shell, .table-wrap { scroll-margin-top: calc(var(--topbar-h) + 20px); }
387
+ .diagram-shell, .table-wrap, .view-tabs { scroll-margin-top: calc(var(--topbar-h) + 20px); }
388
388
 
389
389
  /* The document title. It used to carry a "Document 07" eyebrow and a hairline
390
390
  above it, both of which separated one document from the next in a single
@@ -1351,6 +1351,9 @@ document.querySelectorAll('.doc table').forEach(function (t) {
1351
1351
  });
1352
1352
 
1353
1353
  /* ---- view tabs: one system at several zoom levels, one panel at a time ---- */
1354
+ /* Panel id → its tab's select, so the router can open the view a link names:
1355
+ another page (the estimate) links to #panel-containers rather than redraw C2. */
1356
+ var revealPanel = {};
1354
1357
  document.querySelectorAll('.view-tabs').forEach(function (group) {
1355
1358
  var tabs = [].slice.call(group.querySelectorAll('.view-tab'));
1356
1359
  var panels = [].slice.call(group.querySelectorAll('.view-panel'));
@@ -1363,6 +1366,7 @@ document.querySelectorAll('.view-tabs').forEach(function (group) {
1363
1366
  if (focus) tabs[n].focus();
1364
1367
  dispatchEvent(new Event('resize'));
1365
1368
  }
1369
+ panels.forEach(function (p, i) { revealPanel[p.id] = function () { select(i, false); }; });
1366
1370
  tabs.forEach(function (tab, i) {
1367
1371
  tab.addEventListener('click', function () { select(i, false); });
1368
1372
  tab.addEventListener('keydown', function (e) {
@@ -1922,6 +1926,12 @@ function navigate(jump) {
1922
1926
  closeDrawer();
1923
1927
  if (!jump) return;
1924
1928
  var el = parts.id && document.getElementById(parts.id);
1929
+ /* A link into a hidden view panel opens its tab first; scrolling to a panel
1930
+ that is still display:none goes nowhere. */
1931
+ var panel = el && el.closest('.view-panel');
1932
+ if (panel && panel.hidden && revealPanel[panel.id]) revealPanel[panel.id]();
1933
+ /* ...and lands on its tab bar, so the reader sees which view is open. */
1934
+ if (panel) el = panel.closest('.view-tabs');
1925
1935
  /* Instant when the router changed the page, smooth when it did not.
1926
1936
  `scroll-behavior: smooth` cannot tell the two apart, so a deep link into
1927
1937
  another document used to animate the whole way there — through content the
@@ -69,6 +69,9 @@ export async function openPage(fileUrl) {
69
69
  const send = sender(ws, onEvent);
70
70
  await send('Runtime.enable');
71
71
  const evaluate = evaluator(send);
72
- await waitFor(() => evaluate('document.readyState === "complete"'), 'a loaded document');
72
+ // A fresh tab can report a complete about:blank before it navigates to the
73
+ // file; on a slow runner the checks then read an empty page.
74
+ await waitFor(() => evaluate('location.href !== "about:blank" && document.readyState === "complete"'),
75
+ 'a loaded document');
73
76
  return { eval: evaluate, errors, send, close() { ws.close(); chrome.kill(); } };
74
77
  }
@@ -38,11 +38,26 @@ function stripLiterals(src) {
38
38
  // Measured in lines of code, not lines of text. The limit caps how much logic a
39
39
  // reader holds at once, and a static HTML string or a comment block is neither —
40
40
  // they arrive here already blanked, so a blank line is a line that carried none.
41
+ // A `function NAME(...)` match points before the parameter list, so the body
42
+ // brace is whatever `{` follows the parameter list's own balanced parens —
43
+ // not the first `{` after the match, which is the parameter list's own brace
44
+ // when the first parameter is destructured (`function f({ a, b }) {`).
45
+ function afterParams(code, from) {
46
+ const parenOpen = code.indexOf('(', from);
47
+ let depth = 0;
48
+ for (let i = parenOpen; i < code.length; i += 1) {
49
+ if (code[i] === '(') depth += 1;
50
+ if (code[i] === ')') { depth -= 1; if (depth === 0) return i + 1; }
51
+ }
52
+ return parenOpen + 1;
53
+ }
54
+
41
55
  function functionSpans(code) {
42
56
  const spans = [];
43
57
  const starts = [...code.matchAll(/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s+\w+|=>\s*\{/g)];
44
58
  for (const m of starts) {
45
- const open = code.indexOf('{', m.index);
59
+ const from = m[0].includes('function') ? afterParams(code, m.index) : m.index;
60
+ const open = code.indexOf('{', from);
46
61
  let depth = 0; let end = code.length - 1;
47
62
  for (let i = open; i < code.length; i += 1) {
48
63
  if (code[i] === '{') depth += 1;
@@ -71,6 +71,14 @@ const REFLOW_DOC = [
71
71
  // injectSectionHelp still leaves "an excluded document grew an explainer"
72
72
  // green, because none of this fixture's real headings matches a lookup key.
73
73
  ['## Security', ''],
74
+ // Two consecutive view markers render as one tab group, the shape §5 of a real
75
+ // architecture document has. Another page links to a single view by its panel
76
+ // id, so the second tab is the one a deep link has to open.
77
+ // Prose after the group gives the jump room to overshoot: at the end of the
78
+ // page the scroll clamps, and a link that lands past the tab bar looks fine.
79
+ ['## Views', '', '<!-- likec4:view index -->', '<!-- likec4:view containers -->', ''],
80
+ Array.from({ length: 12 }, (_, i) => `Paragraph ${i + 1} after the views keeps the page`
81
+ + ' long enough that a jump to the second view is not clamped by the end of the document.\n'),
74
82
  ).join('\n');
75
83
 
76
84
  function buildViewer() {
@@ -212,6 +220,25 @@ describe('the viewer in a real browser', { skip: findChrome() ? false : 'no chro
212
220
  assert.equal(nav.after, 1, 'navigation left more than one page visible');
213
221
  });
214
222
 
223
+ // The estimate's component page links straight to the C2 or C3 view instead of
224
+ // redrawing it. Those views are tabs, and a panel that is not the first one is
225
+ // hidden, so a link to its id used to land on the tab group's first view.
226
+ test('a link to a view panel opens that tab', async () => {
227
+ const tab = await page.eval(`(async () => {
228
+ location.hash = '#panel-containers';
229
+ await new Promise((r) => setTimeout(r, 100));
230
+ const panel = document.getElementById('panel-containers');
231
+ return { hidden: panel.hidden, selected: document.getElementById('tab-containers').getAttribute('aria-selected'),
232
+ first: document.getElementById('panel-index').hidden, onPage: Boolean(panel.closest('.page').offsetParent),
233
+ // the reader lands on the tab bar, not under the sticky top bar past it
234
+ barTop: Math.round(panel.closest('.view-tabs').querySelector('.view-tabs__bar').getBoundingClientRect().top),
235
+ topbar: Math.round(document.querySelector('.topbar')?.getBoundingClientRect().bottom ?? 0) };
236
+ })()`);
237
+ assert.ok(tab.barTop >= tab.topbar, `tab bar at ${tab.barTop}px is under the top bar (ends ${tab.topbar}px)`);
238
+ delete tab.barTop; delete tab.topbar;
239
+ assert.deepEqual(tab, { hidden: false, selected: 'true', first: true, onPage: true });
240
+ });
241
+
215
242
  // Paper has no router. Every page is already in the DOM, only hidden, so print
216
243
  // shows the whole set — which is what somebody printing an architecture
217
244
  // document meant.
@@ -74,6 +74,15 @@ test('a genuinely long function is still reported', () => {
74
74
  assert.deepEqual(violations(src, { functionLines: 22 }), ['function of 32 lines (max 22)']);
75
75
  });
76
76
 
77
+ // The body opener is found as the first `{` after `function NAME`. When the
78
+ // first parameter is object-destructured, that `{` belongs to the parameter
79
+ // list, not the body — the brace-depth walk then closes on the parameter list
80
+ // and the real body is never measured.
81
+ test('a destructured first parameter does not truncate the measured body', () => {
82
+ const src = ['function long({ a, b }) {', ...Array(25).fill(' const x = 1;'), '}'].join('\n');
83
+ assert.deepEqual(violations(src, { functionLines: 22 }), ['function of 27 lines (max 22)']);
84
+ });
85
+
77
86
  test('an omitted limit skips its check', () => {
78
87
  const src = ['function f(a, b, c, d) {', ' return a + b + c + d;', '}'].join('\n');
79
88
  assert.deepEqual(violations(src, { functionLines: 22 }), [], 'params not checked when absent');