ワンクリックで
multi-issue-dag-authoring
为复杂需求生成父 issue + sub-issues 的 DAG 化写作模板与创建步骤,默认使用 Sub-Issue 模式(parent/depends-on),并提供降低并行冲突的拆分规则。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
为复杂需求生成父 issue + sub-issues 的 DAG 化写作模板与创建步骤,默认使用 Sub-Issue 模式(parent/depends-on),并提供降低并行冲突的拆分规则。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use this skill when the input is product/business narrative and the goal is to produce executable domain modeling artifacts before YAML coding. It converts descriptions into model cards (context, aggregate, relations, state machine, validation, actions, events, custom overlays), enforces single-writer/cross-domain event rules, creates refine task lists, and prepares handoff inputs for `ubo-yaml-writing`.
为复杂需求生成父 issue + sub-issues 的 DAG 化写作模板与创建步骤,默认使用 Sub-Issue 模式(parent/depends-on),并提供降低并行冲突的拆分规则。
使用 taskctl research 工具进行假设驱动的研究推理。声明假设、收集证据、贝叶斯更新后验概率,最终收敛到可行动的结论。
根据 niuma 工作流要求,创建结构化的 GitHub Issue,便于后续 AI 自动化处理
为 bcc arch 命令创建和维护 seed 文件。分析代码结构,定义模块边界,识别依赖关系,避免漏定义和过度定义。
对后端源码文件生成严格遵循模板的分析文档。读源码→提取结构→按模板填充所有章节(职责/行为意图/行为/约束/输入输出/调用链/副作用/异常处理/PRD映射)。
| name | multi-issue-dag-authoring |
| description | 为复杂需求生成父 issue + sub-issues 的 DAG 化写作模板与创建步骤,默认使用 Sub-Issue 模式(parent/depends-on),并提供降低并行冲突的拆分规则。 |
用于“需求较大、需要并行但有依赖”的 issue 设计与创建。
Sub-Issue 模式(父 issue + 子 issue)parent: #<parent_issue_number>depends-on: #<issue1>, #<issue2>bot:orchestrate(由 control 接管后自动流转)bot:orchestrate,niuma 会把父 issue 当作独立任务来跑,导致重复执行。bot:orchestrate 进入编排队列。control 会根据 depends-on 自动排队。bot:orchestrate → bot:queued → bot:fix(依赖满足后触发单 issue 流程)。bot:fix,不经过 DAG 编排。bot:* 属于受控状态标签,统一通过 niuma state-label 迁移;禁止直接 gh issue edit --add-label/--remove-label bot:*。bot:* 标签,使用 niuma state-label set --to bot:orchestrate 时省略 --from。--from 仅用于已有 bot 标签的状态迁移(CAS 语义)。feat(<scope>): <description>。sub(#<parent>): <description>(推荐,便于按父 issue 检索)。depends-on。affected_files,用于降低并行冲突。risk_and_rollback,明确失败时回退路径。## 背景
...
## 目标
...
## 非目标
...
## DAG 结构(概要)
- L0: #A #B
- L1: #C(depends-on A), #D(depends-on B)
- L2: #E(depends-on C,D)
## 关键路径(Critical Path)
- #A -> #C -> #E
## Sub-Issues
- [ ] #<sub1>
- [ ] #<sub2>
- [ ] #<sub3>
## 总体验收标准
- [ ] 所有 sub issue 完成并关闭
- [ ] 关键链路测试通过
- [ ] 无未决阻塞依赖
## 背景
...
## 任务定义
...
## 依赖
parent: #<parent>
depends-on: #<optional_dep_1>, #<optional_dep_2>
## 影响范围
- affected_files:
- `path/a`
- `path/b`
## 风险与回滚
- risk_and_rollback:
- 风险: ...
- 回滚: ...
## 测试场景
1. 输入: ...
预期: ...
2. 边界: ...
预期: ...
## 验收标准
- [ ] 功能完成
- [ ] 测试通过
创建完所有 issue 后,在父 issue 添加一条评论,用 Mermaid 画出完整 DAG 依赖图。GitHub 会自动渲染。
I + issue 编号:I30、I31#编号 简短描述 层级DAG 图(Mermaid)如下:
```mermaid
graph TD
I7["#7 feat(session): 对齐 Pi 的多 Issue DAG 编排 父"]
I8["#8 Session 契约与事件归一 L0"]
I9["#9 CLI 分发与运行时策略 L0"]
I10["#10 Session 核心功能对齐 Pi L1"]
I11["#11 Session BDD 场景补齐 L1"]
I12["#12 CLI 接入 Session 事件流 L1"]
I13["#13 CI 与集成回归收口 L2"]
I7 --> I8
I7 --> I9
I7 --> I10
I7 --> I11
I7 --> I12
I7 --> I13
I8 --> I10
I8 --> I11
I8 --> I12
I9 --> I12
I10 --> I13
I11 --> I13
I12 --> I13
```
连接(点击跳转):
- #7: https://github.com/<owner>/<repo>/issues/7
- #8: https://github.com/<owner>/<repo>/issues/8
- #9: https://github.com/<owner>/<repo>/issues/9
P。parent: #P 与可选 depends-on。- [ ] #<sub>。bot:orchestrate;若走单 Issue 直跑,打 bot:fix。# 创建父 issue
gh issue create --title "feat(<scope>): <parent-title>" --body-file /tmp/parent.md --label enhancement
# 创建子 issue(示例)
gh issue create --title "sub(#<parent>): <task-title>" --body-file /tmp/sub1.md --label enhancement
# ============================================================
# 触发标签(重要:只给子 issue 打,不给父 issue 打)
# ============================================================
# 多 issue DAG 编排:给每个子 issue 打 bot:orchestrate
# 注意:新 issue 首次打标签时省略 --from(因为没有前置 bot 状态)
niuma state-label set --repo <owner/repo> --issue <子issue编号> --to bot:orchestrate
# 单 issue 直跑:给目标 issue 打 bot:fix(同样省略 --from)
niuma state-label set --repo <owner/repo> --issue <issue编号> --to bot:fix
# 已有 bot 标签的状态迁移:用 --from 做 CAS 约束
niuma state-label set --repo <owner/repo> --issue <issue编号> --from bot:pr-needs-fix --to bot:iterating
当你已经给子 issue 打了 bot:orchestrate,但看起来“没开始”时,先用 control 命令确认系统状态:
# 1) 看全局 DAG 与 task 状态
niuma control status --repo <owner/repo> --repo-dir <repo_dir>
# 2) 检查某个 issue 是否进入编排队列
niuma control check --repo <owner/repo> --issue <issue编号> --repo-dir <repo_dir>
# 3) 手动跑一轮协调循环(最常用)
niuma control run --repo <owner/repo> --repo-dir <repo_dir>
control run 的期望行为bot:orchestrate/bot:queued 的 issue 为本地 tasks。depends-on 拓扑,只把 ready 的子 issue 从 bot:queued 推进到 bot:fix。bot:queued(这是正确行为,不是卡死)。bot:queued,只看到 1 个变成 bot:fix:正常。DAG 按关键路径逐个推进。bot:orchestrate:会被当独立任务,造成干扰。清理父 issue 的 bot:*。niuma control run 可补偿推进。GITHUB_TOKEN environment variable not set,需要先注入 token。export GITHUB_TOKEN="$(gh auth token)"
niuma control run --repo <owner/repo> --repo-dir <repo_dir>
bot:orchestrate:父 issue 会被 niuma 当作独立任务来跑,与子 issue 重复执行。父 issue 只做 tracker,不打 bot 标签。--from:新 issue 没有 bot 状态,--from 会导致 CAS 校验失败(mismatch)。首次打标签省略 --from。gh issue edit --add-label bot:*:绕过了状态机校验和并发保护,可能导致多状态冲突。必须用 niuma state-label set。