# Task 3: Parameterize impact tooling **Plan**: reusable-impact-tooling **Status**: DONE **Deliverable**: Portable hook script, viewer, and install script ## What to do 1. Refactor `pre-compact-snapshot.sh`: - Remove hardcoded project paths. - Use `$CLAUDE_PROJECT_DIR` or `cwd` from hook input consistently. - Remove the debug trace line (`/tmp/precompact-debug.log`). 2. Refactor `show-impact.sh`: - Accept log file path as argument or auto-detect from project dir. 3. Create `install.sh` that: - Copies scripts to the user's `.claude/hooks/` directory. - Adds the PreCompact hook entry to `.claude/settings.json` (project or user level, user's choice). - Verifies `jq` is available (dependency). - Is idempotent (safe to run twice). 4. Organize into a self-contained directory structure: ``` impact-toolkit/ install.sh hooks/pre-compact-snapshot.sh hooks/show-impact.sh README.md ``` ## Done when - A user can clone the repo, run `install.sh`, and have impact tracking working in their Claude Code project.