Redesign RTK integration to be net-positive on tokens and quality#1
Merged
Merged
Conversation
Shift from "always prefix every command with rtk, use ultra-compact for maximum savings" to a selective, lossless-by-default policy so RTK cuts tokens without hiding detail the model needs — detail loss otherwise forces re-runs that cost more than they save and degrade output quality. - AGENTS.md: lean, always-on policy. Compress noisy/low-stakes output; keep full fidelity for diffs/patches, structured/JSON output, secrets, small output, and files to edit; never default to lossy modes; escalate fidelity (not blind re-runs) when a compressed view falls short. - SKILL.md: recommend RTK's auto-rewrite PreToolUse hook (rtk init -g) over manual prefixing; add a fidelity ladder, when-NOT-to-use, and net-savings guidance; bump to 0.2.0. - references/commands.md: reorganize into green/yellow/red tiers (compress / plain mode only / run raw); fix rtk-read vs native Read; drop aggressive-as-default. Leaner, so it costs less always-on context. - references/analytics.md: optimize NET savings — watch `rtk gain --failures` and `rtk discover`; stop wrapping poor fits. - README.md: correct the "no auto-rewrite hook" framing, add a "when RTK helps vs keep full fidelity" rationale grounded in context-rot research, reframe the teaching table by tier. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VvpBXNCbbg4eibmZQZAbb6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Shifts the integration from "always prefix every command with
rtk, use ultra-compact-ufor maximum savings" to a selective, lossless-by-default policy.The old blanket + aggressive posture is what made RTK net-negative for some users: lossy modes (
-u/--ultra-compact,-l aggressive,rtk smart) drop the failing assertion or thefile:linethe model needs, which forces re-runs (more tokens) and degrades reasoning — while the always-on instructions cost context every session regardless of savings.Key changes:
PreToolUsehook (rtk init -g) over manual prefixing; add a fidelity ladder, when-NOT-to-use, and net-savings guidance; bump to0.2.0.rtk readvs the native Read tool; drops aggressive-as-default. Leaner, so it costs less always-on context.rtk gain --failuresandrtk discover, stop wrapping poor fits.Grounded in RTK's actual behavior (default mode preserves errors / diffs / stack traces / exit codes and falls back to raw on parse failure) and long-context degradation research ("context rot" / "lost in the middle").
Type of change
references/commands.md)install.sh/install.ps1)README.md/SKILL.md/AGENTS.md)Checklist
*.ps1)SKILL.mdstill has valid frontmatter (name:,description:)references/commands.md)SKILL.md/AGENTS.mdvalidation — verified locally)🤖 Generated with Claude Code
https://claude.ai/code/session_01VvpBXNCbbg4eibmZQZAbb6
Generated by Claude Code