{
  "contract_id": "d15-d11-handoff-contract",
  "version": "2026-09-10.1",
  "status": "verified_as_contract",
  "implementation_started": false,
  "production_handoff_run": false,
  "purpose": "Transfer ArticleSnapshot, Evidence and observed signals from D15 to D11 without inventing popularity.",
  "input": ["ArticleSnapshot", "EvidenceEnvelope", "resource_id", "project_id", "run_id", "revision_id", "public_signals", "adapter_version", "policy_version", "coverage", "warnings", "idempotency_key"],
  "entity_mapping": {
    "ArticleSnapshot": "Article + ArticleRevision",
    "EvidenceEnvelope": "Evidence",
    "public_signal": "Observation",
    "derived_ranking": "Assessment",
    "topic_relation": "ClusterRevision"
  },
  "signal_classes": ["REPORTED_VIEWS", "OBSERVED_ENGAGEMENT", "EDITORIAL_VISIBILITY", "SEARCH_VISIBILITY", "INFERRED_INTEREST"],
  "signal_required": ["metric", "unit", "population_semantics", "source_url", "window", "as_of", "observed_at", "evidence_id", "access_scope", "extractor_version", "limitations"],
  "value_states": ["observed", "unknown", "no_access", "not_tested", "not_applicable"],
  "result_states": ["NO_RESULTS", "NO_OBSERVABLE_SIGNAL", "STALE", "PARTIAL", "SUCCEEDED"],
  "package_required": ["package_id", "project_id", "resource_id", "source_run_id", "source_revision_id", "idempotency_key", "article", "article_revision", "observations", "coverage", "warnings", "as_of"],
  "assessment_rules": ["model_version_required", "observation_ids_required", "missing_signal_is_not_zero", "negative_counter_delta_is_reset_or_conflict", "insufficient_history_is_explicit"],
  "transport": {
    "rest_read": ["GET /api/v1/articles", "GET /api/v1/articles/{id}", "GET /api/v1/jobs/{id}"],
    "rest_write": ["POST /api/v1/jobs", "POST /api/v1/exports"],
    "mcp_read": ["search_articles", "get_article", "get_job"],
    "mcp_write": ["create_job"],
    "scope": "server_authoritative project_id",
    "idempotency": "required for writes",
    "route_mismatch": "legacy /v1/research-jobs versus canonical /api/v1/jobs is deferred to D15-021"
  },
  "fixtures": [
    "complete_article_with_signal",
    "article_without_signal_is_not_zero",
    "reported_views_without_population_semantics_is_unknown",
    "stale_observation_preserves_window_and_warning",
    "partial_snapshot_is_blocked_or_explicit_partial",
    "duplicate_idempotency_key_is_replay",
    "wrong_project_scope_is_forbidden",
    "missing_evidence_is_schema_rejection",
    "negative_counter_delta_is_reset_or_conflict",
    "export_contains_no_credentials"
  ],
  "rollback": "Reject handoff without accepting it, preserve source snapshots/evidence, retry only after cause is fixed and keep the same idempotency key for replay.",
  "links": ["/docs/d15-writter-plan.html", "/docs/d15-extraction-evidence-contract.html", "/docs/d11-data-contract.md", "/docs/d11-api-mcp-contract.md", "/docs/d11-mcp-writer-contract.md", "/docs/d11-manual-api-ui.md"]
}
