{"spec_id":"pipeline-observability-and-auto-review","title":"... 13 more in Requirements section below","summary":"Enable measurement, optimization, and self-improvement of the agent pipeline. Capture execution metrics, success rates, usage per task; support A/B testing of prompts, skills, and models; and add automated review of queue, priorities, pipeline health, specs, implementation, and testing. Supports goal tracking and auto-scheduling of improvements.","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":"Execution time: Per-task duration in agent_runner logs and task log footer (done: `duration_seconds` in task log); Task success rate: Aggregate completed vs failed by task_type, model, executor; store in metrics (JSON/SQLite); Usage per task: Token/cost proxy or API call count per task (when providers expose it); Pipeline metrics endpoint: `GET /api/agent/metrics` returning execution time P50/P95, success rate, usage summary; Prompt variants: Support `context.prompt_variant` or prompt ID in task; log which variant was used","pseudocode_summary":null,"implementation_summary":"api/app/services/agent_execution_metrics.py (resolve_cost_controls(), attribution_values_from_output()); api/app/services/agent_execution_hooks.py (register_lifecycle_hook(), dispatch_lifecycle_event()); api/app/routers/agent_status_routes.py (pipeline status endpoints)","created_by_contributor_id":null,"updated_by_contributor_id":null,"created_at":"2026-04-09T03:10:08.984193Z","updated_at":"2026-04-09T03:10:08.984193Z","content_path":"specs/pipeline-observability-and-auto-review.md","content_hash":"7c94f18012f1c047","workspace_id":"coherence-network"}