/flow-next:flow-next-depsfrom flow-next
Visualizes spec dependency graphs and execution order using flowctl. Identifies blocking chains, critical paths, and parallelizable specs.
Ships in flow-next. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Visualize spec dependencies, blocking chains, and execution phases.
flowctl is bundled with the plugin (not on PATH). Define once; subsequent blocks use $FLOWCTL:
FLOWCTL="${DROID_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/scripts/flowctl"
[ -x "$FLOWCTL" ] || FLOWCTL="<plugin-root>/scripts/flowctl" # <plugin-root> = the directory two levels above this skill's SKILL.md file (the harness gave you that file's absolute path when the skill loaded); substitute it literally
[ -x "$FLOWCTL" ] || FLOWCTL=".flow/bin/flowctl"
[ -d "$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.flow" ] && echo "OK: .flow/ exists" || echo "ERROR: run $FLOWCTL init"
command -v jq >/dev/null 2>&1 && echo "OK: jq installed" || echo "ERROR: brew install jq"
Build a consolidated view of all specs with their dependencies in a single flowctl specs --json call (depends_on_epics is included directly in specs --json, so no per-spec flowctl show loop is needed). Steps 2 and 3 reuse the cached file (bash vars do not survive across tool calls, so the cache is a file at a literal agent-composed path — compose <suffix> once, e.g. 4 random chars, and reuse the same literal path in every later block):
# ONE gather — Steps 2 and 3 read this file; no per-spec flowctl show loop
SPECS_FILE="${TMPDIR:-/tmp}/flow-deps-specs-<suffix>.json"
"$FLOWCTL" specs --json | jq '[.specs[] | {
id: .id,
title: .title,
status: .status,
deps: (.depends_on_epics // [])
}]' > "$SPECS_FILE"
jq -r --arg f "$SPECS_FILE" '"Gathered \(length) specs (\([.[] | select(.status != "done")] | length) open) -> \($f)"' "$SPECS_FILE"
$SPECS_FILE exists at the composed literal path and parses as a JSON array with one object per spec returned by flowctl specs --json, including .deps from .depends_on_epics.flowctl specs --json call with zero per-spec flowctl show calls. Steps 2 and 3 read that file. A second gather has broken this.Determine which specs are ready vs blocked (pure jq, works on any shell):
# Reuse the Step 1 gather — same literal path, NO re-fetch (one gather total)
SPECS_FILE="${TMPDIR:-/tmp}/flow-deps-specs-<suffix>.json"
# Compute blocking status
jq -r '
# Build status lookup
(map({(.id): .status}) | add // {}) as $status |
# Check each non-done spec
.[] | select(.status != "done") |
.id as $id | .title as $title |
# Find deps that are not done
([.deps[] | select($status[.] != "done")] | join(", ")) as $blocked_by |
if ($blocked_by | length) == 0 then
"READY: \($id) - \($title)"
else
"BLOCKED: \($id) - \($title) (by: \($blocked_by))"
end
' "$SPECS_FILE"
done spec in $SPECS_FILE emitted exactly one READY: or BLOCKED: line, and each BLOCKED: line names the specific deps holding it.flowctl specs or flowctl show call.Group specs into parallel execution phases:
# Reuse the Step 1 gather — same literal path, NO re-fetch (one gather total)
SPECS_FILE="${TMPDIR:-/tmp}/flow-deps-specs-<suffix>.json"
# fence:deps-phases
# Phase assignment algorithm (run in jq for reliability)
jq '
# Build status lookup
(map({(.id): .status}) | add // {}) as $status |
# Filter to non-done specs
[.[] | select(.status != "done")] as $open |
# Assign phases until a round places nothing, so a chain of any depth is phased
{assigned: [], result: [], open: $open, stalled: false} |
until(.stalled;
.assigned as $assigned |
# Find specs not yet assigned whose deps are all done or in earlier phases
([.open[] | select(
([.id] | inside($assigned) | not) and
((.deps // []) | all(. as $d | $status[$d] == "done" or ($assigned | index($d))))
)] | map(.id)) as $ready |
if ($ready | length) > 0 then
.result += [{phase: ((.result | length) + 1), specs: [.open[] | select(.id | IN($ready[]))]}] |
.assigned += $ready
else .stalled = true end
) |
# Emit the phases AND the residue: any open spec never assigned can never start.
# Dropping it silently is the one way /deps gives a WRONG answer (the graph it exists to
# expose hides the deadlock). Surface it with its unresolved deps and its cause: on a
# dependency cycle (with the path), a dep that is not among the specs, or blocked only
# by another deadlocked spec.
.assigned as $asg |
([ $open[] | select(.id as $i | ($asg | index($i)) | not)
| {key: .id, value: [ (.deps // [])[] | select(. as $d | ($asg | index($d)) or ($status[$d] == "done") | not) ]} ]
| from_entries) as $unres |
# Breadth-first walk over unresolved deps back to $id; the path, or null
def cycle_of($id):
{queue: [$id], parent: {}, last: null} |
until((.queue | length) == 0 or .last != null;
.queue[0] as $n | .queue |= .[1:] |
reduce $unres[$n][] as $d (.;
if .last != null then .
elif $d == $id then .last = $n
elif .parent[$d] != null or $unres[$d] == null then .
else .parent[$d] = $n | .queue += [$d] end)) |
.parent as $p |
if .last == null then null
else [ .last | recurse(if . == $id then empty else $p[.] end) ] | reverse + [$id] end;
{ phases: .result,
deadlocked: [ $open[] | select($unres[.id] != null) | .id as $i | cycle_of($i) as $cycle
| { id, status, unresolved_deps: $unres[$i],
cause: (if $cycle != null then "cycle"
elif any($unres[$i][]; $status[.] == null) then "missing"
else "blocked" end) }
+ (if $cycle != null then {cycle: $cycle} else {} end) ] }
' "$SPECS_FILE"
.phases and .deadlocked, every open spec appears in exactly one of them, and every .deadlocked entry carries a cause..phases and .deadlocked. Phases narrated from a reading of the spec titles have broken this.Present results as:
## Spec Dependency Graph
### Status Overview
| Spec | Title | Status | Dependencies | Blocked By |
|------|-------|--------|--------------|------------|
| **fn-1-add-auth** | Add Authentication | **READY** | - | - |
| fn-2-add-oauth | Add OAuth Login | blocked | fn-1-add-auth | fn-1-add-auth |
| fn-3-user-profile | User Profile Page | blocked | fn-1-add-auth, fn-2-add-oauth | fn-2-add-oauth |
### Execution Phases
Render from the jq result's `.phases`:
| Phase | Specs | Can Start |
|-------|-------|-----------|
| **1** | fn-1-add-auth | **NOW** |
| 2 | fn-2-add-oauth | After Phase 1 |
| 3 | fn-3-user-profile | After Phase 2 |
### ⚠️ Deadlocked / Unresolvable
**This section renders exactly when `.deadlocked` is non-empty** — and when it does, it is the
most important part of the report. Each entry is an open spec that could not be placed in
any phase. These are invisible to `ready`/`flow --auto` (they just never become ready) — this is the
one place the graph surfaces them.
| Spec | Status | Unresolved deps | Cause |
|------|--------|-----------------|-------|
| fn-7-x | open | fn-9-y | cycle: fn-7-x → fn-9-y → fn-7-x |
| fn-8-z | open | fn-99-gone | missing dependency |
| fn-10-w | open | fn-7-x | blocked by a deadlocked spec |
The Cause column renders each entry's `cause` (and `cycle` path); it is never guessed. A cycle is
broken with `flowctl spec rm-dep` on one of its edges; a missing dependency was deleted or never
existed. **Every entry of `.deadlocked` reaches the report.** A report that lists phases while silently dropping an open spec has broken this.
### Critical Path
fn-1-add-auth → fn-2-add-oauth → fn-3-user-profile (3 phases)
This skill is read-only inspection. Edge changes are reported as commands for the
operator to run — flowctl spec add-dep <spec> <dep> / rm-dep <spec> <dep>. A run that
executes either command itself, or edits a spec file, has broken this.
For a fast dependency check:
$FLOWCTL specs --json | jq -r '.specs[] | select(.status != "done") | "\(.id): \(.title) [\(.status)]"'
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub gmickel/flow-next --plugin flow-next29 skills in this plugin
/flow-nextManage .flow/ tasks and specs. Triggers: 'show me my tasks', 'list specs', 'what tasks are there', 'add a task', 'create task', 'what's ready', 'task status', 'show fn-1-add-oauth'. NOT for /flow-next:plan or /flow-next:work./flow-next-auditAudit `.flow/memory/` entries against the current codebase and decide Keep / Update / Consolidate / Replace / Delete / Harden per entry. Triggers on /flow-next:audit, "audit memory", "review memory", "refresh learnings", "sweep stale memory", "consolidate overlapping memory entries", "graduate a recurring lesson into a gate". Optional `mode:autofix` token in arguments runs without questions and marks ambiguous as stale (Harden is never auto-applied). Optional scope hint after the mode token (concept, category, module, or path) narrows what gets audited./flow-next-captureSynthesize the current conversation context into a flow-next spec at `.flow/specs/<spec-id>.md` via `flowctl spec create --plan-file` — agent-native, source-tagged, with a saved-spec summary and editor follow-up. Triggers on /flow-next:capture, "capture spec", "lock down what we discussed", "make a spec from this conversation", "convert conversation to spec". Optional `mode:autofix` token runs without questions and requires `--yes` to write. Optional `--rewrite <spec-id>` overwrites an existing spec; `--from-compacted-ok` overrides the incomplete-evidence refusal after compaction; `--override-strategy` proceeds despite a contradiction with an active STRATEGY.md track (and prompts to record the override as a decision); `--no-plan` sets the spec-level `no_plan` field after the write (explicit opt-in on a user invocation, never inferred there); `from:flow` marks a run dispatched by `/flow-next:flow`, where capture applies the shared plan-versus-no-plan rule and sets the field itself when the rule resolves to direct; `from:goal` marks a `/flow-next:flow --goal` run, which writes without asking from a goal source or for a goal's child; `from:issue` marks a `/flow-next:flow --auto --from-issue` run, which writes one linked no-plan spec from a tracker issue without asking./flow-next-chartDecision-map discovery for one oversized/unclear idea before capture. Triggers on /flow-next:chart with an unshaped idea, chart id, decision pin, --status, or stored tracker URL. Prompt-first adaptive loop - ground, chart a frontier, resolve one D-ID per invocation, brief for capture./flow-next-driveDrive any UI surface like a real user - a web app, a Chromium-backed desktop app (Electron / WebView2, reached over CDP), or a genuinely native app (macOS AppKit/SwiftUI, or a non-CDP webview) reached via the Cua Driver / Computer Use. Detects the surface, picks the best available driver, degrades gracefully. Use to navigate sites, verify deployed UI, test web or desktop apps, capture baseline screenshots, drive a sign-in flow, scrape data, fill forms, run an e2e check, or inspect current page state. Triggers on "check the page", "verify UI", "test the site", "test this app", "drive the app", "automate this desktop app", "read docs at", "look up API", "visit URL", "browse", "screenshot", "scrape", "e2e test", "login flow", "capture baseline", "see how it looks", "inspect current", "before redesign", "Electron app", "native app"./flow-next-featuresSeed or maintain the committed user-POV feature map at `.flow/features/` so QA and drive reuse how a user reaches each feature. Two state-resolved modes: no `.flow/features/` (or explicit init intent) seeds it; a present map maintains it. Triggers on /flow-next:features, "seed the feature map", "maintain the feature map", "feature map", "init features". Never dispatched by `flow --auto`, land, or any autonomous driver.Other plugins' skills for the same job