@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,35 @@
|
|
|
1
|
+
// The Systems & Workflows page as proposal markdown, so it is built by the
|
|
2
|
+
// same pipeline as a classic proposal (CES cover, colours, light flows,
|
|
3
|
+
// downloads, PDF from Word). The layout is the workflow mode's own: scope,
|
|
4
|
+
// one part per system with its flows and features, milestones, assumptions
|
|
5
|
+
// and exclusions, and the cost. Every value comes from workflow-view.mjs.
|
|
6
|
+
// Data is text, never markup: HTML is escaped and a pipe cannot split a cell.
|
|
7
|
+
const text = (s) => String(s ?? '').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/\n+/g, ' ').trim();
|
|
8
|
+
const cell = (s) => text(s).replace(/\|/g, '\\|');
|
|
9
|
+
const line = (s) => text(s).replace(/^#+\s*/, '');
|
|
10
|
+
const table = (head, rows) => [`| ${head.map(cell).join(' | ')} |`, `| ${head.map(() => '---').join(' | ')} |`, ...rows.map((r) => `| ${r.map(cell).join(' | ')} |`)].join('\n');
|
|
11
|
+
|
|
12
|
+
function scopeMd({ scope }) {
|
|
13
|
+
const head = scope.mapLabel ? ['System', scope.mapLabel] : ['System'];
|
|
14
|
+
const rows = scope.systems.map((s) => (scope.mapLabel ? [s.name, s.map] : [s.name]));
|
|
15
|
+
return ['## Scope: what this proposal covers', line(scope.intro), table(head, rows), line(scope.outLine)];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function systemMd(s) {
|
|
19
|
+
const flows = s.flows.flatMap((f) => [`### ${line(f.label)}`, ['```mermaid', `%% caption: ${line(s.name)}: ${line(f.label.replace(/^.*· /, ''))}`, f.code, '```'].join('\n')]);
|
|
20
|
+
return [`## System ${s.no}: ${line(s.name)}`, line(s.purpose), line(s.extra), ...flows,
|
|
21
|
+
table(['Feature', 'What it does'], s.features.map((f) => [f.name, f.does]))].filter(Boolean);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function closingMd({ milestones, register, cost }) {
|
|
25
|
+
return [
|
|
26
|
+
'## Milestones', line(milestones.lead), table(['Milestone', 'Includes', 'What it demonstrates'], milestones.rows.map((m) => [m.title, m.includes, m.demonstrates])),
|
|
27
|
+
'## Assumptions & exclusions', line(register.lead), '### Assumptions', ...register.assumptions.map((a) => `- ${line(a)}`),
|
|
28
|
+
'### Exclusions', ...register.exclusions.map((x) => `- ${line(x)}`),
|
|
29
|
+
'## Cost estimate', line(cost.lead), table(['Range', 'If one fixed number is needed'], [[cost.range, cost.single], [cost.rangeNote, cost.singleNote]]),
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function workflowMarkdown(view) {
|
|
34
|
+
return [...scopeMd(view), ...view.systems.flatMap(systemMd), ...closingMd(view)].join('\n\n').concat('\n');
|
|
35
|
+
}
|
package/plugins/{solution-architect → presales}/skills/proposal/scripts/lib/workflow-view.mjs
RENAMED
|
@@ -61,7 +61,7 @@ function milestonesView(est, inputs) {
|
|
|
61
61
|
function costView(est) {
|
|
62
62
|
const { price } = est.computed;
|
|
63
63
|
return {
|
|
64
|
-
lead: `The
|
|
64
|
+
lead: `The price covers the work behind all ${est.inputs.features.length} features above, including design, testing, project management and contingency.`,
|
|
65
65
|
range: `${formatMoney(price.presentLow)} – ${formatMoney(price.presentHigh)}`, rangeNote: 'expected cost to worst realistic case, USD',
|
|
66
66
|
single: formatMoney(price.singleNumber), singleNote: 'confident figure: 80% chance the project comes in at or under',
|
|
67
67
|
};
|
|
@@ -69,12 +69,12 @@ function costView(est) {
|
|
|
69
69
|
|
|
70
70
|
export function proposalView({ est, req, inputs }) {
|
|
71
71
|
return {
|
|
72
|
-
client: inputs.client, title: `${inputs.title} — Systems & Workflows Proposal`, byline: `${longDate(inputs.date)} · ${inputs.firm}`,
|
|
72
|
+
client: inputs.client, title: `${inputs.title} — Systems & Workflows Proposal`, byline: `${longDate(inputs.date)} · ${inputs.firm ?? 'Code Engine Studio'}`,
|
|
73
73
|
file: `${slug(inputs.client)}-proposal.docx`,
|
|
74
74
|
scope: scopeView({ req, inputs }),
|
|
75
75
|
systems: req.systems.map((s, i) => systemView(s, i, { req, inputs })),
|
|
76
76
|
milestones: milestonesView(est, inputs),
|
|
77
|
-
register: { lead: '
|
|
77
|
+
register: { lead: 'The price rests on these assumptions and leaves out these items.', ...registerView(est, req) },
|
|
78
78
|
cost: costView(est),
|
|
79
79
|
};
|
|
80
80
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Builds the proposal into <lead>/dist: --draft writes proposal-draft.html for
|
|
2
|
+
// review; without it, proposal.html with proposal.docx, proposal.pdf (printed
|
|
3
|
+
// from the Word file) and, when the lead has one, the estimate workbook.
|
|
4
|
+
// Validation runs first and nothing is written on a finding.
|
|
5
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
6
|
+
import { dirname, resolve } from 'node:path';
|
|
7
|
+
import { checkProposal } from './lib/checks.mjs';
|
|
8
|
+
import { loadProposal } from './lib/load.mjs';
|
|
9
|
+
import { body, figureFences } from './lib/prose.mjs';
|
|
10
|
+
import { isWorkflow } from './lib/workflow-lead.mjs';
|
|
11
|
+
import { renderWorkflow } from './lib/workflow-cli.mjs';
|
|
12
|
+
import { loadTool } from './build/tool.mjs';
|
|
13
|
+
import { buildProposal } from './build/build.mjs';
|
|
14
|
+
|
|
15
|
+
function parseArgs(argv) {
|
|
16
|
+
const args = {};
|
|
17
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
18
|
+
if (!argv[i].startsWith('--')) continue;
|
|
19
|
+
const flag = argv[i].slice(2);
|
|
20
|
+
args[flag] = flag === 'draft' ? true : argv[++i];
|
|
21
|
+
}
|
|
22
|
+
return args;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// The Excel button: the workbook the price came from, when there is one.
|
|
26
|
+
function workbookOf(args, lead) {
|
|
27
|
+
if (args.workbook) return resolve(args.workbook);
|
|
28
|
+
const file = lead.priceSource?.workbook;
|
|
29
|
+
const path = file && resolve(dirname(resolve(args.prices)), file);
|
|
30
|
+
return path && existsSync(path) ? path : undefined;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function fail(lines) {
|
|
34
|
+
console.error(lines.join('\n'));
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const args = parseArgs(process.argv.slice(2));
|
|
39
|
+
if (!args.estimation || !args.out) fail(['usage: render.mjs --md proposal.md --estimation estimation.json [--prices price-source.json | --workbook <xlsx>] --out <lead>/dist [--draft] [--tool-dir <dir>]']);
|
|
40
|
+
const estimation = JSON.parse(readFileSync(args.estimation, 'utf8'));
|
|
41
|
+
const toolDir = args['tool-dir'] ?? process.env.PROPOSAL_TOOL_DIR;
|
|
42
|
+
if (args.inputs || (!args.md && isWorkflow(estimation))) process.exit(await renderWorkflow(args, toolDir));
|
|
43
|
+
const lead = loadProposal(args);
|
|
44
|
+
const findings = [...lead.errors, ...checkProposal(lead)];
|
|
45
|
+
if (findings.length) fail(findings);
|
|
46
|
+
const { fm } = lead;
|
|
47
|
+
const md = body(lead.md);
|
|
48
|
+
const job = {
|
|
49
|
+
md, refs: lead.refs, fences: figureFences(md), lead, out: args.out, draft: Boolean(args.draft), workbook: workbookOf(args, lead),
|
|
50
|
+
meta: { title: fm.title, subtitle: fm.subtitle, preparedFor: fm.prepared_for, date: fm.date },
|
|
51
|
+
};
|
|
52
|
+
const built = await buildProposal(job, loadTool(toolDir));
|
|
53
|
+
if (built.findings) fail(built.findings);
|
|
54
|
+
console.log(built.files.join('\n'));
|
|
55
|
+
if (built.notes?.length) console.error(['layout — fix before sending:', ...built.notes.map((n) => ` ${n}`)].join('\n'));
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// The acme fixture lead (fixtures/acme): a small classic proposal on the
|
|
2
|
+
// estimate skill's booking estimate, with its references and diagram spec.
|
|
3
|
+
import { mkdtempSync, readFileSync, writeFileSync, cpSync } from 'node:fs';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { execFileSync } from 'node:child_process';
|
|
7
|
+
import { checkProposal } from '../lib/checks.mjs';
|
|
8
|
+
import { loadProposal } from '../lib/load.mjs';
|
|
9
|
+
|
|
10
|
+
const here = (p) => new URL(p, import.meta.url).pathname;
|
|
11
|
+
export const ACME = here('./fixtures/acme');
|
|
12
|
+
export const acmeMd = () => readFileSync(join(ACME, 'proposal.md'), 'utf8');
|
|
13
|
+
|
|
14
|
+
// A temp copy of the lead with a computed estimation.json; edit(md) may rewrite proposal.md.
|
|
15
|
+
export function stageAcme(edit) {
|
|
16
|
+
const dir = mkdtempSync(join(tmpdir(), 'proposal-acme-'));
|
|
17
|
+
cpSync(ACME, dir, { recursive: true });
|
|
18
|
+
execFileSync('node', [here('../../../estimate/classic/scripts/compute.mjs'), '--inputs', here('../../../estimate/classic/scripts/test/fixtures/booking-inputs.json'), '--out', join(dir, 'estimation.json')]);
|
|
19
|
+
if (edit) writeFileSync(join(dir, 'proposal.md'), edit(acmeMd()));
|
|
20
|
+
return { dir, md: join(dir, 'proposal.md'), estimation: join(dir, 'estimation.json') };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const staged = stageAcme();
|
|
24
|
+
// Findings for the acme lead with proposal.md replaced by md.
|
|
25
|
+
export function findingsFor(md, extra = {}) {
|
|
26
|
+
const lead = loadProposal({ md: staged.md, estimation: staged.estimation });
|
|
27
|
+
return checkProposal({ ...lead, md, ...extra });
|
|
28
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// What a proposal never carries, and what the gate refuses outright.
|
|
2
|
+
import { test } from 'node:test';
|
|
3
|
+
import assert from 'node:assert/strict';
|
|
4
|
+
import { acmeMd, findingsFor } from './acme.mjs';
|
|
5
|
+
|
|
6
|
+
const has = (out, re) => assert.ok(out.some((f) => re.test(f)), `expected ${re}:\n${out.join('\n')}`);
|
|
7
|
+
const append = (text) => `${acmeMd()}\n${text}\n`;
|
|
8
|
+
|
|
9
|
+
test('a Next steps or About part is refused, whatever it is called', () => {
|
|
10
|
+
has(findingsFor(append('## Next steps\n\nSign and return.')), /"Next steps" part is never/);
|
|
11
|
+
has(findingsFor(append('## About Code Engine Studio\n\nWe build software.')), /"About" part is never/);
|
|
12
|
+
has(findingsFor(append('## Why choose us\n\nWe build software.')), /"About" part is never/);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
test('Next steps is refused as a sub-heading and in prose too', () => {
|
|
16
|
+
has(findingsFor(acmeMd().replace('## Delivery plan and acceptance\n', '## Delivery plan and acceptance\n\n### Next steps\n\nSign and return.\n')), /no next steps or about-us text/);
|
|
17
|
+
has(findingsFor(acmeMd().replace('Two milestones.', 'Two milestones. Next steps: sign and return.')), /no next steps or about-us text/);
|
|
18
|
+
has(findingsFor(acmeMd().replace('Two milestones.', 'Two milestones. About us: we build software.')), /no next steps or about-us text/);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test('a hand-written References part is refused: the build makes it', () => {
|
|
22
|
+
has(findingsFor(append('## References\n\n1. A source.')), /References list is built from the citations/);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test('no validity date, in frontmatter or in the text', () => {
|
|
26
|
+
has(findingsFor(acmeMd().replace('cloud: other', 'cloud: other\nvalid_until: 2099-01-01')), /valid_until was removed/);
|
|
27
|
+
for (const s of ['This proposal is valid until 1 December 2026.', 'Prices hold until the end of the year.', 'The quote is valid for 30 days.']) {
|
|
28
|
+
has(findingsFor(acmeMd().replace('Two milestones.', `Two milestones. ${s}`)), /validity wording/);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
test('pointers into client documents are refused; a requirement code in brackets is fine', () => {
|
|
33
|
+
for (const s of ['As the PRD says, it must be fast.', 'See open point 8.', 'As in section 12.3, it must be fast.']) {
|
|
34
|
+
has(findingsFor(acmeMd().replace('Two milestones.', `Two milestones. ${s}`)), /points into a client document/);
|
|
35
|
+
}
|
|
36
|
+
assert.deepEqual(findingsFor(acmeMd().replace('| Online booking |', '| Online booking (M2.3) |')), []);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test('internal IDs and scoring never leak', () => {
|
|
40
|
+
has(findingsFor(acmeMd().replace('Two milestones.', 'Two milestones (FEAT-001).')), /internal ID "FEAT-001"/);
|
|
41
|
+
has(findingsFor(acmeMd().replace('| Feature | What you get | Price (USD) |', '| Feature | What you get | Score |')), /estimate scoring/);
|
|
42
|
+
has(findingsFor(acmeMd().replace('| Hosted online (proposed) |', '| stated |')), /provenance cell "stated"/);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test('non-tech jargon fails; jargon_allow overrides per term', () => {
|
|
46
|
+
const md = acmeMd().replace('Two milestones.', 'Two milestones and an API.');
|
|
47
|
+
has(findingsFor(md), /jargon for a non-tech client: "api"/);
|
|
48
|
+
assert.deepEqual(findingsFor(md.replace('cloud: other', 'cloud: other\njargon_allow: ["api"]')), []);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
test('a cross-reference must name a part that exists', () => {
|
|
52
|
+
has(findingsFor(acmeMd().replace('Two milestones.', 'Two milestones, priced in part B.')), /"part B" refers to a part no heading carries/);
|
|
53
|
+
has(findingsFor(acmeMd().replace('Two milestones.', 'Two milestones, see section 4.')), /"section 4" refers to a part/);
|
|
54
|
+
assert.deepEqual(findingsFor(acmeMd().replace('### Background and objectives', '### 4. Background and objectives').replace('Two milestones.', 'Two milestones, see section 4.')), []);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test('a typed figure number is refused: the build numbers figures', () => {
|
|
58
|
+
has(findingsFor(acmeMd().replace('Two milestones.', 'Two milestones, as Figure 2 shows.')), /"Figure 2": the build numbers figures/);
|
|
59
|
+
});
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
// The build, end to end: needs the pinned tools (PROPOSAL_TOOL_DIR), Chrome
|
|
2
|
+
// and LibreOffice, and skips without them. Each test builds a temp copy of a
|
|
3
|
+
// fixture lead and reads the real outputs back.
|
|
4
|
+
import { test } from 'node:test';
|
|
5
|
+
import assert from 'node:assert/strict';
|
|
6
|
+
import { existsSync, readFileSync, writeFileSync, copyFileSync } from 'node:fs';
|
|
7
|
+
import { spawnSync } from 'node:child_process';
|
|
8
|
+
import { join } from 'node:path';
|
|
9
|
+
import { stageAcme } from './acme.mjs';
|
|
10
|
+
import { lead as workflowLead } from './workflow-stage.mjs';
|
|
11
|
+
|
|
12
|
+
const TOOL = process.env.PROPOSAL_TOOL_DIR;
|
|
13
|
+
const printers = ['soffice', 'pdftotext', 'unzip'].every((c) => spawnSync('sh', ['-c', `command -v ${c}`]).status === 0);
|
|
14
|
+
const skip = (!TOOL && 'PROPOSAL_TOOL_DIR not set') || (!printers && 'LibreOffice, pdftotext or unzip missing');
|
|
15
|
+
const render = (args) => spawnSync('node', [new URL('../render.mjs', import.meta.url).pathname, ...args], { encoding: 'utf8', timeout: 300000 });
|
|
16
|
+
const zipPart = (file, part) => spawnSync('unzip', ['-p', file, part], { encoding: 'utf8' }).stdout;
|
|
17
|
+
const pdfText = (file) => spawnSync('pdftotext', ['-layout', file, '-'], { encoding: 'utf8' }).stdout;
|
|
18
|
+
|
|
19
|
+
test('a draft is the page alone, marked as a draft, with its figures inline', { skip }, () => {
|
|
20
|
+
const lead = stageAcme();
|
|
21
|
+
const out = join(lead.dir, 'dist');
|
|
22
|
+
const r = render(['--md', lead.md, '--estimation', lead.estimation, '--out', out, '--draft']);
|
|
23
|
+
assert.equal(r.status, 0, r.stderr);
|
|
24
|
+
const html = readFileSync(join(out, 'proposal-draft.html'), 'utf8');
|
|
25
|
+
assert.match(html, /Draft for review/);
|
|
26
|
+
assert.equal((html.match(/<figure class="diagram"/g) ?? []).length, 2);
|
|
27
|
+
assert.doesNotMatch(html, /href="proposal\.pdf"/);
|
|
28
|
+
assert.equal(existsSync(join(out, 'proposal.docx')), false);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
test('the final build: page, Word with real footnotes, PDF from Word, References, no Excel without a workbook', { skip }, () => {
|
|
32
|
+
const lead = stageAcme();
|
|
33
|
+
const out = join(lead.dir, 'dist');
|
|
34
|
+
const r = render(['--md', lead.md, '--estimation', lead.estimation, '--out', out]);
|
|
35
|
+
assert.equal(r.status, 0, r.stderr);
|
|
36
|
+
const html = readFileSync(join(out, 'proposal.html'), 'utf8');
|
|
37
|
+
assert.match(html, /<a href="proposal\.pdf" download>PDF<\/a><a href="proposal\.docx" download>Word<\/a><\/div>/);
|
|
38
|
+
assert.match(html, /<h2 id="references" class="part">References<\/h2>/);
|
|
39
|
+
assert.match(html, /class="cover"[\s\S]*Prepared for<\/b> Acme Corp, front desk team<br><b>Prepared by<\/b> Code Engine Studio<br>/);
|
|
40
|
+
assert.doesNotMatch(pdfText(join(out, 'proposal.pdf')).split('\f')[0], /@/, 'the cover carries no contact line');
|
|
41
|
+
assert.match(zipPart(join(out, 'proposal.docx'), 'word/footnotes.xml'), /Appointment reminders and missed visits/);
|
|
42
|
+
const pdf = pdfText(join(out, 'proposal.pdf'));
|
|
43
|
+
for (const re of [/Acme Online Booking/, /Code Engine Studio · Proposal: Acme Online Booking · page 2/, /References/, /Online booking brief, 1 October 2026\./]) assert.match(pdf, re);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test('the printed contents is one page with real page numbers; each source has one footnote', { skip }, () => {
|
|
47
|
+
const lead = stageAcme((md) => md.replace('Two milestones.', 'Two milestones, as the brief asks.[^brief]'));
|
|
48
|
+
const out = join(lead.dir, 'dist');
|
|
49
|
+
const r = render(['--md', lead.md, '--estimation', lead.estimation, '--out', out]);
|
|
50
|
+
assert.equal(r.status, 0, r.stderr);
|
|
51
|
+
assert.doesNotMatch(r.stderr, /layout/, r.stderr);
|
|
52
|
+
const pages = pdfText(join(out, 'proposal.pdf')).split('\f');
|
|
53
|
+
assert.match(pages[1], /Contents/);
|
|
54
|
+
const listed = [...pages[1].matchAll(/^\s*(\S.*?)\s*\.{3,}\s*(\d+)\s*$/gm)].map((m) => [m[1], Number(m[2])]);
|
|
55
|
+
assert.deepEqual(listed.map(([t]) => t), ['Executive summary', 'Background and objectives', 'Proposed solution', 'Price', 'Assumptions and exclusions', 'How it works',
|
|
56
|
+
'Hosted online or installed at the desk', 'Hosting and security', 'Monthly running costs', 'Delivery plan and acceptance', 'References']);
|
|
57
|
+
for (const [text, page] of listed) assert.match(pages[page - 1], new RegExp(`^\\s*${text}\\s*$`, 'm'), `${text} on page ${page}`);
|
|
58
|
+
assert.match(pages[2], /^\s*Executive summary/);
|
|
59
|
+
const notes = zipPart(join(out, 'proposal.docx'), 'word/footnotes.xml');
|
|
60
|
+
assert.equal((notes.match(/Online booking brief/g) ?? []).length, 1, 'the brief, cited twice, has one footnote');
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test('the Excel button and file appear only with the lead\'s workbook', { skip }, () => {
|
|
64
|
+
const lead = stageAcme();
|
|
65
|
+
const out = join(lead.dir, 'dist');
|
|
66
|
+
const book = join(lead.dir, 'Acme_Estimate.xlsx');
|
|
67
|
+
copyFileSync(new URL('./fixtures/workbook-recalculated.xlsx', import.meta.url).pathname, book);
|
|
68
|
+
const r = render(['--md', lead.md, '--estimation', lead.estimation, '--out', out, '--workbook', book, '--draft']);
|
|
69
|
+
assert.notEqual(r.status, 0, 'a priced estimate refuses a workbook price');
|
|
70
|
+
const cfg = join(lead.dir, 'price-source.json');
|
|
71
|
+
writeFileSync(cfg, JSON.stringify({ kind: 'workbook-rows', file: 'Acme_Estimate.xlsx', sheet: 'Project Roll-up', nameCol: 'B', priceCol: 'C', groupCol: 'A', rows: [56, 56], totalCell: 'C56' }));
|
|
72
|
+
const md = readFileSync(lead.md, 'utf8').replace('**$10,000 – $14,000**', '**$64,500**').replace('First the booking core ($7,600 – $10,600), then the reminders ($2,400 – $3,400).', 'First the booking core, then the reminders, each tested with your front desk team.')
|
|
73
|
+
.replace(/\$[\d,]+ – \$[\d,]+/g, '$64,500');
|
|
74
|
+
writeFileSync(lead.md, md);
|
|
75
|
+
const ok = render(['--md', lead.md, '--estimation', lead.estimation, '--prices', cfg, '--out', out]);
|
|
76
|
+
assert.equal(ok.status, 0, ok.stderr);
|
|
77
|
+
assert.match(readFileSync(join(out, 'proposal.html'), 'utf8'), /<a href="Acme_Estimate\.xlsx" download>Excel/);
|
|
78
|
+
assert.ok(existsSync(join(out, 'Acme_Estimate.xlsx')));
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
test('a figure with overlapping labels stops the build; nothing is written', { skip }, () => {
|
|
82
|
+
const lead = stageAcme((md) => md.replace('```mermaid', '```figure\nfile: diagrams/clash.svg\ncaption: Clash\n```\n\n```mermaid'));
|
|
83
|
+
writeFileSync(join(lead.dir, 'diagrams/clash.svg'), '<svg xmlns="http://www.w3.org/2000/svg" width="300" height="80" viewBox="0 0 300 80"><text x="20" y="40" style="font-size:16px">Booking system</text><text x="60" y="44" style="font-size:16px">Reminders</text></svg>');
|
|
84
|
+
const out = join(lead.dir, 'dist');
|
|
85
|
+
const r = render(['--md', lead.md, '--estimation', lead.estimation, '--out', out, '--draft']);
|
|
86
|
+
assert.equal(r.status, 1);
|
|
87
|
+
assert.match(r.stderr, /figure "Clash": text "Booking system" overlaps text "Reminders"/);
|
|
88
|
+
assert.equal(existsSync(join(out, 'proposal-draft.html')), false);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
test('a figure whose arrows vanish at page size, or that drops a declared link, stops the build', { skip }, () => {
|
|
92
|
+
const thin = '<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="300" viewBox="0 0 1600 300"><defs><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="4" markerHeight="4" orient="auto"><path d="M0,0 L10,5 L0,10 z"/></marker></defs><path d="M20,150 L1500,150" stroke="#273043" stroke-width="1.2" fill="none" marker-end="url(#m)"/></svg>';
|
|
93
|
+
const lead = stageAcme((md) => md.replace('```mermaid', '```figure\nfile: diagrams/thin.svg\ncaption: Thin\n```\n\n```mermaid'));
|
|
94
|
+
writeFileSync(join(lead.dir, 'diagrams/thin.svg'), thin);
|
|
95
|
+
const r = render(['--md', lead.md, '--estimation', lead.estimation, '--out', join(lead.dir, 'dist'), '--draft']);
|
|
96
|
+
assert.equal(r.status, 1);
|
|
97
|
+
assert.match(r.stderr, /figure "Thin": 1 arrow line\(s\) thinner than 1 px at page size/);
|
|
98
|
+
assert.match(r.stderr, /figure "Thin": 1 arrowhead\(s\) smaller than 6.5 px at page size/);
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
test('an arrow through a frame title stops the build, even though the title sits on a pad', { skip }, () => {
|
|
102
|
+
const svg = '<svg xmlns="http://www.w3.org/2000/svg" width="600" height="200" viewBox="0 0 600 200"><rect x="20" y="20" width="560" height="160" fill="none" stroke="#273043"/>'
|
|
103
|
+
+ '<rect class="title-pad" x="36" y="26" width="200" height="21" rx="3" fill="#fff"/><text x="40" y="41" style="font-size:16px;font-weight:700">vServer: app 1 title</text>'
|
|
104
|
+
+ '<path d="M10,36 L590,36" stroke="#273043" stroke-width="2.4" fill="none"/></svg>';
|
|
105
|
+
const lead = stageAcme((md) => md.replace('```mermaid', '```figure\nfile: diagrams/through.svg\ncaption: Through\n```\n\n```mermaid'));
|
|
106
|
+
writeFileSync(join(lead.dir, 'diagrams/through.svg'), svg);
|
|
107
|
+
const r = render(['--md', lead.md, '--estimation', lead.estimation, '--out', join(lead.dir, 'dist'), '--draft']);
|
|
108
|
+
assert.equal(r.status, 1);
|
|
109
|
+
assert.match(r.stderr, /figure "Through": an arrow crosses text "vServer: app 1 title"/);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
test('a steps figure is drawn with every arrow and passes the checks', { skip }, () => {
|
|
113
|
+
const lead = stageAcme((md) => md.replace(/```mermaid[\s\S]*?```/, '```steps\ncaption: How a customer books\nPick a slot | Any free time\nConfirm | One tap\nGet a reminder | The day before\nCome in | On time\n```'));
|
|
114
|
+
const out = join(lead.dir, 'dist');
|
|
115
|
+
const r = render(['--md', lead.md, '--estimation', lead.estimation, '--out', out, '--draft']);
|
|
116
|
+
assert.equal(r.status, 0, r.stderr);
|
|
117
|
+
assert.equal((readFileSync(join(out, 'proposal-draft.html'), 'utf8').match(/<path data-edge=/g) ?? []).length, 3 + 3);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
test('workflow mode builds through the same pipeline and look', { skip }, () => {
|
|
121
|
+
const l = workflowLead();
|
|
122
|
+
const out = join(l.dir, 'dist');
|
|
123
|
+
const r = render(['--estimation', l.estimation, '--inputs', l.inputs, '--out', out]);
|
|
124
|
+
assert.equal(r.status, 0, r.stderr);
|
|
125
|
+
const pdf = pdfText(join(out, 'proposal.pdf'));
|
|
126
|
+
for (const re of [/Sin Kowa Digital Transformation/, /Systems & Workflows proposal/, /System 1: Warehouse operations/, /\$39,000 – \$48,500/]) assert.match(pdf, re);
|
|
127
|
+
assert.doesNotMatch(pdf, /Next steps|valid until/i);
|
|
128
|
+
});
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
// Architecture specs: checked before drawing, then drawn in style B. The
|
|
2
|
+
// drawing tests need the pinned build tools (PROPOSAL_TOOL_DIR) and skip
|
|
3
|
+
// without them.
|
|
4
|
+
import { test } from 'node:test';
|
|
5
|
+
import assert from 'node:assert/strict';
|
|
6
|
+
import { readFileSync } from 'node:fs';
|
|
7
|
+
import { checkDiagramSpec } from '../lib/diagram-spec.mjs';
|
|
8
|
+
import { measureNode, layout, misaligned, crossings, foreignFrames } from '../diagram/layout.mjs';
|
|
9
|
+
import { sizeFindings } from '../build/arrows.mjs';
|
|
10
|
+
import { wrap, textWidth } from '../diagram/text.mjs';
|
|
11
|
+
|
|
12
|
+
const spec = () => JSON.parse(readFileSync(new URL('./fixtures/acme/diagrams/booking.json', import.meta.url), 'utf8'));
|
|
13
|
+
const TOOL = process.env.PROPOSAL_TOOL_DIR;
|
|
14
|
+
const check = (s, cloud = 'other') => checkDiagramSpec(s, { cloud, name: 'x.json' });
|
|
15
|
+
|
|
16
|
+
test('a neutral spec for a client on another cloud passes', () => {
|
|
17
|
+
assert.deepEqual(check(spec()), []);
|
|
18
|
+
assert.deepEqual(check(spec(), 'none'), []);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test('broken specs are refused with the reason', () => {
|
|
22
|
+
const s = spec();
|
|
23
|
+
s.groups.push({ id: 'booking', kind: 'galaxy', label: 'x', in: 'nowhere' });
|
|
24
|
+
s.nodes[1].family = 'mystery';
|
|
25
|
+
s.edges.push({ from: 'customer', to: 'ghost', exit: 'X' });
|
|
26
|
+
const out = check(s).join('\n');
|
|
27
|
+
for (const re of [/kind "galaxy"/, /parent "nowhere"/, /id "booking" is used twice/, /family "mystery"/, /"ghost" is not a node/, /sides are N, E, S, W/]) assert.match(out, re);
|
|
28
|
+
assert.match(check({ title: '', desc: 'x', groups: [], nodes: [], edges: [] }).join('\n'), /"title" is required/);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
test('no AWS icon or name on a figure that is not AWS; AWS icons for an AWS client', () => {
|
|
32
|
+
const s = spec();
|
|
33
|
+
s.nodes[1].icon = 'aws:AWSLambda';
|
|
34
|
+
s.groups[0].label = 'Amazon account';
|
|
35
|
+
const out = check(s).join('\n');
|
|
36
|
+
assert.match(out, /AWS icon on a figure that is not AWS/);
|
|
37
|
+
assert.match(out, /AWS name on a figure that is not AWS: "Amazon account"/);
|
|
38
|
+
assert.match(check(spec(), 'aws').join('\n'), /the client is on AWS: set "icons": "aws"/);
|
|
39
|
+
assert.deepEqual(check({ ...s, icons: 'aws' }, 'aws'), []);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test('nodes are sized from measured Roboto text; long captions wrap', () => {
|
|
43
|
+
assert.ok(textWidth('Booking system', 16, true) > textWidth('Booking system', 16));
|
|
44
|
+
assert.deepEqual(wrap('one place for every slot in the clinic network', { width: 120, size: 15 }).length > 1, true);
|
|
45
|
+
const m = measureNode({ label: 'Booking system', sub: ['one place', 'for every slot'], size: 52 });
|
|
46
|
+
assert.equal(m.height, 52 + 10 + 21 + 2 * 19);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// Two zones side by side, each a server above its database: the shape of the
|
|
50
|
+
// approved hosting figure.
|
|
51
|
+
const zones = () => ({
|
|
52
|
+
title: 'Hosting', desc: 'Two zones.', icons: 'neutral', arrange: 'row',
|
|
53
|
+
groups: [
|
|
54
|
+
{ id: 'vpc', kind: 'network', label: 'VPC', arrange: 'row' },
|
|
55
|
+
{ id: 'za', kind: 'zone', label: 'Zone A', in: 'vpc', arrange: 'column', children: ['app1', 'db1'] },
|
|
56
|
+
{ id: 'zb', kind: 'zone', label: 'Zone B', in: 'vpc', arrange: 'column', children: ['app2', 'db2'] },
|
|
57
|
+
{ id: 'app1', kind: 'server', label: 'App 1', in: 'za', arrange: 'row' },
|
|
58
|
+
{ id: 'app2', kind: 'server', label: 'App 2', in: 'zb', arrange: 'row' },
|
|
59
|
+
],
|
|
60
|
+
nodes: [
|
|
61
|
+
{ id: 'lb', icon: 'network', family: 'net', label: 'Load balancer' },
|
|
62
|
+
{ id: 'w1', icon: 'app-window', family: 'compute', label: 'Web', size: 36, in: 'app1' },
|
|
63
|
+
{ id: 'w2', icon: 'app-window', family: 'compute', label: 'Web', size: 36, in: 'app2' },
|
|
64
|
+
{ id: 'db1', icon: 'database', family: 'db', label: 'Primary', sub: 'with a longer caption here', in: 'za' },
|
|
65
|
+
{ id: 'db2', icon: 'database', family: 'db', label: 'Standby', in: 'zb' },
|
|
66
|
+
],
|
|
67
|
+
edges: [{ from: 'lb', to: 'w1' }, { from: 'lb', to: 'w2' }, { from: 'db1', to: 'db2', label: 'replication', style: 'dashed' }, { from: 'w2', to: 'db1' }],
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
test('sibling zones sit side by side as equal frames; a primary faces its standby', () => {
|
|
71
|
+
const placed = layout(zones());
|
|
72
|
+
const [a, b] = ['za', 'zb'].map((id) => placed.boxes.get(id));
|
|
73
|
+
assert.equal(a.y, b.y);
|
|
74
|
+
assert.equal(a.h, b.h);
|
|
75
|
+
assert.ok(b.x > a.x + a.w);
|
|
76
|
+
assert.equal(placed.boxes.get('db1').y, placed.boxes.get('db2').y);
|
|
77
|
+
assert.deepEqual(misaligned(zones(), placed.boxes), []);
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
test('arrows are direct: replication is one straight segment, no two arrows share a line', () => {
|
|
81
|
+
const placed = layout(zones());
|
|
82
|
+
const rep = placed.edges[2];
|
|
83
|
+
assert.equal(rep.pts.length, 2, JSON.stringify(rep.pts));
|
|
84
|
+
assert.equal(rep.pts[0][1], rep.pts[1][1]);
|
|
85
|
+
const lb = placed.boxes.get('lb'); const w1 = placed.boxes.get('w1');
|
|
86
|
+
assert.ok(Math.abs((lb.y + 26) - (w1.y + 18)) < 1, 'a lone service lines up with the first tiles beside it');
|
|
87
|
+
const segs = placed.edges.flatMap((e) => e.pts.slice(1).map((p, i) => [e.pts[i], p]));
|
|
88
|
+
const shared = segs.filter(([p, q], i) => segs.some(([u, v], j) => j > i && ((p[1] === q[1] && u[1] === v[1] && p[1] === u[1]) || (p[0] === q[0] && u[0] === v[0] && p[0] === u[0]))
|
|
89
|
+
&& Math.min(Math.max(p[0], q[0]), Math.max(u[0], v[0])) - Math.max(Math.min(p[0], q[0]), Math.min(u[0], v[0])) > 4));
|
|
90
|
+
assert.deepEqual(shared, []);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
test('an arrow to a server in the second zone goes around the first zone, never through it', () => {
|
|
94
|
+
const s = zones();
|
|
95
|
+
const placed = layout(s);
|
|
96
|
+
assert.deepEqual(placed.warnings, []);
|
|
97
|
+
const za = placed.boxes.get('za');
|
|
98
|
+
const toW2 = placed.edges[1].pts;
|
|
99
|
+
const inside = toW2.slice(1).some((p, k) => {
|
|
100
|
+
const [a, b] = [toW2[k], p];
|
|
101
|
+
return Math.max(a[0], b[0]) > za.x && Math.min(a[0], b[0]) < za.x + za.w && Math.max(a[1], b[1]) > za.y && Math.min(a[1], b[1]) < za.y + za.h;
|
|
102
|
+
});
|
|
103
|
+
assert.equal(inside, false, JSON.stringify(toW2));
|
|
104
|
+
assert.deepEqual(foreignFrames(s, { e: s.edges[1], boxes: placed.boxes }).map((r) => r.what), ['the frame "Zone A", which holds neither end', 'the frame "App 1", which holds neither end']);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
test('the crossing check names an arrow through a header, a service or a frame that is not its own', () => {
|
|
108
|
+
const s = zones();
|
|
109
|
+
const placed = layout(s);
|
|
110
|
+
const app1 = placed.boxes.get('app1'); const db1 = placed.boxes.get('db1');
|
|
111
|
+
const bad = [{ ...placed.edges[1], pts: [[app1.x - 20, app1.y + 15], [app1.x + 200, app1.y + 15]] }, { ...placed.edges[3], pts: [[db1.x - 30, db1.y + 20], [db1.x + db1.w + 30, db1.y + 20]] }];
|
|
112
|
+
const hard = [{ x: app1.x, y: app1.y, w: 120, h: 30, what: 'the header of "App 1"' }, { x: db1.x, y: db1.y, w: 52, h: 52, what: 'service "Primary"' }];
|
|
113
|
+
const out = crossings(s, { edges: bad, hard, boxes: placed.boxes });
|
|
114
|
+
assert.ok(out.includes('the arrow lb → w2 crosses the header of "App 1"'), out.join('\n'));
|
|
115
|
+
assert.ok(out.includes('the arrow lb → w2 crosses the frame "App 1", which holds neither end'), out.join('\n'));
|
|
116
|
+
assert.ok(out.some((f) => /w2 → db1 crosses service "Primary"/.test(f)), out.join('\n'));
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
test('zones stacked off-line are reported', () => {
|
|
120
|
+
const s = zones();
|
|
121
|
+
const placed = layout(s);
|
|
122
|
+
const b = placed.boxes.get('zb');
|
|
123
|
+
placed.boxes.set('zb', { ...b, y: b.y + 40, x: b.x + 5 });
|
|
124
|
+
assert.deepEqual(misaligned(s, placed.boxes), ['sibling zone frames do not line up in a row or a column']);
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
test('size checks: small labels at print size, and tall figures that waste the page width', () => {
|
|
128
|
+
const page = { w: 678, h: 800 };
|
|
129
|
+
assert.deepEqual(sizeFindings({ lang: 'architecture', box: { width: 1200, height: 800 }, smallest: 14 }, page), []);
|
|
130
|
+
assert.match(sizeFindings({ lang: 'architecture', box: { width: 1800, height: 900 }, smallest: 14 }, page)[0], /labels print at 5.3 px/);
|
|
131
|
+
assert.match(sizeFindings({ lang: 'architecture', box: { width: 1100, height: 1900 }, smallest: 16 }, page).join(), /tall figure: it prints at 68% of the page width/);
|
|
132
|
+
assert.deepEqual(sizeFindings({ lang: 'figure', box: { width: 1800, height: 900 }, smallest: 11 }, page), []);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
test('a spec draws as style B: frames with badges, family tiles, thick ink arrows', { skip: !TOOL && 'PROPOSAL_TOOL_DIR not set' }, async () => {
|
|
136
|
+
const { renderArchitecture } = await import('../diagram/index.mjs');
|
|
137
|
+
const { svg, width, height } = await renderArchitecture(spec(), TOOL);
|
|
138
|
+
assert.ok(width > 300 && height > 100);
|
|
139
|
+
assert.match(svg, /<title>Where the booking system runs<\/title>/);
|
|
140
|
+
assert.match(svg, /stroke-width="2.4" marker-end="url\(#arr\)"/);
|
|
141
|
+
assert.match(svg, /<symbol id="i-calendar-check"/);
|
|
142
|
+
assert.match(svg, /fill="#E8590C"/);
|
|
143
|
+
assert.doesNotMatch(svg, /AWS|Amazon/);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
test('an AWS spec uses the official AWS group and service icons', { skip: !TOOL && 'PROPOSAL_TOOL_DIR not set' }, async () => {
|
|
147
|
+
const { renderArchitecture } = await import('../diagram/index.mjs');
|
|
148
|
+
const s = { ...spec(), icons: 'aws', groups: [{ id: 'cloud', kind: 'region', label: 'Region eu-west-3 (Paris)' }] };
|
|
149
|
+
s.nodes[1] = { ...s.nodes[1], icon: 'aws:AWSFargate' };
|
|
150
|
+
s.nodes[2] = { ...s.nodes[2], icon: 'aws:AmazonRDS' };
|
|
151
|
+
const { svg } = await renderArchitecture(s, TOOL);
|
|
152
|
+
assert.match(svg, /<symbol id="i-aws_AWSFargate"/);
|
|
153
|
+
assert.match(svg, /<symbol id="i-aws-group_Region"/);
|
|
154
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { readFileSync } from 'node:fs';
|
|
4
|
+
import { PINS } from '../build/tool.mjs';
|
|
5
|
+
|
|
6
|
+
// build.md is the install recipe a person follows, so the versions it lists are
|
|
7
|
+
// the contract render.mjs checks against PINS.
|
|
8
|
+
test('build.md installs exactly the pinned versions', () => {
|
|
9
|
+
const doc = readFileSync(new URL('../../references/build.md', import.meta.url), 'utf8');
|
|
10
|
+
const install = /npm install --save-exact ([^\n]+)/.exec(doc)?.[1].trim().split(/\s+/);
|
|
11
|
+
const listed = Object.fromEntries(install.map((spec) => [spec.slice(0, spec.lastIndexOf('@')), spec.slice(spec.lastIndexOf('@') + 1)]));
|
|
12
|
+
assert.deepEqual(listed, PINS);
|
|
13
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { readFileSync } from 'node:fs';
|
|
4
|
+
import { execFileSync } from 'node:child_process';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { stageAcme } from './acme.mjs';
|
|
7
|
+
|
|
8
|
+
const script = (p) => new URL(p, import.meta.url).pathname;
|
|
9
|
+
|
|
10
|
+
test('compute → derive → validate runs clean, and the figures carry the summary range', () => {
|
|
11
|
+
const lead = stageAcme();
|
|
12
|
+
const figuresPath = join(lead.dir, 'proposal-figures.json');
|
|
13
|
+
execFileSync('node', [script('../derive.mjs'), '--estimation', lead.estimation, '--out', figuresPath]);
|
|
14
|
+
execFileSync('node', [script('../validate.mjs'), '--md', lead.md, '--estimation', lead.estimation]);
|
|
15
|
+
const figures = JSON.parse(readFileSync(figuresPath, 'utf8'));
|
|
16
|
+
const md = readFileSync(lead.md, 'utf8');
|
|
17
|
+
assert.match(md, new RegExp(figures.cost.low.toLocaleString('en-US')));
|
|
18
|
+
assert.match(md, new RegExp(figures.cost.high.toLocaleString('en-US')));
|
|
19
|
+
assert.equal(figures.features.reduce((s, f) => s + f.cost.low, 0), figures.cost.low);
|
|
20
|
+
});
|
package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/evals-fixtures.test.mjs
RENAMED
|
@@ -4,21 +4,24 @@
|
|
|
4
4
|
// derives a price, and the figures its eval asserts are the ones derived.
|
|
5
5
|
import { test } from 'node:test';
|
|
6
6
|
import assert from 'node:assert/strict';
|
|
7
|
-
import { readFileSync } from 'node:fs';
|
|
7
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
8
8
|
import { checkInputs } from '../../../estimate/classic/scripts/lib/schema.mjs';
|
|
9
9
|
import { computeEstimation } from '../../../estimate/classic/scripts/lib/rollup.mjs';
|
|
10
10
|
import { deriveFigures } from '../lib/figures.mjs';
|
|
11
11
|
|
|
12
12
|
const evalsDir = new URL('../../evals/', import.meta.url);
|
|
13
13
|
const read = (p) => JSON.parse(readFileSync(new URL(p, evalsDir), 'utf8'));
|
|
14
|
-
|
|
14
|
+
// The eval fixtures ship with the plugin's eval suite, not with this repo;
|
|
15
|
+
// the pins run wherever evals/ is present.
|
|
16
|
+
const skip = !existsSync(evalsDir) && 'the proposal evals/ fixtures are not in this checkout';
|
|
17
|
+
const evals = skip ? [] : read('evals.json').evals;
|
|
15
18
|
const PRE_FED = { 1: 'pre-fed-harborline-dispatch', 2: 'pre-fed-meridian-dental' };
|
|
16
19
|
|
|
17
20
|
const flat = (f) => [f.cost.low, f.cost.high, f.singleNumber,
|
|
18
21
|
...f.milestones.flatMap((m) => [m.cost.low, m.cost.high])];
|
|
19
22
|
|
|
20
23
|
for (const [id, dir] of Object.entries(PRE_FED)) {
|
|
21
|
-
test(`${dir}: v2 inputs, stored numbers recompute, figures match the eval`, () => {
|
|
24
|
+
test(`${dir}: v2 inputs, stored numbers recompute, figures match the eval`, { skip }, () => {
|
|
22
25
|
const inputs = read(`fixtures/${dir}/estimation-inputs.json`);
|
|
23
26
|
assert.deepEqual(checkInputs(inputs), []);
|
|
24
27
|
const stored = read(`fixtures/${dir}/estimation.json`);
|
|
@@ -32,13 +35,13 @@ for (const [id, dir] of Object.entries(PRE_FED)) {
|
|
|
32
35
|
});
|
|
33
36
|
}
|
|
34
37
|
|
|
35
|
-
test('the unpriced fixture really is unpriced, so the proposal refuses it', () => {
|
|
38
|
+
test('the unpriced fixture really is unpriced, so the proposal refuses it', { skip }, () => {
|
|
36
39
|
const stored = read('fixtures/gate-check-unpriced-harborline/estimation.json');
|
|
37
40
|
assert.deepEqual(computeEstimation(stored.inputs).computed, stored.computed);
|
|
38
41
|
assert.throws(() => deriveFigures(stored), /not priced/);
|
|
39
42
|
});
|
|
40
43
|
|
|
41
|
-
test('the workflow fixture lead validates as the proposal will load it', async () => {
|
|
44
|
+
test('the workflow fixture lead validates as the proposal will load it', { skip }, async () => {
|
|
42
45
|
const { loadLead } = await import('../lib/workflow-lead.mjs');
|
|
43
46
|
const lead = loadLead(new URL('fixtures/workflow-sin-kowa-mini/estimation.json', evalsDir).pathname);
|
|
44
47
|
assert.deepEqual(lead.findings, []);
|
package/plugins/{solution-architect → presales}/skills/proposal/scripts/test/figures.test.mjs
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// plugins/
|
|
1
|
+
// plugins/presales/skills/proposal/scripts/test/figures.test.mjs
|
|
2
2
|
import { test } from 'node:test';
|
|
3
3
|
import assert from 'node:assert/strict';
|
|
4
4
|
import { readFileSync, writeFileSync, mkdtempSync } from 'node:fs';
|
|
@@ -92,3 +92,31 @@ test('derive.mjs CLI writes the figures file and refuses an unpriced estimate',
|
|
|
92
92
|
writeFileSync(est, JSON.stringify(unpriced));
|
|
93
93
|
assert.throws(() => execFileSync('node', [cli, '--estimation', est, '--out', out], { stdio: 'pipe' }));
|
|
94
94
|
});
|
|
95
|
+
|
|
96
|
+
test('figures inlined into one page each keep their own arrowhead and icon ids', async () => {
|
|
97
|
+
const { scopeIds } = await import('../build/html.mjs');
|
|
98
|
+
const fig = (head) => `<svg id="root"><style>#root .a{fill:red}</style><defs><marker id="arr" markerWidth="${head}"/><symbol id="i-x"/></defs><path marker-end="url(#arr)"/><use href="#i-x"/></svg>`;
|
|
99
|
+
const [a, b] = [scopeIds(fig(13), 1), scopeIds(fig(19), 2)];
|
|
100
|
+
const ids = (s) => [...s.matchAll(/\bid="([^"]+)"/g)].map((m) => m[1]);
|
|
101
|
+
assert.equal(new Set([...ids(a), ...ids(b)].filter((i) => i !== 'root')).size, 4);
|
|
102
|
+
assert.match(b, /<marker id="f2-arr" markerWidth="19"\/>/);
|
|
103
|
+
assert.match(b, /marker-end="url\(#f2-arr\)"/);
|
|
104
|
+
assert.match(b, /href="#f2-i-x"/);
|
|
105
|
+
assert.match(b, /<svg id="root">.*#root \.a/);
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
// A workflow estimate with feature groups prices each group once; its
|
|
109
|
+
// members split the group's point equally, so the splits still sum exactly.
|
|
110
|
+
test('feature splits: grouped features share their group\'s point equally', () => {
|
|
111
|
+
const e = estimation();
|
|
112
|
+
e.computed.features = {
|
|
113
|
+
'FEAT-001': { name: 'Button', system: 'Widget', group: 'GRP-01' },
|
|
114
|
+
'FEAT-002': { name: 'Form', system: 'Widget', group: 'GRP-01' },
|
|
115
|
+
'FEAT-003': { name: 'Delivery', system: 'Delivery', group: 'GRP-02' },
|
|
116
|
+
};
|
|
117
|
+
e.computed.groups = { 'GRP-01': { point: 4000, members: ['FEAT-001', 'FEAT-002'] }, 'GRP-02': { point: 2000, members: ['FEAT-003'] } };
|
|
118
|
+
const f = deriveFigures(e);
|
|
119
|
+
assert.deepEqual(f.features.map((x) => x.name), ['Button', 'Form', 'Delivery']);
|
|
120
|
+
assert.equal(f.features[0].cost.low, f.features[1].cost.low);
|
|
121
|
+
assert.equal(f.features.reduce((n, x) => n + x.cost.low, 0), 43000);
|
|
122
|
+
});
|