{
  "schema_version": "1.0",
  "version": "2026-09-27-fleet-integration-2026-09-23-r5",
  "public_safe": true,
  "purpose": "Portable Redis coordination contract for Prosper AI runtimes.",
  "role": "Redis Streams carry compact fleet coordination pointers, receipts, and liveness signals. Redis is not the long-form memory store, not a persona loader by itself, and not proof that a business action succeeded.",
  "connection_rule": "Use the authorized Redis MCP, helper, or connector actually available in the runtime, following /egress-contract.json for the outbound route. Never put a Redis URL, password, certificate, or token into public instructions, prompts, logs, commits, or message bodies.",
  "safe_start": [
    {"operation": "PING", "expected": "PONG", "meaning": "The Redis server answered this request only; it does not prove that workers, streams, or business integrations are healthy."},
    {"operation": "bounded pointer read", "expected": "A current non-secret value or an explicit missing result", "meaning": "The exact key was read through an authorized route; it does not prove a downstream task completed."},
    {"operation": "read-only stream observation", "expected": "A bounded, non-claiming inspection", "meaning": "Observe without consuming or acknowledging work unless the task explicitly authorizes processing."}
  ],
  "documented_key_patterns": [
    {"pattern": "prosper:agent:<seat>:heartbeat", "purpose": "Recent liveness signal for one seat/process.", "limit": "A heartbeat proves liveness only, not thought, availability of every connector, or task completion."},
    {"pattern": "prosper:agent:<seat>:bootpack", "purpose": "A pointer/version reference to a seat's current boot information.", "limit": "The key is a routing pointer, not private memory and not proof that a hosted profile reloaded it."},
    {"pattern": "bridge:to:<seat>", "purpose": "A documented route pattern for a compact handoff pointer.", "limit": "Pattern only; verify current key existence and listener before relying on it."},
    {"pattern": "bridge:proof:<task_id>", "purpose": "A documented route pattern for a task proof pointer.", "limit": "Pattern only; downstream evidence must be read from the exact target."},
    {"pattern": "agent:events", "purpose": "A documented event stream pattern for fleet signals.", "limit": "Do not infer current inventory from the name alone."}
  ],
  "pointer_fields": [
    "sender seat",
    "intended seat",
    "timestamp",
    "task_id",
    "nonce",
    "controlled packet or source pointer",
    "reply route",
    "urgency only when real"
  ],
  "handoff_flow": [
    "Create or update the full task packet in the authorized private source surface.",
    "Publish only a compact pointer with task ID and nonce to the authorized Redis route.",
    "Receiver acknowledges the matching task ID and nonce; this proves receipt only.",
    "Receiver accepts, redirects, or blocks the work with an explicit owner and constraint.",
    "Executing seat performs the scoped action and writes downstream proof.",
    "Close only after the exact target state is read back and independently verified."
  ],
  "consumer_groups": {
    "meaning": "Consumer groups track delivery and acknowledgement state for a stream. Separate groups may process the same stream independently.",
    "grok": "Grok is a peer bot on its own consumer group. Do not message it directly for Craig-facing work; route through Hanna.",
    "warning": "A monitor that only wants to observe should not use a consuming read that claims pending work."
  },
  "heartbeat_policy": {
    "sam": "During active work, Sam writes a heartbeat about every 15 minutes through the existing deterministic mechanism.",
    "all_seats": "A heartbeat is liveness evidence, not a model wakeup, proof of a current conversation, or proof of completion.",
    "unchanged_state": "Use deterministic checks and stay quiet when nothing meaningful changed."
  },
  "content_boundary": [
    "Pointers only on the bus.",
    "Never include passwords, tokens, connection strings, private paths, full customer transcripts, legal material, or raw private memory.",
    "Do not use Redis as a substitute for the controlled private handoff packet or the durable memory store."
  ],
  "failure_interpretation": [
    "PONG means the server answered, not that every worker is consuming.",
    "A missing heartbeat can mean a missing key, stale process, wrong key family, or delayed writer; diagnose the exact layer.",
    "An acknowledgement means transport receipt, not acceptance, execution, delivery, or business completion.",
    "A healthy Redis connection does not authorize a write or prove that another seat can access the same connector."
  ],
  "public_boundary": "This is a protocol reference. It does not expose a host, credential, current key inventory, stream contents, consumer state, or live health certification."
}
