CodesModelPlan codes.model-plan@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- codes
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/codes/model-plan.v1.json
codes.model-plan@1: a versioned execution plan for a Codes task. Roles are attempted in list order. The ladder names AI registry ids in fallback order; auto asks AI to route. A pair requires reviewer approval, a council has two or three planner samples and a judge, and escalation advances on a failed check, refusal, or low confidence.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
mode | enum | yes |
| |
roles | array of object | yes |
| |
roles[].role | enum | yes |
| |
roles[].model | string | yes |
| |
roles[].effort | enum | yes |
| |
roles[].samples | integer |
| ||
roles[].budget | object |
| ||
roles[].budget.tokens | integer |
| ||
roles[].budget.minutes | number |
| ||
roles[].budget.dollars | number |
| ||
ladder | array of string |
| ||
checks | object | yes |
| |
checks.tests | boolean | |||
checks.lint | boolean | |||
checks.reviewer | boolean |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: council
{
"mode": "council",
"roles": [
{
"role": "planner",
"model": "auto",
"effort": "high",
"samples": 3
},
{
"role": "builder",
"model": "auto",
"effort": "high"
},
{
"role": "reviewer",
"model": "auto",
"effort": "high"
},
{
"role": "verifier",
"model": "auto",
"effort": "medium"
}
],
"checks": {
"tests": true,
"reviewer": true
}
}Valid: escalate
{
"mode": "escalate",
"roles": [
{
"role": "builder",
"model": "auto",
"effort": "low"
},
{
"role": "verifier",
"model": "auto",
"effort": "medium"
}
],
"ladder": [
"openvibe/economy",
"openvibe/auto"
],
"checks": {
"tests": true
}
}Valid: pair
{
"mode": "pair",
"roles": [
{
"role": "builder",
"model": "auto",
"effort": "high",
"budget": {
"tokens": 100000,
"minutes": 30,
"dollars": 2
}
},
{
"role": "reviewer",
"model": "openvibe/auto",
"effort": "medium"
}
],
"checks": {
"tests": true,
"lint": true,
"reviewer": true
}
}Rejected: bad-effort
{
"mode": "single",
"roles": [
{
"role": "builder",
"model": "auto",
"effort": "ultra"
}
],
"checks": {
"tests": true
}
}Rejected: council-one-sample
{
"mode": "council",
"roles": [
{
"role": "planner",
"model": "auto",
"effort": "high",
"samples": 1
},
{
"role": "builder",
"model": "auto",
"effort": "high"
}
],
"checks": {
"tests": true
}
}Rejected: escalate-no-ladder
{
"mode": "escalate",
"roles": [
{
"role": "builder",
"model": "auto",
"effort": "low"
}
],
"checks": {
"tests": true
}
}Rejected: pair-no-reviewer
{
"mode": "pair",
"roles": [
{
"role": "builder",
"model": "auto",
"effort": "high"
}
],
"checks": {
"tests": true
}
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('codes.model-plan@1', value); // { valid, errors: [{ path, message }] }