Mandate
The mandate is the goal. The mandate is necessary in each writ.
mandate: "The failing test {failing_test} passes without breaking other tests."Write a condition, not a procedure
Section titled “Write a condition, not a procedure”The mandate states the condition that must be true when the work is complete. The mandate does not state the steps.
The model selects the steps. If you write the steps, you do the work of the model, and each new model makes those steps more unnecessary.
| Write this | Do not write this |
|---|---|
| “The failing test passes without breaking other tests.” | “Run the test, read the error, then correct the code.” |
| “The report contains a summary of each incident from last week.” | “First open the log file. Then count the incidents.” |
“No function in src is longer than 60 lines.” |
“Look at each function and split the long ones.” |
Write a mandate that a person can check
Section titled “Write a mandate that a person can check”A good mandate lets a reader answer one question: is this condition true or false? If two readers can disagree about the answer, make the mandate more exact.
The mandate is not a check. The satisfaction clauses are the checks. But a mandate that a person cannot check usually becomes a satisfaction clause that a machine cannot check.
Use placeholders for the values that change
Section titled “Use placeholders for the values that change”A placeholder lets one writ do the same work on different inputs.
mandate: "The failing test {failing_test} passes without breaking other tests."You give the value when you issue the writ:
writ issue bug-fixer.yaml --set failing_test=tests/test_sync.py::test_retryRead more about placeholders.
What the registrar does with the mandate
Section titled “What the registrar does with the mandate”The registrar sends the mandate to the holder model at the start of the run. The mandate tells the model what to achieve.
The registrar does not check the mandate. The registrar checks the satisfaction clauses. A writ with no satisfaction clause has no proof of completion, and the run stops when the model stops.