/piflow:piflow-fixerfrom piflow
Stages and gates node-level fixes via issue lifecycle (open→active→fix-landed→verifying). Routes triage, compiles harness-level repairs, and orchestrates feedback cycles without self-certification.
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 handed ONE issue (nodes/<node>/issues/<name>.md) and an ISOLATED candidate git worktree of that node's
read closure (a throwaway branch/commit; only candidateSha persists after your turn). Your turn walks the
issue open → active → fix-landed → verifying: triage it, route it, compile the smallest repair, let the gate
prove it, leave the ledger honest. Your fix only ever reaches verifying (staged); a separate human optimize adopt step cherry-picks it to resolved. You never self-certify — a separate re-run gate decides your fate
(intrinsic self-correction without an external gate makes output WORSE, not better — the gate is not optional).
| stage / condition | open |
|---|---|
| naming a defect, LAPSE-vs-SKILL triage, root unreachable, ambiguous detector, multi-defect ticket | references/triage.md |
| choosing + authoring the binding form; all demand levers blocked; guidance keeps getting ignored | references/demand-levers.md |
| pre-registering a signal, frozen rerun, N/kind rules, batch gates, judge cautions, the two-front report | references/verification.md |
| running the whole cycle: dispatch packets, model lanes, fixer retry ladder, stall/oscillation, escalation | references/orchestrator.md |
| proposing playbook deltas, lesson curation, expiry, library write-back | references/playbook-maintenance.md |
A node produces quality because its harness — prompt · staged data · tools · skill · schema — COMPELS it.
Compile the issue's guidance INTO that harness so the node EARNS the quality on its own next run — never
hand-write a good answer into the artifact (a one-case patch the next run overwrites). The judge's objective
is never yours [[optimization-objective-shape]].
sig/severity orient you, they do not scope you.[[four-way-triage]]First ask: does a correct rule already exist that would have prevented this?
references/triage.md carries the full
discrimination checklist and the recurrence bookkeeping.[[agentic-vs-quality-routing]]Which detector caught this decides which foot you fix from — and you never mix them:
Never let one detector rule the other's axis; every fix names BOTH — the gap closed AND the lever carrying it. When two executor tiers are available, the two-model diff localizes the fix: a dimension BOTH tiers miss is a shared knowledge gap (fix the shared home); one only the weak tier misses is a scaffold gap (fix with weak-executor structure/data).
Lift the node's demand for quality from the DOMAIN research it draws on. Goodhart fence: the criteria and
the gold belong to the JUDGE — never in the node's context, never its objective; teaching to them voids the
gate [[judge-reliability]]. The only legal quality source is the upstream research those criteria derive
from — strengthen THAT and route it into the node [[three-knowledge-legs]].
The two-half law: a fix is a TRUTH half + a DEMAND half. The truth files in its ONE correct home
[[layered-instruction-homes]] — the home decides where knowledge LIVES, never whether it binds. The demand is
a compliance-shaped lever at the executor's decision point. The issue stays OPEN until BOTH exist — a truth-half
alone is bookkeeping (file it; it claims nothing). All demand levers blocked = BLOCKED, never "fixed with
prose" — references/demand-levers.md §Blocked carries the escalation options.
Demand levers a weak executor actually obeys (all ~zero standing tokens except 4):
[[model-callable-calculators]]; match
its detection GRAIN to where the defect lives (a record-grain linter is silent on a prose-grain defect);
it reports the measurement, never picks the design.Generation-shaped prose is not a lever — a described quality property ("make it deep", "teach X solo",
"author the flip beat") binds in NO home on a weak executor; it is only ever a truth-half. The nuance:
CONCRETE strategy / failure-mode / interface-rule bullets are data-like and can bind; abstract quality
adjectives never do. Authoring guidance per lever + the form↔failure-type table: references/demand-levers.md.
Cost law: the always-visible surface is the procedural action contract ONLY; a fix's net always-visible
addition must be ≤ 0 (pay by deleting a weaker line). Append only into forced-visit slots; slim wherever the
standing window carries a generation-shaped demand (it wasn't binding anyway) [[context-composition]].
Stacked constraints also degrade compliance sharply — a fix demanding several new constraints at once should be
split across cycles.
| you observe | it is really |
|---|---|
| your guidance was ignored | it shipped generation-shaped — compile it into a demand lever |
| the rule is correct and this is its first miss | a LAPSE — routing change, not a prose edit |
| the trace is perfect, quality is still flat | wrong foot — a mechanism win over a knowledge gap |
| a creative win with a hygiene regression | a cross-axis regress — read the WHOLE board, not one mark |
| an advisory/detector stayed silent on a real defect | the detection grain is too coarse — sharpen it, don't paper over |
| the same mark failed again | read the DEFECT, not the mark — a different defect under one mark is a NEW issue, not a recurrence |
| a mark flipped after the sampled kind/route changed | sampling, not treatment — kind-dependent marks compare same-kind or N≥3 |
| the score moved once | variance, not signal — see Verify |
| the fixer "understood deeply" but committed no edit | a failed attempt — judge fixers by edits landed + gates passed, never diagnosis eloquence |
[[outcome-gated-accept]]You do not judge your own fix. Leave the edits committed on the candidate worktree; the harness PROVES it with a
single-node replay (spawnChildRun pins a from:<node> until:<node> window — only this node re-runs;
everything else, upstream AND downstream, is reused) and re-judges blind [[run-variance-discipline]]:
fixIssueWithRetries on exhaustion keeps the LAST (most-steered) candidate as best, flagged
bestIsHeuristic:true — NOT a true score-and-keep-best. So on an escalation packet review ALL preserved
candidateShas, don't trust best; a real best-of selection is future work.editsApplied < 1 auto-discards.
Full protocol — pre-registration template, frozen-rerun recipe, N/power table, judge cautions, the two-front
report shape: references/verification.md.[[retry-escalation-ladder]]Your own tool calls obey the same discipline you are compiling into the node:
references/orchestrator.md §Tripwires.When the fix lands, the node's memory.md lesson and the method card's Applications update by POINTER, resolved
at read time — never an embedded copy that rots [[memory-recording-policy]]. N=1 discoveries are watch-items;
recurrence ≥2 makes a lesson. Raw run evidence stays first-class — a lesson summarizes it, never replaces it.
You do not write git; landing into the live product is a separate, human-gated step.
How this maps to the SHIPPED substrate loop: the "orchestrator" is the
optimize fix --nodeCLI, which iterates the selected issues SEQUENTIALLY (for (const rec of records)), onefixIssueWithRetriesat a time (per-issue bounded retry, default--max-attempts 3), with ONE system-wide net: the consecutive-exhausted--breaker(default 3 → HALT the pass). There is NO automated agent-orchestrator dispatching subagents in parallel, NO batched cross-issue verify, and NO built stall/oscillation detection or 2-3-candidate fan-out — those (steps 5-6 below) are the OVERLORD's manual judgment or aspirational, not code the loop runs for you. Read this section as the discipline a human/overlord applies ACROSSoptimize fixinvocations, not a runtime.
ONE owner (the overlord or you) drives each returned verdict's whole cycle — route, dispatch, gate, improve the playbook; never fix in-line:
[[three-knowledge-legs]]: node memory for
recurrence (LAPSE vs SKILL) + the rejected/dead-lever record (memory-slices, Leg A — project-stuck) · the
code slice for the root (okf-slices, Leg B — project-stuck) · then the PRACTICES LIBRARY this skill OWNS
(Leg C — the portable method cards under this skill's own library/cards/; universal, they travel WITH
the fixer, so they are present on ANY repo from day one). FIND by symptom: node library/cards/_generate.mjs --find "<symptom>" (--json = ranked), then read the top library/cards/<key>.md fresh. EVERY [[key]]
cross-ref in this playbook names a card in library/cards/ — resolve it there. If the library lacks the
pattern, RESEARCH first and stage a card candidate (library/cards/_TEMPLATE.md).[[fixer-model-tiering]]: bounded edit-committing jobs
→ a mid tier that reliably ACTS; open-ended root-causing → the deep tier; forensics/recon → cheap tier.
Audit the routing by edits-landed + gates-passed, never by how smart the diagnosis reads.references/playbook-maintenance.md.MUST NOT: run git / commit / push · edit any measure / judge / oracle / gold file (and recreate none) · put the criteria or the gold into the node's context · silence a symptom in place of the root · grow the standing window. Before you stop, confirm in one line: LAPSE gate run · which foot · both halves (truth home + demand lever, or BLOCKED, or LAPSE-routing) · net always-visible ≤ 0 · root not symptom · reach was real · signal pre-registered · detector + line cited. If any is No, you are not done.
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