persona-kit: add local skill source provider#82
Conversation
Accepts repo-relative or absolute paths to a `.md` SKILL file (e.g. `.agentworkforce/workforce/skills/essay-authoring.md`) alongside the existing prpm and skill.sh sources. The provider emits a mkdir+cp install command targeting the harness's conventional skills dir. A new `repoRoot` option threads through `materializeSkills`, `buildInstallArtifacts`, `useSelection`, and the CLI so local sources can be absoluteified before the install command runs. This is what lets session-mode `cd <installRoot> && cp <source> …` find the file under the user's real cwd instead of the empty stage dir. The local provider is registered first in the resolver chain so its narrow `.md`-suffix test claims path-shaped sources before prpm's bare `<scope>/<name>` regex sees them. A `coreyhaines31/marketingskills`-style ref still routes to prpm; a `./skills/foo.md` ref routes to local.
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR extends the skill materialization system to support repository-local ChangesLocal Skill Source Support
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
localskill source provider that accepts repo-relative or absolute paths to a.mdSKILL file (e.g..agentworkforce/workforce/skills/essay-authoring.md), alongside the existingprpmandskill.shsources.repoRootoption throughmaterializeSkills,buildInstallArtifacts,useSelection, and the CLI so relative local sources can be absoluteified before the install command runs — keepscd <installRoot> && cp <source> …working in session mode..md-suffix test claims path-shaped sources before prpm's bare<scope>/<name>regex sees them; acoreyhaines31/marketingskills-style ref still routes to prpm, a./skills/foo.mdref routes to local.Motivation
Personas hosted in the same repo as their authoring patterns currently have no way to reference a sibling
skill.mdwithout first publishing it to GitHub or prpm.agentworkforce agent <persona>fails withUnsupported skill source: .agentworkforce/workforce/skills/<name>.md. Adds the missing source form so workforce-local skills don't require an extra remote-publish step.Test plan
pnpm --filter @agentworkforce/persona-kit run test— 127/127 pass (8 new local-source tests).pnpm --filter @agentworkforce/workload-router run test— 15/15 pass.pnpm --filter @agentworkforce/cli run test— 147/147 pass.pnpm -r typecheckon persona-kit + workload-router + cli — clean.agentworkforce agent <persona>against a persona declaring alocal/<name>skill with a.agentworkforce/...mdsource and confirm the SKILL.md is installed at<installRoot>/.claude/skills/<name>/SKILL.md.🤖 Generated with Claude Code