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

# Edward

> The optional review path for a small set of evidence-backed Lambda-owned corrections.

Edward is an optional last-chance recovery path for a small set of Lambda-owned interpretation
problems. It does not replace CargoWise accounting decisions, deterministic reconciliation, or
support recovery.

## Entry conditions

Edward can start only when:

* the organization has AI-assisted stamping enabled
* the router classifies the failure as Edward-owned
* the immutable CargoWise capture and parsed facts are available
* the same ingress failure signature has not already used its one Edward attempt

Accountant-owned source failures and system-owned failures do not open an Edward session.

## Allowed corrections

| Class                        | Allowed changes                                                                    |
| ---------------------------- | ---------------------------------------------------------------------------------- |
| Balance or installment math  | `installment`, `lastBalance`, and `remainingBalance` for related payment documents |
| Facturapi payload conversion | The same balance fields plus bounded Lambda-owned `metadata.stampExtensions`       |

Every changed field needs an allowed evidence source, an exact value, and a reason. Evidence can
come from the raw CargoWise source, parsed CargoWise facts, the payment ledger, deterministic Lambda
math, or the Facturapi error.

## Protected facts

Edward cannot change:

* CargoWise accounting amounts or lines
* payment or document currency
* exchange rates, payment-time MXN, or `EquivalenciaDR`
* parent identity, parent SAT UUID, or document relationships
* taxes
* recipient identity or fiscal data
* payment form or payment method

It also cannot approve the same failed payload without an allowed evidence-backed change.

## Confidence and test stamp

A proposed correction must reach at least `0.95` confidence. Lower-confidence output is rejected.

Edward must run a Facturapi test stamp before any live action. A failed test returns the document to
a standard failure path.

## Live approval

Edward cannot issue a live CFDI without human approval. An eligible live proposal moves the
document to **Awaiting approval**. Approval resumes the protected live action. Denial leaves the
document unissued and records the decision.

## One attempt

Edward can run once for one ingress failure signature. Repeating the same signature routes away
from Edward and prevents an open-ended AI retry loop.
