next

next is a command for coding agents from vladm3105/aidoc-flow-framework. It costs 23 tokens per session (740 once invoked), scanned A, original, MIT.

A project-planning command that checks the state of the project's eight documentation layers and recommends one next action.

In plain words
What is it for?
Use it to find the next command in a structured software design process, such as starting the project documents, fixing layer order, or drafting the next missing layer.
Why use it?
It removes the need to compare folders and documents manually or choose among many possible next steps.

Command

Part of the aidoc-flow plugin — 30 skills, 12 commands, 11 agents, 1 hook shipped together

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/vladm3105/aidoc-flow-framework/next
Clone the repo
git clone --depth 1 https://github.com/vladm3105/aidoc-flow-framework

Or install aidoc-flow, the plugin that ships this one along with the rest of its 30 skills, 12 commands, 11 agents, 1 hook.

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 740 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.00740
Opus 5 $0.00012 $0.00370
Sonnet 5 $0.00005 $0.00148
Haiku 4.5 $0.00002 $0.00074

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

platforms/claude-code-plugin/commands/next.md · 67 lines

How it starts

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

Next

Tell the user the one thing to do next. Not a menu, not the whole roadmap — one concrete command. Uses the same detection logic as /aidoc-flow:status, applies a small decision tree, and emits a single recommendation.

Instructions

  1. Resolve project root and detect layer state — identical to step 1-2 of /aidoc-flow:status. Skip the table render; you only need the per-layer (exists, instances, audited) triple.

  2. Apply the decision tree in order; first matching rule wins:

    Rule Condition Recommend
    R0 No layer directories exist at all /aidoc-flow:project-init — scaffold the SDD layout
    R1 A layer exists but the layer below it (smaller N) does NOT — out-of-order /aidoc-flow:doc-flow — out-of-order layers detected; this skill explains the canonical order
    R2 The lowest-numbered missing layer is N and layer N-1 exists /aidoc-flow:doc-<layer N>-autopilot — draft layer N from the upstream artifact
    R3 Every layer present has an audit, and IPLAN exists with audit "All eight layers are present and audited. The next step is implementation — drive the IPLAN to code."
    R4 At least one layer exists without an audit (the lowest such) /aidoc-flow:doc-<that layer>-audit — score the layer before promoting
    R5 A layer's most recent audit scores below its gate (only knowable if .aidoc/ carries that info) /aidoc-flow:doc-<that layer>-fixer — remediate the audit findings

    If a rule needs information you cannot resolve (e.g. R5 requires gate scores you cannot read), skip to the next rule.

  3. Render the recommendation — one block, three lines:

    Position: <Highest layer present> (<N> of 8)
    Next:     <one of the recommendations above>
    Why:      <one sentence explaining the rule that fired>
    

    Example:

    Position: PRD (2 of 8)
    Next:     /aidoc-flow:doc-ears-autopilot
    Why:      PRD exists; EARS (the next layer) does not.
    

Read the full file on GitHub · 67 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 · 67 lines · 23 tokens per session scan A 2a271073bb00

Subscribe to this mod's changes

next is a command published in the GitHub repository vladm3105/aidoc-flow-framework (17 stars, last pushed 2d ago), licensed MIT. It adds 23 tokens to every session and 740 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-31.