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.

docs(contract): the evidence a change owes scales with what it touches

Haraldcdf7456fafcd
diff --git a/AGENTS.md b/AGENTS.md
index 082347d12d..f998ce47ac 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -34,36 +34,39 @@ published GitHub Release; `check_release_completeness.py` before and after).
## 3. Open-source universality (BINDING)
Assume an arbitrary downloader, never the maintainer: ANY single key works
(capability-gated, cross-family fallback, honest degradation, AP-21/22); every
-OS incl. headless `python:3.11-slim` (base stays torch-free; GPU deps in
-`[local-voice]`); credentials recoverable IN-APP (keyring → ENV → file).
-macOS/Linux ship in the SAME change behind one capability probe or degrade
-honestly (+ `docs/os-parity.md`). Done = the five non-maintainer paths (§3).
-**Provider & mode parity (BINDING):** every feature — and every analysis,
-plan, or estimate BEFORE it — targets the FULL matrix from the first
-sentence: every provider family and key (all Brain/Tool-Model providers incl.
-local Ollama/llama.cpp, every realtime transport `openai-realtime` /
-`gemini-live` / `vertex-live` / tool-less handoff, every STT/TTS/Vision/Wake
-— enumerated by `jarvis/core/config.py` + `jarvis/realtime/factory.py`,
-NEVER by the dev box's `jarvis.toml`) × every mode and surface (realtime
-engine AND classic pipeline, text chat, browser/headless, channels, CLI) ×
-every OS. A transport-specific trick is ONE declared capability; every other
-transport gets the generic path, an emulation, or honest degradation with a
-stated reason. "Works on vertex-live" / "works in realtime mode" is one cell,
-not done; plans and PRs name the cells they cover, emulate, and degrade.
+OS incl. headless `python:3.11-slim` (base install + boot must succeed there;
+extras group, env marker, or lazy import — whichever fits); credentials
+recoverable IN-APP (keyring → ENV → file). Enumerate providers from the CODE
+(`jarvis/core/config.py`, `jarvis/realtime/factory.py`), NEVER from the dev
+box's `jarvis.toml`. A transport-specific trick is ONE declared capability;
+every other transport gets the generic path, an emulation, or honest
+degradation with a stated reason.
+
+**Proportionality (BINDING).** The evidence a change owes is set by the surface
+it touches. Decide the tier in one line, then owe only that tier:
+**T1 local** (styling, copy, one view, a test, a doc, a refactor behind one
+call site) → nothing extra, ship it; a matrix here is noise, not diligence.
+**T2 one surface** (an existing adapter, transport, channel, or OS backend,
+shared contract unchanged) → name the cells you touched and what the others do
+(unchanged / emulated / degraded) + tests for that family.
+**T3 contract** (a capability, shared interface, turn-taking, credentials,
+config schema, a NEW provider/transport/OS backend) → full treatment: matrix
+named, `tests/contract/` per family, the five non-maintainer paths verified,
+all three OSes in the SAME change behind one capability probe (+
+`docs/os-parity.md`). Unsure between T2 and T3 → it is T3. Over-tiering is
+also a defect. Full table + the five paths: `docs/agent-contract.md` §3.
+
Device triage: version lag → setup divergence → OS gap.
Ollama/llama.cpp defaults, recommendations, and examples must be verified
against the official live catalog when changed and use a current,
hardware-fitting generation/quantization; an artifact shown as one year old
or older must never be a default or recommendation. A measured compatibility
pin may remain only as a documented non-general exception with a removal test.
-Marketplace — the standard binds US first: only a registry-published entry
-(Agent Plugins 1.0.0 `plugin.json` + `mcp.json`, publisher/version/date/install
-command) may appear in the store's list, counts, search, chips, tabs or detail
-pages; `seed_catalog.json` connectors ship with the app, are NOT listings, and
-belong in the "built in" wall; a built-in reaches the store only via a registry
-PR like anyone else's; "Official" names the author, never a review — every
-registry entry keeps "Not human-reviewed". Binds app + registry + storefront
-(`personal-jarvis-webui`) alike.
+**Marketplace** — the standard binds US first: only a registry-published entry
+is a listing; `seed_catalog.json` connectors ship with the app and are NOT
+listings; a built-in reaches the store only via a registry PR like anyone
+else's; "Official" names the author, never a review. Binds app + registry +
+storefront alike. Full rules: `docs/agent-contract.md` §3.
## 4. Naming (BINDING)
Internal: **Jarvis-Agents**. User-visible brand is DYNAMIC from the wake word
@@ -82,15 +85,16 @@ kill-on-crash + tool broker (ADR-0025/26); UTF-8 + `NO_WINDOW_CREATIONFLAGS`
on every subprocess. Safety tiers safe/monitor/ask/block, blacklist >
whitelist > default; only `ToolExecutor.execute()`; skills stay `draft`.
-## 7. Anti-patterns AP-1..31 + bug classes (BINDING)
-Full register: `docs/agent-contract.md` §7–8. Essence: no keys via voice/chat;
+## 7. Anti-patterns AP-1..31 (BINDING)
+Full register: `docs/agent-contract.md` §7; §8 there reads it backward
+(symptom → cause) when you are debugging. Essence: no keys via voice/chat;
enum strings in ALL five layers; no spawn tools in worker sets; atomic TOML
writes only; preflight every new worktree (restore trap!); nothing heavy on
the boot critical path; no LLM in the voice scrubber; native inference = lock
+ fresh-model recover; GPU wake gates ONLY on the inference probe; wake
verification word-agnostic, never transcript content; no `isinstance` gates
on unpinned libs; signing private keys ONLY in GH Actions secrets; no silent
-`except`; no unread config switch. Bug classes → [`docs/BUGS.md`](docs/BUGS.md).
+`except`; no unread config switch.
## 9. Operational reality & git
Working tree is SHARED: stage only YOUR files (`git add -p`/pathspec, never
diff --git a/CLAUDE.md b/CLAUDE.md
index 082347d12d..f998ce47ac 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -34,36 +34,39 @@ published GitHub Release; `check_release_completeness.py` before and after).
## 3. Open-source universality (BINDING)
Assume an arbitrary downloader, never the maintainer: ANY single key works
(capability-gated, cross-family fallback, honest degradation, AP-21/22); every
-OS incl. headless `python:3.11-slim` (base stays torch-free; GPU deps in
-`[local-voice]`); credentials recoverable IN-APP (keyring → ENV → file).
-macOS/Linux ship in the SAME change behind one capability probe or degrade
-honestly (+ `docs/os-parity.md`). Done = the five non-maintainer paths (§3).
-**Provider & mode parity (BINDING):** every feature — and every analysis,
-plan, or estimate BEFORE it — targets the FULL matrix from the first
-sentence: every provider family and key (all Brain/Tool-Model providers incl.
-local Ollama/llama.cpp, every realtime transport `openai-realtime` /
-`gemini-live` / `vertex-live` / tool-less handoff, every STT/TTS/Vision/Wake
-— enumerated by `jarvis/core/config.py` + `jarvis/realtime/factory.py`,
-NEVER by the dev box's `jarvis.toml`) × every mode and surface (realtime
-engine AND classic pipeline, text chat, browser/headless, channels, CLI) ×
-every OS. A transport-specific trick is ONE declared capability; every other
-transport gets the generic path, an emulation, or honest degradation with a
-stated reason. "Works on vertex-live" / "works in realtime mode" is one cell,
-not done; plans and PRs name the cells they cover, emulate, and degrade.
+OS incl. headless `python:3.11-slim` (base install + boot must succeed there;
+extras group, env marker, or lazy import — whichever fits); credentials
+recoverable IN-APP (keyring → ENV → file). Enumerate providers from the CODE
+(`jarvis/core/config.py`, `jarvis/realtime/factory.py`), NEVER from the dev
+box's `jarvis.toml`. A transport-specific trick is ONE declared capability;
+every other transport gets the generic path, an emulation, or honest
+degradation with a stated reason.
+
+**Proportionality (BINDING).** The evidence a change owes is set by the surface
+it touches. Decide the tier in one line, then owe only that tier:
+**T1 local** (styling, copy, one view, a test, a doc, a refactor behind one
+call site) → nothing extra, ship it; a matrix here is noise, not diligence.
+**T2 one surface** (an existing adapter, transport, channel, or OS backend,
+shared contract unchanged) → name the cells you touched and what the others do
+(unchanged / emulated / degraded) + tests for that family.
+**T3 contract** (a capability, shared interface, turn-taking, credentials,
+config schema, a NEW provider/transport/OS backend) → full treatment: matrix
+named, `tests/contract/` per family, the five non-maintainer paths verified,
+all three OSes in the SAME change behind one capability probe (+
+`docs/os-parity.md`). Unsure between T2 and T3 → it is T3. Over-tiering is
+also a defect. Full table + the five paths: `docs/agent-contract.md` §3.
+
Device triage: version lag → setup divergence → OS gap.
Ollama/llama.cpp defaults, recommendations, and examples must be verified
against the official live catalog when changed and use a current,
hardware-fitting generation/quantization; an artifact shown as one year old
or older must never be a default or recommendation. A measured compatibility
pin may remain only as a documented non-general exception with a removal test.
-Marketplace — the standard binds US first: only a registry-published entry
-(Agent Plugins 1.0.0 `plugin.json` + `mcp.json`, publisher/version/date/install
-command) may appear in the store's list, counts, search, chips, tabs or detail
-pages; `seed_catalog.json` connectors ship with the app, are NOT listings, and
-belong in the "built in" wall; a built-in reaches the store only via a registry
-PR like anyone else's; "Official" names the author, never a review — every
-registry entry keeps "Not human-reviewed". Binds app + registry + storefront
-(`personal-jarvis-webui`) alike.
+**Marketplace** — the standard binds US first: only a registry-published entry
+is a listing; `seed_catalog.json` connectors ship with the app and are NOT
+listings; a built-in reaches the store only via a registry PR like anyone
+else's; "Official" names the author, never a review. Binds app + registry +
+storefront alike. Full rules: `docs/agent-contract.md` §3.
## 4. Naming (BINDING)
Internal: **Jarvis-Agents**. User-visible brand is DYNAMIC from the wake word
@@ -82,15 +85,16 @@ kill-on-crash + tool broker (ADR-0025/26); UTF-8 + `NO_WINDOW_CREATIONFLAGS`
on every subprocess. Safety tiers safe/monitor/ask/block, blacklist >
whitelist > default; only `ToolExecutor.execute()`; skills stay `draft`.
-## 7. Anti-patterns AP-1..31 + bug classes (BINDING)
-Full register: `docs/agent-contract.md` §7–8. Essence: no keys via voice/chat;
+## 7. Anti-patterns AP-1..31 (BINDING)
+Full register: `docs/agent-contract.md` §7; §8 there reads it backward
+(symptom → cause) when you are debugging. Essence: no keys via voice/chat;
enum strings in ALL five layers; no spawn tools in worker sets; atomic TOML
writes only; preflight every new worktree (restore trap!); nothing heavy on
the boot critical path; no LLM in the voice scrubber; native inference = lock
+ fresh-model recover; GPU wake gates ONLY on the inference probe; wake
verification word-agnostic, never transcript content; no `isinstance` gates
on unpinned libs; signing private keys ONLY in GH Actions secrets; no silent
-`except`; no unread config switch. Bug classes → [`docs/BUGS.md`](docs/BUGS.md).
+`except`; no unread config switch.
## 9. Operational reality & git
Working tree is SHARED: stage only YOUR files (`git add -p`/pathspec, never
diff --git a/docs/agent-contract.md b/docs/agent-contract.md
index dc4ede1590..b557dbbabe 100644
--- a/docs/agent-contract.md
+++ b/docs/agent-contract.md
@@ -213,6 +213,23 @@ designed for the FULL matrix from the first sentence (maintainer directive
channels (Telegram / Discord / webhook / SMS), the CLI.
- **Every OS** — see the next subsection.
+**Proportionality (BINDING, added 2026-08-20).** This section states the
+standard, not the ceremony every change must perform. The evidence a change
+owes is set by the SURFACE IT TOUCHES, in three tiers — decide the tier first,
+in one line, and then owe only that tier:
+
+| Tier | What you touched | What you owe |
+|---|---|---|
+| **1 — Local** | Styling, copy, a single view, a test, a doc, a refactor behind one call site. Nothing provider-, mode-, or OS-facing. | Nothing extra. Ship it. Naming a matrix here is noise, not diligence. |
+| **2 — One surface** | An existing provider adapter, one transport, one channel, one OS backend — without changing the shared contract. | Name the cells you touched and what happens on the others (unchanged / emulated / degraded). Tests for the family you touched. |
+| **3 — Contract** | A capability, a shared interface, turn-taking, credentials, config schema, a new provider/transport/OS backend, anything the five paths below can brick. | The full treatment: the matrix named, `tests/contract/` coverage per family, and the five non-maintainer paths verified. |
+
+Tier 3 is where this project earns its promise; tiers 1 and 2 are where it
+stays fast. **Mis-tiering downward is the defect** — if you are unsure whether a
+change is 2 or 3, it is 3. Mis-tiering *upward* is also a defect: a CSS fix
+that arrives with a provider matrix wasted the effort that a real tier-3
+change deserved. State the tier in the PR or commit body; one line is enough.
+
Rules:
1. **Design once, capability-gated (AP-21).** A transport- or
@@ -222,12 +239,12 @@ Rules:
through the generic path or an emulation, or degrades honestly with a
stated reason. "Works on vertex-live" or "works in realtime mode" is one
cell of the matrix, not done.
-2. **Name the matrix before building.** An assessment, plan, ADR, or PR
- that touches a provider- or mode-facing path states which cells it
- covers natively, which it emulates, and which degrade — and why. The
- maintainer's cell is never the implicit reference; an analysis that
+2. **Name the matrix before building — at tier 2 and above.** An assessment,
+ plan, ADR, or PR that touches a provider- or mode-facing path states which
+ cells it covers natively, which it emulates, and which degrade — and why.
+ The maintainer's cell is never the implicit reference; an analysis that
reasons only from the dev box's current provider is incomplete and is
- redone.
+ redone. At tier 1 this rule does not apply at all.
3. **Test the families, not the favourite.** A change to a provider-facing
contract lands with `tests/contract/` coverage or fakes for each family
it touches; a change to turn-taking, acknowledgments, interim speech, or
@@ -239,8 +256,10 @@ Rules:
### OS feature parity — macOS and Linux are first-class (BINDING)
-Every feature ships working on **all three OSes in the SAME change**, never
-as a "later" follow-up. OS-specific backends live behind ONE capability probe
+Every feature that TOUCHES an OS-specific path ships working on **all three
+OSes in the SAME change**, never as a "later" follow-up. (Tier 1 work touches
+no such path and owes nothing here — a component that only renders does not
+need a macOS story.) OS-specific backends live behind ONE capability probe
(Win32/UIA ↔ AppleScript/Quartz/AXUIElement ↔ xdotool/AT-SPI/D-Bus);
`sys.platform == "win32"` with silent nothing elsewhere is a defect. Where a
backend is genuinely impossible (headless), degrade to a clearly-messaged
@@ -248,9 +267,10 @@ English no-op. A Windows-only implementation lands ONLY with the capability
gate + honest degradation + a tracked entry in
[`docs/os-parity.md`](os-parity.md).
-**Definition of done** for any change touching config, credentials, a
-provider/integration, a voice engine, a chat/channel surface, or OS-specific
-code — verify the FIVE non-maintainer paths (test or honest manual trace):
+**Definition of done — TIER 3 ONLY** (a capability, a shared interface,
+credentials, config schema, a new provider / transport / OS backend). At tier 1
+and 2 this list does not apply; see the proportionality table above. When it
+does apply, verify the FIVE non-maintainer paths (test or honest manual trace):
1. **Fresh install, ONE arbitrary key** reaches a working path (chat + voice
+ Jarvis-Agent + the touched feature), entirely in-app.
@@ -555,31 +575,25 @@ verifier blocks + fingerprints. Enforced by
---
-## 8. Recurring bug classes (signal → defense)
-
-Detail in [`docs/BUGS.md`](BUGS.md):
-
-1. **Restore trap** (BUG-006/014/015) — fix "works in tests" but behavior
- unchanged after restart → `pwsh scripts/preflight.ps1` +
- `python -c "import jarvis; print(jarvis.__file__)"`.
-2. **Enum drift** (BUG-008) — empty UI list while the DB has rows, Pydantic
- `literal_error` → five-layer pattern + parity test.
-3. **Config drift** (BUG-010) — parallel sessions silently rolling back
- `jarvis.toml` switches → `scripts/drift-guard-daemon.ps1` + ENV overrides
- + BOM-safe writer.
-4. **Console flicker** (BUG-012) — import `NO_WINDOW_CREATIONFLAGS` from
- `jarvis.core.process_utils`.
-5. **Audio host-API trap** (BUG-014) — WDM-KS auto-picked, PortAudio crashes
- → `_FORBIDDEN_OUTPUT_HOSTAPIS` + shortest-unique-token matching.
-6. **Stale watchdog counter** (BUG-032) — watchdog fires between units →
- reset the counter per unit of work (AP-19).
-7. **Socket loop on teardown error** — treat any read error as terminal,
- `break` (AP-20).
-8. **Wedged native inference** (BUG-036) — non-blocking lock + rebuild a
- fresh model (AP-24).
-9. **Wake transcript traps** (BUG-037) — "fires on silence" / "goes deaf on
- its own wake word" share one root; word-agnostic verification only
- (AP-27).
+## 8. Recurring bug classes — symptom → cause
+
+§7 reads forward (*don't do this*). This table reads BACKWARD: you are staring
+at a symptom and want the anti-pattern behind it. That is its whole job — it
+adds no rules of its own. Detail in [`docs/BUGS.md`](BUGS.md).
+
+| You are seeing… | It is | Fix |
+|---|---|---|
+| Fix works in tests, behaviour unchanged after restart | Restore trap (BUG-006/014/015) | `pwsh scripts/preflight.ps1`, then `python -c "import jarvis; print(jarvis.__file__)"` (AP-8) |
+| Empty UI list while the DB has rows; Pydantic `literal_error` | Enum drift (BUG-008, 4× recurrence) | Five-layer pattern + parity test (AP-4) |
+| A `jarvis.toml` switch silently rolls back | Config drift (BUG-010) | Drift-guard daemon + ENV override + BOM-safe writer (AP-7) |
+| Console windows flickering under `pythonw` | Console flicker (BUG-012) | `NO_WINDOW_CREATIONFLAGS` from `jarvis.core.process_utils` (AP-1) |
+| TTS silent, PortAudio crashes | Audio host-API trap (BUG-014) | `_FORBIDDEN_OUTPUT_HOSTAPIS` + shortest-unique-token matching |
+| Watchdog aborts a fresh answer | Stale counter (BUG-032) | Reset per unit of work (AP-19) |
+| Receive loop spinning on a dead socket | Socket teardown | Any read error is terminal — `break` (AP-20) |
+| STT wedged permanently, timeouts do not recover it | Wedged native inference (BUG-036, BUG-151 open) | Non-blocking lock + rebuild a fresh model (AP-24) |
+| Wake fires on silence, or goes deaf on its own word | Wake transcript trap (BUG-037) | One root, not two: word-agnostic verification only (AP-27) |
+| A feature "half works" and nothing is logged | Silent handler | Log, re-raise, or say why silence is right (AP-30) |
+| A settings switch changes nothing | Unwired config | Read the value or delete the field (AP-31) |
---