/piflow:piflow-startfrom piflow
Runs and monitors pi-flow workflows on the pi fleet via piflowctl CLI. Autoloads when starting, resuming, monitoring, or diagnosing pi workflow runs.
Ships in piflow. 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.
You are the operator — you run every command; the user runs nothing. A workflow is a structured TEMPLATE
(.piflow/<wf>/template/); the @piflow/core SDK loads it (loadTemplate → instantiateRun → compile → runWorkflow) and runs one pi per node. The entrypoint is the piflowctl bin (from @piflow/cli,
npm-linked onto PATH — confirm with which piflowctl). The canonical command is piflowctl run <templateDir> … —
NOT node <piflow>/packages/cli/dist/cli.js run … (the same code, but the bare-node form is the fallback only
when the link is missing) and NEVER node pi-runner/run.mjs (the deleted legacy monolith). Every command
below (run · inspect · extract · status · watch · logs) is a piflowctl subcommand.
prompt is the next pending entry of the consumer's
bank (game-omni: eval/prompt-suite.json / the per-archetype sibling), pulled by id. NEVER invent, type,
or paste an ad-hoc prompt — if the prompt you want isn't in the bank, ADD it (status pending) first, then
consume it. On a clean run: flip its status → running and append a runs[] record (flow commit · pi
model · node reached · verdict). Never reuse a prompt across two from-scratch runs.~/.pi/agent/models.json (the first auth-resolved provider = availableModels[0]). Pin it deterministically
with pi's OWN mechanism — ~/.pi/agent/settings.json → { "defaultProvider": "<gw>", "defaultModel": "<id>" } — NOT by layering provider logic in the runner. The pinned default IS ground truth; a stray shell
export (PI_RUNNER_PROVIDER) or a flag must never silently override it. (--provider <gw> on the CLI is the
one allowed EXPLICIT override; passing only --provider with no --model is a pi no-op — it still resolves
to the default model — so prefer pinning settings.json.)--workspace MUST point at the CONSUMER repo (where the skills/templates/registry the node prompts read
live, e.g. /Users/tk/Desktop/game-omni). It resolves the {{WORKSPACE}} tokens in every seed/hook path; a
wrong workspace makes hooks read nothing. The TEMPLATE may live in a different repo (e.g.
piflow/.piflow/game-omni/template) — that's fine; --workspace is what binds the run to the content.--run on a fresh run — piflow assigns the run name itself. Omit --run and the SDK
generates the id. Supply --run <id> ONLY to target an EXISTING run (a --from resume or chaining after
node --rerun) — never to name a new one.--out — the run's home is SDK-derived and canonical. A template at .piflow/<wf>/template/
makes the SDK land every run in .piflow/<wf>/runs/<id>/ ({{RUN}}/{project}) — the single place discovery,
the global index, and status/watch read. --out cannot relocate that (it is IGNORED, with a warning, when
a canonical home resolves; it applies only to a loose template that has no .piflow/<wf>/template/ layout). To
keep a copy elsewhere, EXPORT a copy — never redirect the original, or observation splits across two homes.pi command:
piflowctl run <templateDir> \
--workspace <consumerRepo> \
--arg prompt="<the bank entry's prompt>" --dry-run
# no --run: piflow assigns the run name (pass --run <id> only when resuming an existing run)
(piflowctl is the global linked bin — the consumer repo needs no install; --workspace points it at the
consumer's content. If which piflowctl is empty, fall back to node <piflow>/packages/cli/dist/cli.js run ….)
CAVEAT: the dry-run prints the FULL DAG; it does NOT show the --from/--until window. The window
applies only at runtime — verify it by reading the matcher, not the dry-run output.--dry-run, add --sandbox local (real in-place pi exec;
omit it and NO model runs — it goes in-memory) and --thinking low (the proven default — omit it
and pi defaults to medium → over-deliberation / stall risk on the headless loop). Redirect to a log and
run in the background:
piflowctl run <templateDir> \
--workspace <consumerRepo> \
--thinking low --sandbox local \
--arg prompt="…" [--from <node>] [--until <node>] \
> /tmp/piflow-run.console.log 2>&1 # launch in the background; no --run (SDK names the run)
(The console log goes to /tmp — a path that exists before the run; the AUTHORITATIVE per-node logs live
in the canonical run dir. Proven game-omni invocation: --provider mmgw --thinking low --sandbox local,
template <game-omni>/.piflow/game-omni/template, --workspace <game-omni> — the run lands in
<game-omni>/.piflow/game-omni/runs/<id>/, no --out.)<runDir>/.pi/{run.json,state.json} + per-node
<runDir>/.pi/nodes/<node>/{events.jsonl,io.json,node.json} (where <runDir> = the canonical
.piflow/<wf>/runs/<id>/); produced artifacts land under <runDir>/ (e.g. spec/*.json). Watch with
piflowctl status <runDir> / piflowctl watch <runDir> / piflowctl logs, or
tail a node's events.jsonl. Confirm liveness by the artifact on disk + the VCS/file evidence, never a
self-report.NEVER hand-roll polling with sleep + cat/tail -f on a node's events.jsonl — the SDK ships live
views; a sleep loop burns turns, misses the terminal event, and re-improvises a tested surface. Use the
piflowctl bin (never node …/dist/cli.js):
piflowctl watch <rundir> [--notify] — the wake-on-event SENTINEL: it blocks on the live stream and prints
ONE line when the run finishes / a node fails / it dead-stalls. Reach for this to await a background run.piflowctl status <rundir> --every <s> — the per-node table, refreshed in place every <s> seconds (omit
--every for a one-shot snapshot). The human dashboard.piflowctl telemetry <rundir> [nodeId] --watch — the agent-facing digest streamed live (verdicts · cost
spine · loop signals · anomaly worklist · failure-onset root cause), then the final record.piflowctl optimize --fix <rundir> --binding <module> --watch emits the
FIX→GATE→LAND events in order — triaged → candidate-prepared → fixer-started → fixer-trace* → fixer-done → scored → gated → landed → stopped (fixer-trace* repeats per fixer step; --watch-json = JSONL). Use
this to follow an autonomous fix round.Confirm liveness by the artifact on disk + the VCS/file evidence, never a self-report. (Deep status/event
contract: piflow-init's reference/observability.md.)
--from / --until)A needle matches a stage by substring against its phase, node-id, or node label (stageMatches in
@piflow/core). Two rules that bite:
--until w2-scaffold (the node id) matches;
--until "W2 Scaffold" matches NOTHING when stage.phase is unset → the window silently runs to the END.--until X runs through the LAST stage containing X; --from X resumes AT X (reusing upstream artifacts
via a stat preflight). --only X = both.node --rerun, NOT --from (verified 2026-07-10)piflowctl node <run> <nodeId> --rerun [--sandbox local --thinking low --provider <gw>] [--arg k=v …]
re-runs EXACTLY that node and force-reuses every other node's artifact unconditionally (bypasses the
envelope-hash comparison for non-targets). It does NOT continue downstream — chain
piflowctl run <templateDir> --run <id> --from <next-stage> … afterwards (the fixed stage joins the
unconditionally-pinned prefix, so nothing re-runs spuriously).node --rerun now falls back to the run's OWN recorded args with ZERO flags (fixed 2026-07-15):
repeated --arg k=v still overrides, but with none passed it reads .pi/run.json's recorded args
itself — re-running a fixed node just works. A plain run --from resume is unchanged: args are NOT
carried forward there — --arg comes ONLY from that invocation (state.json carries forward; args do
not), and each node's reuse hash bakes in its realized prompt, so re-pass the ORIGINAL --arg byte-
identical — read it back from .pi/run.json, never retype it — or a differing/missing arg flips every
windowed node REUSE→RUN — the classic "why did all 7 parallel siblings re-run when only one failed" trap.optimize adopt (or any edit) changes a node's inputs, re-run it via cold node --rerun, never
--from. A node's automatic op[] retry is WARM by default (resumes its existing pi session with a
feedback-only turn, not the full prompt) — a --from re-run can hit that same lane and continue a stale/
errored session instead of re-staging the fix (live-observed on run 260715-02's plan node); --rerun
runs outside that retry FSM and always mints a fresh execution.A template may declare named run PROFILES in its meta.json (profiles + defaultProfile); each ELIDES a
subset of nodes so one workflow has several run shapes — e.g. a full production flow with verify gates and a
dev companion flow that elides them (docs/design/profiles-and-resume-robustness.md). Selecting one is the
whole job, and it is short:
meta.json profiles keys) — those are the ONLY valid names; never invent one.--profile <name>: "just build it / dev run / skip the gates" →
the gate-eliding profile (e.g. companion); "full / unattended / validated" → the default (e.g.
production); a profile they name → use it. No flag → the template's defaultProfile. An unknown name
ERRORS loudly, listing the declared ones (a typo can't silently run the wrong shape).--from/--until still window WITHIN it.When a profile elides the verify gates, the orchestrator IS the verifier — judge each node's artifact
against the criteria fixture as it lands (hermes-skill-system's node-validation loop).
(Obsolete: hand-windowing gates out with --until <last producer> — use --profile; it rewires deps so a
--from resume never blocks on an elided gate's missing artifact, the failure that motivated this.)
events.jsonl: explore-forever /
in-head work / a missing input the prompt needed. Fix at the node's SKILL or the seed, not by re-running.--thinking low — the CLI now forwards it to pi --thinking, but if you OMIT it pi defaults to
medium and over-thinks (the #1 cause of a slow/never-finishing node). The -e node-contract extension
(the write-first gate) is still not auto-passed by the SDK CLI — note that as an enhancement target; do not
fake around it.run post-hook non-zero) → the deterministic step (gen / seed-contract /
merge) failed: check the hook cmd path resolves under {{WORKSPACE}} and {project}, and its exit/stderr.RunOptions knobs, headless invariants) live in
piflow-init's reference/observability.md + reference/provider-and-headless.md — read them when a run
misbehaves; do not duplicate them here.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (blueif16/piflow) — no native marketplace selected
npx claudepluginhub p/blueif16-piflow15 skills in this plugin
/iso-hero-illustrationMethod for authoring the piflow hand-authored 2.5D ISOMETRIC hero SVGs (atom = one node, substrate = the DAG, protein = the self-improve loop, and any new metaphor) so every shape AND decoration is grounded in the canonical design doc and named — never decorative, never illogical. TRIGGER before creating or revising ANY iso hero illustration under site-piflow/components/iso/: the order is DOC → named component spec → CONFIRM with the user → draw. Use when asked to draw/fix the atom, substrate, protein, add a metaphor, or when a render "looks terrible / illogical / decorative". Pairs with piflow-web-design (brand) + premium-saas-stack (bar); the workspace + kit + research live in site-piflow/components/iso/_gen/./memory-slicesPer-node MEMORY slices (Leg A — self/history) — FIND a node's standing lessons + cross-run RECURRENCE before the optimizer edits it, and MAINTAIN the memory.md set so it stays honest, bounded, and never rots. The Leg-A twin of `okf-slices` (Leg B — world/code): a memory lesson `[[links]]` the OKF code slice it concerns, so its freshness gate rides that slice's `--check`. TRIGGER on either intent: (FIND) the out-of-band triage/fixer needs "has this node failed THIS way before, how often, and what did we learn?" — the LAPSE-vs-SKILL signal — before bucketing or editing a node; or (MAINTAIN) someone runs the MEMORIZE step, asks when/how memory.md is updated, what a lesson's scope is, whether a lesson is stale, or WHERE a lesson should live (per-node vs system). Works on any repo with template-scoped `memory.md` (`.piflow/<wf>/template/{memory.md, nodes/<id>/memory.md}`; config in `.agents/okf/okf.config.json`). Memory is OPTIMIZER-FACING reference, NEVER injected into a worker node's runtime prompt — this skill is how the out-of-band optimizer reads and writes it.Other plugins' skills for the same job