Repository navigation
Conversation
… overlay The documented `.claude/.local/skills/<name>/SKILL.md` override layer never loaded — Claude Code's skill discovery only scans user/project/plugin scopes, not `.local/skills/`. Ship a runtime overlay instead: every managed SKILL.md (all 3 mirror dirs) now ends with a directive to honor `.claude/.local/skills/<name>/overrides.md` as authoritative at invocation. - AC-1/AC-4: overlay directive appended to all 53 SKILL.md; presence asserted by a new integration test; verified end-to-end (an overrides.md actually wins at invocation). Docs document a manual invocation-verification recipe. - AC-2: hooks have no `.local/hooks/` auto-discovery; customization.md corrected to the real `.claude/settings.local.json` registration mechanism. - AC-3: net-new skills documented to project/user `.claude/skills/`; update/sync only touch package-managed paths and never delete unmanaged dirs — regression test added. - Reconcile templates.ts: clarify the `.local/` parallel-file protection guards in-place edits (constitution), not skill loading. - Rewrite customization.md + troubleshooting.md so no documented override path is non-functional. Entire-Checkpoint: 68263a11e03a
4 tasks
… overlay The documented `.claude/.local/skills/<name>/SKILL.md` override layer never loaded — Claude Code's skill discovery only scans user/project/plugin scopes, not `.local/skills/`. Ship a runtime overlay instead: every managed SKILL.md (all 3 mirror dirs) now ends with a directive to honor `.claude/.local/skills/<name>/overrides.md` as authoritative at invocation. - AC-1/AC-4: overlay directive appended to all 53 SKILL.md; presence asserted by a new integration test; verified end-to-end (an overrides.md actually wins at invocation). Docs document a manual invocation-verification recipe. - AC-2: hooks have no `.local/hooks/` auto-discovery; customization.md corrected to the real `.claude/settings.local.json` registration mechanism. - AC-3: net-new skills documented to project/user `.claude/skills/`; update/sync only touch package-managed paths and never delete unmanaged dirs — regression test added. - Reconcile templates.ts: clarify the `.local/` parallel-file protection guards in-place edits (constitution), not skill loading. - Rewrite customization.md + troubleshooting.md so no documented override path is non-functional. Entire-Checkpoint: 68263a11e03a
The overlay directive was appended at end-of-file, where it is unreliable to fire in long skills — it landed at line 3136 of the 3138-line /qa skill and 1938 of /exec. An LLM deep in a 3000-line skill is unlikely to act on a "check the filesystem for an override file first" instruction buried at the very end. Move the directive to the top of the body (right after the frontmatter, before the first heading) in all 53 SKILL.md across the three mirror dirs, so it is the first thing the executing agent reads. Verified end-to-end on the worst case: a subagent running the full 3135-line /qa skill read .claude/.local/skills/qa/overrides.md and honored a legitimate override delta. Also: - Strengthen local-override-directive.integration.test.ts to pin the directive BEFORE the first `#` heading (guards against regressing to end-of-file). - Add local-hooks-not-autodiscovered.integration.test.ts: code-backs the docs' AC-2 claim that sequant never executes hooks from .claude/.local/hooks/. - Add docs/examples/overrides.example.md as a copyable starting point, linked from the customization guide. - Update prose in templates.ts, customization.md, troubleshooting.md, and the CHANGELOG from "ends with"/"at the end" to the top-of-file placement. Entire-Checkpoint: d3e0b84b08b0
origin/feature/711-bug-customization-claude-local-skills-and-likely-h (b48c31d) is the pre-#707-rebase version of this work; it is fully superseded by a32d876 (same change rebased onto #707) plus fd18c0e (top-directive fix). Keep our tree (-s ours); record origin's commit as a parent so the push is a fast-forward (force-push is hook-blocked).
local-hooks-not-autodiscovered is a pure static fs grep of src/ (no subprocess, no chdir, no network) — a unit test, not an integration test. Filing it as `*.integration.test.ts` put it in the `fileParallelism: false` integration project, whose files share one forked process and run in glob order. Adding a file there shifted that order and surfaced a latent isolation flake in the chdir-based unmanaged-skill-safety test (CI build went red; locally the order-sensitive tautology-detector-cli test flaked instead). Rename to `*.test.ts` so it runs in the parallel unit project. This restores the integration file-set to the green shape and removes the perturbation. Full suite now passes twice in a row locally (173 files, 3636 tests), including both the unmanaged-skill and tautology tests.
Entire-Checkpoint: 5842299e05fa
Root cause (proven via CI diagnostics): the non-force `updateCommand({})` path
is gated by an `inquirer.prompt` confirm. In the shared, sequential integration
worker the inquirer mock is not reliably active inside updateCommand, so in CI
the prompt resolved falsy and update aborted *before* applying — leaving the
managed spec at v1 and failing the sanity assertion. (cwd, SEQUANT_TEMPLATES_DIR,
template-on-disk, classify="modified", and fs.writeFile were all verified correct
in CI; only the prompt gate diverged. The `sync --force` sibling test, which
skips the prompt, always passed.)
Switch the update test to `updateCommand({ force: true })`: it bypasses the
prompt and is the STRICTER AC-3 assertion — even maximal-overwrite mode must
leave the unmanaged `foo` dir alone, since `foo` is not a template file and is
never in the change set. Removes the temporary diagnostics from the prior
commits.
…mization-claude-local-skills-and-likely-h # Conflicts: # CHANGELOG.md
admarble
deleted the
feature/711-bug-customization-claude-local-skills-and-likely-h
branch
June 4, 2026 13:47
This was referenced Jun 4, 2026
admarble
added a commit
that referenced
this pull request
Jun 4, 2026
#721) PR #716 (512840f) committed package-lock.json with 9 unresolved `git stash` conflict blocks (27 marker lines), leaving the lockfile as invalid JSON. `npm ci` from a fresh clone fails. npm consumers were unaffected (the lockfile isn't published) and `npm install`/tsc/vitest tolerate the existing node_modules, so nothing flagged it — only a strict `npm ci` parse does. Regenerated via `npm install --package-lock-only`, which recomputes the dependency tree and drops the spurious `"dev": true` flags on production-reachable transitive deps (cross-spawn, debug, fast-deep-equal, isexe, ms, path-key, shebang-command, +2). Verified: 0 conflict markers, valid JSON, `npm ci --dry-run` parses clean. Entire-Checkpoint: e6beafa2df2c
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
docs/guides/customization.mdpromised that.claude/.local/skills/<name>/SKILL.md"takes precedence" — but Claude Code's skill discovery only scans user (~/.claude/skills/), project (.claude/skills/), and plugin scopes, never.local/skills/. The copy silently did nothing (same for.local/hooks/). This makes the headline customization use case (fork a skill, survive updates) functional via a runtime overlay, and corrects every documented override path so none is a dead promise.SKILL.mdacross all 3 mirror dirs (.claude/skills,templates/skills,skills) now ends with a stable<!-- sequant:local-override -->directive telling the skill to honor.claude/.local/skills/<name>/overrides.mdas authoritative. Users write small deltas, not a full fork — andoverrides.mdlives under.local/, whichupdate/syncnever write into..local/hooks/auto-discovery exists; hooks fire only from explicitsettings.jsoncommand paths. Docs corrected to the real, update-safe mechanism: register the script in.claude/settings.local.json(Claude Code merges it; gitignored)..claude/skills/(scopes discovery actually scans).update/synconly touch package-managed paths and never delete unmanaged dirs — added a regression test proving a custom.claude/skills/foo/is left intact.customization.md(+ fixed the same broken pattern introubleshooting.md); added a manual invocation-verification recipe.AC verification
.local/skills/<name>override takes effectlocal-override-directive.integration.test.ts; verified end-to-end (anoverrides.mdmarker won at a live invocation).local/hooks/not auto-discovered;customization.mdnow documentssettings.local.jsonregistration.claude/skills/;unmanaged-skill-safety.integration.test.tsassertsupdate+sync --forceleave.claude/skills/foo/untouchedDesign note: the
templates.ts.local/parallel-file protection (shipped in #708) is kept intact — it correctly guards in-place edits (constitution). Under the new mechanism users writeoverrides.md(auto-skipped under.local/) and leave the managedSKILL.mdunchanged, so that branch is inert for skills, not dead. Added a clarifying comment rather than gutting freshly-shipped #708 logic.Test plan
npm run build— cleannpm run lint— cleantemplates/update/sync/behavior-rule-sync tests still greenlint:skill-callsclean (no new Skill() calls)overrides.mdand honored it over its default/spec) with a markeroverrides.mdpresent and confirm the marker appearsCoordination
release/SKILL.md— our directive touches the same file (different section; trivial rebase whichever merges second).update.ts/sync— this PR only adds a comment totemplates.tsand new test files, so overlap is minimal.Closes #711