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.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
ci: update workflows, pre-push guard & CI helper scripts
Ruben Lütkeda58b868d497
diff --git a/.githooks/pre-push b/.githooks/pre-pushindex e11f0ff1ec..585f6082b3 100755--- a/.githooks/pre-push+++ b/.githooks/pre-push@@ -103,6 +103,20 @@ if [ -f "$cli_gate" ]; thenfifi+# --- 4) CLI DOCGEN drift gate (FAIL-CLOSED) -----------------------------------+# docs/jarvis-cli-reference.md is generated from the curated command tree; this+# fails the push if a command was added/changed without regenerating it. Static+# (imports the Typer app only, no live server). Run+# `python scripts/ci/gen_cli_reference.py` to fix a drift.+docgen_gate="scripts/ci/gen_cli_reference.py"+if [ -f "$docgen_gate" ]; then+ "$PY" "$docgen_gate" --check </dev/null+ if [ "$?" -ne 0 ]; then+ status=1+ docgen_hit=1+ fi+fi+rm -f "$refs_file"if [ "$status" -ne 0 ]; then@@ -118,6 +132,10 @@ if [ "$status" -ne 0 ]; thenecho "pre-push BLOCKED: CLI COVERAGE gate (a route module is not mounted)."echo " Mount it in jarvis/ui/web/server.py — see the findings above."fi+ if [ "${docgen_hit:-0}" -ne 0 ]; then+ echo "pre-push BLOCKED: CLI DOCGEN drift (jarvis-cli-reference.md out of date)."+ echo " Run: python scripts/ci/gen_cli_reference.py and commit the result."+ fiecho "Bypass once with: git push --no-verify (layer-3 CI is the backstop)."fiexit "$status"diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 421a1fbbca..a5f417e995 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -187,7 +187,28 @@ jobs:# pytest is needed to RUN the suite; --no-deps above skips it (and all# of [dev]'s deps), so install the test runner explicitly alongside the# CLI's own runtime deps. Keeps the job light (no torch/heavy deps).- python -m pip install typer platformdirs httpx rich pytest pytest-asyncio+ python -m pip install typer platformdirs click httpx rich pytest pytest-asyncio++ - name: Import + --help smoke (CLI runs without desktop deps)+ # python:3.11-slim-equivalent: `--no-deps` above skipped torch / sounddevice+ # / etc., so this proves jarvis.cli_ctl imports and its --help renders on a+ # bare Linux/macOS/Windows with only typer/httpx/platformdirs/rich. No live+ # server here: the dynamic `api` build fails closed to the curated surface.+ run: |+ python -c "import jarvis.cli_ctl.__main__"+ python -m jarvis.cli_ctl --help++ - name: CLI coverage gate (every route mounted + tagged)+ # Static + stdlib-only: every jarvis/ui/web/*_routes.py router must be+ # mounted in server.py and carry tags=, so every WebUI action stays a+ # reachable, cleanly-grouped `jarvis api <tag>` command. Mirrors the+ # pre-push hook so a contributor without the hook can't bypass it.+ run: python scripts/ci/check_cli_coverage.py++ - name: CLI reference drift gate (docs in sync with command tree)+ # Fails if a curated command was added/changed without regenerating+ # docs/jarvis-cli-reference.md. Mirrors the pre-push docgen gate.+ run: python scripts/ci/gen_cli_reference.py --check- name: pytest (jarvisctl unit suite)run: python -m pytest tests/unit/cli_ctl/ -vdiff --git a/.github/workflows/slsa-provenance.yml b/.github/workflows/slsa-provenance.ymlindex 6db9ee11b5..31aa4d6896 100644--- a/.github/workflows/slsa-provenance.yml+++ b/.github/workflows/slsa-provenance.yml@@ -171,7 +171,7 @@ jobs:# 3. SA-3 modifies install-verify.sh to add the axis-3 check:# slsa-verifier verify-artifact \# --provenance-path personal-jarvis.intoto.jsonl \-# --source-uri github.com/personal-jarvis/personal-jarvis \+# --source-uri github.com/PersonalJarvis/PersonalJarvis \# --source-tag "$TAG" \# install.sh install.ps1 installer.py install-verify.sh install-verify.ps1# The slsa-verifier binary download must itself be SHA-pinned indiff --git a/scripts/ci/check_cli_coverage.py b/scripts/ci/check_cli_coverage.pyindex 350dd2794b..2303aa88cb 100644--- a/scripts/ci/check_cli_coverage.py+++ b/scripts/ci/check_cli_coverage.py@@ -6,10 +6,11 @@ long as every route module is actually mounted. This gate enforces exactly that:every ``jarvis/ui/web/*_routes.py`` that defines a ``router = APIRouter(...)`` MUSTbe imported (and thus mounted) by ``server.py``.-It catches the "route defined but never ``include_router``'d" bug class — a route-that exists in a file but is unreachable from both the WebUI and the CLI (this-happened with the frontier routes). Run from a pre-push hook and in CI; also-covered by ``tests/unit/cli_ctl/test_cli_coverage.py``.+It enforces two things: (1) every router is mounted — catching the "route defined+but never ``include_router``'d" bug class (this happened with the frontier routes);+and (2) every ``APIRouter(...)`` declares ``tags=`` so its operations land in a+clean ``jarvis api <tag>`` group instead of the ``default`` bucket. Run from a+pre-push hook and in CI; also covered by ``tests/unit/cli_ctl/test_cli_coverage.py``.Static analysis only — it never boots the app, so it is cheap and dependency-free."""@@ -25,14 +26,10 @@ _SERVER = _WEB / "server.py"# Route modules that are intentionally NOT mounted from server.py. Add a stem# here only with a written reason; the gate stays fail-closed otherwise.-_ALLOWLIST: set[str] = {- # Known-unmounted as of the CLI landing: their /api/frontier and- # /api/self-mod routers are not yet include_router'd in server.py. Mounting- # them is owned by the concurrent server.py rework; remove from this- # allowlist once that lands so the gate fully covers them again.- "frontier_routes",- "self_mod_routes",-}+_ALLOWLIST: set[str] = set()+# Intentionally empty: frontier_routes and self_mod_routes were the last two+# unmounted modules and are now include_router'd in server.py, so the gate fully+# covers every route module again. Add a stem here only with a written reason._ROUTER_DEF = re.compile(r"^\s*\w+\s*=\s*APIRouter\(", re.MULTILINE)@@ -59,7 +56,49 @@ def unmounted_modules() -> list[str]:return missing+def _apirouter_arg_blocks(src: str) -> list[str]:+ """Return the argument text of every ``APIRouter(...)`` call in ``src``.++ Uses balanced-paren scanning so a multi-line constructor or a nested call+ (e.g. ``dependencies=[Depends(x)]``) is captured whole, not truncated at the+ first ``)``.+ """+ blocks: list[str] = []+ for m in re.finditer(r"APIRouter\(", src):+ i = m.end()+ depth = 1+ start = i+ while i < len(src) and depth > 0:+ ch = src[i]+ if ch == "(":+ depth += 1+ elif ch == ")":+ depth -= 1+ i += 1+ blocks.append(src[start : i - 1])+ return blocks+++def untagged_modules() -> list[str]:+ """Route module stems with >=1 ``APIRouter(...)`` that lacks ``tags=``.++ An untagged router is grouped under ``default`` in the dynamic+ ``jarvis api <tag> <op>`` tree, which breaks the gcloud-style command+ grouping. Every router must declare ``tags=["<domain>"]`` so its operations+ land in a clean ``jarvis api <tag>`` group.+ """+ out: list[str] = []+ for stem in route_modules():+ if stem in _ALLOWLIST:+ continue+ src = (_WEB / f"{stem}.py").read_text(encoding="utf-8")+ if any("tags=" not in block for block in _apirouter_arg_blocks(src)):+ out.append(stem)+ return out++def main() -> int:+ status = 0missing = unmounted_modules()if missing:print("CLI coverage gate FAILED — route module(s) defined but not mounted:")@@ -70,9 +109,24 @@ def main() -> int:"and the `jarvis` CLI. Mount it in jarvis/ui/web/server.py (or add it to ""the allowlist in scripts/ci/check_cli_coverage.py with a reason).")- return 1- print(f"CLI coverage gate OK — all {len(route_modules())} route modules are mounted.")- return 0+ status = 1+ untagged = untagged_modules()+ if untagged:+ print("CLI coverage gate FAILED — route module(s) with an untagged APIRouter:")+ for stem in untagged:+ print(f" - jarvis/ui/web/{stem}.py (an APIRouter(...) has no tags=[...])")+ print(+ "\nAn untagged router is grouped under `default` in the dynamic "+ "`jarvis api <tag> <op>` tree, breaking gcloud-style grouping. Add "+ 'tags=["<domain>"] to the APIRouter(...) call.'+ )+ status = 1+ if status == 0:+ print(+ f"CLI coverage gate OK — all {len(route_modules())} route modules are "+ "mounted and tagged."+ )+ return statusif __name__ == "__main__":diff --git a/scripts/ci/docs_privacy_scan.py b/scripts/ci/docs_privacy_scan.pynew file mode 100644index 0000000000..a7c1bfd115--- /dev/null+++ b/scripts/ci/docs_privacy_scan.py@@ -0,0 +1,169 @@+#!/usr/bin/env python3+"""Deterministic personal-data scanner for documentation files.++This is the *fast, deterministic* half of the docs privacy defence (the slow,+semantic half is the ``docs-privacy-reviewer`` sub-agent). It reuses the single+source of truth for masking — the ``ship-public-release`` skill's+``pii-scrub.tsv`` — so a hit here means exactly the same thing it means at ship+time: a personal identifier reached a file that is world-readable forever once+pushed.++Two modes:++* **scan** (default) — read-only. Prints every hit as ``path:line: <why>`` and+ exits non-zero if any are found. Wired into a ``PostToolUse`` hook so every+ ``Write``/``Edit`` under ``docs/`` is checked the moment it lands.+* **--fix** — applies the ``scrub`` substitutions in place (canonical ordering+ from the manifest) and replaces the two private maintainer emails with a+ neutral placeholder. Used for the one-off bulk clean-up.++The manifest's ``scrub`` rows are applied verbatim and in file order (the order+is load-bearing: full name before surname, GitHub login/slug before the bare+first name). The two private emails are ``block-only`` in the manifest because+they must survive untouched in ``.mailmap``; ``.mailmap`` is not under ``docs/``,+so inside documentation we are free to mask them — and we must, because they+would otherwise hard-block the next public push.++Usage:+ python scripts/ci/docs_privacy_scan.py [PATH ...] # scan (read-only)+ python scripts/ci/docs_privacy_scan.py --fix [PATH ...] # mask in place++With no PATH the whole tracked ``docs/`` tree is scanned.+"""+from __future__ import annotations++import argparse+import re+import subprocess+import sys+from pathlib import Path++REPO_ROOT = Path(__file__).resolve().parents[2]+MANIFEST = REPO_ROOT / ".claude" / "skills" / "ship-public-release" / "references" / "pii-scrub.tsv"++# Private maintainer mailboxes. In the manifest these are `block-only` (kept+# real only in .mailmap); everywhere else they get masked to this placeholder.+PRIVATE_EMAILS = (+ re.compile(r"ruben\.luetke10@gmail\.com"),+ re.compile(r"harald\.herz@gmx\.de"),+)+EMAIL_PLACEHOLDER = "[email protected]"++# Text-only file suffixes we look inside. Binary/image docs are skipped.+TEXT_SUFFIXES = {".md", ".markdown", ".html", ".htm", ".txt", ".py", ".toml", ".json", ".yml", ".yaml", ".tsv", ".csv"}+++def load_scrub_rules() -> list[tuple[re.Pattern[str], str, str]]:+ """Return (compiled_pattern, replacement, note) for every `scrub` row, in file order."""+ rules: list[tuple[re.Pattern[str], str, str]] = []+ for raw in MANIFEST.read_text(encoding="utf-8").splitlines():+ line = raw.rstrip("\n")+ if not line or line.lstrip().startswith("#"):+ continue+ parts = line.split("\t")+ if len(parts) < 3:+ continue+ action, pattern, replacement = parts[0], parts[1], parts[2]+ note = parts[3] if len(parts) > 3 else ""+ if action != "scrub":+ continue+ rules.append((re.compile(pattern), replacement, note))+ return rules+++def tracked_docs() -> list[Path]:+ out = subprocess.run(+ ["git", "ls-files", "docs"],+ cwd=REPO_ROOT,+ capture_output=True,+ text=True,+ check=True,+ ).stdout+ return [REPO_ROOT / rel for rel in out.splitlines() if rel.strip()]+++def _read(path: Path) -> str | None:+ try:+ return path.read_text(encoding="utf-8")+ except (UnicodeDecodeError, OSError):+ return None+++def scan_text(text: str, rules: list[tuple[re.Pattern[str], str, str]]) -> list[tuple[int, str]]:+ """Return (line_number, why) for every personal-data hit."""+ hits: list[tuple[int, str]] = []+ for i, line in enumerate(text.splitlines(), start=1):+ for pat in PRIVATE_EMAILS:+ if pat.search(line):+ hits.append((i, f"private maintainer email ({pat.pattern})"))+ for pat, _repl, note in rules:+ if pat.search(line):+ hits.append((i, f"{note or pat.pattern}"))+ return hits+++def fix_text(text: str, rules: list[tuple[re.Pattern[str], str, str]]) -> str:+ # Emails first, so the bare-name rules cannot fragment the address.+ for pat in PRIVATE_EMAILS:+ text = pat.sub(EMAIL_PLACEHOLDER, text)+ for pat, repl, _note in rules:+ text = pat.sub(repl, text)+ return text+++def main() -> int:+ ap = argparse.ArgumentParser(description=__doc__)+ ap.add_argument("paths", nargs="*", help="files to check (default: tracked docs/ tree)")+ ap.add_argument("--fix", action="store_true", help="mask personal data in place")+ args = ap.parse_args()++ rules = load_scrub_rules()++ if args.paths:+ targets = [(Path(p) if Path(p).is_absolute() else (REPO_ROOT / p)).resolve() for p in args.paths]+ else:+ targets = tracked_docs()++ # In hook mode a single file is passed; only act on documentation.+ targets = [+ t for t in targets+ if "docs" in t.parts and t.suffix.lower() in TEXT_SUFFIXES and t.is_file()+ ]++ total_hits = 0+ changed = 0+ for path in targets:+ text = _read(path)+ if text is None:+ continue+ if args.fix:+ new = fix_text(text, rules)+ if new != text:+ path.write_text(new, encoding="utf-8")+ changed += 1+ rel = path.relative_to(REPO_ROOT) if REPO_ROOT in path.parents else path+ print(f"fixed: {rel}")+ else:+ hits = scan_text(text, rules)+ for line_no, why in hits:+ rel = path.relative_to(REPO_ROOT) if REPO_ROOT in path.parents else path+ print(f"{rel}:{line_no}: {why}")+ total_hits += len(hits)++ if args.fix:+ print(f"\n{changed} file(s) masked.")+ return 0++ if total_hits:+ print(+ f"\n{total_hits} personal-data hit(s) found. "+ "Mask them (python scripts/ci/docs_privacy_scan.py --fix <file>) "+ "or run the docs-privacy-reviewer sub-agent before this ships.",+ file=sys.stderr,+ )+ return 1+ return 0+++if __name__ == "__main__":+ raise SystemExit(main())diff --git a/scripts/ci/gen_cli_reference.py b/scripts/ci/gen_cli_reference.pyindex ac680f6bd0..76efff4805 100644--- a/scripts/ci/gen_cli_reference.py+++ b/scripts/ci/gen_cli_reference.py@@ -4,6 +4,12 @@ Walks the Typer app (the curated commands only — NOT the dynamic `api` group,which needs a live server's OpenAPI) and emits a grouped markdown reference. Runafter adding/removing commands so the reference never drifts; the``generate-cli-command`` skill calls this.++Modes:+* (no flag) — regenerate ``docs/jarvis-cli-reference.md`` in place.+* ``--check`` — build the reference in memory and exit non-zero if it differs+ from the committed file (the pre-push hook + CI drift gate use this, so the+ reference can never silently fall behind the command tree)."""from __future__ import annotations@@ -43,7 +49,7 @@ def _walk(cmd: click.Command, prefix: str, lines: list[str]) -> None:lines.append(f"- `{sig}` — {summary_line}")-def main() -> int:+def _build_reference() -> str:root = typer.main.get_command(app)assert isinstance(root, click.Group)lines = [@@ -61,7 +67,24 @@ def main() -> int:lines.append("")_walk(root.commands[name], name, lines)lines.append("")- _OUT.write_text("\n".join(lines) + "\n", encoding="utf-8")+ return "\n".join(lines) + "\n"+++def main(argv: list[str] | None = None) -> int:+ args = sys.argv[1:] if argv is None else argv+ generated = _build_reference()+ rel = _OUT.relative_to(_REPO)+ if "--check" in args:+ current = _OUT.read_text(encoding="utf-8") if _OUT.exists() else ""+ if current != generated:+ print(+ f"DRIFT: {rel} is out of date with the curated command tree.\n"+ "Run `python scripts/ci/gen_cli_reference.py` and commit the result."+ )+ return 1+ print(f"check OK — {rel} is current.")+ return 0+ _OUT.write_text(generated, encoding="utf-8")print(f"wrote {_OUT}")return 0diff --git a/scripts/ci/german-allowlist.txt b/scripts/ci/german-allowlist.txtindex 0c0e0205f8..45efa7bddb 100644--- a/scripts/ci/german-allowlist.txt+++ b/scripts/ci/german-allowlist.txt@@ -296,3 +296,11 @@ tests/unit/clis/test_capability_provider.pytests/unit/sessions/test_recorder_posthangup_readback.pytests/unit/speech/test_subagent_readback.pytests/unit/ui/test_tray.py++# --- Frozen "June 13" Computer-Use engine (2026-06-27): a byte-for-byte+# historical snapshot of screenshot_only_loop.py at git 352a784f (2026-06-10),+# kept as a reversible fallback ([computer_use].engine = "june13"). Its German+# comments/strings are faithful captured history, not new artifacts — exempt+# as a frozen reference, same spirit as the forensic deep-dive docs. ---+jarvis/harness/screenshot_only_loop_june13.py+jarvis/harness/screenshot_only_loop_stable.pydiff --git a/scripts/ci/guard_no_raw_public_push.py b/scripts/ci/guard_no_raw_public_push.pyindex 999cb8fe9b..9a9df1729a 100644--- a/scripts/ci/guard_no_raw_public_push.py+++ b/scripts/ci/guard_no_raw_public_push.py@@ -13,8 +13,8 @@ non-zero — aborting the push — when the destination is the public flagship.Why this never blocks the legitimate release: `ship-public-release` pushes from a*separate, fresh clone* (its own `.git`), so this working-repo hook is not on that-push path at all. Normal `git push origin` (the private `personal-jarvis` backstage)-is allowed. Only a raw push from THIS working tree to `PersonalJarvis/PersonalJarvis`+push path at all. Normal `git push origin` to a non-flagship working repo is+allowed. Only a raw push from THIS working tree to `PersonalJarvis/PersonalJarvis`is stopped.Escape hatch (should essentially never be needed): set `ALLOW_PUBLIC_RAW_PUSH=1`@@ -28,9 +28,8 @@ import osimport reimport sys-# The public flagship, case-sensitive on BOTH path segments. The private backstage-# is `PersonalJarvis/personal-jarvis` (lower-case repo name) — only the PascalCase-# repo name is the protected target.+# The public flagship, case-sensitive on BOTH path segments.+# Only the PascalCase repo name is the protected target.PUBLIC_OWNER = "PersonalJarvis"PUBLIC_REPO = "PersonalJarvis"diff --git a/scripts/ci/privacy_pre_push.py b/scripts/ci/privacy_pre_push.pyindex 2f4ce45610..c1734979b0 100644--- a/scripts/ci/privacy_pre_push.py+++ b/scripts/ci/privacy_pre_push.py@@ -59,8 +59,8 @@ def target_is_public(remote_name: str, remote_url: str) -> bool:"""True iff the push target is the PUBLIC distribution repo.Matched by remote name == "public" OR the remote URL containing (case-- insensitive) "personaljarvis/personaljarvis". The work repo- `personal-jarvis/personal-jarvis` (hyphenated) deliberately does NOT match.+ insensitive) "personaljarvis/personaljarvis". Hyphenated or otherwise+ non-flagship repo slugs deliberately do NOT match."""if remote_name == "public":return Truediff --git a/scripts/ci/sync_agents_md.py b/scripts/ci/sync_agents_md.pynew file mode 100644index 0000000000..5df052ef01--- /dev/null+++ b/scripts/ci/sync_agents_md.py@@ -0,0 +1,214 @@+#!/usr/bin/env python3+"""Keep ``AGENTS.md`` and ``CLAUDE.md`` carrying the same content.++The two files are intentional twins: ``CLAUDE.md`` is the long-standing agent+contract for this repo, and ``AGENTS.md`` is the cross-tool standard name that+other coding agents look for. The maintainer wants them to always hold the+*exact same content* -- edit one and the other follows, in either direction.++This script is the single sync engine, used from three places:++ * ``.githooks/pre-commit`` (with ``--stage``) -- the hard guarantee: every+ commit lands both files in sync, regardless of who edited them (Claude, the+ maintainer, a parallel session, a plain editor).+ * the Claude Code ``PostToolUse`` hook -- live mirroring while an+ edit happens, so the working tree is already in sync before any commit.+ * ``--check`` in CI / manual verification -- exit non-zero on drift,+ change nothing.++Sync direction ("and the other way around"):++ * same content -> nothing to do.+ * exactly one changed vs HEAD -> the unchanged file is rewritten to+ match the changed one (true bidirec-+ tional follow).+ * both changed vs HEAD and differ -> genuine conflict: STOP, change+ nothing, exit 2. No silent clobber.+ * neither changed vs HEAD but differ -> pre-existing drift: CLAUDE.md is the+ canonical tie-breaker; AGENTS.md is+ rewritten to match it.++Line-ending discipline (this repo runs ``core.autocrlf=true`` and CLAUDE.md is+NOT pinned in .gitattributes): "changed vs HEAD" is answered by git itself+(``git diff --quiet HEAD``), so a pure CRLF/LF skew between the working tree and+the HEAD blob never looks like an edit. The content-equality check normalises+line endings, because "the same stuff" means the same text, not the same+invisible CR bytes. When a real sync happens, the target is written with the+*exact* bytes of the source, so the two files end up byte-identical in the tree.++stdlib-only; resolves the repo root via ``git rev-parse`` so it works in linked+worktrees too. Designed to be a cheap no-op on the common path (files equal).+"""+from __future__ import annotations++import argparse+import subprocess+import sys+from pathlib import Path++CLAUDE_NAME = "CLAUDE.md"+AGENTS_NAME = "AGENTS.md"++# Exit codes: 0 = in sync (or synced), 1 = drift found in --check mode,+# 2 = unresolvable conflict (both sides edited differently), 3 = setup error.+EXIT_OK = 0+EXIT_DRIFT = 1+EXIT_CONFLICT = 2+EXIT_SETUP = 3+++def _git(*args: str, repo: Path) -> subprocess.CompletedProcess[bytes]:+ return subprocess.run(["git", "-C", str(repo), *args], capture_output=True)+++def _repo_root() -> Path | None:+ proc = subprocess.run(+ ["git", "rev-parse", "--show-toplevel"], capture_output=True, text=True+ )+ if proc.returncode != 0:+ return None+ return Path(proc.stdout.strip())+++def _read_bytes(path: Path) -> bytes | None:+ try:+ return path.read_bytes()+ except FileNotFoundError:+ return None+++def _norm(data: bytes | None) -> bytes | None:+ """Normalise line endings so a pure CRLF/LF skew is not seen as a diff."""+ if data is None:+ return None+ return data.replace(b"\r\n", b"\n").replace(b"\r", b"\n")+++def _changed_vs_head(name: str, repo: Path, working: bytes | None) -> bool:+ """Has ``name``'s content changed vs its committed HEAD version?++ "changed" means "tracked AND its text differs from the HEAD blob". A file+ with no HEAD version (untracked / brand-new) has no committed baseline to+ have diverged *from*, so it is NOT "changed" -- it can therefore never be+ one half of a conflict, and CLAUDE.md (the canonical file, which does have+ history) wins instead.++ The comparison is done on line-ending-normalised content rather than via+ ``git diff``, so it is fully deterministic regardless of how the HEAD blob+ happens to be stored (this repo runs ``core.autocrlf=true`` and CLAUDE.md's+ blob still carries legacy CRLF) -- a pure CRLF/LF skew is never an "edit".+ """+ show = _git("cat-file", "-p", f"HEAD:{name}", repo=repo)+ if show.returncode != 0:+ return False # untracked / not in HEAD -> no committed baseline+ return _norm(working) != _norm(show.stdout)+++def _decide_source(+ claude: bytes | None,+ agents: bytes | None,+ claude_changed: bool,+ agents_changed: bool,+) -> tuple[str, bytes] | None:+ """Return (target_name, content_to_write) or None if already in sync.++ Raises ValueError on an unresolvable conflict.+ """+ if _norm(claude) == _norm(agents):+ return None # same content (covers both-missing -> handled by caller)++ if claude_changed and agents_changed:+ # Both edited away from their committed state, and they differ. We must+ # not guess which wins -- that would silently destroy one side's edit.+ raise ValueError(+ "both CLAUDE.md and AGENTS.md were changed and now differ; "+ "reconcile them by hand, then re-stage."+ )++ if agents_changed and not claude_changed:+ # AGENTS.md is the freshly edited side -> CLAUDE.md follows it.+ return (CLAUDE_NAME, agents if agents is not None else b"")++ # CLAUDE.md is the edited side, OR neither changed but they drifted+ # (CLAUDE.md is the canonical tie-breaker) -> AGENTS.md follows CLAUDE.md.+ return (AGENTS_NAME, claude if claude is not None else b"")+++def main(argv: list[str] | None = None) -> int:+ parser = argparse.ArgumentParser(description=__doc__)+ parser.add_argument(+ "--check",+ action="store_true",+ help="report drift without changing anything (exit 1 on drift).",+ )+ parser.add_argument(+ "--stage",+ action="store_true",+ help="after syncing, 'git add' both files (for the pre-commit hook).",+ )+ parser.add_argument(+ "--quiet",+ action="store_true",+ help="print nothing on the no-op / success path.",+ )+ args = parser.parse_args(argv)++ repo = _repo_root()+ if repo is None:+ sys.stderr.write("sync_agents_md: not inside a git repo (or git missing).\n")+ return EXIT_SETUP++ claude_path = repo / CLAUDE_NAME+ agents_path = repo / AGENTS_NAME++ claude = _read_bytes(claude_path)+ agents = _read_bytes(agents_path)++ if claude is None and agents is None:+ sys.stderr.write(+ f"sync_agents_md: neither {CLAUDE_NAME} nor {AGENTS_NAME} exists.\n"+ )+ return EXIT_SETUP++ try:+ decision = _decide_source(+ claude,+ agents,+ _changed_vs_head(CLAUDE_NAME, repo, claude),+ _changed_vs_head(AGENTS_NAME, repo, agents),+ )+ except ValueError as exc:+ sys.stderr.write(f"sync_agents_md: CONFLICT -- {exc}\n")+ return EXIT_CONFLICT++ if decision is None:+ if not args.quiet:+ print(f"sync_agents_md: {CLAUDE_NAME} and {AGENTS_NAME} already in sync.")+ return EXIT_OK++ target_name, content = decision++ if args.check:+ sys.stderr.write(+ f"sync_agents_md: DRIFT -- {CLAUDE_NAME} and {AGENTS_NAME} differ "+ f"(would rewrite {target_name}).\n"+ )+ return EXIT_DRIFT++ (repo / target_name).write_bytes(content)+ print(f"sync_agents_md: rewrote {target_name} to match its twin.")++ if args.stage:+ add = _git("add", "--", CLAUDE_NAME, AGENTS_NAME, repo=repo)+ if add.returncode != 0:+ sys.stderr.write(+ "sync_agents_md: 'git add' failed:\n"+ + add.stderr.decode("utf-8", "replace")+ )+ return EXIT_SETUP++ return EXIT_OK+++if __name__ == "__main__":+ raise SystemExit(main())diff --git a/scripts/config-soll.json b/scripts/config-soll.jsonindex bcd055dc0b..65c1e32055 100644--- a/scripts/config-soll.json+++ b/scripts/config-soll.json@@ -6,10 +6,10 @@"single_turn_mode": false},"tts": {- "provider": "cartesia",+ "provider": "grok-voice","fallback": "grok-voice",- "voice_de": "Charon",- "voice_en": "Charon",+ "voice_de": "Kore",+ "voice_en": "Kore","language_code": "auto","chunk_by_sentence": false,"seed": 7,@@ -18,7 +18,7 @@"vertex_project": "","vertex_location": "us-central1","service_account_path": "~/.config/jarvis/vertex-sa.json",- "model": "gemini-3.1-flash-tts-preview"+ "model": "sonic-2"},"tts.cartesia": {"model_id": "sonic-3.5",@@ -32,7 +32,7 @@"allow_sapi5_fallback": false},"brain": {- "primary": "gemini",+ "primary": "openrouter","fallback": "gemini","deep_brain": "gemini","routing_provider": "gemini",@@ -53,8 +53,8 @@"deep_model": "claude-opus-4-8"},"brain.sub_jarvis": {- "provider": "claude-api",- "model": "",+ "provider": "antigravity",+ "model": "claude-opus-4-8","fallback_provider": "gemini","fallback_model": "gemini-3.1-pro-preview","fallback_provider_2": "gemini",@@ -63,7 +63,8 @@"stt": {"provider": "groq-api","model": "whisper-large-v3",- "bias_prompt": "Jarvis, OpenClaw, Codex, Gemini, Grok, Claude, Anthropic, OpenAI, OpenRouter, Whisper, a dictation app, Subagent, Sub-Agent, Mission-Manager, Critic-Loop, Critic, Worker, Router-Brain, Router, Kontrollierer, Voice-Pipeline, Wake-Word, Silero, VAD, TTS, STT, Telemetry, Transkript, Token, Provider, Plugin, Sprechblase, Orb, Mascot, Quip, Browser, Terminal, Repository, Branch, Commit, Push, Pull-Request, Issue, Merge, Refactor, Deployment, Screenshot, Debuggen, Workflow, Microservice, Container, Docker, Kubernetes, FastAPI, React, TypeScript, Python, JSON, Markdown, Logfile, Konfiguration, Endpoint, Webhook, API-Key, Service-Account, Cloud, Google Cloud, Vertex AI, BigQuery, GitHub, Twilio, ElevenLabs, OAuth, Credential Manager, Frontend, Backend, Skript, Daemon, Hangup, Auflegen, Denkpause, submitted, distanziert, erkennt"+ "bias_prompt": "Jarvis, OpenClaw, Codex, Gemini, Grok, Claude, Anthropic, OpenAI, OpenRouter, Whisper, a dictation app, Subagent, Sub-Agent, Mission-Manager, Critic-Loop, Critic, Worker, Router-Brain, Router, Kontrollierer, Voice-Pipeline, Wake-Word, Silero, VAD, TTS, STT, Telemetry, Transkript, Token, Provider, Plugin, Sprechblase, Orb, Mascot, Quip, Browser, Terminal, Repository, Branch, Commit, Push, Pull-Request, Issue, Merge, Refactor, Deployment, Screenshot, Debuggen, Workflow, Microservice, Container, Docker, Kubernetes, FastAPI, React, TypeScript, Python, JSON, Markdown, Logfile, Konfiguration, Endpoint, Webhook, API-Key, Service-Account, Cloud, Google Cloud, Vertex AI, BigQuery, GitHub, Twilio, ElevenLabs, OAuth, Credential Manager, Frontend, Backend, Skript, Daemon, Hangup, Auflegen, Denkpause, submitted, distanziert, erkennt",+ "language": "auto"},"ack_brain": {"enabled": true,@@ -86,5 +87,8 @@},"brain.providers.antigravity": {"model": "gemini-3.5-flash"+ },+ "brain.providers.openrouter": {+ "model": "nvidia/nemotron-3-ultra-550b-a55b:free"}}