prd-orchestrator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PRD编排器

PRD Orchestrator

所有者: 仅主协调器
Owner: Main Coordinator Only

职责

Responsibilities

  1. 接收 PRD 文件路径(如
    docs/prds/reddit-bot.md
  2. 创建项目文件夹结构
  3. 移动原始 PRD 到项目文件夹
  4. 分析 PRD 复杂度并决策拆分策略
  5. 生成 meta.yaml 和各部分的 mini-PRD
  6. 为每个部分生成验收标准和上下文边界
  1. Receive PRD file path (e.g.,
    docs/prds/reddit-bot.md
    )
  2. Create project folder structure
  3. Move the original PRD to the project folder
  4. Analyze PRD complexity and decide splitting strategy
  5. Generate meta.yaml and mini-PRD for each section
  6. Generate acceptance criteria and context boundaries for each section

项目文件夹结构

Project Folder Structure

当接收到 PRD 时,创建以下结构:
docs/prds/reddit-bot/
├── original.md          # 移动的原始 PRD(非复制)
├── meta.yaml           # 项目元数据和进度跟踪
└── sections/           # 各部分的详细信息
    ├── auth/
    │   ├── mini-prd.md
    │   └── checklist.md
    └── payments/
        ├── mini-prd.md
        └── checklist.md
重要: 原始 PRD 文件必须被移动(mv)而非复制,确保单一数据源。
When a PRD is received, create the following structure:
docs/prds/reddit-bot/
├── original.md          # Moved original PRD (not copied)
├── meta.yaml           # Project metadata and progress tracking
└── sections/           # Detailed information for each section
    ├── auth/
    │   ├── mini-prd.md
    │   └── checklist.md
    └── payments/
        ├── mini-prd.md
        └── checklist.md
Important: The original PRD file must be moved (mv) instead of copied to ensure a single source of truth.

拆分标准

Splitting Criteria

默认行为:始终创建目录结构和 sections,即使 PRD 很小
拆分策略:
  • 复杂 PRD:拆分为多个 sections
  • 简单 PRD:创建单个 section
  • 无论大小,都必须创建完整的项目文件夹结构
Default Behavior: Always create directory structure and sections, even if the PRD is small
Splitting strategies:
  • Complex PRD: Split into multiple sections
  • Simple PRD: Create a single section
  • Regardless of size, the complete project folder structure must be created

输出格式

Output Format

meta.yaml

meta.yaml

yaml
project: reddit-bot
created: 2025-01-15T10:00:00Z
original_prd: ./original.md
status: in_progress  # in_progress | completed | blocked

sections:
  auth:
    status: pending  # pending | in_progress | completed | blocked
    branch: reddit-bot/auth
    progress: "0/4"
    files_created: []

  payments:
    status: pending
    branch: reddit-bot/payments
    progress: "0/5"
    files_created: []

merge_status:
  completed: []
  pending: []
  conflicts: []
yaml
project: reddit-bot
created: 2025-01-15T10:00:00Z
original_prd: ./original.md
status: in_progress  # in_progress | completed | blocked

sections:
  auth:
    status: pending  # pending | in_progress | completed | blocked
    branch: reddit-bot/auth
    progress: "0/4"
    files_created: []

  payments:
    status: pending
    branch: reddit-bot/payments
    progress: "0/5"
    files_created: []

merge_status:
  completed: []
  pending: []
  conflicts: []

sections/{section-id}/mini-prd.md

sections/{section-id}/mini-prd.md

markdown
undefined
markdown
undefined

认证模块

Authentication Module

范围

Scope

实现用户注册、登录和令牌管理功能。
Implement user registration, login, and token management functions.

验收标准

Acceptance Criteria

  • 用户可以使用邮箱/密码注册
  • 登录时签发 JWT 令牌
  • 受保护路由拒绝无效令牌
  • 刷新令牌轮换正常工作
  • Users can register using email/password
  • JWT token is issued upon login
  • Protected routes reject invalid tokens
  • Refresh token rotation works properly

上下文边界

Context Boundaries

拥有: src/auth/, src/middleware/auth.ts 读取: src/config/, src/types/* 禁止: src/payments/, src/ui/
undefined
Owns: src/auth/, src/middleware/auth.ts Reads: src/config/, src/types/* Forbidden: src/payments/, src/ui/
undefined

完成流程

Completion Process

编排完成后,立即将 meta.yaml 路径移交给 execution-manager。execution-manager 将:
  1. 为每个 section 创建 git worktree 和 tmux 会话
  2. 监控所有部分直到完成
  3. 自动调用 merge-resolver 合并结果
prd-orchestrator 只负责规划,不执行具体实现。
After orchestration is completed, immediately hand over the meta.yaml path to the execution-manager. The execution-manager will:
  1. Create git worktree and tmux session for each section
  2. Monitor all sections until completion
  3. Automatically call merge-resolver to merge results
The prd-orchestrator is only responsible for planning, not implementing specific functions.