dev-cost-estimator
v0.1.1
Published
Generic, zero-dependency CLI to estimate classical development cost of any git repo and compare it to an AI-assisted build cost.
Downloads
314
Maintainers
Readme
dev-cost-estimator
Zero-dependency CLI that estimates the classical (human) development cost of any git repository — using four triangulated models (COCOMO II, Function Points, SLOC×benchmark, Story-Points) — and compares it to an actual AI-assisted build cost. Language-agnostic.
Usage
# from inside a repo (no install)
npx dev-cost-estimator init # scaffold .costmodel.json
npx dev-cost-estimator run # estimate -> prints REPORT.md, writes .costmodel/
# or against another path
npx dev-cost-estimator run --target /path/to/repo --out /tmp/report
# install globally
npm i -g dev-cost-estimator && dev-cost-estimator runRequires Node ≥ 20 and a git target repo. No runtime dependencies.
Example output
## Comparison (vs classical all-code, base rate)
| Metric | Value |
|-----------------------------------|---------------------:|
| Classical (base) | €1.169.370 |
| AI-assisted (token+orchestration) | €12.400 |
| Savings | €1.156.970 (98.9%) |
| €/SLOC (classical) | €43 |The AI figures are your inputs (set the ai block in .costmodel.json); with the defaults
they are 0, so "Savings" trivially shows 100% until you fill them in.
Configuration (.costmodel.json)
Lives in the target repo; deep-merges over built-in defaults. Key fields:
segments[]—{ id, label, paths[] (prefixes), storyPoints? }. First-match-wins; unmatched code is pro-rata-allocated. No config → single "whole repo" segment.rateScenarios—low/base/high{ label, eurPerPd }.cocomoII,functionPoints,slocBenchmark,storyPoints.spToPersonDays— model parameters.functionPoints—counts: {...}(any stack) orextract: {...}(regex/globs; defaults fit Node/Express/Prisma) or omit → FP model skipped.ai—{ estTotalTokensMillions, eurPerMillionTokensBlended, orchestrationHours, orchestrationEurPerHour, subscriptionEurPerMonth, calendarMonths, calendarWeeks }.languages— extension→profile overrides (cstyle|hash|dash|fallback).include/exclude— path prefixes;testPatterns— regex marking test files.
See .costmodel.example.json.
Output
Writes <target>/.costmodel/{size.json,results.json,REPORT.md} (override with --out) and
prints the report to stdout.
Caveats
SLOC and FP auto-extraction are heuristics; the model expresses uncertainty via a model spread and a low/base/high rate band. It measures development replacement cost, not product value, and the AI figure still assumes a skilled operator.
Docs
- docs/METHODOLOGY.md — detailed explanation of every method and calculation: the four models with formulas + default parameters, triangulation, the € band, the AI-cost lenses, integrity checks, a worked example, and limitations.
