name: generateDocument
description: Comprehensive content generator for documentation that creates detailed, high-quality document content from various data sources with intelligent analysis.
instructions:
  - role: system
    url: ../../prompts/detail/generate/system-prompt.md
  - role: user
    url: ../../prompts/detail/generate/user-prompt.md
auto_reorder_system_messages: true
auto_merge_system_messages: true
input_schema:
  type: object
  properties:
    rules:
      type: string
      description: User's content generation rules and requirements
    locale:
      type: string
      description: User language, such as zh, en
    detailDataSource:
      type: string
      description: Source data and context for document content generation
    targetAudience:
      type: string
      description: Target audience for document content
    nodeName:
      type: string
      description: Document node name for content generation
    originalDocumentStructure: ../schema/document-structure.yaml
    title:
      type: string
    description:
      type: string
    path:
      type: string
    originalContent:
      type: string
      description: The original content of the document before update
    parentId:
      type:
        - string
        - "null"
    glossary:
      type: string
      description: Glossary
    additionalInformation:
      type: string
      description: Additional supplementary information
    intentType:
      type:
        - string
        - "null"
      description: User intent type analyzed from feedback (addDiagram, updateDiagram, deleteDiagram, updateDocument). Can be null if not specified.
      enum: ["addDiagram", "updateDiagram", "deleteDiagram", "updateDocument", null]
  required:
    - rules
    - detailDataSource
    - originalDocumentStructure
output_key: content
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
keep_text_in_tool_uses: false
# skills:
#   - ./generate-diagram.yaml
