Skip to content

compile: write copies instead of symlinks so Windows checkouts install - #4

Merged
Christerday merged 1 commit into
mainfrom
fix-windows-no-symlinks
Sep 3, 2026
Merged

compile: write copies instead of symlinks so Windows checkouts install#4
Christerday merged 1 commit into
mainfrom
fix-windows-no-symlinks

Conversation

@Christerday

Copy link
Copy Markdown
Contributor

What

compile.mjs writes copies instead of symlinks — for the root marketplace manifests, every bundle's .claude-plugin/ + .cursor-plugin/plugin.json, and every standalone skill's skills/<slug> folder and manifest under .compiled/. File layout, discovery and marketplace generation are unchanged; ensureSymlink became ensureCopy (fs.cp, lstat-based replace so a stale symlink from an older checkout is removed too). Identical to Yesterday-AI/yesterday-skills#4 (which additionally hoists agents/).

Why

/plugin marketplace add Yesterday-AI/skills fails on every Windows machine:

Failed to parse marketplace file ... JSON Parse error: Unexpected token '.'

.claude-plugin/marketplace.json was a git symlink to ../.compiled/marketplace.json. Git on Windows without Developer Mode (core.symlinks=false, the default) checks a symlink out as a 29-byte text file containing the target path — and Claude Code parses that as JSON. Reproduced with a fresh clone. The same defect sat one step behind every install: all 49 tracked symlinks (bundle manifests, standalone skill folders, .plugin.json links) would have failed the same way right after the marketplace loaded. This is the "check what git clone does with symlinks across platforms" item that .ytstack/STATE.md had listed as required evidence since May; the entry is now closed with it.

Requirement (owner): the catalog must work for Windows users without enabling symlinks on their machines. Supersedes the 2026-05-08 "symlink source folder" decision; its reason — "copies would drift" — no longer holds because compile.yml regenerates the whole generated tree on every push to main.

Verified

  • node clean.mjs && node compile.mjs completes on the Windows machine where the symlink version died with EPERM.
  • Index: git ls-files -s | grep ^120000 → empty; 38 mode changes 120000 → 100644; every manifest is real JSON.
  • Exec bit of the copied paperclip.sh restored to 100755 like its source (a Windows-side git add records 100644; documented in KNOWLEDGE.md).
  • Copies are byte-identical to their sources (cmp spot-checks incl. the Excalidraw libraries); full-diff grep for secrets / OS junk / VCS dirs: nothing.
  • Docs swept: AGENTS.md, README.md, CONTRIBUTING.md, .ytstack/{DECISIONS,KNOWLEDGE,STATE,PROJECT,RUNTIME}.md.

Size

~63k insertions, almost entirely the Excalidraw libraries copied under .compiled/skill-plugins/excalidraw-diagram/ — the cost of copies over symlinks. Read .compiled/ as generated.

After merge

CI's compile.yml should produce no follow-up diff. If it commits something, that diff is the review item.

@Christerday
Christerday merged commit 78affd7 into main Sep 3, 2026
1 check passed
@Christerday
Christerday deleted the fix-windows-no-symlinks branch September 3, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant