steer the loop
Build software in reverse.
Start from the spec; let the loop make reality match.
hello world
One file. One gate. One real pass condition.
Define what done looks like. Hand it to the loop.
import { Effect } from "effect";
import {
Act,
Assert,
Gate,
Plan,
createHttpObserveResource,
} from "gateproof";
const plan = Plan.define({
goals: [{
id: "hello-world",
title: "GET / returns hello world",
gate: Gate.define({
observe: createHttpObserveResource({ url: "https://example.com" }),
act: [Act.exec("curl -sf https://example.com")],
assert: [
Assert.httpResponse({ status: 200 }),
Assert.responseBodyIncludes("hello world"),
Assert.noErrors(),
],
}),
}],
});
if (import.meta.main) {
const result = await Effect.runPromise(Plan.run(plan));
console.log(JSON.stringify(result, null, 2));
if (result.status !== "pass") process.exitCode = 1;
}
Define done first
The gate describes the finished behavior before any code exists.
The loop runs the worker
One failing gate, one bounded attempt, loop repeats until the live system passes.
One file, one contract
The same file the human reads is the file the loop hands to the worker.
Case Studies
Proof loops in the wild.
Real systems, one plan, one loop. Cinder is the first; more to come.