Conduct the full lean-flow loop end-to-end: assess context, ensure a backlog and sprint exist, build through the gates with the right per-task technique, then close with governance. The opt-in conductor sequences the standalone skills as stages and enforces the gates/governance, but never auto-approves a human gate. Use it for the conducted workflow or use individual skills for standalone work.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Flow?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/aldianriski-flow)
---
name: flow
description: >-
Conduct the full lean-flow loop end-to-end: assess context, ensure a backlog and sprint exist,
build through the gates with the right per-task technique, then close with governance. The opt-in
conductor sequences the standalone skills as stages and enforces the gates/governance, but never
auto-approves a human gate. Use it for the conducted workflow or use individual skills for
standalone work.
argument-hint: "[intent, or blank to continue from current state]"
allowed-tools: Read, Bash, Glob, Grep, Agent, Task
user-invocable: true
version: "0.2.0"
---
# flow
The opt-in **conductor** for the lean-flow loop. It drives the standalone skills through the proper
sequence so the discipline *runs* instead of being remembered — **à la carte still works; this is the
conducted path.** It sequences; it never bypasses a gate.
> Every skill stays standalone (nothing requires another). `/flow` is the one component *allowed* to
> depend on the others — conducting them is its whole job. It does not re-implement any stage; it calls them.
## What it conducts
Assess the current state first, then run only the stages whose precondition is unmet — state which you're running and why you're skipping the rest.
**Assess from the store** (folders + frontmatter; `TODO.md` is never read): *open work* = any `TASK-*.md` in
`docs/work/{backlog,todo,in_progress,review}/` · *ready backlog* = `docs/work/backlog/` files with `state: ready` ·
*active sprint* = a top-level `docs/sprint/SPRINT-*.md` (not `logs/` or `archive/`) with `status: active`; its
members are its `## Members` paths ∪ every task file stamped `sprint: SPRINT-NNN`, whatever folder it sits in.
1. **Orient** — context missing/stale → `/prime`. Resuming from a handoff? read it first. After `/prime`, an **unprofiled** repo (prime's test: no CLAUDE/CONTEXT/overview → `/lean-doc-generator init`; docs but no overview `## Stack` → `migrate`) runs that skill before Feed; unattended it parks (both are HITL).
2. **Feed** — no active sprint and no open work → `/task-decomposer "<intent>"` — **the detailed grill fires here, at intake** (the build gates re-grill only residuals); intent too **foggy to plan** (decisions unknown) → its **fog-mode** (`--fog`) maps decisions before tasks; open work but none `state: ready`, or backlog drifted / noisy → `/triage`.
Work is a `docs/product/roadmap.md` row → `/task-decomposer --roadmap <row>` (one row, beside `--epic`; never edits the roadmap).
A reported bug → `/triage`, which files it as a `type: bug` work item (ADR-056); an item it marks `next: /diagnose` goes to
`/diagnose` before Plan (a quick one-off or promoted, the owner chooses), never back to `/triage`; one already diagnosed skips it.
3. **Plan** — no active sprint but a ready backlog exists **and Feed did not return Stop here (`stop`)** → `/lean-doc-generator promote` (the governance review fires here). Feed's `stop` ends the chain with `Next:` only, creating no sprint; its intake coordinator must return that result, never swallow it.
4. **Build** — an active sprint with a member outside `done/`/`cancel/` **and no returned `stop`** → flow invokes `/orchestrator <mode>` once, using the promote offer's result (promote never also invokes it under flow). Entering cold with no named mode → the popup/recommendation in `orchestrator/references/mode-choice.md`; headless mode-less entry gives `Next:` only and runs nothing. A selected/explicit mode skips any second chooser and follows normal routing + gates (never an unpromoted Backlog task — step 3 promotes first). Route each task by type: new behaviour → `/tdd` (test-first, default) · bug → `/diagnose` · hard-to-change → `/refactor-advisor` · a design that must be *felt* → `/prototype` first.
Preserve `promote` / `stop` / `<mode>` across delegated stages per `orchestrator/references/mode-choice.md`; flow alone invokes the next stage. Stop at either offer ends this invocation; quick/mvp returns after its one member, without silently re-entering Build.
A `type: bug` item builds through `/diagnose`, which writes its root cause, fix and regression test into it.
5. **Close** — every member of the active sprint in `docs/work/done/` or `cancel/` → `/lean-doc-generator close` (Retro → §10 buckets), then **`/release-patch` (PATCH) for a fixes-only sprint · MINOR by hand for a feature sprint**.
6. **Continuity** — stopping mid-loop or context past ~200k (or the host's `lane-context-ceiling:`) at a task boundary → `/handoff`, so the next `/flow` resumes cleanly; with a coordinator, follow `orchestrator/references/coordinator.md` § 8 Lane rotation.
**Pin the target with `/goal`** — set a `/goal` to the active task/sprint's DoD so the conducted run
keeps driving across turns until it's verifiably met; clear it at close. That's the native engine
behind "conduct the loop".
## Conductor, not autopilot
- **Never self-approve a gate.** G1 Scope and G2 Design still need explicit human sign-off — `/flow` pauses at each; it does not wave them through.
- **Stage 4 post-G2 sprint execution** parks mid-run blockers per `orchestrator/references/sprint-bulk-run.md` § Runtime, including its bounded review retry and exit frontier. Other stages halt on first blocker — report and wait (unattended → record and hand off); explicit user `block`, budget stops, hard failures and pre-execution gates halt at once in every stage.
- **`overnight` is the canonical name for the unattended headless run** — named after the contract it runs (`orchestrator/references/night-run.md` Part 0 authority · Part 0b continuation), not after the script that launches it. **`night-run` · `unattended` · `sprint-bulk unattended` all still resolve to it**, so no existing trigger breaks; an unrecognised mode string is refused rather than defaulted, because the mode is declared and never inferred.
- **Unattended, only stage 4 conducts.** A headless run (declared at trigger, never inferred) executes a promoted Plan and decides nothing: stage 2 (Feed — the grill), stage 3 (Plan — promote's governance sign-off) and stage 5's `close` §11 retention all **park**; stage 6 `/handoff` is how it ends. If stage 3's precondition is unmet, the conducted run parks there rather than promoting a sprint nobody approved. Contract → `orchestrator/references/night-run.md` Part 0.
- **Asked to *start* a night run, you are the launcher — not the run.** Conduct stages 1–3 interactively (gates and all), then pre-flight, and fire the trigger only once it is green. The stages that park *inside* an unattended run are exactly the ones you must complete *before* one; that is legal here because a human is present. Never spawn first (→ `orchestrator/references/night-run.md` Part 1a).
- **One sprint per stream** — never a second sprint in a stream that already has one; parallel streams (sprint `stream:` frontmatter) each run their own. Single-stream repos: exactly one active sprint, as before.
- **Layout v1/mixed** → `TODO.md` present and no `docs/work/` → v1 · both present → mixed · only `docs/work/` → v2 (existence only, never content). Refuse and point to `/lean-doc-generator migrate`, the only 2.x path for a v1 tree — never conduct a stage through it.
- The conducted path produces the **same artifacts** as à la carte — it only guarantees the sequence and that the Close governance actually runs.
## Red flags
❌ **Auto-approving G1/G2** — the conductor sequences; the human gates.
❌ **Skipping the Close governance** (Retro / §10) because "the build's done" — that's the part that compounds.
❌ **Re-running a stage whose output already exists** — assess first; skip with a stated reason.
❌ **Conducting when one skill was wanted** — `/flow` is opt-in; a single `/tdd` is not a reason to drive the whole loop.
❌ **Re-implementing a stage inline** — always call the standalone skill, never inline its logic.
❌ **Surfacing a blocking G1/G2/grill question inline instead of as an AskUserQuestion popup** — the human must be *asked*, not shown prose (SPRINT-015 T3).