> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pome.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# pome doctor

> Check the agent-to-twin wiring before you spend a run on it.

`pome doctor` checks that your agent is wired to a digital twin and not to a real
service. It takes no arguments and no flags.

`pome run` runs these same checks first and refuses to start if any of them fail,
so the doctor is the gate rather than an optional pre-flight. There is no
`--force`.

## Usage

```bash theme={"dark"}
pome doctor
```

## The four checks

The doctor runs them in order and stops at the first failure.

| # | Check    | What a failure means                                                                                                |
| - | -------- | ------------------------------------------------------------------------------------------------------------------- |
| 1 | Manifest | No `pome.json` (or `pome.yaml`) was found, or it does not validate.                                                 |
| 2 | Twin     | The local twin did not boot, or booted and did not serve.                                                           |
| 3 | Routing  | Your agent's requests went somewhere other than the twin — usually a production host still hardcoded in the source. |
| 4 | Egress   | The deny-by-default egress floor is not active, so the agent could reach the network past the twin.                 |

On failure the doctor prints one named cause, with a `file:line` where it can
know one, and one concrete fix. It then exits non-zero. On success it exits `0`.

## Why routing and egress are separate checks

A run whose agent quietly talks to the real API produces a trace that looks
complete and grades nothing meaningful. Check 3 catches the address; check 4
catches everything else the agent might reach. Both have to hold before a score
means anything.

## Examples

```bash theme={"dark"}
# Before the first run in a repo
pome doctor

# Gate a script on clean wiring
pome doctor && pome run tasks/
```

## See also

* [`pome run`](./run) — runs these checks first.
* [`pome init`](./init) — writes the manifest check 1 looks for.
