Shape
On a workflow() stage
Setgoal on a stage that a panel reviews. It takes a seat, the same as
synthesise:
examples/goal-check.ts (excerpt)
- Build. The builder writes the work.
- Goal check. The goal seat reads the brief, the stage’s
descandgate, and the files the stage writes. It may read the work but not change it. It lists the requirements, or uses the list when the brief gives one. It marks each onemetorunmet. For a met requirement, the evidence is a file and line, or a test. For an unmet one, the evidence says what is missing. - Reviews. The panel reads the work.
- Synthesis. When
synthesiseis set, the panel merges its reviews. - Judge. When
refinenames a judge, it decides the findings.
refine: 3, the builder gets three rounds in all,
whichever check sends each one back.
The goal seat replies with one JSON object:
Reply
The record
Each round adds onegoal:check event to the record. It holds the round
number and every requirement, with its verdict and evidence. A person reads
it to see that the brief was met.
examples/goal-check.ts (excerpt)
In a dag()
goalCheck(seat, { target, text }) from @obversa/runtime is the same
check as one node. Put it between the build node and the review node. It
reads text and the work. It passes when every requirement is met.
Otherwise it sends the unmet ones, with their evidence, back to target
as a revision.
examples/goal-check.ts (excerpt)
maxKickbacks
limits it. A judge on maxKickbacks for the target does not decide it.
The judge still decides what the review node sends back.
What the run did
pnpm example:goal-check runs the file offline. Each seat is a scripted
stand-in. The writer leaves the opening hours out of its first draft. Round
one stops at the goal check, and the reviewer does not run. In round two,
both requirements are met, and the reviewer passes the page. The dag()
builds twice for the same reason.
Output
Next steps
- Ask a panel: the reviews that run once every requirement is met.
- Know when to stop: the judge that decides the reviewers’ findings.
- Runtime:
goaland every other stage key.