{
  "$schema":"https://json-schema.org/draft/2020-12/schema",
  "$id":"https://brali-lifeos.github.io/contracts/evidence-decision.schema.json",
  "title":"Brali Evidence Decision",
  "description":"Editorial review result for one research candidate. It records what the source can and cannot justify before any public content is changed.",
  "type":"object","additionalProperties":false,
  "required":["schema_version","id","candidate_id","decision","reviewed_at","reviewed_by","source_url","source_title","source_type","source_reviewed","supported_claim","limitations"],
  "properties":{
    "schema_version":{"const":1},
    "id":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},
    "candidate_id":{"type":"string"},
    "decision":{"type":"string","enum":["rejected","watch","support-existing","challenge-existing","propose-hack","propose-protocol"]},
    "reviewed_at":{"type":"string","format":"date"},
    "reviewed_by":{"type":"string","minLength":2},
    "source_url":{"type":"string","format":"uri"},
    "source_title":{"type":"string","minLength":3},
    "source_type":{"type":"string","enum":["primary-study","systematic-review","meta-analysis","guideline","expert-consensus","other"]},
    "doi":{"type":["string","null"]},
    "citation_text":{"type":"string"},
    "source_reviewed":{"type":"boolean","const":true},
    "study_design":{"type":"string"},
    "population":{"type":"string"},
    "intervention_or_exposure":{"type":"string"},
    "outcomes":{"type":"array","items":{"type":"string"}},
    "supported_claim":{"type":"string","minLength":5},
    "unsupported_or_overstated_claims":{"type":"array","items":{"type":"string"}},
    "limitations":{"type":"array","items":{"type":"string"}},
    "target_hack_ids":{"type":"array","items":{"type":"string"},"uniqueItems":true},
    "target_protocol_ids":{"type":"array","items":{"type":"string"},"uniqueItems":true},
    "risk_flags":{"type":"array","items":{"type":"string"},"uniqueItems":true},
    "notes":{"type":"string"}
  }
}
