Back to Plugins

Flow-Next

Plan-first development workflows with multi-model review gates, context re-anchoring to prevent drift, and receipt-based gating for reliable AI coding

workflowplanningreviewdrift-preventioncommunity
By gmickel
65350Updated 4 days agoPythonMIT

Installation

/plugin marketplace add gmickel/gmickel-claude-marketplace && /plugin install flow-next@gmickel-claude-marketplace

Configuration

{
  "enabledPlugins": {
    "flow-next@gmickel-claude-marketplace": true
  }
}

Commands

flowStart a plan-first development workflow
anchorRe-anchor context to prevent drift
gateCreate a review gate checkpoint

How to install

  1. Open Claude Code in your terminal
  2. Run the installation command above
  3. The plugin will be enabled automatically
  4. Use the plugin's features in your Claude Code sessions
<div align="center">

Flow-Next

License: MIT Flow-next Docs

Author Twitter Sponsor Discord

Repeatable agentic engineering.

The workflow layer for AI coding agents: durable specs, re-anchored workers, adversarial reviews, receipts. Everything lives in your repo. Zero external dependencies. Uninstall: rm -rf .flow/.

</div>

๐Ÿ“– Full doc index โ†’ ยท ๐ŸŒ flow-next.dev ยท ๐Ÿ‘ฅ Teams guide ยท ๐Ÿ’ฌ Discord


Why this exists

Agentic engineering compresses implementation from weeks to hours โ€” and quietly removes every safety valve pre-agentic Agile relied on. The standups, the hallway clarification, the mid-flight course correction that used to finish a vague ticket over a two-week cycle: gone. When an agent can ship the task in one sitting, a rough ticket plus a chat scrollback is the whole work surface.

That work surface fails predictably. Agents drift mid-task, forget requirements, overfit to recent context, and hand reviewers 10K-line diffs with no focus signal. The bottleneck didn't disappear โ€” it moved upstream, to requirements, review, and verification. The spec has to carry the weight.

Flow-Next fixes the operating model, not just the prompt. It turns rough intent into durable specs, specs into context-sized task graphs, task graphs into re-anchored worker runs, and implementation into reviewed PRs with receipts. Between idea and merge it defines six named handover objects โ€” each reviewable on its own, verified by a different model, and frozen at handover.

The artifact chain is not bureaucracy. It is the conversation that would otherwise be missing.

What you get

Flow-Next is an AI agent orchestration plugin: 28 agent-native skills covering the full lifecycle โ€” idea โ†’ spec โ†’ tasks โ†’ review โ†’ ship โ†’ maintain โ€” layered on a bundled pure-stdlib Python CLI (flowctl). The host agent is the intelligence; flowctl is the deterministic plumbing. No external services, no SaaS, no global config.

TenetWhat it means
Spec-drivenIntent survives the chat. The unit of work is the spec โ€” not the ticket, not the transcript, not the PR title. One durable document at .flow/specs/<id>.md, evolving through layers.
Context-fit planningRight-sized task slices. Specs decompose into dependency-ordered tasks, each sized to one fresh ~100k-token context window.
Re-anchored workFresh context per task. Every worker subagent re-reads the spec, the task, and git state before touching code โ€” no token bleed, no stale assumptions.
Adversarial gatesFix until SHIP. A different model (RepoPrompt / Codex / Copilot / Cursor) reviews every plan and every implementation. Different models make different mistakes โ€” the disagreement surface is where the gaps live.
Receipts"Done" means there is proof. Commits, tests, review verdicts, and evidence recorded per task โ€” never narration.
Multi-harnessOne workflow everywhere. First-class on Claude Code, OpenAI Codex, and Factory Droid; runs on Grok Build and Cursor; community OpenCode port.
Self-improvingCompounds as you work. Memory, glossary, decision records, and strategy grow as side-effects of the workflow you already run โ€” no manual "refresh" ceremony, ever.

And one tenet about trust: everything lives in your repo under .flow/. Specs, tasks, memory, receipts โ€” all of it is yours, in git, code-reviewable. Uninstall is rm -rf .flow/.


Quick start

Install

<table> <tr> <td><strong>Claude Code</strong></td> <td><strong>OpenAI Codex</strong></td> <td><strong>Factory Droid</strong></td> </tr> <tr> <td>
/plugin marketplace add \
  https://github.com/gmickel/flow-next
/plugin install flow-next
/reload-plugins
/flow-next:setup
</td> <td>
git clone https://github.com/gmickel/flow-next.git
cd flow-next
./scripts/install-codex.sh flow-next
# then: /flow-next:setup
</td> <td>
droid plugin marketplace add \
  https://github.com/gmickel/flow-next
# /plugins โ†’ install flow-next
</td> </tr> </table>

Why a script for Codex? Codex's plugin protocol only registers skills from plugin.json โ€” not custom .toml agents or hooks. install-codex.sh merges all 21 agents + hooks into ~/.codex/config.toml. Idempotent โ€” safe to re-run. Full platform matrix + community ports in docs/platforms.md.

Grok Build (xAI)? If flow-next is already installed in Claude Code, Grok Build picks it up automatically โ€” grok inspect shows the skills + hook loaded, zero extra setup. The /flow-next:* commands run when typed and the multi-agent flows work (a full /flow-next:plan fanned out all seven scout subagents end-to-end, verified). Grok's slash autocomplete + grok inspect just under-list flow-next's commands/agents โ€” cosmetic, they work when invoked. (Don't grok plugin install the repo โ€” it's a marketplace, not a single plugin.) See docs/platforms.md.

The 5-command happy path

/flow-next:capture                   # 1. Synthesize conversation โ†’ .flow/specs/<id>.md
/flow-next:plan <spec-id>            # 2. Break the spec into dependency-ordered tasks
/flow-next:work <spec-id>            # 3. Execute tasks in fresh-context worker subagents
/flow-next:make-pr <spec-id>         # 4. Render a cognitive-aid PR body (9 input streams)
/flow-next:resolve-pr <PR#>          # 5. Fetch review threads โ†’ triage โ†’ resolve

That's the inner loop. Branch in (/flow-next:prospect for ranked candidates, /flow-next:interview for structured discovery), branch out (/flow-next:pilot + /flow-next:land for the autonomous assembly line, /flow-next:ralph-init for hardened overnight runs, /flow-next:audit for memory garbage collection).

<div align="center"> <img src="assets/flow-next-plan.png" alt="/flow-next:plan output โ€” dependency-ordered tasks, cross-model review passed, key decisions documented" width="720">

A /flow-next:plan result: dependency-ordered tasks, cross-model review iterated to SHIP, key decisions documented.

</div>

How the flow works

flowchart LR
    Idea([๐Ÿ’ก Idea]) --> P[/flow-next:prospect/]
    Idea --> C[/flow-next:capture/]
    P --> C
    P -.->|direct via promote| L[/flow-next:plan/]
    C --> L
    C --> I[/flow-next:interview/]
    I --> L
    L --> W[/flow-next:work/]
    W --> R[/flow-next:impl-review/]
    R -->|SHIP| Q[/flow-next:qa/]
    R -->|NEEDS_WORK| W
    Q -->|YES| Done([๐Ÿš€ Ship])
    Q -->|NO| W

    Done -.maintenance.-> A[/flow-next:audit/]
    A -.-> M[(.flow/memory/)]

/flow-next:qa is an opt-in live-app QA stage (after work, before make-pr) โ€” it drives the deployed app like a real user and only runs when there's a live deploy + a driver; with neither it surfaces the limitation rather than blocking. It augments, never replaces CI/staging/manual QA: the cheap first live pass that catches obvious runtime breakage before a human opens the PR. Run it by hand, or wire it into the autonomous loop as the optional pipeline.qa pilot stage (flowctl config set pipeline.qa on, default off) โ€” plan โ†’ plan-review โ†’ work โ†’ qa โ†’ make-pr.

The loop is spec-driven. Each step below maps to one skill; click through to flow-next.dev for the full page.

1. Capture or prospect a spec

Either synthesize an existing conversation into a structured spec, or โ€” when starting from scratch โ€” generate ranked candidate ideas grounded in the repo. Both land in .flow/specs/<id>.md. Capture source-tags every acceptance criterion as [user] / [paraphrase] / [inferred] and runs a mandatory read-back โ€” you see exactly how much of the spec the agent invented before anything is written.

/flow-next:capture                    # from a conversation
/flow-next:prospect <focus-hint>      # from a focus hint (concept, path, constraint, volume)

โ†’ flow-next.dev/skills/capture ยท flow-next.dev/skills/prospect

2. Interview to refine

Deep Q&A pass over a spec or task: lead-with-recommendation, confidence tiers, codebase-first investigation. Use it to flesh out an ambiguous spec before breaking it down. --scope=business|technical|both symmetrically narrows the pass โ€” the same skill serves the PO filling the business layer and the tech lead filling the technical layer, on the same spec file.

/flow-next:interview <spec-id>

โ†’ flow-next.dev/skills/interview

3. Plan into dependency-ordered tasks

Research the codebase via parallel scouts, then write the spec + tasks together. Tasks fn-N.M declare blockers, inherit context from the parent spec, and declare which acceptance criteria they satisfy (satisfies: [R1, R3]). This skill does not write code โ€” only the plan.

/flow-next:plan <spec-id>             # or <free-form text>

โ†’ flow-next.dev/skills/plan

4. Work through the tasks

Execute tasks systematically: each runs in a fresh-context worker subagent, re-anchors against the spec before starting, then implements + commits + records evidence. Cross-model review gates (impl-review, plan-review) wrap the loop and iterate until SHIP.

/flow-next:work <spec-id>             # or <task-id>

โ†’ flow-next.dev/skills/work

5. Open the PR with a cognitive-aid body

Don't ask a human to skim a 10K-line diff. /flow-next:make-pr renders a PR body from nine flow-next input streams (spec R-IDs, per-task evidence, memory hits, glossary changes, strategy alignment, deferred review findings, the diff itself) โ€” with an R-ID coverage table mapping every acceptance criterion to its satisfying task and evidence commit, and a "where to look" list that tells the reviewer which lines matter.

/flow-next:make-pr <spec-id>          # auto-detects from current branch

With HTML artifact mode on (flowctl config set artifacts.html.enabled true), make-pr also commits a self-contained pr.html review instrument โ€” diff-derived churn map, R-ID โ†’ evidence table with flagged mismatches, where-to-look checklist โ€” and links it from the PR body. Same switch gives capture/plan a spec visualizer. Opt-in; see docs/html-artifacts.md.

โ†’ flow-next.dev/skills/make-pr

6. Resolve PR review feedback

Fetch unresolved threads + top-level comments + review-submission bodies, cluster them, dispatch per-thread resolver agents (parallel on Claude Code, serial elsewhere), validate, commit, then reply + resolve via GraphQL.

/flow-next:resolve-pr <PR#>

โ†’ flow-next.dev/skills/resolve-pr


Going autonomous

Three loops, one quality bar. Multi-model review at every handover, don't-thrash reflexes (two-strike unready, auto-block, bounded CI fix budgets), evidence over narration โ€” invariant across all three. That's the differentiator from "ralph-wiggum"-style loops that run open-loop without gates

โ€ฆ

View source on GitHub