[P0] ZARA-007 — Eliminate ambiguous intent precedence and decode Python skill terms correctly #8

Closed
opened 2026-07-18 19:19:10 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-07-18 19:19:10 +00:00 (Migrated from github.com)

Problem

kb/intents.pl defines conflicting surfaces where clause order silently chooses behavior:

  • stop is media stop before conversation stop.
  • end is dictation stop before conversation stop.
  • search/find are web search before Python todo search.
  • hello is greet before the Python greeting skill.

Python skill intents are represented as compound Prolog terms (python(Skill)), while zara/wake.py only handles strings beginning with python(. Depending on PySWIP conversion, valid skills can bypass Python execution and fall into Prolog command execution.

Required fix

  • Define deterministic precedence based on conversation state and required slots, not source clause order.
  • Add an explicit typed result adapter from PySWIP values to Python intent objects.
  • Separate conversation controls, dictation controls, media controls, web search, and todo search.
  • Add missing-slot behavior for commands such as bare open, text, and schedule instead of accepting empty arguments.

Required tests

  • Table-driven resolver fixtures covering every duplicate surface in passive, active-conversation, and dictation states.
  • Tests for compound python(Skill) values using the actual PySWIP representation plus a mock adapter.
  • Add scripts/test-intents.sh that runs a stable corpus and diffs actual intent/args against a checked-in expected fixture.

Acceptance

  • end/stop do the state-appropriate action.
  • Todo search cannot be shadowed by web search.
  • Every Python skill route is executable from wake mode.
  • Missing required slots produce a pending/clarification result, not fake execution.

Branch

fix/zara-007-intent-precedence

Dependencies

ZARA-003, ZARA-006.

## Problem `kb/intents.pl` defines conflicting surfaces where clause order silently chooses behavior: - `stop` is media stop before conversation stop. - `end` is dictation stop before conversation stop. - `search`/`find` are web search before Python todo search. - `hello` is greet before the Python greeting skill. Python skill intents are represented as compound Prolog terms (`python(Skill)`), while `zara/wake.py` only handles strings beginning with `python(`. Depending on PySWIP conversion, valid skills can bypass Python execution and fall into Prolog command execution. ## Required fix - Define deterministic precedence based on conversation state and required slots, not source clause order. - Add an explicit typed result adapter from PySWIP values to Python intent objects. - Separate conversation controls, dictation controls, media controls, web search, and todo search. - Add missing-slot behavior for commands such as bare `open`, `text`, and `schedule` instead of accepting empty arguments. ## Required tests - Table-driven resolver fixtures covering every duplicate surface in passive, active-conversation, and dictation states. - Tests for compound `python(Skill)` values using the actual PySWIP representation plus a mock adapter. - Add `scripts/test-intents.sh` that runs a stable corpus and diffs actual intent/args against a checked-in expected fixture. ## Acceptance - `end`/`stop` do the state-appropriate action. - Todo search cannot be shadowed by web search. - Every Python skill route is executable from wake mode. - Missing required slots produce a pending/clarification result, not fake execution. ## Branch `fix/zara-007-intent-precedence` ## Dependencies ZARA-003, ZARA-006.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/zara#8
No description provided.