Implements the Agent Self-Correction Dashboard from issue #1007:
- infrastructure/self_correction.py: SQLite-backed event logger.
Records original_intent, detected_error, correction_strategy, and
final_outcome with outcome_status (success/partial/failed) and
error_type for pattern analysis.
- timmy/agentic_loop.py: Hooks _handle_step_failure to emit a
self-correction event whenever the loop adapts or fails to adapt
a step. Uses best-effort logging (never raises).
- dashboard/routes/self_correction.py: Three endpoints:
GET /self-correction/ui - full dashboard
GET /self-correction/timeline - HTMX partial (refreshes 30 s)
GET /self-correction/patterns - HTMX partial (refreshes 60 s)
- templates/self_correction.html + two partials: timeline and
recurring-pattern table. Stats panel shows correction rate as a
progress bar.
- base.html: "SELF-CORRECT" link added to INTEL dropdown (desktop
and mobile nav).
- mission-control.css: new .sc-* component styles (no inline CSS).
- tests/unit/test_self_correction.py: 18 unit tests covering
log, get_corrections, get_patterns, get_stats. All 435 existing
tests continue to pass.
Fixes#1007
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>