halley

faultline

A live architecture map that stops agents crossing the boundaries you drew

Area
Agent infrastructure
Language
TypeScript
License
MIT
Latest
v0.5.1
Stars
★ 15
Plate
No. 04 of 14
Fig. 04faultline
Move your pointer over it

What came back

  1. 0 of 6

    forbidden imports shipped by agents using faultline, against 3 of 6 without it.source

  2. 1,225 tokens

    to give an agent the whole architecture of a 967-file repo, instead of about 935,000 to read it.source

  3. 100%

    precision on five real Python and Rust codebases, checked against each language's own toolchain.source

You declare the systems of a codebase once, and every change after that, by you or by a coding agent, shows up on a map that never moves, as a sentence in the pull request, and as a short answer the agent reads before it writes the wrong import. It reads imports in more than a dozen language families and only enforces rules on edges that the language's own rules prove. Agents get four small tools, so the whole architecture of a large repo costs about a thousand tokens instead of a full read of the source.

How it works

  1. 01

    A snapshot comes from a git ref, the staged index or the working tree, and each file is parsed by its language's extractor with results cached by git blob hash.

  2. 02

    Each import is resolved by that language's own rules and tagged exact or inferred; each file is assigned to the most specific system in faultline.yml.

  3. 03

    File edges roll up into module and system edges, two snapshots are diffed, and the result is drawn on the map, written into the PR comment and returned to agents with its token cost.

What it does

  • Live map of systems that redraws as files change, with new edges green and crossed fault lines red
  • Four MCP tools with descriptions under 40 words each, so agents pay about 445 tokens per session for the tool list
  • Pre-commit hook and GitHub Action that fail a change crossing a fault line or loosening faultline.yml
  • Footprint view that shows what an entry point loads at startup and the files to cut to shrink it
  • Reads TypeScript, Python, Go, Rust, the JVM languages, C#, C and C++, Ruby, PHP, Swift, Dart and more