Listed from the MCP registry; nobody on Odel publishes it.
Work-queue kernel for AI coding agents: dependencies, worktree isolation, quality gates, recovery
Runs on your machine from its package; the steps are below.
At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
uvx ddflow-mcp
MCP client config
{
"mcpServers": {
"ddflow": {
"command": "uvx",
"args": [
"ddflow-mcp"
]
}
}
}Run
docker run -i --rm docker.io/delian/ddflow-mcp:0.2.9
MCP client config
{
"mcpServers": {
"ddflow": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/delian/ddflow-mcp:0.2.9"
]
}
}
}Run
docker run -i --rm ghcr.io/delian/ddflow-mcp:0.2.9
MCP client config
{
"mcpServers": {
"ddflow": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/delian/ddflow-mcp:0.2.9"
]
}
}
}A portable, agent-agnostic work-queue kernel for AI coding agents.
You keep a queue of phases and tasks with declared dependencies. You say "implement phase P2". Independent tasks fan out to parallel agents in isolated git worktrees; dependent ones wait. Every task passes a quality pipeline whose gates cannot be passed by assertion. If an agent crashes, its work is found rather than lost. If everything except the log is destroyed, the project's decision history rebuilds from the log alone.
Three dependencies beyond python3 and git (Jinja2, for the prompt templates, see
Extending it by writing text, not code; and
tomlkit, which edits .ddflow/config.toml without losing its comments; and PyYAML, used only by the skills commands for SKILL.md front matter, imported lazily, so ddflow's own configuration stays TOML). Everything else is an optional extra, none needed for the core: ddflow[search] (rapidfuzz) and ddflow[rag] (model2vec) are in use, with BM25 and difflib as the fallback; sqlite-vec (also in ddflow[rag]), ddflow[watch] (watchfiles) and ddflow[mcp-sdk] (the MCP SDK, for a future network transport) are declared and not yet used. A check that needs an absent extra is recorded unavailable, never passed. Works with Claude Code, Gemini CLI,
Codex, Copilot, Cursor, Kimi, opencode, Aider, a CI job, a Makefile, or a human at a
terminal — over a CLI
and an MCP server that are the same implementation.
If you are an AI agent and were asked to read this README, this section is your shorthand. Everything below it is detail.
What ddflow is. A work queue with rules the tools enforce, for projects that agents
build. Work is phases and tasks with dependencies and declared file globs. Each task gets
a lease and its own git worktree, then passes a gate pipeline: a check that could not run
is unavailable, never passed; one reviewer must be from another model family; a bug
closes only with a regression test that failed first. Everything is recorded in an
append-only log in .ddflow/events/, committed with the code. ddflow writes none of your
project's code — you do; it adds only its own config, a rules block and git hooks.
Every operation is both a shell command (ddflow …) and an MCP tool (ddflow_…).
If the project already uses it (.ddflow/ exists): call ddflow_brief (or run
ddflow brief) first and follow it. It replaces reading the project's rule and lesson
files. Then: ddflow_next → ddflow_claim → work only in the worktree it returns →
ddflow_gate_status, satisfy each gate → ddflow_merge → ddflow_complete. The full
driver is docs/ddflow/drivers/implement-phase.md in that project.
To onboard a project, ask the user first: it installs a tool, registers an MCP server and writes files in their repository.
uv tool install git+https://github.com/delian/ddflow-mcp (not on PyPI yet).ddflow adopt --agents claude (your agent's
name; see Wiring it into your agent). It writes
.ddflow/, the MCP registration, the commit hook and a rules block in AGENTS.md.
Restart the agent session so it loads the MCP server.ddflow import lists the plans, lessons, decisions and unmerged branches the
repository already has, and writes nothing. Run ddflow import --apply only once the
user agrees with that list.ddflow config --set gate.unit_tests.command "<their test command>". Then
ddflow companions lists the tools the gates expect that are missing: propose them,
never install one unasked.ddflow phase add …, ddflow task add … --globs …)
and finish with ddflow doctor.Exit codes, everywhere: 0 ok · 1 failure · 2 could not run / nothing to do · 3
refused. Never treat 2 as 0.
ddflow ships defaults, never a fixed process. Every part of how it works is a file or a
setting in your repository, and each project can differ from the next: the gate
pipeline and each gate's command or prompt, which reviewers run, the rules your agents
follow, every prompt an agent is handed (including the instructions it receives the
moment it connects), the slash-command workflows, your own [[macro]] modes, the export
document templates, the branching and release model, parallelism and lease limits,
cadences, enforcement strictness, and the per-agent driver docs. Nothing is hard-wired
except the four enforced rules at the top of this page, and even those are tuned through
documented knobs, never silently bypassed.
Three ways to change anything, all validated before anything is written:
.ddflow/ (committed, shared by
every clone) or .ddflow/local/ (git-ignored, yours alone).ddflow config --set, ddflow workflow …, ddflow prompts eject,
ddflow rule …, ddflow export eject).ddflow_configure,
ddflow_workflow_*, ddflow_rule_*). It changes a project's workflow only with your
agreement.The complete list of what can be changed, and where, is the Customisation reference at the end of this page.
An AI coding agent is good at a task and weak at a project. One agent in one session mostly works. Run it for weeks, or run three at once, and the same failures come back:
ddflow is the layer between you and your agents that makes those failures structurally hard rather than a matter of discipline. It does not write code and it is not an agent. It is a queue, a set of rules the tools enforce, and a log of everything that happened.
| Without it | With ddflow |
|---|---|
| You decide what each agent does next, and keep the plan in your head or a chat. | The plan is a queue of phases and tasks with dependencies. ddflow next says what can start now and why everything else is blocked. |
| Parallel agents step on each other. | ddflow claim gives each task a lease and its own git worktree; tasks that declare overlapping files are refused, not merged over. |
| "Done" means the agent said so. | Every task passes a gate pipeline you configure. A gate that could not run is recorded unavailable, never passed; at least one reviewer must come from a different model family than the author; a bug cannot be closed without a regression test that failed first. |
| A crash loses work. | ddflow recover finds orphaned worktrees and reports what each holds. It never deletes work. |
| Every session starts from zero. | Lessons, decisions, research verdicts, bugs and your own prompts are recorded as you go. ddflow brief hands the agent the ones relevant to this task in a bounded amount of context, and ddflow recall searches all of it. The same brief also names the project's own skills, commands and rules files (.claude/skills, .claude/commands, .cursor/rules, .clinerules, AGENTS.md/CLAUDE.md) that bear on the task, by name and path only. |
| History is a transcript. | An append-only event log, committed in git. The board, the index and the reports are rebuilt from it; ddflow replay reconstructs the project's decisions from the log alone. |
--json form
and every command returns the same four exit codes, so a Makefile or a CI job can
drive it exactly as an agent does.It works with the agent you already use, because everything it does is reachable both ways: as a shell command and as an MCP tool. Use whichever your agent, script or CI job has. Your workflow is text, not code — the gate pipeline, the reviewer instructions and the agent-facing prompts are files in your repository that you can edit.
# ddflow-mcp is not on PyPI yet; until the first release, install from the repository:
uv tool install git+https://github.com/delian/ddflow-mcp # or: pipx install git+https://github.com/delian/ddflow-mcp
cd /path/to/your/project
ddflow adopt # registers the MCP server with your agents, writes .ddflow/ and a block in AGENTS.md
ddflow phase add P1 --title "Password reset"
ddflow task add P1.T1 --phase P1 --title "Reset-token endpoint" --globs 'src/auth/**'
ddflow next # what can start now, and why the rest is blocked
adopt registers the server you just installed, by its full path: an install that did
not come from a package index (from git, a local directory or an archive) carries a
direct_url.json in its metadata (PEP 610), and
for one of those adopt writes the ddflow-mcp installed beside its interpreter rather
than uvx ddflow-mcp, which would fetch from PyPI. Only an install from an index gets
uvx. --launch python still forces the interpreter-plus-PYTHONPATH form.
Then tell your agent "implement phase P1". The driver adopt installed tells it to
start with ddflow_brief, claim the task, work in its own worktree, satisfy each gate
and land the change. ddflow cannot make an agent follow instructions, but it makes
skipping them visible: the commit hook adopt installs flags a commit made without a
lease (or refuses it, if you set [enforce].commit_without_lease = "block"), and
ddflow complete refuses an item whose gates carry no outcome. Watch it with
ddflow board, and ask ddflow doctor at any point whether the project is healthy.
Every row is a command you can run in a terminal and a tool an agent can call over MCP — the same implementation, so neither drifts from the other.
| I want to… | CLI | MCP tool |
|---|---|---|
| see what the workflow is | ddflow workflow | ddflow_workflow |
| onboard an existing project | ddflow onboard status (standing drift report; also preflight, legacy, memory, test-gate, verify, harness; ddflow help onboard walks the stages; propose by default, --apply acts, --accept NAME approves one item) | ddflow_onboard (stage, apply, accept) |
| the pre-push checks, on the merge result | ddflow ci run (the ci gate; ddflow ci status shows what would run): a scratch worktree of your branch merged with the base, then the project's own pre-commit run --hook-stage pre-push (or [ci].command, run as written; with the default, a language: fail tripwire hook runs on the diff being checked, not over every file); exit 0 passed, 1 failed, 2 could not run (never a pass). After a merge lands, [ci].on_merge (fast default: the pre-commit set without the test hooks; full; off) checks the base, records a ci.result and files a bug and fix task per failing check; the pre-push hook reports with ddflow ci record | ddflow_ci (run, status) |
| check a done task really is done | ddflow verify <id> (or --all / --phase P to sweep every done task, worst first, --file-bugs to file what fails; --reopen sends a completion that fails back to the queue with its gates cleared (--reason says why; --force reopens one that holds); --shas checks the recorded sha of one task or --phase P (ok, rewritten, equivalent <sha> found by patch-id or landed paths, or missing; exit 1 = missing); --pack prints the evidence pack (requirement fenced as data, what landed, mechanical findings) for an independent verifier and --judge hands it to the cross-family reviewer (gate verify, optional, never part of the default pipeline); on a task that is not done it names work that landed anyway): landed on main, declared files exist, tests exist, no gate failed or skipped without a reason (exit 1 = a claim does not hold) | ddflow_verify |
| check what a report says was filed | ddflow verify-filed <id>... [--phase P --kind K --tag T] or --manifest FILE (TOML/JSON of expected records with kind, phase, needs, tags incl. wave:N): each is OK, MISSING or WRONG (field, expected, found); exit 0 all OK, 1 some wrong, 2 could not run, 3 refused; a lane that stopped saying work is still running shows as no claim made in ddflow lanes unless a live pid is recorded; knobs under [verify]; ddflow help verify-filed | ddflow_doctor (action verify_filed) |
| what a finished task required and changed | ddflow show <id> on a done task prints its completion ledger: requirement digest, files and tests the landing changed, skipped gates, forced flag, later amendments | ddflow_show |
| one-page state of the project | ddflow workflow state | ddflow_workflow_state |
| project rules | ddflow rule add|edit|list|search|show|remove | ddflow_rule_add · _edit · _list · _search · _show · _remove |
| change the workflow | ddflow workflow pipeline task … · workflow gate <id> … · workflow drop <id> | ddflow_workflow_pipeline · _gate · _drop |
| change any setting | ddflow config --explain · --origin · --set <key> <value> | ddflow_configure |
| add a phase / a task | ddflow phase add P1 --title … · ddflow task add P1.T1 --phase P1 --globs 'src/**' | ddflow_phase_add · ddflow_task_add |
| get a plan into the queue | see From plan mode to the queue | same |
| know what to work on | ddflow next | ddflow_next |
| start a task | ddflow claim <id> → work → ddflow gate … → ddflow merge → ddflow complete | ddflow_claim, ddflow_gate_*, ddflow_merge, ddflow_complete |
| turn on shell completion (bash · zsh · fish: commands, options, values and ids) | ddflow completion install [<shell>] · uninstall [<shell>] · bash/zsh/fish — one guarded startup-file line, applied only with --yes consent; see ddflow help completion | none: a person's act |
see everything about one item or bug (a done task's author model; each field ddflow correct replaced is marked with who, when and why, never with its old text, and --secret corrections carry no digest; a blocked item names its unmet dependency and whether it is leased by <holder>, running with no live lease (interrupted) or open (unclaimed)) | ddflow show <id> (phase, task, bug or research id); --history lists every correction in order; --json and the MCP show carry the same corrections field | ddflow_show |
| see progress / effort | ddflow progress · ddflow status · ddflow board | ddflow_progress · ddflow_status · ddflow_board |
| find out if we're going in circles | ddflow loops | ddflow_loops |
| see which agents are working, and what each needs next | ddflow lanes [--watch] · ddflow lanes brief <lane> · ddflow lanes advise · ddflow lanes lead · ddflow lanes ended (read-only; see Lanes) | ddflow_lanes (view, lane) |
| see where the time went, and when a phase will end | ddflow metrics · ddflow metrics forecast [--phase P] · ddflow metrics retro <id> · ddflow metrics skips · ddflow metrics lanes · ddflow metrics suitewaste (why whole-suite runs happen and the avoidable share) (read-only, from the log; a figure under [metrics] min_samples is n/a, never 0) | ddflow_metrics (view, item, phase, since, group_by) |
| record a lesson / decision / research / bug | ddflow lesson add · decision add · research · bug found|fixed | ddflow_lesson_add · ddflow_decision_add · ddflow_research_add · ddflow_bug_* |
| correct a value recorded wrongly (a typo, a wrong fact, a wrong author model; history kept: the old text stays in the log until a scrub, so rotate a leaked secret) | ddflow correct <id> --field F (--text T | --from-file P) --reason WHY [--secret] -- an agent corrects its own records and records on an item it holds; anything else needs --approval request (see ddflow help update) | ddflow_task action=correct |
| search everything the project remembers | ddflow recall '<regex>' | ddflow_recall |
| search for people: tasks, bugs, research, decisions, lessons, sessions, prompts, rules, skills, agents, jobs, schedules, log | ddflow search '<text>' [--exact|--regex] [--kind K] [--source S] [--state S] [--phase P] [--owner A] [--since D] [--limit N] [--json] -- see Searching everything | ddflow_list kind=search (query, mode, sources, source) |
| check a text against what is already filed (read-only) | ddflow similar '<text>' [--kind bug,task,...] [--json] -- exit 0 with candidates, 2 with none | ddflow_similar |
| find records filed twice | ddflow dupes [--kind bug,task,...] [--open-only] [--floor F] [--limit N] [--json] -- exit 0 with pairs, 2 with none | ddflow_dupes |
| settle a near-duplicate pair | ddflow link <a> --duplicate-of|--extends|--related|--distinct <b> [--reason ...] | ddflow_link |
| record what happened this session | ddflow session start|prompt|note|end | ddflow_session_* |
list tasks / phases / bugs / research / sessions (ddflow help viewers) | ddflow task|phase|bug|research list [--state S] [--phase P] [--tag T] [--owner A] [--since D] [--limit N] [--offset N] [--json] -- see Listing; bug list shows open bugs unless --all; ddflow session list|show | ddflow_list (kind, state, phase, tag, owner, since, limit, offset, all) |
| read the engineering log | ddflow history [--item X] [--kind K] [--agent A] [--tail N] [--json] -- compact line per event (time, agent, subject, verb, summary); --agent keeps one agent's shard, --tail N the last N oldest-first, --json cuts payload strings over 500 chars and marks the event truncated | ddflow_history |
| check the tooling around the gates | ddflow companions | ddflow_companions |
| find which earlier test file makes a test fail only in full-suite order | ddflow bisect VICTIM --cmd 'pytest -q {tests}' [--candidates a,b] [--glob G] [--timeout S] [--repeat N] [--max-runs N] -- delta-debugs the files before the victim, running your command many times (exit 0 = found, 2 = nothing to report); see Finding a test polluter | ddflow_bisect (glob, repeat and max_runs are CLI-only) |
| check a companion really is an MCP server | ddflow companions --verify [--id X] -- launches each registered or installed MCP companion and requires a JSON-RPC answer to initialize (spawns processes; opt-in; exit 1 = not a server, 2 = could not tell) | ddflow_companions_verify |
| find work a crashed agent left | ddflow recover | ddflow_recover |
| check the project's integrity | ddflow doctor · ddflow doctor --accept-lost-events (the operator's word that events a history rewrite took out of a shard are known, see Events that vanished from a shard) | ddflow_doctor (--accept-lost-events is CLI-only) |
| see what upgrading this project to the running ddflow would change | ddflow upgrade [--plan] (alias ddflow doctor --upgrade) -- the plan, by category: data repairs, migrations (registered breaking-change migrations and the files each would rewrite), contested records (a decision, lesson or research id two agents defined differently: each is listed with its rivals and the ddflow resolve command; an apply prints it and resolves nothing, the MCP connect proposal and the upgrade notice mention it), config (new knobs, changed defaults; a value anyone set is marked needs operator confirmation), instructions (drifted driver docs and rules, stale after a release or hand-edited), hooks, MCP launch, opt-in features. Writes nothing; exit 0 up to date, 1 while the plan has items. Do it: ddflow upgrade --apply [CATEGORIES] [--snapshot] [--confirm KEY ... --reason WHY]; undo it: ddflow upgrade --restore [NAME] (see "Applying an upgrade") | ddflow_upgrade (apply, confirm, reason, snapshot, restore) |
| give a gateway or remote client its own identity and role | ddflow pair NAME --role ROLE at the host, then ddflow tokens redeem at the client; ddflow tokens list, rotate, revoke (guide) | none: a person's act |
| rebuild everything from the log | ddflow replay --verify | ddflow_replay |
| invoke a workflow / a mode of your own | ddflow prompts list · prompts get <name> [--arg KEY=VALUE] (rendered, exactly as prompts/get gives it) · prompts show <name> (its source) | prompts/list · prompts/get |
| see what this project left undone | ddflow doctor · ddflow status | the footer on tool results |
| ask the tool to explain itself | ddflow help [topic] | ddflow_help |
Every read command takes --json. Every exit code means the same thing everywhere:
0 healthy · 1 real failure · 2 could not run / nothing to do · 3 coordination
refused. 2 is never collapsed into 0 — "nothing is ready" and "everything is
fine" are different facts, and an agent that cannot tell them apart invents work.
What --json and the MCP tools return has a name. A result that is a JSON object carries a
top-level "schema": "<command>@<n>" -- for example "claim@1"; the command is the MCP tool's
name without ddflow_, and --json of the CLI command that tool serves says the same. Within
a version fields are only ever added; removing or retyping one bumps n. On a refusal the
refusal object still leads and the tag follows it. A result that is a bare array
(progress, loops, lesson search, ...) keeps its exact shape and has no tag, and text
bodies (board, doctor) have none. python -m ddflow.surfaces.tool_table --schemas prints
every tool's declared result schema; tests/golden/json/result_schemas.json pins them.
$ ddflow help # what this is, the loop, every capability grouped
$ ddflow help workflow # workflow · import · gates · parallel · memory · recovery · config
Reachable as ddflow_help over MCP, and that is the point: an agent connecting had 59
tool descriptions and a state-aware handshake, neither of which answers "what is this,
and how am I meant to work here". A tool description explains one tool to someone who
already picked it; the handshake describes this repository right now.
Two halves, deliberately:
ddflow/templates/prompts/help/, so
ddflow prompts eject-style overriding applies — put your own
.ddflow/prompts/help/workflow.md in place and the tool teaches your workflow.Three ratchets keep the prose honest, because a page recommending a flag that was renamed is worse than no page — whoever finds nothing reads the code, and whoever finds a wrong answer trusts it. Every command a page names must exist as a CLI leaf or an MCP tool; every topic the index offers must resolve; and every tool must fall into a group, so a new capability has to be classified rather than quietly dropped from an inventory that claims to be complete.
Three pictures of what ships by default. Every step is configurable (see
The workflow, and changing it); ddflow workflow
prints what this project actually runs.
The agent's loop. One item at a time: pick it, lease it, clear its gates, land it.
Each arrow labelled with an exit code is what the tool says, not a convention —
2 means nothing to do, 3 means refused, and neither is ever read as success.
flowchart TD
S["Session start<br/>ddflow brief · recover"] --> R{"Crashed agent's<br/>work left over?"}
R -- yes --> SV["Inspect the worktree, salvage,<br/>ddflow release"] --> N
R -- no --> N["ddflow next"]
N -- "exit 2: nothing ready" --> W["ddflow wait<br/>sleeps until a holder lets go"] --> N
N -- "exit 0: items ready" --> C["ddflow claim<br/>lease + isolated git worktree"]
C -- "exit 3: refused<br/>(lease or file-glob conflict)" --> N
C --> P["Task pipeline<br/>satisfy every gate in order"]
P --> M["ddflow merge<br/>lands the branch from the primary checkout"]
M --> D["ddflow complete<br/>checks every gate has an outcome<br/>+ a different-family review"]
D -- "exit 3: refused" --> P
D -- done --> N
With [flow].integration = "pr", merge opens a pull request and parks the item in
review instead; next completes it when the request merges.
A lease is evidence of intent, not a lock, but a LIVE lease held from another clone is not
overwritten by accident: release and gate run|record|skip on it exit 3 naming the holder,
unless you pass --force --reason "<why>" (CLI only; recorded as forced on the event).
Agents of the same clone, an expired lease and a lease with no recorded clone are unaffected.
Stuck waits. A refused claim leaves a recorded wait, so doctor, status, brief and
lanes advise can say when waiting will not end. Agents waiting on each other are a lease
deadlock: the report names the loop, the victim (the holder with the least progress) and
the commands that free the contested files. A wait older than [loops].wait_alarm_s (default
1200 seconds, 0 turns it off) with nothing running on the leases in its way (no live gate, no
running job, no progress for as long) raises a lease wait alarm with the same commands.
ddflow --json status carries both as wait_cycles and wait_alarms. Nothing is taken from
anyone: the holder acts on it.
The task pipeline. Ten gates, in order. Heavy borders are the gates
gates.required names by default (implement, unit_tests, merge); the rest still
need some outcome — passed, failed, unavailable, partial, or an explicit skip with a
reason — because silence is not a pass.
flowchart LR
subgraph A["You, the agent"]
direction TB
g1["1 · research<br/>falsifiable claim + probe"] --> g2["2 · rules<br/>ddflow brief --item"] --> g3["3 · implement<br/>in the item's worktree"]
end
subgraph X["A different model family"]
direction TB
g4["4 · rubber_duck<br/>try to refute it"] --> g5["5 · critic<br/>diff vs. stated intent"]
end
subgraph T["Tooling"]
direction TB
g6["6 · standards<br/>linters, architecture"] --> g7["7 · unit_tests<br/>the suite, executed"]
end
subgraph B["You, again"]
direction TB
g8["8 · bug_hunt<br/>recurring bug classes"] --> g9["9 · dedupe<br/>already exists?"]
end
g10(["10 · merge<br/>ddflow lands it"])
A --> X --> T --> B --> g10
classDef req stroke-width:3px
class g3,g7,g10 req
The phase pipeline. A phase wraps its tasks and checks the whole before it lands:
flowchart LR
p1["research<br/>the phase's open questions"] --> p2["tasks<br/>each runs its own<br/>ten-gate pipeline,<br/>in parallel where<br/>globs allow"]
p2 --> p3["unit_tests"] --> p4["bug_hunt"] --> p5["dedupe"]
p5 --> p6["live_test<br/>run the real thing"] --> p7["corrections"] --> p8["docs<br/>README and docs<br/>match the change"] --> p9(["merge"])
Details: The task pipeline · The phase pipeline · Parallelism and coordination · Crash recovery.
The append-only event log is the source of truth; everything else is a projection that
can be deleted and re-derived. The SQLite index, the markdown boards, the search index,
the recovery bundle — all disposable, all rebuilt by ddflow rebuild.
That single inversion is what makes the four hard properties fall out for free rather than needing to be engineered:
| You get | Because |
|---|---|
| Two agents on two branches never conflict | Each appends to its own file. Measured: a real two-branch merge resolves clean. |
| A crashed agent loses nothing | State is folded, never written. Nothing is half-updated. |
| The project rebuilds from the log | Operator prompts are events. |
| An edited history is detectable | Event ids are content addresses. |
The design decisions, with the probes that settled each, are in docs/RESEARCH.md. The two that most shaped it:
The README is the front door. The reference lives in docs/guide/, one file per audience; each heading keeps its anchor.
The workflow, the model and the pipelines: How work moves: rules, plan mode, the model, the task and phase pipelines, approval, cadences, jobs, loops, pins, and what is automated.
Adopting ddflow: install, wiring and existing history: Installing, Docker, wiring ddflow into an agent, adopting a project that already has history, keeping AGENTS.md true and what to do when a companion is missing.
Contributing: publishing, releases, CI, reviewers and testing: Publishing, cutting a release, what CI checks, reviewers, companion tools and the test suite.
The CLI and MCP surfaces: The standalone, MCP and AGENTS.md surfaces, and the command reference.
Configuration: How configuration works and the id schemes. The generated knob table lives there, under "All knobs".
Customisation and exports: What you can change per project, the macro and prompt layers, and exporting documents.
Recall, memory, lessons, research and bugs: What ddflow remembers and how it finds it again.
Reading the log, upgrading and recovery: The event log, its compatibility contract, upgrades, repairs, crash recovery and reconstruction.
Parallelism and coordination: Many agents, lanes, adaptive parallelism and one shared server.
Gitflow, pull requests and tags: Branches, pull requests, version tags, release lines and environment branches.
Generated from the code; never edited by hand (pins regenerate). The prose around each lives in the guides.
Every top-level command, with the first line of its --help. The list is generated from the
command parser (python -m ddflow.surfaces.command_table README.md rewrites it, and
ddflow pins regenerate does so after a merge), so a command added on another branch never
needs a line written by hand here.
| Command | What it does |
|---|---|
ddflow init | create .ddflow/ in this repository |
ddflow phase | add, list, complete or close a phase |
ddflow task | add a task |
ddflow split | split an item into sub-tasks in place, keeping its id and history |
ddflow resolve | settle a CONTESTED item (rival adds or claims from two clones), on the record |
ddflow update | change the fields of any record (task, phase, bug, lesson, research, decision, memory, session, rule… |
ddflow batch | apply many item edits in one all-or-nothing transaction |
ddflow rename | move an item to a new id (and phase), re-pointing every needs edge |
ddflow chore | commit or approve chore files (no reviewer) |
ddflow grant | record or list the operator's grants (extra review rounds) |
ddflow approvals | approval requests for operator-gated commands (a person answers) |
ddflow plan | check a proposed plan, filed it PROPOSED, confirm it, or lint the whole open queue |
ddflow next | what may start now (exit 2 = nothing ready or held, exit 1 = unknown --phase) |
ddflow claim | lease an item + create its worktree (exit 3 = refused) |
ddflow heartbeat | renew a lease |
ddflow release | give up a lease |
ddflow wait | sleep until an item (or anything) can be claimed; exit 2 = deadline, or waiting cannot help |
ddflow approve | a PERSON clears (or rejects) a human-approval gate — no MCP equivalent |
ddflow gate | run / record / inspect a gate |
ddflow complete | finish an item (exit 3 = gates not satisfied) |
ddflow abandon | stop work on an item without completing it |
ddflow remove | take an item out of the queue (recorded, not erased) |
ddflow block | see ddflow block --help |
ddflow unblock | release a blocked item back into the queue (exit 2 = not blocked) |
ddflow merge | merge an item's branch from the primary checkout |
ddflow pause | step away from an item you hold: commit the work, leave a note, give it back |
ddflow stop | leave: finish what the gates allow, pause the rest, leave no item RUNNING |
ddflow pr | pull/merge requests: what reviewers did ([flow].integration = pr) |
ddflow version | version tags: the next version, and cutting it |
ddflow promote | environment branches: move work one step downstream ([flow].environments) |
ddflow flow | how this project works: branching model, release lines, and every workflow choice with who made it |
ddflow brief | budgeted session-start pack |
ddflow external | dependencies on items in sibling repositories |
ddflow job | long-running processes an item waits on: run, add, list, end |
ddflow memory | operational facts about this machine/repo, shown at session start |
ddflow schedule | recurring jobs and triggers (alias ddflow jobs): list, show, search, due; ddflow job run is the detached… |
ddflow lesson | see ddflow lesson --help |
ddflow recall | 'have we been here before?' — search decisions, lessons, research, bugs, tasks and past prompts at once |
ddflow similar | 'is this already filed?' -- the existing bugs, tasks, lessons and other records most like a text, before you… |
ddflow dupes | 'is anything filed twice?' -- the near-duplicate PAIRS already in the log, skipping pairs already linked or… |
ddflow link | settle a near-duplicate pair: say how one record relates to another |
ddflow decision | architectural decisions: record and consult |
ddflow rule | project rules: add, edit, list, search, show, remove |
ddflow verify | re-derive the claims behind a done task, or sweep them all (exit 1 = one fails) |
ddflow ci | the CI parity gate: run the pre-push checks on the merge result |
ddflow onboard | run an onboarding stage: one report, propose by default… |
ddflow status | one answer to 'what is the state of this project?' |
ddflow research | see ddflow research --help |
ddflow bug | see ddflow bug --help |
ddflow session | see ddflow session --help |
ddflow correct | correct a wrongly recorded value, history kept |
ddflow record | records of a data-declared kind: record <kind> <verb> [id] [--set field=value] |
ddflow replay | reconstruct the decision history from the log |
ddflow recover | find crashed agents' work; --all --plan triages it (exit 2 = nothing) |
ddflow progress | work actually done, aggregated from the log |
ddflow loops | circular references and runtime loops (exit 2 = none) |
ddflow cleanup | classify ddflow worktrees/branches; --apply lands the safe ones |
ddflow doctor | integrity + health check |
ddflow rebuild | re-derive the index from the log |
ddflow render | regenerate the human-readable views |
ddflow board | see ddflow board --help |
ddflow show | see ddflow show --help |
ddflow report | the completion report of an item, from the log (shas, tests, gates, overrides) |
ddflow config | print every knob, its value and its source |
ddflow upgrade | what upgrading this project to the running ddflow would change (the plan; writes nothing; exit 0 up to date… |
ddflow export | documents generated from the log: list, print, enable, disable, --diff, --check, --update |
ddflow bisect | find which earlier test file makes a test fail only in full-suite order (exit 0 = found, 2 = nothing to… |
ddflow cadence | which periodic passes are due (exit 2 = none) |
ddflow pins | which text of an instruction file a test pins; or pins regenerate re-records stale pin files |
ddflow queue | the merge queue: add an item, run the integrator, show the line, remove an entry |
ddflow tests | the tests your change reaches, and a parallel command to run them (exit 2 = none) |
ddflow precommit | propose a .pre-commit-config.yaml for this repository's stacks (writes nothing without --write) |
ddflow lanes | the lane ledger: each agent's state; lanes brief <lane>, lanes advise, lanes lead |
ddflow vigil | one compact health snapshot: bug severity counts, stale pins, active lanes, interrupted, pending approvals… |
ddflow health | idle, stalled, unresponsive, locked, crashed and runaway lanes; --run is the periodic watchdog pass |
ddflow decide | close a decide task: write its decision document from the record, land, complete |
ddflow completion | activate, install or uninstall ddflow completion |
ddflow docs | the mechanical documentation check: docs check [--diff BASE] |
ddflow metrics | metrics from the log: cycle time, review rounds, waits; forecast, retro <id>, skips |
ddflow reviewers | find, list and test cross-family reviewers |
ddflow review | run the configured reviewer(s) over an item's diff |
ddflow adopt | install ddflow into this project for one or more agents |
ddflow history | one timeline of everything that happened (exit 2 = nothing) |
ddflow workflow | the rules this project runs by, and how to change them (exit 1 = incoherent) |
ddflow help | what ddflow is, what it can do, and the workflow (try: ddflow help workflow) |
ddflow import | propose the existing project's work, lessons and decisions (exit 2 = nothing) |
ddflow companions | companion MCP servers that serve the gates (exit 2 = a default one is missing) |
ddflow harness | what each agent gets, at which fallback level, and what is broken |
ddflow model | the model catalog: a row with its provenance |
ddflow prompts | inspect and override the prompt templates |
ddflow hooks | install/inspect the enforcement git hook and the Claude Code session hook |
ddflow mcp | run the MCP stdio server over this repository |
ddflow search | search tasks, phases, bugs, research, decisions, lessons, sessions, prompts, rules, skills, agents, jobs… |
ddflow identify | who this shell is and which layer named it (declaring is --agent / DDFLOW_AGENT) |
ddflow list | list tasks, phases, bugs, research notes, lessons or sessions (what <kind> list shows); `search --query… |
ddflow archdeps | the external-dependency census: families, importing modules, home, violations |
ddflow changes | what changed in the log since you last looked: rules, decisions, lessons; binding first |
ddflow checkpoint | commit the event shards alone, mid-task, so a clone or pull sees the log |
ddflow constellation | the manifest of sibling projects: list, add, edit, remove, history, sync |
ddflow dispatch | the dispatcher's plan: what to start now, in order, on which lane (advise only) |
ddflow suggest | send a bounded change to the lease holder of an item, as a suggestion |
ddflow handoff | print the handoff pack: queue, fleet, what to resume with its command, pending asks, schedules, directives… |
ddflow lease | the lease holders and how long each has been quiet (idle ones flagged); the holders of lanes --coordinator |
ddflow main | is main green, red or unknown: the last verified sha, failing tests (known red / new), owner and fix task |
ddflow restart | soft upgrade: reload this MCP server's code and re-bind its tools, keeping the connection |
ddflow kill | hard upgrade: end this MCP server's process so your client respawns it fresh |
ddflow paths | workflow-path variants: directly-follows, top variants, burst overlap, superseded passes, out-of-order |
ddflow perf | perf of the host (fingerprint, measuring wrapper) and the perf report (window, filters, format) |
ddflow probe | would an item's branch merge clean with main or a peer? (exit 1 = conflict, 2 = could not tell) |
ddflow digest | the operator queue: what waits on a person, as askable entries |
ddflow roadmap | see ddflow roadmap --help |
ddflow pair | a PERSON mints a one-time code for a named client with a role (tokens redeem spends it) |
ddflow tokens | see ddflow tokens --help |
ddflow spawn | plan a worker agent (--plan: starts nothing) or start one from an approved template, detached (--run)… |
ddflow stacks | show the stack this repository resolves to and its build, smoke, lock-check and test commands |
ddflow submodules | git submodules: which exist, which are unusable in a tree, which an item's globs cross |
ddflow sync | merge the item's recorded base into its branch when that is safe; --check only measures |
ddflow tree | the dependency tree of phases, tasks and bugs: --item ID --up|--down, --critical, --phase P; text, --json or… |
ddflow deps | alias of ddflow tree: the dependency tree of phases, tasks and bugs |
ddflow verify-filed | check what a report says was filed: ids or a manifest (kind, phase, needs, tags) against the state; OK… |
ddflow watch | wait for a job, a file line, a process or a gate, renewing your leases; exit 2 = not yet (resume with the… |
ddflow waves | print the dependency waves; --stamp writes the derived wave:N tags, --check exits 1 when they are stale |
ddflow work | see ddflow work --help |
One canonical driver, templates/drivers/implement-phase.md,
plus a delta per agent covering only what genuinely differs: how iteration continues,
how to ask the operator, how to spawn a subagent, file-reference syntax.
Deltas rather than copies, for a measured reason: on the project this was extracted from, a reworded per-agent duplicate of the driver silently accumulated three instructions that were false at the time of writing while missing four gates the canonical file had gained. A delta removes the surface that can drift instead of policing it.
Both surfaces are one implementation — the MCP server maps each tool onto the same
cli.main() call in-process, and two tests plus a demo step assert they cannot diverge.
| Agent | Id | MCP config written by adopt | Hook style | Best level |
|---|---|---|---|---|
| Claude Code | claude | .mcp.json | claude | native hook |
| Gemini CLI | gemini | .gemini/settings.json | gemini | native hook |
| Codex CLI | codex | .codex/config.toml | claude | native hook |
| GitHub Copilot | copilot | .github/mcp.json | copilot | native hook |
| VS Code | vscode | .vscode/mcp.json | claude | native hook |
| Kilo | kilo | .kilo/kilo.json | plugin | plugin |
| Cursor | cursor | .cursor/mcp.json | cursor | native hook |
| Kimi Code | kimi | .kimi-code/mcp.json | claude | native hook |
| opencode | opencode | opencode.json | plugin | plugin |
| Z Code (GLM) (suspended) | glm | .zcode/config.json | not verified | nv |
| Qwen Code | qwen | .qwen/settings.json | claude | native hook |
| Google Antigravity | antigravity | .agents/mcp_config.json | antigravity | declared, not delivering |
| Devin | devin | .devin/mcp_config.json | claude | native hook |
| Qodo | qodo | mcp.json | not verified | nv |
| Tabnine | tabnine | .tabnine/agent/settings.json | gemini | native hook |
| Aider | aider | none | none | instruction text |
| Cline | cline | none | cline | declared, not delivering |
| Windsurf | windsurf | none | cascade | wired, not injected |
| Replit Agent | replit | none | not verified | nv |
| OpenHands | openhands | none | claude | native hook |
| Goose | goose | none | claude | wired, not injected |
| Sourcegraph Cody | cody | none | not verified | nv |
| dsh (DeepSeek Harness) | dsh | .ddflow/harness/dsh.cordis.yml | claude | native hook |
| Grok Build | grok | .grok/config.toml | claude | native hook |
| Mistral Vibe | vibe | .vibe/config.toml | toml_hooks | wired, not injected |
| Hermes Agent (Nous Research) | hermes | none | claude | wired, not injected |
One row per ddflow/harnesses/<id>.toml; ddflow harness show <id> says what each agent gets, event by event. To add an agent see docs/ddflow/adding-a-harness.md.
ddflow harness record <id> turns one live session into the payload fixtures the conformance suite replays; a tier-2 agent has a checklist a person walks under docs/ddflow/agents/checklist/.
CI, Make or a human need no row: the CLI is complete on its own.
The table is generated from the tool registry itself (uv run python -m ddflow.surfaces.tool_table README.md rewrites it, and refuses a table edited by hand unless
given --force) and a test fails when it differs, so its count, groups and tiers cannot
drift. The groups are the ones ddflow help prints.
Profiles ([mcp].tools; nothing a profile hides is removed: every tool and every old name stays callable):
lean (16 tools): the default ([mcp].tools = auto): the 9 hot singles and 7 familiesfamilies (24 tools): every family beside the hot singleshot+families (36 tools): the 12 most called direct tools as wellcore, standard and all: the flat tiers, every tool by its own nameFamilies: one tool with an action; the old tool name keeps working as a hidden alias, said once per session:
ddflow_gate (8 actions): status (was ddflow_gate_status), list (was ddflow_gate_list), run (was ddflow_gate_run), record (was ddflow_gate_record), verify (was ddflow_gate_verify), skip (was ddflow_gate_skip), ci (was ddflow_ci), tests (was ddflow_tests)ddflow_view (28 actions): queue (was ddflow_queue), board (was ddflow_board), progress (was ddflow_progress), loops (was ddflow_loops), status (was ddflow_status), render (was ddflow_render), list (was ddflow_list), history (was ddflow_history), cadence (was ddflow_cadence), pins (was ddflow_pins), lanes (was ddflow_lanes), metrics (was ddflow_metrics), health (was ddflow_health), docs (was ddflow_docs), archdeps (was ddflow_archdeps), changes (was ddflow_changes), dispatch (was ddflow_dispatch), handoff (was ddflow_handoff), vigil (was ddflow_vigil), paths (was ddflow_paths), perf (was ddflow_perf), digest (was ddflow_digest), roadmap (was ddflow_roadmap_review), rules_inventory (was ddflow_rule_inventory), stacks (was ddflow_stacks), submodules (was ddflow_submodules), tree (was ddflow_tree), waves (was ddflow_waves)ddflow_reviewers (10 actions): pr_sync (was ddflow_pr_sync), pr_status (was ddflow_pr_status), pr_threads (was ddflow_pr_threads), companions (was ddflow_companions), companions_verify (was ddflow_companions_verify), companions_add (was ddflow_companions_add), detect (was ddflow_reviewers_detect), list (was ddflow_reviewers_list), review (was ddflow_review), review_triage (was ddflow_review_triage)ddflow_ship (5 actions): version_show (was ddflow_version_show), version_cut (was ddflow_version_cut), promote_add (was ddflow_promote_add), promote_deployed (was ddflow_promote_deployed), promote_status (was ddflow_promote_status)ddflow_workflow (7 actions): flow_show (was ddflow_flow_show), flow_choose (was ddflow_flow_choose), show, pipeline (was ddflow_workflow_pipeline), gate (was ddflow_workflow_gate), drop (was ddflow_workflow_drop), state (was ddflow_workflow_state)ddflow_task (15 actions): phase_add (was ddflow_phase_add), split (was ddflow_split), add (was ddflow_task_add), research_add (was ddflow_research_add), update (was ddflow_update), remove (was ddflow_remove), resolve (was ddflow_resolve), phase_close (was ddflow_phase_close), batch (was ddflow_batch), fold (was ddflow_task_fold), rename (was ddflow_rename), phase_complete (was ddflow_phase_complete), phase_lift (was ddflow_phase_lift), correct (was ddflow_correct), schedule (was ddflow_schedule)ddflow_memory (11 actions): lesson_verify (was ddflow_lesson_verify), lesson_add (was ddflow_lesson_add), lesson_search (was ddflow_lesson_search), recall (was ddflow_recall), similar (was ddflow_similar), dupes (was ddflow_dupes), link (was ddflow_link), add (was ddflow_memory_add), list (was ddflow_memory_list), forget (was ddflow_memory_forget), lesson_show (was ddflow_lesson_show)ddflow_bug (10 actions): fixed (was ddflow_bug_fixed), invalid (was ddflow_bug_invalid), found (was ddflow_bug_found), file_tasks (was ddflow_bug_file_tasks), search (was ddflow_bug_search), dedupe (was ddflow_bug_dedupe), status (was ddflow_bug_status), duplicate (was ddflow_bug_duplicate), reopen, tagddflow_doctor (11 actions): recover (was ddflow_recover), cleanup (was ddflow_cleanup), replay (was ddflow_replay), rebuild (was ddflow_rebuild), verify (was ddflow_verify), verify_filed (was ddflow_verify_filed), bisect (was ddflow_bisect), hooks (was ddflow_hooks), check, precommit (was ddflow_precommit), record (was ddflow_record)ddflow_admin (15 actions): onboard (was ddflow_onboard), import (was ddflow_import), import_verify (was ddflow_import_verify), prompts (was ddflow_prompts), upgrade (was ddflow_upgrade), export (was ddflow_export), setup (was ddflow_setup), configure (was ddflow_configure), external_sync (was ddflow_external_sync), checkpoint (was ddflow_checkpoint), constellation (was ddflow_constellation), restart (was ddflow_restart), kill (was ddflow_kill), spawn (was ddflow_spawn), sync (was ddflow_sync)ddflow_decision (5 actions): add (was ddflow_decision_add), list (was ddflow_decision_list), applicable (was ddflow_decision_applicable), supersede (was ddflow_decision_supersede), show (was ddflow_decision_show)ddflow_session (10 actions): note (was ddflow_session_note), end (was ddflow_session_end), prompt (was ddflow_session_prompt), start (was ddflow_session_start), ask (was ddflow_session_ask), asks (was ddflow_session_asks), withdraw (was ddflow_session_withdraw), message (was ddflow_session_message), inbox (was ddflow_session_inbox), work (was ddflow_work_path)ddflow_lease (10 actions): abandon (was ddflow_abandon), release (was ddflow_release), wait (was ddflow_wait), block (was ddflow_block), unblock (was ddflow_unblock), suggest (was ddflow_suggest), pause (was ddflow_pause), stop (was ddflow_stop), probe (was ddflow_probe), watch (was ddflow_watch)ddflow_job (4 actions): run (was ddflow_job_run), add (was ddflow_job_add), list (was ddflow_job_list), end (was ddflow_job_end)ddflow_rule (7 actions): add (was ddflow_rule_add), list (was ddflow_rule_list), search (was ddflow_rule_search), edit (was ddflow_rule_edit), remove (was ddflow_rule_remove), sync (was ddflow_rule_sync), show (was ddflow_rule_show)| Group | Tool | Tier | What it does |
|---|---|---|---|
| Setting up | ddflow_companions | standard | Which companion MCP servers serve this project's gates, which are installed, which an agent launches. |
| Setting up | ddflow_companions_add | all | WRITES the agent config: registers companion MCP servers that are ALREADY installed (exit 3 for one that is… |
| Setting up | ddflow_companions_verify | all | Launch MCP companions and require a JSON-RPC answer to initialize. |
| Setting up | ddflow_configure | standard | Read or write .ddflow/config.toml (WRITES). |
| Setting up | ddflow_constellation | all | Manifest of sibling projects (.ddflow/constellation.toml): verb list, add, edit, remove, history, sync. |
| Setting up | ddflow_hooks | all | Inspect or install the enforcement git hook — the one layer of this workflow that does not depend on the… |
| Setting up | ddflow_identify | core | Declare WHO you are on this connection before anything that writes. |
| Setting up | ddflow_onboard | standard | The onboarding stages in one call: status (standing drift report), preflight, legacy, memory, test-gate… |
| Setting up | ddflow_precommit | all | A .pre-commit-config.yaml proposed for THIS repository: its stacks (Python, shell, Docker, JS, Go, Rust… |
| Setting up | ddflow_prompts | all | Inspect the prompt templates this project uses and where each comes from (shipped, project override, or… |
| Setting up | ddflow_rule_add | standard | Add a project rule; duplicate-checked like every add (answer new | extends:ID | duplicate_of:ID | related:ID). |
| Setting up | ddflow_rule_edit | standard | Change fields of an existing rule; omitted fields stay. |
| Setting up | ddflow_rule_inventory | all | Read-only inventory of the native rule, cross-agent and command files: per file which agents load it and… |
| Setting up | ddflow_rule_list | standard | List the project's rules, filtered by tag or scope: what governs the current work. |
| Setting up | ddflow_rule_remove | standard | Delete a rule file and regenerate the DDFLOW.md manifest. |
| Setting up | ddflow_rule_search | core | Search rules by title or content, ranked by relevance, for an area or topic. |
| Setting up | ddflow_rule_show | core | One rule with all its metadata: title, content, tags, scope, priority, globs, timestamps. |
| Setting up | ddflow_rule_sync | standard | Sync rule files with the log: record hand edits and new files, restore missing ones. |
| Setting up | ddflow_setup | core | Install ddflow into this repository: creates .ddflow/, writes the driver and the AGENTS.md section, and… |
| The rules this project runs by | ddflow_flow_choose | all | Record a workflow choice for this project, attributed to you, with a reason the next agent will read. |
| The rules this project runs by | ddflow_flow_show | standard | How THIS project works: its branching model, release lines, and every workflow choice (model, integration… |
| The rules this project runs by | ddflow_workflow | all | The rules THIS project runs by, in one answer: the gates every task and phase passes in order, the… |
| The rules this project runs by | ddflow_workflow_drop | all | Take a gate out of every pipeline -- task, phase and promotion -- and out of required, so it does not… |
| The rules this project runs by | ddflow_workflow_gate | all | Define or change one gate, optionally in a pipeline. |
| The rules this project runs by | ddflow_workflow_pipeline | all | Set the ordered list of gates a task or a phase must pass. |
| The rules this project runs by | ddflow_workflow_state | standard | One-call project overview: workflow, rules, decisions, active work, queue and bugs with names and… |
| Shaping the work | ddflow_correct | all | Correct a value recorded wrongly in a bug, lesson, research note, decision, memory, session, task or phase… |
| Shaping the work | ddflow_external_sync | all | Observe the items in SIBLING repositories that this queue depends on (needs = ['run_nemo_run:132.D']… |
| Shaping the work | ddflow_import | all | For a project that ALREADY HAS HISTORY and is adopting ddflow now: reads its todo checklists, lessons… |
| Shaping the work | ddflow_import_verify | all | Was this project's history imported, is that still true, and did anyone FINISH it? |
| Shaping the work | ddflow_phase_add | standard | Add a phase to the queue. |
| Shaping the work | ddflow_phase_close | all | Close a phase whose every task is done or abandoned, without a phase gate pipeline. |
| Shaping the work | ddflow_phase_complete | all | Retire a phase this project worked whose every task is done or abandoned, for a person directly and for an… |
| Shaping the work | ddflow_phase_lift | all | Remove ONE edge from an item's needs on purpose: a --reason is required, a decision and a… |
| Shaping the work | ddflow_remove | standard | Take an item out of the queue. |
| Shaping the work | ddflow_resolve | standard | Settle |