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

Commit 12b95c7

Browse files
committed
feat(flow-code): add opt-in --interactive flag to /flow-code:plan
Routes through /flow-code:interview BEFORE Context Analysis when flag is passed. Opt-in only — no auto-trigger heuristic, no --no-interview flag — preserves the zero-interaction default contract (CLAUDE.md:99). Task: fn-20-abf-borrowed-enhancements-archetypes.5
1 parent 9741f02 commit 12b95c7

3 files changed

Lines changed: 36 additions & 2 deletions

File tree

skills/flow-code-interview/SKILL.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,14 @@ FLOWCTL="${DROID_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/bin/flowctl"
6969
- Read spec: `$FLOWCTL cat <id>`
7070
- Also get epic context: `$FLOWCTL cat <epic-id>`
7171

72-
3. **File path**: anything else with a path-like structure or .md extension
72+
3. **File path**: anything with a path-like structure or `.md` extension AND the file exists on disk
7373
- Read file contents
74-
- If file doesn't exist, ask user to provide valid path
74+
- If file doesn't exist, fall through to raw-text mode (below)
75+
76+
4. **Raw text (plan-integration mode)**: first arg does NOT match a Flow ID pattern AND is NOT an existing file path
77+
- Treat entire `$ARGUMENTS` as the raw request text to refine
78+
- Conduct a focused refinement interview (see **Plan-integration mode** below)
79+
- Used by `/flow-code:plan --interactive` to refine a vague request before planning
7580

7681
## Interview Process
7782

@@ -95,6 +100,32 @@ Options: a) PostgreSQL b) SQLite c) MongoDB
95100

96101
Read [questions.md](questions.md) for all question categories and interview guidelines.
97102

103+
## Plan-integration mode (raw-text input)
104+
105+
When invoked with raw request text (input type 4 above) — typically from `/flow-code:plan --interactive`:
106+
107+
- **Hard cap: 12 questions max.** This mode is a focused pre-plan refinement, not the full 40+ question spec interview. Prioritize questions that disambiguate scope, uncover missing acceptance criteria, and surface edge cases.
108+
- Group 2-4 related questions per `AskUserQuestion` call (same pattern as standard mode).
109+
- **Do NOT write to `.flow/`.** Do not create an epic, do not call `flowctl epic create`.
110+
- **Output contract**: emit refined-spec markdown to stdout with exactly these four sections, then return control to the caller:
111+
112+
```markdown
113+
## Problem
114+
<concise problem statement distilled from raw input + answers>
115+
116+
## Scope
117+
<what's in / what's out, key decisions made during interview>
118+
119+
## Acceptance
120+
- [ ] <testable criterion 1>
121+
- [ ] <testable criterion 2>
122+
123+
## Open Questions
124+
<unresolved items for planning research, or "None" if fully clarified>
125+
```
126+
127+
The caller (e.g. `/flow-code:plan`) uses this refined markdown as the effective request text for its own Context Analysis and scout research.
128+
98129
## NOT in scope (defer to /flow-code:plan)
99130

100131
- Research scouts (codebase analysis)

skills/flow-code-plan/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Research: <repo-scout|context-scout> | Depth: <short|standard|deep> | Review: <r
102102

103103
These flags override the corresponding AI decision without entering the analysis flow:
104104
- `--research=rp|grep`, `--depth=short|standard|deep`, `--review=rp|codex|export|none`, `--plan-only`
105+
- `--interactive`**opt-in** interview refinement. Before Context Analysis, invoke `/flow-code:interview` with the raw request text. The interview returns refined-spec markdown (Problem / Scope / Acceptance / Open Questions). Use that refined text as the effective request for Context Analysis and Step 1. When this flag is NOT passed, the plan flow is unchanged and the zero-interaction default (CLAUDE.md:99) is preserved. There is intentionally no auto-trigger heuristic and no `--no-interview` flag — interview is opt-in only.
105106

106107
Proceed to Step 1 immediately.
107108

skills/flow-code-plan/steps.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ FLOWCTL="${DROID_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/bin/flowctl"
4646
$FLOWCTL init --json
4747
```
4848

49+
> **Note — opt-in interactive refinement:** If the user passed `--interactive`, BEFORE running Step 0 (Context Analysis in SKILL.md), invoke `/flow-code:interview` with the raw request text. The interview returns refined-spec markdown with Problem / Scope / Acceptance / Open Questions sections; use that refined text as the effective request for Context Analysis and all subsequent steps. Without the flag, skip this entirely — Step 0.5 below remains an automated internal brainstorm and is **not** interactive. Do not add any auto-trigger heuristic (length, punctuation, verb detection); interview must be opt-in only to preserve the zero-interaction contract (CLAUDE.md:99).
50+
4951
## Step 0.5: Clarity Check (auto — no human input)
5052

5153
**Clear?** (specific behavior, bug with repro, existing pattern, has acceptance criteria) → skip to Step 1.

0 commit comments

Comments
 (0)