[claude] Agent Self-Correction Dashboard (#1007) #1269
Reference in New Issue
Block a user
Delete Branch "claude/issue-1007"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1007
What this adds
src/infrastructure/self_correction.pySQLite-backed logger for self-correction events. Records
original_intent,detected_error,correction_strategy,final_outcome,outcome_status(success/partial/failed), anderror_typefor pattern analysis. Exposeslog_self_correction(),get_corrections(),get_patterns(), andget_stats().src/timmy/agentic_loop.pyHooks
_handle_step_failureto emit a self-correction event whenever the loop adapts (or fails to adapt) a step. Uses best-effort logging — never raises.src/dashboard/routes/self_correction.pyThree endpoints:
GET /self-correction/ui— full dashboardGET /self-correction/timeline— HTMX partial (auto-refreshes every 30 s)GET /self-correction/patterns— HTMX partial (auto-refreshes every 60 s)Templates
self_correction.html— main page with stats panel + correction rate progress barpartials/self_correction_timeline.html— timeline of events with status badgespartials/self_correction_patterns.html— recurring failure pattern tableNavigation
SELF-CORRECTlink added to the INTEL dropdown (desktop and mobile nav).CSS
New
.sc-*component styles appended tomission-control.css(no inline CSS).Tests
18 unit tests in
tests/unit/test_self_correction.pycovering all four public functions. All 435 existing tests continue to pass.