to-issues
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseto-issues — PRD/SPEC to Issues
to-issues — PRD/SPEC 转 Issue
Decompose a PRD and/or technical SPEC into small, independent, implementable Issues, then create them in your chosen platform. Works standalone — you don't need to have run first.
/prd将PRD和/或技术SPEC拆解为小型、独立、可落地实现的Issue,然后在你选择的平台中创建它们。该功能可独立使用——无需先执行指令。
/prdThe Job
核心流程
- Locate input — find a PRD or SPEC file (auto-detect or user-specified)
- Decompose into Issues — break User Stories into implementable tickets
- Review with user — present Issue list for approval and adjustment
- Choose platform — GitHub / Local / Baidu iCafe
- Create Issues — create all tickets and print summary
- 定位输入源 —— 找到PRD或SPEC文件(自动检测或用户指定)
- 拆解为Issue —— 将用户故事(User Stories)拆分为可执行的任务工单
- 与用户确认 —— 展示Issue列表供用户审核和调整
- 选择平台 —— GitHub / 本地 / 百度iCafe
- 创建Issue —— 创建所有任务工单并打印总结报告
Step 1: Locate Input
步骤1:定位输入源
Find the input document:
What should I base the Issues on?
A. Auto-detect: scan tasks/ for recent PRDs and SPECs
B. Specific PRD file (e.g., tasks/prd-priority-system.md)
C. Specific SPEC file (e.g., tasks/spec-priority-system.md)
D. Both PRD and SPEC (best: PRD for requirements, SPEC for technical contracts)
E. Paste requirements directlyIf auto-detecting, list available files and let the user choose.
If both PRD and SPEC are available, use the SPEC's Section 10.2 (Issue Mapping) as the primary guide, supplemented by PRD's User Stories. If only PRD is available, generate Issues directly from User Stories.
找到输入文档:
我应该基于什么来生成Issue?
A. 自动检测:扫描tasks/目录下最近的PRD和SPEC文件
B. 指定PRD文件(例如:tasks/prd-priority-system.md)
C. 指定SPEC文件(例如:tasks/spec-priority-system.md)
D. 同时使用PRD和SPEC(最佳方案:PRD提供需求,SPEC提供技术约定)
E. 直接粘贴需求内容如果选择自动检测,列出可用文件并让用户选择。
如果同时有PRD和SPEC文件,以SPEC的10.2节(Issue映射)为主要依据,辅以PRD中的用户故事。如果只有PRD文件,则直接从用户故事生成Issue。
Step 2: Decompose into Issues
步骤2:拆解为Issue
Based on the input document(s), generate a list of Issues. Follow these rules:
- One Issue per User Story — each US-XXX becomes at least one Issue
- Split large stories — if a US has 5+ acceptance criteria or spans frontend + backend, split into 2-3 smaller Issues with clear dependencies
- Merge tiny stories — if a US has only 1-2 trivial criteria, merge it with a related US into a single Issue
- Each Issue must be independently implementable — a single agent session should be able to complete it
- Number Issues sequentially starting from 1
- If SPEC is available — enrich Issues with SPEC references (API endpoints, data model sections, error handling contracts)
Issue format:
Issue #N: [Title]
---
Description: [From US description, with context]
Acceptance Criteria:
- [ ] [From US acceptance criteria]
- [ ] ...
Dependencies: [None / Issue #X]
Type: [backend / frontend / fullstack / ui / infra]
Priority: [high / medium / low]
SPEC Reference: [Section X.Y — only if SPEC available]Present the Issue list for review:
📋 Generated N Issues from [PRD/SPEC]:
#1: Add priority field to database (backend, high)
#2: Display priority indicator on task cards (frontend, high) — depends on #1
#3: Add priority selector to task edit (frontend, medium) — depends on #1
#4: Filter tasks by priority (frontend, medium) — depends on #1, #2
Please review. You can:
- Remove issues: "remove #3"
- Merge issues: "merge #2 and #3"
- Add issues: "add an issue for sorting by priority"
- Adjust: "change #2 priority to high"
- Confirm: reply OK to proceedWait for user confirmation before creating any Issues.
根据输入文档生成Issue列表,需遵循以下规则:
- 每个用户故事对应至少一个Issue —— 每个US-XXX至少生成一个Issue
- 拆分大型用户故事 —— 如果某个用户故事包含5条及以上验收标准,或同时涉及前端和后端,则拆分为2-3个更小的Issue,并明确依赖关系
- 合并小型用户故事 —— 如果某个用户故事只有1-2个简单的验收标准,则将其与相关的用户故事合并为一个Issue
- 每个Issue必须可独立实现 —— 单个Agent会话应能完成该Issue
- Issue编号从1开始顺序排列
- 如果有SPEC文件 —— 为Issue补充SPEC引用(API端点、数据模型章节、错误处理约定)
Issue格式:
Issue #N: [标题]
---
描述: [来自用户故事的描述,包含上下文信息]
验收标准:
- [ ] [来自用户故事的验收标准]
- [ ] ...
依赖关系: [无 / Issue #X]
类型: [backend / frontend / fullstack / ui / infra]
优先级: [high / medium / low]
SPEC引用: [第X.Y节 —— 仅当有SPEC文件时填写]展示Issue列表供审核:
📋 从[PRD/SPEC]生成了N个Issue:
#1: 为数据库添加优先级字段(backend,high)
#2: 在任务卡片上显示优先级标识(frontend,high)—— 依赖#1
#3: 在任务编辑页面添加优先级选择器(frontend,medium)—— 依赖#1
#4: 按优先级筛选任务(frontend,medium)—— 依赖#1、#2
请审核。你可以:
- 删除Issue:"remove #3"
- 合并Issue:"merge #2 and #3"
- 添加Issue:"add an issue for sorting by priority"
- 调整内容:"change #2 priority to high"
- 确认创建:回复OK继续执行在创建任何Issue之前,需等待用户确认。
Step 3: Choose Creation Mode
步骤3:选择创建模式
After user confirms the Issue list, ask:
Choose where to create these Issues:
A. GitHub (via gh CLI)
B. Local (save as .md files)
C. Baidu iCafe (via icafe-cli)
Your choice:用户确认Issue列表后,询问:
选择创建Issue的平台:
A. GitHub(通过gh CLI)
B. 本地(保存为.md文件)
C. 百度iCafe(通过icafe-cli)
你的选择:Step 4: Mode-Specific Creation
步骤4:分模式创建Issue
Mode A: GitHub
模式A:GitHub
Prerequisites: CLI installed and authenticated.
ghActions:
- For each Issue, run:
bash
gh issue create --title "[Title]" --body "[Description + Acceptance Criteria]" --label "[type]" --label "priority: [priority]" - If labels don't exist, create them first or skip the flag
--label - Report created Issue numbers and URLs
前置条件: 已安装并认证 CLI。
gh操作步骤:
- 对每个Issue执行:
bash
gh issue create --title "[标题]" --body "[描述 + 验收标准]" --label "[类型]" --label "priority: [优先级]" - 如果标签不存在,先创建标签或跳过参数
--label - 报告创建的Issue编号和URL
Mode B: Local
模式B:本地
Ask user:
Where should I save the Issue files? (default: .autoresearch/issues)Actions:
- If the specified folder does not exist, create it with
mkdir -p - For each Issue #N, save a file named (zero-padded to 3 digits):
issue-NNN-[slug].mdmarkdown# [Title] ## Description [Description from Issue] ## Acceptance Criteria - [ ] [criterion 1] - [ ] [criterion 2] ## Dependencies [None / Issue #X] ## Type [backend / frontend / fullstack / ui / infra] ## Priority [high / medium / low] - Report created file paths
询问用户:
Issue文件保存到哪里?(默认路径:.autoresearch/issues)操作步骤:
- 如果指定的文件夹不存在,使用创建
mkdir -p - 对每个Issue #N,保存为名为的文件(编号补零至3位):
issue-NNN-[slug].mdmarkdown# [标题] ## 描述 [来自Issue的描述] ## 验收标准 - [ ] [验收标准1] - [ ] [验收标准2] ## 依赖关系 [无 / Issue #X] ## 类型 [backend / frontend / fullstack / ui / infra] ## 优先级 [high / medium / low] - 报告创建的文件路径
Mode C: Baidu iCafe
模式C:百度iCafe
Ask user:
Please provide the iCafe space prefix code (--space):Optionally ask:
Target branch for iCode CR? (default: master)Prerequisites: installed and logged in.
icafe-cliActions:
- For each Issue, run:
bash
icafe-cli card create --space [SPACE] --title "[Title]" --description "[Description + Acceptance Criteria]" --cardtype "[Task/Bug/Story]"- Map Issue to iCafe card type:
type→bug,Bug/ui→frontend, others →StoryTask - Map : high →
priority, medium →高, low →中低
- Map Issue
- If iCafe card creation fails for an Issue, log the error and continue with remaining Issues
- Report created card sequence numbers
询问用户:
请提供iCafe空间前缀码(--space参数):可选询问:
iCode CR的目标分支?(默认:master)前置条件: 已安装并登录。
icafe-cli操作步骤:
- 对每个Issue执行:
bash
icafe-cli card create --space [SPACE] --title "[标题]" --description "[描述 + 验收标准]" --cardtype "[Task/Bug/Story]"- 将Issue的映射为iCafe卡片类型:
type→bug,Bug/ui→frontend,其他类型 →StoryTask - 将映射为iCafe优先级:high →
priority,medium →高,low →中低
- 将Issue的
- 如果某个Issue创建失败,记录错误并继续创建剩余Issue
- 报告创建的卡片序号
Step 5: Summary Report
步骤5:总结报告
After all Issues are created, print a summary:
✅ Issue creation complete!
Source: [PRD/SEC path]
Mode: [GitHub / Local / Baidu iCafe]
Issues created: N所有Issue创建完成后,打印总结:
✅ Issue创建完成!
来源:[PRD/SPEC路径]
模式:[GitHub / 本地 / 百度iCafe]
已创建Issue数量:N| Title | Identifier
| 标题 | 标识
---|------------------------------------------|------------
1 | Add priority field to database | #42 (GitHub) / issue-001-.md (Local) / #22210 (iCafe)
2 | Display priority indicator | #43 / issue-002-.md / #22211
3 | Add priority selector | #44 / issue-003-.md / #22212
4 | Filter tasks by priority | #45 / issue-004-.md / #22213
💡 Tip: Now implement each Issue with /goal:
/goal 42 # GitHub mode
/goal issue-001-*.md # Local mode
------|------------------------------------------|------------
1 | 为数据库添加优先级字段 | #42(GitHub)/ issue-001-.md(本地)/ #22210(iCafe)
2 | 显示优先级标识 | #43 / issue-002-.md / #22211
3 | 添加优先级选择器 | #44 / issue-003-.md / #22212
4 | 按优先级筛选任务 | #45 / issue-004-.md / #22213
💡 提示:现在可以使用/goal指令逐个实现Issue:
/goal 42 # GitHub模式
/goal issue-001-*.md # 本地模式
---Edge Cases & Fallback
边缘场景与 fallback 方案
| Scenario | Handling |
|---|---|
| No PRD/SPEC found in tasks/ | Ask user to provide file path or paste requirements |
| PRD has no User Stories | Derive Issues from Functional Requirements instead |
| SPEC has Issue Mapping (Section 10.2) | Use it as primary source, cross-reference with PRD |
| Show error, suggest |
| Show error, suggest installation, offer to switch to Local mode |
| Issue folder does not exist for Local mode | Auto-create the folder |
| User declines Issue creation | Print the Issue list as a text summary, let user create manually later |
| 场景 | 处理方式 |
|---|---|
| tasks/目录下未找到PRD/SPEC文件 | 询问用户提供文件路径或直接粘贴需求 |
| PRD中没有用户故事 | 从功能需求中推导Issue |
| SPEC包含Issue映射(第10.2节) | 将其作为主要依据,交叉参考PRD内容 |
GitHub模式下 | 显示错误,建议执行 |
百度模式下未安装 | 显示错误,建议安装,并提供切换到本地模式的选项 |
| 本地模式下Issue文件夹不存在 | 自动创建该文件夹 |
| 用户拒绝创建Issue | 将Issue列表打印为文本总结,供用户后续手动创建 |
Relationship to Other Skills
与其他技能的关系
/prd → /prd-to-spec (optional) → /to-issues → /goal → /review-it → /ship-it
│ │ │ │
│ Requirements │ Technical design │ Tickets │ Implementation
│ (what) │ (how) │ (units) │ (code)- /prd — produces the PRD (input to this skill)
- /prd-to-spec — produces the SPEC (optional, enriches Issues with technical detail)
- /to-issues — produces the Issues (this skill)
- /goal — implements Issues one by one
/prd → /prd-to-spec(可选) → /to-issues → /goal → /review-it → /ship-it
│ │ │ │
│ 需求定义 │ 技术设计 │ 任务工单 │ 代码实现
│ (做什么) │ (怎么做) │ (执行单元) │ (代码)- /prd —— 生成PRD(本技能的输入源)
- /prd-to-spec —— 生成SPEC(可选,为Issue补充技术细节)
- /to-issues —— 生成Issue(本技能)
- /goal —— 逐个实现Issue