---
name: next-task
description: >
  Pick the next task to build and start working on it.
  Use when the user says /next-task, "what should I build next",
  "start building", "pick a task", or "next".
invocable: true
---

# /next-task — Pick and Start Next Task

Find the highest-priority unstarted task and begin the build.

## Steps

1. **Run `build_list`** — get the list of tasks with BUILD HANDOFFs.

2. **Pick the next task:**
   - If any task is **In Progress**, resume that one (don't start a new one).
   - Otherwise, pick the first **Backlog** task from the list (already priority-sorted).

3. **Show the user what you're picking** — task ID, title, and effort estimate. Ask for confirmation: "Starting task-XXX: [title] (effort: M). Go ahead?"

4. **On confirmation, run `build_execute`** with the task ID to start the build. This creates a feature branch and returns the BUILD HANDOFF with scope, acceptance criteria, and files to touch.

5. **Read the BUILD HANDOFF carefully** and begin implementation. Follow the scope — don't exceed it.

6. **After implementation, run `build_execute` again** with the report fields (completed, effort, estimated_effort, surprises, discovered_issues, architecture_notes) to complete the build.

## Notes

- If the build list is empty, tell the user: "No tasks with handoffs. Run `plan` to create the next sprint."
- If all tasks are In Review or Done, suggest running reviews or release instead.
