todo: add op — append steps discovered mid-task (preserve statuses)
The todo tool only had set/view/update/clear. Adding a step that surfaced
mid-task meant either 'set' (which replaces the plan and resets every status
to pending) or 'replan' (1–3 LLM calls) — both heavy for a single new step, so
the agent usually skipped recording it. Add a cheap 'add' op:

- navi/tools/todo.py: op 'add' (tasks: list[str]) appends new _Task entries to
  the end of the existing plan in pending status; existing steps and their
  statuses are untouched. Requires an existing plan (points to 'set'
  otherwise). Schema enum + op description + tool description updated.
- system_prompt.txt: tell the agent to record new subtasks with 'todo add'
  right away (not held in head, not a replan); clarify the 'small todo edit'
  line — add via 'todo add', drop/merge/reorder via 'set' (re-apply statuses).
- renderers/todo.py: TodoStartedRenderer renders the add card
  ('→ todo · add (N)') listing the new pending steps, not a JSON dump.

Tests: add appends + preserves statuses / requires existing plan / requires
tasks; renderer add card + empty-tasks. Full suite: 1005 passed, 1 skipped.
1 parent e6560c6 commit 0f7cb5b01554dacc9c8d4be75cc5f87b144c720b
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 14 Jul
Showing 5 changed files
View
clients/terminal/tui/renderers/todo.py
View
navi/profiles/navi_code/system_prompt.txt
View
navi/tools/todo.py
View
tests/clients/test_todo_renderers.py
View
tests/unit/tools/test_todo.py