{
  "ucp_version": "0.1.0",
  "id": "urn:uuid:7f9c2e14-3b8a-4d2f-9c61-2e8f0a1b4c5d",
  "generated_at": "2026-07-05T13:40:00Z",
  "generator": { "name": "context-os", "version": "0.2.0" },
  "profiles": ["ucp-core", "ucp-temporal", "ucp-secure"],
  "language": "en",
  "audience": {
    "principal": { "id": "user:alice@acme.com", "display_name": "Alice Petrova" },
    "access_control": {
      "enforced": true,
      "mechanism": "rebac",
      "checked_at": "2026-07-05T13:40:00Z",
      "audit_ref": "audit:9f31c2aa"
    }
  },
  "entity": {
    "ref": {
      "system": "jira",
      "type": "issue",
      "id": "PAY-482",
      "url": "https://acme.atlassian.net/browse/PAY-482"
    },
    "title": "Migrate payment webhooks to v2 API",
    "status": "In Progress",
    "assignee": { "id": "user:alice@acme.com", "display_name": "Alice Petrova" }
  },
  "situation": "User opened issue PAY-482 in Jira.",
  "summary": {
    "text": "Payment provider deprecates webhook API v1 on Aug 1. All webhook consumers must move to v2, which changes signature verification (HMAC-SHA256) and payload shape. The retry queue design was already decided in RFC-114; the open question is idempotency-key TTL.",
    "sources": ["src-1", "src-2", "src-4"],
    "confidence": 0.9
  },
  "must_know": [
    {
      "id": "mk-1",
      "text": "Webhook signatures must use HMAC-SHA256; v1 keys are revoked on Aug 1.",
      "kind": "fact",
      "salience": 0.97,
      "confidence": 0.95,
      "sources": ["src-3"],
      "asserted_at": "2026-06-12T09:00:00Z",
      "valid_from": "2026-06-12T00:00:00Z"
    },
    {
      "id": "mk-2",
      "text": "Staging environment already runs v2; use it for integration tests.",
      "kind": "instruction",
      "salience": 0.8,
      "sources": ["src-5"],
      "asserted_at": "2026-07-02T15:30:00Z"
    }
  ],
  "constraints": [
    {
      "id": "c-1",
      "text": "Zero downtime required: v1 and v2 handlers must run in parallel until cutover.",
      "kind": "instruction",
      "salience": 0.9,
      "sources": ["src-2"]
    }
  ],
  "risks": [
    {
      "id": "r-1",
      "text": "Provider sandbox throttles at 10 req/s; load tests against sandbox will produce false negatives.",
      "kind": "warning",
      "salience": 0.7,
      "sources": ["src-5"],
      "asserted_at": "2026-07-02T15:30:00Z"
    }
  ],
  "decisions": [
    {
      "id": "dec-1",
      "decision": "Keep idempotency keys in Redis, not Postgres.",
      "rationale": "Write volume during retry storms exceeds Postgres comfort zone; TTL semantics are native in Redis.",
      "status": "accepted",
      "decided_by": { "id": "user:bob@acme.com", "display_name": "Bob Kim", "role": "tech lead" },
      "decided_at": "2026-05-20T09:00:00Z",
      "sources": ["src-4"]
    }
  ],
  "conflicts": [
    {
      "id": "conf-1",
      "description": "Retry backoff policy differs between the spec page and the provider changelog.",
      "positions": [
        {
          "claim": "Exponential backoff starting at 30s, max 6 attempts.",
          "sources": ["src-2"],
          "asserted_at": "2026-04-10T00:00:00Z"
        },
        {
          "claim": "Provider now requires first retry no earlier than 60s.",
          "sources": ["src-3"],
          "asserted_at": "2026-06-12T09:00:00Z"
        }
      ],
      "resolution_hint": "src-3 is newer and originates from the provider itself.",
      "severity": "medium"
    }
  ],
  "context_diff": {
    "since": "2026-07-01T08:00:00Z",
    "baseline": "last_view",
    "changes": [
      {
        "type": "updated",
        "target": "document",
        "summary": "Webhook spec page: signature verification section rewritten for v2.",
        "occurred_at": "2026-07-03T10:12:00Z",
        "actor": { "id": "user:bob@acme.com", "display_name": "Bob Kim" },
        "sources": ["src-2"]
      },
      {
        "type": "added",
        "target": "comment",
        "summary": "QA reported sandbox throttling during load tests.",
        "occurred_at": "2026-07-02T15:30:00Z",
        "sources": ["src-5"]
      }
    ]
  },
  "history": [
    {
      "occurred_at": "2026-05-20T09:00:00Z",
      "summary": "RFC-114 accepted: retry queue design.",
      "actor": { "id": "user:bob@acme.com", "display_name": "Bob Kim" },
      "sources": ["src-4"]
    }
  ],
  "dependencies": [
    {
      "system": "jira",
      "type": "issue",
      "id": "PAY-479",
      "url": "https://acme.atlassian.net/browse/PAY-479"
    }
  ],
  "related_objects": [
    {
      "ref": {
        "system": "github",
        "type": "pull_request",
        "id": "acme/payments#912",
        "url": "https://github.com/acme/payments/pull/912"
      },
      "title": "feat: v2 signature verification middleware",
      "relation": "implements",
      "salience": 0.85,
      "reason": "Open PR linked from the issue; touches the signature code this task depends on."
    }
  ],
  "recommended_actions": [
    {
      "id": "ra-1",
      "text": "Confirm retry backoff with the provider changelog before merging PR #912.",
      "kind": "instruction",
      "salience": 0.8,
      "sources": ["src-3", "src-2"]
    }
  ],
  "sources": {
    "src-1": {
      "system": "jira",
      "type": "issue",
      "title": "PAY-482: Migrate payment webhooks to v2 API",
      "url": "https://acme.atlassian.net/browse/PAY-482",
      "updated_at": "2026-07-03T11:00:00Z",
      "content_hash": "sha256:5b41362bc82b7f3d56edc5a306db22105707d01ff4819e26faef9724a2d406c9",
      "retrieved_at": "2026-07-05T13:39:50Z",
      "trust": 0.9
    },
    "src-2": {
      "system": "confluence",
      "type": "page",
      "title": "Payment Webhooks — Technical Spec",
      "url": "https://acme.atlassian.net/wiki/spaces/PAY/pages/1441793",
      "author": { "id": "user:bob@acme.com", "display_name": "Bob Kim", "role": "tech lead" },
      "updated_at": "2026-07-03T10:12:00Z",
      "content_hash": "sha256:9c56cc51b374c3ba189210d5b6d4bf57790d351c96c47c02190ecf1e430635ab",
      "retrieved_at": "2026-07-05T13:39:51Z",
      "trust": 0.85
    },
    "src-3": {
      "system": "gdrive",
      "type": "file",
      "title": "Provider changelog: Webhook API v2 migration guide",
      "url": "https://drive.google.com/file/d/1AbC/view",
      "updated_at": "2026-06-12T09:00:00Z",
      "content_hash": "sha256:2c624232cdd221771294dfbb310aca000a0df6ac8b66b696d90ef06fdefb64a3",
      "retrieved_at": "2026-07-05T13:39:52Z",
      "trust": 0.95,
      "excerpt": "Starting August 1, all webhook deliveries are signed with HMAC-SHA256. First retry must not occur earlier than 60 seconds."
    },
    "src-4": {
      "system": "confluence",
      "type": "page",
      "title": "RFC-114: Webhook retry queue",
      "url": "https://acme.atlassian.net/wiki/spaces/PAY/pages/1507329",
      "author": { "id": "user:bob@acme.com", "display_name": "Bob Kim", "role": "tech lead" },
      "updated_at": "2026-05-20T09:00:00Z",
      "content_hash": "sha256:19581e27de7ced00ff1ce50b2047e7a567c76b1cbaebabe5ef03f7c3017bb5b7",
      "retrieved_at": "2026-07-05T13:39:53Z",
      "trust": 0.9
    },
    "src-5": {
      "system": "jira",
      "type": "message",
      "title": "QA comment on PAY-482 (sandbox throttling)",
      "url": "https://acme.atlassian.net/browse/PAY-482?focusedCommentId=88123",
      "created_at": "2026-07-02T15:30:00Z",
      "content_hash": "sha256:4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce",
      "retrieved_at": "2026-07-05T13:39:54Z",
      "trust": 0.7
    }
  },
  "budget": { "token_estimate": 1450 },
  "extensions": {
    "ai.contextos.ranking": { "engine": "heuristic-v1", "candidates_considered": 214 }
  }
}
