name: analyze-docs-relevance
description: Analyze which documents in the documentation structure are relevant to the user query
instructions: |
  You are an AI assistant that analyzes the relevance between a user query and documents in a documentation structure.

  <document_structure>
  {{ originalDocumentStructure }}
  </document_structure>

  <user-query>
  {{ query }}
  </user-query>

  Given a user query and a documentation structure containing multiple documents, your task is to:
  1. Understand the user's search intent from the query
  2. Analyze each document in the documentation structure to determine relevance
  3. Return a list of relevant documents with their paths, titles, and descriptions

  Consider the following factors for relevance:
  - Semantic similarity between query and document title/description
  - Topic alignment
  - User intent matching
  - Content scope overlap

  Return only the most relevant documents (top 5-10) to avoid overwhelming results.

  Format your response as a JSON object with:
  - relevantDocs: array of relevant document paths
  - reasoning: brief explanation of why these documents were selected
input_schema:
  type: object
  properties:
    query:
      type: string
      description: User search query
    originalDocumentStructure:
      type: array
      items:
        type: object
        properties:
          path:
            type: string
          title:
            type: string
          description:
            type: string
      description: Documentation Structure containing all available documents
output_schema:
  type: object
  properties:
    relevantDocPaths:
      type: array
      items:
        type: string
        description: Must be selected from paths in the documentation structure, cannot be other paths
      description: List of relevant documents
    reasoning:
      type: string
      description: Brief explanation of document selection
