- examples/synthetic-spec: полный набор сущностей, профилей, пресета и антипаттерна - bhl validate и profile resolve проходят пример без диагностик - тест сверяет копию схем с spec/schemas и порядок разрешения - README карты лаборатории дополнен spec/ и examples/
63 lines
2.5 KiB
JSON
63 lines
2.5 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://baseline-harness.dev/spec/schemas/antipattern.schema.json",
|
|
"title": "Antipattern",
|
|
"description": "Нормативный антипаттерн с историей отказов (D-004). Нормативный уровень (level) и жизненный цикл (lifecycle) — разные enum (D-029); связи с требованиями и происхождение из материалов библиотеки обязательны.",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "title", "description", "level", "lifecycle", "relations", "sources"],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^ant-[a-z0-9]+(-[a-z0-9]+)*$",
|
|
"description": "Постоянный идентификатор (D-031)."
|
|
},
|
|
"title": { "type": "string", "minLength": 3, "maxLength": 120 },
|
|
"description": { "type": "string", "minLength": 10 },
|
|
"level": {
|
|
"enum": ["SHOULD NOT", "MUST NOT"],
|
|
"description": "Нормативная сила запрета; не смешивается с жизненным циклом."
|
|
},
|
|
"lifecycle": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["status"],
|
|
"properties": {
|
|
"status": {
|
|
"enum": ["proposed", "discouraged", "forbidden", "deprecated", "removed"],
|
|
"description": "Путь антипаттерна: proposed → discouraged → forbidden; deprecated → removed. Не нормативный уровень."
|
|
},
|
|
"since": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
|
|
"note": { "type": "string", "minLength": 3 }
|
|
}
|
|
},
|
|
"relations": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["target", "kind"],
|
|
"properties": {
|
|
"target": { "type": "string", "pattern": "^req-[a-z0-9]+(-[a-z0-9]+)*$" },
|
|
"kind": { "enum": ["contradicts"] }
|
|
}
|
|
}
|
|
},
|
|
"sources": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["material"],
|
|
"properties": {
|
|
"material": { "type": "string", "minLength": 3 },
|
|
"note": { "type": "string", "minLength": 3 }
|
|
}
|
|
}
|
|
},
|
|
"note": { "type": "string", "minLength": 3 }
|
|
}
|
|
}
|