1.8 KiB
Goal: Capex modeling including the full CostItem catalog and the IDC fixed-point solver. Critical sprint — IDC parity gate. Tasks:
S2-T01 Schema: CostItem, PhasingCurve, EquityCurve, DebtCurve, CapexConfig in engine/schemas/capex.py. S2-T02 Catalog: ~30 default CostItems in engine/catalog/cost_items.py matching the user's Excel structure (BOS subcomponents, hard cost items, soft cost items). Each with realistic 2026-level defaults. S2-T03 Catalog: phasing templates solar_standard_18mo, wind_standard_24mo, hybrid_rtc_36mo with reasonable distributions per item. S2-T04 capex/cost_items.py: function to compute total capex in INR Cr from a list of CostItems given project capacity, FX rate, etc. Each basis (PER_WP_DC, PER_MW_AC, etc.) has its own conversion. S2-T05 capex/phasing.py: validation (rows sum to 100%), template loader, custom override. S2-T06 capex/idc.py: the fixed-point IDC solver. Algorithm in PROJECT.md. Iterates until debt converges within ₹0.01 Cr. S2-T07 Test: deterministic 2-month construction with hand-computed expected IDC. Solver matches. S2-T08 Test: 36-month hybrid RTC scenario with equity bridge pattern (cum equity going to 110% then back to 100%). Solver matches. S2-T09 Test: zero debt → zero IDC. Edge case. S2-T10 CLI: remodel compute-idc --input scenario.json --output idc.json. S2-T11 PARITY GATE: load tests/fixtures/nagasamudra_inputs.json. Run IDC. Total IDC must match user's Excel within 0.5%. User to walk Sonnet through the Apr-Jun-27 negative cum equity rows if mismatch. S2-T12 Documentation: packages/engine/docs/capex.md covering CostItem model, phasing, IDC algorithm.
Definition of Done: IDC parity gate passed. Catalog has 30 items with sensible defaults. Phasing templates work. CLI runs end-to-end. ESCALATION: If IDC parity fails by >0.5% after 4 hours of debug, stop and consult Opus with the diff.