Erode - Architecture Drift Detection for Code Changes
Your software architecture is eroding.
Now you'll know where.
Erode analyzes code changes against your architecture model using AI, making undeclared dependencies and structural drift visible while you code and during review.
—— Analysis Results: #1 ——
Add admin user management
Component: Web Frontend (frontend)
Summary:
Frontend bypasses API Gateway with direct User Service call.
Findings (1):
[HIGH] Direct dependency on User Service bypasses API Gateway
packages/frontend/src/index.ts
Suggestion: Route through API Gateway. Extend it to
expose the admin/users endpoint instead
Model Updates:
Remove:
- frontend -> user_service (undeclared)
Add:
+ api_gateway -> user_service.admin_users Why Erode?
Code moves faster than models
AI agents and developers ship features constantly. Architecture docs fall behind within weeks.
New dependencies go unnoticed
A service starts calling another service. The change is real but invisible. Repeat until the diagram is fiction.
Structural changes hide in code diffs
A code diff shows what changed in a file. It does not show that a frontend now bypasses the API gateway.
Drift compounds over time
One undeclared dependency is easy to fix. Fifty, discovered six months later, are not.
Moving fast means staying aligned
The bottleneck in most growing teams is not engineering speed. It is shared understanding. When people don't know how the system fits together, they make decisions in isolation. Dependencies appear that nobody planned for. Architecture reviews turn into archaeology.
A model that reflects reality fixes this. But models maintained by hand die the moment the team gets busy, which is always. Erode keeps the model honest by catching drift while you code, before you push, and during review, so the map stays useful without anyone remembering to update it.
Stage 1 🎯
Resolve
Identifies which architecture component maps to the repository being changed.
Stage 2 🔍
Scan
Extracts dependency changes and new integrations from the code diff.
Stage 3 ⚖️
Analyze
Compares changes against the declared architecture model to detect drift.
Stage 4 🔧
Update
Updates the architecture model with new relationships detected from the code change.
Features
🤖
Multi-Provider AI
Choose between Gemini, OpenAI, and Anthropic (experimental). Cheaper models for extraction, stronger models for analysis.
⚡
CI, CLI, and AI Agents
GitHub Actions for automated review. Local CLI for pre-push checks. Claude Code skill for drift detection while coding.
🔀
Model Updates
Optionally opens a pull request with LikeC4 or Structurizr DSL updates to resolve detected drift.
🚨
Finding Severity
Categorizes findings as high, medium, or low severity, each with a concrete suggestion for how to address or document the change.
📦
Monorepo Aware
Resolves the correct architecture component when a single repo maps to multiple components.
Get Started
Add Erode to your workflow.
# .github/workflows/erode.yml
name: Architecture Drift Check
on: [pull_request]
jobs:
erode:
runs-on: ubuntu-latest
steps:
- uses: erode-app/erode@0
with:
model-repo: your-org/architecture
github-token: ${{ secrets.GITHUB_TOKEN }}
gemini-api-key: ${{ secrets.GEMINI_API_KEY }}