Sor Add Layer
sor_add_layerAdds a new layer to an existing SOR config by defining mutable file paths, contract tests, and optional scored metrics or thresholds for controlled code optimization.
Instructions
Add a new layer to an existing SOR config.
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": {
"project_dir": "<project_dir>",
"name": "<name>",
"surface": "<surface>",
"contracts": "<contracts>"
},
"name": "sor_add_layer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Layer name (must be unique). | |
| scored | No | Whether this layer uses scored metrics. | |
| metrics | No | List of {name, extract, weight} dicts (required if scored=True). | |
| surface | Yes | List of mutable file paths. | |
| contracts | Yes | Test file path/glob for contract tests. | |
| thresholds | No | Optional {target_score, max_attempts, ...} overrides. | |
| project_dir | Yes | Path to the project directory containing sor.yaml. | |
| scored_tests | No | Test file for scored metrics (required if scored=True). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |