{"spec_id":"auto-heal-from-diagnostics","title":"Auto-Heal from Diagnostics","summary":"**Idea**: `agent-auto-heal` (sub-idea of `coherence-network-agent-pipeline`)","potential_value":0.0,"actual_value":1.0,"estimated_cost":0.0,"actual_cost":1.0,"value_gap":0.0,"cost_gap":1.0,"estimated_roi":0.0,"actual_roi":1.0,"idea_id":"pipeline-reliability","process_summary":"Heal strategy map: Define a mapping from each error category to a heal strategy: `{category: {direction_template, executor_hint, max_retrie; Auto-heal trigger: `maybe_create_heal_task(failed_task: dict) -> dict | None` inspects a failed task, classifies its error, checks cooldown; Cooldown & retry guard: Do not create a heal task if: (a) the failed task already has a heal task (check `context.heal_task_id`), (b) the origin; Heal task context: Created heal tasks include in `context`: `{source_task_id, error_category, error_summary, retry_count, strategy_name}` f; Auto-heal stats endpoint: `GET /api/agent/auto-heal/stats` returns `{total_failed, heals_created, heal_rate, by_category: {category: {failed, heal","pseudocode_summary":null,"implementation_summary":"api/app/services/auto_heal_service.py (HEAL_STRATEGIES, generate_heal_task()); api/app/routers/agent_auto_heal_routes.py (heal task endpoints); api/app/services/agent_service_task_derive.py (heal task derivation)","created_by_contributor_id":null,"updated_by_contributor_id":null,"created_at":"2026-04-09T03:10:08.827226Z","updated_at":"2026-04-09T03:10:08.827226Z","content_path":"specs/auto-heal-from-diagnostics.md","content_hash":"195bf568e43150d4","workspace_id":"coherence-network"}