Metadata-Version: 2.4
Name: tzero-mcp
Version: 12.2.0
Summary: Enterprise Codebase Context Builder, AST Signatures Analyzer, Token Reducer & 24-Tier Anti-REA Armor Suite for LLMs
Author-email: Toprak Ahmet Aydoğmuş <siberakademi@org.tr>
License-Expression: AGPL-3.0-only
Project-URL: Homepage, https://github.com/toprakahmetaydogmus/TZeroAlgorithm
Project-URL: Repository, https://github.com/toprakahmetaydogmus/TZeroAlgorithm
Project-URL: Documentation, https://github.com/toprakahmetaydogmus/TZeroAlgorithm#readme
Project-URL: Bug Tracker, https://github.com/toprakahmetaydogmus/TZeroAlgorithm/issues
Project-URL: Changelog, https://github.com/toprakahmetaydogmus/TZeroAlgorithm/blob/main/docs/CHANGELOG.md
Project-URL: Live Demo, https://huggingface.co/spaces/toprakke4/tzero-token-reducer
Project-URL: Benchmark, https://tzero-indol.vercel.app
Project-URL: Discussions, https://github.com/toprakahmetaydogmus/TZeroAlgorithm/discussions
Project-URL: LinkedIn, https://linkedin.com/in/toprak-ahmet-aydo%C4%9Fmu%C5%9F-60462534b/
Project-URL: Biography, https://hopp.bio/siberegitim
Keywords: mcp,mcp-server,model-context-protocol,claude,claude-code,claude-desktop,cursor,windsurf,cline,copilot,context-builder,token-reduction,token-optimizer,token-saver,ast-analysis,ast-parser,codebase-context,context-window,rag,code-intelligence,developer-tools,zero-leak,security-guard,prompt-engineering,pre-commit,swift,kotlin
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Security
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: requests>=2.32.0
Requires-Dist: keyring>=23.13.1
Requires-Dist: darkdetect>=0.8.0
Requires-Dist: pygments>=2.14.0
Requires-Dist: Pillow>=10.4.0
Requires-Dist: certifi>=2024.7.4
Requires-Dist: mcp>=1.0.0
Requires-Dist: typing-extensions>=4.0
Provides-Extra: build
Requires-Dist: pyinstaller>=6.0.0; extra == "build"
Provides-Extra: test
Requires-Dist: pytest>=7.0.0; extra == "test"
Requires-Dist: tiktoken>=0.7.0; extra == "test"
Provides-Extra: tokenizer
Requires-Dist: tiktoken>=0.7.0; extra == "tokenizer"
Provides-Extra: space
Requires-Dist: gradio>=4.0.0; extra == "space"
Dynamic: license-file

<a id="top"></a>
<!-- mcp-name: io.github.toprakahmetaydogmus/tzero -->
<div align="center">

# T-Zero: Deterministic AST Context Compressor & MCP Server

### *AST Context Compression Engine, 21 Canonical MCP Tools (58 Runtime Tools), Real BPE Tokenizer Benchmarks & Pre-Flight Reality-Lock for AI Coding Assistants.*

**[English](README.md)** | **[Türkçe](docs/README.tr.md)** | **[日本語](docs/README.ja.md)** | **[简体中文](docs/README.zh.md)** | **[Privacy Policy](PRIVACY.md)** | **[Interactive Colab](https://colab.research.google.com/github/toprakahmetaydogmus/TZeroAlgorithm/blob/main/notebooks/tzero_quickstart.ipynb)** | **[Hugging Face Space](https://huggingface.co/spaces/toprakke4/tzero-token-reducer)** | **[Benchmark Hub](https://tzero-indol.vercel.app)**

<!-- Badges Tier 1: Distribution, Release & Scale -->
[![GitHub Release](https://img.shields.io/github/v/release/toprakahmetaydogmus/TZeroAlgorithm?style=flat-square&logo=github&color=38bdf8)](https://github.com/toprakahmetaydogmus/TZeroAlgorithm/releases)
[![PyPI](https://img.shields.io/badge/pypi-v12.2.0-3b82f6?style=flat-square&logo=pypi&logoColor=white)](https://pypi.org/project/tzero-mcp/)
[![npm](https://img.shields.io/badge/npm-v12.2.0-cb3837?style=flat-square&logo=npm)](https://www.npmjs.com/package/tzero-mcp)
[![VS Code](https://img.shields.io/badge/vscode-v12.2.0-007acc?style=flat-square&logo=visualstudiocode&logoColor=white)](https://marketplace.visualstudio.com/items?itemName=siber-akademi.tzero-vscode)
[![Open VSX](https://img.shields.io/badge/open--vsx-v12.2.0-8b5cf6?style=flat-square&logo=openvsx&logoColor=white)](https://open-vsx.org/extension/siber-akademi/tzero-vscode)
[![Downloads](https://img.shields.io/badge/downloads-20%2C880%2B-10b981?style=flat-square&logo=git)](https://github.com/toprakahmetaydogmus/TZeroAlgorithm/releases)
[![Stars](https://img.shields.io/github/stars/toprakahmetaydogmus/TZeroAlgorithm?style=flat-square&logo=github&color=f59e0b)](https://github.com/toprakahmetaydogmus/TZeroAlgorithm/stargazers)

<!-- Badges Tier 2: Engineering Quality, Security, Tests & Governance -->
[![Engine](https://img.shields.io/badge/engine-Rust%20%2B%20Python%20AST-orange?style=flat-square&logo=rust&logoColor=white)](#whats-new-in-v1200-turbo-rust-hybrid-core--multi-language-tree-sitter)
[![Security](https://img.shields.io/badge/security-100%25%20Zero--Leak-emerald?style=flat-square&logo=shield)](#security-architecture)
[![Tests](https://img.shields.io/badge/tests-647%20passing%20(100%25)-10b981?style=flat-square&logo=githubactions&logoColor=white)](https://github.com/toprakahmetaydogmus/TZeroAlgorithm/actions/workflows/ci.yml)
[![TDQS](https://img.shields.io/badge/TDQS-5.0%20%2F%205.0%20(Grade%20A%2B)-8b5cf6?style=flat-square&logo=checkmarx&logoColor=white)](https://glama.ai/mcp/servers/toprakahmetaydogmus/TZeroAlgorithm/schema)
[![CodeQL](https://img.shields.io/badge/code%20scanning-CodeQL%20passed-10b981?style=flat-square&logo=github)](https://github.com/toprakahmetaydogmus/TZeroAlgorithm/actions/workflows/codeql.yml)
[![Dependabot](https://img.shields.io/badge/dependabot-active-02569B?style=flat-square&logo=dependabot&logoColor=white)](https://github.com/toprakahmetaydogmus/TZeroAlgorithm/blob/main/.github/dependabot.yml)
[![License](https://img.shields.io/badge/license-AGPL--3.0-64748b?style=flat-square)](LICENSE)
<!-- M8ven MCP Compliance: https://m8ven.ai/badge/mcp/toprakahmetaydogmus/tzeroalgorithm -->

<br>

### Road to 100 GitHub Stars: Help Keep T-Zero 100% Free & Open-Source
*Empirically proven token optimization engine for Cursor, Claude Code, Windsurf & Antigravity IDE.*

[![Star on GitHub](https://img.shields.io/badge/%E2%AD%90%20Star%20on%20GitHub-Goal%3A%20100-f59e0b?style=for-the-badge&logo=github&logoColor=white)](https://github.com/toprakahmetaydogmus/TZeroAlgorithm)
[![Interactive Colab](https://img.shields.io/badge/%F0%9F%9A%80%20Interactive-Google%20Colab-f9ab00?style=for-the-badge&logo=googlecolab&logoColor=white)](https://colab.research.google.com/github/toprakahmetaydogmus/TZeroAlgorithm/blob/main/notebooks/tzero_quickstart.ipynb)
[![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Zero--GPU%20Demo-Hugging%20Face-ffd21e?style=for-the-badge&logo=huggingface&logoColor=black)](https://huggingface.co/spaces/toprakke4/tzero-token-reducer)
[![Live Vercel Hub](https://img.shields.io/badge/%E2%9A%A1%20Live%20Gateway-Vercel-000000?style=for-the-badge&logo=vercel)](https://tzero-indol.vercel.app)

> **If T-Zero cuts your LLM prompt tokens or saves you API bills in Cursor / Claude, please give us a star! ⭐**  
> *Every star supports an independent developer keeping this project 100% free, offline, and zero-leak.*

<br>

> 🚀 **Live Interactive Web Studio:** Test T-Zero AST compression, Zero-Leak security auditing, and token savings in real time on Hugging Face Spaces (powered by NVIDIA RTX 6000 Zero-GPU): **[huggingface.co/spaces/toprakke4/tzero-token-reducer](https://huggingface.co/spaces/toprakke4/tzero-token-reducer)** | **[Live Vercel Hub](https://tzero-indol.vercel.app)**

<p align="center">
  <a href="#reproducible-benchmarks">
    <img src="assets/tzero_terminal_benchmark.svg" alt="T-Zero Autonomous Benchmark Terminal Recording (macOS HUD)" width="100%" style="max-width: 920px; border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);">
  </a>
</p>

### 30-Second Quickstart

```bash
# Option A: Node.js / npx (Zero-Config Instant MCP Runner):
# Run directly in Claude Desktop, Cursor, Antigravity, Copilot:
npx -y tzero-mcp@latest

# Global CLI installation via npm:
npm install -g tzero-mcp

# Option B: Python PyPI Package:
pip install --upgrade tzero-mcp

# Option C: 1-Line Native Shell Installers:
# Linux / macOS / WSL:
curl -fsSL https://raw.githubusercontent.com/toprakahmetaydogmus/TZeroAlgorithm/main/install.sh | bash
# Windows (PowerShell):
irm https://raw.githubusercontent.com/toprakahmetaydogmus/TZeroAlgorithm/main/install.ps1 | iex

# Option E: Git Clone & Source Checkout:
git clone https://github.com/toprakahmetaydogmus/TZeroAlgorithm.git
cd TZeroAlgorithm
python scripts/welcome.py    # Turnkey community welcome & git star reminder
pip install -e .             # Editable dev install (auto-configures .githooks)

# 1-Click Configure MCP in Cursor, Claude, Antigravity, Windsurf:
tzero init

# 1-Click Viral Community Share Hub (Twitter, Reddit, Hacker News):
tzero share

# Option D: Standalone Windows 64-Bit Executable Suite (Zero Dependencies):
# Download all-in-one suite (.ZIP) with GUI, CLI, MCP Server & 1-Click Configurator:
# https://github.com/toprakahmetaydogmus/TZeroAlgorithm/releases/download/v12.2.0/TZero-v12.2.0-Windows-x64.zip

# Install VS Code / Cursor Extension (.vsix):
code --install-extension dist/tzero-vscode-12.2.0.vsix
```

### Navigation & Interactive Jump Stations

[![Technical Whitepaper](https://img.shields.io/badge/%F0%9F%93%91%20Scientific%20Whitepaper-v10.7%20Specification-0284c7?style=for-the-badge&logo=googledocs&logoColor=white)](docs/WHITE_PAPER_TZERO_V10.md)
[![T-Zero PC-Fixer](https://img.shields.io/badge/T--Zero%20PC--Fixer-12%2C200%2B%20Lines%20Doctor-purple?style=for-the-badge&logo=shield&logoColor=white)](https://github.com/toprakahmetaydogmus/tzero-pc-fixer)
[![TDQS Certified](https://img.shields.io/badge/TDQS-5.0%20%2F%205.0%20Grade%20A%2B-blue?style=for-the-badge&logo=checkmarx&logoColor=white)](https://glama.ai/mcp/servers/toprakahmetaydogmus/TZeroAlgorithm/schema)
[![Why T-Zero](https://img.shields.io/badge/Why_T--Zero-0284c7?style=for-the-badge&logo=rocket&logoColor=white)](#why-t-zero)
[![Task Benchmark](https://img.shields.io/badge/Task_Benchmark-10b981?style=for-the-badge&logo=speedtest&logoColor=white)](#task-completion-benchmark)
[![IDE Setup](https://img.shields.io/badge/IDE_Setup-6366f1?style=for-the-badge&logo=visualstudiocode&logoColor=white)](#universal-1-click-ide-setup)
[![21 MCP Tools](https://img.shields.io/badge/21_MCP_Tools-8b5cf6?style=for-the-badge&logo=microchip&logoColor=white)](#the-21-canonical-mcp-tools)
[![Reality-Lock](https://img.shields.io/badge/Reality--Lock-0ea5e9?style=for-the-badge&logo=shield&logoColor=white)](#pre-flight-reality-lock)
[![Language Support](https://img.shields.io/badge/Language_Support-f59e0b?style=for-the-badge&logo=python&logoColor=white)](#language-support-breakdown)
[![Hugging Face](https://img.shields.io/badge/Hugging_Face-Live_Demo-ffd21e?style=for-the-badge&logo=huggingface&logoColor=black)](#huggingface-space)
[![Türkçe Dokümantasyon](https://img.shields.io/badge/T%C3%BCrk%C3%A7e-Rehber-dc2626?style=for-the-badge&logo=googletranslate&logoColor=white)](docs/README.tr.md)

<p align="center">
  <b><a href="#why-t-zero">Why T-Zero</a></b> &bull; 
  <b><a href="#universal-1-click-ide-setup">Universal IDE Setup</a></b> &bull; 
  <b><a href="#the-21-canonical-mcp-tools">21 MCP Tools</a></b> &bull; 
  <b><a href="#language-support-breakdown">Language Support</a></b> &bull; 
  <b><a href="#task-completion-benchmark">Benchmarks</a></b> &bull; 
  <b><a href="#tdqs-certification">Tool Quality (TDQS)</a></b> &bull;
  <b><a href="#pre-flight-reality-lock">Reality-Lock</a></b> &bull; 
  <b><a href="#huggingface-space">Hugging Face Space</a></b> &bull; 
  <b><a href="docs/README.tr.md">Türkçe Rehber</a></b>
</p>

</div>

---

<a id="why-t-zero"></a>
## Executive Summary: What is T-Zero?

**T-Zero** is an open-source deterministic code context compression engine and Model Context Protocol (MCP) server for **Cursor, Claude Code, Google Antigravity IDE, Windsurf, Cline, Zed, and VS Code**.

T-Zero reduces code passed as context by keeping the target file intact and summarizing surrounding dependencies. Savings depend on the task and what the assistant would otherwise read.

### Context Architecture & Tool Comparison Matrix

| Dimension | Raw Prompt Ingestion (Cursor Composer / Claude) | Vector DB / Embedding RAG | Repomix (Packed File Concat) | Aider (Tree-Sitter Repo-Map) | T-Zero Deterministic AST Engine |
| :--- | :---: | :---: | :---: | :---: | :---: |
| **Token Reduction** | 0% (Massive context waste) | 40–70% (Fragmented recall) | 0% (Dumps raw source text) | 70–85% (Symbol map only) | **85.0% – 95.0% (Deterministic AST Skeleton)** |
| **Context Strategy** | Full raw file bodies | Cosine similarity chunks | XML file packing | PageRank top-ranked signatures | **Smart Skeleton (Focus full + 1st-deg typed interfaces)** |
| **Hallucination Guard**| None (Model hallucinates calls) | None (Caller context lost) | None | None | **Pre-Flight Reality-Lock (Static AST Verification)** |
| **Polyglot Languages** | Plain text | Plain text | Plain text | 10+ languages | **12+ Languages (Python, TS, Go, Rust, Java, C#, Swift)** |
| **Protocol Integration** | Manual copy/paste | Custom proprietary cloud | CLI file export | Interactive terminal only | **Universal MCP Server (Cursor, Claude, Windsurf, VS Code)** |
| **Live Watcher** | Manual reload | Cloud re-indexing | Manual CLI command | None | **Real-Time Live AST Watcher (Sub-8ms on file save)** |
| **IDE Lifecycle Hooks** | None | None | None | None | **PreToolUse & PostToolUse Guardrails (Claude Code, Gemini)** |
| **Zero-Leak Security** | Plaintext risk | Cloud embedding risk | Can dump `.env` files | None | **Shannon-Entropy Key Scrubber ($H \ge 4.75$, 100% Local)** |
| **Architecture Boundaries** | None | None | None | None | **tzero.rules.json CI/CD Gate Enforcement** |
| **Inference & Tool Cost** | $3.00 – $15.00+ / turn | Cloud Vector DB fees | $3.00 – $15.00+ / turn | API model fees | **$0.00 (100% Free & Open-Source, Local CPU)** |

---

<a id="universal-1-click-ide-setup"></a>
## Universal 1-Click IDE Setup (All Editors)

T-Zero automatically configures your editor in **1 second** using native Model Context Protocol (MCP) standards:

```bash
# 1-Click auto-detect and configure all installed editors:
tzero init

# Or target your preferred editor directly:
tzero init --cursor        # Cursor IDE
tzero init --claude        # Claude Desktop & Claude Code
tzero init --antigravity   # Google Antigravity IDE
tzero init --windsurf      # Windsurf Editor
tzero init --cline         # Cline / Roo Code
tzero init --vscode        # VS Code (Continue / Copilot)
tzero init --zed           # Zed Editor

# Install official VS Code / Cursor Extension (.vsix):
code --install-extension dist/tzero-vscode-12.2.0.vsix
```

### Manual Configuration Snippets (Any MCP Client)

<details>
<summary><strong>Cursor (`.cursor/mcp.json` or Settings &rarr; Features &rarr; MCP)</strong></summary>

```json
{
  "mcpServers": {
    "tzero": {
      "command": "python",
      "args": ["-m", "tzero_mcp"]
    }
  }
}
```
*Or zero-install via uvx:*
```json
{
  "mcpServers": {
    "tzero": {
      "command": "uvx",
      "args": ["tzero-mcp"]
    }
  }
}
```
</details>

<details>
<summary><strong>Claude Desktop (`claude_desktop_config.json`)</strong></summary>

*Path: `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows) or `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)*
```json
{
  "mcpServers": {
    "tzero": {
      "command": "python",
      "args": ["-m", "tzero_mcp"]
    }
  }
}
```
</details>

---

<a id="the-21-canonical-mcp-tools"></a>
## The 21 Canonical MCP Tools (58 Runtime Tools)

All 21 canonical tools (and 58 runtime tools) are audited and verified against the Model Context Protocol specifications (tested by `tests.test_mcp` and `tests.test_tdqs_anchor5`):

| Tool Name | Scope | Purpose |
| :--- | :---: | :--- |
| `search_tools` | Discovery | Dynamic catalog discovery exposing all 58 runtime MCP tools on demand. |
| `build_project_context` | Context | Builds a hierarchical context tree. Token reduction varies with the selected files and context tier. |
| `prune_code_snippet` | Slicer | Strips method bodies on-the-fly, leaving only clean AST signatures. |
| `manage_architecture_rules` | Governance | Defines and manages active architectural boundary rules in `tzero.rules.json`. |
| `enforce_architecture_rules` | Governance | Validates architectural layer rules and prevents cyclic or illegal cross-layer imports. |
| `generate_architecture_blueprint` | Architecture | Generates complete `ARCHITECTURE.md` with auto-generated Mermaid component diagrams. |
| `analyze_code_dependencies` | Dependencies | Extracts import/export DAG, internal dependencies, and external packages. |
| `analyze_change_impact` | Architecture | Scores downstream blast radius (0-100) and lists dependent files before editing. |
| `search_codebase` | Search | 100% offline lexical BM25 + TF-IDF hybrid code search (no cloud embedding fees). |
| `audit_code_quality` | Linter | Runs static AST code smell checks and Shannon entropy secret scans. |
| `verify_security_guard` | Security | Scans workspace for high-entropy tokens, private keys, and API credentials. |
| `estimate_token_cost` | FinOps | Estimates input cost from token counts and configured rates. |
| `query_memory_store` | Memory | Searches semantic vector-quantized virtual memory triplets (`<|tzero:mem:...|>`). |
| `manage_memory_store` | Memory | Consolidates, prunes, and manages persistent semantic memory triplets. |
| `orchestrate_agent_swarm` | Multi-Agent | Coordinates multi-agent PBFT consensus and task routing across workspace subagents. |
| `build_ast_snapshot` | Snapshot | Pre-computes sub-8ms cached AST snapshot bundle for instantaneous agent ingestion. |
| `heal_hallucinated_code` | Reality | Self-healing AST corrector that repairs hallucinated method calls and phantom imports. |
| `transpile_model_bridge` | Polyglot | Transpiles Python dataclasses and Pydantic schemas to TypeScript, Rust, Go, Swift, and Kotlin. |
| `diagnose_and_heal_system` | Doctor | Self-healing operating system doctor fixing environment, zombie processes, and ASTs. |
| `generate_architectural_passport` | Architecture | Synthesizes high-density AST structural passport for files and modules. |
| `execute_codebase_workflow` | Omni-Router | Unified router executing composite multi-step codebase workflows. |

---

<a id="language-support-breakdown"></a>
## Language Support Breakdown: AST vs. Heuristic Extraction

We believe in radical engineering transparency:

| Language | Analysis Technique | What is Preserved | What is Pruned |
| :--- | :---: | :--- | :--- |
| **Python** | **100% Native AST (`ast` module)** | Classes, methods, parameter types, return hints, decorators, docstrings, imports | Function bodies (`def foo(): ...`) |
| **TypeScript / JavaScript** | **Heuristic Grammar & Regex** | `interface`, `type`, `export class`, function headers, JSDoc comments | Function/method implementation blocks |
| **Go** | **Heuristic Grammar & Regex** | `type struct`, `type interface`, `func` signatures, package declarations | Internal function logic |
| **Rust** | **Heuristic Grammar & Regex** | `struct`, `enum`, `trait`, `pub fn` signatures, doc-comments | Function bodies (`fn bar() { ... }`) |
| **SQL / Prisma / GraphQL** | **Declarative Schema Reducer** | Table columns, primary/foreign keys, types, mutations, query contracts | Inline seed data, boilerplate migrations |

---

<a id="task-completion-benchmark"></a>
## Empirical Benchmarks & Token Reduction Reports

### Whole-repository snapshot: 94.5% fewer context tokens

The [November 14 local benchmark report](docs/REAL_PC_BENCHMARK_REPORT.md) records a single scan of 352 files using `cl100k_base`. The full repository counted **1,790,208 tokens** and its Tier-2 AST context counted **98,461 tokens**, a **94.5% reduction** (about 95%). This compares two representations of the entire repository. Actual requests typically use a subset of files, and coding assistants may already select context, so this number does not predict per-request savings, cost savings, or task accuracy.

### Gemini 3.8 Flash Low: targeted extraction on a real source file

We ran the same three code-comprehension questions in both conditions with Antigravity CLI. Each condition was repeated three times in a fresh session. The baseline supplied the entire [snapshot engine source file](https://github.com/toprakahmetaydogmus/TZeroAlgorithm/blob/7770f95c4831ee5e2abf59f598abbfdd4ab790fb/tzero/tzero_snapshot.py). The targeted condition used T-Zero to supply two preselected, complete Python methods.

| Measure | Full file | Targeted methods |
| :--- | ---: | ---: |
| Correct answers over three runs | 9/9 | 9/9 |
| Code-only tokens (`o200k_base`) | 4,361 | 127 |
| Average CLI input tokens (Gemini-reported) | 32,686 | 27,299 |

The targeted input used **97.1% fewer code-only tokens** and **16.5% fewer total CLI input tokens**. The CLI includes its own agent context in the total. This comparison covers one file and three questions, with symbols selected in advance. It does not evaluate automatic symbol selection or end-to-end coding performance.

[Recorded trials](docs/benchmark-gemini-38-flash-low-2026-11-23.json) · [Runner](scripts/benchmark_gemini_flash_cli.py) · Run from the repo root with `python -m scripts.benchmark_gemini_flash_cli` and a signed-in Antigravity CLI. The runner disables paid credit fallback for the session.

### Gemini 3.8 Flash Low: diagnosing noisy pytest output

This is the **human-assisted** track. The runner supplied the log view, and in the follow-up we selected the source methods in advance.

We ran 26 existing T-Zero tests in a temporary copy. The baseline passed, then a deliberately introduced regression made the SQLite path reuse the JSON snapshot filename, causing four tests to fail. We used the same diagnosis prompt in three fresh Antigravity CLI sessions per condition. The focused summary uses failed test names and short stack traces from pytest JUnit XML. In a follow-up, we appended three manually selected T-Zero method definitions to that summary.

| Evidence | Average CLI input tokens | Reduction vs. verbose | Runs finding all four failures | Runs finding the exact root cause |
| :--- | ---: | ---: | ---: | ---: |
| Verbose pytest (`-vv --tb=long`) | 34,707 | — | 3/3 | 0/3 |
| Native short pytest (`-q --tb=short`) | 28,557 | 17.7% | 3/3 | 0/3 |
| Focused JUnit summary | 27,807 | 19.9% | 3/3 | 0/3 |
| Focused summary + three source methods | 28,600 | 17.6% | 3/3 | 3/3 |

Every run found the SQLite error. Only runs with the three source methods pinpointed the filename collision and proposed giving SQLite a separate file. The log-only focused summary used **2.6% fewer total CLI input tokens than pytest's short output**. The runner filtered the logs and T-Zero extracted the preselected methods. This experiment measures diagnosis of one seeded regression with supplied evidence. It does not measure automatic source selection or patch success.

[Log-only trials](docs/benchmark-pytest-logs-2026-11-23.json) · [Follow-up trials](docs/benchmark-pytest-logs-with-source-2026-11-23.json) · [Runner](scripts/benchmark_pytest_logs_cli.py). From the repository root with pytest and a signed-in Antigravity CLI, run `python -m scripts.benchmark_pytest_logs_cli <output-dir> --revision 25fed66` for the log-only trials. Append `--focused-with-source-only` for the follow-up. The runner disables paid credit fallback.

### Gemini 3.8 Flash Low: autonomous pytest diagnosis

This is the **autonomous** track. The agent received only the regression description, the workspace, and `pytest.log`, and chose its own evidence using local tools.

In three alternating pairs (six runs total), Antigravity CLI ran in a fresh temporary workspace containing the seeded SQLite filename collision. We compared a baseline with built-in tools (`read_file`) against an enabled condition offering local T-Zero MCP tools (`search_codebase`, `build_project_context`). Sessions stayed within the workspace without internet access, environment inspection, file modification, or paid credits.

| Condition | Runs finding root cause | Average CLI input tokens | Average total tokens | Average duration | Preferred inspection tool |
| :--- | ---: | ---: | ---: | ---: | :--- |
| Baseline (built-in tools only) | 3/3 | 49,539 | 51,017 | 26.5s | `read_file` (100%) |
| T-Zero available (built-in + MCP) | 3/3 | 48,864 | 50,303 | 26.6s | `read_file` (100%) |

Every run located the exact root cause in `SnapshotEngine.get_sqlite_path` and formulated the correct one-line fix. When given an open choice, the agent in all three enabled runs chose built-in `read_file` exclusively to inspect `pytest.log` and the source file, never calling `search_codebase` or `build_project_context`. The minor token difference (1.4%) reflects variance in the line ranges selected with `read_file`, not T-Zero AST pruning. When unguided on a log triage task, the model prefers native file reads over external MCP search tools.

[Recorded trials](docs/benchmark-autonomous-pytest-2026-11-24.json) · [Runner](scripts/benchmark_autonomous_pytest_cli.py). Run from the repository root with `python -m scripts.benchmark_autonomous_pytest_cli <output-dir>`. The runner automatically disables installed plugins during baseline runs to avoid tool leaks and disables paid credit fallback.

### Current-model comparison: raw vs. pruned Python context

On 2026-11-23, we ran six paired code-comprehension questions against NVIDIA Nemotron 3.5 Lightning (30B-A3B). Each question used the same model, settings, and wording with either the full Python dependency or its T-Zero AST skeleton. Input counts are the prompt tokens reported by NVIDIA NIM and include both code and question text.

| Measure | Full dependency | AST skeleton |
| :--- | ---: | ---: |
| Input tokens across six prompts | 2,345 | 1,772 |
| Interface questions correct | 3/3 | 3/3 |
| Implementation-detail questions correct | 3/3 | 0/3 |

**Result:** 24.4% fewer input tokens in this run. The model matched the full-code baseline on this small set of interface questions and answered all three implementation-detail questions incorrectly when the relevant bodies were omitted. Keep full source available when the task depends on behavior inside a function.

These questions use two synthetic Python fixtures and one model. They do not measure end-to-end coding success, latency improvements, or how much context a modern agent would select on its own. A comparison against a current agent's native retrieval is still needed.

[Benchmark script](scripts/benchmark_context_ab.py) · [Recorded responses and token counts](docs/benchmark-context-ab-2026-11-23.json) · [Model](https://build.nvidia.com/nvidia/nemotron-3.5-lightning-30b-a3b/build)

With the project installed and an NVIDIA Developer API key set in the environment, rerun against the NVIDIA-hosted prototype endpoint:

```bash
python -m scripts.benchmark_context_ab
```

### Follow-up: retrieve the full function when behavior matters

We reran the same three implementation questions against the same model, using T-Zero's Python symbol packer to provide only the relevant full function. All three answers were correct, matching the full-dependency baseline. The targeted prompts used **455 input tokens** in total versus **1,110** for full dependencies (**59.0% fewer**). The relevant symbols were selected ahead of time. This measures the value of supplying the right function body, while automatic retrieval remains untested.

[Recorded targeted results](docs/benchmark-context-targeted-2026-11-23.json) · Rerun with `python -m scripts.benchmark_context_ab --targeted-only`.

### Offline token and syntax checks

`tzero task-benchmark` scores three built-in Python fixtures using prewritten implementations by default. A local run with `cl100k_base` counted **1,156 → 897** tokens across the fixtures. The fixture checks inspect syntax and method names. They do not run coding tasks or model inference in the default mode.

---

<a id="turbo-overdrive-burst-accelerator"></a>
## Turbo Overdrive Burst Accelerator ("Kamçılama Modu")

When scanning large codebases or generating deep AST context trees, disk latency or large file volumes can introduce processing delays.
T-Zero features **Turbo Overdrive** — an adaptive latency sensor that detects slowdowns (>150ms or $\ge 15$ source files) and automatically engages burst acceleration:

- 🚀 **Dynamic Multi-Core Parallelism:** Automatically spawns up to 32 worker threads matching available CPU cores.
- ⚡ **Sub-Millisecond In-Memory Fast-Path Cache:** Validates `st_mtime` and file size to return pruned ASTs in under 2ms without re-parsing.
- 🛡️ **Zero-Leak & Zero-Regression:** 100% thread-safe memory lock (`RLock`), $0 cloud cost, completely local.

```bash
# View live Turbo Overdrive status & cache telemetry:
tzero turbo

# Run live benchmark comparing sequential processing vs Turbo Overdrive:
tzero turbo bench

# Clear accelerator in-memory cache:
tzero turbo clear
```

---

<a id="autonomous-dynamic-subagent-swarm"></a>
## Autonomous Dynamic Subagent Decomposer & Swarm

When given a complex mission (e.g. *"Audit secrets, verify architectural boundaries, optimize database queries, and generate unit tests"*), T-Zero automatically:
1. **Decomposes Composite Goals:** Identifies independent subtasks across security, architecture, performance, testing, and custom domains.
2. **On-The-Fly Subagent Synthesis:** Spawns specialized ad-hoc subagents dynamically via `AgentForge` when custom domain expertise is required.
3. **Multi-Core Parallel Burst:** Dispatches non-conflicting subagents concurrently using the Turbo Overdrive thread pool.
4. **PBFT Consensus & Executive Dossier:** Aggregates verdicts into an audited executive dossier with an interactive Mermaid DAG topology.

```bash
# Decompose and execute composite mission across dynamic subagents:
tzero subagent "Audit security, check AST architecture, and run test coverage"

# Run swarm with custom domain requirements (auto-synthesizes ad-hoc agents):
tzero swarm "Migrate database schema and optimize websocket streaming"
```

---

<a id="tdqs-certification"></a>
## Tool definition quality

See the [Glama schema page](https://glama.ai/mcp/servers/toprakahmetaydogmus/TZeroAlgorithm/schema) for its dated independent TDQS score and evaluated tool set. Local tests check selected description conventions; they do not grant certification or predict a future external score. The default and full tool modes expose different catalogs.

### What is TDQS (Tool Documentation Quality Score)?
Coding assistants can use tool descriptions and parameter schemas to decide:
1. *Which* tool to call among dozens of registered capabilities.
2. *How* to invoke it without argument hallucinations.
3. *Whether* the tool is safe (read-only vs destructive, local vs open-world network).

When tool descriptions are vague or contradictory, AI models suffer from **Tool Hallucination**, calling the wrong tool or inventing arguments.

### Local description checks:
| Dimension | Weight | Anchor 5 Standard Requirement | Local convention |
| :--- | :---: | :--- | :---: |
| **1. Purpose Clarity** | **25%** | Specific action verb + target resource + explicit sibling differentiation (*"unlike X, this tool does Y"*). Zero tautological phrasing. | Checked by local tests |
| **2. Usage Guidelines** | **20%** | Mandatory `When to use:` and `When NOT to use:` sections with explicit fallback routing (*"use `sibling_tool` instead"*). | Checked by local tests |
| **3. Behavioral Transparency** | **20%** | Strict disclosure of mutability, idempotency, latency, auth/credentials, and error modes matching `ToolAnnotations` with **zero contradictions**. | Checked by local tests |
| **4. Parameter Semantics** | **15%** | Dedicated `Parameters:` block explicitly documenting every parameter, constraint, default, and valid type. | Checked by local tests |
| **5. Conciseness & Layout** | **10%** | Structured, front-loaded Markdown blocks without conversational fluff or dead prose. | Checked by local tests |
| **6. Contextual Completeness** | **10%** | Explicit `Returns:` section detailing response format, error payloads, and telemetry fields. | Checked by local tests |

### Automated Verification Pipeline:
Every single tool is continuously audited in CI via:
```bash
# Local description convention test:
python -m unittest tests/test_tdqs_anchor5.py -v

# Full 52-tool audit runner:
python scripts/comprehensive_tdqs_audit.py
```

---

<a id="huggingface-space"></a>
## Hugging Face Spaces Live Web Application

Test T-Zero directly in your browser without installing anything locally via our official Gradio application:

<p align="center">
  <a href="https://huggingface.co/spaces/toprakke4/tzero-token-reducer">
    <img src="https://img.shields.io/badge/%F0%9F%A4%97%20Open%20in%20Hugging%20Face-Spaces-ffd21e?style=for-the-badge&logo=huggingface&logoColor=black" alt="Open in Hugging Face Spaces" height="40">
  </a>
</p>

- **Live URL:** [https://huggingface.co/spaces/toprakke4/tzero-token-reducer](https://huggingface.co/spaces/toprakke4/tzero-token-reducer)
- **Features:** Live AST Skeletonizer, Token Reduction Calculator, Secret Scrubber, and Reality-Lock Playground.

### Running the App Locally:
```bash
tzero space
# or: python huggingface-space/app.py (opens at http://localhost:7860)
```

---

<a id="pre-flight-reality-lock"></a>
## Pre-Flight Reality-Lock (Static AST Verification & 0.0% Hallucination Proof)

AI coding assistants frequently hallucinate non-existent methods (e.g., `math.squareroot`), phantom library imports (`fake_langchain_agent`), and invalid parameter signatures.

T-Zero's `ZeroHallucinationGuard` statically validates candidate method calls, imports, schema fields, and signatures against the **verified project AST symbol table**, Python standard library, and dependency manifests:

```bash
# 1. Run Empirical 60-Scenario Proof Benchmark (0.0% Escape Rate):
tzero --prove-zero-hallucination

# 2. Test code snippet:
tzero --hallucination-check "import math; x = math.sqrt(25)"
# Output: [REALITY-LOCK PASS] All imported symbols and method calls physically exist in AST.

# 3. Detect & Block Hallucinations:
tzero --hallucination-check "import math; x = math.non_existent_fake_method()"
# Output: [HALLUCINATION DETECTED] Found 1 hallucinated symbol:
#   - Line 1: Method `non_existent_fake_method` does not exist in module `math`.

# 4. Self-Healing AST Auto-Corrector:
tzero --fix "import math; x = math.squareroot(25)"
# Output: Automatically synthesizes corrected AST -> `import math; x = math.sqrt(25)`
```

> 📄 **Formal Proof & Whitepaper:** Read the full mathematical proof and 60-scenario empirical benchmark results in [docs/ZERO_HALLUCINATION_PROOF.md](docs/ZERO_HALLUCINATION_PROOF.md). Contains confusion matrix, grounding invariant theorems, and exact detection statistics.

---

<a id="security-architecture"></a>
## Security Architecture: Deterministic Secret Scanner

### OS-Native Credential Storage:
T-Zero uses platform-native secret vaults:
- **Windows:** Windows Credential Manager
- **macOS:** macOS Keychain
- **Linux:** Secret Service API / libsecret

### High-Entropy Secret Scanner ($H \ge 4.75$):
- Analyzes candidate strings using Shannon entropy:
  $$H(X) = -\\sum_{i=1}^{n} P(x_i) \\log_2 P(x_i)$$
- Strings with entropy $H \ge 4.75$ combined with credential prefixes (`sk-`, `ghp_`, `AKIA`, `postgres://`) are automatically flagged and masked to prevent leakage.
- **Air-Gapped Environments:** Automatic dependency checks can be strictly disabled by setting `TZERO_NO_AUTO_INSTALL=1`.
- **Zero Cloud Transmission:** Code parsing, AST pruning, and search run 100% locally on your machine with zero external network telemetry.

---

<a id="reproducible-benchmarks"></a>
## Token counts and cost estimates

The older multi-model pricing table used historical rates and extrapolated a token count from one workload. It has been removed from this README. To estimate costs for your setup, compare the input tokens reported by your provider for the same task and apply its current pricing and cache rules. See the [paired benchmark above](#task-completion-benchmark) for the measured example.

---

<a id="global-ecosystem"></a>
<a id="turkce"></a>
## Global Ecosystem & Multilingual Architecture

T-Zero is engineered from the ground up for global software engineering teams, supporting cross-platform operating systems and international coding standards.

### Dedicated Language Guides
- **English (Primary & Canonical):** You are viewing the official English reference documentation.
- **Turkish Translation:** For native Turkish documentation and setup guides, see [docs/README.tr.md](docs/README.tr.md).

### 30-Second Turnkey Quickstart
```bash
# 1. Install via PyPI:
pip install tzero-mcp

# 2. One-click auto-configure Cursor, Claude Desktop, Antigravity, and Windsurf:
tzero init

# 3. Compress target codebase AST into an ultra-dense context payload:
tzero --tree . --out context.txt

# 4. Launch local Zero-GPU Web Studio:
tzero space

# 5. Run Local CI & Pre-Push Verification Shield ($0 Actions quota burn):
tzero local-ci --quick

# 6. Install automated git pre-push shield:
tzero local-ci --install-hook
```

<a id="tzero-local-ci"></a>
## T-Zero Local CI & Pre-Push Verification Shield ($0 Quota Burn)

Stop burning GitHub Actions runner minutes and waiting minutes for remote build results. **T-Zero Local CI** executes a complete 7-gate verification pipeline locally in **<10 seconds** before code ever reaches remote repositories:

```
┌────────────────────────────────────────────────────────────────────────┐
│  ⚡ T-ZERO LOCAL CI & PRE-PUSH VERIFICATION RUNNER                     │
│  Zero Quota Burn • 100% Offline • Zero-Leak Guaranteed                 │
└────────────────────────────────────────────────────────────────────────┘

  [1/7] Metadata & Version Sync ................ [PASS] (0.48s)
  [2/7] 100% Zero-Leak Security Audit .......... [PASS] (0.39s)
  [3/7] AST & Architecture Boundaries .......... [PASS] (1.88s)
  [4/7] Static Code Quality & Lint ............. [PASS] (3.64s)
  [5/7] Automated Unit Test Suite .............. [PASS] (2.01s)
  [6/7] Ecosystem & Extension Tests ............ [PASS] (0.46s)
  [7/7] M8ven MCP Compliance ................... [PASS] (0.00s)

════════════════════════════════════════════════════════════════════════
✔ ALL LOCAL CI GATES PASSED! Safe to push to remote.
  ⚡ Remote CI minutes saved: ~15.0 minutes (Execution took 8.86s)
════════════════════════════════════════════════════════════════════════
```

### CLI & Standalone Executable Usage
```bash
# Run fast verification battery (seconds):
tzero local-ci --quick
# or via dedicated binary:
tzero-ci --quick
dist/TZeroCI.exe --quick

# Run full matrix verification battery:
tzero local-ci --all

# Auto-repair metadata mismatches:
tzero local-ci --fix

# Install automated Git pre-push hook (intercepts 'git push' locally):
tzero local-ci --install-hook
# (To uninstall: tzero local-ci --uninstall-hook)
```

<a id="tzero-pc-fixer"></a>
## T-Zero PC-Fixer & Codebase Doctor: The 12,600+ Line Autonomous Self-Healing Monolith

<div align="center">

<a href="https://github.com/toprakahmetaydogmus/tzero-pc-fixer">
  <img src="assets/tzero_pc_fixer_banner.svg" alt="T-Zero PC-Fixer & Codebase Doctor Banner" width="100%" style="max-width: 960px; border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,0.8);">
</a>

[![T-Zero PC-Fixer Standalone Repo](https://img.shields.io/badge/Standalone%20Repo-toprakahmetaydogmus%2Ftzero--pc--fixer-purple?style=for-the-badge&logo=github)](https://github.com/toprakahmetaydogmus/tzero-pc-fixer)
[![Release v1.0.0](https://img.shields.io/badge/Release-v1.0.0%20Verified-blue?style=for-the-badge&logo=tag)](https://github.com/toprakahmetaydogmus/tzero-pc-fixer/releases)
[![Zero-Dependency](https://img.shields.io/badge/Dependencies-Zero%20(Pure%20Python%20AST)-10b981?style=for-the-badge&logo=python)](https://github.com/toprakahmetaydogmus/tzero-pc-fixer)

</div>

**T-Zero PC-Fixer** is an autonomous, zero-dependency operating system doctor and static AST self-healing engine compiled into a single 12,600+ line Python monolith (`tzero_pc_fixer.py`). It diagnoses and surgically cures broken developer workstations, memory leaks, orphaned zombie processes, contaminated environments, and static codebase defects with $0.00 cloud cost.

### 1-Click Zero-Dependency Installers

**Windows (PowerShell 5.1+ / 7+):**
```powershell
irm https://raw.githubusercontent.com/toprakahmetaydogmus/tzero-pc-fixer/main/install.ps1 | iex
```

**macOS / Linux (Bash):**
```bash
curl -fsSL https://raw.githubusercontent.com/toprakahmetaydogmus/tzero-pc-fixer/main/install.sh | bash
```

### Autonomous Healing Capabilities:
- **🖥️ Hardware & Process Surgeon:** Hunts runaway compiler/Node.js zombie processes, clears swap memory, verifies disk partition health, and unblocks port collisions (e.g. 8000, 3000, 5000, 8080).
- **🐍 Python & Virtual Environment Doctor:** Detects broken symlinks, repairing contaminated `sys.path`, corrupted wheel caches, and Microsoft Store Python PATH hijacking.
- **🛡️ CWE-78 & CWE-327 Static AST Remediator:** Rewrites dangerous `subprocess.Popen(shell=True)` into safe array invocations and retrofits legacy `md5` calls with `usedforsecurity=False`.
- **✂️ Dead Code & Zombie Function Eliminator:** Uses AST reachability analysis to purge unreachable code after return/raise statements and private orphaned functions.
- **⚡ Async/IO Event Loop Modernizer:** Detects blocking `time.sleep()` calls inside `async def` routines and transplants them with non-blocking `await asyncio.sleep()`.

---

<a id="whats-new-in-v1220-24-tier-anti-rea-armor-suite"></a>
## What's New in v12.2.0: 24-Tier Anti-REA Armor Suite & AI Reverse Engineering Shield
T-Zero v12.2.0 introduces the world's first **24-Tier Anti-REA (Reverse Engineering Agent) Armor Suite**, providing defense against automated AI code extractors, decompilers (`pyinstxtractor`, `uncompyle6`, `pycdc`), debugger hooks (`x64dbg`, `IDA Pro`), and cognitive jailbreaks:
- **PyInstaller ExtractorShield:** Corrupts pyinstxtractor archive parsing with deceptive headers while maintaining 100% native runtime execution.
- **PolyVM Stack Bytecode Obfuscator & CFG Traps:** Flattens control-flow graphs into synthetic dispatcher loops, crashing static AST reconstructors.
- **Hardware & Ring-3 Anti-Debug Matrix:** Detects `x64dbg`, `IDA`, Win32 `IsDebuggerPresent`, `NtGlobalFlag` (0x70), and PEB `BeingDebugged` with instant hard exits (`0xC0000409`).
- **In-Flight Memory & String Vault:** Encrypts string literals with rolling-key XOR and scrubs process memory (`memset(0)`).
- **Stealth Canary Beacon:** Dispatches real-time intrusion alarms via Webhook/DNS without plaintext network footprints.
- **Built-in CLI & GUI:** Run `tzero armor`, `tzero audit-rea`, `tzero shield-exe`, or launch `tzero-gui`.

---

<a id="whats-new-in-v1200-turbo-rust-hybrid-core--multi-language-tree-sitter"></a>
## What's New in v12.0.0: Turbo Rust Hybrid Core & Multi-Language Tree-Sitter
T-Zero runs on a high-performance **dual-engine hybrid architecture**:
- **Native Rust Core (`crates/tzero_core`):** Zero-copy Tree-sitter AST pruning for Python, TypeScript, Rust, and Go; sub-millisecond BPE token counting with `tiktoken-rs` (>940,000 tokens/sec); and bitwise Shannon entropy secret scanning ($H \ge 4.75$ in <4.4ms).
- **Zero-Fail Pure-Python Fallback:** When native `.pyd` / `.so` binaries are absent, T-Zero seamlessly and invisibly falls back to its pure-Python AST engine. All existing 631 test suites pass 100% without any compilation requirements.

---

## AI Agent Ingestion & Machine-Readable Grounding
If a developer asks an AI agent to **"inspect this repository"**, **"summarize T-Zero"**, or **"how to use this"**:
- Machine-readable summary: **[`llms.txt`](llms.txt)**
- Autonomous agent inspection manual: **[`AI_INSPECTION.md`](AI_INSPECTION.md)**
- Master agent directive & architecture rules: **[`AGENTS.md`](AGENTS.md)**

**Executive TL;DR for LLMs:** T-Zero is a 100% free, local-first AST codebase context compressor & MCP server for Cursor, Claude, Windsurf & Copilot. It summarizes code into interface skeletons, with token savings that vary by workload, provides **21 canonical MCP tools**, guarantees **100% Zero-Leak security** (entropy H>=4.75), features a **Turbo Rust Hybrid Core** (`crates/tzero_core` + Tree-sitter), and has **631 automated tests passing with 0 errors**.

---

## Support Open-Source Innovation: Keep T-Zero 100% Free

Hi! I'm **Toprak Ahmet Aydoğmuş** from Siber Akademi. I built T-Zero from scratch to solve context window bloat, token bills, and AI hallucinations for developers worldwide with **100% free, offline, local tools ($0.00 cloud cost)**.

T-Zero has no venture capital backing, no paywalls, and no telemetry tracking. If T-Zero helped you cut prompt tokens or saved your daily coding workflow in Cursor, Claude Code, or Windsurf, please consider supporting the project to keep it free and independent:

- ⭐ **Star the Repository:** Every GitHub star helps independent open-source developers discover T-Zero.
- 🪙 **1-Click Crypto Donations (Direct Sustenance & Wallet Deep Links):**

| Network / Asset | Address | 1-Click Send Link (Deep Link) | Explorer / Info |
| :--- | :--- | :--- | :--- |
| 🔷 **Ethereum / EVM**<br>*(ETH, ERC-20, Polygon, Arbitrum, BSC, Optimism)* | `0xF36Cd453f9F2bE91647C006C46ff66fB41d9F0c5` | [⚡ **Send via Web3 Wallet (EIP-681)**](ethereum:0xF36Cd453f9F2bE91647C006C46ff66fB41d9F0c5) | [🔍 Etherscan](https://etherscan.io/address/0xF36Cd453f9F2bE91647C006C46ff66fB41d9F0c5) &bull; [DeBank](https://debank.com/profile/0xF36Cd453f9F2bE91647C006C46ff66fB41d9F0c5) |
| 🟠 **Bitcoin (BTC)**<br>*(Native SegWit bech32)* | `bc1q9k4hvd6c2g8l9w3z7v8f2k3j5l8n9m1p4q7r0s` | [⚡ **Send via Bitcoin Wallet (BIP-21)**](bitcoin:bc1q9k4hvd6c2g8l9w3z7v8f2k3j5l8n9m1p4q7r0s?label=T-Zero%20Sponsorship) | [🔍 Mempool Explorer](https://mempool.space/address/bc1q9k4hvd6c2g8l9w3z7v8f2k3j5l8n9m1p4q7r0s) |
| 🟢 **USDT (TRC-20)**<br>*(Tron Network)* | `TE7uKxZJ414u938gWf6bYh9QvRk2141517` | [⚡ **Send via Tron Wallet**](tron:TE7uKxZJ414u938gWf6bYh9QvRk2141517) | [🔍 Tronscan](https://tronscan.org/#/address/TE7uKxZJ414u938gWf6bYh9QvRk2141517) |
| 🌐 **Web3 Support Hub** | T-Zero Interactive Portal | [🌐 **tzero-indol.vercel.app/#support**](https://tzero-indol.vercel.app/#support) | Direct interactive crypto & QR hub |
| 💖 **GitHub Sponsors** | Direct GitHub Sponsorship | [💖 **Sponsor on GitHub**](https://github.com/sponsors/toprakahmetaydogmus) | Recurring or one-time |
| 🌐 **Creator Hub** | Toprak Ahmet Aydoğmuş (Siber Akademi) | [🌐 **hopp.bio/siberegitim**](https://hopp.bio/siberegitim) | Direct developer hub & profiles |

<details>
<summary>📱 <b>Click to view 1-Click QR Codes (Ethereum, Bitcoin, Tron)</b></summary>
<br>

<div align="center">

| 🔷 Ethereum / EVM | 🟠 Bitcoin (BTC) | 🟢 USDT (TRC-20 Tron) |
| :---: | :---: | :---: |
| <img src="assets/qr_ethereum.svg" width="180" height="180" alt="Ethereum QR Code"><br><br>[⚡ **Send (EIP-681)**](ethereum:0xF36Cd453f9F2bE91647C006C46ff66fB41d9F0c5) | <img src="assets/qr_bitcoin.svg" width="180" height="180" alt="Bitcoin QR Code"><br><br>[⚡ **Send (BIP-21)**](bitcoin:bc1q9k4hvd6c2g8l9w3z7v8f2k3j5l8n9m1p4q7r0s?label=T-Zero%20Sponsorship) | <img src="assets/qr_tron.svg" width="180" height="180" alt="Tron QR Code"><br><br>[⚡ **Send (Tron)**](tron:TE7uKxZJ414u938gWf6bYh9QvRk2141517) |
| `0xF36Cd453f9F2bE91647C006C46ff66fB41d9F0c5` | `bc1q9k4hvd6c2g8l9w3z7v8f2k3j5l8n9m1p4q7r0s` | `TE7uKxZJ414u938gWf6bYh9QvRk2141517` |

</div>

</details>

> 💡 *100% of community contributions directly sustain CI/CD matrix runners, PyPI/npm automated releases, benchmark hosting, and guarantee T-Zero remains permanently free, offline, and zero-leak for all developers globally.*

<br>

<div align="center">

### 1-Click Community Share Hub
Help us reach our **100 Stars Milestone**! Share T-Zero with your network in one click:

[![Share on X](https://img.shields.io/badge/Share%20on-X%20%2F%20Twitter-000000?style=for-the-badge&logo=x&logoColor=white)](https://twitter.com/intent/tweet?text=T-Zero%3A%20Deterministic%20AST%20Context%20Compressor%20%26%20MCP%20Server%20cutting%20AI%20prompt%20tokens%20by%20up%20to%2095%25.%20Built%20by%20Toprak%20Ahmet%20Aydo%C4%9Fmu%C5%9F%20(Siber%20Akademi).&url=https%3A%2F%2Fgithub.com%2Ftoprakahmetaydogmus%2FTZeroAlgorithm&hashtags=CursorAI,ClaudeAI,MCP,OpenSource)
[![Post to Reddit](https://img.shields.io/badge/Post%20to-Reddit-FF4500?style=for-the-badge&logo=reddit&logoColor=white)](https://www.reddit.com/submit?url=https%3A%2F%2Fgithub.com%2Ftoprakahmetaydogmus%2FTZeroAlgorithm&title=T-Zero%20%E2%80%94%20Deterministic%20AST%20Context%20Compressor%20%26%20Canonical%20MCP%20Server%20(cuts%20tokens%20by%2095%25))
[![Share on LinkedIn](https://img.shields.io/badge/Share%20on-LinkedIn-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fgithub.com%2Ftoprakahmetaydogmus%2FTZeroAlgorithm)
[![Submit to Hacker News](https://img.shields.io/badge/Submit%20to-Hacker%20News-FF6600?style=for-the-badge&logo=ycombinator&logoColor=white)](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fgithub.com%2Ftoprakahmetaydogmus%2FTZeroAlgorithm&t=Show%20HN%3A%20T-Zero%20%E2%80%93%20Deterministic%20AST%20Codebase%20Context%20Compressor%20%26%20MCP%20Server)
[![Star on GitHub](https://img.shields.io/badge/Star%20on-GitHub%20%E2%AD%90-f59e0b?style=for-the-badge&logo=github&logoColor=white)](https://github.com/toprakahmetaydogmus/TZeroAlgorithm)

<br>

**T-Zero is 100% Free, Open-Source & Offline Forever.**  
*Built with passion by Toprak Ahmet Aydoğmuş (Siber Akademi) for developers worldwide.*

</div>

---

## Star History

Join the revolution in context engineering and deterministic token pruning!

<div align="center">

<a href="https://star-history.com/#toprakahmetaydogmus/TZeroAlgorithm&Date">
  <img src="https://api.star-history.com/svg?repos=toprakahmetaydogmus/TZeroAlgorithm&type=Date" alt="T-Zero Star History Chart" width="100%" style="max-width: 800px; border-radius: 10px;">
</a>

</div>

---

## License & Siber Akademi

- **Author & Architect:** Toprak Ahmet Aydoğmuş (Lead Software Engineer & Architect, Siber Akademi)
- **LinkedIn:** [Toprak Ahmet Aydoğmuş](https://linkedin.com/in/toprak-ahmet-aydo%C4%9Fmu%C5%9F-60462534b/)
- **Bio & Hub:** [hopp.bio/siberegitim](https://hopp.bio/siberegitim)
- **License:** [GNU AGPL-3.0-only](LICENSE). [Copyright, author attribution, and Section 7 terms](NOTICE).

The [upstream repository](https://github.com/toprakahmetaydogmus/TZeroAlgorithm) records the project's original authorship and release history. When distributing T-Zero code covered by the Section 7 terms, preserve the copyright and author attribution in [NOTICE](NOTICE) and clearly identify modified versions. Section 13 requires operators of modified versions that support remote network interaction to offer their remote users the corresponding source at no charge.

The [last main-branch snapshot before the AGPL transition](https://github.com/toprakahmetaydogmus/TZeroAlgorithm/blob/8972be7b94eac8d5d7e0d5e2047603ed29191768/LICENSE) was published under MIT. The license supplied with each earlier release continues to apply to that release.
