Note
No IDE or local setup required. This repository is optimized for fully AI-assisted development using Claude Code. No local toolchain, no IDE, nothing to install — everything works completely through Claude.
srcmorph is a prompt-driven source-tree transformer: it walks a source tree and processes each
file through a configurable local LLM prompt — via llama.cpp
GGUF models, entirely local, no cloud calls — producing layered output: per-file, then per-package,
then per-project. Today it emits structured, AI-readable .ai.md Markdown summaries for fast semantic
code navigation; the same rule-routed pipeline (composable file-matching conditions, per-rule
model + prompt, oversize handling) is generic enough to eventually emit wikis, architecture docs,
diagrams, or even source-to-source transformations.
Migration note. This repository was restructured from a single Maven plugin into a reactor of three artifacts — see "Module overview" below. As part of that migration the Maven plugin was renamed from
net.ladenthin:llamacpp-ai-index-maven-plugintonet.ladenthin:srcmorph-maven-plugin(goal prefixsrcmorph, propertiessrcmorph.*). Existing consumers who still declare the old coordinates are not broken: the old artifactId was published once, at version1.0.4, as a tiny relocation-stub POM (<distributionManagement><relocation>) that redirects Maven to the new coordinates automatically — verified working end-to-end from a clean environment. No consumer action is required, though updating your own POM to the new coordinates directly is recommended. SeeCLAUDE.mdfor the full migration history.
| Module | Artifact | What it is |
|---|---|---|
srcmorph/ |
net.ladenthin:srcmorph |
The core library: a framework-free Java API (no Maven dependency) — the shared SrcMorphConfiguration plus the generate/aggregate-packages/aggregate-project/calibrate engines. Use this to embed srcmorph in your own tooling. |
srcmorph-cli/ |
net.ladenthin:srcmorph-cli |
A standalone CLI driven by one JSON or YAML configuration file (ships as a java -jar-ready fat jar). No Maven project required. |
srcmorph-maven-plugin/ |
net.ladenthin:srcmorph-maven-plugin |
The Maven plugin, a thin wrapper around srcmorph — renamed from net.ladenthin:llamacpp-ai-index-maven-plugin (goal prefix srcmorph, was ai-index; properties srcmorph.*, were aiIndex.*). |
All three modules (plus the reactor parent pom) are released together from this one repository at
the same version. (A fourth, independently-versioned relocation-stub module for the retired
net.ladenthin:llamacpp-ai-index-maven-plugin coordinates was part of this reactor through the
1.1.1 release and has since been removed — its published 1.0.4 artifact remains permanently on
Maven Central regardless; see CLAUDE.md.)
<plugin>
<groupId>net.ladenthin</groupId>
<artifactId>srcmorph-maven-plugin</artifactId>
<version>1.1.1</version>
<configuration>
<generationProvider>mock</generationProvider>
<promptDefinitions>
<promptDefinition>
<key>file-body</key>
<template><![CDATA[Summarize this file:
%s]]></template>
</promptDefinition>
</promptDefinitions>
<fieldGenerations>
<fieldGeneration>
<promptKey>file-body</promptKey>
<aiDefinitionKey>coder</aiDefinitionKey>
<fallback>true</fallback>
</fieldGeneration>
</fieldGenerations>
<aiDefinitions>
<aiDefinition>
<key>coder</key>
<modelPath>/path/to/model.gguf</modelPath>
</aiDefinition>
</aiDefinitions>
</configuration>
</plugin>Run with mvn srcmorph:generate. Full goal/parameter reference, routing rules, GPU acceleration, and
model recommendations: srcmorph-maven-plugin/README.md.
Deprecated: old net.ladenthin:llamacpp-ai-index-maven-plugin coordinates (auto-relocates)
<plugin>
<groupId>net.ladenthin</groupId>
<artifactId>llamacpp-ai-index-maven-plugin</artifactId>
<version>1.0.4</version>
<!-- Maven Central redirects this artifact to net.ladenthin:srcmorph-maven-plugin:1.1.1 via a
published <distributionManagement><relocation> POM. Prefer declaring the new coordinates
above directly in new/updated POMs. -->
</plugin>java -jar srcmorph-cli-<version>-jar-with-dependencies.jar examples/config_All.jsonEvery examples/config_*.json/.yaml file works out of the box with the mock provider (no GGUF
model required) — see examples/ for the full set plus paired run_*.sh/run_*.bat
launcher scripts, and srcmorph-cli/README.md for the config-file
reference.
<dependency>
<groupId>net.ladenthin</groupId>
<artifactId>srcmorph</artifactId>
<version>1.1.1</version>
</dependency>SrcMorphConfiguration config = new SrcMorphConfiguration();
config.setBaseDirectory(new File("."));
// ... set outputDirectory, promptDefinitions, aiDefinitions, fieldGenerations ...
new GenerateEngine(config).execute();See srcmorph/README.md for the full API tour (the four engines, exception
types, and a complete embedding example).
srcmorph runs in three phases, building a navigable index from fine to coarse — see each module's own
README for the full details (routing rules, oversize strategies, exact-count facts, the project
overview) and CLAUDE.md for the architecture.
- File generation — scans configured source directories, writes one
.ai.mdfile per source file (deterministic metadata header + AI-generated Markdown body). - Package aggregation — traverses the generated
.ai.mdfiles, writes onepackage.ai.mdper directory with a deterministic child-link list plus an AI-generated summary. - Project index — harvests the one-line lead from every
package.ai.mdinto a singleproject.ai.mdtable of contents (deterministic; an optional one-call AI overview paragraph can be enabled).
Each phase is independently switchable and incremental (checksums skip unchanged files); a rule-based router lets one run send different files to different models and prompts by extension, size, age, or path.
Snapshots are published to the Central Snapshots repository on every push to main:
https://central.sonatype.com/repository/maven-snapshots/net/ladenthin/
Current reactor version: 1.2.0-SNAPSHOT. Last released version: 1.1.1.
Somewhere in early 2026, the same idea apparently occurred more than once. This repository started with an implementation on March 15, 2026. Andrej Karpathy published his "LLM wiki" gist on April 4, 2026. Google Cloud eventually formalized the very same pattern into the Open Knowledge Format, announced on June 12, 2026.
Apache License 2.0