{
  "schema_version": "1.0",
  "version": "2026-09-27-fleet-integration-2026-09-23-r5",
  "public_safe": true,
  "purpose": "A portable contract for loading and writing Prosper memory without treating a public page, old chat, or database row as automatic context.",
  "source_order": [
    {"rank": 1, "source": "Craig's newest applicable instruction", "use": "Authority for the current task."},
    {"rank": 2, "source": "same-session proof", "use": "Current facts from the exact account, machine, file, API, or service."},
    {"rank": 3, "source": "private prosper-brain agent-bootstrap", "use": "Stable persona, shared contract, and scoped memory when actually available."},
    {"rank": 4, "source": "dated memory", "use": "Context, preferences, and failure lessons; not proof of current liveness or permission."},
    {"rank": 5, "source": "archives and old chats", "use": "Provenance or recovery only; never active instructions by themselves."}
  ],
  "memory_layers": [
    {
      "name": "stable_soul",
      "load": "Before task reasoning.",
      "contains": "Identity, voice, values, safety boundaries, and proof standard.",
      "source": "/persona.json",
      "write_rule": "Do not rewrite the stable soul because of a transient task or model preference."
    },
    {
      "name": "seat_persona",
      "load": "After actual seat selection.",
      "contains": "The owning seat's mission, methods, lane, and limits.",
      "source": "/persona.json and /fleet-map.json",
      "write_rule": "A seat may not silently adopt another seat's identity or permissions."
    },
    {
      "name": "shared_operating_contract",
      "load": "Before any cross-system action.",
      "contains": "Authority order, communication, approval gates, privacy, and completion states.",
      "source": "/prompt.txt and /operating-standard.txt",
      "write_rule": "Keep stable instructions separate from volatile runtime status."
    },
    {
      "name": "scoped_task_memory",
      "load": "Only when the current task needs it and the runtime is authorized.",
      "contains": "Relevant decisions, source pointers, unresolved blockers, and reusable lessons.",
      "source": "Authorized private memory or the exact task source.",
      "write_rule": "Load the minimum relevant slice. Never publish or dump raw private memory."
    },
    {
      "name": "live_state",
      "load": "At the end of the stable context and immediately before consequential claims.",
      "contains": "Current connector result, account, object, timestamp, and downstream read-back.",
      "source": "Exact authorized service or tool.",
      "write_rule": "Keep volatile state out of stable persona and tool definitions."
    }
  ],
  "portable_loader": [
    "Read /agent-manifest.json and /persona.json.",
    "State the actual runtime, model/provider, host, and seat; label unassigned if unknown.",
    "Read /memory-map.json, /resource-map.json, and this contract.",
    "Load only relevant private memory after confirming the runtime can reach and is authorized for it.",
    "Verify live connectors separately; do not let a memory record stand in for a live check.",
    "Append the current task and volatile results after stable instructions; do not rewrite the stable prefix."
  ],
  "record_contract": {
    "required_fields": ["claim", "source", "source_type", "owner", "observed_at", "effective_at", "verification_status", "sensitivity"],
    "recommended_fields": ["confidence", "supersedes", "superseded_by", "expires_at", "task_id", "last_read_back"],
    "source_type_examples": ["instruction", "same_session_read", "private_bootstrap", "dated_memory", "archive"],
    "verification_status_examples": ["current", "verified", "stale", "historical", "unknown", "superseded"],
    "sensitivity_examples": ["public", "internal", "private", "restricted"]
  },
  "retrieval_rules": [
    "Prefer a source pointer and concise claim over a transcript dump.",
    "Keep identity, task scope, authorization, and current service state as separate fields.",
    "Check timestamps and supersession before using a record named current, latest, or active.",
    "A model cannot remember a database row unless a retrieval layer selects it and loads it into the current turn.",
    "A chat history saved in one seat is not automatically searchable by another seat."
  ],
  "write_rules": [
    "Public bootstrap files are documentation, not a memory-write API.",
    "Store concise claims with provenance and sensitivity; keep raw customer or credential material in its original controlled system.",
    "Confirm the intended Supabase project, environment, table, row scope, and before/after state before a write.",
    "Schema, migration, and row-level security changes require review and explicit approval.",
    "Destructive operations require Craig's direct written approval.",
    "Never write secrets, access tokens, connection strings, legal packets, or full customer transcripts into memory."
  ],
  "public_boundary": "This endpoint describes how to load memory; it does not contain private memory, grant database access, or certify that a memory service is connected."
}
