@blackbelt-technology/pi-dashboard-cost-estimator 0.7.0

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.
Files changed (38) hide show
  1. package/.pi/skills/software-cost-estimator/SKILL.md +200 -0
  2. package/.pi/skills/software-cost-estimator/assets/calibration/reference-classes.md +126 -0
  3. package/.pi/skills/software-cost-estimator/assets/calibration/wms-reference.yaml +217 -0
  4. package/.pi/skills/software-cost-estimator/assets/example-quality-hub.yaml +230 -0
  5. package/.pi/skills/software-cost-estimator/assets/rates.default.yaml +106 -0
  6. package/.pi/skills/software-cost-estimator/assets/templates/architecture-plan.md +115 -0
  7. package/.pi/skills/software-cost-estimator/assets/templates/offer-summary.md +99 -0
  8. package/.pi/skills/software-cost-estimator/references/ai-delivery-modes.md +276 -0
  9. package/.pi/skills/software-cost-estimator/references/business-case.md +134 -0
  10. package/.pi/skills/software-cost-estimator/references/nfr-catalog.md +112 -0
  11. package/.pi/skills/software-cost-estimator/references/rates.md +84 -0
  12. package/.pi/skills/software-cost-estimator/references/role-model.md +109 -0
  13. package/.pi/skills/software-cost-estimator/references/sizing-methods.md +147 -0
  14. package/README.md +113 -0
  15. package/bin/calibrate-sessions.mjs +12 -0
  16. package/bin/calibrate.mjs +12 -0
  17. package/bin/estimate.mjs +12 -0
  18. package/package.json +96 -0
  19. package/src/bin/calibrate-sessions.ts +247 -0
  20. package/src/bin/calibrate.ts +77 -0
  21. package/src/bin/estimate.ts +129 -0
  22. package/src/client/index.tsx +300 -0
  23. package/src/configSchema.json +56 -0
  24. package/src/engine/businesscase.ts +139 -0
  25. package/src/engine/defaults.ts +354 -0
  26. package/src/engine/effort.ts +119 -0
  27. package/src/engine/estimate.ts +135 -0
  28. package/src/engine/modes.ts +312 -0
  29. package/src/engine/report.ts +239 -0
  30. package/src/engine/roles.ts +82 -0
  31. package/src/engine/simulate.ts +114 -0
  32. package/src/engine/sizing.ts +108 -0
  33. package/src/engine/types.ts +288 -0
  34. package/src/engine/workbook.ts +143 -0
  35. package/src/engine/xlsx.ts +228 -0
  36. package/src/engine/yaml.ts +205 -0
  37. package/src/server/index.ts +123 -0
  38. package/src/telemetry/sessions.ts +380 -0
@@ -0,0 +1,230 @@
1
+ # Worked example: a manufacturing quality-management web platform.
2
+ # Shape mirrors a real SME offer so the numbers are sanity-checkable.
3
+
4
+ project:
5
+ name: Quality Hub
6
+ client: Example Manufacturing Ltd
7
+ currency: EUR
8
+ region: HU
9
+ phase: requirements-complete
10
+
11
+ context:
12
+ codebase: greenfield
13
+ domain: manufacturing quality management
14
+ compliance: [GDPR, GMP]
15
+
16
+ stack:
17
+ backend: node-typescript
18
+ frontend: react-typescript
19
+ data: postgres
20
+ cloud: hetzner
21
+ integrations: [SAP Business One, sensor gateway]
22
+
23
+ rates_file: ./rates.default.yaml
24
+
25
+ actors:
26
+ - name: Production operator
27
+ type: human
28
+ - name: Quality supervisor
29
+ type: human
30
+ - name: Lab technician
31
+ type: human
32
+ - name: SAP Business One
33
+ type: api
34
+ - name: Sensor gateway
35
+ type: protocol
36
+
37
+ use_cases:
38
+ - id: UC-01
39
+ name: Authentication, RBAC and audit trail
40
+ transactions: 6
41
+ ai_class: boilerplate
42
+ risk: low
43
+ - id: UC-02
44
+ name: Workflow state machine with step guards
45
+ transactions: 9
46
+ ai_class: algorithmic
47
+ risk: medium
48
+ - id: UC-03
49
+ name: Configurable production data-entry forms
50
+ transactions: 8
51
+ ai_class: crud
52
+ risk: medium
53
+ - id: UC-04
54
+ name: Parametrised range validation with block-on-breach
55
+ transactions: 5
56
+ ai_class: algorithmic
57
+ risk: medium
58
+ - id: UC-05
59
+ name: Non-conformance and CAPA handling
60
+ transactions: 7
61
+ ai_class: crud
62
+ risk: medium
63
+ - id: UC-06
64
+ name: Laboratory sample registration and results
65
+ transactions: 6
66
+ ai_class: crud
67
+ risk: low
68
+ - id: UC-07
69
+ name: Batch traceability report and PDF export
70
+ transactions: 5
71
+ ai_class: crud
72
+ risk: low
73
+ - id: UC-08
74
+ name: SAP Business One master-data and posting integration
75
+ transactions: 9
76
+ ai_class: integration
77
+ risk: high
78
+ - id: UC-09
79
+ name: Sensor gateway ingestion
80
+ transactions: 6
81
+ ai_class: integration
82
+ risk: high
83
+ - id: UC-10
84
+ name: Operator tablet UI (touch-optimised, bilingual)
85
+ transactions: 7
86
+ ai_class: ux-heavy
87
+ risk: medium
88
+
89
+ nfrs:
90
+ - id: NFR-01
91
+ attribute: availability
92
+ target: "99.5% during production shifts"
93
+ path: derived-scope
94
+ derived_components:
95
+ - name: Health probes and readiness endpoints
96
+ transactions: 2
97
+ ai_class: ops
98
+ risk: low
99
+ - name: Automated backup and restore drill
100
+ hours: 24
101
+ ai_class: ops
102
+ risk: medium
103
+ - id: NFR-02
104
+ attribute: security
105
+ target: "Role-based access, immutable audit log, WORM storage"
106
+ path: derived-scope
107
+ derived_components:
108
+ - name: Immutable audit log with WORM retention
109
+ transactions: 4
110
+ ai_class: ops
111
+ risk: medium
112
+ - name: Penetration test remediation window
113
+ hours: 40
114
+ ai_class: ops
115
+ risk: high
116
+ - id: NFR-03
117
+ attribute: compliance
118
+ target: "GMP computerised-system validation documentation"
119
+ path: derived-scope
120
+ derived_components:
121
+ - name: Validation protocol set (IQ/OQ/PQ) and traceability matrix
122
+ hours: 120
123
+ ai_class: docs
124
+ risk: medium
125
+ - id: NFR-04
126
+ attribute: performance-efficiency
127
+ target: "Form save < 500 ms on shop-floor tablets over WiFi"
128
+ path: multiplier
129
+ multiplier: 1.06
130
+ - id: NFR-05
131
+ attribute: portability
132
+ target: "Runs on customer-managed Linux or managed cloud"
133
+ path: multiplier
134
+ multiplier: 1.04
135
+
136
+ factors:
137
+ technical:
138
+ T1: 3 # distributed
139
+ T2: 4 # response time
140
+ T3: 4 # end-user efficiency
141
+ T4: 4 # complex internal processing
142
+ T5: 3 # reusable code
143
+ T6: 3 # easy to install
144
+ T7: 4 # easy to use
145
+ T8: 2 # portable
146
+ T9: 4 # easy to change
147
+ T10: 3 # concurrent
148
+ T11: 5 # special security
149
+ T12: 3 # third-party access
150
+ T13: 3 # user training
151
+ environmental:
152
+ E1: 4 # process familiarity
153
+ E2: 3 # application experience
154
+ E3: 4 # paradigm experience
155
+ E4: 4 # lead analyst
156
+ E5: 4 # motivation
157
+ E6: 2 # stable requirements
158
+ E7: 1 # part-time staff
159
+ E8: 1 # difficult language
160
+ cocomo_scale:
161
+ PREC: nominal
162
+ FLEX: high
163
+ RESL: high
164
+ TEAM: high
165
+ PMAT: nominal
166
+
167
+ delivery_modes:
168
+ - human_only
169
+ - human_with_ai
170
+ - ai_steered_human_supervised
171
+ - agentic_hitl
172
+
173
+ team:
174
+ hours_per_day: 8
175
+ fte: 3
176
+ seniority_mix:
177
+ senior: 0.4
178
+ mid: 0.4
179
+ junior: 0.2
180
+
181
+ ai:
182
+ # Agent capacity is bought on flat seat plans, not metered per token.
183
+ # Cost therefore scales with seats x calendar months, NOT with work volume.
184
+ cost_basis: subscription
185
+ subscriptions:
186
+ - plan: anthropic-max-20x # $200/seat/month
187
+ seats: 2
188
+ utilisation: 1.0 # both seats fully on this project
189
+ # Meter-equivalent, measured over 542 sessions / 737.5 h. Not cash out here —
190
+ # it is only used to report subscription leverage (measured 6.4x locally).
191
+ cost_per_steering_hour: 10.41
192
+ context_factor: 5.10 # measured (ACEM illustrative value was 1.25)
193
+ revision_factor: 1.25 # measured lower bound 1.05, held above the floor
194
+ hitl_intensity: 2
195
+ steering_overhead: 1.8
196
+ infra_monthly: 400
197
+
198
+ calibration:
199
+ # Calibrated, not textbook. See assets/calibration/reference-classes.md:
200
+ # the `wms-reference` class implies 12.97 h/UCP for this kind of team and stack.
201
+ # Karner's 20 would over-quote this project by ~54%.
202
+ hours_per_ucp: 13
203
+ reference_ucp: 100
204
+ contingency: 0.15
205
+ iterations: 20000
206
+ seed: 20260101
207
+
208
+ business:
209
+ discount_rate: 0.12
210
+ horizon_years: 3
211
+ benefits:
212
+ - name: Paper-record elimination and QA labour saving
213
+ annual_value: 68000
214
+ confidence: 0.8
215
+ - name: Reduced batch rejection and rework
216
+ annual_value: 45000
217
+ confidence: 0.6
218
+ start_year: 2
219
+ run_costs:
220
+ - name: Hosting and backup
221
+ annual_value: 6000
222
+ - name: Support and maintenance retainer
223
+ annual_value: 18000
224
+ scope_tiers:
225
+ - tier: must
226
+ use_cases: [UC-01, UC-02, UC-03, UC-04, UC-05]
227
+ - tier: should
228
+ use_cases: [UC-06, UC-07, UC-10]
229
+ - tier: could
230
+ use_cases: [UC-08, UC-09]
@@ -0,0 +1,106 @@
1
+ # Default rate card — OVERRIDE PER PROJECT.
2
+ #
3
+ # Day rates in EUR, net, per productive 8-hour man-day.
4
+ # Anchored on the local offer corpus:
5
+ # - Huawei WMS (enterprise, international): 600 EUR/day blended
6
+ # - Sunbloom (SME, Hungary): 423 EUR/day
7
+ # - Nearshore CEE market bands 2025/26: senior 30-70 EUR/h => ~240-560 EUR/day
8
+ #
9
+ # To override: copy this file into the project, edit, and pass --rates <file>,
10
+ # or set `rates_file: ./rates.yaml` in the estimate input.
11
+
12
+ rates:
13
+ # --- Blended (use when the client only wants one number) ---
14
+ - role: Blended
15
+ day_rate: 480
16
+
17
+ # --- Product & analysis ---
18
+ - role: Product Owner / BA
19
+ seniority: senior
20
+ day_rate: 520
21
+ - role: Product Owner / BA
22
+ seniority: mid
23
+ day_rate: 400
24
+ - role: Product Owner / BA
25
+ seniority: junior
26
+ day_rate: 280
27
+
28
+ # --- Architecture ---
29
+ - role: Architect
30
+ seniority: senior
31
+ day_rate: 680
32
+ - role: Architect
33
+ seniority: mid
34
+ day_rate: 520
35
+
36
+ # --- Design ---
37
+ - role: UX / UI Designer
38
+ seniority: senior
39
+ day_rate: 480
40
+ - role: UX / UI Designer
41
+ seniority: mid
42
+ day_rate: 380
43
+ - role: UX / UI Designer
44
+ seniority: junior
45
+ day_rate: 260
46
+
47
+ # --- Engineering ---
48
+ - role: Frontend Developer
49
+ seniority: senior
50
+ day_rate: 520
51
+ - role: Frontend Developer
52
+ seniority: mid
53
+ day_rate: 400
54
+ - role: Frontend Developer
55
+ seniority: junior
56
+ day_rate: 260
57
+
58
+ - role: Backend Developer
59
+ seniority: senior
60
+ day_rate: 560
61
+ - role: Backend Developer
62
+ seniority: mid
63
+ day_rate: 420
64
+ - role: Backend Developer
65
+ seniority: junior
66
+ day_rate: 280
67
+
68
+ - role: Data / Integration Engineer
69
+ seniority: senior
70
+ day_rate: 600
71
+ - role: Data / Integration Engineer
72
+ seniority: mid
73
+ day_rate: 460
74
+
75
+ # --- Quality ---
76
+ - role: QA / Test Automation
77
+ seniority: senior
78
+ day_rate: 440
79
+ - role: QA / Test Automation
80
+ seniority: mid
81
+ day_rate: 340
82
+ - role: QA / Test Automation
83
+ seniority: junior
84
+ day_rate: 240
85
+
86
+ # --- Platform & security ---
87
+ - role: DevOps / SRE
88
+ seniority: senior
89
+ day_rate: 600
90
+ - role: DevOps / SRE
91
+ seniority: mid
92
+ day_rate: 460
93
+ - role: Security Engineer
94
+ seniority: senior
95
+ day_rate: 700
96
+
97
+ # --- Leadership ---
98
+ - role: Tech Lead
99
+ seniority: senior
100
+ day_rate: 640
101
+ - role: Project Manager
102
+ seniority: senior
103
+ day_rate: 520
104
+ - role: Project Manager
105
+ seniority: mid
106
+ day_rate: 400
@@ -0,0 +1,115 @@
1
+ # Architecture Plan — {{PROJECT}}
2
+
3
+ **Client:** {{CLIENT}}
4
+ **Date:** {{DATE}}
5
+ **Status:** Draft for estimation
6
+
7
+ > This plan exists to make the estimate defensible. Every component listed here either
8
+ > implements a use case or is forced into existence by an NFR — and the trace matrix
9
+ > below says which.
10
+
11
+ ## 1. Context
12
+
13
+ - **Problem:** {{ONE PARAGRAPH: what is broken today}}
14
+ - **Users and actors:** {{who touches the system, human and machine}}
15
+ - **Codebase:** greenfield | brownfield | legacy
16
+ - **Domain constraints:** {{regulatory, operational, physical}}
17
+
18
+ ## 2. Technology stack
19
+
20
+ | Layer | Choice | Why | Estimation impact |
21
+ |---|---|---|---|
22
+ | Backend | | | |
23
+ | Frontend | | | |
24
+ | Data | | | |
25
+ | Integration | | | |
26
+ | Infrastructure | | | |
27
+ | Identity | | | |
28
+ | Observability | | | |
29
+
30
+ State the estimation impact explicitly: a low-code platform or a heavy framework moves
31
+ hours-per-UCP more than any other single decision.
32
+
33
+ ## 3. Component view
34
+
35
+ ```mermaid
36
+ graph TB
37
+ subgraph Clients
38
+ WEB[Web app]
39
+ MOB[Mobile / tablet]
40
+ end
41
+ subgraph Platform
42
+ API[API gateway]
43
+ SVC[Domain services]
44
+ JOB[Background jobs]
45
+ DB[(Primary database)]
46
+ end
47
+ subgraph External
48
+ ERP[ERP]
49
+ IDP[Identity provider]
50
+ end
51
+ WEB --> API
52
+ MOB --> API
53
+ API --> SVC
54
+ SVC --> DB
55
+ SVC --> JOB
56
+ SVC --> ERP
57
+ API --> IDP
58
+ ```
59
+
60
+ ## 4. Key flows
61
+
62
+ ```mermaid
63
+ sequenceDiagram
64
+ actor U as User
65
+ participant A as API
66
+ participant S as Service
67
+ participant E as External system
68
+ U->>A: request
69
+ A->>S: validate + dispatch
70
+ S->>E: integrate
71
+ E-->>S: response
72
+ S-->>A: result
73
+ A-->>U: confirmation
74
+ ```
75
+
76
+ Add one sequence diagram per use case that carries real risk. Skip the obvious ones.
77
+
78
+ ## 5. Architecture decisions
79
+
80
+ ### ADR-01: {{Decision title}}
81
+ - **Context:** {{the forces}}
82
+ - **Decision:** {{what was chosen}}
83
+ - **Alternatives rejected:** {{and why}}
84
+ - **Consequences:** {{including the effort consequence}}
85
+ - **Estimation impact:** {{which use cases or factors this changes}}
86
+
87
+ Repeat per material decision. A decision with no estimation impact probably does not
88
+ need an ADR at this stage.
89
+
90
+ ## 6. NFR → component trace matrix
91
+
92
+ **This is the most important table in the document.** It is what turns "we need high
93
+ availability" into a defensible line of effort.
94
+
95
+ | NFR | Target | Components forced into existence | Path | Sized as |
96
+ |---|---|---|---|---|
97
+ | NFR-01 | | | derived-scope | {{transactions or hours}} |
98
+ | NFR-02 | | | multiplier | ×{{value}} |
99
+
100
+ Each NFR takes exactly one path. See `references/nfr-catalog.md`.
101
+
102
+ ## 7. Risks carried into the estimate
103
+
104
+ | # | Risk | Likelihood | Impact | Where it shows up in the estimate |
105
+ |---|---|---|---|---|
106
+ | R1 | | | | e.g. UC-08 marked `risk: high` |
107
+ | R2 | | | | e.g. COCOMO `PREC: low` |
108
+
109
+ Every risk should map to something concrete in the estimate input — a risk level, a
110
+ scale factor, a contingency, or a named assumption. A risk that changes no number is
111
+ decoration.
112
+
113
+ ## 8. Explicitly out of scope
114
+
115
+ - {{the things that will otherwise be assumed included}}
@@ -0,0 +1,99 @@
1
+ # Offer — {{PROJECT}}
2
+
3
+ **Client:** {{CLIENT}}
4
+ **Date:** {{DATE}}
5
+ **Validity:** 30 days from the date above
6
+
7
+ ## What you get
8
+
9
+ {{Two or three sentences. What the client will be able to do that they cannot do today.
10
+ Not a feature list — an outcome.}}
11
+
12
+ ## Scope
13
+
14
+ | # | Deliverable | Tier |
15
+ |---|---|---|
16
+ | UC-01 | | must |
17
+ | UC-02 | | must |
18
+ | UC-06 | | should |
19
+ | UC-08 | | could |
20
+
21
+ Non-functional scope included:
22
+
23
+ | Requirement | Target | What we build for it |
24
+ |---|---|---|
25
+ | Availability | | |
26
+ | Security | | |
27
+ | Compliance | | |
28
+
29
+ ## Effort and price
30
+
31
+ | Package | Man-days | Net price |
32
+ |---|---:|---:|
33
+ | Must — {{name}} | | |
34
+ | Should — {{name}} | | |
35
+ | Could — {{name}} | | |
36
+ | **Total** | | |
37
+
38
+ Prices are net, in {{CURRENCY}}, excluding {{VAT %}} VAT.
39
+ Exchange rate {{if applicable}}.
40
+ One man-day = 8 productive hours.
41
+
42
+ ## Delivery approach
43
+
44
+ {{Which delivery mode, and what that means for the client.}}
45
+
46
+ | Mode | Man-days | Price | Calendar |
47
+ |---|---:|---:|---:|
48
+ | Traditional delivery | | | |
49
+ | AI-assisted delivery | | | |
50
+
51
+ {{If offering an AI-assisted price, state plainly what the client is buying: the same
52
+ scope, same acceptance criteria, same warranty — delivered with a different internal
53
+ method. Do not offer a discount you cannot sustain on legacy or integration-heavy work.}}
54
+
55
+ ## Team
56
+
57
+ | Role | Involvement |
58
+ |---|---|
59
+ | | |
60
+
61
+ ## Timeline
62
+
63
+ | Phase | Duration | Deliverable |
64
+ |---|---|---|
65
+ | | | |
66
+
67
+ ## Payment milestones
68
+
69
+ | Milestone | Share | Amount |
70
+ |---|---:|---:|
71
+ | Contract signature | 30% | |
72
+ | Core delivery complete | 30% | |
73
+ | UI delivery complete | 20% | |
74
+ | Go-live | 15% | |
75
+ | 30 days post go-live | 5% | |
76
+
77
+ ## Assumptions
78
+
79
+ - {{The assumptions the price depends on. Be specific — this section is what protects
80
+ the margin when scope drifts.}}
81
+ - Acceptance testing is performed by the client; if not performed, the delivery is
82
+ deemed accepted.
83
+ - Client-side effort (workshops, validation, content authoring) is not included.
84
+
85
+ ## Not included
86
+
87
+ - {{Explicit exclusions. Cheaper to write now than to argue later.}}
88
+
89
+ ## Options
90
+
91
+ | Option | Man-days | Price |
92
+ |---|---:|---:|
93
+ | | | |
94
+
95
+ ---
96
+
97
+ *Effort is an estimate based on the scope above, produced with a use-case-point model
98
+ calibrated on delivered projects. The point price corresponds to a P{{XX}} confidence
99
+ level; the underlying range is available on request.*