Every developer working with Cursor, Copilot, Antigravity IDE, Claude Code, or ChatGPT has noticed this phenomenon:
The larger your repository gets, the “dumber” your AI model behaves.
It forgets instructions, hallucinates imports, loses track of architectural boundaries, and burns $5 to $20 in API credits just reading raw boilerplate over and over again.
The Root Cause: “Context Rot” & Attention Degradation
The truth is: the models didn’t get dumber. Your context window is simply drowning.
When an AI coding agent ingests an entire repository, 85–95% of the payload consists of repetitive internal function logic, loops, formatting, and boilerplate that the model does NOT need just to understand how modules interact. The needle gets buried in a 50,000-token haystack.
To fix this once and for all, I built and open-sourced T-Zero Context Architect V3.
What is T-Zero?
Instead of dumping raw files into the prompt, T-Zero uses an offline Abstract Syntax Tree (AST) engine to extract pure architectural signatures, exported classes, types, function declarations, and module dependencies—stripping implementation bloat while keeping 100% of structural semantics intact.
Real-World Benchmark (Tested on a ~224k char Python core):
Ingestion Mode
Token Count
Reduction Ratio
Time to Ingest
Raw Source Code
56,037 tokens
0%
Baseline
T-Zero Ultra AST
3,088 tokens
-94.5%
~8x Faster
That’s a 94.5% reduction in context overhead with zero loss in structural reasoning.
Key Capabilities & Features
Native Model Context Protocol (MCP) Server (13 Autonomous Tools):
Direct stdio bridge for Cursor, Antigravity IDE, Claude Desktop, and Cline.
get_project_context_tree (T-1 to T-4 hierarchical context trees).
The 94.5% token reduction benchmark in your table is the critical metric here, @Toprak.
Most developers assume that feeding an LLM an entire codebase requires raw source ingestion, but in practice, 80%+ of token consumption in an autonomous loop is burned on internal function bodies, loops, and private helper logic that the model does not need until it actually begins editing that specific method.
Extracting pure AST signatures (classes, type signatures, exported declarations, and import topology) preserves the model’s global structural reasoning while keeping prompt payloads under the attention degradation threshold.
A couple of architectural questions on how T-Zero handles the edge cases:
Dynamic Resolution & Metaprogramming: How does the AST parser handle dynamic module loading (e.g. importlib or dynamic getattr dispatch) where static AST cannot infer the dependency edge?
Blast Radius Calculation: For analyze_change_impact, how are you weighting symbol modifications (e.g. modifying an exported public interface vs a private internal helper)?
Glad to see this packaged cleanly as an MCP server with stdio transport. That is the correct architectural pattern for Antigravity and Claude Code integration.
Thanks a lot for the insightful feedback, @dllhell ! You hit the nail on the head: burning 80%+ of the context window on internal imperative loop logic and private implementations before the model even touches the file is the silent killer of autonomous agent loops. Keeping things below the attention degradation threshold was precisely our design north star with T-Zero.
Static AST parsing inherently hits a wall when dealing with dynamic module dispatch and runtime metaprogramming (importlib.import_module, runtime sys.modules patching, or dynamic string dispatch via getattr). In T-Zero, we handle this through a tiered fallback strategy:
Explicit Dynamic Pattern Heuristics: In our AST scanner passes, we explicitly flag call sites matching dynamic import wrappers (importlib.import_module, __import__, and string-literal getattr/importlib patterns). When these are detected, the analyzer extracts any reachable string literals or constant arguments to construct speculative dependency edges.
Topological & Package-Level Fallback: If the exact target cannot be inferred statically from the AST, T-Zero falls back to treating the caller module as an open dynamic node. In Ultra reduction mode, rather than dropping the edge, we preserve the call site decorator/signature annotations and module-level imports, deferring exact resolution to the agent’s runtime context if an edit or deep inspection is triggered.
Zero-Hallucination Guardrails: We inject explicit contextual guardrails (e.g., via the generated blueprint / AGENTS.md) advising autonomous harnesses that unresolved metaprogramming symbols must be verified in the local workspace directory topology before assuming external or missing dependencies.
For change impact analysis and blast radius scoring (implemented in our impact engine / ChangeImpactAnalyzer), symbol modifications are not treated equally:
Public Interfaces / Exported API Boundary: Modifications to exported public interfaces (functions/classes present in __all__, top-level module exports, or symbols without a leading underscore _) are assigned high blast radius weights. Changes to their signatures (e.g., parameter addition/removal, type annotations, return types) trigger transitive dependency traversal across all importing modules.
Private / Internal Helpers: Internal helper methods (e.g., prefixed with _ or private class members) are scoped strictly to their lexical module or enclosing class. Their blast radius is calculated solely based on internal call graph fan-out within that single module, avoiding false-positive ripple effects across the entire dependency graph.
Heuristic Impact Score: The final blast radius score combines symbol visibility (Public vs. Private), fan-out degree (in-degree/out-degree from the import graph), and signature diff severity (e.g., breaking signature changes vs. non-breaking additive updates).
Packaging the engine as an MCP server with stdio transport was essential to give Antigravity, Claude Code, and Cursor native, low-latency access to these AST primitives without the overhead of heavy background services.
Really appreciate the great questions and discussion!
Scoping private helpers strictly to internal lexical fan-out while treating public __all__ symbols with transitive traversal is a very tidy way to avoid the false-positive alert fatigue that usually plagues naive AST graphs.
Extracting lean AST topology upfront to stay well below the 30k attention dip–combined with deterministic execution guardrails when the agent actually writes code–feels like the winning architectural pattern for multi-turn autonomous coding.
My perspective comes purely from watching how working engineers actually discover, evaluate, and adopt open-source tooling.
If you wish to place T-Zero into the hands of developers who genuinely need it, here is a practical, zero-cost engineering roadmap:
Infiltrate the Curated MCP Guilds
Because you built an MCP server with stdio transport, go where the craftsmen actually forage. Submit a polite pull request to the official modelcontextprotocol/servers repository, and register your tool on curated directories such as awesome-mcp-servers, PulseMCP, and Glama. When an engineer’s coding agent runs out of context at two o’clock in the morning, those directories are where they look for relief.
Visual Proof Outweighs Prose
Engineers are professional cynics who know the price of cloud tokens and the dubious value of vendor benchmarks. If you tell them in prose that you achieve a 94.5% reduction, they will instinctively suspect you merely deleted their comments. Show them the surgery with a terminal recording tool such as VHS or asciinema:
# Record a 15-second reproducible terminal demo for your README
vhs demo.tape
Show an autonomous agent devouring 56,000 tokens on a standard open repository (such as Flask) in unvarnished baseline mode, alongside T-Zero paring the payload down to a svelte 3,000 tokens. A single visual comparison at the top of your README will communicate more value than a Victorian novel’s worth of documentation.
Provide the Umbrella When It Rains
Do not broadcast generic announcements into the void. Keep an eye on developer forums, issue trackers, and communities like r/LocalLLaMA and r/Cursor for engineers groaning that their autonomous loops have degraded into incoherent babble because the transcript is choking on internal function bodies. Step in, explain the architectural mechanics of AST pruning, and offer T-Zero as an open-source remedy. A tool offered at the exact moment of acute operational irritation is greeted as an act of mercy.
The Unvarnished Show HN Submission
When your README contains that visual demonstration and a clean one-line installation, post a dry, understated submission to Hacker News formatted strictly as technical engineering:
Show HN: T-Zero - AST Context Pruner for MCP Coding Agents (94% Token Reduction)
Strip away all marketing adjectives. Ban words like “revolutionary” or breathless superlatives. Deconstruct why feeding raw imperative loops to attention heads wastes quadratic compute, describe your dynamic fallback heuristics, and invite senior practitioners to critique your code.
Writing an algorithm that quietly solves a genuine systems bottleneck is the difficult half of engineering. The rest is merely ensuring the right people find the spanner when their boiler begins clanking. Keep your code clean, let the tool speak for itself, and the stars will look after themselves.
@dllhell Thank you for this grounded, systems-level reality check. In an ecosystem drowning in marketing hype and empty metrics, your perspective is a breath of fresh air. I took every single point of your zero-cost engineering roadmap to heart and implemented it across the project:
Visual Proof over Prose: Added a crisp, dark-mode terminal benchmark graphic right at the very top of the README, alongside reproducible empirical data (166,996 raw tokens → 8,465 pruned tokens, a 94.9% context drop) and a reproducible VHS tape config (demo.tape).
Frictionless Installation: Placed a clean 1-line installation (pip install tzero-mcp) and instant MCP JSON config directly under the visual benchmark.
Curated MCP Repositories: Verified our open PR on awesome-mcp-servers (#15852) with valid tags, and prepared directory listings for Glama and PulseMCP.
Technical Show HN Draft: Prepared a dry, strictly architectural submission for Hacker News detailing AST pruning mechanics and quadratic attention cost reduction—completely stripped of marketing fluff.
Zero-Leak & Craftsmanship: All 103 test suites pass cleanly with 100% offline OS Keyring security and zero external telemetry.
Thank you for pointing me toward the spanner and the craft rather than the megaphone. It was genuinely valuable advice.