@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,25 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { readFileSync } from 'node:fs';
|
|
4
|
+
import {
|
|
5
|
+
TEMPLATE_LIMITS, moduleFiles, templateScripts, violations,
|
|
6
|
+
} from '../../../../analyze-requirements/scripts/lib/quality-gate.mjs';
|
|
7
|
+
|
|
8
|
+
const base = new URL('../..', import.meta.url).pathname;
|
|
9
|
+
|
|
10
|
+
for (const file of moduleFiles(base, ['scripts/lib', 'scripts'])) {
|
|
11
|
+
test(`gates: ${file.replace(base, '')}`, () => {
|
|
12
|
+
assert.deepEqual(violations(readFileSync(file, 'utf8')), []);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
for (const { file, js } of templateScripts(base)) {
|
|
17
|
+
test(`gates: ${file.replace(base, '')}`, () => {
|
|
18
|
+
assert.deepEqual(violations(js, TEMPLATE_LIMITS), []);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const xlsxExport = new URL('../../../shared/assets/xlsx-export.js', import.meta.url).pathname;
|
|
23
|
+
test('gates: shared/assets/xlsx-export.js', () => {
|
|
24
|
+
assert.deepEqual(violations(readFileSync(xlsxExport, 'utf8'), TEMPLATE_LIMITS), []);
|
|
25
|
+
});
|
package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/render.test.mjs
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { execFileSync, spawnSync } from 'node:child_process';
|
|
4
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { staged, script } from './stage.mjs';
|
|
7
|
+
|
|
8
|
+
const pageOf = (html) => JSON.parse(/<script type="application\/json" id="page-data">([\s\S]*?)<\/script>/.exec(html)[1]);
|
|
9
|
+
const render = (dir, out = join(dir, 'dist')) => spawnSync('node', [script('render'), '--inputs', join(dir, 'estimation-inputs.json'), '--json', join(dir, 'estimation.json'), '--out', out]);
|
|
10
|
+
|
|
11
|
+
test('render writes both pages and warns when the viewer is missing', () => {
|
|
12
|
+
const dir = staged();
|
|
13
|
+
const r = render(dir);
|
|
14
|
+
assert.equal(r.status, 0, String(r.stderr));
|
|
15
|
+
assert.match(String(r.stdout), /Architecture viewer not found in dist\//);
|
|
16
|
+
const wf = readFileSync(join(dir, 'dist', 'estimate.html'), 'utf8');
|
|
17
|
+
assert.ok(!wf.includes('<!-- slot:'));
|
|
18
|
+
const p = pageOf(wf);
|
|
19
|
+
assert.equal(p.data.systems.length, 2);
|
|
20
|
+
assert.deepEqual(p.register.exclusions, ['last-mile delivery tracking', 'Hosting and third-party subscription fees']);
|
|
21
|
+
assert.equal(p.view.price.presentLow, JSON.parse(readFileSync(join(dir, 'estimation.json'), 'utf8')).computed.price.presentLow);
|
|
22
|
+
const cp = pageOf(readFileSync(join(dir, 'dist', 'estimate-components.html'), 'utf8'));
|
|
23
|
+
assert.deepEqual(cp.tasks['api.billing'][0], ['Three-way match', 1, 2.17, 4, 'UNCALIBRATED', '']);
|
|
24
|
+
assert.equal(cp.xlsx.rows.length, 5);
|
|
25
|
+
assert.equal(cp.arch, 'index.html');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
test('no warning when the architecture viewer sits in dist/', () => {
|
|
29
|
+
const dir = staged();
|
|
30
|
+
execFileSync('mkdir', ['-p', join(dir, 'dist')]);
|
|
31
|
+
writeFileSync(join(dir, 'dist', 'index.html'), '<!doctype html>');
|
|
32
|
+
const r = render(dir);
|
|
33
|
+
assert.equal(r.status, 0);
|
|
34
|
+
assert.doesNotMatch(String(r.stdout), /viewer not found/);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
test('render refuses a stale estimation.json and writes nothing', () => {
|
|
38
|
+
const dir = staged();
|
|
39
|
+
const est = JSON.parse(readFileSync(join(dir, 'estimation.json'), 'utf8'));
|
|
40
|
+
est.computed.features['FEAT-001'].point += 1;
|
|
41
|
+
writeFileSync(join(dir, 'estimation.json'), JSON.stringify(est));
|
|
42
|
+
const r = render(dir);
|
|
43
|
+
assert.equal(r.status, 1);
|
|
44
|
+
assert.match(String(r.stderr), /computed block differs/);
|
|
45
|
+
assert.equal(existsSync(join(dir, 'dist', 'estimate.html')), false);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
test('render refuses invalid inputs', () => {
|
|
49
|
+
const dir = staged();
|
|
50
|
+
const inputs = JSON.parse(readFileSync(join(dir, 'estimation-inputs.json'), 'utf8'));
|
|
51
|
+
inputs.exclusions = [''];
|
|
52
|
+
writeFileSync(join(dir, 'estimation-inputs.json'), JSON.stringify(inputs));
|
|
53
|
+
assert.equal(render(dir).status, 1);
|
|
54
|
+
});
|
package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/requirements.test.mjs
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { loadRequirements, loadPair, resolveRequirementsPath, featureProvenance } from '../lib/requirements.mjs';
|
|
5
|
+
|
|
6
|
+
const fx = (name) => fileURLToPath(new URL(`./fixtures/${name}`, import.meta.url));
|
|
7
|
+
|
|
8
|
+
test('loadRequirements indexes features, systems and workflows by id', () => {
|
|
9
|
+
const req = loadRequirements(fx('requirements.json'));
|
|
10
|
+
assert.equal(req.project, 'sin-kowa-mini');
|
|
11
|
+
assert.equal(req.features['FEAT-001'].name, 'Order pipeline & stage engine');
|
|
12
|
+
assert.equal(req.systemOf['FEAT-004'], 'SYS-002');
|
|
13
|
+
assert.equal(req.systemById['SYS-002'].name, 'Orders & invoicing');
|
|
14
|
+
assert.deepEqual(req.workflows['WF-002'].steps, ['Order In', 'Pack', 'Pack Review', 'Shipped']);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test('resolveRequirementsPath is relative to the inputs file', () => {
|
|
18
|
+
assert.equal(resolveRequirementsPath('/leads/x/estimation-inputs.json', { requirements: '../requirements.json' }), '/leads/requirements.json');
|
|
19
|
+
assert.equal(resolveRequirementsPath('/leads/x/estimation-inputs.json', {}), null);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
test('loadPair returns req null when the file is missing', () => {
|
|
23
|
+
const { inputs, req } = loadPair(fx('inputs-pass.json'));
|
|
24
|
+
assert.equal(inputs.scopeMode, 'workflow');
|
|
25
|
+
assert.equal(req.raw.scopeMode, 'workflow');
|
|
26
|
+
assert.equal(loadPair(fx('requirements.json')).req, null);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test('featureProvenance: confirmed → stated, anything else → proposed', () => {
|
|
30
|
+
assert.equal(featureProvenance({ label: 'confirmed' }), 'stated');
|
|
31
|
+
assert.equal(featureProvenance({ label: 'recommended' }), 'proposed');
|
|
32
|
+
assert.equal(featureProvenance({}), 'proposed');
|
|
33
|
+
});
|
package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/rollup.test.mjs
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { loadPair } from '../lib/requirements.mjs';
|
|
5
|
+
import { mainBuilder, computeWorkflowEstimation } from '../lib/rollup.mjs';
|
|
6
|
+
import { featurePrice } from '../../../shared/lib/pricing.mjs';
|
|
7
|
+
import { projectPrice } from '../../../shared/lib/project-price.mjs';
|
|
8
|
+
|
|
9
|
+
const fx = fileURLToPath(new URL('./fixtures/inputs-pass.json', import.meta.url));
|
|
10
|
+
|
|
11
|
+
test('mainBuilder: fewest builds wins; earliest milestone on a tie; undefined when nobody builds it', () => {
|
|
12
|
+
const comps = [
|
|
13
|
+
{ id: 'a', milestone: 'M2 - Later', builds: [{ feature: 'F1' }] },
|
|
14
|
+
{ id: 'b', milestone: 'M1 - First', builds: [{ feature: 'F1' }] },
|
|
15
|
+
{ id: 'c', milestone: 'M1 - First', builds: [{ feature: 'F1' }, { feature: 'F2' }] },
|
|
16
|
+
];
|
|
17
|
+
assert.equal(mainBuilder('F1', comps).id, 'b');
|
|
18
|
+
assert.equal(mainBuilder('F2', comps).id, 'c');
|
|
19
|
+
assert.equal(mainBuilder('F9', comps), undefined);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
test('mainBuilder: M2 sorts before M10 on a tie', () => {
|
|
23
|
+
const comps = [
|
|
24
|
+
{ id: 'late', milestone: 'M10 - Later', builds: [{ feature: 'F1' }] },
|
|
25
|
+
{ id: 'early', milestone: 'M2 - Earlier', builds: [{ feature: 'F1' }] },
|
|
26
|
+
];
|
|
27
|
+
assert.equal(mainBuilder('F1', comps).id, 'early');
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test('feature rows carry name, system, derived milestone, builders and the price', () => {
|
|
31
|
+
const { inputs, req } = loadPair(fx);
|
|
32
|
+
const { computed } = computeWorkflowEstimation(inputs, req, []);
|
|
33
|
+
const f1 = computed.features['FEAT-001'];
|
|
34
|
+
assert.equal(f1.name, 'Order pipeline & stage engine');
|
|
35
|
+
assert.equal(f1.system, 'Warehouse operations');
|
|
36
|
+
assert.equal(f1.milestone, 'M1 - Walking skeleton'); // api.stage (2 builds) beats office (3)
|
|
37
|
+
assert.deepEqual(f1.builtBy, ['api.stage', 'office']);
|
|
38
|
+
assert.equal(computed.features['FEAT-004'].milestone, 'M3 - Operations');
|
|
39
|
+
assert.equal(computed.features['FEAT-004'].provenance, 'proposed'); // BA label: recommended
|
|
40
|
+
assert.equal(computed.features['FEAT-005'].provenance, 'stated');
|
|
41
|
+
const p = featurePrice({ tech: 3, size: 3, deps: 2, unc: 3, risk: 3 });
|
|
42
|
+
assert.equal(f1.point, Math.round(p.point * 100) / 100);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test('a feature built only by milestone-less components gets milestone null', () => {
|
|
46
|
+
const { inputs, req } = loadPair(fx);
|
|
47
|
+
for (const c of inputs.components) delete c.milestone;
|
|
48
|
+
const { computed } = computeWorkflowEstimation(inputs, req, []);
|
|
49
|
+
assert.equal(computed.features['FEAT-001'].milestone, null);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
test('component rows sum agentic hours and list what they build', () => {
|
|
53
|
+
const { inputs, req } = loadPair(fx);
|
|
54
|
+
const { computed } = computeWorkflowEstimation(inputs, req, []);
|
|
55
|
+
const billing = computed.components['api.billing'];
|
|
56
|
+
assert.deepEqual(billing.builds, ['FEAT-005']);
|
|
57
|
+
assert.equal(billing.container, 'api');
|
|
58
|
+
assert.ok(billing.hours > 0 && billing.low <= billing.hours && billing.hours <= billing.high);
|
|
59
|
+
assert.deepEqual(Object.keys(billing.tasks), ['billing-docs', 'billing-match']);
|
|
60
|
+
assert.equal(computed.components.ops.hours, 0);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test('price equals the shared project roll-up over the same five features', () => {
|
|
64
|
+
const { inputs, req } = loadPair(fx);
|
|
65
|
+
const { computed } = computeWorkflowEstimation(inputs, req, []);
|
|
66
|
+
const priced = inputs.features.map(() => { const p = featurePrice({ tech: 3, size: 3, deps: 2, unc: 3, risk: 3 }); return { point: p.point, spread: p.spread, unc: 3, risk: 3 }; });
|
|
67
|
+
const want = projectPrice({ features: priced, levels: inputs.contextLevels });
|
|
68
|
+
assert.equal(computed.price.presentLow, Math.round(want.presentLow * 100) / 100);
|
|
69
|
+
assert.equal(computed.price.presentHigh, Math.round(want.presentHigh * 100) / 100);
|
|
70
|
+
assert.equal(computed.price.singleNumber, Math.round(want.singleNumber * 100) / 100);
|
|
71
|
+
assert.equal(Object.keys(computed.features).length, 5);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
test('each task carries its low and high hours beside the expected', () => {
|
|
75
|
+
const { inputs, req } = loadPair(fx);
|
|
76
|
+
const t = computeWorkflowEstimation(inputs, req, []).computed.components['api.billing'].tasks['billing-match'];
|
|
77
|
+
assert.equal(t.low, 1); // seed o 60 min, uncalibrated
|
|
78
|
+
assert.equal(t.e, 2.17); // PERT of 60/120/240 min
|
|
79
|
+
assert.equal(t.high, 4); // seed p 240 min
|
|
80
|
+
});
|
package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/schema.test.mjs
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { loadPair } from '../lib/requirements.mjs';
|
|
5
|
+
import { checkWorkflowInputs } from '../lib/schema.mjs';
|
|
6
|
+
|
|
7
|
+
const fx = fileURLToPath(new URL('./fixtures/inputs-pass.json', import.meta.url));
|
|
8
|
+
const load = () => loadPair(fx);
|
|
9
|
+
const comp = (inputs, id) => inputs.components.find((c) => c.id === id);
|
|
10
|
+
|
|
11
|
+
test('the fixture is valid', () => {
|
|
12
|
+
const { inputs, req } = load();
|
|
13
|
+
assert.deepEqual(checkWorkflowInputs(inputs, req), []);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const CASES = [
|
|
17
|
+
['W1 scopeMode', (i) => { i.scopeMode = 'classic'; }, 'scopeMode must be "workflow"'],
|
|
18
|
+
['W1 requirements not workflow', (i, r) => { r.raw.scopeMode = 'classic'; }, 'requirements: is not in workflow mode'],
|
|
19
|
+
['W2 traditional', (i) => { i.deliveryMode = 'traditional'; }, 'workflow mode is agentic + STANDARD only'],
|
|
20
|
+
['W2 DEEP', (i) => { i.depth = 'DEEP'; }, 'workflow mode is agentic + STANDARD only'],
|
|
21
|
+
['W2 agentContext', (i) => { delete i.agentContext.model; }, 'agentContext.agent and .model are required'],
|
|
22
|
+
['W3 extra feature', (i) => { i.features.push({ ...i.features[0], id: 'FEAT-009' }); }, 'feature FEAT-009: not in requirements.json'],
|
|
23
|
+
['W3 missing feature', (i) => { i.features.pop(); }, 'requirements FEAT-005: not scored'],
|
|
24
|
+
['W4 bad anchor', (i) => { i.features[0].scores.tech.anchor = 'nope'; }, 'scores.tech.anchor is not the guide'],
|
|
25
|
+
['W5 tasks on feature', (i) => { i.features[0].tasks = []; }, 'feature FEAT-001: "tasks" belongs on components in workflow mode'],
|
|
26
|
+
['W5 milestone on feature', (i) => { i.features[0].milestone = 'M1'; }, 'feature FEAT-001: "milestone" belongs on components in workflow mode'],
|
|
27
|
+
['W6 unbuilt feature', (i) => { comp(i, 'worker.drafter').builds = []; comp(i, 'worker.drafter').notEstimated = 'x'; }, 'feature FEAT-004: no component builds it'],
|
|
28
|
+
['W7 unknown feature in builds', (i) => { comp(i, 'api.billing').builds.push({ feature: 'FEAT-099', why: 'x' }); }, 'component api.billing: builds FEAT-099 unknown'],
|
|
29
|
+
['W7 missing why', (i) => { comp(i, 'api.billing').builds[0].why = ''; }, 'component api.billing: builds FEAT-005 without a why'],
|
|
30
|
+
['W8 no milestone', (i) => { delete comp(i, 'api.billing').milestone; }, 'component api.billing: builds features but has no milestone'],
|
|
31
|
+
['W8 no tasks', (i) => { comp(i, 'api.billing').tasks = []; }, 'component api.billing: builds features but has no tasks'],
|
|
32
|
+
['W8 bad task shape', (i) => { comp(i, 'api.billing').tasks[0].shape = 'magic'; }, 'task billing-match: unknown shape "magic"'],
|
|
33
|
+
['W8 orphan without reason', (i) => { delete comp(i, 'ops').notEstimated; }, 'component ops: no feature covers it'],
|
|
34
|
+
['W8 container builds', (i) => { comp(i, 'api').builds = [{ feature: 'FEAT-001', why: 'x' }]; }, 'component api: a container with components cannot build features'],
|
|
35
|
+
['W9 bad parent', (i) => { comp(i, 'api.stage').parent = 'nope'; }, 'component api.stage: parent "nope" not in roster'],
|
|
36
|
+
['W10 context missing', (i) => { delete i.contextLevels.compliance; }, 'contextLevels.compliance: must be an integer 1-4'],
|
|
37
|
+
['W10 familiarity', (i) => { i.contextLevels.stackFamiliarity = 2; i.contextProvenance.stackFamiliarity.level = 2; }, 'stackFamiliarity: level 2 needs a stated provenance'],
|
|
38
|
+
['W11 assumption source', (i) => { delete i.assumptions[0].source; }, 'assumption 0: source missing'],
|
|
39
|
+
['W3 duplicate feature', (i) => { i.features.push({ ...i.features[0] }); }, 'feature FEAT-001: duplicate id'],
|
|
40
|
+
['W7 duplicate build', (i) => { comp(i, 'api.billing').builds.push({ feature: 'FEAT-005', why: 'again' }); }, 'component api.billing: builds FEAT-005 twice'],
|
|
41
|
+
['W8 tasks on a non-building component', (i) => { comp(i, 'ops').tasks = [{ id: 'x' }]; }, 'component ops: tasks need a builds entry'],
|
|
42
|
+
['W8 tasks on a container', (i) => { comp(i, 'api').tasks = [{ id: 'x' }]; }, 'component api: tasks need a builds entry'],
|
|
43
|
+
['W8 notEstimated with builds', (i) => { comp(i, 'api.billing').notEstimated = 'x'; }, 'component api.billing: notEstimated but builds features'],
|
|
44
|
+
['components missing', (i) => { delete i.components; }, 'components roster is required in workflow mode'],
|
|
45
|
+
['W12 exclusions not a list', (i) => { i.exclusions = 'hosting'; }, 'exclusions must be a list of non-empty strings'],
|
|
46
|
+
['W12 empty exclusion', (i) => { i.exclusions = ['']; }, 'exclusions must be a list of non-empty strings'],
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
for (const [name, mutate, expected] of CASES) {
|
|
50
|
+
test(`refuses: ${name}`, () => {
|
|
51
|
+
const { inputs, req } = load();
|
|
52
|
+
mutate(inputs, req);
|
|
53
|
+
const out = checkWorkflowInputs(inputs, req);
|
|
54
|
+
assert.ok(out.some((f) => f.includes(expected)), `expected a finding containing "${expected}", got:\n${out.join('\n')}`);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
test('req null → only the file finding', () => {
|
|
59
|
+
const { inputs } = load();
|
|
60
|
+
assert.deepEqual(checkWorkflowInputs(inputs, null), ['requirements: file not found']);
|
|
61
|
+
});
|
package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/score-review.test.mjs
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { execFileSync } from 'node:child_process';
|
|
4
|
+
import { mkdtempSync, readFileSync, writeFileSync, copyFileSync } from 'node:fs';
|
|
5
|
+
import { tmpdir } from 'node:os';
|
|
6
|
+
import { join } from 'node:path';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import { loadPair } from '../lib/requirements.mjs';
|
|
9
|
+
import { pageData } from '../lib/score-html.mjs';
|
|
10
|
+
import { diffLinks, applyLinks, readFeedback } from '../lib/score-diff.mjs';
|
|
11
|
+
import { loadGuide } from '../../../shared/lib/scoring.mjs';
|
|
12
|
+
|
|
13
|
+
const fx = (n) => fileURLToPath(new URL(`./fixtures/${n}`, import.meta.url));
|
|
14
|
+
const script = fileURLToPath(new URL('../score-review.mjs', import.meta.url));
|
|
15
|
+
const feedback = () => JSON.parse(readFileSync(fx('feedback.json'), 'utf8'));
|
|
16
|
+
|
|
17
|
+
test('pageData maps the BA package and inputs into the page shape', () => {
|
|
18
|
+
const { inputs, req } = loadPair(fx('inputs-pass.json'));
|
|
19
|
+
const d = pageData({ inputs, req, guide: loadGuide() });
|
|
20
|
+
assert.equal(d.data.project, 'sin-kowa-mini');
|
|
21
|
+
assert.equal(d.data.systems.length, 2);
|
|
22
|
+
assert.equal(d.data.systems[0].main.id, 'WF-002');
|
|
23
|
+
assert.deepEqual(d.data.systems[1].subs.map((w) => w.id), ['WF-004']);
|
|
24
|
+
assert.deepEqual(d.data.systems[0].features.map((f) => f.id), ['FEAT-001', 'FEAT-002']);
|
|
25
|
+
assert.deepEqual(d.eng.map((c) => c.id).sort(), ['api.billing', 'api.orders', 'api.stage', 'office', 'ops', 'worker.drafter', 'worker.notify']);
|
|
26
|
+
assert.equal(d.eng.find((c) => c.id === 'api.billing').container, 'Core API');
|
|
27
|
+
assert.equal(d.eng.find((c) => c.id === 'office').container, 'Office Web App');
|
|
28
|
+
assert.deepEqual(d.implements['office'], ['FEAT-001', 'FEAT-003', 'FEAT-005']);
|
|
29
|
+
assert.deepEqual(d.scores['FEAT-001'], [3, 3, 2, 3, 3]);
|
|
30
|
+
assert.equal(d.anchor.tech.length, 5);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test('diffLinks and applyLinks move FEAT-004 from the drafter to orders', () => {
|
|
34
|
+
const { inputs } = loadPair(fx('inputs-pass.json'));
|
|
35
|
+
const links = diffLinks(inputs, feedback());
|
|
36
|
+
assert.deepEqual(links, [
|
|
37
|
+
{ component: 'api.orders', feature: 'FEAT-004', change: 'add' },
|
|
38
|
+
{ component: 'worker.drafter', feature: 'FEAT-004', change: 'remove' },
|
|
39
|
+
]);
|
|
40
|
+
const comps = applyLinks(inputs, links);
|
|
41
|
+
assert.deepEqual(comps.find((c) => c.id === 'api.orders').builds.map((b) => b.feature), ['FEAT-003', 'FEAT-004']);
|
|
42
|
+
assert.equal(comps.find((c) => c.id === 'api.orders').builds[1].why, 'linked by the engineer in the score review');
|
|
43
|
+
assert.deepEqual(comps.find((c) => c.id === 'worker.drafter').builds, []);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test('readFeedback: score diff, reasons, links and asks in one object', () => {
|
|
47
|
+
const { inputs } = loadPair(fx('inputs-pass.json'));
|
|
48
|
+
const r = readFeedback({ inputs, feedback: feedback(), guide: loadGuide() });
|
|
49
|
+
assert.deepEqual(r.diff, [{ id: 'FEAT-002', field: 'risk', from: 3, to: 4 }]);
|
|
50
|
+
assert.deepEqual(r.needsReason, []); // the engineer gave a reason
|
|
51
|
+
assert.equal(r.features.find((f) => f.id === 'FEAT-002').scores.risk.n, 4);
|
|
52
|
+
assert.equal(r.features.find((f) => f.id === 'FEAT-002').scoreProvenance, 'stated');
|
|
53
|
+
assert.equal(r.links.length, 2);
|
|
54
|
+
assert.deepEqual(r.asks, [{ feature: 'FEAT-004', note: 'a review screen for the draft is missing' }]);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test('unknown ids in feedback are ignored, not fatal', () => {
|
|
58
|
+
const { inputs } = loadPair(fx('inputs-pass.json'));
|
|
59
|
+
const fb = feedback();
|
|
60
|
+
fb.components.push({ id: 'ghost', implements: ['FEAT-001'] });
|
|
61
|
+
fb.features.push({ id: 'FEAT-099', scores: { tech: 1, size: 1, deps: 1, unc: 1, risk: 1 }, scoreNote: '' });
|
|
62
|
+
const r = readFeedback({ inputs, feedback: fb, guide: loadGuide() });
|
|
63
|
+
assert.equal(r.links.length, 2);
|
|
64
|
+
assert.equal(r.features.length, 5);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
test('CLI --write embeds the page data; --read prints the review object', () => {
|
|
68
|
+
const dir = mkdtempSync(join(tmpdir(), 'wf-sr-'));
|
|
69
|
+
copyFileSync(fx('inputs-pass.json'), join(dir, 'estimation-inputs.json'));
|
|
70
|
+
copyFileSync(fx('requirements.json'), join(dir, 'requirements.json'));
|
|
71
|
+
execFileSync('node', [script, '--write', join(dir, 'estimation-inputs.json'), '--out', join(dir, 'review.html')]);
|
|
72
|
+
const html = readFileSync(join(dir, 'review.html'), 'utf8');
|
|
73
|
+
assert.match(html, /<title>sin-kowa-mini — score review<\/title>/);
|
|
74
|
+
const data = JSON.parse(html.match(/<script type="application\/json" id="page-data">([\s\S]*?)<\/script>/)[1]);
|
|
75
|
+
assert.equal(data.data.systems.length, 2);
|
|
76
|
+
assert.doesNotMatch(html, /slot:/);
|
|
77
|
+
writeFileSync(join(dir, 'feedback.json'), JSON.stringify(feedback()));
|
|
78
|
+
const out = JSON.parse(execFileSync('node', [script, '--read', join(dir, 'feedback.json'), '--inputs', join(dir, 'estimation-inputs.json')], { encoding: 'utf8' }));
|
|
79
|
+
assert.equal(out.links.length, 2);
|
|
80
|
+
assert.equal(out.asks.length, 1);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
test('a component entry without implements is ignored, not fatal', () => {
|
|
84
|
+
const { inputs } = loadPair(fx('inputs-pass.json'));
|
|
85
|
+
const fb = feedback();
|
|
86
|
+
delete fb.components.find((c) => c.id === 'ops').implements;
|
|
87
|
+
assert.equal(diffLinks(inputs, fb).length, 2);
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
// The page keys saved browser state to this fingerprint, so a page rebuilt
|
|
91
|
+
// after the agent changed scores or links never restores stale edits.
|
|
92
|
+
test('pageData baseline changes when a score or a link changes', () => {
|
|
93
|
+
const { inputs, req } = loadPair(fx('inputs-pass.json'));
|
|
94
|
+
const base = pageData({ inputs, req, guide: loadGuide() }).baseline;
|
|
95
|
+
assert.match(base, /^[0-9a-f]{12}$/);
|
|
96
|
+
inputs.features[0].scores.tech.n = 4;
|
|
97
|
+
const moved = pageData({ inputs, req, guide: loadGuide() }).baseline;
|
|
98
|
+
assert.notEqual(moved, base);
|
|
99
|
+
inputs.components.find((c) => c.id === 'office').builds.pop();
|
|
100
|
+
assert.notEqual(pageData({ inputs, req, guide: loadGuide() }).baseline, moved);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
test('page data names the architecture viewer and the containers with a C3 view', () => {
|
|
104
|
+
const { inputs, req } = loadPair(fx('inputs-pass.json'));
|
|
105
|
+
const d = pageData({ inputs, req, guide: loadGuide() });
|
|
106
|
+
assert.equal(d.arch, 'index.html');
|
|
107
|
+
assert.deepEqual(d.c3, { 'Core API': 'api', 'Background Worker': 'worker' });
|
|
108
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// A computed sin-kowa-mini lead in a temp folder, for render and page tests.
|
|
2
|
+
import { execFileSync } from 'node:child_process';
|
|
3
|
+
import { mkdtempSync, readFileSync, writeFileSync, copyFileSync } from 'node:fs';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
|
|
8
|
+
export const script = (n) => fileURLToPath(new URL(`../${n}.mjs`, import.meta.url));
|
|
9
|
+
const fx = (n) => fileURLToPath(new URL(`./fixtures/${n}`, import.meta.url));
|
|
10
|
+
|
|
11
|
+
export function staged(mutate) {
|
|
12
|
+
const dir = mkdtempSync(join(tmpdir(), 'wf-render-'));
|
|
13
|
+
const inputs = JSON.parse(readFileSync(fx('inputs-pass.json'), 'utf8'));
|
|
14
|
+
inputs.measurementsPath = fx('measurements.jsonl');
|
|
15
|
+
if (mutate) mutate(inputs);
|
|
16
|
+
writeFileSync(join(dir, 'estimation-inputs.json'), JSON.stringify(inputs));
|
|
17
|
+
copyFileSync(fx('requirements.json'), join(dir, 'requirements.json'));
|
|
18
|
+
execFileSync('node', [script('compute'), '--inputs', join(dir, 'estimation-inputs.json'), '--out', join(dir, 'estimation.json')]);
|
|
19
|
+
return dir;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// SYS-002 as a PO document that lists features but draws no workflow: the
|
|
23
|
+
// system owns none and its features sit on no step (BA 0.4.0 allows it).
|
|
24
|
+
export function noFlowsAt(dir) {
|
|
25
|
+
const path = join(dir, 'requirements.json');
|
|
26
|
+
const req = JSON.parse(readFileSync(path, 'utf8'));
|
|
27
|
+
const gone = new Set(['WF-003', 'WF-004']);
|
|
28
|
+
req.workflows = req.workflows.filter((w) => !gone.has(w.id));
|
|
29
|
+
req.systems[1].workflows = [];
|
|
30
|
+
for (const f of req.features.slice(2, 4)) f.steps = [];
|
|
31
|
+
writeFileSync(path, JSON.stringify(req));
|
|
32
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { readFileSync } from 'node:fs';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
|
|
6
|
+
const path = fileURLToPath(new URL('../../../../../workflows/review-links.js', import.meta.url));
|
|
7
|
+
|
|
8
|
+
test('review-links.js starts with a literal meta and has the two phases', () => {
|
|
9
|
+
const src = readFileSync(path, 'utf8');
|
|
10
|
+
assert.match(src, /^export const meta = \{/);
|
|
11
|
+
const meta = src.slice(0, src.indexOf('\n}\n') + 2);
|
|
12
|
+
assert.doesNotMatch(meta, /\$\{|\.\.\.|\w+\(/); // pure literal: no interpolation, spread or call
|
|
13
|
+
assert.match(src, /phase\('Review'\)/);
|
|
14
|
+
assert.match(src, /phase\('Verify'\)/);
|
|
15
|
+
assert.match(src, /return verified\.filter\(Boolean\)\.filter\(\(f\) => f\.verdict === 'ACCEPT'\)/);
|
|
16
|
+
assert.doesNotMatch(src, /Date\.now|Math\.random|import\(/);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
test('review-links keeps the proposer\'s why and survives a skipped reviewer', () => {
|
|
20
|
+
const src = readFileSync(path, 'utf8');
|
|
21
|
+
assert.match(src, /review\?\.findings \?\? \[\]/);
|
|
22
|
+
assert.doesNotMatch(src, /\{ \.\.\.f, \.\.\.v \}/); // a verdict must not overwrite the link's why
|
|
23
|
+
assert.match(src, /verifyWhy: v\.why/);
|
|
24
|
+
});
|
package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { loadPair } from '../lib/requirements.mjs';
|
|
5
|
+
import { computeWorkflowEstimation } from '../lib/rollup.mjs';
|
|
6
|
+
import { xlsxRows } from '../lib/xlsx-rows.mjs';
|
|
7
|
+
|
|
8
|
+
const fx = fileURLToPath(new URL('./fixtures/inputs-pass.json', import.meta.url));
|
|
9
|
+
function rows(editReq) {
|
|
10
|
+
const { inputs, req } = loadPair(fx);
|
|
11
|
+
if (editReq) editReq(req);
|
|
12
|
+
return xlsxRows(computeWorkflowEstimation(inputs, req, []), req);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
test('one row per feature, grouped by system in requirements order, main builder sets milestone and container', () => {
|
|
16
|
+
const r = rows();
|
|
17
|
+
assert.deepEqual(r.map((x) => [x.id, x.system]), [
|
|
18
|
+
['FEAT-001', 'Warehouse operations'], ['FEAT-002', 'Warehouse operations'],
|
|
19
|
+
['FEAT-003', 'Orders & invoicing'], ['FEAT-004', 'Orders & invoicing'], ['FEAT-005', 'Orders & invoicing'],
|
|
20
|
+
]);
|
|
21
|
+
const f1 = r[0];
|
|
22
|
+
assert.equal(f1.name, 'Order pipeline & stage engine');
|
|
23
|
+
assert.equal(f1.milestone, 'M1 - Walking skeleton');
|
|
24
|
+
assert.equal(f1.container, 'Core API'); // main builder api.stage, parent api
|
|
25
|
+
assert.equal(f1.provenance, 'stated');
|
|
26
|
+
assert.equal(r.find((x) => x.id === 'FEAT-004').provenance, 'proposed'); // BA label "recommended"
|
|
27
|
+
assert.equal(f1.scores.tech.n, 3);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test('a feature in no system goes last, with a blank system', () => {
|
|
31
|
+
const r = rows((req) => { req.systems[0].features = ['FEAT-002']; });
|
|
32
|
+
assert.deepEqual(r.map((x) => [x.id, x.system]), [
|
|
33
|
+
['FEAT-002', 'Warehouse operations'], ['FEAT-003', 'Orders & invoicing'], ['FEAT-004', 'Orders & invoicing'],
|
|
34
|
+
['FEAT-005', 'Orders & invoicing'], ['FEAT-001', ''],
|
|
35
|
+
]);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test('a feature two systems list gets one row, under the first system', () => {
|
|
39
|
+
const r = rows((req) => { req.systems[1].features = ['FEAT-001', ...req.systems[1].features]; });
|
|
40
|
+
assert.deepEqual(r.filter((x) => x.id === 'FEAT-001').map((x) => x.system), ['Warehouse operations']);
|
|
41
|
+
assert.equal(r.length, 5);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
test('every task appears once, under the first feature its component builds', () => {
|
|
45
|
+
const r = rows();
|
|
46
|
+
const all = r.flatMap((x) => x.tasks.map((t) => t.name));
|
|
47
|
+
assert.equal(all.length, 8);
|
|
48
|
+
assert.equal(new Set(all).size, 8);
|
|
49
|
+
// office builds FEAT-001, -003, -005 and is no feature's main builder: its task still lands, under FEAT-001
|
|
50
|
+
assert.deepEqual(r[0].tasks.map((t) => t.name), ['Stage transitions with audit', 'Transition tests', 'Orders, quotes and invoicing screens']);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test('task hours map to o / m / p and the shape becomes the category', () => {
|
|
54
|
+
const t = rows().find((x) => x.id === 'FEAT-005').tasks.find((x) => x.name === 'Three-way match');
|
|
55
|
+
assert.deepEqual({ o: t.o, m: t.m, p: t.p, category: t.category, confidence: t.confidence },
|
|
56
|
+
{ o: 1, m: 2.17, p: 4, category: 'small_implementation', confidence: 'UNCALIBRATED' });
|
|
57
|
+
assert.deepEqual(t.assumptions, []);
|
|
58
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Inputs findings plus, when --json is given, a byte-level check that the
|
|
2
|
+
// computed block equals a fresh recompute (lib/pair-findings.mjs).
|
|
3
|
+
import { loadPair } from './lib/requirements.mjs';
|
|
4
|
+
import { pairFindings } from './lib/pair-findings.mjs';
|
|
5
|
+
|
|
6
|
+
function parseArgs(argv) {
|
|
7
|
+
const args = {};
|
|
8
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
9
|
+
if (argv[i].startsWith('--')) args[argv[i].slice(2)] = argv[++i];
|
|
10
|
+
}
|
|
11
|
+
return args;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const args = parseArgs(process.argv.slice(2));
|
|
15
|
+
if (!args.inputs) { console.error('usage: validate.mjs --inputs estimation-inputs.json [--json estimation.json]'); process.exit(1); }
|
|
16
|
+
const { inputs, req } = loadPair(args.inputs);
|
|
17
|
+
const findings = pairFindings(inputs, req, args.json);
|
|
18
|
+
if (findings.length) { console.error(findings.join('\n')); process.exit(1); }
|
|
19
|
+
console.log('ok');
|
|
@@ -36,3 +36,16 @@ the proposal stays valid. Your firm profile is asked once and cached
|
|
|
36
36
|
|
|
37
37
|
interview → derive.mjs → proposal.md → validate.mjs → fresh-eyes review →
|
|
38
38
|
human review → render.mjs → serve.mjs
|
|
39
|
+
|
|
40
|
+
## Workflow mode
|
|
41
|
+
|
|
42
|
+
When the estimate is in workflow mode (`scopeMode: "workflow"`), the skill
|
|
43
|
+
builds a Systems & Workflows page instead: scope, each system with its
|
|
44
|
+
workflow diagrams and features, milestones, assumptions & exclusions and the
|
|
45
|
+
price, all from the BA package and the estimate. The agent writes only the
|
|
46
|
+
sentences (`proposal-inputs.json`); there is no proposal.md. The page has
|
|
47
|
+
Download PDF and Download DOCX buttons. Prices are USD. See
|
|
48
|
+
`references/workflow.md`.
|
|
49
|
+
|
|
50
|
+
interview → proposal-inputs.json → validate.mjs → render.mjs → fresh-eyes
|
|
51
|
+
review → serve.mjs → human review on the page
|
|
@@ -25,6 +25,14 @@ PDF.
|
|
|
25
25
|
5. Human review of proposal.md before anything is rendered for or sent to
|
|
26
26
|
a client.
|
|
27
27
|
|
|
28
|
+
## Mode
|
|
29
|
+
|
|
30
|
+
Read `estimation.json` first. `inputs.scopeMode` is `"workflow"` → follow
|
|
31
|
+
`references/workflow.md` instead of the flow below: the proposal is built
|
|
32
|
+
from the BA package and the estimate as a Systems & Workflows page, you
|
|
33
|
+
write only its sentences (`proposal-inputs.json`), and there is no
|
|
34
|
+
proposal.md and no derive step. Anything else → the classic flow below.
|
|
35
|
+
|
|
28
36
|
## Flow
|
|
29
37
|
|
|
30
38
|
1. **Prereq gate**: ARCHITECTURE.md and estimation.json both exist, or stop.
|