Imported from Integralist/agent-skills (
.agents/skills/next-task/SKILL.md). Install upstream withnpx skills add Integralist/agent-skills --skill next-task. Copyright stays with the author.
Next Task
Resume work from a project plan, in the main thread.
Context
- Projects & tasks: !
find projects -maxdepth 2 -name '*.md' ! -path '*/completed/*' ! -name 'README.md' 2>/dev/null | head -15 || find docs/plans -maxdepth 1 -name '*.md' ! -name 'README.md' 2>/dev/null | head -10
Process
-
Identify the plan or task list. Use the user's file if specified; otherwise pick from the context above. If multiple candidates exist, present them as a numbered list with filenames and ask which to use. Always state the file you'll use and wait for confirmation.
I'll work from projects/2026-02-27-cross-team-routing-isolation/plan.md. OK, or did you have a different plan in mind? -
Read the file and find the first actionable unchecked task (
- [ ]) in document order. A task is actionable unless its slice's- **Blocked by**:line names a slice that still has unchecked tasks — skip a blocked task and keep scanning. Plans withoutBlocked by(older phase-based plans) never block, so the first unchecked task wins. If every remaining task is blocked, report which slice is next and what it waits on, then stop. -
Prepare its delivery branch. Read
Pull Request Deliverywhen present and map the selected task to its layer.- Stay on the current branch when it matches the layer's declared branch.
- For a stack layer, invoke
stacked-prswhen its branch is not current or the stack has not been initialized. - For older documents without delivery metadata, follow the existing single-branch workflow. Never infer one branch per task.
-
Announce the task:
Next up: Task 2.3 — Add cache invalidation for config updates -
Execute it directly in the main thread:
- Write tests first (no code without a failing test).
- Run
make testwhen done. - Update
docs/**/*.mdor**/README.mdif the change alters behavior, public APIs, or usage patterns. - Ensure the project
README.mdexists, creating it from../shared/PROJECT-README.mdwhen needed. Keep task descriptions and checkboxes only in the task file; update the README only when the task artifact's document-level status changes. - Respect layer separation: handlers -> service -> repository.
Completion
Once verified (tests pass, work done), mark it complete before finishing:
- Change the task's checkbox from
- [ ]to- [x]in the task or plan file. - If the task artifact's document-level status changed, update its single README row and coarse next action. Do not copy task progress into the README.
- If subtasks group under a parent, check the parent only once all its subtasks are checked.
- If this was the final task in a per-slice task list
(
projects/<slug>/tasks-slice-<n>.md), mark the corresponding slice complete in the parent plan (projects/<slug>/plan.md). - Report that the task is done and the plan updated.
- Ask whether to commit. If yes, invoke
/commit. - Advise on next steps:
- If a per-slice task list finished and more slices remain in the parent
plan, suggest running
/to-tasks <plan-path> slice-<n+1>. - If every task in the current PR layer is complete, ask whether to invoke
stacked-prsto submit or update the stack.
- If a per-slice task list finished and more slices remain in the parent
plan, suggest running
REQUIRED
- Confirm the plan choice before proceeding.
- Do the implementation work directly in the main thread — do NOT spawn subagents.
- When the task is complete and verified, mark its checkbox
- [x]. - One task per invocation. Don't chain multiple tasks.
- One task per invocation controls work scope, not PR boundaries.
- Anchor multi-turn progress and lead with state — see
../shared/EXECUTIVE-SCAFFOLDING.md.