Skip to content

/flow-next-work

Execute a Flow spec or task systematically with git setup, task tracking, quality checks, and commit workflow. Use when implementing a plan or working through a spec. Triggers on /flow-next:work with Flow IDs (fn-1-add-oauth, fn-1-add-oauth.2, or legacy fn-1, fn-1.2, fn-1-xxx,

shell
$ npx -y skills add gmickel/flow-next --skill flow-next-work --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/flow-next-work
How auto-invocation works

Context preview

The summary Claude sees to decide when to auto-load this skill.

Execute a Flow spec or task systematically with git setup, task tracking, quality checks, and commit workflow. Use when implementing a plan or working through a spec. Triggers on /flow-next:work with Flow IDs (fn-1-add-oauth, fn-1-add-oauth.2, or legacy fn-1, fn-1.2, fn-1-xxx,

SKILL.md

flow-next-work.SKILL.md
name: flow-next-work
description: Execute a Flow spec or task systematically with git setup, task tracking, quality checks, and commit workflow. Use when implementing a plan or working through a spec. Triggers on /flow-next:work with Flow IDs (fn-1-add-oauth, fn-1-add-oauth.2, or legacy fn-1, fn-1.2, fn-1-xxx, fn-1-xxx.2).
user-invocable: false

Flow work

Execute a plan systematically. Focus on finishing.

Follow this skill and linked workflows exactly. Deviations cause drift, bad gates, retries, and user frustration.

**IMPORTANT**: This plugin uses `.flow/` for ALL task tracking. Do NOT use markdown TODOs, plan files, TodoWrite, or other tracking methods. All task state must be 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="${DROID_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/scripts/flowctl"
[ -x "$FLOWCTL" ] || FLOWCTL=".flow/bin/flowctl"

**Hard requirements (non-negotiable):**

  • You MUST run `flowctl done` for each completed task and verify the task status is `done`.
  • You MUST stage with `git add -A` (never list files). This ensures `.flow/` and `scripts/ralph/` (if present) are included.
  • Do NOT claim completion until `flowctl show <task>` reports `status: done`.
  • Do NOT invoke `/flow-next:impl-review` until tests/Quick commands are green.

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

Ralph Mode Rules (always follow)

If `REVIEW_RECEIPT_PATH` is set or `FLOW_RALPH=1`:

  • **Must** use `flowctl done` and verify task status is `done` before committing.
  • **Must** stage with `git add -A` (never list files).
  • **Do NOT** use TodoWrite for tracking.

Autonomous Mode (questions off, no receipt obligations)

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

<work-arguments> $ARGUMENTS </work-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`:

  • **Ask NO setup questions** (branch + review questions below are suppressed).
  • **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. **Name the new branch exactly the spec's `branch_name` field** (`$FLOWCTL show <spec-id> --json | jq -r '.branch_name'`) — pilot's branch matrix, its all-done PR probe, and make-pr's branch-match spec detection all key on that name; an ad-hoc name breaks multi-tick continuity.
  • **Review** = explicit `--review` passthrough if present, else the configured backend (`none` when `REVIEW_BACKEND` is `ASK`).
  • **Autonomy ≠ Ralph.** Neither signal sets `FLOW_RALPH`, implies `REVIEW_RECEIPT_PATH` receipt obligations, or activates ralph-guard hooks. The Ralph rules above apply only under their own markers (the done/`git add -A`/no-TodoWrite discipline is universal anyway).
  • **Never hang on a question.** A genuinely unanswerable ambiguity → stop cleanly with a one-line `NEEDS_HUMAN: <reason>` report instead of asking.

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"

Examples:

  • `/flow-next:work fn-1-add-oauth`
  • `/flow-next:work fn-1-add-oauth.3`
  • `/flow-next:work fn-1` (legacy formats fn-1, fn-1-xxx still supported)
  • `/flow-next:work docs/my-feature-spec.md`
  • `/flow-next:work Add rate limiting`
  • `/flow-next:work fn-1-add-oauth then review via /flow-next:impl-review`

If no input provided, ask for it.

FIRST: Parse Options or Ask Questions

Check configured backend:

REVIEW_BACKEND=$($FLOWCTL review-backend)

Returns: `ASK` (not configured), or `rp`/`codex`/`copilot`/`cursor`/`host`/`none` (configured).

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

**Review mode**:

  • `--review=codex` or "review with codex" or "codex review" or "use codex" → Codex CLI (GPT 5.5 High)
  • `--review=copilot` or "review with copilot" or "copilot review" → GitHub Copilot CLI
  • `--review=cursor` or "review with cursor" or "cursor review" → Cursor CLI (`cursor-agent`)
  • `--review=host` or "host review" or "host-native review" → host-native fresh-context reviewer subagent (cross-family pin from the AGENTS.md model-routing section)
  • `--review=rp` or "review with rp" or "rp chat" or "repoprompt review" → RepoPrompt chat (via `flowctl rp chat-send`)
  • `--review=export` or "export review" or "external llm" → export for external LLM
  • `--review=none` or `--no-review` or "no review" or "skip review" → no review

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

**Autonomous mode**:

  • `AUTONOMOUS=1` → suppress all setup questions; use the defaults above.

If options NOT found in arguments

Read more
Read it on GitHub ↗

Showing the first part of this file.

Ships withflow-next

Repeatable agentic engineering. The workflow layer that turns AI coding agents into a disciplined factory: durable specs, fresh-context workers, adversarial cross-model reviews, receipts. Everything in your repo, zero dependencies. Claude Code · Codex · Cursor · Droid.

Get the whole plugin, auto-invoked
Stats
671
Stars
0
Views
52
Forks
Active
Maintenance
Python
Language
MIT
License
37m ago
Last commit
7mo ago
Created

Repo: gmickel/flow-next