MeridiansMeridians

0. The model (run it)

Source path: knowledge-base/knowledge/product/economics/unit-economics/01-0-the-model-run-it.md

# 0. The model (run it)

Every number in this doc is computed — not hand-typed — by the runnable model at
**[`src/lib/core/economics/unit-economics.ts`](../../../../../src/lib/core/economics/unit-economics.ts)**. It pulls LLM
prices from `constants.ts` and models every other service price, every per-action token profile,
the credit pricing model, and the per-scenario P&L as **tunable inputs**, so the whole business
re-models by changing one number.

```bash
npm run economics          # full report: per-action table + futures + packaging
npm run economics:charts   # render PNG charts + insights.md → knowledge-base/insights/economics/
# or: npx tsx src/lib/core/economics/unit-economics.ts          (text report)
#     npx tsx src/lib/core/economics/unit-economics.ts --json    (machine-readable snapshot)
```

**Visualisations.** [`scripts/insights/economics-insights.py`](../../../../../scripts/insights/economics-insights.py) (matplotlib, same house
style as `repo-insights.py`) consumes **both** models' JSON snapshots — so charts can never drift from the
numbers — and renders into `knowledge-base/insights/economics/`.

```bash
npm run economics:charts                                  # both models
python3 scripts/insights/economics-insights.py --only constellation # just §3b–3e
python3 scripts/insights/economics-insights.py --only unit          # just the operator/margin model
```

*From `unit-economics.ts --json`:* `summary.png`, `action-cogs.png`, `operator-economics.png`,
`operator-take.png`, `subscriber-sweep.png`, `research-portfolio.png`, `firecrawl-plans.png`,
plus `insights.md`.

*From `constellation-economics.ts` (§3b–3e):*

| Chart | Answers |
|---|---|
| `cost-levers.png` | Which knob moves the bill — and which two are free |
| `program-stages.png` | Weekly spend by stage, with the Watch-only line the Operations readout reports |
| `firecrawl-cliff.png` | Where the plan ladder steps, against domain count |
| `portfolio-concentration.png` | How much of a lopsided constellation one member carries |
| `onboarding-vs-running.png` | Activation vs one week of running, by size |
| `persona-spend.png` | What each persona's seeded Constellation costs |
| `fleet-profiles.png` | The ~4× profile dial |

plus `constellation-insights.md` (headlines + the lever, persona, and size/plan tables).

Import the pure functions anywhere: `actionCogs`, `actionCredits`, `usageCogs`, `scenarioPnL`,
`renderReport`. Change `DEFAULT_SERVICE_PRICES`, `DEFAULT_PRICING_MODEL` (markup / credit unit),
the `ACTIONS` token profiles, or the `USAGE_*` / `FUTURES` to re-run. The tables below are the
output of that model at its current defaults (markup 3×, 1 MC = $0.001, Firecrawl Growth tier,
OpenRouter 5.5% credit fee included in every LLM line).

---
Open on GitHub

Raw Markdown source