Inspiration

CHECK24 asked a simple question: is the project better than before? AI tools now write a growing share of code, and nobody reviews every line. What a team still owns is its architecture: the decisions about which part of the code may use which. We wanted a tool that guards those decisions, and that a CTO and a developer can both trust because every claim can be checked.

What it does

CodeXray reads a Git repository at 14 dates, January 2024 to November 2026, and answers one question: are the architecture decisions being kept, and where are they not?

  • Decisions first. The rules come from the project itself: its architecture tests and import bans, its decision documents and agent rule files, and habits the code measurably follows (at least 50 links between two folder roles, at least 95% in one direction).
  • A short list to fix first. Artemis has 219 findings; the report opens on the top 10, ranked by plain arithmetic:

$$\text{priority} = \text{authority} \times (0.4\,\text{breach} + 0.4\,\text{reach} + 0.2\,\text{change pressure}) \times \text{ease}$$

  • One click to the evidence. Every finding opens its cell in the module grid and the exact lines at the pinned commit. All 587 findings across the three repositories carry commit, file and line evidence: 7,977 records.
  • Try the fix. A proposed fix is replayed on a copy of the dependency graph. On Artemis, 8 cheap-loop fixes take module loops from 304 to 285 with no new exceptions.
  • Stable results. A second run produces identical output. With 5% of commits removed at random, the top 5 stays the same on all three repositories.
  • Before and after March 2025. Every structural change is labelled planned or no stated intent. In Artemis, links between modules rose 16.2% from April to July 2026; measured on the old module map, the same code rose 4.4%. The pull requests show a planned split.
  • A check for CI. codexray check base..head lists the decisions a change breaks, with file and line.

How we built it

Seven stages, as in the brief. Only stage 6 calls a model.

  1. Repository: mine the history, pin the commit, take 14 snapshots, credit each line to the change that last touched it.
  2. Parse: one language-neutral reader on tree-sitter. Each unique file content is read once. Adding a language is a line in a settings file, and a test fails the build if a language or project name appears in engine code.
  3. Model: modules, links and folder roles per snapshot, stored in DuckDB.
  4. Visualize: a static React app: decisions, module grid, close-up, code pane, before and after. It never calls a model.
  5. Analyze: decision checks, seven finding types, drift, and the "same code, old layout" comparison.
  6. LLM judge: three narrow jobs. Turn a written decision into a checkable rule (a person reviews it), judge one exception (three votes), describe a module in two sentences.
  7. Explain: arithmetic ranking, findings.json and the web bundle.

Every stored fact has an evidence record, every row is keyed by repository and snapshot, and output is sorted before it is written, so a second run writes the same bytes.

Repository Languages Lines traced Whole run AI calls Tokens in / out Cost
ls1intum/Artemis Java, TypeScript 1,029,656 4.7 min 225 964,678 / 94,474 $3.48
shopware/shopware PHP, JavaScript, TypeScript 1,250,015 9.2 min 393 3,456,129 / 73,644 $4.81
Graylog2/graylog2-server Java, TypeScript 871,569 4.7 min 6 39,242 / 1,454 $0.19

The report is complete with zero AI calls. AI adds the judgment text, the rules read from written documents, and the module descriptions.

Challenges we ran into

  • Links without a compiler. One method for every language means we resolve imports ourselves. We report agreement with separate comparison linkers instead of claiming compiler accuracy. Links made at runtime (HTTP calls, dependency injection, reflection) stay invisible, and every report says so.
  • Decay or plan? A raw before/after comparison punishes healthy refactoring. Re-measuring the new code on the old module map separates reorganisation from real drift.
  • Determinism. Same input, same output took discipline: pinned commits, sorted output, no timestamps or absolute paths, cached AI answers.
  • Keeping AI honest. Code checks every answer before it is shown: each number must match a fact and each code name must appear in the facts or the cited lines. Otherwise the plain computed sentence is shown.
  • Following files across renames and large restructurings over 14 snapshots.

What we learned

  • The best yardstick for a codebase is its own rules, and teams already write them down in tests, import bans and agent rule files.
  • Drift isn't automatically bad: the biggest jump in Artemis was a planned split.
  • AI works best in a small role: reading and writing prose on top of facts. Finding, counting and ranking belong to ordinary code.
  • Stating limits builds trust. We report what was read and what was skipped, and we label code without an explicit AI marker "no AI signal".

What's next

  • Winning the Hackathon

Built With

  • check24-llm-gateway
  • claude-haiku-(module-descriptions)
  • claude-opus-(judging-and-reading-rules)
  • cytoscape.js
  • d3.js
  • duckdb
  • elkjs
  • git
  • networkx
  • pydantic
  • python
  • pyyaml
  • react
  • shiki
  • tree-sitter
  • typer
  • typescript
  • uv
  • vite
  • vitest
Share this project:

Updates

Submission history