{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/robowrite-ai/json-schema/robowrite-ai-public-kit-source-exclusion-schema.json",
  "title": "PublicKitSourceExclusion",
  "description": "The kit after a source domain was excluded, and what changed.",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/robowrite-ai-openapi.yml#/components/schemas/PublicKitSourceExclusion",
  "properties": {
    "auto_approved": {
      "default": false,
      "title": "Auto Approved",
      "type": "boolean"
    },
    "brief_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Brief Id"
    },
    "claims": {
      "items": {
        "$ref": "#/$defs/PublicKitClaim"
      },
      "title": "Claims",
      "type": "array"
    },
    "components": {
      "items": {
        "$ref": "#/$defs/PublicKitComponent"
      },
      "title": "Components",
      "type": "array"
    },
    "content_item_id": {
      "format": "uuid",
      "title": "Content Item Id",
      "type": "string"
    },
    "decided_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Decided At"
    },
    "decided_by": {
      "anyOf": [
        {
          "$ref": "#/$defs/ContentKitDecisionActor"
        },
        {
          "type": "null"
        }
      ]
    },
    "domain": {
      "title": "Domain",
      "type": "string"
    },
    "dropped_component_ids": {
      "items": {
        "type": "string"
      },
      "title": "Dropped Component Ids",
      "type": "array"
    },
    "evidence": {
      "anyOf": [
        {
          "$ref": "#/$defs/PublicKitEvidence"
        },
        {
          "type": "null"
        }
      ]
    },
    "excluded_source_urls": {
      "items": {
        "type": "string"
      },
      "title": "Excluded Source Urls",
      "type": "array"
    },
    "general_only_sections": {
      "description": "Sections that lost their last cited claim; the writer keeps them general.",
      "items": {
        "type": "string"
      },
      "title": "General Only Sections",
      "type": "array"
    },
    "kit_revision": {
      "title": "Kit Revision",
      "type": "string"
    },
    "outline": {
      "items": {
        "$ref": "#/$defs/PublicKitOutlineItem"
      },
      "title": "Outline",
      "type": "array"
    },
    "primary_keyword": {
      "default": "",
      "title": "Primary Keyword",
      "type": "string"
    },
    "removed_claim_ids": {
      "items": {
        "type": "string"
      },
      "title": "Removed Claim Ids",
      "type": "array"
    },
    "review_findings": {
      "description": "What the review gate found. Each item is one of: a low-confidence requirement or claim (item_id, kind, confidence, threshold, reason); a component that failed verification (component_id, kind, reason, claim_id); a kit element or citation rule the brief's article spec requires that the kit cannot provide (element, reason, detail; approving the kit waives it); or an article spec note that never holds the kit (advisory, element, component_id).",
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Review Findings",
      "type": "array"
    },
    "status": {
      "$ref": "#/$defs/ContentKitStatus"
    },
    "title": {
      "default": "",
      "title": "Title",
      "type": "string"
    },
    "uncited_fact_claim_ids": {
      "description": "Facts you supplied that cited the domain. They stay in the kit as uncited statements; remove them if they should go too.",
      "items": {
        "type": "string"
      },
      "title": "Uncited Fact Claim Ids",
      "type": "array"
    },
    "updated_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Updated At"
    }
  },
  "required": [
    "content_item_id",
    "status",
    "kit_revision",
    "domain",
    "excluded_source_urls",
    "removed_claim_ids",
    "dropped_component_ids",
    "uncited_fact_claim_ids",
    "general_only_sections"
  ],
  "type": "object",
  "$defs": {
    "ArticleElement": {
      "description": "The article elements a spec can require, allow or turn off.",
      "enum": [
        "citations",
        "stats",
        "key_takeaways",
        "quotes",
        "faq",
        "comparison_table",
        "steps",
        "toc",
        "relevant_links",
        "products"
      ],
      "title": "ArticleElement",
      "type": "string"
    },
    "ArticleSourceOrigin": {
      "description": "Who supplied a cited source of a v2 article (public ``origin``).",
      "enum": [
        "research",
        "supplied"
      ],
      "title": "ArticleSourceOrigin",
      "type": "string"
    },
    "ContentKitComponentKind": {
      "enum": [
        "faq",
        "quote",
        "stat",
        "sources",
        "comparison_table",
        "key_takeaways",
        "steps"
      ],
      "title": "ContentKitComponentKind",
      "type": "string"
    },
    "ContentKitDecisionActor": {
      "description": "Who decided the kit's current status: the approval gate, a user, or\nan agent (OAuth) acting for a user.",
      "enum": [
        "user",
        "gate",
        "agent"
      ],
      "title": "ContentKitDecisionActor",
      "type": "string"
    },
    "ContentKitStatus": {
      "enum": [
        "draft",
        "needs_review",
        "approved"
      ],
      "title": "ContentKitStatus",
      "type": "string"
    },
    "FactFetchFailure": {
      "additionalProperties": false,
      "description": "A sanitized diagnostic. An HTTP status is present only when observed.",
      "properties": {
        "http_status": {
          "anyOf": [
            {
              "maximum": 599,
              "minimum": 100,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Http Status"
        },
        "reason": {
          "$ref": "#/$defs/FactFetchFailureReason"
        }
      },
      "required": [
        "reason"
      ],
      "title": "FactFetchFailure",
      "type": "object"
    },
    "FactFetchFailureReason": {
      "description": "Observed reason a source read failed to yield a page for verification.",
      "enum": [
        "pass_deadline",
        "timeout",
        "transport_error",
        "target_status",
        "empty_body",
        "refused_url",
        "unreadable_response"
      ],
      "title": "FactFetchFailureReason",
      "type": "string"
    },
    "FactSourceOutcome": {
      "description": "What checking a supplied fact's source URL found. Only a verified URL\nis cited.",
      "enum": [
        "verified",
        "no_url",
        "unsafe_url",
        "ineligible_url",
        "fetch_failed",
        "not_on_page",
        "removed_source"
      ],
      "title": "FactSourceOutcome",
      "type": "string"
    },
    "PublicKitClaim": {
      "description": "One citable claim. ``origin=supplied`` is a fact you supplied; its\n``url`` is set only when its page was fetched and states the fact.\n``supplied_url`` and ``source_check`` show the URL you supplied and why\nit is or is not cited.",
      "properties": {
        "attribution": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Attribution"
        },
        "confidence": {
          "maximum": 1,
          "minimum": 0,
          "title": "Confidence",
          "type": "number"
        },
        "id": {
          "title": "Id",
          "type": "string"
        },
        "origin": {
          "$ref": "#/$defs/ArticleSourceOrigin"
        },
        "section_ids": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "description": "Outline section ids this claim supports, if mapped.",
          "title": "Section Ids"
        },
        "source_check": {
          "anyOf": [
            {
              "$ref": "#/$defs/FactSourceOutcome"
            },
            {
              "type": "null"
            }
          ],
          "description": "What checking the supplied URL found: verified (cited), fetch_failed (the page could not be read), not_on_page (the page does not state every figure and name in the fact), ineligible_url or unsafe_url (not allowed), or removed_source (the source was removed or its domain excluded). Null on facts added before it was recorded."
        },
        "source_check_failure": {
          "anyOf": [
            {
              "$ref": "#/$defs/FactFetchFailure"
            },
            {
              "type": "null"
            }
          ],
          "description": "Recorded detail of a failed source read. Null when no detail was recorded."
        },
        "supplied_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The source URL you supplied with this fact, kept even when it is not cited. Null on facts added before it was recorded.",
          "title": "Supplied Url"
        },
        "text": {
          "title": "Text",
          "type": "string"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url"
        }
      },
      "required": [
        "id",
        "text",
        "origin",
        "confidence"
      ],
      "title": "PublicKitClaim",
      "type": "object"
    },
    "PublicKitComponent": {
      "description": "One article component (FAQ, stats, quotes, table, takeaways, sources).\n``locked`` and ``user_override`` components are kept as you set them.",
      "properties": {
        "id": {
          "title": "Id",
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/ContentKitComponentKind"
        },
        "locked": {
          "default": false,
          "title": "Locked",
          "type": "boolean"
        },
        "payload": {
          "additionalProperties": true,
          "title": "Payload",
          "type": "object"
        },
        "user_override": {
          "default": false,
          "title": "User Override",
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "kind"
      ],
      "title": "PublicKitComponent",
      "type": "object"
    },
    "PublicKitEvidence": {
      "description": "What evidence the kit holds now. Computed from the current kit on\nevery read and write, so it reflects your edits; ``review_findings`` is\nthe review gate's record of an earlier revision.",
      "properties": {
        "min_sources": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "The brief's minimum, set only when it requires citations.",
          "title": "Min Sources"
        },
        "sections": {
          "items": {
            "$ref": "#/$defs/PublicKitSectionEvidence"
          },
          "title": "Sections",
          "type": "array"
        },
        "source_count": {
          "default": 0,
          "description": "Distinct cited sources.",
          "minimum": 0,
          "title": "Source Count",
          "type": "integer"
        },
        "unmapped_claim_count": {
          "default": 0,
          "description": "Claims not matched to a section, such as facts you supplied.",
          "minimum": 0,
          "title": "Unmapped Claim Count",
          "type": "integer"
        },
        "unmapped_claim_ids": {
          "items": {
            "type": "string"
          },
          "title": "Unmapped Claim Ids",
          "type": "array"
        },
        "unmet_requirements": {
          "items": {
            "$ref": "#/$defs/PublicKitUnmetRequirement"
          },
          "title": "Unmet Requirements",
          "type": "array"
        },
        "unplaceable_claim_ids": {
          "description": "Facts you supplied, and must-use claims, that no section can state because every section they could appear in is general-only. Add supplied facts with section_ids to place them.",
          "items": {
            "type": "string"
          },
          "title": "Unplaceable Claim Ids",
          "type": "array"
        }
      },
      "title": "PublicKitEvidence",
      "type": "object"
    },
    "PublicKitOutlineItem": {
      "description": "One planned section of the article.",
      "properties": {
        "heading": {
          "title": "Heading",
          "type": "string"
        },
        "id": {
          "title": "Id",
          "type": "string"
        },
        "target_words": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Target Words"
        }
      },
      "required": [
        "id",
        "heading"
      ],
      "title": "PublicKitOutlineItem",
      "type": "object"
    },
    "PublicKitSectionEvidence": {
      "description": "One outline section's evidence in the current kit.",
      "properties": {
        "cited_claim_ids": {
          "description": "Cited claims supporting this section.",
          "items": {
            "type": "string"
          },
          "title": "Cited Claim Ids",
          "type": "array"
        },
        "claim_count": {
          "description": "Cited claims matched to this section.",
          "minimum": 0,
          "title": "Claim Count",
          "type": "integer"
        },
        "general_only": {
          "description": "The writer keeps this section general: no figures, prices, dates or named-product facts.",
          "title": "General Only",
          "type": "boolean"
        },
        "heading": {
          "title": "Heading",
          "type": "string"
        },
        "outline_id": {
          "title": "Outline Id",
          "type": "string"
        },
        "source_urls": {
          "description": "Distinct URLs cited in this section.",
          "items": {
            "type": "string"
          },
          "title": "Source Urls",
          "type": "array"
        },
        "uncited_claim_ids": {
          "description": "Facts you supplied for this section that have no cited URL; they are written as plain prose.",
          "items": {
            "type": "string"
          },
          "title": "Uncited Claim Ids",
          "type": "array"
        }
      },
      "required": [
        "outline_id",
        "heading",
        "claim_count",
        "general_only"
      ],
      "title": "PublicKitSectionEvidence",
      "type": "object"
    },
    "PublicKitUnmetRequirement": {
      "description": "A kit element or citation rule the brief requires that the current\nkit cannot provide.",
      "properties": {
        "detail": {
          "default": "",
          "title": "Detail",
          "type": "string"
        },
        "element": {
          "$ref": "#/$defs/ArticleElement"
        },
        "reason": {
          "$ref": "#/$defs/RequiredElementReason"
        }
      },
      "required": [
        "element",
        "reason"
      ],
      "title": "PublicKitUnmetRequirement",
      "type": "object"
    },
    "RequiredElementReason": {
      "description": "Why a brief-required element is missing from the kit.",
      "enum": [
        "no_admitted_evidence",
        "build_failed",
        "below_min_items",
        "below_min_sources",
        "required_source_not_admitted"
      ],
      "title": "RequiredElementReason",
      "type": "string"
    }
  }
}