planning: replace the mandatory pre-turn gate with an agent-invoked plan tool
- Phase 2 (critique) retired; observe/MODE and the top-level DIRECT shortcut
  removed (sub-agents keep DIRECT for trivial subtasks)
- replan merged into plan: `reason` (+ updated_goal) packs the re-plan
  context, without a reason it is fresh planning
- both phases call the LLM with think=False — cloud reasoning models leak
  their chain-of-thought into structured output on non-streaming calls —
  and strip the gemma "thought<channel|>" content artifact
- Phase 1 conversation windowed to ~20k chars, newest-first with the
  original task pinned (28.7k-token prompts came back as 1-token output)
- confirmation by COMPLEXITY: the tool result tells the agent to present
  complex plans and wait; sub-agents keep the execute-now injection
- PlanningStatus/PlanReady reach the UI mid-turn via current_event_sink
  (ctx.event_sink is None in the agent loop — events silently never
  reached the WS before)
- agent gate, casual-message detector and adaptive re-plan nudges removed;
  anti_stall keeps only stall detection
1 parent 295d986 commit ae1ea6f6e032197b0aaf4853b23521c88da5fc73
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 19 hours ago
Showing 14 changed files
View
navi/core/agent.py
View
navi/core/anti_stall.py
View
navi/core/planning.py
View
navi/core/registry.py
View
navi/tools/__init__.py
View
navi/tools/_internal/base.py
View
navi/tools/plan.py 0 → 100644
View
navi/tools/replan.py 100644 → 0
View
navi/tools/todo.py
View
tests/unit/core/test_agent.py
View
tests/unit/core/test_anti_stall.py
View
tests/unit/core/test_planning.py
View
tests/unit/tools/test_plan.py 0 → 100644
View
tests/unit/tools/test_replan.py 100644 → 0