{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cdsl.local/schema/cad.cdsl.design-intent.v1", "title": "CDSL design intent", "type": "object", "properties": { "schema": {"const": "cad.cdsl.design-intent.v1"}, "schema_version": {"const": "1.0"}, "mode": {"enum": ["create", "revise"]}, "request": {"type": "string", "minLength": 1}, "base_revision_id": {"type": "string"}, "structures": {"type": "array", "items": {"$ref": "#/$defs/structure"}}, "feature_order": {"type": "array", "items": {"type": "string", "pattern": "^[A-Za-z0-9_-]{1,80}$"}}, "assumptions": {"type": "array", "items": {"type": "string", "minLength": 1}}, "open_questions": {"type": "array", "items": {"$ref": "#/$defs/openQuestion"}}, "capability_gaps": {"type": "array", "items": {"$ref": "#/$defs/capabilityGap"}}, "verification_expectations": {"type": "array", "items": {"$ref": "#/$defs/verificationExpectation"}}, "status": {"enum": ["ready", "needs_clarification"]}, "intent_id": {"type": "string", "pattern": "^intent_[a-z0-9]{12}$"}, "created_at": {"type": "string", "minLength": 1}, "part_skill_ids": {"type": "array", "items": {"type": "string", "minLength": 1}}, "part_skill_selection": {"type": "object"} }, "required": [ "schema", "schema_version", "mode", "request", "base_revision_id", "structures", "feature_order", "assumptions", "open_questions", "capability_gaps", "verification_expectations", "status" ], "additionalProperties": false, "$defs": { "structure": { "type": "object", "properties": { "id": {"type": "string", "pattern": "^[A-Za-z0-9_-]{1,80}$"}, "cdsl_feature_id": {"type": "string", "pattern": "^[A-Za-z0-9_-]{1,80}$"}, "role": {"enum": ["base", "reference", "additive", "subtractive", "dressup", "pattern"]}, "purpose": {"type": "string", "minLength": 1}, "depends_on": {"type": "array", "items": {"type": "string", "pattern": "^[A-Za-z0-9_-]{1,80}$"}}, "cdsl_strategy": {"$ref": "#/$defs/cdslStrategy"} }, "required": ["id", "cdsl_feature_id", "role", "purpose", "depends_on", "cdsl_strategy"], "additionalProperties": false }, "cdslStrategy": { "type": "object", "properties": { "atomic_id": {"type": "string", "minLength": 1}, "profile_type": {"type": "string", "minLength": 1}, "parameter_roles": {"type": "array", "items": {"type": "string", "minLength": 1}}, "selector_roles": {"type": "array", "items": {"type": "string", "minLength": 1}} }, "required": ["atomic_id", "parameter_roles", "selector_roles"], "additionalProperties": false }, "openQuestion": { "type": "object", "properties": { "id": {"type": "string", "pattern": "^[A-Za-z0-9_-]{1,80}$"}, "question": {"type": "string", "minLength": 1}, "blocking": {"type": "boolean"} }, "required": ["id", "question", "blocking"], "additionalProperties": false }, "capabilityGap": { "type": "object", "properties": { "code": {"type": "string", "pattern": "^[A-Za-z0-9_-]{1,100}$"}, "structure_id": {"type": "string", "pattern": "^[A-Za-z0-9_-]{1,80}$"}, "message": {"type": "string", "minLength": 1}, "blocking": {"type": "boolean"} }, "required": ["code", "structure_id", "message", "blocking"], "additionalProperties": false }, "verificationExpectation": { "oneOf": [ { "type": "object", "properties": { "type": {"const": "feature_count"}, "feature_id": {"type": "string", "pattern": "^[A-Za-z0-9_-]{1,80}$"}, "expected": {"type": "integer", "minimum": 0} }, "required": ["type", "feature_id", "expected"], "additionalProperties": false }, { "type": "object", "properties": {"type": {"const": "symmetry"}, "axis": {"enum": ["x", "y", "z"]}}, "required": ["type", "axis"], "additionalProperties": false }, { "type": "object", "properties": { "type": {"const": "bbox"}, "expected_mm": { "type": "object", "properties": { "x": {"type": "number", "exclusiveMinimum": 0}, "y": {"type": "number", "exclusiveMinimum": 0}, "z": {"type": "number", "exclusiveMinimum": 0} }, "required": ["x", "y", "z"], "additionalProperties": false } }, "required": ["type", "expected_mm"], "additionalProperties": false } ] } } }