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
fix(skills): give plugin voice triggers word boundaries
Ruben Lütke47fb92094672
diff --git a/jarvis/skills/builtin/plugin-github/SKILL.md b/jarvis/skills/builtin/plugin-github/SKILL.mdindex 888a61810c..1a54a16ad0 100644--- a/jarvis/skills/builtin/plugin-github/SKILL.md+++ b/jarvis/skills/builtin/plugin-github/SKILL.md@@ -8,8 +8,11 @@ plugin_id: githubintent_verbs: [zeig, lies, erstell, öffne, schließ, merge, review, kommentier] # i18n-allowintent_objects: [github, github-issue, repo, repository, pull, pullrequest, pr, branch, commit, workflow] # i18n-allowtriggers:+ # Word boundaries are load-bearing: without them "repo" fired inside "REPOrt"+ # and "REPOrter". Same defect class as the calendar skill's "termin" in+ # "Terminals" (BUG-121).- type: voice- pattern: "(github|pull request|pull-request|\\bpr\\b|repo|repository)" # i18n-allow+ pattern: "\\b(github|pull[-\\s]?request(?:s)?|pr|repo(?:s|sitor(?:y|ies))?)\\b" # i18n-allowrequires_tools: [github]risk_policy:default_tier: askdiff --git a/jarvis/skills/builtin/plugin-google_calendar/SKILL.md b/jarvis/skills/builtin/plugin-google_calendar/SKILL.mdindex 1822723998..1e2c7d9d0a 100644--- a/jarvis/skills/builtin/plugin-google_calendar/SKILL.md+++ b/jarvis/skills/builtin/plugin-google_calendar/SKILL.md@@ -8,8 +8,13 @@ plugin_id: google_calendarintent_verbs: [zeig, lies, such, erstell, plan, verschieb, lösch] # i18n-allowintent_objects: [kalender, google-kalender, google-calendar, gcal, termin, termine, meeting, ereignis] # i18n-allowtriggers:+ # Word boundaries are load-bearing, not cosmetic. Without them "termin" fired+ # inside "TERMINals", so every sentence about the coding workspace pulled a+ # calendar skill into the turn (live 2026-07-29 17:04, band=fire, score 1.0,+ # on "Coding Terminals" — BUG-121). `termin(?!al)` keeps Termin / Termine /+ # Terminen while refusing Terminal / Terminals.- type: voice- pattern: "(google.?(kalender|calendar)|gcal|(in )?(meine[nm]? )?(kalender|termin|meeting))" # i18n-allow+ pattern: "(google.?(kalender|calendar)|gcal|(in )?(meine[nm]? )?\\b(kalender|termin(?!al)\\w*|meeting)s?\\b)" # i18n-allowrequires_tools: [google_calendar]risk_policy:default_tier: monitordiff --git a/jarvis/skills/builtin/plugin-stripe/SKILL.md b/jarvis/skills/builtin/plugin-stripe/SKILL.mdindex f6350d08ff..f5a3bf1a4b 100644--- a/jarvis/skills/builtin/plugin-stripe/SKILL.md+++ b/jarvis/skills/builtin/plugin-stripe/SKILL.md@@ -8,8 +8,12 @@ plugin_id: stripeintent_verbs: [zeig, lies, erstatt, prüf, such] # i18n-allowintent_objects: [stripe, zahlung, zahlungen, payment, payments, kunde, kunden, customer, customers, rechnung, rechnungen, invoice, invoices, abo, abonnement, subscription, guthaben, balance, charge, refund] # i18n-allowtriggers:+ # Word boundaries are load-bearing: without them "kunde" fired inside+ # "SeKUNDE", so every spoken "warte eine Sekunde" pulled a PAYMENT skill into+ # the turn. Same defect class as the calendar skill's "termin" in "Terminals"+ # (BUG-121), and the more dangerous one, because these tools move money.- type: voice- pattern: "(stripe|zahlung|payment|rechnung|invoice|guthaben|kunde)" # i18n-allow+ pattern: "\\b(stripe|zahlung(?:en)?|payment(?:s)?|rechnung(?:en)?|invoice(?:s)?|guthaben|kunde(?:n)?)\\b" # i18n-allowrequires_tools: [stripe]risk_policy:default_tier: askdiff --git a/jarvis/skills/builtin/plugin-todoist/SKILL.md b/jarvis/skills/builtin/plugin-todoist/SKILL.mdindex acad7b1db2..8f8f1136a8 100644--- a/jarvis/skills/builtin/plugin-todoist/SKILL.md+++ b/jarvis/skills/builtin/plugin-todoist/SKILL.md@@ -8,8 +8,12 @@ plugin_id: todoistintent_verbs: [zeig, lies, erstell, ergänz, erledig, plan, show, list, add, create, complete, remind, muestra, añade, crea, completa] # i18n-allow: spoken-input vocabulary, de/en/esintent_objects: [todoist, todoist-aufgabe, todoist-liste, todoist task, todoist list, todoist projekt, todoist project, einkaufsliste, shopping list, lista de la compra] # i18n-allow: spoken-input vocabulary, de/en/estriggers:+ # The bare "to-?do" alternative also matched Spanish "todo" / "todos"+ # ("everything" / "all"), so ordinary Spanish speech pulled in a task skill —+ # the cross-language face of the substring defect behind BUG-121. A separator+ # or an explicit list noun is now required, which Spanish "todo" never has.- type: voice- pattern: "(todoist|aufgabenliste|einkaufsliste|to-?do|shopping list|lista de tareas)" # i18n-allow: spoken-input vocabulary+ pattern: "\\b(todoist|aufgabenliste|einkaufsliste|to[-\\s]dos?|todo[-\\s]?list\\w*|shopping list|lista de tareas)\\b" # i18n-allow: spoken-input vocabularyrequires_tools: [todoist]risk_policy:default_tier: monitordiff --git a/tests/unit/skills/test_trigger_word_boundaries.py b/tests/unit/skills/test_trigger_word_boundaries.pynew file mode 100644index 0000000000..adaf8ab0b7--- /dev/null+++ b/tests/unit/skills/test_trigger_word_boundaries.py@@ -0,0 +1,114 @@+"""Built-in skill triggers must match WORDS, not substrings.++Found while tracing BUG-121 (voice session 2026-07-29 17:04). The flight+recorder showed the Google Calendar skill firing at band=fire, score 1.0, on a+sentence about the coding workspace. The reason was one missing pair of word+boundaries: the pattern's ``termin`` alternative matched inside "coding+TERMINals". A sweep found the same defect in three more built-ins, one of them+worse than the original:++* ``plugin-stripe`` — ``kunde`` fires inside "SeKUNDE", so every spoken "warte+ eine Sekunde" pulled a PAYMENT skill into the turn.+* ``plugin-github`` — ``repo`` fires inside "REPOrt" and "REPOrter".+* ``plugin-todoist`` — a bare ``to-?do`` matches Spanish "todo" / "todos"+ ("everything" / "all"), so ordinary Spanish speech pulled in a task skill.++A skill that fires wrongly is not cosmetic: it is injected into the turn's+instructions and it declares its tools, which is how an unrelated sentence ends+up next to a payment API. This file is the class guard — it reads the SHIPPED+frontmatter, so a future skill that reintroduces a bare substring fails here+rather than in a live call.+"""+from __future__ import annotations++import re+from pathlib import Path++import pytest+import yaml++_BUILTIN = Path(__file__).resolve().parents[3] / "jarvis" / "skills" / "builtin"++# Everyday speech that must reach NO plugin skill. Each line is either a real+# transcript from the failing session or the minimal sentence that reproduces+# one of the substring hits found in the sweep.+INNOCENT = [+ # BUG-121 itself: the workspace vocabulary the user says constantly.+ "Kannst du mal bitte Terminal T7 prompten", # i18n-allow: speech input under test+ "die Coding Terminals sind alle offen", # i18n-allow: speech input under test+ "close the terminal",+ # "Sekunde" / "Urkunde" carry "kunde".+ "warte mal eine Sekunde", # i18n-allow: speech input under test+ "gib mir noch eine halbe Sekunde", # i18n-allow: speech input under test+ "in der Urkunde steht das Datum", # i18n-allow: speech input under test+ # "Report" / "Reporter" carry "repo".+ "mach mir einen Report", # i18n-allow: speech input under test+ "der Reporter hat angerufen", # i18n-allow: speech input under test+ # Spanish "todo" / "todos" are ordinary words.+ "todos los terminales están abiertos", # i18n-allow: speech input under test+ "todo bien, gracias", # i18n-allow: speech input under test+]++# The recall side, per skill: what must still fire after the boundaries land.+# Without these the guard above could be satisfied by deleting the triggers.+STILL_FIRES: list[tuple[str, str]] = [+ ("plugin-google_calendar", "zeig mir meine Termine"), # i18n-allow: speech input under test+ ("plugin-google_calendar", "an welchen Terminen bin ich frei"), # i18n-allow: speech input under test+ ("plugin-google_calendar", "was steht im Kalender"), # i18n-allow: speech input under test+ ("plugin-google_calendar", "check my google calendar"),+ ("plugin-stripe", "zeig die offenen Rechnungen"), # i18n-allow: speech input under test+ ("plugin-stripe", "wie viele Kunden habe ich"), # i18n-allow: speech input under test+ ("plugin-github", "öffne den pull request"), # i18n-allow: speech input under test+ ("plugin-github", "welche repos habe ich"), # i18n-allow: speech input under test+ ("plugin-todoist", "setz das auf meine To-do-Liste"), # i18n-allow: speech input under test+ ("plugin-todoist", "add it to my todo list"),+ ("plugin-todoist", "meine Einkaufsliste"), # i18n-allow: speech input under test+]+++def _voice_patterns() -> dict[str, list[str]]:+ """Every built-in skill's shipped voice-trigger patterns, by skill name."""+ out: dict[str, list[str]] = {}+ for skill_md in sorted(_BUILTIN.glob("*/SKILL.md")):+ text = skill_md.read_text(encoding="utf-8")+ parts = text.split("---")+ if len(parts) < 3:+ continue+ try:+ data = yaml.safe_load(parts[1]) or {}+ except yaml.YAMLError: # a malformed skill is another test's problem+ continue+ patterns = [+ str(trigger.get("pattern") or "")+ for trigger in (data.get("triggers") or [])+ if isinstance(trigger, dict) and trigger.get("type") == "voice"+ ]+ if patterns:+ out[skill_md.parent.name] = patterns+ return out+++def test_the_builtin_skills_are_readable() -> None:+ """Guard the guard: an empty sweep would make every test below vacuous."""+ patterns = _voice_patterns()+ assert len(patterns) > 10+ assert "plugin-google_calendar" in patterns++[email protected]("utterance", INNOCENT)+def test_no_plugin_skill_fires_on_ordinary_speech(utterance: str) -> None:+ fired = [+ name+ for name, patterns in _voice_patterns().items()+ if any(re.search(pattern, utterance, re.I) for pattern in patterns)+ ]++ assert fired == [], f"{utterance!r} wrongly triggered {fired}"++[email protected]("skill,utterance", STILL_FIRES)+def test_the_real_phrasings_still_fire(skill: str, utterance: str) -> None:+ patterns = _voice_patterns().get(skill) or []++ assert patterns, f"{skill} has no voice trigger"+ assert any(re.search(pattern, utterance, re.I) for pattern in patterns)