defaults:
  component: process_v2_router_plus_retrieval_policy_rag
  rag_session_id: "694cd10b-3842-4579-8d53-e54ec4291eae"

cases:
  - id: rag-t01-architecture-summary
    query: "Объясни overview архитектуры сервиса уведомлений"
    expected:
      router:
        domain: DOCS
        intent: DOC_EXPLAIN
        sub_intent: SUMMARY
      route:
        anchors:
          target_doc_hints_contains:
            - "docs/architecture/telegram-notify-app-overview.md"
      retrieval_plan:
        profile: docs_summary_architecture
        filters:
          prefer_path_prefixes_contains:
            - "docs/architecture/"
      rag:
        paths_contains:
          - "docs/architecture/telegram-notify-app-overview.md"
        layers_contains:
          - "D5_RELATION_GRAPH"
          - "D1_DOCUMENT_CATALOG"

  - id: rag-t02-docs-index-find-files
    query: "Найди файл-индекс документации проекта"
    expected:
      router:
        domain: DOCS
        intent: DOC_EXPLAIN
        sub_intent: FIND_FILES
      route:
        anchors:
          target_doc_hints_contains:
            - "docs/README.md"
      retrieval_plan:
        profile: file_lookup
        filters:
          path_prefixes_contains:
            - "docs/"
      rag:
        paths_contains:
          - "docs/README.md"
        layers_contains:
          - "D1_DOCUMENT_CATALOG"

  - id: rag-t03-general-docs-overview
    query: "Что входит в документацию этого проекта?"
    expected:
      router:
        domain: GENERAL
        intent: GENERAL_QA
        sub_intent: SUMMARY
      retrieval_plan:
        profile: general_qa_grounded_summary
      rag:
        paths_contains:
          - "docs/README.md"
          - "docs/architecture/telegram-notify-app-overview.md"
        layers_contains:
          - "D1_DOCUMENT_CATALOG"
          - "D0_DOC_CHUNKS"

  - id: rag-t04-errors-catalog-find-files
    query: "В каком файле лежит каталог ошибок?"
    expected:
      router:
        domain: DOCS
        intent: DOC_EXPLAIN
        sub_intent: FIND_FILES
      route:
        anchors:
          target_doc_hints_contains:
            - "docs/errors/catalog.yaml"
      retrieval_plan:
        profile: file_lookup
        filters:
          path_prefixes_contains:
            - "docs/errors/"
      rag:
        paths_contains:
          - "docs/errors/catalog.yaml"
        layers_contains:
          - "D1_DOCUMENT_CATALOG"

  - id: rag-t05-errors-catalog-general
    query: "Объясни каталог ошибок"
    expected:
      router:
        domain: GENERAL
        intent: GENERAL_QA
        sub_intent: SUMMARY
      route:
        anchors:
          target_doc_hints_contains:
            - "docs/errors/catalog.yaml"
      retrieval_plan:
        profile: general_qa_grounded_summary
      rag:
        paths_contains:
          - "docs/errors/catalog.yaml"

  - id: rag-t06-health-summary-chain
    query: "Объясни endpoint /health"
    expected:
      router:
        domain: DOCS
        intent: DOC_EXPLAIN
        sub_intent: SUMMARY
      route:
        anchors:
          endpoint_paths_contains:
            - "/health"
          file_names_not_contains:
            - "/health"
      retrieval_plan:
        profile: docs_summary_api_endpoint
        filters:
          prefer_path_prefixes_contains:
            - "docs/api/"
      rag:
        paths_contains_any:
          - "docs/README.md"
          - "docs/architecture/telegram-notify-app-overview.md"
        layers_contains:
          - "D2_FACT_INDEX"

  - id: rag-t07-health-find-files-empty
    query: "Где описан endpoint /health"
    expected:
      router:
        domain: DOCS
        intent: DOC_EXPLAIN
        sub_intent: FIND_FILES
      route:
        anchors:
          endpoint_paths_contains:
            - "/health"
          target_doc_hints_contains:
            - "docs/api/health-endpoint.md"
      retrieval_plan:
        profile: file_lookup
      rag:
        row_count: 0
        paths: absent
        layers: absent

  - id: rag-t08-notifications-workflow-metadata
    query: "Объясни notifications workflow"
    expected:
      router:
        domain: DOCS
        intent: DOC_EXPLAIN
        sub_intent: SUMMARY
      route:
        anchors:
          process_domain: notifications
      retrieval_plan:
        profile: docs_summary_logic_flow
        filters:
          metadata.domain: notifications
          prefer_path_prefixes_contains:
            - "docs/logic/"
      rag:
        paths_contains:
          - "docs/architecture/telegram-notify-app-overview.md"
        metadata_domains_contains:
          - "notifications"

  - id: rag-t09-mixed-summary-generic
    query: "Как архитектурно устроен endpoint /send"
    expected:
      router:
        domain: DOCS
        intent: DOC_EXPLAIN
        sub_intent: SUMMARY
      route:
        anchors:
          endpoint_paths_contains:
            - "/send"
      retrieval_plan:
        profile: docs_summary_generic
        filters:
          prefer_path_prefixes_contains:
            - "docs/api/"
            - "docs/architecture/"
      rag:
        paths_contains:
          - "docs/architecture/telegram-notify-app-overview.md"
