{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://kanoniq.extenza.dev/schema/page.schema.json",
  "title": "Kanoniq navigation page",
  "$comment": "GENERATED FILE — do not edit. See x-generated below.",
  "x-generated": {
    "warning": "GENERATED FILE — do not edit.",
    "copyright": "© 2026 Extenza Works. Licensed under PolyForm Shield 1.0.0; see LICENSE.",
    "source": "src/lib-core/src/site/",
    "generator": "src/lib-core/scripts/generate-json-schema.ts",
    "documentation": "https://kanoniq.extenza.dev/docs/site",
    "version": "0.4.1",
    "regenerate": "pnpm --filter @extenza-works/kanoniq-lib-core generate:schema"
  },
  "description": "Shape of one *.page.yml or *.page.yaml file. Shape only: the rules across files — names, mirror directories, the home page, tiles naming children — and whether Lucide has an icon are checked by kq portal:build.",
  "type": "object",
  "properties": {
    "status": {
      "default": "published",
      "type": "string",
      "enum": [
        "draft",
        "upcoming",
        "published"
      ],
      "description": "Whether a reader sees the page or tile: published by default.",
      "enumDescriptions": [
        "Not rendered and its tile not shown, nor any page below it, whatever their own status.",
        "Not rendered, nor any page below it; its tile is shown, not clickable, marked Coming soon.",
        "Rendered, its tile shown and clickable; the pages below it follow their own status."
      ]
    },
    "title": {
      "description": "The page's title. Defaults to its name as it reads, from its file name.",
      "type": "string",
      "minLength": 1
    },
    "description": {
      "type": "string",
      "pattern": "^[^\\r\\n]*\\S[^\\r\\n]*$",
      "description": "One line of plain text: under the title on the page, and on its tile."
    },
    "icon": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
      "description": "The page's icon, by its Lucide name: on its tile and beside its title; folder if none."
    },
    "announcement": {
      "type": "object",
      "properties": {
        "level": {
          "type": "string",
          "enum": [
            "info",
            "warning"
          ],
          "description": "How the banner is marked.",
          "enumDescriptions": [
            "Something a reader should know, such as where to start.",
            "Something a reader should be careful about, such as a page still being written."
          ]
        },
        "text": {
          "type": "string",
          "minLength": 1,
          "description": "The banner's text, in inline Markdown: emphasis, links and code, no headings or lists."
        }
      },
      "required": [
        "level",
        "text"
      ],
      "additionalProperties": false,
      "description": "A banner across the top of the page, above its title, whatever the page's status."
    },
    "text": {
      "description": "A short text between the title and the tiles, in Markdown with GitHub's tables, strikethrough, task lists and footnotes, images from portal/ and kanoniq-view blocks. Raw HTML is escaped.",
      "type": "string"
    },
    "tiles": {
      "description": "The page's tiles, in order. A child page not listed follows the listed tiles, by name.",
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "page": {
                "type": "string",
                "minLength": 1,
                "description": "The child page's or decision record's name as it reads, such as Order Management, not as its file is named."
              }
            },
            "required": [
              "page"
            ],
            "additionalProperties": false,
            "description": "A tile showing one of the page's children, linking to it."
          },
          {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "minLength": 1,
                "description": "The tile's title."
              },
              "description": {
                "type": "string",
                "pattern": "^[^\\r\\n]*\\S[^\\r\\n]*$",
                "description": "One line of plain text, under the tile's title."
              },
              "icon": {
                "type": "string",
                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                "description": "The tile's icon, by its Lucide name; network if none."
              },
              "status": {
                "default": "published",
                "description": "As a page's, published by default: draft hides the tile, upcoming shows it, not clickable.",
                "type": "string",
                "enum": [
                  "draft",
                  "upcoming",
                  "published"
                ],
                "enumDescriptions": [
                  "Not rendered and its tile not shown, nor any page below it, whatever their own status.",
                  "Not rendered, nor any page below it; its tile is shown, not clickable, marked Coming soon.",
                  "Rendered, its tile shown and clickable; the pages below it follow their own status."
                ]
              },
              "view": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "minLength": 1,
                    "description": "A Domain's path, such as shop/selling: its layered view. Without it, the view is of the whole model."
                  },
                  "focus": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "description": "One element's path, such as shop/selling/cart."
                      },
                      {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "description": "An element's path."
                        },
                        "description": "Several elements' paths, the view centered on all of them."
                      }
                    ],
                    "description": "An element's path, or a list of them: the whole model, centered on those elements and what they touch. Not with domain."
                  },
                  "lens": {
                    "type": "string",
                    "enum": [
                      "all",
                      "implementation",
                      "communication",
                      "data"
                    ],
                    "description": "Which aspect the view shows: which relationships it draws and which elements it hides, all by default.",
                    "enumDescriptions": [
                      "Every relationship; Storages and Data Entities hidden.",
                      "Realization, which Components realize which Functions; Channels hidden.",
                      "Connections, who calls whom; Domains and Function Groups hidden.",
                      "Ownership and the other data relationships, with the Storages and Data Entities no other lens draws."
                    ]
                  },
                  "interfaces": {
                    "type": "string",
                    "enum": [
                      "all",
                      "used",
                      "none"
                    ],
                    "description": "Which Interfaces the view draws, all by default.",
                    "enumDescriptions": [
                      "Every Interface of every box drawn.",
                      "Only the Interfaces a Connection drawn on the view reaches.",
                      "No Interfaces: a line ending at one is drawn to the Component holding it."
                    ]
                  },
                  "structure": {
                    "type": "boolean",
                    "description": "Draws the lines that say what holds what, realization and containment; off by default."
                  },
                  "channels": {
                    "type": "boolean",
                    "description": "Draws each Channel as a box of its own, its lines leg by leg, rather than folded into one line from publisher to subscriber; off by default."
                  },
                  "assumptions": {
                    "type": "boolean",
                    "description": "Marks each assumed element and relationship with a ?, as the editor's toggle does; on by default."
                  },
                  "selected": {
                    "type": "string",
                    "minLength": 1,
                    "description": "An element's path: the element shown selected, with its details open."
                  },
                  "collapsed": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "description": "An element's path; on the layered view, path@column."
                    },
                    "description": "The boxes drawn collapsed, their contents hidden."
                  },
                  "show": {
                    "type": "string",
                    "enum": [
                      "diagram",
                      "kq",
                      "json",
                      "debug"
                    ],
                    "description": "Which tab the view opens on, the diagram by default.",
                    "enumDescriptions": [
                      "The diagram.",
                      "The model's source, in the Kanoniq language.",
                      "The canonical model, as JSON.",
                      "The layout, for finding out why a box is where it is."
                    ]
                  },
                  "erd": {
                    "type": "boolean",
                    "description": "The Domain's entity-relationship diagram of its Tangible data rather than its layered view; needs domain."
                  },
                  "cardinality": {
                    "type": "string",
                    "enum": [
                      "multiplicity",
                      "crowsfoot"
                    ],
                    "description": "How the ERD writes cardinality, multiplicity by default; needs erd.",
                    "enumDescriptions": [
                      "As numbers at each end of a line, such as 1 and 0..*.",
                      "As crow's-foot marks at each end of a line."
                    ]
                  },
                  "properties": {
                    "type": "string",
                    "enum": [
                      "all",
                      "ids",
                      "none"
                    ],
                    "description": "Which significant properties the ERD's entities list, all by default; needs erd.",
                    "enumDescriptions": [
                      "Every significant property.",
                      "Only the properties that identify the entity.",
                      "No properties: each entity shows its name only."
                    ]
                  },
                  "enablers": {
                    "type": "boolean",
                    "description": "The layered view's Enablers band, or an Enabler Domain's callers on its own view; on by default."
                  },
                  "functions": {
                    "type": "boolean",
                    "description": "The layered view's Functions band, each Function over the Components realizing it; off by default."
                  },
                  "iam": {
                    "type": "string",
                    "minLength": 1,
                    "description": "An Identity Provider's, Platform's or monolith's path: its IAM view, who can sign in where and with which Roles."
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "provider",
                      "platform"
                    ],
                    "description": "Which end the IAM view is anchored on, provider by default; needs iam.",
                    "enumDescriptions": [
                      "The Identity Provider, with the Platforms that trust it around it.",
                      "The Platform or monolith, with the Identity Providers it trusts around it."
                    ]
                  },
                  "otherProviders": {
                    "type": "boolean",
                    "description": "On an Identity Provider's IAM view, the other providers' Roles, dimmed; off by default, needs iam."
                  },
                  "jobRoles": {
                    "type": "boolean",
                    "description": "On either IAM view, the job roles holding its Roles, in a band of their own; off by default, needs iam."
                  },
                  "motivation": {
                    "type": "string",
                    "minLength": 1,
                    "description": "An Ecosystem's path: its motivation view, why the architecture is as it is."
                  },
                  "realizations": {
                    "type": "boolean",
                    "description": "The motivation view's Realized by band and its lines; on by default, needs motivation."
                  },
                  "valueStream": {
                    "type": "string",
                    "minLength": 1,
                    "description": "A value stream's path: its value-stream view, what it delivers and what carries each stage. Not with any other view's parameter."
                  },
                  "env": {
                    "type": "string",
                    "minLength": 1,
                    "description": "A stage's path, such as shop/PRD: its deployment view, what runs there and how many of each. Not with domain, focus, iam, motivation or valueStream."
                  },
                  "impactMap": {
                    "type": "string",
                    "minLength": 1,
                    "description": "A Goal's path: its impact map, the impacts on it by actor, what causes each and what builds that. Not with domain, focus, iam, motivation, valueStream or env."
                  },
                  "components": {
                    "type": "boolean",
                    "description": "The impact map's Built by band and its lines; on by default, needs impactMap."
                  },
                  "scenario": {
                    "type": "string",
                    "minLength": 1,
                    "description": "A scenario's path: its scenario view, which system asks or tells which, in what order. Not with any other view's parameter."
                  },
                  "process": {
                    "type": "string",
                    "minLength": 1,
                    "description": "A business process's path: its process view, its lanes and what flows through them. Not with any other view's parameter."
                  },
                  "dataFlow": {
                    "type": "string",
                    "minLength": 1,
                    "description": "A value stream stage's path: its data-flow view, what the stage holds and what moves between its holdings. Not with any other view's parameter."
                  },
                  "contextMap": {
                    "type": "string",
                    "minLength": 1,
                    "description": "An Ecosystem's path: its context map, its bounded contexts and the patterns between them. With focus, one of its contexts and its neighbors. Not with any other view's parameter."
                  },
                  "canvas": {
                    "type": "string",
                    "minLength": 1,
                    "description": "A bounded context's path, the element marked bounded-context: its Bounded Context Canvas, a one-page summary of the context. Not with any other view's parameter."
                  },
                  "at": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The plateau the view is drawn in, by its Code. Required: every view is of a stated point in time."
                  },
                  "to": {
                    "description": "A later plateau, by its Code: the transition from at to it.",
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "at"
                ],
                "additionalProperties": false,
                "description": "The view a tile opens, as the web editor's address takes it. The model is always the one whose repository holds the page.",
                "not": {
                  "required": [
                    "domain",
                    "focus"
                  ]
                },
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "erd": {
                          "const": true
                        }
                      },
                      "required": [
                        "erd"
                      ]
                    },
                    "then": {
                      "required": [
                        "domain"
                      ]
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "cardinality"
                      ]
                    },
                    "then": {
                      "properties": {
                        "erd": {
                          "const": true
                        }
                      },
                      "required": [
                        "erd"
                      ]
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "properties"
                      ]
                    },
                    "then": {
                      "properties": {
                        "erd": {
                          "const": true
                        }
                      },
                      "required": [
                        "erd"
                      ]
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "iam"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "domain"
                            ]
                          },
                          {
                            "required": [
                              "focus"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  {
                    "if": {
                      "anyOf": [
                        {
                          "required": [
                            "side"
                          ]
                        },
                        {
                          "required": [
                            "otherProviders"
                          ]
                        },
                        {
                          "required": [
                            "jobRoles"
                          ]
                        }
                      ]
                    },
                    "then": {
                      "required": [
                        "iam"
                      ]
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "motivation"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "domain"
                            ]
                          },
                          {
                            "required": [
                              "focus"
                            ]
                          },
                          {
                            "required": [
                              "iam"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "realizations"
                      ]
                    },
                    "then": {
                      "required": [
                        "motivation"
                      ]
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "env"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "domain"
                            ]
                          },
                          {
                            "required": [
                              "focus"
                            ]
                          },
                          {
                            "required": [
                              "iam"
                            ]
                          },
                          {
                            "required": [
                              "motivation"
                            ]
                          },
                          {
                            "required": [
                              "valueStream"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "valueStream"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "domain"
                            ]
                          },
                          {
                            "required": [
                              "focus"
                            ]
                          },
                          {
                            "required": [
                              "iam"
                            ]
                          },
                          {
                            "required": [
                              "motivation"
                            ]
                          },
                          {
                            "required": [
                              "realizations"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "impactMap"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "domain"
                            ]
                          },
                          {
                            "required": [
                              "focus"
                            ]
                          },
                          {
                            "required": [
                              "iam"
                            ]
                          },
                          {
                            "required": [
                              "motivation"
                            ]
                          },
                          {
                            "required": [
                              "valueStream"
                            ]
                          },
                          {
                            "required": [
                              "env"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "components"
                      ]
                    },
                    "then": {
                      "required": [
                        "impactMap"
                      ]
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "scenario"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "domain"
                            ]
                          },
                          {
                            "required": [
                              "focus"
                            ]
                          },
                          {
                            "required": [
                              "iam"
                            ]
                          },
                          {
                            "required": [
                              "motivation"
                            ]
                          },
                          {
                            "required": [
                              "valueStream"
                            ]
                          },
                          {
                            "required": [
                              "env"
                            ]
                          },
                          {
                            "required": [
                              "impactMap"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "process"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "domain"
                            ]
                          },
                          {
                            "required": [
                              "focus"
                            ]
                          },
                          {
                            "required": [
                              "iam"
                            ]
                          },
                          {
                            "required": [
                              "motivation"
                            ]
                          },
                          {
                            "required": [
                              "valueStream"
                            ]
                          },
                          {
                            "required": [
                              "env"
                            ]
                          },
                          {
                            "required": [
                              "impactMap"
                            ]
                          },
                          {
                            "required": [
                              "scenario"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "dataFlow"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "domain"
                            ]
                          },
                          {
                            "required": [
                              "focus"
                            ]
                          },
                          {
                            "required": [
                              "iam"
                            ]
                          },
                          {
                            "required": [
                              "motivation"
                            ]
                          },
                          {
                            "required": [
                              "valueStream"
                            ]
                          },
                          {
                            "required": [
                              "env"
                            ]
                          },
                          {
                            "required": [
                              "impactMap"
                            ]
                          },
                          {
                            "required": [
                              "scenario"
                            ]
                          },
                          {
                            "required": [
                              "process"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "contextMap"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "domain"
                            ]
                          },
                          {
                            "required": [
                              "iam"
                            ]
                          },
                          {
                            "required": [
                              "motivation"
                            ]
                          },
                          {
                            "required": [
                              "valueStream"
                            ]
                          },
                          {
                            "required": [
                              "env"
                            ]
                          },
                          {
                            "required": [
                              "impactMap"
                            ]
                          },
                          {
                            "required": [
                              "scenario"
                            ]
                          },
                          {
                            "required": [
                              "process"
                            ]
                          },
                          {
                            "required": [
                              "dataFlow"
                            ]
                          },
                          {
                            "required": [
                              "focus"
                            ],
                            "properties": {
                              "focus": {
                                "type": "array",
                                "minItems": 2
                              }
                            }
                          }
                        ]
                      }
                    }
                  },
                  {
                    "if": {
                      "required": [
                        "canvas"
                      ]
                    },
                    "then": {
                      "not": {
                        "anyOf": [
                          {
                            "required": [
                              "domain"
                            ]
                          },
                          {
                            "required": [
                              "focus"
                            ]
                          },
                          {
                            "required": [
                              "iam"
                            ]
                          },
                          {
                            "required": [
                              "motivation"
                            ]
                          },
                          {
                            "required": [
                              "valueStream"
                            ]
                          },
                          {
                            "required": [
                              "env"
                            ]
                          },
                          {
                            "required": [
                              "impactMap"
                            ]
                          },
                          {
                            "required": [
                              "scenario"
                            ]
                          },
                          {
                            "required": [
                              "process"
                            ]
                          },
                          {
                            "required": [
                              "dataFlow"
                            ]
                          },
                          {
                            "required": [
                              "contextMap"
                            ]
                          }
                        ]
                      }
                    }
                  }
                ]
              }
            },
            "required": [
              "title",
              "description",
              "view"
            ],
            "additionalProperties": false,
            "description": "A tile opening a view of the model. It has no page of its own, so it carries its own title and description."
          }
        ],
        "description": "A page tile, naming a child, or a view tile, opening a view."
      }
    }
  },
  "required": [
    "description"
  ],
  "additionalProperties": false
}
