AI Bot Pipeline Plan
Coach observations become an auditable SPI score, a SCAN archetype, and a development-first IDP narrative — then feed back into lesson planning. AI observes and narrates · deterministic code scores and rolls up · every score explainable and auditable.
1 What The Pipeline Does
The pipeline turns coach observations — typed notes or sampled video frames — into an auditable SPI score, a SCAN archetype, and a development-first IDP narrative, then feeds the result back into lesson planning. Every system prompt states the source precedence (U.S. Soccer first, then the SCAN Scouting Guide, then SCAN material) and holds a development-first stance.
| Bot | Audience | Job |
|---|---|---|
| Scout Bot | Coach | Converts observations into SPI pillar signals, SCAN traits, archetype, and IDP narrative (Individual & Team). |
| Coach Bot / Practice Designer | Coach | Generates timed sessions mapped to SPI pillars and the Four Moments — the lesson plans and guided questions. |
| Mentor Bot | Player | Multi-turn GROW / LEAD chat coach for confidence and resilience. |
| Technique Check | Both | Checks one technique against the Technical Skills Manual (Preparation → Contact → Follow-Through). |
| AI Personal Trainer | Player | Generates weekly individual programs from SPI inputs; credits work to the Leaderboard. |
2 The Core Scoring Loop
This is the make-or-break loop. It enforces the separation of concerns: the AI never touches the math.
// AI returns ONLY this shape — no prose, no math, no invented stats. { "player_ref": { "jersey":7, "color":"navy", "identifiable":true, "confidence":0.0-1.0 }, "pillar_signals": { "MOVE":0-1, "MASTER":0-1, "THINK":0-1, "LEAD":0-1, "GROW":0-1 }, "scan_traits": { "self_belief":0-5, "courage":0-5, "awareness":0-5, "never_quit":0-5 }, "growth_trend": -1 | 0 | +1, "evidence": [ "short observable phrase", ... ], "moment_tags": [ "AttackOrg" | "Att>Def" | "DefOrg" | "Def>Att", ... ], "footage_sufficient": true | false }
3 Why This Architecture
Explainable
Each pillar score links to an evidence phrase and a deterministic conversion — a coach can always see why a number is what it is.
Vision-cautious
On video, the bot judges per-frame whether the target player (jersey + colour) is identifiable, keeps confidence low when frames are few, and says when footage was insufficient. It never guesses attribution.
Framework-aligned
Every system prompt states the precedence — U.S. Soccer first, then SCAN Scouting Guide, then SCAN material — and the development-first stance.
Production-mirroring
The browser demo samples video client-side and stubs R2 storage + Batch vision calls, behaving like the production Diagnostics pipeline (Cloudflare R2, Batch API for ~50% cost reduction stacking with prompt caching).
Nothing else negotiates this boundary.
4 SCAN AI Coach Diagnostics — Build Sequence
The team-level diagnostic platform: coaches upload footage, the AI analyzes across the Four Game Moments, and the system returns a prioritized, editable coaching action plan. Architecture is resolved — vision-only in v1, Cloudflare R2 for object storage, Batch API for async processing. Layered build pattern: standalone HTML demo → schema → API.
Immediate open items
- Step 3 — single-segment vision call with strict JSON schema (validates the whole vision loop).
- Wire the JWKS RSA JWT verifier into the
coach_sub()stub insuite-api.php. - Human review of Mentor Bot's distress-redirection language before go-live.
Deferred to v2
5 How The Pipeline Feeds Lesson Planning
The loop closes here: Scout Bot output becomes Coach Bot input.
| Signal | Drives |
|---|---|
| Lowest pillar | Becomes the next block's focus. If a player or group reads low on MASTER, the Practice Designer weights the next sessions toward technique-under-pressure for that age group. |
| Archetype | Drives differentiation. Archetypes flag who needs a confidence-building emphasis vs. a tactical-stretch challenge inside the same session. |
| Growth trend | Shapes language. A positive trend tells the coach which brave attempts to keep rewarding in the reflection block. |
| Guided-question answers | Become scouting evidence. A high-order answer acted out in the game becomes a THINK / LEAD signal; a brave response after a mistake becomes a GROW signal. |