{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://local.invalid/schemas/board_viewer_annotations.schema.json", "title": "Board viewer curated annotations", "type": "object", "additionalProperties": false, "required": [ "schema", "board_id", "connector_profiles", "touchpoints", "interfaces", "photo_overlay" ], "properties": { "schema": { "const": "board-viewer-annotations-v1" }, "board_id": { "type": "string", "minLength": 1 }, "io_evidence_policy": { "$ref": "#/$defs/ioEvidencePolicy" }, "historical_note": { "type": "string", "minLength": 1 }, "connector_profiles": { "type": "object", "additionalProperties": { "$ref": "#/$defs/connectorProfile" } }, "annotation_templates": { "type": "object", "additionalProperties": { "$ref": "#/$defs/touchpointAnnotation" } }, "template_instances": { "type": "object", "additionalProperties": { "$ref": "#/$defs/templateInstance" } }, "touchpoints": { "type": "object", "additionalProperties": { "$ref": "#/$defs/touchpointAnnotation" } }, "interfaces": { "type": "array", "items": { "$ref": "#/$defs/interface" } }, "photo_overlay": { "oneOf": [ { "type": "null" }, { "$ref": "#/$defs/photoOverlay" } ] }, "evidence_conflicts": { "type": "array", "items": { "type": "object", "additionalProperties": true, "required": [ "id", "subject_reference", "status", "kind", "primary_source", "summary", "claims" ], "properties": { "id": { "type": "string", "minLength": 1 }, "subject_reference": { "type": "string", "pattern": "^R[0-9]+$" }, "status": { "enum": [ "unresolved", "resolved", "info" ] }, "kind": { "type": "string", "minLength": 1 }, "primary_source": { "type": "string", "minLength": 1 }, "summary": { "type": "string", "minLength": 1 }, "claims": { "type": "array", "minItems": 1 } } } }, "resistor_links": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "source_pin_id", "resistor_reference", "pad_number", "claimed_net", "evidence_source" ], "properties": { "source_pin_id": { "type": "string" }, "resistor_reference": { "type": "string", "pattern": "^R[0-9]+$" }, "pad_number": { "type": [ "string", "integer" ] }, "claimed_net": { "type": "string", "minLength": 1 }, "evidence_source": { "type": "string", "minLength": 1 }, "note": { "type": "string" } } } } }, "$defs": { "evidenceTier": { "enum": [ "board_database", "cross_verified", "name_inferred", "unknown" ] }, "ioEvidenceGradePhysical": { "enum": [ "confirmed_by_brd", "inferred", "blocked", "not_applicable", "unknown" ] }, "ioEvidenceGradePolarity": { "enum": [ "confirmed_by_electrical_staff", "inferred", "blocked", "not_applicable", "unknown" ] }, "ioEvidenceGradeMeasurement": { "enum": [ "not_run", "pass", "fail", "blocked", "not_applicable", "unknown" ] }, "ioEvidenceGrades": { "type": "object", "additionalProperties": false, "required": [ "physical_path", "product_polarity", "hardware_measurement" ], "properties": { "physical_path": { "$ref": "#/$defs/ioEvidenceGradePhysical" }, "product_polarity": { "$ref": "#/$defs/ioEvidenceGradePolarity" }, "hardware_measurement": { "$ref": "#/$defs/ioEvidenceGradeMeasurement" } } }, "ioEvidencePolicy": { "type": "object", "additionalProperties": false, "required": [ "authoritative_order", "physical_path", "product_polarity", "hardware_measurement", "matrix_doc" ], "properties": { "authoritative_order": { "type": "array", "minItems": 3, "items": { "type": "string", "minLength": 1 } }, "physical_path": { "type": "string", "minLength": 1 }, "product_polarity": { "type": "string", "minLength": 1 }, "hardware_measurement": { "type": "string", "minLength": 1 }, "matrix_doc": { "type": "string", "minLength": 1 }, "historical_schematic_side_evidence": { "type": "string", "minLength": 1 }, "v1_2_schematic_pdf": { "type": "string", "minLength": 1 }, "must_not_override_connectors": { "type": "array", "items": { "type": "string", "minLength": 1 } } } }, "touchpointAnnotation": { "type": "object", "additionalProperties": false, "required": [ "summary", "pins" ], "properties": { "summary": { "type": "string", "minLength": 1 }, "pins": { "type": "object", "additionalProperties": { "$ref": "#/$defs/pinAnnotation" } } } }, "templateInstance": { "type": "object", "additionalProperties": false, "required": [ "template", "variables" ], "properties": { "template": { "type": "string", "minLength": 1 }, "variables": { "type": "object", "additionalProperties": { "type": "string" } } } }, "connectorProfile": { "type": "object", "additionalProperties": false, "required": [ "references", "contact_pins", "shield_pads", "evidence_tier", "sources" ], "properties": { "component_value": { "type": "string" }, "references": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "pattern": "^(CON|J|PL)[0-9]+$" } }, "contact_pins": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }, "shield_pads": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }, "evidence_tier": { "$ref": "#/$defs/evidenceTier" }, "sources": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } } } }, "pinAnnotation": { "type": "object", "additionalProperties": false, "required": [ "summary", "path", "evidence_tier", "sources" ], "properties": { "summary": { "type": "string", "minLength": 1 }, "path": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "evidence_tier": { "$ref": "#/$defs/evidenceTier" }, "sources": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "direction": { "enum": [ "input", "output", "bidirectional", "passive", "unknown" ] }, "external_level": { "type": "string", "minLength": 1 }, "function_category": { "type": "string", "minLength": 1 }, "reserved": { "type": "boolean" }, "fixed_load_conflict": { "type": "boolean" }, "board_pull": { "type": [ "string", "null" ] }, "adc_pulltype": { "type": [ "string", "null" ], "pattern": "^[A-Z][A-Z0-9_]*$" }, "active_level": { "type": "string", "minLength": 1 }, "polarity": { "type": "string", "minLength": 1 }, "evidence_grades": { "$ref": "#/$defs/ioEvidenceGrades" }, "external_components": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "fpga": { "$ref": "#/$defs/fpgaAnnotation" }, "mcu": { "$ref": "#/$defs/mcuAnnotation" }, "programming": { "$ref": "#/$defs/programmingAnnotation" } } }, "fpgaAnnotation": { "type": "object", "additionalProperties": false, "required": [ "ball", "board_signal", "io_standard", "capabilities", "evidence_tier", "sources" ], "properties": { "ball": { "type": "string", "minLength": 1 }, "board_signal": { "type": "string", "minLength": 1 }, "io_standard": { "type": "string", "minLength": 1 }, "capabilities": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "evidence_tier": { "$ref": "#/$defs/evidenceTier" }, "sources": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } } } }, "mcuAnnotation": { "type": "object", "additionalProperties": false, "required": [ "device", "family", "pin", "signal", "capabilities", "evidence_tier", "sources" ], "properties": { "device": { "type": "string", "minLength": 1 }, "family": { "type": "string", "minLength": 1 }, "pin": { "type": "string", "minLength": 1 }, "signal": { "type": "string", "minLength": 1 }, "capabilities": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "evidence_tier": { "$ref": "#/$defs/evidenceTier" }, "sources": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } } } }, "programmingAnnotation": { "type": "object", "additionalProperties": false, "required": [ "evidence_tier", "sources" ], "properties": { "status": { "enum": [ "verified_fpga", "verified_mcu", "board_only", "not_programmable", "unknown" ] }, "conclusion": { "type": "string", "minLength": 1 }, "network_explanation": { "type": "string", "minLength": 1 }, "hdl_guidance": { "type": "string", "minLength": 1 }, "connection_guidance": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, "constraints": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "risks": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "evidence_tier": { "$ref": "#/$defs/evidenceTier" }, "sources": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } } } }, "interface": { "type": "object", "additionalProperties": false, "required": [ "id", "name", "touchpoint", "pins", "external_level", "evidence_tier", "sources" ], "properties": { "id": { "type": "string", "pattern": "^[a-z0-9-]+$" }, "name": { "type": "string", "minLength": 1 }, "touchpoint": { "type": "string", "pattern": "^(CON|J|PL|TP)[0-9]+$" }, "pins": { "type": "array", "minItems": 1, "items": { "type": "string" } }, "external_level": { "type": "string", "minLength": 1 }, "evidence_tier": { "$ref": "#/$defs/evidenceTier" }, "sources": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } } } }, "photoOverlay": { "type": "object", "additionalProperties": false, "required": [ "path", "sha256", "control_points" ], "properties": { "path": { "type": "string", "minLength": 1 }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "control_points": { "type": "array", "minItems": 3, "items": { "type": "object", "additionalProperties": false, "required": [ "image", "board" ], "properties": { "image": { "$ref": "#/$defs/point" }, "board": { "$ref": "#/$defs/point" } } } } } }, "point": { "type": "object", "additionalProperties": false, "required": [ "x", "y" ], "properties": { "x": { "type": "number" }, "y": { "type": "number" } } } } }