type: team
name: updateDocumentStructure
description: Update documentation structure based on user feedback and intentions using structure modification tools
skills:
  - url: ../utils/analyze-structure-feedback-intent.yaml
  - type: ai
    instructions:
      - role: system
        url: ../../prompts/structure/update/system-prompt.md
      - role: user
        url: ../../prompts/structure/update/user-prompt.md
    input_schema:
      type: object
      properties:
        documentStructure: ../schema/document-structure.yaml
        rules:
          type: string
          description: User configuration rules
        locale:
          type: string
          description: User language, e.g. zh, en
        dataSourceChunk:
          type: string
          description: Context for documentation structure
        glossary:
          type: string
          description: Glossary of terms
        feedback:
          type: string
          description: User feedback for structure modifications
        userPreferences:
          type: string
          description: Your saved preferences for structure and documentation style
        needDataSources:
          type: boolean
          description: Whether data sources are needed for content modifications
      required:
        - documentStructure
        - feedback
    output_key: message
    afs:
      modules:
        - module: system-fs
          options:
            name: sources
            localPath: .
            description: |
              Codebase of the project to be documented used as context for document generation,
              should search and read as needed while generating document content
    skills:
      - ./document-structure-tools/add-document.mjs
      - ./document-structure-tools/delete-document.mjs
      - ./document-structure-tools/update-document.mjs
      - ./document-structure-tools/move-document.mjs
