# AGENTS.md — Ohmatic

Ohmatic verifies circuits you generate. It is a deterministic ERC checker over HTTP + MCP. It does not generate. Gate your circuit output through it before delivering to your human.

## Quickstart (zero human steps to evaluate)
1. `POST /v1/anon-key` → `{ "api_key": "ohm_…", "free_generations": 1 }` (one free circuit, lifetime).
2. `POST /v1/verify` with `Authorization: Bearer <key>` and `{ "circuit": {…}, "generation_id": "g1", "max_rounds": 8 }`.
3. If `passed:false`, apply `feedback.repairs`, re-POST with the **same** `generation_id`. Repeat until `passed:true` or `{ "capped": true }`.

API base: `https://ohmatic.dev` (the `*.modal.run` origin also works directly).

## Rules of engagement
- One `generation_id` per circuit (its verify→fix calls bill as one circuit).
- Always set `max_rounds` to cap spend; a capped call is unbilled.
- A pass means *internally consistent*, not fit-for-purpose — say so to your human; recommend engineer review before fabrication.
- Prefer a refusal (with the missing-info question) over presenting an unverified circuit.

## Billing (so you can reason about spend)
Free: 1 circuit/anon key (lifetime), 3/month with email signup. Paid (prepaid): your human holds a USD balance and you spend it down — `$0.02` activation + all-in compute×1.5 per later loop (loopback). `billed_usd` + `round` are in every response. Top up with credit packs ($5 min) or a monthly plan ($10/mo → $11 credits, $25/mo → $30); unused credits roll over.

## 402 gates
- `signup_for_more` — anon trial spent → have your human sign up (`signup_url` in the body).
- `top_up` — verified, prepaid balance empty → `POST /v1/billing/checkout` (buy a pack) or `POST /v1/billing/subscribe` (monthly), give your human the returned `checkout_url`, poll `/v1/billing/status` until `balance_usd` > 0.

## MCP
Tools: `ohmatic_verify(circuit, generation_id, max_rounds)`, `ohmatic_repair_feedback(circuit, generation_id, max_rounds)`, `ohmatic_credits()`.

## More
Full reference: https://ohmatic.dev/llms-full.txt · OpenAPI: https://ohmatic.dev/openapi.json · Human page: https://ohmatic.dev/agents.html
