{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "connections.schema.json", "title": "Future Map Resolved Connections", "type": "object", "additionalProperties": false, "required": [ "schema_version", "generated_at", "connection_count", "core_section_connection_count", "signal_connection_count", "connections", "signal_backlinks", "core_section_backlinks" ], "properties": { "schema_version": {"const": "1.0"}, "generated_at": {"type": "string", "format": "date-time"}, "connection_count": {"type": "integer", "minimum": 0}, "core_section_connection_count": {"type": "integer", "minimum": 0}, "signal_connection_count": {"type": "integer", "minimum": 0}, "connections": { "type": "array", "items": {"$ref": "#/$defs/connection"} }, "signal_backlinks": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["signal_id", "label", "page_path", "incoming"], "properties": { "signal_id": {"type": "string", "pattern": "^fm-signal-[a-z0-9-]+$"}, "label": {"type": "string", "minLength": 1}, "page_path": {"type": "string", "pattern": "^signals/fm-signal-[a-z0-9-]+\\.md$"}, "incoming": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/backlink"}} } } }, "core_section_backlinks": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["target_id", "document_id", "section_id", "label", "repository_path", "locator", "public_url", "incoming"], "properties": { "target_id": {"type": "string", "minLength": 3}, "document_id": {"type": "string", "minLength": 1}, "section_id": {"type": "string", "minLength": 1}, "label": {"type": "string", "minLength": 1}, "repository_path": {"type": "string", "minLength": 1}, "locator": {"type": ["string", "null"]}, "public_url": {"type": ["string", "null"], "format": "uri"}, "incoming": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/backlink"}} } } } }, "$defs": { "connection": { "type": "object", "additionalProperties": false, "required": [ "connection_id", "source_signal_id", "source_label", "source_page_path", "source_public_url", "target_type", "target_id", "label", "relationship", "relevance", "review_status", "repository_path", "locator", "relative_url", "page_relative_url", "public_url" ], "properties": { "connection_id": {"type": "string", "pattern": "^fm-connection-[a-f0-9]{20}$"}, "source_signal_id": {"type": "string", "pattern": "^fm-signal-[a-z0-9-]+$"}, "source_label": {"type": "string", "minLength": 1}, "source_page_path": {"type": "string", "pattern": "^signals/fm-signal-[a-z0-9-]+\\.md$"}, "source_public_url": {"type": ["string", "null"], "format": "uri"}, "target_type": {"enum": ["signal", "core-section"]}, "target_id": {"type": "string", "minLength": 1}, "document_id": {"type": "string", "minLength": 1}, "section_id": {"type": "string", "minLength": 1}, "label": {"type": "string", "minLength": 1}, "relationship": {"enum": ["supports", "challenges", "updates", "illustrates", "early-warning", "contradicts", "supersedes"]}, "relevance": {"type": "number", "minimum": 0, "maximum": 1}, "review_status": {"enum": ["machine-proposed", "human-approved", "rejected"]}, "repository_path": {"type": "string", "minLength": 1}, "locator": {"type": ["string", "null"]}, "relative_url": {"type": "string", "minLength": 1}, "page_relative_url": {"type": "string", "minLength": 1}, "public_url": {"type": ["string", "null"], "format": "uri"} }, "allOf": [ { "if": {"properties": {"target_type": {"const": "core-section"}}}, "then": {"required": ["document_id", "section_id"]} } ] }, "backlink": { "type": "object", "additionalProperties": false, "required": ["connection_id", "source_signal_id", "source_label", "relationship", "relevance", "source_page_path", "source_public_url"], "properties": { "connection_id": {"type": "string", "pattern": "^fm-connection-[a-f0-9]{20}$"}, "source_signal_id": {"type": "string", "pattern": "^fm-signal-[a-z0-9-]+$"}, "source_label": {"type": "string", "minLength": 1}, "relationship": {"enum": ["supports", "challenges", "updates", "illustrates", "early-warning", "contradicts", "supersedes"]}, "relevance": {"type": "number", "minimum": 0, "maximum": 1}, "source_page_path": {"type": "string", "pattern": "^signals/fm-signal-[a-z0-9-]+\\.md$"}, "source_public_url": {"type": ["string", "null"], "format": "uri"} } } } }