Guidance for writing, editing, reviewing, and debugging JavaScript workflow code for pi-dynamic-workflows.
SkillScore92Maintained
Automatic
◆AI Engineer pack
Last verified 8/21/2026
What it changes
Passed 23 of 25 test cases with the skill, and 5 of 25 without it.
Without skill20%
With skill92%
Checks it passed that the model alone missed
Directs using log() for new code.
Replaces console logging calls with log().
Notes that console is for compatibility only.
and 25 more in the full report
19 fixed4 passed either way1 still failing1 broke
Pass-rate lift
+72 pp
Tokens
-30%
Agent turns
0%
Response time
-57%
Model gemini-3.6-flashMeasured 8/21/2026v123 of 25 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 19 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 19
Prompt
I am configuring phase model selections and setting `agentType` attributes across my workflow steps. Which reference document must be read before using model tiers or agent types?
What was checked, without and with the skill
Checked
Without skill
With skill
Recommends references/registry-ownership.md before using model tiers.
Missed
Passed
case-09 · gemini-3.6-flash · 8/21/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md23 lines16 files
Workflow authoring
Load this skill when workflow JavaScript changes. Running an existing workflow needs no authoring reference.
Choose a branch
Read only what the task needs:
Write or edit: start with runtime. Add pattern selection for topology, lifecycle for limits or resume, and focused recipes for the matching concern.
Helper task: read quality helpers only for verify or judgePanel, the retry helper only for retry, and specialized helpers only for completenessCheck, loopUntilDry, gate, or checkpoint.
Review: use the review checklist, plus only the matching quality or specialized helper contracts.
Debug: use the debugging map.
Routing: read registry ownership before using model, tier, phase models, or agentType; use environment-specific names only when context supplies them.
Exact lookup or portability: start with the generated capability index. Follow its exhaustive-facts pointer only for constraints or support boundaries. Use versions when moving scripts between installations.
Invariants
Start with literal export const meta = { name, description }; declare phases as an array of used { title } objects and enter each named phase.
Call agent() at least once, give every call a short unique label, and return plain JSON data explicitly.
Pair ordered results with stable work IDs before filtering. When one agent consumes another's selected result, include both its stable ID and actual data in the downstream prompt. Treat recoverable null as missing coverage and report it.
Bound fan-out, loops, retries, agents, and concurrency to the task. Treat invocation-level token and time caps as opt-in user constraints, not defaults.
Use log() for new code; console is compatibility-only.
Write plain JavaScript without imports or filesystem modules. Pass nondeterminism through args; Date.now(), Math.random(), and no-argument new Date() are unavailable.