@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
package/plugins/solution-architect/skills/estimate/{references → classic/references}/task-shapes.md
RENAMED
|
@@ -169,5 +169,5 @@ inputs are the agent's own judgment and an unrecognized shape there is a
|
|
|
169
169
|
typo, not evidence.
|
|
170
170
|
|
|
171
171
|
Extending the taxonomy means adding the new shape to `TASK_SHAPES` in
|
|
172
|
-
|
|
172
|
+
`../shared/lib/measurements.mjs` **and** a section to this doc, in the same
|
|
173
173
|
commit — the two must never drift apart.
|
package/plugins/solution-architect/skills/estimate/{references → classic/references}/writing.md
RENAMED
|
@@ -260,7 +260,7 @@ Two modes:
|
|
|
260
260
|
|
|
261
261
|
## 5. Command sequence
|
|
262
262
|
|
|
263
|
-
Run from the
|
|
263
|
+
Run from the classic flow's folder (`plugins/solution-architect/skills/estimate/classic/`).
|
|
264
264
|
`<dir>` is the placement chosen in §4 — the companion location or
|
|
265
265
|
`docs/estimate/`.
|
|
266
266
|
|
|
@@ -273,7 +273,7 @@ Write `<dir>/estimation.md` by hand, following the §2 skeleton, then:
|
|
|
273
273
|
```
|
|
274
274
|
node scripts/validate.mjs --md <dir>/estimation.md --json <dir>/estimation.json
|
|
275
275
|
node scripts/render.mjs --json <dir>/estimation.json --md <dir>/estimation.md --out <dir>/dist/
|
|
276
|
-
node
|
|
276
|
+
node ../../analyze-requirements/scripts/serve.mjs <dir>/
|
|
277
277
|
```
|
|
278
278
|
|
|
279
279
|
`<dir>/dist/` is the one rendered-pages folder — the analyze-requirements viewer
|
|
@@ -2,7 +2,7 @@ import { readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
|
2
2
|
import { dirname } from 'node:path';
|
|
3
3
|
import { checkInputs } from './lib/schema.mjs';
|
|
4
4
|
import { computeEstimation } from './lib/rollup.mjs';
|
|
5
|
-
import { loadMeasurements, resolveMeasurementsPath } from '
|
|
5
|
+
import { loadMeasurements, resolveMeasurementsPath } from '../../shared/lib/measurements.mjs';
|
|
6
6
|
|
|
7
7
|
function parseArgs(argv) {
|
|
8
8
|
const args = {};
|
package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/checks.mjs
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// estimation.json a machine computed. Rules 1-4/9 check structure, 5-6 check
|
|
3
3
|
// table rows, 7-8 cross-check the JSON against a fresh recompute.
|
|
4
4
|
import { computeEstimation } from './rollup.mjs';
|
|
5
|
-
import { loadMeasurements, resolveMeasurementsPath } from '
|
|
5
|
+
import { loadMeasurements, resolveMeasurementsPath } from '../../../shared/lib/measurements.mjs';
|
|
6
6
|
import { agenticFindings } from './agentic-checks.mjs';
|
|
7
7
|
import { heading, tables } from './md-tables.mjs';
|
|
8
8
|
import { scoringFindings } from './scoring-checks.mjs';
|
package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/roadmap.mjs
RENAMED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// group's scenario task hours, and lets roadmapBands turn shares into bands.
|
|
4
4
|
// Returns undefined when no feature carries a milestone — the roadmap is
|
|
5
5
|
// optional and its absence must stay a missing key, not an empty array.
|
|
6
|
-
import { roadmapBands, round2 } from '
|
|
6
|
+
import { roadmapBands, round2 } from '../../../shared/lib/estimate-math.mjs';
|
|
7
7
|
|
|
8
8
|
function milestonesFrom(features, taskHours) {
|
|
9
9
|
const order = [];
|
package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/rollup.mjs
RENAMED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
// task, per-feature price bands, and the project price roll-up. The dynamic,
|
|
3
3
|
// id-keyed maps (tasks, features, components) are assembled with sorted keys
|
|
4
4
|
// so repeat runs are byte-identical.
|
|
5
|
-
import { pert, round2 } from '
|
|
6
|
-
import { featurePrice } from '
|
|
7
|
-
import { projectPrice } from '
|
|
5
|
+
import { pert, round2 } from '../../../shared/lib/estimate-math.mjs';
|
|
6
|
+
import { featurePrice } from '../../../shared/lib/pricing.mjs';
|
|
7
|
+
import { projectPrice } from '../../../shared/lib/project-price.mjs';
|
|
8
8
|
import { roadmapFor } from './roadmap.mjs';
|
|
9
9
|
import { componentHoursFor } from './components.mjs';
|
|
10
|
-
import { agenticTask } from '
|
|
11
|
-
import { scoreNumbers, scoreSummary } from '
|
|
10
|
+
import { agenticTask } from '../../../shared/lib/baselines.mjs';
|
|
11
|
+
import { scoreNumbers, scoreSummary } from '../../../shared/lib/scoring.mjs';
|
|
12
12
|
|
|
13
13
|
function sortedMap(entries) {
|
|
14
14
|
return Object.fromEntries(entries.sort(([a], [b]) => a.localeCompare(b)));
|
package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/schema.mjs
RENAMED
|
@@ -1,38 +1,16 @@
|
|
|
1
1
|
// Shape checks for estimation-inputs.json — the agent writes that file, so the
|
|
2
2
|
// checks here are the contract that keeps interview output honest before any
|
|
3
3
|
// arithmetic happens. Findings are strings with the offending id in them.
|
|
4
|
-
import { AI_CATEGORIES } from '
|
|
5
|
-
import { checkContext } from '
|
|
6
|
-
import { checkScoring } from '
|
|
7
|
-
import {
|
|
4
|
+
import { AI_CATEGORIES } from '../../../shared/lib/estimate-math.mjs';
|
|
5
|
+
import { checkContext } from '../../../shared/lib/context-schema.mjs';
|
|
6
|
+
import { checkScoring } from '../../../shared/lib/scoring-schema.mjs';
|
|
7
|
+
import { checkAgenticTask, PROVENANCE } from '../../../shared/lib/agentic-task-schema.mjs';
|
|
8
8
|
|
|
9
|
-
const PROVENANCE = ['observed', 'stated', 'researched', 'proposed'];
|
|
10
9
|
const CONFIDENCE = ['HIGH', 'MED', 'LOW'];
|
|
11
10
|
const DELIVERY_MODES = ['traditional', 'agentic'];
|
|
12
11
|
const pct = (v) => typeof v === 'number' && v >= 0 && v < 1;
|
|
13
12
|
const isAgentic = (inputs) => inputs.deliveryMode === 'agentic';
|
|
14
13
|
|
|
15
|
-
// Durations and confidence are script-owned in agentic mode: their absence
|
|
16
|
-
// from inputs is the structural guarantee the agent never invents them.
|
|
17
|
-
const AGENTIC_BANNED = ['category', 'confidence', 'o', 'm', 'p'];
|
|
18
|
-
|
|
19
|
-
function checkAgenticTask(task, out) {
|
|
20
|
-
if (!TASK_SHAPES.includes(task.shape)) out.push(`task ${task.id}: unknown shape "${task.shape}"`);
|
|
21
|
-
const s = task.seedMinutes ?? {};
|
|
22
|
-
if (!['o', 'm', 'p'].every((k) => typeof s[k] === 'number' && s[k] > 0)) {
|
|
23
|
-
out.push(`task ${task.id}: seedMinutes o, m, p must be positive numbers`);
|
|
24
|
-
} else if (!(s.o <= s.m && s.m <= s.p)) out.push(`task ${task.id}: seedMinutes expected o <= m <= p`);
|
|
25
|
-
if (typeof task.scope !== 'object' || task.scope === null) out.push(`task ${task.id}: scope object is required`);
|
|
26
|
-
for (const key of AGENTIC_BANNED) {
|
|
27
|
-
if (Object.hasOwn(task, key)) out.push(`task ${task.id}: "${key}" is not an agentic input — the script computes it`);
|
|
28
|
-
}
|
|
29
|
-
if (task.model !== undefined && !(typeof task.model === 'string' && task.model.trim())) {
|
|
30
|
-
out.push(`task ${task.id}: model must be a non-empty string`);
|
|
31
|
-
}
|
|
32
|
-
if (!Array.isArray(task.assumptions)) out.push(`task ${task.id}: assumptions array is required`);
|
|
33
|
-
if (!PROVENANCE.includes(task.provenance)) out.push(`task ${task.id}: provenance not in vocabulary`);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
14
|
function checkTask(task, out) {
|
|
37
15
|
if (!['o', 'm', 'p'].every((k) => typeof task[k] === 'number')) out.push(`task ${task.id}: o, m, p must be numbers`);
|
|
38
16
|
if (!(task.o > 0 && task.m > 0 && task.p > 0)) out.push(`task ${task.id}: estimates are never 0`);
|
package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-csv.mjs
RENAMED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// the human edits in Sheets/Excel; the numbers, the plain note and a free
|
|
3
3
|
// "note" column come back. Anchors and cites travel beside each score so the
|
|
4
4
|
// reviewer sees the reason without opening anything else.
|
|
5
|
-
import { SCORE_FACTORS, scoreNumbers } from '
|
|
6
|
-
import { tierFor } from '
|
|
5
|
+
import { SCORE_FACTORS, scoreNumbers } from '../../../shared/lib/scoring.mjs';
|
|
6
|
+
import { tierFor } from '../../../shared/lib/pricing.mjs';
|
|
7
7
|
|
|
8
8
|
export const CSV_HEADERS = ['id', 'feature',
|
|
9
9
|
...SCORE_FACTORS.flatMap((k) => [k, `${k}_why`, `${k}_cite`]), 'score', 'tier', 'why_this_tier', 'note'];
|
package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-html.mjs
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// HTML review channel: the agent's draft rendered as one editable table,
|
|
2
2
|
// Σ/tier live, the rubric folded underneath, and a feedback block the human
|
|
3
3
|
// copies back. Same slots discipline as the estimate page (embed is strict).
|
|
4
|
-
import { embed } from '
|
|
5
|
-
import { inlineModule, extractExports } from '
|
|
4
|
+
import { embed } from '../../../../analyze-requirements/scripts/lib/embed.mjs';
|
|
5
|
+
import { inlineModule, extractExports } from '../../../shared/lib/inline.mjs';
|
|
6
6
|
|
|
7
7
|
export function toHtml({ draft, template, guideHtml, mathSrc }) {
|
|
8
8
|
return embed({
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { readFileSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
import { embed } from '
|
|
4
|
-
import { buildFontFaces } from '
|
|
5
|
-
import { escapeHtml } from '
|
|
3
|
+
import { embed } from '../../../analyze-requirements/scripts/lib/embed.mjs';
|
|
4
|
+
import { buildFontFaces } from '../../../analyze-requirements/scripts/lib/fonts.mjs';
|
|
5
|
+
import { escapeHtml } from '../../../analyze-requirements/scripts/lib/md-inline.mjs';
|
|
6
6
|
import { checkDeliverables } from './lib/checks.mjs';
|
|
7
|
-
import { stripInternal } from '
|
|
7
|
+
import { stripInternal, withZip } from '../../shared/lib/inline.mjs';
|
|
8
8
|
import { redactForClient } from './lib/redact.mjs';
|
|
9
|
-
import { loadGuide, guideTableHtml } from '
|
|
9
|
+
import { loadGuide, guideTableHtml } from '../../shared/lib/scoring.mjs';
|
|
10
10
|
|
|
11
11
|
function parseArgs(argv) {
|
|
12
12
|
const args = {};
|
|
@@ -21,8 +21,9 @@ function parseArgs(argv) {
|
|
|
21
21
|
return args;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
const archFontsDir = new URL('
|
|
24
|
+
const archFontsDir = new URL('../../../analyze-requirements/assets/fonts/', import.meta.url).pathname;
|
|
25
25
|
const assetsDir = new URL('../assets/', import.meta.url).pathname;
|
|
26
|
+
const xlsxExportPath = new URL('../../shared/assets/xlsx-export.js', import.meta.url).pathname;
|
|
26
27
|
|
|
27
28
|
const args = parseArgs(process.argv.slice(2));
|
|
28
29
|
const estimation = JSON.parse(readFileSync(args.json, 'utf8'));
|
|
@@ -64,7 +65,7 @@ const html = embed({
|
|
|
64
65
|
// page's one extra slot is the rubric, which lives in
|
|
65
66
|
// references/scoring-guide.md: the page shows the same sentences the
|
|
66
67
|
// interviewer read, so a score means one thing.
|
|
67
|
-
...(isAgentic ? {} : { GUIDE: guideTableHtml(loadGuide()) }),
|
|
68
|
+
...(isAgentic ? {} : { GUIDE: guideTableHtml(loadGuide()), XLSX: withZip(readFileSync(xlsxExportPath, 'utf8')) }),
|
|
68
69
|
},
|
|
69
70
|
});
|
|
70
71
|
|
package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/score-review.mjs
RENAMED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
// write into estimation-inputs.json. It scores nothing itself.
|
|
5
5
|
import { readFileSync, writeFileSync } from 'node:fs';
|
|
6
6
|
import { toCsv, fromCsv } from './lib/score-csv.mjs';
|
|
7
|
-
import { diffScores, applyDiff } from '
|
|
7
|
+
import { diffScores, applyDiff } from '../../shared/lib/score-diff.mjs';
|
|
8
8
|
import { toHtml } from './lib/score-html.mjs';
|
|
9
|
-
import { loadGuide, guideTableHtml, SCORE_FACTORS } from '
|
|
9
|
+
import { loadGuide, guideTableHtml, SCORE_FACTORS } from '../../shared/lib/scoring.mjs';
|
|
10
10
|
|
|
11
11
|
function parseArgs(argv) {
|
|
12
12
|
const args = {};
|
|
@@ -17,7 +17,7 @@ function parseArgs(argv) {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
const templatePath = new URL('../assets/scores-review-template.html', import.meta.url).pathname;
|
|
20
|
-
const mathPath = new URL('
|
|
20
|
+
const mathPath = new URL('../../shared/lib/pricing.mjs', import.meta.url).pathname;
|
|
21
21
|
const json = (path) => JSON.parse(readFileSync(path, 'utf8'));
|
|
22
22
|
|
|
23
23
|
function write(args) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { test } from 'node:test';
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
|
-
import { loadMeasurements } from '
|
|
4
|
-
import { percentile, matchBaseline, confidenceFor } from '
|
|
3
|
+
import { loadMeasurements } from '../../../shared/lib/measurements.mjs';
|
|
4
|
+
import { percentile, matchBaseline, confidenceFor } from '../../../shared/lib/baselines.mjs';
|
|
5
5
|
|
|
6
6
|
const fixturePath = new URL('./fixtures/measurements.jsonl', import.meta.url).pathname;
|
|
7
7
|
const records = () => loadMeasurements(fixturePath).records;
|
|
@@ -74,7 +74,7 @@ test('confidence tiers follow the spec table', () => {
|
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
// Task 3 appends: duration math.
|
|
77
|
-
import { agenticTask } from '
|
|
77
|
+
import { agenticTask } from '../../../shared/lib/baselines.mjs';
|
|
78
78
|
|
|
79
79
|
test('n>=5: lognormal fit — mean above median, spread from log-space z', () => {
|
|
80
80
|
const a = agenticTask(
|
|
@@ -5,8 +5,8 @@ import { execFileSync } from 'node:child_process';
|
|
|
5
5
|
import { tmpdir } from 'node:os';
|
|
6
6
|
import { join } from 'node:path';
|
|
7
7
|
import { pathToFileURL } from 'node:url';
|
|
8
|
-
import { findChrome } from '
|
|
9
|
-
import { openPage } from '
|
|
8
|
+
import { findChrome } from '../../../../analyze-requirements/scripts/lib/chrome.mjs';
|
|
9
|
+
import { openPage } from '../../../../analyze-requirements/scripts/lib/cdp.mjs';
|
|
10
10
|
|
|
11
11
|
const skip = { skip: !findChrome() && 'no chrome on PATH' };
|
|
12
12
|
const fixture = new URL('./fixtures/agentic-inputs.json', import.meta.url).pathname;
|
package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/browser.test.mjs
RENAMED
|
@@ -5,8 +5,8 @@ import { execFileSync } from 'node:child_process';
|
|
|
5
5
|
import { tmpdir } from 'node:os';
|
|
6
6
|
import { join } from 'node:path';
|
|
7
7
|
import { pathToFileURL } from 'node:url';
|
|
8
|
-
import { findChrome } from '
|
|
9
|
-
import { openPage } from '
|
|
8
|
+
import { findChrome } from '../../../../analyze-requirements/scripts/lib/chrome.mjs';
|
|
9
|
+
import { openPage } from '../../../../analyze-requirements/scripts/lib/cdp.mjs';
|
|
10
10
|
|
|
11
11
|
const skip = { skip: !findChrome() && 'no chrome on PATH' };
|
|
12
12
|
const fixture = new URL('./fixtures/booking-inputs.json', import.meta.url).pathname;
|
package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/compute.test.mjs
RENAMED
|
@@ -88,7 +88,7 @@ test('no milestones → no roadmap key at all', () => {
|
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
// Agentic-mode rollup.
|
|
91
|
-
import { loadMeasurements } from '
|
|
91
|
+
import { loadMeasurements } from '../../../shared/lib/measurements.mjs';
|
|
92
92
|
|
|
93
93
|
const agenticInputsPath = new URL('./fixtures/agentic-inputs.json', import.meta.url).pathname;
|
|
94
94
|
const measurementsFixture = new URL('./fixtures/measurements.jsonl', import.meta.url).pathname;
|
package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/e2e.test.mjs
RENAMED
|
@@ -5,11 +5,11 @@ import { execFileSync } from 'node:child_process';
|
|
|
5
5
|
import { tmpdir } from 'node:os';
|
|
6
6
|
import { join } from 'node:path';
|
|
7
7
|
import { pathToFileURL } from 'node:url';
|
|
8
|
-
import { createServer } from '
|
|
9
|
-
import { findFreePort } from '
|
|
8
|
+
import { createServer } from '../../../../analyze-requirements/scripts/serve.mjs';
|
|
9
|
+
import { findFreePort } from '../../../../analyze-requirements/scripts/lib/port.mjs';
|
|
10
10
|
import { computeEstimation } from '../lib/rollup.mjs';
|
|
11
|
-
import { findChrome } from '
|
|
12
|
-
import { openPage } from '
|
|
11
|
+
import { findChrome } from '../../../../analyze-requirements/scripts/lib/chrome.mjs';
|
|
12
|
+
import { openPage } from '../../../../analyze-requirements/scripts/lib/cdp.mjs';
|
|
13
13
|
|
|
14
14
|
const scripts = new URL('..', import.meta.url).pathname;
|
|
15
15
|
const fixture = join(scripts, 'test/fixtures/booking-inputs.json');
|
|
@@ -17,7 +17,7 @@ const passMd = join(scripts, 'test/fixtures/estimation-pass.md');
|
|
|
17
17
|
const skip = { skip: !findChrome() && 'no chrome on PATH' };
|
|
18
18
|
|
|
19
19
|
test('SKILL.md exists with hard rules and auto-trigger description', () => {
|
|
20
|
-
const skill = readFileSync(new URL('
|
|
20
|
+
const skill = readFileSync(new URL('../../../SKILL.md', import.meta.url), 'utf8') + readFileSync(new URL('../../FLOW.md', import.meta.url), 'utf8');
|
|
21
21
|
assert.match(skill, /^name: estimate$/m);
|
|
22
22
|
assert.match(skill, /^description: .*(estimate|effort|quote)/m);
|
|
23
23
|
assert.match(skill, /never `?0`?/); // honesty rule stated
|
|
@@ -78,7 +78,7 @@ test('the estimate and the proposal figures quote the same range', async () => {
|
|
|
78
78
|
const inputs = JSON.parse(readFileSync(fixture, 'utf8'));
|
|
79
79
|
const estimation = computeEstimation(inputs);
|
|
80
80
|
const { presentLow, presentHigh } = estimation.computed.price;
|
|
81
|
-
const { deriveFigures } = await import('
|
|
81
|
+
const { deriveFigures } = await import('../../../../proposal/scripts/lib/figures.mjs');
|
|
82
82
|
const figures = deriveFigures(estimation);
|
|
83
83
|
assert.equal(figures.cost.low, presentLow);
|
|
84
84
|
assert.equal(figures.cost.high, presentHigh);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { test } from 'node:test';
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
|
-
import { pert, roadmapBands, AI_CATEGORIES } from '
|
|
3
|
+
import { pert, roadmapBands, AI_CATEGORIES } from '../../../shared/lib/estimate-math.mjs';
|
|
4
4
|
|
|
5
5
|
const close = (got, want) => assert.ok(Math.abs(got - want) < 1e-9, `${got} !~ ${want}`);
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ test('pert: E=(O+4M+P)/6, sigma=(P-O)/6', () => {
|
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
test('the hours-to-money machinery is gone', async () => {
|
|
14
|
-
const mod = await import('
|
|
14
|
+
const mod = await import('../../../shared/lib/estimate-math.mjs');
|
|
15
15
|
for (const gone of ['SENIORITY_FACTOR', 'HOURS_PER_MONTH', 'COORDINATION_TAX',
|
|
16
16
|
'taskHours', 'aiAdjust', 'dominantSeniority', 'effectiveCapacity',
|
|
17
17
|
'scenarioRollup', 'riskBufferHours', 'projectBuffer', 'TIER_BREAKS', 'tierFor']) {
|
|
@@ -35,7 +35,7 @@ test('roadmapBands with no hours does not divide by zero', () => {
|
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
test('scoreSummary uses the weighted score, not the raw sum', async () => {
|
|
38
|
-
const { scoreSummary } = await import('
|
|
38
|
+
const { scoreSummary } = await import('../../../shared/lib/scoring.mjs');
|
|
39
39
|
const scores = Object.fromEntries(['tech', 'size', 'deps', 'unc', 'risk']
|
|
40
40
|
.map((k, i) => [k, { n: [1, 3, 3, 3, 3][i], anchor: '', cite: 'x' }]));
|
|
41
41
|
const got = scoreSummary({ scores });
|
|
@@ -6,7 +6,7 @@ import { join } from 'node:path';
|
|
|
6
6
|
import {
|
|
7
7
|
TASK_SHAPES, DEFAULT_MEASUREMENTS_PATH, expandHome, resolveMeasurementsPath,
|
|
8
8
|
checkMeasurement, loadMeasurements,
|
|
9
|
-
} from '
|
|
9
|
+
} from '../../../shared/lib/measurements.mjs';
|
|
10
10
|
|
|
11
11
|
const fixturePath = new URL('./fixtures/measurements.jsonl', import.meta.url).pathname;
|
|
12
12
|
|
package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/pricing.test.mjs
RENAMED
|
@@ -2,7 +2,7 @@ import { test } from 'node:test';
|
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
3
|
import {
|
|
4
4
|
WEIGHTS, BANDS, weightedScore, bandFor, pointEstimate, spreadFor, featurePrice,
|
|
5
|
-
} from '
|
|
5
|
+
} from '../../../shared/lib/pricing.mjs';
|
|
6
6
|
|
|
7
7
|
const close = (got, want) => assert.ok(Math.abs(got - want) < 1e-6, `${got} !~ ${want}`);
|
|
8
8
|
const s = (tech, size, deps, unc, risk) => ({ tech, size, deps, unc, risk });
|
|
@@ -2,7 +2,7 @@ import { test } from 'node:test';
|
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
3
|
import {
|
|
4
4
|
CONTEXT_FACTORS, contextMultiplier, overheadFor, contingencyRate, projectPrice,
|
|
5
|
-
} from '
|
|
5
|
+
} from '../../../shared/lib/project-price.mjs';
|
|
6
6
|
|
|
7
7
|
const close = (got, want, eps = 1e-4) => assert.ok(Math.abs(got - want) < eps, `${got} !~ ${want}`);
|
|
8
8
|
|
|
@@ -3,7 +3,7 @@ import assert from 'node:assert/strict';
|
|
|
3
3
|
import { readFileSync } from 'node:fs';
|
|
4
4
|
import {
|
|
5
5
|
TEMPLATE_LIMITS, moduleFiles, templateScripts, violations,
|
|
6
|
-
} from '
|
|
6
|
+
} from '../../../../analyze-requirements/scripts/lib/quality-gate.mjs';
|
|
7
7
|
|
|
8
8
|
const base = new URL('../..', import.meta.url).pathname;
|
|
9
9
|
|
|
@@ -13,6 +13,12 @@ for (const file of moduleFiles(base, ['scripts/lib', 'scripts'])) {
|
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
for (const file of moduleFiles(new URL('../../../shared', import.meta.url).pathname, ['lib'])) {
|
|
17
|
+
test(`gates: shared ${file.split('/shared/')[1]}`, () => {
|
|
18
|
+
assert.deepEqual(violations(readFileSync(file, 'utf8')), []);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
16
22
|
for (const { file, js } of templateScripts(base)) {
|
|
17
23
|
test(`gates: ${file.replace(base, '')}`, () => {
|
|
18
24
|
assert.deepEqual(violations(js, TEMPLATE_LIMITS), []);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { test } from 'node:test';
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
3
|
import { readFileSync } from 'node:fs';
|
|
4
|
-
import { AI_CATEGORIES } from '
|
|
5
|
-
import { TASK_SHAPES } from '
|
|
6
|
-
import { WEIGHTS, BANDS } from '
|
|
7
|
-
import { CONTEXT_FACTORS } from '
|
|
4
|
+
import { AI_CATEGORIES } from '../../../shared/lib/estimate-math.mjs';
|
|
5
|
+
import { TASK_SHAPES } from '../../../shared/lib/measurements.mjs';
|
|
6
|
+
import { WEIGHTS, BANDS } from '../../../shared/lib/pricing.mjs';
|
|
7
|
+
import { CONTEXT_FACTORS } from '../../../shared/lib/project-price.mjs';
|
|
8
8
|
import { readZip } from './zip.mjs';
|
|
9
9
|
|
|
10
10
|
const ref = (f) => readFileSync(new URL(`../../references/${f}`, import.meta.url), 'utf8');
|
|
@@ -171,7 +171,7 @@ test('writing.md documents the score fields and the Tier rule', () => {
|
|
|
171
171
|
});
|
|
172
172
|
|
|
173
173
|
test('SKILL.md points the interview at the scoring guide and the review script', () => {
|
|
174
|
-
const skill = readFileSync(new URL('../../
|
|
174
|
+
const skill = readFileSync(new URL('../../FLOW.md', import.meta.url), 'utf8');
|
|
175
175
|
assert.match(skill, /scoring-guide\.md/);
|
|
176
176
|
assert.match(skill, /score-review\.mjs/);
|
|
177
177
|
});
|
|
@@ -180,7 +180,7 @@ test('SKILL.md points the interview at the scoring guide and the review script',
|
|
|
180
180
|
// the page embeds (Project Roll-up F11:F15, rows in CONTEXT_FACTORS order).
|
|
181
181
|
// Read them from those bytes so the rubric cannot drift from the workbook.
|
|
182
182
|
function rollupDefinitions() {
|
|
183
|
-
const html = readFileSync(new URL('
|
|
183
|
+
const html = readFileSync(new URL('../../../shared/assets/xlsx-export.js', import.meta.url), 'utf8');
|
|
184
184
|
const files = readZip(Buffer.from(/const XLSX_TEMPLATE = '([^']+)'/.exec(html)[1], 'base64'));
|
|
185
185
|
const strings = [...files.get('xl/sharedStrings.xml').toString('utf8').matchAll(/<si>([\s\S]*?)<\/si>/g)]
|
|
186
186
|
.map((m) => [...m[1].matchAll(/<t[^>]*>([^<]*)<\/t>/g)].map((t) => t[1]).join('').replace(/&/g, '&'));
|
package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/render.test.mjs
RENAMED
|
@@ -4,7 +4,7 @@ import { readFileSync, writeFileSync, mkdtempSync } from 'node:fs';
|
|
|
4
4
|
import { execFileSync } from 'node:child_process';
|
|
5
5
|
import { tmpdir } from 'node:os';
|
|
6
6
|
import { join } from 'node:path';
|
|
7
|
-
import { inlineModule, extractExports, stripInternal } from '
|
|
7
|
+
import { inlineModule, extractExports, stripInternal } from '../../../shared/lib/inline.mjs';
|
|
8
8
|
|
|
9
9
|
const tpl = () => readFileSync(new URL('../../assets/estimate-template.html', import.meta.url), 'utf8');
|
|
10
10
|
const cli = new URL('../render.mjs', import.meta.url).pathname;
|
|
@@ -62,9 +62,9 @@ test('render refuses a deliverable that fails validation', () => {
|
|
|
62
62
|
assert.throws(() => execFileSync('node', [cli, '--json', json, '--md', failMd, '--out', dir]));
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
-
test('template carries exactly the
|
|
65
|
+
test('template carries exactly the six slots and no external URLs', () => {
|
|
66
66
|
const markers = [...tpl().matchAll(/<!-- slot:(\w+) -->/g)].map((m) => m[1]).sort();
|
|
67
|
-
assert.deepEqual([...new Set(markers)], ['DATA', 'FONTS', 'GUIDE', 'TITLE', 'VIEWER']);
|
|
67
|
+
assert.deepEqual([...new Set(markers)], ['DATA', 'FONTS', 'GUIDE', 'TITLE', 'VIEWER', 'XLSX']);
|
|
68
68
|
// openxmlformats URIs are XML namespace identifiers the xlsx export writes
|
|
69
69
|
// into generated sheets — never fetched, so the page stays self-contained.
|
|
70
70
|
assert.doesNotMatch(tpl(), /https?:\/\/(?!www\.w3\.org|schemas\.openxmlformats\.org)/);
|
package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/schema.test.mjs
RENAMED
|
@@ -2,7 +2,7 @@ import { test } from 'node:test';
|
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
3
|
import { readFileSync } from 'node:fs';
|
|
4
4
|
import { checkInputs } from '../lib/schema.mjs';
|
|
5
|
-
import { checkContext } from '
|
|
5
|
+
import { checkContext } from '../../../shared/lib/context-schema.mjs';
|
|
6
6
|
|
|
7
7
|
const fixture = () => JSON.parse(
|
|
8
8
|
readFileSync(new URL('./fixtures/booking-inputs.json', import.meta.url), 'utf8'));
|
|
@@ -6,17 +6,17 @@ import { tmpdir } from 'node:os';
|
|
|
6
6
|
import { join } from 'node:path';
|
|
7
7
|
import { pathToFileURL } from 'node:url';
|
|
8
8
|
import { toCsv, parseCsv, fromCsv, CSV_HEADERS } from '../lib/score-csv.mjs';
|
|
9
|
-
import { diffScores, applyDiff } from '
|
|
10
|
-
import { loadGuide, guideTableHtml } from '
|
|
9
|
+
import { diffScores, applyDiff } from '../../../shared/lib/score-diff.mjs';
|
|
10
|
+
import { loadGuide, guideTableHtml } from '../../../shared/lib/scoring.mjs';
|
|
11
11
|
import { toHtml } from '../lib/score-html.mjs';
|
|
12
|
-
import { tierFor } from '
|
|
13
|
-
import { findChrome } from '
|
|
14
|
-
import { openPage } from '
|
|
12
|
+
import { tierFor } from '../../../shared/lib/pricing.mjs';
|
|
13
|
+
import { findChrome } from '../../../../analyze-requirements/scripts/lib/chrome.mjs';
|
|
14
|
+
import { openPage } from '../../../../analyze-requirements/scripts/lib/cdp.mjs';
|
|
15
15
|
|
|
16
16
|
const cli = new URL('../score-review.mjs', import.meta.url).pathname;
|
|
17
17
|
const skip = { skip: !findChrome() && 'no chrome on PATH' };
|
|
18
18
|
const templatePath = new URL('../../assets/scores-review-template.html', import.meta.url).pathname;
|
|
19
|
-
const pricingPath = new URL('
|
|
19
|
+
const pricingPath = new URL('../../../shared/lib/pricing.mjs', import.meta.url).pathname;
|
|
20
20
|
const nums = (tech, size, deps, unc, risk) => ({ tech, size, deps, unc, risk });
|
|
21
21
|
|
|
22
22
|
const inputs = () => JSON.parse(readFileSync(new URL('./fixtures/booking-inputs.json', import.meta.url), 'utf8'));
|
package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/scoring.test.mjs
RENAMED
|
@@ -5,7 +5,7 @@ import { tmpdir } from 'node:os';
|
|
|
5
5
|
import { join } from 'node:path';
|
|
6
6
|
import {
|
|
7
7
|
SCORE_FACTORS, FACTOR_LABELS, loadGuide, guideTableHtml, scoreNumbers, scoreSummary,
|
|
8
|
-
} from '
|
|
8
|
+
} from '../../../shared/lib/scoring.mjs';
|
|
9
9
|
|
|
10
10
|
test('the guide loads five factors with five anchors each, in factor order', () => {
|
|
11
11
|
const guide = loadGuide();
|
|
@@ -5,8 +5,8 @@ import { execFileSync } from 'node:child_process';
|
|
|
5
5
|
import { tmpdir } from 'node:os';
|
|
6
6
|
import { join } from 'node:path';
|
|
7
7
|
import { pathToFileURL } from 'node:url';
|
|
8
|
-
import { findChrome } from '
|
|
9
|
-
import { openPage } from '
|
|
8
|
+
import { findChrome } from '../../../../analyze-requirements/scripts/lib/chrome.mjs';
|
|
9
|
+
import { openPage } from '../../../../analyze-requirements/scripts/lib/cdp.mjs';
|
|
10
10
|
|
|
11
11
|
const skip = { skip: !findChrome() && 'no chrome on PATH' };
|
|
12
12
|
const fixture = new URL('./fixtures/booking-inputs.json', import.meta.url).pathname;
|
|
@@ -4,7 +4,7 @@ import { readFileSync } from 'node:fs';
|
|
|
4
4
|
import { execFileSync } from 'node:child_process';
|
|
5
5
|
import { checkDeliverables, checkDeepEstimates } from '../lib/checks.mjs';
|
|
6
6
|
import { computeEstimation } from '../lib/rollup.mjs';
|
|
7
|
-
import { loadMeasurements } from '
|
|
7
|
+
import { loadMeasurements } from '../../../shared/lib/measurements.mjs';
|
|
8
8
|
|
|
9
9
|
const read = (f) => readFileSync(new URL(`./fixtures/${f}`, import.meta.url), 'utf8');
|
|
10
10
|
const inputs = () => JSON.parse(read('booking-inputs.json'));
|
|
@@ -11,9 +11,9 @@ import { execFileSync } from 'node:child_process';
|
|
|
11
11
|
import { tmpdir } from 'node:os';
|
|
12
12
|
import { join } from 'node:path';
|
|
13
13
|
import { pathToFileURL } from 'node:url';
|
|
14
|
-
import { findChrome } from '
|
|
15
|
-
import { openPage } from '
|
|
16
|
-
import { loadGuide } from '
|
|
14
|
+
import { findChrome } from '../../../../analyze-requirements/scripts/lib/chrome.mjs';
|
|
15
|
+
import { openPage } from '../../../../analyze-requirements/scripts/lib/cdp.mjs';
|
|
16
|
+
import { loadGuide } from '../../../shared/lib/scoring.mjs';
|
|
17
17
|
import { readZip } from './zip.mjs';
|
|
18
18
|
|
|
19
19
|
const skip = { skip: !findChrome() && 'no chrome on PATH' };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { crc32, zipStore } from '../../../shared/lib/zip.mjs';
|
|
4
|
+
import { withZip } from '../../../shared/lib/inline.mjs';
|
|
5
|
+
import { readZip } from './zip.mjs';
|
|
6
|
+
|
|
7
|
+
const enc = new TextEncoder();
|
|
8
|
+
|
|
9
|
+
test('zipStore writes an archive the reader opens, entries in order', () => {
|
|
10
|
+
const files = new Map([['a.txt', enc.encode('hello')], ['dir/b.xml', enc.encode('<x/>')]]);
|
|
11
|
+
const back = readZip(Buffer.from(zipStore(files)));
|
|
12
|
+
assert.deepEqual([...back.keys()], ['a.txt', 'dir/b.xml']);
|
|
13
|
+
assert.equal(back.get('dir/b.xml').toString('utf8'), '<x/>');
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test('crc32 matches the standard check value', () => {
|
|
17
|
+
assert.equal(crc32(enc.encode('123456789')), 0xcbf43926);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
test('withZip puts the writer, without export keywords, ahead of the page script', () => {
|
|
21
|
+
const out = withZip('PAGE_SCRIPT();');
|
|
22
|
+
assert.match(out, /^\/\/ Minimal zip writer/);
|
|
23
|
+
assert.match(out, /\nfunction zipStore\(/);
|
|
24
|
+
assert.doesNotMatch(out, /^export /m);
|
|
25
|
+
assert.ok(out.endsWith('\nPAGE_SCRIPT();'));
|
|
26
|
+
});
|