Files
portal/docs/registry/schema.json
T
Дмитрий 2fe4e1c4bc feat(brain): router-config + nodes.yaml capabilities (phase 2 task 8)
Phase 2 Task 8 of LLM-first router overhaul.

- tools/router-config.mjs: 4 constants (CLASSIFIER_MODEL='claude-sonnet-4-6',
  REVIEWER_MODEL='claude-opus-4-7', INHERITANCE_MAX_AGE_MIN=30,
  REVIEWER_MAX_NEIGHBOR_EPISODES=10). Sonnet 4.6 ID resolved via ProxyAPI
  /v1/models 2026-05-25 — only alias 'claude-sonnet-4-6' is exposed (no dated
  YYYYMMDD form on this reseller); alias is canonical here.
- docs/registry/nodes.yaml: capabilities: line added to all 85 nodes
  (1-2 sentences describing what each node DOES, not when to choose it —
  classifier infers selection from capabilities + user prompt). Generated
  by Sonnet subagent from CLAUDE.md §3.x + Tooling §4.X attribute blocks
  + spec §18.3 format. Spot-checked + verified no forbidden 'use when' framing.
- docs/registry/schema.json: +capabilities top-level node property
  (type:string minLength:1). G12 'permissive' note in plan was stale —
  schema had additionalProperties:false; explicit extension is the
  cleanest compliant path.

Verify (plan Step 2): nodes=85 caps=85, exit 0.
Tests: tools/router-config.test.mjs 4/4 PASS + tools/registry-load.test.mjs
11/11 PASS (Ajv schema-validate on amended schema GREEN).
2026-05-25 14:28:24 +03:00

75 lines
2.9 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://liderra.local/registry-schema.json",
"title": "Liderra Node Registry",
"type": "object",
"required": ["version", "nodes", "chains"],
"properties": {
"version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
"nodes": {
"type": "array",
"items": { "$ref": "#/definitions/node" }
},
"chains": {
"type": "object",
"patternProperties": {
"^L\\d+$": { "$ref": "#/definitions/chain" }
}
}
},
"definitions": {
"node": {
"type": "object",
"required": ["id", "name", "slug", "category", "status", "triggers"],
"properties": {
"id": { "type": "string", "pattern": "^#\\d+$" },
"name": { "type": "string", "minLength": 3 },
"slug": { "type": "string", "pattern": "^[a-z0-9-]+(:[a-z0-9-]+)*$" },
"category": { "enum": ["phase-0", "phase-1", "phase-2", "phase-3", "off-phase"] },
"subcategory": { "type": ["string", "null"] },
"status": { "enum": ["active", "dormant", "deferred", "historic"] },
"dormancy_reason": { "type": ["string", "null"] },
"triggers": {
"type": "array",
"items": {
"oneOf": [
{ "type": "object", "required": ["keyword"], "properties": { "keyword": { "type": "string" }, "weight": { "type": "number", "minimum": 0, "maximum": 1 } }, "additionalProperties": false },
{ "type": "object", "required": ["classification"], "properties": { "classification": { "type": "string" }, "weight": { "type": "number", "minimum": 0, "maximum": 1 } }, "additionalProperties": false },
{ "type": "object", "required": ["file_pattern"], "properties": { "file_pattern": { "type": "string" }, "weight": { "type": "number", "minimum": 0, "maximum": 1 } }, "additionalProperties": false }
]
}
},
"boundaries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"adr": { "type": "string", "pattern": "^ADR-\\d{3}$" },
"pair": { "type": "string", "pattern": "^#\\d+$" },
"relation": { "type": "string" },
"role": { "type": "string" }
}
}
},
"chain_membership": {
"type": "array",
"items": { "type": "string", "pattern": "^L\\d+$" }
},
"attributes": { "type": "object" },
"capabilities": { "type": "string", "minLength": 1 }
},
"additionalProperties": false
},
"chain": {
"type": "object",
"required": ["name", "sequence"],
"properties": {
"name": { "type": "string" },
"sequence": { "type": "array", "items": { "type": "string" }, "minItems": 2 },
"triggers": { "type": "array" }
},
"additionalProperties": false
}
}
}