framework/workflow/skills/flowai-supervise/SKILL.md
Supervise a flowai-workflow run. Launches `flowai-workflow run <workflow>`, polls runs/<run-id>/state.json every 30 s, and on node failure or stall diagnoses the root cause from artifacts, applies a fix to workflow.yaml or an agent prompt, then resumes via --resume. Use when asked to babysit a flowai-workflow run or iterate fix-and-resume autonomously.
npx skillsauth add korchasa/flow flowai-superviseInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Drive a flowai-workflow to completion under live supervision. Loop:
flowai-workflow run <workflow> as a background
subprocess; capture the run-id.<workflow>/runs/<run-id>/state.json.failed or stall, collect evidence from
runs/<run-id>/<node-id>/, diagnose the root cause, apply the smallest
correct fix, resume with --resume <run-id>.completed, or after three consecutive failed fixes on the
same node — hand off with a written stop report..flowai-workflow/github-inbox).flowai-workflow run: --prompt <text>,
--only <ids>, --skip <ids>, -v. Do not forward --dry-run (it
would defeat the purpose).Concrete shape (adapt to the active Bash tool):
# 1. Launch in background, capture run-id.
flowai-workflow run "$WORKFLOW" $FORWARDED_FLAGS & # run_in_background: true
RUN_ID=$(ls -1t "$WORKFLOW/runs" | head -n 1)
STATE="$WORKFLOW/runs/$RUN_ID/state.json"
# 2. Poll loop (sleep is fine here — the loop is the work).
while :; do
sleep 30
STATUS=$(jq -r .status "$STATE" 2>/dev/null || echo "missing")
case "$STATUS" in
completed) echo "DONE"; break ;;
failed|aborted|scope_violation|hitl_timeout)
# diagnose, fix, resume below
;;
*) continue ;;
esac
done
Use BashOutput to drain the background process's log between polls
(noisy but useful when artefacts alone don't explain the failure).
Map common failure symptoms to evidence and likely root causes:
status: failed, last node has a validate:
block): look at runs/<run-id>/<node-id>/ for the artefact the rule
inspected. Frontmatter missing → fix the agent prompt that produced
it. File missing → fix the prompt's Output: {{node_dir}}/… line or
the validator's path:.status: hitl_timeout): inspect
runs/<run-id>/<node-id>/hitl.log (or the engine's stdout). Either the
user did not reply, or defaults.hitl.timeout is too short. Bump the
timeout in workflow.yaml or ask the user to reply.status: failed with no validator): the
runtime CLI itself errored. Inspect the engine's stdout for stderr from
claude / opencode. Common causes: auth expired, rate-limit, missing
model alias. Re-authenticate the CLI, then resume.scope_violation: the node touched a path outside its declared
allowed_paths. Inspect the diff in runs/<run-id>/<node-id>/. Either
the prompt asked for an out-of-scope change (fix the prompt) or
allowed_paths is too narrow (widen it).running ≥ 5 polls, same node, no new files): kill the
background process, check the runtime is still alive, resume. If the
same node stalls again, lower defaults.timeout_seconds so the engine
kills it instead of hanging..flowai-workflow/ — use flowai-scaffold.flowai-investigate.development
Use when the user asks to add TypeScript strict-mode code-style rules to AGENTS.md for a TypeScript project using strict mode. Do NOT trigger for Deno projects (use setup-agent-code-style-deno) or non-strict TS configurations.
development
Use when the user asks to add Deno/TypeScript code-style rules to AGENTS.md, or during initial Deno project setup when code-style guidelines need to be established. Do NOT trigger for non-Deno TypeScript projects (use setup-agent-code-style-strict), or for runtime-agnostic style advice.
testing
Use when the user provides a source (URL, file path, or free text) to save into the project's memex — a long-term knowledge bank for AI agents. Stores the raw source, extracts entities into cross-linked pages, runs a backlink audit, and updates the index and activity log. Do NOT trigger on casual reads; only when the intent is to persist a source into the memex.
development
Use when the user asks to audit a memex (long-term knowledge bank for AI agents) for orphans, dead SALP REFs, missing sections, contradictions, or index drift. Runs a deterministic structural check, layers LLM-judgement findings, optionally auto-fixes trivial issues with `--fix`. Do NOT trigger on general code linting.