# workflows/auto-flow.yaml
name: auto-flow
version: 7.0
description: L1/L2 自动流程

stages:
  - id: analysis
    skill: analysis
    agents:
      - role: research-agent
        task: 调研需求背景、竞品方案
    workers:
      - role: code-search-agent
        task: 搜索相关代码
    discussion:
      min_rounds: 1
      convergence_threshold: 0.7

  - id: discovery
    skill: discovery
    agents:
      - role: research-agent
        task: 代码图、语义索引、影响分析
    workers:
      - role: file-scanner-agent
        task: 扫描项目文件结构
    discussion:
      min_rounds: 1
      convergence_threshold: 0.7

  - id: planning
    skill: planning
    agents:
      - role: architecture-agent
        task: 架构选型、接口设计
    workers:
      - role: code-search-agent
        task: 搜索相关实现
    discussion:
      min_rounds: 1
      convergence_threshold: 0.7

  - id: execution
    skill: execution
    agents:
      - role: dev-agent
        task: 代码实现
    workers:
      - role: build-agent
        task: 执行构建和测试
    discussion:
      min_rounds: 1
      convergence_threshold: 0.7

  - id: delivery
    skill: delivery
    agents:
      - role: test-gen-agent
        task: 验证测试
    workers:
      - role: build-agent
        task: 执行构建验证
    discussion:
      min_rounds: 1
      convergence_threshold: 0.7
