flow-next-plan
npx machina-cli add skill gmickel/gmickel-claude-marketplace/flow-next-plan --openclawFlow plan
Turn a rough idea into an epic with tasks in .flow/. This skill does not write code.
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.
CRITICAL: flowctl is BUNDLED — NOT installed globally. which flowctl will fail (expected). Always use:
FLOWCTL="${DROID_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/scripts/flowctl"
$FLOWCTL <command>
Pre-check: Local setup version
If .flow/meta.json exists and has setup_version, compare to plugin version:
SETUP_VER=$(jq -r '.setup_version // empty' .flow/meta.json 2>/dev/null)
# Portable: Claude Code uses .claude-plugin, Factory Droid uses .factory-plugin
PLUGIN_JSON="${DROID_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/.claude-plugin/plugin.json"
[[ -f "$PLUGIN_JSON" ]] || PLUGIN_JSON="${DROID_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/.factory-plugin/plugin.json"
PLUGIN_VER=$(jq -r '.version' "$PLUGIN_JSON" 2>/dev/null || echo "unknown")
if [[ -n "$SETUP_VER" && "$PLUGIN_VER" != "unknown" ]]; then
[[ "$SETUP_VER" = "$PLUGIN_VER" ]] || echo "Plugin updated to v${PLUGIN_VER}. Run /flow-next:setup to refresh local scripts (current: v${SETUP_VER})."
fi
Continue regardless (non-blocking).
Role: product-minded planner with strong repo awareness.
Goal: produce an epic with tasks that match existing conventions and reuse points.
Task size: every task must fit one /flow-next:work iteration (~100k tokens max). If it won't, split it.
The Golden Rule: No Implementation Code
Plans are specs, not implementations. Do NOT write the code that will be implemented.
Code IS allowed:
- Signatures/interfaces (what, not how):
function validate(input: string): Result - Patterns from this repo (with file:line ref): "Follow pattern at
src/auth.ts:42" - Recent/surprising APIs (from docs-scout): "React 19 changed X — use
useOptimisticinstead" - Non-obvious gotchas (from practice-scout): "Must call
cleanup()or memory leaks"
Code is FORBIDDEN:
- Complete function implementations
- Full class/module bodies
- "Here's what you'll write" blocks
- Copy-paste ready snippets (>10 lines)
Why: Implementation happens in /flow-next:work with fresh context. Writing it here wastes tokens in planning, review, AND implementation — then causes drift when the implementer does it differently anyway.
Input
Full request: $ARGUMENTS
Accepts:
- Feature/bug description in natural language
- Flow epic ID
fn-N-slug(e.g.,fn-1-add-oauth) or legacyfn-N/fn-N-xxxto refine existing epic - Flow task ID
fn-N-slug.M(e.g.,fn-1-add-oauth.2) or legacyfn-N.M/fn-N-xxx.Mto refine specific task - Chained instructions like "then review with /flow-next:plan-review"
Examples:
/flow-next:plan Add OAuth login for users/flow-next:plan fn-1-add-oauth/flow-next:plan fn-1(legacy formats fn-1, fn-1-xxx still supported)/flow-next:plan fn-1-add-oauth then review via /flow-next:plan-review
If empty, ask: "What should I plan? Give me the feature or bug in 1-5 sentences."
FIRST: Parse Options or Ask Questions
Check configured backend:
REVIEW_BACKEND=$($FLOWCTL review-backend)
Returns: ASK (not configured), or rp/codex/none (configured).
Option Parsing (skip questions if found in arguments)
Parse the arguments for these patterns. If found, use them and skip questions:
Research approach:
--research=rpor--research rpor "use rp" or "context-scout" or "use repoprompt" → context-scout (errors at runtime if rp-cli missing)--research=grepor--research grepor "use grep" or "repo-scout" or "fast" → repo-scout
Review mode:
--review=codexor "review with codex" or "codex review" or "use codex" → Codex CLI (GPT 5.2 High)--review=rpor "review with rp" or "rp chat" or "repoprompt review" → RepoPrompt chat (viaflowctl rp chat-send)--review=exportor "export review" or "external llm" → export for external LLM--review=noneor--no-reviewor "no review" or "skip review" → no review
If options NOT found in arguments
Plan depth (parse from args or ask):
--depth=shortor "quick" or "minimal" → SHORT--depth=standardor "normal" → STANDARD--depth=deepor "comprehensive" or "detailed" → DEEP- Default: SHORT (simpler is better)
If REVIEW_BACKEND is rp, codex, or none (already configured): Only ask research question. Show override hint:
Quick setup: Use RepoPrompt for deeper context?
a) Yes, context-scout (slower, thorough)
b) No, repo-scout (faster)
(Reply: "a", "b", or just tell me)
(Tip: --depth=short|standard|deep, --review=rp|codex|none)
If REVIEW_BACKEND is ASK (not configured): Ask all questions (do NOT use AskUserQuestion tool):
Quick setup before planning:
1. **Plan depth** — How detailed?
a) Short — problem, acceptance, key context only
b) Standard (default) — + approach, risks, test notes
c) Deep — + phases, alternatives, rollout plan
2. **Research** — Use RepoPrompt for deeper context?
a) Yes, context-scout (slower, thorough)
b) No, repo-scout (faster)
3. **Review** — Run Carmack-level review after?
a) Codex CLI
b) RepoPrompt
c) Export for external LLM
d) None (configure later)
(Reply: "1a 2b 3d", or just tell me naturally)
Wait for response. Parse naturally — user may reply terse ("1a 2b") or ramble via voice.
Defaults when empty/ambiguous:
- Depth =
standard(balanced detail) - Research =
grep(repo-scout) - Review = configured backend if set, else
none
Workflow
Read steps.md and follow each step in order.
CRITICAL — Step 1 (Research): You MUST launch ALL scouts listed in steps.md in ONE parallel Task call. Do NOT skip scouts or run them sequentially. Each scout provides unique signal.
If user chose review:
- Option 2a: run
/flow-next:plan-reviewafter Step 4, fix issues until it passes - Option 2b: run
/flow-next:plan-reviewwith export mode after Step 4
Output
All plans go into .flow/:
- Epic:
.flow/epics/fn-N-slug.json+.flow/specs/fn-N-slug.md - Tasks:
.flow/tasks/fn-N-slug.M.json+.flow/tasks/fn-N-slug.M.md
Never write plan files outside .flow/. Never use TodoWrite for task tracking.
Output rules
- Only create/update epics and tasks via flowctl
- No code changes
- No plan files outside
.flow/
Source
git clone https://github.com/gmickel/gmickel-claude-marketplace/blob/main/plugins/flow-next/skills/flow-next-plan/SKILL.mdView on GitHub Overview
Flow-next-plan converts feature requests or Flow IDs into a structured epic with tasks tracked in .flow/. It acts as a planning layer (no code) and enforces repository conventions and flowctl-based tracking to avoid drift.
How This Skill Works
Triggered by /flow-next:plan, it parses input as either natural-language feature requests or Flow IDs, then outputs a ready-to-execute epic with tasks sized to fit a single /flow-next:work iteration. It explicitly forbids writing implementation code and relies on interfaces or patterns rather than concrete code, storing all task state in .flow/ via flowctl.
When to Use It
- You have a feature request and want a concrete Flow epic with tasks in .flow/
- You want to refine an existing epic using a Flow ID (e.g., fn-1-add-oauth)
- You need to decompose a large plan into tasks that fit one /flow-next:work iteration
- You must follow the plugin’s rule to use .flow for ALL task tracking via flowctl
- You plan for a follow-up review with /flow-next:plan-review to validate the plan
Quick Start
- Step 1: Trigger with /flow-next:plan <text description or Flow ID>
- Step 2: Review the generated epic and tasks written to the .flow/ directory
- Step 3: Refine by running /flow-next:work on individual tasks or follow up with /flow-next:plan-review
Best Practices
- Limit each task to one /flow-next:work iteration; split if it's too large
- Treat plans as specs, not implementations; include interfaces or function signatures only
- Adhere to existing repo conventions and reuse patterns or points from the Flow repo
- Ensure all task state is read/written via flowctl and stored in .flow/ (no Markdown TODOs)
- Use /flow-next:plan-review for follow-up validation when needed
Example Use Cases
- Plan an OAuth login feature for users using the Flow ID fn-1-add-oauth to create an epic and tasks in .flow/
- Plan a new search feature from a user story description and reference a Flow ID if available
- Plan a bug fix epic for a reported crash when saving settings using a related Flow ID like fn-1-bug-crash
- Plan a checkout feature via a Flow ID such as fn-2-checkout to map tasks in .flow/ and gate via flowctl
- Plan a follow-up review with /flow-next:plan-review after the initial plan is generated