Claude Code
FullReference implementation with native slash commands. Behavior-tested.
Spec-first · closed-loop
Your repository holds the plan, the context and the checks, so the work survives restarts, moves between agents and keeps looping until every gate passes — within the authority you grant.
Copy the init.md prompt and paste it into your coding agent — Claude Code, Cursor, Codex, or any other — to make any repository AI-first.
Four pillars
The plan is the durable source of truth: atomic tasks, acceptance criteria, and validation gates the agent must pass.
Context, tools, guardrails, and state live in the repository as plain files any agent can read.
Plans run to their end: registration, a human-started daemon, nudges that add no authority, failover, and plan events.
Instruction bytes per flow, measured and published with their method — never invented token percentages.
The problem and the answer
A coding agent performs beautifully on short tasks. But hand it a long-horizon mission — a migration, a new subsystem, a refactor at scale — and drift sets in: the context window fills, earlier decisions fade, and hours of work stall halfway through.
Deep Work Plan answers spec-first: a durable plan, atomic tasks, and validation gates the agent must pass. Done stops being a feeling — it becomes verifiable, reviewable evidence. Loop engineering then keeps the plan moving until those gates are passed.
Context is your agent’s scarcest resource, so the harness keeps its own instructions lean and auditable. Instructions load progressively, validation follows the changes, and each task gets the context relevant to its work. We publish the instruction load for each flow in bytes, making that overhead visible. Plans scale to the work too: Lite for a bounded fix, Full for work that spans hours. The format follows the scope, keeping the process focused and traceable.
You decide what done means and where the lines are. The plan carries your intent; the agents do the hours — no babysitting, no correcting every twenty minutes.
Read the methodology →
Humans steer. Agents execute.
Long tasks fill any model's context. Details fall away and the agent drifts. A written plan — atomic tasks, validation gates, resumable state — is what it returns to, lap after lap.
See the core loop →
A plan agents can't drift from.
Each task names its acceptance criteria and the checks that must pass. The agent doesn't get to feel finished — it has to pass, or the task stays open.
Read the specification →
Done is a contract, not a vibe.
Context, tools, guardrails, and state live in your repository as plain files any agent can read. No lock-in, no external brain — it survives context resets.
See what onboarding generates →
The repository is the harness.
Context is the scarcest resource your agent has. The harness loads progressively, validates what changed, and learns task by task — with every flow’s instruction load measured and published, release after release.
Read the methodology →
Every token counts.
Loop engineering
Loop engineering is how a plan finishes without a human polling it. Rows below describe released contracts in the loop: most come from herdr-peers, while the plan queue is a pack contract. Herdr is optional; the methodology works without it.
Spec-first says what; the harness says where; loop engineering says how it finishes.
The loop
lead claim Lead and succession autopilot --loop Started by a human idle ≥ 5 min Adds no authority lead takeover First reachable successor plan-event-v1 To the human’s command plan_completed Gates passed Every open plan with a lead record, until its own state says done.
| Contract | What it guarantees | Source |
|---|---|---|
Plan registration herdr-peers lead claim | A plan the loop watches has a lead record with an epoch and a succession. Only the holder of the highest epoch acts as its lead. | herdr-peers v2.2.2 skills/herdr-peers/protocol.md §12 |
Human-only start herdr-peers autopilot start --loop | Only a human starts the daemon, in their own words. No ask, reply, or notice can start it, stop it, or change what it does. | herdr-peers v2.2.2 skills/herdr-peers/autopilot.md §1 |
Nudges add no authority plan_stalled | The idle lead of an open plan gets one fixed prompt to continue. Gates, stop conditions, and escalations bind as before; three prompts without progress mark the plan stalled. | herdr-peers v2.2.2 skills/herdr-peers/autopilot.md §5.2–5.3 |
Failover to successors herdr-peers lead takeover | Successors take over through the fenced lead-takeover check. A lane can be appointed only with a grant the human recorded in advance. | herdr-peers v2.2.2 skills/herdr-peers/autopilot.md §5.2, §7 |
Plan events plan-event-v1 | When a plan stalls, blocks, loses its lead, starts from the queue, or completes, a command the human chose receives one plan-event-v1 object. The pack ships a Dailybot notifier for it. | herdr-peers v2.2.2 docs/schema/plan-event-v1.json |
Fleet map plans-v1 · fleet-v1 | Each machine reports its plans as plans-v1; the daemon keeps the fleet-v1 map of every machine, agent, repository, and plan, and fleet ui shows it read-only. | herdr-peers v2.2.2 docs/schema/fleet-v1.json |
Plan queue dwp-queue-v1 | The pack validates and writes the dwp-queue-v1 queue; the daemon reads it to continue queued plans. | deepworkplan-skill v8.0.6 skills/deepworkplan/shared/queue.py |
Lead verify herdr-peers lead verify | Before any merge, tag, or release, the lead confirms it still holds the plan on every machine. A newer lead refuses it; an unreachable machine stops it unless that risk is accepted on record. | herdr-peers v2.2.2 skills/herdr-peers/protocol.md §12 |
The decision brain (--brain) and lead appointment (--appoint) are opt-in flags of the same daemon, each switched on by a human. The daemon never merges, releases, signs in, or changes a permission.
Read the Herdr addon →Measured efficiency
The harness publishes what each flow must read before it starts: the router, the sub-skill, and the shared resources it links. These are the compulsory read sets of the released pack.
Provider tokens, cost, and loop-closure statistics are not shown: no tagged source measures them yet, so they have no row. The script’s bytes ÷ 4 token figure is a labeled estimate, never a measurement.
Read the evaluation ledger →| Flow | Entry bundle (bytes) |
|---|---|
create | 74,974 |
execute | 55,136 |
resume | 32,023 |
refine | 77,014 |
onboard | 82,051 |
status | 27,311 |
verify | 36,701 |
bash tests/efficiency/measure-instruction-load.sh deepworkplan-skill v8.0.6 Reasoning-based onboarding
The onboarding flow inspects your repository's actual languages, frameworks, package manager, and validation commands, then generates artifacts adapted to that repository. A generic stub is treated as a failure.
Reads manifests, folder layout, and CI to infer the real test, lint, and build commands, then classifies the repository as an individual repo or an orchestrator hub.
A reasoned AGENTS.md, a categorized docs/ hierarchy, and a README plus docs/ inside each major module — filled with your repository's real commands, not placeholders.
A cross-agent .agents/ directory (skills, agents, commands) and the .claude and .cursor to .agents symlinks, so every tool reads one source of truth.
Wires the Deep Work Plan skill and creates the gitignored .dwp/ folder for plans, installs the required AI Diff Reviewer local review, then optionally layers opt-in addons such as devcontainer support.
What happens when you run it
You do not pick an install method or copy a template. You hand your agent one line; it installs the skill — the reusable engine — and adapts your repository to it.
It reads the onboarding prompt at deepworkplan.com/init.md and the methodology, specification, and kit it links to — the standard it is about to adopt.
The skill is the engine — the same in every repository. One command pulls in the router and its sub-skills (create, execute, refine, resume, status, verify, onboard, author, upgrade) for Claude Code, Cursor, Codex, Gemini, and Copilot.
Reasoning about your real stack — never copy-pasting — it writes AGENTS.md, a categorized docs/ tree, per-module READMEs, a reasoned .agents/ kit, and a gitignored .dwp/. Your repository becomes the harness.
Generate long-horizon Deep Work Plans for any task and run them step by step, with explicit acceptance criteria, validation gates, and resumable state — autonomously, for hours.
Optional, with the Herdr addon: you — never an agent — run herdr-peers autopilot start --loop. Every open plan with a lead record keeps running to its end, and your notifier hears when one stalls, blocks, or completes.
The skill is installed identically everywhere; what is adapted is your repository — the AGENTS.md, docs, and reasoned .agents/ kit generated for your stack. That split is what makes the methodology a reusable standard rather than a one-off scaffold.
What you get
One run, committed atomically. Every output is Markdown and every change is auditable.
Reasoned from your repository's actual stack, commands, and structure — not a template with placeholders. CLAUDE.md is symlinked to AGENTS.md.
Architecture, setup, standards, and troubleshooting — plus a README and docs/ inside each major module, generated from your codebase.
A cross-agent .agents/ directory (skills, agents, commands) with the .claude and .cursor to .agents symlinks so every tool reads one source of truth.
create, execute, refine, resume, status, verify, onboard, author, and upgrade — available to your agent as a single skill pack, with no per-repository copy.
/dwp-verify produces an objective pass/fail report against the specification, so "AI-first" is verified, not asserted — and re-verifiable after every plan.
Onboarding classifies your repository as an individual repo (the common case) or an orchestrator hub that coordinates child plans across repositories.
The author sub-skill (skill-create, agent-create) lets the repository evolve its own skills, agents, and commands; opt-in maintenance add-ons such as dependency-upgrade help it keep itself up to date.
The methodology itself needs no daemon and no external state. Plans land in a gitignored .dwp/ folder, and any task resumes from git alone — even after context overflows. The optional loop daemon adds continuity, never a dependency.
Coordinate parallel agents safely with isolated worktrees, asserted-until-gated evidence, capacity handoff, and optional pinned ecosystem addons (agentkit, Herdr, devcontainer, Vim, AI Diff Reviewer).
Agents
One methodology, many adapters. Markdown couples the framework to nothing — every agent that reads Markdown can run a Deep Work Plan.
Reference implementation with native slash commands. Behavior-tested.
Full adapter through project rules and the .cursor → .agents symlink. Install-tested.
Full adapter through AGENTS.md and # command procedures. Behavior-tested.
Full adapter: dwp-* commands run through AGENTS.md and # procedures. Install-tested.
Full adapter through AGENTS.md and # command procedures. Install-tested.
Open source. Reads AGENTS.md natively and runs dwp-* through # commands. Install-tested.
Rules plus # command procedures drive the full Deep Work Plan loop. Install-tested.
Open source. Markdown rules and # commands run every dwp-* step. Install-tested.
Full adapter with markdown command procedures. Install-tested.
Stacks
These are reasoning aids, not templates. Onboarding reads your repository's real manifests and adapts per stack — it never blind-copies a preset. Monorepos get per-module docs.
Two archetypes
Onboarding forks on the archetype. Most repositories are individual repos. A hub coordinates child Deep Work Plans across many repositories. The methodology handles both as first-class.
Individual repository
one self-contained codebase
Orchestrator hub
coordinates sub-repositories
A single codebase with one primary stack, its own validation commands, and per-module docs. The default — onboarding assumes it unless the repository is clearly a hub.
For example, a Django API, a Vue app, or a TypeScript Lambda service.
A coordination repository that orchestrates work across sub-repositories via an orchestrator manifest, spawning child plans that each commit in their own repository, plus boundary rules and a navigation index.
For example, a hub coordinating five product repositories.
Methodology versus tool
Deep Work Plan is not another scaffolder. It is the methodology layer underneath any spec-driven or scaffolding tool, focused on multi-hour autonomous runs.
| Methodology versus tool | Deep Work Plan | Scaffolding / spec tools |
|---|---|---|
| Primary focus | Multi-hour autonomous execution | Spec or scaffold generation |
| Unit of work | A Deep Work Plan (resumable session) | A spec document or a scaffold |
| State model | Git-native .dwp/ folder, resumable | Often external or in-IDE |
| Agent coupling | Agent-agnostic (Markdown and Bash) | Often tool- or IDE-specific |
| Context recovery | Resumes after context overflow | Typically restarts the task |
| License | MIT, open methodology and kit | Varies |
Origin
Built by Dailybot — the company behind asynchronous standups for distributed teams. Internally we used Deep Work Plans to make production repositories spanning Django, Vue, TypeScript Lambda, and Astro agent-pilotable. After months of production use, we open-sourced the methodology under MIT.
Make your repository AI-first
Hand your agent one line — point it at /init.md — and it makes your repository AI-first: it installs the skill, reasons about your stack, and commits a complete AGENTS.md hierarchy. From there you create and execute Deep Work Plans that run autonomously for hours.
For agents & developersMIT-licensed · zero telemetry · outputs to a gitignored .dwp/ folder.