{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "asset": {
    "name": "Jev routing contract template",
    "version": "1.0.0",
    "published": "2026-09-23",
    "license": "CC BY 4.0",
    "purpose": "Review a bounded model-routing decision inside a six-object Decision Job.",
    "verification": [
      "Parse this file with any JSON parser.",
      "Confirm template.required_fields contains every control named in article.md.",
      "Recalculate worked_example.threshold_evaluation from the illustrative response.",
      "Confirm no model output directly grants authorization or executes an action."
    ],
    "disclaimer": "This is a proposed architecture. It is not evidence that InfiniSynapse currently integrates Jev, and the illustrative probabilities are not measured Jev results."
  },
  "template": {
    "job_id": "<stable Decision Job id>",
    "decision_id": "<unique decision event id>",
    "decision_job_object_read": "<input|sources|named_views|evidence|gates|artifacts>",
    "purpose": "<one bounded routing question>",
    "state_projection": {
      "schema_version": "<version>",
      "content": {},
      "excluded": [
        "credentials",
        "bearer tokens",
        "unneeded personal data"
      ],
      "content_sha256": "<hash of canonicalized projection>"
    },
    "question": {
      "adapter": "jev",
      "primitive": "<choice|score|noul>",
      "question_version": "<version>",
      "instructions": "<single testable question>",
      "allowed_answers": {}
    },
    "model_policy": {
      "requested_model": "<pinned model version>",
      "allowed_resolved_models": [],
      "timeout_ms": 0,
      "max_retries": 0
    },
    "acceptance": {
      "minimum_confidence": 0.0,
      "minimum_selected_probability": 0.0,
      "required_policy_checks": [],
      "on_low_confidence": "<named fallback>",
      "on_invalid_response": "<named fallback>",
      "on_timeout": "<named fallback>",
      "on_service_unavailable": "<named fallback>"
    },
    "audit_fields": [
      "job_id",
      "decision_id",
      "state_projection.content_sha256",
      "question.question_version",
      "requested_model",
      "resolved_model",
      "candidate_keys",
      "selected_key",
      "probabilities",
      "confidence",
      "thresholds",
      "policy_results",
      "final_runtime_route",
      "fallback_reason",
      "latency_ms",
      "started_at",
      "completed_at"
    ],
    "required_fields": [
      "job_id",
      "decision_id",
      "decision_job_object_read",
      "purpose",
      "state_projection",
      "question",
      "model_policy",
      "acceptance",
      "audit_fields"
    ]
  },
  "worked_example": {
    "label": "Illustrative source routing; not a live Jev result",
    "job_id": "job_weekly_net_revenue_2026w39",
    "decision_id": "route_source_001",
    "decision_job_object_read": "sources",
    "purpose": "Choose among already-authorized candidates for a weekly net-revenue analysis.",
    "state_projection": {
      "schema_version": "source-route.v1",
      "content": {
        "question": "Explain the week-over-week change in net revenue.",
        "required_grain": "week",
        "required_freshness_hours": 24,
        "authorized_candidates": {
          "warehouse_revenue_view": "Governed net-revenue view; refreshed six hours ago.",
          "billing_export": "Raw billing export; refreshed two hours ago.",
          "human_review": "No automatic source selection."
        }
      },
      "excluded": [
        "warehouse credentials",
        "billing API key",
        "customer-level rows"
      ],
      "content_sha256": "ILLUSTRATIVE_REPLACE_AFTER_CANONICALIZATION"
    },
    "question": {
      "adapter": "jev",
      "primitive": "choice",
      "question_version": "weekly-revenue-source.v1",
      "instructions": "Which authorized candidate best fits the requested metric, grain, and freshness requirement?",
      "allowed_answers": {
        "warehouse_revenue_view": "Use the governed metric view.",
        "billing_export": "Use the raw export only if the governed view cannot satisfy the task.",
        "human_review": "Pause because no candidate is safely sufficient."
      }
    },
    "model_policy": {
      "requested_model": "PIN_BEFORE_DEPLOYMENT",
      "allowed_resolved_models": [
        "PIN_BEFORE_DEPLOYMENT"
      ],
      "timeout_ms": 1200,
      "max_retries": 1
    },
    "acceptance": {
      "minimum_confidence": 0.7,
      "minimum_selected_probability": 0.75,
      "required_policy_checks": [
        "source_grant_active",
        "freshness_within_24_hours",
        "metric_definition_approved"
      ],
      "on_low_confidence": "human_review",
      "on_invalid_response": "human_review",
      "on_timeout": "human_review",
      "on_service_unavailable": "human_review"
    },
    "illustrative_model_response": {
      "resolved_model": "EXAMPLE_ONLY",
      "selected_key": "warehouse_revenue_view",
      "probabilities": {
        "warehouse_revenue_view": 0.82,
        "billing_export": 0.11,
        "human_review": 0.07
      },
      "confidence": 0.77
    },
    "threshold_evaluation": {
      "selected_probability_passes": true,
      "confidence_passes": true,
      "reason": "0.82 >= 0.75 and 0.77 >= 0.70; policy checks still control the final route."
    },
    "illustrative_policy_results": {
      "source_grant_active": true,
      "freshness_within_24_hours": true,
      "metric_definition_approved": true
    },
    "final_runtime_route": "open_authorized_source_adapter",
    "execution_boundary": "The runtime opens the adapter after authorization. Jev does not read credentials, run SQL, calculate revenue, or authorize access."
  }
}
