A feature from idea to commit
Suppose you have a query tool that prints a table in the terminal, and you want other programs to consume its output. Asking to “add JSON export” leaves several practical choices open: what shape should the JSON have, should it go to standard output or a file, and what should happen if an output file already exists?
This walkthrough follows that feature from a rough idea through discussion, task creation, implementation, independent review and verification, and commits. The query tool is a fictional example; adapt the prompts and checks to your own codebase. It assumes zdev and your harness integration are already installed and the repository is initialized (see Your first task if you need that setup).
As elsewhere in this manual, you can run the terminal commands yourself or ask your agent to run them. The sample agent replies show the kind of summary to expect rather than a fixed format.
Give the idea an area
Section titled “Give the idea an area”Starting from a clean checkout of your base branch, create a feature branch and an area for the work:
git switch -c result-exportzdev area create result-export \ --title "Export query results" \ --objective "Let other programs consume query results as JSON."Then ask the agent in chat to explore the repository and draft a brief:
Use zdev to explore result-export. Our query tool prints a table today.We want JSON output for use by other programs, with an option to save itto a file. Inspect the current output and argument handling, then helpdefine the behavior and validation. Preserve the default text output.Stop after the brief; do not create tasks or implement yet.The agent inspects the codebase and writes .zdev/result-export/brief.md,
capturing the intended behavior while flagging open decisions that need your
input. It should build on the repository’s existing CLI argument parsing and
serialization rather than replacing them.
A first reply might look like:
Brief saved to .zdev/result-export/brief.md. Default text output is preserved.Still to decide: JSON shape and whether file output may overwrite a file.No tasks created yet.Discuss the behavior before the task split
Section titled “Discuss the behavior before the task split”Next, have the agent challenge the draft brief:
Use zdev to discuss the result-export brief. Work through the JSON shape,empty results, query failures, file output, and existing destinations.Recommend behavior that fits the current CLI, and settle the validationwith me before creating tasks.Expect concrete questions with a recommendation, such as: “Should an existing output file be an error? I recommend that for this change so export cannot overwrite data silently.” Suppose the discussion settles on:
--format jsonwrites an array of row objects to standard output, using[]for an empty result and JSONnullfor missing values.- Text output stays the default; query failures write diagnostics to standard error and exit nonzero.
--output PATHwrites JSON to a new file while leaving standard output empty, errors if the destination already exists, and is only allowed with--format json.- Validation covers representative result fixtures, the existing CLI checks, and temporary files for the destination cases.
Those decisions, along with project-specific edge cases such as duplicate column
names, belong in brief.md. Internal helper names can wait until
implementation. Once everything is settled, the agent records the decisions in
the brief.
Review and import the tasks
Section titled “Review and import the tasks”With the brief settled, ask for a task bundle:
Use zdev to create tasks for result-export from the agreed brief.Each task should leave a useful, checked result. Show the proposed bundlebefore importing it.A clean split here has two tasks:
| Task | Result | Depends on |
|---|---|---|
| JSON output | Add --format json, help and usage documentation, and the agreed result and error checks. Preserve default text output. |
Nothing |
| File output | Add --output PATH for JSON, document it, and check new files, existing destinations, write failures, and standard output. |
JSON output |
The first task stands on its own because downstream tools can already read standard output, and the second layers file writing on top without changing the JSON shape. A smaller feature might fit in a single task; split work when each piece can be verified independently.
Read the proposed bundle carefully (boundaries, done conditions, dependencies, and validation) and ask for adjustments if anything looks off. Once the displayed version matches what you want, approve it:
Import this exact task bundle for result-export. Stop after import.Zdev assigns task IDs, writes the task files, and regenerates TASKS.md,
stopping without starting implementation. Under project, pull-request, or
shadow records, the import commits the planning files in the appropriate
repository; under a personal record they remain untracked locally.
An import reply might read: “Imported result-export-001 (JSON output) and result-export-002 (file output, depends on 001). Task 001 is ready; implementation has not started.”
Implement one task, then review and verify it independently
Section titled “Implement one task, then review and verify it independently”Start with one task so you can check how the first slice lands:
Use zdev to implement the next task in result-export.Stop after its verified commit.The coordinator checks branch safety and local edits, selects the ready task, and delegates implementation. (Follow the checkout or worktree path it reports.) The implementer reads the brief and task, makes the change, and runs the agreed validation: JSON formatting, empty results, error paths, and the unchanged default text output.
A separate verifier then inspects the change in a fresh context against the task, the brief, and the repository’s coding guidelines, and runs the required validation. Passing the JSON case does not excuse a regression in default text output. If the verifier reports required corrections, the implementer gets one correction pass and a focused recheck; if required issues remain, the task stays open with the work preserved so you can decide how to proceed. Any requirement change that alters scope should be settled before continuing.
Because independent review and verification are built into implement, you do
not need separate review or verify prompts in this flow. The standalone
Verify command is for checking an existing implementation
without committing it.
Inspect the commit, then continue
Section titled “Inspect the commit, then continue”Once verification passes, the coordinator marks the task done and commits the
accepted changes, adding a Zdev-Change-Id trailer under project and
pull-request records (while personal and shadow records keep zdev out of
the main history). Expect a report naming the task, validation, verification
result, checkout, and commit:
Completed result-export-001: JSON output, help, and usage documentation.Validation: agreed CLI checks passed; default text output preserved.Independent verification: passed requirements and coding-guideline review.Commit: <commit-id>, in the reported result-export checkout.Next: result-export-002 is ready. Stopped after one task.In that checkout, inspect the record and commit:
zdev status result-exportzdev tasks list result-exportzdev next result-exportgit log -1 --format=fullgit show --stat HEADYou should see result-export-001 marked done and result-export-002 ready.
Run the second task with the same request:
Use zdev to implement the next task in result-export.Stop after its verified commit.That task goes through its own validation, independent verification, and commit. If you would rather run through the entire approved queue unattended, use goal or loop instead.
When both tasks are complete, check the finished behavior against the brief. Finishing the queue leaves the area open until you close it:
zdev area close result-exportFrom there, merge the feature branch through your repository’s normal review and release process. The accepted source commits live in Git history, while the planning record stays local, in its shadow repo, or alongside them according to your record policy.
For open-ended work where the right solution has to be discovered by measuring candidates, continue to Research toward an open-ended goal.