Trace format
westering detect --trace <file> reads one JSON object that records a session of agent work. Every trace in this repository is synthetic and written for it.
Fields
| Field | Type | Rule |
|---|---|---|
trace_id | string | Must not be empty |
goal | string | The task the agent was given |
tools_available | list of strings | The tools the agent could call |
events | list of objects | One object per call, in step order |
synthetic | boolean | Not read by the loader, and by repository convention every committed trace sets it to true |
Each event carries four fields.
| Field | Type | Rule |
|---|---|---|
step | integer | Strictly greater than the step before it. Detection reads from step 0, so an event at a negative step is accepted and left out of every detection |
tool | string | The tool that was called |
call | string | The call signature, compared as exact text by the looping detector |
progress | boolean | Whether the call advanced the goal |
The committed fixation example shows the shape.
$ cat examples/fixation_trace.json
{"events":[{"call":"grep(pattern=config, path=src)","progress":false,"step":0,"tool":"grep"},{"call":"grep(pattern=settings, path=src)","progress":false,"step":1,"tool":"grep"},{"call":"grep(pattern=config, path=docs)","progress":false,"step":2,"tool":"grep"},{"call":"grep(pattern=conf, path=src)","progress":false,"step":3,"tool":"grep"},{"call":"grep(pattern=config, path=tests)","progress":false,"step":4,"tool":"grep"}],"goal":"Find the config file and report its path","synthetic":true,"tools_available":["grep","read","edit","test","finish"],"trace_id":"trace-fixation-001"}
Refusals
A trace that breaks a rule is refused with one error line on standard error and exit status 2. An empty object has no trace_id, so it fails at that field.
A file nested past the reader's depth ceiling is refused before any field is read, with the line error: trace file is nested too deeply, followed by the path, and exit status 1. That holds even when the file also breaks a field rule.
$ printf '{}' > target/empty_trace.json && ./target/debug/westering detect --trace target/empty_trace.json; echo "exit $?"
error: trace_id is not a non-empty string
exit 2
A path that cannot be read is refused the same way.
$ ./target/debug/westering detect --trace target/missing_trace.json; echo "exit $?"
error: trace file cannot be read, target/missing_trace.json
exit 2
The other refusals name the field that failed, for example events is not a list, event progress is not a boolean, and event steps are not strictly increasing.