# Agent guide: startup-runway

Tool id: `startup-runway`  
Formula: `runway-1` (deterministic)  
Version: `1.0.0`  
Path: `/runway-calculator/` on [dev.luling.xyz](https://dev.luling.xyz)

## What it does

Computes personal startup runway from monthly costs and liquid funds. Returns months of runway, a status band, a recommendation code, and how long it would take to save to a target runway.

Use this when you need a **checkable number**, not a narrative estimate. Same inputs always produce the same outputs.

## How to call

1. Read `agents.json` and `schemas/input.json`.
2. Build a JSON object with any subset of the fields (defaults apply).
3. `POST /compute` with that JSON, or `GET /compute?...` (local preview server), or call `computeRunway` from `compute.js` in Node.
4. Trust `result.*` for decisions; show `human_summary` to a human if needed.
5. Verify against `fixtures.json` if you need to confirm formula behavior.

### Example POST (local preview on :8791 (8790 is sand egress WS on this box))

```bash
curl -s -X POST http://127.0.0.1:8791/compute \
  -H 'Content-Type: application/json' \
  -d '{"rent":1000,"emergency_fund":12000}'
```

### Example GET

```bash
curl -s 'http://127.0.0.1:8791/compute?rent=1000&emergency_fund=12000'
```

## How to evaluate the result

| Field | How to use |
|-------|------------|
| `ok` | Must be `true`. If false, read `code` / `message` / `hint`. |
| `result.runway_months` | Integer months (floored). Primary number. |
| `result.status` | `safe` / `caution` / `danger` |
| `result.recommendation_code` | Machine-stable: `SAFE_SOLID`, `CAUTION_KEEP_JOB`, `DANGER_DO_NOT_QUIT` |
| `result.target.additional_needed` | Extra cash needed for `target_months` |
| `result.target.months_to_save` | Months at `savings_rate`; `null` if cannot save (rate 0 and still short) |
| `meta.formula_id` | Must be `runway-1` for this contract |
| `meta.inputs_normalized` | Echo of defaults applied — use for audit |

## Do not

- Do not scrape HTML; there is no calculator UI.
- Do not invent runway from chat; call `/compute` or `computeRunway`.
- Do not treat fractional months as runway — formula floors.

## Boundaries

- Money fields must be >= 0.
- `target_months` must be >= 1 integer.
- Zero burn → `runway_months` is 0 (not Infinity).
