{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/robowrite-ai/json-schema/robowrite-ai-public-program-template-schema.json",
  "title": "PublicProgramTemplate",
  "description": "One first-party programmatic-SEO template family.\n\nA family answers exactly two questions and nothing else: how a program's\nscope expands into a page list, and what the generator needs for one page of\nthat shape. Nothing specific to your site (slugs, title patterns, section\noutlines, attribute names) is part of a family — those come from the\nprogram's own scope, which is what lets one family serve many programs.",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/robowrite-ai-openapi.yml#/components/schemas/PublicProgramTemplate",
  "properties": {
    "display_name": {
      "description": "Human-readable label.",
      "title": "Display Name",
      "type": "string"
    },
    "entities_per_page_max": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Most in-scope entities that may appear on one page. `null` means unbounded — your program's scope supplies the ceiling.",
      "title": "Entities Per Page Max"
    },
    "entities_per_page_min": {
      "description": "Fewest in-scope entities that may appear on one page.",
      "title": "Entities Per Page Min",
      "type": "integer"
    },
    "expansion_unit": {
      "$ref": "#/$defs/TemplateExpansionUnit",
      "description": "What ONE page corresponds to: a combination of in-scope entities, a facet, or a single entity. Together with the entity bounds this is how many pages a given scope will produce."
    },
    "family": {
      "$ref": "#/$defs/TemplateFamily",
      "description": "Stable identifier. Pass this as `template_family` when creating a program."
    },
    "required_generator_inputs": {
      "description": "The structured input kinds a page of this family is written against. They shape the generation prompt. Two of them also gate the write: `attribute_matrix` (`comparison`) and `entity_profiles` (`entity_review`) are supplied per entity through `POST /programs/{program_id}/facts` — the platform's generate-time research can also supply the matrix, and a fact you supplied wins over a researched one for the same entity and attribute. A page whose gated input is still unusable when `pages:generate` reaches it is marked `blocked` rather than written (`generation_state: blocked`, with `blocked_inputs` naming the kind) and counted on the generate job result as `pages_skipped_missing_inputs`; supply the facts and run `pages:generate` again. `listicle` pages are never blocked. The other kinds shape the prompt only and have no request field.",
      "items": {
        "$ref": "#/$defs/TemplateGeneratorInput"
      },
      "title": "Required Generator Inputs",
      "type": "array"
    },
    "summary": {
      "description": "One sentence on what pages this produces.",
      "title": "Summary",
      "type": "string"
    }
  },
  "required": [
    "family",
    "display_name",
    "summary",
    "expansion_unit",
    "entities_per_page_min",
    "required_generator_inputs"
  ],
  "type": "object",
  "$defs": {
    "TemplateExpansionUnit": {
      "description": "What one page of an expanded program corresponds to.\n\nThis decides how many pages a scope produces: one page per combination of\nin-scope entities, one page per facet, or one page per entity.",
      "enum": [
        "entity_pair",
        "entity_facet",
        "single_entity"
      ],
      "title": "TemplateExpansionUnit",
      "type": "string"
    },
    "TemplateFamily": {
      "description": "Page archetype a programmatic-SEO program builds.",
      "enum": [
        "comparison",
        "listicle",
        "entity_review"
      ],
      "title": "TemplateFamily",
      "type": "string"
    },
    "TemplateGeneratorInput": {
      "description": "A structured input kind the generator is told to build a page around.\n\nThese are generic input kinds. The concrete values behind each kind come\nfrom the program's own scope and the facts recorded for it, so a family\nstays reusable.\n\nTwo kinds also gate the write. `attribute_matrix` (a `comparison` page)\nand `entity_profiles` (an `entity_review` page) are supplied per entity\nthrough `POST /programs/{program_id}/facts`; the platform's generate-time\nresearch can also supply the matrix, and a supplied fact wins over a\nresearched one for the same entity and attribute. A page whose gated\ninput is still unusable is marked `blocked` at the generate stage rather\nthan written (`generation_state: blocked`, with `blocked_inputs` naming\nthe kind) and counted on the generate job result as\n`pages_skipped_missing_inputs`; supply the facts and run `pages:generate`\nagain. `listicle` pages are never blocked. The other kinds shape the\ngeneration prompt and nothing else, and have no request field.",
      "enum": [
        "entity_profiles",
        "attribute_matrix",
        "facet_definition",
        "ranking_criterion",
        "verdict_criteria"
      ],
      "title": "TemplateGeneratorInput",
      "type": "string"
    }
  }
}