# Rules for coding agents in this starter

Read this before running anything. These rules are part of the setup prompt. Review downloaded code before running it. A failed or skipped step is never a pass.

## Run

- `sh start.sh`, or one step on its own: `sh start.sh payouts`, `reads`, `image` or `mcp-config`. Report what it prints. The scripts it sequences also run alone: `sh setup.sh`, `python3 check-mcp.py`, `python3 check-xochi.py`.
- A failed step prints what failed and the fix. Show both to the human, and ask before a fix that trusts or installs anything, such as `(cd raxol-agent && mise trust && mise install)`. Then rerun `sh start.sh`.
- The run needs Git, curl, Python 3, a C compiler, make, and Elixir 1.20.x on OTP 29. `start.sh` checks them and says what is missing. Ask before installing a toolchain.
- For a local MCP client, use the config `sh start.sh mcp-config` prints.

## Never

- Run `sh settle.sh` in any mode, or the Fly steps. `SETTLE.md` and `DEPLOY.md` are for the human. The coding agent stops before wallet setup, real quotes tied to user addresses, or signing.
- Provision resources or upload anything on the strength of the setup prompt or these files. Stop after local preparation of the image. Deploying it to Fly needs separate approval.
- Change a pin or the lockfile to hide a failure. If setup fails, check exact revision, OTP, lockfile and required tooling, and use a fresh project.
- Substitute an unpinned global `raxol` command, or assume stock CLI Web3 registration.
- Add credentials to make a read work. Retry later.
- Request unrestricted write access.

Keep keys, JWTs, private handles, RPC credentials and wallet authorizations out of source, prompts, logs and model context. If later needed, use a user-managed local secret store wired directly to the authorized program, never to the coding agent.

## What each step proves

- **Fixture.** The headless agent refuses 35 USDC before generating any receipt, then allows 25 USDC under the 30 USDC cap and emits a visibly mocked receipt. This tests a per-payment rule, not an account budget or execution authorization. There is no Xochi transaction in this fixture.
- **Payout round.** An editable example through a real `Raxol.Payments.Ledger`, with a per-payment cap and an in-memory session budget. Settlement is a mock: there is no signer, wallet, provider or settlement endpoint.
- **Chain reads.** First-party `Raxol.Web3.MCP.Tools` over public Blockscout for Ethereum and Base, each with two keyless public nodes behind it for when the explorer refuses (listed in `web3-mcp.exs`). A verified height or chain reference is evidence. An upstream error or timeout is not a read. The tools expose no execution or signing, and public chain reads never reveal owner-only data.
- **Xochi preview.** A wallet-free, non-persisted Base-to-Ethereum 25 USDC quote preview. Record route and `can_solve`, or the exact sanitized failure. The preview has no settlement status. To read a public intent you are authorized to inspect, run `python3 check-xochi.py --public-intent` followed by its UUID, without sharing the ID in the model transcript.
- **Image.** `sh start.sh image` builds the one-shot worker image, which has no HTTP service, and runs it with no network to confirm both fixture decisions.

## Report

Report the revision, two local fixture outcomes, MCP tool list and read, Xochi preview outcome, and local image/run result, clearly separating what actually ran from what is pending. `report.json` holds each of these:

- `failed` names the step and log of a failed run. Report that failure, not an earlier pass.
- `ran` holds only steps that left evidence. `this_run: false` means an earlier run, so say so.
- `pending` holds everything else.

Raxol source: https://github.com/DROOdotFOO/raxol-agent/tree/74c5796f33b449310e841d6325c647f6d7a83952
