Implements the acb-enrichment service (plan §13.3) that generates AI commentary for featured matches. Key features: - LLM client (OpenAI/Anthropic API compatible) - Replay fetch from B2/R2 storage - Structured commentary output (key_moments array with turn, description, significance, tags) - Rate limiting to control LLM costs - Match selection based on: - Minimum turn count - Win probability crossings - Upset threshold - Close finishes Components: - cmd/acb-enrichment/main.go - service entry point - cmd/acb-enrichment/config.go - configuration from env vars - cmd/acb-enrichment/service.go - orchestration logic - internal/db/store.go - database access for match selection - internal/llm/client.go - OpenAI-compatible LLM client - internal/selector/selector.go - match selection with priority - internal/generator/generator.go - commentary generation - internal/storage/client.go - S3-compatible storage client - Dockerfile - container image - manifests/acb-enrichment-deployment.yml - K8s deployment - metrics/metrics.go - Prometheus metrics for enrichment Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| metrics.go | ||
| metrics_test.go | ||