Architecture guardrails for AI-written code: dependency graph, impact, dead code, CI gate
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
CLI-first architecture intelligence: understand your codebase, then hold it to the rules you set.
Ovecc reads your repo once and builds a deterministic, offline model of it,
then answers the hard questions: what breaks if I change this, where are the
cycles, what's coupled, dead, or insecure. And it lets you write your
architecture down as a contract, so the build fails when the code drifts.
It runs locally, stays fully deterministic, and never puts an LLM in the loop.
Ovecc reads your repository once and builds a deterministic, persistent model of it: every file, import, symbol, and call. From that single index it answers the questions you actually ask about a codebase:
impact)query, summary)dupes, deadcode, health)security, audit)hotspots)It runs on your machine, gives byte-identical answers every run, and never treats an LLM as the source of truth: it's an architecture database with deterministic commands, usable from the CLI, in CI, or by a coding agent over MCP.
React's dependency graph, rendered by ovecc export graph --html into a single file you can open directly, no server or CDN needed.
Measured performance and answer accuracy on real repositories are in docs/benchmark/BENCHMARKS.md.
Most tools stop at reading the code. Ovecc goes one step further: you write down which parts of your codebase are allowed to depend on which, in one small file, and every build checks the real code against it.
Here's one for a small app:
Run the check and every breach comes back with a file and a line:
Four kinds of decay caught in one run: a layer reaching where it shouldn't, a
feature tangling into its neighbor, a network call inside code you promised was
pure, and a function creeping past the budget you set. Put ovecc architecture check in CI and the pull request fails on the drift, instead of a reviewer
noticing three months later, or nobody noticing at all.
Don't have one yet? ovecc architecture suggest recognizes the architecture
you already follow (Feature-Sliced, bulletproof-react, Clean/Hexagonal, an Nx
workspace) and writes the file bound to your real folders. Or ovecc architecture init drafts it from your actual import graph, so day one starts
green and you tighten from there. The details are in the contract reference
below.
npm pulls only the binary for your platform. npm i -g ovecc keeps it on your
PATH.
Prebuilt binaries are also on the latest release: Linux
x86_64 and aarch64, Windows x86_64, macOS arm64. There is nothing else to
install: DuckDB is bundled, there is no runtime, and it works fully offline. A
rolling dev build ships on every push to main.
The macOS binary is unsigned, so Gatekeeper quarantines it when a browser downloads it. Clear the flag once and it runs:
curl and npm don't set that flag, so npx ovecc never runs into it.
Builds with stable Rust (on Windows use the windows-gnu toolchain; DuckDB is
compiled from source on the first build). The step-by-step Windows setup is in
docs/dev/SETUP.md.
The binary is ovecc (crates/ovecc-cli).
Every command renders as text, json, ndjson, or markdown via --format
(plus sarif for GitHub code scanning and codeclimate for GitLab Code Quality)
and returns stable exit codes for CI. The full per-command reference, with real
output, is in docs/COMMANDS.md. For pull requests, the repo
ships a drop-in GitHub Action that indexes base and head, comments
the review findings on the PR, and gates on severity.
.ovecc/architecture.toml is your intended architecture as code. Each component
claims files by path glob; depends_on is the allow-list of what it may import.
ovecc architecture init writes the first draft from the graph you already have,
so every entry mirrors a real import and day one has zero violations. Prefer a
known shape? init --template fsd (or bulletproof-react, nx-workspace,
clean-architecture) drops in a reference architecture, and the diff against your
code becomes your migration plan.
From then on, each run compares code to contract and names what it finds:
Three more checks read past the import graph (JS/TS):
slices = true isolates a component's sub-folders from each other, the rule
behind Feature-Sliced Design and bulletproof-react, with FSD's @x public-API
escape hatch honored.deny_capabilities forbids a component the ambient powers that break purity:
network, filesystem, storage, dom, process, time, random. A
Date.now() in a pure domain comes back with its file and line.max_cyclomatic / max_cognitive put a per-function complexity budget in the
contract, so "keep the core simple" becomes a rule the build can check.Interfaces are virtual: you list a component's public entry files and ovecc enforces them on the real imports, so you get encapsulation without barrel files or an extra re-export layer.
Adoption is meant to be gradual. check --freeze records today's violations in a
per-component baseline (one line each, so branches merge cleanly), gates only new
ones from then on, and drops entries as you fix them so the count never climbs.
Agents can read the contract before editing, through ovecc architecture show <path> or the ovecc_architecture MCP tool.
Simpler, language-neutral policy lives in .ovecc/config.toml, is enforced at
index time, and shows up in violations (and the gate CI check):
Silence a single finding inline with // ovecc-ignore (or
// ovecc-ignore-next-line, and # ovecc-ignore in Python) on the offending
line; it is dropped at index time.
Every command is built to run in a pipeline: pick a format with --format, rely
on stable exit codes (0 clean, 1 a --fail-on threshold crossed, 2 and up
a real error), and emit sarif or codeclimate for GitHub and GitLab. The
drop-in GitHub Action wires review into pull requests.
The same analysis is available to coding agents over the Model Context Protocol.
ovecc mcp runs an MCP server over stdio that exposes each command as a tool
(ovecc_summary, ovecc_impact, ovecc_architecture, ...), so an agent can ask
"is this export used?", "what is the blast radius of BillingService?", or "does
this PR break the architecture contract?" and get the same deterministic answer.
Register it with any MCP client:
With the binary already on PATH, "command": "ovecc" and "args": ["mcp"] start it
without the npm lookup.
Start with ovecc capabilities --format json: it returns every command, the
metrics and rules they emit (each with a definition), the severity vocabulary,
and the exit-code contract, enough to drive an audit without reading these docs.
Every command's JSON is a stable, self-describing envelope, normalized to
repo-relative POSIX paths and byte-identical across runs. The full walkthrough is
in docs/dev/MCP.md.
The JavaScript and TypeScript family is parsed with tree-sitter and enriched by
the pure-Rust oxc stack: real tsconfig path and exports resolution
(oxc_resolver), plus per-function complexity and exports
(oxc_parser/oxc_semantic). One tree-sitter adapter covers Python, Go, Rust,
and C++. They all feed the same language-agnostic model, so resolution, the call
graph, taint, and the rules work across every supported language. Adding a
language is a new extractor behind the parser boundary, not a core change.
Ten library crates and one binary, each documented in its own README.md (plus
xtask, the std-only task runner behind cargo xtask):
| Crate | Responsibility |
|---|---|
ovecc-core | Data model, typed ids, config, error type, trait contracts |
ovecc-parser | Tree-sitter adapters and security pattern detection |
ovecc-indexer | Indexing pipeline: discover, parse, resolve, analyze, persist |
ovecc-db | DuckDB persistence, migrations, differential sync |
ovecc-git | Native Git history, churn, ownership (via gix) |
ovecc-graph | Blast radius, hotspots, cycles, conventions |
ovecc-rules | Rule evaluation and security classification |
ovecc-dataflow | Source-to-sink taint reachability |
ovecc-audit | Offline OSV dependency audit |
ovecc-ai | Optional deterministic, offline explanation |
ovecc-cli | Command-line interface |
Apache-2.0; see LICENSE. Portions are adapted from fallow (MIT); third-party attributions are in THIRD-PARTY-NOTICES.md.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/ovecc)<a href="https://allmcps.com/mcp/ovecc"><img src="https://allmcps.com/api/badge/ovecc?style=directory" alt="Ovecc on AllMCPs" /></a>