Instruction file imported from damiantrade84-jpg/athena-python (
.cursor/rules/parity-audit.mdc). Copyright stays with the author.
Cross-surface parity (Engine A ↔ chart ↔ backtest)
Load .agents/skills/athena-cross-surface-parity/SKILL.md and follow references/parity-checklist.md before claiming parity or finishing chart/scoring work.
Closed loop (required per invariant)
For each config-driven value (RSI/EMA/ATR period, VWAP gate, score_group, candle policy, overlay computed_at):
config → _resolve_* → server compute → API field → client read → UI label → per-group test
FAIL if an earlier hop is per-group and a later hop uses a hardcoded literal (e.g. 14, 21, 50, 200).
Never accept
- "Field is in the TypeScript interface" as proof of parity
- Green tests that compare both sides without
score_groupor only default-tier pairs - UI labels (
RSI14) that disagree with actual computation period - Client
buildChartStudySnapshotfallbacks that ignoreprice_precision.rsi_period/indicator_periods
Before merge / review complete
- Run hardcoded-period and sent-but-unused greps from the skill checklist
- Spot-check at least one non-default score group (forex RSI 18, crypto RSI 12)
- List masked tests and NOT REVIEWED surfaces in the response
- Add or cite a regression test that would fail on the TV Chart RSI-style bug
Reference incident
TV Chart sent rsi_period via price_precision but _format_chart_candles and buildChartStudySnapshot still used RSI 14 — CRITICAL drift masked by test_engine_a_crypto_chart_parity.py.