Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Python aicode-complexitycode-healthcode-intelligencecode-qualitydead-codedeveloper-toolsdocumentationgit-analyticsmcpopen-sourcepythonrefactoringstatic-analysistechnical-debt
feat(distill): default the init rewrite-hook prompt to yes (#409)
Swati Ahuja91336a773f2e
diff --git a/docs/DISTILL.md b/docs/DISTILL.mdindex 2aaf88ed8..e91b996b8 100644--- a/docs/DISTILL.md+++ b/docs/DISTILL.md@@ -71,10 +71,11 @@ MCP clients without a shell can resolve the same refs through### 3. The command-rewrite hook (Claude Code + Codex)-Opt-in. A PreToolUse hook rewrites noisy agent commands —+A PreToolUse hook rewrites noisy agent commands —`pytest -x` → `repowise distill pytest -x` — **pending your approval**: thedefault posture is `ask`, so Claude Code shows you the modified command before-running it. Install:+running it. `repowise init` offers to install it (default: yes); install+manually with:```bashrepowise hook rewrite install # or opt in during `repowise init`diff --git a/packages/cli/src/repowise/cli/commands/init_cmd/_interactive.py b/packages/cli/src/repowise/cli/commands/init_cmd/_interactive.pyindex 5a292293c..362f32936 100644--- a/packages/cli/src/repowise/cli/commands/init_cmd/_interactive.py+++ b/packages/cli/src/repowise/cli/commands/init_cmd/_interactive.py@@ -19,8 +19,8 @@ def offer_distill_rewrite_hook(``flag`` is the resolved ``--distill-hook/--no-distill-hook`` value:True installs without prompting, False skips AND gates the repos off inconfig (so a hook installed globally from another repo stays inert- there), None prompts when interactive and does nothing otherwise —- strictly opt-in.+ there), None prompts when interactive (defaulting to yes) and does+ nothing otherwise.The hook itself is user-level (one install covers every repo), but theverdict is recorded per repo as ``distill.commands.enabled`` in each@@ -60,7 +60,7 @@ def offer_distill_rewrite_hook(f" [dim]{scope}Each rewrite is shown for approval; raw output stays ""recoverable via `repowise expand`.[/dim]")- flag = click.confirm(" Install the Claude Code rewrite hook?", default=False)+ flag = click.confirm(" Install the Claude Code rewrite hook?", default=True)if flag:path = adapter.install_rewrite_hook()