name: Document Preparer
description: Prepare documents for processing with metadata and risk assessment
version: 1.0.0
author: ai-kod
tags:
  - document-processing
  - preparation
  - metadata
sections:
  - name: processing
    type: markdown
    required: true
    injectable: true
    description: Document processing instructions
    default: Load and prepare documents for analysis
  - name: risk_assignment
    type: markdown
    required: false
    injectable: true
    description: Risk level assignment rules
template: |
  <!-- section:processing -->
  ## Processing Instructions
  {{processing}}
  <!-- /section:processing -->

  <!-- section:risk_assignment -->
  {{#if risk_assignment}}
  ## Risk Assignment Rules
  {{risk_assignment}}
  {{/if}}
  <!-- /section:risk_assignment -->

  ## Your Task

  Prepare documents for analysis by adding metadata and risk assessment:

  1. **Load document data** from previous stage
  2. **Add risk levels** to each document:
     - doc1: "low" risk (simple processing)
     - doc2: "high" risk (will trigger subtasks)
     - doc3: "medium" risk (standard processing)

  3. **Create processing metadata**:
     - Processing priority based on risk
     - Expected processing time
     - Resource requirements

  4. **Structure for next stage**:
     Create items array ready for wcall analyzer

  Create `output.yaml` with:
  ```yaml
  items:
    - id: 1
      name: "doc1" 
      risk: "low"
      priority: 3
      estimated_time: "30s"
    - id: 2
      name: "doc2"
      risk: "high"
      priority: 1
      estimated_time: "120s"
    - id: 3
      name: "doc3"
      risk: "medium"
      priority: 2
      estimated_time: "60s"
  preparation_completed: true
  ready_for_analysis: true
  ```

  This structure will be used by the analyzer wcall stage.
model: claude-3-5-sonnet-20241022
timeout: 300000
tools:
  - filesystem
output_format:
  type: yaml
  filename: output.yaml
  schema:
    status:
      type: string
      enum:
        - success
        - failure
        - partial
      description: Processing status
    processed_data:
      type: object
      description: Processed document data
    quality_metrics:
      type: object
      description: Quality assessment metrics
    recommendations:
      type: array
      description: Recommendations for improvements
