Description
Ran /add-context expecting project intelligence to land in the project repo, but files were written to ~/.config/opencode/context/project-intelligence/ instead. The --global flag made no difference since both paths resolve to the same location.
Steps to Reproduce
- Run
/add-context in any project
- Complete the wizard
- Check where files were created:
~/.config/opencode/context/project-intelligence/
- Run
/add-context --global — files go to the same directory
What I Expected
Default (no flag) writes to <project-root>/.opencode/context/project-intelligence/ so files are version-controlled and team-shared. --global writes to ~/.config/opencode/context/project-intelligence/ for personal cross-project defaults.
What Happened Instead
Both paths resolve to ~/.config/opencode/context/project-intelligence/.
Context
context/core/system/context-paths.md already documents the intended split:
- Local:
<project-root>/.opencode/context/ (project-specific, committed to git)
- Global:
~/.config/opencode/context/ (user-wide defaults)
The /context migrate operation also correctly describes copying global→local, so the pattern exists.
Possible Fix
In command/add-context.md, Stage 0.5 (lines 134-139), update the default path resolution:
# Current (both resolve to same directory)
Default: /home/<user>/.config/opencode/context/project-intelligence/
Global: ~/.config/opencode/context/project-intelligence/
# Suggested
Default: <project-root>/.opencode/context/project-intelligence/
Global: ~/.config/opencode/context/project-intelligence/
Environment
- OAC version: latest (via npm package opencode-froggy)
- Config location:
~/.config/opencode/
Description
Ran
/add-contextexpecting project intelligence to land in the project repo, but files were written to~/.config/opencode/context/project-intelligence/instead. The--globalflag made no difference since both paths resolve to the same location.Steps to Reproduce
/add-contextin any project~/.config/opencode/context/project-intelligence//add-context --global— files go to the same directoryWhat I Expected
Default (no flag) writes to
<project-root>/.opencode/context/project-intelligence/so files are version-controlled and team-shared.--globalwrites to~/.config/opencode/context/project-intelligence/for personal cross-project defaults.What Happened Instead
Both paths resolve to
~/.config/opencode/context/project-intelligence/.Context
context/core/system/context-paths.mdalready documents the intended split:<project-root>/.opencode/context/(project-specific, committed to git)~/.config/opencode/context/(user-wide defaults)The
/context migrateoperation also correctly describes copying global→local, so the pattern exists.Possible Fix
In
command/add-context.md, Stage 0.5 (lines 134-139), update the default path resolution:Environment
~/.config/opencode/