/piflow:piflow-inspectfrom piflow
Routes Pi Flow run inspection questions to the right piflowctl verb for performance, cost, timing, and anomaly analysis.
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.
The .pi/ run layout is the canonical record, and piflowctl verbs are the ONLY first-line way to read
it. Hand-parsing session JSONL, grepping run internals, or writing an ad-hoc script is permitted ONLY
after the routing table below has no verb for the question — and then the gap itself is a finding (a missing
verb/flag to file or build), never a script that lives on. Inspection is READ-ONLY: never modify, re-run, or
resume anything under a run dir just to "see"; observe first, act through piflow-start after.
Run everything from the product repo. Runs live under .piflow/<wf>/runs/<id> (resolve foreign repos via
~/.piflow/index.json). <rundir> below = that path; a bare run id also resolves for trace.
| Your question | Verb | What comes back |
|---|---|---|
| Is the run healthy? which node/stage failed? | piflowctl status <rundir> | per-node table + stage rollup, verified on disk |
| Tell me the moment it finishes/dies | piflowctl watch <rundir> [--notify] | silent sentinel, one line on done/fail/dead-stall |
| Why is this node slow / expensive / looping? | piflowctl telemetry <rundir> [nodeId] | verdict · tokens in/out · ctx% · model+tool call counts · retry loops (↻) · anomalies · stop reason · per-turn table: t+offset, duration, think-chars, tools |
| What did the model actually see / read / miss? | piflowctl trace <rundir> [nodeId] [--json] | the element tree: injected prompt + every read/edit in order, range · coverage · sha · blind-spot rollup (advertised-but-unread) · re-reads (READ-ONCE violations). --json adds per-element tMs offsets |
| What events fired? replay the node | piflowctl logs <rundir|run> [options] | stream / replay / diagnose per-node event archives |
| What was this node CONFIGURED to be? | piflowctl inspect <templateDir> [nodeId] [--full] | pre-run resolved view: sandbox · tools · ops · prompt |
| Which nodes need fixing, and why? | piflowctl optimize <rundir> [--json] | read-only Score + Triage: the LAPSE/SKILL/FUNCTIONALITY/ARCH worklist |
| Has this node failed THIS way before? | piflowctl memory find <templateDir> (+ memory-slices skill) | standing lessons + cross-run recurrence (Leg A) |
| How does the subsystem's code work? | piflowctl understand [subsystem] (+ okf-slices skill) | the canonical OKF code slice (Leg B) |
Live monitoring variants: telemetry --watch (stream then record), status --every <s>.
An op FAILED/op warn row may carry an integrity entry (a failed expect predicate) and a resultFile
path (the op's structured verdict) — when set, the row's detail is already distilled from that file's
content, not the first stderr line, so read the row as the real verdict.
telemetry <rundir> (no nodeId) — the run-level rollup: which node holds the time/tokens/anomalies.telemetry <rundir> <nodeId> — read the per-turn table and RANK the sinks before forming any theory
(see "reading the turn table" below). Most "why 18 minutes" questions end here.trace <rundir> <nodeId> — when the question is context composition: what was injected vs read,
coverage, blind spots, re-read loops, failed-edit retries (✗ rows).logs / raw record — only for what no verb surfaces (e.g. the exact payload of one anomalous turn).
The raw per-event record is <rundir>/.pi/sessions/<ts>_<nodeId>.jsonl (every line timestamped). Read it
read-only, answer the one question, and if you needed it, note the missing verb/flag.Effort ceiling: the verbs, then AT MOST ONE subagent. The instruments are the warning system — they answer most questions inline in 1–3 verb calls. Escalate to a subagent ONLY when a finding needs deep per-event digging (e.g. "what exactly happened inside that one anomalous turn"), and send ONE agent with the rundir + nodeId + the specific question — never a multi-agent workflow, panels, or per-run verifier fleets for run inspection. Fan-out is for building/fixing, not for reading a run.
dur high + think high → real generation. Sanity-check with the rate: think-chars ÷ dur ≈ the model's
steady chars/sec (establish it from the node's own big turns). Rate-consistent turns are generation cost —
the fix is upstream (less to think about), not infra.dur high + think near zero + no tools → NOT generation: a stall/retry/rate-limit anomaly. Treat it
as infra, subtract it before judging an optimization's wall-clock effect, and check the same turn in
logs/the raw record for the cause.↻ tool×N + repeated ✗ edit rows in trace → retry loops; sum their turns before blaming the model.calls: N model · M tool answers "how many calls were invoked" — never grep for this..pi/ internals by hand before steps 1–3 of the ladder."Node ok but took 18 min — why?" → telemetry <rundir> <node>: 53 model calls, think 63k chars, largest
turn 143.7s/28k chars (rate ≈195 c/s → genuine generation) — but turn 49 = 220.6s with 844 chars and no
tool call → a stall, not thinking. Verdict: real work ≈ 860s; the 18-min headline was one infra anomaly +
one mega-think, each with a different owner. Total time: two verb calls, zero JSONL parsing.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
pi-flow, piflowctl, run-inspection, debugging, performance-analysis
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./okf-slicesTHE DEFAULT pathway to understand this codebase — any setting, any logic, any lifecycle, at any level, INCLUDING how much of the codebase is mapped/covered in the first place. Load this FIRST whenever you (or a sub-agent) are about to explain, investigate, or answer any question about how a part of this system works — BEFORE reaching for `ls`/`grep`/`find`, or recalling a CLI invocation from memory instead of loading the skill. Running the right command without loading this skill first is still the ad-hoc re-derivation this skill exists to prevent. If a question feels like "a quick lookup I can just answer" rather than "understanding the system," that feeling is the cue to invoke this skill, not a reason to skip it. TRIGGER on any understanding intent, at any granularity: "understand <area>", "how does <subsystem> work", "where do I change X", "which files own Y", a question about the state/coverage/completeness of the codebase map itself, explaining a config/setting/flow, or an optimizer/fixer about to edit a subsystem; (MAINTAIN) when/how to update the map, blast scope, staleness, the drift gate; (SETUP) a repo has NO `.agents/okf/` yet (FIND errors "not set up") or a stale/older engine. Once loaded it contains every command (CLI and standalone) — no external crib needed. Works on ANY repo — SETUP (MODE S) seeds the substrate from the engine this skill carries under `assets/`, needing nothing but `node`. Slices are OPTIMIZER-FACING reference, NEVER injected into a worker node's runtime prompt — this skill is how the out-of-band fixer reads them on demand./piflow-enhancePi Flow · ENHANCE — improve an existing, running pi-flow workflow the disciplined way: turn a spotted flaw, a recurring finding, or human feedback into ONE atomic, generalizing change via capture→route→edit→verify→ approve→commit, never a one-off hack. Owns the criteria fixture (the per-node quality bar) and Companion-Mode judging. Use to "improve a wave/node", "fix a recurring failure in the pipeline", "the generated output is wrong — fix the system not the case", "edit the skill vs edit the chain", "score / triage / fix a finished run", "run the optimize loop", "auto-improve a node from its trace". Also owns the METHOD-LIBRARY sync (Leg C, ~/Desktop/best-designs-for-agentic-system): consult the matching card before any edit, write the outcome back to its Applications after any land. To CREATE a workflow use piflow-init; to RUN one use piflow-start. The canonical capture→route→edit method is the hermes-skill-system skill; this COMPOSES it and pins the piflow-specific precedence + the autonomous SCORE→TRIAGE→FIX→GATE→LAND loop./piflow-fixerPi Flow · FIXER — the default playbook staged into EVERY substrate fixer spawn, the human-facing fix protocol, and the orchestrator contract for a whole feedback cycle; it turns one assigned issue + an isolated candidate git worktree of its node into a staged, gate-proven repair. LOAD/FOLLOW when: you are the fixer agent handed a `nodes/<node>/issues/<name>.md` dispatch; you are the ONE agent running a full cycle over returned run feedback; or a human repairing one node's defect asks "how do I route this fix", "why did my guidance get ignored", "did the fix actually move anything". The spine is the issue lifecycle open→active→fix-landed→verifying (only `optimize adopt` lands it to `resolved`); per-stage depth lives in references/ (triage · demand-levers · verification · orchestrator · playbook-maintenance). This is the fixer's procedure — NOT the enhance/hermes triad (disabled on this path)./piflow-gatePi Flow · GATE — the base agent that judges whether ONE fixer's candidate edit actually fixed its issue, and decides its fate: STAGE it for a human to adopt, or REJECT it back to a fresh fixer. The third agent of the optimize loop and the last: triage NAMES the defect, the fixer SOLVES it, the GATE judges the fix — the issue file is the boundary object through all three, and the loop always runs them in that order. The CLI spawns this agent over the PROVED candidate via `piflowctl optimize verify --node <id>` (the standalone gate-only re-check — there is NO `optimize gate` verb), or INLINE during `piflowctl optimize fix --node <id>` on the full-tier soft path, equipped with this skill. LOAD / FOLLOW when: you ARE the gate/verify turn over a fixer's candidate; you must decide ACCEPT-and-stage vs REJECT-and-drop-back; you must audit a fix for reward-hacking / a band-aid / teaching-to-the-test; or a human asks "did the fix actually work", "is this a real fix or a hack", "why was the candidate rejected", "what does the retry get told", "who decides a fix is good". The gate JUDGES ONLY — it never fixes (that is piflow-fixer) and never adopts (that is the human's separate, explicit step). It is blind to the fixer's reasoning by construction. This is the JUDGMENT half — the independent verifier that keeps a self-editing loop honest.Other plugins' skills for the same job