{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentic-atlas-dev/json-schema/agentic-atlas-dev-agent-payload-schema.json",
  "title": "Agent projection payload (agent/<payload class>.json)",
  "description": "One successful result of the agent-projection/v8 envelope: exactly one compact coherence marker, the omitted fact classes declared in scope (with total, truncated, and next_cursor for collections), and the class data. The payload class is read off the data keys rather than echoed beside them, a collection is complete exactly when it is not truncated, and the count it returned is the length of the array it carries. The fact-class recovery mapping is declared once for the whole surface in tools.json rather than expanded per payload, a batch's subjects are read off its own data, and derived-content metadata lives in the sealed Release record rather than on the wire. No payload carries the corpus maturity rung. Cards carry expanded provenance only in one request-gated nested block; it is never default wrapper overhead or a second envelope. A Card claim carries the field the publisher authored it under alongside its text and sources. A complete-Node payload carries identity, hierarchy (ancestors and sibling place), Hook, and ordered Sections only; its relationship occurrences are the links fact class, declared omitted and recovered through atlas_links. Tree entries and tour steps are ordered by their place in their arrays. A definition read carries exactly the display term and its definition. An Orient whose caller omitted query altogether may carry a usage note on how the tool is meant to be called; its candidates are exactly the query='' listing, and an explicit query carries no note.",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentic-atlas-dev-openapi.json#/components/schemas/AgentPayload",
  "type": "object",
  "required": [
    "projection",
    "coherence",
    "scope",
    "data"
  ],
  "additionalProperties": false,
  "properties": {
    "projection": {
      "enum": [
        "agent-projection/v8"
      ]
    },
    "coherence": {
      "type": "string",
      "pattern": "^v\\d+\\.\\d+\\.\\d+$"
    },
    "subject": {
      "type": "string",
      "pattern": "^(term:)?[a-z0-9]+(-[a-z0-9]+)*$"
    },
    "scope": {
      "type": "object",
      "required": [
        "omitted_fact_classes"
      ],
      "additionalProperties": false,
      "properties": {
        "omitted_fact_classes": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "enum": [
              "identity",
              "hierarchy",
              "hook",
              "claims",
              "sections",
              "links",
              "provenance",
              "tree",
              "definition",
              "decisions",
              "decision"
            ]
          }
        },
        "total": {
          "type": "integer",
          "minimum": 0
        },
        "truncated": {
          "type": "boolean"
        },
        "next_cursor": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{8,}$"
        }
      }
    },
    "data": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "usage": {
          "type": "string",
          "minLength": 1
        },
        "candidates": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "id",
                  "hook",
                  "disclosure"
                ],
                "allOf": [
                  {
                    "if": {
                      "required": [
                        "via"
                      ]
                    },
                    "then": {
                      "properties": {
                        "disclosure": {
                          "const": "full"
                        }
                      }
                    }
                  }
                ],
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                  },
                  "hook": {
                    "type": "string",
                    "minLength": 1
                  },
                  "disclosure": {
                    "enum": [
                      "full",
                      "roadmap"
                    ]
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1
                  },
                  "via": {
                    "type": "object",
                    "required": [
                      "id",
                      "direction",
                      "source"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                      },
                      "direction": {
                        "enum": [
                          "inbound",
                          "outbound"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*#[a-z0-9]+(-[a-z0-9]+)*$"
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "id",
                  "hook"
                ],
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^decision:[a-z0-9]+(-[a-z0-9]+)*$"
                  },
                  "hook": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "id",
                  "hook"
                ],
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^term:[a-z0-9]+(-[a-z0-9]+)*$"
                  },
                  "hook": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            ]
          }
        },
        "cards": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "required": [
              "id",
              "title",
              "kind",
              "hook",
              "claims"
            ],
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
              },
              "title": {
                "type": "string",
                "minLength": 1
              },
              "kind": {
                "enum": [
                  "concept",
                  "pattern",
                  "example"
                ]
              },
              "hook": {
                "type": "string",
                "minLength": 1
              },
              "claims": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "text",
                    "field",
                    "sources"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1
                    },
                    "field": {
                      "enum": [
                        "thesis",
                        "law",
                        "when-to-reach",
                        "claim"
                      ]
                    },
                    "sources": {
                      "type": "array",
                      "minItems": 1,
                      "uniqueItems": true,
                      "items": {
                        "type": "string",
                        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*#[a-z0-9]+(-[a-z0-9]+)*$"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "provenance": {
          "type": "object",
          "required": [
            "release",
            "addresses"
          ],
          "additionalProperties": false,
          "properties": {
            "release": {
              "$ref": "#/$defs/Agent_release"
            },
            "addresses": {
              "$ref": "#/$defs/Agent_addresses"
            }
          }
        },
        "identity": {
          "type": "object",
          "required": [
            "id",
            "title",
            "kind"
          ],
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string",
              "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
            },
            "title": {
              "type": "string",
              "minLength": 1
            },
            "kind": {
              "enum": [
                "concept",
                "pattern",
                "example"
              ]
            }
          }
        },
        "hierarchy": {
          "type": "object",
          "required": [
            "ancestors",
            "sibling_position",
            "sibling_count"
          ],
          "additionalProperties": false,
          "properties": {
            "ancestors": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "id",
                  "title"
                ],
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "sibling_position": {
              "type": "integer",
              "minimum": 1
            },
            "sibling_count": {
              "type": "integer",
              "minimum": 1
            }
          }
        },
        "hook": {
          "type": "string",
          "minLength": 1
        },
        "section": {
          "type": "object",
          "required": [
            "slug",
            "heading",
            "position",
            "content"
          ],
          "additionalProperties": false,
          "properties": {
            "slug": {
              "type": "string",
              "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
            },
            "heading": {
              "type": "string",
              "minLength": 1
            },
            "position": {
              "type": "integer",
              "minimum": 1
            },
            "content": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "sections": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "required": [
              "slug",
              "heading",
              "position",
              "content"
            ],
            "additionalProperties": false,
            "properties": {
              "slug": {
                "type": "string",
                "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
              },
              "heading": {
                "type": "string",
                "minLength": 1
              },
              "position": {
                "type": "integer",
                "minimum": 1
              },
              "content": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        "links": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "class",
              "direction",
              "occurrence",
              "hook"
            ],
            "additionalProperties": false,
            "properties": {
              "class": {
                "enum": [
                  "in-slice",
                  "roadmap-disclosed",
                  "undisclosed"
                ]
              },
              "direction": {
                "enum": [
                  "inbound",
                  "outbound"
                ]
              },
              "occurrence": {
                "type": "object",
                "required": [
                  "section",
                  "ordinal"
                ],
                "additionalProperties": false,
                "properties": {
                  "section": {
                    "type": "string",
                    "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                  },
                  "ordinal": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              },
              "target": {
                "type": "string",
                "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
              },
              "title": {
                "type": "string",
                "minLength": 1
              },
              "hook": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        "tree": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "required": [
              "id",
              "title",
              "depth"
            ],
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
              },
              "title": {
                "type": "string",
                "minLength": 1
              },
              "depth": {
                "type": "integer",
                "minimum": 0
              }
            }
          }
        },
        "term": {
          "type": "string",
          "minLength": 1
        },
        "definition": {
          "type": "string",
          "minLength": 1
        },
        "decision": {
          "type": "object",
          "required": [
            "id",
            "title",
            "content"
          ],
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1
            },
            "title": {
              "type": "string",
              "minLength": 1
            },
            "content": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "path": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "object",
              "required": [
                "id",
                "title",
                "intro",
                "steps"
              ],
              "additionalProperties": false,
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                },
                "title": {
                  "type": "string",
                  "minLength": 1
                },
                "intro": {
                  "type": "string",
                  "minLength": 1
                },
                "steps": {
                  "type": "array",
                  "minItems": 1,
                  "items": {
                    "type": "object",
                    "required": [
                      "node",
                      "narration"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "node": {
                        "type": "string",
                        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
                      },
                      "narration": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  }
                }
              }
            }
          ]
        }
      }
    }
  },
  "$defs": {
    "Agent_addresses": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "address",
          "dependency_digest",
          "distillation",
          "attestation"
        ],
        "additionalProperties": false,
        "properties": {
          "address": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*#[a-z0-9]+(-[a-z0-9]+)*$"
          },
          "dependency_digest": {
            "type": "string",
            "pattern": "^sha256:[0-9a-f]{64}$"
          },
          "distillation": {
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          },
          "attestation": {
            "type": "object",
            "required": [
              "publisher",
              "attested_on"
            ],
            "additionalProperties": false,
            "properties": {
              "publisher": {
                "type": "string",
                "minLength": 1
              },
              "attested_on": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              }
            }
          }
        }
      }
    },
    "Agent_release": {
      "type": "object",
      "required": [
        "release_version",
        "catalog_revision",
        "corpus_commit",
        "candidate_digest",
        "export_manifest_digest"
      ],
      "additionalProperties": false,
      "properties": {
        "release_version": {
          "type": "string",
          "pattern": "^v\\d+\\.\\d+\\.\\d+$"
        },
        "catalog_revision": {
          "type": "string",
          "pattern": "^sha256:[0-9a-f]{64}$"
        },
        "corpus_commit": {
          "type": "string",
          "pattern": "^[0-9a-f]{7,40}$"
        },
        "candidate_digest": {
          "type": "string",
          "pattern": "^sha256:[0-9a-f]{64}$"
        },
        "export_manifest_digest": {
          "type": "string",
          "pattern": "^sha256:[0-9a-f]{64}$"
        }
      }
    }
  }
}