Skip to content

Skill · open source

Document-Driven Development (D³)

Documentation isn't a byproduct of the work — it's the interface your AI works through.

Most AI coding sessions start cold. The agent knows the code but not the why — the business rules, the decisions already made, the bug you fixed last month and its root cause. That knowledge lives in one person's head and evaporates between sessions.

D³ is a Claude Code skill that keeps it in the repo, in a shape the agent reads on the next task. Two verbs: prime hands the agent the right context before you build; capture files what you learned into its one canonical home after. Nothing is learned twice.

Docs are the interface the AI works through A left-to-right flow. On the left, a docs slash corpus stack lists five document types — ADRs, plans, audits, business-rules, runbooks. In the middle sit four wiring layers stacked as lanes: a CLAUDE.md router that links out to docs, nested files that auto-load per subtree, a graphify graph that is queried not grepped, and .remember for continuity. On the right is the Agent context window — what the AI actually sees this turn. Document tokens leave the corpus, travel each lane, briefly light it teal as they cross, and land inside the agent context box. The corpus reaches the model only through this contract. THE DOCS ARE THE INTERFACE docs/ corpus the wiring · the contract what the AI sees ADRs plans audits business-rules runbooks CLAUDE.md router links out to docs nested files auto-load per subtree graphify graph queried, not grepped .remember continuity across sessions Agent context window this turn Fig. — the corpus reaches the model only through this contract. Every doc type flows in as a routed, loaded, queried, remembered token — that contract is the interface it works through.
Docs as the interface — one document corpus reaches the agent through a layered contract: a router CLAUDE.md that links into docs/, module files that auto-load per subtree, a graphify knowledge graph queried instead of grep, and .remember for session continuity.

Install

It ships as an installable plugin. In any Claude Code session:

/plugin marketplace add abuammarsami/d3
/plugin install d3@ammar-skills

Source and issues: github.com/abuammarsami/d3 · MIT licensed.

Two verbs

Installed as a plugin, the command is namespaced /d3:d3 (the bare /d3 works if you add it as a personal skill):

/d3:d3 prime <task or feature>   # load the 3–6 docs that matter for this task, get a context pack
/d3:d3 capture <what happened>   # file a new rule / decision / bug in its canonical home
/d3:d3 status                    # show what's active/draft across docs/plans

prime discovers the repo's docs/ taxonomy, loads the root and nearest module CLAUDE.md, then pulls the docs the task actually needs — the relevant plan, the business rule it touches, the governing decision — and hands back a focused context pack instead of a dump.

capture routes new knowledge by document type, matching the destination and template to the kind of thing it is:

The knowledge Its canonical home
An architectural decision an immutable ADR (docs/architecture/decisions/)
A future design a plan written to be executed (docs/plans/)
A shipped bug or parity fix a dated, immutable audit (docs/reference/audits/)
A production incident a blameless post-mortem (docs/reference/incidents/)
A domain / pricing rule a business rule cited to file:line (docs/reference/business-rules/)

After any capture it does the follow-through — updates the folder index, the plans roadmap, the progress tracker, and the session log — so the fact is discoverable by the next prime. The house rule it enforces: no undocumented work.

Why it works

It's repo-agnostic: on every run it reads the repo's own docs/README.md and CLAUDE.md to learn that repo's taxonomy, and falls back to a sensible six-bucket layout when a repo doesn't have one yet. Optional integrations — a knowledge graph, a session-memory log, Cursor rules — are used only when present, so it works the same across a .NET backend, a Flutter app, and a legacy MVC project.

The full story — the taxonomy, the consumption wiring, and the loop, with real examples from a production marketplace — is in the deep-dive: Document-Driven Development (D³): Docs Are the Interface Your AI Works Through.