JavaScript & workflow glossary
Every keyword and primitive used across the seven scripts. Hover a dotted token for a tooltip; click a term to highlight its occurrences in the current file.
Workflow primitives
metaruntime
Exported pure literal that registers a saved workflow: name, description, whenToUse, and the phase list the progress UI displays. Nothing executes.
agent()runtime
Spawns one subagent with its own clean context window; returns a promise of its result. Agents do all the searching, fetching, and file work.
parallel()runtime
Runs an array of agent calls concurrently; the runtime caps a run at 16 concurrent agents, 1,000 total.
argsruntime
Global carrying structured input when a saved workflow is invoked, e.g. /deep-research What changed…
model:runtime
Routes one stage to a cheaper or stronger model: haiku to classify and search, opus to judge and write.
worktree: trueruntime
Runs the agent in an isolated git worktree so parallel edits never collide — tournament designers and loop fixers.
Keywords
exportkeyword
Makes the meta literal visible to the runtime that registers the workflow.
const / letkeyword
Block-scoped bindings. const cannot be reassigned; let can — loop counters and the shrinking tournament bracket.
asynckeyword
Marks a function that returns a promise, letting it use await inside — the per-claim checker–skeptic pair.
awaitkeyword
Pauses this line until a promise resolves: one agent, or a whole parallel batch.
returnkeyword
Ends the script; its value is the only thing delivered into Claude’s context window.
=>keyword
Arrow function: a compact inline function, the worker passed to map and parallel.
`…${ }`keyword
Template literal: a backtick string that splices variables into an agent’s prompt.
?.keyword
Optional chaining: reads args.question safely even when args is undefined.
??keyword
Nullish coalescing: falls back to the default only when the left side is null or undefined.
? :keyword
Ternary: an inline pick between two values — which competitor advances from a pairwise judgment.
...keyword
Spread: copies arrays or merges objects; with new Set it dedupes; in the loop it accumulates fixes.
&&keyword
Logical and: every condition in the vote gate must hold for a claim to survive.
=== / >= / < / >keyword
Strict comparison: no type coercion when checking verdicts, scores, counts, and the safety cap.
whilekeyword
Loops until a stop condition: a bracket of one, green tests, or the safety cap.
forkeyword
Classic counted loop; steps the tournament bracket two competitors at a time.
if / breakkeyword
Branch and early exit: route by classifier verdict; leave the loop the moment tests pass.
+=keyword
Compound assignment: adds in place — counting passes, stepping the bracket by two.
Methods
.map()method
Transforms each item — each angle, URL, ticket, or claim becomes an agent call.
.flatMap()method
Maps, then flattens one level: per-agent arrays become one combined list.
.filter()method
Keeps only items passing the gate: surviving claims, names scoring 8 or better.
.slice()method
Takes the first n items of an array — the top three names.
.push()method
Appends to an array: winners advancing to the next tournament round.
.startsWith()method
Tests a reply’s prefix: did the skeptic answer sound?
new Set()method
Keeps unique values; spread back into an array, it dedupes URLs and name pools.
Array.from()method
Builds an array from a length — minting twelve brainstormer prompts from thin air.
Number()method
Converts an agent’s text reply into a number the scorer gate can compare.
JSONmethod
parse turns an agent’s text reply into data; stringify packs data back into a prompt.