关于 prd
PRD Generator 可将功能描述整理为适合实施的产品需求文档。它先用字母选项提出关键澄清问题,再组织需求与验收标准,并将文档保存到 tasks/。
主要功能
- 01用字母选项提出关键问题
- 02组织目标和用户故事
- 03定义功能需求与非目标
- 04编写可验证的验收标准
- 05将 PRD 以 Markdown 保存到 tasks/
适用场景
- 01澄清含糊的功能请求
- 02为开发人员准备范围明确的需求
- 03为 UI 和逻辑工作定义验收标准
- 04记录成功指标和待解决问题
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ ralphcrisostomo/ nuxt-development-skills --skill prd安装后在 Claude Code 中输入/prd确认已加载。
详细介绍
PRD 生成器
创建清晰、可执行且适合实施的详细产品需求文档。
工作内容
- 接收用户的功能描述
- 提出 3-5 个必要的澄清问题(附带字母选项)
- 根据回答生成结构化 PRD
- 保存到
tasks/prd-[feature-name].md
重要: 不要开始实施。只创建 PRD。
步骤 1:澄清问题
只针对初始提示中含糊不清的关键问题提问。重点关注:
- 问题/目标: 这能解决什么问题?
- 核心功能: 关键操作有哪些?
- 范围/边界: 哪些内容不应该包含?
- 成功标准: 我们如何判断已完成?
问题格式如下:
1. What is the primary goal of this feature?
A. Improve user onboarding experience
B. Increase user retention
C. Reduce support burden
D. Other: [please specify]
2. Who is the target user?
A. New users only
B. Existing users only
C. All users
D. Admin users only
3. What is the scope?
A. Minimal viable version
B. Full-featured implementation
C. Just the backend/API
D. Just the UI
这样用户就可以用“1A、2C、3B”快速回复并迭代。请记住为选项添加缩进。
步骤 2:PRD 结构
使用以下章节生成 PRD:
1. 简介/概述
简要描述该功能及其要解决的问题。
2. 目标
具体、可衡量的目标(项目符号列表)。
3. 用户故事
每个故事都需要:
- 标题: 简短的描述性名称
- 描述: “作为一名[用户],我希望[功能],以便[收益]”
- 验收标准: 可验证的清单,明确“完成”的含义
每个故事都应足够小,可在一次专注的开发工作中完成。
格式:
### US-001: [Title]
**Description:** As a [user], I want [feature] so that [benefit].
**Acceptance Criteria:**
- [ ] Specific verifiable criterion
- [ ] Another criterion
- [ ] Typecheck/lint passes
- [ ] **[UI stories only]** Verify in browser using dev-browser skill
- [ ] **[AWS/GraphQL stories only]** Use nuxt-terraform skill
- [ ] **[Stories with testable logic]** Write tests using vitest-testing skill
重要:
- 验收标准必须可验证,不能含糊。“运行正常”是不合适的。“删除前按钮会显示确认对话框”则是合适的。
- 对于任何涉及 UI 更改的故事: 始终将“使用 dev-browser skill 在浏览器中验证”列为验收标准。这可以确保对前端工作进行视觉验证。
- 对于任何包含可测试逻辑(composables、services、utils、Lambda handlers)的故事: 始终将“使用 vitest-testing skill 编写测试”列为验收标准。
4. 功能需求
列出具体功能的编号清单:
- “FR-1:系统必须允许用户……”
- “FR-2:用户点击 X 时,系统必须……”
内容要明确、毫不含糊。
5. 非目标(范围之外)
说明此功能不会包含哪些内容。这对于控制范围至关重要。
6. 设计注意事项(可选)
- UI/UX 要求
- 如有原型图,请提供链接
- 可复用的相关现有组件
7. 技术注意事项(可选)
- 已知限制或依赖项
- 与现有系统的集成点
- 性能要求
8. 成功指标
如何衡量成功?
- “将完成 X 所需的时间缩短 50%”
- “将转化率提高 10%”
9. 未解决的问题
仍待解决的问题或需要澄清的方面。
面向初级开发者编写
PRD 的读者可能是初级开发者或 AI Agent。因此:
- 表述明确、毫不含糊
- 避免使用行话,或对其进行解释
- 提供足够的细节,帮助读者理解目的和核心逻辑
- 为需求编号,便于查阅
- 在有帮助时提供具体示例
输出
- 格式: Markdown(
.md) - 位置:
tasks/ - 文件名:
prd-[feature-name].md(kebab-case)
PRD 示例
# PRD: Task Priority System
## Introduction
Add priority levels to tasks so users can focus on what matters most. Tasks can be marked as high, medium, or low priority, with visual indicators and filtering to help users manage their workload effectively.
## Goals
- Allow assigning priority (high/medium/low) to any task
- Provide clear visual differentiation between priority levels
- Enable filtering and sorting by priority
- Default new tasks to medium priority
## User Stories
### US-001: Add priority field to database
**Description:** As a developer, I need to store task priority so it persists across sessions.
**Acceptance Criteria:**
- [ ] Add priority column to tasks table: 'high' | 'medium' | 'low' (default 'medium')
- [ ] Generate and run migration successfully
- [ ] Typecheck passes
- [ ] Write tests using vitest-testing skill
### US-002: Display priority indicator on task cards
**Description:** As a user, I want to see task priority at a glance so I know what needs attention first.
**Acceptance Criteria:**
- [ ] Each task card shows colored priority badge (red=high, yellow=medium, gray=low)
- [ ] Priority visible without hovering or clicking
- [ ] Typecheck passes
- [ ] Verify in browser using dev-browser skill
### US-003: Add priority selector to task edit
**Description:** As a user, I want to change a task's priority when editing it.
**Acceptance Criteria:**
- [ ] Priority dropdown in task edit modal
- [ ] Shows current priority as selected
- [ ] Saves immediately on selection change
- [ ] Typecheck passes
- [ ] Verify in browser using dev-browser skill
### US-004: Filter tasks by priority
**Description:** As a user, I want to filter the task list to see only high-priority items when I'm focused.
**Acceptance Criteria:**
- [ ] Filter dropdown with options: All | High | Medium | Low
- [ ] Filter persists in URL params
- [ ] Empty state message when no tasks match filter
- [ ] Typecheck passes
- [ ] Verify in browser using dev-browser skill
- [ ] Write tests using vitest-testing skill
## Functional Requirements
- FR-1: Add `priority` field to tasks table ('high' | 'medium' | 'low', default 'medium')
- FR-2: Display colored priority badge on each task card
- FR-3: Include priority selector in task edit modal
- FR-4: Add priority filter dropdown to task list header
- FR-5: Sort by priority within each status column (high to medium to low)
## Non-Goals
- No priority-based notifications or reminders
- No automatic priority assignment based on due date
- No priority inheritance for subtasks
## Technical Considerations
- Reuse existing badge component with color variants
- Filter state managed via URL search params
- Priority stored in database, not computed
## Success Metrics
- Users can change priority in under 2 clicks
- High-priority tasks immediately visible at top of lists
- No regression in task list performance
## Open Questions
- Should priority affect task ordering within a column?
- Should we add keyboard shortcuts for priority changes?
检查清单
保存 PRD 前:
- 已提出附带字母选项的澄清问题
- 已纳入用户的回答
- 用户故事小而具体
- 功能需求已编号且表述明确
- 非目标章节明确界定了边界
- 已保存到
tasks/prd-[feature-name].md
评论
支持 Markdown