Skip to content
This repository was archived by the owner on Apr 11, 2026. It is now read-only.

Commit 83152ac

Browse files
z23ccclaude
andcommitted
refactor(flowctl): unify CLI arg style — positional for primary entity, flag for filters
4 commands (estimate, ready, events, files) now accept epic ID as positional arg while keeping --epic flag for backwards compatibility. Added --spec inline alias to epic plan. Updated all 14 docs/skill files (25 occurrences) to use new style. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 68d9d60 commit 83152ac

19 files changed

Lines changed: 91 additions & 49 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Rust: clippy for linting, cargo test for tests. No TypeScript, no npm. Skills an
8383
- **Epic archival**: `flowctl epic archive <id>` moves closed epic + tasks + specs + reviews to `.flow/.archive/`; `flowctl epic clean` archives all closed epics at once
8484
- **Learning loop**: plan injects memory (Step 6), worker saves lessons (Phase 11, included in default sequence when memory.enabled is true), epic close prompts retro, retro verifies stale entries via `flowctl memory verify <id>`
8585
- **Task duration**: `flowctl done` auto-tracks `duration_seconds` from start to completion, rendered in evidence
86-
- **File ownership**: `flowctl task create --files <paths>` declares owned files; `flowctl files --epic <id>` shows ownership map + conflict detection
86+
- **File ownership**: `flowctl task create --files <paths>` declares owned files; `flowctl files <id>` shows ownership map + conflict detection
8787
- **File locking (Teams)**: `flowctl lock --task <id> --files <paths>` acquires runtime file locks; `flowctl unlock --task <id>` releases on completion; `flowctl lock-check --file <path>` inspects lock state; `flowctl unlock --all` clears all locks between waves
8888
- **Agent Teams mode**: `/flow-code:run` (or legacy `/flow-code:work`) spawns workers as Agent Team teammates with plain-text protocol messages (summary-prefix routing: "Task complete:", "Spec conflict:", "Blocked:", "Need file access:", "New task:", "Access granted/denied:", native `shutdown_request`) and file lock enforcement
8989
- **Adversarial review**: `flowctl codex adversarial --base main [--focus "area"]` runs Codex in adversarial mode — tries to break the code, not validate it. Returns SHIP/NEEDS_WORK with grounded findings

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ export PATH=".flow/bin:$PATH"
195195
flowctl --help
196196
flowctl epics # List all epics
197197
flowctl tasks --epic fn-1 # List tasks for epic
198-
flowctl ready --epic fn-1 # What's ready to work on
198+
flowctl ready fn-1 # What's ready to work on
199199
```
200200

201201
### 3. Use
@@ -1663,7 +1663,7 @@ flowctl task set-acceptance fn-1.1 --file accept.md
16631663
flowctl dep add fn-1.3 fn-1.2 # fn-1.3 depends on fn-1.2
16641664

16651665
# Workflow
1666-
flowctl ready --epic fn-1 # Show ready/in_progress/blocked
1666+
flowctl ready fn-1 # Show ready/in_progress/blocked
16671667
flowctl next # Select next plan/work unit
16681668
flowctl start fn-1.1 # Claim and start task
16691669
flowctl done fn-1.1 --summary-file s.md --evidence-json e.json
@@ -1862,7 +1862,7 @@ This project uses Flow-Code for task tracking. `flowctl` must be in PATH (`~/.fl
18621862

18631863
Quick commands:
18641864
- `flowctl list` — list epics + tasks
1865-
- `flowctl ready --epic fn-N` — what's ready
1865+
- `flowctl ready fn-N` — what's ready
18661866
- `flowctl start fn-N.M` — claim task
18671867
- `flowctl done fn-N.M --summary-file s.md --evidence-json e.json`
18681868

README_CN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export PATH=".flow/bin:$PATH"
187187
flowctl --help
188188
flowctl epics # 列出所有 epic
189189
flowctl tasks --epic fn-1 # 列出 epic 的任务
190-
flowctl ready --epic fn-1 # 查看准备就绪的任务
190+
flowctl ready fn-1 # 查看准备就绪的任务
191191
```
192192

193193
### 3. 使用
@@ -1545,7 +1545,7 @@ flowctl task set-acceptance fn-1.1 --file accept.md
15451545
flowctl dep add fn-1.3 fn-1.2 # fn-1.3 依赖 fn-1.2
15461546

15471547
# 工作流
1548-
flowctl ready --epic fn-1 # 显示就绪/进行中/已阻塞
1548+
flowctl ready fn-1 # 显示就绪/进行中/已阻塞
15491549
flowctl next # 选择下一个 plan/work 单元
15501550
flowctl start fn-1.1 # 认领并开始任务
15511551
flowctl done fn-1.1 --summary-file s.md --evidence-json e.json
@@ -1736,7 +1736,7 @@ flowctl config set review.backend codex
17361736

17371737
快速命令:
17381738
- `flowctl list` — 列出 epic + 任务
1739-
- `flowctl ready --epic fn-N` — 查看就绪任务
1739+
- `flowctl ready fn-N` — 查看就绪任务
17401740
- `flowctl start fn-N.M` — 认领任务
17411741
- `flowctl done fn-N.M --summary-file s.md --evidence-json e.json`
17421742

codex/skills/flow-code-plan/steps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ Default to standard unless complexity demands more or less.
286286
287287
# Task with file ownership (recommended for parallel execution):
288288
$FLOWCTL task create --epic <epic-id> --title "<Task title>" --files "src/auth.ts,src/routes.ts" --json
289-
# Enables flowctl files --epic <id> to detect conflicts before parallel execution
289+
# Enables flowctl files <id> to detect conflicts before parallel execution
290290
```
291291
292292
**TIP**: Use `--deps` to declare dependencies inline when creating tasks. Tasks must exist before being referenced, so create in dependency order. Use `--domain` when the task clearly belongs to a specific area. Use `--files` to declare file ownership for teams/parallel conflict prevention.

codex/skills/flow-code-setup/templates/claude-md-snippet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This project uses Flow-Code for task tracking. Use `.flow/bin/flowctl` instead o
88
.flow/bin/flowctl list # List all epics + tasks
99
.flow/bin/flowctl epics # List all epics
1010
.flow/bin/flowctl tasks --epic fn-N # List tasks for epic
11-
.flow/bin/flowctl ready --epic fn-N # What's ready
11+
.flow/bin/flowctl ready fn-N # What's ready
1212
.flow/bin/flowctl show fn-N.M # View task
1313
.flow/bin/flowctl start fn-N.M # Claim task
1414
.flow/bin/flowctl done fn-N.M --summary-file s.md --evidence-json e.json

codex/skills/flow-code-setup/templates/usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Task tracking for AI agents. All state lives in `.flow/`.
4646
.flow/bin/flowctl cat fn-1-add-oauth.2 # Task spec (markdown)
4747

4848
# Status
49-
.flow/bin/flowctl ready --epic fn-1-add-oauth # What's ready to work on
49+
.flow/bin/flowctl ready fn-1-add-oauth # What's ready to work on
5050
.flow/bin/flowctl validate --all # Check structure
5151
.flow/bin/flowctl state-path # Show state directory (for worktrees)
5252

@@ -67,7 +67,7 @@ Task tracking for AI agents. All state lives in `.flow/`.
6767
## Workflow
6868

6969
1. `.flow/bin/flowctl epics` - list all epics
70-
2. `.flow/bin/flowctl ready --epic fn-N-slug` - find available tasks
70+
2. `.flow/bin/flowctl ready fn-N-slug` - find available tasks
7171
3. `.flow/bin/flowctl start fn-N-slug.M` - claim task
7272
4. Implement the task
7373
5. `.flow/bin/flowctl done fn-N-slug.M --summary-file ... --evidence-json ...` - complete

codex/skills/flow-code-work/phases.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Detect input type in this order (first match wins):
4242
- Clear auto-execute marker (confirms work has started): `$FLOWCTL epic auto-exec <id> --done --json`
4343
- Read epic: `$FLOWCTL show <id> --json`
4444
- Read spec: `$FLOWCTL cat <id>`
45-
- Get first ready task: `$FLOWCTL ready --epic <id> --json`
45+
- Get first ready task: `$FLOWCTL ready <id> --json`
4646

4747
**Spec file start (.md path that exists)**:
4848
1. Check file exists: `test -f "<path>"` — if not, treat as idea text
@@ -107,7 +107,7 @@ $FLOWCTL restart <stale-task-id> --json
107107
After restarts, find ready tasks normally:
108108

109109
```bash
110-
$FLOWCTL ready --epic <epic-id> --json
110+
$FLOWCTL ready <epic-id> --json
111111
```
112112

113113
Collect ALL ready tasks (no unresolved dependencies). If no ready tasks, check for completion review gate (see Step 10 below).

codex/skills/flow-code/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ $FLOWCTL show fn-1-add-oauth.2 --json
5252
$FLOWCTL cat fn-1-add-oauth.2 # Task spec
5353

5454
# What's ready to work on?
55-
$FLOWCTL ready --epic fn-1-add-oauth --json
55+
$FLOWCTL ready fn-1-add-oauth --json
5656

5757
# Create task under existing epic
5858
$FLOWCTL task create --epic fn-1-add-oauth --title "Fix bug X" --json
@@ -125,7 +125,7 @@ $FLOWCTL tasks --json
125125
$FLOWCTL tasks --epic fn-1-add-oauth --json
126126
127127
# Ready tasks for an epic
128-
$FLOWCTL ready --epic fn-1-add-oauth --json
128+
$FLOWCTL ready fn-1-add-oauth --json
129129
```
130130
131131
### "Show me task X"

docs/flowctl.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,11 @@ flowctl cat fn-1.2 # Task spec
384384
List tasks ready to start, in progress, and blocked.
385385

386386
```bash
387-
flowctl ready --epic fn-1 [--json]
387+
flowctl ready fn-1 [--json]
388388
```
389389

390+
> `--epic` flag is still accepted for backwards compatibility.
391+
390392
Output:
391393
```json
392394
{
@@ -929,9 +931,11 @@ Also available via `flowctl status --dag --epic fn-1`.
929931
Estimate remaining time for an epic based on historical task durations.
930932

931933
```bash
932-
flowctl estimate --epic fn-1 [--json]
934+
flowctl estimate fn-1 [--json]
933935
```
934936

937+
> `--epic` flag is still accepted for backwards compatibility.
938+
935939
### replay
936940

937941
Replay an epic: reset all tasks to `todo` for re-execution.
@@ -1106,9 +1110,11 @@ flowctl stats cleanup [--json] # Delete old events/rollups
11061110
Show file ownership map for an epic.
11071111

11081112
```bash
1109-
flowctl files --epic fn-1 [--json]
1113+
flowctl files fn-1 [--json]
11101114
```
11111115

1116+
> `--epic` flag is still accepted for backwards compatibility.
1117+
11121118
Shows which tasks own which files and detects ownership conflicts.
11131119

11141120
### lock

docs/token-optimization-audit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ The orchestrator context is the **true bottleneck** — it accumulates across th
257257
| 35 | Worker completion messages: compact format `done: fn-15.3 files=3 build=ok 120s` | `agents/worker.md` Phase 5 | P0 |
258258
| 36 | Evidence stored to file by default (`.flow/evidence/<task>.json`); orchestrator reads on demand | `agents/worker.md` Phase 4 | P0 |
259259
| 37 | Orchestrator polling `tasks` defaults to compact output | `skills/flow-code-work/SKILL.md` | P0 |
260-
| 38 | `flowctl files --epic X` compact (Teams lock-conflict hot path) | Same as #3 | P0 |
260+
| 38 | `flowctl files X` compact (Teams lock-conflict hot path) | Same as #3 | P0 |
261261
| 39 | `flowctl lock-check --file X` minimal output (`free` / `held:X`) | `commands/lock.rs` | P0 |
262262

263263
### 2.8 rtk integration layer

0 commit comments

Comments
 (0)