Codex 安装按 home 目录进行,多环境需设置 CODEX_HOME 并每个 home 各跑一次安装脚本;安装后必须在项目里先跑一次 setup 写入指令片段并选择审查者;各宿主调用语法不同,Codex 用 $flow-next-,其余多为 /flow-next:。
flow-next
gmickelMIT活跃维护把 bug、想法或工单一路推进到通过验证的 PR:自动写规格、按风险做跨模型评审、实时 QA,并把过程记录留在仓库里。
Faster than your agent alone. And better. A workflow plugin that takes a bug, idea or ticket to a verified pull request: specs, cross-model review by risk, live QA, receipts in your repo. Claude Code · Codex · Cursor · Droid · Grok Build · OpenCode · Muse Code.
/plugin marketplace add https://github.com/gmickel/flow-next
/plugin install flow-next
/reload-plugins
/flow-next:setupREADME 未说明硬件要求;需自备编码代理宿主(Claude Code、Codex、Cursor 等),另需 Python 3.11+,审查与 PR 步骤还需 jq 和 gh(GitLab 用 glab)。
把 bug、想法或工单一路推进到可验证 PR 的编码代理工作流插件
把 bug、想法或工单一路推进到通过验证的 PR:自动写规格、按风险做跨模型评审、实时 QA,并把过程记录留在仓库里。
核心能力
- 按任务类型自动选择最小工作流路由
- 跨模型家族审查高风险改动,写代码的模型不审自己的 diff
- 规格、决策与回执存于仓库 .flow/ 目录,可读可迁移
- 每个阶段打印 ran/skipped/failed 及原因
- 支持 --auto 无人值守并可用 --until=merge 盯 CI 后合并
容易踩的坑
- flow-next-v9.9.0flow-next v9.9.0最新正式版2026-11-07 · 2026-11-07 17:51 UTC
Bug fixes now come with proof a reviewer can replay. The test is written first, fails on unchanged code and is committed on its own before the fix. The pull request history shows red, then green, and every reply restates what failed before and what passes now. In a pre-registered test against 9.8.0 (Claude Code, Opus 5.5, six runs per arm), the blind-judged result rose from 18.3 to 20.0 of 20 on a hard bug and from 16.9 to 18.9 on a simple bug. The test went in on its own first in 12 of 12 bug runs against 4 of 12. The hard bug's first report arrived at the same time; the simple bug's arrived about 1.5 minutes later, spent testing the nearby cases.
Changed
- Reviewers can see a bug's test fail before the fix. The test reaches the behaviour through code that already exists. It loads successfully and fails by assertion on unchanged code. It is committed alone, with test files only, before the fix, on the local branch, attended or not. If a hook or repository rule refuses that commit, both go in one commit; the rule is never bypassed. A feature whose test was written first commits it the same way.
- Tests cover callers of your change and nearby bug cases. Work runs the tests for the changed code and its callers, including callers outside the changed folder. For a bug fix, tests also cover cases that reach the same broken code: the same request forced or flagged, the sibling scheme or type, and a real failure beside the fixed case. The full suite still runs only when the repository or you ask for it.
- Every hand-back carries its proof. The reply names the tests that ran and any caller with no tests. It states the base and head observations verbatim: the failing assertion before, the passing run after, and before/after numbers when measured. This also applies to replies after follow-ups and notes when a background review lands.
- Each symptom in a bug report gets its own before and after. When a report names several symptoms or surfaces, each is reproduced on unchanged code and checked after the fix. A symptom that does not reproduce is recorded as such, and the fix does not claim it.
- Deferred writes keep the live value exact. When a change throttles, coalesces or defers persisted writes, a caller in the same process still reads the exact value. Only the write waits, and a test reads the value straight after the event.
- Under the hood. The rules live in the shared working rules (Tests, Attended and Handoff), which every route reads. The defect route, work's commit step and the worker point at them. Regression set against 9.8.0: a small feature 19.5 vs 19.0 and a large feature 19.3 vs 19.3 of 20, hidden tests passing throughout.
- flow-next-v9.8.0flow-next v9.8.02026-11-06 · 2026-11-06 15:12 UTC
查看更新说明
Flow now builds a ready spec directly unless you ask for a plan. A spec that spans two repositories, is expected to ship in several PRs or names separate owning teams runs as one task with the same review and QA gates, and that task can still open several PRs. On a pre-registered routing test (Opus 5.5, three runs per case), 9.7.0 sent a two-repo, a three-PR and a two-team spec to planning every time; 9.8.0 sent none of them, and every explicit ask still reached planning.
What changes when you upgrade. A spec that used to be split into tasks because it named separate owners or several PRs now runs as one task. To get the breakdown, ask for a plan or a task breakdown in your
/flow-next:flowrequest or in the spec, or run/flow-next:plan. Specs that already have tasks keep them.Changed
- Planning runs when you ask for it. A request for a plan or a task breakdown, in your request or in the spec, is the one thing that sends a ready spec to planning. Size, risk, file count, several repositories, an order between parts, separate owners and delivery over several PRs all stay on the direct route. Flow's agent reads the ask, so an ask made only in your
/flow-next:flowrequest reaches planning, and a plan the spec mentions in passing ("the 4-task plan") does not. - Work recommends building a spec with no tasks directly. When
/flow-next:workmeets a spec with no tasks and you did not name a route, its question lists the direct route first as the recommended option, with planning first one pick away. - Skills that used to point you at
/flow-next:plannow point at/flow-next:flow, which picks the route: the task-manager skill, prime, prospect, strategy and map. - Under the hood. For a ready spec with no tasks and no recorded route,
flowctl judge --preset routereturnswork_no_plan_default; it no longer reads the spec body for plan signals. The flow skill applies the ask, attended and under--auto.
- Planning runs when you ask for it. A request for a plan or a task breakdown, in your request or in the spec, is the one thing that sends a ready spec to planning. Size, risk, file count, several repositories, an order between parts, separate owners and delivery over several PRs all stay on the direct route. Flow's agent reads the ask, so an ask made only in your
- flow-next-v9.7.0flow-next v9.7.02026-11-06 · 2026-11-06 09:44 UTC
查看更新说明
Specs that depend on each other in a loop are now caught when the loop is closed. Before, they just never became ready. Teams that cut an epic into one spec per story see the full path the moment a dependency closes a circle, a split whose dependencies loop is shown before anything is written, and
/flow-next:depssays why each stuck spec can never start. Nothing to configure.Added
- A circular dependency between specs is caught when the edge is added. Specs on a cycle never become ready, so
flow --autoandreadyused to skip them without saying why.flowctl spec add-depnow refuses an edge that would close a cycle, a self-dependency included, writes nothing, and names the path (fn-3 -> fn-1 -> fn-2 -> fn-3) with the error codedependency_cycle. Every skill that records edges goes through it, and capture checks a proposed split's edges before it creates any spec, so an epic cut into stories that depend on each other in a loop is shown to you instead of half written.flowctl validate --alllists cycles already on disk inspec_cyclesand fails on them.
Fixed
/flow-next:depssays why a spec can never start. Each deadlocked spec now names its cause: a cycle (with its path), a dependency that no longer exists, or being blocked by another deadlocked spec. Chains deeper than ten specs are placed in phases instead of being reported as deadlocked.
- A circular dependency between specs is caught when the edge is added. Specs on a cycle never become ready, so
- flow-next-v9.6.0flow-next v9.6.02026-11-05 · 2026-11-05 14:11 UTC
查看更新说明
GitLab teams can now take a spec all the way to a merged merge request. make-pr opens or updates the merge request, resolve-pr works through its review discussions, and land squash-merges it once the pipeline for its current head has passed and GitLab's own merge check allows it, so
flow --auto --until=mergeruns the whole loop on gitlab.com or a self-managed instance. A merged merge request moves the tracker issue to Done the way a merged pull request does. Teams that keep the spec as the only record can also make the tracker issue body follow the spec.What changes when you upgrade. On a GitLab origin, make-pr, resolve-pr and land now act through
glabinstead of stopping, so log in withglab auth loginand a token or browser login that has theapiscope. GitHub origins behave as before.Added
- make-pr opens and updates GitLab merge requests. On a GitLab origin, gitlab.com or self-managed, make-pr creates or updates a merge request through
glabwith the same body and spec close it uses on GitHub, instead of stopping before it closes or pushes.--draft,--readyand--updatework on draft merge requests, and a spec built on another spec's branch targets that branch while its merge request is open. The forge comes from the origin remote, so there is no new setting; theglablogin needs theapiscope, whether it was made with a token or through the browser. With an SSH origin whose GitLab web port differs from the default, setGITLAB_HOST=<host>:<port>. It also works on a branch with no spec and in a repo without.flow/, and--dry-runpreviews against the merge requests.flowctl pilot snapshotreports the origin'sforge. Thanks to @janhommels for measuring howglabhandles merge requests, and to @TechupBusiness for #462. - resolve-pr works through GitLab merge request reviews. On a GitLab origin, resolve-pr reads every unresolved discussion and every top-level note on the merge request, across all pages, and handles them as it handles a pull request's review threads and comments. A fixed discussion gets a reply that cites the fix and is resolved once the fix is pushed. As on GitHub, one it answers or declines gets its reply and is resolved, one that needs a person stays open, and a top-level note gets a new note in answer. Replying and resolving need a
glablogin withapiscope. - land merges GitLab merge requests, and a merged one counts as merge evidence. On a GitLab origin, land reads the merge request's readiness through flowctl before it merges. The pipeline for the current head must have passed (a merged-results pipeline on GitLab's merge commit of that head counts), GitLab's own merge check must allow the merge (that check covers required approvals on every tier), and the project must allow squash. Land then squash-merges with the head SHA pinned, so a push made in the meantime fails the merge instead of slipping in, and it confirms the merge commit. It never turns on auto-merge. A conflict stops land as blocked, and a failed pipeline gets one focused fix. A manual, canceled or skipped pipeline, a project that forbids squash, a draft, a stacked merge request, and the steps GitLab has no equivalent for here (rerunning jobs, catching up a branch on a fast-forward-only project) stop for a person.
flow --auto --until=mergenow lands on a GitLab origin instead of stopping after make-pr. A merged merge request now counts as merge evidence for the tracker's Done, as a merged pull request does.flowctl pilot snapshotreports the open merge request's readiness. - Teams that keep the spec as the only record can make the tracker issue follow it. With
tracker.specWins: true, the first task claim also writes the rendered spec as the issue body, and make-pr writes it again as the final body, so an edit made on the tracker does not survive either step. Each writes only when the live body differs from the spec. A failed first-claim write still moves the issue to In Pro
- make-pr opens and updates GitLab merge requests. On a GitLab origin, gitlab.com or self-managed, make-pr creates or updates a merge request through
- flow-next-v9.5.1flow-next v9.5.12026-11-02 · 2026-11-02 09:54 UTC
查看更新说明
Fixes for papercuts users reported in review, delivery and capture.
Fixed
- Copilot and Cursor reviews see the diff they review. Both now get the reviewed diff in a file, as Claude reviews do. Copilot used to see only the changed files as they are now, so deleted code was invisible to it. Thanks to @jcarosi for the diff delivery in #567 (#529).
- Long spec ids get their GitHub label. The
flow:<spec-id>label is cut to GitHub's 50-character limit, keeping the id's number, instead of failing on every retry. Thanks to @TechupBusiness for reporting it in #578 and @DreamchaserLG for the fix in #581. flow --autoruns on repositories hosted outside GitHub. A GitLab origin no longer stops every run before its first stage. make-pr opens GitHub pull requests only, so on such a remote it stops before it closes or pushes anything. Thanks to @TechupBusiness for reporting it in #583.- Claude reviews through a gateway model alias keep their verdict, and a fallback model that failed is no longer cached for later reviews. Thanks to @jcarosi for the fixes (#546).
- A Quick command for a tool the spec builds no longer stops a run. Work's baseline records it as not yet runnable and runs it once the task that creates the file is done. Thanks to @TechupBusiness for reporting it in #552.
- make-pr keeps a spec open until its configured completion review passes, so land cannot merge it unreviewed. Attended runs open the pull request as a draft, and
flowctl show --jsonreportscompletion_review_pending. Thanks to @sn-furali for reporting it in #477. - Capture spots a duplicate spec on another session's unmerged branch. Thanks to @sn-furali for reporting it in #444.
make-pr --updatecloses a draft's spec once its work is done, then commits and pushes the close. Both draft notes name the command.
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Flow-Next
Faster than your agent alone. And better.
Agents generate. Flow-Next proves.
Flow-Next is a workflow plugin for your coding agent. Hand it a bug, an idea, a ticket or a slow page, and it takes the work all the way to a pull request. It picks the route that kind of work needs, builds the change, gets it reviewed by another model family when the risk calls for it, and hands you something you can check instead of something you have to trust.
It's also fast now. On the same model, the working change comes back in about the time your agent takes on its own, often less, and a large feature in about half the time. The result is better than the plain agent's before any review runs, and review and live QA widen that gap.
| You say | What Flow-Next does |
|---|---|
"This fails: <pasted stack trace>" | Turns the failure into a failing test, fixes the cause, and shows you the test going from red to green. |
| "Add passwordless login" (or the conversation you just had about it) | Writes a spec with numbered acceptance criteria, builds it, has it reviewed, and opens a PR that maps every change to a criterion when you ask for one. |
| "The /reports page takes four seconds, it should take under one" | Measures the real page before touching anything. The before-and-after numbers are the evidence. |
| "Extract the pricing rules into their own module" | Pins the current behaviour with a characterization test first, so the refactor has to keep it. |
| "Work ticket WOR-17" | Reads the issue with the access you already have and routes on what it says. |
| "Why does the parser reject empty headers?" | Answers from git history and the project's decision memory, with citations. Writes nothing. |
/flow-next:flow --auto | The same thing with nobody watching. It never stops to ask, keeps fixing until the reviewer signs off, and writes every call it made on your behalf into the PR. Add --until=merge and it also watches CI and review threads and merges the PR when your checks allow it. |
Every stage prints ran, skipped(<reason>) or failed(<reason>), so you can see what happened and what didn't. The model that wrote a diff never reviews it. Specs, decisions, task state and receipts live under .flow/ in your repository and stay readable if you stop using Flow-Next. flow --explain <anything> shows the route it would take, and why, without running it.
It runs on Claude Code, OpenAI Codex, Factory Droid, Cursor, xAI Grok Build, OpenCode and Meta Muse Code.
How much faster, and how much better
I measured this over more than 170 full end-to-end runs against plain Claude Code on the same model, each case run several times. Hidden tests the agent never sees check every result, and a blind judge scores the handoff. Speed is time to the working change, before any review or QA.
| Task | Speed on the work | Quality | What the quality stages did |
|---|---|---|---|
| Large feature | up to 1.9x faster | +25% | Plain Claude Code shipped a data-integrity bug in every run. Flow-Next's reviewers caught it every time, before the pull request. |
| Held-out large feature (Rust) | 1.2x faster | +48% | Four real bugs fixed, including a race condition. Flow-Next passed every hidden test; plain Claude Code failed one run in three. |
| Hard bug | about 2x faster | +9% | Found the real cause and fixed it there, instead of loosening the flaky test. |
| Simple bug | 1.2x faster | +10% | No review needed. The gain comes from how it works: a failing test first, a fix at the cause, then a check that it works for the user. |
| Small feature | 1.1-1.3x faster | +8% | The reviewer caught a setup check the new option broke. Fixed before handoff. |
Unattended, with --until=merge, a large feature went from spec to a merged pull request with nobody watching and no stops, in about half the time plain Claude Code took to build it. The evidence page has the method and the rest of the numbers.
Why this exists
Writing the code got cheap. Everything around it didn't: pinning down what was actually asked, keeping the build aligned with it, checking the result, and explaining the diff to whoever reviews it. That work is where agent-written code quietly goes wrong, and it's the part I wanted to make repeatable.
So the spec lives in .flow/specs/<id>.md instead of a chat that scrolls away. The build reads it before it touches code. When the risk calls for it, a model from another family checks the change, because a model reviewing its own work shares its own blind spots. And the PR shows which criterion each change satisfies and what proves it. It can't promise that the codebase stays easy to maintain. That still takes people who care about it.
Install
/plugin marketplace add \
https://github.com/gmickel/flow-next
/plugin install flow-next
/reload-plugins
/flow-next:setup
git clone https://github.com/gmickel/flow-next.git
cd flow-next
./scripts/install-codex.sh flow-next
# For another Codex home (any path you like):
# CODEX_HOME="$HOME/.codex-work" ./scripts/install-codex.sh
# Run once per home.
# then, in your project's Codex conversation: $flow-next-setup
droid plugin marketplace add \
https://github.com/gmickel/flow-next
# /plugins → install flow-next
Use installation commands in your terminal or the host's plugin interface as shown above. Workflow invocations belong in the agent conversation. Codex uses $flow-next-<name>; OpenCode uses /flow-next-<name>; the other hosts accept /flow-next:<name> (Cursor also accepts the hyphen form).
Cursor, Grok Build, OpenCode, or Muse Code? Install has the current steps per host, including the Cursor team-marketplace import and Claude Code managed settings for an organisation. Codex installs are per home; set CODEX_HOME when you use more than one.
Start one change
- Install for your host with the block above, then run
/flow-next:setupin a project (Codex:$flow-next-setup). Setup writes the agent instruction snippet and asks once which reviewer you want. - Tell it what you have:
/flow-next:flow <anything>. A pasted error, an idea, a spec id, a branch or a ticket all work. Flow picks the smallest route that does the job, runs it, and stops at the next decision that's yours. For an idea too big to write down in one go, the optional/flow-next:chartstage comes first. - Read what it hands back. The stage lines say what ran and what was skipped and why. Say "open the PR" when you want one; its body maps each change to the acceptance criterion it satisfies.
Your first 30 minutes walks through the same three steps on a two-file Python example, review setup and all. You need your agent, Python 3.11+ and the project's own tools; review and PR steps also use jq and gh (glab for GitLab merge requests).
If you're an agent
If you are an agent or bot operating Flow-Next on someone's project, this repository's AGENTS.md and CLAUDE.md are not for you; they are rules for changing Flow-Next itself. What you need:
- Install for your host, then run
/flow-next:setuponce in the project. - Hand everything to
/flow-next:flow <what the person gave you>, verbatim. Don't call plan, work or review yourself unless the person names one; Flow picks the route.--explainpreviews the route without running anything. - Attended, relay
Flow stopped atandNextto your person. Decisions about what to build or whether to merge are theirs. - Unattended, use
--auto; plainflowrefuses under an autonomy marker. The last line is alwaysPILOT_VERDICT=<ADVANCED|NO_WORK|DEFERRED_TO_LAND|BLOCKED|NEEDS_HUMAN>, andNEEDS_HUMANmeans stop and show the reason. - Only specs the person marked ready run unattended, and a merge needs their consent in this session or
--until=merge.
For agents has the full contract: every verdict and what to do with it, the run forms, and the safety rules.
Land a pull request
/flow-next:land <PR> works one named PR to the finish: it resolves review feedback and CI failures, then squash merges it once you've authorized the merge. make-pr commits the finished spec and task statuses before it opens the PR, so the merge carries them to your base branch. Land checks every spec on the PR's branch and merges only when all of them are closed.
Land takes one PR at a time. To land several, pick the open PRs whose branch carries a closed spec, and run land on each one with your merge authorization. It never sweeps the repository for PRs on its own.
If you want a stricter bar before merging, set it in your instruction file, in branch protection, or with land.mergeVerdictCommand. The troubleshooting guide covers landing and manual rebases, and the upgrade notes cover major versions.
Where to read more
The full documentation is at flow-next.dev. This repository keeps this page and the reference files the skills read while they run, under plugins/flow-next/docs/.
- Introduction: what each stage does, and what Flow-Next refuses to claim.
- Choosing your route: which stages a bug, a feature, a refactor or a performance request gets, and why the direct route is the default.
- Evidence & evals: the benchmark against a plain agent, the research behind verification, and our own evals, including the ones that killed a feature.
- Going autonomous:
flow --auto,--until=merge, the Decisions list and when a run stops. - For teams: the spec as the handover between product, engineering and the agent, plus the tracker bridge to Linear, GitHub, GitLab and Jira.
- Regulated environments: opt-in committed development evidence (
evidence.persist), spec approval by pull request (spec.approval) and theflowctl tracematrix, which feed your team's validation rather than replace it. - Model routing: send each job to the model or harness that fits it, from one block in your instruction file.
- Review backends: Codex, Copilot, Cursor, Claude and host review, and why the reviewer must come from another family.
- Configuration: every
.flow/config.jsonkey, generated from the schema. - Skills: every skill and how to call it, and the CLI reference for
flowctl. - Changelog: release highlights.
CHANGELOG.mdhere is the full record. - Discord for questions, and
CONTRIBUTING.mdfor local development and the docs-only rule.
Where it already runs
The engineering methodology built on Flow-Next is coached and run in engineering organisations around the world: CAD and construction software, proptech, education. That covers modern monorepos, estates of a hundred microservices and 30-year-old legacy stacks, on GitHub Enterprise, GitLab and Jira. Teams running it report a 3x speed-up on average across the whole R&D organisation, from discovery to merged code, at a higher quality of output: more than 1,000 developers across a private-equity portfolio. An hour-long discovery interview typically produces 8 to 11 specs ready to build, with numbered acceptance criteria, boundaries and task breakdowns, and the edge cases come up in the interview instead of mid-sprint. Receipts, evidence and review gates give you the approval checkpoints and the trail back from each change to its requirement.
The open-source side you can check for yourself: an outside contributor's correct flowctl patch in PR #95, a listing in awesome-claude-code-workflows for plan-first workflows and receipt-based gating (#96), and a test matrix on three operating systems on every push, because people run it on all three.
"I am enjoying your version of all these cool new plugins. So far yours has worked the best." @patrickmichalina
"really enjoying this project, thanks for making it and making it public" @possibilities, external contributor
"it’s been really useful in my workflow." @raydocs
License
MIT. See LICENSE.
Made by Gordon Mickel · @gmickel · [email protected]