For AI agents: the complete documentation index is available at https://sanjaiyan-dev.github.io/urai-ecma/llms.txt, the full documentation bundle is available at https://sanjaiyan-dev.github.io/urai-ecma/llms-full.txt, and this page is available as Markdown at https://sanjaiyan-dev.github.io/urai-ecma/guide/introduction.md.
“உரை” (Urai) in classical Tamil translates to reasoned exposition, critical discourse, structural commentary, or analytical narrative.
urai-ecma transforms massive JavaScript, TypeScript, and React codebases into an information-dense, noise-free Markdown prompt engineered specifically for Large Language Model context windows (GPT-4o, Claude 3.5 Sonnet, Gemini 3.1 Pro, and local Llama/Gemma models).
Explore how urai-ecma compresses real-world source trees down to their syntactic essence while preserving interfaces, routing tables, and component lifecycles. Drag the codebase size slider to model your project:
Inspect how urai-ecma executes internally across its 5-stage compiler pipeline. Click between the stages below to see how code is crawled, parsed into SWC nodes, mutated, and cached via Foyer:
#🏛️ The Classical Inspiration: The Art of "உரை எழுதுதல்" (Urai Ezhuthudhal)
In classical Tamil literary heritage, monumental masterworks—such as the Thirukkuṛaḷ (திருக்குறள்), Tolkāppiyam (தொல்காப்பியம்), and Cilappatikāram (சிலப்பதிகாரம்)—encompass vast volumes of dense, poetic, and multi-layered thought. To make these works understandable without sacrificing their architectural depth, classical scholars practiced உரை எழுதுதல் (Urai Ezhuthudhal).
Celebrated Uraiyāsiriyars (master commentators) like Parimelazhagar (பரிமேலழகர்) and Ilampuranar (இளம்பூரணர்) did not simply transcribe or mechanically summarize texts. They performed structural distillation:
Isolating the core semantic axioms of each stanza.
Stripping linguistic ornamentation that could obscure meaning.
Exposing grammar, intent, and relationships for reasoned debate.
The Modern Software Parallel
Today, enterprise JavaScript and TypeScript codebases are the epic literatures of modern software engineering. Spanning hundreds of directories across Next.js, React, Node.js, and Express, they are laden with repetitive utility classes, nested loops, boilerplate type casts, and mechanical handlers.
When feeding these systems to an LLM:
The model does not need raw syntactic exhaustion—it requires the structural anatomy, API contracts, state flows, and component signatures.
urai-ecma acts as the modern Uraiyāsiriyar: reading your codebase via its Abstract Syntax Tree (AST), pruning styling bloat and loop mechanics, and writing a structured, token-dense "உரை" (Prompt Commentary) engineered for AI reasoning.
#⚠️ The Engineering Crisis: The "Infinite Context" Fallacy
Recent advances in Large Language Models introduced 1M+ and 2M+ token context windows. However, treating these windows as unbounded storage introduces four major architectural bottlenecks:
┌─────────────────────────────────────────────────────────────────────────────┐│ THE FOUR BOTTLENECKS OF NAIVE CODEBASE CONTEXT │├──────────────────────────────┬──────────────────────────────────────────────┤│ 1. Attention Head Saturation │ Dense needle-in-a-haystack degradation; key ││ ("Lost-in-the-Middle") │ architectural interfaces drown in loops. │├──────────────────────────────┼──────────────────────────────────────────────┤│ 2. KV-Cache Prefill Latency │ Time-To-First-Token (TTFT) scales with input ││ │ volume; 150k token inputs stall interactive ││ │ developer feedback loops. │├──────────────────────────────┼──────────────────────────────────────────────┤│ 3. Escalating API Economics │ Teams spend thousands of dollars ingesting ││ │ static Tailwind strings and boilerplate code.│├──────────────────────────────┼──────────────────────────────────────────────┤│ 4. Rate-Limit Throttling │ Large prompts trigger TPM (Tokens Per Minute)││ │ exhaustion in automated CI/CD pipelines. │└──────────────────────────────┴──────────────────────────────────────────────┘
#What Actually Comprises an Enterprise Frontend Codebase?
Empirical token breakdown of an average Next.js + React + Tailwind repository:
┌───────────────────────────────────────────────────────────────────────┐│ ANATOMY OF A RAW FRONTEND REPOSITORY (TOKENS) │└───────────────────────────────────────────────────────────────────────┘ [███████████████████████████████████████████████] 58% Tailwind CSS Class Names [████████████████] 22% Imperative Function Bodies & Loops [███████] 12% Type Boilerplate & Import Directives [████] 8% Core Structural Anatomy (State, Props, Routes, Hooks)
Over 80% of total tokens provide zero signal to an LLM reasoning about architecture.
Tools like repomix, gitingest, or code2prompt act as simple file concatenators. They blindly wrap raw files in XML tags, forcing models to parse thousands of characters of static styling strings ("flex items-center justify-between p-6 bg-white dark:bg-zinc-900...").
#⚡ The Compiler Difference: Synthesis vs. Concatenation
urai-ecma is an AST-aware compiler engine written in Rust, powered by ByteDance/Vercel's swc_ecma suite. Rather than treating code as raw strings, it parses JavaScript and TypeScript into concrete syntax trees and applies deterministic, semantic transformations.
Traditional approaches present a false choice: either include complete function bodies (wasting tokens) or strip bodies completely down to empty signatures (which removes crucial React hooks, event listeners, and JSX hierarchies).
urai-ecma solves this through structural stubbing:
Static styling strings are pruned while dynamic expressions remain untouched:
Preserves dynamic code: Functions using clsx(...), cva(...), or conditional ternaries (isActive ? "text-cyan-400" : "text-zinc-500") are retained.
Prunes static strings: Long static utility classes exceeding the configurable threshold (default: 96 characters) are cleanly stripped or summarized into short UI descriptors.
Token count drops from 412 tokens down to 78 tokens (-81.06% reduction). Dynamic styling, typed props, state variables, and hook lifecycles remain completely intact.