Back to projects

Pi RTK Optimizer

A TypeScript Pi extension that rewrites RTK commands and reduces noisy terminal output.

202stars24forksTypeScriptLive from GitHub
Pi RTK Optimizer

Overview

Pi RTK Optimizer is the second extension I built around the idea of quieting down a coding-agent session. RTK is the Pi mechanism that lets the agent re-edit a file by anchoring to specific lines, but the way commands get echoed into the terminal can flood the output with redundant context. The extension rewrites those commands into a tighter, more readable form so the user can actually follow what the agent is doing without scrolling through walls of output.

What it does

The extension intercepts RTK commands as they flow through the agent, normalizes the anchor format, removes redundant context lines, and renders the result in a compact way. The rewrite happens before the command is shown, so the user only ever sees the cleaner version. The original behavior is preserved - the agent gets the full command and runs it normally. Only the display changes.

Technical work

The hardest part was identifying which lines in a command are essential and which are noise. Some redundancy is intentional - it helps the agent verify it's editing the right place. Other redundancy is just artifact from how the command was generated. I spent time tuning heuristics to keep the verification value while compacting everything else.

What I learned

This extension reinforced something I've been finding consistently in the developer tools I build - the win is rarely in the features, it's in the friction removed. The traction the extension has picked up suggests the workflow problem was widespread enough that other people felt the same friction. Boring optimizations win when they're done with care.