100%

Bug-Serve Symmetry

Goal

Make “bugs are plans” mechanically true for the matrix: the coordinate-heal serve hop must reach the /fix-bug // /fix-next-bug serve path, not only /continue-roadmap.

Implementation Sketch

The serve PRIMITIVE (route_walk.serve_next_v7) is already shared, but serve-envelope ENRICHMENT is two parallel paths: roadmap._enrich_route_envelope_for_execution (which wires coordinate_heal at roadmap.py:637-661) and fix_bug._walk_dispatch (which wires intel_heal/dead_ends/intel_reground/ design_consult/ledger_evolution_advisory but NOT coordinate_heal). The SSOT-correct fix mirrors the proven attach_ledger_evolution_advisory shape: a shared route_walk.attach_coordinate_heal(env, plan_dir, ...) helper wrapping the existing coordinate_heal_target gate + coordinate_heal_directive builder, called from BOTH orchestrators (collapse the roadmap inline block; add the missing fix_bug call site).

Spec References

  • scripts/plan_orchestrator/route_walk.py (attach_ledger_evolution_advisory prior art), roadmap.py:542,637-661, fix_bug.py:_walk_dispatch, coordinate_heal_dispatch.py.
  • .claude/rules/learning-ledger.md §9 consumption contract (/fix-bug + /continue-roadmap).
  • Tests in scripts/plan_orchestrator/tests/.

Work Items

  • Add the shared route_walk.attach_coordinate_heal(env, plan_dir, *, scratch, section_id, next_skill_arg) helper mirroring attach_ledger_evolution_advisory; export it in route_walk.all.
  • Collapse the roadmap-only inline coordinate-heal block (roadmap.py:637-661) into a call to the shared helper.
  • Add the matching call site in fix_bug._walk_dispatch (mirror its intel_heal/design_consult attaches) so bug serves get the hop.
  • Pin in scripts/plan_orchestrator/tests/: a no-taxonomy BUG plan serve envelope carries coordinate_heal, at parity with the plan serve envelope.

Fresh intel (regenerated)

{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “ledger-matrix-replacement/s-1f104a06” }, “generated_at”: “2026-06-30T02:37:44.196849+00:00”, “graph_state”: { “head_sha”: “4ba25ed0”, “last_code_import_at”: “2026-06-30T02:33:22.399Z”, “embedding_stale”: false, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:ledger-matrix-replacement/s-1f104a06] agent-authored dossier”, “degraded”: false, “dossier”: { “objective_symbols”: [], “tiers”: {}, “agent_authored”: true, “constrained_symbols”: [ “maybe_emit_coordinate_heal_dispatch”, “assemble_corpus” ], “difficulty”: { “class”: “routine”, “research_online”: false, “research_mode”: “auto”, “signals”: [], “plan_dir”: “/home/eric/projects/ori_lang/plans/ledger-matrix-replacement” } } }

(full dossier: bug-serve-symmetry—s-1f104a06.intel.json)