Ctxfw is an open‑core, in‑memory Tree‑sitter AST compactor and Model Context Protocol (MCP) gatekeeper designed to cut LLM coding context bloat. It prunes syntax trees polyglotically (Python, TypeScript/JavaScript, Go, Java) by preserving the target file in full, reducing distance‑1 dependencies to signatures and docstrings, and collapsing distance‑2+ dependencies into compact type stubs. Benchmarks claim a reduction in token consumption from 100% to 27.6% (72.4% bloat eliminated). A deterministic axiomatic intake sieve enforces specification rigor (aiming for ACI ≥ 0.9000), rejecting briefs missing negative invariants (N ≥ 5), bounded variable domains, deterministic state machines, or a 4‑class error taxonomy. Operation is local by default with zero telemetry egress.
Core subsystems include a native in‑memory parser and a SQLite WAL high‑concurrency semantic cache (PRAGMA journal_mode=WAL, busy_timeout=5000ms) for sub‑millisecond warm hits. Deployment features include zero‑touch provisioning and IDE/global init commands, repo pre‑commit sentinels to block uncertified commits, and an MCP server. Enterprise controls add team token/dollar circuit breakers, multi‑node reverse‑proxy governance for streaming endpoints, a finops telemetry ledger with tamper‑evident audit trails, and a control plane/enterprise licensing option. Failure cases produce quarantine, execution halts, forensic reports, or verified SHA‑256 seals.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.