| name | next-task |
| description | Get the next recommended task to work on. Use when the user asks what to work on next or needs a task assignment. |
| allowed-tools | Glob, Read |
Next Task
Find the next recommended task using priority ranking โ no CLI required.
Instructions
The user may provide optional filters in $ARGUMENTS (e.g. --tag mvp, --group cli).
-
Find the task directory:
- Read
.taskmd.yaml if it exists to check for a custom dir field
- Default to
tasks if not configured
-
Scan all task files: Use Glob with <task-dir>/**/*.md
- Exclude
.worklogs/ directories
-
Read frontmatter of each task file and collect: id, title, status, priority, effort, dependencies, tags, group, created, owner
-
Filter candidates:
- Include only tasks with
status: pending (or no status field)
- Exclude tasks whose dependencies include any task that is NOT
completed
- Apply any user filters from
$ARGUMENTS (e.g. --tag, --group, --owner)
-
Rank candidates using this priority order:
- Priority (descending): critical > high > medium > low > unset
- Effort (ascending): small > medium > large > unset (prefer smaller tasks as tiebreaker)
- Created date (ascending): older tasks first
-
Present the top recommendation:
- Read the full task file of the #1 ranked task
- Show: ID, title, priority, effort, tags, and the full description
- Optionally mention the next 2-3 runner-up tasks
See SPEC_REFERENCE.md (in the plugin root) for valid field values and ranking logic.