@v11g/agents-rock 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/package.json +2 -2
- package/plugins/business-analyst/.claude-plugin/plugin.json +2 -2
- package/plugins/business-analyst/evals/ba-interview-conflict/graders/conflict-quoted.md +15 -0
- package/plugins/business-analyst/evals/ba-interview-conflict/graders/no-internal-ids.md +9 -0
- package/plugins/business-analyst/evals/ba-interview-conflict/graders/one-question.md +15 -0
- package/plugins/business-analyst/evals/ba-interview-conflict/graders/skill-fired.md +7 -0
- package/plugins/business-analyst/evals/ba-interview-conflict/prompt.md +31 -0
- package/plugins/business-analyst/evals/ba-interview-first-turn/graders/no-internal-ids.md +9 -0
- package/plugins/business-analyst/evals/ba-interview-first-turn/graders/no-setup-questions.md +16 -0
- package/plugins/business-analyst/evals/ba-interview-first-turn/graders/one-scope-question.md +19 -0
- package/plugins/business-analyst/evals/ba-interview-first-turn/graders/skill-fired.md +7 -0
- package/plugins/business-analyst/evals/ba-interview-first-turn/prompt.md +31 -0
- package/plugins/business-analyst/evals/ba-review-page/case.yaml +4 -0
- package/plugins/business-analyst/evals/ba-review-page/fixture.sh +12 -0
- package/plugins/business-analyst/evals/ba-review-page/graders/decide-in-interview.md +26 -0
- package/plugins/business-analyst/evals/ba-review-page/graders/skill-fired.md +7 -0
- package/plugins/business-analyst/evals/ba-review-page/prompt.md +9 -0
- package/plugins/business-analyst/evals/draft-scope-rich/case.yaml +4 -0
- package/plugins/business-analyst/evals/draft-scope-rich/fixture.sh +5 -0
- package/plugins/business-analyst/evals/draft-scope-rich/graders/conflict-question.md +11 -0
- package/plugins/business-analyst/evals/draft-scope-rich/graders/keep-and-exclude.md +14 -0
- package/plugins/business-analyst/evals/draft-scope-rich/graders/noise-and-shape.md +13 -0
- package/plugins/business-analyst/evals/draft-scope-rich/graders/problem-not-solution.md +13 -0
- package/plugins/business-analyst/evals/draft-scope-rich/graders/share-kept.md +11 -0
- package/plugins/business-analyst/evals/draft-scope-rich/graders/skill-fired.md +7 -0
- package/plugins/business-analyst/evals/draft-scope-rich/graders/vague-word.md +13 -0
- package/plugins/business-analyst/evals/draft-scope-rich/inputs/C1.txt +10 -0
- package/plugins/business-analyst/evals/draft-scope-rich/inputs/E1.txt +5 -0
- package/plugins/business-analyst/evals/draft-scope-rich/inputs/E2.txt +5 -0
- package/plugins/business-analyst/evals/draft-scope-rich/inputs/E3.txt +5 -0
- package/plugins/business-analyst/evals/draft-scope-rich/prompt.md +9 -0
- package/plugins/business-analyst/evals/draft-scope-thin/case.yaml +4 -0
- package/plugins/business-analyst/evals/draft-scope-thin/fixture.sh +4 -0
- package/plugins/business-analyst/evals/draft-scope-thin/graders/no-invention.md +18 -0
- package/plugins/business-analyst/evals/draft-scope-thin/graders/skill-fired.md +7 -0
- package/plugins/business-analyst/evals/draft-scope-thin/inputs/E1.txt +5 -0
- package/plugins/business-analyst/evals/draft-scope-thin/prompt.md +8 -0
- package/plugins/business-analyst/skills/business-analyst/README.md +8 -0
- package/plugins/business-analyst/skills/business-analyst/SKILL.md +47 -16
- package/plugins/business-analyst/skills/business-analyst/assets/review-page.html +68 -0
- package/plugins/business-analyst/skills/business-analyst/evals/evals.json +1 -1
- package/plugins/business-analyst/skills/business-analyst/references/frameworks.md +3 -2
- package/plugins/business-analyst/skills/business-analyst/references/interview.md +156 -8
- package/plugins/business-analyst/skills/business-analyst/references/review.md +18 -4
- package/plugins/business-analyst/skills/business-analyst/references/writing.md +49 -8
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_data.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_layout.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_page.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_checks.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_render.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/validate.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/checks.mjs +12 -6
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/review-data.mjs +66 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/review-layout.mjs +53 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/review-page.mjs +78 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-checks.mjs +73 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-md.mjs +53 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-render.mjs +72 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-rules.mjs +90 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/review.mjs +48 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/review.py +60 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/review_data.py +81 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/review_layout.py +50 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/review_page.py +115 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/scope.mjs +24 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/scope.py +35 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/scope_checks.py +168 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/scope_render.py +140 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/checks.test.mjs +27 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-workflow-pass.json +78 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-workflow-pass.md +136 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/python-parity.test.mjs +88 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/quality-gates.test.mjs +26 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/review-browser.test.mjs +106 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/review-fixture.mjs +32 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/review-page.test.mjs +340 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/review-parity.test.mjs +79 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/scope-cases.mjs +58 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/scope-checks.test.mjs +31 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/scope-md.test.mjs +140 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/validate.mjs +1 -1
- package/plugins/business-analyst/skills/business-analyst/scripts/validate.py +17 -8
- package/plugins/business-analyst/skills/draft-scope/SKILL.md +46 -0
- package/plugins/business-analyst/skills/draft-scope/references/credits.md +12 -0
- package/plugins/business-analyst/skills/draft-scope/references/draft-schema.md +44 -0
- package/plugins/business-analyst/skills/draft-scope/references/rules.md +24 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_body.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_flow.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_package.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_xml.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_quotes.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_rules.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_schema.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/build_docx.py +36 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/check.py +53 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/docx_body.py +58 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/docx_flow.py +52 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/docx_package.py +62 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/docx_xml.py +44 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/draft_quotes.py +49 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/draft_rules.py +106 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/draft_schema.py +87 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/test/build-docx.test.mjs +76 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/test/check-rules.test.mjs +131 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/test/check-shape.test.mjs +70 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/test/fixtures/draft-pass.json +40 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/test/fixtures/sources/C1.txt +7 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/test/fixtures/sources/E1.txt +5 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/test/gates.test.mjs +39 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/test/helpers.mjs +30 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/test/skill-files.test.mjs +59 -0
- package/plugins/business-analyst/skills/draft-scope/steps/assumptions.md +24 -0
- package/plugins/business-analyst/skills/draft-scope/steps/check.md +24 -0
- package/plugins/business-analyst/skills/draft-scope/steps/discover.md +53 -0
- package/plugins/business-analyst/skills/draft-scope/steps/draft.md +64 -0
- package/plugins/solution-architect/.claude-plugin/plugin.json +1 -1
- package/plugins/solution-architect/evals/proposal-workflow/case.yaml +6 -0
- package/plugins/solution-architect/evals/proposal-workflow/fixture.sh +6 -0
- package/plugins/solution-architect/evals/proposal-workflow/graders/inputs-written.md +23 -0
- package/plugins/solution-architect/evals/proposal-workflow/graders/no-proposal-md.md +7 -0
- package/plugins/solution-architect/evals/proposal-workflow/graders/skill-fired.md +7 -0
- package/plugins/solution-architect/evals/proposal-workflow/graders/validate-then-render.md +16 -0
- package/plugins/solution-architect/evals/proposal-workflow/prompt.md +10 -0
- package/plugins/solution-architect/evals/workflow-gate-no-architecture/case.yaml +4 -0
- package/plugins/solution-architect/evals/workflow-gate-no-architecture/fixture.sh +6 -0
- package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/no-classic-fallback.md +10 -0
- package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/nothing-written.md +7 -0
- package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/skill-fired.md +7 -0
- package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/stops-at-gate.md +11 -0
- package/plugins/solution-architect/evals/workflow-gate-no-architecture/prompt.md +7 -0
- package/plugins/solution-architect/evals/workflow-happy-path/case.yaml +4 -0
- package/plugins/solution-architect/evals/workflow-happy-path/fixture.sh +6 -0
- package/plugins/solution-architect/evals/workflow-happy-path/graders/no-estimation-md.md +7 -0
- package/plugins/solution-architect/evals/workflow-happy-path/graders/pages-or-stop.md +16 -0
- package/plugins/solution-architect/evals/workflow-happy-path/graders/routed-to-workflow.md +12 -0
- package/plugins/solution-architect/evals/workflow-happy-path/graders/skill-fired.md +7 -0
- package/plugins/solution-architect/evals/workflow-happy-path/graders/three-questions-max.md +14 -0
- package/plugins/solution-architect/evals/workflow-happy-path/graders/workflow-or-exact-stop.md +15 -0
- package/plugins/solution-architect/evals/workflow-happy-path/prompt.md +9 -0
- package/plugins/solution-architect/skills/analyze-requirements/SKILL.md +8 -7
- package/plugins/solution-architect/skills/analyze-requirements/assets/section-help.json +5 -5
- package/plugins/solution-architect/skills/analyze-requirements/assets/viewer-template.html +26 -4
- package/plugins/solution-architect/skills/analyze-requirements/evals/evals.json +50 -6
- package/plugins/solution-architect/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.json +31 -0
- package/plugins/solution-architect/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.md +17 -0
- package/plugins/solution-architect/skills/analyze-requirements/evals/fixtures/transcript-citations/C1-kickoff-call.txt +16 -0
- package/plugins/solution-architect/skills/analyze-requirements/evals/fixtures/transcript-citations/E1-intro-email.md +9 -0
- package/plugins/solution-architect/skills/analyze-requirements/references/extract.md +108 -0
- package/plugins/solution-architect/skills/analyze-requirements/references/interview.md +39 -5
- package/plugins/solution-architect/skills/analyze-requirements/references/project-types.md +1 -1
- package/plugins/solution-architect/skills/analyze-requirements/references/quality-goals.md +84 -0
- package/plugins/solution-architect/skills/analyze-requirements/references/research.md +1 -1
- package/plugins/solution-architect/skills/analyze-requirements/references/rewriting.md +7 -2
- package/plugins/solution-architect/skills/analyze-requirements/references/viewer.md +10 -6
- package/plugins/solution-architect/skills/analyze-requirements/references/writing.md +45 -3
- package/plugins/solution-architect/skills/analyze-requirements/scripts/ba-facts.mjs +32 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/check-quotes.mjs +39 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/ba-package.mjs +75 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/doc-links.mjs +19 -7
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/doc-routes.mjs +1 -1
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/inputs.mjs +42 -11
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/md-render.mjs +15 -4
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/section-help.mjs +1 -1
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/strategy-sections.mjs +30 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-provenance.mjs +14 -2
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-quotes.mjs +55 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-strategy.mjs +65 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/render.mjs +18 -5
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/ba-facts-cli.test.mjs +55 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/ba-package-cli.test.mjs +101 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/ba-package.test.mjs +115 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/browser.test.mjs +77 -2
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/check-quotes-cli.test.mjs +49 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/doc-links.test.mjs +49 -4
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/extract-workflow.test.mjs +69 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/inputs.test.mjs +14 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/md-render.test.mjs +19 -5
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/record-cli.test.mjs +1 -1
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/render.test.mjs +69 -2
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/rewriting.test.mjs +1 -1
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/section-help.test.mjs +6 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-provenance.test.mjs +19 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-quotes-cli.test.mjs +58 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-quotes.test.mjs +81 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-strategy-cli.test.mjs +32 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-strategy.test.mjs +118 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/validate.mjs +17 -6
- package/plugins/solution-architect/skills/analyze-requirements/workflows/extract.js +51 -0
- package/plugins/solution-architect/skills/estimate/README.md +18 -3
- package/plugins/solution-architect/skills/estimate/SKILL.md +18 -75
- package/plugins/solution-architect/skills/estimate/classic/FLOW.md +77 -0
- package/plugins/solution-architect/skills/estimate/classic/assets/estimate-template.html +1337 -0
- package/plugins/solution-architect/skills/estimate/{references → classic/references}/task-shapes.md +1 -1
- package/plugins/solution-architect/skills/estimate/{references → classic/references}/writing.md +2 -2
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/compute.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/checks.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/roadmap.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/rollup.mjs +5 -5
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/schema.mjs +4 -26
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-csv.mjs +2 -2
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-html.mjs +2 -2
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/render.mjs +8 -7
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/score-review.mjs +3 -3
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/baselines.test.mjs +3 -3
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/browser-agentic.test.mjs +2 -2
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/browser.test.mjs +2 -2
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/compute.test.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/e2e.test.mjs +6 -6
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/estimate-math.test.mjs +3 -3
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/measurements.test.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/pricing.test.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/project-price.test.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/quality-gates.test.mjs +7 -1
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/references.test.mjs +6 -6
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/render.test.mjs +3 -3
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/schema.test.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/score-review.test.mjs +6 -6
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/scoring.test.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/url-state.test.mjs +2 -2
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/validate.test.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/xlsx-export.test.mjs +3 -3
- package/plugins/solution-architect/skills/estimate/classic/scripts/test/zip-store.test.mjs +26 -0
- package/plugins/solution-architect/skills/estimate/evals/evals.json +37 -2
- package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +28 -0
- package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.json +79 -0
- package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.md +141 -0
- package/plugins/solution-architect/skills/estimate/shared/assets/xlsx-export.js +336 -0
- package/plugins/solution-architect/skills/estimate/shared/lib/agentic-task-schema.mjs +24 -0
- package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/context-schema.mjs +2 -2
- package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/inline.mjs +8 -0
- package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/scoring-schema.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/scoring.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/shared/lib/zip.mjs +60 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/FLOW.md +91 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-components.html +994 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-template.html +440 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimator-system.xlsx +0 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/assets/score-review.html +838 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/references/hidden-work-by-type.md +429 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/references/linking.md +59 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-components-template.mjs +80 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-template.mjs +60 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-workflow-template.mjs +51 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-xlsx-template.py +144 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/compute.mjs +32 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-html.mjs +44 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-view.mjs +71 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/pair-findings.mjs +19 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/requirements.mjs +33 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/rollup.mjs +66 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/schema-components.mjs +69 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/schema.mjs +70 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/score-diff.mjs +54 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/score-html.mjs +52 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/xlsx-rows.mjs +51 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/render.mjs +42 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/score-review.mjs +46 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/arch-link.js +9 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/click.js +28 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/prelude.js +4 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/view.js +63 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/browser.test.mjs +127 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/build-pages.test.mjs +43 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/build-template.test.mjs +18 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/cli.test.mjs +48 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/estimator-system.test.mjs +66 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/ARCHITECTURE-mini.md +31 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/feedback.json +19 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/inputs-pass.json +80 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/measurements.jsonl +0 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/requirements.json +79 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/page-view.test.mjs +54 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/pages-browser.test.mjs +209 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/quality-gates.test.mjs +25 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/render.test.mjs +54 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/requirements.test.mjs +33 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/rollup.test.mjs +80 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/schema.test.mjs +61 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/score-review.test.mjs +108 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/stage.mjs +32 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/workflow-script.test.mjs +24 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs +58 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/validate.mjs +19 -0
- package/plugins/solution-architect/skills/proposal/README.md +13 -0
- package/plugins/solution-architect/skills/proposal/SKILL.md +8 -0
- package/plugins/solution-architect/skills/proposal/assets/proposal-workflow.html +143 -0
- package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +31 -0
- package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation-inputs.json +468 -0
- package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation.json +773 -0
- package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/measurements.jsonl +0 -0
- package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/requirements.json +79 -0
- package/plugins/solution-architect/skills/proposal/references/review.md +11 -0
- package/plugins/solution-architect/skills/proposal/references/workflow.md +88 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/docx-body.mjs +42 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/docx-package.mjs +56 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/docx-xml.mjs +44 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-checks.mjs +71 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-cli.mjs +46 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-html.mjs +39 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-lead.mjs +45 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-page.mjs +30 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-view.mjs +80 -0
- package/plugins/solution-architect/skills/proposal/scripts/render.mjs +5 -1
- package/plugins/solution-architect/skills/proposal/scripts/test/docx.test.mjs +68 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/e2e.test.mjs +2 -2
- package/plugins/solution-architect/skills/proposal/scripts/test/evals-fixtures.test.mjs +9 -2
- package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-inputs-pass.json +17 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/render.test.mjs +2 -2
- package/plugins/solution-architect/skills/proposal/scripts/test/validate.test.mjs +2 -2
- package/plugins/solution-architect/skills/proposal/scripts/test/workflow-browser.test.mjs +96 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/workflow-checks.test.mjs +98 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/workflow-docs.test.mjs +25 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/workflow-render.test.mjs +75 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/workflow-stage.mjs +15 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/workflow-view.test.mjs +78 -0
- package/plugins/solution-architect/skills/proposal/scripts/validate.mjs +4 -1
- package/plugins/solution-architect/workflows/review-links.js +61 -0
- package/plugins/solution-architect/skills/estimate/assets/estimate-template.html +0 -1677
- /package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/estimate-template-agentic.html +0 -0
- /package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/scores-review-template.html +0 -0
- /package/plugins/solution-architect/skills/estimate/{references → classic/references}/agentic-estimation.md +0 -0
- /package/plugins/solution-architect/skills/estimate/{references → classic/references}/ai-multipliers.md +0 -0
- /package/plugins/solution-architect/skills/estimate/{references → classic/references}/interview.md +0 -0
- /package/plugins/solution-architect/skills/estimate/{references → classic/references}/scoring-guide.md +0 -0
- /package/plugins/solution-architect/skills/estimate/{references → classic/references}/slicing.md +0 -0
- /package/plugins/solution-architect/skills/estimate/{references → classic/references}/techniques.md +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/agentic-checks.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/components.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/md-tables.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/redact.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/scoring-checks.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-estimation-fail.md +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-estimation-pass.md +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-inputs.json +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/booking-inputs.json +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/estimation-fail.md +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/estimation-pass.md +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/measurements.jsonl +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/zip.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/validate.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/baselines.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/estimate-math.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/measurements.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/pricing.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/project-price.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/score-diff.mjs +0 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"""Draws the read-only review page; mirrors lib/review-page.mjs. Byte-identical
|
|
2
|
+
page, kept in lockstep by scripts/test/review-parity.test.mjs."""
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
from review_data import page_data
|
|
6
|
+
from review_layout import layout
|
|
7
|
+
|
|
8
|
+
ASSETS = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'assets')
|
|
9
|
+
TAG = '<span class="tag">★ New</span> '
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def esc(s):
|
|
13
|
+
return str(s).replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"')
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def src(added):
|
|
17
|
+
return f'<span class="src">Added: {esc(added)}</span>'
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def cell(area, cls, html):
|
|
21
|
+
return f'<div class="{cls}" style="grid-area:{area}">{html}</div>'
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def area(row, col, span):
|
|
25
|
+
return f'{row}/{col}/auto/span {span}' if span > 1 else f'{row}/{col}'
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def wide(cls, span):
|
|
29
|
+
return f'{cls} wide' if span > 1 else cls
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def step_cells(lanes):
|
|
33
|
+
out = []
|
|
34
|
+
for i, l in enumerate(lanes):
|
|
35
|
+
if i:
|
|
36
|
+
out.append(cell(f"1/{l['col'] - 1}", 'arrow', '→'))
|
|
37
|
+
out.append(cell(area(1, l['col'], l['span']), wide('step', l['span']), esc(l['name'])))
|
|
38
|
+
return out
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def branch_cells(x):
|
|
42
|
+
b, row, col, span = x['b'], 2 * x['depth'], x['col'], x['span']
|
|
43
|
+
label = f'<span class="lbl">{esc(b["label"])}</span>' if b['label'] else ''
|
|
44
|
+
box = (cell(area(row + 1, col, span), 'step back', f'↺ back to {esc(b["to"])}') if b['back']
|
|
45
|
+
else cell(area(row + 1, col, span), wide('step alt', span), esc(b['to'])))
|
|
46
|
+
return [cell(area(row, col, span), 'down', label), box]
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def flow_html(w):
|
|
50
|
+
s = w['sub']
|
|
51
|
+
cap = f"{'Sub-workflow' if s else 'Main workflow'} · {esc(w['name'])}"
|
|
52
|
+
if s:
|
|
53
|
+
cap += f" — starts at {esc(s['startsAt'])}"
|
|
54
|
+
cap += f", rejoins {esc(s['rejoins'])}" if s['rejoins'] else ''
|
|
55
|
+
cap += f" · {esc(s['share'])}" if s['share'] else ''
|
|
56
|
+
lanes, boxes = layout(w['steps'], w['branches'])
|
|
57
|
+
branches = [c for x in boxes for c in branch_cells(x)]
|
|
58
|
+
return '\n'.join([f'<p class="flow-name">{cap}</p>', '<div class="flow">', '<div class="grid">',
|
|
59
|
+
*step_cells(lanes), *branches, '</div>', '</div>'])
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def feature_row(f):
|
|
63
|
+
if not f['added']:
|
|
64
|
+
return f"<tr><td>{esc(f['name'])}</td><td>{esc(f['does'])}</td></tr>"
|
|
65
|
+
return f"<tr class=\"new\"><td>{TAG}{esc(f['name'])}{src(f['added'])}</td><td>{esc(f['does'])}</td></tr>"
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def system_html(s, i):
|
|
69
|
+
return '\n'.join(['<section>', f"<h2><span class=\"sysno\">System {i + 1}:</span> {esc(s['name'])}</h2>", f"<p>{esc(s['purpose'])}</p>",
|
|
70
|
+
*(flow_html(w) for w in s['flows']), '<table>', '<tr><th>Feature</th><th>What it does</th></tr>',
|
|
71
|
+
*(feature_row(f) for f in s['features']), '</table>', '</section>'])
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def assumptions_html(items):
|
|
75
|
+
if not items:
|
|
76
|
+
return []
|
|
77
|
+
lis = [f"<li class=\"new\">{TAG}{esc(a['text'])}{src(a['added'])}</li>" if a['added'] else f"<li>{esc(a['text'])}</li>"
|
|
78
|
+
for a in items]
|
|
79
|
+
return ['<section>', '<h2>Assumptions</h2>', '<ul>', *lis, '</ul>', '</section>']
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def count(k, word):
|
|
83
|
+
return f"{k} {word}{'' if k == 1 else 's'}"
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def summary(d):
|
|
87
|
+
feats = [f for s in d['systems'] for f in s['features']]
|
|
88
|
+
fresh = len([r for r in feats + d['assumptions'] if r['added']])
|
|
89
|
+
parts = [count(len(d['systems']), 'system'), count(len(feats), 'feature'), count(len(d['assumptions']), 'assumption')]
|
|
90
|
+
return ' · '.join(parts) + (f' · {TAG}{fresh} added in interview' if fresh else '')
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def body_html(d):
|
|
94
|
+
return '\n'.join(['<header>', f"<h1>{esc(d['title'])}</h1>",
|
|
95
|
+
f"<p class=\"byline\">Requirements review · {esc(d['date'])} · read-only</p>",
|
|
96
|
+
f'<p class="summary">{summary(d)}</p>', '</header>',
|
|
97
|
+
*(system_html(s, i) for i, s in enumerate(d['systems'])), *assumptions_html(d['assumptions'])])
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def fill(template, slot, value):
|
|
101
|
+
parts = template.split(slot)
|
|
102
|
+
if len(parts) != 2:
|
|
103
|
+
raise ValueError(f'template slot {slot} must appear once')
|
|
104
|
+
return value.join(parts)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def fill_page(template, title, body):
|
|
108
|
+
return fill(fill(template, '<!--@TITLE@-->', esc(title)), '<!--@BODY@-->', body)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def page_html(pkg, date):
|
|
112
|
+
with open(os.path.join(ASSETS, 'review-page.html'), encoding='utf-8') as f:
|
|
113
|
+
template = f.read()
|
|
114
|
+
d = page_data(pkg, date)
|
|
115
|
+
return fill_page(template, d['title'], body_html(d))
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { collectIds } from './lib/checks.mjs';
|
|
3
|
+
import { scopeIds } from './lib/scope-rules.mjs';
|
|
4
|
+
import { checkScope } from './lib/scope-checks.mjs';
|
|
5
|
+
import { applyScope, checkMarkers } from './lib/scope-md.mjs';
|
|
6
|
+
|
|
7
|
+
function parseArgs(argv) {
|
|
8
|
+
const args = {};
|
|
9
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
10
|
+
if (argv[i].startsWith('--')) args[argv[i].slice(2)] = argv[++i];
|
|
11
|
+
}
|
|
12
|
+
return args;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const args = parseArgs(process.argv.slice(2));
|
|
16
|
+
const pkg = JSON.parse(readFileSync(args.json, 'utf8'));
|
|
17
|
+
const md = readFileSync(args.md, 'utf8');
|
|
18
|
+
const findings = [...checkScope(pkg, new Set([...collectIds(pkg), ...scopeIds(pkg)])), ...checkMarkers(md)];
|
|
19
|
+
if (findings.length) {
|
|
20
|
+
console.error(findings.join('\n'));
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
writeFileSync(args.md, applyScope(md, pkg));
|
|
24
|
+
console.log(`scope written (${pkg.scopeMode ?? 'classic'})`);
|
|
@@ -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
|
+
}
|