Ag.ide Index, rank, and refactor your repo's worst code

navs1 pts0 comments

AG.IDE — Local Code Context & Quality for AI Coding Agents

>ide

Slopdies in a loop.

AG.IDE turns code quality into a self-improving loop. It indexes your whole repository locally, ranks the worst code, and gives your AI coding agent the context to fix it — not pile on more slop. Runs offline, and makes cheap local models like Qwen punch far above their weight.

Download for macOS

macOS Apple Silicon · .dmg<br>Linux x86_64 · .tar.gz<br>Linux ARM64 · .tar.gz

See how it works

Works offline.<br>Code never leaves your machine.<br>Makes local models better.<br>macOS 13+ · Apple Silicon

01 — Loop

Index. Rank. Fix. Loop.

AG.IDE treats your repository like a living system, not a stream of diffs.<br>Every pass surfaces the next high-leverage improvement.

01

Index.

Map the repo: files, symbols, calls, history, duplicates, and quality signals.

02

Rank.

Rank the refactoring opportunities that matter most: complexity, coupling, churn, side effects, and ambiguity.

03

Fix.

Give the target and its context to your coding agent so it can make a focused improvement.

04

Loop.

Run the cycle again. Each pass re-scores the repo, reveals the next best target, and keeps code quality climbing.

AG.IDE — your-repo

Repository

● your-repo

▸ cmd

▾ internal

▸ abstract

▸ agide

▾ enrichment

cluster.go

refine.go

▸ retrieve

▸ testdata

Worst offenderslive

Selected

refinePartition

internal/enrichment/cluster.go

Risk71

Touched12 fns

Last runjust now

Loop iter#142

~/code/cobra — zsh

$ open -a AG.IDE

CLI link repaired on first launch

$ agide --version

agide 0.1.0-preview.16

$ agide index .

index is current; no files changed

$ agide status

agide project status: ready

packages indexed: 29 · symbols indexed: 286 · call edges indexed: 2338

$ agide rank --limit 3

rank combined (3 rows)

1.000 Command.getCompletio… 270 lines, many decision branches

0.573 Command.InitDefaultC… many branches; many dependencies

0.453 Command.execute many branches; depends on many places▋

02 — Locality

Your code never leaves your machine.

AG.IDE runs entirely on your hardware. No cloud API calls, no uploading source to a review queue, no feeding your codebase into someone else's training pipeline. Every capability ships with the binary.

01

No cloud. No exceptions.

No passwords leaked, no proprietary logic uploaded, no one else getting rich off your source. AG.IDE makes zero outbound connections to analyze your codebase.

02

Ships with everything it needs.

Proprietary code-quality models, structural clustering for coupling analysis, near-duplicate compression — all in the binary. No external AI API. No dependency that calls home.

03

Rust. GPU. Fast.

Written in Rust. GPU-accelerated from the UI layer to the analytics engine — models included. Runs as fast as your hardware allows.

03 — Context

Foresight at repository scale.

Reason about code larger than any context window. AG.IDE maintains the full structural picture of your codebase — call graphs, coupling maps, impact radius, quality signals — so your coding agent always knows where it stands, what it's touching, and what breaks if it moves.

01

Smell what's wrong.

Grep finds string matches. AG.IDE finds the problem. Classic code smells and structural coupling patterns are invisible to search-and-replace coding agents — they only emerge when you can see the whole.

02

Know the blast radius.

Before touching anything, see everything it affects. Callers, callees, downstream dependents. Your agent plans its move like an engineer who's been burned before.

03

Reason about the whole.

The codebase never fits in context. The right target, with the right surrounding context, always does. AG.IDE compresses the whole into exactly what the model needs.

CALLERS<br>CALLEES

processEvents<br>semantic/events.go

hybridSearch<br>retrieve/hybrid.go

applyCluster<br>enrichment/apply.go

refinePartition<br>enrichment/cluster.go<br>complexity: high · 12 callers · 4 callees

computeEdges<br>graph/edges.go

scoreNodes<br>graph/score.go

emitPartition<br>enrichment/emit.go

~/code/cobra — zsh

$ agide callgraph --format mermaid --limit 6

graph LR

github_com_spf13_cobra -->|221| fmt

github_com_spf13_cobra -->|208| github_com_spf13_pflag

github_com_spf13_cobra_doc -->|183| github_com_spf13_cobra

github_com_spf13_cobra -->|134| strings

github_com_spf13_cobra_doc -->|74| bytes

github_com_spf13_cobra -->|39| os

AG.IDE — Cobra overview · dark theme · combined quality ranking

04 — Different

PRs were made for humans. AG.IDE is made for what's next.

Diffs can't see drift. A pull request shows you 200 changed lines — not that the system is now 3% more coupled, or missing the abstraction that would have made the last four PRs unnecessary. At agent throughput, nobody reads 50 PRs a day. CI runs. Comments accrue. The codebase drifts anyway.

PR workflow<br>AG.IDE

Unit of review<br>One diff. Yesterday's commits are invisible the moment they merge.<br>The whole codebase. Every function, every commit, continuously...

code agide context quality rank loop

Related Articles