Fix #78: use voice-command builtin skill for Pebble voice context#79
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #78
Moves the detailed voice-command handling instructions out of the hardcoded
_SYSTEM_PROMPT_TEMPLATEinskills.pyand 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:/home/clayde/knowledge_base) and Syncthing noteUsers can override this shipped default by placing their own
voice-command.mdin~/skills/personal/(or any other non-builtin skills directory mounted at/skills/).src/clayde/webhook/skills.py_SYSTEM_PROMPT_TEMPLATEtrimmed 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.pytest_discover_personal_overrides_builtin— verifies the new priority.test_voice_command_builtin_skill_exists— verifies the new skill file is present and well-formed.