# yaml-language-server: $schema=https://raw.githubusercontent.com/jackchuka/mdschema/main/schema.json

structure:
  - heading:
      expr: "slug(filename) == slug(heading)"
    children:
      # ===================
      # REQUIRED SECTIONS
      # ===================

      # What this feature does - REQUIRED
      - heading: "## Overview"

      # Business context - REQUIRED
      # Why this feature exists and what problem it solves
      - heading: "## Business Purpose"

      # How it works - REQUIRED
      # Process flow
      - heading: "## Process Flow"
        description: |
          Describe the end-to-end process flow of this feature.
          If multiple flows exist, split them into different diagrams and explain each.
        code_blocks:
          - lang: mermaid
            min: 1

      # Scenario Patterns, including edge cases - REQUIRED
      - heading: "## Scenario Patterns"
        lists:
          - min: 1
            type: unordered
            min_items: 1

      # Test cases must be covered - REQUIRED
      - heading: "## Test Cases"
        lists:
          - min: 0
            type: unordered
            min_items: 1

      # Links to any related references - REQUIRED
      - heading: "## Reference Links"
        lists:
          - min: 0
            type: unordered
            min_items: 1

# Link validation
links:
  validate_internal: true
  validate_files: true

# Heading rules
heading_rules:
  no_skip_levels: true
  unique: true
  max_depth: 4
