Loading...
Loading...
Compare original and translation side by side
/prd/prdProvide the PRD to convert:
A. File path (e.g., tasks/prd-priority-system.md)
B. GitHub Issue URL
C. Paste PRD content directly
D. Auto-detect: scan tasks/ directory for recent PRDsFound PRDs in tasks/:
1. tasks/prd-priority-system.md (2024-03-15)
2. tasks/prd-user-auth.md (2024-03-10)
Which PRD should I convert? [1/2]提供待转换的PRD:
A. 文件路径(例如:tasks/prd-priority-system.md)
B. GitHub Issue链接
C. 直接粘贴PRD内容
D. 自动检测:扫描tasks/目录查找最新PRD在tasks/目录中找到以下PRD:
1. tasks/prd-priority-system.md(2024-03-15)
2. tasks/prd-user-auth.md(2024-03-10)
应转换哪份PRD?[1/2]Technical questions before I generate the SPEC:
1. Where should the priority logic live?
A. Extend existing TaskService
B. New PriorityService
C. Inline in controller
D. Let me decide based on the codebase
2. Database migration approach?
A. Add column to existing tasks table
B. New priority table with FK
C. JSON field on tasks
D. Let me decide based on current schema
3. API versioning concern?
A. Add to existing v1 endpoints
B. New v2 endpoints
C. No versioning needed生成SPEC前的技术问题:
1. 优先级逻辑应部署在哪里?
A. 扩展现有TaskService
B. 新增PriorityService
C. 内联在控制器中
D. 根据代码库由我决定
2. 数据库迁移方式?
A. 向现有tasks表添加列
B. 新增带外键的priority表
C. tasks表中的JSON字段
D. 根据当前schema由我决定
3. API版本考虑?
A. 添加到现有v1端点
B. 新增v2端点
C. 无需版本控制undefinedundefinedTechnical specification derived from: [PRD filename/link] Generated: [date] | Target branch: [branch] | Commit: [short-hash]
技术规格文档源自:[PRD文件名/链接] 生成时间:[日期] | 目标分支:[分支] | 提交记录:[短哈希值]
| Decision | Choice | Rationale |
|---|---|---|
| ... | ... | ... |
| 决策项 | 选择方案 | 理由 |
|---|---|---|
| ... | ... | ... |
src/
├── services/
│ └── priority.service.ts [NEW]
├── controllers/
│ └── task.controller.ts [MODIFY: add priority endpoints]
├── models/
│ └── priority.model.ts [NEW]
└── migrations/
└── 20240315_add_priority.ts [NEW]src/
├── services/
│ └── priority.service.ts [新增]
├── controllers/
│ └── task.controller.ts [修改:添加优先级相关端点]
├── models/
│ └── priority.model.ts [新增]
└── migrations/
└── 20240315_add_priority.ts [新增]| Method | Path | Description | Auth | Request | Response |
|---|---|---|---|---|---|
| ... | ... | ... | ... | ... | ... |
| 方法 | 路径 | 描述 | 认证 | 请求 | 响应 |
|---|---|---|---|---|---|
| ... | ... | ... | ... | ... | ... |
| Error Code | HTTP Status | Condition | User Message |
|---|---|---|---|
| ... | ... | ... | ... |
| 错误码 | HTTP状态码 | 触发条件 | 用户提示 |
|---|---|---|---|
| ... | ... | ... | ... |
| US/FR | Test | Type | Description |
|---|---|---|---|
| US-001 | ... | unit | ... |
| FR-2 | ... | integration | ... |
| 用户故事/功能需求 | 测试用例 | 类型 | 描述 |
|---|---|---|---|
| US-001 | ... | 单元测试 | ... |
| FR-2 | ... | 集成测试 | ... |
| Issue | SPEC Sections | Priority | Depends On |
|---|---|---|---|
| #1 | 3.1, 3.4 | high | — |
| #2 | 4.1, 4.2, 5.1 | high | #1 |
| ... | ... | ... | ... |
| Issue | SPEC章节 | 优先级 | 依赖项 |
|---|---|---|---|
| #1 | 3.1, 3.4 | 高 | — |
| #2 | 4.1, 4.2, 5.1 | 高 | #1 |
| ... | ... | ... | ... |
| Risk | Impact | Mitigation |
|---|---|---|
| ... | ... | ... |
| 风险 | 影响 | 缓解措施 |
|---|---|---|
| ... | ... | ... |
---
---SPEC generated from PRD. Please review:
- Are the architecture choices appropriate?
- Are there missing edge cases or error scenarios?
- Is the API design consistent with existing patterns?
- Should any section have more/less detail?
Reply OK to save, or provide feedback for iteration.已从PRD生成SPEC,请评审:
- 架构选择是否合适?
- 是否遗漏边缘场景或错误场景?
- API设计是否与现有模式一致?
- 各章节是否需要增减细节?
回复OK以保存,或提供反馈进行迭代。Where should I save the SPEC?
A. tasks/spec-[feature-name].md (alongside PRD, recommended)
B. docs/spec-[feature-name].md
C. Custom path: [specify]应将SPEC保存至何处?
A. tasks/spec-[feature-name].md(与PRD同目录,推荐)
B. docs/spec-[feature-name].md
C. 自定义路径:[指定路径]| PRD Section | SPEC Section(s) | Transformation |
|---|---|---|
| User Stories | 5. Business Logic, 9.4 Acceptance Mapping | Stories → algorithms + test cases |
| Functional Requirements | 4. API Design, 5. Business Logic | FRs → endpoints + logic |
| Acceptance Criteria | 9. Testing Strategy | Criteria → specific test scenarios |
| Non-Goals | 11.1 Open Questions | Clarify what's explicitly excluded |
| Technical Considerations | 2. Architecture, 8. Performance | Constraints → design decisions |
| Success Metrics | 8.1 Expected Load, 10.3 Delivery | Metrics → monitoring + rollout plan |
| PRD章节 | SPEC章节 | 转换方式 |
|---|---|---|
| 用户故事 | 5. 业务逻辑、9.4 验收标准映射 | 故事 → 算法 + 测试用例 |
| 功能需求 | 4. API设计、5. 业务逻辑 | 功能需求 → 端点 + 逻辑 |
| 验收标准 | 9. 测试策略 | 标准 → 具体测试场景 |
| 非目标 | 11.1 未解决问题 | 明确排除的内容 |
| 技术考量 | 2. 架构、8. 性能 | 约束 → 设计决策 |
| 成功指标 | 8.1 预期负载、10.3 交付 | 指标 → 监控 + 上线计划 |
| Scenario | Handling |
|---|---|
| PRD is vague or incomplete | Generate SPEC with best-effort choices, mark assumptions in Section 11.3 |
| PRD conflicts with existing code | Flag conflicts explicitly, propose resolution in Section 11.1 |
| Feature is too large for one SPEC | Split into multiple SPECs (one per service boundary), link them |
| No existing codebase (greenfield) | Skip Step 2, propose architecture from scratch based on PRD + clarifying questions |
| PRD has no User Stories (just bullet points) | Infer structure, map bullets to SPEC sections, note in Summary |
| User wants SPEC without reading codebase | Skip Step 2, note that assumptions about existing code are unverified |
| Multiple PRDs need one SPEC | Merge PRD inputs, deduplicate requirements, note source for each |
| 场景 | 处理方式 |
|---|---|
| PRD模糊或不完整 | 基于最佳实践生成SPEC,在11.3节标记假设条件 |
| PRD与现有代码冲突 | 明确标记冲突,在11.1节提出解决方案 |
| 功能过大,无法放入单个SPEC | 拆分为多个SPEC(按服务边界划分),并建立链接 |
| 无现有代码库(全新项目) | 跳过步骤2,基于PRD和澄清问题从头提出架构 |
| PRD无用户故事(仅要点列表) | 推断结构,将要点映射到SPEC章节,在概述中说明 |
| 用户希望不读取代码库生成SPEC | 跳过步骤2,注明关于现有代码的假设未经验证 |
| 多个PRD需生成一个SPEC | 合并PRD输入,去重需求,记录每个需求的来源 |
/prd → /prd-to-spec → /goal → /review-it → /ship-it
│ │ │
│ Requirements │ Technical │ Implementation
│ (what) │ (how) │ (code)/prd → /prd-to-spec → /goal → /review-it → /ship-it
│ │ │
│ 需求(做什么) │ 技术实现(怎么做) │ 代码实现