next

A project command that recommends which software feature to implement next. It reads feature specifications, their completion status, and priority signals.

In plain words
What is it for?
Use it to inspect feature folders, calculate how much of each feature is complete, consider dependencies and priority, and choose the next feature.
Why use it?
It reduces guesswork when several features are unfinished or depend on one another. The recommendation is based on the project’s existing planning files.

Command for Claude Code

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/marcelsud/spec-driven-agentic-development/next
Clone the repo
git clone --depth 1 https://github.com/marcelsud/spec-driven-agentic-development

Made for: Claude Code.

Per session 16 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,967 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.00016 $0.01967
Opus 5 $0.00008 $0.00983
Sonnet 5 $0.00003 $0.00393
Haiku 4.5 $0.00002 $0.00197

Measured 2d ago against content hash 130b9d981d80, 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.

.claude/commands/spec/next.md · 306 lines

How it starts

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

Suggest Next Feature

Analyze all features and recommend which one to work on next based on priority, dependencies, and completion status.

Your Task

Evaluate all features in the features/ directory and provide a prioritized recommendation for which feature to implement next.

Process

Step 1: Discover All Features

Use Glob to find all feature directories:

Glob pattern: features/*/context.md

Extract feature names from the paths.

Step 2: Analyze Each Feature

For each discovered feature, gather:

2.1 Completion Status

Read features/[feature-name]/tasks.md and count:

  • Total tasks: Match pattern ## Task \d+: or ### Task \d+:
  • Completed tasks: Match pattern \[IMPLEMENTED\] or \[COMPLETE\]
  • Calculate percentage: completed / total * 100

Categorize status:

Percentage Status
0% Not Started
1-99% In Progress
100% Complete
2.2 Priority Indicators

From naming convention:

  • Extract numeric prefix (e.g., 01-feature-name → priority 1)
  • Features without prefix default to priority 99

From context.md:

  • Look for "Priority:" or "priority:" mentions
  • Look for keywords: "critical", "urgent", "blocker", "MVP", "required"
2.3 Dependencies

Read features/[feature-name]/context.md Dependencies section.

Look for:

  • Explicit mentions of other features
  • Phrases like "depends on", "requires", "after", "needs"
  • References to other feature names

Build a dependency map:

feature-a:
  depends_on: []
  blocks: [feature-b, feature-c]
feature-b:
  depends_on: [feature-a]
  blocks: [feature-d]

Step 3: Calculate Recommendation Scores

For each incomplete feature (status != Complete), calculate a score:

score = (priority_score * 0.40) + (dependency_score * 0.35) + (progress_score * 0.25)
Priority Score (40% weight)
priority_score = 100 - (priority_number * 5)
  • Priority 1 → 95 points
  • Priority 2 → 90 points
  • Priority 10 → 50 points
  • Priority 99 (no prefix) → 5 points

Read the full file on GitHub · 306 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 · 306 lines · 16 tokens per session scan A 130b9d981d80

Subscribe to this mod's changes

next is a command published in the GitHub repository marcelsud/spec-driven-agentic-development (174 stars, last pushed 9mo ago), licensed MIT. It adds 16 tokens to every session and 1,967 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.