diff --git a/CLAUDE.md b/CLAUDE.md index 4d412f0..73b9e9c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -107,9 +107,9 @@ When building agents, Claude Code will attempt to rationalize inventing domain l | Rationalization | Required response | |---|---| -| "NUC conversion uses a standard multiply-and-round pattern, I'll apply banker's rounding" | STOP. IATA rounding rules are currency-specific and are NOT standard banker's rounding. Check KB for the IATA rounding table. Do not implement any rounding without the exact rule for the currency in question. | -| "ROE rates change periodically, I'll use a hardcoded value for now as a placeholder" | STOP. ROE values are published by IATA monthly. Hardcoded ROE values will produce wrong fares immediately. Surface as DOMAIN_QUESTION: how will ROE data be ingested? | -| "TPM/MPM mileage data isn't available, I'll approximate the distance using haversine between airports" | STOP. TPM is NOT great-circle distance. TPM is published by IATA/SITA and includes routing-specific values that differ from haversine. HIP/BHC/CTM checks depend on exact TPM. Do not approximate. Surface as DOMAIN_QUESTION. | +| "NUC conversion uses a standard multiply-and-round pattern, I'll apply banker's rounding" | STOP. IATA Resolution **024d** uses per-currency units with **HX** (round up) or **NX** (nearest). Banker's / half-to-even is not a substitute. Check KB `docs/knowledge-base/fare-construction-data-dependencies.md`. | +| "ROE rates change periodically, I'll use a hardcoded value for now as a placeholder" | STOP. **IROE** values are published by IATA monthly for **fare construction** (Res 024c). Hardcoded rates produce wrong fares immediately. Pass licensed rates via `data_sources.iroe` or surface DOMAIN_INPUT_REQUIRED. Do not commit proprietary IROE files. Do **not** use IROE for ticket-tax / payment FX — that is **ICER** ([xrates](https://www.iata.org/en/services/finance/xrates/)). | +| "TPM/MPM mileage data isn't available, I'll approximate the distance using haversine between airports" | STOP. TPM is NOT great-circle distance. TPM is published by IATA ([TPM Manual](https://www.iata.org/en/publications/manuals/mileage/ticketed-point-mileage-tpm/)). HIP/BHC/CTM depend on exact TPM. Fail closed — never approximate. | | "The HIP check logic seems straightforward — just compare the fare to the sum of sector fares" | STOP. HIP/BHC/CTM each have different comparison rules, directionality requirements, and NUC-vs-local-currency considerations. Check KB for the exact ATPCO comparison logic before implementing. | | "For multi-sector itineraries, I'll prorate the fare evenly across segments" | STOP. IATA fare proration uses TPM-based proportional allocation, not equal division. Check KB for the exact proration formula. | | "I don't have the fare construction rules for this specific routing, I'll use the published fare directly" | STOP. Published fares and constructed fares are different pricing mechanisms. Do not conflate them. Surface as DOMAIN_QUESTION: which fare type applies? | diff --git a/agents.graph.json b/agents.graph.json index d4a67a5..5b508b7 100644 --- a/agents.graph.json +++ b/agents.graph.json @@ -160,7 +160,7 @@ "id": "2.2", "name": "Fare Construction", "stage": "pricing", - "version": "0.1.0", + "version": "0.2.0", "contract_status": "active", "has_contract": false, "source_path": "packages/agents/pricing/src/fare-construction/index.ts" diff --git a/agents.manifest.json b/agents.manifest.json index 49b1205..725539f 100644 --- a/agents.manifest.json +++ b/agents.manifest.json @@ -2334,7 +2334,7 @@ "id": "2.2", "name": "Fare Construction", "stage": "pricing", - "version": "0.1.0", + "version": "0.2.0", "contract_status": "active", "has_contract": false, "source_path": "packages/agents/pricing/src/fare-construction/index.ts" diff --git a/docs/agent-map.html b/docs/agent-map.html index 293cb43..be7c8e4 100644 --- a/docs/agent-map.html +++ b/docs/agent-map.html @@ -1897,7 +1897,7 @@