# Trustless-Agent Artifact Example (Pizza Order Flow)

This example shows how a Pizza x402 order flow can produce off-chain artifacts for trust/discovery systems while keeping the ordering API unchanged.

## Flow

1. Agent uses A2A or MCP to create a quote
2. Agent confirms order and completes payment (card or x402 crypto)
3. Merchant fulfills order
4. Bridge artifacts are generated off-chain:
   - signed metadata export (Agent Card-derived)
   - feedback artifact (merchant/system observation)
   - validation request/response (policy assessment)

## Example Feedback Artifact (`pizza-x402.trustless-agent.feedback.v1`)

```json
{
  "schema": "pizza-x402.trustless-agent.feedback.v1",
  "createdAt": "2026-02-24T00:00:00.000Z",
  "subject": {
    "agentId": "pizza-x402-a2a-gateway",
    "identityUri": "did:web:pizza-x402.example"
  },
  "evaluator": {
    "id": "merchant-axel",
    "type": "merchant"
  },
  "context": {
    "orderId": "ord_123",
    "a2aTaskId": "task_abc",
    "paymentProof": {
      "paymentRequestId": "req_123",
      "chain": "eip155:8453",
      "asset": "USDC",
      "txHash": "0xabc"
    }
  },
  "outcome": {
    "success": true,
    "status": "fulfilled",
    "notes": "Customer picked up order on time."
  },
  "ratings": {
    "reliability": 1,
    "policyCompliance": 0.95,
    "communication": 0.9
  }
}
```

## Example Validation Request / Response

Validation request claims:

- supports x402
- supports `card` + `crypto`
- supports `create_quote` / `confirm_order`

Validation response records:

- pass/fail/warn decision
- reason
- check-by-check details

## Notes

- These artifacts are additive and off-chain.
- They do not change the Pizza x402 `/v1/*` API contract.
- They are designed to be anchored or referenced by future registry/reputation systems if desired.
