Claude Code Tools

flow-next

github

Spec-driven AI workflow plugin for Claude Code, OpenAI Codex, and Factory Droid. Zero-dep task tracking, worker subagents, Ralph autonomous mode, cross-model reviews.

Stars
⭐ 610
License
MIT
Last Updated
2026-05-20
Source
github

Flow-Next

License: MIT Flow-next Docs

Author Twitter Sponsor Discord

Plan-first AI workflow. Zero external dependencies.

📖 Full doc index → · 🌐 flow-next.dev · 👥 Teams guide · 💬 Discord


What is this?

Flow-Next is an AI agent orchestration plugin. Twenty-three agent-native skills for the full lifecycle: idea → spec → tasks → review → ship → maintain. Bundled task tracking, dependency graphs, re-anchoring before every task, multi-model reviews, decay-aware project memory, GitHub PR creation and resolution, agent-readiness audits. Everything lives in your repo — no external services, no global config. Uninstall: delete .flow/.

  • Spec-first. Every unit of work belongs to a spec fn-N. Tasks fn-N.M inherit context.
  • Fresh-context workers. Each task runs in its own subagent. No token bleed between tasks.
  • Cross-model reviews. A different model (RepoPrompt / Codex / Copilot) gates every implementation.
  • R-IDs frozen at handover. Acceptance criteria numbered once, never renumbered.

First-class on Claude Code, OpenAI Codex (CLI + Desktop), and Factory Droid. Also runs on OpenCode via the community port.

🆕 v1.0+ — flowctl epicflowctl spec. The 1.0 release renames the canonical primitive across the entire flow-next surface. All 0.x scripts and CLAUDE.md examples keep working — the legacy CLI is preserved as a deprecation alias layer through all of 1.x. See the CHANGELOG for the migration path (interactive via /flow-next:setup or deterministic via flowctl migrate-rename --yes, both transactional with rollback).


Quick start

Install

Claude Code OpenAI Codex Factory Droid
/plugin marketplace add \
  https://github.com/gmickel/flow-next
/plugin install flow-next
/flow-next:setup
git clone https://github.com/gmickel/flow-next.git
cd flow-next
./scripts/install-codex.sh flow-next
# then: /flow-next:setup
droid plugin marketplace add \
  https://github.com/gmickel/flow-next
# /plugins → install flow-next

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.

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:ralph-init for autonomous overnight runs, /flow-next:audit for memory garbage collection).


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| Done([🚀 Ship])
    R -->|NEEDS_WORK| W

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

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 (source-tagged, mandatory read-back), or — when starting from scratch — generate ranked candidate ideas grounded in the repo. Both land in .flow/specs/<id>.md.

/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 to flesh out an ambiguous spec before breaking it down. --scope=business|technical|both symmetrically narrows the pass.

/flow-next:interview <spec-id>

flow-next.dev/skills/interview

3. Plan into dependency-ordered tasks

Research the codebase, then write the spec + tasks together. Tasks fn-N.M declare blockers, inherit context from the parent spec, and stay dependency-ordered. 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.

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

flow-next.dev/skills/work

5. Open the PR with a cognitive-aid body

Render 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). Optional mermaid diagrams on module-boundary changes. Pushes via gh.

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

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? /flow-next:ralph-init scaffolds a repo-local Ralph harness under scripts/ralph/. Ralph loops the same steps overnight with fresh context per iteration, multi-model review gates, and auto-block on stuck tasks. → flow-next.dev/ralph


Why it works

ProblemSolution
Context driftRe-anchoring before every task — re-reads specs + git state
Context window limitsFresh context per task — worker subagent starts clean
Single-model blind spotsCross-model reviews — RepoPrompt, Codex, or Copilot as second opinion
Forgotten requirementsDependency graphs — tasks declare blockers, run in order
”It worked on my machine”Evidence recording — commits, tests, PRs tracked per task
Infinite retry loopsAuto-block stuck tasks — fails after N attempts, moves on
Duplicate implementationsPre-implementation search — worker checks for similar code before writing new
Hallucinated specs from “I think we discussed…”Source-tagged capture — every acceptance criterion marked [user] / [paraphrase] / [inferred], mandatory read-back loop
Stale project memory polluting future work/flow-next:audit + categorized memory schema — agent reviews each entry, flags stale (never deletes)
GitHub PR review threads piling up/flow-next:resolve-pr — fetch → triage → dispatch resolver agents → reply → resolve via GraphQL

Commands

CommandWhat it does
/flow-next:strategyWrite STRATEGY.md — target problem, approach, users, metrics, active tracks
/flow-next:prospectGenerate ranked candidate ideas grounded in the repo, upstream of capture/interview/plan
/flow-next:captureSynthesize conversation context into a spec (source-tagged, mandatory read-back)
/flow-next:interviewDeep spec refinement with lead-with-recommendation + confidence tiers + codebase-first investigation; --scope=business|technical|both
/flow-next:planResearch codebase, create spec + dependency-ordered tasks
/flow-next:workExecute tasks with re-anchoring + worker subagents + review gates
/flow-next:impl-reviewCross-model implementation review (RepoPrompt, Codex, or Copilot)
/flow-next:plan-reviewCross-model plan review
/flow-next:spec-completion-reviewSpec-completion review gate — verify combined implementation matches the spec (renamed from /flow-next:epic-review in 1.0.0; soft-removal target 2.0.0)
/flow-next:make-prRender a cognitive-aid PR body (9 input streams) and open via gh
/flow-next:resolve-prResolve GitHub PR review threads (fetch → triage → fix → reply → resolve via GraphQL)
/flow-next:auditAgent-native review of .flow/memory/ entries against current code (Keep / Update / Consolidate / Replace / Delete)
/flow-next:memory-migrateLift legacy flat memory files into the categorized schema
/flow-next:prime8-pillar agent-readiness assessment with parallel scouts; remediation via consent prompts
/flow-next:ralph-initScaffold autonomous loop (scripts/ralph/)
/flow-next:syncManually trigger plan-sync to update downstream task specs after drift

Full command reference (every flag, every default) in docs/flowctl.md.


Ralph (autonomous mode)

Run overnight. Fresh context per iteration + multi-model review gates + auto-block stuck tasks.

/flow-next:ralph-init           # One-time setup
scripts/ralph/ralph.sh          # Run from terminal

📖 Ralph deep dive · Ralph TUI (bun add -g @gmickel/flow-next-tui)


Where to look

The repo holds the offline-resilient reference. flow-next.dev holds the narrative, browseable guide. Pick by audience.

Looking for…Repo fileWebsite
5-minute pitch + installREADME.md (this page)flow-next.dev
Adopting in a team, handover objects, Spec-as-PR, adoption ladderdocs/teams.mdTeams guide
Full flowctl CLI reference — every command, every flagdocs/flowctl.md
Ralph autonomous mode internals — hooks, receipts, DCGdocs/ralph.md
.flow/ directory layout, spec-first task model, ID formatdocs/architecture.md
Spec template — R-ID rules, confidence anchors, receipt schemadocs/spec-template.md · canonical scaffold at templates/spec.md
Memory schema — bug / knowledge tracks, frontmatter, audit lifecycledocs/memory-schema.md
Project glossary — GLOSSARY.md shape, R17 forbidden-vocabulary guarddocs/glossary.md · GLOSSARY.md
Project strategy — STRATEGY.md shape, downstream skill groundingdocs/strategy.md · STRATEGY.md
Cross-platform install matrix + Codex / Droid / OpenCode notesdocs/platforms.md
scripts/sync-codex.sh pipeline, plain-text transform, validation guardsdocs/sync-codex.md
Troubleshooting — stuck tasks, Ralph debug, receipt validation, uninstalldocs/troubleshooting.md
Adding a new /flow-next:<name> skillagent_docs/adding-skills.md
Cutting a releaseagent_docs/releasing.md
Local plugin dev + smoke tests + Ralph e2eagent_docs/local-dev.md
Repo strategic intent + active tracksSTRATEGY.md
Canonical vocabularyGLOSSARY.md
Visual overview, diagrams, methodologymickel.tech/apps/flow-next · flow-next.dev

Doc index with one-line descriptions: plugins/flow-next/docs/README.md.


Requirements

  • Python 3.8+ — bundled flowctl CLI is pure-stdlib.
  • jq and gh — required for the review subsystem and PR plumbing.
  • bun (optional) — only needed for the Ralph TUI.

Platforms

PlatformStatus
Claude CodeFirst-class (canonical surface)
OpenAI Codex (CLI + Desktop)First-class (mirror at plugins/flow-next/codex/, regenerated by scripts/sync-codex.sh)
Factory DroidFirst-class (regex-OR matchers handle ExecuteBash)
OpenCodeCommunity port: flow-next-opencode

Detailed install + cross-platform patterns in docs/platforms.md.

Ecosystem

ProjectPlatform
flow-next-opencodeOpenCode
FlowFactoryFactory.ai Droid
Ralph TUICross-platform TUI for Ralph runs

Also check out

GNO — local hybrid search for your notes, docs, and code. Long-term memory over your files via MCP.

bun install -g @gmickel/gno && gno mcp install --target claude-code

License

MIT — see LICENSE.

Made by Gordon Mickel · @gmickel · gordon@mickel.tech

Sponsor