next
Scannednpx machina-cli add skill endlessblink/master-plan/next --openclawWhat's Next?
Analyze MASTER_PLAN.md tasks, score by priority/status, and let the user pick interactively.
Triggers
/master-plan:next- Main command- "what should I work on", "pick a task", "next task", "what's next"
Arguments
| Argument | Filter |
|---|---|
bugs | Only BUG-XXX tasks |
progress | Only IN PROGRESS tasks |
planned | Only PLANNED (backlog) tasks |
review | Only REVIEW tasks |
active | IN PROGRESS + REVIEW |
all | Include DONE tasks |
Example: /master-plan:next bugs or /master-plan:next planned
Workflow
Step 1: Find MASTER_PLAN.md
Search for the plan file in order:
docs/MASTER_PLAN.mdMASTER_PLAN.mdmaster-plan.mddocs/master-plan.md
If not found, tell the user: "No MASTER_PLAN.md found. Run /master-plan:task to create your first task, or create one from the template."
Step 2: Parse Tasks
Read the file and extract tasks from ### headers matching this pattern:
### [optional ~~]TASK-123[optional ~~]: Title (STATUS)
Regex: ^###\s+(~~)?((TASK|BUG|FEATURE|ROAD|IDEA|ISSUE|INQUIRY)-\d+)(~~)?:\s*(.+?)\s*\(([^)]+)\)
For each match, extract:
- ID: e.g.,
TASK-123,BUG-456 - Title: The text after
:and before( - Status: Text in parentheses. Normalize:
- Contains "DONE", "COMPLETE", "FIXED", "β
", or has strikethrough β
DONE - Contains "IN PROGRESS", "π" β
IN PROGRESS - Contains "REVIEW", "π" β
REVIEW - Contains "PAUSED", "βΈοΈ" β
PAUSED - Otherwise β
PLANNED
- Contains "DONE", "COMPLETE", "FIXED", "β
", or has strikethrough β
- Priority: Look in the lines following the header for
**Priority**: P0-P3. Default to P2 if not found.
Step 3: Check for Active Work
Look for IN PROGRESS tasks first β these should be finished before starting new work.
Also check git status:
git status --short
If uncommitted changes exist, mention: "You have uncommitted changes β consider committing or running /master-plan:save first."
Step 4: Sort and Filter
Default sort order (what to START next):
- PLANNED first, then REVIEW, IN PROGRESS, PAUSED, DONE last
- Within same status: P0 β P1 β P2 β P3
If $ARGUMENTS contains a filter (bugs, progress, planned, review, active), apply it before sorting.
Exclude DONE tasks unless $ARGUMENTS contains all.
Step 5: Present Interactive Selection
Use AskUserQuestion to let user pick from the top tasks:
AskUserQuestion({
questions: [{
question: "Which task would you like to work on?",
header: "Task",
multiSelect: false,
options: [
// Top 4 tasks, formatted as:
{ label: "TASK-XXX: Title here", description: "P0 Β· IN PROGRESS" },
{ label: "BUG-YYY: Another task", description: "P1 Β· PLANNED" },
// ...
]
}]
})
Option formatting:
- Label:
{ID}: {title (max 40 chars)} - Description:
{priority} Β· {status}
If there are IN PROGRESS tasks, always show them first with a note: "You have N task(s) in progress."
Step 6: Show Task Details
When user selects a task, show the full section from MASTER_PLAN.md:
- ID, title, status, priority
- Description (everything between this
###header and the next###or##)
Step 7: Offer Actions
After showing task details, ask:
AskUserQuestion({
questions: [{
question: "What would you like to do?",
header: "Action",
multiSelect: false,
options: [
{ label: "Start working on this", description: "Update status to IN PROGRESS" },
{ label: "Pick a different task", description: "Go back to task list" },
{ label: "Just show context", description: "No status change" }
]
}]
})
If "Start working on this" is selected:
- Update the task's status to
IN PROGRESSin MASTER_PLAN.md (all locations β see update rules below) - Confirm: "Started TASK-XXX. Ready to begin implementation."
MASTER_PLAN.md Update Rules
Tasks may appear in multiple locations. When updating status, check ALL of:
- Summary/Roadmap table β Update the status column
- Detailed
###section header β Update(STATUS)in parentheses - Subtask bullet points β Add strikethrough + β if marking DONE
Always verify with a grep after updating.
Rules
- Finish before starting β Always highlight IN PROGRESS tasks first
- P0 trumps all β Critical issues come first regardless of status
- Interactive selection β Always use AskUserQuestion, never just print a list
- Context on selection β Always show full task details when picked
- Action oriented β Offer to start work immediately
Source
git clone https://github.com/endlessblink/master-plan/blob/master/skills/next/SKILL.mdView on GitHub Overview
The next skill analyzes MASTER_PLAN.md to surface the most relevant task to tackle next. It scores tasks by priority and status and presents an interactive selection to guide your session. Use it at session start or whenever youβre deciding what to tackle next.
How This Skill Works
It reads MASTER_PLAN.md, extracts tasks from headers using a defined pattern, normalizes status to DONE/IN PROGRESS/REVIEW/PLANNED, and assigns a priority (default P2). It applies optional filters (bugs, progress, planned, review, active, all), sorts by status and priority (PLANNED first, then REVIEW, IN PROGRESS, PAUSED, DONE), and prompts you with an interactive picker. If there are IN PROGRESS tasks, it notes them upfront; it also checks for uncommitted changes and surfaces a reminder if present.
When to Use It
- When starting a new session and you need a clear next task to begin.
- When the backlog is long and you want to surface the top candidate to tackle next.
- When you want to prioritize bugs first using the bugs filter.
- When you want to focus on IN PROGRESS or REVIEW tasks before starting new work.
- When you want to include DONE tasks for context or review by using the all filter.
Quick Start
- Step 1: Locate MASTER_PLAN.md (docs/MASTER_PLAN.md, MASTER_PLAN.md, master-plan.md, or docs/master-plan.md).
- Step 2: Run the next command with an optional filter, e.g., /master-plan:next bugs or /master-plan:next planned.
- Step 3: Choose a task from the interactive list and, after viewing details, decide to start, reselect, or view context.
Best Practices
- Apply precise filters (bugs, progress, planned, review, active) before sorting to target the right set.
- Keep MASTER_PLAN.md up to date with clear headers, statuses, and explicit priorities.
- Check for uncommitted changes before selecting a task and resolve them if needed.
- Aim to minimize in-progress tasks by finishing one before starting a new one when possible.
- Review the top 4 tasks in the interactive list to maintain focus and momentum.
Example Use Cases
- Example 1: Youβre starting a session and pick TASK-101: Improve login retry (PLANNED, P0).
- Example 2: You want to fix bugs first, so you run /master-plan:next bugs and select BUG-205 (IN PROGRESS).
- Example 3: You need to continue work on an existing task, so you choose an IN PROGRESS item to finish.
- Example 4: You want to review ongoing work, selecting a REVIEW task to push for completion.
- Example 5: After selecting a task, you view its full MASTER_PLAN.md section for context and next steps.