Running a plan
Draft
This version may still change before it is published.
A run
A runner MUST check a plan before it runs it, and MUST NOT run a plan with problems (Problems).
A run does the steps in the order they are written. A step starts when the step before it has passed. A step has passed when its work is done and every one of its proofs has passed. When the last step has passed, the run is done.
Whoever does a step MUST be told the plan's wish. An agent MUST also be told, before it works, what will prove its work, in the order the proofs will be asked.
Proofs and refused work
The proofs of a step are asked in the order written, and the first that refuses stops the others. Work that a proof refuses goes back to who made it, with the points against it; when it is done again, every proof is asked again from the first.
After limits.repeats more attempts are refused, the runner MUST ask the person whether to go on. If they say yes, the step may be tried limits.repeats more times; if they say no, the run stops.
An algorithm's step
The command in run is run in the folder. When it ends with a code other than 0, the work is refused, and what it wrote is the points.
With on_fail: "agent", a refused command goes to an agent with its points. The agent fixes what stands in the command's way, and then the same command runs again, this time as the first proof of the agent's work, followed by the step's own proofs. Without on_fail, a refused command is run again as it is.
Limits
When a run reaches limits.minutes or limits.cost, the runner MUST stop it and tell the person why. When the runs of a plan in a calendar month reach limits.month, the runner MUST NOT start another that month, and SHOULD tell the person when four fifths of it are spent.
What a runner keeps
A runner SHOULD keep, for each run, what each step answered, each proof asked with its result and points, and who decided when the person was asked. This record is what lets anyone see that each step was proven.