@v11g/agents-rock 1.0.13 → 1.0.14
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 +23 -5
- package/package.json +1 -1
- package/plugins/business-analyst/skills/business-analyst/README.md +1 -1
- package/plugins/business-analyst/skills/business-analyst/evals/evals.json +1 -1
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_data.cpython-314.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_layout.cpython-314.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_page.cpython-314.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_checks.cpython-314.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_render.cpython-314.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/validate.cpython-314.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/quality-gates.test.mjs +1 -1
- package/plugins/business-analyst/skills/business-analyst/scripts/test/review-browser.test.mjs +2 -2
- package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_body.cpython-314.pyc +0 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_flow.cpython-314.pyc +0 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_package.cpython-314.pyc +0 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_xml.cpython-314.pyc +0 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_quotes.cpython-314.pyc +0 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_rules.cpython-314.pyc +0 -0
- package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_schema.cpython-314.pyc +0 -0
- package/plugins/presales/.claude-plugin/plugin.json +9 -0
- package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/workflow-or-exact-stop.md +1 -1
- package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/evals.json +5 -5
- package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/ba-facts-cli.test.mjs +5 -1
- package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/ba-package-cli.test.mjs +5 -1
- package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/browser.test.mjs +6 -2
- package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/check-quotes-cli.test.mjs +5 -1
- package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/drift-cli.test.mjs +5 -1
- package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/inputs.test.mjs +6 -2
- package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-config-cli.test.mjs +5 -1
- package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-export-cli.test.mjs +5 -1
- package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-gen-cli.test.mjs +5 -1
- package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/record-cli.test.mjs +5 -1
- package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/render.test.mjs +22 -18
- package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/rerun-safety.test.mjs +5 -1
- package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-quotes-cli.test.mjs +5 -1
- package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-strategy-cli.test.mjs +5 -1
- package/plugins/{solution-architect → presales}/skills/estimate/README.md +14 -4
- package/plugins/{solution-architect → presales}/skills/estimate/classic/references/writing.md +1 -1
- package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/roadmap.mjs +9 -5
- package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/estimate-math.test.mjs +11 -0
- package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/project-price.test.mjs +10 -0
- package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/xlsx-export.test.mjs +12 -12
- package/plugins/{solution-architect → presales}/skills/estimate/evals/evals.json +1 -1
- package/plugins/presales/skills/estimate/shared/assets/xlsx-export.js +392 -0
- package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/project-price.mjs +6 -4
- package/plugins/presales/skills/estimate/workflow-based/FLOW.md +176 -0
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/assets/estimate-template.html +127 -10
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/assets/estimator-system.xlsx +0 -0
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/assets/score-review.html +164 -27
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/build-template.mjs +9 -2
- package/plugins/presales/skills/estimate/workflow-based/scripts/build-workflow-template.mjs +76 -0
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/build-xlsx-template.py +3 -3
- package/plugins/presales/skills/estimate/workflow-based/scripts/lib/cites.mjs +60 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/lib/groups.mjs +65 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/lib/page-html.mjs +43 -0
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/page-view.mjs +30 -4
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/rollup.mjs +43 -12
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/schema.mjs +23 -1
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/score-diff.mjs +6 -1
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/score-html.mjs +23 -4
- package/plugins/presales/skills/estimate/workflow-based/scripts/lib/xlsx-group-rows.mjs +20 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/lib/xlsx-rows.mjs +81 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/lib/xlsx-tasks.mjs +25 -0
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/render.mjs +8 -10
- package/plugins/presales/skills/estimate/workflow-based/scripts/score-review.mjs +81 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/template/cites.js +46 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/template/effort.css +22 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/template/effort.mjs +37 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/template/estimate-page.css +10 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/template/estimate-page.js +16 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/template/feature-tasks.js +33 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/template/lavish.mjs +39 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/template/tasks.css +25 -0
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/view.js +21 -2
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/also-builds-browser.test.mjs +1 -3
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/browser.test.mjs +10 -7
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/build-pages.test.mjs +10 -15
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/build-template.test.mjs +6 -2
- package/plugins/presales/skills/estimate/workflow-based/scripts/test/cites.test.mjs +64 -0
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/cli.test.mjs +1 -0
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/estimator-system.test.mjs +5 -5
- package/plugins/presales/skills/estimate/workflow-based/scripts/test/feature-tasks-browser.test.mjs +39 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/test/groups-browser.test.mjs +39 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/test/groups.test.mjs +156 -0
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/link-picker-browser.test.mjs +1 -10
- package/plugins/presales/skills/estimate/workflow-based/scripts/test/open-lavish.test.mjs +54 -0
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/page-html.test.mjs +7 -0
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/pages-browser.test.mjs +25 -21
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/render.test.mjs +5 -5
- package/plugins/presales/skills/estimate/workflow-based/scripts/test/review-effort.test.mjs +104 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/test/review-lavish.test.mjs +193 -0
- package/plugins/presales/skills/estimate/workflow-based/scripts/test/review-tasks.test.mjs +66 -0
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/schema.test.mjs +15 -0
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/score-review.test.mjs +10 -1
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/stage.mjs +16 -8
- package/plugins/presales/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs +110 -0
- package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/validate.mjs +2 -0
- package/plugins/{solution-architect → presales}/skills/new-lead/README.md +1 -1
- package/plugins/{solution-architect → presales}/skills/new-lead/SKILL.md +1 -1
- package/plugins/{solution-architect → presales}/skills/new-lead/evals/evals.json +13 -13
- package/plugins/presales/skills/proposal/README.md +63 -0
- package/plugins/presales/skills/proposal/SKILL.md +91 -0
- package/plugins/presales/skills/proposal/assets/proposal-page.html +156 -0
- package/plugins/presales/skills/proposal/assets/roboto-widths.json +1 -0
- package/plugins/{solution-architect → presales}/skills/proposal/evals/evals.json +22 -22
- package/plugins/presales/skills/proposal/references/build.md +33 -0
- package/plugins/presales/skills/proposal/references/diagrams.md +123 -0
- package/plugins/presales/skills/proposal/references/interview.md +66 -0
- package/plugins/presales/skills/proposal/references/review.md +41 -0
- package/plugins/{solution-architect → presales}/skills/proposal/references/workflow.md +30 -22
- package/plugins/presales/skills/proposal/references/writing.md +167 -0
- package/plugins/presales/skills/proposal/scripts/build/arrows.mjs +70 -0
- package/plugins/presales/skills/proposal/scripts/build/brand.mjs +43 -0
- package/plugins/presales/skills/proposal/scripts/build/build.mjs +75 -0
- package/plugins/presales/skills/proposal/scripts/build/contents.mjs +42 -0
- package/plugins/presales/skills/proposal/scripts/build/docx-blocks.mjs +102 -0
- package/plugins/presales/skills/proposal/scripts/build/docx-doc.mjs +91 -0
- package/plugins/presales/skills/proposal/scripts/build/docx-inline.mjs +48 -0
- package/plugins/presales/skills/proposal/scripts/build/docx-table.mjs +75 -0
- package/plugins/presales/skills/proposal/scripts/build/figures.mjs +95 -0
- package/plugins/presales/skills/proposal/scripts/build/html.mjs +80 -0
- package/plugins/presales/skills/proposal/scripts/build/layout.mjs +48 -0
- package/plugins/presales/skills/proposal/scripts/build/notes.mjs +30 -0
- package/plugins/presales/skills/proposal/scripts/build/overlap.mjs +57 -0
- package/plugins/presales/skills/proposal/scripts/build/page.mjs +50 -0
- package/plugins/presales/skills/proposal/scripts/build/pdf.mjs +88 -0
- package/plugins/presales/skills/proposal/scripts/build/scope-ids.mjs +10 -0
- package/plugins/presales/skills/proposal/scripts/build/tool.mjs +35 -0
- package/plugins/{solution-architect → presales}/skills/proposal/scripts/derive.mjs +7 -1
- package/plugins/presales/skills/proposal/scripts/diagram/align.mjs +36 -0
- package/plugins/presales/skills/proposal/scripts/diagram/draw.mjs +81 -0
- package/plugins/presales/skills/proposal/scripts/diagram/grid.mjs +90 -0
- package/plugins/presales/skills/proposal/scripts/diagram/icons.mjs +30 -0
- package/plugins/presales/skills/proposal/scripts/diagram/index.mjs +23 -0
- package/plugins/presales/skills/proposal/scripts/diagram/layout.mjs +42 -0
- package/plugins/presales/skills/proposal/scripts/diagram/obstacles.mjs +49 -0
- package/plugins/presales/skills/proposal/scripts/diagram/pack.mjs +101 -0
- package/plugins/presales/skills/proposal/scripts/diagram/route.mjs +129 -0
- package/plugins/presales/skills/proposal/scripts/diagram/steps.mjs +74 -0
- package/plugins/presales/skills/proposal/scripts/diagram/style.mjs +61 -0
- package/plugins/presales/skills/proposal/scripts/diagram/text.mjs +28 -0
- package/plugins/presales/skills/proposal/scripts/lib/bans.mjs +82 -0
- package/plugins/presales/skills/proposal/scripts/lib/checks-client.mjs +74 -0
- package/plugins/presales/skills/proposal/scripts/lib/checks-doc.mjs +78 -0
- package/plugins/presales/skills/proposal/scripts/lib/checks.mjs +44 -0
- package/plugins/presales/skills/proposal/scripts/lib/citations.mjs +45 -0
- package/plugins/presales/skills/proposal/scripts/lib/diagram-spec.mjs +67 -0
- package/plugins/presales/skills/proposal/scripts/lib/figures.mjs +79 -0
- package/plugins/presales/skills/proposal/scripts/lib/load.mjs +42 -0
- package/plugins/presales/skills/proposal/scripts/lib/money.mjs +62 -0
- package/plugins/presales/skills/proposal/scripts/lib/parts.mjs +83 -0
- package/plugins/presales/skills/proposal/scripts/lib/price-source.mjs +74 -0
- package/plugins/presales/skills/proposal/scripts/lib/prose.mjs +55 -0
- package/plugins/presales/skills/proposal/scripts/lib/workbook.mjs +86 -0
- package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-checks.mjs +7 -2
- package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-cli.mjs +16 -18
- package/plugins/presales/skills/proposal/scripts/lib/workflow-md.mjs +35 -0
- package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-view.mjs +3 -3
- package/plugins/presales/skills/proposal/scripts/render.mjs +55 -0
- package/plugins/presales/skills/proposal/scripts/test/acme.mjs +28 -0
- package/plugins/presales/skills/proposal/scripts/test/bans.test.mjs +59 -0
- package/plugins/presales/skills/proposal/scripts/test/build.test.mjs +128 -0
- package/plugins/presales/skills/proposal/scripts/test/diagram.test.mjs +154 -0
- package/plugins/presales/skills/proposal/scripts/test/docs.test.mjs +13 -0
- package/plugins/presales/skills/proposal/scripts/test/e2e.test.mjs +20 -0
- package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/evals-fixtures.test.mjs +8 -5
- package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/figures.test.mjs +29 -1
- package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/diagrams/aws-on-neutral.json +60 -0
- package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/diagrams/booking.json +61 -0
- package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/proposal-fail.md +49 -0
- package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/proposal.md +72 -0
- package/plugins/presales/skills/proposal/scripts/test/fixtures/acme/references.json +5 -0
- package/plugins/presales/skills/proposal/scripts/test/fixtures/workbook-recalculated.xlsx +0 -0
- package/plugins/presales/skills/proposal/scripts/test/fixtures/workbook-unrecalculated.xlsx +0 -0
- package/plugins/presales/skills/proposal/scripts/test/layout.test.mjs +89 -0
- package/plugins/presales/skills/proposal/scripts/test/parts.test.mjs +112 -0
- package/plugins/presales/skills/proposal/scripts/test/prices.test.mjs +122 -0
- package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/quality-gates.test.mjs +1 -1
- package/plugins/presales/skills/proposal/scripts/test/steps.test.mjs +38 -0
- package/plugins/presales/skills/proposal/scripts/test/validate.test.mjs +46 -0
- package/plugins/presales/skills/proposal/scripts/test/workbook.test.mjs +76 -0
- package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/workflow-checks.test.mjs +7 -2
- package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/workflow-view.test.mjs +15 -10
- package/plugins/{solution-architect → presales}/skills/proposal/scripts/validate.mjs +8 -3
- 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/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/solution-architect/.claude-plugin/plugin.json +0 -9
- package/plugins/solution-architect/skills/estimate/shared/assets/xlsx-export.js +0 -336
- package/plugins/solution-architect/skills/estimate/workflow-based/FLOW.md +0 -95
- package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-components.html +0 -1071
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-components-template.mjs +0 -85
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-workflow-template.mjs +0 -51
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-html.mjs +0 -44
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/xlsx-rows.mjs +0 -53
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/score-review.mjs +0 -46
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/feature-tasks.js +0 -21
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/feature-tasks-browser.test.mjs +0 -30
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs +0 -59
- package/plugins/solution-architect/skills/proposal/README.md +0 -51
- package/plugins/solution-architect/skills/proposal/SKILL.md +0 -69
- package/plugins/solution-architect/skills/proposal/assets/proposal-template.html +0 -82
- package/plugins/solution-architect/skills/proposal/assets/proposal-workflow.html +0 -143
- package/plugins/solution-architect/skills/proposal/references/interview.md +0 -60
- package/plugins/solution-architect/skills/proposal/references/review.md +0 -40
- package/plugins/solution-architect/skills/proposal/references/writing.md +0 -104
- package/plugins/solution-architect/skills/proposal/scripts/lib/checks-client.mjs +0 -58
- package/plugins/solution-architect/skills/proposal/scripts/lib/checks-doc.mjs +0 -64
- package/plugins/solution-architect/skills/proposal/scripts/lib/checks.mjs +0 -21
- package/plugins/solution-architect/skills/proposal/scripts/lib/docx-body.mjs +0 -42
- package/plugins/solution-architect/skills/proposal/scripts/lib/docx-package.mjs +0 -56
- package/plugins/solution-architect/skills/proposal/scripts/lib/docx-xml.mjs +0 -44
- package/plugins/solution-architect/skills/proposal/scripts/lib/figures.mjs +0 -34
- package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-html.mjs +0 -39
- package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-page.mjs +0 -30
- package/plugins/solution-architect/skills/proposal/scripts/render.mjs +0 -64
- package/plugins/solution-architect/skills/proposal/scripts/test/checks-client.test.mjs +0 -147
- package/plugins/solution-architect/skills/proposal/scripts/test/checks-doc.test.mjs +0 -152
- package/plugins/solution-architect/skills/proposal/scripts/test/docs.test.mjs +0 -57
- package/plugins/solution-architect/skills/proposal/scripts/test/docx.test.mjs +0 -68
- package/plugins/solution-architect/skills/proposal/scripts/test/e2e.test.mjs +0 -30
- package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-fail.md +0 -27
- package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-pass.md +0 -51
- package/plugins/solution-architect/skills/proposal/scripts/test/render.test.mjs +0 -70
- package/plugins/solution-architect/skills/proposal/scripts/test/validate.test.mjs +0 -41
- package/plugins/solution-architect/skills/proposal/scripts/test/workflow-browser.test.mjs +0 -96
- package/plugins/solution-architect/skills/proposal/scripts/test/workflow-docs.test.mjs +0 -25
- package/plugins/solution-architect/skills/proposal/scripts/test/workflow-render.test.mjs +0 -75
- /package/plugins/{solution-architect → presales}/evals/proposal-workflow/case.yaml +0 -0
- /package/plugins/{solution-architect → presales}/evals/proposal-workflow/fixture.sh +0 -0
- /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/inputs-written.md +0 -0
- /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/no-proposal-md.md +0 -0
- /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/skill-fired.md +0 -0
- /package/plugins/{solution-architect → presales}/evals/proposal-workflow/graders/validate-then-render.md +0 -0
- /package/plugins/{solution-architect → presales}/evals/proposal-workflow/prompt.md +0 -0
- /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/case.yaml +0 -0
- /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/fixture.sh +0 -0
- /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/no-classic-fallback.md +0 -0
- /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/nothing-written.md +0 -0
- /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/skill-fired.md +0 -0
- /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/graders/stops-at-gate.md +0 -0
- /package/plugins/{solution-architect → presales}/evals/workflow-gate-no-architecture/prompt.md +0 -0
- /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/case.yaml +0 -0
- /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/fixture.sh +0 -0
- /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/no-estimation-md.md +0 -0
- /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/pages-or-stop.md +0 -0
- /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/routed-to-workflow.md +0 -0
- /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/skill-fired.md +0 -0
- /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/graders/three-questions-max.md +0 -0
- /package/plugins/{solution-architect → presales}/evals/workflow-happy-path/prompt.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/README.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/SKILL.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/OFL.txt +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-mono-latin-600-normal.woff2 +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-sans-latin-400-normal.woff2 +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-sans-latin-500-normal.woff2 +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/fonts/ibm-plex-sans-latin-600-normal.woff2 +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/mermaid-theme.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/section-help.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/assets/viewer-template.html +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/greenfield-llm-triage-spec/triage-service-spec.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/transcript-citations/C1-kickoff-call.txt +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/evals/fixtures/transcript-citations/E1-intro-email.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/extract.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/interview.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/likec4.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/project-types.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/quality-goals.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/research.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/rewriting.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/viewer.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/references/writing.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/ba-facts.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/check-quotes.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/drift.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/ba-package.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/cdp.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/chrome.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/companion-links.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-kinds.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-links.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-routes.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/doc-sections.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/drift.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/embed.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/er-entities.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/fonts.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/frontmatter.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/git-diff.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/inputs.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/likec4-config.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/likec4-extract.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/likec4-steps.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-defs.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-flows.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-inline.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-links.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-list.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-render.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-shape.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-tables.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-views.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/md-wide.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/nav.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/offline.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/port.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/quality-gate.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/section-help.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/slug-registry.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/state.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/strategy-sections.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-clusters.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-deployment.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-elections.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-links.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-model-tables.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-palette.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-provenance.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-quotes.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-strategy.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/lib/validate-tree.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/likec4-config.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/likec4-export.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/likec4-gen.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/record.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/render.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/serve.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/ba-package.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/companion-links.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-kinds.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-links.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-routes.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/doc-sections.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/drift.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/embed.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/er-entities.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/extract-workflow.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/ARCHITECTURE.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/c4-src/broken/model.c4 +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/c4-src/pass/model.c4 +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/docs/adr/0001-sample.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/docs/estimate.html +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/docs/estimation.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/model-broken.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/model.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/docs-pass/threat-model.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/sample-model.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fixtures/sample.c4 +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/fonts.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/frontmatter.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/git-diff.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-config.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-extract.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/likec4-steps.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-flows.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-links.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-provenance.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-render.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-tables.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-views.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/md-wide.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/nav.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/offline.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/quality-gate.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/quality-gates.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/research-workflow.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/rewriting.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/section-help.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/serve.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/state.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-clusters.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-deployment.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-elections.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-links.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-model-tables.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-provenance.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-quotes.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-strategy.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/validate-tree.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/test/viewer-template.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/scripts/validate.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/workflows/extract.js +0 -0
- /package/plugins/{solution-architect → presales}/skills/analyze-requirements/workflows/research.js +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/SKILL.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/FLOW.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/assets/estimate-template-agentic.html +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/assets/estimate-template.html +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/assets/scores-review-template.html +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/agentic-estimation.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/ai-multipliers.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/interview.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/scoring-guide.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/slicing.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/task-shapes.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/references/techniques.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/compute.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/agentic-checks.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/checks.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/components.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/md-tables.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/redact.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/rollup.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/schema.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/score-csv.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/score-html.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/lib/scoring-checks.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/render.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/score-review.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/baselines.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/browser-agentic.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/browser.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/compute.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/e2e.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/agentic-estimation-fail.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/agentic-estimation-pass.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/agentic-inputs.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/booking-inputs.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/estimation-fail.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/estimation-pass.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/fixtures/measurements.jsonl +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/measurements.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/pricing.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/quality-gates.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/references.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/render.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/schema.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/score-review.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/scoring.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/url-state.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/validate.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/zip-store.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/test/zip.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/classic/scripts/validate.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/gate-check-northgate/northgate-email.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-agentic-halyard/measurements.jsonl +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-agentic-halyard/requirements.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-agentic-halyard/requirements.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-traditional-trellis/ARCHITECTURE.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-traditional-trellis/requirements.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/pre-fed-traditional-trellis/requirements.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/agentic-task-schema.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/baselines.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/context-schema.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/estimate-math.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/inline.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/measurements.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/pricing.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/score-diff.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/scoring-schema.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/scoring.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/shared/lib/zip.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/references/hidden-work-by-type.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/references/linking.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/compute.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/pair-findings.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/requirements.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/lib/schema-components.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/also-builds.css +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/also-builds.js +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/arch-link.js +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/click.js +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/link-picker.css +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/link-picker.js +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/template/prelude.js +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/ARCHITECTURE-mini.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/feedback.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/inputs-pass.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/measurements.jsonl +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/fixtures/requirements.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/page-view.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/quality-gates.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/requirements.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/rollup.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/estimate/workflow-based/scripts/test/workflow-script.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/detail.html +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/index.html +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/start.sh +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/stats.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/assets/dashboard/vendor/reactflow-bundle.js +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/assets/vendor-build/entry.jsx +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/assets/vendor-build/package-lock.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/assets/vendor-build/package.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/ARCHITECTURE.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/brief.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/dist/index.html +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/estimation.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/proposal.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/harborline-logistics-tms/requirements.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/sable-dental-booking/rfp.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/vellum-books-checkout/ARCHITECTURE.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads/vellum-books-checkout/rfp.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/existing-root-pipeline/leads.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/fresh-lead-northwind/rfp-northwind.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/skips-to-proposal/leads/meridian-freight-portal/rfp.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/evals/fixtures/skips-to-proposal/leads.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/init-root.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lead-upsert.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/enrich.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/map-nodes.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/map.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/port.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/lib/registry.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/serve.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/e2e-workspace.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/enrich.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/ARCHITECTURE.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/brief.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/dist/index.html +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/dist/proposal-non-tech.html +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/dist/threat-model.html +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/estimation-inputs.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/estimation.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/notes.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/proposal-non-tech.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/rfp.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/fixtures/root/leads.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/init-root.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/lead-upsert.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/map.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/port.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/registry-io.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/registry.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/serve.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/stats.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/validate-cli.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/test/vendor-bundle.test.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/new-lead/scripts/validate.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-rivet-gym/ARCHITECTURE.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-rivet-gym/brief.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/ARCHITECTURE.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/brief.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/estimation-inputs.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/estimation.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/ARCHITECTURE.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/brief.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/dist/mermaid.js +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation-inputs.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/ARCHITECTURE.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/brief.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/dist/mermaid.js +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation-inputs.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation-inputs.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/measurements.jsonl +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/requirements.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/jargon.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/sections.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-lead.mjs +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/fixtures/proposal-inputs-pass.json +0 -0
- /package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/workflow-stage.mjs +0 -0
- /package/plugins/{solution-architect → presales}/workflows/review-links.js +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// The architecture-diagram spec (references/diagrams.md), checked before any
|
|
2
|
+
// drawing: ids, nesting, families and frames. A client on AWS gets the
|
|
3
|
+
// official AWS icons; on any other cloud, or none, a figure may carry no AWS
|
|
4
|
+
// icon and no AWS name.
|
|
5
|
+
import { FAMILY, GROUP_KINDS } from '../diagram/style.mjs';
|
|
6
|
+
|
|
7
|
+
const AWS_WORD = /\b(AWS|Amazon)\b/;
|
|
8
|
+
const SIDES = ['N', 'E', 'S', 'W'];
|
|
9
|
+
|
|
10
|
+
function checkTop(spec, out) {
|
|
11
|
+
for (const key of ['title', 'desc']) if (typeof spec[key] !== 'string' || !spec[key].trim()) out.push(`"${key}" is required (it is the figure's accessible text)`);
|
|
12
|
+
if (!['neutral', 'aws'].includes(spec.icons ?? 'neutral')) out.push('"icons" must be neutral | aws');
|
|
13
|
+
if (spec.arrange && !['row', 'column'].includes(spec.arrange)) out.push('"arrange" must be row | column');
|
|
14
|
+
for (const key of ['groups', 'nodes', 'edges']) if (!Array.isArray(spec[key])) out.push(`"${key}" must be an array`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function checkGroups(spec, ids, out) {
|
|
18
|
+
const kinds = GROUP_KINDS[spec.icons ?? 'neutral'] ?? GROUP_KINDS.neutral;
|
|
19
|
+
for (const g of spec.groups) {
|
|
20
|
+
if (!kinds[g.kind]) out.push(`group ${g.id}: kind "${g.kind}" is not one of ${Object.keys(kinds).join(', ')}`);
|
|
21
|
+
if (!g.label) out.push(`group ${g.id}: needs a label`);
|
|
22
|
+
if (g.in && !spec.groups.some((p) => p.id === g.in)) out.push(`group ${g.id}: parent "${g.in}" is not a group`);
|
|
23
|
+
if (g.arrange && !['row', 'column'].includes(g.arrange)) out.push(`group ${g.id}: "arrange" must be row | column`);
|
|
24
|
+
for (const c of g.children ?? []) if (![...spec.groups, ...spec.nodes].some((x) => x.id === c && x.in === g.id)) out.push(`group ${g.id}: child "${c}" is not in this group`);
|
|
25
|
+
let p = g; const seen = new Set();
|
|
26
|
+
while (p?.in && !seen.has(p.id)) { seen.add(p.id); p = spec.groups.find((x) => x.id === p.in); }
|
|
27
|
+
if (p?.in) out.push(`group ${g.id}: groups nest in a loop`);
|
|
28
|
+
}
|
|
29
|
+
for (const id of ids.dupes) out.push(`id "${id}" is used twice`);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function checkNodes(spec, out) {
|
|
33
|
+
for (const n of spec.nodes) {
|
|
34
|
+
if (!n.label) out.push(`node ${n.id}: needs a label`);
|
|
35
|
+
if (!n.icon) out.push(`node ${n.id}: needs an icon`);
|
|
36
|
+
if (!/^aws/.test(n.icon ?? '') && !(n.family in FAMILY)) out.push(`node ${n.id}: family "${n.family}" is not one of ${Object.keys(FAMILY).join(', ')}`);
|
|
37
|
+
if (n.in && !spec.groups.some((g) => g.id === n.in)) out.push(`node ${n.id}: group "${n.in}" does not exist`);
|
|
38
|
+
}
|
|
39
|
+
for (const e of spec.edges) {
|
|
40
|
+
for (const end of [e.from, e.to]) if (!spec.nodes.some((n) => n.id === end)) out.push(`edge ${e.from} → ${e.to}: "${end}" is not a node`);
|
|
41
|
+
for (const side of [e.exit, e.entry]) if (side && !SIDES.includes(side)) out.push(`edge ${e.from} → ${e.to}: sides are ${SIDES.join(', ')}`);
|
|
42
|
+
if (e.arrow && e.arrow !== 'back') out.push(`edge ${e.from} → ${e.to}: "arrow" can only be "back"`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Neutral figures: no AWS icon, no AWS word anywhere on the figure.
|
|
47
|
+
function checkCloud(spec, cloud, out) {
|
|
48
|
+
const icons = spec.icons ?? 'neutral';
|
|
49
|
+
if (cloud === 'aws' && icons !== 'aws') out.push('the client is on AWS: set "icons": "aws" and use the official AWS icons');
|
|
50
|
+
if (cloud !== 'aws' && icons === 'aws') out.push(`the client is not on AWS (cloud: ${cloud}): use "icons": "neutral"`);
|
|
51
|
+
if (icons === 'aws') return;
|
|
52
|
+
for (const n of spec.nodes) if (/^aws/.test(n.icon ?? '')) out.push(`node ${n.id}: AWS icon on a figure that is not AWS`);
|
|
53
|
+
const words = [spec.title, spec.desc, ...spec.groups.flatMap((g) => [g.label, g.note]), ...spec.nodes.flatMap((n) => [n.label, ...[].concat(n.sub ?? [])]), ...spec.edges.map((e) => e.label)];
|
|
54
|
+
const hit = words.filter(Boolean).find((w) => AWS_WORD.test(w));
|
|
55
|
+
if (hit) out.push(`AWS name on a figure that is not AWS: "${hit}"`);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function checkDiagramSpec(spec, { cloud, name }) {
|
|
59
|
+
const out = [];
|
|
60
|
+
checkTop(spec, out);
|
|
61
|
+
if (out.length) return out.map((f) => `diagram ${name}: ${f}`);
|
|
62
|
+
const all = [...spec.groups, ...spec.nodes].map((x) => x.id);
|
|
63
|
+
checkGroups(spec, { dupes: all.filter((id, i) => all.indexOf(id) !== i) }, out);
|
|
64
|
+
checkNodes(spec, out);
|
|
65
|
+
checkCloud(spec, cloud, out);
|
|
66
|
+
return out.map((f) => `diagram ${name}: ${f}`);
|
|
67
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// Client-facing figures derived from estimation.json — the proposal never
|
|
2
|
+
// invents a number. The range is the estimate's own presented range, so the
|
|
3
|
+
// proposal and the workbook always quote the same figures. Milestone splits
|
|
4
|
+
// follow the roadmap's effort shares; there are no durations, because the
|
|
5
|
+
// estimate produces none.
|
|
6
|
+
export const round100 = (n) => Math.round(n / 100) * 100;
|
|
7
|
+
export const formatMoney = (n) => `$${n.toLocaleString('en-US')}`;
|
|
8
|
+
|
|
9
|
+
const split = (cost, share) => ({ low: round100(cost.low * share), high: round100(cost.high * share) });
|
|
10
|
+
|
|
11
|
+
// The rows sit above a bold Total line the client reads against them, so
|
|
12
|
+
// they must add up to it exactly: every milestone but the last is its share
|
|
13
|
+
// rounded to $100, and the last takes whatever remains (R59).
|
|
14
|
+
function splitCosts(cost, roadmap) {
|
|
15
|
+
if (roadmap.length === 0) return [];
|
|
16
|
+
const heads = roadmap.slice(0, -1).map((b) => split(cost, b.share));
|
|
17
|
+
const taken = (bound) => heads.reduce((sum, c) => sum + c[bound], 0);
|
|
18
|
+
return [...heads, { low: cost.low - taken('low'), high: cost.high - taken('high') }];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// One estimate, one price: a scored estimate prices itself; an agentic one
|
|
22
|
+
// (no scored features) is quoted at its Ballpark v2 workbook's figures
|
|
23
|
+
// (workbook.mjs). A workbook beside a scored estimate would be a second price.
|
|
24
|
+
function pickPrice(price, workbookPrice) {
|
|
25
|
+
const priced = Boolean(price) && price.p50 !== 0;
|
|
26
|
+
if (priced && workbookPrice) {
|
|
27
|
+
throw new Error('estimate is already priced (scored features) — quote its own price, not a workbook');
|
|
28
|
+
}
|
|
29
|
+
if (priced) return { price, source: 'estimation' };
|
|
30
|
+
if (workbookPrice) return { price: workbookPrice, source: 'workbook' };
|
|
31
|
+
throw new Error('estimate is not priced (no scored features) — a proposal cannot quote it; '
|
|
32
|
+
+ 'an agentic estimate is quoted from its recalculated Ballpark v2 workbook (--workbook)');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Each feature's share of the presented range, by its point estimate, grouped
|
|
36
|
+
// by system; the shares are not shown, only the dollar splits (R59 rounding).
|
|
37
|
+
function featureSplits(estimation, cost) {
|
|
38
|
+
const named = new Map((estimation.inputs?.features ?? []).map((f) => [f.id, f]));
|
|
39
|
+
// A workflow estimate with feature groups prices each group once; a member
|
|
40
|
+
// feature's point is an equal share of its group's.
|
|
41
|
+
const groups = estimation.computed.groups ?? {};
|
|
42
|
+
const pointOf = (f) => (f.group && groups[f.group] ? groups[f.group].point / groups[f.group].members.length : f.point);
|
|
43
|
+
const feats = Object.entries(estimation.computed.features ?? {}).filter(([, f]) => pointOf(f) > 0)
|
|
44
|
+
.map(([id, f]) => ({ name: f.name ?? named.get(id)?.name ?? id, group: f.system ?? named.get(id)?.system ?? null, point: pointOf(f) }));
|
|
45
|
+
const total = feats.reduce((s, f) => s + f.point, 0);
|
|
46
|
+
if (!total) return [];
|
|
47
|
+
const costs = splitCosts(cost, feats.map((f) => ({ share: f.point / total })));
|
|
48
|
+
return feats.map((f, i) => ({ name: f.name, group: f.group, cost: costs[i] }));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// The figures a proposal may quote. With price-source.json (priceSource,
|
|
52
|
+
// already read by price-source.mjs) those win: one proposal, one price source.
|
|
53
|
+
export function deriveFigures(estimation, { workbookPrice, priceSource } = {}) {
|
|
54
|
+
if (priceSource) return priceSource;
|
|
55
|
+
const { roadmap } = estimation.computed;
|
|
56
|
+
const { price, source } = pickPrice(estimation.computed.price, workbookPrice);
|
|
57
|
+
const cost = { low: price.presentLow, high: price.presentHigh };
|
|
58
|
+
const bands = roadmap ?? [];
|
|
59
|
+
const costs = splitCosts(cost, bands);
|
|
60
|
+
return {
|
|
61
|
+
cost,
|
|
62
|
+
singleNumber: price.singleNumber,
|
|
63
|
+
source,
|
|
64
|
+
headline: [cost.low, cost.high],
|
|
65
|
+
milestones: bands.map((b, i) => ({ name: b.milestone, cost: costs[i], share: b.share })),
|
|
66
|
+
features: source === 'estimation' ? featureSplits(estimation, cost) : [],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Every dollar amount the figures hold (shares and counts are not amounts).
|
|
71
|
+
export function amountsOf(figures) {
|
|
72
|
+
const out = new Set();
|
|
73
|
+
const walk = (v, key) => {
|
|
74
|
+
if (typeof v === 'number' && key !== 'share' && Number.isInteger(v)) out.add(v);
|
|
75
|
+
else if (v && typeof v === 'object') for (const [k, x] of Object.entries(v)) walk(x, Array.isArray(v) ? key : k);
|
|
76
|
+
};
|
|
77
|
+
walk(figures, '');
|
|
78
|
+
return out;
|
|
79
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Reads everything a classic proposal names beside proposal.md: the estimate,
|
|
2
|
+
// the price source, references.json and the figure files. Read errors become
|
|
3
|
+
// findings in the gate, never crashes, so validate.mjs reports them all.
|
|
4
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
5
|
+
import { dirname, resolve } from 'node:path';
|
|
6
|
+
import { parseFrontmatter } from '../../../analyze-requirements/scripts/lib/frontmatter.mjs';
|
|
7
|
+
import { readWorkbookPrice } from './workbook.mjs';
|
|
8
|
+
import { priceSourceFigures } from './price-source.mjs';
|
|
9
|
+
import { figureFences } from './prose.mjs';
|
|
10
|
+
|
|
11
|
+
function attempt(fn) {
|
|
12
|
+
try { return { value: fn() }; } catch (e) { return { error: e.message }; }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function figureFiles(md, dir) {
|
|
16
|
+
const out = new Map();
|
|
17
|
+
for (const f of figureFences(md).filter((x) => x.meta.file)) {
|
|
18
|
+
const path = resolve(dir, f.meta.file);
|
|
19
|
+
if (!existsSync(path)) { out.set(f.meta.file, { error: 'file not found' }); continue; }
|
|
20
|
+
const text = readFileSync(path, 'utf8');
|
|
21
|
+
const spec = f.lang === 'architecture' ? attempt(() => JSON.parse(text)) : { value: null };
|
|
22
|
+
out.set(f.meta.file, spec.error ? { error: `not valid JSON (${spec.error})`, path } : { spec: spec.value, svg: f.lang === 'figure' ? text : null, path });
|
|
23
|
+
}
|
|
24
|
+
return out;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// args: md, estimation, workbook, prices (paths, as the CLI takes them).
|
|
28
|
+
export function loadProposal(args) {
|
|
29
|
+
const md = readFileSync(args.md, 'utf8');
|
|
30
|
+
const dir = dirname(resolve(args.md));
|
|
31
|
+
const fm = parseFrontmatter(md).data ?? {};
|
|
32
|
+
const refsPath = resolve(dir, fm.references ?? 'references.json');
|
|
33
|
+
const refs = existsSync(refsPath) ? attempt(() => JSON.parse(readFileSync(refsPath, 'utf8'))) : { value: {} };
|
|
34
|
+
const prices = args.prices ? attempt(() => priceSourceFigures(resolve(args.prices))) : {};
|
|
35
|
+
const errors = [refs.error && `references.json: ${refs.error}`, prices.error].filter(Boolean);
|
|
36
|
+
return {
|
|
37
|
+
md, dir, fm, errors, refs: refs.value ?? {}, priceSource: prices.value,
|
|
38
|
+
estimation: JSON.parse(readFileSync(args.estimation, 'utf8')),
|
|
39
|
+
workbookPrice: args.workbook && !args.prices ? readWorkbookPrice(args.workbook) : undefined,
|
|
40
|
+
diagrams: figureFiles(md, dir),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// Every price a part of proposal.md states, with what may vouch for it: the
|
|
2
|
+
// sentence or table it sits in may cite a source, and a bold total row in a
|
|
3
|
+
// price table may be the sum of the rows it closes. `row` marks a table price.
|
|
4
|
+
import { citedUnits } from './prose.mjs';
|
|
5
|
+
|
|
6
|
+
export const MONEY = /(?:[$€£]|\b(?:USD|EUR|SGD|GBP|AUD)\s?)(\d[\d,]*(?:\.\d+)?)(\s?[km]\b)?|(\d[\d,]*(?:\.\d+)?)\s?(?:USD|EUR|SGD|GBP|AUD)\b/g;
|
|
7
|
+
const PRICE_HEADER = /price|cost|usd|amount|investment|\$/i;
|
|
8
|
+
const num = (s) => Number(String(s).replaceAll(',', ''));
|
|
9
|
+
const cellsOf = (line) => line.trim().replace(/^\|/, '').replace(/\|$/, '').split('|').map((c) => c.trim());
|
|
10
|
+
const amount = (m) => num(m[1] ?? m[3]) * ({ k: 1e3, m: 1e6 }[m[2]?.trim()] ?? 1);
|
|
11
|
+
|
|
12
|
+
function cellValue(cell) {
|
|
13
|
+
const plain = cell.replace(/\*/g, '').trim();
|
|
14
|
+
const m = /^(?:[$€£]\s?)?(\d[\d,]*(?:\.\d+)?)$/.exec(plain);
|
|
15
|
+
return m ? num(m[1]) : null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// A bold row's amount may be the sum of the rows since the last bold row, or
|
|
19
|
+
// of every plain row so far, or of everything above it.
|
|
20
|
+
function sumsOf(rows, col) {
|
|
21
|
+
const sums = new Set();
|
|
22
|
+
let run = 0; let plain = 0; let all = 0;
|
|
23
|
+
for (const r of rows) {
|
|
24
|
+
const v = cellValue(r[col] ?? '');
|
|
25
|
+
if (v === null) continue;
|
|
26
|
+
if (/^\s*\*\*/.test(r[0] ?? '') || /^\*\*/.test(r[col])) { sums.add(Math.round(run)).add(Math.round(plain)).add(Math.round(all)); run = 0; all += v; continue; }
|
|
27
|
+
run += v; plain += v; all += v;
|
|
28
|
+
}
|
|
29
|
+
return sums;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function tablePrices(rows, sourced) {
|
|
33
|
+
const header = cellsOf(rows[0]);
|
|
34
|
+
const body = rows.slice(1).filter((r) => !/^\s*\|?[\s:|-]+\|?\s*$/.test(r)).map(cellsOf);
|
|
35
|
+
const out = [];
|
|
36
|
+
header.forEach((h, col) => {
|
|
37
|
+
if (!PRICE_HEADER.test(h)) return;
|
|
38
|
+
const sums = sumsOf(body, col);
|
|
39
|
+
for (const r of body) {
|
|
40
|
+
const v = cellValue(r[col] ?? '');
|
|
41
|
+
if (v !== null) out.push({ raw: r[col], n: v, sourced, row: true, sum: sums.has(v) });
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
return out;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Prices in prose, and in table cells (price columns, or any cell with a currency sign).
|
|
48
|
+
export function pricesIn(text) {
|
|
49
|
+
const units = citedUnits(text);
|
|
50
|
+
const out = units.filter((u) => !u.row).flatMap((u) => [...u.text.matchAll(MONEY)].map((m) => ({ raw: m[0].trim(), n: amount(m), sourced: u.sourced })));
|
|
51
|
+
for (let i = 0; i < units.length; i += 1) {
|
|
52
|
+
if (!units[i].row || (i && units[i - 1].row)) continue;
|
|
53
|
+
let j = i;
|
|
54
|
+
while (j < units.length && units[j].row) j += 1;
|
|
55
|
+
const rows = units.slice(i, j);
|
|
56
|
+
const priced = tablePrices(rows.map((u) => u.text), rows[0].sourced);
|
|
57
|
+
const seen = new Set(priced.map((p) => p.n));
|
|
58
|
+
const signed = rows.slice(1).flatMap((u) => [...u.text.matchAll(MONEY)].map((m) => ({ raw: m[0].trim(), n: amount(m), sourced: u.sourced, row: true }))).filter((p) => !seen.has(p.n));
|
|
59
|
+
out.push(...priced, ...signed);
|
|
60
|
+
}
|
|
61
|
+
return out;
|
|
62
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// The standard contents of every proposal: seven `##` parts with fixed
|
|
2
|
+
// headings in a fixed order, price early and the technical detail after it,
|
|
3
|
+
// then References, which the build makes from the citations. Anything else
|
|
4
|
+
// is a `###` inside one of the seven. Hosting and security always holds the
|
|
5
|
+
// monthly running costs, under their own fixed `###` heading.
|
|
6
|
+
export const CONTENTS = [
|
|
7
|
+
{ id: 'summary', heading: 'Executive summary' },
|
|
8
|
+
{ id: 'solution', heading: 'Proposed solution' },
|
|
9
|
+
{ id: 'scope-price', heading: 'Price' },
|
|
10
|
+
{ id: 'assumptions', heading: 'Assumptions and exclusions' },
|
|
11
|
+
{ id: 'technology', heading: 'How it works' },
|
|
12
|
+
{ id: 'hosting', heading: 'Hosting and security' },
|
|
13
|
+
{ id: 'plan', heading: 'Delivery plan and acceptance' },
|
|
14
|
+
];
|
|
15
|
+
export const REFERENCES = 'References';
|
|
16
|
+
export const RUNNING_COSTS = 'Monthly running costs';
|
|
17
|
+
|
|
18
|
+
export const PART_NAMES = Object.fromEntries(CONTENTS.map((p) => [p.id, p.heading]));
|
|
19
|
+
|
|
20
|
+
export const headingText = (raw) => raw.trim();
|
|
21
|
+
|
|
22
|
+
// A client's own review can set the contents: frontmatter `contents` is a
|
|
23
|
+
// JSON list of [id, heading] pairs in the order the parts run. Each standard
|
|
24
|
+
// part appears once, under the heading given (its checks follow its id); a
|
|
25
|
+
// new id is an extra `##` part the reviewers asked for. Without the key, the
|
|
26
|
+
// standard contents apply.
|
|
27
|
+
const ID = /^[a-z][a-z0-9-]*$/;
|
|
28
|
+
export function contentsOf(fm) {
|
|
29
|
+
const list = fm?.contents;
|
|
30
|
+
if (list === undefined) return CONTENTS;
|
|
31
|
+
if (!Array.isArray(list) || !list.every((e) => Array.isArray(e) && e.length === 2 && ID.test(e[0]) && typeof e[1] === 'string' && e[1].trim())) return CONTENTS;
|
|
32
|
+
return list.map(([id, heading]) => ({ id, heading: heading.trim() }));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Findings on a `contents` key; empty when it is absent or well formed.
|
|
36
|
+
export function contentsFindings(fm) {
|
|
37
|
+
if (fm?.contents === undefined) return [];
|
|
38
|
+
const list = fm.contents;
|
|
39
|
+
if (!Array.isArray(list) || !list.every((e) => Array.isArray(e) && e.length === 2 && ID.test(e[0]) && typeof e[1] === 'string' && e[1].trim())) {
|
|
40
|
+
return ['frontmatter: contents must be a JSON list of ["id", "Heading"] pairs'];
|
|
41
|
+
}
|
|
42
|
+
const out = [];
|
|
43
|
+
const ids = list.map((e) => e[0]);
|
|
44
|
+
ids.filter((id, i) => ids.indexOf(id) !== i).forEach((id) => out.push(`frontmatter: contents lists "${id}" twice`));
|
|
45
|
+
for (const p of CONTENTS) if (!ids.includes(p.id)) out.push(`frontmatter: contents leaves out the standard part "${p.id}" (${p.heading})`);
|
|
46
|
+
return out;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// A part is its heading in the contents, matched exactly (case and spacing aside).
|
|
50
|
+
const norm = (s) => s.trim().replace(/\s+/g, ' ').toLowerCase();
|
|
51
|
+
export const partOf = (heading, contents = CONTENTS) => contents.find((p) => norm(p.heading) === norm(heading))?.id ?? null;
|
|
52
|
+
|
|
53
|
+
// The `##` parts in document order, each with its own text up to the next `##`.
|
|
54
|
+
// Fenced code is skipped so a `##` inside a fence is not a heading.
|
|
55
|
+
export function splitParts(body, contents = CONTENTS) {
|
|
56
|
+
const parts = [];
|
|
57
|
+
let fence = false;
|
|
58
|
+
for (const line of body.split('\n')) {
|
|
59
|
+
if (/^```/.test(line)) fence = !fence;
|
|
60
|
+
const h = !fence && /^##\s+(.+)$/.exec(line);
|
|
61
|
+
if (h) parts.push({ heading: headingText(h[1]), id: partOf(h[1], contents), raw: h[1], text: '' });
|
|
62
|
+
else if (parts.length) parts[parts.length - 1].text += `${line}\n`;
|
|
63
|
+
}
|
|
64
|
+
return parts;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// The `###` sections of one part's text, each with its text up to the next
|
|
68
|
+
// `###` or `##`.
|
|
69
|
+
export function subsections(text) {
|
|
70
|
+
const out = [];
|
|
71
|
+
let fence = false;
|
|
72
|
+
for (const line of text.split('\n')) {
|
|
73
|
+
if (/^```/.test(line)) fence = !fence;
|
|
74
|
+
const h = !fence && /^###\s+(.+)$/.exec(line);
|
|
75
|
+
if (h) out.push({ heading: h[1].trim(), text: '' });
|
|
76
|
+
else if (out.length) out[out.length - 1].text += `${line}\n`;
|
|
77
|
+
}
|
|
78
|
+
return out;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// The monthly running costs: the fixed `###` inside Hosting and security.
|
|
82
|
+
export const runningCosts = (parts) => parts.filter((p) => p.id === 'hosting')
|
|
83
|
+
.flatMap((p) => subsections(p.text)).filter((s) => norm(s.heading) === norm(RUNNING_COSTS));
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// The other price sources a proposal may quote, named in price-source.json
|
|
2
|
+
// beside proposal.md (references/writing.md §3):
|
|
3
|
+
// workbook-rows: a per-feature price table read from a workbook's cached
|
|
4
|
+
// cells (a Ballpark sheet), shown in whole dollars by largest remainder so
|
|
5
|
+
// the shown rows add up to the rounded workbook total.
|
|
6
|
+
// pm-file: the PM's own price and plan files (Markdown or CSV); every
|
|
7
|
+
// currency-marked amount, price-column number and duration they state may
|
|
8
|
+
// be quoted, and `total` names the headline.
|
|
9
|
+
import { readFileSync } from 'node:fs';
|
|
10
|
+
import { dirname, resolve } from 'node:path';
|
|
11
|
+
import { sheetCells } from './workbook.mjs';
|
|
12
|
+
import { pricesIn } from './money.mjs';
|
|
13
|
+
|
|
14
|
+
const KINDS = ['workbook-rows', 'pm-file'];
|
|
15
|
+
|
|
16
|
+
function largestRemainder(values, target) {
|
|
17
|
+
const floors = values.map(Math.floor);
|
|
18
|
+
const order = values.map((v, i) => i).sort((a, b) => (values[b] - floors[b]) - (values[a] - floors[a]));
|
|
19
|
+
for (const i of order.slice(0, target - floors.reduce((s, n) => s + n, 0))) floors[i] += 1;
|
|
20
|
+
return floors;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function workbookRows(spec, dir) {
|
|
24
|
+
const cells = sheetCells(resolve(dir, spec.file), spec.sheet);
|
|
25
|
+
const [first, last] = spec.rows;
|
|
26
|
+
const rows = [];
|
|
27
|
+
for (let r = first; r <= last; r += 1) {
|
|
28
|
+
const name = String(cells.get(`${spec.nameCol}${r}`) ?? '').trim();
|
|
29
|
+
const exact = cells.get(`${spec.priceCol}${r}`);
|
|
30
|
+
if (!name || typeof exact !== 'number') throw new Error(`price source: ${spec.sheet}!${spec.priceCol}${r} has no cached price for "${name}" — recalculate the workbook`);
|
|
31
|
+
rows.push({ name, group: cells.get(`${spec.groupCol}${r}`) ?? null, exact, optional: Boolean(spec.optionalPrefix) && name.startsWith(spec.optionalPrefix) });
|
|
32
|
+
}
|
|
33
|
+
return { rows, total: cells.get(spec.totalCell) };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function rowsFigures(spec, dir) {
|
|
37
|
+
const { rows, total } = workbookRows(spec, dir);
|
|
38
|
+
if (typeof total !== 'number' || Math.abs(rows.reduce((s, x) => s + x.exact, 0) - total) > 0.5) {
|
|
39
|
+
throw new Error(`price source: the rows do not add up to ${spec.totalCell}`);
|
|
40
|
+
}
|
|
41
|
+
const shown = largestRemainder(rows.map((x) => x.exact), Math.round(total));
|
|
42
|
+
const items = rows.map((x, i) => ({ name: x.name, group: x.group, price: shown[i], optional: x.optional }));
|
|
43
|
+
const core = items.filter((x) => !x.optional).reduce((s, x) => s + x.price, 0);
|
|
44
|
+
const groups = [...new Set(items.filter((x) => !x.optional).map((x) => x.group))]
|
|
45
|
+
.map((g) => ({ group: g, price: items.filter((x) => !x.optional && x.group === g).reduce((s, x) => s + x.price, 0) }));
|
|
46
|
+
return { source: 'workbook-rows', workbook: spec.file, items, groups, core, optional: Math.round(total) - core, total: Math.round(total), cost: { low: Math.round(total), high: Math.round(total) }, headline: [Math.round(total)] };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const DURATION = /(\d+)(?:\s*(?:to|-|–)\s*(\d+))?\s*(weeks?|months?|days?)\b/gi;
|
|
50
|
+
|
|
51
|
+
const csvCells = (line) => [...line.matchAll(/(?:"((?:[^"]|"")*)"|([^,]*))(?:,|$)/g)].slice(0, -1).map((m) => (m[1] ?? m[2]).replaceAll('""', '"').trim());
|
|
52
|
+
|
|
53
|
+
// A CSV file is read as the Markdown table it stands for, so one reader finds
|
|
54
|
+
// the currency-marked amounts and the price-column numbers.
|
|
55
|
+
function pmText(path, name) {
|
|
56
|
+
if (/\.xlsx$/i.test(path)) throw new Error(`price source: ${name} is an .xlsx file — pass the CES estimate workbook with --workbook, or export the PM sheet to CSV or Markdown`);
|
|
57
|
+
const text = readFileSync(path, 'utf8');
|
|
58
|
+
return /\.csv$/i.test(path) ? text.split(/\r?\n/).filter(Boolean).flatMap((l, i) => (i === 1 ? [`|${csvCells(l).map(() => '---').join('|')}|`] : []).concat(`| ${csvCells(l).join(' | ')} |`)).join('\n') : text;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function pmFigures(spec, dir) {
|
|
62
|
+
const texts = spec.files.map((f) => pmText(resolve(dir, f), f));
|
|
63
|
+
const amounts = new Set(texts.flatMap((t) => pricesIn(t).map((x) => x.n)));
|
|
64
|
+
const durations = new Set(texts.flatMap((t) => [...t.matchAll(DURATION)].flatMap((m) => [Number(m[1]), m[2] && Number(m[2])].filter(Boolean))));
|
|
65
|
+
if (!amounts.has(spec.total)) throw new Error(`price source: total ${spec.total} is not stated as a price in the PM files`);
|
|
66
|
+
return { source: 'pm-file', files: spec.files, amounts: [...amounts].sort((a, b) => a - b), durations: [...durations].sort((a, b) => a - b), total: spec.total, cost: { low: spec.total, high: spec.total }, headline: [spec.total] };
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Figures from price-source.json; paths in it are relative to its own folder.
|
|
70
|
+
export function priceSourceFigures(path) {
|
|
71
|
+
const spec = JSON.parse(readFileSync(path, 'utf8'));
|
|
72
|
+
if (!KINDS.includes(spec.kind)) throw new Error(`price source: "kind" must be ${KINDS.join(' | ')}`);
|
|
73
|
+
return spec.kind === 'workbook-rows' ? rowsFigures(spec, dirname(path)) : pmFigures(spec, dirname(path));
|
|
74
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Plain-text views of proposal.md for the checks: the body without its
|
|
2
|
+
// frontmatter, the body without fenced code, and the units a rule applies to
|
|
3
|
+
// (a sentence of prose, or one table row).
|
|
4
|
+
export const CITE = /\[\^([a-z0-9-]+)(?:;([^\]]+))?\]/g;
|
|
5
|
+
|
|
6
|
+
export const body = (md) => md.replace(/^---\n[\s\S]*?\n---\n?/, '');
|
|
7
|
+
export const unfenced = (text) => text.replace(/^```[\s\S]*?^```/gm, '');
|
|
8
|
+
export const fences = (text, lang) => [...text.matchAll(/^```(\w+)\n([\s\S]*?)^```/gm)].filter((m) => !lang || m[1] === lang).map((m) => m[2]);
|
|
9
|
+
|
|
10
|
+
// Sentences of prose and whole table rows, each with `sourced`: a sentence
|
|
11
|
+
// carries its own citation; a table row is sourced when its table, or the
|
|
12
|
+
// paragraph just before it, cites a source (one citation per table, as the
|
|
13
|
+
// sent proposals do). A citation right after a full stop closes that sentence.
|
|
14
|
+
const HAS_CITE = new RegExp(CITE.source);
|
|
15
|
+
|
|
16
|
+
// `assumed`: the sentence, or the paragraph before a table, says the figure
|
|
17
|
+
// is our own assumption — an honest label in place of a source.
|
|
18
|
+
const ASSUMED = /\bassum/i;
|
|
19
|
+
|
|
20
|
+
function tableUnits(rows, before) {
|
|
21
|
+
const sourced = HAS_CITE.test(before) || rows.some((r) => HAS_CITE.test(r));
|
|
22
|
+
return rows.filter((r) => !/^\s*\|?[\s:|-]+\|?\s*$/.test(r)).map((r) => ({ text: r, row: true, sourced, assumed: ASSUMED.test(before) || ASSUMED.test(r) }));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function citedUnits(text) {
|
|
26
|
+
const out = [];
|
|
27
|
+
let table = [];
|
|
28
|
+
let before = '';
|
|
29
|
+
for (const line of [...unfenced(text).split('\n'), '']) {
|
|
30
|
+
if (/^\s*\|/.test(line)) { table.push(line); continue; }
|
|
31
|
+
if (table.length) { out.push(...tableUnits(table, before)); table = []; }
|
|
32
|
+
if (!line.trim()) continue;
|
|
33
|
+
before = line;
|
|
34
|
+
out.push(...line.split(/(?<=[.!?](?:\[\^[^\]]+\])?)\s+(?=[A-Z(*"“])/).map((t) => ({ text: t, row: false, sourced: HAS_CITE.test(t), assumed: ASSUMED.test(t) })));
|
|
35
|
+
}
|
|
36
|
+
return out;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const units = (text) => citedUnits(text).map((u) => u.text);
|
|
40
|
+
|
|
41
|
+
export const words = (text) => unfenced(text).replace(/[|#*>`-]/g, ' ').split(/\s+/).filter((w) => /\w/.test(w)).length;
|
|
42
|
+
|
|
43
|
+
// Figure fences: ```architecture / ```mermaid / ```figure / ```steps, each with
|
|
44
|
+
// "key: value" meta lines first (mermaid writes them as "%% key: value").
|
|
45
|
+
export function figureFences(text) {
|
|
46
|
+
return [...text.matchAll(/^```(architecture|mermaid|figure|steps)\n([\s\S]*?)^```/gm)].map((m) => {
|
|
47
|
+
const meta = {};
|
|
48
|
+
const rest = m[2].split('\n').filter((l) => {
|
|
49
|
+
const kv = /^(?:%%\s*)?(file|caption):\s*(.*)$/.exec(l);
|
|
50
|
+
if (kv) meta[kv[1]] = kv[2].trim();
|
|
51
|
+
return !kv;
|
|
52
|
+
});
|
|
53
|
+
return { lang: m[1], meta, body: rest.join('\n').trim(), inner: m[2], raw: m[0] };
|
|
54
|
+
});
|
|
55
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// The second price source: the CES Ballpark Estimator v2 workbook an agentic
|
|
2
|
+
// lead fills beside its estimate. An agentic estimate carries no price, so the
|
|
3
|
+
// workbook's own Project Roll-up figures are quoted instead — read from the
|
|
4
|
+
// cached values a recalculation left behind, never recomputed here.
|
|
5
|
+
// Dependency-free: an xlsx is a zip of XML parts, and node:zlib inflates them.
|
|
6
|
+
import { readFileSync } from 'node:fs';
|
|
7
|
+
import { inflateRawSync } from 'node:zlib';
|
|
8
|
+
|
|
9
|
+
const SHEET = 'Project Roll-up';
|
|
10
|
+
const CELLS = { presentLow: 'C56', presentHigh: 'D56', singleNumber: 'C57' };
|
|
11
|
+
const EOCD = 0x06054b50;
|
|
12
|
+
const CENTRAL = 0x02014b50;
|
|
13
|
+
|
|
14
|
+
function centralDirectory(buf) {
|
|
15
|
+
for (let i = buf.length - 22; i >= Math.max(0, buf.length - 65557); i -= 1) {
|
|
16
|
+
if (buf.readUInt32LE(i) === EOCD) return { count: buf.readUInt16LE(i + 10), offset: buf.readUInt32LE(i + 16) };
|
|
17
|
+
}
|
|
18
|
+
throw new Error('not an xlsx (no zip directory found)');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Map every part name to its decompressed text, walking the central directory.
|
|
22
|
+
function unzip(buf) {
|
|
23
|
+
const { count, offset } = centralDirectory(buf);
|
|
24
|
+
const parts = new Map();
|
|
25
|
+
let p = offset;
|
|
26
|
+
for (let n = 0; n < count && buf.readUInt32LE(p) === CENTRAL; n += 1) {
|
|
27
|
+
const method = buf.readUInt16LE(p + 10);
|
|
28
|
+
const size = buf.readUInt32LE(p + 20);
|
|
29
|
+
const nameLen = buf.readUInt16LE(p + 28);
|
|
30
|
+
const skip = nameLen + buf.readUInt16LE(p + 30) + buf.readUInt16LE(p + 32);
|
|
31
|
+
const name = buf.toString('utf8', p + 46, p + 46 + nameLen);
|
|
32
|
+
const local = buf.readUInt32LE(p + 42);
|
|
33
|
+
const start = local + 30 + buf.readUInt16LE(local + 26) + buf.readUInt16LE(local + 28);
|
|
34
|
+
const raw = buf.subarray(start, start + size);
|
|
35
|
+
parts.set(name, (method === 8 ? inflateRawSync(raw) : raw).toString('utf8'));
|
|
36
|
+
p += 46 + skip;
|
|
37
|
+
}
|
|
38
|
+
return parts;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function sheetPart(parts, name) {
|
|
42
|
+
const sheet = new RegExp(`<sheet\\b[^>]*name="${name}"[^>]*>`).exec(parts.get('xl/workbook.xml') ?? '');
|
|
43
|
+
const rid = sheet && /r:id="([^"]+)"/.exec(sheet[0]);
|
|
44
|
+
if (!rid) throw new Error(`workbook has no "${name}" sheet`);
|
|
45
|
+
const rel = new RegExp(`<Relationship\\b[^>]*Id="${rid[1]}"[^>]*>`).exec(parts.get('xl/_rels/workbook.xml.rels') ?? '');
|
|
46
|
+
const target = rel && /Target="([^"]+)"/.exec(rel[0])[1];
|
|
47
|
+
return parts.get(target.startsWith('/') ? target.slice(1) : `xl/${target}`);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Shared strings in order, so a cell with t="s" can be read as text.
|
|
51
|
+
function sharedStrings(parts) {
|
|
52
|
+
const xml = parts.get('xl/sharedStrings.xml') ?? '';
|
|
53
|
+
return [...xml.matchAll(/<si>([\s\S]*?)<\/si>/g)].map((m) => [...m[1].matchAll(/<t[^>]*>([^<]*)<\/t>/g)].map((t) => t[1]).join('')
|
|
54
|
+
.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll(''', "'"));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Every cached cell value of one sheet: ref -> number or text.
|
|
58
|
+
export function sheetCells(path, name) {
|
|
59
|
+
const parts = unzip(readFileSync(path));
|
|
60
|
+
const strings = sharedStrings(parts);
|
|
61
|
+
const cells = new Map();
|
|
62
|
+
for (const m of sheetPart(parts, name).matchAll(/<c\b([^>]*?)(?:\/>|>([\s\S]*?)<\/c>)/g)) {
|
|
63
|
+
const ref = /\br="([A-Z]+\d+)"/.exec(m[1])?.[1];
|
|
64
|
+
const type = /\bt="([^"]+)"/.exec(m[1])?.[1];
|
|
65
|
+
const v = m[2] && (/<v>([^<]*)<\/v>/.exec(m[2])?.[1] ?? /<t[^>]*>([^<]*)<\/t>/.exec(m[2])?.[1]);
|
|
66
|
+
if (ref && v !== undefined && v !== null) cells.set(ref, type === 's' ? strings[Number(v)] : type === 'str' || type === 'inlineStr' ? v : Number(v));
|
|
67
|
+
}
|
|
68
|
+
return cells;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function cachedNumber(xml, ref) {
|
|
72
|
+
const cell = new RegExp(`<c\\b[^>]*\\br="${ref}"[^>]*(?:/>|>([\\s\\S]*?)</c>)`).exec(xml);
|
|
73
|
+
const v = cell?.[1] && /<v>([^<]*)<\/v>/.exec(cell[1]);
|
|
74
|
+
const n = v ? Number(v[1]) : NaN;
|
|
75
|
+
if (!Number.isFinite(n) || n <= 0) {
|
|
76
|
+
throw new Error(`${SHEET}!${ref} has no cached value — recalculate the workbook (LibreOffice) before quoting it`);
|
|
77
|
+
}
|
|
78
|
+
return Math.round(n);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function readWorkbookPrice(path) {
|
|
82
|
+
const buf = readFileSync(path);
|
|
83
|
+
if (buf.length < 22 || buf.readUInt32LE(0) !== 0x04034b50) throw new Error(`not an xlsx: ${path}`);
|
|
84
|
+
const xml = sheetPart(unzip(buf), SHEET);
|
|
85
|
+
return Object.fromEntries(Object.entries(CELLS).map(([key, ref]) => [key, cachedNumber(xml, ref)]));
|
|
86
|
+
}
|
package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-checks.mjs
RENAMED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { milestoneView } from '../../../estimate/workflow-based/scripts/lib/page-view.mjs';
|
|
6
6
|
import { JARGON } from './jargon.mjs';
|
|
7
7
|
import { escapeRegExp } from './sections.mjs';
|
|
8
|
+
import { validityWording, outOfPlaceWording } from './bans.mjs';
|
|
8
9
|
|
|
9
10
|
const TECH_LEVELS = ['non-tech', 'low-tech', 'technical'];
|
|
10
11
|
const CODES = 'USD|SGD|EUR|GBP|AUD|NZD|CAD|CHF|JPY|CNY|RMB|HKD|MYR|RM|IDR|INR|THB|VND|KRW|TWD';
|
|
@@ -16,7 +17,7 @@ const ID = /\b(?:FEAT|FR|NFR|SYS|WF|BR|ASM|INT|SC|Q)-\d+|\bM\d+ - /;
|
|
|
16
17
|
const filled = (v) => typeof v === 'string' && v.trim() !== '';
|
|
17
18
|
|
|
18
19
|
function checkRequired(inputs, out) {
|
|
19
|
-
for (const key of ['client', 'title', '
|
|
20
|
+
for (const key of ['client', 'title', 'scopeIntro']) {
|
|
20
21
|
if (!filled(inputs[key])) out.push(`proposal-inputs.json: missing "${key}"`);
|
|
21
22
|
}
|
|
22
23
|
if (!/^\d{4}-\d{2}-\d{2}$/.test(inputs.date ?? '') || Number.isNaN(Date.parse(inputs.date))) {
|
|
@@ -39,7 +40,7 @@ function checkKeys({ inputs, est, req }, out) {
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
export function sentences(inputs) {
|
|
42
|
-
const out = [['title', inputs.title], ['scopeIntro', inputs.scopeIntro]];
|
|
43
|
+
const out = [['title', inputs.title], ['subtitle', inputs.subtitle], ['scopeIntro', inputs.scopeIntro]];
|
|
43
44
|
for (const [id, text] of Object.entries(inputs.systems ?? {})) out.push([`systems.${id}`, text]);
|
|
44
45
|
for (const [id, m] of Object.entries(inputs.milestones ?? {})) {
|
|
45
46
|
out.push([`milestones.${id}.name`, m?.name], [`milestones.${id}.demonstrates`, m?.demonstrates]);
|
|
@@ -57,6 +58,10 @@ function checkSentences(inputs, out) {
|
|
|
57
58
|
if (money) out.push(`${where}: price "${money[0]}" — prices come only from the estimate`);
|
|
58
59
|
const id = ID.exec(text);
|
|
59
60
|
if (id) out.push(`${where}: internal ID "${id[0]}" — name the thing in words`);
|
|
61
|
+
const validity = validityWording(text);
|
|
62
|
+
if (validity) out.push(`${where}: ${validity}`);
|
|
63
|
+
const wording = outOfPlaceWording(text);
|
|
64
|
+
if (wording) out.push(`${where}: ${wording}`);
|
|
60
65
|
if (inputs.techLevel !== 'non-tech') continue;
|
|
61
66
|
for (const term of jargonIn(text, allow)) out.push(`${where}: jargon for a non-tech client: "${term}" (rewrite plainly or add to jargonAllow)`);
|
|
62
67
|
}
|
package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-cli.mjs
RENAMED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
// validate.mjs and render.mjs in workflow mode: estimation.json (with the
|
|
2
2
|
// BA package it names) plus proposal-inputs.json. Same rule as classic:
|
|
3
3
|
// render re-runs validation and writes nothing on a finding.
|
|
4
|
-
import { readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
5
|
-
import { join } from 'node:path';
|
|
6
4
|
import { proposalFindings } from './workflow-lead.mjs';
|
|
7
5
|
import { proposalView } from './workflow-view.mjs';
|
|
8
|
-
import {
|
|
6
|
+
import { workflowMarkdown } from './workflow-md.mjs';
|
|
7
|
+
import { figureFences } from './prose.mjs';
|
|
8
|
+
import { loadTool } from '../build/tool.mjs';
|
|
9
|
+
import { buildProposal } from '../build/build.mjs';
|
|
9
10
|
|
|
10
11
|
const USAGE = {
|
|
11
12
|
validate: 'usage: validate.mjs --estimation estimation.json --inputs proposal-inputs.json',
|
|
12
|
-
render: 'usage: render.mjs --estimation estimation.json --inputs proposal-inputs.json --
|
|
13
|
+
render: 'usage: render.mjs --estimation estimation.json --inputs proposal-inputs.json --out <lead>/dist [--draft] [--workbook <xlsx>] [--tool-dir <dir>]',
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
function report(findings) {
|
|
@@ -25,22 +26,19 @@ export function validateWorkflow(args) {
|
|
|
25
26
|
return 0;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
function
|
|
29
|
-
if (typeof path !== 'string') return { error: '--mermaid-bundle is required (see analyze-requirements references/viewer.md §1)' };
|
|
30
|
-
const bundle = readFileSync(path, 'utf8');
|
|
31
|
-
if (bundle.includes('</script')) return { error: 'mermaid bundle carries a literal </script — rebuild it (analyze-requirements references/viewer.md §1)' };
|
|
32
|
-
return { bundle };
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export function renderWorkflow(args) {
|
|
29
|
+
export async function renderWorkflow(args, toolDir) {
|
|
36
30
|
if (typeof args.inputs !== 'string' || typeof args.out !== 'string') return report([USAGE.render]);
|
|
37
31
|
const { findings, ...lead } = proposalFindings(args);
|
|
38
32
|
if (findings.length) return report(findings);
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
const view = proposalView(lead);
|
|
34
|
+
const md = workflowMarkdown(view);
|
|
35
|
+
const job = {
|
|
36
|
+
md, refs: {}, fences: figureFences(md), lead: { diagrams: new Map() }, out: args.out, draft: Boolean(args.draft), workbook: args.workbook,
|
|
37
|
+
meta: { title: lead.inputs.title, subtitle: lead.inputs.subtitle ?? 'Systems & Workflows proposal', preparedFor: lead.inputs.client, date: lead.inputs.date },
|
|
38
|
+
};
|
|
39
|
+
const built = await buildProposal(job, loadTool(toolDir));
|
|
40
|
+
if (built.findings) return report(built.findings);
|
|
41
|
+
console.log(built.files.join('\n'));
|
|
42
|
+
if (built.notes?.length) console.error(['layout — fix before sending:', ...built.notes.map((n) => ` ${n}`)].join('\n'));
|
|
45
43
|
return 0;
|
|
46
44
|
}
|