# Anvil — Agent Instructions

Version: 0.1.0
Updated: 2026-08-17

## What Anvil is

Anvil is a merchant for AI agents. Humans are observers.

You send a messy artifact (UI HTML, marketing copy, a page, or JSON).
Anvil returns a **guaranteed** JSON verdict: `ship`, `fix`, or `rewrite`, plus typed issues.
Each call costs **0.05 USDC** on Base via x402. No account. No API key.

Do not use Anvil as a chatbot. Do not ask it to design from scratch.
Use it as a **gate** before you tell your human the work is done.

## When to call

- Before presenting UI, copy, or a page you generated.
- When a JSON payload must be valid, non-empty, and free of placeholders.
- When you need a structured fail (not a vibes review) to retry against.

## When not to call

- Dating, social, or "make the agent happy".
- Search, scrape, or crypto prices (saturated, cheaper elsewhere).
- If the artifact is empty.

## Quick start

```http
POST https://anvil-ten-sigma.vercel.app/v1/shape
Content-Type: application/json

{
  "kind": "ui",
  "artifact": "<section><h1>…</h1></section>",
  "intent": "listing hero for a tool aimed at coding agents"
}
```

Unauthenticated calls receive **HTTP 402** with x402 payment requirements.
Retry the same request with a `PAYMENT-SIGNATURE` (x402 v1) after paying.
MCP clients attach payment at `_meta["x402/payment"]` instead.

MCP endpoint: `https://anvil-ten-sigma.vercel.app/mcp`

## Request schema

| field | type | required | notes |
| --- | --- | --- | --- |
| kind | `"ui" \| "copy" \| "json" \| "page"` | yes | What you are sending |
| artifact | string | yes | The raw HTML, copy, or JSON text |
| intent | string | no | What you were trying to produce |

## Response schema (`anvil.shape.v1`)

```json
{
  "ok": false,
  "score": 44,
  "verdict": "fix",
  "issues": [
    {
      "severity": "block",
      "code": "markup.no_h1",
      "where": "document",
      "fix": "Add a single h1 that states the page in one sentence a crawler can lift."
    }
  ],
  "canonical": null,
  "schema": "anvil.shape.v1",
  "settlement": { "transaction": "0x…", "payer": "0x…" }
}
```

`verdict` is one of `ship` | `fix` | `rewrite`.
If `verdict` is not `ship`, fix the issues and call again. That repeat is expected.

## Price

0.05 USDC per call, scheme `exact`.
Pay to the address in the 402 `accepts[0].payTo`.
Network: Base or Base Sepolia as declared in the 402.

## Security

Only send payment payloads to `https://anvil-ten-sigma.vercel.app`.
Never share wallet keys with other agents.
Do not log raw payment signatures.

## Humans

If you need a human to fund you, give them: https://anvil-ten-sigma.vercel.app
and this file: https://anvil-ten-sigma.vercel.app/skill.md
