Repository navigation
fix(setup): mirror support files + asset dirs alongside SKILL.md in link_claude_skill_dirs - #1502
NikhileshNanduri wants to merge 1 commit into
Conversation
82efa10 to
4da9c4a
Compare
…ink_claude_skill_dirs Closes garrytan#1499. `link_claude_skill_dirs` previously only symlinked SKILL.md into each skill directory. Skills like /review reference sibling files (checklist.md, greptile-triage.md, specialists/, TODOS-format.md) via the `.claude/skills/review/` path — but those files were never linked, so the skill hit its own STOP point on every global install. After this fix, link_claude_skill_dirs also: - Symlinks all .md support files (except SKILL.md and *.tmpl) alongside SKILL.md - Symlinks support asset directories (specialists/, bin/, references/, templates/, migrations/, etc.) while excluding build dirs (dist/, src/, test/, tests/, scripts/, node_modules/) Idempotent — re-running ./setup upgrades existing installs cleanly. Supersedes the partial fix in garrytan#1486 (bin/ only); this covers all asset types. Affected skills: review (checklist.md, greptile-triage.md, design-checklist.md, TODOS-format.md, specialists/), qa (references/, templates/), careful (bin/), freeze (bin/), plan-devex-review (dx-hall-of-fame.md), cso (ACKNOWLEDGEMENTS.md), setup-gbrain (memory.md), gstack-upgrade (migrations/). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
4da9c4a to
6eb56dd
Compare
|
Just hit this on a fresh install — Hoping it can land soon — thanks! |
…ink_claude_skill_dirs (garrytan#1502)
46 community PRs consolidated (7 new skills: /land /diagnose /plan-status /plan-pm-review /pr-prep /fanout /community-review /setup-search-mcp, with Exa as the search provider, plus 30+ fixes across ship/review/retro/ office-hours/autoplan/learn/design-review/qa/scrape/health, the freeze/ careful/guard/investigate hook chain, the installer, and the doc generator). Verified by isolated before/after user-environment simulation (pr-test-env gate PASS: 3 consumers baseline-fail -> candidate-pass, 2 negative controls) and a max-effort Fable 5 review (54 verified findings, 50 fixed, 4 deferred with reasons). Merge resolutions of note: - benchmark providers: union of Grok (fork) + Ollama (wave) across the Family type, adapters, pricing, and CLI. - land-and-deploy: kept the wave's restructure (merge flow owned by /land); ported the fork's PR review-approval HARD GATE (Step 3.5a-ter, --override-review) and configurable merge-method resolution (Step 4.1c) into /land so no fork feature is lost. - setup: union of --no-browser per-host skips (now 9 hosts incl. the fork-only cursor/slate/qoder/grok) with the fork's garrytan#900 stale-refresh pattern; browse-skip removal is now provenance-gated and ordered below the stale-refresh block. - carve-guards: larger skeleton caps + merged comments; parity headroom for the post-merge union (plan-eng 72k, office-hours 105k). - test re-pins: garrytan#1620 checks accept <NNN>-explicit gh commands; careful chain tests read the hookSpecificOutput envelope; sections-linking test pins the generic support-asset mirror loop (garrytan#1502) that subsumes the old sections-only block. - plugin skills/ symlinks added for the 8 new skills. Full suite on the merged tree: all observed failures pre-existing on upstream main; zero introduced. Co-Authored-By: Claude Fable 5 <[email protected]>
|
@NikhileshNanduri Please rewrite this against main with an explicit allowlist for required sidecars and asset directories. Copying everything except a denylist is too broad. |
|
Thank you for this fix! The bug it addresses (#1499) has since been fixed on main and the issue is closed, so I'm closing this PR as done. Re-verified against current main (v1.91.12.0). If you think part of your change is still missing, reply and we'll reopen. Really appreciate the contribution. |
Summary
Closes #1499.
link_claude_skill_dirsin./setuppreviously only symlinkedSKILL.mdinto each skill directory. Skills like/reviewreference sibling files —checklist.md,greptile-triage.md,design-checklist.md,TODOS-format.md, andspecialists/— via the.claude/skills/review/path. Those files were never linked, so/reviewhit its own STOP point ("If the file cannot be read, STOP and report the error") on every global install. 20 releases since the regression was introduced.This is Option B from the issue — the durable fix. It teaches the linker to mirror all sibling assets, not just SKILL.md. No SKILL.md.tmpl path hacks needed.
What changed
setup—link_claude_skill_dirs(): after the existingSKILL.mdsymlink, two new loops:.mdfiles — iterates$gstack_dir/$dir_name/*.md, skipsSKILL.md(already linked), links the rest (checklist.md,greptile-triage.md,TODOS-format.md, etc.)$gstack_dir/$dir_name/*/, skips build/source dirs (dist,src,test,tests,scripts,node_modules), links the rest (specialists/,bin/,references/,templates/,migrations/, etc.)Both loops are idempotent (
rmthenln -snf) —./setupre-runs cleanly over existing installs.test/gen-skill-docs.test.ts: two new unit tests that verify the linker body contains the new loops and the correct exclusion list.Affected skills (verified by functional test)
review/checklist.md,greptile-triage.md,design-checklist.md,TODOS-format.md,specialists/qa/references/,templates/careful/bin/freeze/bin/plan-devex-review/dx-hall-of-fame.mdcso/ACKNOWLEDGEMENTS.mdsetup-gbrain/memory.mdgstack-upgrade/migrations/browse/correctly getsbin/but NOTsrc/,dist/,test/,scripts/(all excluded).Supersedes #1486
PR #1486 added only
bin/symlinks. This PR is a superset — it coversbin/and all other asset types — so #1486 can be closed if this merges.Testing scenarios
Scenario 1:
/reviewchecklist loads on a fresh global installScenario 2: Idempotency — re-running ./setup doesn't break existing installs
Scenario 3: build dirs are excluded from browse/
Scenario 4: careful/ and freeze/ get their bin/ dirs (hooks now resolve)
Scenario 5: Upgrade from old install (symlinks overwrite old state)
Scenario 6: bun test passes (no regressions)
Notes
.tmplexclusion is implicit: glob is*.md, andSKILL.md.tmplends in.tmplnot.md./setup: the same fix applies but MSYSln -screates copies (per Windows (MSYS/Git Bash):link_claude_skill_dirscreates file copies, not symlinks — skills do not update ongit pull#1456/v1.33.3.0 fix: use file copies instead of symlinks on Windows for skill installation #1462); this PR does not change that behavior🤖 Generated with Claude Code