Hello Google AI Community,
When scaling AI coding assistants and autonomous agents across large repositories, injecting massive codebases into the context window causes high latency, ballooning token costs, and attention degradation.
To solve this, I engineered T-Zero: an open-source AST-driven hierarchical context reducer and agent framework with native Model Context Protocol (MCP) support.
Benchmark: Real-world Codebase Compression
Across large enterprise repositories (tested on Claude Sonnet, Gemini 1.5/2.0, and Cursor):
- Raw Codebase Input: 67,842 AST tokens
- T-Zero Pruned Input: 3,800 tokens
- Token Reduction: -94.4% with zero semantic or architectural loss.
Architecture & Features:
- Hierarchical Multi-Tier AST Skeleton: Prunes non-essential implementation details while preserving type signatures, interfaces, module dependencies, and symbols.
- 37 Autonomous MCP Tools: Integrates directly into any MCP-compatible environment (Google Antigravity, Claude Desktop, Cursor, Cline):
- Architecture boundary enforcement & change impact analysis
- Zero-Leak security scanner for hardcoded credentials
- AST duplicate code detector
- 4D causal memory graph with Byzantine fault-tolerant (PBFT) consensus
- 100% Private & Local Execution: AST processing and pruning happen locally on the developer machine before external API calls.
Quick Start:
pip install tzero-mcp