Skip to content

fix(branding): comprehensive sweep round 3 (clap help docs + find error prefix) - #63

Merged
thehoff merged 1 commit into
developfrom
fix/branding-comprehensive-sweep
May 18, 2026
Merged

thehoff merged 1 commit into
developfrom
fix/branding-comprehensive-sweep

Conversation

@thehoff

@thehoff thehoff commented May 18, 2026

Copy link
Copy Markdown
Owner

Summary

User reported contextcrawler --help showing "Discover missed RTK savings" and "Show RTK adoption" — leaks in clap subcommand doc comments that escaped the v0.1.8 rebrand sweep and PR #61.

This is round 3. The branding lint is now broad enough to catch every user-visible "RTK"/"rtk" reference class found so far.

Production fixes (user-visible)

  • src/main.rs clap doc comments (the reported --help output):
    • discover: "RTK savings" → "ContextCrawler savings"
    • session: "RTK adoption" → "ContextCrawler adoption"
    • rewrite: "RTK equivalent" → "ContextCrawler equivalent" (2x) + example
    • init --uninstall: "RTK artifacts" → "ContextCrawler artifacts"
    • find: "RTK and native find syntax" → "ContextCrawler and native"
    • cc-economics: "(rtk)" → "(contextcrawler)"
    • Test fixtures + comments rebranded (clap ignores argv[0])
  • src/hooks/rewrite_cmd.rs — 4 docstring refs
  • src/hooks/tirith_gate.rs — module doc refs
  • src/hooks/init.rs — uninstall message + docstring
  • src/cmds/system/find_cmd.rs — "rtk find:" error prefix

Lint extended (10 new tokens)

RTK savings / RTK adoption / RTK equivalent / RTK artifacts / RTK and native / (rtk) / $(rtk / rtk rewrite / rtk find:`

The expanded lint caught 6 additional leaks (rewrite_cmd, tirith_gate, init.rs) the user hadn't reported — all fixed in this PR.

Out of scope (filed separately)

  • scope: standardise rewrite_command output prefix ( vs ) #62 — rewrite_command returns rtk X for all rewrites (the hook caller historically expects this prefix). Migrating to contextcrawler X is a correctness/protocol scope decision affecting ~169 test assertions + historical SQLite tracking labels. The lint deliberately does NOT cover format!("rtk X") literals for this reason.
  • Telemetry attribution (RTK AI Labs / rtk-ai/rtk URLs) — factual upstream reference, separate scope.

Verified

  • cargo build clean
  • cargo test --bin contextcrawler — 2156 pass / 0 fail
  • All 9 integration suites green
  • Empirical: every subcommand --help page now clean of RTK/rtk references

Closes the user-reported "discover / session help-page" branding leak (in-session report 2026-05-18).

…or prefix) (#62-adjacent)

User reported branding leaks in `--help` output:
  discover       Discover missed RTK savings ...
  session        Show RTK adoption ...

Same root cause as the v0.1.8/PR-#61 leaks: the rebrand sweep missed
specific phrase classes that the lint didn't catch.

This is round 3. The lint is now broad enough to catch every
user-visible "RTK"/"rtk" reference class found so far.

## Production fixes (user-visible)

- `src/main.rs` clap doc comments (subcommand `--help` text):
  - "RTK savings" -> "ContextCrawler savings" (discover)
  - "RTK adoption" -> "ContextCrawler adoption" (session)
  - "RTK equivalent" -> "ContextCrawler equivalent" (rewrite, 2x)
  - "RTK artifacts" -> "ContextCrawler artifacts" (uninstall)
  - "RTK and native" -> "ContextCrawler and native" (find)
  - "spending vs savings (rtk)" -> "(contextcrawler)" (cc-economics)
  - Test fixture comments + argv[0] fixtures: `rtk` -> `contextcrawler`
    (clap ignores argv[0]; these were just outdated)
- `src/hooks/rewrite_cmd.rs`: 4 docstring "RTK equivalent" + "rtk rewrite" refs
- `src/hooks/tirith_gate.rs`: module doc inline-code refs
- `src/hooks/init.rs`: "Cursor RTK artifacts" docstring + uninstall println
- `src/cmds/system/find_cmd.rs`: "rtk find:" error prefix -> "contextcrawler find:"

## Branding lint extended

Added 10 new tokens to `tests/branding_lint.rs::FORBIDDEN_TOKENS`:
  RTK savings / RTK adoption / RTK equivalent / RTK artifacts /
  RTK and native / (rtk) / $(rtk  / `rtk rewrite / rtk find:

The lint immediately caught additional leaks (rewrite_cmd, tirith_gate,
init.rs) that the user hadn't reported -- all fixed in this PR.

## Out of scope (filed as separate)

- **#62 rewrite_command output prefix.** `contextcrawler rewrite "git status"`
  returns the literal string `rtk git status` (because the hook caller
  historically expects the `rtk ` prefix). Whether to migrate this to
  `contextcrawler git status` is a correctness/protocol scope decision
  affecting hook exec semantics + ~169 test assertions + historical
  SQLite tracking labels. Filed as #62 for separate investigation. The
  lint deliberately does NOT cover `format!("rtk X")` literals in
  `src/discover/registry.rs` for this reason.
- `src/core/telemetry_cmd.rs` data-controller attribution (RTK AI Labs,
  rtk-ai/rtk TELEMETRY.md URL) -- factual upstream attribution, separate
  scope.

## Pinning tests
The 10 new FORBIDDEN_TOKENS entries are themselves the pinning tests --
any reintroduction fails `cargo test --test branding_lint` with the
specific issue reference and remediation hint.

## Verified

- cargo build clean
- cargo test --bin contextcrawler: 2156 pass / 0 fail
- All 9 integration suites green
- Empirical: `contextcrawler --help` discover/session lines now say
  "ContextCrawler" not "RTK"; `contextcrawler init --help`,
  `discover --help`, `find --help`, `rewrite --help`, `session --help`,
  `cc-economics --help` all clean

Reported in-session via user testing of the deployed binary.
@thehoff
thehoff merged commit 42807ae into develop May 18, 2026
3 checks passed
@thehoff
thehoff deleted the fix/branding-comprehensive-sweep branch May 18, 2026 13:19
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