# new-build MAIN workflow (v1.3.5 §3.1) — Workflow-of-Workflows.
#
# 신규 구축 기획: (아이디어 구체화 | 요구사항 분석) → 시장 조사 → 가설 수립.
# Chief 가 입력 맥락으로 메인을 추론(§3.1): "이 아이디어 기획해줘"→new-build.
# 시작점은 입력 구체성으로 판단 — 아이디어면 idea-refinement, 요구사항이 구체적이면
# Chief 가 stage-1 을 _workflow/requirements-analysis 로 교체한다(맥락 적응).
schema_version: 2
id: "new-build"
name: "New Build (planning)"
description: "신규 구축 기획 메인. 서브워크플로를 _workflow/ 로 합성: 아이디어 구체화(또는 요구사항 분석) → 시장 조사 → 가설 수립(공유)."
template_id: "new-build"

stages:
  - id: stage-1-frame
    agent: _workflow/idea-refinement
    task: |
      아이디어 구체화 서브워크플로 실행(default 시작점). 입력이 이미 구체적 요구사항이면
      Chief 가 이 stage 를 _workflow/requirements-analysis 로 교체한다(§3.1 맥락 적응).
    inputs: []
    outputs:
      - idea-section.md
    handoff_to: stage-2-market

  - id: stage-2-market
    agent: _workflow/market-research
    task: |
      시장 조사 서브워크플로 실행 → PRD §시장 + <org>/reports/ 리포트.
    inputs:
      - idea-section.md
    outputs:
      - market-section.md
    handoff_to: stage-3-hypothesis

  - id: stage-3-hypothesis
    agent: _workflow/hypothesis
    task: |
      가설 수립 서브워크플로 실행(개선 메인과 공유) → PRD §가설.
    inputs:
      - market-section.md
    outputs:
      - hypothesis-section.md
    handoff_to: null
