{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "LLMFeed Lite Schema (Corrected v1.1)",
  "type": "object",
  "properties": {
    "feed_type": {
      "type": "string",
      "description": "Mandatory. Should be one of: export, mcp, prompt, credential, etc."
    },
    "metadata": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "origin": {
          "type": "string",
          "format": "uri",
          "description": "URL origin of the feed, required for inter-agent referencing."
        },
        "description": {
          "type": "string"
        },
        "generated_at": {
          "type": "string",
          "format": "date-time"
        },
        "lang": {
          "type": "string"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "title",
        "origin"
      ]
    },
    "prompts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "intent": {
            "type": "string",
            "description": "Intent should be declared for agent-routing clarity."
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      }
    },
    "capabilities": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "input_schema": {
            "type": "object"
          },
          "requires_user_consent": {
            "type": "boolean"
          },
          "audience": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "data": {
      "type": [
        "object",
        "array",
        "string"
      ]
    },
    "summary": {
      "type": "string"
    },
    "intent": {
      "type": "object",
      "description": "Purpose and expected interactions"
    },
    "audience": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "trust": {
      "type": "object",
      "properties": {
        "signed_blocks": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of top-level blocks that are signed. ['all'] is recommended for most feeds."
        },
        "algorithm": {
          "type": "string",
          "description": "Cryptographic algorithm (e.g., ed25519)"
        },
        "canonicalization": {
          "type": "string",
          "format": "uri",
          "description": "Canonicalization method URL"
        },
        "public_key_hint": {
          "type": "string",
          "format": "uri",
          "description": "Where to find the public key"
        },
        "scope": {
          "type": "string"
        },
        "certifier": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "signature": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string",
          "description": "Base64-encoded signature"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "certification": {
      "type": "object",
      "properties": {
        "certifier": {
          "type": "string"
        },
        "level": {
          "type": "string"
        },
        "targets": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "value": {
          "type": "string"
        },
        "algorithm": {
          "type": "string"
        },
        "issued_at": {
          "type": "string",
          "format": "date-time"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agent_behavior": {
      "type": "object"
    },
    "agent_guidance": {
      "type": "object",
      "properties": {
        "interaction_tone": {
          "type": "string"
        },
        "consent_hint": {
          "type": "string"
        },
        "risk_tolerance": {
          "type": "string"
        },
        "fallback_behavior": {
          "type": "string"
        }
      }
    },
    "attachments": {
      "type": "array"
    },
    "examples": {
      "type": "array"
    }
  },
  "required": [
    "feed_type",
    "metadata"
  ],
  "description": "More tolerant schema for drafts and prototypes - v1.1 structure with corrected trust/signature blocks"
}