Teixido-Code-Manifold (TIG) v3.4
Stop sending your entire codebase to Claude. It's causing structural hallucinations and burning your usage limit.
TIG is a Teixido Inhibition Gate for codebases. It intercepts LLM context requests, analyzes your Abstract Syntax Tree, and applies Topological Analytical Homeostasis (TAH) to compress your project down to its "Teixido Skeleton" — the 3-5% of functions that hold the actual structural load of your application.
The result: 80-95% fewer tokens sent to Claude per session, which directly stretches your Claude Code usage limit by the same factor.
Why TIG Beats Basic Codebase Indexers
Standard tools (like codeindex) map everything with regex and give you a "blast score" — still drowning the AI in noise.
TIG applies Weighted Topological Strain to mathematically isolate the Domination Roots:
strain(f) = log1p((in_degree × 0.6 + normalized_complexity × 0.4) × 100)
Then applies Adaptive TIG Gate (Topological Inhibitory Gating) using dynamic thresholding:
threshold = mean(strain) + ε × std_dev(strain)
Only nodes above this threshold are fed to Claude. Everything else is structural noise.
| Metric | codeindex | TIG |
|---|---|---|
| Parsing | Regex | Python AST + robust regex |
| Algorithm | Raw BFS count | Weighted topological strain |
| Context compression | ❌ No | ✅ 80-95% |
| MCP server | ✅ | ✅ |
| PyPI | ❌ | ✅ |
| Tests | ❌ | ✅ CI on every push |
| Languages | 12 (regex only) | 13+ (AST for Python) |
Installation
pip install teixido-code-manifold
Or from source:
git clone https://github.com/johnvteixido/TIG.git
cd TIG
pip install -e ".[dev]"
Usage
CLI
# Analyze a single file
teixido-extract --file src/main.py
# Analyze a whole project
teixido-extract --dir ./my-project
# Output raw JSON
teixido-extract --file app.py --json
# Adjust TIG sensitivity (higher = fewer roots)
teixido-extract --dir . --epsilon 1.5
Python API
from core.manifold import TeixidoEngine
# Analyze source code string
result = TeixidoEngine.analyze(source_code, language="python")
print(result["domination_roots"]) # ['main', 'process_data', 'connect_sql']
print(result["compression_ratio"]) # 87.5 (%)
print(result["token_savings"]) # {'token_savings_pct': 91.2, ...}
# Analyze a whole directory
result = TeixidoEngine.analyze_directory("./my-project")
print(result["files_analyzed"]) # 47
print(result["domination_roots"]) # top load-bearing functions across all files
FastAPI (Vercel)
teixido-serve # starts on http://localhost:8000
# or deploy to Vercel: link this repo, vercel.json handles routing
Endpoints:
GET /— Health checkGET /api/info— Capabilities + supported languagesPOST /api/extract— Analyze source code stringPOST /api/compress— Analyze a local directory
🤖 Claude Code MCP Integration
This is the killer feature. Add TIG as a native MCP server so Claude Code can call it directly during every session — automatically compressing context before Claude reads your code.
Step 1: Install TIG
pip install teixido-code-manifold
Step 2: Add to Claude Code MCP config
Edit ~/.claude/claude_desktop_config.json (or equivalent):
{
"mcpServers": {
"teixido": {
"command": "teixido-mcp",
"args": []
}
}
}
Step 3: Use in Claude Code
Once configured, Claude Code has access to three tools:
| Tool | What it does |
|---|---|
extract_manifold |
Analyze a source code string → Domination Roots |
compress_codebase |
Analyze your whole project → architectural skeleton |
get_token_savings |
Show exactly how many tokens + % you're saving |
store_memory (Pro) |
Save a durable fact/decision to project-scoped long-term memory |
search_memory (Pro) |
Recall stored facts across sessions (survives context compaction) |
delete_memory (Pro) |
Prune outdated memories by id |
Example Claude Code prompt:
"Before we start, run
compress_codebaseon./srcand tell me the Domination Roots."
Claude will call TIG, get back the 3-5 structurally critical functions, and work only from those — using a fraction of your hourly token budget.
Token Savings & Usage Limit Impact
| Source Size | Without TIG | With TIG | Savings |
|---|---|---|---|
| 500-line file | ~2,000 tokens | ~80 tokens | 96% |
| 2,000-line file | ~8,000 tokens | ~120 tokens | 98.5% |
| 50-file project | ~80,000 tokens | ~1,000 tokens | 98.75% |
If Claude Code limits you to, say, 50,000 tokens/hour — with TIG, that same budget covers the equivalent of 1,000,000+ tokens of raw codebase, effectively making the hourly limit invisible for normal development workflows.
Supported Languages
| Language | Parsing Method |
|---|---|
| Python | ✅ stdlib ast (full AST, exact line numbers) |
| JavaScript | Robust multi-pattern regex |
| TypeScript | Robust multi-pattern regex + /// references |
| Go | Multi-line import block regex |
| Rust | use, mod, extern crate patterns |
| Java | import statement regex |
| Kotlin | import statement regex |
| Swift | import statement regex |
| C / C++ | #include directive regex |
| PHP | require, use, namespace regex |
| Ruby | require, require_relative regex |
| C# | using directive regex |
Architecture
teixido-code-manifold/
├── core/
│ ├── languages.py # Multi-language parser (AST + regex)
│ ├── manifold.py # Weighted Topological Strain engine
│ └── mcp_server.py # MCP stdio server (Claude Code integration)
├── api/
│ └── index.py # FastAPI serverless entry point (Vercel)
├── cli.py # Console entry points
├── tests/ # pytest suite
├── pyproject.toml # PyPI packaging config
└── vercel.json # Vercel deployment config
License
Proprietary Software - All Rights Reserved.
Architect & Creator: John V. Teixido © 2026 tigcode.app Unauthorized copying, reverse-engineering, distribution, or commercial use of this file or any part of the TIG codebase (including the client engine and the server nodes) is strictly prohibited.
Metadata
Release files for teixido-code-manifold 3.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| teixido_code_manifold-3.4.2.tar.gz | 58.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| teixido_code_manifold-3.4.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 110.2 kB
Release files / teixido_code_manifold-3.4.2.tar.gz
| Download URL | teixido_code_manifold-3.4.2.tar.gz |
|---|---|
| Size | 58.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d43fb85a35058176d78a682a7c0574e776207eba857da930c03b811e06ccea1c
|
|
BLAKE2b-256 checksum How to use checksums |
8cbe13eb90be2d3242a8483479abd14d33eed65859c7b82f0906033adaf06722
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / teixido_code_manifold-3.4.2-py3-none-any.whl
| Download URL | teixido_code_manifold-3.4.2-py3-none-any.whl |
|---|---|
| Size | 52.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
654063e583ef06808bc32d4b22fbf4ee5d5bc070c3e0bcb63d9f485abf1eceff
|
|
BLAKE2b-256 checksum How to use checksums |
7ad5f15f1495296be89a948df3e4b74f2cd0c2a7c8c43b958f9df99913fd7c45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|