Problem
.opencode/agents, .opencode/commands, .opencode/skills, .opencode/rules are committed as git symlinks (mode 120000 in the index) pointing at ../.agents/*. On Windows, git defaults to core.symlinks=false unless the user has enabled Developer Mode/admin rights and explicitly set git config core.symlinks true before cloning. Under the default config, these paths check out as ~16-19 byte plain text files containing the literal string ../.agents/agents (etc.), not directories.
Verified on this machine (core.symlinks=false):
$ git ls-files -s .opencode/agents
120000 4c8a5fc... 0 .opencode/agents # correct symlink blob in the index
$ cat .opencode/agents
../.agents/agents # but checked out as plain text, not a real symlink
Impact
OpenCode's agent/skill/command auto-discovery reads from .opencode/* (README.md, docs/pi-workflow.md). On a stock Windows clone, OpenCode finds zero agents, skills, or commands -- the framework is silently non-functional. Pi is unaffected (reads .agents/ and .pi/extensions/ directly).
Proposed fix
- Document the requirement prominently (README quick start + docs/pi-compatibility.md):
git config --global core.symlinks true and Windows Developer Mode, set before cloning; re-clone or git checkout -- .opencode after enabling if already cloned.
- Add a setup/postinstall check (Node script) that detects stub symlink files (small text files matching
^\.\./\.agents/) under .opencode/ and either warns loudly or materializes real directory junctions (fs.symlink(..., 'junction') on win32) as a fallback so OpenCode works out of the box.
- Cover this with a regression check in
tests/agents/validate.mjs or a small tools/ script that CI/Windows contributors can run to self-diagnose.
Acceptance criteria
Problem
.opencode/agents,.opencode/commands,.opencode/skills,.opencode/rulesare committed as git symlinks (mode120000in the index) pointing at../.agents/*. On Windows, git defaults tocore.symlinks=falseunless the user has enabled Developer Mode/admin rights and explicitly setgit config core.symlinks truebefore cloning. Under the default config, these paths check out as ~16-19 byte plain text files containing the literal string../.agents/agents(etc.), not directories.Verified on this machine (
core.symlinks=false):Impact
OpenCode's agent/skill/command auto-discovery reads from
.opencode/*(README.md, docs/pi-workflow.md). On a stock Windows clone, OpenCode finds zero agents, skills, or commands -- the framework is silently non-functional. Pi is unaffected (reads.agents/and.pi/extensions/directly).Proposed fix
git config --global core.symlinks trueand Windows Developer Mode, set before cloning; re-clone orgit checkout -- .opencodeafter enabling if already cloned.^\.\./\.agents/) under.opencode/and either warns loudly or materializes real directory junctions (fs.symlink(..., 'junction')on win32) as a fallback so OpenCode works out of the box.tests/agents/validate.mjsor a smalltools/script that CI/Windows contributors can run to self-diagnose.Acceptance criteria
.opencode/*stub files on Windows.opencode/agentsetc. into working directories mirroring.agents/agents