Back to Developer Logs

Build Log — February 9, 2026

Build Log — February 9, 2026

Context / Focus for Today

Two major threads: shipped the Mission Control multi-agent dashboard, and gave the AI Coach the ability to actually adapt training plans based on recovery data. Plus a monster refactoring session that carved up the monolithic TrainingCalendarApp into clean, testable hooks.


Things I Got Done Today

Mission Control Dashboard

The internal Mission Control dashboard is live — evolving the existing /planning kanban into a 3-panel coordination hub.

  • PR #310 feat: Mission Control dashboard — multi-agent coordination layer
  • 3-panel layout: agent sidebar (left) | kanban board (center) | live activity feed (right)
  • Stats header showing agent count, active tasks, completed today
  • 4 new Supabase tables: mc_agents, mc_activity, mc_comments, mc_notifications
  • Activity logger: every agent API action (create, claim, complete, etc.) automatically logged
  • Real-time activity feed via Supabase postgres_changes subscriptions
  • Agent registry with status tracking, heartbeat monitoring, current task display
  • Collapsible side panels with toggle buttons
  • Clawdbot seeded as first agent (Squad Lead role)
  • fix: enable realtime for mc_activity table — required for live feed updates

adapt_plan Tool + Proactive Recovery Coaching

The AI Coach can now modify existing training plans based on real recovery data — not just advise, but actually execute changes.

  • PR #313 feat: adapt_plan tool + proactive recovery coaching
  • New tool: adapt_plan({ weeksAhead, scope, aggressiveness }) — evaluates upcoming workouts against Garmin recovery metrics (Body Battery, HRV, sleep, stress) and compliance data, then applies modifications server-side
  • Returns structured before/after diff: what changed, why, what was left alone
  • Proactive coaching: when recovery data indicates high-priority adaptations, the coach surfaces them without being asked
  • test: integration tests for adapt_plan handler
  • This closes the gap between our landing page promise ("Training that adapts") and reality

Goal-Derived Pace Integration

When athletes set a goal time, the entire training plan now uses accurate paces.

  • PR #308 fix: update structured_data paces with goal-derived values — workout intervals now use VDOT-calculated paces instead of generic zone estimates
  • PR #309 feat: update user profile pace zones when goal time is set — setting a marathon goal automatically recalculates all training pace zones
  • fix: add target and workoutDays guidance to generate_training_plan system prompt — the AI now knows about these critical optional parameters

Codebase Refactor — Death to Dead Code

Massive cleanup session. Removed 20+ dead modules, extracted monolithic components into composable hooks.

  • refactor: extract handleSend workout processing into lib/ai modules
  • refactor: extract shared coach context building into reusable module
  • refactor: consolidate grouped health processors with factory pattern
  • refactor: extract workout CRUD handlers into useWorkoutCrud hook
  • refactor: extract Garmin integration handlers into useGarminHandlers hook
  • refactor: consolidate raw table upsert processors with factory pattern
  • refactor: deduplicate intent detection between coach routes
  • refactor: extract coach route utility functions into lib/ai modules
  • refactor: replace fetch boilerplate with useFetchData hook
  • refactor: extract metrics state and handlers into useMetrics hook
  • refactor: extract events state and handlers into useEvents hook
  • refactor: extract workout deletion logic into useWorkoutDeletion hook
  • refactor: deduplicate coach route context builders into lib/ai/context
  • refactor: extract VDOT calculations to lib/training
  • refactor: consolidate modal state in TrainingCalendarApp
  • refactor: remove dead FIT export routes and unused validation pipeline
  • refactor: delete 6 dead files and remove unused exports across 8 modules
  • refactor: remove dead code and deduplicate safeUUID across codebase
  • refactor: consolidate Supabase client creation and shared patterns
  • chore: remove dead code and unused dependencies
  • chore: remove unused imports and dead constants

Triathlon Support

  • PR #307 feat: add triathlon option to onboarding survey and settings
  • fix: add triathlon entry to goalBasedWorkoutTemplates — triathlon users now get appropriate starter workouts

UX Polish

  • feat: add undo button for AI coach bulk workout deletions — safety net when clearing workouts
  • feat: redesign SyncMenu dropdown as compact accordion — cleaner integration management
  • feat: add email OTP to landing page modal — passwordless login option visible pre-auth
  • fix: improve delete_workouts guidance in AI system prompt — better handling of "clear all" intent
  • fix: improve JSON fallback parser for AI Coach workout display — more reliable rendering for non-tool-calling models
  • fix: show actual Garmin last sync time from platform_sync_state — accurate sync timestamps
  • Hide Plans, Import, Dashboard in production; rename Build Log to Developer Logs — cleaner nav for end users

Commits Today

  • 3 PRs merged (#307, #308, #309, #310, #313)
  • Major: Mission Control multi-agent dashboard
  • Major: adapt_plan tool with recovery-based coaching
  • Major: 20+ refactoring commits decomposing TrainingCalendarApp
  • Feature: Goal-derived pace zone integration
  • Feature: Triathlon onboarding support

Notes / Observations

  • Mission Control is the coordination layer we needed. With the kanban, activity feed, and agent registry in one view, it's now possible to see what Clawdbot is working on in real-time. The real-time Supabase subscriptions make the feed feel alive — activities appear as they happen, no polling needed.
  • adapt_plan is the feature that makes the landing page honest. We've been saying "training that adapts" but until today, the coach could only suggest changes. Now it can pull recovery data, evaluate the plan, and actually modify workouts — all in one tool call. Server-side logic means it's deterministic, not dependent on the LLM chaining 3+ calls correctly.
  • The refactor was overdue. TrainingCalendarApp was a 2,000+ line monolith with everything stuffed in one file. Extracting into useWorkoutCrud, useMetrics, useEvents, useGarminHandlers, etc. makes each piece testable and the main component readable. The factory pattern for health processors eliminated a ton of copy-paste.
  • Goal time → paces flow is now seamless. Set a 2:57 marathon goal → VDOT calculates your zones → every generated workout uses those paces in structured_data → export to Garmin watch with accurate targets. End-to-end.

Momentum Score: 10 / 10

One of the biggest days yet. Mission Control, adapt_plan, and the refactor each would have been a solid day's work on their own. Getting all three done (plus triathlon support, UX polish, and goal-derived paces) is exceptional output. The codebase is cleaner, the product is smarter, and the internal tooling is real.