|
protocol: run a protocol as a committed plan, with a log of how it ended
A protocol was only text until now. The new `protocol` tool starts one: its steps are spliced into the session's todo plan after the agent's current position (nothing already done is reordered), a row appears in `protocol_runs` with a snapshot of the version, steps and post-checks, and the run stays `running` until it is closed. `finish` refuses while any step of the run is open, refuses outright when one failed, and requires a report — it is the run's record for the user. `cancel` and `fail` require a reason and mark the rest of the run's steps `skipped`, so the plan does not keep work that was never done. One run per session is active (a partial unique index enforces it). The commitment also has to survive the context: every model turn while a run is open carries a system reminder with the protocol, its steps and the way to close it, and the final-turn intercept now fires for an open run even when the todo shows no open steps, so a bare-text turn cannot leave one running. `protocol` is wired into assistant, developer, discuss and server_admin next to `skills`; sub-agents get neither, because a protocol belongs to the session's plan. The run log has no UI yet — `protocol(op='status')` is the current view. |
|---|
|
|
| docs/skills.md |
|---|
| docs/todo-store.md |
|---|
| docs/tools.md |
|---|
| manuals/protocol.md 0 → 100644 |
|---|
| manuals/skills.md |
|---|
| navi/core/agent.py |
|---|
| navi/core/container.py |
|---|
| navi/core/registry.py |
|---|
| navi/profiles/assistant/config.json |
|---|
| navi/profiles/developer/config.json |
|---|
| navi/profiles/discuss/config.json |
|---|
| navi/profiles/server_admin/config.json |
|---|
| navi/skills/__init__.py |
|---|
| navi/skills/runs.py 0 → 100644 |
|---|
| navi/tools/protocol.py 0 → 100644 |
|---|
| navi/tools/todo.py |
|---|
| tests/unit/skills/test_protocol_runs.py 0 → 100644 |
|---|
| tests/unit/tools/test_protocol.py 0 → 100644 |
|---|
| tests/unit/tools/test_todo.py |
|---|