Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
title: "ADR-0011: Pure Dispatcher (4 Tools)" slug: adr-0011-router-pure-dispatcher diataxis: adr status: active owner: maintainers last_reviewed: 2026-07-13 phase: 5 audience: developer
ADR-0011 — Main Dodaios is a Pure Dispatcher with EXACTLY four tools
Status: Amended 2026-07-13 Phase: Persona refactor §3 — routing fix
Context
The probe-drift inventory (docs/persona-research.md section 1) showed that 6 of 10 smalltalk inputs to voice_e2e_probe produced empty outputs — the main-Dodaios brain (Grok-4.1-fast or Gemini-2.5-flash as the router tier) reflexively issued spawn_sub_jarvis as a tool call. Cause: ROUTER_TOOLS in factory.py contained eleven tools (open-app, type-text, run-shell, search-web, screen-snapshot, remember, whoami, multi-spawn, spawn-sub-jarvis, plus hotkey/click from earlier work), while the ROUTER system prompt (router.py:9) explicitly promised only four (run_shell, screenshot, multi_spawn, spawn_sub_jarvis).
That was the source of the drift:
- The LLM had too many direct-action options.
- The ROUTER prompt commanded "when in doubt, SPAWN" — so the brain chose the spawn reflex even for trivial smalltalk.
- The force-spawn heuristic (
_FORCE_SPAWN_RE) covered only repair verbs (umsetz/reparier/fix/implementier/refactor/debug) — notlies,baue,installiere,öffne,mach,zeig.
Master plan §22 specifies: four router tools (screen_snapshot, multi_spawn, spawn_sub_jarvis + the existing run_shell). The code reality (11 tools) contradicts the spec.
Decision
Main Dodaios = Pure Dispatcher. Reduce ROUTER_TOOLS to exactly four, load the deterministic force-spawn heuristic from config, and add a ROUTER-DISCIPLINE prompt section.
1. ROUTER_TOOLS reduction
# dodaios/brain/factory.py
ROUTER_TOOLS = frozenset({
"run-shell",
"screen-snapshot",
"multi-spawn",
"spawn-sub-jarvis",
})
Direct actions outside these four (open_app, type_text, search_web, remember, whoami) belong in the Dodaios-Agent tier — the router delegates them via spawn_sub_jarvis.
2. Deterministic force-spawn heuristic
BrainManager._should_force_sub_jarvis(text) runs in generate() BEFORE the LLM tool-use loop. Three regex patterns from BrainRoutingConfig:
spawn_verbs: 30+ action verbs (DE+EN). Match → spawn (except the smalltalk allowlist).external_system_markers:pr/prs/issue/repo/github/gitlab/branch. Match → spawn (except the smalltalk allowlist).smalltalk_allowlist: Wins over verb/marker.hallo/danke/wie geht/hauptstadt/etc. → NEVER spawn.
Configurable via [brain.routing] in jarvis.toml; defaults from BrainRoutingConfig (Pydantic).
3. ROUTER-DISCIPLINE prompt
Directly after SCREEN-CONTEXT in router.py:SYSTEM_PROMPT:
ROUTER DISCIPLINE (Haiku-Tier — Persona-Mandat Phase 3)
Du bist der Dispatcher. Du planst nicht, paraphrasierst nicht, zerlegst nicht.
- Bei Smalltalk, einfachen Fakten oder allem in 1-2 Saetzen Beantwortbaren:
antworte DIREKT ohne Tool-Call.
- Bei allem, was Datei-Zugriff, Code-Ausfuehrung, Computer-Use, Multi-Step-Planung
oder externe Recherche erfordert: rufe spawn_sub_jarvis mit der User-Utterance
VERBATIM auf (nicht zusammenfassen, nicht umformulieren).
SPAWN-CRITERIA — rufe spawn_sub_jarvis auf, WENN:
• Verb deutet auf Datei-/Code-/System-Aktion
• Request erwaehnt eine Datei, ein Projekt oder ein externes System
• Multi-Step-Anweisung
• Recherche, Analyse, Vergleich
DO-NOT-SPAWN — antworte direkt, WENN:
• Greeting, Smalltalk, Faktenfrage aus dem Gedaechtnis
• Klarfrage an den User
• Status-Bestaetigung
4. D9 recursion guard (unchanged, now explicitly tested)
spawn-sub-jarvis must NEVER land in SUB_TOOLS — a Dodaios-Agent cannot recursively spawn new Dodaios-Agent instances. Master plan §6 D9. Test: test_spawn_sub_jarvis_only_in_router_tools.
Consequences
- Smalltalk latency back under 1 s first token. 5 smalltalk turns spawn 0 subprocesses (deterministically verified by tests:
test_smalltalk_dispatches_zero_spawn_calls× 5). - Spawn behavior is configurable. The user can adjust the verb list, markers, and allowlist in
jarvis.tomlwithout a code edit. - Code matches master plan §22. Router tool set 1:1 as specified.
- Master-plan conflict resolved. Before: the plan says 4 tools, the code loads 11. Now consistent.
- Known verb gaps (e.g. rare DE conjugations like
läufst, or technical-jargon verbs likemigriere/provisioniere) → are caught by the LLM tool choice, not by the deterministic heuristic. Acceptable. - The brain decides on ambiguity. When neither the allowlist nor a verb/marker match fires, the brain falls back on its own tool choice. With the ROUTER-DISCIPLINE prompt section the LLM is appropriately instructed, but not 100 % deterministic.
Alternatives Considered
- A third tier between
routerandsub_jarvis(e.g. "router-light" for direct actions): the complexity cost (three tier configs, three tool sets, cross-tier promotion logic) without a clear gain — two tiers suffice when the router is a pure dispatcher. Rejected. - Force-spawn heuristic as an LLM routing call (Sonnet-4.6 as a pre-classifier): an extra 200 ms latency per turn, non-deterministic. JARVIS_REFACTOR_PLAN.md had proposed this — see
docs/persona-research.mdsection 5.2. Rejected in favor of the faster regex heuristic. - No tool set on the router at all (only
spawn_sub_jarvisas the sole tool): kills direct actions likescreen_snapshot("What do you see on my screen?") that the router itself should be able to answer. Rejected.
Subsequent Phase-7/8 Extensions
Status: Amendment 2026-04-28 Rationale: The code has evolved past the 2026-04-25 accepted state; ROUTER_TOOLS has two additional entries plus three dynamically loaded self-mod tools. This section documents the evolution so future reviewers do not read the appearance of drift as a violation.
What changed since 2026-04-25
# dodaios/brain/factory.py (Stand 2026-04-28)
ROUTER_TOOLS = frozenset({
# Mandat-Phase-3 Baseline (Master-Plan §22, 4 Tools)
"run-shell",
"screen-snapshot",
"multi-spawn",
"spawn-sub-jarvis",
# Phase-5-Endstand (re-introduziert):
"dispatch-to-harness",
# Phase 8.4 (Quality-Gate-Pipeline):
"dispatch-with-review",
})
# Plus drei nicht-entry_points-Tools, direkt im _load_tools_for_tier
# registriert (Phase 7.3 / Plan §AD-2 — Hauptjarvis-only Self-Mod):
SELF_MOD_TOOL_NAMES_ROUTER = frozenset({
"list_mutable_settings",
"get_config_value",
"set_config_value",
})
Rationale per extension
| Tool | Phase | Rationale | Recursion guard? |
|---|---|---|---|
dispatch-to-harness |
5 (final state) | Main Dodaios needs the direct harness path without Dodaios-Agent spawn latency. Use case: the user asks "What do you see on the screen?" → Main Dodaios calls screen-snapshot and immediately dispatch-to-harness with the observation output to a coding harness, without triggering the 30-min-hard-cap Dodaios-Agent spawn. |
n/a — the tool is not self-recursive. |
dispatch-with-review |
8.4 (Plan §6.4 quality-gate pipeline) | Main Dodaios calls the review pipeline explicitly. The pipeline worker IS itself a Dodaios-Agent-equivalent construct; if a Dodaios-Agent could in turn call dispatch-with-review, it would spawn the pipeline worker, which is again a Dodaios-Agent → a recursion vector analogous to spawn-sub-jarvis. |
Yes — SUB_TOOLS does not contain the tool. Test: test_recursive_tools_only_in_router (tests/unit/brain/test_routing.py). |
list_mutable_settings, get_config_value, set_config_value |
7.3 (Plan §AD-2 self-mod) | Setting mutation may only be triggered by the main-Dodaios tier. A Dodaios-Agent worker (Opus 4.7) would carry too high a privilege-escalation potential. The tools are registered directly in the loader (not via entry_points), so an accidental sub-tier activation through entry_points discovery is ruled out. | Yes — the tools are hardcoded main-Dodaios-only. |
What does NOT break the mandate-spirit guarantees
- Pure Dispatcher is preserved: none of the Phase-7/8 tools is a direct action from the user's point of view (
open_app,type_text,search_web,remember,whoamiremain sub-tier-only). The two dispatch tools are meta-tools (they delegate to a worker), and the three self-mod tools are trivial state mutations. - The deterministic force-spawn heuristic is unchanged:
_should_force_sub_jarvisstill triggers on verb/marker and respects the smalltalk allowlist. - The D9 recursion guard was extended rather than weakened: two tools instead of one (
spawn-sub-jarvis+dispatch-with-review) are explicitly excluded fromSUB_TOOLS. - 5 smalltalk inputs spawn 0 subprocesses — the test
test_smalltalk_dispatches_zero_spawn_calls × 5is still green.
When the appearance of drift becomes a real violation
- A direct action migrates into
ROUTER_TOOLS(e.g.open-app). → Mandate violation; the ROUTER would again know direct actions, which we already had on 2026-04-23. - A recursion-vector tool migrates into
SUB_TOOLS. → D9 violation; a Dodaios-Agent could recursively spawn. _should_force_sub_jarvisis replaced by an LLM pre-classifier. → ADR-0011 "Alternatives Considered" explicitly rejected this; a code re-introduction would be worth a new ADR.
If none of these three points occurs, the extension of the tool set is by definition within the pure-dispatcher corridor.
Amendment 2026-05-24 — CLI-Integration (cli-tools)
Status: Amendment 2026-05-24
Phase: CLI-Integration (docs/superpowers/specs/2026-05-24-cli-integration-design.md)
What changed
ROUTER_TOOLS gains one entry: cli-tools.
# dodaios/brain/factory.py (Stand 2026-05-24)
ROUTER_TOOLS = frozenset({
..., # unchanged Phase-3/5/7/8/Awareness/B5 set
"cli-tools", # NEW — virtual CLI loader
})
cli-tools is a virtual loader (dodaios/clis/loader.py:CliToolLoader,
is_virtual_loader=True). The _load_tools_for_tier expansion path
(factory.py) recognises it and replaces the single entry with one
cli_<name> tool per connected & usable CLI (cli_gcloud, cli_gh,
cli_docker, …). Only connected CLIs become tools, so the router's tool
surface stays small (typically 1-5), not all 20 catalogued CLIs.
Why it belongs in ROUTER_TOOLS (and nowhere else)
The first integration attempt placed CLI tools only in the legacy full-brain's
active_tools set, reachable solely via JARVIS_BRAIN=legacy. The production
path (build_default_brain → _phase2_full_brain("router") →
_load_tools_for_tier("router")) filters entry-points against ROUTER_TOOLS,
which did not contain cli-tools — so the default voice/chat brain never saw a
single cli_<name> tool. Adding cli-tools to ROUTER_TOOLS is the fix.
| Tool | Phase | Rationale | Recursion guard? |
|---|---|---|---|
cli-tools |
CLI integration | Each expanded cli_<name> tool is a direct, safety-gated action (the user wants "list my GCP projects" answered, not delegated to a 30-min worker spawn). It is the MCP/plugin model for command-line tools. Per-CLI risk patterns (spec.risk.{whitelist,blacklist}_patterns) flow into the RiskTierEvaluator via make_cli_patterns_fn. |
n/a as a recursion vector — a cli_<name> tool runs a subprocess, it cannot spawn the supervisor. It is router-tier only and never enters any worker tool-set (AP-5/AP-14); the deleted Dodaios-Agent tier / SUB_TOOLS cannot re-acquire it. |
Pure-Dispatcher spirit is preserved
A cli_<name> tool is not a generic direct-action like open_app/type_text
(those stay off the router by design). It is a gated external-system call
with a declared binary, declared risk tier, and per-CLI allow/deny patterns —
architecturally the same shape as the existing dispatch-to-harness
meta-action: the router calls it directly instead of forcing a Dodaios-Agent spawn,
avoiding the spawn-latency tax for read-only CLI queries.
Live-reload contract
Connecting/disconnecting a CLI in the UI publishes BrainToolsChanged (derived
from CliStatusChanged at the registry chokepoint), which the live
BrainManager.refresh_tools() consumes to re-expand cli-tools — no restart.
Both the brain (via CliToolLoader.expand()) and the safety layer (via
make_cli_patterns_fn) resolve the SAME shared registry
(dodaios.clis.shared.get_active_registry), eliminating the split-brain bug.
Regression guards
tests/unit/brain/test_routing.py::test_cli_tools_in_router_toolstests/unit/brain/test_routing.py::test_router_tools_stays_frozensettests/unit/brain/test_routing.py::test_no_spawn_tool_leaked_into_worker_settests/unit/brain/test_routing.py::test_router_tools_is_pure_dispatcher_set(exact-match set updated to includecli-tools)tests/integration/test_cli_integration.py(loader expand wired into a built router brain; live-reload re-expand onBrainToolsChanged)
Amendment 2026-05-29 — Computer-Use Router Tool (computer-use)
Status: Amendment 2026-05-29
Phase: Computer-Use rework Wave 1 (~/.claude/plans/goofy-singing-piglet.md)
What changed
ROUTER_TOOLS gains a thirteenth entry: computer-use. It is a first-class,
clearly-described tool the router calls to drive the user's live desktop
(open apps, click, type, scroll, operate any GUI). Implementation:
dodaios/plugins/tool/computer_use_tool.py:ComputerUseTool (LLM-facing name
computer_use), wired in dodaios/brain/factory.py:_load_tools_for_tier with the
shared HarnessManager. It delegates to the in-process computer-use harness
(dodaios/plugins/harness/computer_use.py → screenshot_only_loop.py).
Why it was needed (the bug)
The router previously had no honest path for live-desktop actions:
spawn-workerruns a worker in an isolated git worktree — it can edit code and research, but it can never touch the user's live desktop.- The router prompt told the model to reach the computer-use harness through the
two-level
dispatch_to_harness(harness="computer-use", …)indirection — but that tool's schema description only mentions "OpenClaw, Codex, code-editing, research" (pre-rename wording). LLMs select tools primarily by their description, so the model never picked it for desktop actions. For "Öffne ein neues Terminal für mich, starte darin Cloud-Konfiguration" Gemini invented a non-existent tool (terminal_count) and the anti-silence guard spoke a refusal (tool_use_loop.py:407-423; live log 2026-05-29 12:55:41).
A dedicated tool with an unambiguous name + description is the strongest signal
for LLM tool selection and removes the fragile indirection. The router prompt
(router.py:SYSTEM_PROMPT) was updated to route every on-screen/app/GUI action
to computer_use and to explicitly state that spawn_worker cannot touch the
desktop.
Why it belongs in ROUTER_TOOLS (and nowhere else)
computer-use is a direct, safety-gated action: every individual click /
type / key inside the loop is gated through the ToolExecutor risk tiers
(ADR-0008). It is not a spawn — it cannot re-enter the supervisor, so it
carries no D9 recursion risk and never enters a worker tool-set (AP-5/AP-14).
It is router-tier only; the deleted Dodaios-Agent tier / SUB_TOOLS cannot
re-acquire it.
Regression guards
tests/unit/brain/test_routing.py::test_computer_use_in_router_toolstests/unit/brain/test_routing.py::test_computer_use_tool_is_not_a_spawn_in_local_action_settests/unit/brain/test_routing.py::test_router_tools_is_pure_dispatcher_set(exact-match set updated to includecomputer-use)tests/unit/plugins/tool/test_computer_use_tool.py(identity, schema, dispatch to thecomputer-useharness, empty-goal rejection)
Amendment: Profile-Write Router Tool (update-profile, 2026-05-30)
ROUTER_TOOLS gains update-profile — a deterministic, brain-driven writer
for the structured user profile (data/workspace/USER.md, the five clusters
identity/communication/work_style/values/relationship).
Why a tool, and why router-tier
The Desktop App "Knowledge matrix" and the per-turn system prompt both read the
structured profile (UserProfile.render_for_prompt() is injected in
manager.py:_build_system_prompt on every turn). The legacy background
Curator that used to auto-write those clusters is soft-disabled since
2026-05-17 ([memory.legacy_curator] enabled = false) to avoid the "two
diverging notebooks" drift with the WikiCurator. The active WikiCurator only
writes free-form wiki prose — it never touches the structured clusters.
Result: durable personal facts the user states ("call me Boss", "switch to
German") never reached the structured profile, so the matrix froze and the brain
stopped learning structured facts even though it still loaded the (stale)
profile each turn.
update-profile closes that gap without resurrecting a parallel background
extractor (which would re-introduce the drift + a per-turn LLM cost on the
€5-VPS baseline). The brain persists a fact only when it consciously calls the
tool — exactly the wiki-ingest precedent, one tier up the structure ladder.
Why it belongs in ROUTER_TOOLS (and nowhere else)
It is a direct, deterministic write (no LLM, no spawn). It is tiered
monitor: a real side effect (writes USER.md) that runs without a confirmation
prompt (anti-confirmation-fatigue) but is logged for audit — identical reasoning
to wiki-ingest. It cannot re-enter the supervisor, so it carries no D9
recursion risk and never enters a worker tool-set (AP-5/AP-14). It mutates the
same live UserProfile instance the BrainManager renders from (the factory
passes one instance to both _load_tools_for_tier and the manager), so the next
turn's system prompt reflects the change with no cache-invalidation, and it emits
ProfileUpdated so the Desktop matrix live-updates.
The exact-match ROUTER_TOOLS assertion's "no open_app/whoami" rule is
unchanged: those are delegatable direct actions. update-profile is a
sanctioned write tool with its own ADR entry, the same exception class as
wiki-ingest.
Regression guards
tests/unit/brain/test_routing.py::test_update_profile_in_router_toolstests/unit/brain/test_routing.py::test_factory_wires_update_profile_tool_into_router_settests/unit/brain/test_routing.py::test_router_tools_is_pure_dispatcher_set(exact-match set updated to includeupdate-profile)tests/unit/brain/test_routing.py::test_system_prompt_includes_profile_write_directive_when_tool_wired…_omits_profile_directive_when_tool_absent
tests/unit/plugins/tool/test_profile_update.py(set/append/dedupe, canonical field allow-list, do-not-record privacy gate, ProfileUpdated emit, missing profile fallback)
Verweise
ROUTER_TOOLS gains update-profile — a deterministic, brain-driven writer
for the structured user profile (data/workspace/USER.md, the five clusters
identity/communication/work_style/values/relationship).
Why a tool, and why router-tier
The Desktop App "Knowledge matrix" and the per-turn system prompt both read the
structured profile (UserProfile.render_for_prompt() is injected in
manager.py:_build_system_prompt on every turn). The legacy background
Curator that used to auto-write those clusters is soft-disabled since
2026-05-17 ([memory.legacy_curator] enabled = false) to avoid the "two
diverging notebooks" drift with the WikiCurator. The active WikiCurator only
writes free-form wiki prose — it never touches the structured clusters.
Result: durable personal facts the user states ("call me Boss", "switch to
German") never reached the structured profile, so the matrix froze and the brain
stopped learning structured facts even though it still loaded the (stale)
profile each turn.
update-profile closes that gap without resurrecting a parallel background
extractor (which would re-introduce the drift + a per-turn LLM cost on the
€5-VPS baseline). The brain persists a fact only when it consciously calls the
tool — exactly the wiki-ingest precedent, one tier up the structure ladder.
Why it belongs in ROUTER_TOOLS (and nowhere else)
It is a direct, deterministic write (no LLM, no spawn). It is tiered
monitor: a real side effect (writes USER.md) that runs without a confirmation
prompt (anti-confirmation-fatigue) but is logged for audit — identical reasoning
to wiki-ingest. It cannot re-enter the supervisor, so it carries no D9
recursion risk and never enters a worker tool-set (AP-5/AP-14). It mutates the
same live UserProfile instance the BrainManager renders from (the factory
passes one instance to both _load_tools_for_tier and the manager), so the next
turn's system prompt reflects the change with no cache-invalidation, and it emits
ProfileUpdated so the Desktop matrix live-updates.
The exact-match ROUTER_TOOLS assertion's "no open_app/whoami" rule is
unchanged: those are delegatable direct actions. update-profile is a
sanctioned write tool with its own ADR entry, the same exception class as
wiki-ingest.
Regression guards
tests/unit/brain/test_routing.py::test_update_profile_in_router_toolstests/unit/brain/test_routing.py::test_factory_wires_update_profile_tool_into_router_settests/unit/brain/test_routing.py::test_router_tools_is_pure_dispatcher_set(exact-match set updated to includeupdate-profile)tests/unit/brain/test_routing.py::test_system_prompt_includes_profile_write_directive_when_tool_wired…_omits_profile_directive_when_tool_absent
tests/unit/plugins/tool/test_profile_update.py(set/append/dedupe, canonical field allow-list, do-not-record privacy gate, ProfileUpdated emit, missing profile fallback)
References
- Implementation:
dodaios/brain/factory.py:ROUTER_TOOLS+SELF_MOD_TOOL_NAMES_ROUTER,dodaios/brain/manager.py:_should_force_sub_jarvis,dodaios/brain/router.py:SYSTEM_PROMPT. - Config:
dodaios/core/config.py:BrainRoutingConfig,jarvis.toml:[brain.routing]. - Tests:
tests/unit/brain/test_routing.py(26 cases: 5 smalltalk × 2 + 5 spawn × 2 + 3 PC-control + 4 consistency asserts including the newtest_recursive_tools_only_in_router). - Persona mandate:
Jarvis-Behavior/persona-delegation-mandate.md§"Phase 3 — Routing-Fix". - Research:
docs/persona-research.mdsections 2 (routing-bug repro) + 5.1 (master-plan conflicts). - Master plan §22:
.claude/plans/also-er-muss-auch-lexical-pond.mdline 1610 ff. - Before/after:
docs/persona-refactor-results.mdsection 1+2. - Phase 7.3 (self-mod):
docsplansphase-7-self-mod/PROJEKT_KONTEXT.md§AD-2. - Phase 8.4 (quality gate): commit
0aa8a49a feat(review): phase 8.4 — dispatch_with_review tool and policy.
Amendment (2026-05-31): App-Control Tools
Three tools join the router set so the brain has a complete grip on the Desktop App configuration by voice/chat:
describe-app-settings(safe, read-only) - a complete, secret-free snapshot: the active brain/TTS/STT/Dodaios-Agent provider (and which have a stored key), the key settings, and the configured MCP servers. The "full overview" capability.switch-provider(ask, echo-confirm) - switch which provider is active for a tier ("switch from Grok to Gemini"). Reuses the exact 3-layer persist + live-apply path the REST endpoints use, viadodaios.core.runtime_refs.manage-mcp-server(ask, echo-confirm) - add/remove/enable/disable an MCP server inmcp.jsonviadodaios.mcp.state. A newly added server starts disabled (review before activate - AP-15 spirit).
All three are direct safe/ask-gated actions, NEVER spawns - they do not enter any
worker tool set (AP-5/AP-14). Security boundary (binding): no raw secret value
is ever accepted. switch-provider only flips the active provider (the target
key must already exist in the Credential Manager); manage-mcp-server uses
$SECRET_NAME placeholders. Raw key writes stay UI-only (/api/secrets/{key})
per AP-2 and the self-mod FORBIDDEN_PATTERNS doctrine. The shared credential
check lives in dodaios.brain.app_control.is_credential_present and is imported
back by provider_routes so the UI and the tool never drift (BUG-008 class).
Known follow-up: the deterministic pre-brain force-spawn gate
(BrainManager._should_force_spawn) can pre-empt utterances containing an
external-system marker (e.g. "enable the GitHub MCP") before the brain sees the
tool. The primary examples (switch Grok->Gemini, update settings, update the MCP
config) do not hit a marker. A settings-intent allowlist for the gate is deferred.
Spec: docs/superpowers/specs/2026-05-31-app-control-tools-design.md.
Amendment: AI Pointer Router Tool (inspect-pointer, 2026-06-01)
inspect-pointer is added to ROUTER_TOOLS (risk safe, read-only). It
resolves the on-screen UI element under the mouse cursor via the OS
accessibility tree (IUIAutomation.ElementFromPoint / AXUIElement CopyElementAtPosition / AT-SPI getAccessibleAtPoint) — not a blind
screenshot — and returns its name/role/value/app. It is a direct safe-gated
read, never a spawn, so it never enters a worker tool set (AP-5/AP-14).
This is the pull path for deictic questions ("what is this?", "was ist das
da?"). The push path is separate and lives off the router schema: a fast
regex deictic gate (dodaios.pointer.intent) in BrainManager.generate() rides
the resolved element (+ a tight crop only for unlabeled graphics) on the turn
context, off the voice hot path with a hard timeout (AP-9). The gate vetoes
demonstratives completed by a concrete noun ("was ist das für ein Wetter"), so
unrelated turns never receive cursor context — the "no context-less garbage"
contract. Every backend degrades to a logged null fallback (AD-6); the headless
€5-VPS path resolves no cursor and the brain says so.
Spec: docs/plans/ai-pointer/DESIGN.md. Regression guards:
tests/unit/brain/test_routing.py (inspect-pointer in the dispatcher set),
tests/unit/pointer/, tests/unit/brain/test_manager_pointer.py.
Amendment: Navigate tool (navigate, 2026-06-02)
navigate is added to ROUTER_TOOLS (risk safe). It moves the desktop UI to a
sidebar section in response to a spoken/typed command ("zeig die Socials", "open
settings", "show the agents", "geh zu den Aufgaben"). The tool takes a section
argument, normalizes natural-language aliases (DE + EN) to a canonical section
id, and publishes a NavigateSidebar event on the shared bus. The WS forwarder
streams it to the frontend (event_name = "NavigateSidebar"), whose existing
listener (useWebSocket.ts) calls setActiveSection when the id is a known
SectionId and otherwise no-ops gracefully.
It is a pure UI action with no side effects beyond switching the visible
screen — a direct safe-gated action, never a spawn, so it never enters a
worker tool set (AP-5/AP-14). This is why it belongs in ROUTER_TOOLS and
nowhere else: the router is the only tier that talks to the UI; a worker runs in
an isolated worktree and has no UI bus.
Anti-drift: the tool's KNOWN section ids mirror the frontend SECTION_IDS
(dodaios/ui/web/frontend/src/store/events.ts); a parity test reads the TS array
and asserts equality, so a new section added on one side without the other fails
CI (the wire-format-enum guard from docs/anti-drift-three-layer.md). The
frontend's isSectionId check is the second layer of defense — an unknown id is
ignored, never a crash.
Regression guards: tests/unit/brain/test_routing.py
(test_navigate_in_router_tools), tests/unit/plugins/tool/test_navigate.py
(alias normalization, unknown-section failure, SECTION_IDS parity).
Amendment: Contacts Tools (contact-lookup, contact-upsert, call-contact, 2026-06-02)
Three tools are added to ROUTER_TOOLS for the jarvis-contacts feature (the
user-curated contact book + acting on a person by name). This is Chunk B of
the plan hallo-es-geht-darum-rosy-hinton.md; it consumes two frozen contracts
(ContactStore, owned by Chunk A; place_call, owned by Chunk C) and degrades
gracefully when either is absent (cloud-first €5-VPS no-op).
contact-lookup(risksafe, read-only) — resolves a name/alias to the contact's e-mails/phones/address/README viaContactStore.find_by_alias. The brain calls it FIRST whenever the user names a person for an action, then chains intogmailorcall-contact.contact-upsert(riskmonitor, deterministic write) — saves/updates a contact by voice ("merk dir Christophs Nummer ist …"). Logged, no confirmation nag (anti-confirmation-fatigue), mirroringwiki-ingest. Deletion stays UI-only in v1.call-contact(riskask, echo-confirm) — resolves the contact's phone and places a real outbound call via the telephony engine (place_call, Contract 2). Telephony absent/unconfigured → a clear English no-op pointing at the Telephony section.
All three are direct safe/monitor/ask-gated actions, never a spawn, so they
never enter a worker tool-set (AP-5/AP-14). E-mail-by-name needs no new tool:
a system-prompt rule in manager._build_system_prompt() (emitted only when
contact-lookup AND gmail are both wired) tells the brain to resolve the name
via contact-lookup, then send via the existing gmail tool.
Capability coupling (the BUG-class fix). The three tools are also registered
as capabilities in capabilities_seed.py (tool.contact-lookup/-upsert/
-call-contact). This is load-bearing: without the call-contact capability,
resolve_intent("ruf Christoph an") returns None, so
BrainManager._is_generic_subagent_work treats it as generic work and
force-spawns a contextless worker that cannot place a call — the live BUG
documented in project_bug_subagent_not_natively_recognized. Registering the
capability makes resolve_intent return tool.call-contact, which flips the
verdict from spawn to no-spawn so the utterance stays router-tier. The contact
verbs deliberately EXCLUDE the dispatch hard-negative verbs
(schick/sende/trag/bestelle/poste) so the anti-hallucination contract
(test_capability_coupling_e2e) is preserved — the canonical "schick eine Email
an …" / "trag einen Termin ein" still resolve to None and stay UNSUPPORTED.
Regression guards: tests/unit/brain/test_routing.py
(test_contact_tools_in_router_tools,
test_factory_wires_contact_tools_into_router_set,
test_capability_seed_registers_contact_capabilities,
test_contact_capabilities_do_not_resolve_external_hard_negatives, and the
PFLICHT routing tests test_mail_by_name_stays_router_tier /
test_call_by_name_stays_router_tier / test_voice_save_contact_stays_router_tier),
tests/unit/plugins/tool/test_contact_lookup.py,
tests/unit/plugins/tool/test_contact_upsert.py,
tests/unit/plugins/tool/test_call_contact.py,
tests/unit/brain/test_contacts_integration.py.
Amendment: Inline web search (search-web) + heavy-only spawn threshold (2026-06-10)
What changed
ROUTER_TOOLSgainssearch-web(dodaios/plugins/tool/search_web.py: SearchWebTool, LLM-facing namesearch_web). Read-only DuckDuckGo Instant-Answer call viahttpx, risksafe, no key required — cloud-first compatible (plain HTTPS, works on the €5-VPS baseline).- The router system prompt (
router.py:SYSTEM_PROMPT) replaces the "research/analysis/comparison → spawn_worker" doctrine and the "on uncertainty: delegate" default with an effort-based three-way split:- LIGHT: answer directly, no tool.
- MEDIUM: finish it YOURSELF this turn with the router's own tools
(
search_web, plugin tools,cli_*,run_shell,computer_use,wiki-recall) — multiple tool calls and a few seconds of thinking are fine. Never a spawn. - HEAVY:
spawn_workerONLY when the task builds a real work product (code/app/file/document/HTML report/refactor) or clearly needs multi-minute, multi-step focused work — or the user explicitly asks for a background agent. On uncertainty the router now tries itself first ("BEI UNSICHERHEIT: MACH ES SELBST") instead of delegating.
- The
spawn_workertool description was rewritten to the same heavy-only contract with an explicit negative boundary (questions, news, single lookups are NEVER spawned). LLMs select tools primarily by description — the lesson from the 2026-05-29 computer-use amendment, applied in the restrictive direction.
Why (the bug)
Live complaint 2026-06-10: "was sind die aktuellsten News?" spawned a multi-minute worker mission. Root cause was twofold:
- The prompt classified EVERY research-ish utterance as SPAWN_WORKER ("Recherche, Analyse, Vergleich", "ALLES was laenger als ~5 Sekunden dauert", "BEI UNSICHERHEIT: DELEGIERE") and falsely framed delegation as costing "wenige Sekunden" — a real mission runs minutes.
- The router had NO inline web path at all:
search_webexisted as a plugin but was deliberately kept out ofROUTER_TOOLS(the 2026-05-25 phantom-tool fix removed the advertisement instead of registering the tool), so the model literally could not answer a news question except by spawning.
The deterministic force-spawn heuristic was NOT involved (a question carries no action verb); the LLM tool-choice path was. The heuristic is therefore unchanged by this amendment.
Why search-web belongs in ROUTER_TOOLS (and nowhere else)
It is a direct, read-only, safe-gated lookup — architecturally the same
shape as wiki-recall (read-only search the router answers from). It is
not a generic direct action like open_app/type_text (those stay
delegated): it has no side effects, needs no confirmation, and answering a
question inline is exactly the router's job. It is never a spawn and never
enters a worker tool-set (AP-5/AP-14). The 2026-05-25 phantom-call bug
class cannot recur in the inverse direction because the parity test now
pins BOTH halves: tool registered ↔ tool advertised
(tests/unit/brain/test_router_prompt_tool_parity.py:: test_search_web_is_a_real_router_tool_and_advertised).
Pure-dispatcher spirit
This amendment formalizes what the 2026-05-24/05-29/06-01 amendments already practiced: the router answers light AND medium requests directly through safe-gated tools and reserves the heavy worker for genuinely heavy chunks. The "When in doubt, SPAWN" reflex that ADR-0011 §Context originally diagnosed as the bug had crept back into the prompt as doctrine; this amendment removes it again — in the opposite direction this time (over-spawning instead of over-acting).
Regression guards
tests/unit/brain/test_routing.py::test_search_web_in_router_toolstests/unit/brain/test_routing.py::test_router_tools_is_pure_dispatcher_set(exact-match set updated to includesearch-web)tests/unit/brain/test_router_prompt_tool_parity.py(parity in both directions;open_app/rememberstay phantom-listed)tests/unit/test_router_delegator_policy.py(test_spawn_is_reserved_for_heavy_tasks,test_default_on_uncertainty_is_self_serve,test_news_question_routed_to_search_web_not_spawn,test_minutes_vs_seconds_cost_framing_present)tests/unit/plugins/tool/test_spawn_worker_description.py(heavy-only description contract)
Related model pin (same user mandate, 2026-06-10)
The heavy tier itself was pinned to the frontier model claude-fable-5
with NO automatic claude-opus-* fallback anywhere:
[brain.sub_jarvis] provider="claude-api", model="claude-fable-5",
[brain.providers.claude-api].deep_model="claude-fable-5",
claude_direct_worker._DEFAULT_CLAUDE_MODEL, critic escalation
(dodaios/missions/critic/escalation.py — escalation rounds now target
FRONTIER_MODEL instead of the "opus" CLI alias), and the computer-use
planner default (config.py plan_model). Drift-guard source
scripts/config-soll.json updated in the same change so the pin survives
the 5-minute drift sweep (BUG-010 triple defense).
Amendment 2026-06-18 — MCP-Tools Virtual Loader (mcp-tools)
Status: Amendment 2026-06-18
What changed
ROUTER_TOOLS gains one entry: mcp-tools.
mcp-tools is a virtual loader (dodaios/mcp/loader.py:McpToolLoader,
is_virtual_loader=True). The _load_tools_for_tier expansion path
(factory.py) recognises it and replaces the single entry with one
MCPToolAdapter per tool of every connected and running MCP server
(e.g. notebooklm-mcp, filesystem-mcp). Only running servers contribute
tools, so the router's tool surface stays proportional to what is actually
connected.
Why it was needed (the bug)
Connected MCP servers (e.g. notebooklm-mcp, 32 tools) were invisible to
the voice/router brain. Root cause: _load_tools_for_tier discovers tools
via jarvis.tool entry-points filtered against ROUTER_TOOLS. Both
cli-tools and plugin-tools are virtual loaders in that set — but there
was no equivalent for MCP tools. The MCPToolAdapter objects created at
server-connect time never entered the brain's tool dict.
Implementation
dodaios/mcp/loader.py— newMcpToolLoader, structured exactly likePluginToolLoader(mirror ofdodaios/marketplace/plugin_loader.py). Readsclient._tools_cachesynchronously (already populated duringMCPClient.start()) — no network I/O, noawait, no server start. Every failure path returns[]so a broken MCP server cannot crash the factory.pyproject.toml—[project.entry-points."jarvis.tool"]gainsmcp-tools = "dodaios.mcp.loader:McpToolLoader".dodaios/brain/factory.py—"mcp-tools"added toROUTER_TOOLS.dodaios/core/capabilities.py—_reset_registry_for_tests()helper added (test-only) so theMCPToolAdapterside-effect of registering aCapabilityin the global singleton does not leak across tests.
| Tool | Phase | Rationale | Recursion guard? |
|---|---|---|---|
mcp-tools |
MCP connectivity | Each expanded MCPToolAdapter is a direct, risk-gated action (default monitor). It is the same virtual-loader model as cli-tools and plugin-tools. The router calls MCP tools inline rather than delegating to a 30-min worker spawn. |
n/a as a recursion vector — an MCPToolAdapter.execute() calls the MCP server subprocess, it cannot spawn the supervisor. It is router-tier only and never enters any worker tool-set (AP-5/AP-14). |
Live-reload contract
Connecting/disconnecting an MCP server publishes BrainToolsChanged, which
the live BrainManager.refresh_tools() consumes to re-expand mcp-tools
— no restart required (owned by WS2).
Regression guards
tests/unit/mcp/test_loader.py— 6 cases: expand returns adapters, null registry →[], raisingactive_clients→[], multiple servers, empty clients, loader attributes.tests/unit/brain/test_routing.py::test_mcp_tools_in_router_toolstests/unit/brain/test_routing.py::test_mcp_tools_is_router_only_not_a_spawntests/unit/brain/test_routing.py::test_router_tools_is_pure_dispatcher_set(exact-match set updated to includemcp-tools)
Amendment — Marketplace native tools gmail, vercel, google_calendar
A connected marketplace plugin that has no MCP server block (so the virtual
mcp-tools/plugin-tools loaders expand to nothing for it) must be made
router-visible directly, or a voice/chat command can never reach it. Three
such native tools are in ROUTER_TOOLS:
| Tool | Added | Backing | Risk | Recursion guard? |
|---|---|---|---|---|
gmail |
2026-06-01 | Gmail REST API via the marketplace OAuth token | ask (send is consequential; reads downgrade to safe via risk_tier_for_args) |
n/a — a direct REST call, not a spawn; router-tier only (AP-5/AP-14) |
vercel |
2026-06-07 | Vercel REST API via the marketplace PAT | monitor (read-only) |
n/a — direct REST call, never a spawn |
google_calendar |
2026-06-27 | Google Calendar API v3 via a Node bot (calendar_bot.mjs); a thin Python bridge reuses the marketplace OAuth token + refresh loop |
monitor (writes), safe (reads) via risk_tier_for_args — full autonomy, never ask (user mandate) |
n/a — the bridge runs a short-lived node subprocess for one API call, it cannot spawn the supervisor; router-tier only, never enters a worker set (AP-5/AP-14) |
Same spirit as cli-tools: a gated external-system call with a declared
risk tier and the marketplace token model — not a generic direct-action like
open_app/type_text (those stay off the router by design). The token never
expires in practice because the bridge self-heals on a 401 (refresh once +
retry) and the RefreshScheduler keeps the refresh token warm.
Regression guards
tests/unit/plugins/tool/test_google_calendar_rest.py— 13 cases: per-action payloads, 401 → one refresh + retry, no action is everask(full autonomy), graceful "not connected" / "node missing".tests/unit/brain/test_routing.py::test_router_tools_is_pure_dispatcher_set(exact-match set updated to includegoogle_calendar).
Amendment — dispatch-to-harness removed from the LLM-visible router set (2026-06-28)
Forensic. A user said by voice, in effect, "start a subagent that writes me
a study sheet." Dodaios replied: "the harness 'openclaw' is not available;
active are only mcp-remote, open-interpreter, python-script and screenshot."
The brain had chosen dispatch_to_harness(harness="openclaw", …) instead of
spawn_worker. HarnessManager.get("openclaw") raised a KeyError, and its raw
message — including the internal active/failed harness inventory — was read
aloud.
Root cause. dispatch-to-harness exposed a free-form harness string
parameter and its description advertised "OpenClaw, Codex, Python-Script, MCP"
as Dodaios-Agent vehicles. But the legacy OpenClaw harness name is not a registered harness — it was
removed in Welle 4 (~92% nested-claude hang), and
pyproject.toml registers only open-interpreter, mcp-remote,
python-script, screenshot. So a "Dodaios-Agent" turn could name a phantom harness
that can never run. The capability surface compounded it: tool.spawn-worker
was described as "Spawn an OpenClaw sub-agent" and a separate
harness.openclaw capability advertised the dead vehicle.
Decision. dispatch-to-harness is removed from ROUTER_TOOLS — it is no
longer an LLM-selectable tool. The two legitimate paths are unchanged and
sufficient:
- heavy Dodaios-Agent work →
spawn-worker(Mission-Manager →ClaudeDirectWorker); - live desktop control →
computer-use.
The DispatchToHarnessTool class is retained for the internal, non-LLM
local-action / computer-use fast path (_load_local_action_tools, invoked
programmatically with a registered harness name). It is just not router-visible.
Do not re-add it to ROUTER_TOOLS — that resurrects the phantom-harness
routing bug.
Companion changes: the dead tool.dispatch-to-harness and harness.openclaw
capabilities are deleted from the seed; tool.spawn-worker is re-described
("Spawn a background worker sub-agent") with its openclaw verbs/objects
removed; the HarnessManager.get() / dispatch_to_harness error paths no longer
leak the raw harness inventory into a message that can reach voice; and the boot
path logs a warning when an inert [harness.openclaw].enabled = true block is
present (warn_if_phantom_worker_harness).
Regression guards
tests/unit/brain/test_routing.py::test_dispatch_to_harness_not_in_router_toolstests/unit/brain/test_routing.py::test_subagent_request_forces_spawn_workertests/unit/brain/test_routing.py::test_router_tools_is_pure_dispatcher_set(exact-match set updated —dispatch-to-harnessremoved)tests/unit/core/test_capabilities.py::test_dispatch_to_harness_capability_removed/::test_no_capability_advertises_legacy_harness_name/::test_harness_adapters_presenttests/integration/test_dispatch_to_harness.py::test_unknown_harness_returns_neutral_error_no_inventory_leak
Amendment — app-command tool (Command Registry executor, 2026-07-09)
Context. Voice-driven app control had three uneven paths: the deterministic
pre-LLM gates (fast, but only for a hand-picked set), the self-mod
set_config_value tools, and free-form cli_jarvisctl strings composed by the
LLM — the least-validated route and the primary source of "the command did
something else" failures. Meanwhile the app's command surface lived in four
independent, hand-maintained registries (UI nav, CLI, brain tools, mirrored
constants — the AP-4 drift class).
Decision. ROUTER_TOOLS gains app-command
(dodaios/plugins/tool/app_command.py): a single structured executor over the
new Command Registry (dodaios/commands/registry.py). Constraints:
command_idis enum-constrained to the curated registry — the LLM cannot invent a target; arguments are validated against the command's JSON schema BEFORE anything is sent.- Execution goes through the SAME mounted REST endpoint the desktop UI uses,
in-process via httpx
ASGITransport(runtime_refs.get_web_app()) — one validation chain for voice, UI, and CLI. - Registry commands flagged
dangerousescalate to risk tieraskviarisk_tier_for_args(ToolExecutor two-turn voice confirm); the rest run atmonitor. - The readback is composed from the SERVER RESPONSE (echo-verify), never from the model's intent.
- No spawn path: mission dispatch is deliberately NOT a registry command
(spawning stays with
spawn-worker);app-commandis a direct gated action and must never enter a worker tool set (AP-5/AP-14).
The deterministic pre-LLM gates stay untouched — they remain the zero-latency
first line; app-command covers the validated long tail. cli_jarvisctl
remains as fallback for actions outside the registry.
Regression guards
tests/unit/brain/test_routing.py::test_router_tools_is_pure_dispatcher_set(exact-match set updated to includeapp-command)tests/unit/brain/test_routing.py::test_factory_wires_app_command_into_router_settests/unit/plugins/tool/test_app_command.py— schema/enum validation, ASGI execution against a fake app, dangerous→ask escalation, server-response readback, honest no-server error.tests/unit/commands/test_registry_parity.py— registry↔OpenAPI/UI parity.
Addendum (2026-07-11) — umbrella interface replaced by flat expansion
The original app-command design (ONE tool, nested command_id + args)
failed its first live test: the router LLM read the command list in the
tool description and called provider-test AS A TOOL NAME — "tool
'provider-test' not in the router tool set", spoken error. Flash-class
routers flatten nested dispatch interfaces; the repo's own CLI/MCP loaders
already solved this shape. app-command is therefore now a virtual
loader (the cli-tools pattern): the ROUTER_TOOLS entry gates the loader,
expand() registers one flat tool per registry command (brain-switch,
provider-test, wake-word-set, …), each carrying the command's own params
schema and risk tier (ask when dangerous, else monitor). Validation,
ASGI execution, and echo-verify readback are unchanged. Guards:
test_factory_wires_registry_command_tools_into_router_set,
tests/unit/plugins/tool/test_app_command.py (loader expansion + flat
schemas + the provider-test regression).
Amendment 2026-07-12 - retire multi-spawn from the router
Context
The live harness inventory no longer contains the historical Dodaios-Agent/Codex
vehicles advertised by multi-spawn. The tool therefore competed with the
working spawn-worker mission path while offering backend names that could not
run. This is the same phantom-capability failure class that previously required
removing dispatch-to-harness from the LLM-visible router.
Decision
multi-spawn is removed from ROUTER_TOOLS and from the seeded capability
registry. spawn-worker is the sole LLM-visible heavy-work delegation path; its
Mission Manager may still decompose a mission into parallel supervised steps.
The legacy implementation and entry point may remain for internal compatibility,
but model-facing schemas and prompts must not advertise it.
Consequences
- Heavy work has one observable mission id and one critic/review lifecycle.
- The router can no longer select unregistered harness names through the legacy fan-out schema.
- Parallelism remains an internal Mission Manager decision rather than a second public spawn surface.
Alternatives considered
- Re-register the historical harness names: rejected because those backends were removed after empirical reliability failures.
- Rewrite
multi-spawnas an alias forspawn-worker: rejected because two model-visible tools for one operation recreate nondeterministic tool choice.
Follow-up items
- Keep exact router-set and capability-registry negative tests.
- Keep recursive spawn tools out of every worker capability inventory.
Amendment 2026-07-13 - retire dispatch-with-review from the router
Context
dispatch-with-review still exposed the retired Phase-8 review pipeline as a
second model-visible heavy-work path. Its worker spawner can only select the
unregistered jarvis_agent or openclaw harness names, while the production
Mission Manager already applies CriticRunner to every supervised mission.
Keeping both tools made an otherwise valid Realtime action nondeterministically
choose a path that cannot execute on any supported installation.
Decision
Remove dispatch-with-review from ROUTER_TOOLS and from the seeded capability
registry. spawn-worker is the sole model-visible heavy-work entry point, and
its Mission Manager owns worker execution, critic retries, and Kontrollierer
sign-off. The legacy review entry point may remain temporarily for internal
compatibility, but routing, capability discovery, and prompts must not advertise
it.
Consequences
- Realtime, chat, and voice all enter the same supervised mission lifecycle.
- Every model-selected heavy task receives the live worker fallback chain and the production Critic instead of an unavailable harness error.
- Existing direct callers of the legacy review tool continue to receive its compatibility behavior until the implementation is removed or migrated.
- Two model-visible tools can no longer compete for the same reviewed mission.
Alternatives considered
- Re-register the retired harnesses: rejected because the Dodaios-Agent (formerly OpenClaw) subprocess path was removed after repeated reliability failures.
- Rewrite
dispatch-with-reviewas a second alias forspawn-worker: rejected because duplicate schemas recreate nondeterministic model selection and split telemetry across two names. - Keep both tools and improve the prompt: rejected because prompt guidance cannot make an unregistered execution backend available.
Follow-up items
- Keep negative router and capability-registry tests for
dispatch-with-review. - Preserve the Mission Manager Critic-loop smoke test as the review guarantee.
- Remove the legacy review implementation once non-router compatibility callers have migrated.
Amendment 2026-07-13 - advertise only operational harness adapters
Context
The package still registered mcp-remote and open-interpreter as harnesses.
The former implemented an obsolete MCP client API and bootstrapped with an empty
registry; the latter was an explicit stub that always returned failure. Their
presence in entry-point discovery and the default [harness].enabled list made
unavailable functionality look ready on a fresh installation.
Decision
The operational harness inventory contains only python-script and the
capability-gated screenshot Computer Use adapter. MCP servers contribute flat,
safety-gated tools through the live MCP loader; they are not worker harnesses.
Any mission-scoped worker grants must reuse that tool surface rather than revive
the obsolete harness adapter. Heavy work continues through spawn-worker and
the Mission Manager. Stale configured harness names are reported by the doctor.
Consequences
- Discovery no longer claims that a stub or obsolete protocol adapter can run.
- The universal Python harness remains available on a headless base install.
- Computer Use remains registered but reports unhealthy until its desktop context and dependencies are ready.
- MCP actions retain the normal ToolExecutor policy instead of bypassing it through the obsolete harness adapter.
Regression guards
tests/contract/test_harness_protocol.pytests/unit/diagnostics/test_doctor_diagnostics.pytests/unit/core/test_capabilities.py
Amendment 2026-07-14 - wiki-list tool (grounded vault listing)
Status: Amendment 2026-07-14
Context
Voice session 2026-07-14 09:29 ("what is in my wiki"): the delegated
router turn had no way to enumerate the Obsidian vault. It probed blindly
(wiki-recall -> wiki-page-read index.md -> not found -> SOUL.md ->
not found), burned ~14 sequential LLM rounds (66 s wall clock), and
finally recited the EXAMPLE directory layout from schema.md (the
vault's editing contract, type: meta) as if it were the actual vault
contents. Every file named in the spoken answer was invented, and the
invented facts were then journaled by the fact extractor — a
self-reinforcing hallucination loop.
Decision
ROUTER_TOOLS gains wiki-list
(dodaios/plugins/tool/wiki_list.py::WikiListTool): a read-only,
risk-safe, deterministic listing of every markdown page in the vault
(vault-relative path, size, first heading), with type: meta contract
pages explicitly flagged as system files. Overview questions ("what is
in my wiki / my notes") resolve in ONE tool round against ground truth
instead of a probe-and-guess loop. Complementarily, wiki-page-read
prepends a deterministic provenance warning when serving a type: meta
page.
The router remains a pure dispatcher: the tool is a direct safe-gated read, never a spawn. Dodaios-Agents may access it only through ADR-0025's mission-scoped supervisor broker; the live object and vault path remain in the supervisor, and it never enters a legacy worker tier or direct worker tool set (AP-5/AP-14).
Regression guards
tests/unit/plugins/tool/test_wiki_list.pytests/unit/plugins/tool/test_wiki_tools.py(meta-page warning)tests/unit/brain/test_routing.py(ROUTER_TOOLS parity)
Amendment 2026-07-25 — home_assistant router tool
Context
Home Assistant is the connector where "assistant" is the literal use case:
lights, heating, doors, scenes. It reached the catalog as a pat_paste plugin
with a per-connection instance address, so the question was how a connected
smart home becomes callable by voice.
Its MCP integration is not the answer. Home Assistant has explicitly declined RFC 7591 dynamic client registration, and its MCP server is deliberately scoped to Home Assistant's own Assist pipeline — it exposes conversation, not the entity and service surface an external assistant needs. The documented REST API does expose exactly that.
Decision
ROUTER_TOOLS gains home_assistant
(dodaios/plugins/tool/home_assistant_rest.py::HomeAssistantRestTool): list
entities (optionally by domain), read one entity's state, and call a service.
Two properties are load-bearing:
- The server address is per-connection state, stored in
Tokens.extra["instance_url"]beside the credential rather than hardcoded. Home Assistant runs on the user's own network; there is no canonical endpoint, and the.localhostname does not resolve inside Docker or over a VPN. - risk_tier is
ask, notmonitor. Every other native marketplace tool is read-focused. This one physically changes the user's home. Turning off the wrong light is recoverable; unlocking a door is not, so the safety layer decides rather than the tool.
The router remains a pure dispatcher: this is a direct gated action, never a spawn, and it never enters a worker tool set (AP-5/AP-14). Dodaios-Agents reach it only through ADR-0025's mission-scoped supervisor broker.
Consequences
The long-lived access token is valid for ten years with no rotation, which makes this the most durable connection in the catalog — and the reason the setup text asks for a dedicated non-admin Home Assistant user, since the token inherits every permission of whoever created it.
Reachability, not authentication, is the honest limitation: a headless Dodaios on a server cannot see a home LAN without a remote URL or a tunnel. The tool reports that as a network problem instead of implying a bad credential.
Regression guards
tests/unit/plugins/tool/test_home_assistant_rest.pytests/unit/marketplace/test_instance_url.pytests/unit/brain/test_routing.py(ROUTER_TOOLS parity)
Amendment: UltraWiki Search (2026-07-25)
ultrawiki-search joins ROUTER_TOOLS: the read-only pull primitive over
the UltraWiki semantic store (fused keyword + vector retrieval with citation
permalinks, dodaios/plugins/tool/ultrawiki_search.py). Direct safe-gated
read, never a spawn (AP-5/AP-14). Resolver-not-instance wiring (the
UltraWikiService is built by the WebServer after the brain — the wiki-ingest
lazy-curator precedent); the tool loads even while UltraWiki mode is
disabled and answers with an honest steer to the classic wiki-* tools, so
the router's tool surface stays stable across mode toggles. Mission workers
reach it only through the ADR-0025 broker grant once the ADR-0030 gate is
live. A dedicated who_is primitive stays DEFERRED until the UltraWiki P5
identity layer exists; until then ultrawiki-search answers "who is X"
queries via hybrid search.
Regression guards
tests/unit/plugins/tool/test_ultrawiki_search_tool.pytests/unit/brain/test_routing.py(ROUTER_TOOLS exact set)
Amendment: Assistant-Mode Tools (2026-08-13)
list-modes, switch-mode and save-mode join ROUTER_TOOLS: the assistant
can now read, switch and author its own mode — the character it answers in
(dodaios/brain/modes.py, dodaios/plugins/tool/assistant_mode.py).
The precedent is switch-provider, not open_app. These tools reconfigure the
assistant itself; they run in-process, touch no external system, and their
result is deterministic. Nothing here is a direct action on the user's machine,
so nothing here belongs behind the Dodaios-Agent bridge. Direct gated actions,
never spawns, never in a worker tool set (AP-5/AP-14).
Tiers are set by what each one can actually cost:
list-modes— safe. A property read over the mode directory.switch-mode— monitor. It changes tone and nothing else, the app-wide mode indicator shows it the moment it happens, and undoing it is one sentence. Confirming a change of character the user just asked for out loud would be paperwork, not safety.save-mode— ask, echo-confirmed. It writes a file that every future turn reads, under a name the model chose from a conversation. The confirmation is the natural last beat of the mode-builder interview and is what stops a half-heard sentence from becoming a permanent character.
A mode is layered onto the base persona, never substituted for it
(persona_loader.load_effective_persona_prompt), so no mode — including one the
model wrote itself — can drop the standing rules about honesty and about what is
safe to say aloud. save_mode is told not to restate those rules, because a
mode that appears to own them invites a later one to relax them.
The Agentic IDE's coding mode is applied as an in-memory section override rather than a persisted choice, so a mode a screen switched on cannot outlive the process.
Regression guards
tests/unit/plugins/test_assistant_mode_tool.pytests/unit/brain/test_modes.pytests/integration/test_modes_routes.pytests/unit/brain/test_routing.py(ROUTER_TOOLS exact set)
Retired (2026-08-23)
The assistant-modes feature was removed on the maintainer's decision: the
shelf of characters, dodaios/brain/modes.py, the /api/modes routes, the
jarvis modes CLI group, the Modes section and the three router tools above
are gone, and ROUTER_TOOLS no longer lists them. load_effective_persona_prompt
is back to "custom override, else default" with no mode layer, and the Agentic
IDE's focused coding mode no longer swaps the persona's character — it still
adds the workspace facts to the prompt and gates spawns as before. This
section stays as history; the reasoning above is what to re-read if a
character layer is ever wanted again.
Amendment: create-skill router tool (2026-08-18)
create-skill joins ROUTER_TOOLS: the brain can now WRITE a new skill from
the user's spoken description (dodaios/plugins/tool/create_skill.py).
Context
Voice session 2026-08-18 17:51: "Ich möchte, dass du mir bitte einen neuen Skill erstellst — Morgenroutine, jeden Morgen um 6 Uhr E-Mails, Linear-Tickets und Kalender vorlesen, dann ein 80er-Klassiker auf YouTube Music." Three things went wrong at once, and each was structural:
- The wrong skill captured the turn. The trigger channel captures on the
longest author regex, and
plugin-youtube_music's brand-only trigger matched the words INSIDE the description of the skill to be built. Theskill-creatorbuiltin's own trigger knew only the infinitive ("Skill erstellen"), not the conjugated verb the user said ("Skill erstellst"). - The brain had no tool to write a skill. The only live authoring path
was the UI dialog (
POST /api/skills/creator/{draft,commit}) and, two commands deep,jarvisctl skills draft+commitwith JSON piped between them. The model spent three tool rounds onjarvisctl --help, hit the 45 s loop deadline and said "Das hat gerade nicht geklappt." - Even that path could produce a template, not a skill. The creator's
deterministic skeleton copies the intent 1:1 into
descriptionand a body that says "1. …", never derives a schedule trigger, and its single brain call died on the dev box's unkeyed active provider.
The 2026-07-25 note that a router tool "would be a third route to the same
behaviour and a fourth place to forget the AP-15 guard" was reasoning about
the phantom spawn-skill-author; the guard is enforced in ONE place
(SkillCreatorService.commit forces state="draft"), so a tool that calls
that service adds a caller, not a place to forget.
Decision
dodaios/skills/authoring_request.py— a deterministic resolver ahead of the trigger channel (Channel 0.5 inBrainManager._match_skill_for_turn): word "skill" + a creation shape (indefinite/new article, or a creation verb in any conjugation right before/after the noun) + not an information question. An authoring request resolves to the activeskill-creatorbuiltin with trigger-grade rights, or to NO skill when that builtin is off — never to a connector named inside the request. Force-spawn and the evidence gate stand down on such a turn (_skill_authoring_turn).create-skill(monitor): ONE bounded call — live tool inventory + installed skills → the brain ladder (active provider → Tool Model → quality tier → frontier chain, crossing on a dead rung, AP-21/AP-22) → a complete draft (name, description, spoken trigger regex, schedule cron when a time was named, numbered steps per connected tool, spoken answer format) → committed asstate: draft(AP-15). Never a skeleton: without an authoring brain the tool fails honestly and writes nothing (SkillCreatorUnavailable).- Parity across surfaces (§3 provider & mode parity): the same
SkillCreatorService.author()backsPOST /api/skills/creator/authorandjarvis skills create; the realtime engines reach it through the delegate router brain like every other router tool; the UI dialog keeps its review-then-commit flow and now sees the same tool inventory. - The
skill-creatorbuiltin's body is a short card ("restate, call create-skill once, report") — Anthropic's 450-line guide moved toreferences/anthropic-skill-creator.md; its regex accepts conjugated verbs.
Direct gated action, never a spawn, never in a worker tool set (AP-5/AP-14).
Same day, generalised — the class, not the instance
The first cut protected only the literal word "skill" and only creation. The maintainer's objection ("why not automatically — this applies to many other things") is right, and the two failure classes are:
- A brand mentioned inside a request ABOUT an internal artifact captures the
turn. The resolver now covers every noun this product uses for "a skill"
in speech — routine (incl. compounds: "Morgenroutine"), automation /
"Automatisierung", workflow, "Ablauf", "Fähigkeit", ES "rutina" /
"automatización" / "flujo" — and a second kind, lifecycle: "deaktiviere
/ lösch / zeig / disable / delete / list … den Skill X" lets nobody
capture (veto
skill_lifecycle_request), so the brand skill named inside never RUNS instead of being switched off. - The brain has no first-class tool and burns rounds on
--help. Two closures: (a) the skill lifecycle is in the Command Registry —skills-list(new leanGET /api/skills/brief),skill-enable,skill-disable,skill-delete(dangerous, echo-confirmed) — flatapp-commandtools the model sees by name; (b) thecli_jarvisctltool's description carries the WHOLE command tree (dodaios/cli_ctl/command_index.py, static, parity-tested against the live Typer app) with argument hints, so workflows, modes, tasks, wiki, board, contacts, missions … are all one direct call away — the general fix for the--help-round class, not a per-feature patch.
Regression guards for the generalisation: tests/unit/skills/test_authoring_request.py
(routine / automation / workflow positives, lifecycle kind, hard negatives such
as "schalt das Licht aus" and "starte die Morgenroutine"),
tests/unit/brain/test_skill_authoring_turn.py (disable request not captured;
automation request → skill-creator), tests/unit/commands/test_registry_parity.py
(new entries exist in OpenAPI), tests/unit/cli_ctl/test_command_index_parity.py,
tests/unit/clis/test_tool.py (jarvisctl description carries the index).
Regression guards
tests/unit/skills/test_authoring_request.py(the live transcript, hits and hard negatives)tests/unit/brain/test_skill_authoring_turn.py(youtube_music no longer captures the authoring turn; stand-downs)tests/unit/plugins/test_create_skill_tool.py(registered, router-visible, loader-constructible; draft on disk; honest failure writes nothing)tests/unit/skills/test_creator_service.py(brain ladder crossover, inventory in the prompt, trigger normalisation,author()refuses a skeleton, collision suffix)tests/unit/ui/web/test_skills_routes.py,tests/unit/cli_ctl/test_commands_wave23.pytests/fixtures/skill_routing/golden.yaml(forensic positive)
Amendment: create-artifact router tool (2026-08-23)
create-artifact joins ROUTER_TOOLS and replaces the 2026-08-11 visualize
tool: the brain can have ONE self-contained page built — a dashboard, a
report, a diagram, a small interactive tool — and shown full-size in the
Artifacts section (dodaios/plugins/tool/create_artifact.py).
Context
visualize let the model supply a STRUCTURE (one of five fixed shapes, a
dozen labels) and had Python render the page. That kept a picture cheap and
deterministic, but it is also why every result looked like the same five
cards, and why the section that showed them was a run graph with the page
hidden in a 288 px inspector frame. The maintainer's decision (2026-08-23):
an artifact is a whole page the model writes — the way Claude artifacts work
— and writing one well takes the strongest model the install has and longer
than a voice turn can hold. So the page is written by a mission worker, not
by the router brain.
Decision
create_artifact(title, request, revise?, spoken_ack?)composes the worker brief (dodaios/artifacts/brief.py: one HTML file, all assets inline, no network, brand palette, light/dark, the user's language; on a revision the previous page verbatim) and dispatches it through the mission stack — the sameMissionManager.dispatch→Kontrollierer.run_missionpath asspawn_worker, with the same lazy resolvers (AD-OC1) and the same spoken failure on every dead end (AU-11). The call returns within the voice budget with a spoken promise; completion reaches the user through the mission voice listener. Riskmonitor, likespawn_worker; never in a worker set (AP-5/AP-14).- Ask-only, structurally.
BrainManager._hide_artifact_tool_without_requestremoves the tool from every turn that does not ask for an artifact (dodaios/brain/artifact_gate.py: explicit word — visualisier / Artefakt / Dashboard / Infografik — or a build verb next to a page noun; navigation to the section and definition questions never open it). Regex only (AP-11). - The Artifacts section (
VisualizationView, section id unchanged) shows the page full-size from/api/outputs/{slug}/files/{path}/page, served withARTIFACT_PAGE_CSP(inline scripts allowed, every network path shut) insidesandbox="allow-scripts"withoutallow-same-origin. Source under "Code", the run graph that used to be the section under "Run". dodaios/visuals/{spec,render,store}.pyand the gallery-as-pseudo-run store are retired;dodaios/visuals/brand.pystays (mission map + brief palette).
Regression guards
tests/unit/brain/test_artifact_gate.py(vocabulary, navigation beats the verb, definition questions, page nouns only next to a verb)tests/unit/brain/test_artifact_tool_hide.py(placement in the manager, fail-open)tests/unit/plugins/tool/test_create_artifact.py(brief reaches the manager verbatim, Kontrollierer runs it, NavigateSidebar, spoken failure on no runner / crash, revision from the archive)tests/unit/artifacts/test_brief.py,tests/unit/artifacts/test_locate.pytests/unit/ui/web/test_outputs_routes.py::test_artifact_page_*- frontend:
VisualizationView.test.tsx,RunGraphPanel.test.tsx tests/unit/brain/test_routing.py(create-artifactinROUTER_TOOLS)
Amendment: UltraWiki Search retired (2026-08-28)
ultrawiki-search leaves ROUTER_TOOLS together with the UltraWiki mode it
answered from. The amendment above stays as the record of why it was added;
nothing in the router changes shape, the set is simply one entry shorter.
The knowledge surface it fronted does not disappear: wiki-recall,
wiki-list and wiki-page-read answer the same questions from the Obsidian
vault, and they were always loaded beside it.
The requires= capability gate on AppCommand
(dodaios/commands/capabilities.py) goes with it. That seam existed to keep
the four UltraWiki commands out of a tool set while the mode was off, it had
no other entry, and a filter with no criterion is dead code. It returns with
the feature.
Regression guards
tests/unit/brain/test_routing.py(the set no longer names the tool)tests/missions/test_worker_capability_parity.py(the worker grant)
Amendment 2026-09-02 — Agent society voice tools
delegate-to-agent (risk monitor) and society-status (risk safe) join
ROUTER_TOOLS. They are the voice front door of the agent society
(docs/agent-society/MASTERPLAN.md §3.2): "Dodaios, let Scout research that"
becomes ONE typed ASSIGN envelope on the society board, acknowledged inside
the 5-second voice budget; "what is Scout doing?" is answered from the roster
and the last board events without a model call.
Pure-Dispatcher spirit is preserved
- Neither tool spawns.
delegate-to-agentappends an envelope; the society scheduler (dodaios/society/scheduler.py, trusted Python) applies the kill switch, the tier wall, delegation depth, budgets and caps and only then starts work under the target agent's identity. A refusal is a typedVETOthe tool reads back as a spoken reason. - Both stay out of every worker set (AP-5/AP-14): they are loaded through the
ROUTER_TOOLSfilter only and the society's own capability catalog lists them underNEVER_GRANTED. - The runtime is reached through a lazy resolver (AD-OC1), so the tools are registered at brain build time and answer an honest "not ready" until the server has built the society.
Regression guards
tests/unit/brain/test_routing.py(both names inROUTER_TOOLS)tests/unit/plugins/tool/test_delegate_to_agent.py(ack, unknown agent, veto read-back, status answers, not-ready path)tests/unit/society/test_scheduler.py(the wall the tool relies on)
Amendment 2026-09-07 — Internal agent messages (RUB-14)
message-agent joins ROUTER_TOOLS as message_agent. It is an internal
communication action with risk safe, executed through ToolExecutor.
It shares MessageAgentTool and the scheduler's durable delivery queue with
society_message_agent; it never invokes an external mail connector or starts
a worker directly. delegate_to_agent remains the assignment path.
The lead tool binds its sender to the runtime's lead. Society tools bind their sender to their owning session. Neither schema accepts an author. Both respect explicit tool denial, inactive roster rows and the master kill switch. Delivery does not authorize the recipient's subsequent external actions.
The board atomically queues new envelopes using an SQLite insertion trigger.
The scheduler serializes draining, preserves FIFO per recipient and retries busy
chats. Existing board history is not replayed by this migration. Chat receipts
use agent_message and agent_message_status, preserving sender identity and
queued/delivered/failed status through storage, API, WebSocket and both chat UIs.
A persisted delivery receipt prevents another turn when the same event is
replayed. Delivery means accepted by the chat, not successful task completion.
Scoped external coding sessions (2026-09-08)
Persistent society agents may receive core:coding-session through their
per-agent grant and approval rules. This narrowly controls existing IDE coding
CLIs; it does not invoke the society scheduler or mission worker dispatcher.
The tool is absent from the global worker catalog and only added to an
authorized society chat's tools, including its subscription-seat MCP catalog,
or the lead's typed Dodaios chat under that chat's own identity and approval rules.
Router membership and the prohibition on recursive worker spawning are
unchanged. Stable workspace/pane IDs and durable request receipts preserve
project and delivery identity across asynchronous work and retries.
Since 2026-10-06 the capability opens coding threads (agent-chat sessions on
the IDE's agent surface) instead of driving terminal panes; the per-pane
supervisor was removed. A coordinator observes the stored events of threads an
agent started and wakes that agent's own chat through the internal message
receipt path when a turn it started finishes, asks, presents a plan or waits
for an approval. It is not a worker spawn tool: the thread runs the vendor CLI
under the person's subscription, every action still passes ToolExecutor, wake-
ups are capped per thread and held by the kill switch, and thread output is
never treated as user authorization.
Receiving turns inherit conversation provenance through task-local context;
new conversations receive fresh traces. Replies retain the trace and parent
event, so the scheduler's conversation cap remains effective. Lead replies go
to the front-page Dodaios chat. Legacy user_message events are not relabeled.
Guards: tests/contract/test_internal_messages.py, the router membership test,
tests/unit/realtime/test_internal_message_regression.py, and the shared
InternalMessageBubble tests. Voice confirmation retries share one result;
a real microphone response captured after playback is not discarded solely
because its transcript resembles the confirmation question.
Amendment 2026-09-29 — Every app action
find-app-action and run-app-action join ROUTER_TOOLS. The Command
Registry keeps its curated, hand-described commands; these two open the rest
of the app's own REST surface (about 765 operations) without declaring a
schema per operation on every turn. find-app-action (risk safe) ranks the
catalog built in-process from the live app's OpenAPI document
(dodaios/app_actions/catalog.py) and returns a few matches with their
parameters. run-app-action sends ONE operation through the same in-process
ASGI transport as app-command.
Pure-Dispatcher spirit is preserved
- Each call's tier comes from
risk_tier_for_args: the person's per-action mode from the stored action policy (allow→ monitor,ask,block; set through/api/app-actionssince the settings page was retired), else the action default (read → safe, change → monitor, dangerous route → ask).ToolExecutor.execute()still evaluates and confirms (AP-3); a blocked action is refused by the evaluator. The same policy applies to the registry commands that share an endpoint. - The catalog never contains credentials, sign-ins, OAuth callbacks, webhooks, the raw control plane, self-modification or the policy routes — voice never carries a secret (AP-2) and Dodaios never edits its own permissions.
- Never a spawn and never in a worker set (AP-5/AP-14): both names are in the
worker broker's forbidden list and in the society
NEVER_GRANTEDset.
Regression guards
tests/unit/brain/test_routing.py (exact router set) and
tests/unit/app_actions/ (catalog exclusions, policy tiers, blocked calls,
parameter mapping).
Amendment 2026-09-30 — Awareness tools retired
awareness-snapshot and awareness-recall leave ROUTER_TOOLS together with
the awareness layer that fed them (ADR-0009, ADR-0012). The layer watched the
foreground window, summarised each stretch of work with a model call, and
put a live snapshot into every turn's context. That cost tokens on every
turn and in the background for a recall feature the product no longer wants.
The evidence gate keeps its activity domain. No tool serves it now, so a
question like "what did I have open today?" gets the gate's honest refusal
("I don't keep a history of your activity") instead of an invented timeline.
Mission workers lose the awareness-recall grant (ADR-0030).
Regression guards
tests/unit/brain/test_routing.py(exact router set)tests/unit/brain/test_evidence_gate.py,tests/unit/brain/test_evidence_gate_wiring.py(honest refusal for theactivitydomain)tests/missions/test_worker_capability_parity.py(the worker grant)
Amendment 2026-10-05 — Marketplace native tool slack
The Slack plugin used to execute through Slack's hosted MCP server. Slack
admits only Marketplace-listed or internal apps to that server; the shared
publisher app is publicly distributed but unlisted, so every end user would
be refused. The catalog entry therefore drops its MCP server block and binds
"native_tool": "slack", a REST tool over the Slack Web API that uses the
same marketplace user token. With no MCP server block, the virtual
mcp-tools/plugin-tools loaders expand to nothing for Slack, so slack
joins ROUTER_TOOLS directly, for the same reason as the other marketplace
native tools.
| Tool | Added | Backing | Risk | Recursion guard? |
|---|---|---|---|---|
slack |
2026-10-05 | Slack Web API (search.messages, conversations.*, users.*, chat.postMessage) via the marketplace user token with rotation refresh |
ask statically; every read downgrades to safe via risk_tier_for_args; post_message stays ask (echo-confirm) |
n/a — a direct REST call, never a spawn; router-tier only (AP-5/AP-14) |
Regression guards
tests/unit/plugins/tool/test_slack_rest.py—ok: falsemapping without echoing provider text,token_expired→ one refresh + retry,Retry-Afterhandling, cursor pagination, channel/DM resolution, per-action risk tiers.tests/unit/brain/test_routing.py(exact router set includesslack).
Amendment 2026-10-13 — Shown tools and find_tools
ROUTER_TOOLS says what the router may call. Which of those schemas ride a
request is a second decision, made per turn in
BrainManager._shortlist_tools (dodaios/brain/tool_shortlist.py).
Until now the answer was "all that fit": when the set exceeded a small
model's window the largest schemas were dropped first, which removed the
richly described tools before the trivial ones, and a dropped tool was
unreachable for the turn. Now the turn's tools are split into a shown
set, chosen by priority (the tool a gate mandated, the caller's own tools,
the everyday core, then the rest), and a deferred rest that stays
callable. A deferred tool named outright runs; find_tools searches the
deferred set by intent and names what matches, and those tools ride the
following rounds as ordinary definitions. When the window is what forced the
split, room for the finder and for what it adds is held back first.
Tools are deferred for three reasons only: the window cannot hold them, the
window marks a small model (32,768 tokens or less, shown 24 tools besides the
pinned ones), or the caller has a role that names its tools
(TurnOverride.tools_direct, set for a society agent with a focus). A hosted
model with room and no role gets the unchanged dict.
find_tools is not a member of ROUTER_TOOLS and not a standing tool: it is
built per turn from that turn's deferred dict and exists only when something
was deferred. It is read-only (safe), searches nothing but the dict it was
built from, and so cannot widen what a turn may call; every call it leads to
still goes through ToolExecutor. A lookup is not an action: it is not
recorded among the tools that ran, gets no spoken acknowledgement and no
"done" marker. No spawn tool enters any set through it
(AP-5/AP-14): it returns only tools the turn already held.
Regression guards
tests/unit/brain/test_tool_shortlist.py(priority, deferral, the loop revealing found tools, the manager's three reasons)tests/unit/brain/test_context_window_fit.py(window and count limits)tests/unit/brain/test_routing.py(exact router set, unchanged)
Amendment 2026-11-02: memory vault tools
memory-search and memory-forget join ROUTER_TOOLS (ADR-0044). Both act
only on the local personal memory vault: search reads it, forget erases the
memory the user named and every version of it. Neither spawns, neither is in
a worker set, and neither is auto-approved for unattended missions, because
the vault holds the user's personal facts.
Regression guards
tests/unit/brain/test_routing.py(exact router set)tests/unit/memory/vault/test_learning_into_vault.py(both tools)