Skip to content

pro-vi/wfgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wfgen

A composer for multi-agent Workflow scripts.

Recognize which of four shapes your task is, adapt the matching example, emit a script that verifies before it accepts.

The workflow-family sibling of loopgen (a compiler for autonomous loops): wfgen compiles workflows — deterministic JS that fans out subagents over the ultracode Workflow runtime.

You don't assemble a script from a vocabulary. You recognize which of four shapes your task is, adapt the matching example, and emit it. The four examples in examples/ are the product — they already encode the taste so the generated script can't quietly degrade into naive fan-out.

Status — V0. wfgen consistently produces auditable, ledger-emitting Workflow scripts and can compose skills you provide. Whether a fired wfgen script catches more than a capable cold one (outcome advantage) is still under evaluation — the proven edge so far is disciplined defaults, not better detection.

The one idea

A workflow is only as trustworthy as the contracts at its joins. Verify before you accept. Every reducer emits a decision ledger.

A reducer that does return await agent("synthesize these") launders unverified worker output into fluent final truth. Every example instead returns:

{ ok, archetype, effort, result,
  ledger: { accepted, rejected, conflicts, minority, evidence, nextAction },
  observability: { rounds, agents, verifierTier, effects, isolation } }

The four archetypes

examples/… shape oracle
understand.js parallel readers → evidence-synthesis citation / tool
design.js N candidates → judge panel → synthesize-from-winner judge + adversarial
review-until-dry.js composes any review skill you provide (or an inline reviewer) each round → loop-until-dry the composed skill + heterogeneous re-verify
migrate.js discover → transform-in-worktree → execute → repair tests (execution — the hard oracle)

Common asks

Ask Archetype
/wfgen "audit every route for missing auth checks" review
/wfgen "map how auth flows through this codebase" understand
/wfgen "design the caching layer — weigh 4 options" design
/wfgen "rename this API across every call site" migrate

The flagship composes any review skill you provide (or runs a self-contained inline reviewer) rather than reimplementing review: the wfgen loop owns rounds + cross-round dedup + budget + convergence; the reviewer owns one fresh pass per round. Review and migrate workflows accept optional args.intent so author/user intent is threaded as context — not proof — before findings are accepted. That's the skill-as-stage seam — drop any schema-returning skill in as a unit.

Effort is one knob

low | med | high raises the verification tier and round budget — not a fixed fleet of identical workers (correlated errors make N clones ≈ one vote). High buys heterogeneous cross-model jurors + a post-judge hallucination gate, not width.

Install

./install.sh        # symlinks into ~/.claude ~/.codex ~/.pi + runs the smoke check

Not bootstrap-managed (own repo, like loopgen). Composing a script works anytime; firing it (Workflow({script})) is gated on the ultracode opt-in.

Layout

SKILL.md                 the spine: classify → adapt → emit
examples/                THE PRODUCT — 4 runnable, opinionated scripts
references/
  foundation.md          why: contracts at the joins (+ what was deliberately cut)
  workflow-mechanism.md   how: Agent-SDK patterns, orchestrator-worker economics
  script-shape.md        the emitted-script dialect + the ledger idiom
  borrowed-schemas.md    lifted schemas/predicates (FINDING, QualityRating, …)
scripts/check.mjs        ledger-presence smoke check (syntactic guard)
agents/openai.yaml       codex parity

Lineage

wfgen is mostly assembly of proven, convergent patterns — loop-until-dry, the verifier-verdict schema, FINDING/SCORECARD, singleton-fallback reduce, inject-ids-in- code are all established practice. Its own contribution is narrow: the skill- composition seam + the verification-hierarchy-as-effort-knob, emitted as ready-to-run scripts. See references/best-practices.md for the practices it encodes.

About

A composer skill for multi-agent Workflow scripts — recognize the shape, adapt the example, verify before accept, every reducer emits a decision ledger.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages