Files
rtk-ai__rtk/docs/guide/analytics/discover.md
Florian BRUNIAUX 6e55f8984c docs: address Adrien's review — structure, missing content, agents
Structure:
- Move docs/README.md → .github/docs-pipeline-contract.md (interface
  contract is not user-facing content)
- Rewrite docs/guide/index.md as a proper landing page with RTK intro,
  flow diagram, and navigation (replaces empty nav stub)
- Move configuration.md → getting-started/configuration.md (sidebar order 4,
  after supported-agents per Adrien's suggestion)

Missing content:
- Add docs/guide/analytics/discover.md: rtk discover (missed savings analysis)
  and rtk session (adoption tracking across sessions)
- Add uninstall instructions to installation.md (rtk init -g --uninstall,
  cargo uninstall, brew uninstall)
- Add global flags section to what-rtk-covers.md (-u/--ultra-compact,
  -v/--verbose)
- Add rtk smart command to what-rtk-covers.md Files section

Agents:
- Update supported-agents.md: 10 agents (was 9)
- Add OpenClaw (TypeScript plugin, before_tool_call)
- Add Mistral Vibe (planned, issue #800)
- Fix GitHub Copilot: VS Code = transparent rewrite via PreToolUse,
  Copilot CLI = deny-with-suggestion (upstream limitation)

Signed-off-by: Florian BRUNIAUX <florian@bruniaux.com>
2026-04-06 11:16:24 +02:00

2.2 KiB

title, description, sidebar
title description sidebar
Discover and Session Find missed savings opportunities with rtk discover, and track RTK adoption with rtk session
order
2

Discover and Session

rtk discover — find missed savings

rtk discover analyzes your Claude Code command history to identify commands that ran without RTK filtering and calculates how many tokens you lost.

rtk discover                    # analyze current project history
rtk discover --all              # all projects
rtk discover --all --since 7    # last 7 days, all projects

Example output:

Missed savings analysis (last 7 days)
────────────────────────────────────
Command              Count   Est. lost
cargo test              12     ~48,000 tokens
git log                  8     ~12,000 tokens
pnpm list                3      ~6,000 tokens
────────────────────────────────────
Total missed:           23     ~66,000 tokens

Run `rtk init --global` to capture these automatically.

If commands appear in the missed list after installing RTK, it usually means the hook isn't active for that agent. See Troubleshooting — "Agent not using RTK".

rtk session — adoption tracking

rtk session shows RTK adoption across recent Claude Code sessions: how many shell commands ran through RTK vs. raw.

rtk session

Example output:

Recent sessions (last 10)
─────────────────────────────────────────────────────
Session                         Total   RTK   Coverage
2026-04-06 14:32  (45 cmds)       45    43      95.6%
2026-04-05 09:14  (38 cmds)       38    38     100.0%
2026-04-04 16:50  (52 cmds)       52    49      94.2%
─────────────────────────────────────────────────────
Average coverage: 96.6%

Low coverage on a session usually means RTK was disabled (RTK_DISABLED=1) or the hook wasn't active for a specific subagent.