| name | flow-next |
| description | Manage .flow/ tasks and specs. Use for show or list tasks, task status, what is ready, show fn-N. NOT for planning or executing (use the plan and work skills). |
Flow-Next Task Management
Quick task operations in .flow/. For planning features use /flow-next:plan, for executing use /flow-next:work.
Preamble
CRITICAL: flowctl is BUNDLED — NOT installed globally. which flowctl will fail (expected). Define once; subsequent blocks use $FLOWCTL:
FLOWCTL="$HOME/.codex/scripts/flowctl"
[ -x "$FLOWCTL" ] || FLOWCTL=".flow/bin/flowctl"
Discover all commands/options:
$FLOWCTL --help
$FLOWCTL <command> --help
Quick Reference
$FLOWCTL detect --json
$FLOWCTL init --json
$FLOWCTL list --json
$FLOWCTL specs --json
$FLOWCTL tasks --json
$FLOWCTL tasks --spec fn-1-add-oauth --json
$FLOWCTL tasks --status todo --json
$FLOWCTL show fn-1-add-oauth --json
$FLOWCTL cat fn-1-add-oauth
$FLOWCTL show fn-1-add-oauth.2 --json
$FLOWCTL cat fn-1-add-oauth.2
$FLOWCTL ready --spec fn-1-add-oauth --json
$FLOWCTL task create --spec fn-1-add-oauth --title "Fix bug X" --json
$FLOWCTL task set-spec fn-1-add-oauth.2 --description "${TMPDIR:-/tmp}/flow-desc-fn-1-add-oauth.2.md" --acceptance "${TMPDIR:-/tmp}/flow-accept-fn-1-add-oauth.2.md" --json
$FLOWCTL task set-description fn-1-add-oauth.2 --file - --json <<'EOF'
Description here
EOF
$FLOWCTL start fn-1-add-oauth.2 --json
echo "What was done" > /tmp/summary.md
echo '{"commits":["abc123"],"tests":["npm test"],"prs":[]}' > /tmp/evidence.json
$FLOWCTL done fn-1-add-oauth.2 --summary-file /tmp/summary.md --evidence-json /tmp/evidence.json --json
$FLOWCTL validate --spec fn-1-add-oauth --json
$FLOWCTL validate --all --json
Common Patterns
"Add a task for X"
- Find relevant spec:
$FLOWCTL specs --json
$FLOWCTL show fn-1 --json
- Create task:
$FLOWCTL task create --spec fn-N --title "Short title" --json
- Add description + acceptance (combined):
cat > "${TMPDIR:-/tmp}/flow-desc-fn-N.M.md" << 'EOF'
**Bug/Feature:** Brief description
**Details:**
- Point 1
- Point 2
EOF
cat > "${TMPDIR:-/tmp}/flow-accept-fn-N.M.md" << 'EOF'
- [ ] Criterion 1
- [ ] Criterion 2
EOF
$FLOWCTL task set-spec fn-N.M --description "${TMPDIR:-/tmp}/flow-desc-fn-N.M.md" --acceptance "${TMPDIR:-/tmp}/flow-accept-fn-N.M.md" --json
"What tasks are there?"
$FLOWCTL specs --json
$FLOWCTL tasks --json
$FLOWCTL tasks --spec fn-1-add-oauth --json
$FLOWCTL ready --spec fn-1-add-oauth --json
"Show me task X"
$FLOWCTL show fn-1-add-oauth.2 --json
$FLOWCTL cat fn-1-add-oauth.2
(Legacy fn-1.2 / fn-1-xxx.2 still works.)
Create new spec (rare - usually via /flow-next:plan)
$FLOWCTL spec create --title "Spec title" --json
ID Format
- Spec:
fn-N-slug where slug is derived from title (e.g., fn-1-add-oauth, fn-2-fix-login-bug)
- Task:
fn-N-slug.M (e.g., fn-1-add-oauth.1, fn-2-fix-login-bug.2)
Legacy formats fn-N and fn-N-xxx (random 3-char suffix) are still supported.
Notes
- Run
$FLOWCTL --help to discover all commands and options
- All writes go through flowctl (don't edit JSON/MD files directly)
--json flag gives machine-readable output
- For complex planning/execution, use
/flow-next:plan and /flow-next:work