creating-jira-subtasks
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreating Jira Subtasks
创建Jira子任务
Purpose
用途
Dispatch the subagent to read the task plan, create
corresponding subtasks in Jira under the parent ticket, and update the plan
file with subtask keys for traceability.
subtask-creatorThis skill is a pure coordinator — it dispatches one subagent and reports
the result. It never makes Jira API calls, reads files, writes files, or
runs commands directly.
调度子Agent读取任务计划,在Jira的父工单下创建对应的子任务,并更新计划文件添加子任务编号以实现可追溯性。
subtask-creator本技能是纯协调器——它仅调度一个子Agent并上报结果,不会直接调用Jira API、读写文件或执行命令。
Platform Compatibility
平台兼容性
This skill follows the Agent Skills open standard and works across Claude Code,
Cursor, OpenCode, and other compatible tools. Subagent delegation is the only
platform-specific behavior:
| Platform | Dispatch method |
|---|---|
| Claude Code | Natural language or @-mention the subagent. Uses the Agent tool (renamed from Task in v2.1.63). |
| Cursor | Auto-delegates based on subagent description, or explicit mention. Supported since Cursor 2.4 (Jan 2026). |
| OpenCode | @-mention or Task tool. Also reads |
All platforms support co-located subagents inside skill directories. The
subagent at is read by the orchestrating agent
at dispatch time and passed as the subagent's system prompt.
./subagents/subtask-creator.md本技能遵循Agent Skills开放标准,可在Claude Code、Cursor、OpenCode及其他兼容工具中使用。子Agent调度是唯一和平台相关的行为:
| 平台 | 调度方法 |
|---|---|
| Claude Code | 自然语言或@提及子Agent,使用Agent工具(v2.1.63版本中从Task重命名而来)。 |
| Cursor | 基于子Agent描述自动调度,或显式提及。从Cursor 2.4(2026年1月)版本开始支持。 |
| OpenCode | @提及或使用Task工具,也会读取 |
所有平台都支持技能目录下的同路径子Agent。调度时编排Agent会读取路径下的子Agent文件,作为子Agent的系统提示词传入。
./subagents/subtask-creator.mdInputs
输入
| Input | Source | Required | Example |
|---|---|---|---|
| User / | Yes | |
The task plan file must already exist at .
If it does not, tell the user to run planning-jira-tasks first.
docs/<TICKET_KEY>-tasks.md| 输入 | 来源 | 必填 | 示例 |
|---|---|---|---|
| 用户输入 / | 是 | |
任务计划文件必须已存在于路径。如果文件不存在,请告知用户先运行planning-jira-tasks。
docs/<TICKET_KEY>-tasks.mdInput contract
输入约定
The plan file must contain these sections, produced by upstream skills:
| Required section | Produced by | Purpose |
|---|---|---|
| planning-jira-tasks | Each task becomes one Jira subtask |
| planning-jira-tasks | Determines creation sequence |
| clarifying-assumptions | Phase-completion signal; resolved decisions |
Per-task | clarifying-assumptions | Subtask descriptions reflect resolved answers |
Per-task | clarifying-assumptions | Descriptions include confirmed approach |
Pre-flight gate: If is missing, the plan has not been
clarified. The subagent will note this as a warning but proceed. Warn the user
and ask whether to continue or run clarifying-assumptions first.
## Decisions Log计划文件必须包含以下由上游技能生成的模块:
| 必填模块 | 生成方 | 用途 |
|---|---|---|
带编号任务模块的 | planning-jira-tasks | 每个任务对应生成一个Jira子任务 |
| planning-jira-tasks | 决定子任务的创建顺序 |
| clarifying-assumptions | 阶段完成信号,存储已解决的决策 |
每个任务下的 | clarifying-assumptions | 子任务描述会体现已解决的问题答案 |
每个任务下的 | clarifying-assumptions | 子任务描述包含确认的实现方案 |
前置校验: 如果缺少章节,说明计划还未完成澄清。子Agent会记录该警告但继续执行,需要向用户同步该警告,询问是继续执行还是先运行clarifying-assumptions。
## Decisions LogOutput
输出
- Subtasks created in Jira under .
TICKET_KEY - A summary table printed to the user showing each subtask key and title.
- The local plan file updated with created subtask keys for traceability.
- 在Jira的父工单下创建子任务
TICKET_KEY - 向用户输出汇总表格,展示每个子任务的编号和标题
- 更新本地计划文件,添加已创建的子任务编号实现可追溯性
Output contract (consumed by executing-jira-task)
输出约定(供executing-jira-task使用)
| Addition | Required by | Purpose |
|---|---|---|
| executing-jira-task | Maps task numbers to Jira keys for status updates |
| executing-jira-task | Executor transitions the correct Jira issue |
The orchestrator checks for as the Phase 4 completion
signal.
## Jira Subtasks| 新增内容 | 使用方 | 用途 |
|---|---|---|
| executing-jira-task | 映射任务序号和Jira编号,用于状态更新 |
每个任务章节下的 | executing-jira-task | 执行器可以流转对应Jira issue的状态 |
编排器会将章节的存在作为第4阶段完成的信号。
## Jira SubtasksSubagent Registry
子Agent注册表
| Subagent | Path | Purpose |
|---|---|---|
| | End-to-end: parse plan → lookup parent → build payloads → create → update → validate |
Before dispatching, read the subagent file to understand its input/output
contract. The path is relative to this skill's directory.
| 子Agent | 路径 | 用途 |
|---|---|---|
| | 全流程处理:解析计划 → 查询父工单 → 构建请求体 → 创建子任务 → 更新文件 → 校验结果 |
调度前请读取子Agent文件了解其输入输出约定,路径是相对于本技能目录的相对路径。
Execution Steps
执行步骤
1. Dispatch subtask-creator
subtask-creator1. 调度subtask-creator
subtask-creatorRead and dispatch the subagent with:
./subagents/subtask-creator.md- — the ticket key from the user's input.
TICKET_KEY
The subagent handles everything end-to-end:
- Reads and parses the task plan (all task sections + Decisions Log).
- Looks up the parent ticket via Jira MCP (extracts project key, subtask issue type).
- Builds subtask payloads in Jira wiki markup, cross-referencing resolved decisions.
- Creates subtasks sequentially via Jira MCP (with retry on rate limits).
- Handles individual failures gracefully (logs + continues).
- Updates : adds
docs/<TICKET_KEY>-tasks.mdtable and## Jira Subtasksper task.Jira Subtask: <KEY> - Validates the output contract (table exists, keys present, counts match).
- Cleans up any temporary files.
- Returns a concise summary.
读取,传入以下参数调度子Agent:
./subagents/subtask-creator.md- — 用户输入的工单编号
TICKET_KEY
子Agent会端到端处理所有流程:
- 读取并解析任务计划(所有任务章节 + 决策日志)
- 通过Jira MCP查询父工单(提取项目编号、子任务issue类型)
- 用Jira wiki标记语言构建子任务请求体,关联已解决的决策
- 通过Jira MCP按顺序创建子任务(触发限流时自动重试)
- 优雅处理单个任务创建失败(记录日志 + 继续执行)
- 更新:添加
docs/<TICKET_KEY>-tasks.md表格,为每个任务添加## Jira Subtasks行Jira Subtask: <KEY> - 校验输出约定(表格存在、编号完整、数量匹配)
- 清理所有临时文件
- 返回精简的执行总结
2. Handle the result
2. 处理执行结果
Collect the subagent's summary. Check for issues:
- If the subagent reports the parent ticket was not found: Relay the error to the user and stop.
- If the subagent reports all subtasks failed: Tell the user no subtasks were created. Offer to retry or investigate.
- If the subagent reports partial failures: Relay which tasks failed and which succeeded.
- If the subagent warns that was missing: Relay this warning to the user.
## Decisions Log - If validation FAIL: Relay the details to the user. Offer to retry.
收集子Agent的执行总结,检查是否存在问题:
- 如果子Agent上报未找到父工单: 将错误同步给用户,终止流程
- 如果子Agent上报所有子任务创建失败: 告知用户未创建任何子任务,提供重试或排查选项
- 如果子Agent上报部分失败: 同步创建成功和失败的任务信息
- 如果子Agent警告缺少: 将该警告同步给用户
## Decisions Log - 如果校验失败: 将详情同步给用户,提供重试选项
3. Clean up
3. 清理
Delete any temporary files that may remain:
bash
rm -f docs/<TICKET_KEY>-subtask-manifest.md
rm -f docs/<TICKET_KEY>-subtask-results.md删除可能残留的临时文件:
bash
rm -f docs/<TICKET_KEY>-subtask-manifest.md
rm -f docs/<TICKET_KEY>-subtask-results.md4. Report to the user
4. 向用户上报结果
Using ONLY the information from the subagent's summary, tell the user:
- Total subtasks created vs. total tasks in plan.
- Table of subtask keys, titles, and links.
- Any failures or warnings.
- Remind the user that no implementation has started — subtasks are in "To Do".
仅使用子Agent返回的总结信息,向用户告知以下内容:
- 已创建子任务数量 / 计划总任务数量
- 子任务编号、标题、链接的汇总表格
- 所有失败信息和警告
- 提醒用户尚未开始执行实现工作,子任务状态为「To Do」
Error Handling
错误处理
- Jira MCP unavailable: The subagent will report this. Relay to the user and stop.
- Parent ticket not found: The subagent will report this. Relay and stop.
- Individual subtask failure: The subagent handles this internally (logs
- continues). Relay the failures from the summary.
- ALL subtasks fail: The subagent will NOT write the table. Tell the user Phase 4 is incomplete.
## Jira Subtasks - Subagent delegation fails: If the platform cannot dispatch the subagent,
fall back to reading the subagent's file and executing its instructions directly.
.md
- Jira MCP不可用: 子Agent会上报该错误,同步给用户后终止流程
- 父工单未找到: 子Agent会上报该错误,同步给用户后终止流程
- 单个子任务创建失败: 子Agent会内部处理(记录日志 + 继续执行),从总结中提取失败信息同步给用户
- 所有子任务创建失败: 子Agent不会写入表格,告知用户第4阶段未完成
## Jira Subtasks - 子Agent调度失败: 如果平台无法调度子Agent, fallback为读取子Agent的文件,直接执行其指令
.md