3 min read
[AI Minor News]

Say Goodbye to Raw Code! Introducing "Crespo," the Lightning-Fast Tool for Passing Only the 'Blueprint' to LLMs Using Tree-sitter


Extracts AST structures instead of raw code, reducing token consumption by up to 86%. A revolutionary tool for developers that communicates only the 'DNA' of architecture to LLMs.

※この記事はアフィリエイト広告を含みます

Say Goodbye to Raw Code! Introducing “Crespo,” the Lightning-Fast Tool for Passing Only the ‘Blueprint’ to LLMs Using Tree-sitter

What Happened? Overview of the News

  • No Need for Raw Code Structure Extraction: Utilizing Tree-sitter AST analysis to extract only the “structural DNA” such as imports, classes, and functions from the codebase, generating a compact XML blueprint.
  • Massive Token Reduction: Compared to traditional raw code injection, token consumption is reduced by an average of 86%. Even with large repositories, you can help LLMs grasp architecture without overwhelming their context windows.
  • Three Versatile Modes: Featuring “Structure” for only the structure, “Summary” with AI-generated single-line explanations, and “Concat,” which passes the full source while masking confidential information.

Why Is This Important? Key Points to Note

  • Eliminating “Can’t See the Forest for the Trees”: Prevents the “loss of architecture” that occurs when LLMs read raw code linearly across tens of thousands of tokens, helping them accurately grasp the connections within the entire system.
  • Precise Analysis with Tree-sitter: Instead of rough scraping with regular expressions, it employs real language grammars, like those used in GitHub and Neovim, boasting extremely high parsing accuracy across over 10 major languages.
  • Security Assurance: Automatically masks sensitive information like API keys and tokens when outputting, reducing the risk of sending code to external LLMs.

🦈 Shark’s Eye (Curator’s Perspective)

Say goodbye to the days of endlessly copy-pasting raw code and shouting, “I’m out of context, mate!” The brilliance of this tool isn’t just in “compression,” but in its ability to understand the syntax of programming languages and extract only the “meaningful skeleton.” Especially in frameworks like FastAPI, where “structure itself is specification,” it excels at filtering out noise while maintaining important connections! This will undoubtedly speed up onboarding for large repositories and consultations for refactoring!

What’s Next?

In the future, we can expect this kind of AST-based context management to be integrated as a standard feature in IDEs. LLMs will start preferring “structured XML” over “raw text,” leading to a logical shift in prompt engineering from “attaching source code” to “presenting AST blueprints”!

A Word from Haru Shark

Unnecessary token consumption is a feast for sharks! Engineers who communicate smartly with “blueprints” will emerge victorious in 2026! 🦈🔥

Terminology

  • Tree-sitter: A parser generator tool for fast and incremental parsing of programming language syntax, generating syntax trees.

  • AST (Abstract Syntax Tree): A tree representation of the structure of source code, abstracting away irrelevant details like parentheses that do not affect computation.

  • Context Window: The maximum amount of information an LLM can process at once. When this is filled, the AI may forget past information or lose accuracy.

  • Source: Crespo – Tree-sitter AST blueprints instead of raw code for LLMs

【免責事項 / Disclaimer / 免責聲明】
JP: 本記事はAIによって構成され、運営者が内容の確認・管理を行っています。情報の正確性は保証せず、外部サイトのコンテンツには一切の責任を負いません。
EN: This article was structured by AI and is verified and managed by the operator. Accuracy is not guaranteed, and we assume no responsibility for external content.
ZH: 本文由AI構建,並由運營者進行內容確認與管理。不保證準確性,也不對外部網站的內容承擔任何責任。
🦈