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.

feat(cli): one set of mode names across init, status and update (#4249)

Raghav Chamadiya384cad7216a1
diff --git a/docs/reference/CLI_REFERENCE.md b/docs/reference/CLI_REFERENCE.md
index c9d5f8d05..fe71f5861 100644
--- a/docs/reference/CLI_REFERENCE.md
+++ b/docs/reference/CLI_REFERENCE.md
@@ -142,9 +142,9 @@ In workspace mode, adds: repo scanning, per-repo indexing, cross-repo analysis (
**Interactive modes.** Running a bare `repowise init` on a TTY (no `--provider`, `--prose`/`--no-prose`, or `--yes`) opens a menu:
-1. **Everything**, index + model-written docs. After picking a provider you can answer **"Customize?"** to tune any setting before the run.
-2. **Index only**, the same layers plus a wiki rendered from structure; no LLM, no key, no cost. Answer **"Customize indexing?"** to set exclude patterns, commit limit, skip-tests/infra, submodules, and fast mode.
-3. **Advanced**, full control. First choose **"Generate model-written wiki docs?"**; the prompts then split into an **Indexing** section (always) and a **Generation** section (provider, concurrency, embedder, wiki style, onboarding, tiering, only when model-written docs are on).
+1. **Written by a model**, index + documentation a model writes. After picking a provider you can answer **"Customize?"** to tune any setting before the run.
+2. **Built from code**, the same layers plus documentation built from code; no LLM, no key, no cost. Answer **"Customize indexing?"** to set exclude patterns, commit limit, skip-tests/infra, submodules, and fast mode.
+3. **Advanced**, full control. First choose **"Have a model write the documentation?"**; the prompts then split into an **Indexing** section (always) and a **Generation** section (provider, concurrency, embedder, wiki style, onboarding, tiering, only when model-written docs are on).
**Page volume.** File pages are rendered from structure and cost no model tokens, so what bounds them buys wiki size, embedding calls and less retrieval noise, never spend. Two numbers govern it, both derived from the size distribution of real indexed repos. Above **2,000** documentable files (p95), an interactive advanced-mode run offers the top 2,000 by importance instead of one page per file, quoted in pages and megabytes; nothing is capped automatically at that size. Above **4,500** file pages (about 40 MB of file layer, near p99), every run holds the bucket to 4,500 and says so in its output, because that is where the tail is the difference between a wiki that publishes and one that does not. `--max-file-pages N` sets a cap directly and `--max-file-pages 0` refuses one; either way the answer is saved as `max_file_pages` in `config.yaml`, which `update --full` and `generate` honour. A hosted or scripted caller sets the same field with no terminal involved.
diff --git a/packages/cli/src/repowise/cli/commands/init_cmd/_generate.py b/packages/cli/src/repowise/cli/commands/init_cmd/_generate.py
index d8c140cb5..c1125011a 100644
--- a/packages/cli/src/repowise/cli/commands/init_cmd/_generate.py
+++ b/packages/cli/src/repowise/cli/commands/init_cmd/_generate.py
@@ -10,6 +10,7 @@ from rich.table import Table
from repowise.cli.helpers import console, load_config, warn
from repowise.cli.ui import BRAND, VALUE, print_phase_header
+from repowise.cli.ui.mode_names import INDEX_ONLY
from repowise.core.generation.styles import DEFAULT_STYLE
from ._exit import COST_UNCONFIRMED_BUILT, COST_UNCONFIRMED_KEPT
@@ -77,7 +78,7 @@ def _print_structural_plan(
table.add_section()
table.add_row("[bold]Total[/bold]", f"[bold]{total:,}[/bold]")
console.print(table)
- console.print(" Dry run: every page above is rendered from structure. No wiki written.")
+ console.print(" Dry run: every page above is built from code. No documentation written.")
def _run_deterministic_generation_phase(
@@ -115,19 +116,19 @@ def _run_deterministic_generation_phase(
3,
total_phases,
"Generation",
- "Building wiki pages from the code's structure (no model, no cost)",
+ "Building documentation from code (no model, no cost)",
)
# Both knobs only reach a model: templates are English and unstyled, so say
# so rather than record a style the pages do not have.
if language != "en":
console.print(
- f" [dim]Templates are written in English, so [bold]--language "
+ f" [dim]Documentation built from code is in English, so [bold]--language "
f"{language}[/bold] has no effect here. Run [bold]repowise update "
- "--full[/bold] to write the wiki with a model in that language.[/dim]"
+ "--full[/bold] to have a model write the documentation in that language.[/dim]"
)
if wiki_style != DEFAULT_STYLE:
console.print(
- f" [dim]Wiki styles shape how a model writes, so [bold]--wiki-style "
+ f" [dim]Documentation styles shape how a model writes, so [bold]--wiki-style "
f"{wiki_style}[/bold] has no effect here.[/dim]"
)
if embedder != embedder_name_resolved:
@@ -181,13 +182,13 @@ def _print_generation_plan(
table.add_row(
page_type_label(plan.page_type),
f"{plan.count:,}",
- "model" if from_model else "[dim]structure[/dim]",
+ "model" if from_model else "[dim]code[/dim]",
)
table.add_section()
table.add_row(
"[bold]Total[/bold]",
f"[bold]{est.total_pages:,}[/bold]",
- f"[bold]{model_pages:,} by model, {est.total_pages - model_pages:,} from structure[/bold]",
+ f"[bold]{model_pages:,} by model, {est.total_pages - model_pages:,} from code[/bold]",
)
console.print(table)
@@ -255,7 +256,7 @@ def _run_generation_phase(
3,
total_phases,
"Generation",
- f"Generating wiki pages with {provider.provider_name} / {provider.model_name}",
+ f"Writing documentation with {provider.provider_name} / {provider.model_name}",
)
gen_config = GenerationConfig.from_repo_config(
@@ -299,11 +300,11 @@ def _run_generation_phase(
if embedding:
console.print(f" [dim]{embedding}[/dim]")
if cost_gate_declined(est, yes=yes, message=" Continue?"):
- console.print(" Skipping the model. [dim]Building the wiki from structure instead.[/dim]")
+ console.print(" Skipping the model. [dim]Building documentation from code instead.[/dim]")
console.print(
" [dim]Run [bold]repowise generate[/bold] any time to write the subsystem "
"pages, or re-run init with [bold]--yes[/bold] to accept the cost now.\n"
- " Post-commit updates stay index-only, so no hook will start a model run "
+ " Post-commit updates stay built from code, so no hook will start a model run "
"on its own.[/dim]"
)
return False, True
@@ -384,13 +385,13 @@ def _after_cost_declined(run: InitRun) -> None:
if kept:
# Declining new pages is no request to replace the written ones.
console.print(
- " [dim]Keeping the wiki this repo already has. Nothing was "
+ " [dim]Keeping the documentation this repo already has. Nothing was "
"generated and nothing was replaced.[/dim]"
)
return
run.cost_declined = True
console.print(
- " [dim]Building the wiki from structure instead. Run "
+ " [dim]Building documentation from code instead. Run "
"[bold]repowise update --full[/bold] to write it with a "
"model later.[/dim]"
)
@@ -404,7 +405,10 @@ def _generate(run: InitRun) -> bool:
# The priced branch has its own dry-run exit.
if opts.dry_run and (opts.index_only or run.no_provider):
if opts.run_mode == "fast":
- console.print("\n Dry run: fast mode indexes graph and git only. No wiki written.")
+ console.print(
+ f"\n Dry run: {INDEX_ONLY.lower()}, fast mode indexes graph and git. "
+ "No documentation written."
+ )
else:
_print_structural_plan(
result=run.result,
@@ -422,9 +426,9 @@ def _generate(run: InitRun) -> bool:
# Fast mode is a graph-and-git index only.
if opts.index_only and opts.run_mode == "fast":
console.print(
- " [dim]Skipping wiki generation in fast mode. Run "
+ f" [dim]{INDEX_ONLY}: fast mode skips documentation. Run "
"[bold]repowise init[/bold] without [bold]--mode fast[/bold] to "
- "render it from structure, or [bold]repowise update --full[/bold] "
+ "build it from code, or [bold]repowise update --full[/bold] "
"to write it with a model.[/dim]"
)
return False
diff --git a/packages/cli/src/repowise/cli/commands/init_cmd/_interactive.py b/packages/cli/src/repowise/cli/commands/init_cmd/_interactive.py
index de535ee03..d12e4ab80 100644
--- a/packages/cli/src/repowise/cli/commands/init_cmd/_interactive.py
+++ b/packages/cli/src/repowise/cli/commands/init_cmd/_interactive.py
@@ -270,7 +270,7 @@ def _offer_hook_install_prompts(
console_obj.print()
console_obj.print(
- "[bold]Auto-sync:[/bold] Install a post-commit hook to keep the wiki "
+ "[bold]Auto-sync:[/bold] Install a post-commit hook to keep the index "
"in sync after every commit?"
)
diff --git a/packages/cli/src/repowise/cli/commands/init_cmd/_options.py b/packages/cli/src/repowise/cli/commands/init_cmd/_options.py
index 704f4ea3f..3ddd1e626 100644
--- a/packages/cli/src/repowise/cli/commands/init_cmd/_options.py
+++ b/packages/cli/src/repowise/cli/commands/init_cmd/_options.py
@@ -123,8 +123,8 @@ def resolve_structural_flags(opts: InitOptions) -> InitOptions:
if opts.index_only or opts.docs_opt is not None:
console.print(
"[dim]--index-only and --docs are deprecated; use --no-prose "
- "(structural, no key) or --prose (model-written). They still work "
- "this release.[/dim]"
+ "(built from code, no key) or --prose (written by a model). They still "
+ "work this release.[/dim]"
)
# Each of the three sources votes for "structural" (True) or "prose" (False).
# --index-only always means structural; --docs maps deterministic->structural,
diff --git a/packages/cli/src/repowise/cli/commands/init_cmd/_prepare.py b/packages/cli/src/repowise/cli/commands/init_cmd/_prepare.py
index ffd9f4016..17d4d43f4 100644
--- a/packages/cli/src/repowise/cli/commands/init_cmd/_prepare.py
+++ b/packages/cli/src/repowise/cli/commands/init_cmd/_prepare.py
@@ -184,17 +184,19 @@ def _confirm_wiki_overwrite(run: InitRun) -> bool:
if not opts.index_only or run.prior_docs_mode != "llm" or opts.force or opts.yes:
return True
console.print(
- f"\n[{WARN}]This repo already has a model-written wiki.[/] "
- "Indexing without a model\nrewrites every page from templates; the "
+ f"\n[{WARN}]This repo already has documentation written by a model.[/] "
+ "Indexing without a model\nrebuilds every page from code; the "
"written versions stay in page history."
)
if not sys.stdin.isatty():
raise reasoned_error(
- "Refusing to replace a model-written wiki with template pages. "
- "Re-run with --yes to confirm, or drop --no-prose.",
+ "Refusing to replace documentation written by a model with pages built "
+ "from code. Re-run with --yes to confirm, or drop --no-prose.",
reason="wiki_overwrite_unconfirmed",
)
- if not click.confirm(" Replace the written wiki with template pages?", default=False):
+ if not click.confirm(
+ " Replace the written documentation with pages built from code?", default=False
+ ):
console.print("[dim]Nothing changed.[/dim]")
return False
return True
diff --git a/packages/cli/src/repowise/cli/commands/init_cmd/_provider.py b/packages/cli/src/repowise/cli/commands/init_cmd/_provider.py
index 7f99d49ea..c62309202 100644
--- a/packages/cli/src/repowise/cli/commands/init_cmd/_provider.py
+++ b/packages/cli/src/repowise/cli/commands/init_cmd/_provider.py
@@ -11,17 +11,23 @@ from repowise.cli.errors import reasoned_error
from repowise.cli.helpers import console, resolve_explicit_provider_or_prompt, run_async
from repowise.cli.providers import resolve_embedder_choice, template_run_embedder
from repowise.cli.ui import OK, OWL_SPINNER, VALUE, WARN, print_index_only_intro
+from repowise.cli.ui.mode_names import BUILT_FROM_CODE, INDEX_ONLY, written_by
from ._options import InitRun
def announce_index_only(run: InitRun) -> None:
- """Tell the user this run builds the wiki from structure."""
+ """Tell the user what a run without a model builds."""
+ fast = run.opts.run_mode == "fast"
if run.is_interactive:
- print_index_only_intro(console)
+ print_index_only_intro(console, fast=fast)
return
- console.print(f"[bold]repowise index-only[/bold] — {run.repo_path}")
- console.print("Building the wiki from structure [dim]— no model, no spend.[/dim]")
+ mode = INDEX_ONLY if fast else BUILT_FROM_CODE
+ console.print(f"[bold]repowise init[/bold] · {mode} · {run.repo_path}")
+ if fast:
+ console.print("Indexing the graph and git history [dim](no documentation, no spend).[/dim]")
+ else:
+ console.print("Building documentation from code [dim](no model, no spend).[/dim]")
def _resolve_or_fall_back(run: InitRun) -> None:
@@ -51,10 +57,10 @@ def _resolve_or_fall_back(run: InitRun) -> None:
raise
run.no_provider = True
if not run.is_interactive:
- console.print(f"[bold]repowise init[/bold] — {run.repo_path}")
+ console.print(f"[bold]repowise init[/bold] · {BUILT_FROM_CODE} · {run.repo_path}")
console.print(
- f"[{WARN}]No model configured.[/] Building the wiki from "
- "structure instead — no key, no spend.\n"
+ f"[{WARN}]No model configured.[/] Building documentation from "
+ "code instead (no key, no spend).\n"
"[dim]Set a key (or pass --provider) and run [bold]repowise "
"update --full[/bold] to have a model write it.[/dim]"
)
@@ -66,9 +72,10 @@ def _resolve_or_fall_back(run: InitRun) -> None:
def _print_provider_summary(run: InitRun) -> None:
- if not run.is_interactive and not run.no_provider:
- console.print(f"[bold]repowise init[/bold] — {run.repo_path}")
provider = run.provider
+ if not run.is_interactive and not run.no_provider:
+ mode = written_by(provider.model_name if provider is not None else None)
+ console.print(f"[bold]repowise init[/bold] · {mode} · {run.repo_path}")
if provider is not None:
console.print(
f" Provider: [{VALUE}]{provider.provider_name}[/] / Model: [{VALUE}]{provider.model_name}[/]"
diff --git a/packages/cli/src/repowise/cli/commands/init_cmd/command.py b/packages/cli/src/repowise/cli/commands/init_cmd/command.py
index c9efa522e..55f12a2d0 100644
--- a/packages/cli/src/repowise/cli/commands/init_cmd/command.py
+++ b/packages/cli/src/repowise/cli/commands/init_cmd/command.py
@@ -160,7 +160,7 @@ def _run_workspace_init(opts: InitOptions, scan: Any) -> None:
default=False,
# "No wiki", not "writes nothing": the pipeline still warms its parse and
# duplication caches, which are derived data.
- help="Show the generation plan and cost estimate. Writes no wiki.",
+ help="Show the generation plan and cost estimate. Writes no documentation.",
)
@click.option("--yes", "-y", is_flag=True, default=False, help="Skip cost confirmation prompt.")
@click.option(
@@ -199,12 +199,13 @@ def _run_workspace_init(opts: InitOptions, scan: Any) -> None:
"prose",
default=None,
help=(
- "Write the subsystem (concept) pages as model prose (needs a key), or "
- "render the whole wiki from structure. Every other page is structural "
- "either way. Default: prose when a key is available. --no-prose makes no "
- "model calls, whatever keys are set: it skips the written subsystem pages "
- "and model decision extraction from PRs, commit history and code comments. "
- "Run repowise generate later to add both. Use --mode fast for no wiki at all."
+ "Documentation written by a model (--prose, needs a key) or built from "
+ "code (--no-prose). Only the subsystem (concept) pages differ; every other "
+ "page is built from code either way. Default: written by a model when a key "
+ "is available. --no-prose makes no model calls, whatever keys are set: it "
+ "skips the written subsystem pages and model decision extraction from PRs, "
+ "commit history and code comments. Run repowise generate later to add both. "
+ "Use --mode fast for an index only, with no documentation."
),
)
@click.option(
@@ -228,9 +229,9 @@ def _run_workspace_init(opts: InitOptions, scan: Any) -> None:
type=click.Choice(["standard", "fast"]),
default="standard",
help=(
- "Pipeline depth. 'fast' indexes graph + essential git only (no per-file "
- "blame, no co-change, no LLM docs) for a quick first pass on very large "
- "repos; backfill the rest later. Default: standard."
+ "Pipeline depth. 'fast' is an index only: graph + essential git (no "
+ "per-file blame, no co-change, no documentation) for a quick first pass "
+ "on very large repos; backfill the rest later. Default: standard."
),
)
@click.option(
@@ -410,7 +411,7 @@ def _run_workspace_init(opts: InitOptions, scan: Any) -> None:
default=None,
metavar="CODE",
help=(
- "Output language for generated wiki pages (e.g. en, zh, ru, hi). "
+ "Output language for the documentation (e.g. en, zh, ru, hi). "
"Code, file paths, and symbol names stay untranslated. Saved to "
"config so `update` keeps the language. Default: en."
),
@@ -453,13 +454,13 @@ def _run_workspace_init(opts: InitOptions, scan: Any) -> None:
help="Progress output style.",
)
def init_command(**params: Any) -> None:
- """Generate wiki documentation for a codebase.
+ """Index a codebase and build its documentation.
PATH defaults to the current directory.
- Use --no-prose to render the whole wiki from structure with no model and no
- key; --prose writes the subsystem pages with a model. Every other page is
- structural either way.
- Use --mode fast for a quick graph + essential-git index of a very large repo.
+ --prose: documentation written by a model (needs a key).
+ --no-prose: documentation built from code, no model and no key.
+ Only the subsystem pages differ; every other page is built from code.
+ --mode fast: index only (graph + essential git), for a very large repo.
"""
from repowise.core.cancellation import PipelineCancelled
diff --git a/packages/cli/src/repowise/cli/commands/init_cmd/generation.py b/packages/cli/src/repowise/cli/commands/init_cmd/generation.py
index a623ea2cb..1495159d4 100644
--- a/packages/cli/src/repowise/cli/commands/init_cmd/generation.py
+++ b/packages/cli/src/repowise/cli/commands/init_cmd/generation.py
@@ -172,7 +172,7 @@ def structural_page_summary(plans: list[Any]) -> str:
if not total:
return ""
parts = [f"{counts[pt]} {short}" for pt, _, short in _PAGE_TYPE_LABELS if counts.get(pt)]
- return f"{total} more pages rendered from the code itself, no model, no cost: " + ", ".join(
+ return f"{total} more pages built from code, no model, no cost: " + ", ".join(
parts
)
@@ -199,7 +199,7 @@ def announce_file_page_cap(parsed_files: list[Any], gen_config: Any) -> None:
console.print(
f" [dim]File pages: keeping the top [bold]{cap:,}[/bold] of about "
f"{documentable:,} by importance ({reason}). File pages cost no model "
- "tokens, so this bounds wiki size and search noise, not spend. Pass "
+ "tokens, so this bounds documentation size and search noise, not spend. Pass "
"[bold]--max-file-pages 0[/bold] for one page per file.[/dim]"
)
@@ -316,7 +316,7 @@ def run_repo_generation(
if verbose and not deterministic:
console.print(
- " [dim](each generated page is saved as it completes — safe to Ctrl-C, "
+ " [dim](each generated page is saved as it completes; safe to Ctrl-C, "
"then run 'repowise init --resume' to pick up where it stopped)[/dim]"
)
@@ -433,8 +433,8 @@ def run_repo_generation(
# because a placeholder is deliberately kept out of the record of what
# is already done.
placeholder_note = (
- f" [dim]{stub_count} of them left a placeholder page rendered from "
- "structure alone, so the wiki has a page there but not a written "
+ f" [dim]{stub_count} of them left a placeholder page built from "
+ "code alone, so the documentation has a page there but not a written "
"one. The rest produced no page at all.[/dim]\n"
if stub_count
else ""
@@ -454,7 +454,7 @@ def run_repo_generation(
)
reason_note = "".join(f" [dim]· {r[:160]}[/dim]\n" for r in reasons[:3])
console.print(
- f"\n [{WARN}]The wiki is incomplete: some pages were not written.[/]\n"
+ f"\n [{WARN}]The documentation is incomplete: some pages were not written.[/]\n"
f"{placeholder_note}"
f"{reason_note}"
" [dim]Run [bold]repowise init --resume[/bold] to generate the pages that "
diff --git a/packages/cli/src/repowise/cli/commands/init_cmd/reporting.py b/packages/cli/src/repowise/cli/commands/init_cmd/reporting.py
index e02717cdc..6c7c95017 100644
--- a/packages/cli/src/repowise/cli/commands/init_cmd/reporting.py
+++ b/packages/cli/src/repowise/cli/commands/init_cmd/reporting.py
@@ -24,6 +24,7 @@ from repowise.cli.ui import (
print_analysis_summary,
print_files_written,
)
+from repowise.cli.ui.mode_names import TITLE_WORKSPACE, completion_title, pages, scope_line
def show_analysis_summary(result: Any) -> None:
@@ -207,10 +208,7 @@ def show_completion(
# languages and graph size appeared once in the "Analysis Complete"
# interstitial, minutes and one cost prompt earlier.
_index_rows: list[tuple[str, str]] = [
- (
- "Scope",
- f"{_scope['run_mode']} · {_scope['content_provenance']} · git {_scope['git_tier']}",
- ),
+ ("Scope", scope_line(_scope)),
("Files indexed", f"{result.file_count:,}"),
("Symbols", f"{result.symbol_count:,}"),
("Languages", _lang_summary_final),
@@ -243,7 +241,10 @@ def show_completion(
_template_pages = len(result.generated_pages or [])
metrics: list[tuple[str, str]] = [
*_index_rows,
- ("Wiki pages", f"{_template_pages:,} rendered from structure"),
+ (
+ "Documentation",
+ f"{pages(_template_pages)} built from code" if _template_pages else "none",
+ ),
("Elapsed", format_elapsed(elapsed)),
("", ""),
*_structure_rows,
@@ -261,7 +262,7 @@ def show_completion(
)
console.print()
console.print(
- build_completion_panel("repowise index complete", metrics, next_steps=next_steps)
+ build_completion_panel(completion_title(_scope), metrics, next_steps=next_steps)
)
console.print()
# Fast mode reaches this branch too, and it generates nothing, so the
@@ -279,7 +280,7 @@ def show_completion(
"(Ollama is the keyless one)."
)
console.print(
- " [dim]Every page is derived from structure and says so in its footer. "
+ " [dim]Every page is built from code and says so in its footer. "
f"{_search_note}[/dim]"
)
# A keyless index is finished, not partial — this just names the
@@ -291,9 +292,9 @@ def show_completion(
_print_embed_failure(_embed_failed)
else:
console.print(
- " [dim]No wiki pages: fast mode indexes the graph and git history only.\n"
- " Re-run without [bold]--mode fast[/bold] to render the wiki from "
- "structure.[/dim]"
+ " [dim]Index only: the graph and git history, no documentation.\n"
+ " Re-run without [bold]--mode fast[/bold] to build documentation from "
+ "code.[/dim]"
)
for _line in build_status_notes(setup):
console.print(_line)
@@ -314,11 +315,11 @@ def show_completion(
_written = len(_pages) - _stubs
_det = sum(1 for p in _pages if getattr(p, "provider_name", "") == "template")
_ai = len(_pages) - _det
- _pages_label = str(_written)
+ _pages_label = pages(_written)
if _failed_ids:
- _pages_label = f"{_written} ({len(_failed_ids)} failed)"
+ _pages_label += f" ({len(_failed_ids):,} failed)"
elif _det:
- _pages_label = f"{_written} ({_ai} model-written · {_det} from structure)"
+ _pages_label += f" ({_ai:,} written by the model · {_det:,} built from code)"
# The ledger has the real figure; before this the panel reported
# millions of tokens and no dollars, on a run the user had just
# approved a dollar estimate for.
@@ -330,7 +331,7 @@ def show_completion(
)
metrics = [
*_index_rows,
- ("Pages generated", _pages_label),
+ ("Documentation", _pages_label),
_spend_row,
("Provider", f"{provider.provider_name} / {provider.model_name}"),
("Elapsed", format_elapsed(elapsed)),
@@ -350,7 +351,7 @@ def show_completion(
console.print()
console.print(
- build_completion_panel("repowise init complete", metrics, next_steps=next_steps)
+ build_completion_panel(completion_title(_scope), metrics, next_steps=next_steps)
)
console.print()
_print_embed_failure(_embed_failed)
@@ -429,7 +430,7 @@ def show_workspace_completion(
("Elapsed", format_elapsed(elapsed)),
]
if not index_only and provider is not None:
- metrics.insert(3, ("Pages generated", f"{total_pages:,}"))
+ metrics.insert(3, ("Documentation", pages(total_pages)))
metrics.insert(4, ("Provider", f"{provider.provider_name} / {provider.model_name}"))
if errors:
metrics.append(("Errors", f"{len(errors)} repos failed"))
@@ -438,7 +439,7 @@ def show_workspace_completion(
next_steps = [
("repowise serve", "open the workspace dashboard at http://localhost:3000"),
("repowise status --workspace", "show workspace status"),
- ("repowise generate <repo>", "upgrade a repo's wiki to model-written prose"),
+ ("repowise generate <repo>", "write a repo's documentation with a model"),
]
else:
next_steps = [
@@ -449,7 +450,7 @@ def show_workspace_completion(
console.print()
console.print(
- build_completion_panel("repowise workspace init complete", metrics, next_steps=next_steps)
+ build_completion_panel(TITLE_WORKSPACE, metrics, next_steps=next_steps)
)
console.print()
@@ -458,7 +459,7 @@ def show_workspace_completion(
# to discover empty Docs/Overview in the web UI on their own.
docs_skipped = [(alias, reason) for alias, (count, reason) in docs_outcomes.items() if reason]
if docs_outcomes:
- console.print("[bold]Docs status[/bold]")
+ console.print("[bold]Documentation[/bold]")
for alias, (count, reason) in docs_outcomes.items():
if reason:
console.print(
@@ -471,6 +472,6 @@ def show_workspace_completion(
console.print()
console.print(
f" Run [bold]repowise update --repo {first} --docs[/bold] "
- "to generate docs for a skipped repo."
+ "to build documentation for a skipped repo."
)
console.print()
diff --git a/packages/cli/src/repowise/cli/commands/init_cmd/workspace.py b/packages/cli/src/repowise/cli/commands/init_cmd/workspace.py
index fcf703b2d..a1d285a7d 100644
--- a/packages/cli/src/repowise/cli/commands/init_cmd/workspace.py
+++ b/packages/cli/src/repowise/cli/commands/init_cmd/workspace.py
@@ -69,6 +69,7 @@ from repowise.cli.ui import (
load_dotenv,
print_banner,
)
+from repowise.cli.ui.mode_names import pages
from repowise.core.ci.markdown import plural
from repowise.core.docs_mode import docs_mode_state_fields
from repowise.core.generation.styles import DEFAULT_STYLE
@@ -166,8 +167,8 @@ def _run_workspace_generation(
):
console.print(
f" [{WARN}]Skipped.[/] "
- "[dim]Index will be saved without docs; "
- "future `repowise update` runs default to index-only.[/dim]"
+ "[dim]Documentation will be built from code; "
+ "future `repowise update` runs stay built from code.[/dim]"
)
# Sentinel: caller treats this exactly like an index-only run so the
# persisted docs mode is not "llm" and the post-commit hook doesn't
@@ -470,7 +471,7 @@ def _generate_repo_docs(repo: Any, ctx: _WorkspaceCtx, index: _RepoIndex) -> _Re
docs = _RepoDocs()
if ctx.dry_run:
console.print(
- f" [{WARN}]Dry run — `.repowise/` created; "
+ f" [{WARN}]Dry run: `.repowise/` created; "
"no DB, state, or pages written for this repo.[/]\n"
)
docs.skip_reason = "dry run"
@@ -518,14 +519,14 @@ def _generate_repo_with_model(
docs.pages_generated = len(generated_pages) - count_stub_fallbacks(generated_pages)
docs.docs_mode = "llm"
- console.print(f" [{OK}]✓[/] Generated {docs.pages_generated} pages\n")
+ console.print(f" [{OK}]✓[/] Wrote {pages(docs.pages_generated)} with the model\n")
except CostGateDeclined:
# Declining only meant "not at that price": fall back to the free
# template renderer rather than leave the repo with no wiki.
if not sys.stdin.isatty():
ctx.gaps.append(f"{repo.alias}: {COST_UNCONFIRMED_BUILT}")
console.print(
- " [dim]Building this repo's wiki from structure instead. Run "
+ " [dim]Building this repo's documentation from code instead. Run "
"[bold]repowise update --repo "
f"{repo.alias} --full[/bold] to write it with a model later.[/dim]"
)
@@ -557,7 +558,7 @@ def _render_repo_from_templates(
docs.pages_generated = len(generated_pages)
docs.docs_mode = "deterministic"
console.print(
- f" [{OK}]✓[/] Rendered {len(generated_pages)} pages from structure (no model)\n"
+ f" [{OK}]✓[/] Built {pages(len(generated_pages))} from code (no model)\n"
)
@@ -1080,7 +1081,7 @@ def _resolve_workspace_provider(
if answers.provider_name is not None:
raise
console.print(
- f" [{WARN}]Provider setup failed ({exc}); falling back to index-only.[/]"
+ f" [{WARN}]Provider setup failed ({exc}); building documentation from code.[/]"
)
answers.index_only = True
provider = None
@@ -1098,7 +1099,7 @@ def _workspace_config(pick: WorkspacePick, *, ask: bool, dry_run: bool) -> Any:
# `.repowise/` is still created per repo, so a later distill-hook
# decline can gate every selected path; nothing is written into it.
console.print(
- f" [{WARN}]Dry run — `.repowise/` directories are created, "
+ f" [{WARN}]Dry run: `.repowise/` directories are created, "
"but no config, index, or pages are written.[/]"
)
else:
diff --git a/packages/cli/src/repowise/cli/commands/status_cmd.py b/packages/cli/src/repowise/cli/commands/status_cmd.py
index 5c388b356..e2e4850ca 100644
--- a/packages/cli/src/repowise/cli/commands/status_cmd.py
+++ b/packages/cli/src/repowise/cli/commands/status_cmd.py
@@ -23,6 +23,13 @@ from repowise.cli.helpers import (
)
from repowise.cli.output import emit_json, format_option, notice_console
from repowise.cli.ui.brand import format_bytes
+from repowise.cli.ui.mode_names import (
+ INDEX_ONLY,
+ commit_cap_label,
+ mode_label,
+ pages,
+ scope_line,
+)
from repowise.cli.ui.result_panels import keyless_upgrade_note
from repowise.core.docs_mode import resolve_docs_mode
from repowise.core.index_scope import resolve_index_scope
@@ -544,7 +551,7 @@ def _workspace_status(target: CommandTarget, fmt: str = "table") -> None:
table.add_column("Repo", style="cyan", min_width=16)
table.add_column("Files", justify="right")
table.add_column("Symbols", justify="right")
- table.add_column("Docs", justify="right")
+ table.add_column("Documentation", justify="right")
table.add_column("Storage", justify="right")
table.add_column("Indexed", style="dim")
table.add_column("HEAD", style="dim")
@@ -565,16 +572,15 @@ def _workspace_status(target: CommandTarget, fmt: str = "table") -> None:
page_count = row["pages"]
docs_mode = row["docs_mode"]
- # One axis in the Docs column: every wiki is complete, and the only
- # question is whether the subsystem pages carry written prose or are
- # still stubs. `repowise generate` writes the stubs.
+ # One axis: who wrote the subsystem pages. `repowise generate` has a
+ # model write the ones built from code.
if page_count > 0:
- if docs_mode == "deterministic":
- docs_cell = f"[cyan]{page_count} · stubs[/cyan]"
- else:
- docs_cell = f"[green]{page_count} · prose[/green]"
+ colour = "cyan" if docs_mode == "deterministic" else "green"
+ docs_cell = (
+ f"[{colour}]{pages(page_count)} · {mode_label(row['index_scope'])}[/{colour}]"
+ )
elif docs_mode == "none":
- docs_cell = "[yellow]None[/yellow]"
+ docs_cell = f"[yellow]{INDEX_ONLY}[/yellow]"
no_docs.append(row["alias"])
else:
docs_cell = "[yellow]0[/yellow]"
@@ -617,13 +623,13 @@ def _workspace_status(target: CommandTarget, fmt: str = "table") -> None:
if no_docs:
console.print()
console.print(
- f"[yellow]Note:[/yellow] {len(no_docs)} repo(s) have no generated docs: "
+ f"[yellow]Note:[/yellow] {len(no_docs)} repo(s) have no documentation: "
f"[cyan]{', '.join(no_docs)}[/cyan]"
)
first = no_docs[0]
console.print(
f" Run [bold]repowise update --repo {first} --docs[/bold] "
- "to generate them (requires an LLM provider)."
+ "to have a model write it (requires an LLM provider)."
)
@@ -741,18 +747,16 @@ def status_command(path: str | None, workspace: bool, no_workspace: bool, fmt: s
state_table.add_row("Model", state.get("model", "—") or "—")
state_table.add_row("Total tokens", f"{total_tokens:,}")
state_table.add_row("Index storage", format_bytes(storage_bytes))
- state_table.add_row(
- "Scope",
- f"{scope['run_mode']} · {scope['content_provenance']} · git {scope['git_tier']}",
- )
+ state_table.add_row("Scope", scope_line(scope))
coverage = scope["git_history_coverage"]
if coverage:
measured = coverage.get(
"files_with_history", coverage.get("files_measured", coverage.get("files_indexed", "?"))
)
eligible = coverage.get("files_eligible", coverage.get("eligible_files", "?"))
+ cap = commit_cap_label(scope["git_commit_cap"])
state_table.add_row(
- "Git coverage", f"{measured}/{eligible} files (cap {scope['git_commit_cap']})"
+ "Git coverage", f"{measured}/{eligible} files" + (f" ({cap})" if cap else "")
)
fp = scope["file_pages"]
if fp["eligible"] is not None:
diff --git a/packages/cli/src/repowise/cli/commands/update_cmd/command.py b/packages/cli/src/repowise/cli/commands/update_cmd/command.py
index 9af1983c8..b195d69cf 100644
--- a/packages/cli/src/repowise/cli/commands/update_cmd/command.py
+++ b/packages/cli/src/repowise/cli/commands/update_cmd/command.py
@@ -42,6 +42,7 @@ from repowise.cli.helpers import (
try_acquire_update_lock,
write_update_pending,
)
+from repowise.cli.ui.mode_names import scope_line
from repowise.core.docs_mode import docs_mode_state_fields, resolve_docs_mode
from repowise.core.ingestion.git_indexer import (
GIT_HISTORY_BACKFILL_REWALK,
@@ -502,10 +503,10 @@ def _render_full_upgrade_dry_run(
console.print(f" Git tier: [cyan]{current_git_tier}[/cyan] -> [cyan]FULL[/cyan]")
console.print(f" Pages currently recorded: [cyan]{page_label}[/cyan]")
console.print(
- f" Persisted scope: [cyan]{scope['run_mode']} / {scope['content_provenance']}[/cyan]"
+ f" Persisted scope: [cyan]{scope_line(scope)}[/cyan]"
)
console.print(
- " The whole-repository wiki would be generated after an explicit cost preview; "
+ " The whole-repository documentation would be written after an explicit cost preview; "
"completed stages are resumable. No changes made."
)
@@ -956,7 +957,7 @@ def _already_up_to_date(opts: UpdateOptions, run: UpdateRun) -> UpdateOutcome:
# A template wiki is current but has no model-written pages yet.
if resolve_docs_mode(run.state) == "deterministic":
console.print(
- "[dim]The wiki is rendered from templates. "
+ "[dim]Documentation is built from code. "
"Run [bold]repowise generate[/bold] to write pages with a model.[/dim]"
)
if not opts.dry_run:
@@ -1592,8 +1593,8 @@ def _render_template_pages(opts: UpdateOptions, run: UpdateRun, out: _TemplatePa
if run.head:
run.state["last_docs_commit"] = run.head
console.print(
- f" [green]✓[/green] Re-rendered [bold]{len(out.pages)}[/bold] "
- "wiki pages from structure"
+ f" [green]✓[/green] Rebuilt [bold]{len(out.pages):,}[/bold] "
+ "documentation pages from code"
)
diff --git a/packages/cli/src/repowise/cli/commands/update_cmd/deterministic.py b/packages/cli/src/repowise/cli/commands/update_cmd/deterministic.py
index ad0b3f3ec..2be197a62 100644
--- a/packages/cli/src/repowise/cli/commands/update_cmd/deterministic.py
+++ b/packages/cli/src/repowise/cli/commands/update_cmd/deterministic.py
@@ -263,7 +263,7 @@ def _render_pages(
)
# A template render takes every page it is fed; deterministic mode
# bypasses the budget already, so no page-id scoping is needed.
- with console.status(" Re-rendering wiki pages from structure…"):
+ with console.status(" Rebuilding documentation pages from code…"):
pages = run_async(
generator.generate_all(
affected_parsed,
diff --git a/packages/cli/src/repowise/cli/commands/update_cmd/reporting.py b/packages/cli/src/repowise/cli/commands/update_cmd/reporting.py
index 02e09da84..e3872c6aa 100644
--- a/packages/cli/src/repowise/cli/commands/update_cmd/reporting.py
+++ b/packages/cli/src/repowise/cli/commands/update_cmd/reporting.py
@@ -24,6 +24,7 @@ from repowise.cli.ui import (
build_completion_panel,
format_elapsed,
)
+from repowise.cli.ui.mode_names import TITLE_INDEX_UPDATED, TITLE_UPDATED_BUILT_FROM_CODE, pages
# Status -> display color, shared by the changed-file summary.
_STATUS_COLOR = {"added": "green", "deleted": "red", "modified": "yellow", "renamed": "blue"}
@@ -99,7 +100,7 @@ def render_cascade_budget_warning(
)
if model:
console.print(
- f" {model} model-written pages: run [cyan]repowise generate --stale[/cyan] "
+ f" {model} pages written by a model: run [cyan]repowise generate --stale[/cyan] "
f"to rewrite them (it estimates the cost first), or pass `{full}` "
"to regenerate everything in this run."
)
@@ -323,8 +324,8 @@ def show_full_completion(
metrics.append(("Elapsed", format_elapsed(elapsed)))
next_steps = [
- ("repowise serve", "browse the updated wiki at localhost:3000"),
- ("repowise search <query>", "search the wiki"),
+ ("repowise serve", "browse the updated documentation at localhost:3000"),
+ ("repowise search <query>", "search the documentation"),
]
console.print()
console.print(
@@ -360,7 +361,7 @@ def show_index_only_completion(
("Dead code", _dead_code_line(dead_code_report, changed_paths)),
]
if pages_rendered:
- metrics.append(("Wiki pages", f"{pages_rendered} re-rendered from structure"))
+ metrics.append(("Documentation", f"{pages(pages_rendered)} rebuilt from code"))
if degraded:
metrics.append(("Degraded", f"{len(degraded)} step(s)"))
if git_files:
@@ -374,14 +375,16 @@ def show_index_only_completion(
# The scoped, cost-gated upgrade path — a coverage, a directory or one
# page at a time — not the all-or-nothing `update --full`.
next_steps.append(
- ("repowise generate", "upgrade the wiki to model-written prose (needs a key)")
+ ("repowise generate", "write the documentation with a model (needs a key)")
)
else:
next_steps.append(("repowise update --docs", "regenerate docs for the changed files"))
console.print()
console.print(
build_completion_panel(
- "repowise index-only update complete", metrics, next_steps=next_steps
+ TITLE_UPDATED_BUILT_FROM_CODE if template_wiki else TITLE_INDEX_UPDATED,
+ metrics,
+ next_steps=next_steps,
)
)
console.print()
@@ -415,7 +418,7 @@ def show_workspace_completion(
next_steps = [
("repowise status --workspace", "show workspace status"),
- ("repowise serve", "browse a repo wiki at localhost:3000"),
+ ("repowise serve", "browse a repo's documentation at localhost:3000"),
]
console.print()
console.print(
diff --git a/packages/cli/src/repowise/cli/ui/mode_names.py b/packages/cli/src/repowise/cli/ui/mode_names.py
new file mode 100644
index 000000000..0cbe266ec
--- /dev/null
+++ b/packages/cli/src/repowise/cli/ui/mode_names.py
@@ -0,0 +1,88 @@
+"""The one naming table for index modes, read by every CLI surface.
+
+State keeps its machine values (``docs_mode``, ``content_provenance``,
+``run_mode``) and the flags keep their names (``--no-prose``, ``--prose``,
+``--mode fast``); this module is only what a person reads.
+"""
+
+from __future__ import annotations
+
+from collections.abc import Mapping
+from typing import Any
+
+BUILT_FROM_CODE = "Built from code"
+INDEX_ONLY = "Index only"
+UNKNOWN_MODE = "Mode unknown"
+
+#: Completion panel title per mode: what the run left the user with.
+TITLE_WRITTEN = "Repowise is ready"
+TITLE_BUILT_FROM_CODE = "Index ready, documentation built from code"
+TITLE_INDEX_ONLY = "Index only ready"
+TITLE_WORKSPACE = "Workspace ready"
+#: An update that skipped the model: it may sit on documentation of any kind.
+TITLE_INDEX_UPDATED = "Index updated"
+TITLE_UPDATED_BUILT_FROM_CODE = "Index updated, documentation built from code"
+
+#: ``docs_mode`` (state.json) -> ``content_provenance`` (index_scope).
+_PROVENANCE_BY_DOCS_MODE = {"none": "none", "deterministic": "template", "llm": "model"}
+
+
+def written_by(model: str | None = None) -> str:
+ """``Written by <model>``, or ``Written by a model`` when none is recorded."""
+ return f"Written by {model}" if model else "Written by a model"
+
+
+def provenance_label(provenance: str | None, model: str | None = None) -> str:
+ """Label for an ``index_scope.content_provenance`` value."""
+ if provenance in ("model", "mixed"):
+ return written_by(model)
+ if provenance == "template":
+ return BUILT_FROM_CODE
+ if provenance == "none":
+ return INDEX_ONLY
+ return UNKNOWN_MODE
+
+
+def docs_mode_label(docs_mode: str | None, model: str | None = None) -> str:
+ """Label for a ``state.json`` ``docs_mode`` value."""
+ return provenance_label(_PROVENANCE_BY_DOCS_MODE.get(docs_mode or ""), model)
+
+
+def mode_label(scope: Mapping[str, Any]) -> str:
+ """Label for a resolved index scope (see ``core.index_scope``)."""
+ provenance = scope.get("content_provenance")
+ if provenance == "unknown" and scope.get("run_mode") == "fast":
+ provenance = "none"
+ provider = scope.get("provider") if isinstance(scope.get("provider"), Mapping) else {}
+ return provenance_label(provenance, provider.get("model"))
+
+
+def completion_title(scope: Mapping[str, Any]) -> str:
+ """The completion panel title for the mode the run ended in."""
+ label = mode_label(scope)
+ if label == BUILT_FROM_CODE:
+ return TITLE_BUILT_FROM_CODE
+ if label == INDEX_ONLY:
+ return TITLE_INDEX_ONLY
+ return TITLE_WRITTEN
+
+
+def pages(count: int) -> str:
+ """``1 page`` / ``28 pages``."""
+ return f"{count:,} page" + ("" if count == 1 else "s")
+
+
+def commit_cap_label(cap: int | None) -> str | None:
+ """``last 5,000 commits``; ``None`` when no cap was recorded."""
+ if cap is None:
+ return None
+ return f"last {cap:,} commit" + ("" if cap == 1 else "s")
+
+
+def scope_line(scope: Mapping[str, Any]) -> str:
+ """``Built from code · git full · last 5,000 commits``."""
+ parts = [mode_label(scope), f"git {scope.get('git_tier', 'unknown')}"]
+ cap = commit_cap_label(scope.get("git_commit_cap"))
+ if cap:
+ parts.append(cap)
+ return " · ".join(parts)
diff --git a/packages/cli/src/repowise/cli/ui/mode_selection.py b/packages/cli/src/repowise/cli/ui/mode_selection.py
index 19b0fe239..074016366 100644
--- a/packages/cli/src/repowise/cli/ui/mode_selection.py
+++ b/packages/cli/src/repowise/cli/ui/mode_selection.py
@@ -20,6 +20,7 @@ from repowise.cli.ui.brand import (
key_value_table,
print_section,
)
+from repowise.cli.ui.mode_names import BUILT_FROM_CODE, INDEX_ONLY, written_by
from repowise.cli.ui.repo_scanner import (
RepoScanInfo,
estimated_documentable_files,
@@ -66,13 +67,13 @@ def interactive_fast_mode_offer(
"""
n = scan.total_files if scan else 0
body = Text()
- body.append(" Large repository detected — ", style="bold")
+ body.append(" Large repository detected: ", style="bold")
body.append(f"{n:,} files.\n\n", style=BRAND_STYLE)
- body.append(" Fast mode runs a quick first index:\n", style="bold")
+ body.append(f" Fast mode runs a quick first index ({INDEX_ONLY.lower()}):\n", style="bold")
body.append(" • dependency graph + essential git history\n")
body.append(" • graph metrics materialized to SQL\n")
- body.append(" • no per-file blame, no co-change walk, no LLM docs\n\n")
- body.append(" You can backfill full git history and generate docs later.\n", style="dim")
+ body.append(" • no per-file blame, no co-change walk, no documentation\n\n")
+ body.append(" You can add full git history and documentation later.\n", style="dim")
console.print(
Panel(
body,
@@ -96,10 +97,10 @@ def interactive_mode_select(console: Console, *, title: str | None = None) -> st
"""
body = Text()
body.append(" [1]", style=BRAND_STYLE)
- body.append(" Everything ", style="bold")
+ body.append(f" {written_by()} ", style="bold")
body.append("(recommended, needs an API key)\n", style="dim")
- body.append(" Everything repowise can build: dependency graph, git history,\n")
- body.append(" code health, architectural decisions, a model-written wiki,\n")
+ body.append(" Dependency graph, git history, code health, architectural\n")
+ body.append(" decisions, and documentation a model writes, with\n")
body.append(" architecture diagrams and API docs.\n")
body.append(
" Costs a few cents to a few dollars; you see the estimate\n"
@@ -108,15 +109,15 @@ def interactive_mode_select(console: Console, *, title: str | None = None) -> st
)
body.append(" [2]", style=BRAND_STYLE)
- body.append(" No prose ", style="bold")
+ body.append(f" {BUILT_FROM_CODE} ", style="bold")
body.append("(no key, no spend)\n", style="dim")
- body.append(" Every page type still gets built, straight from the code.\n")
- body.append(" Only the subsystem pages come out as outlines instead of prose;\n")
- body.append(" add a key later and run repowise generate to fill them in.\n\n")
+ body.append(" The same index, with every documentation page built from the code.\n")
+ body.append(" Subsystem pages come out as outlines; add a key later and run\n")
+ body.append(" repowise generate to have a model write them.\n\n")
body.append(" [3]", style=BRAND_STYLE)
body.append(" Advanced\n", style="bold")
- body.append(" Full control — turn AI docs on or off, then tune indexing\n")
+ body.append(" Full control: choose who writes the documentation, then tune indexing\n")
body.append(" and generation (commit limit, exclude patterns, concurrency, ...)")
console.print(
@@ -146,10 +147,10 @@ def interactive_generate_docs_toggle(console: Console) -> bool:
"""
console.print()
console.print(
- " [dim]Model-written docs call the LLM (has a cost). Say no and you still "
- "get a wiki,\n rendered from the code's structure, for free.[/dim]"
+ " [dim]Documentation written by a model calls the LLM (has a cost). Say no and "
+ "you still\n get documentation, built from code, for free.[/dim]"
)
- return click.confirm(" Generate model-written wiki docs?", default=True)
+ return click.confirm(" Have a model write the documentation?", default=True)
def interactive_customize_offer(console: Console, *, generate_docs: bool) -> bool:
@@ -173,7 +174,7 @@ def prompt_wiki_style(console: Console) -> str:
console.print("\n[bold]Documentation style[/bold]")
for idx, spec in enumerate(styles, 1):
marker = " [dim](default)[/dim]" if spec.name == DEFAULT_STYLE else ""
- console.print(f" {idx}. [{VALUE}]{spec.name}[/]{marker} — {spec.description}")
+ console.print(f" {idx}. [{VALUE}]{spec.name}[/]{marker}: {spec.description}")
default_idx = next((i for i, s in enumerate(styles, 1) if s.name == DEFAULT_STYLE), 1)
choice = click.prompt(
" Choose a style",
@@ -273,9 +274,9 @@ def prompt_file_page_volume(
console,
"Page volume",
f"About [bold]{estimate:,}[/bold] files here would each get a file page "
- f"({_format_mb(estimate)} of wiki).\n"
- " File pages are rendered from structure, so they cost no model tokens — what\n"
- " the tail costs is wiki size, one embedding call each, and search results\n"
+ f"({_format_mb(estimate)} of documentation).\n"
+ " File pages are built from code, so they cost no model tokens. What\n"
+ " the tail costs is documentation size, one embedding call each, and search results\n"
" that restate what a subsystem page already says.",
)
if would_be_capped_anyway:
@@ -285,12 +286,12 @@ def prompt_file_page_volume(
)
console.print()
console.print(
- f" [{BRAND}][1][/] Top [bold]{recommended:,}[/bold] by importance [dim](recommended) — "
+ f" [{BRAND}][1][/] Top [bold]{recommended:,}[/bold] by importance [dim](recommended), "
f"~{recommended:,} pages, {_format_mb(recommended)}[/dim]"
)
render_min, render_max = estimated_wiki_render_minutes(estimate)
console.print(
- f" [{BRAND}][2][/] Every eligible file [dim]— ~{estimate:,} pages, "
+ f" [{BRAND}][2][/] Every eligible file [dim]~{estimate:,} pages, "
f"{_format_mb(estimate)}, roughly {render_min:,}-{render_max:,} min "
"longer to render and embed[/dim]"
)
@@ -300,7 +301,7 @@ def prompt_file_page_volume(
# isatty() lied about being answerable (Windows Git Bash `< /dev/null`,
# pty wrappers, `docker run -t` without -i). Take the recommendation and
# keep going: an agent or CI job must never hang here.
- console.print(" [dim]No answer available — taking the recommendation.[/dim]")
+ console.print(" [dim]No answer available, taking the recommendation.[/dim]")
return recommended
if choice == "1":
return recommended
@@ -325,7 +326,7 @@ def _prompt_run_mode(
print_section(
console,
"Run mode",
- "standard = full depth · fast = quick graph + essential git, no LLM docs",
+ f"standard = full depth · fast = {INDEX_ONLY.lower()}, quick graph + essential git",
)
result["run_mode"] = click.prompt(
" Run mode",
@@ -494,7 +495,7 @@ def _summary_rows(
summary.append((label, value))
# ── Indexing (always) ──────────────────────────────────────────────────
- add("Generate docs", "yes" if generate_docs else "no (index only)")
+ add("Documentation", written_by() if generate_docs else BUILT_FROM_CODE)
add("Skip tests", "yes" if result["skip_tests"] else "no")
add("Skip infra", "yes" if result["skip_infra"] else "no")
if result["include_submodules"]:
@@ -526,7 +527,7 @@ def _summary_rows(
add("Reasoning", result["reasoning"])
add("Embedder", result["embedder"])
if result.get("wiki_style"):
- add("Wiki style", result["wiki_style"])
+ add("Documentation style", result["wiki_style"])
if result.get("language") and result["language"] != "en":
add(
"Language",
@@ -665,13 +666,14 @@ def _resolve_embedder_from_env() -> str:
return global_config_embedder() or "mock"
-def print_index_only_intro(console: Console) -> None:
+def print_index_only_intro(console: Console, *, fast: bool = False) -> None:
"""Show what index-only mode will do before starting.
A forecast, so no border — nothing here is a thing to act on, and it used to
carry the same box as the question two screens earlier.
"""
- print_section(console, "Index only", "No LLM calls. No API key. No cost.")
+ title = INDEX_ONLY if fast else BUILT_FROM_CODE
+ print_section(console, title, "No LLM calls. No API key. No cost.")
console.print()
# Bullets, not checkmarks: every green ✓ elsewhere in a run means "already
# done", and this is a forecast.
@@ -681,17 +683,21 @@ def print_index_only_intro(console: Console) -> None:
" [dim]•[/dim] Index git history (hotspots, ownership, co-changes)",
" [dim]•[/dim] Detect dead code",
" [dim]•[/dim] Extract architectural decisions without a model",
- " [dim]•[/dim] Render the wiki from structure: file, module, layer and",
- " cycle pages, the architecture diagram, the repo overview, API and",
- " infra pages, and the onboarding collection",
" [dim]•[/dim] Set up MCP server for AI assistants",
]
+ if not fast:
+ lines[5:5] = [
+ " [dim]•[/dim] Build documentation from code: file, module, layer and",
+ " cycle pages, the architecture diagram, the repo overview, API and",
+ " infra pages, and the onboarding collection",
+ ]
for line in lines:
console.print(line)
console.print()
- console.print(
- " [dim]The subsystem pages read as stubs, and decisions from PRs, commit "
- "history and comments wait for a model. Add a key and run "
- "[bold]repowise generate[/bold] to add both.[/dim]"
- )
- console.print()
+ if not fast:
+ console.print(
+ " [dim]The subsystem pages read as outlines, and decisions from PRs, commit "
+ "history and comments wait for a model. Add a key and run "
+ "[bold]repowise generate[/bold] to add both.[/dim]"
+ )
+ console.print()
diff --git a/packages/cli/src/repowise/cli/ui/result_panels.py b/packages/cli/src/repowise/cli/ui/result_panels.py
index bd99ad75a..d9fe8fe7f 100644
--- a/packages/cli/src/repowise/cli/ui/result_panels.py
+++ b/packages/cli/src/repowise/cli/ui/result_panels.py
@@ -170,12 +170,12 @@ def build_contextual_next_steps(
steps.append(("repowise mcp .", "connect an MCP client (Cursor, Codex, Claude Code)"))
elif fast_mode:
# Fast index: graph + essential git, no docs. Point at the full result.
- steps.append(("repowise init", "upgrade to full git history + a generated wiki"))
+ steps.append(("repowise init", "add full git history and documentation"))
elif index_only:
# `generate` is the scoped, cost-gated upgrade path — a coverage, a
# directory or one page at a time, each behind an estimate — not the
# all-or-nothing `update --full` this used to suggest.
- steps.append(("repowise generate", "write the subsystem pages with a model (needs a key)"))
+ steps.append(("repowise generate", "write the documentation with a model (needs a key)"))
elif dead_unreachable + dead_unused > 0:
steps.append(
("repowise dead-code", f"explore {dead_unreachable + dead_unused} dead code findings")
@@ -185,7 +185,7 @@ def build_contextual_next_steps(
elif decision_count > 0:
steps.append(("repowise decision list", f"browse {decision_count} architectural decisions"))
else:
- steps.append(('repowise search "<query>"', "search the generated wiki"))
+ steps.append(('repowise search "<query>"', "search the documentation"))
return steps
diff --git a/tests/integration/test_cli.py b/tests/integration/test_cli.py
index 09951d1c7..d30df479e 100644
--- a/tests/integration/test_cli.py
+++ b/tests/integration/test_cli.py
@@ -134,7 +134,7 @@ class TestWorkspaceInitIndexOnly:
catch_exceptions=False,
)
assert result.exit_code == 0, result.output
- assert "workspace init complete" in result.output
+ assert "Workspace ready" in result.output
# Each sub-repo got its own index + state, and a workspace config exists.
for name in ("alpha", "beta"):
assert (workspace_root / name / ".repowise" / "wiki.db").exists()
@@ -207,7 +207,7 @@ class TestInitDryRun:
catch_exceptions=False,
)
assert result.exit_code == 0, result.output
- assert "No wiki written" in result.output
+ assert "No documentation written" in result.output
assert "Generation Plan" not in result.output
assert not (work_repo / ".repowise" / "wiki.db").exists()
@@ -263,7 +263,7 @@ class TestInitFullMock:
assert result.exit_code == 0, result.output
assert (work_repo / ".repowise" / "wiki.db").exists()
assert (work_repo / ".repowise" / "state.json").exists()
- assert "init complete" in result.output
+ assert "Repowise is ready" in result.output
class TestInitIndexOnly:
@@ -277,7 +277,7 @@ class TestInitIndexOnly:
db_path = work_repo / ".repowise" / "wiki.db"
assert db_path.exists()
assert (work_repo / ".repowise" / "state.json").exists()
- assert "index complete" in result.output
+ assert "Index ready, documentation built from code" in result.output
import json
@@ -750,7 +750,7 @@ class TestUpdateIndexOnly:
cli, ["update", str(git_work_repo), "--index-only"], catch_exceptions=False
)
assert r1.exit_code == 0, r1.output
- assert "index-only update complete" in r1.output
+ assert "Index updated" in r1.output
state1 = json.loads(
(git_work_repo / ".repowise" / "state.json").read_text(encoding="utf-8")
@@ -1082,7 +1082,7 @@ class TestUpdateConfigChangeDetection:
assert r1.exit_code == 0, r1.output
assert "Config files changed" not in r1.output
assert "Pages to regenerate" not in r1.output
- assert "Re-rendered" not in r1.output
+ assert "Rebuilt" not in r1.output
assert not (git_work_repo / ".vscode").exists()
r2 = runner.invoke(cli, args, catch_exceptions=False)
@@ -1752,7 +1752,7 @@ class TestWorktreeInitForce:
flat = " ".join(r1.output.split())
assert upgrade_calls == []
assert "No provider configured" not in flat
- assert "Building the wiki from structure" in flat
+ assert "Building documentation from code" in flat
assert "no model, no spend" in flat
state = json.loads(
diff --git a/tests/unit/cli/test_cascade_budget_warning.py b/tests/unit/cli/test_cascade_budget_warning.py
index 62bec4bd8..d31540785 100644
--- a/tests/unit/cli/test_cascade_budget_warning.py
+++ b/tests/unit/cli/test_cascade_budget_warning.py
@@ -43,7 +43,7 @@ def test_warning_points_model_pages_at_generate_stale() -> None:
out = _render(50, 2752, (122, 1235))
assert "Cascade budget of 50 pages was reached. 2752 dependent files were skipped" in out
assert "1235 structural pages (file / cycle) refresh on the next repowise update" in out
- assert "122 model-written pages: run repowise generate --stale" in out
+ assert "122 pages written by a model: run repowise generate --stale" in out
assert "or pass `--cascade-budget 2802` to regenerate everything in this run." in out
diff --git a/tests/unit/cli/test_fast_mode_offer.py b/tests/unit/cli/test_fast_mode_offer.py
index c5e96380c..f437090ba 100644
--- a/tests/unit/cli/test_fast_mode_offer.py
+++ b/tests/unit/cli/test_fast_mode_offer.py
@@ -48,7 +48,7 @@ def test_next_steps_fast_mode_second_row_is_full_upgrade():
descs = " ".join(d for _, d in steps).lower()
# After serve, fast mode points at the full result.
assert cmds[1] == "repowise init"
- assert "full" in descs and "wiki" in descs
+ assert "full" in descs and "documentation" in descs
def test_next_steps_index_only_upgrades_via_generate_not_update_full():
diff --git a/tests/unit/cli/test_init_failure_reporting.py b/tests/unit/cli/test_init_failure_reporting.py
index 904d03d5b..13858ac5c 100644
--- a/tests/unit/cli/test_init_failure_reporting.py
+++ b/tests/unit/cli/test_init_failure_reporting.py
@@ -114,7 +114,7 @@ def test_run_repo_generation_reports_failures(tmp_path, monkeypatch):
# Deliberately not "due to provider failures": the commonest cause is this
# run's own artifact check rejecting the model's text, and naming the
# provider sent people to check a key that was working.
- assert "The wiki is incomplete: some pages were not written." in output
+ assert "The documentation is incomplete: some pages were not written." in output
assert "provider failures" not in output
assert "repowise init --resume" in output
@@ -235,7 +235,7 @@ def test_run_repo_generation_zero_failures(tmp_path, monkeypatch, verbose_flag):
assert len(pages) == 1
output = "\n".join(printed_lines)
assert "failed" not in output
- assert "The wiki is incomplete" not in output
+ assert "The documentation is incomplete" not in output
if verbose_flag:
assert "Generated [bold]1[/bold] pages" in output
else:
@@ -287,7 +287,7 @@ def test_show_completion_panel_with_failures(monkeypatch):
assert printed_panels
metrics_dict = dict(printed_panels[0])
- assert metrics_dict.get("Pages generated") == "1 (2 failed)"
+ assert metrics_dict.get("Documentation") == "1 page (2 failed)"
def _completion_result(pages: list) -> SimpleNamespace:
@@ -490,7 +490,7 @@ def test_completion_panel_excludes_placeholders_from_the_page_count(monkeypatch)
provider=SimpleNamespace(provider_name="mock", model_name="mock-model"),
)
- assert dict(printed_panels[0]).get("Pages generated") == "1 (1 failed)"
+ assert dict(printed_panels[0]).get("Documentation") == "1 page (1 failed)"
def test_run_repo_generation_uses_exact_job_id_when_provided(tmp_path, monkeypatch):
diff --git a/tests/unit/cli/test_mode_names.py b/tests/unit/cli/test_mode_names.py
new file mode 100644
index 000000000..d697eae68
--- /dev/null
+++ b/tests/unit/cli/test_mode_names.py
@@ -0,0 +1,134 @@
+"""One naming set for index modes across init, status and update output."""
+
+from __future__ import annotations
+
+import ast
+import re
+from pathlib import Path
+
+import pytest
+
+from repowise.cli.ui import mode_names as names
+from repowise.core.index_scope import resolve_index_scope
+
+_CLI = Path(names.__file__).resolve().parents[1]
+
+
+def _scope(docs_mode: str | None, **state):
+ if docs_mode is not None:
+ state["docs_mode"] = docs_mode
+ return resolve_index_scope(state, {"commit_limit": 5000})
+
+
+class TestTable:
+ @pytest.mark.parametrize(
+ ("docs_mode", "model", "label"),
+ [
+ ("deterministic", None, "Built from code"),
+ ("llm", "gemini-2.5-flash", "Written by gemini-2.5-flash"),
+ ("llm", None, "Written by a model"),
+ ("none", None, "Index only"),
+ (None, None, "Mode unknown"),
+ ],
+ )
+ def test_docs_mode_label(self, docs_mode, model, label):
+ assert names.docs_mode_label(docs_mode, model) == label
+
+ def test_mode_label_reads_the_scope_model(self):
+ scope = _scope("llm", model="mock-model")
+ assert names.mode_label(scope) == "Written by mock-model"
+
+ def test_fast_with_unknown_provenance_is_index_only(self):
+ assert names.mode_label(_scope(None, run_mode="fast")) == "Index only"
+
+ @pytest.mark.parametrize(
+ ("docs_mode", "title"),
+ [
+ ("deterministic", "Index ready, documentation built from code"),
+ ("llm", "Repowise is ready"),
+ ("none", "Index only ready"),
+ ],
+ )
+ def test_completion_title(self, docs_mode, title):
+ assert names.completion_title(_scope(docs_mode)) == title
+
+ def test_scope_line_carries_mode_and_commit_cap(self):
+ scope = _scope("deterministic", git_tier="full")
+ assert names.scope_line(scope) == "Built from code · git full · last 5,000 commits"
+
+ def test_scope_line_without_a_recorded_cap(self):
+ scope = resolve_index_scope({"docs_mode": "none", "git_tier": "essential"}, {})
+ assert names.scope_line(scope) == "Index only · git essential"
+
+ def test_commit_cap_singular(self):
+ assert names.commit_cap_label(1) == "last 1 commit"
+
+
+# The init, status and update modules whose output names a mode.
+_SURFACES = [
+ "ui/mode_names.py",
+ "ui/mode_selection.py",
+ "ui/result_panels.py",
+ "commands/status_cmd.py",
+ "commands/init_cmd/command.py",
+ "commands/init_cmd/reporting.py",
+ "commands/init_cmd/_provider.py",
+ "commands/init_cmd/_generate.py",
+ "commands/init_cmd/_prepare.py",
+ "commands/init_cmd/_options.py",
+ "commands/init_cmd/generation.py",
+ "commands/init_cmd/workspace.py",
+ "commands/update_cmd/reporting.py",
+]
+
+_BANNED = [
+ re.compile(r"\bNo prose\b", re.I),
+ re.compile(r"(?<!--)\bindex-only\b", re.I),
+ re.compile(r"\bwiki pages?\b", re.I),
+ re.compile(r"\bEverything\b"),
+ re.compile(r"\btemplates?\b", re.I),
+ re.compile(r"\bmodel-written\b", re.I),
+ re.compile(r"\bfrom structure\b", re.I),
+ # An em dash in prose; a lone one is the empty-cell placeholder.
+ re.compile("\\s\u2014|\u2014\\s"),
+]
+
+# State and provider values compared in code, never shown.
+_IDENTIFIER = re.compile(r"[a-z_]+")
+
+
+_DOCUMENTED = (ast.Module, ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef)
+
+
+def _docstring_of(node: ast.AST) -> ast.AST | None:
+ """The docstring constant of a module, class or function, if it has one."""
+ if not isinstance(node, _DOCUMENTED) or not node.body:
+ return None
+ first = node.body[0]
+ return first.value if isinstance(first, ast.Expr) else None
+
+
+def _is_text(node: ast.AST) -> bool:
+ """A string literal that is not a bare identifier."""
+ if not isinstance(node, ast.Constant) or not isinstance(node.value, str):
+ return False
+ return not _IDENTIFIER.fullmatch(node.value)
+
+
+def _user_strings(path: Path):
+ tree = ast.parse(path.read_text(encoding="utf-8"))
+ docstrings = {id(_docstring_of(node)) for node in ast.walk(tree)}
+ for node in ast.walk(tree):
+ if _is_text(node) and id(node) not in docstrings:
+ yield node.lineno, node.value
+
+
[email protected]("relative", _SURFACES)
+def test_no_retired_mode_names_in_user_strings(relative):
+ hits = [
+ f"{relative}:{line}: {text!r}"
+ for line, text in _user_strings(_CLI / relative)
+ for pattern in _BANNED
+ if pattern.search(text)
+ ]
+ assert not hits, "\n".join(hits)
diff --git a/tests/unit/cli/test_update_reporting.py b/tests/unit/cli/test_update_reporting.py
index 6ae68ae17..122170a0f 100644
--- a/tests/unit/cli/test_update_reporting.py
+++ b/tests/unit/cli/test_update_reporting.py
@@ -199,7 +199,7 @@ class TestCompletionPanels:
git_files=12,
elapsed=8.3,
)
- assert any("index-only update complete" in line for line in printed.lines)
+ assert any("Index updated" in line for line in printed.lines)
def test_workspace_completion_renders(self, monkeypatch):
printed = _capture(monkeypatch)