Sor Ratchet
sor_ratchetRun one ratchet iteration to execute oracle tests, compare scores to the previous best, commit improvements, reset regressions, and check stop conditions.
Instructions
Run one ratchet iteration: oracle -> compare -> git commit/reset -> check stops.
This is the core tool for the experiment loop. Call it after making changes to the mutation surface. It will:
Run the oracle tests
Compare the score to the previous best
Git commit if improved, git reset if not
Check all stopping conditions
Returns one of:
KEEP score={X} prev={Y}
DISCARD score={X} best={Y}
DISCARD FAIL
STOP:{reason} score={X} attempts={N} kept={K}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"layer": "<layer>",
"hypothesis": "<hypothesis>"
},
"name": "sor_ratchet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layer | Yes | ||
| hypothesis | Yes | ||
| project_dir | No | . |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |