Skip to content

fix(init): always honour the CLAUDE.md opt-out#102

Merged
RaghavChamadiya merged 1 commit intomainfrom
fix/init-claude-md-prompt
Apr 26, 2026
Merged

fix(init): always honour the CLAUDE.md opt-out#102
RaghavChamadiya merged 1 commit intomainfrom
fix/init-claude-md-prompt

Conversation

@RaghavChamadiya
Copy link
Copy Markdown
Collaborator

Closes #81.

Summary

The "Generate .claude/CLAUDE.md? [Y/n]" prompt was nested inside interactive_advanced_config, so users in full mode were never asked and the writer fell through to its default of generating the file. Even in advanced mode the answer was easy to lose, because it travelled inside the adv dict alongside ten other settings.

What changed

  • Move the prompt out into a small interactive_claude_md_prompt(console) helper.
  • Ask it once after mode selection, in both full and advanced flows.
  • Skip the prompt when --no-claude-md was already passed on the CLI (the user has already opted out) and when the user picked index-only mode (no LLM generation runs at all).

The downstream gating in _maybe_generate_claude_md is unchanged — it already early-returns when either the explicit flag is true or the persisted opt-out is in config.yaml.

Tests

Five regression tests in tests/unit/cli/test_claude_md_prompt.py:

  • Prompt returns True (i.e. no_claude_md=True) when the user types n.
  • Prompt returns False when the user types y.
  • Prompt returns False on the default Enter response.
  • Writer's gate creates no file and persists editor_files.claude_md: false when the user opts out in this run.
  • Writer's gate also respects the persisted opt-out from a previous run, even when the explicit flag is false.

The 'Generate .claude/CLAUDE.md? [Y/n]' prompt was nested inside
interactive_advanced_config, so users in full mode were never asked and
the writer fell through to its default of generating the file. Even in
advanced mode the answer was easy to lose because it travelled inside the
adv dict alongside ten other settings.

Move the prompt out into a small interactive_claude_md_prompt helper and
ask it once after mode selection, in both full and advanced flows. Skip
it when --no-claude-md was already passed on the CLI (the user has
already opted out) and when the user picked index-only mode (no LLM
generation runs).

Adds five regression tests covering the prompt's three answer paths plus
the writer's gating for both the in-process opt-out and the persisted
config.yaml opt-out from a previous run.
@RaghavChamadiya RaghavChamadiya merged commit 00cfd0e into main Apr 26, 2026
5 checks passed
@RaghavChamadiya RaghavChamadiya deleted the fix/init-claude-md-prompt branch April 26, 2026 11:00
@RaghavChamadiya RaghavChamadiya mentioned this pull request Apr 26, 2026
RaghavChamadiya added a commit that referenced this pull request Apr 26, 2026
* feat: improve PreToolUse hook relevance with multi-signal search

Replace FTS-only file retrieval with a 3-signal ranking system:
- Symbol name match (weight 2.0) — most precise
- File path match (weight 1.5) — catches path-based searches
- FTS on wiki content (weight 1.0) — broadest, lowest priority
Files ranked by signal score then PageRank, top 3 returned.

Remove git signals (HOTSPOT, bus-factor, owner) from enrichment —
that info belongs in get_risk, not every search. Remove Bash command
interception (fragile regex on grep/rg commands).

Keep: symbols (3), importers (3), dependencies (2) per file.

* release: v0.3.1

Bumps repowise to 0.3.1 across pyproject.toml and the three sub-package
__init__.py files.

Highlights since 0.3.0:

- Output language support for generated wiki content (#99)
- Luau / Roblox language support (#89)
- OpenRouter LLM and embedding provider (#56)
- base_url plus per-provider env vars for OpenAI / Anthropic / Gemini /
  Ollama / LiteLLM (#85)
- SQLite WAL plus busy_timeout plus FK constraints, fixing concurrent
  'repowise update' database is locked errors (#101)
- CLAUDE.md opt-out prompt now asked in both full and advanced modes
  and the answer is honoured (#102)
- repowise init no longer silently overwrites unparseable user JSON
  configs (#94)
- pyproject packages list resynced with the language-support refactor
  so editable installs and CI build cleanly (#97)
- uv workflow documented and dev deps migrated to PEP 735
  dependency-groups, silencing the tool.uv.dev-dependencies deprecation
  warning (#100)
- Five Dependabot security bumps (dompurify, gitpython, mako, litellm,
  python-multipart)

Also flips the project URLs and serve_cmd's _GITHUB_REPO constant from
RaghavChamadiya/repowise to repowise-dev/repowise so 'repowise serve'
can locate the published web UI tarball.
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.

[Bug] ignores the initial setting - Generate .claude/CLAUDE.md? [Y/n]

2 participants