Skip to content

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.

fix(realtime): unify reviewed work on missions

Ruben Lütkeb6b67740b6eb
diff --git a/docs/adr/0011-router-pure-dispatcher.md b/docs/adr/0011-router-pure-dispatcher.md
index b9a29c865a..8d5173387e 100644
--- a/docs/adr/0011-router-pure-dispatcher.md
+++ b/docs/adr/0011-router-pure-dispatcher.md
@@ -4,14 +4,14 @@ slug: adr-0011-router-pure-dispatcher
diataxis: adr
status: active
owner: sam
-last_reviewed: 2026-07-12
+last_reviewed: 2026-07-13
phase: 5
audience: developer
---
# ADR-0011 — Main Jarvis is a Pure Dispatcher with EXACTLY four tools
-**Status:** Amended 2026-07-12
+**Status:** Amended 2026-07-13
**Phase:** Persona refactor §3 — routing fix
## Context
@@ -857,3 +857,50 @@ but model-facing schemas and prompts must not advertise it.
- 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 OpenClaw subprocess
+ path was removed after repeated reliability failures.
+- Rewrite `dispatch-with-review` as a second alias for `spawn-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.
diff --git a/jarvis/brain/factory.py b/jarvis/brain/factory.py
index 01c693c44f..12521293bf 100644
--- a/jarvis/brain/factory.py
+++ b/jarvis/brain/factory.py
@@ -29,10 +29,10 @@ BrainCallback = Callable[[str], Awaitable[str]]
# + Wave-4 amendment ``spawn-sub-jarvis`` -> ``spawn-worker``) and
# Master-Plan §22 / Persona-Mandate Phase 3.
#
-# Baseline after the 2026-07-12 cleanup: run-shell, screen-snapshot,
-# spawn-worker. Phase 8.4 (Plan §6.4 Quality-Gate) added dispatch-with-review,
-# which legitimately extends the set without breaking the pure-dispatcher
-# spirit.
+# Baseline after the 2026-07-13 cleanup: run-shell, screen-snapshot, and
+# spawn-worker. The legacy dispatch-to-harness, multi-spawn, and
+# dispatch-with-review paths are deliberately not model-visible because each
+# duplicated or bypassed the supervised Mission Manager lifecycle.
#
# REMOVED 2026-06-28 — ``dispatch-to-harness`` is intentionally NOT a
# LLM-visible router tool. Its raw ``harness`` parameter let the brain request
@@ -63,9 +63,6 @@ ROUTER_TOOLS = frozenset({
# see the header comment above. Heavy work → spawn-worker; desktop →
# computer-use. The tool remains for the internal local-action fast path.
"spawn-worker",
- # Phase 8.4 (Plan §6.4) — Hauptjarvis calls the quality-gate pipeline
- # explicitly. NEVER downstream in a recursive spawn (D9 recursion guard).
- "dispatch-with-review",
# AI Pointer (pull path): resolve the on-screen element under the mouse
# cursor via the OS accessibility tree. Read-only, safe-tier; the brain
# calls it on deictic questions ("what is this?"). A direct safe-gated read,
diff --git a/jarvis/core/capabilities_seed.py b/jarvis/core/capabilities_seed.py
index dd492adc1b..371a632e47 100644
--- a/jarvis/core/capabilities_seed.py
+++ b/jarvis/core/capabilities_seed.py
@@ -78,7 +78,7 @@ _AWARENESS_OBJECTS: tuple[str, ...] = (
_SEED_CAPABILITIES: list[Capability] = [
# ------------------------------------------------------------------ #
- # ROUTER_TOOLS (11)
+ # LLM-visible router capabilities
# ------------------------------------------------------------------ #
Capability(
id="tool.run-shell",
@@ -117,18 +117,6 @@ _SEED_CAPABILITIES: list[Capability] = [
risk_tier="ask",
requires_evidence=True,
),
- Capability(
- id="tool.dispatch-with-review",
- source="router_tool",
- verbs=_ACTION_VERBS + ("review", "check", "pruefe", "prüfe"), # i18n-allow
- objects=(
- "review", "quality", "qualitaet", "qualität", "critic", # i18n-allow
- "kritik", "check", "pruefung", "prüfung", # i18n-allow
- ),
- description="Dispatch a task through the Quality-Gate (Worker + Critic) pipeline.",
- risk_tier="ask",
- requires_evidence=True,
- ),
Capability(
id="tool.awareness-snapshot",
source="router_tool",
diff --git a/tests/review/test_dispatch_tool.py b/tests/review/test_dispatch_tool.py
index 75ef2e5c0e..11b4ebc705 100644
--- a/tests/review/test_dispatch_tool.py
+++ b/tests/review/test_dispatch_tool.py
@@ -319,11 +319,8 @@ def test_entry_point_registered() -> None:
)
-def test_router_tools_includes_dispatch_with_review() -> None:
- """Plan §AD-14 / Phase 8.4: ROUTER_TOOLS contains dispatch-with-review."""
- # NB: ``SUB_TOOLS`` was deleted in Welle 4 (the Sub-Jarvis tier no longer
- # exists — only "router" remains). The former recursion-guard assertion
- # against SUB_TOOLS is obsolete; updated 2026-06-28.
+def test_router_tools_excludes_dispatch_with_review() -> None:
+ """The legacy review pipeline must not compete with spawn-worker."""
from jarvis.brain.factory import ROUTER_TOOLS
- assert "dispatch-with-review" in ROUTER_TOOLS
+ assert "dispatch-with-review" not in ROUTER_TOOLS
diff --git a/tests/unit/brain/test_routing.py b/tests/unit/brain/test_routing.py
index 62e8a09ebf..578153b592 100644
--- a/tests/unit/brain/test_routing.py
+++ b/tests/unit/brain/test_routing.py
@@ -1093,6 +1093,13 @@ def test_multi_spawn_not_in_router_tools() -> None:
assert "multi-spawn" not in ROUTER_TOOLS
+def test_dispatch_with_review_not_in_router_tools() -> None:
+ """Review belongs to the canonical Mission Manager lifecycle."""
+ from jarvis.brain.factory import ROUTER_TOOLS
+
+ assert "dispatch-with-review" not in ROUTER_TOOLS
+
+
@pytest.mark.parametrize(
"utterance",
[
@@ -1691,8 +1698,6 @@ def test_router_tools_is_pure_dispatcher_set() -> None:
# spawn-worker, desktop → computer-use. It must NOT reappear here;
# the negative guard ``test_dispatch_to_harness_not_in_router_tools``
# pins that.
- # Phase 8.4 (Quality-Gate, Recursion-geschuetzt analog spawn-worker)
- "dispatch-with-review",
# AI Pointer (pull path): resolve the element under the mouse cursor
# via the OS accessibility tree. Read-only safe-tier, direct action,
# never a spawn (AP-5/AP-14). See docs/plans/ai-pointer/DESIGN.md.
diff --git a/tests/unit/core/test_capabilities.py b/tests/unit/core/test_capabilities.py
index ff4549c1f3..2bc453c77c 100644
--- a/tests/unit/core/test_capabilities.py
+++ b/tests/unit/core/test_capabilities.py
@@ -318,7 +318,6 @@ class TestSeedRegistry:
# NB: tool.dispatch-to-harness removed 2026-06-28 (no longer an
# LLM-visible router tool — phantom-openclaw routing fix).
"tool.spawn-worker",
- "tool.dispatch-with-review",
"tool.awareness-snapshot",
"tool.awareness-recall",
"tool.run-skill",
@@ -348,6 +347,11 @@ class TestSeedRegistry:
ids = {c.id for c in self.reg.all()}
assert "tool.multi-spawn" not in ids
+ def test_dispatch_with_review_capability_removed(self) -> None:
+ """Review is part of spawn-worker, never a competing router action."""
+ ids = {c.id for c in self.reg.all()}
+ assert "tool.dispatch-with-review" not in ids
+
def test_local_actions_present(self) -> None:
ids = {c.id for c in self.reg.all()}
for la in (
@@ -394,7 +398,6 @@ class TestSeedRegistry:
"tool.run-shell",
"tool.screen-snapshot",
"tool.spawn-worker",
- "tool.dispatch-with-review",
"tool.run-skill",
"tool.wiki-ingest",
}