Skip to content

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

fix(editor-files): the CLAUDE.md scope line uses the CLI's mode names (#4294)

Raghav Chamadiyae375b3f40b47
diff --git a/packages/core/src/repowise/core/generation/editor_files/data.py b/packages/core/src/repowise/core/generation/editor_files/data.py
index fe127a8c7..2b7d80666 100644
--- a/packages/core/src/repowise/core/generation/editor_files/data.py
+++ b/packages/core/src/repowise/core/generation/editor_files/data.py
@@ -157,7 +157,11 @@ class EditorFileData:
upgrade = scope.get("upgrade") if isinstance(scope.get("upgrade"), dict) else {}
gaps = []
if self.keyless:
- gaps.append("no model (template prose, full-text search)")
+ # The CLI's mode names (cli/ui/mode_names.py), which core cannot import.
+ if scope.get("content_provenance") == "none":
+ gaps.append("Index only (no documentation, full-text search)")
+ else:
+ gaps.append("Built from code (no model, full-text search)")
if scope.get("git_tier") == "essential":
gaps.append("essential Git history only")
if self.upgrade_pending:
@@ -168,7 +172,7 @@ class EditorFileData:
def upgrade_pending(self) -> bool:
upgrade = self.index_scope.get("upgrade")
status = upgrade.get("status") if isinstance(upgrade, dict) else None
- # `--full` needs a key, so a keyless index is never told to continue one.
+ # A keyless index gets its next command from the keyless bullet instead.
return status in ("pending", "resumable", "failed") and not self.keyless
@property
diff --git a/tests/unit/generation/test_editor_file_base.py b/tests/unit/generation/test_editor_file_base.py
index 0aaea24c6..6088831dd 100644
--- a/tests/unit/generation/test_editor_file_base.py
+++ b/tests/unit/generation/test_editor_file_base.py
@@ -147,8 +147,8 @@ def test_keyless_index_gets_keyless_steering(any_gen):
assert _KEYLESS_BULLET in result
# Template pages store confidence 1.0, so the figure would read as 100%.
assert "Confidence:" not in result
- assert "(commit a1b2c3d).\nScope: no model (template prose, full-text search)." in result
- # `--full` needs a key; offering it to a keyless index is a dead end.
+ assert "(commit a1b2c3d).\nScope: Built from code (no model, full-text search)." in result
+ # A built-from-code index is already full: `--full` has nothing to add.
assert "repowise update --full" not in result
assert "[fts]` only has no semantic agreement" not in result
assert 'Cite `confidence: "high"`' not in result
@@ -159,6 +159,7 @@ def test_keyless_index_gets_keyless_steering(any_gen):
def test_index_only_keyless_names_the_fast_to_full_command(any_gen):
result = any_gen.render(_scoped({**_KEYLESS_SCOPE, "content_provenance": "none"}))
assert "provider key and `repowise update --full`" in result
+ assert "Scope: Index only (no documentation, full-text search)." in result
def test_keyed_index_keeps_model_guidance(any_gen):