Repository navigation
fix(sredevops-writer): register the editorial skills from the module, not the cwd - #35
Merged
Merged
Conversation
… not the cwd The preset located its skills with a `!!js` expression built on `createRequire(process.cwd())`. That cannot see a profile install from outside the dsh installation directory, so it silently fell through to `<session cwd>/plugins/sredevops-writer/skills`. From any session started outside this checkout the directory does not exist, and because a missing skill root is dropped without a warning, sredevops-article, sredevops-translate, and sredevops-editorial-memory disappeared from the catalog. The bundle now mounts a host-level row whose apply() registers a skill provider on ctx.skills, resolving skills/ from import.meta.url like plugins/skills does. Registration lands in the global skill layer, so every agent sees the three skills, not only this preset's sessions. The preset keeps its skill-filesystem row for workspace and user skills only; no path lives in the patch. Tests cover the provider across a changed working directory, the frontmatter contract, and a patch guard against reintroducing path resolution. Bumps to 0.1.1 for a fresh release tag.
ngeorger
approved these changes
Nov 13, 2026
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.
Problem
The preset's three editorial skills (
sredevops-article,sredevops-translate,sredevops-editorial-memory) silently vanished from the skill catalog whenever a session started outside this checkout.cordis.patch.ymllocatedskills/with a!!jsexpression built oncreateRequire(process.cwd()). It cannot see a profile install from outside the dsh installation directory, so it fell through to<session cwd>/plugins/sredevops-writer/skills. From/home/ngeorger/postsor/home/ngeorger/promptsthat directory does not exist, and because a missing skill root is dropped without a warning, the three skills simply never appeared.path.resolvealso ran on the value at construction, so any relative entry was resolved against the app's cwd, not the session's.Fix
Mirror what
plugins/skillsalready does:index.jsis now a skill provider:apply(ctx)registers onctx.skillsand resolvesskills/fromimport.meta.url. No evaluator, nobaseUrl, no install-layout guesswork.cordis.patch.ymlmounts the package as a host-level row, so registration lands in the global skill layer and every agent sees the three skills — not only sessions using this preset.skill-filesystemrow for workspace and user skills, with nocustomSkillDirs.[]explicitly, and dropped files log a warning instead of disappearing.Tests
14 tests (was 10), including:
process.chdir()to an empty temp dir — the exact failurecustomSkillDirs,!!js, orprocess.cwdcomes backRelease
0.1.0→0.1.1; pinned install specs in the plugin README and the root README updated in the same commit (validate-github-installrequires both).validate-github-install --strict,validate-bundles,validate-market-indexpass;release-tag --dry-runwould createsredevops-writer-v0.1.1.skill({name: "sredevops-editorial-memory"})loaded the body from the installed package.Verification note
validate-skillsreports errors from untracked.agents/worktrees/*scratch copies in the local checkout; none touch packed skills and CI checks out fresh.After merge:
node scripts/release-tag.mjs --plugin sredevops-writer --push, then merge themarket/publish-sredevops-writer-v0.1.1PR it opens.