Skip to content

mbuske/dev-cost-estimator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dev-cost-estimator

npm CI license: MIT node

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 run

Requires 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.
  • rateScenarioslow/base/high { label, eurPerPd }.
  • cocomoII, functionPoints, slocBenchmark, storyPoints.spToPersonDays — model parameters.
  • functionPointscounts: {...} (any stack) or extract: {...} (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.

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors