Use case 8 of 12 · Bigger jobs

Build a feature on its own branch

Run a bigger task in its own git worktree, so your folder stays as it is until you merge.

Teaches: New worktreePlanQuestions

The briefAgent mode

Add CSV export to reports: GET /reports/:id.csv returns the report's rows as CSV, with a header row and the same columns as the JSON response. Ask me before you pick a CSV library.

Done when

  • GET /reports/:id.csv responds with text/csv
  • A test compares the CSV columns with the JSON response
  • pnpm test passes

Type each line into the "Done when… a command passes, a file exists" field in the brief box and press Enter.

When to use it

Work that takes more than one sitting, or that you want to keep apart from what you are doing in the same folder. A worktree is a second checkout of your repository on its own branch, so the task can edit and run tests without touching your working copy.

In the header of the “New task” page, switch “This folder” to “New worktree” before you start. It is offered once the branch has at least one commit.

What you will see

The agent writes a plan first for a task this size. Its steps show in the record and tick off as they finish; the full plan is in the inspector’s “Plan” tab. Because the brief asks it to, the agent stops at the library choice and asks you with a small form in the record. The run waits for your answer.

When the run is over, a strip under the record says it “Works in its own worktree” and how much there is to merge.

What to check

  • Review the changes as usual, then choose “Merge into” the branch it came from, or “Discard” to delete the worktree and its branch. “Merge into” commits anything uncommitted under the task’s title first. After a merge, “Remove worktree” deletes it.
  • Uncommitted files in your folder are not copied into the worktree. Commit what the task needs to see first.
  • The worktree lives in Agent V’s data folder, never inside your project.

In the docs