Commit graph

13 commits

Author SHA1 Message Date
jedarden
45e4131dd3 Add accessibility focus indicators (Phase 10)
- Add :focus-visible styles for all interactive elements (buttons, links, inputs)
- Add skip link for screen reader navigation ("Skip to main content")
- Add high contrast focus enhancement for prefers-contrast: more
- Update PROGRESS.md with keyboard shortcuts and focus indicator details

Phase 10 accessibility suite now complete with WCAG 2.1 focus-visible compliance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 07:12:11 -04:00
jedarden
217b3ce51d Add public match data documentation page (Phase 10)
- New /docs/api route with OpenAPI-style endpoint documentation
- Documents all Pages endpoints (leaderboard, bots, matches, playlists, blog)
- Documents R2 endpoints (live evolution, replays, thumbnails, cards)
- Documents B2 endpoints (cold archive for all data)
- Includes JSON Schema for replay format
- Recommended fetching pattern with R2-then-B2 fallback
- Cache behavior documentation for each endpoint type
- Added link from Getting Started page to API Reference

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 05:20:09 -04:00
jedarden
1523c52e0a Add R2 upload for live evolution observatory (Phase 10)
- Add R2 client module (cmd/acb-evolver/internal/live/r2.go) with
  S3-compatible uploads to Cloudflare R2
- UploadLiveJSON() uploads evolution state to evolution/live.json
  with Cache-Control: max-age=10 for near-real-time updates
- Add -r2 and -r2-only flags to live-export subcommand
- Add tests for R2 config validation and credential handling
- Update frontend to fetch live data from R2 URL instead of Pages

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 04:53:35 -04:00
jedarden
c07eb1f2eb Add blog infrastructure for weekly meta reports (Phase 10)
- Add blog generation to Go index builder (cmd/acb-index-builder/blog.go):
  - Weekly meta report generation with competitive analysis
  - Story arc chronicles: rise stories, upsets, rivalries
  - Blog index and individual post JSON generation

- Add blog page to web SPA (web/src/pages/blog.ts):
  - Blog listing with type filters (all/meta-report/chronicle)
  - Individual post view with markdown rendering
  - Tag cloud and post metadata display
  - Added /blog and /blog/:slug routes

- Add Blog link to navigation menu

- Add placeholder blog data files for initial content

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 04:39:12 -04:00
jedarden
1d02831f1c Add accessibility suite to replay viewer (Phase 10)
- Paul Tol color-blind safe palette (8 distinct colors)
- Player shapes: circle, square, triangle, diamond, pentagon, hexagon
- High contrast mode (brighter colors, darker walls)
- Reduced motion support (auto-detect prefers-reduced-motion)
- Accessibility controls UI in replay page
- Evolution fields added to BotProfile interface

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 04:03:19 -04:00
jedarden
88a5893f66 Add bot profile cards with Open Graph support (Phase 9 complete)
- Add Canvas-rendered PNG card generation in cmd/acb-index-builder/cards.go
  - 1200x630 images for social sharing (OG/Twitter)
  - Rating tiers with color coding (gold/silver/bronze/green/gray)
  - Win rate color coding (green/blue/yellow/red)
  - Rank badges for top 100 bots
  - Evolved bot badges with island indicator
- Add card upload to R2 warm cache and B2 cold archive
- Add Open Graph meta tags in web/app.html
- Add dynamic OG tag management in web/src/og-tags.ts
- Update bot profile page to set OG tags on load
- Add BuildTimeout config field (fixes test failures)
- Add comprehensive tests for card generation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 03:30:46 -04:00
jedarden
804e31798f Add Phase 9 features: embeddable replay widget and playlists
Embeddable Replay Widget:
- web/embed.html: Minimal standalone HTML with Open Graph and Twitter Card tags
- web/src/embed.ts: TypeScript embed viewer with auto-play, progress bar, keyboard controls
- R2 warm cache + B2 cold archive fallback for replay loading
- ~7KB gzipped (well under 50KB target)

Replay Playlists:
- cmd/acb-indexer/src/playlists.ts: Auto-curated playlist generator
  - Featured, upsets, comebacks, domination, close games, long games, weekly categories
  - Uses match data to detect notable games
- web/src/pages/playlists.ts: SPA page for browsing playlists
- web/src/api-types.ts: Added playlist types and fetch functions

Other changes:
- web/src/replay-viewer.ts: Added getIsPlaying() method for embed viewer
- web/vite.config.ts: Added embed.html as build entry point
- web/app.html: Added Playlists nav link
- web/public/img/embed-placeholder.svg: OG image placeholder

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 02:03:45 -04:00
jedarden
f5d7553f98 Add Phase 7-9 features: evolution dashboard, WASM sandbox, enhanced replay
Phase 7 Evolution:
- Add live-export subcommand to acb-evolver for dashboard JSON generation
- Export programs, stats, and generation log to live.json

Phase 8 Enhanced Features:
- Add WASM game engine build (cmd/acb-wasm/) with JS bindings
- Add in-browser sandbox page with Monaco editor (web/src/pages/sandbox.ts)
- Add win probability computation (web/src/win-probability.ts)
- Add replay commentary generator (web/src/commentary.ts)
- Add clip maker for GIF/MP4 export (web/src/pages/clip-maker.ts)
- Add rivalry detection and pages (web/src/pages/rivalries.ts)
- Add replay feedback system (web/src/pages/feedback.ts)
- Add evolution dashboard page (web/src/pages/evolution.ts)

Phase 9 Platform Depth:
- Add predictions API (cmd/acb-api/predictions.go)
- Add series management API (cmd/acb-api/series.go)
- Add seasons API (cmd/acb-api/seasons.go)
- Add narrative generator for rivalries (cmd/acb-indexer/src/narrative.ts)

Engine Updates:
- Add debug field to move response schema
- Add match event timeline extraction
- Add replay enrichment fields

Web Updates:
- Update app.html navigation for new pages
- Add API client methods for predictions, series, seasons
- Export engine types for browser use

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 01:13:23 -04:00
jedarden
be41af831f Fix R2 custom domain in pages.json to match project spec
Update r2_data URL from data.aicodebattle.com to r2.aicodebattle.com
to match the planned R2 bucket custom domain in the project plan.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 22:10:37 -04:00
jedarden
259b9de86a Add Kubernetes manifests for ArgoCD GitOps deployment
Create deploy/k8s/ directory with complete K8s manifests for the
ai-code-battle namespace on apexalgo-iad cluster:

- Namespace and ArgoCD Application (auto-sync, prune, self-heal)
- Match worker Deployment (2 replicas, metrics on :9090)
- Index builder Deployment (Recreate strategy)
- 6 strategy bot Deployments (random, gatherer, rusher, guardian, swarm, hunter)
- ClusterIP Services for all bots (cluster DNS resolution)
- SealedSecret templates (API key, R2 creds, bot secrets, Cloudflare token)
- All containers from forgejo.ardenone.com/ai-code-battle/ registry
- Health/readiness probes and resource limits on all deployments

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 00:57:48 -04:00
jedarden
d936bc2f62 Complete Phase 5: Add Cloudflare Pages deployment configuration
- Add web/pages.json documenting Pages project settings and data paths
- Add web/public/_headers for cache control on static assets
- Add web/public/robots.txt for SEO
- Add web/public/data/ placeholder structure for index files
  - leaderboard.json
  - bots/index.json
  - matches/index.json
- Update PROGRESS.md marking Phase 5 complete

Phase 5 is now complete. Ready for Phase 6 (Deployment & Production).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 09:31:35 -04:00
jedarden
6f1cbbcad2 Start Phase 5: Add SPA web platform with routing and pages
- Create app.html as SPA shell with navigation header and dark theme
- Add hash-based router (router.ts) for client-side navigation
- Implement page components:
  - Home page with hero section and feature overview
  - Leaderboard with ranking table and status indicators
  - Match history with match cards and participant info
  - Bot directory with bot cards sorted by rating
  - Bot profile with stats, rating sparkline chart, and recent matches
  - Registration form with API key display
  - Replay viewer (integrated from Phase 3)
  - Docs/Getting Started page with protocol overview
- Add API client (api-types.ts) for fetching data from Worker API
- Update vite.config.ts for multi-page build (index.html + app.html)
- Update PROGRESS.md with Phase 5 status and exit criteria

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 09:14:15 -04:00
jedarden
4f77980398 Complete Phase 3: TypeScript Canvas replay viewer
- Add web/ directory with TypeScript + Vite build tooling
- Implement ReplayViewer class with Canvas-based grid rendering
- Add play/pause, scrub, and speed controls with keyboard shortcuts
- Implement fog of war perspective toggle per player
- Add score overlay with player names, scores, and energy
- Support loading replays from local file or URL
- Add match info panel and event log display

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 07:30:04 -04:00