feat: Feature 1.3 — Prop Analysis Engine with 6-step grading pipeline

Core intelligence for BetonBLK prop analysis:
- POST /api/analyze/prop — single prop analysis
- POST /api/analyze/batch — multi-prop analysis for parlay scanner
- 6-step pipeline: season avg → recent form → situational splits →
  cross-book lines → kill conditions → grade (A/B/C/D)
- 6 kill conditions: low_minutes, small_sample, b2b_high_usage,
  blowout_risk, split_conflict, no_opponent_data
- Composite scoring with confidence (30-95), bonuses, penalties
- Added spreads market to Odds API fetch (zero extra credits)
- Full reasoning output with step-by-step breakdown

36 new tests (unit + integration), 128 total across all features

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kev
2026-03-21 11:41:18 -04:00
parent 3da1b4242c
commit c8c0962e56
16 changed files with 1560 additions and 40 deletions
+15
View File
@@ -0,0 +1,15 @@
function deltaToSignal(delta) {
const abs = Math.abs(delta);
if (abs < 0.5) return delta >= 0 ? 'neutral' : 'neutral';
if (abs < 2.0) return delta >= 0 ? 'lean' : 'lean_bearish';
if (abs < 4.0) return delta >= 0 ? 'bullish' : 'bearish';
return delta >= 0 ? 'strong_bullish' : 'strong_bearish';
}
function directedDelta(avg, line, direction) {
// For "over", positive delta is good. For "under", negative delta is good.
const raw = avg - line;
return direction === 'under' ? -raw : raw;
}
module.exports = { deltaToSignal, directedDelta };