{
  "handle": "ExperienceSharding",
  "mechanism": "Applies the {{shard}} primitive to agent memory. When context fills, the agent splits into two specialized agents (active vs archival) rather than forgetting. It segments history into discrete blocks via {{chunk_merge}} before distributing them across the agent cluster.",
  "gloss": "Agent bifurcation on context saturation: active vs archival specialists",
  "failure_modes": [
    "Coordination Overhead: Overhead between shards increases as shard count grows."
  ],
  "invariants": [
    "Splits when context reaches `split_threshold`, rather than forgetting.",
    "Splits into an active agent and an archival one; both retain their history.",
    "Every experience has exactly one owning shard; access copies create no second owner.",
    "Recombining the shards reconstructs the global pattern."
  ],
  "preconditions": [
    "Large dataset or experience stream",
    "Multiple learners"
  ],
  "postconditions": [
    "Distributed knowledge base"
  ],
  "parameters": [
    {
      "name": "split_threshold",
      "type": "Ratio",
      "range": "(0.0, 1.0)",
      "description": "Share of context capacity that triggers the split."
    },
    {
      "name": "cross_shard_policy",
      "type": "Enum",
      "range": "{Forbid, Replicate, Broadcast}",
      "description": "How a read that spans shards is served."
    },
    {
      "name": "routing_key",
      "type": "Enum",
      "range": "{AgentId, TaskType, Random}",
      "description": "What decides which shard an experience is assigned to."
    },
    {
      "name": "shard_count",
      "type": "Integer",
      "range": "[2, 64]",
      "description": "Partitions the history is distributed across, distinct from the active/archival split."
    }
  ],
  "_meta": {
    "tier": 1,
    "related": [
      "FabricSharding"
    ],
    "ring": 0,
    "supersedes": [
      "sema:ExperienceSharding#mh:SHA-256:d9208f9cae52b448379b20118d47ed597e138e0a1015adc03598d65699d2dd8f",
      "sema:ExperienceSharding#mh:SHA-256:3be09a0c57f793ab33a1efbd6773feac4bd2fc1dda5ec3b6beb56a7230793188",
      "sema:ExperienceSharding#mh:SHA-256:5b42f1a5f5bb2a81220deba6845460081eff9834fe3e176181f7774310f821cd"
    ],
    "path": [
      "Mind",
      "Memory"
    ]
  },
  "sema_id": "sema:ExperienceSharding#mh:SHA-256:c8a197339886a6bbec3201ead589ad7fd37bbfcde46d6470df59ded8aaa80153",
  "sema_ref": "ExperienceSharding#c8a1",
  "sema_stub": "c8a1",
  "dependencies": {
    "references": {
      "chunk_merge": "sema:ChunkMerge#mh:SHA-256:a7a32d00372fcda30401ab77dbcb3a3b53fd3c4f013a2c9a5346e8b49ed76285",
      "shard": "sema:Shard#mh:SHA-256:4d41232416e3d414c714e0892e8559c2180899b4c21c25af29984372220f8704"
    }
  },
  "sema_layer": "Mind",
  "sema_category": "Memory",
  "used_by": {
    "references": {
      "CurriculumReplay": "sema:CurriculumReplay#mh:SHA-256:0ef657942a69bcc9b32e05656bd6b5b4ca9de556c6e634174363c1c9e4c93723",
      "FractalIntelligence": "sema:FractalIntelligence#mh:SHA-256:27f78221851ad25557bc00476e1490f5c35f5c4d27a30deaf52e3c138d8c20c5"
    }
  }
}
