/flow:workflow <subcommand> [id]from flow
Lists, inspects, validates, and graphs FlowWorkflow YAMLs from plugin and runtime workflow directories. Supports list, inspect, validate, and graph subcommands.
Ships in flow. Installing the plugin adds it to Claude Code.
Seven /flow:* commands have a machine-readable process contract under the plugin root's workflows/<id>.workflow.yaml: /flow:start (start-issue), /flow:review (review-pr), /flow:address (address-pr), /flow:merge (merge-pr), /flow:release (release), /flow:debug (debug) and /flow:design (design). A project can override one at <runtime dir>/workflows/<id>.workflow.yaml (<runtime dir> is the runtime directory bin/flow-runtime-dir.sh prints (flow.runtime.stateDir, default .flow)). This command lets you list available workflows, inspect their phase structure, validate their integrity, and render a textual graph.
The command markdown remains Claude's execution manual; this YAML is the inspectable contract that CI can validate.
workflow-validation — schema + cross-reference checks (used by validate subcommand).# Inline the Required Skills above so their rules are in context before the
# first phase runs (commands cannot preload skills from frontmatter). Ambient
# skills load whole; dispatched skills (context: fork / agent:) load their
# `## Contract` section and run in full when this command invokes
# Skill(<name>). Output per `references/command-output-format.md`.
"$(__fr="${CLAUDE_PLUGIN_ROOT:-}";[ -x "$__fr/bin/cascade-resolve.sh" ]||__fr=$({ printf '%s\n' plugins/flow;ls -d "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/plugins/cache/synapti-marketplace/flow/*/ 2>/dev/null|sort -Vr;printf '%s\n' "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/marketplaces/synapti-marketplace/plugins/flow"; }|while read -r __p;do [ -x "${__p%/}/bin/cascade-resolve.sh" ]&&{ printf '%s\n' "${__p%/}";break;};done);printf '%s\n' "$__fr")/bin/flow-load-skills.sh" workflow-validation
true
# A non-zero exit means the setting could not be read (cascade-resolve.sh
# says why on stderr): that is not the same as false, so say so and stop.
__cr_rc=0
ENABLED=$("$(__fr="${CLAUDE_PLUGIN_ROOT:-}";[ -x "$__fr/bin/cascade-resolve.sh" ]||__fr=$({ printf '%s\n' plugins/flow;ls -d "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/plugins/cache/synapti-marketplace/flow/*/ 2>/dev/null|sort -Vr;printf '%s\n' "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/marketplaces/synapti-marketplace/plugins/flow"; }|while read -r __p;do [ -x "${__p%/}/bin/cascade-resolve.sh" ]&&{ printf '%s\n' "${__p%/}";break;};done);printf '%s\n' "$__fr")/bin/cascade-resolve.sh" \
--default "true" '.flow.workflows.enabled') || __cr_rc=$?
if [ "$__cr_rc" -ne 0 ]; then
printf '%s\n' "flow.workflows.enabled could not be read (cascade-resolve.sh exited $__cr_rc; its message is above), so /flow:workflow stops here." >&2
exit 1
fi
if [ "$ENABLED" != "true" ]; then
printf '%s\n' "flow.workflows.enabled is false — /flow:workflow is turned off in your settings." >&2
printf '%s\n' "Turn it back on in .claude/settings.flow.local.json: { \"flow\": { \"workflows\": { \"enabled\": true } } }"
exit 0
fi
/flow:workflow listList all plugin-shipped workflows + any project-local overrides:
# WORKFLOW_LIST_BLOCK_BEGIN
# Keep the repository out of PYTHONPATH before python3 starts: the interpreter
# imports sitecustomize from each element at startup. An isolated python3 (-I:
# it reads neither PYTHONPATH nor the working directory) keeps only elements
# that are directories outside the repository and not at or above the working
# directory, comparing directories by identity, not by how the path is spelled;
# tests/syspath-guard.test.sh has the reasons. FLOW_USER_PYTHONPATH keeps the
# original for commands run for the user.
[ -n "${FLOW_USER_PYTHONPATH+x}" ] || export FLOW_USER_PYTHONPATH="${PYTHONPATH-}" FLOW_USER_PYTHONPATH_SET="${PYTHONPATH+1}" FLOW_USER_PYTHONSAFEPATH="${PYTHONSAFEPATH-}" FLOW_USER_PYTHONSAFEPATH_SET="${PYTHONSAFEPATH+1}"
_flow_pp=""; if [ -n "${PYTHONPATH-}" ]; then _flow_pp=$(python3 -I -c 'exec("import os, sys\ndef ids(p):\n out = set()\n while True:\n try:\n st = os.stat(p)\n except OSError:\n return out\n out.add((st.st_dev, st.st_ino))\n q = os.path.dirname(p)\n if q == p:\n return out\n p = q\ntry:\n cwd = os.getcwd()\nexcept OSError:\n sys.exit(0)\ntop = d = cwd\nwhile True:\n if os.path.lexists(os.path.join(d, \".git\")):\n top = d\n break\n q = os.path.dirname(d)\n if q == d:\n break\n d = q\nst = os.stat(top)\ntop_id = (st.st_dev, st.st_ino)\nup = ids(cwd)\nkeep = []\nfor e in os.environ.get(\"PYTHONPATH\", \"\").split(\":\"):\n if not e.startswith(\"/\"):\n continue\n r = os.path.realpath(e)\n if \":\" in r or chr(10) in r or not os.path.isdir(r):\n continue\n try:\n st = os.stat(r)\n except OSError:\n continue\n if (st.st_dev, st.st_ino) in up or top_id in ids(r):\n continue\n keep.append(r)\nsys.stdout.buffer.write(os.fsencode(\":\".join(keep)))")' 2>/dev/null) || _flow_pp=""; fi
if [ -n "$_flow_pp" ]; then export PYTHONPATH="$_flow_pp"; else unset PYTHONPATH; fi
printf '%s\n' "Plugin-shipped workflows:"
for f in "$(__fr="${CLAUDE_PLUGIN_ROOT:-}";[ -x "$__fr/bin/cascade-resolve.sh" ]||__fr=$({ printf '%s\n' plugins/flow;ls -d "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/plugins/cache/synapti-marketplace/flow/*/ 2>/dev/null|sort -Vr;printf '%s\n' "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/marketplaces/synapti-marketplace/plugins/flow"; }|while read -r __p;do [ -x "${__p%/}/bin/cascade-resolve.sh" ]&&{ printf '%s\n' "${__p%/}";break;};done);printf '%s\n' "$__fr")/workflows/"*.workflow.yaml; do
# An unmatched glob leaves $f as the literal pattern. Without this the row
# below would say that pattern could not be read, when in fact the plugin
# ships no workflow at all. Matches the project-local loop further down.
[ -f "$f" ] || continue
ID=$(basename "$f" .workflow.yaml)
# A workflow the reader could not parse printed its id with two blank
# columns — exactly what a workflow declaring neither a command nor a
# description looks like. Say that it could not be read instead.
META=$(python3 - "$f" <<'PYEOF' 2>/dev/null
# Keep the working directory (the repository) off sys.path before any other
# import; tests/syspath-guard.test.sh has the reasons.
import os, sys
try:
_flow_cwd = os.path.realpath(os.getcwd())
except OSError:
_flow_cwd = None
sys.path[:] = [p for p in sys.path if p and os.path.isabs(p) and os.path.realpath(p) != _flow_cwd]
import sys, yaml
def one_line(v):
return " ".join(str(v).splitlines()).strip()[:200]
with open(sys.argv[1], encoding="utf-8") as fh:
wf = yaml.safe_load(fh)
if not isinstance(wf, dict):
raise ValueError("the workflow is not a mapping")
metadata = wf.get("metadata")
if metadata is None:
metadata = {}
if not isinstance(metadata, dict):
raise ValueError("metadata is not a mapping")
# A field that is absent, or present and null, is a real answer and keeps its
# blank column; only a workflow nobody can read takes the row below.
print(one_line(metadata.get("command") or ""))
print(one_line(metadata.get("description") or ""))
PYEOF
); META_EXIT=$?
if [ "$META_EXIT" -ne 0 ]; then
printf ' %-15s %s\n' "$ID" "(could not be read: $f)"
else
CMD=$(printf '%s\n' "$META" | sed -n 1p)
DESC=$(printf '%s\n' "$META" | sed -n 2p)
printf ' %-15s %-20s %s\n' "$ID" "$CMD" "$DESC"
fi
done
RT=$("$(__fr="${CLAUDE_PLUGIN_ROOT:-}";[ -x "$__fr/bin/cascade-resolve.sh" ]||__fr=$({ printf '%s\n' plugins/flow;ls -d "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/plugins/cache/synapti-marketplace/flow/*/ 2>/dev/null|sort -Vr;printf '%s\n' "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/marketplaces/synapti-marketplace/plugins/flow"; }|while read -r __p;do [ -x "${__p%/}/bin/cascade-resolve.sh" ]&&{ printf '%s\n' "${__p%/}";break;};done);printf '%s\n' "$__fr")/bin/flow-runtime-dir.sh") || RT=""
[ -n "$RT" ] || RT=".flow"
if [ -d "$RT/workflows" ]; then
printf '\n'
printf '%s\n' "Project-local overrides ($RT/workflows):"
for f in "$RT"/workflows/*.workflow.yaml; do
[ -f "$f" ] || continue
ID=$(basename "$f" .workflow.yaml)
printf '%s\n' " $ID (overrides plugin default)"
done
fi
# WORKFLOW_LIST_BLOCK_END
/flow:workflow inspect <id>Dump the workflow's frontmatter + phase structure:
# $ARGUMENTS is "<subcommand> <id>"; the id is the second word, and it must
# be a workflow id before it is put in a path.
ID=$(printf '%s\n' "$ARGUMENTS" | awk '{print $(2)}')
if ! printf '%s\n' "$ID" | grep -qE '^[a-z0-9][a-z0-9-]{0,63}$'; then
printf '%s\n' "'$ID' is not a workflow id: give one of the ids /flow:workflow list prints" >&2
exit 1
fi
WF_PATH="$(__fr="${CLAUDE_PLUGIN_ROOT:-}";[ -x "$__fr/bin/cascade-resolve.sh" ]||__fr=$({ printf '%s\n' plugins/flow;ls -d "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/plugins/cache/synapti-marketplace/flow/*/ 2>/dev/null|sort -Vr;printf '%s\n' "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/marketplaces/synapti-marketplace/plugins/flow"; }|while read -r __p;do [ -x "${__p%/}/bin/cascade-resolve.sh" ]&&{ printf '%s\n' "${__p%/}";break;};done);printf '%s\n' "$__fr")/workflows/${ID}.workflow.yaml"
RT=$("${WF_PATH%/workflows/*}/bin/flow-runtime-dir.sh") || RT=""
[ -n "$RT" ] || RT=".flow"
[ -f "$RT/workflows/${ID}.workflow.yaml" ] && WF_PATH="$RT/workflows/${ID}.workflow.yaml"
if [ ! -f "$WF_PATH" ]; then
printf '%s\n' "Workflow not found: $ID" >&2
exit 1
fi
cat "$WF_PATH"
/flow:workflow validate <id>Invoke Skill(workflow-validation) with the workflow id. The skill performs:
The skill emits structured JSON. Render each violation with its source_file + example snippet so the user can fix the YAML directly without consulting the schema:
✗ tier3_violation: merge set to 'autonomous' (expected 'confirm')
source: plugins/flow/workflows/start-issue.workflow.yaml
fix:
tier_classification:
merge: confirm # Tier 3 must be confirm — non-negotiable per the Iron Law
Print the structured JSON report; exit per the skill's exit code convention.
/flow:workflow graph <id>Render a textual graph of the workflow's phase structure:
# Keep the repository out of PYTHONPATH before python3 starts: the interpreter
# imports sitecustomize from each element at startup. An isolated python3 (-I:
# it reads neither PYTHONPATH nor the working directory) keeps only elements
# that are directories outside the repository and not at or above the working
# directory, comparing directories by identity, not by how the path is spelled;
# tests/syspath-guard.test.sh has the reasons. FLOW_USER_PYTHONPATH keeps the
# original for commands run for the user.
[ -n "${FLOW_USER_PYTHONPATH+x}" ] || export FLOW_USER_PYTHONPATH="${PYTHONPATH-}" FLOW_USER_PYTHONPATH_SET="${PYTHONPATH+1}" FLOW_USER_PYTHONSAFEPATH="${PYTHONSAFEPATH-}" FLOW_USER_PYTHONSAFEPATH_SET="${PYTHONSAFEPATH+1}"
_flow_pp=""; if [ -n "${PYTHONPATH-}" ]; then _flow_pp=$(python3 -I -c 'exec("import os, sys\ndef ids(p):\n out = set()\n while True:\n try:\n st = os.stat(p)\n except OSError:\n return out\n out.add((st.st_dev, st.st_ino))\n q = os.path.dirname(p)\n if q == p:\n return out\n p = q\ntry:\n cwd = os.getcwd()\nexcept OSError:\n sys.exit(0)\ntop = d = cwd\nwhile True:\n if os.path.lexists(os.path.join(d, \".git\")):\n top = d\n break\n q = os.path.dirname(d)\n if q == d:\n break\n d = q\nst = os.stat(top)\ntop_id = (st.st_dev, st.st_ino)\nup = ids(cwd)\nkeep = []\nfor e in os.environ.get(\"PYTHONPATH\", \"\").split(\":\"):\n if not e.startswith(\"/\"):\n continue\n r = os.path.realpath(e)\n if \":\" in r or chr(10) in r or not os.path.isdir(r):\n continue\n try:\n st = os.stat(r)\n except OSError:\n continue\n if (st.st_dev, st.st_ino) in up or top_id in ids(r):\n continue\n keep.append(r)\nsys.stdout.buffer.write(os.fsencode(\":\".join(keep)))")' 2>/dev/null) || _flow_pp=""; fi
if [ -n "$_flow_pp" ]; then export PYTHONPATH="$_flow_pp"; else unset PYTHONPATH; fi
# $ARGUMENTS is "<subcommand> <id>"; the id is the second word, and it must
# be a workflow id before it is put in a path.
ID=$(printf '%s\n' "$ARGUMENTS" | awk '{print $(2)}')
if ! printf '%s\n' "$ID" | grep -qE '^[a-z0-9][a-z0-9-]{0,63}$'; then
printf '%s\n' "'$ID' is not a workflow id: give one of the ids /flow:workflow list prints" >&2
exit 1
fi
WF_PATH="$(__fr="${CLAUDE_PLUGIN_ROOT:-}";[ -x "$__fr/bin/cascade-resolve.sh" ]||__fr=$({ printf '%s\n' plugins/flow;ls -d "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/plugins/cache/synapti-marketplace/flow/*/ 2>/dev/null|sort -Vr;printf '%s\n' "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/marketplaces/synapti-marketplace/plugins/flow"; }|while read -r __p;do [ -x "${__p%/}/bin/cascade-resolve.sh" ]&&{ printf '%s\n' "${__p%/}";break;};done);printf '%s\n' "$__fr")/workflows/${ID}.workflow.yaml"
RT=$("${WF_PATH%/workflows/*}/bin/flow-runtime-dir.sh") || RT=""
[ -n "$RT" ] || RT=".flow"
[ -f "$RT/workflows/${ID}.workflow.yaml" ] && WF_PATH="$RT/workflows/${ID}.workflow.yaml"
python3 - "$WF_PATH" <<'PYEOF'
# Keep the working directory (the repository) off sys.path before any other
# import; tests/syspath-guard.test.sh has the reasons.
import os, sys
try:
_flow_cwd = os.path.realpath(os.getcwd())
except OSError:
_flow_cwd = None
sys.path[:] = [p for p in sys.path if p and os.path.isabs(p) and os.path.realpath(p) != _flow_cwd]
import sys, yaml
with open(sys.argv[1], 'r', encoding='utf-8') as f:
wf = yaml.safe_load(f)
print(f"Workflow: {wf['metadata']['id']}")
print(f"Command: {wf['metadata']['command']}")
print(f"Version: {wf['metadata']['version']}")
print()
print("PHASES")
print("------")
for i, phase in enumerate(wf['phases'], start=1):
phase_id = phase['id']
phase_type = phase['type']
gate = phase.get('gate', '')
gate_marker = f" [{gate}]" if gate else ""
print(f" {i}. {phase_id} ({phase_type}){gate_marker}")
for j, act in enumerate(phase['activities'], start=1):
act_id = act['id']
act_type = act.get('type', 'task')
skill = f" skill={act['skill']}" if 'skill' in act else ""
agent = f" agent={act['agent']}" if 'agent' in act else ""
cmd = f" cmd={act['command']}" if 'command' in act else ""
print(f" {i}.{j} {act_id} ({act_type}{skill}{agent}{cmd})")
print()
print("COMPLETION GATE (advisory documentation, not enforced)")
print("------------------------------------------------------")
gate = wf.get('completion_gate', {}) or {}
# 'requires' is the deprecated legacy name for 'documented_requirements'.
reqs = gate.get('documented_requirements') or gate.get('requires') or []
for req in reqs:
print(f" - {req}")
print()
print("TIER CLASSIFICATION")
print("-------------------")
for action, tier in wf.get('tier_classification', {}).items():
print(f" {action:25s} {tier}")
PYEOF
| Action | Tier | Behavior |
|---|---|---|
/flow:workflow list — enumerate plugin + project-local workflow YAMLs | 1 | Autonomous, read-only |
/flow:workflow inspect <id> — dump full YAML | 1 | Autonomous, read-only |
/flow:workflow validate <id> — invoke Skill(workflow-validation); emit JSON report | 1 | Autonomous, read-only — no writes; the skill produces a diagnostic report |
/flow:workflow graph <id> — render textual DAG of phases/activities | 1 | Autonomous, output-only |
/flow:workflow is entirely read-only. It cannot create, modify, or delete workflow YAMLs; the schema and project-local override files are the only sources of truth. To author a new workflow, edit <runtime dir>/workflows/<id>.workflow.yaml directly.
/flow:* commands; the commands themselves remain Claude's execution manuals. Changing a workflow YAML changes the contract validation but does NOT change command behavior.<runtime dir>/workflows/ are committed by default (per the gitignore policy in references/flow-runtime-state.md). Teams that want truly local overrides can rename to *.local.workflow.yaml and add to their personal gitignore./flow:workflow validate rejects workflows that reference /goal, /loop, /schedule, or /routine as invoked commands, because a plugin cannot invoke a native slash command.plugins/flow/skills/workflow-validation/SKILL.md — schema + cross-reference checks.plugins/flow/schemas/v1/workflow.schema.json — workflow document schema.plugins/flow/workflows/*.workflow.yaml — plugin-shipped workflow definitions.plugins/flow/references/flow-workflows.md — user-facing workflows documentation.What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
23 commands in this plugin
/addressAddress Review Feedback for PR #$ARGUMENTSAddress PR review feedback systematically. Categorizes feedback, implements surgical fixes, verifies changes, and re-requests review./brainstormBrainstorm: $ARGUMENTSExplore approaches before committing to implementation. Generates options, analyzes trade-offs, and helps select the best approach collaboratively./commitContext-Aware CommitClassify changes and create atomic commits with conventional messages. Flags out-of-context modifications and red-flag patterns before committing./debugDebug: $ARGUMENTSDebug an issue with structured root cause analysis. Guides evidence gathering, hypothesis testing, and fix validation./designDesign: $ARGUMENTSDesign or review architecture for a feature or system. Analyzes existing patterns, evaluates coupling, and produces design decisions./explainExplain DecisionsAnswer questions about architecture decisions, implementation rationale, and trade-offs by loading the decision journal and diff context for the current branch or issue. Use when seeking to understand what was built and why.npx claudepluginhub synaptiai/synapti-marketplace --plugin flowOther plugins' commands for the same job