MCPcopy Index your code
hub / github.com/erode-app/erode

github.com/erode-app/erode @0.9.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.9.5 ↗ · + Follow
600 symbols 1,522 edges 161 files 38 documented · 6%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

erode

Architecture erosion detection for GitHub PRs, GitLab MRs, Bitbucket PRs, and local changes using LikeC4 or Structurizr models and AI.

Compares pull request diffs or local git diffs against a LikeC4 or Structurizr architecture model to surface undeclared dependencies and structural changes. Works as a CLI tool and a GitHub Action. Use erode analyze for PR review and erode check for pre-push local detection. Supports GitHub pull requests, GitLab merge requests (experimental), and Bitbucket pull requests (experimental).

Supported AI providers: Gemini (default), OpenAI, and Anthropic (experimental).

New here? Start with Why it matters to understand the problem erode solves.

Erode demo

Why

Your architecture already exists in the code. Erode makes it visible during code review, showing not just the code diff but the architectural diff, so teams can have the conversation while the change is still small. A finding is not necessarily a problem. What matters is that the change is conscious and documented.

Read the full case for why this matters.

Quick start

Add erode to your GitHub Actions workflow:

name: Architecture Drift Review
on: [pull_request]

jobs:
  erode:
    runs-on: ubuntu-latest
    steps:
      - uses: erode-app/erode@0
        with:
          model-repo: 'org/architecture-model'
          ai-provider: gemini
          github-token: ${{ secrets.GITHUB_TOKEN }}
          gemini-api-key: ${{ secrets.GEMINI_API_KEY }}

See the GitHub Actions guide for inputs, outputs, and advanced examples.

Documentation

Full documentation at erode.dev.

Development

Requires Node.js >= 24.0.0.

npm install
npm run build          # Build core package (TypeScript + prompt templates)
npm run test           # Run all tests (vitest)
npm run lint           # ESLint (zero warnings allowed)
npm run format         # Prettier format (all packages)
npm run dev:web        # Start Astro dev server

Releasing

Release Please automates releases. It runs on every push to main, reads conventional commit messages, and maintains a release PR with the changelog.

Merge the release PR to create a GitHub release, tag, and Docker image.

Version bumps

The commit type determines the version bump:

Commit Bump Example
fix: ... Patch 0.1.1 → 0.1.2
feat: ... Minor 0.1.1 → 0.2.0
feat!: ... or BREAKING CHANGE: footer Major 0.1.1 → 1.0.0

To force a major bump, add ! after the commit type or include a BREAKING CHANGE: footer:

feat!: remove deprecated config options

BREAKING CHANGE: ERODE_MODEL_PATH no longer accepts relative paths.

Either the ! or the footer is enough on its own.

What counts toward a release

Only commits that touch packages/core/ or packages/cli/ trigger version bumps. Commits scoped to packages/web/, packages/architecture/, or packages/eslint-config/ are excluded and will not appear in the changelog.

License

Apache 2.0

Extension points exported contracts — how you extend this code

SourcePlatformReader (Interface)
(no doc) [6 implementers]
packages/core/src/platforms/source-platform.ts
RetryOptions (Interface)
(no doc)
packages/cli/src/utils/error-handler.ts
SkillEntry (Interface)
(no doc)
packages/web/scripts/generate-agent-skills.ts
SourcePlatformWriter (Interface)
(no doc) [6 implementers]
packages/core/src/platforms/source-platform.ts
TableColumn (Interface)
(no doc)
packages/cli/src/utils/cli-helpers.ts
SkillIndex (Interface)
(no doc)
packages/web/scripts/generate-agent-skills.ts
ProgressReporter (Interface)
(no doc) [4 implementers]
packages/core/src/pipelines/progress.ts
ArchitectureModelAdapter (Interface)
(no doc) [3 implementers]
packages/core/src/adapters/architecture-adapter.ts

Core symbols most depended-on inside this repo

fail
called by 39
packages/core/src/pipelines/progress.ts
patch
called by 34
packages/core/src/adapters/model-patcher.ts
validate
called by 33
packages/core/src/utils/validation.ts
selectComponent
called by 30
packages/core/src/providers/ai-provider.ts
parseChangeRequestUrl
called by 25
packages/core/src/platforms/source-platform.ts
succeed
called by 23
packages/core/src/pipelines/progress.ts
notLoaded
called by 22
packages/core/src/errors.ts
normalizeRepositoryUrl
called by 22
packages/core/src/adapters/url-utils.ts

Shape

Function 262
Method 179
Interface 89
Class 68
Enum 2

Languages

TypeScript100%

Modules by API surface

packages/core/src/adapters/structurizr/adapter.ts28 symbols
packages/core/src/errors.ts24 symbols
packages/core/src/adapters/likec4/adapter.ts22 symbols
packages/core/src/platforms/source-platform.ts20 symbols
packages/core/src/utils/git-diff.ts16 symbols
packages/core/src/utils/model-source.ts15 symbols
packages/core/src/pipelines/progress.ts15 symbols
packages/cli/src/utils/cli-helpers.ts15 symbols
packages/core/src/adapters/architecture-adapter.ts14 symbols
packages/core/src/utils/config.ts12 symbols
packages/core/src/providers/base-provider.ts12 symbols
packages/core/src/providers/gemini/provider.ts11 symbols

For agents

$ claude mcp add erode \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact