Skip to content

Calculator Generation

Stas edited this page Mar 7, 2026 · 2 revisions

Don't want to depend on an LLM for arithmetic? Generate a standalone, deterministic calculator.

How It Works

Ask the skill:

Generate an estimation calculator in Python

The skill reads formulas.md and generates a single-file script that:

  1. Accepts all inputs via CLI args or stdin JSON
  2. Applies all lookup tables and formulas exactly as defined
  3. Outputs the canonical JSON with all fields
  4. Has zero external dependencies
  5. Includes --help with usage instructions

Supported Languages

Language Notes
Python Most common, works everywhere
TypeScript For Node.js/Deno projects
JavaScript Browser or Node.js
Rust Fast, single binary
Go Fast, single binary
Ruby For Ruby projects
Java Enterprise environments
C# .NET environments
Swift macOS/iOS projects
Kotlin JVM/Android projects

Example Usage (Python)

# From CLI args
python estimate.py --complexity M --task-type coding --maturity partial

# From stdin JSON
echo '{"complexity":"L","task_type":"data-migration","maturity":"exploratory"}' | python estimate.py --stdin

# With all options
python estimate.py \
  --complexity L \
  --task-type data-migration \
  --num-humans 2 \
  --num-agents 2 \
  --maturity partial \
  --risk 1.5 \
  --integration 0.25 \
  --confidence 90

Example Output

{
  "title": "",
  "complexity": "L",
  "task_type": "data-migration",
  "agent_rounds": { "min": 26, "max": 65 },
  "agent_time_minutes": { "min": 52, "max": 195 },
  "agent_effectiveness": 0.5,
  "human_review_minutes": 120,
  "human_planning_minutes": { "min": 60, "max": 180 },
  "total_minutes": { "min": 516, "max": 1185 },
  "pert_expected_minutes": 850.5,
  "pert_sd_minutes": 111.5,
  "committed_hours": { "min": 12.04, "max": 27.65 },
  "risk_level": "high",
  "warnings": ["Consider phased delivery"]
}

Why Generate Instead of Ship?

  1. Zero maintenance — the formula spec is the source of truth, not 10 scripts
  2. Always current — generated from the latest formulas.md
  3. Your language — you get exactly what your stack needs
  4. Auditable — read the generated code to verify the arithmetic

Clone this wiki locally