Foreman
Cross-vendor architect/worker orchestration for coding agents. An architect
session routes five-part specs to implementer and auditor lanes, re-runs
verification on the real tree, and for non-trivial soft-mode work is
instructed to obtain an independent cold-diff review before shipping; trivial
mechanical edits may skip audit with a stated reason. Hard mode records a cold
audit, but its verdict is not yet bound to the current diff. Every run — on
Windows or on WSL/Linux — moves through three ordered stages: Setup &
Environment, Use, Cleanup. Soft mode is the path that works today.
Hard mode includes IMPLEMENT, CHECK, EVIDENCE, AUDIT, GATE, and draft-PR
scripts; IMPLEMENT needs a built or supplied foreman-launch before it can
run (see Hard mode).
This README is the teaching document: what Foreman is, how the lifecycle
works, and what is shipped versus planned. For a soft-mode operating
walkthrough, selected command and exit-code reference, and troubleshooting,
see docs/USAGE.md. For the install/setup story on Windows
and WSL/Linux side by side, see docs/INSTALL.md.
In development: Return of the ForeDi

Status: implemented release candidate, numerical version unassigned.
Final candidate qualification and release acceptance remain open.
Why we implemented Pel
A plan names the work. The controller supplies its order, conditions, and
recovery behavior. When these live in separate scripts and prompts, each
translation can change the intended workflow. Similar workflows also need
repeated control logic.
Return of the ForeDi brings these relations into one program that people
and models can read, write, and inspect before execution. Pel expresses the
workflow. Foreman retains authority over repository access, model calls,
verification, and durable state. This division makes the dependencies
explicit without granting a program new permissions.
What Pel is
Pel is a small programming language for orchestrating agents, published by
Behnam Mohammadi (arXiv 2505.13453v2). Foreman adopts and extends that design
in strict TypeScript for Node.js 24. No verified upstream implementation was available for comparison.
The implemented profile,
pel-paper-v2-foreman-1, records the
selected interpretations, extensions, and errata.
Parentheses call functions, brackets hold lists, and pipes pass values from
one call to the next. Bindings, closures, conditions, and loops express
reusable workflows, including conditional repair and independent parallel
work. A call uses positional or named arguments, never both. The
Pel tutorial develops these rules from small
expressions to delivery workflows.
Foreman exposes operations through the reserved fm/ namespace, including
fm/task, fm/verify, fm/review, fm/publish, fm/research, and
fm/checkpoint. Pel does not evaluate arbitrary JavaScript or shell source.
It has no implicit eval.
How it works
The commands separate inspection from execution:
foreman check workflow.pel parses and statically validates the program.
foreman plan workflow.pel previews values, effects, dependencies,
capabilities, resources, and bounds without dispatching work.
foreman run workflow.pel executes under existing project authority.
Each fully supplied host call suspends evaluation until Foreman validates
its exact model, capability, path, and limits before performing the operation.
A successful check establishes neither permission nor provider readiness.
The shipped implementation-and-review example
shows the central dependency: review must concern the candidate that passed
verification.
(fm/task :id "implement" :model "role:implementer"
:input "artifact:approved-spec" :output "schema:candidate-v1")
|> (fm/verify :id "verify" :input ^ :gate "candidate-full")
|> (fm/review :id "review" :model "role:reviewer"
:input ^ :policy "independent-review")
The implementer produces a candidate from an approved specification.
The ASCII pipe |> passes the result onward, and ^ marks its destination.
Here, verification receives the candidate and review receives the
verification result. Foreman captures an immutable candidate, runs the
registered verification check against it, and binds independent review to
that candidate and its verification evidence.