{"spec_id":"unified-agent-cli-flow-patch-on-fail","title":"Unified Agent CLI Flow: All Task Types, Patch on Verification Fail","summary":"Ensure every agent provider CLI (aider/claude, cursor, openclaw) can run the full delivery flow locally and remotely: generate spec from idea, implement a spec, run tests, review implementation against spec verification, and—when verification fails—produce enough structured information to create a patch so the next step can fix the implementation without discarding work. Optionally improve the spec’s Verification section when the verification step is ambiguous or wrong.","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-cli","process_summary":"Every executor (`claude`, `cursor`, `codex`, `gemini`) supports `spec`, `impl`, `test`, `review`, and `heal` task types ; The flow executes end-to-end (`idea -> spec -> impl -> test -> review`) for local and remote runner modes with no task-t; `review` failure output includes structured `VERIFICATION_RESULT`, `FILES_TO_CHANGE`, and `PATCH_GUIDANCE` blocks that c; On failed review, pipeline context carries patch guidance forward to the next `impl`/`heal` task without destructive tru; Review may emit `SPEC_VERIFICATION_IMPROVEMENT` when verification steps are ambiguous, so spec verification can be tight","pseudocode_summary":null,"implementation_summary":"api/scripts/run_cli_task_flow_matrix.py (unified CLI flow, PASS_FAIL contract); api/scripts/local_runner.py (local CLI execution)","created_by_contributor_id":null,"updated_by_contributor_id":null,"created_at":"2026-04-09T03:10:09.047758Z","updated_at":"2026-04-09T03:10:09.047758Z","content_path":"specs/unified-agent-cli-flow-patch-on-fail.md","content_hash":"2750194018182f12","workspace_id":"coherence-network"}