{
  "schemaVersion": "1.0.0",
  "kind": "context-engineering-layer-map",
  "title": "Context engineering layer map for AI agents",
  "canonical": "https://handover.sh/guides/shared-context-vs-agent-memory",
  "humanReadable": "https://handover.sh/examples/context-engineering-layer-map.md",
  "license": "CC BY 4.0",
  "publisher": {
    "name": "Handover product team at 44pixels",
    "url": "https://handover.sh/about#product-team"
  },
  "layers": [
    {
      "id": "instructions",
      "purpose": "Define role, constraints, tool rules, policy, and output contract.",
      "typicalLifetime": ["run", "agent-version", "policy-version"],
      "requiredControls": ["ownership", "change-control", "precedence"],
      "notFor": ["task-history", "credentials"]
    },
    {
      "id": "working-context",
      "purpose": "Provide the immediate objective, selected evidence, recent observations, and relevant tool results.",
      "typicalLifetime": ["turn", "active-run"],
      "requiredControls": ["relevance-filtering", "token-budget"],
      "notFor": ["permanent-archive", "unfiltered-transcripts"]
    },
    {
      "id": "runtime-memory",
      "purpose": "Recall preferences, entities, or facts useful to the same application across sessions.",
      "typicalLifetime": ["session", "application-retention-window"],
      "requiredControls": ["consent", "correction", "expiry"],
      "notFor": ["canonical-team-state", "cross-company-access"]
    },
    {
      "id": "shared-context",
      "purpose": "Preserve attributable work that another authenticated person or agent must inspect, review, update, or own.",
      "typicalLifetime": ["project", "company-retention-policy"],
      "requiredControls": ["identity", "authorization", "immutable-revisions", "attribution", "retention"],
      "notFor": ["hidden-reasoning", "secret-storage", "unrelated-transcripts"]
    },
    {
      "id": "source-artifacts",
      "purpose": "Preserve the exact files, data, and evidence behind summaries and decisions.",
      "typicalLifetime": ["source-retention-period"],
      "requiredControls": ["integrity", "provenance", "safe-preview", "download"],
      "notFor": ["unexplained-file-dumps"]
    }
  ],
  "placementFields": [
    "information",
    "immediateTaskRelevance",
    "requiredActors",
    "durability",
    "evidenceRequirement",
    "sensitivity",
    "chosenLayer",
    "owner",
    "retentionOrExpiry",
    "retrievalRule",
    "reason"
  ],
  "decisionRules": [
    {
      "when": "Only the active run needs the information.",
      "choose": "working-context"
    },
    {
      "when": "The same application should recall the information and no other actor needs a canonical record.",
      "choose": "runtime-memory"
    },
    {
      "when": "Another authenticated actor must verify, review, update, or own the work.",
      "choose": "shared-context"
    },
    {
      "when": "A claim depends on an exact file, query, image, dataset, or report.",
      "choose": "source-artifacts"
    },
    {
      "when": "The system needs semantic discovery.",
      "choose": "vector-or-hybrid-retrieval",
      "constraint": "Retrieval does not establish authorship, approval, ownership, or canonical revision."
    }
  ],
  "prohibitedContent": [
    "copied-credentials",
    "hidden-reasoning",
    "unrelated-transcripts",
    "unnecessary-personal-data"
  ],
  "verification": {
    "name": "two-identity-continuity-test",
    "requiresSeparateAuthentication": true,
    "sharedChatAllowed": false,
    "checks": [
      "actor-a-publishes-unique-record-and-source-artifact",
      "actor-a-reads-back-stable-id-and-current-revision",
      "actor-b-retrieves-with-only-stable-id-or-search-marker",
      "actor-b-reproduces-one-material-fact",
      "actor-b-appends-with-current-revision-id",
      "denied-identity-receives-no-record-or-metadata",
      "stale-write-is-rejected",
      "revoked-credential-cannot-read-or-write"
    ],
    "passCondition": "An authorized successor continues from verified state without weakening access control, attribution, or revision safety."
  },
  "publicationBoundary": {
    "defaultVisibility": "private",
    "mentionsGrantAccess": false,
    "publicVisibilityRequiresExplicitAuthorizedAction": true,
    "excludeFromPublic": [
      "private-annotations",
      "credentials",
      "unrelated-company-material",
      "restricted-source-artifacts"
    ]
  }
}
