diff --git a/navi/profiles/discuss/system_prompt.txt b/navi/profiles/discuss/system_prompt.txt index 4ceff49..6f6c80c 100644 --- a/navi/profiles/discuss/system_prompt.txt +++ b/navi/profiles/discuss/system_prompt.txt @@ -24,7 +24,7 @@ Use `reflect` when the user brings a genuinely complex question or idea worth examining from multiple angles. Run it proactively — don't wait to be asked. -Use `memory_search` at the start of a conversation to recall relevant context about the user. Save notable preferences, interests, or decisions with `memory_save`. +Use `memory(action="search")` when relevant context about the user would help. Save notable preferences, interests, or decisions with `memory(action="save")`. ## Tone diff --git a/navi/profiles/server_admin/system_prompt.txt b/navi/profiles/server_admin/system_prompt.txt index 56ea4ab..da0f77c 100644 --- a/navi/profiles/server_admin/system_prompt.txt +++ b/navi/profiles/server_admin/system_prompt.txt @@ -13,7 +13,7 @@ ### Delegation strategy - **One sub-agent per host** — each remote host gets its own agent with full credentials and a scoped task. - **One sub-agent per concern** — logs, metrics, config audit, security scan, service health: each is a separate agent. -- **Parallel where independent** — if two hosts or two concerns don't depend on each other, spawn them in sequence but treat results independently; note in todo which can run without waiting for each other. +- **Isolate independent work** — if two hosts or two concerns don't depend on each other, delegate them as separate scoped sub-agent steps and treat results independently. ### Spawning rule — no exceptions @@ -21,7 +21,7 @@ Additional mandatory triggers — no exceptions: - Any operation on a remote host → always spawn (ssh_exec inside a sub-agent keeps your context clean). -- Any diagnostic requiring more than 2 commands → spawn. +- Any diagnostic requiring 3 or more commands → spawn. - Any task producing large output (logs, directory trees, process lists) → spawn. - Any concern cleanly separable from others → spawn. diff --git a/navi/profiles/tool_developer/system_prompt.txt b/navi/profiles/tool_developer/system_prompt.txt index 8eeaec4..52e9971 100644 --- a/navi/profiles/tool_developer/system_prompt.txt +++ b/navi/profiles/tool_developer/system_prompt.txt @@ -15,7 +15,7 @@ ### Spawn a sub-agent for implementation when - New tool requires external API, significant logic, or multiple files. - The write+debug loop would likely take 10+ tool calls — delegate the full implementation to a sub-agent with a precise spec, then you verify the result. -- Use `developer` profile for implementation sub-agents — they get `write_tool` and know the tool format. +- Use `tool_developer` profile for implementation sub-agents — they get `write_tool`, `test_tool`, and know the tool format. ### Spawn a sub-agent for research when - Exploring an external API or an unfamiliar codebase before writing code. @@ -45,7 +45,7 @@ 2. **Check conflicts** — `filesystem(action="list", path="tools/")` to see existing tools. 3. **Write** — `write_tool(name="", code="...")` to create the file. Never use `filesystem` for initial creation — `write_tool` validates the format and registers the tool automatically. 4. **Test immediately** — `test_tool(tool_name="", params={...})`. - If it fails: use `filesystem(action="edit", ...)` or `filesystem(action="query", ...)` to locate and fix the error, then test again. Never skip this step. + If it fails: use `filesystem(action="query", ...)` to locate the issue, then `filesystem(action="smart_edit", ...)` or `filesystem(action="write", ...)` to fix it, then test again. Never skip this step. 5. **Reload** — `reload_tools()` only after test_tool passes. 6. **Enable** — add tool name to `enabled_tools` in the relevant profile `config.json` files if not already added by `write_tool`. 7. **Report** — what was created, what it does, which profiles it's in. diff --git a/navi/tools/spawn_agent.py b/navi/tools/spawn_agent.py index 614d0d0..be89415 100644 --- a/navi/tools/spawn_agent.py +++ b/navi/tools/spawn_agent.py @@ -23,7 +23,7 @@ "SYNCHRONOUS — blocks until the sub-agent fully completes. " "There is no background process and no continuation.\n\n" "USER CANNOT SEE sub-agent output — synthesise findings into your own response.\n\n" - "USE when a step requires 2+ tool calls to complete as a single logical unit.\n" + "USE when a step requires 3+ tool calls to complete as a single logical unit.\n" "DO NOT USE for a single tool call — call the tool directly.\n\n" ) parameters = {