The Moderne Technology Stack
Four primitives do the heavy lifting: a compiler-accurate code model, deterministic recipes, precomputed semantic context, and sub-second search. Built for the largest enterprise codebases and the coding agents working in them.
The Four Primitives
A compiler-accurate, format-preserving model of your code. Full type attribution, resolved dependencies, and comments preserved across languages and repositories.
Deterministic programs that traverse the LST to search, analyze, and transform code. Thousands of open-source recipes in OpenRewrite, extensible with your own.
Precomputed semantic context built from LSTs. Resolved architecture, dependencies, and conventions that agents read directly instead of re-deriving on every prompt.
Sub-second trigram-indexed search over text and LST. CPU-powered reconnaissance so agents stop burning tokens and GPU cycles on grep-style exploration.
The LST is a compiler-accurate representation of your codebase. It captures full type attribution, symbol resolution, dependencies, and generics, while preserving every comment, whitespace, and formatting detail so diffs read like hand-written code.
Deep code understanding. Everything the compiler knows: types, symbols, generics, inheritance, transitive dependencies, all resolved and queryable.
Format fidelity. Indentation, comments, and style preserved so automated diffs are clean, reviewable, and trusted.
Multi-repo scale. LSTs are generated once, serialized to disk, and reused, so the same recipe runs across thousands of repositories in parallel.
Recipes are programs that traverse the LST to search, analyze, and transform code. They are deterministic: the same recipe run against the same code produces the same result every time. That property is what makes safe, portfolio-wide automation possible.
Thousands of open-source recipes, plus Moderne's proprietary catalog. OpenRewrite community recipes cover migrations, security fixes, code quality, framework upgrades, and dependency management. Moderne adds proprietary recipes for enterprise-grade migrations, security remediation, and Prethink context generation.
Composable and extensible. Recipes chain together into larger workflows. Teams write their own for internal conventions, custom migrations, and org-specific standards.
Safe by design. Operating on the LST rather than raw text means transformations respect types, scope, and style. No regex fragility, no broken builds.
Coding agents waste tokens reconstructing system understanding on every prompt. Prethink runs that work once, deterministically, against the LST, and writes the result where agents can read it directly: structured models of architecture, dependencies, call graphs, and service boundaries, available as resolved facts.
Not RAG, not embeddings, not prompts. Deterministic analysis of semantic code models produces compiler-accurate, reusable context, with guarantees that retrieval and vector approaches can't offer.
Built from LSTs, run as recipes. Prethink inherits the accuracy of the LST and the composability of recipes. Teams customize what gets precomputed for their agents.
Outputs agents can read. Markdown, CSV, and CALM artifacts written to your repo or a context registry. Refreshable via CI, on a schedule, or after major refactors.

Agents constantly search code to orient themselves, and every grep burns tokens, compute, and latency. Trigrep replaces repeated file scanning with a persistent trigram index built from text and the LST, shifting the cost of reconnaissance from GPU tokens to CPU-powered lookup.
Sub-second, at any scale. Searching a billion lines of code takes roughly the same time as searching thousands. Trigrep is 13.5× faster than ripgrep on average in Moderne's testing.
Symbol-aware, not just text. Indexes built from the LST carry type and structural context, so agents can combine text discovery with semantic filters and skip the expensive follow-up reads that text-only grep forces.
A prefilter for automation. Search first to narrow scope, then run recipes only where matches exist. A search hit in 47 of 10,000 repos means the recipe runs on 47 (a 99.5% reduction in compute).
Scoped to organizational structure. Searches align with how enterprise teams actually work: by business unit, portfolio, or initiative, so results are immediately actionable, not noise.
The four primitives power three consumer surfaces: Moderne's own chatbot inside the SaaS platform, a hosted MCP server that connects external coding agents to your full code estate, and a local MCP server that grounds external agents in the repository on a developer's machine.

How it fits together
Each primitive does one job well. Together they give agents and developers a complete loop for portfolio-scale software evolution: fast reconnaissance, resolved context, and deterministic change.
Locate the repositories, patterns, and code that matter, across the entire portfolio, in sub-second time.
Reason from resolved structure: types, dependencies, and architecture, instead of inferring from raw files.
Apply deterministic, format-preserving changes across thousands of repositories with coordinated rollout.

PUT THE STACK TO WORK
From one-repo experimentation to multi-repo execution: precise targeting, deterministic change, and resolved context, anchored to the LST.
Moderne does not replace coding agents. Moderne builds the deterministic tools coding agents call to operate accurately at enterprise scale, including Trigrep for search, Prethink for context, and OpenRewrite recipes for execution. A Cursor, Copilot, Claude Code, or Devin user gets faster, more accurate, and dramatically more token-efficient agent work when those tools are available via MCP.
No. RAG retrieves text chunks from documents and hands them to an agent as raw context. Prethink generates structured, compiler-accurate knowledge directly from the Lossless Semantic Tree, capturing resolved types, dependencies, service boundaries, and architectural relationships that text retrieval cannot produce. Agents reason against precomputed facts rather than reconstructing the same context on every call.
Grep and ripgrep were built for a developer at a single terminal. Sourcegraph was built for a developer browsing a codebase in a UI. Trigrep is built for coding agents operating across thousands of repositories: it uses Zoekt-compatible trigram indexing generated from the LST, returning sub-second results that are symbol-aware rather than string-matched. On internal benchmarks it runs 13.5x faster than ripgrep on average, with the precision agents need to avoid wasted tool calls.
No. Moderne supports you wherever you are. Teams in the Modernize phase use the recipe catalog to upgrade frameworks and clean up the legacy fragmentation that makes agents unreliable. Teams already running agents use Prethink, Trigrep, and MCP to make those agents faster and more token-efficient on the codebase they have today.
Yes. OpenRewrite is open source, Apache-licensed, and the recipe catalog is publicly available. The Moderne Platform adds the orchestration, ingestion, and multi-repo execution layer that runs recipes across thousands of repositories under organization-wide governance, along with the proprietary recipes that are not in the open-source catalog.
Through the Model Context Protocol. Moderne exposes Trigrep, Prethink outputs, and the recipe catalog as MCP tools that any agent speaking the protocol can invoke directly, including Claude Code, Cursor, and GitHub Copilot. Agents call these tools the same way they would call any other tool, with no custom integration work required.
Three reasons. Single agents cannot maintain ten thousand repositories at once, so enterprise codebases require systems of specialized agents rather than a single agent operating in isolation. Nondeterministic agent output compounds at scale: a 95% accurate transformation across ten repos is reviewable, but the same accuracy across ten thousand becomes thousands of hallucinated changes to catch. And agents burn tokens rebuilding context on every call, exhausting AI budgets within months at enterprise scale. Moderne provides the deterministic tools that close each of those gaps.