rtk-ai / rtk-ai/rtk

fix: ls tracking baseline should compare against `ls` not `ls -la`

Open Beginner friendly
#561 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:cli bug effort-small filter-quality good first issue priority:medium
Dominant language
Rust
Stars
81.1k
Forks
5.1k
Avg merge
4d 21h
Merged PRs (30d)
35

Description

Problem

rtk ls internally runs ls -la to get file metadata for grouping/filtering, then compresses the output. The savings % is tracked against the ls -la output, not plain ls (which is what the agent would have run without RTK).

This inflates the reported savings. Example from user report:

  • ls = 332 tokens
  • ls -la = 4173 tokens
  • rtk ls = 993 tokens
  • Reported: 76.2% savings (vs ls -la)
  • Actual: -199% vs plain ls

Fix

Track against the baseline command the agent would have run (ls), not the internal enriched command (ls -la).

In src/ls.rs line 113-118, change the tracking input from the ls -la raw output to a plain ls capture (or estimate).

Reference

https://www.reddit.com/r/ClaudeAI/comments/1rjkf9r/comment/oa3trnn/

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/ls.rs around lines 113-118, where tracking uses the raw output from the internal ls -la command. Change the tracking baseline to represent plain ls, either through a capture or an estimate. Done means the reported savings compares rtk ls with the command an agent would normally run, rather than ls -la.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.