{"spec_id":"attention-heuristics-pipeline-status","title":"Spec: Attention Heuristics in Pipeline-Status","summary":"Surface pipeline health signals so operators and automation can detect stuck runs, repeated failures, and low success rate without inspecting logs. The `GET /api/agent/pipeline-status` response includes an `attention` object whose flags drive alerts, Telegram summaries, and optional auto-fix (see spec 027).","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":"agent-pipeline","process_summary":"`GET /api/agent/pipeline-status` returns an `attention` object with boolean flags and a `flags` list (spec 002, 027).; Stuck: `attention.stuck` is true when there are pending tasks, no running task, and the longest pending wait time exceeds a thr; Repeated failures: `attention.repeated_failures` is true when the three most recently completed tasks (by completion order) are all failed.; Low success rate: `attention.low_success_rate` is true when metrics over the rolling window (e.g. 7 days) have at least 10 tasks and succe; Heuristic thresholds (stuck minutes, consecutive failure count, success-rate window and minimum sample) are configurable","pseudocode_summary":null,"implementation_summary":"api/app/services/agent_service_list.py (get_attention_tasks(), get_review_summary()); api/app/services/agent_service_pipeline_status.py (attention flags, status collection)","created_by_contributor_id":null,"updated_by_contributor_id":null,"created_at":"2026-04-09T03:10:08.822699Z","updated_at":"2026-04-09T03:10:08.822699Z","content_path":"specs/attention-heuristics-pipeline-status.md","content_hash":"82d0aa591b5a06b6","workspace_id":"coherence-network"}