ASD // the code-context overlay for agents

Your agents write code they don't remember deciding. ASD gives them the paper trail.

AgentStateDeveloper is a code-level context and audit overlay for agent-authored code — a decision ledger, effect declarations, and a call graph for every function, all queryable by the agents that write the code.

Under the hood it's a git-native sidecar that travels with the repo: why a function exists, what it's allowed to touch, and who approved the last change — served over MCP. Rust core. 9 languages. Zero telemetry.

Let your agent install it COPY PROMPT
Set up AgentStateDeveloper for this repository. Run each step, then report back once asd is installed, this repo is indexed, and the MCP server is connected.

1. brew tap agentstatelabs/agentstatedeveloper && brew trust agentstatelabs/agentstatedeveloper && brew install asd   — install the asd, asd-mcp, and asd-serve binaries
2. asd onboard        — index the repo and register the MCP server (project-scoped)
OR INSTALL DIRECTLY
$ brew tap agentstatelabs/agentstatedeveloper && brew trust agentstatelabs/agentstatedeveloper && brew install asd COPY
RUNS ON macOS · Apple Silicon macOS · Intel Linux Windows
64 MCP tools Git-native sidecar 9 languages BSL-1.1 → Apache 2.0
64
MCP tools
8
Primitives
3
Surfaces
9
Languages
Architecture //

One overlay. Three surfaces.

ASD isn't a library you import — it's a sidecar that lives in .asd/, travels with every clone, and exposes the same graph to your shell, your coding agents, and the browser.

cli/

asd

Everything the agents can do, you can do from a shell: index, read a symbol, query effects, append and ratify ledger entries, tail the audit log.

$ asd read payments.chargeCard
$ asd effects_of processOrder
mcp/

asd-mcp

A stdio MCP server exposing 64 tools to Claude Code, Cursor, Codex, and Gemini — code search, call graph, effects, and ledger, right where the agent works.

$ asd onboard   # registers MCP
http/

asd-serve

An HTTP surface plus Lens — a browser view of the ledger, effects, call graph, and hash-chained audit trail for humans reviewing what agents decided.

$ asd-serve --port 7777
Capabilities //

Eight primitives, one sidecar.

Each primitive answers a question an agent needs settled before it reads, writes, or refactors — exposed identically to your tools (MCP) and to you (the asd CLI).

ledger

Why does this function exist?

Hazards, rationale, constraints, and authority — checked into git, surviving renames, file moves, and the original author leaving.

$ asd ledger get payments.chargeCard
$ asd ledger append --kind hazard
effects

What does it actually touch?

A propagated 17-category effect set — io.fs.read, io.db.write, io.net.out — with each effect annotated by where it was declared.

$ asd effects_of processOrder
call_graph

What calls what?

Callers and callees for any symbol, so an agent can compute the blast radius before it changes a line.

$ asd callers_of billing.computeProration
policy

Who's allowed to change it?

Declarative gates that decide whether a write requires approval — evaluated on every ledger mutation.

$ asd policy eval billing/*
ratification

Who approved this decision?

Signed approvals (ed25519) attached to ledger entries, so a decision carries its authority with it.

$ asd ledger approve payments.chargeCard
audit

What happened, in order?

A tamper-evident, hash-chained log of every ledger mutation and policy decision — replayable and independently verifiable.

$ asd audit tail --path billing/*
In practice //

Three moments your agents already hit.

These aren't hypotheticals — they're what happens to every team that lets agents touch real code.

01 // THE MYSTERY FUNCTION

"Why does this function exist?"

Six months ago an agent introduced payments.chargeCard with an unusual retry pattern. Today it needs refactoring and no one can tell if the pattern is load-bearing or vestigial.

With ASD: asd ledger get payments.chargeCard returns hazards, rationale, and authority — the reasoning survived the rename, the file move, and the original author leaving.

asd ledger get payments.chargeCard RATIFIED
symbol: payments.chargeCard
kind: hazard
summary: "fails silently above $10,000 — caller must check return value"
author: agent/refactor-bot
time: 2025-11-14 16:22 UTC
authority: approved by alice@ · sig ed25519
rationale: "Stripe returns 200 on declined >10k; see gateway/STRIPE-4421"
02 // THE BLAST RADIUS

"What does this actually touch?"

An agent is about to refactor processOrder. Before it changes a line it needs to know: does this read disk? hit the database? call an external API — including transitively, through everything it calls?

With ASD: asd effects_of processOrder returns the propagated effect set, each annotated with where it was declared. The agent knows the blast radius before it commits.

asd effects_of processOrder TRANSITIVE
io.db.write via orders.persist — writes orders table in a txn
io.net.out via payments.chargeCard — HTTPS POST to Stripe
io.fs.read via config.load — reads payments.toml
io.queue.publish via notify.send — order.placed → NATS
4 effect categories · 3 transitive · policy: pass
03 // THE REGRESSION

"Who broke billing?"

A regression lands in production — billing off by 2% on enterprise plans. The team needs to know what changed, who changed it, who approved it, and what alternatives were considered.

With ASD: asd audit tail --path billing/* returns the hash-chained log of every mutation and policy decision in that subtree. Tamper-evident, replayable, verifiable.

asd audit tail --path billing/* HASH-CHAINED
9f2a…c1 agent/refactor ledger.append computeProration
b71e…88 alice@ ledger.approve sig=ed25519
3c0d…42 agent/refactor effect.declare io.db.read
f5b2…17 policy evaluation require-approval → PASS
CHAIN VERIFIED · head 88a0…91 · replayable
Lens // review UI

See what your agents know.

asd-serve ships a web UI over the same index and audit overlay your agents query — the whole codebase as a stable map, per-symbol decision ledgers and verified effects, and effect blast radius, in the browser.

ASD Lens — the codebase rendered as territory: regions sized by symbol count, with structure, decisions, thinking, effects, and activity as toggleable layers
Symbol detail — callers, callees, verified effects, and the decision ledger for one symbol
Symbol detail — callers/callees, static-checker-verified effects, and the full decision ledger, invariants, and inherited thinking for one symbol.
Effect distribution — per-category effect counts and the declarers with the widest transitive blast radius
Effect distribution — per-category effect counts and the declarers whose effects reach the most callers (transitive blast radius).
Pairs with // CTXone

Code context is half of it. Here's the other half.

ASD knows what your code does — symbols, call graphs, effects, and ledger decisions. CTXone is the team layer: shared decisions, plans, and memory that travel across the whole team.

Wire ASD into the same Hub and your agents get both halves through one connection. Setup is one flag — installing either offers to set up the other. AgentStateGraph is the underlying state substrate.

code_searchfind the symbol behind a concept
code_readsignature, effects, ledger
callers_ofblast radius before you edit
callees_ofwhat a symbol depends on
served next to CTXone memory, over MCP
License //

Open source, self-hosted, nothing held back.

ASD is the whole per-developer engine on your machine — all 64 MCP tools, the CLI, the HTTP and Lens UI, ledger, effects, call graph, policy, and audit. No account, no telemetry.

BSL 1.1 today; each version converts to Apache 2.0 after four years. Internal use — including production — is unrestricted; only offering ASD as a hosted service to third parties needs an agreement. Read the license →