feat: схемы отчёта аудита, профили/пресеты и движок разрешения (BHL-019, BHL-012, BHL-013)
- spec/schemas: evidence, audit-finding, audit-report (BHL-019) - spec/schemas: profile, preset с явным relax_to (BHL-012) - packages/bhl: resolve.ts + bhl profile resolve — порядок не влияет, конфликты параметров и ослаблений, provenance и applicability (BHL-012, BHL-013) - tests: корневые схемы 13/13, пакет 17/17
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://baseline-harness.dev/spec/schemas/audit-finding.schema.json",
|
||||
"title": "Audit Finding",
|
||||
"description": "Проверка одного требования в отчёте аудита (D-005, D-019). Статус аудита не смешивается с уровнем и жизненным циклом требования.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["requirement", "status", "method", "evidence", "rationale"],
|
||||
"properties": {
|
||||
"requirement": { "type": "string", "pattern": "^req-[a-z0-9]+(-[a-z0-9]+)*$" },
|
||||
"status": {
|
||||
"enum": ["PASS", "FAIL", "PARTIAL", "EXEMPT", "NOT_APPLICABLE", "UNKNOWN", "BLOCKED"]
|
||||
},
|
||||
"method": { "enum": ["deterministic", "semantic", "hybrid"] },
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": { "$ref": "https://baseline-harness.dev/spec/schemas/evidence.schema.json" }
|
||||
},
|
||||
"issues": { "type": "array", "items": { "type": "string", "minLength": 3 } },
|
||||
"recommendations": { "type": "array", "items": { "type": "string", "minLength": 3 } },
|
||||
"corrections": { "type": "array", "items": { "type": "string", "minLength": 3 } },
|
||||
"rationale": { "type": "string", "minLength": 10 },
|
||||
"confidence": {
|
||||
"enum": ["high", "medium", "low"],
|
||||
"description": "Уверенность семантической проверки; для deterministic не требуется."
|
||||
},
|
||||
"exemption_ref": {
|
||||
"type": "string",
|
||||
"minLength": 3,
|
||||
"description": "Ссылка на утверждённое исключение при status EXEMPT."
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": { "properties": { "status": { "const": "EXEMPT" } }, "required": ["status"] },
|
||||
"then": {
|
||||
"required": ["exemption_ref"],
|
||||
"properties": { "exemption_ref": { "type": "string", "minLength": 3 } }
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": { "properties": { "method": { "const": "semantic" } }, "required": ["method"] },
|
||||
"then": {
|
||||
"required": ["confidence"],
|
||||
"properties": { "confidence": { "enum": ["high", "medium", "low"] } }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user