100%

Decomposition-exhausted escalation wiring

Goal

Wire the classifier into the serve loop: on decomposition_exhausted, author a fresh forward section via create-plan-inline, reshift it to next, and serve it; route mis_fit to the existing mission_reground and dependency_blocked to the existing block-wait/relocate-forward. The new route is a sibling to mission_reground_route_or_none, consumed ahead of it at roadmap.py:852-889.

Implementation sketch

forward_decomposition_escalation_or_none(plan_dir) in route_walk.py (sibling to mission_reground_route_or_none @1383). Composes the forward-section spec from gate_metric + remaining gap; authors via create_plan_runtime.api.add_sections_to_v7_plan (routing.md §3 case-(b)); then reshift_section_to_next. Consumed at roadmap.py:852-889 AHEAD of mission_reground; autopilot authoring runs grill-suppressed.

Spec references

scripts/plan_orchestrator/route_walk.py:1383 (mission_reground sibling); scripts/plan_orchestrator/roadmap.py:852-889 (consumption site); scripts/create_plan_runtime/section_add.py:add_sections_to_v7_plan; routing.md §3 case-(b); skill-control-contract.md §Autopilot Mode.

Work Items

  • Add forward_decomposition_escalation_or_none(plan_dir) -> dict | None to scripts/plan_orchestrator/route_walk.py (sibling to mission_reground_route_or_none at route_walk.py:1383). Fires ONLY on classify_terminal_exhaustion == decomposition_exhausted; returns the escalation route dict (the create-plan-inline section spec + reshift directive), else None.

  • Compose the fresh forward-section spec from the grind’s gate_metric + remaining gap (a new decomposition angle), authored via create_plan_runtime.api.add_sections_to_v7_plan (/create-plan --inline, routing.md §3 case-(b)). In autopilot the section authoring runs grill-SUPPRESSED (best-effort mission + stamped <!-- ASSUMPTION -->), NEVER AskUserQuestion (skill-control-contract §Autopilot Mode).

  • Wire the new route into roadmap.py at the mission_reground_route_or_none consumption site (roadmap.py:852-889) AHEAD of mission_reground: decomposition_exhausted -> create-plan-inline + reshift_section_to_next + serve-next; mis_fit -> EXISTING mission_reground; dependency_blocked -> EXISTING block-wait / relocate-forward. The three causes are mutually exclusive; cite the more-specific route.

  • Pytest the route selection at the route_walk + roadmap boundary: the decomposition-exhausted fixture emits the escalation next_action (new section authored + served next); the mis_fit + dependency_blocked fixtures still emit their existing routes UNCHANGED (no regression of the two preserved paths).

Fresh intel (regenerated)

{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “grind-exhaustion-forward-escalation/s-9bf7718e” }, “generated_at”: “2026-06-19T18:02:22.528956+00:00”, “graph_state”: { “head_sha”: “dbb10f0e”, “last_code_import_at”: “2026-06-19T17:39:41.692Z”, “embedding_stale”: false, “insights_stale”: true, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:grind-exhaustion-forward-escalation/s-9bf7718e] agent-authored dossier”, “degraded”: false, “dossier”: { “objective_symbols”: [], “tiers”: {}, “agent_authored”: true, “difficulty”: { “class”: “routine”, “research_online”: false, “research_mode”: “auto”, “signals”: [], “plan_dir”: “/home/eric/projects/ori_lang/plans/grind-exhaustion-forward-escalation” } } }

(full dossier: decomposition-escalation-wiring—s-9bf7718e.intel.json)