{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://gomnee.com/schemas/gomnee-article-v2.json",
  "title": "Gomnee Article, typed (gomnee_article_v2)",
  "description": "The Article document Gomnee publishes, with typed modules: everything in gomnee_article_v1 plus a cover, FAQ, a procedure, a comparison, a verification note and taxonomy. Modules are null or empty when an Article has none; render each only when present. Rules this schema can't express: Section keys are unique. At most one image has the role hero; image keys are unique. An inline image names an existing section in sectionKey; the hero image's sectionKey is null. A decorative image has an empty alt; every other image has alt text. Every citation names an existing section. Citation keys are unique. FAQ keys and questions are unique (questions compared without case); an FAQ's sectionKey, when set, names an existing section, and its citationKeys name existing citations. A procedure names an existing section; its step keys are unique and their citations exist. A comparison names an existing section; column and row keys are unique, and every row has exactly one cell per column, each citing existing citations. Verification excerpts appear only with mode first_hand; their keys are unique, each names an existing section, and a screenshot excerpt names a non-decorative inline image in the same section. Generated from Gomnee's publishing contract on 24 November 2026. Gomnee delivers this document to a site's publishing endpoint today, and will serve it from a read-only API to sites that read their Articles from Gomnee.",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "summary": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1200
    },
    "contentFormat": {
      "type": "string",
      "const": "gomnee_article_v2"
    },
    "sections": {
      "minItems": 1,
      "maxItems": 30,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{0,79}$"
          },
          "heading": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "markdown": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128000
          }
        },
        "required": [
          "key",
          "heading",
          "markdown"
        ],
        "additionalProperties": false
      }
    },
    "presentation": {
      "type": "object",
      "properties": {
        "opening": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 12000
            },
            {
              "type": "null"
            }
          ]
        },
        "authors": {
          "minItems": 1,
          "maxItems": 5,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80,
                "pattern": "^[a-z][a-z0-9_-]*$"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "person",
                  "organization"
                ]
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "profileUrl": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 2048
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "key",
              "kind",
              "name",
              "profileUrl",
              "description"
            ],
            "additionalProperties": false
          }
        },
        "reviewer": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80,
                  "pattern": "^[a-z][a-z0-9_-]*$"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "person",
                    "organization"
                  ]
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "profileUrl": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 2048
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "key",
                "kind",
                "name",
                "profileUrl",
                "description"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "media": {
          "maxItems": 16,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80,
                "pattern": "^[a-z][a-z0-9_-]*$"
              },
              "role": {
                "type": "string",
                "enum": [
                  "hero",
                  "inline"
                ]
              },
              "sectionKey": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "pattern": "^[a-z][a-z0-9_-]*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "url": {
                "type": "string",
                "maxLength": 2048
              },
              "alt": {
                "type": "string",
                "maxLength": 1000
              },
              "decorative": {
                "type": "boolean"
              },
              "caption": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "credit": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "width": {
                "type": "integer",
                "minimum": 1,
                "maximum": 30000
              },
              "height": {
                "type": "integer",
                "minimum": 1,
                "maximum": 30000
              }
            },
            "required": [
              "key",
              "role",
              "sectionKey",
              "url",
              "alt",
              "decorative",
              "caption",
              "credit",
              "width",
              "height"
            ],
            "additionalProperties": false
          }
        },
        "citations": {
          "maxItems": 96,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80,
                "pattern": "^[a-z][a-z0-9_-]*$"
              },
              "sectionKey": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80,
                "pattern": "^[a-z][a-z0-9_-]*$"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "url": {
                "type": "string",
                "maxLength": 2048
              },
              "locator": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "key",
              "sectionKey",
              "label",
              "url",
              "locator"
            ],
            "additionalProperties": false
          }
        },
        "search": {
          "type": "object",
          "properties": {
            "title": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 240
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "title",
            "description"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "opening",
        "authors",
        "reviewer",
        "media",
        "citations",
        "search"
      ],
      "additionalProperties": false
    },
    "cover": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80,
          "pattern": "^[a-z][a-z0-9_-]*$"
        },
        "url": {
          "type": "string",
          "maxLength": 2048
        },
        "alt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1000
        },
        "caption": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 1200
            },
            {
              "type": "null"
            }
          ]
        },
        "credit": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            {
              "type": "null"
            }
          ]
        },
        "width": {
          "type": "integer",
          "minimum": 1,
          "maximum": 30000
        },
        "height": {
          "type": "integer",
          "minimum": 1,
          "maximum": 30000
        }
      },
      "required": [
        "key",
        "url",
        "alt",
        "caption",
        "credit",
        "width",
        "height"
      ],
      "additionalProperties": false
    },
    "faq": {
      "maxItems": 8,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "maxLength": 80,
            "pattern": "^[a-z][a-z0-9_-]{0,79}$"
          },
          "question": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "answerMarkdown": {
            "type": "string",
            "minLength": 1,
            "maxLength": 6000
          },
          "sectionKey": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80,
                "pattern": "^[a-z][a-z0-9_-]{0,79}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "citationKeys": {
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 80,
              "pattern": "^[a-z][a-z0-9_-]{0,79}$"
            }
          }
        },
        "required": [
          "key",
          "question",
          "answerMarkdown",
          "sectionKey",
          "citationKeys"
        ],
        "additionalProperties": false
      }
    },
    "procedure": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "sectionKey": {
              "type": "string",
              "maxLength": 80,
              "pattern": "^[a-z][a-z0-9_-]{0,79}$"
            },
            "prerequisitesMarkdown": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 12000
                },
                {
                  "type": "null"
                }
              ]
            },
            "steps": {
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "maxLength": 80,
                    "pattern": "^[a-z][a-z0-9_-]{0,79}$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 240
                  },
                  "instructionsMarkdown": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 12000
                  },
                  "expectedResultMarkdown": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 6000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "citationKeys": {
                    "maxItems": 32,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 80,
                      "pattern": "^[a-z][a-z0-9_-]{0,79}$"
                    }
                  }
                },
                "required": [
                  "key",
                  "name",
                  "instructionsMarkdown",
                  "expectedResultMarkdown",
                  "citationKeys"
                ],
                "additionalProperties": false
              }
            },
            "verificationMarkdown": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 12000
                },
                {
                  "type": "null"
                }
              ]
            },
            "troubleshootingMarkdown": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 12000
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "sectionKey",
            "prerequisitesMarkdown",
            "steps",
            "verificationMarkdown",
            "troubleshootingMarkdown"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "comparison": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "sectionKey": {
              "type": "string",
              "maxLength": 80,
              "pattern": "^[a-z][a-z0-9_-]{0,79}$"
            },
            "methodMarkdown": {
              "type": "string",
              "minLength": 1,
              "maxLength": 12000
            },
            "columns": {
              "minItems": 2,
              "maxItems": 12,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "maxLength": 80,
                    "pattern": "^[a-z][a-z0-9_-]{0,79}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 240
                  }
                },
                "required": [
                  "key",
                  "label"
                ],
                "additionalProperties": false
              }
            },
            "rows": {
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "maxLength": 80,
                    "pattern": "^[a-z][a-z0-9_-]{0,79}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 240
                  },
                  "cells": {
                    "minItems": 2,
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "columnKey": {
                          "type": "string",
                          "maxLength": 80,
                          "pattern": "^[a-z][a-z0-9_-]{0,79}$"
                        },
                        "markdown": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 6000
                        },
                        "citationKeys": {
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 80,
                            "pattern": "^[a-z][a-z0-9_-]{0,79}$"
                          }
                        }
                      },
                      "required": [
                        "columnKey",
                        "markdown",
                        "citationKeys"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "key",
                  "label",
                  "cells"
                ],
                "additionalProperties": false
              }
            },
            "limitationsMarkdown": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 12000
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "sectionKey",
            "methodMarkdown",
            "columns",
            "rows",
            "limitationsMarkdown"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "verification": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "first_hand",
                "docs_only",
                "not_applicable"
              ]
            },
            "disclosure": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                {
                  "type": "null"
                }
              ]
            },
            "lastVerifiedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 10,
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "versions": {
              "maxItems": 16,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "version": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  }
                },
                "required": [
                  "name",
                  "version"
                ],
                "additionalProperties": false
              }
            },
            "excerpts": {
              "maxItems": 16,
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "maxLength": 80,
                        "pattern": "^[a-z][a-z0-9_-]{0,79}$"
                      },
                      "sectionKey": {
                        "type": "string",
                        "maxLength": 80,
                        "pattern": "^[a-z][a-z0-9_-]{0,79}$"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "terminal_output",
                          "measurement"
                        ]
                      },
                      "command": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "content": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 6000
                      },
                      "capturedAt": {
                        "type": "string",
                        "maxLength": 10,
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      }
                    },
                    "required": [
                      "key",
                      "sectionKey",
                      "kind",
                      "command",
                      "content",
                      "capturedAt"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "maxLength": 80,
                        "pattern": "^[a-z][a-z0-9_-]{0,79}$"
                      },
                      "sectionKey": {
                        "type": "string",
                        "maxLength": 80,
                        "pattern": "^[a-z][a-z0-9_-]{0,79}$"
                      },
                      "kind": {
                        "type": "string",
                        "const": "screenshot"
                      },
                      "mediaKey": {
                        "type": "string",
                        "maxLength": 80,
                        "pattern": "^[a-z][a-z0-9_-]{0,79}$"
                      },
                      "capturedAt": {
                        "type": "string",
                        "maxLength": 10,
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      }
                    },
                    "required": [
                      "key",
                      "sectionKey",
                      "kind",
                      "mediaKey",
                      "capturedAt"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          },
          "required": [
            "mode",
            "disclosure",
            "lastVerifiedAt",
            "versions"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "taxonomy": {
      "type": "object",
      "properties": {
        "categories": {
          "maxItems": 16,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        },
        "tags": {
          "maxItems": 32,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        }
      },
      "required": [
        "categories",
        "tags"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "slug",
    "title",
    "summary",
    "contentFormat",
    "sections",
    "presentation",
    "faq",
    "procedure",
    "comparison",
    "verification",
    "taxonomy"
  ],
  "additionalProperties": false
}
