feat(workspaces): auto-discover user skills under data/skills/#309
Open
rudyll wants to merge 1 commit into
Open
feat(workspaces): auto-discover user skills under data/skills/#309rudyll wants to merge 1 commit into
rudyll wants to merge 1 commit into
Conversation
Mirrors the persona override model (data/brain/persona.md wins over default/persona.default.md) for skills: - Auto-discover user skills under `data/skills/<name>/` (any dir with a SKILL.md) and merge into the template's bundledSkills. Lets users add custom skills without editing the shipped template.json — survives app upgrades since data/ is in USER_DATA_HOME. - A user-shipped skill of the same name as a default one wins, same precedence as persona. Useful for tweaking a built-in (e.g. personal sector-rotation screen) without forking. - Empty / SKILL.md-less directories under data/skills/ are silently skipped, so WIP folders don't accidentally inject. context-injector.ts: extract `discoverUserSkills()` + `resolveSkillSource()` helpers; merge template skills with discovered user skills (de-duplicated, deterministic order); resolve each skill's source through the user-first helper before copying to the three CLI discovery paths. Tests: 4 new cases covering auto-discovery, override precedence, and WIP-dir guard. All 15 specs pass.
|
@rudyll is attempting to deploy a commit to the luokerenx4's Team Team on Vercel. A member of the Team first needs to authorize it. |
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.
What
Mirror the persona override model (
data/brain/persona.mdwins overdefault/persona.default.md) for skills:data/skills/<name>/(any directory containing aSKILL.md) and merge it into the template'sbundledSkills. Lets users register a custom skill without editing the shippedtemplate.json— and survives app upgrades becausedata/lives inUSER_DATA_HOME.data/skills/<name>/of the same name as a default skill wins. Useful for tweaking a built-in (e.g. a personalsector-rotationvariant) without forking the app.data/skills/<name>/without aSKILL.mdis silently skipped, so stash dirs don't accidentally inject into every new workspace.Why
Today, adding a custom skill requires editing
src/workspaces/templates/chat/template.jsonto extendbundledSkills, which means every app upgrade conflicts on that file or silently drops the user's skill. Persona already has a clean user-data override model — this brings skills in line.How
context-injector.ts: factor outdiscoverUserSkills()+resolveSkillSource()helpers; merge template-declared skills with auto-discovered user skills (de-duplicated, deterministic alphabetical order); each skill resolves through the user-first helper before being copied to the three CLI paths (.claude/skills,.agents/skills,.pi/skills).bundledSkillsand an absent or empty `data/skills/` remain no-ops.Test plan