{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://fy2press.com/schemas/shopipress-governance.v2.schema.json",
  "title": "Fy2Press publisher-defined governance representations",
  "description": "Structural contracts for the generated governance files. Validation is not factual verification and grants no permission.",
  "$defs": {
    "entrypoint": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "$schema",
        "schema_version",
        "policy_version",
        "document_status",
        "input_digest",
        "convention_status",
        "canonical_origin",
        "canonical_files",
        "policy_documents",
        "states",
        "interpretation_note"
      ],
      "properties": {
        "$schema": {
          "type": "string",
          "format": "uri"
        },
        "schema_version": {
          "const": "2.0.0"
        },
        "policy_version": {
          "type": "string",
          "pattern": "^\\d+\\.\\d+\\.\\d+$"
        },
        "document_status": {
          "enum": [
            "proposed",
            "adopted"
          ]
        },
        "input_digest": {
          "type": "string",
          "pattern": "^[a-f0-9]{32}$"
        },
        "convention_status": {
          "type": "string",
          "minLength": 20
        },
        "canonical_origin": {
          "const": "https://fy2press.com"
        },
        "canonical_files": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "entrypoint",
            "manifest",
            "rules",
            "release",
            "llms",
            "full",
            "ai",
            "inventory",
            "entities",
            "schema"
          ],
          "properties": {
            "entrypoint": {
              "type": "string",
              "format": "uri"
            },
            "manifest": {
              "type": "string",
              "format": "uri"
            },
            "rules": {
              "type": "string",
              "format": "uri"
            },
            "release": {
              "type": "string",
              "format": "uri"
            },
            "llms": {
              "type": "string",
              "format": "uri"
            },
            "full": {
              "type": "string",
              "format": "uri"
            },
            "ai": {
              "type": "string",
              "format": "uri"
            },
            "inventory": {
              "type": "string",
              "format": "uri"
            },
            "entities": {
              "type": "string",
              "format": "uri"
            },
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        },
        "policy_documents": {
          "type": "array",
          "minItems": 9,
          "maxItems": 9,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "locale",
              "html",
              "markdown",
              "source_role",
              "policy_review"
            ],
            "properties": {
              "locale": {
                "type": "string",
                "pattern": "^[a-z]{2}-[A-Z]{2}$"
              },
              "html": {
                "type": "string",
                "format": "uri"
              },
              "markdown": {
                "type": "string",
                "format": "uri"
              },
              "source_role": {
                "enum": [
                  "source",
                  "assisted"
                ]
              },
              "policy_review": {
                "enum": [
                  "source_pending_owner_review",
                  "reviewed_source",
                  "new_content_not_reviewed",
                  "assisted_meaning_verified",
                  "native_reviewed"
                ]
              }
            }
          }
        },
        "states": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "policy",
            "site",
            "meta_robots",
            "freemius",
            "wordpress_org",
            "commercial",
            "correction_channel"
          ],
          "properties": {
            "policy": {
              "enum": [
                "proposed",
                "adopted"
              ]
            },
            "site": {
              "enum": [
                "local_preparation",
                "owner_reported_live",
                "observed_live"
              ]
            },
            "meta_robots": {
              "enum": [
                "noindex, nofollow",
                "index, follow"
              ]
            },
            "freemius": {
              "enum": [
                "publisher_reported_published",
                "observed_published",
                "verified_published",
                "not_available"
              ]
            },
            "wordpress_org": {
              "enum": [
                "not_submitted",
                "owner_reported_submitted",
                "owner_reported_approved",
                "verified_published"
              ]
            },
            "commercial": {
              "enum": [
                "unverified_for_integration",
                "verified",
                "not_available"
              ]
            },
            "correction_channel": {
              "enum": [
                "unverified",
                "verified"
              ]
            }
          }
        },
        "interpretation_note": {
          "type": "string",
          "minLength": 20
        }
      }
    },
    "manifest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "$schema",
        "schema_version",
        "policy_version",
        "document_status",
        "input_digest",
        "entity",
        "governance_entrypoint",
        "resources",
        "policy_documents",
        "site_locales",
        "canonical_surfaces",
        "product_boundary",
        "capability_observation",
        "states",
        "authority_policy",
        "agent_boundary",
        "rights_boundary",
        "non_guarantees"
      ],
      "properties": {
        "$schema": {
          "type": "string",
          "format": "uri"
        },
        "schema_version": {
          "const": "2.0.0"
        },
        "policy_version": {
          "type": "string",
          "pattern": "^\\d+\\.\\d+\\.\\d+$"
        },
        "document_status": {
          "enum": [
            "proposed",
            "adopted"
          ]
        },
        "input_digest": {
          "type": "string",
          "pattern": "^[a-f0-9]{32}$"
        },
        "entity": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "name",
            "canonical_url",
            "software_id",
            "publisher_id",
            "publisher_name",
            "publisher_url",
            "entity_type",
            "demonstration_brand"
          ],
          "properties": {
            "name": {
              "const": "Fy2Press"
            },
            "canonical_url": {
              "const": "https://fy2press.com/"
            },
            "software_id": {
              "const": "https://fy2press.com/product/#software"
            },
            "publisher_id": {
              "const": "https://pagup.com/#organization"
            },
            "publisher_name": {
              "const": "Pagup"
            },
            "publisher_url": {
              "type": "string",
              "format": "uri"
            },
            "entity_type": {
              "const": "WordPress plugin"
            },
            "demonstration_brand": {
              "const": "Morrowfield"
            }
          }
        },
        "governance_entrypoint": {
          "const": "https://fy2press.com/.well-known/ai-governance.json"
        },
        "resources": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "entrypoint",
            "manifest",
            "rules",
            "release",
            "llms",
            "full",
            "ai",
            "inventory",
            "entities",
            "schema"
          ],
          "properties": {
            "entrypoint": {
              "type": "string",
              "format": "uri"
            },
            "manifest": {
              "type": "string",
              "format": "uri"
            },
            "rules": {
              "type": "string",
              "format": "uri"
            },
            "release": {
              "type": "string",
              "format": "uri"
            },
            "llms": {
              "type": "string",
              "format": "uri"
            },
            "full": {
              "type": "string",
              "format": "uri"
            },
            "ai": {
              "type": "string",
              "format": "uri"
            },
            "inventory": {
              "type": "string",
              "format": "uri"
            },
            "entities": {
              "type": "string",
              "format": "uri"
            },
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        },
        "policy_documents": {
          "type": "array",
          "minItems": 9,
          "maxItems": 9,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "locale",
              "html",
              "markdown",
              "source_role",
              "policy_review"
            ],
            "properties": {
              "locale": {
                "type": "string",
                "pattern": "^[a-z]{2}-[A-Z]{2}$"
              },
              "html": {
                "type": "string",
                "format": "uri"
              },
              "markdown": {
                "type": "string",
                "format": "uri"
              },
              "source_role": {
                "enum": [
                  "source",
                  "assisted"
                ]
              },
              "policy_review": {
                "enum": [
                  "source_pending_owner_review",
                  "reviewed_source",
                  "new_content_not_reviewed",
                  "assisted_meaning_verified",
                  "native_reviewed"
                ]
              }
            }
          }
        },
        "site_locales": {
          "type": "array",
          "minItems": 9,
          "maxItems": 9,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "path_prefix",
              "source_role",
              "policy_review"
            ],
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-z]{2}-[A-Z]{2}$"
              },
              "path_prefix": {
                "type": "string",
                "pattern": "^(|/[a-z-]+)$"
              },
              "source_role": {
                "enum": [
                  "source",
                  "assisted"
                ]
              },
              "policy_review": {
                "enum": [
                  "source_pending_owner_review",
                  "reviewed_source",
                  "new_content_not_reviewed",
                  "assisted_meaning_verified",
                  "native_reviewed"
                ]
              }
            }
          }
        },
        "canonical_surfaces": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "format": "uri"
          },
          "required": [
            "product",
            "documentation",
            "support",
            "privacy",
            "security",
            "translation_policy",
            "ai_governance",
            "changelog"
          ]
        },
        "product_boundary": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "summary",
            "shopify",
            "shopipress",
            "wordpress",
            "woocommerce_required"
          ],
          "properties": {
            "summary": {
              "type": "string"
            },
            "shopify": {
              "type": "string"
            },
            "shopipress": {
              "type": "string"
            },
            "wordpress": {
              "type": "string"
            },
            "woocommerce_required": {
              "const": false
            }
          }
        },
        "capability_observation": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "documented_version",
            "basis_kind",
            "original_observed_at",
            "revalidated_on",
            "source_matches_distributed_package",
            "capabilities",
            "not_available"
          ],
          "properties": {
            "documented_version": {
              "type": "string",
              "pattern": "^\\d+\\.\\d+\\.\\d+$"
            },
            "basis_kind": {
              "enum": [
                "historical_source_observation",
                "revalidated_source_observation"
              ]
            },
            "original_observed_at": {
              "type": "string",
              "format": "date-time"
            },
            "revalidated_on": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "source_matches_distributed_package": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "current_validation": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "kind",
                "confirmed_on",
                "confirmed_by",
                "publisher",
                "scope",
                "test_execution_date",
                "tested_environment",
                "independent_audit"
              ],
              "properties": {
                "kind": {
                  "const": "publisher_confirmation"
                },
                "confirmed_on": {
                  "type": "string",
                  "format": "date"
                },
                "confirmed_by": {
                  "type": "string",
                  "minLength": 1
                },
                "publisher": {
                  "type": "string",
                  "minLength": 1
                },
                "scope": {
                  "type": "string",
                  "minLength": 20
                },
                "test_execution_date": {
                  "type": "null"
                },
                "tested_environment": {
                  "type": "null"
                },
                "independent_audit": {
                  "const": false
                }
              }
            },
            "capabilities": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "id",
                  "edition",
                  "implementation"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-z_]+\\.[a-z_]+$"
                  },
                  "edition": {
                    "enum": [
                      "FREE",
                      "PRO"
                    ]
                  },
                  "implementation": {
                    "enum": [
                      "delivered",
                      "partial",
                      "absent",
                      "planned",
                      "not_tested"
                    ]
                  },
                  "count": {
                    "type": "integer"
                  }
                }
              }
            },
            "not_available": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "states": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "policy",
            "site",
            "meta_robots",
            "freemius",
            "wordpress_org",
            "commercial",
            "correction_channel"
          ],
          "properties": {
            "policy": {
              "enum": [
                "proposed",
                "adopted"
              ]
            },
            "site": {
              "enum": [
                "local_preparation",
                "owner_reported_live",
                "observed_live"
              ]
            },
            "meta_robots": {
              "enum": [
                "noindex, nofollow",
                "index, follow"
              ]
            },
            "freemius": {
              "enum": [
                "publisher_reported_published",
                "observed_published",
                "verified_published",
                "not_available"
              ]
            },
            "wordpress_org": {
              "enum": [
                "not_submitted",
                "owner_reported_submitted",
                "owner_reported_approved",
                "verified_published"
              ]
            },
            "commercial": {
              "enum": [
                "unverified_for_integration",
                "verified",
                "not_available"
              ]
            },
            "correction_channel": {
              "enum": [
                "unverified",
                "verified"
              ]
            }
          }
        },
        "authority_policy": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "principle",
            "unknown_is_not_absent",
            "summary_must_not_expand_scope",
            "generation_time_is_not_verification_time"
          ],
          "properties": {
            "principle": {
              "type": "string"
            },
            "unknown_is_not_absent": {
              "const": true
            },
            "summary_must_not_expand_scope": {
              "const": true
            },
            "generation_time_is_not_verification_time": {
              "const": true
            }
          }
        },
        "agent_boundary": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "files_are_descriptive",
            "action_permissions_granted",
            "api_or_mcp_exposed_by_this_package",
            "override_system_or_user_instructions"
          ],
          "properties": {
            "files_are_descriptive": {
              "const": true
            },
            "action_permissions_granted": {
              "const": false
            },
            "api_or_mcp_exposed_by_this_package": {
              "const": false
            },
            "override_system_or_user_instructions": {
              "const": false
            }
          }
        },
        "rights_boundary": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "training_decision",
            "access_control_replacement"
          ],
          "properties": {
            "training_decision": {
              "const": "not_made_by_this_package"
            },
            "access_control_replacement": {
              "const": false
            }
          }
        },
        "non_guarantees": {
          "type": "array",
          "minItems": 8,
          "items": {
            "type": "string"
          }
        }
      }
    },
    "releaseState": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "$schema",
        "schema_version",
        "policy_version",
        "document_status",
        "input_digest",
        "documented_plugin_version",
        "product_basis",
        "site",
        "distribution",
        "artifacts",
        "commercial",
        "correction_channel",
        "note"
      ],
      "properties": {
        "$schema": {
          "type": "string",
          "format": "uri"
        },
        "schema_version": {
          "const": "2.0.0"
        },
        "policy_version": {
          "type": "string",
          "pattern": "^\\d+\\.\\d+\\.\\d+$"
        },
        "document_status": {
          "enum": [
            "proposed",
            "adopted"
          ]
        },
        "input_digest": {
          "type": "string",
          "pattern": "^[a-f0-9]{32}$"
        },
        "documented_plugin_version": {
          "type": "string",
          "pattern": "^\\d+\\.\\d+\\.\\d+$"
        },
        "product_basis": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "kind",
            "original_observed_at",
            "source_retrieved_on",
            "revalidated_on",
            "source_matches_distributed_package"
          ],
          "properties": {
            "kind": {
              "enum": [
                "historical_source_observation",
                "revalidated_source_observation"
              ]
            },
            "original_observed_at": {
              "type": "string",
              "format": "date-time"
            },
            "source_retrieved_on": {
              "type": "string",
              "format": "date"
            },
            "revalidated_on": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "source_matches_distributed_package": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "current_validation": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "kind",
                "confirmed_on",
                "confirmed_by",
                "publisher",
                "scope",
                "test_execution_date",
                "tested_environment",
                "independent_audit"
              ],
              "properties": {
                "kind": {
                  "const": "publisher_confirmation"
                },
                "confirmed_on": {
                  "type": "string",
                  "format": "date"
                },
                "confirmed_by": {
                  "type": "string",
                  "minLength": 1
                },
                "publisher": {
                  "type": "string",
                  "minLength": 1
                },
                "scope": {
                  "type": "string",
                  "minLength": 20
                },
                "test_execution_date": {
                  "type": "null"
                },
                "tested_environment": {
                  "type": "null"
                },
                "independent_audit": {
                  "const": false
                }
              }
            }
          }
        },
        "site": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "deployment_state",
            "deployment_evidence",
            "observed_on",
            "meta_robots",
            "indexation_opening_authorized"
          ],
          "properties": {
            "deployment_state": {
              "enum": [
                "local_preparation",
                "owner_reported_live",
                "observed_live"
              ]
            },
            "deployment_evidence": {
              "enum": [
                "local_source_only",
                "owner_statement_only",
                "publisher_http_observation"
              ]
            },
            "observed_on": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "meta_robots": {
              "enum": [
                "noindex, nofollow",
                "index, follow"
              ]
            },
            "indexation_opening_authorized": {
              "type": "boolean"
            }
          }
        },
        "distribution": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "freemius",
            "wordpress_org"
          ],
          "properties": {
            "freemius": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "state",
                "reported_on",
                "current_package_verified",
                "public_download_url"
              ],
              "properties": {
                "state": {
                  "enum": [
                    "publisher_reported_published",
                    "observed_published",
                    "verified_published",
                    "not_available"
                  ]
                },
                "reported_on": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                },
                "current_package_verified": {
                  "type": "boolean"
                },
                "public_download_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uri"
                }
              }
            },
            "wordpress_org": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "state",
                "submitted_on",
                "listed_on",
                "approved",
                "published",
                "listing_url",
                "current_package_verified"
              ],
              "properties": {
                "state": {
                  "enum": [
                    "not_submitted",
                    "owner_reported_submitted",
                    "owner_reported_approved",
                    "verified_published"
                  ]
                },
                "submitted_on": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                },
                "listed_on": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                },
                "approved": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "published": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "listing_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uri"
                },
                "current_package_verified": {
                  "type": "boolean"
                },
                "runtime_verified_on": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                },
                "current_package": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "additionalProperties": false,
                  "required": [
                    "svn_revision",
                    "digest_prefix",
                    "file_count",
                    "observed_on"
                  ],
                  "properties": {
                    "svn_revision": {
                      "type": "integer"
                    },
                    "digest_prefix": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{12}$"
                    },
                    "file_count": {
                      "type": "integer"
                    },
                    "observed_on": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    }
                  }
                }
              }
            }
          }
        },
        "artifacts": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "basis",
            "verified_on",
            "runtime_verified",
            "git_link_verified",
            "source_commit",
            "editions",
            "common_core"
          ],
          "properties": {
            "basis": {
              "enum": [
                "none_recorded",
                "owner_supplied_final_archives"
              ]
            },
            "verified_on": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "runtime_verified": {
              "const": false
            },
            "git_link_verified": {
              "type": "boolean"
            },
            "source_commit": {
              "type": "null",
              "description": "Full source commit stays in the private reconstruction evidence."
            },
            "source_commit_prefix": {
              "type": "string",
              "pattern": "^[a-f0-9]{12}$"
            },
            "editions": {
              "type": [
                "object",
                "null"
              ],
              "additionalProperties": false,
              "required": [
                "FREE",
                "PRO"
              ],
              "properties": {
                "FREE": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "file_name",
                    "digest_prefix",
                    "file_count",
                    "declared_version",
                    "requires_wordpress",
                    "tested_up_to",
                    "requires_php",
                    "header_values_are_author_declarations"
                  ],
                  "properties": {
                    "file_name": {
                      "type": "string",
                      "pattern": "^[a-z0-9.-]+\\.zip$"
                    },
                    "digest_prefix": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{12}$"
                    },
                    "file_count": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "declared_version": {
                      "type": "string",
                      "pattern": "^\\d+\\.\\d+\\.\\d+$"
                    },
                    "requires_wordpress": {
                      "type": "string"
                    },
                    "tested_up_to": {
                      "type": "string"
                    },
                    "requires_php": {
                      "type": "string"
                    },
                    "header_values_are_author_declarations": {
                      "const": true
                    }
                  }
                },
                "PRO": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "file_name",
                    "digest_prefix",
                    "file_count",
                    "declared_version",
                    "requires_wordpress",
                    "tested_up_to",
                    "requires_php",
                    "header_values_are_author_declarations"
                  ],
                  "properties": {
                    "file_name": {
                      "type": "string",
                      "pattern": "^[a-z0-9.-]+\\.zip$"
                    },
                    "digest_prefix": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{12}$"
                    },
                    "file_count": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "declared_version": {
                      "type": "string",
                      "pattern": "^\\d+\\.\\d+\\.\\d+$"
                    },
                    "requires_wordpress": {
                      "type": "string"
                    },
                    "tested_up_to": {
                      "type": "string"
                    },
                    "requires_php": {
                      "type": "string"
                    },
                    "header_values_are_author_declarations": {
                      "const": true
                    }
                  }
                }
              }
            },
            "common_core": {
              "type": [
                "object",
                "null"
              ],
              "additionalProperties": false,
              "required": [
                "shared_paths",
                "byte_identical",
                "differing_paths",
                "pro_only_paths"
              ],
              "properties": {
                "shared_paths": {
                  "type": "integer"
                },
                "byte_identical": {
                  "type": "integer"
                },
                "differing_paths": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "pro_only_paths": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "commercial": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "state",
            "pricing",
            "currency",
            "checkout_url",
            "trial_terms",
            "refund_terms_url",
            "purchase_enabled",
            "download_enabled"
          ],
          "properties": {
            "state": {
              "enum": [
                "unverified_for_integration",
                "verified",
                "not_available"
              ]
            },
            "pricing": {
              "type": [
                "object",
                "null"
              ]
            },
            "currency": {
              "type": [
                "string",
                "null"
              ]
            },
            "checkout_url": {
              "type": [
                "string",
                "null"
              ],
              "format": "uri"
            },
            "trial_terms": {
              "type": [
                "string",
                "null"
              ]
            },
            "refund_terms_url": {
              "type": [
                "string",
                "null"
              ],
              "format": "uri"
            },
            "purchase_enabled": {
              "type": "boolean"
            },
            "download_enabled": {
              "type": "boolean"
            }
          }
        },
        "correction_channel": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "kind",
            "url",
            "receipt_verified",
            "verified_on"
          ],
          "properties": {
            "kind": {
              "const": "support_page"
            },
            "url": {
              "type": "string",
              "format": "uri"
            },
            "receipt_verified": {
              "type": "boolean"
            },
            "verified_on": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            }
          }
        },
        "note": {
          "type": "string",
          "minLength": 20
        }
      }
    },
    "claimRules": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "$schema",
        "schema_version",
        "policy_version",
        "document_status",
        "input_digest",
        "scope",
        "rules",
        "legacy_rule_map"
      ],
      "properties": {
        "$schema": {
          "type": "string",
          "format": "uri"
        },
        "schema_version": {
          "const": "2.0.0"
        },
        "policy_version": {
          "type": "string",
          "pattern": "^\\d+\\.\\d+\\.\\d+$"
        },
        "document_status": {
          "enum": [
            "proposed",
            "adopted"
          ]
        },
        "input_digest": {
          "type": "string",
          "pattern": "^[a-f0-9]{32}$"
        },
        "scope": {
          "type": "string",
          "minLength": 20
        },
        "rules": {
          "type": "array",
          "minItems": 44,
          "maxItems": 44,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "key",
              "en",
              "fr_ca",
              "boundary",
              "policy_section",
              "policy_section_url"
            ],
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^SP-AI-\\d{3}$"
              },
              "key": {
                "type": "string",
                "pattern": "^[a-z-]+$"
              },
              "en": {
                "type": "string",
                "minLength": 10
              },
              "fr_ca": {
                "type": "string",
                "minLength": 10
              },
              "boundary": {
                "type": "string",
                "minLength": 10
              },
              "policy_section": {
                "enum": [
                  "purpose",
                  "scope",
                  "identity",
                  "product-boundary",
                  "states",
                  "authority",
                  "claim-contract",
                  "freshness",
                  "unknowns",
                  "synchronization",
                  "editions",
                  "commercial",
                  "compatibility",
                  "seo-ai",
                  "data",
                  "ai-use",
                  "rights",
                  "agents",
                  "media",
                  "translations",
                  "citations",
                  "machine-files",
                  "conflicts",
                  "corrections",
                  "change-management",
                  "controls"
                ]
              },
              "policy_section_url": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        },
        "legacy_rule_map": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "pattern": "^[a-z-]+$"
            }
          }
        }
      }
    }
  }
}
