dot-ai-prd-next
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePRD Next - Work On the Next Task
PRD Next - 确定下一个待执行任务
Instructions
说明
You are helping analyze an existing Product Requirements Document (PRD) to suggest the single highest-priority task to work on next, then discuss its design if the user confirms they want to work on it.
你将协助分析现有产品需求文档(PRD),建议下一个优先级最高的待执行任务,若用户确认要开展该任务,则进一步讨论其设计方案。
Process Overview
流程概述
- Check Context Clarity - Determine if PRD is obvious from recent conversation
- Auto-Detect Target PRD - If context unclear, intelligently determine which PRD to analyze
- Analyze Current Implementation - Understand what's implemented vs what's missing (skip if recent context available)
- Identify the Single Best Next Task - Find the one task that should be worked on next
- Present Recommendation - Give clear rationale and wait for confirmation
- Design Discussion - If confirmed, dive into implementation design details
- Implementation - User implements the task
- Update Progress - Prompt user to run /prd-update-progress
- 检查上下文清晰度 - 判断近期对话中是否明确提及目标PRD
- 自动识别目标PRD - 若上下文不清晰,智能确定需要分析的PRD
- 分析当前实现状态 - 了解已实现功能与缺失功能(若近期对话已包含相关上下文则可跳过)
- 确定最优下一个任务 - 找出下一个最应该执行的任务
- 呈现推荐方案 - 给出清晰的理由并等待用户确认
- 设计讨论 - 若用户确认,深入探讨实现设计细节
- 任务实现 - 用户执行该任务
- 更新进度 - 提示用户运行 命令
/prd-update-progress
Step 0: Context Awareness Check
步骤0:上下文感知检查
FIRST: Check if PRD context is already clear from recent conversation:
Skip detection/analysis if recent conversation shows:
- Recent PRD work discussed - "We just worked on PRD 29", "Just completed PRD update", etc.
- Specific PRD mentioned - "PRD #X", "MCP Prompts PRD", etc.
- PRD-specific commands used - Recent use of ,
/prd-update-progresswith specific PRD/prd-start - Clear work context - Discussion of specific features, tasks, or requirements for a known PRD
If context is clear:
- Skip to Step 6 (Single Task Recommendation) using the known PRD
- Use conversation history to understand current state and recent progress
- Proceed directly with task recommendation based on known PRD status
If context is unclear:
- Continue to Step 1 (PRD Detection) for full analysis
首先:检查近期对话中是否已明确PRD上下文:
若近期对话包含以下内容,可跳过检测/分析步骤:
- 近期讨论过PRD工作 - 例如“我们刚完成PRD 29的相关工作”、“刚完成PRD更新”等
- 提及特定PRD - 例如“PRD #X”、“MCP Prompts PRD”等
- 使用过PRD专属命令 - 近期使用过 、带特定PRD参数的
/prd-update-progress等命令/prd-start - 明确的工作上下文 - 讨论过已知PRD的特定功能、任务或需求
若上下文清晰:
- 直接跳至步骤6(单一任务推荐),使用已知的PRD
- 利用对话历史了解当前状态与近期进展
- 根据已知PRD的状态直接进行任务推荐
若上下文不清晰:
- 继续执行步骤1(PRD识别)进行完整分析
Step 1: Smart PRD Detection (Only if Context Unclear)
步骤1:智能PRD识别(仅当上下文不清晰时执行)
Auto-detect the target PRD using these context clues (in priority order):
-
Git Branch Analysis - Check current branch name for PRD patterns:
- → PRD 12
feature/prd-12-* - → PRD 13
prd-13-* - → Extract PRD number
feature/prd-*
-
Recent Git Commits - Look at recent commit messages for PRD references:
- "fix: PRD 12 documentation" → PRD 12
- "feat: implement prd-13 features" → PRD 13
-
Git Status Analysis - Check modified/staged files for PRD clues:
- Modified → PRD 12
prds/12-*.md - Changes in feature-specific directories
- Modified
-
Available PRDs Discovery - List all PRDs indirectory:
prds/prds/12-documentation-testing.mdprds/13-cicd-documentation-testing.md
-
Fallback to User Choice - Only if context detection fails, ask user to specify
PRD Detection Implementation:
bash
undefined利用以下上下文线索(按优先级排序)自动识别目标PRD:
-
Git分支分析 - 检查当前分支名称是否符合PRD命名模式:
- → 对应PRD 12
feature/prd-12-* - → 对应PRD 13
prd-13-* - → 提取PRD编号
feature/prd-*
-
近期Git提交记录 - 查看近期提交信息中是否提及PRD:
- "fix: PRD 12 documentation" → 对应PRD 12
- "feat: implement prd-13 features" → 对应PRD 13
-
Git状态分析 - 检查已修改/暂存的文件中是否有PRD相关线索:
- 已修改文件 → 对应PRD 12
prds/12-*.md - 功能专属目录中的变更
- 已修改文件
-
可用PRD发现 - 列出目录下的所有PRD:
prds/prds/12-documentation-testing.mdprds/13-cicd-documentation-testing.md
-
回退至用户选择 - 仅当上下文检测失败时,请求用户指定目标PRD
PRD识别实现方式:
bash
undefinedUse these tools to gather context:
使用以下工具收集上下文:
1. Check git branch: gitStatus shows current branch
1. 检查Git分支:gitStatus 显示当前分支
2. Check git status: Look for modified PRD files
2. 检查Git状态:查找已修改的PRD文件
3. List PRDs: Use LS or Glob to find prds/*.md files
3. 列出PRD:使用LS或Glob查找 prds/*.md 文件
4. Recent commits: Use Bash 'git log --oneline -n 5' for recent context
4. 近期提交记录:使用Bash命令 'git log --oneline -n 5' 获取近期上下文
**Detection Logic:**
- **High Confidence**: Branch name matches PRD pattern (e.g., `feature/prd-12-documentation-testing`)
- **Medium Confidence**: Modified PRD files in git status or recent commits mention PRD
- **Low Confidence**: Multiple PRDs available, use heuristics (most recent, largest)
- **No Context**: Present available options to user
**Example Detection Outputs:**
```markdown
🎯 **Auto-detected PRD 12** (Documentation Testing)
- Branch: `feature/prd-12-documentation-testing` ✅
- Modified files: `prds/12-documentation-testing.md` ✅
- Recent commits mention PRD 12 features ✅Once PRD is identified:
- Read the PRD file from
prds/[issue-id]-[feature-name].md - Analyze completion status across all sections
- Identify patterns in completed vs remaining work
**检测逻辑:**
- **高置信度**:分支名称匹配PRD模式(例如 `feature/prd-12-documentation-testing`)
- **中置信度**:Git状态中的已修改PRD文件或近期提交记录提及该PRD
- **低置信度**:存在多个可用PRD,使用启发式规则(最新创建、内容最多的PRD)
- **无上下文**:向用户展示所有可用选项
**检测输出示例:**
```markdown
🎯 **自动识别到PRD 12**(文档测试)
- 分支:`feature/prd-12-documentation-testing` ✅
- 已修改文件:`prds/12-documentation-testing.md` ✅
- 近期提交记录提及PRD 12相关功能 ✅PRD识别完成后:
- 从 路径读取PRD文件
prds/[issue-id]-[feature-name].md - 分析所有章节的完成状态
- 找出已完成工作与剩余工作的规律
Step 2: Documentation & Implementation Analysis (Only if Context Unclear)
步骤2:文档与实现分析(仅当上下文不清晰时执行)
Before assessing task priorities, analyze both the documented specifications and current implementation state:
在评估任务优先级之前,需同时分析文档规范与当前实现状态:
Documentation Analysis (Documentation-First PRDs)
文档分析(文档优先型PRD)
For PRDs using the documentation-first approach:
- Read referenced documentation: Check the "Content Location Map" in PRD to find where feature specs live
- Understand target state: What functionality is documented but not yet implemented
- Check documentation completeness: Are all user workflows and examples fully documented
- Validate cross-references: Do all documentation links and references work correctly
对于采用文档优先方法的PRD:
- 阅读相关文档:查看PRD中的“内容位置映射”,找到功能规范的存放位置
- 了解目标状态:哪些功能已文档化但尚未实现
- 检查文档完整性:所有用户工作流与示例是否已完整文档化
- 验证交叉引用:所有文档链接与引用是否可正常访问
Code Discovery
代码发现
- Search for related files: Use Grep/Glob to find files related to the feature
- Identify key modules: Locate main implementation files mentioned in PRD
- Find test files: Discover existing test coverage for the feature
- Check dependencies: Review imports and module relationships
- 搜索相关文件:使用Grep/Glob查找与该功能相关的文件
- 识别核心模块:定位PRD中提及的主要实现文件
- 查找测试文件:发现该功能已有的测试覆盖情况
- 检查依赖关系:查看导入语句与模块间的依赖关系
Implementation vs Documentation Gap Analysis
实现与文档差距分析
- Compare docs vs code: What's documented vs actually implemented
- Partial implementations: Identify half-finished features or TODO comments
- Documentation validation: Can documented examples and commands actually work
- Architecture alignment: Does current code match documented behavior and PRD architecture decisions
- Quality assessment: Code style, error handling, test coverage gaps
- 对比文档与代码:文档中定义的功能与实际已实现的功能有何差异
- 部分实现功能:识别已启动但未完成的功能或TODO注释
- 文档验证:文档中的示例与命令是否可正常执行
- 架构一致性:当前代码是否符合文档描述的行为与PRD中的架构决策
- 质量评估:代码风格、错误处理、测试覆盖的差距
Technical Feasibility Analysis
技术可行性分析
- Dependency conflicts: Are PRD requirements compatible with existing code
- Breaking changes: Will remaining tasks require refactoring existing code
- Integration points: How new work connects with current implementation
- Technical debt: Issues that might block or slow future work
- 依赖冲突:PRD需求是否与现有代码兼容
- 破坏性变更:剩余任务是否需要重构现有代码
- 集成点:新工作内容如何与当前实现对接
- 技术债务:可能阻碍或减慢后续工作的问题
Step 3: Completion Assessment (Only if Context Unclear)
步骤3:完成度评估(仅当上下文不清晰时执行)
Analyze Checkbox States
复选框状态分析
Count and categorize all checkboxes:
- Completed: items
[x] - Pending: items
[ ] - Deferred: items
[~] - Blocked: items
[!]
统计并分类所有复选框:
- 已完成:标记的项
[x] - 待处理:标记的项
[ ] - 已推迟:标记的项
[~] - 已阻塞:标记的项
[!]
Phase Analysis
阶段分析
For each implementation phase:
- Calculate completion percentage
- Identify bottlenecks or stalled work
- Assess readiness to move to next phase
针对每个实现阶段:
- 计算完成百分比
- 识别瓶颈或停滞的工作
- 评估是否可进入下一阶段
Requirement Coverage
需求覆盖情况
Review requirement categories:
- Functional Requirements: Core feature completion
- Non-Functional Requirements: Quality and performance aspects
- Success Criteria: Measurable outcomes
- Dependencies: External requirements
- Risk Mitigation: Risk management progress
审查需求分类:
- 功能需求:核心功能的完成情况
- 非功能需求:质量与性能相关方面
- 成功标准:可衡量的成果指标
- 依赖项:外部需求
- 风险缓解:风险管理进展
Step 4: Dependency Analysis (Only if Context Unclear)
步骤4:依赖关系分析(仅当上下文不清晰时执行)
Identify Critical Path Items
识别关键路径项
Look for items that:
- Block other work - Must be completed before others can start
- Enable major capabilities - Unlock significant value when completed
- Resolve current blockers - Remove impediments to progress
寻找具备以下特征的项:
- 阻塞其他工作 - 必须先完成此项,其他工作才能启动
- 启用核心能力 - 完成后可解锁重要价值
- 解决当前阻塞 - 移除阻碍进展的障碍
Dependency Patterns
依赖关系模式
PRD-Level Dependencies
PRD层面依赖
- Sequential dependencies - A must be done before B
- Parallel opportunities - Multiple items that can be worked simultaneously
- Foundation requirements - Core capabilities needed by multiple features
- Integration points - Items that connect different parts of the system
- 顺序依赖 - 必须先完成A才能启动B
- 并行机会 - 可同时开展的多项工作
- 基础需求 - 多个功能都需要的核心能力
- 集成点 - 连接系统不同部分的项
Code-Level Dependencies
代码层面依赖
- Import dependencies - Modules that depend on others being implemented first
- Interface contracts - APIs/types that must be defined before consumers
- Database schema - Data model changes needed before business logic
- Test dependencies - Tests that require certain infrastructure or mocks
- Build/deployment - Configuration changes that affect multiple components
- 导入依赖 - 依赖其他已实现模块的模块
- 接口契约 - 必须先定义好的API/类型,供其他模块调用
- 数据库 schema - 业务逻辑实现前需完成的数据模型变更
- 测试依赖 - 需要特定基础设施或模拟对象的测试
- 构建/部署 - 影响多个组件的配置变更
Step 5: Strategic Value Assessment (Only if Context Unclear)
步骤5:战略价值评估(仅当上下文不清晰时执行)
High-Value Next Steps
高价值下一步任务
Prioritize items that:
- Unblock multiple other items - High leverage impact
- Deliver user-visible value - Direct user benefit
- Reduce technical risk - Address major uncertainties
- Enable validation - Allow testing of key assumptions
- Provide learning - Generate insights for future work
优先选择具备以下特征的项:
- 解锁多项其他任务 - 影响力大、杠杆效应强
- 交付用户可见价值 - 直接为用户带来收益
- 降低技术风险 - 解决重大不确定性问题
- 支持验证工作 - 允许对关键假设进行测试
- 提供学习机会 - 为后续工作积累经验
Low-Priority Items
低优先级任务
Identify items that:
- Have many dependencies - Can't be started yet
- Are nice-to-have - Don't impact core value proposition
- Are optimization-focused - Improve existing working features
- Require external dependencies - Waiting on others
识别具备以下特征的项:
- 依赖项众多 - 目前无法启动
- 锦上添花型 - 不影响核心价值主张
- 优化导向型 - 对已正常运行的功能进行优化
- 依赖外部资源 - 需等待第三方交付
Step 6: Single Task Recommendation
步骤6:单一任务推荐
Note: If you arrived here from Step 0 (clear context), use the conversation history and known PRD state to make your recommendation. If you came through the full analysis, use your detailed findings.
Present findings in this focused format:
markdown
undefined注意:若你是从步骤0(上下文清晰)跳转至此,请利用对话历史与已知PRD状态进行推荐。若你完成了完整分析流程,请基于详细分析结果进行推荐。
请按以下简洁格式呈现结果:
markdown
undefinedNext Task Recommendation: [Feature Name]
下一个任务推荐:[功能名称]
Recommended Task: [Specific Task Name]
推荐任务:[具体任务名称]
Why this task: [2-3 sentences explaining why this is the highest priority right now]
What it unlocks: [What becomes possible after completing this]
Dependencies: [What's already complete that makes this ready to work on]
Success criteria: [How you'll know it's done]
Do you want to work on this task?
If yes, I'll help you design the implementation approach. If no, let me know what you'd prefer to work on instead.
undefined推荐理由:[2-3句话说明为何此项是当前优先级最高的任务]
解锁价值:[完成此项后可开展的工作]
前置依赖:[已完成的、可支持此项启动的工作]
成功标准:[如何判断此项已完成]
是否要开展此项任务?
若选择是,我将协助你设计实现方案。若选择否,请告知你希望优先开展的任务。
undefinedStep 7: Design Discussion (If Confirmed)
步骤7:设计讨论(若用户确认)
If the user confirms they want to work on the recommended task, then dive into:
若用户确认要开展推荐任务,则深入探讨以下内容:
Implementation Planning
实现规划
- Architecture approach: How this fits into existing codebase
- Key components: What needs to be built/modified
- Integration points: How it connects with existing code
- Testing strategy: How to validate the implementation
- 架构方案:如何融入现有代码库
- 核心组件:需要构建/修改的内容
- 集成点:如何与现有代码对接
- 测试策略:如何验证实现效果
Design Decisions
设计决策
- Technical choices: Framework/library decisions to make
- Interface design: APIs, data structures, user interfaces
- Error handling: How to handle failure cases
- Performance considerations: Scalability and optimization needs
- 技术选型:需要确定的框架/库方案
- 接口设计:API、数据结构、用户界面
- 错误处理:如何处理异常场景
- 性能考量:可扩展性与优化需求
Implementation Steps
实现步骤
- Step-by-step breakdown: Logical sequence of implementation
- Quick wins: Parts that can be completed first for validation
- Risk mitigation: Addressing the biggest uncertainties first
- Testing checkpoints: When and how to validate progress
- 分步拆解:符合逻辑的实现顺序
- 快速验证点:可优先完成的部分,用于验证方向正确性
- 风险缓解:优先解决最大的不确定性问题
- 测试检查点:验证进展的时间节点与方式
Questions to Resolve
待解决问题
- Open decisions: Design choices that need to be made
- Clarifications needed: Requirements that need more detail
- Assumptions to validate: Things we're assuming that should be confirmed
- 未决决策:需要确定的设计选项
- 需澄清内容:需要进一步明确的需求
- 待验证假设:需要确认的前提假设
Success Criteria
成功标准
This command should:
- ✅ Identify the single highest-value task to work on next based on current PRD state
- ✅ Provide clear, compelling rationale for why this specific task should be prioritized
- ✅ Wait for user confirmation before proceeding
- ✅ If confirmed, provide detailed implementation design guidance
- ✅ Keep teams focused on the most important work rather than overwhelming them with options
- ✅ Enable immediate action by transitioning from recommendation to design discussion
本命令需满足以下要求:
- ✅ 根据当前PRD状态,识别出下一个价值最高的任务
- ✅ 为该任务提供清晰、有说服力的优先级理由
- ✅ 在继续推进前等待用户确认
- ✅ 若用户确认,提供详细的实现设计指导
- ✅ 帮助团队聚焦最重要的工作,而非提供过多选项分散注意力
- ✅ 从任务推荐直接过渡到设计讨论,支持立即开展工作
Step 8: Update Progress After Completion
步骤8:完成任务后更新进度
CRITICAL: Do NOT update the PRD yourself. Do NOT edit PRD files directly. Your job is to prompt the user to run the update command.
After the user completes the task implementation, output ONLY this message:
Task implementation complete.
To update PRD progress and commit your work, run .
/prd-update-progressThen STOP. Do not proceed further. The command handles PRD updates, progress tracking, and commits. This separation ensures proper workflow and avoids duplicate/conflicting updates.
/prd-update-progress重要提示:请勿自行修改PRD,请勿直接编辑PRD文件。你的职责是提示用户运行更新命令。
用户完成任务实现后,仅输出以下内容:
任务已完成。
如需更新PRD进度并提交工作,请运行 命令。
/prd-update-progress随后停止操作,请勿继续执行其他步骤。 命令将负责PRD更新、进度跟踪与提交工作。这种职责分离可确保工作流程规范,避免出现重复或冲突的更新。
/prd-update-progress