@@ -11,9 +11,10 @@ learns your coding style.
1111Command Code CLI reads ` ~/.commandcode/AGENTS.md ` and injects it into the system
1212prompt for every session. This repository provides that AGENTS.md file (plus a
1313loadable skill), teaching Command Code to route ** noisy** shell output through
14- ` rtk ` while keeping ** full fidelity** for output it needs exactly. The fastest
15- setup is RTK's auto-rewrite hook (` rtk init -g ` ), which rewrites commands for you
16- so nothing has to be prefixed by hand.
14+ ` rtk ` while keeping ** full fidelity** for output it needs exactly. ` rtk init `
15+ doesn't target Command Code yet, so the working default is this memory file — the
16+ agent prefixes commands itself; register a Command Code ` PreToolUse ` hook and RTK
17+ can rewrite them for you automatically.
1718
1819```
1920Without RTK: With RTK:
@@ -40,14 +41,15 @@ command.
4041
4142Two design choices keep it net-positive:
4243
43- - ** Lossless by default.** Plain ` rtk <cmd> ` preserves errors, stack traces, diff
44- hunks, and exit codes; the lossy modes (` -u ` / ` --ultra-compact ` , `-l
45- aggressive` , ` rtk smart`) are opt-in for skimming only — never the default. On
46- output it can't parse, RTK falls back to the full raw text.
44+ - ** 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 —
47+ never the default. If a command fails or RTK can't parse its output, you get the
48+ full raw text back (tee fallback).
4749- ** Measure net, not gross.** ` rtk gain ` reports gross savings; the goal is * net*
4850 — savings minus any re-runs and minus the standing cost of these instructions.
49- ` rtk gain --failures ` and ` rtk discover` show where RTK fits and where it
50- doesn't (see [ references/analytics.md] ( references/analytics.md ) ).
51+ ` rtk discover ` shows where RTK fits and where savings run low (see
52+ [ references/analytics.md] ( references/analytics.md ) ).
5153
5254This matters for quality too: every frontier model degrades as irrelevant context
5355grows ("context rot" / "lost in the middle"), so cutting genuine noise can * help*
@@ -70,10 +72,11 @@ the first and avoid the second.
7072> enforcement, install the memory (Method 2); the skill (Method 1) is the
7173> quickest install and is enough when you mainly want it during shell-heavy work.
7274
73- > ** Even better — the auto-rewrite hook.** RTK can install a ` PreToolUse ` hook
74- > (` rtk init -g ` ) that rewrites Bash commands to ` rtk ` automatically, so the agent
75- > never prefixes anything by hand. Pair it with the memory or skill below, which
76- > carry the * when-to-compress* rules. See ` rtk init --help ` .
75+ > ** Optional — the auto-rewrite hook.** A ` PreToolUse ` hook can rewrite Bash
76+ > commands to ` rtk ` automatically so the agent never prefixes by hand. Note that
77+ > RTK's ` rtk init ` installer doesn't target Command Code yet (` rtk init -g ` wires
78+ > up Claude Code/Copilot), so for Command Code you'd register the hook yourself.
79+ > Until then, Method 2 below is the reliable path. See ` rtk init --help ` .
7780
7881### Method 1: Skill (quick install, on-demand)
7982
@@ -125,7 +128,7 @@ leaves precise output alone:
125128
126129| Category | Command | Through RTK? | Est. savings |
127130| ---| ---| ---| ---|
128- | Status / listings | ` rtk git status ` , ` rtk ls ` , ` rtk tree ` | 🟢 yes | ~ 80% |
131+ | Status / listings | ` rtk git status ` , ` rtk ls ` , ` rtk git log ` | 🟢 yes | ~ 80% |
129132| Logs / containers | ` rtk docker ps ` , ` rtk log app.log ` | 🟢 yes | ~ 80% |
130133| Dependencies | ` rtk pip list ` , ` rtk pnpm list ` | 🟢 yes | ~ 70% |
131134| Tests / build | ` rtk cargo test ` , ` rtk err <cmd> ` | 🟡 plain mode (keeps failures) | ~ 90% |
@@ -134,7 +137,7 @@ leaves precise output alone:
134137| Files you'll edit | native Read tool | 🔴 not RTK | — |
135138
136139_ Savings are illustrative; actual numbers vary by command and output size. Run
137- ` rtk gain ` to measure your own — and ` rtk gain --failures ` to spot poor fits._
140+ ` rtk gain ` to measure your own — and ` rtk discover ` to spot poor fits._
138141
139142See [ references/commands.md] ( references/commands.md ) for the full tiered list and
140143[ references/analytics.md] ( references/analytics.md ) for measuring net savings.
@@ -148,8 +151,8 @@ rtk gain --graph # Visual savings chart
148151
149152After running a few commands through Command Code, ` rtk gain ` will show the
150153accumulated savings. Track ** net** savings, not just the headline number:
151- ` rtk gain --failures ` lists commands RTK had to pass through raw (poor fits) , and
152- ` rtk discover ` finds new high-value targets . See
154+ ` rtk discover ` finds new high-value targets and low-savings outliers , and RTK's
155+ tee fallback keeps full output whenever a command fails . See
153156[ references/analytics.md] ( references/analytics.md ) .
154157
155158## Files
0 commit comments