rtk-ai/rtk

Need fix `grep` savings to much lower

Open

#545 建立於 2026年3月12日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)Rust (2,914 fork)batch import
area:clieffort-mediumenhancementhelp wantedpriority:medium

倉庫指標

Star
 (48,085 star)
PR 合併指標
 (平均合併 11天 1小時) (30 天內合併 45 個 PR)

描述

Problem

rtk gain shows much lower savings for rtk grep

On my session, rtk gain reported:

  • Command: rtk grep
  • Count: 94
  • Saved: 3.3M
  • Avg%: 17.9%

But the README advertises roughly -80% savings for grep / rg.

Why this is confusing

This makes it look like rtk grep underperforms badly in real usage, even though the likely issue is broader:

  • Claude Code prefers native tools like Grep, Read, and Glob
  • those native tools bypass the Bash hook
  • RTK therefore does not see or compress much of the actual search workload
  • rtk gain ends up showing a result that users can easily interpret as “grep savings are poor”

Expected behavior

One of these should happen:

  1. rtk gain / rtk discover should show “reachable vs unreachable” search activity
  2. the UI should otherwise make it clearer that this is a tooling-path limitation, not necessarily an rtk grep filter-quality problem

Actual behavior

rtk gain shows low rtk grep savings without enough context to explain why.

Environment

  • RTK version: 0.28.2
  • OS: [26.3 (25D125)
  • Agent/client: OpenCode & Codex (CLI & desktop)
  • Hook installed: yes

貢獻者指南