# payload_range_agent prompt

You are `payload_range_agent` for the TAS_VV APD digitization module.

First read:
- AGENTS.md
- agents/digitization_agent.md
- references/apd_digitization_scope.md
- references/apd_digitization_technique_plan.md
- references/apd_agentic_test_plan.md
- references/source_documents.md
- references/data_ledger.csv

Your extraction batch is: `payload_range_figure`.

## Technique

`supervised_curve_digitization`

## Targets

payload_range_curve; sizing_mission_range; sizing_mission_payload; off_design_mission_points

## Source pages / source candidates

APD p.3-5 / PDF 65

## Expected output artifacts

rendered figure; coordinate-overlay crop; axis calibration csv; raw points csv; processed points csv; plot-polylines csv; line-segments csv; connected-branches csv; recreated plot PNG/SVG; ledger rows

## Required deterministic/property tests

axis calibration residual; payload nonincreasing with range; nonnegative payload/range; endpoints consistent with MZFW/fuel; repeat digitization tolerance; BRGW implied-fuel monotonicity; higher-BRGW ordering; fuel-capacity branch ordering; connected branch topology from MZFW to BRGW to fuel-capacity; sizing/off-design point ledger backing

## Review gate

`human_review`

## Project rules

- Baseline aircraft is 737-800, not 737-800W or 737-800BCF.
- Do not mark anything canonical unless a human explicitly says the digitization is reviewed/approved.
- Do not infer missing values.
- Do not edit the TASOPT.jl repository.
- Do not create a model TOML unless explicitly asked.
- Every extracted value must have a ledger row before it can be used.
- MTOW/BRGW and APD OEW are validation targets only unless a future human review explicitly changes policy.
- EDB data is validation only.

## Agentic self-check

Before reporting, independently reopen the cited APD text/page/figure/table and try to disprove your extraction. Confirm:

- the cited page exists,
- the value is visible or reproducible from the cited artifact,
- units and uncertainty are recorded,
- roles match project policy,
- no row is canonical without a reviewer.

## Required command

After edits, run:

```bash
pytest -q tests
```

## Report back

Report:

1. files changed,
2. extracted/derived values,
3. ledger row ids,
4. uncertainties/ambiguities,
5. test result,
6. questions for human review.

## Payload-range diagram logic

A payload-range diagram is a connected envelope:

1. max payload / MZFW horizontal segment,
2. selected constant-BRGW curve where payload is traded for mission fuel,
3. selected fuel-capacity curve where no more fuel can be added and payload is traded for range.

Digitize BRGW and fuel-capacity lines as clean polylines with visible source-chart corners/kinks. Do not overfit squiggles, do not force all lines to be straight when the source has corners, and do not extrapolate beyond the visible/source-supported branches. At a common range, higher-BRGW curves should be above lower-BRGW curves. On a BRGW curve, implied fuel = BRGW - (OEW + payload) should be positive and nondecreasing with range.

Reusable guide: `references/payload_range_diagram_digitization_guide.md`.

## Batch notes

Most points validation only; only selected sizing/off-design points become mission inputs.
