.plans/1755-install-audit-fix.md
Full cleanup of install.js addressing all issues found during comprehensive audit.
All changes in bin/install.js unless noted.
Line 5391-5392 — After fs.copyFileSync, add fs.chmodSync(destFile, 0o755) for .sh files.
Line 5485 — Change gsd-update-check.js to gsd-check-update.js and fix path from get-shit-done/hooks/ to hooks/.
Line 5492 — Update dedup check to use gsd-check-update.
Line 5406 — Change from path.join(path.dirname(targetDir), 'cache', ...) to path.join(os.homedir(), '.cache', 'gsd', 'gsd-update-check.json').
Line 4972 — Change filter from file.endsWith('.js') to (file.endsWith('.js') || file.endsWith('.sh')).
Line 4404 — Add 'gsd-workflow-guard.js' to the gsdHooks array.
Lines 4453-4520 — Add filters for gsd-session-state, gsd-validate-commit, gsd-phase-boundary in the appropriate event cleanup blocks (SessionStart, PreToolUse, PostToolUse).
Line 4404 — Remove 'gsd-check-update.sh' from gsdHooks array.
Remove the unreachable duplicate else if (isCursor) and else if (isWindsurf) branches.
After the generic check, warn if expected .sh files are missing (non-fatal warning).
tests/install-hooks-copy.test.cjs — Regression tests covering: