Convert absolute paths to relative
The codebase has many hardcoded absolute paths that should use relative paths resolved from the install location (e.g., via \$BROWSER_SKILL_DIR`, `dirname $0`, or gstack-paths`).
Examples found:
-
SKILL.md files — hardcoded ~/.claude/skills/gstack/bin/... paths in bash blocks. These should use \dirname $0`` or an install-dir variable instead.
-
bin/gstack-paths — hardcodes $HOME/.config/opencode/plans and .opencode/plans. The HOME-dependent fallback is fine, but CLI tools should resolve relative to the script location when possible.
-
bin/gstack-gbrain-detect — the TypeScript version uses hardcoded config paths (~/.claude.json, opencode.json, ~/.config/opencode/opencode.jsonc). These should use os.homedir() + path.join or the process working directory.
-
Setup scripts — ./setup references ~/.claude/skills/gstack/ and ~/.config/opencode/skills/gstack/ as install targets. These are install-time decisions, but should accept override via environment variables.
Resolution approach:
- Use
path.join(process.cwd(), ...) in TypeScript scripts instead of ~ expansion
- In bash scripts, use
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" to resolve relative to the script
- Pass install directory through
GSTACK_INSTALL_DIR or similar env var
- Avoid bare
~ — use $HOME (which bash expands) instead
Convert absolute paths to relative
The codebase has many hardcoded absolute paths that should use relative paths resolved from the install location (e.g., via
\$BROWSER_SKILL_DIR`,`dirname $0`, orgstack-paths`).Examples found:
SKILL.md files — hardcoded
~/.claude/skills/gstack/bin/...paths in bash blocks. These should use\dirname $0`` or an install-dir variable instead.bin/gstack-paths— hardcodes$HOME/.config/opencode/plansand.opencode/plans. The HOME-dependent fallback is fine, but CLI tools should resolve relative to the script location when possible.bin/gstack-gbrain-detect— the TypeScript version uses hardcoded config paths (~/.claude.json,opencode.json,~/.config/opencode/opencode.jsonc). These should useos.homedir()+ path.join or the process working directory.Setup scripts —
./setupreferences~/.claude/skills/gstack/and~/.config/opencode/skills/gstack/as install targets. These are install-time decisions, but should accept override via environment variables.Resolution approach:
path.join(process.cwd(), ...)in TypeScript scripts instead of~expansionSCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"to resolve relative to the scriptGSTACK_INSTALL_DIRor similar env var~— use$HOME(which bash expands) instead