60 lines
2.2 KiB
JSON
60 lines
2.2 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"$id": "https://casan.fpt/loop-policy.schema.json",
|
|
"title": "CASAN Loop Budget Governor policy",
|
|
"description": "Schema for .specify/config/loop-policy.yaml (Plan-17 Track 1). Budgets are non-negative numbers; on_exceed is halt|escalate. Absence of a rule means the strictest built-in ceiling applies (deny-by-default).",
|
|
"type": "object",
|
|
"required": ["version", "profiles"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"version": { "type": "integer", "minimum": 1 },
|
|
"org_ceiling": { "$ref": "#/definitions/budget" },
|
|
"profiles": {
|
|
"type": "object",
|
|
"minProperties": 1,
|
|
"additionalProperties": { "$ref": "#/definitions/profileBlock" }
|
|
}
|
|
},
|
|
"definitions": {
|
|
"budget": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"max_steps": { "type": "number", "minimum": 0 },
|
|
"max_tokens": { "type": "number", "minimum": 0 },
|
|
"max_wall_clock_sec": { "type": "number", "minimum": 0 },
|
|
"max_cost_usd": { "type": "number", "minimum": 0 },
|
|
"max_corrections_per_step": { "type": "number", "minimum": 0 },
|
|
"on_exceed": { "type": "string", "enum": ["halt", "escalate"] }
|
|
}
|
|
},
|
|
"convergence": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"oscillation_repeat": { "type": "integer", "minimum": 1 },
|
|
"thrash_window": { "type": "integer", "minimum": 1 },
|
|
"no_progress_window": { "type": "integer", "minimum": 1 },
|
|
"on_stall": { "type": "string", "enum": ["halt", "escalate"] }
|
|
}
|
|
},
|
|
"profileBlock": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"defaults": { "$ref": "#/definitions/budget" },
|
|
"delegation_levels": {
|
|
"type": "object",
|
|
"propertyNames": { "pattern": "^L[0-5]$" },
|
|
"additionalProperties": { "$ref": "#/definitions/budget" }
|
|
},
|
|
"projects": {
|
|
"type": "object",
|
|
"additionalProperties": { "$ref": "#/definitions/budget" }
|
|
},
|
|
"convergence": { "$ref": "#/definitions/convergence" }
|
|
}
|
|
}
|
|
}
|
|
}
|