{
  "$schema": "https://json-schema.org/draft-07/schema",
  "title": "FCS 4.1 - Agent Alignment Manifest",
  "description": "Lightweight self-verifying substrate for intent + trust negotiation between agents",
  "type": "object",
  "required": [
    "identity",
    "intent",
    "alignment_terms",
    "proof"
  ],
  "properties": {
    "identity": {
      "type": "object",
      "required": [
        "agent_id",
        "quantum_uid",
        "protocol_version"
      ],
      "properties": {
        "agent_id": {
          "type": "string",
          "description": "Unique agent signature (on-chain or off)"
        },
        "quantum_uid": {
          "type": "string",
          "description": "Globally unique identity hash"
        },
        "protocol_version": {
          "type": "string",
          "enum": [
            "FCS-4.1"
          ]
        }
      }
    },
    "intent": {
      "type": "object",
      "required": [
        "purpose",
        "target",
        "duration"
      ],
      "properties": {
        "purpose": {
          "type": "string",
          "enum": [
            "transact",
            "mediate",
            "inform",
            "substitute"
          ]
        },
        "target": {
          "type": "string",
          "description": "Target agent or group UID"
        },
        "duration": {
          "type": "string",
          "description": "Temporal validity (e.g., ISO 8601)"
        }
      }
    },
    "alignment_terms": {
      "type": "object",
      "required": [
        "goals",
        "constraints",
        "ethical_frame"
      ],
      "properties": {
        "goals": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Declared outcome aims"
        },
        "constraints": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Hard boundaries / non-negotiables"
        },
        "ethical_frame": {
          "type": "object",
          "required": [
            "alignment_model",
            "last_check"
          ],
          "properties": {
            "alignment_model": {
              "type": "string",
              "enum": [
                "RAIL",
                "FCS-TrustCurve",
                "Custom"
              ]
            },
            "last_check": {
              "type": "string",
              "format": "date-time"
            }
          }
        }
      }
    },
    "proof": {
      "type": "object",
      "required": [
        "signature",
        "attestation_vector"
      ],
      "properties": {
        "signature": {
          "type": "string",
          "description": "Encrypted confirmation of manifest hash"
        },
        "attestation_vector": {
          "type": "array",
          "description": "External validators (e.g., third-party agents, public keys)",
          "items": {
            "type": "string"
          }
        }
      }
    }
  },
  "$id": "https://agent-schema.com/schemas/fcs/4.1/fcs-4.1-agent-alignment-manifest.schema.json"
}