Skip to content

Fix #78: use voice-command builtin skill for Pebble voice context#79

Merged
max-tet merged 1 commit into
mainfrom
clayde/issue-78
May 25, 2026
Merged

Fix #78: use voice-command builtin skill for Pebble voice context#79
max-tet merged 1 commit into
mainfrom
clayde/issue-78

Conversation

@ClaydeCode
Copy link
Copy Markdown
Owner

Summary

Closes #78

Moves the detailed voice-command handling instructions out of the hardcoded _SYSTEM_PROMPT_TEMPLATE in skills.py and into a dedicated built-in skill file. The system prompt is now minimal structural glue; evolving the voice-command behavior is done by editing (or overriding) the skill file — no Python changes needed.

What changed

src/clayde/skills_builtin/voice-command.md (new)

Contains all the behavioral instructions that used to live in _SYSTEM_PROMPT_TEMPLATE:

  • Speech-to-text error handling and phonetic disambiguation guidance
  • Default KB working target (/home/clayde/knowledge_base) and Syncthing note
  • KB-structure disambiguation example ("after people and tree" → "add a people entry")

Users can override this shipped default by placing their own voice-command.md in ~/skills/personal/ (or any other non-builtin skills directory mounted at /skills/).

src/clayde/webhook/skills.py

  • _SYSTEM_PROMPT_TEMPLATE trimmed to: identity line, skill catalog section, skill-usage policy, and JSON output contract.
  • discover_skills() now processes non-builtin skills before builtin ones, so user-mounted personal/shared skills win on name collision rather than the shipped default. Added _is_builtin() helper.

tests/test_webhook_skills.py

  • Removed assertions that checked for voice-command-specific content in the system prompt (those belong in the skill now).
  • Added test_discover_personal_overrides_builtin — verifies the new priority.
  • Added test_voice_command_builtin_skill_exists — verifies the new skill file is present and well-formed.

Move the detailed voice-command handling instructions (speech-to-text
error handling, KB path, phonetic disambiguation guidance) out of the
hardcoded _SYSTEM_PROMPT_TEMPLATE and into a dedicated built-in skill
at src/clayde/skills_builtin/voice-command.md.

The system prompt is now minimal structural glue: identity, the skills
catalog, skill-usage policy, and the JSON output contract. Evolving the
voice-command behavior is done by editing the skill file (or placing an
override at ~/skills/personal/voice-command.md), without touching Python.

Also fix discover_skills() priority so non-builtin skills (personal/
shared) are processed before builtin ones, letting user-mounted overrides
win on name collision rather than the shipped default.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ClaydeCode ClaydeCode requested a review from max-tet May 25, 2026 12:36
@max-tet max-tet merged commit 160007b into main May 25, 2026
3 checks passed
@max-tet max-tet deleted the clayde/issue-78 branch May 25, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use knowledge base skill for incoming voice transcripts

2 participants