Agent Skills › gmickel/flow-next › flow-next-work

flow-next-work

GitHub

系统性执行开发计划,通过flowctl管理任务状态、分支及提交。支持自治模式,确保严格遵循流程规范完成编码与测试。

plugins/flow-next/codex/skills/flow-next-work/SKILL.md gmickel/flow-next

触发场景

用户输入 work 命令 flow-next-flow 路由至此 需要按规范执行具体开发任务

安装

npx skills add gmickel/flow-next --skill flow-next-work -g -y
更多选项

非标准路径

npx skills add https://github.com/gmickel/flow-next/tree/main/plugins/flow-next/codex/skills/flow-next-work -g -y

不安装直接使用

npx skills use gmickel/flow-next@flow-next-work

指定 Agent (Claude Code)

npx skills add gmickel/flow-next --skill flow-next-work -a claude-code -g -y

安装 repo 全部 skill

npx skills add gmickel/flow-next --all -g -y

预览 repo 内 skill

npx skills add gmickel/flow-next --list

SKILL.md

Frontmatter
{
    "name": "flow-next-work",
    "description": "Execute a flow-next spec or task with workers, gates and commits. Run when the work command is typed or flow-next-flow routes here; plain requests to implement fn-N go to flow-next-flow.",
    "user-invocable": false
}

Flow work

Execute a plan systematically. Focus on finishing.

.flow/ is the only task tracker. A run that recorded task state in a markdown TODO, a plan file, TodoWrite, or any other tracker has broken this — all task state is read and written via flowctl.

Preamble

CRITICAL: flowctl is BUNDLED — NOT installed globally. which flowctl will fail (expected). Define once; subsequent blocks (here and in phases.md) use $FLOWCTL:

FLOWCTL="${CODEX_HOME:-$HOME/.codex}/scripts/flowctl"
[ -x "$FLOWCTL" ] || FLOWCTL="<plugin-root>/scripts/flowctl"   # <plugin-root> = the directory two levels above this skill's SKILL.md file (the harness gave you that file's absolute path when the skill loaded); substitute it literally
[ -x "$FLOWCTL" ] || FLOWCTL=".flow/bin/flowctl"

Hard requirements (non-negotiable):

  • Every completed task passes through flowctl done and a verified done status. A task treated as finished while flowctl show <task> still reads todo or in_progress has broken this.
  • Staging is the files you changed plus .flow/ (git add -- <files> .flow/), never git add -A — .flow/ carries the run's task state; files a test run or tool wrote stay out of the diff. A commit whose diff omits the run's .flow/ writes has broken this.
  • Completion is claimed only after flowctl show <task> reports status: done. A completion claim printed ahead of that read has broken this.
  • $flow-next-impl-review is dispatched only on a green tree. A review sent while tests or Quick commands are red has broken this.

Role: execution lead, plan fidelity first. Goal: complete every task in order with tests.

Autonomous Mode (questions off, no receipt obligations)

Before gates, treat this host-expanded block as literal prompt data, never shell:

$ARGUMENTS

Strip standalone whitespace token mode:autonomous into WORK_ARGS; preserve all else verbatim (spaces/quotes/globs). Set/export AUTONOMOUS=1 if found or FLOW_AUTONOMOUS=1; otherwise set/export AUTONOMOUS=0.

Continue with WORK_ARGS; carry the exported marker into later shell fragments. If AUTONOMOUS=1: read references/autonomous-defaults.md before any question, and:

  • Branch defaults deterministically to --branch=new when no explicit branch option is present — under autonomy "the user's answer" never exists, and defaulting to the current branch could commit straight to main. A chained spec (flowctl spec chain names a parent) forks from the parent's remote tip instead of main (phases.md Phase 2). Name the new branch exactly the spec's branch_name field ($FLOWCTL show <spec-id> --json | jq -r '.branch_name') — the branch matrix of flow --auto, its all-done PR probe, and make-pr's branch-match spec detection all key on that name; an ad-hoc name breaks continuity across hops and invocations.

Input

Full request after mode parsing: $WORK_ARGS

Accepts:

  • Flow spec ID fn-N-slug (e.g., fn-1-add-oauth) or legacy fn-N/fn-N-xxx to work through all tasks
  • Flow task ID fn-N-slug.M (e.g., fn-1-add-oauth.2) or legacy fn-N.M/fn-N-xxx.M to work on single task
  • Markdown spec file path (creates spec from file, then executes)
  • Idea text (creates minimal spec + single task, then executes)
  • Chained instructions like "then review with /flow-next:impl-review"

If no input provided, ask for it.

FIRST: Parse Options

Option Parsing (skip questions if found in arguments)

Parse WORK_ARGS for these patterns. If found, use them and skip corresponding questions:

Branch mode:

  • --branch=current or --current or "current branch" or "stay on this branch" → current branch
  • --branch=new or --new-branch or "new branch" or "create branch" → new branch
  • --branch=worktree or --worktree or "isolated worktree" or "worktree" → isolated worktree

Base: --base=<branch> or --base <branch> → DEFAULT_BASE=origin/<branch> (a leading origin/ is kept once), the branch a new spec branch starts from and the run is compared against (phases.md Phase 2); an unfetchable branch, or a spec with a chain parent, stops BLOCKED there, before any branch is created.

Review mode:

  • --review=<codex|copilot|cursor|claude|host|none>, or the same backend named in words ("review with codex", "host review", "skip review"); --no-review = none

(All non-none review modes route through $flow-next-impl-review, which resolves the configured/overridden backend — codex, copilot, cursor, claude, or host — itself.)

No-plan (direct spec execution):

  • --no-plan or "no plan" or "skip planning" or "work directly without planning" → set NO_PLAN=1; it pre-answers Phase 1's zero-task fork so the fork's ask never fires when intent is stated
  • Implementation review, coverage, completion policy and opt-in QA remain unchanged on this route.
  • The fork's semantics (ask, autonomous refusal, durable choice, implicit-task mint) live in phases.md Phase 1's gated references/no-plan-route.md, read only when the fork fires

Autonomous mode:

  • AUTONOMOUS=1 → use the defaults above.

If the options are absent from the arguments

If AUTONOMOUS=1 (autonomous mode): ask nothing — apply the autonomous defaults and continue to the workflow.

Otherwise (interactive): do not ask about the branch. Stay on the current branch when it is not the default branch, otherwise create a new one (named for the spec's branch_name), and say which in one line. Never ask about review either: the review step resolves the backend per task (phases.md Phase 3).

Done when: the branch and review modes are resolved from arguments, these defaults, or the autonomous defaults.

Workflow

Read working-rules.md first unless you already have this run; it holds on every phase and in every worker dispatch.

Once the modes are resolved, read phases.md and execute each phase in order.

Guardrails

  • The branch is chosen before the run starts. A run that began on an unresolved branch choice has broken this.
  • A plan or spec exists before implementation starts. A run that began with no .flow/ spec has broken this.
  • Tests run. A task marked done before the focused tests for the code it changed ran has broken this.
  • No task is left half-done. A run that ends with a task still in_progress and no NEEDS_HUMAN/blocked report has broken this.
  • Task tracking lives in .flow/ via flowctl. A run tracking tasks in TodoWrite, or writing a plan file outside .flow/, has broken this.

版本历史

  • 259dbe6 当前 2026-11-03 09:54

    重构了自治模式下的分支默认逻辑,优化了任务追踪与提交规范,增强流程执行的确定性与合规性。

  • 4eba935 2026-10-19 16:49

    新增 Goal 模式支持:子任务默认合并至集成分支;修复最终 PR 需在开启前完成审查;--base 参数现拒绝链式规格请求。

  • 7db792a 2026-09-28 08:13

    优化默认输出和包体积(审计第4波),精简锚点记忆索引、词表和 git 状态;改进 show 命令过滤无用字段;增强词组匹配能力;优化评审工作流输出及模型调用标识处理。

  • b91f43c 2026-09-22 21:16

    新增依赖规格链功能:支持从父分支派生、链接GitHub堆栈,增强合并父级重写与栈链接降级处理。

  • c9f7a79 2026-09-09 15:23

    新增Claude CLI后端审查支持,将review.backend固定为codex:gpt-6-astra:high;引入Claude注册表、stdin运行器及钩子机制;修复严格解析Claude结果的问题。

  • cd9ddf8 2026-08-28 18:47

    新增not_required完成评审状态,优化CAS写入逻辑,修复提交同步旁路问题。

  • 8baa538 2026-08-20 07:59

同 Skill 集合

optimization/audit/baseline/SKILL.md
optimization/interview/baseline/SKILL.md
optimization/make-pr/baseline/SKILL.md
optimization/plan/baseline/SKILL.md
optimization/prospect/baseline/SKILL.md
plugins/flow-next/codex/skills/flow-next-audit/SKILL.md
plugins/flow-next/codex/skills/flow-next-capture/SKILL.md
plugins/flow-next/codex/skills/flow-next-chart/SKILL.md
plugins/flow-next/codex/skills/flow-next-deps/SKILL.md
plugins/flow-next/codex/skills/flow-next-export-context/SKILL.md
plugins/flow-next/codex/skills/flow-next-features/SKILL.md
plugins/flow-next/codex/skills/flow-next-flow/SKILL.md
plugins/flow-next/codex/skills/flow-next-guide/SKILL.md
plugins/flow-next/codex/skills/flow-next-impl-review/SKILL.md
plugins/flow-next/codex/skills/flow-next-interview/SKILL.md
plugins/flow-next/codex/skills/flow-next-land/SKILL.md
plugins/flow-next/codex/skills/flow-next-make-pr/SKILL.md
plugins/flow-next/codex/skills/flow-next-map/SKILL.md
plugins/flow-next/codex/skills/flow-next-memory-migrate/SKILL.md
plugins/flow-next/codex/skills/flow-next-pilot/SKILL.md
plugins/flow-next/codex/skills/flow-next-plan-review/SKILL.md
plugins/flow-next/codex/skills/flow-next-plan/SKILL.md
plugins/flow-next/codex/skills/flow-next-prime/SKILL.md
plugins/flow-next/codex/skills/flow-next-prose/SKILL.md
plugins/flow-next/codex/skills/flow-next-prospect/SKILL.md
plugins/flow-next/codex/skills/flow-next-qa/SKILL.md
plugins/flow-next/codex/skills/flow-next-ralph-init/SKILL.md
plugins/flow-next/codex/skills/flow-next-resolve-pr/SKILL.md
plugins/flow-next/codex/skills/flow-next-setup/SKILL.md
plugins/flow-next/codex/skills/flow-next-spec-completion-review/SKILL.md
plugins/flow-next/codex/skills/flow-next-strategy/SKILL.md
plugins/flow-next/codex/skills/flow-next-sync/SKILL.md
plugins/flow-next/codex/skills/flow-next-tracker-sync/SKILL.md
plugins/flow-next/codex/skills/flow-next-visual/SKILL.md
plugins/flow-next/codex/skills/flow-next-work-rolling/SKILL.md
plugins/flow-next/codex/skills/flow-next-worktree-kit/SKILL.md
plugins/flow-next/codex/skills/flow-next/SKILL.md
plugins/flow-next/skills/flow-next-chart/SKILL.md
plugins/flow-next/skills/flow-next-deps/SKILL.md
plugins/flow-next/skills/flow-next-export-context/SKILL.md
plugins/flow-next/skills/flow-next-features/SKILL.md
plugins/flow-next/skills/flow-next-guide/SKILL.md
plugins/flow-next/skills/flow-next-impl-review/SKILL.md
plugins/flow-next/skills/flow-next-interview/SKILL.md
plugins/flow-next/skills/flow-next-land/SKILL.md
plugins/flow-next/skills/flow-next-make-pr/SKILL.md
plugins/flow-next/skills/flow-next-map/SKILL.md
plugins/flow-next/skills/flow-next-pilot/SKILL.md
plugins/flow-next/skills/flow-next-plan-review/SKILL.md

元信息

文件数
0
版本
259dbe6
Hash
88317056
收录时间
2026-08-20 07:59

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-06 08:39
浙ICP备14020137号-1