update_recipe · robotwin
Implementation in policy.py::dispatch_runtime. Auto-discovered by
_dispatch in rollout_runtime.py — no rollout_runtime edit required.
Edits <workdir>/../../plan.md (the atomic's plan.md) by replacing
everything between the ## Recipe heading and the next ## heading
(or EOF). Records reason to a sibling recipe_revisions.log so
operators see why the Recipe changed and which attempt triggered it.
Engineer can call this any number of times within an attempt — only
the final version persists. The current attempt's Engineer context
is not retroactively patched (that would invalidate already-issued
tool calls); the new Recipe is fully in effect from the NEXT attempt.