Three knowledge layers with promotion logic, platform-neutral canonical content with thin adapters, MCP gateway as the vendor bridge, two enrichment paths. Schemas encode the trust boundary (customer/project forbidden in layer 1). Neutrality audit: clean (D9). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PDKeXvpT6tENSvyQGLV1Uq
55 lines
2.1 KiB
JSON
55 lines
2.1 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://zeiterfassung.cloud/skillfactor/schemas/lesson.schema.json",
|
|
"title": "SkillFactor lesson frontmatter (layers 1/2/3)",
|
|
"type": "object",
|
|
"required": ["profession", "competences", "date", "source", "status", "layer"],
|
|
"properties": {
|
|
"layer": { "enum": [1, 2, 3] },
|
|
"profession": { "type": "string", "pattern": "^[a-z0-9-]+$" },
|
|
"competences": {
|
|
"type": "array", "minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["esco_uri"],
|
|
"properties": {
|
|
"esco_uri": { "type": "string", "pattern": "^http://data\\.europa\\.eu/esco/(skill|occupation)/" },
|
|
"onet_soc": { "type": "string", "pattern": "^\\d{2}-\\d{4}\\.\\d{2}$" }
|
|
}
|
|
}
|
|
},
|
|
"customer": { "type": "string", "pattern": "^[a-z0-9-]+$",
|
|
"$comment": "layer 3 only; forbidden in layer 1" },
|
|
"project": { "type": "string", "pattern": "^[a-z0-9-]+$",
|
|
"$comment": "layer 3 only; forbidden in layer 1" },
|
|
"contributor": { "type": "string",
|
|
"$comment": "role or handle; never a clear name toward layer 1" },
|
|
"date": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
|
|
"source": { "enum": ["conversation", "m365-mail", "m365-chat",
|
|
"m365-transcript", "promotion"] },
|
|
"confidence": { "enum": ["high", "medium", "low"] },
|
|
"status": { "enum": ["proposed", "accepted", "promoted"] },
|
|
"source_refs": {
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"$comment": "opaque audit references (e.g. m365:msg:<id>, chat session id); never content"
|
|
},
|
|
"promoted_from": { "type": "string",
|
|
"$comment": "path of the origin lesson when status=promoted" }
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": { "properties": { "layer": { "const": 3 } } },
|
|
"then": { "required": ["customer", "project"] }
|
|
},
|
|
{
|
|
"if": { "properties": { "layer": { "const": 1 } } },
|
|
"then": {
|
|
"not": { "anyOf": [ { "required": ["customer"] },
|
|
{ "required": ["project"] } ] }
|
|
}
|
|
}
|
|
],
|
|
"additionalProperties": true
|
|
}
|