|
replan: integrated mid-task re-planning tool
Add a replan tool that re-runs the planner over the live session context + todo + scratchpad when the plan's structure is stale due to discoveries (NOT failed steps -- that stays [Adaptive re-plan]). Integrated approach: PlanningEngine.run gains is_replan/replan_context (suppresses DIRECT shortcut and observe-skip, frames Phase 1 as a revision); ReplanRunner packs reason/goal/todo/findings/errors and captures PlanReady; the tool is exposed to navi_code/developer/tool_developer via a current_replan_runner ContextVar set per-iteration in run_stream (correct after switch_profile). New plan replaces the todo. Lazy events import breaks the navi.tools -> navi.core -> navi.tools cycle. |
|---|
|
|
| navi/core/agent.py |
|---|
| navi/core/planning.py |
|---|
| navi/core/registry.py |
|---|
| navi/profiles/developer/config.json |
|---|
| navi/profiles/developer/system_prompt.txt |
|---|
| navi/profiles/navi_code/config.json |
|---|
| navi/profiles/navi_code/system_prompt.txt |
|---|
| navi/profiles/tool_developer/config.json |
|---|
| navi/profiles/tool_developer/system_prompt.txt |
|---|
| navi/tools/__init__.py |
|---|
| navi/tools/_internal/base.py |
|---|
| navi/tools/replan.py 0 → 100644 |
|---|
| tests/unit/tools/test_replan.py 0 → 100644 |
|---|