prd-suite

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PRD 文档管理

PRD Document Management

🆕 自然语言需求模板支持

🆕 Natural Language Requirement Template Support

支持使用自然语言需求模板快速创建PRD:
  1. 需求模板文件:提供
    requirement_template.md
    文件,用自然语言描述项目需求
  2. 智能提取:AI自动从自然语言中提取结构化信息
  3. 四种模式
    • 使用 XMind 文件:通过 XMind MCP 读取 xmind 文件生成 PRD(推荐)
    • 使用需求模板:根据需求模板文件生成完整 PRD(1 轮完成)
    • 混合模式:需求模板 + 交互补充缺失章节
    • 手动创建:使用交互式流程逐轮收集信息
详细模板见:templates/requirement_template.md
Supports quick PRD creation using natural language requirement templates:
  1. Requirement Template File: Provide
    requirement_template.md
    file to describe project requirements in natural language
  2. Intelligent Extraction: AI automatically extracts structured information from natural language
  3. Four Modes:
    • Use XMind File: Generate PRD by reading xmind file via XMind MCP (Recommended)
    • Use Requirement Template: Generate complete PRD based on requirement template file (Completed in 1 round)
    • Hybrid Mode: Requirement template + interactive supplement for missing chapters
    • Manual Creation: Collect information step by step using interactive process
Detailed template see: templates/requirement_template.md

目录结构

Directory Structure

prd-suite/
├── SKILL.md          # 主入口
├── commands/         # 子命令
│   ├── create.md     # 创建PRD命令
│   ├── update.md     # 更新PRD命令
│   └── delete.md     # 删除PRD命令
├── templates/        # 模板文件
│   ├── main_prd_template.md    # 主PRD模板
│   ├── module_prd_template.md  # 模块PRD模板
│   └── requirement_template.md # 需求模板
├── config/           # 配置文件
│   └── config.json   # 配置信息
└── scripts/          # 辅助脚本
    ├── parser.js     # 自然语言解析脚本
    └── utils.js      # 工具函数
prd-suite/
├── SKILL.md          # Main Entry
├── commands/         # Subcommands
│   ├── create.md     # Create PRD Command
│   ├── update.md     # Update PRD Command
│   └── delete.md     # Delete PRD Command
├── templates/        # Template Files
│   ├── main_prd_template.md    # Main PRD Template
│   ├── module_prd_template.md  # Module PRD Template
│   └── requirement_template.md # Requirement Template
├── config/           # Configuration Files
│   └── config.json   # Configuration Information
└── scripts/          # Auxiliary Scripts
    ├── parser.js     # Natural Language Parsing Script
    └── utils.js      # Utility Functions

子命令

Subcommands

create

create

  • 功能:创建新的 PRD 文档
  • 子命令
    • create main
      - 创建主PRD文档
    • create module
      - 创建模块PRD文档
  • 描述:支持自然语言需求模板快速生成,智能推断减少重复输入
  • 路径
    commands/create.md
  • Function: Create new PRD documents
  • Subcommands:
    • create main
      - Create main PRD document
    • create module
      - Create module PRD document
  • Description: Supports quick generation with natural language requirement templates, intelligent inference reduces duplicate input
  • Path:
    commands/create.md

update

update

  • 功能:更新现有的 PRD 文档
  • 子命令
    • update main
      - 更新主PRD文档
    • update module
      - 更新模块PRD文档
  • 描述:支持单章节更新,版本管理和变更记录
  • 路径
    commands/update.md
  • Function: Update existing PRD documents
  • Subcommands:
    • update main
      - Update main PRD document
    • update module
      - Update module PRD document
  • Description: Supports single chapter update, version management and change records
  • Path:
    commands/update.md

delete

delete

  • 功能:删除 PRD 文档
  • 子命令
    • delete module
      - 删除模块PRD文档
  • 描述:安全删除模块PRD,自动更新索引和变更日志
  • 路径
    commands/delete.md
  • Function: Delete PRD documents
  • Subcommands:
    • delete module
      - Delete module PRD document
  • Description: Safely delete module PRD, automatically update index and change log
  • Path:
    commands/delete.md

配置文件

Configuration Files

配置文件位于
config/config.json
,包含以下内容:
  • 技能基本信息
  • 子命令配置
  • 模板文件路径
  • 变量定义
  • 功能特性开关
Configuration file is located at
config/config.json
, which includes:
  • Basic skill information
  • Subcommand configuration
  • Template file paths
  • Variable definitions
  • Feature switches

模板文件

Template Files

模板文件位于
templates/
目录:
  • main_prd_template.md
    - 主PRD文档模板
  • module_prd_template.md
    - 模块PRD文档模板
  • requirement_template.md
    - 自然语言需求模板
  • changelog_format.md
    - CHANGELOG 格式规范
Template files are located in
templates/
directory:
  • main_prd_template.md
    - Main PRD Document Template
  • module_prd_template.md
    - Module PRD Document Template
  • requirement_template.md
    - Natural Language Requirement Template
  • changelog_format.md
    - CHANGELOG Format Specification

辅助脚本

Auxiliary Scripts

辅助脚本位于
scripts/
目录:
  • parser.js
    - 自然语言需求解析脚本
  • utils.js
    - 工具函数(日期处理、文件操作等)
Auxiliary scripts are located in
scripts/
directory:
  • parser.js
    - Natural Language Requirement Parsing Script
  • utils.js
    - Utility Functions (date processing, file operations, etc.)

📋 模板格式要求

📋 Template Format Requirements

⚠️ 重要说明

⚠️ Important Note

所有生成的 PRD 文档必须严格遵循模板格式! 这是确保 PRD 质量和一致性的关键要求。
All generated PRD documents must strictly follow the template format! This is a key requirement to ensure PRD quality and consistency.

模板文件

Template Files

模板文件位于
templates/
目录,必须严格按照以下模板生成内容:
  1. 主 PRD 模板
    templates/main_prd_template.md
    • 用于创建主 PRD 文档
    • 包含 9 个标准章节
    • 必须保持章节顺序、表格格式、Mermaid 图表格式
  2. 模块 PRD 模板
    templates/module_prd_template.md
    • 用于创建模块 PRD 文档
    • 包含 11 个标准章节
    • 必须保持章节顺序、表格格式、Mermaid 图表格式
Template files are located in
templates/
directory, content must be generated strictly according to the following templates:
  1. Main PRD Template:
    templates/main_prd_template.md
    • Used to create main PRD documents
    • Contains 9 standard chapters
    • Must maintain chapter order, table format, Mermaid chart format
  2. Module PRD Template:
    templates/module_prd_template.md
    • Used to create module PRD documents
    • Contains 11 standard chapters
    • Must maintain chapter order, table format, Mermaid chart format

格式要求

Format Requirements

在生成 PRD 时,必须:
  1. 严格遵循模板结构
    • 保持所有章节的顺序和编号
    • 不遗漏任何必需章节
    • 不添加模板中未定义的章节
  2. 保持格式一致性
    • 表格格式必须与模板一致
    • Mermaid 图表语法必须正确
    • 标题层级必须正确
  3. 完整替换变量
    • 所有
      {{变量名}}
      必须替换为实际内容
    • 不保留任何未替换的变量占位符
  4. 格式验证
    • 生成后必须检查格式是否符合模板
    • 发现格式问题必须立即修正
When generating PRD, you must:
  1. Strictly follow template structure
    • Maintain order and numbering of all chapters
    • Do not miss any required chapters
    • Do not add chapters not defined in the template
  2. Maintain format consistency
    • Table format must match the template
    • Mermaid chart syntax must be correct
    • Title hierarchy must be correct
  3. Complete variable replacement
    • All
      {{Variable Name}}
      must be replaced with actual content
    • Do not retain any unreplaced variable placeholders
  4. Format Verification
    • Must check if format complies with template after generation
    • Must correct any format issues immediately

格式规范说明

Format Specification Description

详细的格式规范请参考:templates/format_guidelines.md

Detailed format specification please refer to: templates/format_guidelines.md

核心特性

Core Features

1. 自然语言需求模板

1. Natural Language Requirement Template

  • 支持用自然语言描述项目需求
  • AI自动提取结构化信息
  • 1轮完成PRD生成
  • Supports describing project requirements in natural language
  • AI automatically extracts structured information
  • Complete PRD generation in 1 round

2. 智能推断机制

2. Intelligent Inference Mechanism

  • 从主PRD自动提取相关信息
  • 减少用户重复输入
  • 提升创建效率
  • Automatically extract relevant information from main PRD
  • Reduce duplicate input for users
  • Improve creation efficiency

3. 快速模式

3. Quick Mode

  • 只生成核心章节
  • 跳过可选章节
  • 适合次要模块
  • Only generate core chapters
  • Skip optional chapters
  • Suitable for secondary modules

4. 版本管理

4. Version Management

  • 支持语义化版本
  • 自动记录变更日志
  • 版本升级流程
  • Supports semantic versioning
  • Automatically records change logs
  • Version upgrade process

🗺️ XMind 文件支持

🗺️ XMind File Support

功能说明

Function Description

支持从 XMind 思维导图文件直接生成主 PRD:
  1. XMind MCP 集成:通过 XMind MCP 服务读取和解析 xmind 文件
  2. 智能内容提取:从思维导图结构中提取 PRD 所需信息
  3. 中间文档生成:生成
    xmind_content.md
    内容文档供确认
  4. 模板格式输出:按照主 PRD 模板格式生成最终文档
Supports direct generation of main PRD from XMind mind map files:
  1. XMind MCP Integration: Read and parse xmind files via XMind MCP service
  2. Intelligent Content Extraction: Extract information required for PRD from mind map structure
  3. Intermediate Document Generation: Generate
    xmind_content.md
    content document for confirmation
  4. Template Format Output: Generate final document according to main PRD template format

使用条件

Usage Conditions

  • XMind MCP 服务必须可用
  • XMind MCP service must be available

支持的 XMind MCP 工具

Supported XMind MCP Tools

  • mcp_XMind_list_xmind_directory
    :扫描目录下的 xmind 文件
  • mcp_XMind_read_xmind
    :读取和解析 xmind 文件
  • mcp_XMind_extract_node
    :提取特定节点
  • mcp_XMind_search_nodes
    :搜索节点内容
  • mcp_XMind_list_xmind_directory
    : Scan xmind files in directory
  • mcp_XMind_read_xmind
    : Read and parse xmind files
  • mcp_XMind_extract_node
    : Extract specific nodes
  • mcp_XMind_search_nodes
    : Search node content

流程说明

Process Description

详细流程请参考:commands/create.md 中的"使用 XMind 文件创建主 PRD 详细流程"
Detailed process please refer to: "Detailed Process of Creating Main PRD Using XMind File" in commands/create.md

工作流程

Workflow

创建主PRD流程

Create Main PRD Process

  1. 模式选择:先让用户选择创建模式
    • 使用 XMind 文件:通过 XMind MCP 读取 xmind 文件生成 PRD(推荐)
    • 使用需求模板:根据需求模板文件生成 PRD
    • 混合模式:需求模板 + 交互补充
    • 手动创建:使用交互式流程
  2. 条件验证:根据选择的模式验证前置条件
    • XMind 模式:验证 XMind MCP 服务是否可用
    • 需求模板模式:检测项目目录是否有 requirement_template.md
    • 混合模式:检测项目目录是否有 requirement_template.md
    • 手动创建:无需验证,直接开始
  3. 信息收集:根据模式收集必要信息
  4. 生成文档:生成完整PRD文档内容(⚠️ 不创建文件)
  5. 展示内容:展示完整内容供用户查看
  6. 暂停等待审核:⚠️ 必须暂停,等待用户审核确认
  7. 审核确认:用户审核生成的内容
  8. 完成创建:审核通过后创建PRD文件并更新相关索引
  1. Mode Selection: Let user select creation mode first
    • Use XMind File: Generate PRD by reading xmind file via XMind MCP (Recommended)
    • Use Requirement Template: Generate PRD based on requirement template file
    • Hybrid Mode: Requirement template + interactive supplement
    • Manual Creation: Use interactive process
  2. Condition Verification: Verify preconditions according to selected mode
    • XMind Mode: Verify if XMind MCP service is available
    • Requirement Template Mode: Check if requirement_template.md exists in project directory
    • Hybrid Mode: Check if requirement_template.md exists in project directory
    • Manual Creation: No verification required, start directly
  3. Information Collection: Collect necessary information according to mode
  4. Generate Document: Generate complete PRD document content (⚠️ Do not create file)
  5. Display Content: Display complete content for user to view
  6. Pause for Review: ⚠️ Must pause and wait for user review confirmation
  7. Review Confirmation: User reviews generated content
  8. Complete Creation: Create PRD file and update relevant indexes after approval

创建模块PRD流程

Create Module PRD Process

  1. 前置条件:检查主PRD是否存在
  2. 选择模块:从主PRD的模块清单中选择要创建的模块
  3. 模式选择
    • 快速模式:根据主PRD和模块信息自动生成完整内容,然后审核确认
    • 问答模式:逐章节询问核心业务信息,提供参考信息,生成章节内容,章节审核,直至完成
  4. 内容生成:根据选择的模式生成模块PRD内容
  5. 审核确认:用户审核生成的内容
  6. 完成创建:创建模块PRD文件并更新相关索引
  1. Precondition: Check if main PRD exists
  2. Select Module: Select module to create from main PRD module list
  3. Mode Selection:
    • Quick Mode: Automatically generate complete content based on main PRD and module information, then review and confirm
    • Q&A Mode: Ask core business information chapter by chapter, provide reference information, generate chapter content, chapter review, until completion
  4. Content Generation: Generate module PRD content according to selected mode
  5. Review Confirmation: User reviews generated content
  6. Complete Creation: Create module PRD file and update relevant indexes

更新PRD流程

Update PRD Process

  1. 选择文档:选择要更新的PRD
  2. 选择章节:选择要更新的章节
  3. 信息收集:收集更新信息
  4. 生成内容:生成更新后的章节内容(⚠️ 不更新文件)
  5. 展示内容:展示更新内容供用户查看
  6. 暂停等待审核:⚠️ 必须暂停,等待用户审核确认
  7. 审核确认:用户审核生成的内容
  8. 版本管理:处理版本升级
  9. 完成更新:审核通过后更新PRD文件和相关记录
  1. Select Document: Select PRD to update
  2. Select Chapter: Select chapter to update
  3. Information Collection: Collect update information
  4. Generate Content: Generate updated chapter content (⚠️ Do not update file)
  5. Display Content: Display updated content for user to view
  6. Pause for Review: ⚠️ Must pause and wait for user review confirmation
  7. Review Confirmation: User reviews generated content
  8. Version Management: Handle version upgrade
  9. Complete Update: Update PRD file and relevant records after approval

删除PRD流程

Delete PRD Process

  1. 选择模块:选择要删除的模块PRD
  2. 安全确认:确认删除操作
  3. 删除文件:删除模块PRD文件
  4. 更新索引:更新 PRD_INDEX.md
  5. 更新变更日志:记录删除操作
  6. 确认完成:向用户确认删除完成
  1. Select Module: Select module PRD to delete
  2. Safety Confirmation: Confirm deletion operation
  3. Delete File: Delete module PRD file
  4. Update Index: Update PRD_INDEX.md
  5. Update Change Log: Record deletion operation
  6. Confirm Completion: Confirm deletion completion to user

📝 CHANGELOG 记录规范

📝 CHANGELOG Record Specification

核心原则

Core Principles

CHANGELOG 本身没有版本概念,它只是一个变更记录文件。
  • CHANGELOG 按日期记录变更
  • 每条变更记录关联到具体的 PRD 文件及其版本
  • PRD 文件有自己的版本号(如 v1.0、v1.1)
CHANGELOG itself has no version concept, it is just a change record file.
  • CHANGELOG records changes by date
  • Each change record is associated with specific PRD file and its version
  • PRD files have their own version numbers (e.g. v1.0, v1.1)

记录格式

Record Format

更新 PRD 时,必须在 CHANGELOG.md 中记录变更前后对比:
markdown
undefined
When updating PRD, must record before-and-after comparison in CHANGELOG.md:
markdown
undefined

2024-01-15

2024-01-15

📄 电商平台_main_prd.md (v1.0 → v1.1)

📄 e-commerce-platform_main_prd.md (v1.0 → v1.1)

变更概述:调整用户管理模块的功能需求
Change Overview: Adjust functional requirements of user management module

第3章 功能模块清单

Chapter 3 Functional Module List

变更项变更前变更后变更原因
用户登录方式仅支持账号密码登录新增微信、支付宝第三方登录用户反馈登录方式单一
undefined
ItemBefore ChangeAfter ChangeReason for Change
User Login MethodOnly supports account password loginAdd WeChat, Alipay third-party loginUsers feedback single login method
undefined

详细规范

Detailed Specification

完整的 CHANGELOG 格式规范请参考:templates/changelog_format.md
Complete CHANGELOG format specification please refer to: templates/changelog_format.md

⚠️ 审核确认机制

⚠️ Review Confirmation Mechanism

所有 PRD 创建和更新操作都必须经过用户审核确认!
All PRD creation and update operations must go through user review confirmation!

审核流程

Review Process

  1. 生成内容:AI 生成 PRD 内容(⚠️ 不创建或更新文件)
  2. 展示内容:展示完整内容供用户查看
  3. 暂停等待:⚠️ 必须暂停,等待用户审核
  4. 用户选择
    • 确认通过:继续执行后续操作
    • ✏️ 提出修改意见:用户输入修改意见,AI 修改后再次展示审核
    • 🔄 重新生成:重新生成内容,再次展示审核
    • 取消操作:终止流程,不创建或更新文件
  5. 执行后续:审核通过后才执行后续操作(创建文件、更新索引等)
  1. Generate Content: AI generates PRD content (⚠️ Do not create or update file)
  2. Display Content: Display complete content for user to view
  3. Pause for Review: ⚠️ Must pause and wait for user review
  4. User Selection:
    • Approve: Continue with subsequent operations
    • ✏️ Propose Modifications: User inputs specific modification suggestions, AI modifies content and displays for review again
    • 🔄 Regenerate: User is unsatisfied with overall content, AI regenerates content and displays for review again
    • Cancel Operation: Terminate process, do not create or update any files
  5. Execute Subsequent Steps: Perform subsequent operations (create file, update index, etc.) only after approval

重要原则

Important Principles

  • 先审核后执行:审核通过前不得创建或更新文件
  • 必须暂停等待:AI 不得自动跳过审核步骤
  • 支持迭代修改:用户可多次提出修改意见
  • 提供完整选项:必须提供确认、修改、重新生成、取消四个选项
  • Review Before Execution: Do not create or update files before approval
  • Must Pause for Waiting: AI cannot automatically skip review steps
  • Support Iterative Modifications: Users can propose modification suggestions multiple times
  • Provide Complete Options: Must provide four options: approve, modify, regenerate, cancel

审核选项说明

Review Option Description

  1. ✅ 确认通过
    • 用户确认内容无误
    • 继续执行后续操作(创建文件、更新索引等)
  2. ✏️ 提出修改意见
    • 用户输入具体的修改意见
    • AI 根据意见修改内容
    • 修改后再次展示,进入新一轮审核
  3. 🔄 重新生成
    • 用户对整体内容不满意
    • AI 重新生成内容
    • 重新生成后再次展示审核
  4. ❌ 取消操作
    • 用户取消本次操作
    • 不创建或更新任何文件
    • 终止流程
详细审核流程说明请参考:templates/review_process.md
  1. ✅ Approve
    • User confirms content is correct
    • Continue with subsequent operations (create file, update index, etc.)
  2. ✏️ Propose Modifications
    • User inputs specific modification suggestions
    • AI modifies content according to suggestions
    • Display modified content again for new round of review
  3. 🔄 Regenerate
    • User is unsatisfied with overall content
    • AI regenerates content
    • Display regenerated content again for review
  4. ❌ Cancel Operation
    • User cancels current operation
    • Do not create or update any files
    • Terminate process
Detailed review process description please refer to: templates/review_process.md

使用方法

Usage Methods

创建主PRD

Create Main PRD

  1. 调用
    prd-suite
    skill
  2. 选择
    create main
    命令
  3. 选择创建模式(XMind 文件、需求模板、混合模式、手动创建)
  4. 根据模式验证条件并收集信息
  5. 审核生成的内容
  6. 完成创建
  1. Call
    prd-suite
    skill
  2. Select
    create main
    command
  3. Select creation mode (XMind File, Requirement Template, Hybrid Mode, Manual Creation)
  4. Verify conditions and collect information according to mode
  5. Review generated content
  6. Complete creation

创建模块PRD

Create Module PRD

  1. 确保主PRD已存在
  2. 调用
    prd-suite
    skill
  3. 选择
    create module
    命令
  4. 选择完整模式或快速模式
  5. 审核生成的内容
  6. 完成创建
  1. Ensure main PRD exists
  2. Call
    prd-suite
    skill
  3. Select
    create module
    command
  4. Select complete mode or quick mode
  5. Review generated content
  6. Complete creation

更新PRD

Update PRD

  1. 调用
    prd-suite
    skill
  2. 选择
    update
    命令
  3. 选择要更新的PRD和章节
  4. 提供更新信息
  5. 审核生成的内容
  6. 处理版本管理
  7. 完成更新
  1. Call
    prd-suite
    skill
  2. Select
    update
    command
  3. Select PRD and chapter to update
  4. Provide update information
  5. Review generated content
  6. Handle version management
  7. Complete update

删除模块PRD

Delete Module PRD

  1. 调用
    prd-suite
    skill
  2. 选择
    delete module
    命令
  3. 选择要删除的模块
  4. 确认删除
  5. 完成删除
  1. Call
    prd-suite
    skill
  2. Select
    delete module
    command
  3. Select module to delete
  4. Confirm deletion
  5. Complete deletion

注意事项

Notes

  • 支持自然语言需求模板快速生成
  • 保持向后兼容
  • 所有变更都会记录到 CHANGELOG.md
  • 模块PRD会自动更新到 PRD_INDEX.md
  • 支持版本管理和状态管理
  • Supports quick generation with natural language requirement templates
  • Maintain backward compatibility
  • All changes are recorded in CHANGELOG.md
  • Module PRD is automatically updated to PRD_INDEX.md
  • Supports version management and status management