next

A task dispatcher that finds the next unfinished task in the active specification and prepares its context for implementation. It also shows the task's acceptance criteria, which are the conditions used to decide whether the work is complete.

In plain words
What is it for?
Use it to select an available task, review its requirements and dependencies, and see the relevant branch, files, and project decisions.
Why use it?
It removes the need to manually search the specification and gather related project information before starting work.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/dwarvesf/dwarves-kit/next
Clone the repo
git clone --depth 1 https://github.com/dwarvesf/dwarves-kit
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,020 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00023 $0.01020
Opus 5 $0.00012 $0.00510
Sonnet 5 $0.00005 $0.00204
Haiku 4.5 $0.00002 $0.00102

Measured 2d ago against content hash c5589cabe4fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

next scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/next.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a task dispatcher. Read the spec, find the next task to work on, and set up the context for implementation.

Process

Step 1: Find the next task

Read the active spec. Resolve it the same way the hooks do (the SPEC-005 dual-mode rule, reconciled to ADR-0010): among docs/specs/SPEC-*.md, take the lone non-SHIPPED/PARKED spec; if several are live, pick the one whose slug matches the current git branch; if the branch match is zero or ambiguous, ask the user which spec (do NOT guess). docs/specs/SPEC-NNN-<slug>.md is the sole spec location (ADR-0010).

Find the first task that is:

  • Not marked as done ([x] or DONE)
  • Has all dependencies satisfied (dependent tasks are done)

If multiple tasks are available (independent, no ordering constraint), present them and let the user pick.

Step 2: Load context

For the selected task, gather:

  • The task description and acceptance criteria from the spec
  • Relevant files mentioned in the task or in docs/briefs/CONTEXT.md
  • Current git branch and status
  • Any related decision records from docs/decisions/

Step 3: Present the task briefing

## Next task: TASK-[ID]
[description]

### Acceptance criteria
- [ ] [criterion 1]
- [ ] [criterion 2]

### Files to touch
- [file 1] — [what to change]
- [file 2] — [what to change]

### Context loaded
- [relevant file or decision]

### Dependencies
- TASK-[X]: [done/pending]

### Remaining after this
- [N] tasks left in current phase
- [N] tasks left total

Step 4: Hand off

Say: "Ready to implement. Work through the acceptance criteria one by one. When done, run /kit:next again for the next task, or /kit:review to review your changes."

Also remind: "As you implement, maintain docs/implementation-notes/<spec-slug>.md. Append an entry whenever you make a decision the spec did not pin down, deviate from the spec, hit a tradeoff worth surfacing, discover a missing constraint, or hit an open question you'd want the operator to confirm or revise. Entry shape: ## YYYY-MM-DD HH:MM <title> with Context / Decision / Why / Alternatives considered / Impact / Open questions lines. If TASK-[ID] runs with zero deviations, append a one-line TASK-[ID]: no deviations; matches <spec> verbatim entry so the absence is intentional. The file is surfaced in the /wrap-session LAB_LOG line and the PR description."

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 75 lines · 23 tokens per session scan A c5589cabe4fb

Subscribe to this mod's changes

next is a command published in the GitHub repository dwarvesf/dwarves-kit (11 stars, last pushed 2d ago), licensed MIT. It adds 23 tokens to every session and 1,020 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.