feat: схемы Project Exception и Project Manifest (BHL-014)
- project-exception: область, причина, decision_ref владельца, условие пересмотра; kind path требует paths; status отдельно от жизненного цикла требования - project-manifest: spec_version, профили/пресеты, проектный слой параметров, вложенные исключения; additionalProperties:false — не второй источник конфигурации - корневые тесты схем: 17/17
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://baseline-harness.dev/spec/schemas/project-exception.schema.json",
|
||||
"title": "Project Exception",
|
||||
"description": "Документированное обоснованное исключение, утверждаемое владельцем (D-002, D-008). Отличие от N/A: N/A — требование неприменимо, EXEMPT — применимо, но снято обоснованным решением. Не проходит: исключение без области, причины, ссылки на решение владельца или условия пересмотра.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["id", "requirement", "scope", "reason", "decision_ref", "review_condition"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^ex-[a-z0-9]+(-[a-z0-9]+)*$",
|
||||
"description": "Постоянный идентификатор (D-031)."
|
||||
},
|
||||
"requirement": { "type": "string", "pattern": "^req-[a-z0-9]+(-[a-z0-9]+)*$" },
|
||||
"scope": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["kind", "description"],
|
||||
"properties": {
|
||||
"kind": { "enum": ["path", "capability", "tool", "other"] },
|
||||
"paths": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
|
||||
"description": { "type": "string", "minLength": 10 }
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": { "properties": { "kind": { "const": "path" } }, "required": ["kind"] },
|
||||
"then": { "required": ["paths"], "properties": { "paths": true } }
|
||||
}
|
||||
]
|
||||
},
|
||||
"reason": { "type": "string", "minLength": 10 },
|
||||
"decision_ref": {
|
||||
"type": "string",
|
||||
"minLength": 3,
|
||||
"description": "Ссылка на утверждённое решение владельца (например, решение Backlog D-0xx). Без неё исключение неутверждённое."
|
||||
},
|
||||
"review_condition": { "type": "string", "minLength": 3 },
|
||||
"expires": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
|
||||
"status": {
|
||||
"enum": ["active", "revoked", "expired"],
|
||||
"default": "active",
|
||||
"description": "Состояние исключения; не смешивается с жизненным циклом требования."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://baseline-harness.dev/spec/schemas/project-manifest.schema.json",
|
||||
"title": "Project Manifest",
|
||||
"description": "Источник истины о подключении проекта к спецификации (D-008): версия спецификации, выбранные профили/пресеты, проектный слой параметров и исключения. Манифест не переопределяет требования и не дублирует реестр проектов; независимо редактируемые копии конфигурации запрещены — проектные значения живут только здесь.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["project", "spec_version", "profiles"],
|
||||
"properties": {
|
||||
"project": { "type": "string", "minLength": 1 },
|
||||
"spec_version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$" },
|
||||
"profiles": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"uniqueItems": true,
|
||||
"items": { "type": "string", "pattern": "^prof-[a-z0-9]+(-[a-z0-9]+)*$" }
|
||||
},
|
||||
"presets": {
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": { "type": "string", "pattern": "^preset-[a-z0-9]+(-[a-z0-9]+)*$" }
|
||||
},
|
||||
"parameter_overrides": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["parameter", "value"],
|
||||
"properties": {
|
||||
"parameter": { "type": "string", "pattern": "^param-[a-z0-9]+(-[a-z0-9]+)*$" },
|
||||
"value": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"exceptions": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "https://baseline-harness.dev/spec/schemas/project-exception.schema.json" }
|
||||
},
|
||||
"note": { "type": "string", "minLength": 3 }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user