Inspiration

Artemis pull request #13739, merged and reviewed, says it plainly: "the programming module cannot depend on jenkins." Line 4 of the very file it edited imports jenkins. At the merge, and still 793 commits later. Nobody noticed.

That's the problem we wanted to solve. AI now writes a big share of the code: since March 2025, 41.5 % of all changed lines in n8n carry an AI co-author, up from 0 the year before. Every PR gets reviewed on its own, but nobody checks whether the decisions they add up to still hold. Linters don't help either: they hand you 1,462 warnings, and nobody reads 1,462 warnings.

So we asked one question: your codebase changed by 3,202 commits. Did it get better?

What it does

Aletheia takes a repository and two points in its history, and gives three answers you can click down to the exact line:

  • How did it change? On Artemis, imports breaking the team's own module rules went from 201 to 1. But the largest tangle grew from 6 to 11 modules, so the honest verdict is mixed.
  • What deserves attention? 1,462 raw warnings ranked down to 5 Fix-first cards. Each one says fix it or the team must decide.
  • Where is the proof? All 3,551 cited lines are re-checked at today's commit. Nothing is guessed.

Each finding needs at least 2 of 3 witnesses: the team's own rule (ArchUnit tests, docs, build files), a published design principle, and the change cost from git history. It also shows the PR that caused it, what that PR said versus what the code did, a fact-checked AI fix plan, and the known-vulnerable libraries involved. Everything comes out as a single HTML report with a clickable module map, before/after-AI history, and a code view for every finding.

How we built it

  • Static analysis first. Python with tree-sitter parses Java, TypeScript and more into a module graph. networkx finds cycles and tangles, lizard measures complexity, and git history provides co-change and churn.
  • AI only where code can't decide. The rule engine does the heavy lifting. The LLM (Claude) only sees the top 5 findings and their cited lines, and every class name, number and line it cites is checked against the code. Anything it can't back up is thrown out. Judging all of Artemis cost under \$0.04. Compared to pasting the whole repo into the same model:

$$\frac{\text{cost}{\text{whole repo}}}{\text{cost}{\text{top 5}}} \approx 590\times$$

  • Deterministic. We run everything twice and compare (Jaccard similarity of 1.0 on Artemis): same input, same result.
  • Security. OSV.dev, CISA KEV and EPSS for libraries known to be vulnerable or exploited, and which PR brought each one in.
  • Fair AI check. Each AI-assisted commit is compared with a similar commit by the same developer, with bootstrapped confidence intervals. It says "not enough data" when that's the truth.
  • Frontend. Plain JavaScript and Cytoscape.js for the map, plus a small Python server and a password-protected hub that analyzes any git URL.

Challenges

  • Trusting the AI. Our first LLM explanations sounded great and cited lines that didn't exist. We built a citation checker that rejects any claim not backed by the evidence, and the UI shows "No LLM text" rather than a wrong one.
  • Scale. Artemis has 1.9 M lines and Keycloak and n8n are huge too, so we cached git and tool results aggressively to make runs repeatable.
  • Showing 1,000+ modules legibly. We went through several map designs until the Overview showed the largest modules, the lines between them, and the rule breaks without clutter.
  • Monorepos. TypeScript workspaces, barrels and tsconfig paths in n8n needed real resolution, not guesses.

What we learned

  • Ranking matters more than detecting. Five well-proven cards beat five hundred warnings.
  • "Mixed" is a valid answer. An honest verdict builds more trust than a confident wrong one.
  • AI is most useful as a narrator of facts, not as the one who decides them.

What's next

Run it in CI on every PR, so a broken promise gets flagged at merge instead of 793 commits later.

Built With

Share this project:

Updates

Submission history