chopratejas/headroom — reverse-engineered prompt
Reverse engineered prompt
Build me a local first developer tool called Headroom that helps people use AI coding agents with way fewer tokens. I want it to sit between tools like Claude Code, Cursor, Codex, Aider, Copilot, LangChain, or any OpenAI compatible app and compress the big stuff before it reaches the model, like logs, search results, files, RAG chunks, tool outputs, and conversation history.
It should work three ways, as a Python and TypeScript library, as a command line proxy, and as an MCP server. Make it easy to wrap common agents with one command and show token savings with a stats command. The compression should be reversible, so the original content stays stored locally and the model can retrieve it if needed.
Please include smart handling for JSON, source code, and normal text, plus shared memory across agents and a learn command that can turn failed sessions into notes for CLAUDE.md or AGENTS.md. Keep the setup simple, add examples, tests, and clear docs.
Want more depth? Deep Reverse