Increase AI development efficiency.
Organizations are buying coding agents and rebuilding the SDLC around them. Developers using those agents get probabilistic results that need reworking, and they pay for every attempt in tokens.
Agents spend most of their tokens on discovery,
not on writing code.
An agent loop runs in four phases: discover, plan, act, and review. Only act writes code, and it gets about a fifth of the budget. Discovery and planning come first, so 75% of the token budget is gone before the agent writes a line. The loop then repeats: every task, every iteration.
Agents need code search that understands symbols,
not just strings.
Coding agents spend most of their time searching. Before an agent writes anything, it greps and globs for names and files, and it keeps looping until it finds them. Every one of those searches costs tokens. Then it reads the files and the binary dependencies and infers what the code actually means.
Trigrep builds its index from the Lossless Semantic Tree, so the agent can query structure, types, symbols, and dependencies instead of guessing at them from text. The index is built once and updated incrementally, so Trigrep answers at close to constant speed whatever the size of the codebase. Grep scales linearly, reading every line every time.
Prethink gives coding agents and organizations semantic
code context.
Prethink is a recipe that pulls data out of the LSTs and writes it back as data tables covering dependencies, APIs, architecture, code quality, and test metrics. It runs deterministically at no token cost, and you can extend it to capture your own internal frameworks and architectural patterns.
Dropped into a repository, it lets an agent query for what it needs instead of rereading files and dependencies to rebuild the same picture every session. As new code lands, the agent gets immediate feedback on code quality and test coverage.
Aggregate that context centrally across every repository and you get a view of the estate that no agent could assemble on its own. An agent working in one repo can pull from it too, reading organization-wide architecture practices, the dependencies already in use, and where each API is called, so it knows how to evolve an application that spans many repositories.
Every Prethink run produces data tables, and every data table can become a chart. This one joins complexity with test gaps across 11 repositories, so a team can see which classes carry the most risk before anyone opens a file.
Recipes
Main entry points
composite recipes
- io.moderne.prethink.UpdatePrethinkContextStarterThe primary starter recipe. Generates Moderne Prethink context files with architectural discovery, test coverage mapping, dependency inventory, and FINOS CALM architecture diagrams.
- org.openrewrite.cobol.prethink.UpdateMainframePrethinkContextMainframe-specific version covering COBOL jobs, programs, DB2 tables, CICS resources, IMS segments, etc.
- org.openrewrite.prethink.UpdatePrethinkContextLower-level recipe that generates the CALM architecture diagram + updates agent config files (expects data tables already populated by other recipes).
Supporting analysis recipes
- io.moderne.prethink.calm.FindCalmRelationshipsDiscovers method-call relationships for interaction diagrams.
- io.moderne.prethink.calm.FindDataAssetsIdentifies JPA entities, MongoDB documents, records, DTOs.
- io.moderne.prethink.ExtractDependencyUsageExtracts which external library types are actually used.
- io.moderne.prethink.ExtractGoDependencies / ExtractRubyDependenciesLanguage-specific dependency inventory.
- io.moderne.prethink.ExtractCodingConventionsNaming patterns, import organization, docs.
- io.moderne.prethink.testing.quality.FindOverlyBroadMocksDetects Mockito stubs using ≥3 any() matchers.
- org.openrewrite.prethink.UpdateGitignoreEnsures .moderne/context/ is committed while ignoring other .moderne/ files.
AI development efficiency in practice
Hand the agent structured context, and the same work finishes in a fraction of the tokens.