Skip to content

Zdev user guide

Zdev keeps development work in small Markdown tasks and leaves agent execution to your coding harness. This guide walks through one repository from installation to a completed, verified task.

For a shorter worked example, start with Your first zdev task. The command guide shows what to ask in chat, and the research guide covers experiments and measured optimization.

Versioned binaries are published on the latest GitHub release, with installation steps in the release notes.

To build from source with a Rust toolchain, install via Cargo:

Terminal window
cargo install --git https://github.com/zayenz/zdev --locked

From a local zdev checkout, use:

Terminal window
cargo install --path . --locked

Verify the binary:

Terminal window
zdev --version

Check the user-scoped integration for your harness:

Terminal window
zdev skill check codex --scope user

Replace codex with claude, opencode, pi, omp, or agy. Status ok means the integration is current; if it reports missing or conflict, install or refresh it:

Terminal window
zdev skill install codex

User-scoped integrations apply across repositories without requiring zdev to be initialized in each project first.

On your trunk branch, choose how the repository should store .zdev:

  • personal: keep the record local to this clone. Zdev adds /.zdev/ to .git/info/exclude, so it stays untracked and does not travel to other clones or collaborators.
  • project: keep .zdev visible to Git and commit it as shared, reviewed project history.
  • pull-request: track and review .zdev on the feature branch, then remove it with zdev cleanup squash right before a squash merge so it stays out of the final tree.
  • shadow: give .zdev its own Git history at .zdev/.git while keeping it excluded from the main repository, with shadow branches following the main repository’s branches. Add --shadow-remote <url> to push it elsewhere or clone it into another checkout. See zdev shadow.

Integration scope is independent of record policy. Once you have picked a policy, run:

Terminal window
zdev init --record personal # or: project, pull-request, shadow

Zdev records the current branch as trunk; change it later with zdev config trunk <branch>.

Inspect settings with zdev config show or zdev config get <key>, and change them with zdev config set and zdev config unset. Worker-setting changes print the command needed to refresh your integration rather than rewriting installed files behind your back. Run zdev config --help for the full list of keys, scopes, and values.

If you want a checked-in integration for the repository, install it after initializing:

Terminal window
zdev skill install codex --scope project --guidance auto

Replace codex with claude, opencode, pi, omp, or agy. Project installs place harness-native files under .codex, .claude, .opencode, .pi, .omp, or .agents. --guidance auto reuses a root AGENTS.md or creates .zdev/guidance.md; you can also pass agents, zdev, or a repository-relative Markdown path. After editing that guidance file, refresh and check the installation:

Terminal window
zdev skill install codex --scope project --force
zdev skill check codex --scope project

With a pull-request record, run zdev cleanup squash on the clean feature branch immediately before squash merge. It deletes only tracked .zdev files and creates one plain Git commit without a Zdev-Change-Id. The command requires a pull-request record, an attached feature branch, no Git operation in progress, and tracked .zdev files to remove. A normal merge or rebase that preserves feature commits keeps .zdev in reachable history.

An area groups one objective and its tasks. Under a personal, project, or shadow record, creating an area on the checked-out trunk puts it in trunk mode, which other trunk areas can share:

Terminal window
git switch main
zdev area create scheduling \
--title "Scheduling support" \
--objective "Add a tested scheduling API."

Trunk mode tracks project.trunk dynamically even if you later change it, while keeping task ownership scoped and leaving unrelated changes on trunk untouched.

For an isolated area on its own feature branch, switch to that branch first. Zdev binds the area to the checked-out branch whenever it is not the trunk:

Terminal window
git switch -c scheduling
zdev area create scheduling \
--title "Scheduling support" \
--objective "Add a tested scheduling API."

Pull-request records always create isolated areas. --branch <branch> and --trunk pick the mode explicitly, while workspace.branching controls the default when neither flag is given: on-request (the default) creates trunk areas on trunk and keeps implementation in the current checkout unless you ask for a branch or worktree, whereas isolated binds areas to the checked-out branch and runs implementation in a worktree:

Terminal window
zdev config set --global workspace.branching isolated

Zdev creates this layout:

.zdev/scheduling/
area.toml
brief.md
TASKS.md
tasks/

Shared decisions belong in brief.md. During area shaping or an authorized investigation task, reusable research can live as separate files under background/. Keep only readable, stable, source-backed material that later tasks will need, index every file from the brief, and link only the relevant files from each task. Skip transcripts, raw tool dumps, copied source files, temporary prototypes, and lifecycle metadata. The brief stays the authoritative synthesis, and each task owns its own outcome, boundaries, and done conditions. A standalone investigation stays report-only unless you ask to save its output.

For a larger area spanning several increments, add lightweight slice briefs as needed:

Terminal window
zdev slice create scheduling api \
--title "Scheduling API" \
--objective "Expose the scheduling model through a stable API." \
--boundary "Keep persistence out of this slice."
zdev slice list scheduling
zdev slice show scheduling api

Slice files live under .zdev/scheduling/slices/ and hold an objective and boundaries with no stored status. Tasks can name a slice, and zdev derives ready, blocked, and done counts from those tasks (including zeros for an empty slice). Unsliced tasks remain valid and count only in area totals; task selection lists the slice brief to read after the area brief.

Use .zdev/_notes/ for unfinished plans, future extensions, open questions, and collected research before deciding what to turn into an area. Save one file per topic or group related documents in nested folders:

.zdev/_notes/
search.md
remote-workers/
README.md
initial-plan.md
research/
harness-comparison.md
scheduling-options.md

Notes need no template, metadata, status, or index (a folder README.md is optional and handy for describing where to resume). Research can be collected there without curating it into area background first. Notes follow the repository’s record policy and stay outside area discovery and task selection.

Ask the skill in ordinary language:

Use zdev to add a note about remote workers.
Use zdev to save these research documents together in _notes/remote-workers/.
Use zdev to list notes.
Use zdev to list the contents of _notes/remote-workers/ recursively.
Use zdev to make an area from the remote-workers note folder.

These are skill routes rather than CLI subcommands. Adding a note saves the supplied material; listing notes is read-only and shows topic folders as collections by default. Turning a note into an area follows the standard area and brief workflow: useful source notes can be linked from the brief, stable research can move into indexed area background, and remaining material stays in _notes/ unless you ask to clean it up. Creating the area does not create tasks or start implementation.

If you regularly have small, unrelated improvements, keep them in a standing area tagged general. With a personal, project, or shadow record, run this on the checked-out trunk for a trunk area:

Terminal window
zdev area create general \
--title "General work" \
--objective "Keep concrete one-off improvements as reviewed tasks."

For an isolated area, run git switch -c general first so the same command binds the area to that branch.

Keep a short standing brief.md with your engineering boundaries, testing level, and validation commands, while giving each one-off task its own outcome, context, boundaries, completion conditions, and validation. Most one-off tasks stay unsliced; add a slice only when several related tasks share an objective.

For example:

# General work
## Objective
Keep concrete one-off improvements as reviewed tasks.
## Boundaries
- Give every task a useful outcome, clear scope, and observable done proof.
- Preserve compatibility unless an approved task says otherwise.
## Testing
Focused coverage. Match test work to the behavior or risk in each task.
## Validation
- Run the repository's standard validation before completion.

You can ask the harness to discuss a concrete one-off request and draft its task bundle in the same turn. When no product or testing decision remains open, it can go straight to exact-bundle review without a separate research or full-brief pass. After you approve that bundle (or delegate creation and import), the harness works on the recorded branch, runs proportionate tests, delegates independent review and verification, marks the task done, and commits the accepted changes. Area creation records the branch without switching to it.

Mention zdev, $zdev, or an existing .zdev area when asking your harness for help; generic requests such as “explore this idea” or “review this repository” do not activate zdev on their own.

Start by exploring the objective:

Use zdev to explore the scheduling objective and build up its brief.

Explore an objective starts in the current checkout, inspects the repository, weighs useful options, and drafts or updates brief.md (wayfind and shape are aliases once zdev is active). Before making an unrequested branch switch, new branch, or worktree, the harness asks which workspace you want and reuses any choice you already made. Exploration presents the brief for discussion and creates tasks only if you asked for them too. For non-trivial work, the usual next step is:

Use zdev to discuss the scheduling brief before we create tasks.

For implementation, the harness reuses any workspace you already selected. Otherwise it follows workspace.branching: under the default on-request, it implements in the current checkout and creates a branch or worktree only when you ask or when the route requires one (such as parallel batches, rolling research, or an assigned source worktree). Under isolated, it creates a worktree as the authoritative checkout and reports that path so you know where to inspect results. Read-only exploration always starts in the current checkout.

You can also ask for a separate source worktree for a single task. The worker edits and validates there, while integration, independent verification, task completion, and the final commit happen in the authoritative area checkout. If conflicts occur or work stops early, both locations are preserved for recovery.

In Codex, Claude Code, Pi, and capable Oh My Pi sessions, you can request a parallel batch of at least two named ready tasks. Before starting, you choose the task list, destination branch, permission to create task worktrees and branches, total worker-role limit, and cleanup preference. Zdev checks likely file overlap, shared interfaces, validation resources, repository instructions, and visible competing work. Compatible implementations can run in separate trees at the same time, while integration and verification still happen one task and one commit at a time. The default is four task slots, bounded by live harness capacity, reusing any destination and cleanup settings you already chose. OpenCode offers sequential implementation on its current foreground Task surface, and T3 orchestration runs sequential work only.

Discuss the brief reads the brief and indexed sources, resolves repository facts directly, and works breadth-first through the choices that could materially change behavior, scope, task splitting, or validation (grill is an alias). Each round asks one focused question by default, batching up to three independent questions through the harness’s structured question tool when available; an unanswered question is never treated as consent. Discussion tests settled decisions against concrete scenarios, updates the brief after each round, and stops once no consequential choice remains open.

Other active zdev intents route directly to Improve, Investigate, Create tasks, Implement, or Verify. After each interaction, zdev reports the result and useful next steps. You can also chain explicit actions in one message, such as “approve this exact bundle and then implement”, in which case zdev imports the unchanged approved bundle, validates it, and starts the next ready task if every implementation gate passes. Approval applies only to the artifact shown and never implies an unrequested next action.

Your harness renders a proposed task bundle for review with:

Terminal window
zdev tasks review scheduling --from - --format json

Zdev stores the bundle and its Markdown preview in local Git administrative storage, returning a review ID and file path in JSON. For non-trivial work, a fresh reviewer challenges that Markdown file; if it raises concrete revisions, the harness replaces the stored candidate. Focused corrections are rechecked by the same reviewer against the earlier findings and the full revised document, whereas material changes to scope, boundaries, dependencies, task splitting, or testing strategy get a fresh full challenge. Storing or challenging a candidate never approves it. By default, the harness shows only the final challenged document for your approval:

Terminal window
zdev tasks review scheduling --show

You approve the Markdown once, and the harness imports that exact stored revision with zdev tasks import scheduling --reviewed <review-id>.

You can also delegate that confirmation step: saying “create and import the tasks without asking me” authorizes import for the stated scope. The harness still challenges and validates the bundle, then imports it and reports the allocated tasks. That delegation carries through in-scope revisions and continuation, stopping only for choices outside it; creating tasks on its own still does not authorize implementation. An AFK task can also split into smaller tasks within its existing outcome, boundaries, and testing without asking again.

Zdev rejects content that differs from the reviewed bundle. If anything changed, the harness replaces the stored review and asks for approval again whenever you kept exact-bundle confirmation (delegated in-scope revisions need no second approval), without reconstructing or resending the approved document. For manual input, direct import still works: paste JSON into zdev tasks import scheduling --from - and press Ctrl-D, or pass --from path/to/tasks.json (which leaves the file in place). Zdev writes one Markdown file per task and regenerates TASKS.md; edit task files rather than the generated index.

Under project, pull-request, and shadow records, the harness adds --commit --format json to stored-review import, including for the initial task split, while personal records use ordinary import. Manual direct import also supports zdev tasks import scheduling --from - --commit --format json, and you can omit --commit under any policy when you want the additions left uncommitted.

An initial managed commit includes config, area metadata, the brief, referenced slice briefs, new task files, and the regenerated TASKS.md. When later approved work edits a tracked brief.md, leave it unstaged: the committed import validates and commits the brief alongside the new task files and TASKS.md, preserving any unrelated staged or unstaged changes. The JSON output returns task IDs, paths, commit hash, stable change ID, and the full ready frontier in stable task order.

In chat, ask your harness for one ready task:

Use zdev to implement the next task in scheduling.

The harness selects a task, implements it, runs validation, and sends the result to a fresh agent for independent review and verification. Once both checks pass, it marks the task done and commits the accepted changes, then stops. Use goal or loop when you want to continue across tasks automatically.

The commands below let you inspect or drive parts of that loop directly.

Check branch state and the next ready task:

Terminal window
zdev status scheduling --format json
zdev next scheduling --format json

The installed workflow replaces those two calls with one read-only snapshot:

Terminal window
zdev work-context scheduling --format json

For open work, work-context returns matching status and goal projections, HEAD, and exact staged, unstaged, and untracked evidence; for a validated closed area, it returns before branch and Git collection. The git_untracked map hashes untracked regular files and records targets for untracked symlinks so edits to new files invalidate a snapshot comparison. For an untracked nested Git repository, it records HEAD plus tracked and untracked changes, excluding ignored files.

To pass a compact reference between workers, store and compare the snapshot:

Terminal window
zdev work-context scheduling --store --format json
zdev work-context scheduling --show <snapshot-id> --format json
zdev work-context scheduling --compare <snapshot-id> --format json

--store saves the JSON in local Git administrative storage and returns a compact reference, --show prints the saved bytes, and --compare collects fresh context and reports whether anything drifted. Compare the snapshot or collect fresh state before every decision. Older open snapshots that lack untracked content hashes remain readable but compare unequal to fresh state, so capture a new snapshot before verification.

Given only an area, zdev ranks ready tasks by AFK suitability, priority, and numeric task ID. When you pass a fuzzy loop focus, every supported harness reads the full ready frontier, picks the closest fit, and re-evaluates after each commit.

When you drive a task manually, the harness should:

  1. implement against the task, area brief, and repository guidance;
  2. review and verify the result in a fresh, read-only agent context with separate specification and repository-standards checks;
  3. fix concrete findings and verify again; and
  4. stop on a real blocker or mark the task ready for completion once both checks pass.

While an authorized task is active, the coordinator can relax an incidental planner-written technical restriction if the agreed outcome requires a different helper or file. It checks the original baseline, explicit user constraints, compatibility promises, and ownership first, updates only the active brief or task, explains the adjustment, and captures fresh work-context. Changes to the outcome, acceptance criteria, explicit user constraints, or unclear ownership still go back to you, and pending reviewed task bundles still require approval of the exact revision.

The installed workflow handles completion and staging automatically. To perform those steps by hand, mark the task done and stage the accepted source paths:

Terminal window
zdev task done scheduling scheduling-001 \
--summary "Implemented and independently verified the scheduling model." \
--validation "Focused model tests passed."
git add <explicit-implementation-path>...

For a project or pull-request record, also stage the updated task file and index using the exact task path returned by zdev:

Terminal window
git add .zdev/scheduling/tasks/001-add-the-scheduling-model.md \
.zdev/scheduling/TASKS.md

For a shadow record, stage those paths inside the shadow repository (without the .zdev/ prefix); zdev commit then commits both repositories together:

Terminal window
git -C .zdev add scheduling/tasks/001-add-the-scheduling-model.md \
scheduling/TASKS.md

For a personal record, leave .zdev excluded. Commit the staged changes:

Terminal window
zdev commit -m "feat: add scheduling model"

Under project and pull-request records, zdev commit appends a stable Zdev-Change-Id trailer; personal and shadow records leave the main commit message untouched. Repeat zdev next until the open queue is empty. Exhausting the queue leaves the objective open, so close it explicitly after reviewing the result:

Terminal window
zdev area close scheduling
# If more approved work appears later:
zdev area reopen scheduling

Task bundles can set complexity to routine, standard (the default), or advanced. The harness never downgrades a task to routine on its own. advanced tasks get one read-only plan before the first edit, and every route keeps a fresh independent standard verifier.

Ask zdev to loop or set a goal for an area when you want continuation across tasks (both phrases invoke the same route). The harness reports each selected task and verified commit. Codex, Claude Code, and Oh My Pi continue natively, whereas OpenCode and Pi finish at most one task per invocation and return CONTINUE after a verified commit when ready work remains.

Inspect or look up a logical change after a rebase:

Terminal window
zdev change inspect HEAD
zdev change lookup Z0123456789abcdef...

You can also add tasks mid-loop using the committed-import command from step 6. Task-only commits do not interrupt the active task; the loop picks up the new tasks at the next zdev next.

Before selecting or completing work, require branch_status.task_work.safe in JSON status. If trunk advances while the checked-out branch, anchor, ancestry, and linear history remain intact, zdev prints one rebase advisory and lets ordinary task work continue. Rebase explicitly when you need newer trunk changes or are ready to integrate:

Terminal window
zdev area rebase scheduling

An explicit trunk area resolves project.trunk on every operation instead: it requires that branch to be checked out and safe, never asks for a rebase or freshness check, and still enforces exact area and task ownership when staging shared-trunk changes.

If Git stops on a conflict, resolve and stage the files, then continue or abort:

Terminal window
zdev area rebase scheduling --continue
zdev area rebase scheduling --abort

See the workflow reference for dependent areas, base anchors, verification rules, and recovery.

Codex uses one $zdev skill, collaboration agents, and a fresh verification context, installed under .codex/skills/zdev for project scope. Loop and goal requests use Codex’s native goal when clear and fall back to one verified task only if inspection proved clear while native goal creation is unavailable.

Start Claude Code from the repository root and accept workspace trust for a project installation. The integration installs one zdev skill, scoped implementer and verifier agents, and packaged workflows driven by the skill.

OpenCode installs one skill plus agents and route commands under .opencode, and discovers project skills even when started from a subdirectory. /zdev-plan <area> [planner-profile] plans the next task read-only. Loop and goal requests complete at most one task and return CONTINUE when ready work remains. Because OpenCode’s current foreground Task surface does not return coordinator control per completed child, its parallel command checks the surface before mutating anything, creates no worktrees, and offers sequential implementation instead.

Pi installs a skill, prompt templates, and the zdev_subagent extension under .pi. The extension spawns a fresh child Pi process for each implementation or verification handoff, carrying a frozen role, profile, model, and effort selection per item. /zdev-plan <area> [planner-profile] stops after one read-only planner. Its parallel prompt bounds initial planners and source implementers across assigned worktrees, returning one result at a time so Pi can integrate, verify, complete, and commit each task serially before continuing queued work. Goal and loop run the bounded one-task continuation route. User installs live under $PI_CODING_AGENT_DIR (or ~/.pi/agent when unset).

Oh My Pi is separate from plain Pi. It installs a skill and constrained native task agents under .omp and uses OMP’s built-in task and hub facilities. /zdev-plan <area> [planner-profile] runs one blocking read-only planner. The root skill’s goal and loop route checks for an unfinished OMP goal first; if none exists, it uses a native goal when available or falls back to one verified task, blocking if goal state is ambiguous. User installs live under $PI_CODING_AGENT_DIR (or ~/.omp/agent when unset).

OMP 17.2.15 can find the skill while missing user task agents when PI_CODING_AGENT_DIR relocates the user root. zdev skill install and zdev skill check warn about this; unset the variable or use a project install under .omp until upstream discovery is fixed.

Google Antigravity (agy) installs the zdev Skill under .agents/skills/zdev and its role subagents under .agents/agents/zdev-*/agent.md. The Skill is the workflow entrypoint: zdev keeps durable goal state in .zdev, while Antigravity’s invoke_subagent dispatches planner, implementer, and verifier agents. Antigravity workflows are a legacy surface migrating to Skills. User installs live under ~/.gemini/config (or $ANTIGRAVITY_CONFIG_DIR when set).

You can pick a named profile for one zdev interaction or an authorized multi-task run without changing your saved default. Zdev resolves concrete role settings at the start and holds them fixed through retries and continuation, while a one-off role override applies only to that logical step. Task complexity selects the implementation role, not the profile.

In Codex, “plan next task with advanced planner” selects and snapshots the next ready task, writes a read-only plan using the chosen planner model and effort, and stops. A later implementation request rechecks that exact task and reuses the plan only while its requirements and baseline still match.

Run zdev --help or zdev <command> --help. The task format documents every task field.