| { |
| "$schema": "https://json-schema.org/draft/2020-12/schema", |
| "$id": "feasibility.schema.v0.2", |
| "title": "FeasibilityReport", |
| "type": "object", |
| "additionalProperties": false, |
| "required": [ |
| "edge_id", "judged_at", "metadata_version", |
| "is_runnable", "blockers", "warnings", |
| "x_mapping", "y_mapping", "z_summary" |
| ], |
| "allOf": [ |
| { |
| "description": "02 §10 invariant: is_runnable=false ⇒ blockers MUST be non-empty (a not-runnable edge always carries at least one failure code).", |
| "if": {"properties": {"is_runnable": {"const": false}}}, |
| "then": {"properties": {"blockers": {"minItems": 1}}} |
| } |
| ], |
| "properties": { |
| "edge_id": {"type": "string"}, |
| "judged_at": {"type": "string"}, |
| "metadata_version": { |
| "type": "string", |
| "description": "v7 field index version, e.g. 'v7-2026-05'. Renamed from v3_field_index_version (the v3 referred to legacy dataset; switched to v7)." |
| }, |
|
|
| "is_runnable": {"type": "boolean"}, |
| "blockers": {"type": "array", "items": {"type": "string"}}, |
| "warnings": {"type": "array", "items": {"type": "string"}}, |
|
|
| "x_mapping": {"$ref": "#/$defs/role_mapping_check"}, |
| "y_mapping": {"$ref": "#/$defs/role_mapping_check"}, |
|
|
| "z_summary": { |
| "type": "object", |
| "additionalProperties": false, |
| "required": ["n_total", "n_mapped", "n_fuzzy", "n_unmapped"], |
| "description": "n_mapped + n_fuzzy + n_unmapped must equal n_total. Counts follow 02 §7.2 fuzzy/unmapped split rule by reason.", |
| "properties": { |
| "n_total": {"type": "integer"}, |
| "n_mapped": {"type": "integer"}, |
| "n_fuzzy": {"type": "integer"}, |
| "n_unmapped": {"type": "integer"} |
| } |
| }, |
|
|
| "inferred_equation_type": {"type": ["string", "null"]}, |
| "candidate_estimator": {"type": ["string", "null"]}, |
| "reasoning": {"type": "string"}, |
| "data_gap": { |
| "anyOf": [ |
| {"type": "null"}, |
| { |
| "type": "object", |
| "additionalProperties": false, |
| "required": ["x_concept", "x_reason", "y_concept", "y_reason"], |
| "properties": { |
| "x_concept": {"type": "string"}, |
| "x_reason": {"type": "string"}, |
| "y_concept": {"type": "string"}, |
| "y_reason": {"type": "string"}, |
| "recommended_v7_extensions": { |
| "type": "array", |
| "items": {"type": "string"}, |
| "description": "Renamed from recommended_v3_extensions; this references HPP field index extensions consistent with v7 dataset naming." |
| } |
| } |
| } |
| ] |
| }, |
| "longitudinal": { |
| "description": "Additive E3-longitudinal substrate (independent of inferred_equation_type). null when no role resolves to v7. status 'ok' (>=2 research_stage timepoints) signals the planner that a within-subject change / longitudinal dose_response is runnable.", |
| "anyOf": [ |
| {"type": "null"}, |
| { |
| "type": "object", |
| "additionalProperties": false, |
| "required": ["equation_type", "timepoints", "n_timepoints", "status"], |
| "properties": { |
| "equation_type": {"const": "E3-longitudinal"}, |
| "timepoints": {"type": "array", "items": {"type": "string"}}, |
| "n_timepoints": {"type": "integer"}, |
| "candidate_estimator": {"type": ["string", "null"], "enum": ["e3_change", "e3_lmm", null]}, |
| "status": {"type": "string", "enum": ["ok", "degraded", "not_runnable"]}, |
| "missing": {"type": "array", "items": {"type": "string"}} |
| } |
| } |
| ] |
| } |
| }, |
| "$defs": { |
| "role_mapping_check": { |
| "type": "object", |
| "additionalProperties": false, |
| "required": ["status", "dataset", "field", "exists_in_v7", "is_container", "value_filter_required"], |
| "properties": { |
| "status": { |
| "type": ["string", "null"], |
| "enum": ["exact", "close", "tentative", "missing", null], |
| "description": "02 §7.2 mapping status. {exact,close,tentative} are mappable; 'missing'/null fail V1." |
| }, |
| "dataset": {"type": ["string", "null"]}, |
| "field": {"type": ["string", "null"]}, |
| "exists_in_v7": { |
| "type": "boolean", |
| "description": "Renamed from exists_in_v3; verifies dataset.field exists in pseudo_dataset_v8." |
| }, |
| "is_container": {"type": "boolean"}, |
| "value_filter_required": {"type": "boolean"}, |
| "value_filter_present": {"type": ["boolean", "null"]}, |
| "inferred_value_filter": {"type": ["string", "null"]}, |
| "v7_match_count_expected": { |
| "type": ["integer", "null"], |
| "description": "Planner pre-estimate of v7 value_filter match count; 0 on placeholder containers like medical_conditions (medications excluded per validation agent scope)." |
| } |
| } |
| } |
| } |
| } |
|
|