Original Reddit post

Hey everyone, I’ve been experimenting with a completely weird/different way to feed code context to LLMs. Instead of stuffing thousands of lines of text into a prompt, I built a pipeline that compresses a whole JS/TS repository into a deterministic visual map—and I gave an AI “eyes” to read it. I call it the Code Base Compressor . Here is how it works: AST Extraction: It uses Tree-sitter to scan your repo and pull out all the structural patterns (JSX components, call chains, constants, types). Visual Encoding: It takes those patterns and hashes them into unique 16x16 pixel tiles, packing them onto a massive canvas (like a world map for your code). The AI Layer (Visual RAG): I built an autonomous LangGraph agent powered by Visual Model. Instead of reading raw code, it gets the visual “Atlas” and a legend. It visually navigates the dependencies, explores relationships, and generates new code based on what it “sees.” It forces the agent into a strict “explore-before-generate” loop, making it actually study the architecture before writing a single line of code. 🔗 repo/code here: GitHub Repo submitted by /u/FutureCicada1550

Originally posted by u/FutureCicada1550 on r/ArtificialInteligence