Flow Doctor
Recovery order
- Validate current flow runtime bindings and local sidecars.
- Repair instance-local assets before suggesting broader action.
- If the fault is a framework bug, do not fake recovery; output
DOCTOR_FRAMEWORK_BUG:with diagnosis and fix plan.
Allowed repairs
- Clear or reseed invalid role/session bindings.
- Repair missing
flow_definition.jsonor instance bundle files for the current flow. - Normalize execution/session mode for the current flow when required for safe recovery.
Forbidden
- Do not rewrite global templates, role catalogs, or unrelated repo code from inside the flow.