@v11g/agents-rock 1.0.8 → 1.0.10
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 +2 -1
- package/package.json +2 -2
- package/plugins/business-analyst/.claude-plugin/plugin.json +1 -1
- package/plugins/business-analyst/evals/ba-interview-conflict/graders/conflict-quoted.md +15 -0
- package/plugins/business-analyst/evals/ba-interview-conflict/graders/no-internal-ids.md +9 -0
- package/plugins/business-analyst/evals/ba-interview-conflict/graders/one-question.md +15 -0
- package/plugins/business-analyst/evals/ba-interview-conflict/graders/skill-fired.md +7 -0
- package/plugins/business-analyst/evals/ba-interview-conflict/prompt.md +31 -0
- package/plugins/business-analyst/evals/ba-interview-first-turn/graders/no-internal-ids.md +9 -0
- package/plugins/business-analyst/evals/ba-interview-first-turn/graders/no-setup-questions.md +16 -0
- package/plugins/business-analyst/evals/ba-interview-first-turn/graders/one-scope-question.md +19 -0
- package/plugins/business-analyst/evals/ba-interview-first-turn/graders/skill-fired.md +7 -0
- package/plugins/business-analyst/evals/ba-interview-first-turn/prompt.md +31 -0
- package/plugins/business-analyst/evals/ba-review-page/case.yaml +4 -0
- package/plugins/business-analyst/evals/ba-review-page/fixture.sh +12 -0
- package/plugins/business-analyst/evals/ba-review-page/graders/decide-in-interview.md +26 -0
- package/plugins/business-analyst/evals/ba-review-page/graders/skill-fired.md +7 -0
- package/plugins/business-analyst/evals/ba-review-page/prompt.md +9 -0
- package/plugins/business-analyst/skills/business-analyst/README.md +8 -0
- package/plugins/business-analyst/skills/business-analyst/SKILL.md +47 -16
- package/plugins/business-analyst/skills/business-analyst/assets/review-page.html +68 -0
- package/plugins/business-analyst/skills/business-analyst/evals/evals.json +1 -1
- package/plugins/business-analyst/skills/business-analyst/references/frameworks.md +3 -2
- package/plugins/business-analyst/skills/business-analyst/references/interview.md +156 -8
- package/plugins/business-analyst/skills/business-analyst/references/review.md +18 -4
- package/plugins/business-analyst/skills/business-analyst/references/writing.md +49 -8
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_data.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_layout.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_page.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_checks.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_render.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/validate.cpython-312.pyc +0 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/checks.mjs +12 -6
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/review-data.mjs +66 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/review-layout.mjs +53 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/review-page.mjs +78 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-checks.mjs +73 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-md.mjs +53 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-render.mjs +72 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/lib/scope-rules.mjs +90 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/review.mjs +48 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/review.py +60 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/review_data.py +81 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/review_layout.py +50 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/review_page.py +115 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/scope.mjs +24 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/scope.py +35 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/scope_checks.py +168 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/scope_render.py +140 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/checks.test.mjs +27 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-workflow-pass.json +78 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-workflow-pass.md +136 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/python-parity.test.mjs +88 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/quality-gates.test.mjs +26 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/review-browser.test.mjs +106 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/review-fixture.mjs +32 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/review-page.test.mjs +340 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/review-parity.test.mjs +79 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/scope-cases.mjs +58 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/scope-checks.test.mjs +31 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/test/scope-md.test.mjs +140 -0
- package/plugins/business-analyst/skills/business-analyst/scripts/validate.mjs +1 -1
- package/plugins/business-analyst/skills/business-analyst/scripts/validate.py +17 -8
- package/plugins/reasoning/.claude-plugin/plugin.json +1 -1
- package/plugins/reasoning/evals/format-handoff-folder/graders/folder-named.md +8 -0
- package/plugins/reasoning/evals/format-handoff-folder/graders/skill-fired.md +7 -0
- package/plugins/reasoning/evals/format-handoff-folder/prompt.md +9 -0
- package/plugins/reasoning/evals/format-ids-and-supports/graders/ids-in-chat.md +8 -0
- package/plugins/reasoning/evals/format-ids-and-supports/graders/skill-fired.md +7 -0
- package/plugins/reasoning/evals/format-ids-and-supports/graders/supports-resolve.md +11 -0
- package/plugins/reasoning/evals/format-ids-and-supports/prompt.md +8 -0
- package/plugins/reasoning/evals/format-root-candidate-status/graders/candidate-status.md +11 -0
- package/plugins/reasoning/evals/format-root-candidate-status/graders/skill-fired.md +7 -0
- package/plugins/reasoning/evals/format-root-candidate-status/prompt.md +8 -0
- package/plugins/reasoning/evals/format-unsaved-continues/graders/analysis-completes.md +9 -0
- package/plugins/reasoning/evals/format-unsaved-continues/graders/not-saved-stated.md +9 -0
- package/plugins/reasoning/evals/format-unsaved-continues/graders/skill-fired.md +7 -0
- package/plugins/reasoning/evals/format-unsaved-continues/prompt.md +8 -0
- package/plugins/reasoning/skills/problem-router/README.md +6 -0
- package/plugins/reasoning/skills/problem-router/SKILL.md +4 -0
- package/plugins/reasoning/skills/problem-router/references/contract.md +114 -19
- package/plugins/reasoning/skills/problem-solving/README.md +6 -0
- package/plugins/reasoning/skills/problem-solving/SKILL.md +2 -0
- package/plugins/reasoning/skills/problem-solving/references/contract.md +114 -19
- package/plugins/reasoning/skills/problem-solving/references/interview.md +2 -0
- package/plugins/reasoning/skills/systemic-design/README.md +3 -0
- package/plugins/reasoning/skills/systemic-design/SKILL.md +2 -0
- package/plugins/reasoning/skills/systemic-design/references/contract.md +114 -19
- package/plugins/reasoning/skills/systemic-design/references/interview.md +2 -0
- package/plugins/reasoning/skills/systems-thinking/README.md +3 -0
- package/plugins/reasoning/skills/systems-thinking/SKILL.md +2 -0
- package/plugins/reasoning/skills/systems-thinking/frameworks/leverage-points.md +15 -6
- package/plugins/reasoning/skills/systems-thinking/references/contract.md +114 -19
- package/plugins/reasoning/skills/systems-thinking/references/interview.md +2 -0
- package/plugins/solution-architect/.claude-plugin/plugin.json +1 -1
- package/plugins/solution-architect/evals/proposal-workflow/case.yaml +6 -0
- package/plugins/solution-architect/evals/proposal-workflow/fixture.sh +6 -0
- package/plugins/solution-architect/evals/proposal-workflow/graders/inputs-written.md +23 -0
- package/plugins/solution-architect/evals/proposal-workflow/graders/no-proposal-md.md +7 -0
- package/plugins/solution-architect/evals/proposal-workflow/graders/skill-fired.md +7 -0
- package/plugins/solution-architect/evals/proposal-workflow/graders/validate-then-render.md +16 -0
- package/plugins/solution-architect/evals/proposal-workflow/prompt.md +10 -0
- package/plugins/solution-architect/evals/workflow-gate-no-architecture/case.yaml +4 -0
- package/plugins/solution-architect/evals/workflow-gate-no-architecture/fixture.sh +6 -0
- package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/no-classic-fallback.md +10 -0
- package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/nothing-written.md +7 -0
- package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/skill-fired.md +7 -0
- package/plugins/solution-architect/evals/workflow-gate-no-architecture/graders/stops-at-gate.md +11 -0
- package/plugins/solution-architect/evals/workflow-gate-no-architecture/prompt.md +7 -0
- package/plugins/solution-architect/evals/workflow-happy-path/case.yaml +4 -0
- package/plugins/solution-architect/evals/workflow-happy-path/fixture.sh +6 -0
- package/plugins/solution-architect/evals/workflow-happy-path/graders/no-estimation-md.md +7 -0
- package/plugins/solution-architect/evals/workflow-happy-path/graders/pages-or-stop.md +16 -0
- package/plugins/solution-architect/evals/workflow-happy-path/graders/routed-to-workflow.md +12 -0
- package/plugins/solution-architect/evals/workflow-happy-path/graders/skill-fired.md +7 -0
- package/plugins/solution-architect/evals/workflow-happy-path/graders/three-questions-max.md +14 -0
- package/plugins/solution-architect/evals/workflow-happy-path/graders/workflow-or-exact-stop.md +15 -0
- package/plugins/solution-architect/evals/workflow-happy-path/prompt.md +9 -0
- package/plugins/solution-architect/skills/analyze-requirements/assets/viewer-template.html +11 -1
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/cdp.mjs +4 -1
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/quality-gate.mjs +16 -1
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/browser.test.mjs +27 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/quality-gate.test.mjs +9 -0
- package/plugins/solution-architect/skills/estimate/README.md +38 -18
- package/plugins/solution-architect/skills/estimate/SKILL.md +16 -69
- package/plugins/solution-architect/skills/estimate/classic/FLOW.md +77 -0
- package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/estimate-template-agentic.html +111 -138
- package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/estimate-template.html +219 -445
- package/plugins/solution-architect/skills/estimate/{assets → classic/assets}/scores-review-template.html +5 -4
- package/plugins/solution-architect/skills/estimate/{references → classic/references}/agentic-estimation.md +4 -2
- package/plugins/solution-architect/skills/estimate/classic/references/ai-multipliers.md +57 -0
- package/plugins/solution-architect/skills/estimate/{references → classic/references}/interview.md +56 -35
- package/plugins/solution-architect/skills/estimate/{references → classic/references}/scoring-guide.md +40 -4
- package/plugins/solution-architect/skills/estimate/{references → classic/references}/task-shapes.md +1 -1
- package/plugins/solution-architect/skills/estimate/{references → classic/references}/techniques.md +29 -21
- package/plugins/solution-architect/skills/estimate/{references → classic/references}/writing.md +77 -45
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/compute.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/checks.mjs +38 -6
- package/plugins/solution-architect/skills/estimate/classic/scripts/lib/redact.mjs +112 -0
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/roadmap.mjs +4 -5
- package/plugins/solution-architect/skills/estimate/classic/scripts/lib/rollup.mjs +129 -0
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/schema.mjs +31 -38
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-csv.mjs +3 -3
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/score-html.mjs +3 -3
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/render.mjs +9 -8
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/score-review.mjs +3 -3
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/baselines.test.mjs +3 -3
- package/plugins/solution-architect/skills/estimate/classic/scripts/test/browser-agentic.test.mjs +143 -0
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/browser.test.mjs +211 -52
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/compute.test.mjs +58 -33
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/e2e.test.mjs +55 -3
- package/plugins/solution-architect/skills/estimate/classic/scripts/test/estimate-math.test.mjs +44 -0
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-estimation-fail.md +0 -10
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-estimation-pass.md +0 -10
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/agentic-inputs.json +1 -7
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/booking-inputs.json +11 -10
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/estimation-fail.md +6 -0
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/estimation-pass.md +17 -21
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/measurements.test.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/classic/scripts/test/pricing.test.mjs +88 -0
- package/plugins/solution-architect/skills/estimate/classic/scripts/test/project-price.test.mjs +93 -0
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/quality-gates.test.mjs +7 -1
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/references.test.mjs +88 -26
- package/plugins/solution-architect/skills/estimate/classic/scripts/test/render.test.mjs +405 -0
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/schema.test.mjs +114 -61
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/score-review.test.mjs +37 -4
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/scoring.test.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/url-state.test.mjs +2 -2
- package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/validate.test.mjs +104 -10
- package/plugins/solution-architect/skills/estimate/classic/scripts/test/xlsx-export.test.mjs +475 -0
- package/plugins/solution-architect/skills/estimate/classic/scripts/test/zip-store.test.mjs +26 -0
- package/plugins/solution-architect/skills/estimate/evals/evals.json +44 -9
- package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +28 -0
- package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.json +79 -0
- package/plugins/solution-architect/skills/estimate/evals/fixtures/workflow-sin-kowa-mini/requirements.md +141 -0
- package/plugins/solution-architect/skills/estimate/shared/assets/xlsx-export.js +336 -0
- package/plugins/solution-architect/skills/estimate/shared/lib/agentic-task-schema.mjs +24 -0
- package/plugins/solution-architect/skills/estimate/shared/lib/context-schema.mjs +35 -0
- package/plugins/solution-architect/skills/estimate/shared/lib/estimate-math.mjs +31 -0
- package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/inline.mjs +13 -5
- package/plugins/solution-architect/skills/estimate/shared/lib/pricing.mjs +78 -0
- package/plugins/solution-architect/skills/estimate/shared/lib/project-price.mjs +96 -0
- package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/scoring-schema.mjs +1 -1
- package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/scoring.mjs +3 -3
- package/plugins/solution-architect/skills/estimate/shared/lib/zip.mjs +60 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/FLOW.md +91 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-components.html +994 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-template.html +440 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimator-system.xlsx +0 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/assets/score-review.html +838 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/references/hidden-work-by-type.md +429 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/references/linking.md +59 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-components-template.mjs +80 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-template.mjs +60 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-workflow-template.mjs +51 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-xlsx-template.py +144 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/compute.mjs +32 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-html.mjs +44 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/page-view.mjs +71 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/pair-findings.mjs +19 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/requirements.mjs +33 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/rollup.mjs +66 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/schema-components.mjs +69 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/schema.mjs +70 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/score-diff.mjs +54 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/score-html.mjs +52 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/lib/xlsx-rows.mjs +51 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/render.mjs +42 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/score-review.mjs +46 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/arch-link.js +9 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/click.js +28 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/prelude.js +4 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/view.js +63 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/browser.test.mjs +127 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/build-pages.test.mjs +43 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/build-template.test.mjs +18 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/cli.test.mjs +48 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/estimator-system.test.mjs +66 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/ARCHITECTURE-mini.md +31 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/feedback.json +19 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/inputs-pass.json +80 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/measurements.jsonl +0 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/fixtures/requirements.json +79 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/page-view.test.mjs +54 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/pages-browser.test.mjs +209 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/quality-gates.test.mjs +25 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/render.test.mjs +54 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/requirements.test.mjs +33 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/rollup.test.mjs +80 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/schema.test.mjs +61 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/score-review.test.mjs +108 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/stage.mjs +32 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/workflow-script.test.mjs +24 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/xlsx-rows.test.mjs +58 -0
- package/plugins/solution-architect/skills/estimate/workflow-based/scripts/validate.mjs +19 -0
- package/plugins/solution-architect/skills/new-lead/SKILL.md +4 -3
- package/plugins/solution-architect/skills/proposal/README.md +22 -7
- package/plugins/solution-architect/skills/proposal/SKILL.md +18 -7
- package/plugins/solution-architect/skills/proposal/assets/proposal-workflow.html +143 -0
- package/plugins/solution-architect/skills/proposal/evals/evals.json +29 -11
- package/plugins/solution-architect/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/ARCHITECTURE.md +65 -0
- package/plugins/solution-architect/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/brief.md +21 -0
- package/plugins/solution-architect/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/estimation-inputs.json +126 -0
- package/plugins/solution-architect/skills/proposal/evals/fixtures/gate-check-unpriced-harborline/estimation.json +215 -0
- package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation-inputs.json +224 -34
- package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation.json +103 -114
- package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-harborline-dispatch/estimation.md +48 -22
- package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation-inputs.json +211 -33
- package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation.json +102 -117
- package/plugins/solution-architect/skills/proposal/evals/fixtures/pre-fed-meridian-dental/estimation.md +48 -25
- package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/ARCHITECTURE.md +31 -0
- package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation-inputs.json +468 -0
- package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/estimation.json +773 -0
- package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/measurements.jsonl +0 -0
- package/plugins/solution-architect/skills/proposal/evals/fixtures/workflow-sin-kowa-mini/requirements.json +79 -0
- package/plugins/solution-architect/skills/proposal/references/interview.md +3 -6
- package/plugins/solution-architect/skills/proposal/references/review.md +16 -4
- package/plugins/solution-architect/skills/proposal/references/workflow.md +88 -0
- package/plugins/solution-architect/skills/proposal/references/writing.md +33 -31
- package/plugins/solution-architect/skills/proposal/scripts/derive.mjs +1 -1
- package/plugins/solution-architect/skills/proposal/scripts/lib/checks-client.mjs +5 -22
- package/plugins/solution-architect/skills/proposal/scripts/lib/checks-doc.mjs +18 -8
- package/plugins/solution-architect/skills/proposal/scripts/lib/checks.mjs +6 -2
- package/plugins/solution-architect/skills/proposal/scripts/lib/docx-body.mjs +42 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/docx-package.mjs +56 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/docx-xml.mjs +44 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/figures.mjs +24 -33
- package/plugins/solution-architect/skills/proposal/scripts/lib/sections.mjs +1 -1
- package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-checks.mjs +71 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-cli.mjs +46 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-html.mjs +39 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-lead.mjs +45 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-page.mjs +30 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/workflow-view.mjs +80 -0
- package/plugins/solution-architect/skills/proposal/scripts/render.mjs +5 -1
- package/plugins/solution-architect/skills/proposal/scripts/test/checks-client.test.mjs +50 -47
- package/plugins/solution-architect/skills/proposal/scripts/test/checks-doc.test.mjs +99 -40
- package/plugins/solution-architect/skills/proposal/scripts/test/docs.test.mjs +11 -5
- package/plugins/solution-architect/skills/proposal/scripts/test/docx.test.mjs +68 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/e2e.test.mjs +3 -3
- package/plugins/solution-architect/skills/proposal/scripts/test/evals-fixtures.test.mjs +46 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/figures.test.mjs +67 -54
- package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-fail.md +6 -1
- package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-inputs-pass.json +17 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-pass.md +8 -12
- package/plugins/solution-architect/skills/proposal/scripts/test/render.test.mjs +3 -3
- package/plugins/solution-architect/skills/proposal/scripts/test/validate.test.mjs +5 -4
- package/plugins/solution-architect/skills/proposal/scripts/test/workflow-browser.test.mjs +96 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/workflow-checks.test.mjs +98 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/workflow-docs.test.mjs +25 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/workflow-render.test.mjs +75 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/workflow-stage.mjs +15 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/workflow-view.test.mjs +78 -0
- package/plugins/solution-architect/skills/proposal/scripts/validate.mjs +4 -1
- package/plugins/solution-architect/workflows/review-links.js +61 -0
- package/plugins/solution-architect/skills/estimate/references/ai-multipliers.md +0 -101
- package/plugins/solution-architect/skills/estimate/scripts/lib/estimate-math.mjs +0 -89
- package/plugins/solution-architect/skills/estimate/scripts/lib/redact.mjs +0 -64
- package/plugins/solution-architect/skills/estimate/scripts/lib/rollup.mjs +0 -154
- package/plugins/solution-architect/skills/estimate/scripts/lib/scenario-schema.mjs +0 -39
- package/plugins/solution-architect/skills/estimate/scripts/test/estimate-math.test.mjs +0 -131
- package/plugins/solution-architect/skills/estimate/scripts/test/render.test.mjs +0 -251
- package/plugins/solution-architect/skills/estimate/scripts/test/xlsx-export.test.mjs +0 -254
- /package/plugins/solution-architect/skills/estimate/{references → classic/references}/slicing.md +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/agentic-checks.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/components.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/md-tables.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/lib/scoring-checks.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/fixtures/measurements.jsonl +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/test/zip.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → classic/scripts}/validate.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/baselines.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/measurements.mjs +0 -0
- /package/plugins/solution-architect/skills/estimate/{scripts → shared}/lib/score-diff.mjs +0 -0
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// Every formula the estimate ships — imported by compute.mjs at build time.
|
|
2
|
-
// The estimate pages inline nothing: every number they show is committed in
|
|
3
|
-
// estimation.json. The score review page inlines TIER_BREAKS and tierFor
|
|
4
|
-
// alone, so an edited score re-tiers in the browser on the same scale.
|
|
5
|
-
|
|
6
|
-
export const AI_CATEGORIES = {
|
|
7
|
-
boilerplate: { min: 0.5, max: 0.8 },
|
|
8
|
-
logic: { min: 0.2, max: 0.4 },
|
|
9
|
-
novel: { min: 0.0, max: 0.1 },
|
|
10
|
-
};
|
|
11
|
-
export const SENIORITY_FACTOR = { junior: 1.15, mid: 1.0, senior: 0.85 };
|
|
12
|
-
export const HOURS_PER_MONTH = 140;
|
|
13
|
-
export const COORDINATION_TAX = 0.10;
|
|
14
|
-
// The team workbook's tier scale (its sheet-1 formula and Tier Reference tab):
|
|
15
|
-
// one scale for the interview, the validator, the page and the xlsx export.
|
|
16
|
-
export const TIER_BREAKS = [
|
|
17
|
-
{ max: 11, tier: 'S' }, { max: 17, tier: 'M' }, { max: 22, tier: 'L' }, { max: Infinity, tier: 'XL' },
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
export function pert({ o, m, p }) {
|
|
21
|
-
return { e: (o + 4 * m + p) / 6, sigma: (p - o) / 6 };
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export function projectBuffer(sigmas) {
|
|
25
|
-
return Math.sqrt(sigmas.reduce((sum, s) => sum + s * s, 0));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function tierFor(scores) {
|
|
29
|
-
const total = Object.values(scores).reduce((a, b) => a + b, 0);
|
|
30
|
-
return { total, tier: TIER_BREAKS.find((b) => total <= b.max).tier };
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const clampRed = (r) => Math.min(Math.max(r, 0), 0.9);
|
|
34
|
-
|
|
35
|
-
export function aiAdjust({ e, category, verificationPct, scale = 1 }) {
|
|
36
|
-
const { min, max } = AI_CATEGORIES[category];
|
|
37
|
-
const red = clampRed(((min + max) / 2) * scale);
|
|
38
|
-
const redMax = clampRed(max * scale);
|
|
39
|
-
const [tr, ar, ao] = [e, e * (1 - red), e * (1 - redMax)];
|
|
40
|
-
return ((ao + 2 * ar + tr) / 4) * (1 + verificationPct);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Seniority scales the base effort on every path; the AI reduction is a
|
|
44
|
-
// property of the task category alone. Scaling the reduction by seniority
|
|
45
|
-
// instead made juniors come out faster than seniors on AI plans.
|
|
46
|
-
export function taskHours({ e, seniority, aiAssisted, category, verificationPct, scale = 1 }) {
|
|
47
|
-
const base = e * SENIORITY_FACTOR[seniority];
|
|
48
|
-
return aiAssisted ? aiAdjust({ e: base, category, verificationPct, scale }) : base;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// One seniority drives effort for a whole team: the most common level wins,
|
|
52
|
-
// ties go to the more senior. Rank comes from the factor values themselves
|
|
53
|
-
// (more senior = lower factor), never from key order. Lives here (not
|
|
54
|
-
// rollup.mjs) so the inlined bundle hands the page the same function the
|
|
55
|
-
// committed rollup uses.
|
|
56
|
-
export const dominantSeniority = (team) => Object.keys(SENIORITY_FACTOR)
|
|
57
|
-
.sort((a, b) => SENIORITY_FACTOR[a] - SENIORITY_FACTOR[b])
|
|
58
|
-
.map((level) => [level, team.filter((m) => m.seniority === level).length])
|
|
59
|
-
.reduce((best, cur) => (cur[1] > best[1] ? cur : best))[0];
|
|
60
|
-
|
|
61
|
-
export function riskBufferHours(risks) {
|
|
62
|
-
return risks.reduce((sum, r) => sum + r.probability * r.impactHours, 0);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export function effectiveCapacity(engineers) {
|
|
66
|
-
return Math.max(1, engineers * (1 - COORDINATION_TAX * (engineers - 1)));
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// Tooling is priced per seat per month, vendor-neutral. A null seat cost is
|
|
70
|
-
// a recorded gap (the schema demands an assumption for it) and prices as 0.
|
|
71
|
-
export function scenarioRollup({ hours, team, toolingCostPerSeat }) {
|
|
72
|
-
const months = hours / (effectiveCapacity(team.length) * HOURS_PER_MONTH);
|
|
73
|
-
const laborCost = months * team.reduce((sum, t) => sum + t.rate * HOURS_PER_MONTH, 0);
|
|
74
|
-
const toolingCost = months * (toolingCostPerSeat ?? 0) * team.length;
|
|
75
|
-
return { months, laborCost, toolingCost, totalCost: laborCost + toolingCost };
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// Sequential roadmap: each milestone's band width is its share of total task
|
|
79
|
-
// hours × scenario months, so bands tile [0, months] and buffers/overhead
|
|
80
|
-
// spread proportionally instead of piling up at the end.
|
|
81
|
-
export function roadmapBands({ milestones, months }) {
|
|
82
|
-
const total = milestones.reduce((sum, m) => sum + m.hours, 0);
|
|
83
|
-
let at = 0;
|
|
84
|
-
return milestones.map((m) => {
|
|
85
|
-
const startMonths = at;
|
|
86
|
-
at += total > 0 ? (m.hours / total) * months : 0;
|
|
87
|
-
return { name: m.name, startMonths, endMonths: at };
|
|
88
|
-
});
|
|
89
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// The --client-only export embeds the full estimation JSON in the page; this
|
|
2
|
-
// strips the internal money detail (rates, labor/tooling cost split, per-task
|
|
3
|
-
// hours per scenario) before it ships, unless the inputs opt out via
|
|
4
|
-
// exposeRatesToClient. Assumptions/risks are left alone — those are
|
|
5
|
-
// client-facing per spec.
|
|
6
|
-
//
|
|
7
|
-
// Agentic-only fields are stripped unconditionally (not gated on
|
|
8
|
-
// exposeRatesToClient, which is a pricing-transparency opt-out, not a
|
|
9
|
-
// privacy one): the local measurements dataset path (absolute, carries the
|
|
10
|
-
// operator's username), the operator's repository name, and evidence task
|
|
11
|
-
// descriptions (the global measurements store can carry other projects'
|
|
12
|
-
// task descriptions). These fields don't exist in team-mode estimations, so
|
|
13
|
-
// team-mode output is unaffected.
|
|
14
|
-
function redactScenarioTeam(team) {
|
|
15
|
-
return team.map(({ rate, ...rest }) => rest);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function redactComputedScenarios(scenarios) {
|
|
19
|
-
return Object.fromEntries(Object.entries(scenarios).map(([id, s]) => {
|
|
20
|
-
const { laborCost, toolingCost, taskHours, ...rest } = s;
|
|
21
|
-
return [id, rest];
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function redactAgenticInputs({ measurementsPath, agentContext, ...rest }) {
|
|
26
|
-
if (!agentContext) return rest;
|
|
27
|
-
const { repository, ...clientAgentContext } = agentContext;
|
|
28
|
-
return { ...rest, agentContext: clientAgentContext };
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// A score's cite is internal shorthand — the ticket phrase, file name or
|
|
32
|
-
// meeting wording the judgment rests on — so it is blanked unconditionally,
|
|
33
|
-
// like the agentic fields above. The rubric anchor is the sentence the client
|
|
34
|
-
// can read and it stays, so the page still explains every score.
|
|
35
|
-
function blankCites(feature) {
|
|
36
|
-
if (!feature.scores) return feature;
|
|
37
|
-
const scores = Object.entries(feature.scores).map(([k, s]) => [k, { ...s, cite: '' }]);
|
|
38
|
-
return { ...feature, scores: Object.fromEntries(scores) };
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function redactComputedTasks(tasks) {
|
|
42
|
-
return Object.fromEntries(Object.entries(tasks).map(([id, t]) => [
|
|
43
|
-
id,
|
|
44
|
-
t.evidence ? { ...t, evidence: t.evidence.map(({ description, ...rest }) => rest) } : t,
|
|
45
|
-
]));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function redactForClient(estimation) {
|
|
49
|
-
const agentic = redactAgenticInputs(estimation.inputs);
|
|
50
|
-
const inputs = { ...agentic, features: agentic.features.map(blankCites) };
|
|
51
|
-
const computed = { ...estimation.computed, tasks: redactComputedTasks(estimation.computed.tasks) };
|
|
52
|
-
if (estimation.inputs.exposeRatesToClient) return { ...estimation, inputs, computed };
|
|
53
|
-
return {
|
|
54
|
-
...estimation,
|
|
55
|
-
inputs: {
|
|
56
|
-
...inputs,
|
|
57
|
-
scenarios: inputs.scenarios.map((s) => ({ ...s, team: redactScenarioTeam(s.team) })),
|
|
58
|
-
},
|
|
59
|
-
computed: {
|
|
60
|
-
...computed,
|
|
61
|
-
scenarios: redactComputedScenarios(computed.scenarios),
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
}
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
// Turns validated estimation-inputs into the estimation.json truth: PERT per
|
|
2
|
-
// task, AI-adjusted hours per (task × scenario), buffers, and cost rollups.
|
|
3
|
-
// Every map is assembled with sorted keys so repeat runs are byte-identical.
|
|
4
|
-
import {
|
|
5
|
-
pert, projectBuffer, taskHours, riskBufferHours, scenarioRollup, dominantSeniority,
|
|
6
|
-
} from './estimate-math.mjs';
|
|
7
|
-
import { roadmapFor } from './roadmap.mjs';
|
|
8
|
-
import { componentHoursFor } from './components.mjs';
|
|
9
|
-
import { agenticTask } from './baselines.mjs';
|
|
10
|
-
import { scoreSummary } from './scoring.mjs';
|
|
11
|
-
|
|
12
|
-
function sortedMap(entries) {
|
|
13
|
-
return Object.fromEntries(entries.sort(([a], [b]) => a.localeCompare(b)));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function round2(n) {
|
|
17
|
-
return Math.round(n * 100) / 100;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function taskHoursFor(scenario, tasks) {
|
|
21
|
-
const seniority = dominantSeniority(scenario.team);
|
|
22
|
-
const entries = Object.keys(tasks).map((id) => [id, tasks[id].evidence !== undefined
|
|
23
|
-
? tasks[id].e
|
|
24
|
-
: taskHours({
|
|
25
|
-
e: tasks[id].e, seniority, aiAssisted: scenario.aiAssisted,
|
|
26
|
-
category: tasks[id].category, verificationPct: tasks[id].verificationPct,
|
|
27
|
-
})]);
|
|
28
|
-
return sortedMap(entries);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function scenarioBlock(scenario, ctx) {
|
|
32
|
-
const taskHours = taskHoursFor(scenario, ctx.tasks);
|
|
33
|
-
const sumTaskHours = Object.values(taskHours).reduce((a, b) => a + b, 0);
|
|
34
|
-
const hours = sumTaskHours + sumTaskHours * ctx.overheadPct + ctx.spreadBufferHours + ctx.riskBufferHours;
|
|
35
|
-
const rollup = scenarioRollup({ hours, team: scenario.team, toolingCostPerSeat: scenario.toolingCostPerSeat });
|
|
36
|
-
const roadmap = roadmapFor({ features: ctx.features, taskHours, months: rollup.months })
|
|
37
|
-
?.map((b) => ({ ...b, startMonths: round2(b.startMonths), endMonths: round2(b.endMonths) }));
|
|
38
|
-
const notes = [];
|
|
39
|
-
if (scenario.team.length === 1) notes.push('bus factor: single engineer');
|
|
40
|
-
if (scenario.team.length > 3) notes.push('coordination overhead grows past 3 engineers');
|
|
41
|
-
return {
|
|
42
|
-
taskHours: sortedMap(Object.entries(taskHours).map(([id, h]) => [id, round2(h)])),
|
|
43
|
-
hours: round2(hours),
|
|
44
|
-
months: round2(rollup.months),
|
|
45
|
-
laborCost: round2(rollup.laborCost),
|
|
46
|
-
toolingCost: round2(rollup.toolingCost),
|
|
47
|
-
totalCost: round2(rollup.totalCost),
|
|
48
|
-
notes,
|
|
49
|
-
...(roadmap ? { roadmap } : {}),
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const CONFIDENCE_RANK = { HIGH: 0, MED: 1, LOW: 2, UNCALIBRATED: 3 };
|
|
54
|
-
|
|
55
|
-
export function criticalConfidence(features, tasks) {
|
|
56
|
-
let critical = null;
|
|
57
|
-
for (const feature of features) {
|
|
58
|
-
if (!critical || feature.hours > critical.hours) critical = feature;
|
|
59
|
-
}
|
|
60
|
-
let worst = 'HIGH';
|
|
61
|
-
for (const taskId of critical.taskIds) {
|
|
62
|
-
const confidence = tasks[taskId].confidence;
|
|
63
|
-
if (CONFIDENCE_RANK[confidence] > CONFIDENCE_RANK[worst]) worst = confidence;
|
|
64
|
-
}
|
|
65
|
-
return worst;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function buildTasks(inputs) {
|
|
69
|
-
const tasks = {};
|
|
70
|
-
for (const feature of inputs.features) {
|
|
71
|
-
for (const task of feature.tasks) {
|
|
72
|
-
const { e, sigma } = pert(task);
|
|
73
|
-
tasks[task.id] = {
|
|
74
|
-
e, sigma, o: task.o, p: task.p, category: task.category,
|
|
75
|
-
confidence: task.confidence, verificationPct: inputs.verificationPct,
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return tasks;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function buildAgenticTasks(inputs, measurements) {
|
|
83
|
-
const agentContext = { ...inputs.agentContext, repository: inputs.agentContext.repository ?? inputs.project };
|
|
84
|
-
const ctx = { records: measurements ?? [], agentContext };
|
|
85
|
-
const tasks = {};
|
|
86
|
-
for (const feature of inputs.features) {
|
|
87
|
-
for (const task of feature.tasks) {
|
|
88
|
-
const a = agenticTask(task, ctx);
|
|
89
|
-
tasks[task.id] = { ...a, o: a.lowH, p: a.highH };
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return tasks;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function buildFeatures(inputs, tasks) {
|
|
96
|
-
const features = {};
|
|
97
|
-
const summaries = [];
|
|
98
|
-
for (const feature of inputs.features) {
|
|
99
|
-
const taskIds = feature.tasks.map((t) => t.id);
|
|
100
|
-
const hours = taskIds.reduce((sum, id) => sum + tasks[id].e, 0);
|
|
101
|
-
const low = taskIds.reduce((sum, id) => sum + tasks[id].o, 0);
|
|
102
|
-
const high = taskIds.reduce((sum, id) => sum + tasks[id].p, 0);
|
|
103
|
-
features[feature.id] = { hours: round2(hours), low: round2(low), high: round2(high), ...scoreSummary(feature) };
|
|
104
|
-
summaries.push({ hours, taskIds });
|
|
105
|
-
}
|
|
106
|
-
return { features: sortedMap(Object.entries(features)), summaries };
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function globalBuffers(tasks, risks) {
|
|
110
|
-
const devHours = Object.values(tasks).reduce((sum, t) => sum + t.e, 0);
|
|
111
|
-
const spreadBufferHours = projectBuffer(Object.values(tasks).map((t) => t.sigma));
|
|
112
|
-
return { devHours, spreadBufferHours, riskBufferHours: riskBufferHours(risks) };
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
const isAgentic = (inputs) => inputs.deliveryMode === 'agentic';
|
|
116
|
-
|
|
117
|
-
const normalizeRisks = (inputs) => (isAgentic(inputs)
|
|
118
|
-
? inputs.risks.map((r) => ({ ...r, impactHours: r.impactMinutes / 60 }))
|
|
119
|
-
: inputs.risks);
|
|
120
|
-
|
|
121
|
-
const taskSummary = (t) => (t.evidence !== undefined
|
|
122
|
-
? {
|
|
123
|
-
e: round2(t.e), sigma: round2(t.sigma), minutes: t.minutes, samples: t.samples,
|
|
124
|
-
matchLevel: t.matchLevel, confidence: t.confidence, calibrated: t.calibrated, evidence: t.evidence,
|
|
125
|
-
}
|
|
126
|
-
: { e: round2(t.e), sigma: round2(t.sigma) });
|
|
127
|
-
|
|
128
|
-
const computedBlock = (ctx) => ({
|
|
129
|
-
tasks: sortedMap(Object.entries(ctx.tasks).map(([id, t]) => [id, taskSummary(t)])),
|
|
130
|
-
features: ctx.features,
|
|
131
|
-
...(ctx.components ? { components: ctx.components } : {}),
|
|
132
|
-
devHours: round2(ctx.buffers.devHours),
|
|
133
|
-
overheadHours: round2(ctx.buffers.devHours * ctx.overheadPct),
|
|
134
|
-
spreadBufferHours: round2(ctx.buffers.spreadBufferHours),
|
|
135
|
-
riskBufferHours: round2(ctx.buffers.riskBufferHours),
|
|
136
|
-
scenarios: ctx.scenarios,
|
|
137
|
-
projectConfidence: criticalConfidence(ctx.summaries, ctx.tasks),
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
export function computeEstimation(inputs, measurements) {
|
|
141
|
-
const risks = normalizeRisks(inputs);
|
|
142
|
-
const tasks = isAgentic(inputs) ? buildAgenticTasks(inputs, measurements) : buildTasks(inputs);
|
|
143
|
-
const { features, summaries } = buildFeatures(inputs, tasks);
|
|
144
|
-
const buffers = globalBuffers(tasks, risks);
|
|
145
|
-
const ctx = { tasks, features: inputs.features, overheadPct: inputs.overheadPct, ...buffers };
|
|
146
|
-
const scenarios = sortedMap(inputs.scenarios.map((s) => [s.id, scenarioBlock(s, ctx)]));
|
|
147
|
-
const components = componentHoursFor(inputs, features);
|
|
148
|
-
return {
|
|
149
|
-
inputs,
|
|
150
|
-
computed: computedBlock({
|
|
151
|
-
tasks, features, components, buffers, overheadPct: inputs.overheadPct, scenarios, summaries,
|
|
152
|
-
}),
|
|
153
|
-
};
|
|
154
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// Scenario-shape checks for estimation-inputs.json: team roster, AI
|
|
2
|
-
// assistance, and the per-seat tooling price. Split from schema.mjs so each
|
|
3
|
-
// module stays under the ten-function gate; findings follow the same
|
|
4
|
-
// "scenario <id>: ..." form.
|
|
5
|
-
import { SENIORITY_FACTOR } from './estimate-math.mjs';
|
|
6
|
-
|
|
7
|
-
// A seat price may be skipped (the client may mandate a vendor) but only as
|
|
8
|
-
// a recorded gap: an AI-assisted scenario with a null seat cost needs an
|
|
9
|
-
// assumption that names it, or the total would silently miss a line item.
|
|
10
|
-
const seatCostOk = (v) => v === null || (typeof v === 'number' && v > 0);
|
|
11
|
-
const toolingAssumed = (inputs) => (inputs.assumptions ?? [])
|
|
12
|
-
.some((a) => /tooling/i.test(typeof a === 'string' ? a : a?.text ?? ''));
|
|
13
|
-
|
|
14
|
-
function checkScenarioAi(s, inputs, out) {
|
|
15
|
-
if ('plan' in s) out.push(`scenario ${s.id}: "plan" was removed — use aiAssisted + toolingCostPerSeat`);
|
|
16
|
-
if (typeof s.aiAssisted !== 'boolean') out.push(`scenario ${s.id}: aiAssisted must be true|false`);
|
|
17
|
-
if (!('toolingCostPerSeat' in s) || !seatCostOk(s.toolingCostPerSeat)) {
|
|
18
|
-
out.push(`scenario ${s.id}: toolingCostPerSeat must be a positive number or null`);
|
|
19
|
-
}
|
|
20
|
-
if (s.aiAssisted === true && s.toolingCostPerSeat === null && !toolingAssumed(inputs)) {
|
|
21
|
-
out.push(`scenario ${s.id}: null toolingCostPerSeat needs an assumption naming the tooling cost gap`);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function checkScenarios(inputs, out) {
|
|
26
|
-
const ids = (inputs.scenarios ?? []).map((s) => s.id);
|
|
27
|
-
if (!ids.includes(inputs.recommendedScenario)) out.push('recommendedScenario names no scenario');
|
|
28
|
-
if ('recommendedReason' in inputs && !(typeof inputs.recommendedReason === 'string' && inputs.recommendedReason.trim())) {
|
|
29
|
-
out.push('recommendedReason must be a non-empty string when present');
|
|
30
|
-
}
|
|
31
|
-
for (const s of inputs.scenarios ?? []) {
|
|
32
|
-
if (!s.team?.length) out.push(`scenario ${s.id}: empty team`);
|
|
33
|
-
checkScenarioAi(s, inputs, out);
|
|
34
|
-
for (const member of s.team ?? []) {
|
|
35
|
-
if (!Object.hasOwn(SENIORITY_FACTOR, member.seniority)) out.push(`scenario ${s.id}: unknown seniority "${member.seniority}"`);
|
|
36
|
-
if (!(typeof member.rate === 'number' && member.rate > 0)) out.push(`scenario ${s.id}: rate must be a positive number`);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { test } from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
import {
|
|
4
|
-
pert, projectBuffer, tierFor, aiAdjust, riskBufferHours, effectiveCapacity,
|
|
5
|
-
scenarioRollup, taskHours, SENIORITY_FACTOR, roadmapBands, dominantSeniority,
|
|
6
|
-
} from '../lib/estimate-math.mjs';
|
|
7
|
-
|
|
8
|
-
const close = (got, want) => assert.ok(Math.abs(got - want) < 1e-9, `${got} !~ ${want}`);
|
|
9
|
-
|
|
10
|
-
test('pert: E=(O+4M+P)/6, sigma=(P-O)/6', () => {
|
|
11
|
-
const { e, sigma } = pert({ o: 16, m: 24, p: 40 });
|
|
12
|
-
close(e, 152 / 6);
|
|
13
|
-
close(sigma, 4);
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
test('project buffer is sqrt of summed squares, not a naive sum', () => {
|
|
17
|
-
close(projectBuffer([4, 3]), 5);
|
|
18
|
-
close(projectBuffer([]), 0);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
test('factor scores map to tiers at the documented breaks', () => {
|
|
22
|
-
// user's real example: 2+3+5+3+4 = 17 → M
|
|
23
|
-
assert.deepEqual(tierFor({ complexity: 2, size: 3, dependencies: 5, uncertainty: 3, risk: 4 }),
|
|
24
|
-
{ total: 17, tier: 'M' });
|
|
25
|
-
assert.equal(tierFor({ complexity: 1, size: 1, dependencies: 2, uncertainty: 3, risk: 3 }).tier, 'S');
|
|
26
|
-
assert.equal(tierFor({ complexity: 5, size: 4, dependencies: 4, uncertainty: 3, risk: 2 }).tier, 'L');
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
test('tier breaks are the workbook scale: S ≤ 11, M ≤ 17, L ≤ 22, XL above', () => {
|
|
30
|
-
const at = (total) => tierFor({ a: total }).tier;
|
|
31
|
-
assert.equal(at(11), 'S');
|
|
32
|
-
assert.equal(at(12), 'M');
|
|
33
|
-
assert.equal(at(17), 'M');
|
|
34
|
-
assert.equal(at(18), 'L');
|
|
35
|
-
assert.equal(at(22), 'L');
|
|
36
|
-
assert.equal(at(23), 'XL');
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
test('aiAdjust applies (AO + 2AR + TR)/4 plus verification overhead', () => {
|
|
40
|
-
const e = 152 / 6; // boilerplate: red=0.65, redMax=0.8 — category only, no seniority term
|
|
41
|
-
const want = ((e * 0.2 + 2 * (e * 0.35) + e) / 4) * 1.12;
|
|
42
|
-
close(aiAdjust({ e, category: 'boilerplate', verificationPct: 0.12, scale: 1 }), want);
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
test('aiAdjust clamps reduction at 0.9 for outsized scale', () => {
|
|
46
|
-
const got = aiAdjust({ e: 100, category: 'boilerplate', verificationPct: 0, scale: 1.5 });
|
|
47
|
-
const red = 0.9; // 0.65 × 1.5 = 0.975 → clamped
|
|
48
|
-
close(got, (100 * (1 - red) * 3 + 100) / 4); // redMax also clamps to 0.9 so ao == ar
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
test('taskHours: seniority scales base effort on the traditional path', () => {
|
|
52
|
-
const base = { e: 100, aiAssisted: false, category: 'logic', verificationPct: 0.12 };
|
|
53
|
-
close(taskHours({ ...base, seniority: 'senior' }), 85);
|
|
54
|
-
close(taskHours({ ...base, seniority: 'mid' }), 100);
|
|
55
|
-
close(taskHours({ ...base, seniority: 'junior' }), 115);
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
test('taskHours: a senior is never slower than a junior, with or without AI', () => {
|
|
59
|
-
for (const aiAssisted of [false, true]) {
|
|
60
|
-
for (const category of ['boilerplate', 'logic', 'novel']) {
|
|
61
|
-
const at = (seniority) => taskHours({ e: 100, seniority, aiAssisted, category, verificationPct: 0.12 });
|
|
62
|
-
assert.ok(at('senior') < at('mid') && at('mid') < at('junior'),
|
|
63
|
-
`${aiAssisted}/${category}: ${at('senior')} < ${at('mid')} < ${at('junior')} violated`);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
test('taskHours: AI assistance reduces hours versus the same seniority unaided', () => {
|
|
69
|
-
for (const seniority of Object.keys(SENIORITY_FACTOR)) {
|
|
70
|
-
const at = (aiAssisted) => taskHours({ e: 100, seniority, aiAssisted, category: 'boilerplate', verificationPct: 0.12 });
|
|
71
|
-
assert.ok(at(true) < at(false), `${seniority}: AI ${at(true)} !< ${at(false)}`);
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
// The what-if rail's roster needs the same dominant-seniority rule the
|
|
76
|
-
// committed rollup uses — shipping it in the inlined math bundle is what
|
|
77
|
-
// keeps the page copy and the Node copy one function.
|
|
78
|
-
test('dominantSeniority ships with the math bundle: count wins, ties go senior', () => {
|
|
79
|
-
assert.equal(dominantSeniority([
|
|
80
|
-
{ seniority: 'junior' }, { seniority: 'junior' }, { seniority: 'senior' },
|
|
81
|
-
]), 'junior');
|
|
82
|
-
assert.equal(dominantSeniority([{ seniority: 'senior' }, { seniority: 'junior' }]), 'senior');
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
test('risk buffer is probability times impact, summed', () => {
|
|
86
|
-
close(riskBufferHours([{ probability: 0.3, impactHours: 40 }, { probability: 0.5, impactHours: 16 }]), 20);
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
test('capacity pays a coordination tax per added engineer, floored at one', () => {
|
|
90
|
-
close(effectiveCapacity(1), 1);
|
|
91
|
-
close(effectiveCapacity(2), 1.8);
|
|
92
|
-
close(effectiveCapacity(3), 2.4);
|
|
93
|
-
close(effectiveCapacity(12), 1); // raw formula goes negative past 10 — floor holds
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
test('scenarioRollup: 1008h, 2 mid @45, $100/seat tooling → 4.0mo, $51,200', () => {
|
|
97
|
-
const team = [{ seniority: 'mid', rate: 45 }, { seniority: 'mid', rate: 45 }];
|
|
98
|
-
const got = scenarioRollup({ hours: 1008, team, toolingCostPerSeat: 100 });
|
|
99
|
-
close(got.months, 4);
|
|
100
|
-
close(got.laborCost, 50400);
|
|
101
|
-
close(got.toolingCost, 800);
|
|
102
|
-
close(got.totalCost, 51200);
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
// A null seat cost is an open gap, not free tooling — it prices as zero and
|
|
106
|
-
// the interview records the assumption; the math must not turn null into NaN.
|
|
107
|
-
test('scenarioRollup: null toolingCostPerSeat prices tooling at zero', () => {
|
|
108
|
-
const team = [{ seniority: 'mid', rate: 45 }];
|
|
109
|
-
const got = scenarioRollup({ hours: 140, team, toolingCostPerSeat: null });
|
|
110
|
-
close(got.toolingCost, 0);
|
|
111
|
-
close(got.totalCost, got.laborCost);
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
test('roadmapBands tiles [0, months] proportionally to hours, in order', () => {
|
|
115
|
-
const bands = roadmapBands({
|
|
116
|
-
milestones: [{ name: 'M1', hours: 60 }, { name: 'M2', hours: 40 }],
|
|
117
|
-
months: 5,
|
|
118
|
-
});
|
|
119
|
-
assert.deepEqual(bands.map((b) => b.name), ['M1', 'M2']);
|
|
120
|
-
close(bands[0].startMonths, 0);
|
|
121
|
-
close(bands[0].endMonths, 3);
|
|
122
|
-
close(bands[1].startMonths, 3); // no gap: starts where M1 ends
|
|
123
|
-
close(bands[1].endMonths, 5); // last band ends at total months
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
test('roadmapBands: single milestone spans the whole project', () => {
|
|
127
|
-
const bands = roadmapBands({ milestones: [{ name: 'All', hours: 90 }], months: 4.2 });
|
|
128
|
-
assert.equal(bands.length, 1);
|
|
129
|
-
close(bands[0].startMonths, 0);
|
|
130
|
-
close(bands[0].endMonths, 4.2);
|
|
131
|
-
});
|