{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"$id": "amber/projection.schema.json",
	"title": "Amber Projection Manifest",
	"description": "A rebuildable read-only projection manifest. Projections (Governance Graph, Governed Knowledge Base, Visualization Workbench) are derived from canonical Amber artifacts and are never canonical authority. Field names follow ADR-0012 amendment E: projection_type, projection_version, rebuild_checkpoint, plus the four ADR-0012 versioning fields (amber_protocol_version, artifact_sequence, created_at, artifact_type). See ADR-0019 D5 and the distributed-governance baseline.",
	"type": "object",
	"required": [
		"schemaVersion",
		"projectionId",
		"projection_type",
		"projection_version",
		"rebuild_checkpoint",
		"sourceHash",
		"outputHash"
	],
	"additionalProperties": false,
	"properties": {
		"schemaVersion": {
			"type": "string",
			"const": "1.0.0",
			"description": "Projection manifest schema version."
		},
		"projectionId": {
			"type": "string",
			"pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]$",
			"description": "Stable kebab-case identifier for this projection instance."
		},
		"projection_type": {
			"type": "string",
			"enum": ["governance-graph", "knowledge-base", "visualization-workbench"],
			"description": "Projection kind. Reserved by ADR-0012 amendment E."
		},
		"projection_version": {
			"type": "integer",
			"minimum": 1,
			"description": "Projection schema version. Bump on breaking output-shape changes. Reserved by ADR-0012 amendment E."
		},
		"rebuild_checkpoint": {
			"type": "string",
			"minLength": 1,
			"description": "Deterministic anchor identifying the canonical state this projection was built from. Reserved by ADR-0012 amendment E."
		},
		"sourceHash": {
			"type": "string",
			"pattern": "^sha256:[0-9a-f]{64}$",
			"description": "Hash of the canonical artifacts this projection was built from."
		},
		"outputHash": {
			"type": "string",
			"pattern": "^sha256:[0-9a-f]{64}$",
			"description": "Hash of the projection output, for drift detection."
		},
		"rebuiltAt": {
			"type": "string",
			"format": "date-time",
			"description": "When the projection was last rebuilt."
		},
		"amber_protocol_version": {
			"type": "string",
			"description": "ADR-0012 versioning field: the Amber package version that produced or last touched this artifact. Optional."
		},
		"artifact_sequence": {
			"type": "integer",
			"minimum": 0,
			"description": "ADR-0012 versioning field: monotonically-increasing sequence number within the artifact's identity scope. Optional."
		},
		"created_at": {
			"type": "string",
			"format": "date-time",
			"description": "ADR-0012 versioning field: ISO 8601 timestamp of first creation. Optional."
		},
		"artifact_type": {
			"type": "string",
			"description": "ADR-0012 versioning field: stable discriminant, e.g. \"projection-manifest\". Optional."
		}
	}
}
