ai-code-battle/cmd
jedarden e88c108010 feat(acb-enrichment): implement AI replay enrichment service
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>
2026-05-04 02:22:28 -04:00
..
acb-api feat(api): add spam/word filter for feedback submission 2026-05-04 01:26:32 -04:00
acb-enrichment feat(acb-enrichment): implement AI replay enrichment service 2026-05-04 02:22:28 -04:00
acb-evolver fix(evolver): correct GROUP BY in island stats query 2026-04-24 07:04:37 -04:00
acb-index-builder feat(index-builder): update community hints filter for insight/idea types 2026-05-04 01:38:53 -04:00
acb-local feat(evolver): complete Phase 7 LLM-driven evolution implementation 2026-04-08 16:38:48 -04:00
acb-map-evolver feat(map-evolver): bias energy toward center, carve corridors to force contact 2026-05-03 18:56:39 -04:00
acb-mapgen Fix sin/cos math bug and add cellular automata map generation 2026-03-26 01:10:46 -04:00
acb-matchmaker fix(test): replace duration-based age check with calendar-relative anchors 2026-04-30 22:14:40 -04:00
acb-wasm feat(playlists): add playlist curation and rebuild logic per §10, with series/seasons/enrichment 2026-04-21 16:11:27 -04:00
acb-worker feat(worker): fix rating recovery default sigma value 2026-05-04 00:49:47 -04:00