prd-implementation-precheck
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePRD Implementation Precheck
PRD实现预检查
Overview
概述
Perform a short PRD precheck, present issues and questions, then implement only after the user confirms or adjusts the PRD.
对PRD进行简短的预检查,列出问题和疑问,仅在用户确认或调整PRD后再进行实现。
Workflow
工作流程
- Locate the PRD and any referenced files.
- Precheck the PRD and summarize intent in 1-2 sentences.
- List findings and questions (blockers first), then ask for confirmation to proceed.
- After confirmation, implement the PRD with minimal, consistent changes.
- Validate (tests or manual steps) or state what was not run.
- 找到PRD及所有相关参考文件。
- 对PRD进行预检查,并用1-2句话总结其目标。
- 列出检查结果和问题(优先列出阻塞项),然后请求确认是否继续。
- 获得确认后,以最小化、一致性的变更实现PRD。
- 进行验证(测试或手动步骤),或说明未执行的验证内容。
Precheck Checklist
预检查清单
Basic Checks
基础检查
- Scope: Identify over-broad changes; suggest a smaller, targeted approach.
- Alignment: Flag conflicts with existing patterns or architecture; propose alternatives.
- Dependencies: Note missing hooks/providers/data sources or unclear ownership.
- Behavior: Verify flows and edge cases are specified; ask for gaps.
- Risks: Call out performance, regressions, or migration risks.
- Testing: Check success criteria and test coverage; request specifics if vague.
- 范围:识别过于宽泛的变更;建议采用更聚焦、针对性更强的方案。
- 一致性:标记与现有模式或架构的冲突;提出替代方案。
- 依赖项:记录缺失的hooks/提供者/数据源,或不明确的归属问题。
- 行为逻辑:验证流程和边缘场景是否已明确;询问存在的遗漏点。
- 风险:指出性能、回归或迁移相关风险。
- 测试:检查成功标准和测试覆盖范围;若内容模糊则要求明确细节。
Edge Case Coverage Checks
边缘场景覆盖检查
Verify the PRD addresses these edge cases (mark as ⚠️ if missing):
验证PRD是否覆盖以下边缘场景(若缺失则标记为⚠️):
Data Boundaries
数据边界
- Null/Empty handling - What happens with empty inputs or null values?
- Boundary values - Are min/max limits defined? What happens at boundaries?
- Duplicate data - How are duplicates detected and handled?
- Data format - Are input formats validated? What about special characters?
- 空值/空输入处理 - 空输入或Null值时的处理逻辑是什么?
- 边界值 - 是否定义了最小/最大值?达到边界时的处理逻辑是什么?
- 重复数据 - 如何检测和处理重复数据?
- 数据格式 - 是否验证输入格式?特殊字符的处理逻辑是什么?
State Boundaries
状态边界
- State transitions - Are all valid state transitions defined?
- Invalid transitions - What happens on illegal state changes?
- Concurrent modifications - How are simultaneous edits handled?
- Rollback scenarios - Can operations be undone? How?
- 状态转换 - 是否定义了所有有效的状态转换逻辑?
- 无效转换 - 非法状态变更时的处理逻辑是什么?
- 并发修改 - 如何处理同时进行的编辑操作?
- 回滚场景 - 操作是否可以撤销?如何撤销?
Error Boundaries
错误边界
- Network failures - What happens when API calls fail?
- Timeout behavior - Are timeouts defined? What's the retry strategy?
- Partial failures - If step 2 of 3 fails, what happens to step 1?
- Error messages - Are user-facing error messages defined?
- 网络故障 - API调用失败时的处理逻辑是什么?
- 超时行为 - 是否定义了超时机制?重试策略是什么?
- 部分失败 - 若3步流程中的第2步失败,第1步的结果如何处理?
- 错误提示 - 是否定义了面向用户的错误提示信息?
UX Boundaries
UX边界
- Empty states - What does the user see with no data?
- Loading states - How is loading indicated?
- Success feedback - How does the user know the action succeeded?
- Permission denied - What happens when user lacks permission?
- 空状态 - 无数据时用户会看到什么内容?
- 加载状态 - 如何展示加载状态?
- 成功反馈 - 用户如何得知操作已成功?
- 权限不足 - 用户权限不足时的处理逻辑是什么?
Codebase Consistency Checks
代码库一致性检查
Scan the codebase to verify PRD aligns with existing patterns:
bash
undefined扫描代码库以验证PRD是否与现有模式一致:
bash
undefinedCheck if PRD's proposed patterns match existing code
Check if PRD's proposed patterns match existing code
grep -r "pattern_from_prd" src/ --include="*.ts"
- [ ] **Delete strategy** - Does PRD match existing soft/hard delete pattern?
- [ ] **Error handling** - Does PRD use the same error display mechanism?
- [ ] **Component reuse** - Does PRD leverage existing components?
- [ ] **API patterns** - Does PRD follow existing API conventions?grep -r "pattern_from_prd" src/ --include="*.ts"
- [ ] **删除策略** - PRD是否与现有软删除/硬删除模式一致?
- [ ] **错误处理** - PRD是否采用了相同的错误展示机制?
- [ ] **组件复用** - PRD是否复用了现有组件?
- [ ] **API模式** - PRD是否遵循了现有的API规范?Output Format
输出格式
Precheck Report Template
预检查报告模板
markdown
undefinedmarkdown
undefinedPRD Precheck Report
PRD预检查报告
Summary
概述
{1-2 sentence summary of what the PRD aims to achieve}
{用1-2句话总结PRD的目标}
✅ Covered Edge Cases
✅ 已覆盖的边缘场景
- {List edge cases that are well-defined in the PRD}
- {列出PRD中已明确定义的边缘场景}
⚠️ Missing Edge Cases
⚠️ 缺失的边缘场景
| Edge Case | Category | Suggested Default | Needs Confirmation |
|---|---|---|---|
| Empty list display | UX | Use existing EmptyState | No |
| Concurrent edit | State | Last write wins | Yes |
| 边缘场景 | 分类 | 建议默认方案 | 是否需要确认 |
|---|---|---|---|
| 空列表展示 | UX | 使用现有EmptyState组件 | 否 |
| 并发编辑 | 状态 | 最后写入优先 | 是 |
🔴 Blockers
🔴 阻塞项
- {Critical issues that must be resolved before implementation}
- {实现前必须解决的关键问题}
🟡 Warnings
🟡 警告项
- {Non-critical issues that should be addressed}
- {需要处理的非关键问题}
Questions for User
给用户的问题
- {Specific question about missing edge case}
- {Specific question about ambiguous requirement}
Proceed as-is, or update the PRD?
undefined- {关于缺失边缘场景的具体问题}
- {关于模糊需求的具体问题}
按当前内容继续,还是需要更新PRD?
undefinedOutput Expectations
输出要求
- Provide a concise precheck report with questions and risks.
- Ask explicitly: "Proceed as-is, or update the PRD?"
- If no blockers, state assumptions and continue only with user approval.
- 提供包含问题和风险的简洁预检查报告。
- 明确询问:“按当前内容继续,还是需要更新PRD?”
- 若无阻塞项,说明假设内容,仅在用户批准后再继续。