Agent-native project execution

A tracker that runs the agent loop.

Every other tracker is a list built for a human to read top-to-bottom. AgentLedger is a work queue an AI coder can run unattended: decompose a spec into tasks, claim them without collisions, batch by which files they touch, and rank by the dependency graph — all through one self-describing MCP.

20 MCP tools pgvector memory local-first · one docker compose up offline by default
agent → POST /api/mcp
# an agent pulls a whole code-neighborhood in one call
next_cluster({ agent_id: "builder-1", max_items: 3 })

 { claimed: 3, cluster: [
    { id: "AL-13", status: "in_progress", claimed_by: "builder-1", seed: true },
    { id: "AL-14", shared: ["backend/app/routers/*"] },
    { id: "AL-15", shared: ["backend/app/routers/*"] } ] }

The problem

Agents don't need a list. They need a graph they can run.

Point an agent at a normal tracker and it grabs the top card, loses track of what it already touched, collides with the next agent, and has no idea which work unblocks the rest. The primitives a human tracker optimizes for — a single ordering, drag-to-reorder, a status dropdown — are the wrong shape for an autonomous loop.

How it works

The loop

Six calls form a cycle an agent runs on its own. The spec is the source of truth at both ends; completing work emits the next batch.

prd_coverage
what's specced but unbuilt
decompose_prd
spec → tracked tasks
get_backlog
dependency-aware, code-local
claim_next
atomic, leased — no collisions
update_item done
auto-extracts lessons → memory
…then back to coverage. The loop closes on itself.

Why it works

Four things a normal tracker can't do

Safe claiming

Multiple agents, zero collisions

claim_next atomically assigns the best ready item with an optimistic guard — two agents never take the same task. Leases + heartbeats free a crashed agent's work automatically.

Code-locality

Pick up related work at once

Items declare the files they touch. next_cluster claims a whole code-neighborhood in one call, so an agent works one area instead of context-switching across the codebase.

Dependency-aware

Priority from the graph

Readiness comes from real dependency links, not a flag. The backlog ranks ready-first, then by what unblocks the most, request votes, effort, and staleness — never handing out blocked work.

Spec-driven

The spec drives the tracker

Items trace to a PRD section. decompose_prd turns a spec into tracked tasks; prd_coverage reports what's built, in progress, and still a gap — closing the loop with the doc.

The interface

Built for agents, not bolted on

REST for people, MCP for agents — both over the exact same service layer, so an agent's write shows up in the web tracker instantly. The 20-tool surface is self-describing: typed inputs and outputs, read-only / destructive annotations, idempotency keys so retries never duplicate, pagination, and uniform structured errors. An agent can validate everything it sends and everything it gets back.

Persistent agent memory

pgvector semantic recall. Finishing an item auto-extracts its lessons into memory — the loop doesn't repeat past mistakes.

Project-scoped keys

One API key = one agent, scoped to one workspace. Run a whole team of agents against separate projects with no cross-talk.

Real integrations

GitHub issues route to the right project and link back; PRDs two-way sync with a markdown folder — conflict-flagged, never clobbered.

Yours to run

One docker compose up and it's live on your machine — Postgres, API, and UI. Fully offline; no keys, no accounts, no external calls required.