Ridge

by olgasafonova

Not rated yet

About

Reverse-engineer architecture from source code (Go, TypeScript, Python) or markdown. 19 tools for architecture graphs, drift detection between git refs, and validation rules.

Explore

skills/ridge/SKILL.mdteaches an agent which of the 19 ridge tools to call for a given question (blast radius vs scan vs drift vs validate). Drop it into your Claude Code skills directory once and the model stops guessing.

The skill is plain markdown with a tool-decision matrix and worked examples. Read it directly if you want the same map in your head.

All scan tools accept optional parameters for handling large codebases:

Partial results include atruncated: trueflag so you know the graph is incomplete. Sequential tool calls on the same path are cached for 30 seconds.

Repeat scans on the same codebase are fast. The server tracks file modification times and content hashes in~/.mcp-context/ridge/. On subsequent scans, only files that actually changed get re-analyzed; unchanged files reuse cached analysis results.

The stats in the response show what happened:

- files_analyzed— total files in the codebase
- files_cached— files skipped (unchanged since last scan)
- files_changed— files re-analyzed (new, modified, or deleted)

First scan of a 500-file project takes a few seconds. Follow-up scans after editing 3 files take milliseconds.

Restricting scan roots (RIDGE_ALLOWED_DIRS)

Every scan tool returns short, masked source samples from whatever directory it is pointed at. By default ridge will scan any readable directory except a built-in denylist of sensitive locations (/etc,/proc,/sys,/dev, and home dotfiles like.ssh,.gnupg,.aws,.config/gcloud). That denylist is a floor, not an allowlist: it blocks known-sensitive paths but still permits scanning anywhere else.

To flip this to opt-in, setRIDGE_ALLOWED_DIRSto a colon-separated list of absolute directory paths (PATH-style). When set, ridge refuses any scan whose target resolves to a location outside those directories:

{ "mcpServers": { "ridge": { "command": "/path/to/ridge", "args": [], "env": { "RIDGE_ALLOWED_DIRS": "/home/you/Projects:/home/you/work/repos" } } } }

- Symlink-resolved containment.Both the scan target and the allowlisted directories are resolved withfilepath.EvalSymlinksbefore the containment check, so a symlink placed at or under an allowlisted directory cannot redirect a scan to an outside target.
- Fail closed when misconfigured.IfRIDGE_ALLOWED_DIRSis set but none of its entries resolve to a real directory, every scan is refused rather than reverting to permit-all.
- Startup notice.On launch, ridge logs whether the allowlist is active (with the resolved directories) or unset. An unset allowlist logs a one-line warning so the permissive default is visible in the server logs.

TheRIDGE_ALLOW_INREPO_RULESvariable is separate: it opts into loading a repo's own.arch-rules.yaml, which is otherwise ignored to prevent a scanned repo from downgrading its own architecture-rule violations.

make check # fmt-check + vet + tests (with race detector) make build # Build binary make test # Tests only
go test -tags integration -race -v ./tests/
cmd/ridge/ Entry point (stdio MCP transport) internal/ model/ ArchGraph, Node, Edge, Diff types scanner/ File walker, incremental change detection, analyzer orchestration analyzer/golang/ Go static analysis (go/ast) analyzer/typescript/ TypeScript analysis (tree-sitter) analyzer/python/ Python analysis (tree-sitter) analyzer/markdown/ Markdown link extraction (wiki-links, relative .md links) detector/ Boundary detection, topology, validation, metrics, recommendations, process traces drift/ Snapshot comparison, git ref diffing, history render/ Mermaid, PlantUML, C4, Structurizr, JSON, draw.io, Excalidraw, HTML, forcegraph infra/ Cache, persistent state (~/.mcp-context/) tools/ MCP tool definitions and handlers

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Local stdio MCP server that lets AI coding agents read and maintain structured architecture, rules, and decisions directly from your repository.

Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning with Cycode.

Enable AI agents to secure code with Semgrep.

Provides seamless integration with SonarQube Server or Cloud, and enables analysis of code snippets directly within the agent context

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.