feat: синтетическая спецификация для сквозных прогонов (BHL-018)

- examples/synthetic-spec: полный набор сущностей, профилей, пресета и антипаттерна
- bhl validate и profile resolve проходят пример без диагностик
- тест сверяет копию схем с spec/schemas и порядок разрешения
- README карты лаборатории дополнен spec/ и examples/
This commit is contained in:
Suslov-MD
2026-11-29 00:06:36 +03:00
parent 3aa8c6f944
commit c50092f7e4
28 changed files with 929 additions and 7 deletions
@@ -0,0 +1,62 @@
{
"$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 }
}
}