@v11g/agents-rock 1.0.9 → 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 (246) hide show
  1. package/README.md +1 -0
  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/solution-architect/evals/proposal-workflow/case.yaml +6 -0
  65. package/plugins/solution-architect/evals/proposal-workflow/fixture.sh +6 -0
  66. package/plugins/solution-architect/evals/proposal-workflow/graders/inputs-written.md +23 -0
  67. package/plugins/solution-architect/evals/proposal-workflow/graders/no-proposal-md.md +7 -0
  68. package/plugins/solution-architect/evals/proposal-workflow/graders/skill-fired.md +7 -0
  69. package/plugins/solution-architect/evals/proposal-workflow/graders/validate-then-render.md +16 -0
  70. package/plugins/solution-architect/evals/proposal-workflow/prompt.md +10 -0
  71. package/plugins/solution-architect/evals/workflow-gate-no-architecture/case.yaml +4 -0
  72. package/plugins/solution-architect/evals/workflow-gate-no-architecture/fixture.sh +6 -0
  73. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/no-classic-fallback.md +10 -0
  74. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/nothing-written.md +7 -0
  75. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/skill-fired.md +7 -0
  76. package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/stops-at-gate.md +11 -0
  77. package/plugins/solution-architect/evals/workflow-gate-no-architecture/prompt.md +7 -0
  78. package/plugins/solution-architect/evals/workflow-happy-path/case.yaml +4 -0
  79. package/plugins/solution-architect/evals/workflow-happy-path/fixture.sh +6 -0
  80. package/plugins/solution-architect/evals/workflow-happy-path/graders/no-estimation-md.md +7 -0
  81. package/plugins/solution-architect/evals/workflow-happy-path/graders/pages-or-stop.md +16 -0
  82. package/plugins/solution-architect/evals/workflow-happy-path/graders/routed-to-workflow.md +12 -0
  83. package/plugins/solution-architect/evals/workflow-happy-path/graders/skill-fired.md +7 -0
  84. package/plugins/solution-architect/evals/workflow-happy-path/graders/three-questions-max.md +14 -0
  85. package/plugins/solution-architect/evals/workflow-happy-path/graders/workflow-or-exact-stop.md +15 -0
  86. package/plugins/solution-architect/evals/workflow-happy-path/prompt.md +9 -0
  87. package/plugins/solution-architect/skills/analyze-requirements/assets/viewer-template.html +11 -1
  88. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/browser.test.mjs +27 -0
  89. package/plugins/solution-architect/skills/estimate/README.md +18 -3
  90. package/plugins/solution-architect/skills/estimate/SKILL.md +18 -75
  91. package/plugins/solution-architect/skills/estimate/classic/FLOW.md +77 -0
  92. package/plugins/solution-architect/skills/estimate/classic/assets/estimate-template.html +1337 -0
  93. package/plugins/solution-architect/skills/estimate/{references → classic/references}/task-shapes.md +1 -1
  94. package/plugins/solution-architect/skills/estimate/{references → classic/references}/writing.md +2 -2
  95. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/compute.mjs +1 -1
  96. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/checks.mjs +1 -1
  97. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/roadmap.mjs +1 -1
  98. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/rollup.mjs +5 -5
  99. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/schema.mjs +4 -26
  100. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-csv.mjs +2 -2
  101. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-html.mjs +2 -2
  102. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/render.mjs +8 -7
  103. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/score-review.mjs +3 -3
  104. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/baselines.test.mjs +3 -3
  105. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/browser-agentic.test.mjs +2 -2
  106. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/browser.test.mjs +2 -2
  107. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/compute.test.mjs +1 -1
  108. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/e2e.test.mjs +6 -6
  109. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/estimate-math.test.mjs +3 -3
  110. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/measurements.test.mjs +1 -1
  111. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/pricing.test.mjs +1 -1
  112. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/project-price.test.mjs +1 -1
  113. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/quality-gates.test.mjs +7 -1
  114. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/references.test.mjs +6 -6
  115. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/render.test.mjs +3 -3
  116. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/schema.test.mjs +1 -1
  117. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/score-review.test.mjs +6 -6
  118. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/scoring.test.mjs +1 -1
  119. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/url-state.test.mjs +2 -2
  120. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/validate.test.mjs +1 -1
  121. package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/xlsx-export.test.mjs +3 -3
  122. package/plugins/solution-architect/skills/estimate/classic/scripts/test/zip-store.test.mjs +26 -0
  123. package/plugins/solution-architect/skills/estimate/evals/evals.json +37 -2
  124. package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +28 -0
  125. package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.json +79 -0
  126. package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.md +141 -0
  127. package/plugins/solution-architect/skills/estimate/shared/assets/xlsx-export.js +336 -0
  128. package/plugins/solution-architect/skills/estimate/shared/lib/agentic-task-schema.mjs +24 -0
  129. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/context-schema.mjs +2 -2
  130. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/inline.mjs +8 -0
  131. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/scoring-schema.mjs +1 -1
  132. package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/scoring.mjs +1 -1
  133. package/plugins/solution-architect/skills/estimate/shared/lib/zip.mjs +60 -0
  134. package/plugins/solution-architect/skills/estimate/workflow-based/FLOW.md +91 -0
  135. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-components.html +994 -0
  136. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-template.html +440 -0
  137. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimator-system.xlsx +0 -0
  138. package/plugins/solution-architect/skills/estimate/workflow-based/assets/score-review.html +838 -0
  139. package/plugins/solution-architect/skills/estimate/workflow-based/references/hidden-work-by-type.md +429 -0
  140. package/plugins/solution-architect/skills/estimate/workflow-based/references/linking.md +59 -0
  141. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-components-template.mjs +80 -0
  142. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-template.mjs +60 -0
  143. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-workflow-template.mjs +51 -0
  144. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-xlsx-template.py +144 -0
  145. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/compute.mjs +32 -0
  146. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-html.mjs +44 -0
  147. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-view.mjs +71 -0
  148. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/pair-findings.mjs +19 -0
  149. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/requirements.mjs +33 -0
  150. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/rollup.mjs +66 -0
  151. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/schema-components.mjs +69 -0
  152. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/schema.mjs +70 -0
  153. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/score-diff.mjs +54 -0
  154. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/score-html.mjs +52 -0
  155. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/xlsx-rows.mjs +51 -0
  156. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/render.mjs +42 -0
  157. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/score-review.mjs +46 -0
  158. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/arch-link.js +9 -0
  159. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/click.js +28 -0
  160. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/prelude.js +4 -0
  161. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/view.js +63 -0
  162. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/browser.test.mjs +127 -0
  163. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/build-pages.test.mjs +43 -0
  164. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/build-template.test.mjs +18 -0
  165. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/cli.test.mjs +48 -0
  166. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/estimator-system.test.mjs +66 -0
  167. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/ARCHITECTURE-mini.md +31 -0
  168. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/feedback.json +19 -0
  169. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/inputs-pass.json +80 -0
  170. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/measurements.jsonl +0 -0
  171. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/requirements.json +79 -0
  172. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/page-view.test.mjs +54 -0
  173. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/pages-browser.test.mjs +209 -0
  174. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/quality-gates.test.mjs +25 -0
  175. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/render.test.mjs +54 -0
  176. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/requirements.test.mjs +33 -0
  177. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/rollup.test.mjs +80 -0
  178. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/schema.test.mjs +61 -0
  179. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/score-review.test.mjs +108 -0
  180. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/stage.mjs +32 -0
  181. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/workflow-script.test.mjs +24 -0
  182. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs +58 -0
  183. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/validate.mjs +19 -0
  184. package/plugins/solution-architect/skills/proposal/README.md +13 -0
  185. package/plugins/solution-architect/skills/proposal/SKILL.md +8 -0
  186. package/plugins/solution-architect/skills/proposal/assets/proposal-workflow.html +143 -0
  187. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +31 -0
  188. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation-inputs.json +468 -0
  189. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation.json +773 -0
  190. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/measurements.jsonl +0 -0
  191. package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/requirements.json +79 -0
  192. package/plugins/solution-architect/skills/proposal/references/review.md +11 -0
  193. package/plugins/solution-architect/skills/proposal/references/workflow.md +88 -0
  194. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-body.mjs +42 -0
  195. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-package.mjs +56 -0
  196. package/plugins/solution-architect/skills/proposal/scripts/lib/docx-xml.mjs +44 -0
  197. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-checks.mjs +71 -0
  198. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-cli.mjs +46 -0
  199. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-html.mjs +39 -0
  200. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-lead.mjs +45 -0
  201. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-page.mjs +30 -0
  202. package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-view.mjs +80 -0
  203. package/plugins/solution-architect/skills/proposal/scripts/render.mjs +5 -1
  204. package/plugins/solution-architect/skills/proposal/scripts/test/docx.test.mjs +68 -0
  205. package/plugins/solution-architect/skills/proposal/scripts/test/e2e.test.mjs +2 -2
  206. package/plugins/solution-architect/skills/proposal/scripts/test/evals-fixtures.test.mjs +9 -2
  207. package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-inputs-pass.json +17 -0
  208. package/plugins/solution-architect/skills/proposal/scripts/test/render.test.mjs +2 -2
  209. package/plugins/solution-architect/skills/proposal/scripts/test/validate.test.mjs +2 -2
  210. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-browser.test.mjs +96 -0
  211. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-checks.test.mjs +98 -0
  212. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-docs.test.mjs +25 -0
  213. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-render.test.mjs +75 -0
  214. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-stage.mjs +15 -0
  215. package/plugins/solution-architect/skills/proposal/scripts/test/workflow-view.test.mjs +78 -0
  216. package/plugins/solution-architect/skills/proposal/scripts/validate.mjs +4 -1
  217. package/plugins/solution-architect/workflows/review-links.js +61 -0
  218. package/plugins/solution-architect/skills/estimate/assets/estimate-template.html +0 -1677
  219. /package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/estimate-template-agentic.html +0 -0
  220. /package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/scores-review-template.html +0 -0
  221. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/agentic-estimation.md +0 -0
  222. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/ai-multipliers.md +0 -0
  223. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/interview.md +0 -0
  224. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/scoring-guide.md +0 -0
  225. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/slicing.md +0 -0
  226. /package/plugins/solution-architect/skills/estimate/{references → classic/references}/techniques.md +0 -0
  227. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/agentic-checks.mjs +0 -0
  228. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/components.mjs +0 -0
  229. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/md-tables.mjs +0 -0
  230. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/redact.mjs +0 -0
  231. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/scoring-checks.mjs +0 -0
  232. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-estimation-fail.md +0 -0
  233. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-estimation-pass.md +0 -0
  234. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-inputs.json +0 -0
  235. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/booking-inputs.json +0 -0
  236. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/estimation-fail.md +0 -0
  237. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/estimation-pass.md +0 -0
  238. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/measurements.jsonl +0 -0
  239. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/zip.mjs +0 -0
  240. /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/validate.mjs +0 -0
  241. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/baselines.mjs +0 -0
  242. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/estimate-math.mjs +0 -0
  243. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/measurements.mjs +0 -0
  244. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/pricing.mjs +0 -0
  245. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/project-price.mjs +0 -0
  246. /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/score-diff.mjs +0 -0
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env python3
2
+ """Python port of scope.mjs: writes the To-be scope section of requirements.md
3
+ from requirements.json. Byte-identical output, kept in lockstep by
4
+ scripts/test/python-parity.test.mjs."""
5
+ import json
6
+ import sys
7
+
8
+ from scope_checks import check_scope, mode_of, scope_ids
9
+ from scope_render import apply_scope, check_markers
10
+ from validate import collect_ids
11
+
12
+
13
+ def main(argv):
14
+ args = {}
15
+ i = 0
16
+ while i < len(argv):
17
+ if argv[i].startswith('--'):
18
+ args[argv[i][2:]] = argv[i + 1]
19
+ i += 1
20
+ i += 1
21
+ with open(args['json'], encoding='utf-8') as f:
22
+ pkg = json.load(f)
23
+ with open(args['md'], encoding='utf-8') as f:
24
+ md = f.read()
25
+ findings = check_scope(pkg, set(collect_ids(pkg)) | set(scope_ids(pkg))) + check_markers(md)
26
+ if findings:
27
+ print('\n'.join(findings), file=sys.stderr)
28
+ sys.exit(1)
29
+ with open(args['md'], 'w', encoding='utf-8', newline='') as f:
30
+ f.write(apply_scope(md, pkg))
31
+ print(f'scope written ({mode_of(pkg)})')
32
+
33
+
34
+ if __name__ == '__main__':
35
+ main(sys.argv[1:])
@@ -0,0 +1,168 @@
1
+ """Workflow-scope checks; mirrors lib/scope-rules.mjs + lib/scope-checks.mjs (parity-tested)."""
2
+ import re
3
+
4
+ LABELS = ['confirmed', 'assumed', 'recommended']
5
+ SCOPE_MODES = ['workflow', 'classic']
6
+ TECH_WORDS = ['API', 'database', 'microservice', 'backend', 'frontend', 'server', 'endpoint', 'schema', 'PWA', 'cloud']
7
+ ID_RES = [('systems', re.compile(r'^SYS-\d{3}$')), ('features', re.compile(r'^FEAT-\d{3}$'))]
8
+ FIELDS = [('systems', ['name', 'purpose']), ('features', ['name', 'does'])]
9
+
10
+
11
+ def mode_of(pkg):
12
+ return pkg.get('scopeMode') or 'classic'
13
+
14
+
15
+ def to_be(pkg):
16
+ return [w for w in pkg.get('workflows') or [] if w.get('state') == 'to-be']
17
+
18
+
19
+ def scope_ids(pkg):
20
+ return [r.get('id') for r in (pkg.get('systems') or []) + (pkg.get('features') or [])]
21
+
22
+
23
+ def step_index(pkg):
24
+ idx = set()
25
+ for w in to_be(pkg):
26
+ for s in w.get('steps') or []:
27
+ idx.add(f"{w['id']}:{s}")
28
+ for b in w.get('branches') or []:
29
+ idx.add(f"{w['id']}:{b.get('to')}")
30
+ return idx
31
+
32
+
33
+ def check_flows(pkg):
34
+ findings = []
35
+ idx = step_index(pkg)
36
+ flows = [w['id'] for w in to_be(pkg)]
37
+ as_is = [w['id'] for w in pkg.get('workflows') or [] if w.get('state') == 'as-is']
38
+ for w in to_be(pkg):
39
+ for b in w.get('branches') or []:
40
+ if f"{w['id']}:{b.get('from')}" not in idx:
41
+ findings.append(f"{w['id']}: branch from unknown step {b.get('from')}")
42
+ sub = w.get('sub')
43
+ if sub and sub.get('startsAt') not in idx:
44
+ findings.append(f"{w['id']}: sub.startsAt unknown")
45
+ if sub and sub.get('rejoins') not in flows:
46
+ findings.append(f"{w['id']}: sub.rejoins is not a to-be workflow")
47
+ for r in w.get('replaces') or []:
48
+ if r not in as_is:
49
+ findings.append(f"{w['id']}: replaces unknown as-is workflow {r}")
50
+ return findings
51
+
52
+
53
+ def check_feature_steps(pkg):
54
+ findings = []
55
+ idx = step_index(pkg)
56
+ for f in pkg['features']:
57
+ steps = f.get('steps') or []
58
+ if steps == ['*']:
59
+ continue
60
+ findings += [f"{f['id']}: unknown step {s}" for s in steps if s not in idx]
61
+ return findings
62
+
63
+
64
+ def check_feature_frs(pkg, ids):
65
+ findings = []
66
+ covered = set()
67
+ for f in pkg['features']:
68
+ for fr in f.get('requirements') or []:
69
+ covered.add(fr)
70
+ if fr not in ids:
71
+ findings.append(f"{f['id']}: dangling reference {fr}")
72
+ for fr in pkg.get('requirements') or []:
73
+ if fr.get('scope') == 'in' and fr.get('id') not in covered:
74
+ findings.append(f"{fr['id']}: in scope but in no feature")
75
+ return findings
76
+
77
+
78
+ def tech_word(name):
79
+ return next((w for w in TECH_WORDS if re.search(rf'\b{w}s?\b', name or '', re.I)), None)
80
+
81
+
82
+ def check_names(pkg):
83
+ findings = []
84
+ for kind, rows in (('system', pkg['systems']), ('feature', pkg['features'])):
85
+ seen = set()
86
+ for r in rows:
87
+ key = (r.get('name') or '').lower()
88
+ if key in seen:
89
+ findings.append(f"duplicate {kind} name: {r.get('name')}")
90
+ seen.add(key)
91
+ word = tech_word(r.get('name'))
92
+ if word:
93
+ findings.append(f"{r['id']}: name uses a tech word ({word})")
94
+ return findings
95
+
96
+
97
+ def check_scope_labels(pkg):
98
+ findings = []
99
+ asked = {a for q in pkg.get('openQuestions') or [] for a in q.get('affects') or []}
100
+ for r in to_be(pkg) + pkg['systems'] + pkg['features']:
101
+ if not r.get('label'):
102
+ findings.append(f"{r['id']}: missing label")
103
+ elif r['label'] not in LABELS:
104
+ findings.append(f"{r['id']}: illegal label \"{r['label']}\"")
105
+ if not r.get('source'):
106
+ findings.append(f"{r['id']}: missing source")
107
+ if r.get('label') == 'recommended' and r['id'] not in asked:
108
+ findings.append(f"{r['id']}: recommended without a paired open question")
109
+ return findings
110
+
111
+
112
+ def check_shape(pkg):
113
+ if mode_of(pkg) not in SCOPE_MODES:
114
+ return ['scopeMode must be workflow|classic']
115
+ if mode_of(pkg) == 'classic':
116
+ return ['systems/features only in workflow mode'] if 'systems' in pkg or 'features' in pkg else []
117
+ if not pkg.get('systems') or not pkg.get('features'):
118
+ return ['scopeMode workflow needs systems and features']
119
+ findings = []
120
+ for key, rx in ID_RES:
121
+ findings += [f'{key}: bad id {r.get("id")}' for r in pkg[key] if not rx.match(r.get('id') or '')]
122
+ seen = set()
123
+ for rid in scope_ids(pkg):
124
+ if rid in seen:
125
+ findings.append(f'duplicate id: {rid}')
126
+ seen.add(rid)
127
+ return findings
128
+
129
+
130
+ def owners(systems, key):
131
+ own = {}
132
+ for s in systems:
133
+ for rid in s.get(key) or []:
134
+ own.setdefault(rid, []).append(s['id'])
135
+ return own
136
+
137
+
138
+ def ownership(ids, own, verb):
139
+ findings = []
140
+ for rid in ids:
141
+ by = own.get(rid, [])
142
+ if len(by) != 1:
143
+ findings.append(f"{rid}: {verb} {' and '.join(by)}" if by else f'{rid}: {verb} no system')
144
+ return findings
145
+
146
+
147
+ def check_membership(pkg):
148
+ findings = []
149
+ flows = [w['id'] for w in to_be(pkg)]
150
+ feats = [f['id'] for f in pkg['features']]
151
+ for s in pkg['systems']:
152
+ findings += [f"{s['id']}: workflow {w} is not a to-be workflow" for w in s.get('workflows') or [] if w not in flows]
153
+ findings += [f"{s['id']}: dangling reference {f}" for f in s.get('features') or [] if f not in feats]
154
+ return (findings
155
+ + ownership(flows, owners(pkg['systems'], 'workflows'), 'belongs to')
156
+ + ownership(feats, owners(pkg['systems'], 'features'), 'listed by'))
157
+
158
+
159
+ def check_fields(pkg):
160
+ return [f"{r.get('id')}: missing {f}" for key, fields in FIELDS for r in pkg[key] for f in fields if not r.get(f)]
161
+
162
+
163
+ def check_scope(pkg, ids):
164
+ shape = check_shape(pkg)
165
+ if shape or mode_of(pkg) == 'classic':
166
+ return shape
167
+ return (check_fields(pkg) + check_membership(pkg) + check_flows(pkg) + check_feature_steps(pkg)
168
+ + check_feature_frs(pkg, ids) + check_names(pkg) + check_scope_labels(pkg))
@@ -0,0 +1,140 @@
1
+ """To-be scope rendering and md sync; mirrors lib/scope-render.mjs + lib/scope-md.mjs (parity-tested)."""
2
+ import re
3
+
4
+ from scope_checks import mode_of
5
+
6
+ START = '<!-- scope:start -->'
7
+ END = '<!-- scope:end -->'
8
+ BLOCK = re.compile(r'<!-- scope:start -->.*?<!-- scope:end -->\n*', re.S)
9
+ # The 0.3.x Start-here line is removed from older files on re-run.
10
+ HERE = re.compile(r'\n> \*\*Product owner\? Start here:\*\*[^\n]*\n')
11
+
12
+
13
+ def step_of(ref):
14
+ return ref[ref.index(':') + 1:]
15
+
16
+
17
+ def cell(text):
18
+ return str(text).replace('|', '\\|')
19
+
20
+
21
+ def mermaid(w):
22
+ ids = {}
23
+
24
+ def nid(n):
25
+ ids.setdefault(n, f'n{len(ids)}')
26
+ return ids[n]
27
+ steps = w.get('steps') or []
28
+ for s in steps:
29
+ nid(s)
30
+ lines = ['flowchart LR']
31
+ lines += [f' {nid(a)} --> {nid(b)}' for a, b in zip(steps, steps[1:])]
32
+ for b in w.get('branches') or []:
33
+ label = f"|{b['label']}|" if b.get('label') else ''
34
+ lines.append(f" {nid(b['from'])} -.->{label} {nid(b['to'])}")
35
+ lines += [f' {i}["{n.replace(chr(34), chr(39))}"]' for n, i in ids.items()]
36
+ return '\n'.join(['```mermaid', *lines, '```'])
37
+
38
+
39
+ def where_cell(f, sys_, flows):
40
+ refs = f.get('steps') or []
41
+ if not refs:
42
+ return '—'
43
+ if refs == ['*']:
44
+ return 'every step'
45
+ groups = {}
46
+ for r in refs:
47
+ groups.setdefault(r[:r.index(':')], []).append(step_of(r))
48
+ return '; '.join(' → '.join(st) + ('' if wid in (sys_.get('workflows') or []) else f" (in {flows[wid]['name']})")
49
+ for wid, st in groups.items())
50
+
51
+
52
+ def workflow_block(w, main, flows):
53
+ head = f"**{'Main workflow' if main else 'Sub-workflow'}: {w['id']} {w['name']}**"
54
+ if w.get('sub'):
55
+ head += f" — starts at {step_of(w['sub']['startsAt'])}, rejoins {flows[w['sub']['rejoins']]['name']}"
56
+ if w['sub'].get('share'):
57
+ head += f" · {w['sub']['share']}"
58
+ return '\n\n'.join([head, mermaid(w)])
59
+
60
+
61
+ def system_block(s, ctx):
62
+ flows, feats = ctx
63
+ replaced = list(dict.fromkeys(r for wid in s.get('workflows') or [] for r in flows[wid].get('replaces') or []))
64
+ names = ', '.join(f'"{flows[r]["name"]}"' for r in replaced)
65
+ intro = s['purpose'] + (f" Replaces today's {names}." if replaced else '')
66
+ rows = [f"| {f['id']} | {cell(f['name'])} | {cell(f['does'])} | {cell(where_cell(f, s, flows))} | {', '.join(f.get('requirements') or []) or '—'} |"
67
+ for f in (feats[i] for i in s['features'])]
68
+ table = '\n'.join(['| ID | Feature | What it does | Where in the workflow | Requirements |', '| --- | --- | --- | --- | --- |', *rows])
69
+ flows_md = [workflow_block(flows[wid], i == 0, flows) for i, wid in enumerate(s.get('workflows') or [])]
70
+ return '\n\n'.join([f"### {s['id']} {s['name']}", intro, *flows_md, table])
71
+
72
+
73
+ def systems_table(pkg):
74
+ label = pkg.get('mapLabel')
75
+ head = f'| ID | System | Purpose | {cell(label)} |\n| --- | --- | --- | --- |' if label else '| ID | System | Purpose |\n| --- | --- | --- |'
76
+ rows = [f"| {s['id']} | {cell(s['name'])} | {cell(s['purpose'])} |" + (f" {cell(s.get('map') or '—')} |" if label else '') for s in pkg['systems']]
77
+ return '\n'.join([head, *rows])
78
+
79
+
80
+ def render_scope(pkg):
81
+ ctx = ({w['id']: w for w in pkg.get('workflows') or []}, {f['id']: f for f in pkg['features']})
82
+ n = len(pkg['systems'])
83
+ intro = (f"What we propose to build: {'one system' if n == 1 else f'{n} systems'}, "
84
+ 'each shown as its workflows and then the features that serve them.')
85
+ return '\n\n'.join([START, '### To-be scope', intro, systems_table(pkg),
86
+ *(system_block(s, ctx) for s in pkg['systems']), END])
87
+
88
+
89
+ def apply_scope(md, pkg):
90
+ out = HERE.sub('', md, count=1)
91
+ m = BLOCK.search(out)
92
+ out = BLOCK.sub('', out, count=1)
93
+ if mode_of(pkg) == 'classic':
94
+ return out
95
+ part3 = re.search(r'^## Part 3', out, re.M)
96
+ i = m.start() if m else part3.start() if part3 else len(out)
97
+ return f'{out[:i]}{render_scope(pkg)}\n\n{out[i:]}'
98
+
99
+
100
+ def cells(line):
101
+ return [c.strip() for c in re.split(r'(?<!\\)\|', line)[1:-1]]
102
+
103
+
104
+ def check_markers(md):
105
+ s, e = md.count(START), md.count(END)
106
+ ok = s == e and s <= 1 and md.find(START) <= md.find(END)
107
+ return [] if ok else ['md: scope markers unbalanced']
108
+
109
+
110
+ def expected_feature(pkg, fr_id):
111
+ names = [f['name'] for f in pkg['features'] if fr_id in (f.get('requirements') or [])]
112
+ return ', '.join(names) if names else '—'
113
+
114
+
115
+ def check_feature_column(pkg, md):
116
+ lines = md.split('\n')
117
+ header = next((ln for ln in lines if re.match(r'^\| ID \| Requirement \|', ln)), None)
118
+ if not header or cells(header)[-1] != 'Feature':
119
+ return ['md: FR table has no Feature column']
120
+ findings = []
121
+ for line in (ln for ln in lines if re.match(r'^\| FR-\d{3} \|', ln)):
122
+ c = cells(line)
123
+ want = cell(expected_feature(pkg, c[0]))
124
+ if c[-1] != want:
125
+ findings.append(f'md: {c[0]} Feature column says {c[-1]}, json says {want}')
126
+ return findings
127
+
128
+
129
+ def check_scope_md(pkg, md):
130
+ findings = check_markers(md)
131
+ fm = re.search(r'^scopeMode:\s*(\S+)', md, re.M)
132
+ if (fm.group(1) if fm else 'classic') != mode_of(pkg):
133
+ findings.append('md: scopeMode does not match json')
134
+ m = BLOCK.search(md)
135
+ block = m.group(0).rstrip() if m else None
136
+ if mode_of(pkg) == 'classic':
137
+ return findings + ['md: To-be scope only in workflow mode'] if block else findings
138
+ if block != render_scope(pkg):
139
+ findings.append('md: To-be scope is stale — run scope')
140
+ return findings + check_feature_column(pkg, md)
@@ -1,6 +1,13 @@
1
1
  import { test } from 'node:test';
2
2
  import assert from 'node:assert/strict';
3
3
  import { readFileSync } from 'node:fs';
4
+ import { execFileSync } from 'node:child_process';
5
+ import { mkdtempSync, writeFileSync } from 'node:fs';
6
+ import { tmpdir } from 'node:os';
7
+ import { join } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+ import { renderScope } from '../lib/scope-render.mjs';
10
+ import { loadWorkflow } from './scope-cases.mjs';
4
11
  import { collectIds, checkDuplicates, checkRefs, checkLabels, checkAmbiguity, checkReadiness, checkPackage } from '../lib/checks.mjs';
5
12
 
6
13
  const load = () =>
@@ -186,3 +193,23 @@ test('a blank Part 4 section body is an empty section', () => {
186
193
  );
187
194
  assert.ok(checkPackage({ pkg: load(), md }).some((f) => f.includes('empty section') && f.includes('Part 4')));
188
195
  });
196
+
197
+ const validate = fileURLToPath(new URL('../validate.mjs', import.meta.url));
198
+
199
+ test('validate --json without --md checks the JSON only', () => {
200
+ const dir = mkdtempSync(join(tmpdir(), 'ba-json-only-'));
201
+ const { pkg } = loadWorkflow();
202
+ writeFileSync(join(dir, 'r.json'), JSON.stringify(pkg));
203
+ assert.match(execFileSync('node', [validate, '--json', join(dir, 'r.json')], { encoding: 'utf8' }), /requirements package valid/);
204
+ pkg.features[0].steps = ['WF-002:Nowhere'];
205
+ writeFileSync(join(dir, 'r.json'), JSON.stringify(pkg));
206
+ assert.throws(() => execFileSync('node', [validate, '--json', join(dir, 'r.json')], { stdio: 'pipe' }));
207
+ });
208
+
209
+ test('review and leftOut are no longer part of the package', () => {
210
+ const { pkg, md } = loadWorkflow();
211
+ pkg.leftOut = [{ id: 'FEAT-009' }];
212
+ pkg.features[0].review = { answer: 'maybe', date: '2026-10-07' };
213
+ assert.deepEqual(checkPackage({ pkg, md }), []);
214
+ assert.doesNotMatch(renderScope(pkg), /Reviewed by PO|Left out in review/);
215
+ });
@@ -0,0 +1,78 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "lead": "sin-kowa-mini",
4
+ "status": "ANALYZED",
5
+ "depth": "STANDARD",
6
+ "updated": "2026-10-06",
7
+ "mode": "greenfield",
8
+ "scopeMode": "workflow",
9
+ "mapLabel": "IMDA roadmap pillar",
10
+ "context": {
11
+ "problem": "Clients dispute charges after the ship sails and there is no record of what was packed.",
12
+ "goals": [
13
+ { "id": "G-001", "goal": "Stop billing disputes after sailing", "metric": "disputes per month down 50% in 6 months", "source": "PO brief" }
14
+ ],
15
+ "successMetrics": ["disputes per month down 50% within 6 months of go-live"]
16
+ },
17
+ "actors": [
18
+ { "id": "ACT-001", "name": "Packer", "type": "human", "goal": "pack an order without paper lists", "painPoints": ["packs from a printed list"] },
19
+ { "id": "ACT-002", "name": "Office staff", "type": "human", "goal": "invoice the moment goods are delivered", "painPoints": ["waits weeks for the paper delivery order"] }
20
+ ],
21
+ "workflows": [
22
+ { "id": "WF-001", "name": "Order to invoice today", "state": "as-is", "trigger": "ship sends an order by email or phone", "steps": ["office staff key the order in", "warehouse packs from a paper list", "paper delivery order signed at the dock", "invoice raised when the paper returns"], "exceptions": ["client disputes a charge after sailing"] },
23
+ { "id": "WF-002", "name": "Order pipeline", "state": "to-be", "label": "confirmed", "source": "PO brief, System 1", "trigger": "order confirmed by office staff", "steps": ["Order In", "Pack", "Pack Review", "Shipped"], "branches": [{ "from": "Pack", "to": "Short-pack alert", "label": "can't fulfil" }, { "from": "Pack Review", "to": "Pack", "label": "mismatch" }], "replaces": ["WF-001"], "exceptions": [] },
24
+ { "id": "WF-003", "name": "Order to cash", "state": "to-be", "label": "confirmed", "source": "PO brief, System 2", "trigger": "order received by email or phone", "steps": ["Order received", "Quote", "Invoice", "Paid"], "branches": [], "replaces": ["WF-001"], "exceptions": [] },
25
+ { "id": "WF-004", "name": "Custom order", "state": "to-be", "label": "confirmed", "source": "PO brief, System 2 sub-flow", "trigger": "order holds an item that is sourced, not stocked", "steps": ["Flag as custom", "Vendor PO", "Receive into stock"], "branches": [], "sub": { "startsAt": "WF-003:Order received", "rejoins": "WF-002", "share": "about 20% of orders" }, "exceptions": [] }
26
+ ],
27
+ "systems": [
28
+ { "id": "SYS-001", "name": "Warehouse operations", "purpose": "Moves an order from intake to the dock; the one screen a warehouse worker needs.", "map": "Warehouse Automation", "label": "confirmed", "source": "PO brief, System 1", "workflows": ["WF-002"], "features": ["FEAT-001", "FEAT-002"] },
29
+ { "id": "SYS-002", "name": "Orders & invoicing", "purpose": "Quotation through to a paid invoice.", "map": "Finance/Documentation", "label": "confirmed", "source": "PO brief, System 2", "workflows": ["WF-003", "WF-004"], "features": ["FEAT-003", "FEAT-004", "FEAT-005"] }
30
+ ],
31
+ "features": [
32
+ { "id": "FEAT-001", "name": "Order pipeline & stage engine", "does": "Moves an order through each stage, with task views per role", "label": "confirmed", "source": "PO brief, System 1", "steps": ["WF-002:Order In", "WF-002:Pack", "WF-002:Pack Review", "WF-002:Shipped"], "requirements": ["FR-001"] },
33
+ { "id": "FEAT-002", "name": "Short-pack alert", "does": "Flags an item that cannot be packed, in time to buy or cancel", "label": "confirmed", "source": "PO brief, System 1", "steps": ["WF-002:Short-pack alert"], "requirements": ["FR-002"] },
34
+ { "id": "FEAT-003", "name": "Order intake & quotation", "does": "Captures email and phone orders and prices them", "label": "confirmed", "source": "PO brief, System 2", "steps": ["WF-003:Order received", "WF-003:Quote", "WF-004:Flag as custom"], "requirements": ["FR-003"] },
35
+ { "id": "FEAT-004", "name": "Invoice from packed quantities", "does": "Raises the invoice from what was packed and shipped", "label": "confirmed", "source": "PO brief, System 2", "steps": ["WF-002:Shipped", "WF-003:Invoice", "WF-003:Paid"], "requirements": ["FR-004"] },
36
+ { "id": "FEAT-005", "name": "One login, role-based screens", "does": "One login; packers see packing tasks, office staff see orders and invoices", "label": "confirmed", "source": "PO brief, System 1", "steps": ["*"], "requirements": ["FR-005"] }
37
+ ],
38
+ "requirements": [
39
+ { "id": "FR-001", "text": "The system must move each order through the stages Order In, Pack, Pack Review and Shipped.", "label": "confirmed", "source": "PO brief, System 1", "traces": { "goal": "G-001", "workflow": "WF-002", "rules": [] }, "scope": "in", "acceptance": [] },
40
+ { "id": "FR-002", "text": "The system must let a packer flag an item that cannot be packed and alert office staff.", "label": "confirmed", "source": "PO brief, System 1", "traces": { "goal": "G-001", "workflow": "WF-002", "rules": [] }, "scope": "in", "acceptance": [] },
41
+ { "id": "FR-003", "text": "Office staff must be able to enter an order received by email or phone and produce a quotation.", "label": "confirmed", "source": "PO brief, System 2", "traces": { "goal": "G-001", "workflow": "WF-003", "rules": [] }, "scope": "in", "acceptance": [] },
42
+ { "id": "FR-004", "text": "The system must raise the invoice from packed-and-audited quantities.", "label": "assumed", "source": "PO brief, System 2", "traces": { "goal": "G-001", "workflow": "WF-003", "rules": ["BR-001"] }, "scope": "in", "acceptance": ["SC-001"] },
43
+ { "id": "FR-005", "text": "The system must provide one login, with packers limited to packing tasks.", "label": "confirmed", "source": "PO brief, System 1", "traces": { "goal": "G-001", "workflow": "WF-002", "rules": [] }, "scope": "in", "acceptance": [] },
44
+ { "id": "FR-006", "text": "The system must print a pallet label at the Pack stage.", "label": "assumed", "source": "PO brief, System 4", "traces": { "goal": "G-001", "workflow": "WF-002", "rules": [] }, "scope": "future", "acceptance": [] }
45
+ ],
46
+ "businessRules": [
47
+ { "id": "BR-001", "rule": "Invoice quantity equals packed-and-audited quantity.", "source": "PO brief, System 2", "examples": ["ordered 10, packed 10 -> invoice 10", "ordered 10, packed 8 -> invoice 8"] }
48
+ ],
49
+ "scenarios": [
50
+ { "id": "SC-001", "requirement": "FR-004", "type": "happy", "given": "an order of 10 items with 8 packed", "when": "the invoice is raised", "then": "it bills 8 items" }
51
+ ],
52
+ "nfrs": [
53
+ { "id": "NFR-001", "area": "availability", "text": "Scans made without connectivity must be kept and synced within 5 minutes of reconnecting.", "label": "assumed" }
54
+ ],
55
+ "integrations": [
56
+ { "id": "INT-001", "system": "InvoiceNow network", "direction": "write", "label": "recommended" }
57
+ ],
58
+ "data": [
59
+ { "id": "DAT-001", "entity": "Order", "sensitivity": "commercial", "volume": "about 300 per month", "label": "assumed" }
60
+ ],
61
+ "constraints": [
62
+ { "id": "CON-001", "text": "Vessels are offline at sea; delivery orders are signed on paper at the dock today.", "source": "PO brief" }
63
+ ],
64
+ "assumptions": [
65
+ { "id": "ASM-001", "text": "Packers carry a phone with a camera on the warehouse floor.", "impact": "medium", "status": "unconfirmed" }
66
+ ],
67
+ "openQuestions": [
68
+ { "id": "Q-001", "question": "Should the invoice be raised at shipping, or when the delivery order is signed?", "priority": "P2", "reason": "decides the invoice trigger", "affects": ["FEAT-004", "INT-001"], "status": "open", "answer": null, "architectureBlocker": false }
69
+ ],
70
+ "conflicts": [],
71
+ "scope": { "out": ["last-mile delivery tracking"], "future": ["pallet labels"], "unconfirmed": [] },
72
+ "ai": null,
73
+ "readiness": {
74
+ "overall": 63,
75
+ "areas": { "businessContext": 80, "workflows": 70, "rules": 60, "integrations": 50, "data": 60, "nfrs": 60 },
76
+ "blockers": []
77
+ }
78
+ }
@@ -0,0 +1,136 @@
1
+ ---
2
+ lead: sin-kowa-mini
3
+ status: ANALYZED
4
+ depth: STANDARD
5
+ scopeMode: workflow
6
+ updated: 2026-10-06
7
+ readiness: 63
8
+ ---
9
+
10
+ # Requirements — Sin Kowa (mini)
11
+
12
+ Source: PO brief, trimmed to two systems for tests.
13
+
14
+ ## Part 1 — Discovery Brief
15
+
16
+ Problem: clients dispute charges after the ship sails and there is no record of what was packed.
17
+
18
+ | ID | Goal | Metric |
19
+ | --- | --- | --- |
20
+ | G-001 | Stop billing disputes after sailing | disputes per month down 50% in 6 months |
21
+
22
+ Constraints: CON-001 — vessels are offline at sea; delivery orders are signed on paper today.
23
+
24
+ ## Part 2 — Process & Domain
25
+
26
+ As-is workflow WF-001 (order to invoice today): office staff (ACT-002) key the order in →
27
+ the packer (ACT-001) packs from a paper list → paper delivery order signed at the dock →
28
+ invoice raised when the paper returns.
29
+
30
+ | ID | Rule | Examples |
31
+ | --- | --- | --- |
32
+ | BR-001 | Invoice quantity equals packed-and-audited quantity | ordered 10, packed 8 → invoice 8 |
33
+
34
+ <!-- scope:start -->
35
+
36
+ ### To-be scope
37
+
38
+ What we propose to build: 2 systems, each shown as its workflows and then the features that serve them.
39
+
40
+ | ID | System | Purpose | IMDA roadmap pillar |
41
+ | --- | --- | --- | --- |
42
+ | SYS-001 | Warehouse operations | Moves an order from intake to the dock; the one screen a warehouse worker needs. | Warehouse Automation |
43
+ | SYS-002 | Orders & invoicing | Quotation through to a paid invoice. | Finance/Documentation |
44
+
45
+ ### SYS-001 Warehouse operations
46
+
47
+ Moves an order from intake to the dock; the one screen a warehouse worker needs. Replaces today's "Order to invoice today".
48
+
49
+ **Main workflow: WF-002 Order pipeline**
50
+
51
+ ```mermaid
52
+ flowchart LR
53
+ n0 --> n1
54
+ n1 --> n2
55
+ n2 --> n3
56
+ n1 -.->|can't fulfil| n4
57
+ n2 -.->|mismatch| n1
58
+ n0["Order In"]
59
+ n1["Pack"]
60
+ n2["Pack Review"]
61
+ n3["Shipped"]
62
+ n4["Short-pack alert"]
63
+ ```
64
+
65
+ | ID | Feature | What it does | Where in the workflow | Requirements |
66
+ | --- | --- | --- | --- | --- |
67
+ | FEAT-001 | Order pipeline & stage engine | Moves an order through each stage, with task views per role | Order In → Pack → Pack Review → Shipped | FR-001 |
68
+ | FEAT-002 | Short-pack alert | Flags an item that cannot be packed, in time to buy or cancel | Short-pack alert | FR-002 |
69
+
70
+ ### SYS-002 Orders & invoicing
71
+
72
+ Quotation through to a paid invoice. Replaces today's "Order to invoice today".
73
+
74
+ **Main workflow: WF-003 Order to cash**
75
+
76
+ ```mermaid
77
+ flowchart LR
78
+ n0 --> n1
79
+ n1 --> n2
80
+ n2 --> n3
81
+ n0["Order received"]
82
+ n1["Quote"]
83
+ n2["Invoice"]
84
+ n3["Paid"]
85
+ ```
86
+
87
+ **Sub-workflow: WF-004 Custom order** — starts at Order received, rejoins Order pipeline · about 20% of orders
88
+
89
+ ```mermaid
90
+ flowchart LR
91
+ n0 --> n1
92
+ n1 --> n2
93
+ n0["Flag as custom"]
94
+ n1["Vendor PO"]
95
+ n2["Receive into stock"]
96
+ ```
97
+
98
+ | ID | Feature | What it does | Where in the workflow | Requirements |
99
+ | --- | --- | --- | --- | --- |
100
+ | FEAT-003 | Order intake & quotation | Captures email and phone orders and prices them | Order received → Quote; Flag as custom | FR-003 |
101
+ | FEAT-004 | Invoice from packed quantities | Raises the invoice from what was packed and shipped | Shipped (in Order pipeline); Invoice → Paid | FR-004 |
102
+ | FEAT-005 | One login, role-based screens | One login; packers see packing tasks, office staff see orders and invoices | every step | FR-005 |
103
+
104
+ <!-- scope:end -->
105
+
106
+ ## Part 3 — Requirements
107
+
108
+ Scope — out: last-mile delivery tracking. Future: pallet labels.
109
+
110
+ | ID | Requirement | Label | Scope | Feature |
111
+ | --- | --- | --- | --- | --- |
112
+ | FR-001 | Move each order through Order In, Pack, Pack Review, Shipped | confirmed | in | Order pipeline & stage engine |
113
+ | FR-002 | Packer flags an item that cannot be packed; office alerted | confirmed | in | Short-pack alert |
114
+ | FR-003 | Enter an email or phone order and produce a quotation | confirmed | in | Order intake & quotation |
115
+ | FR-004 | Raise the invoice from packed-and-audited quantities | assumed | in | Invoice from packed quantities |
116
+ | FR-005 | One login; packers limited to packing tasks | confirmed | in | One login, role-based screens |
117
+ | FR-006 | Print a pallet label at Pack | assumed | future | — |
118
+
119
+ NFR-001 (availability, assumed): offline scans synced within 5 minutes of reconnecting.
120
+ INT-001: write invoices to the InvoiceNow network (recommended).
121
+ DAT-001: Order — commercial, about 300 per month (assumed).
122
+
123
+ ## Part 4 — Acceptance Scenarios
124
+
125
+ | ID | Given | When | Then |
126
+ | --- | --- | --- | --- |
127
+ | SC-001 | an order of 10 items with 8 packed | the invoice is raised | it bills 8 items |
128
+
129
+ ## Part 5 — Readiness Report
130
+
131
+ Readiness: 63%. Areas — businessContext 80, workflows 70, rules 60,
132
+ integrations 50, data 60, nfrs 60.
133
+
134
+ Open questions: Q-001 (P2) — invoice at shipping or at the signed delivery order?
135
+ Assumptions: ASM-001 (medium impact, unconfirmed) — packers carry a camera phone.
136
+ Blockers: none. Conflicts: none.