Files
ai-exchange/legal_content/schemas/rules.schema.json
T

47 lines
1.9 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "ai-exchange/legal_content/rules.schema.json",
"title": "Contract Review Rule Asset",
"type": "object",
"additionalProperties": false,
"required": ["rule_id", "rule_name", "contract_scope", "severity", "risk_description", "review_question", "suggested_fix", "legal_basis", "source"],
"properties": {
"rule_id": {"type": "string", "minLength": 1},
"rule_name": {"type": "string", "minLength": 1},
"contract_scope": {"type": "array", "minItems": 1, "items": {"type": "string"}},
"clause_scope": {"type": "array", "items": {"type": "string"}},
"industry_scope": {"type": "array", "items": {"type": "string"}},
"severity": {"type": "string", "enum": ["low", "medium", "high", "critical"]},
"trigger_pattern": {"type": "array", "items": {"type": "string"}},
"risk_description": {"type": "string", "minLength": 1},
"review_question": {"type": "string", "minLength": 1},
"suggested_fix": {"type": "string", "minLength": 1},
"legal_basis": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["law_ref", "reason"],
"properties": {
"law_ref": {"type": "string", "minLength": 1},
"reason": {"type": "string", "minLength": 1}
}
}
},
"case_refs": {"type": "array", "items": {"type": "string"}},
"fallback_clause_ids": {"type": "array", "items": {"type": "string"}},
"source": {
"type": "object",
"additionalProperties": false,
"required": ["registry_id", "source_type"],
"properties": {
"registry_id": {"type": "string", "minLength": 1},
"source_type": {"type": "string", "enum": ["official_public", "public_editorial", "internal_authored", "customer_authorized"]},
"source_url": {"type": "string"},
"license_note": {"type": "string"}
}
}
}
}