defaults:
  component: process_v2_router_plus_retrieval_policy

cases:
  - id: qg-t01-docs-overview-architecture
    query: "Объясни overview архитектуры сервиса уведомлений"
    expected:
      router:
        domain: DOCS
        intent: DOC_EXPLAIN
        sub_intent: SUMMARY
      retrieval_plan:
        profile_one_of: [docs_summary_architecture, docs_summary_generic]
        filters:
          prefer_path_prefixes_contains: [docs/architecture/]

  - id: qg-t02-docs-overview-flow
    query: "Дай overview по flow отправки уведомлений"
    expected:
      router:
        domain: DOCS
        intent: DOC_EXPLAIN
        sub_intent: SUMMARY
      retrieval_plan:
        profile_one_of: [docs_summary_logic_flow, docs_summary_generic]
        filters:
          prefer_path_prefixes_contains: [docs/logic/]

  - id: qg-t03-soft-arch-overview-notify
    query: "Arch overview по notify app"
    expected:
      route:
        routing_domain_one_of: [DOCS, GENERAL]
        intent_one_of: [DOC_EXPLAIN, GENERAL_QA]
        subintent: SUMMARY
      retrieval_plan:
        profile_one_of: [docs_summary_architecture, docs_summary_generic, general_qa_grounded_summary]

  - id: qg-t04-process-summary-filters
    query: "Объясни billing invoice process"
    expected:
      router:
        domain: DOCS
        intent: DOC_EXPLAIN
        sub_intent: SUMMARY
      route:
        anchors:
          process_domain: present
          process_subdomain: present
      retrieval_plan:
        if_anchor_present_then_filter_present:
          - anchor: anchors.process_domain
            filter: filters.metadata.domain
          - anchor: anchors.process_subdomain
            filter: filters.metadata.subdomain
        profile_one_of: [docs_summary_logic_flow, docs_summary_generic]

  - id: qg-t05-process-find-files-filters
    query: "Найди файл по billing invoice process"
    expected:
      router:
        domain: DOCS
        intent: DOC_EXPLAIN
        sub_intent: FIND_FILES
      route:
        anchors:
          process_domain: present
          process_subdomain: present
      retrieval_plan:
        profile: file_lookup
        if_anchor_present_then_filter_present:
          - anchor: anchors.process_domain
            filter: filters.metadata.domain
          - anchor: anchors.process_subdomain
            filter: filters.metadata.subdomain
        filters:
          prefer_path_prefixes_contains_any: [docs/domains/, docs/logic/]

  - id: qg-t06-soft-process-shaped-input
    query: "billing invoice docs"
    expected:
      route:
        routing_domain: DOCS
        intent: DOC_EXPLAIN
        subintent_one_of: [FIND_FILES, SUMMARY]
      retrieval_plan:
        profile_one_of: [file_lookup, docs_summary_logic_flow, docs_summary_generic]

  - id: qg-t07-clean-target-terms-architecture
    query: "Объясни architecture overview сервиса уведомлений"
    expected:
      router:
        domain: DOCS
        intent: DOC_EXPLAIN
        sub_intent: SUMMARY
      route:
        target_terms_not_contains: ["объясни", "overview", "architecture"]
      retrieval_plan:
        profile_one_of: [docs_summary_architecture, docs_summary_generic]

  - id: qg-t08-clean-target-terms-file-query
    query: "Найди doc for /health"
    expected:
      router:
        domain: DOCS
        intent: DOC_EXPLAIN
        sub_intent: FIND_FILES
      route:
        target_terms_contains: ["/health"]
        target_terms_not_contains: ["найди", "doc", "for"]
        anchors:
          endpoint_paths_contains: ["/health"]
          file_names_not_contains: ["/health"]
      retrieval_plan:
        profile: file_lookup
