fix(#1356): rewrite bare ~/.claude paths in the Cursor install branch (#1368)

* fix(#1356): rewrite bare ~/.claude paths in the Cursor install branch

The Cursor branch of _applyRuntimeRewrites only rewrote the trailing-slash
.claude forms, so bare ~/.claude / $HOME/.claude references survived into
installed Cursor artifacts (skills/gsd-surface, skills/gsd-graphify,
workflows/plan-phase, workflows/autonomous), tripping the post-install
"unreplaced .claude path reference(s)" audit. Same regression class as
#983/#2418/#2545 — every other affected branch was patched; cursor was missed.

- Add the three bare-form rewrites (~/.claude, $HOME/.claude, ./.claude) to the
  cursor branch, mirroring cline/trae/augment/codebuddy. They run after the
  slash forms (no double-replace) and use (?![\w-]) so .claude-plugin /
  .claudeignore are not corrupted.
- SKILL.md content also passes through this stage, so no stage-1 converter
  change is needed. Verified: 40 bare refs in the real leaking files → 0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore(#1356): add changeset for Cursor bare-path rewrite fix

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-06-17 08:51:48 -04:00
committed by GitHub
parent c03f3cc6af
commit 08e42b0ef1
3 changed files with 122 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
---
type: Fixed
pr: 1368
---
**`gsd install --cursor` no longer leaves bare `~/.claude` paths in installed artifacts** — the Cursor install branch only rewrote the trailing-slash `.claude` forms, so bare `~/.claude` / `$HOME/.claude` references survived into installed skills and workflows (e.g. `gsd-surface`, `gsd-graphify`, `plan-phase`, `autonomous`) and tripped the post-install "unreplaced .claude path reference(s)" warning, pointing at a directory that doesn't exist on a Cursor-only install. The Cursor branch now rewrites bare forms too (mirroring the Trae/Augment/Copilot branches), using a `(?![\w-])` lookahead so `.claude-plugin` / `.claudeignore` are not corrupted. (#1356)