SHEPHERDdocs Search the docs/ v0.5.3-beta
On this pageThe task workflow: `shepherd run`Keep track of work with tasksReview and approve an agent's work

Tasks and gates

A task is a specification with acceptance criteria; gates are where you decide.

Works inDesktop appTerminal UICLI

The task workflow: shepherd run

For a task in .shepherd/tasks:

  1. Plan: the brain splits the task into subtasks (task plan <id> --save stores it). With workflow.confirm: true it waits for shepherd approve <id> plan.
  2. Implement: one coder per subtask, each in its own worktree.
  3. Review: up to max_review_rounds rounds with a reviewer from another vendor.
  4. Checks: your workflow.checks, or ones detected from the language.
  5. Publish: push and a draft PR with gh, only after you approve (approve <id> <n>) or with --auto-push. Protected branches (main, master, develop) are never published from.

Reject with shepherd reject <id> plan|<n> --reason "...". Stop a task's run with shepherd cancel <id>: it closes the agents linked to the task and marks it cancelled, and work already committed stays on its branches. shepherd git publish <branch> pushes a branch and opens its PR only when its subtask is waiting for your approval. Follow progress with shepherd runs list or the Runs view.

workflow:
  max_review_rounds: 3     # 0 disables review
  confirm: true            # require plan approval
  base_branch: main
  checks: ["go vet ./...", "go test ./..."]
  draft: true

Keep track of work with tasks

$ shepherd task new "Add login" --description "A login form" --criteria "tests pass"
created task 1-add-login
.shepherd/tasks/1-add-login

$ shepherd task new "Fix logout" --description "Logout leaves a cookie"
created task 2-fix-logout

$ shepherd task list
ID	STATE	TITLE	ISSUE	PR
1	new	Add login	-	-
2	new	Fix logout	-	-

Bring work in from GitHub instead of typing it (needs gh):

shepherd task import 128                    # an issue number in this repo
shepherd task import https://github.com/you/repo/issues/128

Put a finished one away, or remove it for good:

$ shepherd task archive 2
archived .shepherd/tasks/_archive/2-fix-logout

$ shepherd task delete 2 --archived --confirm
deleted task 2-fix-logout

Without --confirm, delete refuses and says it cannot be undone. In the app: Tasks, then the buttons on a task. In the terminal UI: tab 2, a archive, D delete.

Review and approve an agent's work

shepherd run 1                              # the task workflow: plan, code, review, checks (REAL AGENTS)
shepherd approve 1 plan                     # let the plan go ahead
shepherd reject 1 2 --reason "missing tests"
shepherd approve 1 2                        # approving a subtask pushes it and opens the PR
shepherd cancel 1                           # or stop it: closes the task's agents, keeps committed work

In the app: Runs, the gate strip has Approve and Reject with a reason box. In the terminal UI: tab 3, a and d.

Was this page useful?Suggest an edit on GitHub