prd-generator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PRD Generator

PRD生成器

Generate comprehensive Product Requirements Documents from validated idea files.
从已验证的想法文件生成全面的产品需求文档。

Input

输入

Preferred: project folder path in
$ARGUMENTS
containing:
  • idea.md
    - Product concept and technical context (required)
  • validate.md
    - Evaluation and recommendations (required)
If path is not provided (auto-pick mode):
  1. Reuse the most recent project folder path from this chat/session (typically from idea-validator output).
  2. If unavailable, use env var
    IDEAS_ROOT
    when present.
  3. Else check shared marker file
    ~/.config/ideas-root.txt
    .
  4. Backward compatibility fallback:
    ~/.openclaw/ideas-root.txt
    .
  5. If still unavailable, auto-discover the newest folder containing both
    idea.md
    +
    validate.md
    under:
    • /home/luongnv/workspace/ideas
      (default)
    • /home/luongnv/workspace/idea-2-prd
      (legacy fallback)
  6. If multiple candidates are plausible, ask user to choose.
优先选择:
$ARGUMENTS
中指定的项目文件夹路径,需包含:
  • idea.md
    - 产品概念与技术背景(必填)
  • validate.md
    - 评估与建议(必填)
若未提供路径(自动选择模式):
  1. 复用本次对话/会话中最近使用的项目文件夹路径(通常来自idea-validator的输出)。
  2. 若不可用,使用环境变量
    IDEAS_ROOT
    (若存在)。
  3. 否则检查共享标记文件
    ~/.config/ideas-root.txt
  4. 兼容回退方案:
    ~/.openclaw/ideas-root.txt
  5. 若仍不可用,自动发现包含
    idea.md
    validate.md
    的最新文件夹,搜索路径如下:
    • /home/luongnv/workspace/ideas
      (默认)
    • /home/luongnv/workspace/idea-2-prd
      (旧版回退路径)
  6. 若存在多个候选路径,询问用户选择。

Workflow

工作流程

Phase 1: Validate Input

阶段1:验证输入

  1. Resolve
    PROJECT_DIR
    (from
    $ARGUMENTS
    or auto-pick mode above)
  2. Check
    PROJECT_DIR/idea.md
    exists
  3. Check
    PROJECT_DIR/validate.md
    exists
  4. If
    PROJECT_DIR/prd.md
    exists, create backup:
    prd.backup.YYYYMMDD_HHMMSS.md
  1. 解析
    PROJECT_DIR
    (来自
    $ARGUMENTS
    或上述自动选择模式)
  2. 检查
    PROJECT_DIR/idea.md
    是否存在
  3. 检查
    PROJECT_DIR/validate.md
    是否存在
  4. PROJECT_DIR/prd.md
    已存在,创建备份文件:
    prd.backup.YYYYMMDD_HHMMSS.md

Phase 2: Extract Context

阶段2:提取上下文

From
idea.md
:
  • Product name/concept
  • Target audience
  • Goals & objectives
  • Technical context (stack, constraints)
From
validate.md
:
  • Verdict and ratings
  • Strengths/weaknesses
  • Competitors
  • Enhanced version suggestions
  • Implementation roadmap
idea.md
中提取:
  • 产品名称/概念
  • 目标受众
  • 目标与愿景
  • 技术背景(技术栈、约束条件)
validate.md
中提取:
  • 评估结论与评分
  • 优势/劣势
  • 竞品分析
  • 优化建议
  • 实施路线图

Phase 3: Clarify Requirements

阶段3:明确需求

Ask user (if not clear from input files):
  • Official product name?
  • Business model? (SaaS, marketplace, freemium)
  • Target MVP timeframe?
  • Team size/composition?
  • Compliance requirements? (GDPR, HIPAA, SOC2)
若输入文件中信息不明确,询问用户:
  • 官方产品名称?
  • 商业模式?(SaaS、平台型、免费增值模式)
  • 目标MVP时间周期?
  • 团队规模/构成?
  • 合规要求?(GDPR、HIPAA、SOC2)

Phase 4: Generate PRD

阶段4:生成PRD

Create
prd.md
with these sections:
  1. Product Overview - Vision, users, objectives, success metrics
  2. User Personas - 2-3 detailed personas from target audience
  3. Feature Requirements - Matrix with MoSCoW prioritization, user stories, acceptance criteria
  4. User Flows - Primary flows with mermaid diagrams
  5. Non-Functional Requirements - Performance, security, compatibility, accessibility
  6. Technical Specifications - Architecture diagram, frontend/backend/infrastructure specs
  7. Analytics & Monitoring - Key metrics, events, dashboards, alerts
  8. Release Planning - MVP and version roadmap with checklists
  9. Open Questions & Risks - Questions, assumptions, risk mitigation
  10. Appendix - Competitive analysis, glossary, revision history
See references/prd-template.md for full template structure.
创建包含以下章节的
prd.md
文件:
  1. 产品概述 - 愿景、用户群体、目标、成功指标
  2. 用户画像 - 基于目标受众的2-3个详细用户画像
  3. 功能需求 - 包含MoSCoW优先级划分、用户故事、验收标准的矩阵
  4. 用户流程 - 核心流程及Mermaid流程图
  5. 非功能需求 - 性能、安全、兼容性、可访问性
  6. 技术规格 - 架构图、前端/后端/基础设施规格
  7. 分析与监控 - 关键指标、事件、仪表盘、告警
  8. 发布规划 - MVP及版本路线图与检查清单
  9. 待解决问题与风险 - 疑问、假设、风险缓解方案
  10. 附录 - 竞品分析、术语表、修订历史
完整模板结构请参考references/prd-template.md

Phase 5: Output

阶段5:输出

  1. Write
    prd.md
    to project folder
  2. Summarize sections created
  3. Highlight areas needing user review
  4. Suggest next steps
  1. prd.md
    写入项目文件夹
  2. 总结已创建的章节
  3. 高亮需要用户审核的内容
  4. 建议后续步骤

Phase 6: README Maintenance (ideas repo)

阶段6:README维护(想法仓库)

After writing
prd.md
, if the project folder is inside an
ideas
repo, update the repo README ideas table:
  • Preferred:
    cd
    to the repo root and run
    python3 scripts/update_readme_ideas_index.py
    (if it exists)
  • Fallback: update
    README.md
    manually (ensure PRD status becomes ✅ for that idea)
生成
prd.md
后,若项目文件夹位于
ideas
仓库内,更新仓库README中的想法表格:
  • 优先方案:切换到仓库根目录并运行
    python3 scripts/update_readme_ideas_index.py
    (若脚本存在)
  • 回退方案:手动更新
    README.md
    (确保该想法的PRD状态标记为✅)

Modification Mode

修改模式

If user wants to modify existing PRD:
  1. Create timestamped backup
  2. Ask what to modify (features, priorities, timeline, specs, personas)
  3. Apply changes preserving structure
  4. Update revision history
若用户希望修改现有PRD:
  1. 创建带时间戳的备份文件
  2. 询问修改内容(功能、优先级、时间线、规格、用户画像)
  3. 在保留原有结构的基础上应用修改
  4. 更新修订历史

Guidelines

指导原则

  • Thorough: Cover all sections comprehensively
  • Realistic: Base on validate.md feasibility ratings
  • Specific: Include concrete metrics and criteria
  • Actionable: Every section guides implementation
  • Visual: Include mermaid diagrams for architecture and flows
  • 全面性:覆盖所有章节内容
  • 真实性:基于validate.md中的可行性评分
  • 具体性:包含明确的指标与标准
  • 可落地性:每个章节都能指导实施工作
  • 可视化:包含架构与流程的Mermaid流程图