fix: repair inert .opencode symlinks on Windows checkouts (#93) - #98
Merged
Merged
Conversation
.opencode/{agents,commands,skills,rules} are git symlinks pointing at
../.agents/*. On Windows with the default core.symlinks=false, git
checks these out as inert plain-text stub files instead of real
symlinks/junctions, so OpenCode auto-discovery finds zero agents,
skills, or commands. Pi is unaffected (reads .agents/ directly).
- Add tools/fix-opencode-symlinks.mjs: detects stub files and repairs
them into working directory junctions/symlinks pointing at the
canonical .agents/* directories
- Document the Windows setup requirement (core.symlinks=true +
Developer Mode) and the repair-script fallback in README.md Quick
Start + Known Issues, and docs/pi-compatibility.md
Verified locally: script correctly detected 4 stub files and repaired
them into real symlinks resolving to 51/78/77/11 entries.
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.
Closes #93.
Problem
.opencode/{agents,commands,skills,rules}are committed as git symlinks. On Windows with the defaultcore.symlinks=false, git checks them out as inert plain-text stub files instead of real symlinks — OpenCode's.opencode/-based agent/skill/command discovery silently finds nothing. Pi is unaffected (reads.agents/directly).Fix
tools/fix-opencode-symlinks.mjs: detects the stub-file state and repairs it into a real symlink/junction pointing at the canonical.agents/*directory.core.symlinks=truesetup and the repair-script fallback) in README.md (Quick Start + Known Issues) and docs/pi-compatibility.md.Verification
Ran the script locally: detected 4 stub files, repaired all 4 into working symlinks resolving to 51/78/77/11 entries respectively (matching
.agents/{agents,commands,skills,rules}counts).