name: complete-task description: Mark a task as completed. Use when the user wants to mark a task as done or complete. allowed-tools: Glob, Read, Edit, Write
Complete Task
Mark a task as completed — no CLI required.
Instructions
The user's query is in $ARGUMENTS (a task ID like 077). If $ARGUMENTS is empty or does not contain a task ID, infer the task from conversation context (e.g., the task currently being worked on). If the task cannot be determined, ask the user which task to complete.
Find the task file:
- Read
.taskmd.yamlfor customdir(default:tasks) andworkflowmode (default:solo) - Use
Globfor<task-dir>/**/*$ARGUMENTS*.md - Read frontmatter to confirm the ID matches
- If not found, list available tasks
- Read
Read the task file to understand the full task scope:
- Get current status and verify fields
- Identify all subtask checklists (
- [ ]/- [x]items) in the task body - Identify any acceptance criteria section
Verify subtasks and acceptance criteria are met:
- Review each subtask checklist item — confirm the work has been done
- Review each acceptance criterion — confirm it is satisfied
- Check off (
- [x]) any items that are complete but not yet checked off by editing the task file - If any items are genuinely incomplete, report them to the user and ask how to proceed — do NOT mark the task as completed
Add a final worklog entry (if worklogs are enabled):
- Check
.taskmd.yamlforworklogs: true— only create worklogs if explicitly enabled; skip otherwise - If enabled, find or create the worklog file at
<task-dir>/<group>/.worklogs/<ID>.md(or<task-dir>/.worklogs/<ID>.mdfor root tasks) - Append a timestamped completion summary
- Check
Check the workflow mode from
.taskmd.yaml:Solo mode (default)
- If the task has
verifychecks in frontmatter:- For
bashtype: Run eachruncommand via Bash (in the specifieddiror project root) and check exit code - For
asserttype: Evaluate eachcheckby inspecting the codebase - If any check fails, report failures and do NOT mark as completed
- For
- If all checks pass (or no verify checks): Edit the frontmatter to set
status: completed
PR-review mode
- Edit the frontmatter to set
status: in-reviewinstead ofcompleted - Note to the user that in pr-review mode, the task completes when the PR is merged
- If the task has
Confirm the status change to the user
See SPEC_REFERENCE.md (in the plugin root) for valid field values, workflow modes, and verify check format.