The record
The record holds each action, each check, and each decision of a run. The record is a trace, and each line also shows which clauses applied and what they decided.
Writ keeps the record in .writ/record.db, in the root directory of your
project.
Read the record
Section titled “Read the record”writ record bug-fixerThe command shows the last run of the writ that you name. The header shows the meters of the run: the iterations, the cost, and the time. The lines below the header show the entries.
To read the record in a browser, add the --web flag:
writ record bug-fixer --webThe entries
Section titled “The entries”Each entry has a type. The types are these:
| Type | Meaning |
|---|---|
issuance |
The run started. |
holder_text |
The model wrote text. |
tool_call |
The model asked for an action. |
tool_result |
The action gave a result. |
check |
The registrar made a check. |
breach |
A clause failed. |
remedy |
The registrar applied a remedy. |
judgment |
A judge made a decision. |
assent_request |
The run asked a person. |
assent_decision |
A person answered. |
feedback |
The registrar told the model about a breach. |
amendment |
Somebody changed a term. |
attestation |
The registrar accepted satisfaction. |
halt |
The run stopped. |
interrupt |
Something stopped the run from outside. |
Each entry names its actor: holder, judge, registrar, or human.
Each check has a result: pass, blocked, or fail.
Filter the record
Section titled “Filter the record”The --where flag limits the lines of the transcript. The meters in the
header always cover the whole run.
writ record bug-fixer --where status=blockedThe filter forms are these:
| Form | Example |
|---|---|
type=<entry type> |
--where type=tool_call |
actor=<actor> |
--where actor=judge |
status=<status> |
--where status=blocked |
text~<part of the text> |
--where text~pytest |
seq>=<number> |
--where seq>=40 |
seq<=<number> |
--where seq<=80 |
Give the flag more than one time to combine filters. Each filter must match, because the filters combine with AND.
writ record bug-fixer --where actor=holder --where status=blockedUse the record to write the next clause
Section titled “Use the record to write the next clause”The record is the reason that a writ grows correctly. Do not design the full writ before the first run. Run the writ, read the record, and add a clause for each behaviour that you want to stop.
| The record shows | Add this |
|---|---|
| A denied action that the work needs | A grant |
| The run stops at the iteration limit | A larger bound |
| The agent changed a file that it must not change | An invariant |
| The run says that it is complete, and it is not | A satisfaction clause |
| The same mistake many times | A remedy with inform |
A clause that comes from the record answers a real behaviour. A clause that you write before the first run is a guess.