|
| 1 | +# Odds ML Orchestration (Claude Code Team) |
| 2 | + |
| 3 | +This repository is used to maintain an orchestrated pipeline for **sports odds statistical research and ML predictions** (spreads, moneylines, totals) with a strict **rolling 5-day freshness window**. |
| 4 | + |
| 5 | +## Non-negotiables |
| 6 | + |
| 7 | +- **Freshness SLO**: all datasets used for training and prediction must be derived from the last **5 days** of collected data. If inputs are stale, the pipeline must fail fast and trigger backfill. |
| 8 | +- **Canonical markets**: |
| 9 | + - **Spreads**: store **one canonical value per game** (favorite perspective OR `spread_magnitude` + `favorite_team`). Never average ±spread rows. |
| 10 | + - **Totals**: store **one canonical total** per game (not separate over/under rows). |
| 11 | + - **Moneylines**: convert American odds to **implied probability** for aggregation and ML. |
| 12 | + |
| 13 | +See the project rules in `./.claude/rules/` for details. |
| 14 | + |
| 15 | +## Repeatable Agent Team Template (copy/paste prompt) |
| 16 | + |
| 17 | +Create an agent team for odds pipeline maintenance with these teammates and responsibilities. Require plan approval before implementing any schema or workflow changes. Put the lead into delegate mode after spawning. |
| 18 | + |
| 19 | +- **TeamLead (delegate mode)**: coordination only, creates tasks, assigns owners, synthesizes results. |
| 20 | +- **CollectorEngineer**: web scraping + API collectors, rate limits, idempotency, retries/backfills. |
| 21 | +- **NormalizationSteward**: canonicalization of spreads/totals/moneylines; dedupe; invariants/tests. |
| 22 | +- **DataFreshnessSRE**: rolling 5-day window enforcement; staleness detection; alerting/escalation. |
| 23 | +- **MLTrainerEngineer**: feature views; training; evaluation; prediction artifacts. |
| 24 | +- **CostQuotaAnalyst (optional)**: API credit/usage budgeting; schedule optimization. |
| 25 | + |
| 26 | +Approval criteria for TeamLead: |
| 27 | +- Reject any plan that changes market sign conventions. |
| 28 | +- Reject any plan that allows stale inputs to silently pass. |
| 29 | +- Reject any plan that introduces non-idempotent collectors. |
| 30 | + |
| 31 | +## Operational contract (GitHub Actions) |
| 32 | + |
| 33 | +GitHub Actions runs the scheduled pipeline. The code must support: |
| 34 | +- **Collect** → **Normalize/Validate** → **Train** → **Predict/Report** → **Freshness Guard** |
| 35 | +- Bounded backfill on staleness (5-day lookback). |
| 36 | + |
0 commit comments