# Invoice field schema

A reusable skill the "Turn invoice PDFs into ledger entries" recipe pulls in. Add it once and every agent on the team can use it.

Define the exact fields every invoice extraction must produce, so both
passes and the ledger post agree on structure.

## Method
1. List the required fields: vendor name, invoice amount, invoice
   date, PO number, line items (description, quantity, unit price).
2. Specify the expected type and format for each field (currency, ISO
   date, string).
3. Mark which fields are required versus optional per invoice type.
4. Reject any extraction pass missing a required field — do not fill
   it with a guess.
5. Version the schema so a schema change doesn't silently break past
   comparisons.

## Rules
- Every field a downstream step depends on (amount, PO number) is
  required, not optional.
- Never invent a value for a missing required field — flag the
  invoice as incomplete instead.
- Field list and formats (set on first run, then stored in memory).
- Normalize currency and date formats before any comparison; never
  compare raw, unformatted text.

## Output
A field spec — `{vendor, amount, date, po_number, line_items[]}` —
that every extraction pass and the ledger post conform to.
