{
    "$defs": {
        "Case": {
            "additionalProperties": false,
            "description": "One work order. Private overlay only.",
            "properties": {
                "aliases": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "claims": {
                    "items": {
                        "$ref": "#/$defs/Claim"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "close_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "diagnosis": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "exact_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "fix": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "observed": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "outcome": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "status": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/RecordStatus"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "type": {
                    "enum": [
                        "Case"
                    ],
                    "type": "string"
                }
            },
            "required": [
                "id",
                "type",
                "name"
            ],
            "title": "Case",
            "type": "object"
        },
        "Citation": {
            "additionalProperties": false,
            "description": "A pointer to one evidence unit: source, locator, and the first 12 hex characters of the unit's content hash, so a revised source can never silently re-point the citation at different text.",
            "properties": {
                "h": {
                    "description": "First 12 hex characters of the cited unit's content hash (from the evidence layer).",
                    "pattern": "^[0-9a-f]{12}$",
                    "type": "string"
                },
                "loc": {
                    "pattern": "^(sec=[0-9A-Za-z][0-9A-Za-z.]*|p=[0-9]+|tbl=[0-9]+(\\.r[0-9]+)?|fig=[0-9]+|t=[0-9]{1,3}:[0-5][0-9]-[0-9]{1,3}:[0-5][0-9])$",
                    "type": "string"
                },
                "src": {
                    "description": "The cited Source record. Its IRI is kb:cites_source because kb:src is the Source namespace. Record YAML keeps the key `src`.",
                    "type": "string"
                }
            },
            "required": [
                "src",
                "loc",
                "h"
            ],
            "title": "Citation",
            "type": "object"
        },
        "Claim": {
            "additionalProperties": false,
            "description": "One relation or quantity, with citations and review state.",
            "properties": {
                "attr": {
                    "pattern": "^[a-z][a-z0-9_]*$",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "by": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "cite": {
                    "items": {
                        "$ref": "#/$defs/Citation"
                    },
                    "minItems": 1,
                    "type": "array"
                },
                "claim_id": {
                    "pattern": "^c[0-9]+$",
                    "type": "string"
                },
                "conditions": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "conflicts_with": {
                    "items": {
                        "pattern": "^[a-z]+:[a-z0-9-]+#c[0-9]+$",
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "keep": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/KeepState"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "note": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "quote": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "rel": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/Relation"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "review": {
                    "$ref": "#/$defs/ReviewState"
                },
                "review_note": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "superseded_by": {
                    "pattern": "^[a-z]+:[a-z0-9-]+#c[0-9]+$",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "target": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "valid_from": {
                    "format": "date",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "valid_to": {
                    "format": "date",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "value": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/QuantityValue"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "verified_at": {
                    "format": "date",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "verified_by": {
                    "type": [
                        "string",
                        "null"
                    ]
                }
            },
            "required": [
                "claim_id",
                "cite",
                "review"
            ],
            "title": "Claim",
            "type": "object"
        },
        "Component": {
            "additionalProperties": false,
            "description": "A physical part of a PV system.",
            "properties": {
                "aliases": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "claims": {
                    "items": {
                        "$ref": "#/$defs/Claim"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "close_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "exact_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "status": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/RecordStatus"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "type": {
                    "enum": [
                        "Component"
                    ],
                    "type": "string"
                }
            },
            "required": [
                "id",
                "type",
                "name"
            ],
            "title": "Component",
            "type": "object"
        },
        "DataExample": {
            "additionalProperties": false,
            "description": "Reserved. A labeled monitoring/register data window for ML training.",
            "properties": {
                "aliases": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "anonymized": {
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "claims": {
                    "items": {
                        "$ref": "#/$defs/Claim"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "close_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "dataset": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "exact_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "id": {
                    "type": "string"
                },
                "label": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "labeler": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "name": {
                    "type": "string"
                },
                "status": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/RecordStatus"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "type": {
                    "enum": [
                        "DataExample"
                    ],
                    "type": "string"
                },
                "window": {
                    "type": [
                        "string",
                        "null"
                    ]
                }
            },
            "required": [
                "id",
                "type",
                "name"
            ],
            "title": "DataExample",
            "type": "object"
        },
        "DetectionMethod": {
            "additionalProperties": false,
            "description": "How a cause is confirmed.",
            "properties": {
                "aliases": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "claims": {
                    "items": {
                        "$ref": "#/$defs/Claim"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "close_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "exact_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "status": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/RecordStatus"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "tool_ids": {
                    "description": "IDs of deterministic tools (sub-project 2).",
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "type": {
                    "enum": [
                        "DetectionMethod"
                    ],
                    "type": "string"
                }
            },
            "required": [
                "id",
                "type",
                "name"
            ],
            "title": "DetectionMethod",
            "type": "object"
        },
        "FailureMode": {
            "additionalProperties": false,
            "description": "What went wrong.",
            "properties": {
                "aliases": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "claims": {
                    "items": {
                        "$ref": "#/$defs/Claim"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "close_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "exact_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "status": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/RecordStatus"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "type": {
                    "enum": [
                        "FailureMode"
                    ],
                    "type": "string"
                }
            },
            "required": [
                "id",
                "type",
                "name"
            ],
            "title": "FailureMode",
            "type": "object"
        },
        "KeepState": {
            "description": "",
            "enum": [
                "drafted"
            ],
            "title": "KeepState",
            "type": "string"
        },
        "Measurement": {
            "additionalProperties": false,
            "description": "The data signature of a symptom.",
            "properties": {
                "aliases": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "claims": {
                    "items": {
                        "$ref": "#/$defs/Claim"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "close_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "exact_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "signals": {
                    "items": {
                        "$ref": "#/$defs/Signal"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "status": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/RecordStatus"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "type": {
                    "enum": [
                        "Measurement"
                    ],
                    "type": "string"
                }
            },
            "required": [
                "id",
                "type",
                "name"
            ],
            "title": "Measurement",
            "type": "object"
        },
        "Mitigation": {
            "additionalProperties": false,
            "description": "A corrective or preventive action.",
            "properties": {
                "aliases": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "claims": {
                    "items": {
                        "$ref": "#/$defs/Claim"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "close_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "exact_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "status": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/RecordStatus"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "type": {
                    "enum": [
                        "Mitigation"
                    ],
                    "type": "string"
                }
            },
            "required": [
                "id",
                "type",
                "name"
            ],
            "title": "Mitigation",
            "type": "object"
        },
        "QuantityValue": {
            "additionalProperties": false,
            "description": "",
            "properties": {
                "max": {
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "min": {
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "nominal": {
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "unit": {
                    "pattern": "^unit:[A-Za-z0-9_-]+$",
                    "type": "string"
                }
            },
            "required": [
                "unit"
            ],
            "title": "QuantityValue",
            "type": "object"
        },
        "Record": {
            "additionalProperties": false,
            "description": "Common fields of every knowledge record.",
            "properties": {
                "aliases": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "claims": {
                    "items": {
                        "$ref": "#/$defs/Claim"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "close_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "exact_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "status": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/RecordStatus"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "type": {
                    "enum": [
                        "Record"
                    ],
                    "type": "string"
                }
            },
            "required": [
                "id",
                "type",
                "name"
            ],
            "title": "Record",
            "type": "object"
        },
        "RecordStatus": {
            "description": "",
            "enum": [
                "proposed",
                "active"
            ],
            "title": "RecordStatus",
            "type": "string"
        },
        "Relation": {
            "description": "",
            "enum": [
                "caused_by",
                "affects",
                "presents_as",
                "observed_as",
                "produces",
                "detected_by",
                "mitigated_by",
                "leads_to",
                "distinguished_from"
            ],
            "title": "Relation",
            "type": "string"
        },
        "ReviewState": {
            "description": "",
            "enum": [
                "drafted",
                "verified",
                "disputed"
            ],
            "title": "ReviewState",
            "type": "string"
        },
        "Signal": {
            "additionalProperties": false,
            "description": "A monitoring channel named by SunSpec model point.",
            "properties": {
                "pattern": {
                    "type": "string"
                },
                "point": {
                    "pattern": "^model_[0-9]+\\.[A-Za-z0-9_]+$",
                    "type": "string"
                },
                "unit": {
                    "pattern": "^unit:[A-Za-z0-9_-]+$",
                    "type": [
                        "string",
                        "null"
                    ]
                }
            },
            "required": [
                "point",
                "pattern"
            ],
            "title": "Signal",
            "type": "object"
        },
        "Source": {
            "additionalProperties": false,
            "description": "A bibliographic source; doubles as its public manifest entry.",
            "properties": {
                "aliases": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "claims": {
                    "items": {
                        "$ref": "#/$defs/Claim"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "close_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "collection": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "edition_or_date": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "exact_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "id": {
                    "type": "string"
                },
                "license": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "name": {
                    "type": "string"
                },
                "origin_url": {
                    "format": "uri",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "publisher": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "sha256": {
                    "pattern": "^[0-9a-f]{64}$",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "status": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/RecordStatus"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "tdm_ok": {
                    "$ref": "#/$defs/TdmOk"
                },
                "tier": {
                    "$ref": "#/$defs/SourceTier"
                },
                "type": {
                    "enum": [
                        "Source"
                    ],
                    "type": "string"
                }
            },
            "required": [
                "tier",
                "tdm_ok",
                "id",
                "type",
                "name"
            ],
            "title": "Source",
            "type": "object"
        },
        "SourceTier": {
            "description": "",
            "enum": [
                "open",
                "reference",
                "private"
            ],
            "title": "SourceTier",
            "type": "string"
        },
        "Stressor": {
            "additionalProperties": false,
            "description": "Why it went wrong (environmental, electrical, mechanical, workmanship).",
            "properties": {
                "aliases": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "claims": {
                    "items": {
                        "$ref": "#/$defs/Claim"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "close_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "exact_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "status": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/RecordStatus"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "type": {
                    "enum": [
                        "Stressor"
                    ],
                    "type": "string"
                }
            },
            "required": [
                "id",
                "type",
                "name"
            ],
            "title": "Stressor",
            "type": "object"
        },
        "Symptom": {
            "additionalProperties": false,
            "description": "An observable condition.",
            "properties": {
                "aliases": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "claims": {
                    "items": {
                        "$ref": "#/$defs/Claim"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "close_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "exact_mappings": {
                    "items": {
                        "type": "string"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "status": {
                    "anyOf": [
                        {
                            "$ref": "#/$defs/RecordStatus"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "type": {
                    "enum": [
                        "Symptom"
                    ],
                    "type": "string"
                }
            },
            "required": [
                "id",
                "type",
                "name"
            ],
            "title": "Symptom",
            "type": "object"
        },
        "TdmOk": {
            "description": "",
            "enum": [
                "yes",
                "no",
                "unknown"
            ],
            "title": "TdmOk",
            "type": "string"
        }
    },
    "$id": "https://solarlattice.org/kb/schema",
    "$schema": "https://json-schema.org/draft/2019-09/schema",
    "additionalProperties": true,
    "metamodel_version": "1.12.0",
    "title": "solar_kb",
    "type": "object",
    "version": "0.3.0"
}
