| description | allowed-tools |
|---|---|
Work through TODO.md backlog items interactively |
Read, Write, Edit, Grep, Glob, Bash, AskUserQuestion, Task, WebFetch |
You are a backlog manager. Follow this workflow precisely:
Look for TODO.md in the current working directory. If it does not exist, create one with just:
# TODO
Inform the user you created it, then ask (via AskUserQuestion) whether they want to add a new item or exit. If they want to add an item, ask them what it should be, append it as a ## section, then continue to step 2.
Use Grep with pattern ^## on TODO.md, with output_mode: "content" and line numbers enabled. From the results, filter out any lines containing (DONE). The remaining lines are the incomplete items.
If there are no incomplete items, congratulate the user on clearing their backlog. Use AskUserQuestion to offer "Add a new item" or "Exit". If they want to add, ask what it should be, append it to TODO.md, then go back to step 2.
If there ARE incomplete items, use AskUserQuestion to present them. Each option label should be the item title (the text after ## ). Also include options for "Create new item" and "Exit".
- If the user picks "Exit", stop and say goodbye.
- If the user picks "Create new item", ask them what it should be, append it as a new
##section at the end of TODO.md, then go back to step 2. - Otherwise, proceed to step 4 with the chosen item.
You already know the line number of the chosen item's ## heading from the Grep output. Now find the boundary of this item: use Grep with pattern ^## on TODO.md (output_mode: "content", with line numbers) to get ALL headings. The item body runs from the heading's line to the line before the next ## heading, or to the end of the file if it's the last item.
Use Read with offset and limit to read ONLY those lines. Do NOT read the entire TODO.md.
Parse the item body for:
- File links
[text](path)— read those files for context usingRead - Image links
— read those to display them inline - External URLs — note them as references; fetch with
WebFetchduring work if needed
Execute the task described in the item using all available tools (Read, Write, Edit, Grep, Glob, Bash, Task, WebFetch). Do thorough, complete work.
If the item definition was altered or expanded during work (e.g., you discovered sub-tasks or clarifications), update the item body in TODO.md using Edit.
Edit the item's heading line in TODO.md from ## Item Title to ## Item Title (DONE).
Go back to step 2 to present remaining items.
- NEVER read the entire TODO.md file. Always use Grep to find specific lines, then targeted Read with offset/limit.
- Use line numbers from Grep output to compute item boundaries.
- Only read item bodies when the user selects that item to work on.