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

Commit d376fc6

Browse files
z23ccclaude
andcommitted
fix(flowctl): improve review-backend defaults and skill docs clarity (v0.1.34)
- Default review backend to "rp" instead of "ASK" for zero-config experience - Enable crossEpic planSync and github scouts in default config - Simplify review-backend config resolution (no deep_merge, direct fallback) - Clarify flowctl CLI arg patterns in SKILL.md (positional vs flag usage) - Add ASK/none handling guidance in preamble Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7401e85 commit d376fc6

6 files changed

Lines changed: 38 additions & 29 deletions

File tree

bin/flowctl

2.66 MB
Binary file not shown.

flowctl/crates/flowctl-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "flowctl-cli"
3-
version = "0.1.33"
3+
version = "0.1.34"
44
description = "CLI entry point for flowctl"
55
edition.workspace = true
66
rust-version.workspace = true

flowctl/crates/flowctl-cli/src/commands/admin/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ fn get_default_config() -> serde_json::Value {
1616
json!({
1717
"memory": {"enabled": true},
1818
"outputs": {"enabled": true},
19-
"planSync": {"enabled": true, "crossEpic": false},
20-
"review": {"backend": null},
21-
"scouts": {"github": false},
19+
"planSync": {"enabled": true, "crossEpic": true},
20+
"review": {"backend": "rp"},
21+
"scouts": {"github": true},
2222
"stack": {},
2323
})
2424
}

flowctl/crates/flowctl-cli/src/commands/admin/review.rs

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,23 @@ use crate::output::{error_exit, json_output};
99

1010
use flowctl_core::types::{CONFIG_FILE, REVIEWS_DIR};
1111

12-
use super::{deep_merge, get_default_config, get_flow_dir};
12+
use super::{get_default_config, get_flow_dir};
1313

1414
// ── Review-backend command ─────────────────────────────────────────
1515

1616
pub fn cmd_review_backend(json_mode: bool, compare: Option<String>, epic: Option<String>) {
17-
// Priority: FLOW_REVIEW_BACKEND env > config > ASK
17+
// Priority: FLOW_REVIEW_BACKEND env > config (non-null) > default config
18+
let default_backend = get_default_config()
19+
.pointer("/review/backend")
20+
.and_then(|v| v.as_str().map(String::from))
21+
.unwrap_or_else(|| "rp".to_string());
22+
1823
let (backend, source) = if let Ok(env_val) = std::env::var("FLOW_REVIEW_BACKEND") {
1924
let trimmed = env_val.trim().to_string();
2025
if ["rp", "codex", "none"].contains(&trimmed.as_str()) {
2126
(trimmed, "env".to_string())
2227
} else {
23-
("ASK".to_string(), "none".to_string())
28+
(default_backend.clone(), "default".to_string())
2429
}
2530
} else {
2631
let flow_dir = get_flow_dir();
@@ -29,27 +34,27 @@ pub fn cmd_review_backend(json_mode: bool, compare: Option<String>, epic: Option
2934
let config = if config_path.exists() {
3035
match fs::read_to_string(&config_path) {
3136
Ok(content) => {
32-
let raw = serde_json::from_str::<serde_json::Value>(&content)
33-
.unwrap_or(json!({}));
34-
deep_merge(&get_default_config(), &raw)
37+
serde_json::from_str::<serde_json::Value>(&content)
38+
.unwrap_or(json!({}))
3539
}
36-
Err(_) => get_default_config(),
40+
Err(_) => json!({}),
3741
}
3842
} else {
39-
get_default_config()
43+
json!({})
4044
};
4145

46+
// Read from user config; if null or missing, fall back to default
4247
let cfg_val = config
4348
.pointer("/review/backend")
4449
.and_then(|v| v.as_str())
4550
.unwrap_or("");
4651
if ["rp", "codex", "none"].contains(&cfg_val) {
4752
(cfg_val.to_string(), "config".to_string())
4853
} else {
49-
("ASK".to_string(), "none".to_string())
54+
(default_backend, "default".to_string())
5055
}
5156
} else {
52-
("ASK".to_string(), "none".to_string())
57+
(default_backend, "default".to_string())
5358
}
5459
};
5560

skills/_shared/preamble.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,16 @@ If memory returns critical-severity pitfalls, **pause and review them** before p
4343
Verify review backends are reachable before entering work/review phases:
4444

4545
```bash
46-
# Check configured review backend
46+
# Check configured review backend (returns "rp", "codex", "none", or "ASK")
4747
REVIEW_BACKEND=$($FLOWCTL review-backend 2>/dev/null || echo "none")
4848

4949
if [ "$REVIEW_BACKEND" = "rp" ]; then
5050
# Check if rp-cli or RP MCP is available
5151
which rp-cli >/dev/null 2>&1 || echo "WARNING: review backend is 'rp' but rp-cli not found. Reviews will fail. Set to 'none' via: $FLOWCTL config set review.backend none"
5252
elif [ "$REVIEW_BACKEND" = "codex" ]; then
5353
which codex >/dev/null 2>&1 || echo "WARNING: review backend is 'codex' but codex CLI not found. Reviews will fail."
54+
elif [ "$REVIEW_BACKEND" = "ASK" ] || [ "$REVIEW_BACKEND" = "none" ]; then
55+
echo "INFO: No review backend configured. Reviews will be skipped. To enable: $FLOWCTL config set review.backend rp"
5456
fi
5557
```
5658

skills/flow-code-run/SKILL.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,29 +70,31 @@ Detect input type to decide whether to execute or skip:
7070

7171
### Plan (plan)
7272
1. Spawn research scouts in parallel (repo-scout, context-scout, practice-scout)
73-
2. Write epic spec via $FLOWCTL epic plan
74-
3. Create tasks via $FLOWCTL task create with dependencies
73+
2. Write epic spec via `$FLOWCTL epic plan $EPIC_ID --spec "..." --json` (ID is positional, not a flag)
74+
3. Create tasks via `$FLOWCTL task create --epic $EPIC_ID --title "..." --deps "task1,task2" --json` (use `--deps` for dependencies, `--epic` is required)
7575
4. Validate: $FLOWCTL validate --epic $EPIC_ID --json
7676

7777
### Plan Review (plan_review)
78-
1. Detect review backend: $FLOWCTL review-backend
79-
2. Run review via RP context_builder or Codex
80-
3. Fix issues until SHIP verdict (max 3 iterations)
81-
4. If backend is none, skip and advance
78+
1. Detect review backend: `$FLOWCTL review-backend` (returns "rp", "codex", "none", or "ASK")
79+
2. If backend is "none" or "ASK", skip review and advance with `$FLOWCTL phase done`
80+
3. Otherwise run review via RP context_builder or Codex
81+
4. Fix issues until SHIP verdict (max 3 iterations)
8282

8383
### Work (work)
84-
1. Find ready tasks: $FLOWCTL ready $EPIC_ID --json
85-
2. Start tasks: $FLOWCTL start <task-id> --json
86-
3. Lock files: $FLOWCTL lock --task <id> --files "<files>"
84+
1. Find ready tasks: `$FLOWCTL ready $EPIC_ID --json`
85+
2. Start tasks: `$FLOWCTL start <task-id> --json`
86+
3. Lock files: `$FLOWCTL lock --task <task-id> --files "file1,file2" --json`
8787
4. Spawn ALL ready workers in ONE parallel Agent call with isolation worktree and team_name
8888
5. Wait for workers, merge worktree branches back
89-
6. Wave checkpoint: verify done, run guards
90-
7. Repeat waves until no ready tasks remain
89+
6. Mark tasks complete: `$FLOWCTL done <task-id> --summary "what was done" --json`
90+
7. Wave checkpoint: verify done, run guards
91+
8. Repeat waves until no ready tasks remain
9192

9293
### Impl Review (impl_review)
93-
1. Run adversarial review via Codex or RP
94-
2. Fix issues until SHIP (max 2 iterations)
95-
3. If no review backend, skip and advance
94+
1. Detect review backend: `$FLOWCTL review-backend` (same as plan_review)
95+
2. If backend is "none" or "ASK", skip review and advance with `$FLOWCTL phase done`
96+
3. Otherwise run adversarial review via Codex or RP
97+
4. Fix issues until SHIP (max 2 iterations)
9698

9799
### Close (close)
98100
1. Validate: $FLOWCTL validate --epic $EPIC_ID --json

0 commit comments

Comments
 (0)