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.

chore: auto-save WIP via Claude stop-hook safety net (2026-07-01 13:16)

Ruben Lütkeafc914983b39
diff --git a/.claude/agents/jarvis-critic-design-reviewer.md b/.claude/agents/jarvis-critic-design-reviewer.md
index 701536769d..e777788995 100644
--- a/.claude/agents/jarvis-critic-design-reviewer.md
+++ b/.claude/agents/jarvis-critic-design-reviewer.md
@@ -72,7 +72,7 @@ The constant `MAX_CRITIC_LOOPS` is defined as a module-level `Final[int] = 3`, N
**Beleg:** `<datei:zeile>`
<…>
-### Kriterium 4 — verdict=approve nur bei allen axes pass: <PASS|FAIL>
+### Criterion 4 — verdict=approve only when all axes pass: <PASS|FAIL>
**Beleg:** `<datei:zeile>`
<…>
@@ -94,7 +94,7 @@ The constant `MAX_CRITIC_LOOPS` is defined as a module-level `Final[int] = 3`, N
## Edge cases
-- **Critic module does not exist yet** (Phase 3 of Phase 6 not yet implemented): return `CRITIC_MODULE_NOT_FOUND — pruefe `jarvis/missions/critic/` und liefere mir die Pfade nach Implementierung`. Stop.
+- **Critic module does not exist yet** (Phase 3 of Phase 6 not yet implemented): return `CRITIC_MODULE_NOT_FOUND — check `jarvis/missions/critic/` and provide me the paths after implementation`. Stop.
- **Cross-model Critic is configured** (Worker = Claude, Critic = Codex/GPT): additionally check whether the auth flow is compliant with ADR-0009 §3 (separate `CODEX_HOME` per worker).
- **Pydantic schema instead of JSON schema:** acceptable — check the Pydantic model instead of the JSON file. The criteria apply analogously.
- **Prompt templates in a YAML/Jinja file** instead of a Python string: read the template file; the criteria apply against the rendered prompt.
diff --git a/.claude/commands/p6-status.md b/.claude/commands/p6-status.md
index 5c1cb6e796..cbe9b6b9ed 100644
--- a/.claude/commands/p6-status.md
+++ b/.claude/commands/p6-status.md
@@ -20,17 +20,17 @@ Deliver a compact Markdown table:
| Sub-Phase | Files | Tests | ADR | Status |
|---|---|---|---|---|
-| 1 Foundation | N/M Files vorhanden | N/M Tests grün | ADR-0009 §X | DONE/PARTIAL/MISSING |
+| 1 Foundation | N/M Files present | N/M Tests passing | ADR-0009 §X | DONE/PARTIAL/MISSING |
| ... |
## Letzte Commits
-<git log Output, max 10 Zeilen>
+<git log output, max 10 lines>
## Offene Follow-Ups
- B1 Lock-Holding: <FIXED|OPEN>, Beleg `<file:line>`
- B2 Event-Payload-PII: <FIXED|OPEN>, Beleg `<file:line>`
-## Empfohlener nächster Schritt
+## Recommended next step
<ein Satz>
```
diff --git a/.claude/skills/publish-new-version/SKILL.md b/.claude/skills/publish-new-version/SKILL.md
index f73e52285a..c0326b2eab 100644
--- a/.claude/skills/publish-new-version/SKILL.md
+++ b/.claude/skills/publish-new-version/SKILL.md
@@ -3,9 +3,8 @@ name: publish-new-version
description: >-
Use when the maintainer wants to publish / ship a new PUBLIC version of
Personal Jarvis to GitHub — the periodic (~biweekly) release of the current
- folder state to the one public repo. Triggers: "veröffentliche eine neue
- Version", "neue Jarvis-Version raus", "mach ein Release", "push nach GitHub",
- "publish the new version", "cut a release", "neue Public-Version". NOT for
+ folder state to the one public repo. Triggers: "publish a new version", "new Jarvis version out", "make a release", "push to GitHub",
+ "publish the new version", "cut a release", "new public version". NOT for # i18n-allow
untangling git chaos (use git-rescue) and NOT a quick local-only commit.
---
diff --git a/docs/handoffs/report-tutorial-review-answers.md b/docs/handoffs/report-tutorial-review-answers.md
index ac55803a9f..4c863ba04b 100644
--- a/docs/handoffs/report-tutorial-review-answers.md
+++ b/docs/handoffs/report-tutorial-review-answers.md
@@ -21,7 +21,7 @@
The first name "Ruben" is shown on purpose (he introduces himself by name).
- **One genuine, actionable finding:** the in-video GitHub screenshot
(`video/public/shot-github.png`, used in the CreatorIntro scene) shows the **real
- surname "Ruben Lütke"** and GitHub login **"rubenluetke10-beep"** in the
+ surname "Ruben Lütke"** and GitHub login **"rubenluetke10-beep"** in the <!-- i18n-allow -->
contributor list — readable at 4K / on pause. It is also **stale** (the public
history has since been anonymized, so the video would show data that no longer
exists in the live repo).
diff --git a/docs/plans/capability-coupling/EXTENSIBILITY.md b/docs/plans/capability-coupling/EXTENSIBILITY.md
index 01c28ae2d4..a5e43ffb55 100644
--- a/docs/plans/capability-coupling/EXTENSIBILITY.md
+++ b/docs/plans/capability-coupling/EXTENSIBILITY.md
@@ -21,8 +21,8 @@ from jarvis.core.capabilities import Capability
MY_GMAIL_CAPABILITY = Capability(
id="mcp.gmail/send_mail",
source="mcp",
- verbs=("schick", "sende", "send", "mail", "email"),
- objects=("email", "mail", "nachricht", "message"),
+ verbs=("schick", "sende", "send", "mail", "email"), # i18n-allow
+ objects=("email", "mail", "nachricht", "message"), # i18n-allow
description="Send an email via the Gmail MCP server.",
risk_tier="ask", # user confirmation required before sending
requires_evidence=True, # Critic must see a tool-call to ratify success
@@ -58,8 +58,8 @@ description. If the auto-derived verbs/objects are wrong, override them in
```toml
[capabilities.mcp.gmail.send_mail]
-verbs = ["schick", "sende", "send", "mail", "email"]
-objects = ["email", "mail", "nachricht", "message"]
+verbs = ["schick", "sende", "send", "mail", "email"] # i18n-allow
+objects = ["email", "mail", "nachricht", "message"] # i18n-allow
```
**Harness adapter** — call `registry.register(...)` inside the adapter's
diff --git a/docs/plans/capability-coupling/SPEC.md b/docs/plans/capability-coupling/SPEC.md
index af94ccb563..8bd68bf4fc 100644
--- a/docs/plans/capability-coupling/SPEC.md
+++ b/docs/plans/capability-coupling/SPEC.md
@@ -69,7 +69,7 @@ New mode `UNSUPPORTED` is added to `LocalActionMode`; manager.py routes it direc
- Emit `_unsupported_response(text)` via the same TTS path as a normal short reply.
Response phrasing (deterministic, no LLM):
-- DE: *"Das kann ich noch nicht. Mir fehlt dafür ein Werkzeug — wenn du mir verrätst welches MCP oder welche Integration zuständig wäre, kann ich's lernen."* ("I can't do that yet. I'm missing a tool for it — if you tell me which MCP or integration should be responsible, I can learn it.")
+- DE: *"Das kann ich noch nicht. Mir fehlt dafür ein Werkzeug — wenn du mir verrätst welches MCP oder welche Integration zuständig wäre, kann ich's lernen."* ("I can't do that yet. I'm missing a tool for it — if you tell me which MCP or integration should be responsible, I can learn it.") <!-- i18n-allow: product voice output DE -->
- EN: *"I can't do that yet. I don't have a registered tool for it. Tell me which MCP or integration should handle it and I can learn."*
---
@@ -77,10 +77,10 @@ Response phrasing (deterministic, no LLM):
### Layer 3 — Capability-Aware Prompts + Critic Honesty
**3a. System prompt (`manager.py:770-786`)** — replace the hardcoded `NUTZE: search_web / cli_* / dispatch_to_harness` block with `registry.render_for_prompt(lang)`. Append a hard rule:
-> You must never claim to perform an action that is not listed above. If the user asks for one, respond with: "Das kann ich noch nicht — mir fehlt das passende Werkzeug." ("I can't do that yet — I'm missing the right tool.") Do not invent tools.
+> You must never claim to perform an action that is not listed above. If the user asks for one, respond with: "Das kann ich noch nicht — mir fehlt das passende Werkzeug." ("I can't do that yet — I'm missing the right tool.") Do not invent tools. <!-- i18n-allow: product voice output DE -->
**3b. Ack-Brain persona (`jarvis/brain/ack_brain/persona_prompt.py`)** — extend the forbidden vocabulary list with action-promise patterns:
-- "mache ich" ("I'll do it"), "wird erledigt" ("will be taken care of"), "ist gesendet" ("is sent"), "ist eingetragen" ("is entered"), "kümmere mich" ("I'll handle it")
+- "mache ich" ("I'll do it"), "wird erledigt" ("will be taken care of"), "ist gesendet" ("is sent"), "ist eingetragen" ("is entered"), "kümmere mich" ("I'll handle it") <!-- i18n-allow: product speech output patterns -->
- "I'll do that", "will be sent", "will be scheduled", "consider it done"
The Ack-Brain is allowed only: (a) acoustic acknowledgment ("mhm", "verstanden" / "understood"), (b) context-restating questions ("welche Adresse?" / "which address?"), (c) silence on uncertainty.
diff --git a/jarvis/speech/pipeline.py b/jarvis/speech/pipeline.py
index d86cf713a2..52598f6ba8 100644
--- a/jarvis/speech/pipeline.py
+++ b/jarvis/speech/pipeline.py
@@ -6937,7 +6937,14 @@ class SpeechPipeline:
start = time.monotonic()
task: asyncio.Task[tuple[str, bool]] = asyncio.ensure_future(coro)
monitor_task: asyncio.Task[bool] | None = None
- if interrupt_monitor and getattr(self, "_continuation_interrupt_enabled", False):
+ if (
+ interrupt_monitor
+ and getattr(self, "_continuation_interrupt_enabled", False)
+ # Mute is an input-only contract: while muted the user has told us to
+ # stop listening, so never open the thinking-interrupt monitor's
+ # second mic (a mid-turn mute is handled below by standing it down).
+ and not getattr(self, "_muted", False)
+ ):
self._brain_first_frame_played = False
monitor_task = asyncio.create_task(
self._barge_monitor(
@@ -6978,6 +6985,26 @@ class SpeechPipeline:
except (asyncio.CancelledError, Exception): # noqa: BLE001, S110
pass
monitor_task = None
+ elif getattr(self, "_muted", False):
+ # Voice muted mid-think (orb double-click → _muted=True):
+ # the user said "stop listening to me". The thinking-
+ # interrupt monitor is an INPUT path, so it must honour mute
+ # exactly like the wake loop (_activation_allowed) and
+ # _speak do. Otherwise it aborts the turn on the muted
+ # second mic while the muted wake loop can NEVER capture the
+ # recombination utterance — silently killing a fully-worked
+ # turn (live bug 2026-07-01 "Was steht alles in meinen
+ # E-Mails drin?": 6 mails fetched, a barge on the muted mic
+ # → empty answer, empty transcript). Stand the monitor down
+ # unconditionally and let the brain finish; its answer still
+ # lands as text. Clearing it here (not just skipping the
+ # abort) also avoids a busy-spin on an already-done monitor.
+ monitor_task.cancel()
+ try:
+ await monitor_task
+ except (asyncio.CancelledError, Exception): # noqa: BLE001, S110
+ pass
+ monitor_task = None
elif (
monitor_task in done
and not monitor_task.cancelled()
@@ -7645,6 +7672,15 @@ class SpeechPipeline:
residual = np.empty(0, dtype=np.float32)
speech_run = 0
async for chunk in mic.stream():
+ # Honour the global mute (orb double-click → _muted=True):
+ # while muted the user has told us to stop listening, so a
+ # barge must never fire on this second mic — mirrors
+ # _activation_allowed / _speak, which both short-circuit on
+ # _muted. Without this the thinking-interrupt monitor aborted a
+ # muted-but-still-working turn (live bug 2026-07-01).
+ if getattr(self, "_muted", False):
+ speech_run = 0
+ continue
# Echo-suppression (spec §4.2): while our own ACK/preamble
# audio is still within the post-TTS suppression window, skip
# detection so the thinking-interrupt monitor never mistakes
diff --git a/tests/unit/speech/test_thinking_interrupt_monitor.py b/tests/unit/speech/test_thinking_interrupt_monitor.py
index 1fbe2ac2e4..0761c768eb 100644
--- a/tests/unit/speech/test_thinking_interrupt_monitor.py
+++ b/tests/unit/speech/test_thinking_interrupt_monitor.py
@@ -114,6 +114,68 @@ async def test_disabled_does_not_start_monitor(monkeypatch):
assert started["called"] is False
+# --- Mute must silence the thinking-interrupt monitor --------------------- #
+# Live bug 2026-07-01 ("Was steht alles in meinen E-Mails drin?"): while the
+# brain was mid-think (6 Gmail messages already fetched) the user muted via the
+# orb double-click. The thinking-interrupt monitor is a SECOND live mic that
+# ignored the mute, "heard" audio, and aborted the fully-worked turn — empty
+# answer, empty transcript. The muted wake loop could never capture a
+# recombination utterance, so the turn died silently. Mute is an input-only
+# contract (see _activation_allowed / _speak): the monitor must honour it too.
+
+
+async def test_muted_session_does_not_abort_brain_turn(monkeypatch):
+ """A mute that flips mid-think must stand the thinking-interrupt monitor down
+ instead of aborting: the turn completes and its answer is returned."""
+ p = _guard_pipeline()
+ p._muted = True
+
+ async def fake_monitor(*, grace_s, respect_input_suppression=False):
+ # The monitor's second mic "hears" audio even though voice is muted.
+ return True
+
+ async def working_brain():
+ await asyncio.sleep(0.05)
+ return ("your inbox summary", False)
+
+ monkeypatch.setattr(p, "_barge_monitor", fake_monitor)
+ monkeypatch.setattr(p, "_mark_brain_progress", lambda: None)
+
+ response, barged = await asyncio.wait_for(
+ p._run_brain_with_stall_guard(working_brain(), interrupt_monitor=True),
+ timeout=5.0,
+ )
+ assert response == "your inbox summary"
+ assert barged is False
+
+
+async def test_muted_session_does_not_start_thinking_monitor(monkeypatch):
+ """When voice is already muted the thinking-interrupt monitor must not even
+ open its second mic — mute means 'stop listening to me'."""
+ p = _guard_pipeline()
+ p._muted = True
+ started = {"called": False}
+
+ async def tracking_monitor(*, grace_s, respect_input_suppression=False):
+ started["called"] = True
+ return True
+
+ async def quick_brain():
+ return ("ok", False)
+
+ monkeypatch.setattr(p, "_barge_monitor", tracking_monitor)
+ monkeypatch.setattr(p, "_mark_brain_progress", lambda: None)
+
+ response, barged = await p._run_brain_with_stall_guard(
+ quick_brain(), interrupt_monitor=True
+ )
+ assert response == "ok"
+ assert barged is False
+ assert started["called"] is False
+
+
# --- Behavioral tests driving the REAL _brain_streaming path -------------- #
# The four tests above drive _run_brain_with_stall_guard in isolation and flip
# _brain_first_frame_played by hand. These two pin the handoff against the ACTUAL