Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unkode

Catch architectural drift on every PR or local changes.

AI agents now write code faster than humans can review it. That speed comes at a cost — architecture drifts. New dependencies appear, boundaries break, and nobody notices until the system is unrecognizable.

Unkode makes architectural changes visible on every pull request. A color-coded diff shows exactly which modules were added, removed, or rewired. The architecture map stays in sync with the code — automatically, in the repo, versioned like everything else.

Visit unkode.dev for updates.
If you find this useful, a GitHub star ⭐ would be much appreciated.


What it looks like

On every PR, unkode posts a clean text summary of what changed plus a link to the live interactive dashboard:

# Architecture Diff

**Added:**
  + Notifications
  + SMS

**Modified:**
  ~ tRPC API
    + depends on Authentication

**Total:** 2 added, 0 removed, 1 modified

---

[Open interactive view](https://unkode.dev/dashboard/?repo=owner/name&pr=123) — explore the changes in unkode.dev

Click the link → opens an interactive diagram at unkode.dev/dashboard with color-coded nodes (green = added, red = removed, amber = modified). Click any module to see exactly what changed — its dependencies, components, role.

Try it now: unkode.dev/dashboard/?repo=deepcodersinc/documenso

Artifacts in your repo:

  • unkode.yaml — the architecture as structured data (source of truth)
  • arch_map.md — Mermaid diagram of the current state (auto-generated, renders inline on GitHub — useful when the repo is private)
  • arch_map.html — a standalone, interactive React Flow diagram (auto-generated). Double-click to open in any browser — pan, zoom, drag nodes, click a module for its role, dependencies, and components. No server, no build step, no install; works fully offline after the first open.
  • The dashboard at unkode.dev needs nothing in your repo beyond unkode.yaml — it pulls live from your default branch

Quick setup

One-time setup per repository.

1. Copy the skill to your repo

Unkode ships as a Claude Code skill (also compatible with other agents that read .agents/skills/).

# For Claude Code
cp -r unkode/skills/unkode .claude/skills/unkode

# For other agents (Codex, Cursor, Aider, etc.)
cp -r unkode/skills/unkode .agents/skills/unkode

2. Generate the baseline

In Claude Code, from your repo root:

/unkode

The first run analyzes your codebase and creates unkode.yaml + arch_map.md. Commit both to main as your baseline.

3. (Recommended) Add the GitHub Action

On every PR, the action posts a color-coded diff diagram showing exactly what changed architecturally. Without it, drift still gets caught, but reviewers have to read the YAML manually.

# Copy the action
mkdir -p .github/actions/unkode
cp unkode/config/github/action.yml .github/actions/unkode/action.yml

# Copy the workflow
cp unkode/config/github/unkode_arch_check.yml .github/workflows/unkode_arch_check.yml

Dev workflow

Once setup is done, this is what your day-to-day looks like:

 ┌─────────────┐     ┌───────────────┐      ┌─────────────┐
 │ You edit    │────▶│ /unkode       │────▶│ unkode.yaml │
 │ code        │     │ (Coding agent)│      │ updated     │
 └─────────────┘     └───────────────┘      └──────┬──────┘
                                                   │
                                            ┌──────▼──────┐
                                            │ Script      │
                                            │ regenerates │
                                            │ Mermaid     │
                                            └──────┬──────┘
                                                   │
                            ┌──────────────────────┴──────────────────┐
                            │                                         │
                     ┌──────▼──────┐                          ┌───────▼──────┐
                     │ Commit      │                          │ PR opened    │
                     │ unkode.yaml │                          │ GitHub Action│
                     │ to branch   │                          │ posts diff   │
                     └─────────────┘                          └──────────────┘
  1. Make code changes on a branch as you normally would.

  2. Run /unkode to regenerate the diagrams. Which one you get depends on the flag:

    Command What it does
    /unkode Generate both diagrams (arch_map.md + arch_map.html)
    /unkode -mermaid Generate only the Mermaid diagram
    /unkode -html Generate only the React Flow diagram
    /unkode -sync Re-analyze the code, update unkode.yaml, then regenerate — use this before opening a PR

    As long as unkode.yaml already exists, the plain commands just render from it — instant, zero tokens, no code analysis. A full analysis runs only the first time (when unkode.yaml is missing). Use -sync when you want the map brought back in step with recent code changes.

  3. Commit and open a PR. The GitHub Action posts a text summary of architectural changes plus a deep link to the interactive dashboard at unkode.dev/dashboard. Reviewers click through to explore the diff visually.

  4. Merge. The updated unkode.yaml on main becomes the new baseline for future PRs.


Config

Edit .claude/skills/unkode/config.yaml (or .agents/skills/unkode/config.yaml):

# The branch to compare against for diffs
base_branch: main

# Directories to ignore when analyzing the codebase
exclude_paths: []

# Diagram flow direction: LR (left-right) or TB (top-bottom)
diagram_direction: LR

Token usage & cost

unkode is frugal. Running it doesn't burn through your subscription.

Operation When Typical tokens Time
/unkode (first time) Once per repo, on main ~4,000 tokens ~3 min
/unkode (dev workflow) Per branch, before PR 500–1,000 tokens ~1 min
Mermaid diagram (arch_map.md) Every run 0 tokens instant
React Flow diagram (arch_map.html) Every run 0 tokens instant
PR diff on GitHub Action Every PR 0 tokens seconds
Dashboard rendering at unkode.dev Anytime, anyone 0 tokens instant

The first run depends less on codebase size and more on how well-documented the project is. A 1.5M LOC monorepo with clear package boundaries and READMEs costs roughly the same as a smaller but less organized repo. For best results, add README files and module-level docs before running unkode for the first time — the agent picks up context quickly and produces a sharper architecture map.

Incremental syncs are cheap — they only read the files that changed, not the whole codebase. Everything downstream of the YAML — Mermaid generation, PR diffs, the dashboard — is deterministic and rule-based, no agent involvement, no tokens used.


Why Unkode

  • AI writes code 10x faster. Architecture drifts 10x faster too. unkode flags drift on every PR so nothing slips through.
  • PRs hide architectural impact. Code diffs don't show "this PR added a direct database dependency from the frontend." unkode does.
  • Diagrams in Confluence go stale. Diagrams in your repo don't. Versioned, diffable, always the truth.
  • No vendor lock-in. The YAML is yours. The Mermaid is yours. The tooling is open source. Use any diagram editor, any AI agent.

What's next

Unkode works today, but I'm actively building a more rigorous pipeline with stronger accuracy guarantees and zero hallucination — plus new features like supporting more diagram formats, multi-repo dashboards, architecture history timelines and integration.

If you'd like to hear about major updates as they ship, drop your email on the waitlist.

No marketing, no spam — just a single notification when a new iteration is ready.


Feedback

Unkode is early. What's working, what isn't, what would make it valuable for your team — please share.


License

Apache 2.0 — see LICENSE


Links

About

Catch architectural drift for agentic coding

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages