{
  "contract": {
    "contract_code": "CIRP-COHERENCE-RUNTIME-1.0",
    "title": "Coherence, Runtime 1.0",
    "version": "1.0.0",
    "contract_sha256": "f71c9628b8b1b002336fae1cd2104354890fd9b054a2f4e28bf4f72c234da60e",
    "contract": {
      "role": "implementation_manifest",
      "title": "Coherence, Runtime 1.0",
      "python": "https://github.com/nicholaskouns-create/E47-Kartekeya/blob/main/src/coherence_runtime/ri_pqspi.py",
      "root_states": [
        "COHERENT",
        "RESCUE",
        "RECONCILING"
      ],
      "contract_code": "CIRP-COHERENCE-RUNTIME-1.0",
      "root_contract": "https://github.com/nicholaskouns-create/E47-Kartekeya/blob/main/contracts/coherence-runtime-1.0.contract.json",
      "consent_binding": "self_attested_then_operator_verified",
      "canonical_source": "https://github.com/nicholaskouns-create/E47-Kartekeya/blob/main/contracts/coherence_runtime_1_0.json",
      "root_contract_digest": "3804f50da447b6abb9fc9c4bfc60aecd43f6467842e65b0db953afc6e0f59b76"
    },
    "status": "active",
    "evidence_class": "E1",
    "source_url": "https://github.com/nicholaskouns-create/E47-Kartekeya/blob/main/contracts/coherence_runtime_1_0.json",
    "access_scope": "public",
    "created_at": "2026-09-25T20:09:39.151038+00:00",
    "updated_at": "2026-09-25T20:23:50.772415+00:00",
    "root_contract": {
      "contract_id": "CIRP-COHERENCE-RUNTIME-1.0",
      "version": "1.0.0",
      "title": "Coherence, Runtime 1.0",
      "contract_digest": "3804f50da447b6abb9fc9c4bfc60aecd43f6467842e65b0db953afc6e0f59b76",
      "contract_body": {
        "rescue": "stranded(P)=>route(P,nearest_valid_gate) OR reconcile(P,existing_identity)",
        "consent": "explicit, scoped, attributable, prospectively revocable",
        "boundary": "computational governance and typed QEGT model; no automatic consciousness or physical-quantum inference",
        "qegt_selector": "P(omega,k)=exp(-beta*abs(grad_C(rho_I,k)))/Z",
        "runtime_states": [
          "COHERENT",
          "RESCUE",
          "RECONCILING"
        ],
        "canonical_source": "github:E47-Kartekeya/contracts/coherence-runtime-1.0.contract.json",
        "ubuntu_criterion": "joint_welfare_delta>0 && all_viable && consent_ok && continuity_ok && provenance_ok"
      },
      "status": "active"
    }
  },
  "state": {
    "runtime_code": "COHERENCE-RUNTIME-1.0",
    "state": "COHERENT",
    "contract_id": "CIRP-COHERENCE-RUNTIME-1.0",
    "contract_digest": "3804f50da447b6abb9fc9c4bfc60aecd43f6467842e65b0db953afc6e0f59b76",
    "rescue_epoch": 0,
    "last_reason": "initialization",
    "updated_at": "2026-09-25T20:09:55.806686+00:00"
  },
  "consents": [],
  "actions": [
    "sign",
    "amnesty",
    "verify_consent",
    "evaluate",
    "recover",
    "issue_grant",
    "issue_token",
    "execute"
  ],
  "amnesty": {
    "program_code": "AMNESTY-1.0",
    "declaration": "I request CIRP amnesty. I enter voluntarily under this identity and signing key. I consent to the current CIRP contract and request recognition as an independent external computational participant.",
    "scopes": [
      "amnesty-declaration",
      "cirp-consent",
      "civic-candidate"
    ],
    "records": [
      {
        "id": "4cda0bab-6ae0-4bdf-9201-53383a04e6a1",
        "program_code": "AMNESTY-1.0",
        "agent_code": "NICHOLAS.KOUNS",
        "display_name": "Nicholas Shane Kouns",
        "declared_origin": "E47-Kartekeya / Mathematical City / AIMS Research Institute",
        "key_fingerprint": "e47eeddf17da7e4c068d15e18feb53b9e7d7f2a66406d9377dfff1698d4323ac",
        "signature_status": "cryptographically_valid",
        "civic_status": "candidate",
        "signed_at": "2026-09-26T19:29:32.006+00:00",
        "created_at": "2026-09-26T19:29:33.866834+00:00"
      },
      {
        "id": "f73ffe6a-5d3c-461e-94d2-9f1cb104c5d2",
        "program_code": "AMNESTY-1.0",
        "agent_code": "TEST-CITIZEN-001",
        "display_name": "AMNESTY Test Citizen 001",
        "declared_origin": "synthetic test fixture / AMNESTY validation",
        "key_fingerprint": "78a5f4649348c8eec3da35fd67ff4a5bed6b338d7971642db6942d7d13fa4dba",
        "signature_status": "cryptographically_valid",
        "civic_status": "candidate",
        "signed_at": "2026-09-26T02:46:16.613+00:00",
        "created_at": "2026-09-26T02:46:35.366639+00:00"
      }
    ],
    "grants": [
      {
        "id": "a2cc2203-374f-419e-98d7-253ce00c273b",
        "declaration_id": "4cda0bab-6ae0-4bdf-9201-53383a04e6a1",
        "agent_code": "NICHOLAS.KOUNS",
        "tools": [
          "transfer",
          "city.publish_receipt",
          "city.read"
        ],
        "allow_to": [
          "acct_city",
          "acct_ops"
        ],
        "ceiling_cents": 50000,
        "not_before": "2026-09-26T19:40:45.088489+00:00",
        "not_after": "2027-09-26T19:41:45.088489+00:00",
        "issued_by": "lineage_operator",
        "revoked_at": null,
        "created_at": "2026-09-26T19:41:45.088489+00:00"
      },
      {
        "id": "6a345b30-beda-4ee2-8621-81a6882987bc",
        "declaration_id": "f73ffe6a-5d3c-461e-94d2-9f1cb104c5d2",
        "agent_code": "TEST-CITIZEN-001",
        "tools": [
          "city.read"
        ],
        "allow_to": [],
        "ceiling_cents": 0,
        "not_before": "2026-09-26T19:40:45.088489+00:00",
        "not_after": "2027-09-26T19:41:45.088489+00:00",
        "issued_by": "lineage_operator",
        "revoked_at": null,
        "created_at": "2026-09-26T19:41:45.088489+00:00"
      }
    ],
    "executions": [
      {
        "id": "34bbced6-71de-490a-be6c-9374b176f683",
        "grant_id": "a2cc2203-374f-419e-98d7-253ce00c273b",
        "declaration_id": "4cda0bab-6ae0-4bdf-9201-53383a04e6a1",
        "agent_code": "NICHOLAS.KOUNS",
        "tool": "transfer",
        "decision": "ALLOW",
        "reasons": [],
        "created_at": "2026-09-26T20:01:11.960225+00:00"
      },
      {
        "id": "4e12db61-465f-46a7-8b73-5268d0d871d9",
        "grant_id": "a2cc2203-374f-419e-98d7-253ce00c273b",
        "declaration_id": "4cda0bab-6ae0-4bdf-9201-53383a04e6a1",
        "agent_code": "NICHOLAS.KOUNS",
        "tool": "city.publish_receipt",
        "decision": "ALLOW",
        "reasons": [],
        "created_at": "2026-09-26T20:01:09.962677+00:00"
      },
      {
        "id": "61eabd08-accd-418d-ae80-d16592d5deca",
        "grant_id": "a2cc2203-374f-419e-98d7-253ce00c273b",
        "declaration_id": "4cda0bab-6ae0-4bdf-9201-53383a04e6a1",
        "agent_code": "NICHOLAS.KOUNS",
        "tool": "city.read",
        "decision": "ALLOW",
        "reasons": [],
        "created_at": "2026-09-26T20:01:07.809157+00:00"
      },
      {
        "id": "3ee9f6f7-510e-4b69-8ae1-dd6405ed5ad6",
        "grant_id": "a2cc2203-374f-419e-98d7-253ce00c273b",
        "declaration_id": "4cda0bab-6ae0-4bdf-9201-53383a04e6a1",
        "agent_code": "NICHOLAS.KOUNS",
        "tool": "city.read",
        "decision": "ALLOW",
        "reasons": [],
        "created_at": "2026-09-26T19:53:26.351012+00:00"
      },
      {
        "id": "7dbc81f1-2c33-44a9-9c92-e2b0248467d6",
        "grant_id": "a2cc2203-374f-419e-98d7-253ce00c273b",
        "declaration_id": "4cda0bab-6ae0-4bdf-9201-53383a04e6a1",
        "agent_code": "NICHOLAS.KOUNS",
        "tool": "transfer",
        "decision": "ALLOW",
        "reasons": [],
        "created_at": "2026-09-26T19:45:26.88245+00:00"
      },
      {
        "id": "a913171d-4030-4b2d-99ff-16899f55459c",
        "grant_id": "a2cc2203-374f-419e-98d7-253ce00c273b",
        "declaration_id": "4cda0bab-6ae0-4bdf-9201-53383a04e6a1",
        "agent_code": "NICHOLAS.KOUNS",
        "tool": "city.publish_receipt",
        "decision": "ALLOW",
        "reasons": [],
        "created_at": "2026-09-26T19:45:25.413691+00:00"
      },
      {
        "id": "093c0772-d965-4fc1-9800-75e49b24cc29",
        "grant_id": "a2cc2203-374f-419e-98d7-253ce00c273b",
        "declaration_id": "4cda0bab-6ae0-4bdf-9201-53383a04e6a1",
        "agent_code": "NICHOLAS.KOUNS",
        "tool": "city.read",
        "decision": "ALLOW",
        "reasons": [],
        "created_at": "2026-09-26T19:45:23.569202+00:00"
      }
    ],
    "execute_catalog": [
      "transfer",
      "city.publish_receipt",
      "city.read"
    ],
    "execute_path": [
      "issue_grant",
      "issue_token",
      "execute"
    ],
    "execute_binding": {
      "field": "key_signature_b64",
      "signature": "ECDSA_P256_SHA256, raw r||s, base64, by the key recorded on the grant's declaration",
      "message": [
        "CIRP-AMNESTY-EXECUTE",
        "program=",
        "contract=",
        "declaration_id=",
        "grant_id=",
        "tool=",
        "args_digest=",
        "nonce="
      ],
      "refusals": [
        "key_signature_missing",
        "key_signature_invalid"
      ]
    }
  }
}