work
Execute one task end-to-end: pick it up, do the work, verify, mark complete, and commit.
Input
Optionally accepts:
- A task ID or name to work on a specific task (e.g.
/work 042or/work auth-refactor). - A task query to find a task by description or filters. This can be:
- Natural language — e.g.
/work something related to authenticationor/work a pending high-priority CLI task. - A
taskmdCLI command — e.g./work taskmd search 'auth' --filter status=pendingor/work taskmd next --scope cli --filter priority=high.
- Natural language — e.g.
- Custom instructions after the task identifier that should guide the implementation (e.g.
/work 042 use the new API client instead of fetch).
If no task ID or query is provided, the next available task is selected automatically.
Steps
Find the task.
- If the user provided a task ID or name, use that directly.
- If the user provided a
taskmdCLI command (starts withtaskmd), run it with--format jsonappended (if not already present) and--limit 1(if not already present) to get the top result. Extract the task ID from the output. - If the user provided a natural-language query (not a task ID and not a
taskmdcommand), translate it into an appropriatetaskmdcommand:- Use
taskmd search "<query>" --format json --limit 1for keyword/topic queries. - Add
--filterflags for any constraints the user mentioned (e.g. status, priority, scope, tags, effort). - Use
taskmd nextinstead oftaskmd searchwhen the user's intent is about priority or "what's next" within a filtered set. - Run the constructed command and extract the task ID from the output.
- Use
- If no input was provided, run
taskmd next --limit 1 --format jsonto get the highest-priority ready task. - If no task is found, tell the user there are no remaining tasks and stop.
Do the task. Invoke the
/do-taskskill with the task ID from step 1. If the user provided custom instructions, incorporate them into the work — they take priority over default approaches where applicable.Verify the task. Once the work is done, invoke the
/verify-taskskill with the same task ID. If verification fails, fix the issues and re-verify until it passes.Mark the task complete. Invoke the
/complete-taskskill with the task ID.Commit your changes. Invoke the
/commitskill to commit all changes with a conventional commit message.
Notes
- Only work on one task per invocation. If the user wants to continue, they can invoke
/workagain. - If a task is blocked by dependencies or cannot be completed, explain why and stop — do not skip to another task.