Skip to content

feat(install): one-command setup — auto-wire inject hook + self-heal - #7

Merged
decider merged 1 commit into
mainfrom
feat/one-command-setup
May 25, 2026
Merged

feat(install): one-command setup — auto-wire inject hook + self-heal#7
decider merged 1 commit into
mainfrom
feat/one-command-setup

Conversation

@decider

@decider decider commented May 25, 2026

Copy link
Copy Markdown
Owner

Makes adoption one step: install-push-hook.sh setup installs the push hook and idempotently wires .claude/settings.json:

  • PreToolUseinject-readme-context.mjs (the progressive-disclosure context injection — per-dir READMEs fed into Claude when it reads/edits a file)
  • SessionStart → re-install the push hook each session (self-healing, since the installed git hook is untracked)

Details:

  • Paths computed relative to the git root → works wherever the tool is vendored (root or tools/…).
  • Idempotent JSON merge; never clobbers existing hooks.
  • install is non-fatal inside setup so the inject hook still wires even if a foreign pre-push blocks the push-hook install.
  • Resolves script-dir + git-root to physical paths so symlinked checkouts (e.g. macOS /tmp) don't corrupt the relative path.
  • Dogfoods this repo's own .claude/settings.json.

README updated with the one-command path + an accurate mid-session activation note (the PreToolUse hook goes live immediately via Claude Code's settings file-watcher; only SessionStart waits for the next session).

🤖 Generated with Claude Code

`install-push-hook.sh setup` now installs the push hook AND idempotently
merges two entries into the consumer's .claude/settings.json:
- PreToolUse -> inject-readme-context.mjs (progressive-disclosure context)
- SessionStart -> re-install the push hook each session (self-healing)

Paths are computed relative to the git root (works wherever the tool is
vendored), the merge never clobbers existing hooks, and it's idempotent.
install is now non-fatal inside setup so the inject hook still wires even
if a foreign pre-push blocks the push-hook install. Resolve script-dir +
git-root to physical paths so symlinked checkouts don't break the
relative-path computation. Dogfood: wire this repo's own settings.json.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@decider
decider merged commit 58b8e97 into main May 25, 2026
1 check passed
@decider
decider deleted the feat/one-command-setup branch May 25, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant