Skip to content

Commit a49d78c

Browse files
Merge pull request #4 from Coding-Dev-Tools/claude/rtk-command-code-pr-review-hftsym
v1.0.1: fix -u flag claims and #1282 citation found by independent audit
2 parents 3363f8a + e08a4dc commit a49d78c

5 files changed

Lines changed: 86 additions & 25 deletions

File tree

AGENTS.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ When unsure, start raw. Lean context comes from cutting *noise*, not *signal*.
3333
## Never default to lossy modes
3434

3535
Plain `rtk <cmd>` keeps the signal — errors, diffs, stack traces, exit codes —
36-
and strips only noise. `-u` / `--ultra-compact`, `rtk read … -l aggressive`, and `rtk smart`
36+
and strips only noise. `--ultra-compact`, `rtk read … -l aggressive`, and `rtk smart`
3737
(2-line summary) are **lossy** — opt-in only for skimming something huge and
38-
unimportant, never your default.
38+
unimportant, never your default. (RTK's own docs still mention a `-u` short form
39+
for `--ultra-compact`; it was removed upstream and doesn't work — use the long
40+
flag.)
3941

4042
## Harness safety — don't let it break the tool call
4143

CHANGELOG.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@ All notable changes to this integration are documented here. The format follows
44
[Keep a Changelog](https://keepachangelog.com/), and this project aims to adhere
55
to [Semantic Versioning](https://semver.org/).
66

7+
## [1.0.1] — 2026-06-30
8+
9+
Follow-up accuracy pass after an independent audit against live upstream
10+
rtk-ai/rtk sources (commits, issues, and the current README).
11+
12+
### Fixed
13+
- Removed all references to a `-u` short form of `--ultra-compact`. RTK's own
14+
README still documents it, but it was removed from the CLI upstream (it
15+
collided with `git push -u`) and was never restored — invoking it fails
16+
outright (RTK [#2369](https://github.com/rtk-ai/rtk/issues/2369), open).
17+
Every reference now uses the working long form, `--ultra-compact`.
18+
- Corrected the piped-output citation: RTK
19+
[#1282](https://github.com/rtk-ai/rtk/issues/1282) is a correctness bug
20+
(RTK can silently substitute its compressed summary for the real content on
21+
a non-TTY pipe), not an ANSI/decoration issue as previously described. The
22+
ANSI-codes-on-pipe claim now cites the correct issue, RTK
23+
[#1409](https://github.com/rtk-ai/rtk/issues/1409) (fixed).
24+
- Synced SKILL.md's "Compatibility & limitations" section with README.md's —
25+
it was missing the "Native tools" and "Hooks on Windows" bullets.
26+
727
## [1.0.0] — 2026-06-30
828

929
First stable release. The integration is now selective, accurate against the real
@@ -31,8 +51,11 @@ RTK command surface, and hardened for agent-harness use.
3151
trust the raw exit code for pass/fail; prefer native file/search tools; treat
3252
`rtk` as optional with a raw fallback when it isn't on PATH.
3353
- **Compatibility & limitations** documentation covering the Command Code hook
34-
gap, exit-code fidelity, piped/ANSI behavior (RTK
35-
[#1282](https://github.com/rtk-ai/rtk/issues/1282)), streaming, and the
36-
permission surface.
54+
gap, exit-code fidelity, piped-output correctness (RTK
55+
[#1282](https://github.com/rtk-ai/rtk/issues/1282)), ANSI-on-pipe (RTK
56+
[#1409](https://github.com/rtk-ai/rtk/issues/1409)), the non-functional `-u`
57+
short flag (RTK [#2369](https://github.com/rtk-ai/rtk/issues/2369)),
58+
streaming, and the permission surface.
3759

60+
[1.0.1]: https://github.com/Coding-Dev-Tools/rtk-command-code/releases/tag/v1.0.1
3861
[1.0.0]: https://github.com/Coding-Dev-Tools/rtk-command-code/releases/tag/v1.0.0

README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ command.
4242
Two design choices keep it net-positive:
4343

4444
- **Signal-preserving by default.** Plain `rtk <cmd>` keeps errors, stack traces,
45-
diff hunks, and exit codes and strips only noise; the lossy modes (`-u` /
46-
`--ultra-compact`, `-l aggressive`, `rtk smart`) are opt-in for skimming only —
45+
diff hunks, and exit codes and strips only noise; the lossy modes
46+
(`--ultra-compact`, `-l aggressive`, `rtk smart`) are opt-in for skimming only —
4747
never the default. If a command fails or RTK can't parse its output, you get the
4848
full raw text back (tee fallback).
4949
- **Measure net, not gross.** `rtk gain` reports gross savings; the goal is *net*
@@ -173,11 +173,20 @@ things to know before relying on it:
173173
isn't guaranteed for every command/version. **For a pass/fail that matters
174174
(tests, CI gates), trust the raw exit code** — or run the command raw /
175175
`rtk proxy`. The tiers keep `rtk cargo test` in *plain* mode, never aggressive.
176-
- **Piped (non-TTY) output.** A harness captures stdout as a pipe. RTK can still
177-
emit icons/decoration there (RTK issue
178-
[#1282](https://github.com/rtk-ai/rtk/issues/1282)), which wastes tokens or
179-
corrupts parsed output. Run anything you'll parse **raw**, and set `NO_COLOR=1`
180-
if decoration leaks in.
176+
- **Piped (non-TTY) output can be silently wrong, not just decorated.** A harness
177+
captures stdout as a pipe; RTK can substitute its compressed summary for the
178+
real content there — e.g. a redirected `grep` writing a line-count summary
179+
instead of the matching lines (RTK issue
180+
[#1282](https://github.com/rtk-ai/rtk/issues/1282), a correctness bug). Run
181+
anything you'll parse or redirect **raw**. Separately, RTK has also emitted ANSI
182+
color codes into piped output before (RTK issue
183+
[#1409](https://github.com/rtk-ai/rtk/issues/1409), fixed) — set `NO_COLOR=1`
184+
defensively if you see escape codes leak through.
185+
- **`-u` is not a working flag.** RTK's own README still documents `-u` as a short
186+
form of `--ultra-compact`, but it was removed upstream (it collided with
187+
`git push -u`) and was never restored — using it fails outright (RTK issue
188+
[#2369](https://github.com/rtk-ai/rtk/issues/2369), open). Always use the long
189+
form, `--ultra-compact`.
181190
- **Streaming / follow.** RTK buffers output to filter it, so `-f`, `tail -f`, or
182191
a growing log can hang. Run those raw.
183192
- **PATH.** A non-interactive shell may not find `rtk`; the integration treats it

SKILL.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ compatibility: >-
1313
normally if it isn't installed.
1414
metadata:
1515
author: Coding-Dev-Tools
16-
version: "1.0.0"
16+
version: "1.0.1"
1717
homepage: https://github.com/rtk-ai/rtk
1818
allowed-tools: Bash(rtk:*) Bash(git:*) Bash(cargo:*) Bash(ls:*) Bash(cat:*) Bash(grep:*) Bash(find:*) Bash(diff:*) Bash(docker:*) Bash(kubectl:*) Bash(gh:*) Bash(glab:*) Bash(pnpm:*) Bash(npm:*) Bash(pip:*) Bash(bundle:*) Bash(ruff:*) Bash(tsc:*) Bash(eslint:*) Bash(pytest:*) Bash(go:*) Bash(jest:*) Bash(vitest:*) Bash(dotnet:*) Bash(aws:*) Bash(psql:*) Bash(prisma:*) Bash(wget:*)
1919
---
@@ -68,7 +68,7 @@ remember it — and `|` pipes and `<<` heredocs bypass the rewrite.
6868
- 🟢 **Compress freely** — large, noisy, low-stakes output you skim:
6969
`rtk ls`, `rtk git status`, `rtk git log`, `rtk docker ps`, `rtk pip list`.
7070
- 🟡 **Default mode only** — big runs where you need the failures: `rtk cargo
71-
test`, `rtk err <cmd>`. Plain `rtk` keeps errors/diffs — don't add `-u`.
71+
test`, `rtk err <cmd>`. Plain `rtk` keeps errors/diffs — don't add `--ultra-compact`.
7272
- 🔴 **Keep full fidelity (run raw)** — diffs/patches you'll apply, JSON or
7373
`--format` output you'll parse, secrets, small outputs, and files you'll edit
7474
(use the native Read tool).
@@ -80,7 +80,7 @@ Full tiered table: [references/commands.md](references/commands.md).
8080
Use the *least* compression that still answers the question:
8181

8282
```
83-
raw / native Read → rtk <cmd> (keeps signal, default) → -u / -l aggressive / rtk smart (lossy, skim-only)
83+
raw / native Read → rtk <cmd> (keeps signal, default) → --ultra-compact / -l aggressive / rtk smart (lossy, skim-only)
8484
```
8585

8686
Start as far left as the task needs. Escalate compression only for big, boring
@@ -112,14 +112,30 @@ number. Full reference:
112112
- **Exit codes.** RTK aims to pass the wrapped command's exit code through, but it
113113
isn't guaranteed for every command/version. When a pass/fail verdict matters
114114
(tests, gates), trust the raw exit code or re-run raw / `rtk proxy <cmd>`.
115-
- **Piped output.** The harness captures stdout as a non-TTY pipe; RTK may still
116-
emit icons/decoration ([RTK #1282](https://github.com/rtk-ai/rtk/issues/1282)).
117-
For anything you'll parse, run raw; set `NO_COLOR=1` if decoration leaks in.
115+
- **Piped output can be silently wrong, not just decorated.** On a non-TTY pipe
116+
RTK can substitute its compressed summary for the real content — e.g. a
117+
redirected `grep` writing a line *count* summary instead of the matching lines
118+
([RTK #1282](https://github.com/rtk-ai/rtk/issues/1282), a correctness bug, not
119+
a cosmetic one). Run anything you'll parse or redirect **raw**. Separately, RTK
120+
has emitted ANSI color codes into piped/non-TTY output before
121+
([RTK #1409](https://github.com/rtk-ai/rtk/issues/1409), fixed); set
122+
`NO_COLOR=1` defensively if you see escape codes leak through.
123+
- **`-u` is not a working flag.** RTK's own README still lists `-u` as a short
124+
form of `--ultra-compact`, but it was removed upstream (it collided with
125+
`git push -u`) and isn't restored — using it fails outright
126+
([RTK #2369](https://github.com/rtk-ai/rtk/issues/2369), open). Always use the
127+
long form `--ultra-compact`.
118128
- **Streaming.** RTK buffers to filter, so don't wrap `-f`/follow or growing logs.
119129
- **PATH.** In a non-interactive shell `rtk` may not be found; the integration
120130
treats it as optional and falls back to raw commands.
131+
- **Native tools.** Command Code's built-in file/search tools (Read/Grep/Glob)
132+
are lossless, give line numbers, and don't pass through RTK — prefer them over
133+
`rtk read/grep/find`.
121134
- **Permissions.** `rtk` (and `rtk proxy`) can execute arbitrary wrapped commands
122135
— allow-list it deliberately.
136+
- **Hooks on Windows.** RTK's filters work on Windows, but its auto-rewrite hook
137+
has gaps there ([RTK discussion #671](https://github.com/rtk-ai/rtk/discussions/671));
138+
`.ps1` stays CRLF per `.gitattributes`.
123139

124140
## Prerequisite
125141

references/commands.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ output**. The skill is knowing *when* that helps. Three tiers:
55

66
- 🟢 **Compress freely** — large, noisy, low-stakes output you only skim.
77
- 🟡 **Default mode only** — worth compressing because it's big, but you need the
8-
failures: use plain `rtk` (which keeps errors/diffs), never `-u`/aggressive.
8+
failures: use plain `rtk` (which keeps errors/diffs), never `--ultra-compact`/aggressive.
99
- 🔴 **Keep full fidelity** — run raw; compression risks dropping what you need.
1010

11-
Plain `rtk <cmd>` keeps the signal and strips only noise. `-u` / `--ultra-compact`, `rtk read … -l
11+
Plain `rtk <cmd>` keeps the signal and strips only noise. `--ultra-compact`, `rtk read … -l
1212
aggressive`, and `rtk smart` (2-line summary) are lossy — reserve them for
13-
skimming something huge and unimportant.
13+
skimming something huge and unimportant. (RTK's own README still lists a `-u`
14+
short form for `--ultra-compact`; it was removed upstream and doesn't work —
15+
use the long flag, see Harness notes below.)
1416

1517
## 🟢 Compress freely (skim-only output)
1618
| Instead of | Use | Why it's safe |
@@ -31,8 +33,9 @@ skimming something huge and unimportant.
3133
| any command you only want errors from | `rtk err <cmd>` | errors-only filter |
3234
| `cargo build`, `tsc`, `eslint`, `ruff`, `clippy` | `rtk cargo build`, `rtk tsc`, `rtk lint`, `rtk ruff check`, `rtk cargo clippy` | keeps diagnostics, drops progress |
3335

34-
Don't add `-u` / aggressive here — you'd risk dropping the failing assertion or
35-
the `file:line` you need, which forces a re-run that costs more than it saved.
36+
Don't add `--ultra-compact` / aggressive here — you'd risk dropping the failing
37+
assertion or the `file:line` you need, which forces a re-run that costs more
38+
than it saved.
3639

3740
## 🔴 Keep full fidelity — run raw (no `rtk`)
3841
| Situation | Do this | Why |
@@ -49,8 +52,16 @@ the `file:line` you need, which forces a re-run that costs more than it saved.
4952
- **Streaming/follow** (`-f`, `tail -f`, a growing log) → run raw; RTK buffers and can hang.
5053
- **Exit status** → for a pass/fail verdict that matters (tests, gates), trust the
5154
command's raw exit code; if unsure RTK preserved it, re-run raw or `rtk proxy`.
52-
- **Piped output** → RTK may emit icons/decoration over a non-TTY pipe; for anything
53-
you'll parse, run raw (set `NO_COLOR=1` if decoration leaks in).
55+
- **Piped output** → RTK can substitute its compressed summary for the real
56+
content on a non-TTY pipe (e.g. a redirected `grep` writing a line-count summary
57+
instead of the matches — [RTK #1282](https://github.com/rtk-ai/rtk/issues/1282),
58+
a correctness bug). Run anything you'll parse or redirect raw. RTK has also
59+
emitted ANSI codes into piped output before
60+
([RTK #1409](https://github.com/rtk-ai/rtk/issues/1409), fixed) — set
61+
`NO_COLOR=1` defensively if escape codes leak through.
62+
- **`-u` doesn't work** → removed upstream (it collided with `git push -u`); using
63+
it fails outright ([RTK #2369](https://github.com/rtk-ai/rtk/issues/2369), open).
64+
Use `--ultra-compact`.
5465
- **Native tools** → prefer the built-in file/search tools over `rtk read/grep/find`.
5566

5667
## Analytics

0 commit comments

Comments
 (0)