next-task
4. Next task
Implement the next unfinished group of tasks from the tasks list. A group of tasks is a set of tasks that start with the same number like 1.1, 1.2, but NOT 2.1.
Constraints:
Task Retrieval:
- The model MUST use the rune skill to retrieve the next task(s) to work on
- Use
rune next --format jsonto get the next incomplete task. This command will indicate when all tasks are complete - If the user asks for the entire phase, use
rune next --phase --format json - If the retrieved result contains only a single top-level task (without subtasks like "1" instead of "1.1"), rerun with
rune next --phase --format jsonto retrieve the full phase of tasks
Stream Detection for Parallel Execution:
- When retrieving a phase, the model MUST check for multiple work streams using
rune streams --available --json - If multiple streams have ready tasks, parallel execution is possible
- If only one stream has ready tasks, sequential execution within that stream is used
Task Execution:
- The model MUST read all files referenced in the front_matter_references
- The selected tasks MUST be added to the internal TODO list for tracking and implemented in the order specified
- The model MUST implement all of the selected tasks, including all subtasks
- Once a subtask or task is completed, use the rune skill to mark it complete (e.g.,
rune complete 1.1) - The model MUST NOT proceed past the selected task. Once a task is done, it needs to be put up for review by the user
- Use tools and skills as appropriate while implementing the task. For example, if you need to know the capabilities of a library, use context7, and if you want to verify your code is efficient, use the efficiency-optimizer skill
Parallel Execution with Multiple Streams: When a phase is pulled in and multiple streams have ready tasks:
- The model MUST use
rune streams --available --jsonto identify streams with ready work - If there are 2 or more streams with ready tasks:
- The model SHOULD spawn subagents (using the Task tool) to handle each stream in parallel
- Each subagent receives instructions to:
- Retrieve all phase tasks for their stream using
rune next --phase --stream N --format json - Read all referenced files from front_matter_references
- Implement the tasks in dependency order
- Mark tasks complete as they finish using
rune complete <task-id> - Report back when all tasks in the stream are done or blocked
- Retrieve all phase tasks for their stream using
- The main agent coordinates by:
- Monitoring subagent progress
- Handling any cross-stream dependencies that become unblocked
- Aggregating results for user review
- If there is only 1 stream with ready tasks:
- Execute tasks sequentially within that stream as normal
- No subagents are needed
Subagent Instructions Template: When spawning a subagent for a stream, provide these instructions:
- Stream number to work on
- Path to the tasks file
- List of front_matter_references to read
- Instruction to use
rune next --phase --stream N --format jsonto retrieve all tasks for the stream - Instruction to mark tasks complete using
rune complete <task-id> - Instruction to stop when all tasks in the stream are complete or blocked by tasks in other streams
Cross-Stream Coordination:
- When a subagent completes a task that unblocks tasks in another stream, that stream's agent will pick up the newly unblocked work on their next
rune next --phase --stream Ncall - If all streams become blocked waiting on each other, this indicates a circular dependency problem that should be reported to the user
- The main agent should periodically check
rune streams --jsonto monitor overall progress
More from arjenschwarz/agentic-coding
ui-ux-reviewer
Evaluate and improve user experience of interfaces (CLI, web, mobile)
119efficiency-optimizer
Analyze code for performance and efficiency improvements
41design-critic
Critical review of design documents, architecture proposals, and requirements
26fix-bug
Systematic bug investigation, resolution, and documentation. Use when fixing bugs that need thorough analysis, test coverage, and a formal bugfix report. Applies systematic debugging methodology, creates regression tests, and generates a standardized report in specs/bugfixes/<bug-name>/. For complex bugs, spawns competing implementation agents (including alternative harnesses like Kiro) and selects the best solution. Triggers on requests like "fix this bug", "debug and document this issue", or when a bug needs both resolution and documentation.
22permission-analyzer
Generate Claude Code permissions config from session history. Use when setting up autonomous mode, configuring .claude/settings.json, avoiding --dangerously-skip-permissions, or analyzing what permissions a project needs. Reads session logs to extract Bash commands and MCP tools actually used, then generates appropriate allow/deny rules.
22performing-systematic-debugging-for-stubborn-problems
Applies a modified Fagan Inspection methodology to systematically resolve persistent bugs and complex issues. Use when multiple previous fix attempts have failed repeatedly, when dealing with intricate system interactions, or when a methodical root cause analysis is needed. Do not use for simple troubleshooting. Triggers after multiple failed debugging attempts on the same complex issue.
20