creating-jira-subtasks

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Creating Jira Subtasks

创建Jira子任务

Purpose

用途

Dispatch the
subtask-creator
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.
This 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.
调度
subtask-creator
子Agent读取任务计划,在Jira的父工单下创建对应的子任务,并更新计划文件添加子任务编号以实现可追溯性。
本技能是纯协调器——它仅调度一个子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:
PlatformDispatch method
Claude CodeNatural language or @-mention the subagent. Uses the Agent tool (renamed from Task in v2.1.63).
CursorAuto-delegates based on subagent description, or explicit mention. Supported since Cursor 2.4 (Jan 2026).
OpenCode@-mention or Task tool. Also reads
.claude/agents/
as a fallback.
All platforms support co-located subagents inside skill directories. The subagent at
./subagents/subtask-creator.md
is read by the orchestrating agent at dispatch time and passed as the subagent's system prompt.
本技能遵循Agent Skills开放标准,可在Claude Code、Cursor、OpenCode及其他兼容工具中使用。子Agent调度是唯一和平台相关的行为:
平台调度方法
Claude Code自然语言或@提及子Agent,使用Agent工具(v2.1.63版本中从Task重命名而来)。
Cursor基于子Agent描述自动调度,或显式提及。从Cursor 2.4(2026年1月)版本开始支持。
OpenCode@提及或使用Task工具,也会读取
.claude/agents/
目录作为兜底方案。
所有平台都支持技能目录下的同路径子Agent。调度时编排Agent会读取
./subagents/subtask-creator.md
路径下的子Agent文件,作为子Agent的系统提示词传入。

Inputs

输入

InputSourceRequiredExample
TICKET_KEY
User /
$ARGUMENTS
Yes
JNS-6065
The task plan file must already exist at
docs/<TICKET_KEY>-tasks.md
. If it does not, tell the user to run planning-jira-tasks first.
输入来源必填示例
TICKET_KEY
用户输入 /
$ARGUMENTS
JNS-6065
任务计划文件必须已存在于
docs/<TICKET_KEY>-tasks.md
路径。如果文件不存在,请告知用户先运行planning-jira-tasks

Input contract

输入约定

The plan file must contain these sections, produced by upstream skills:
Required sectionProduced byPurpose
## Tasks
with numbered task sections
planning-jira-tasksEach task becomes one Jira subtask
## Execution Order Summary
planning-jira-tasksDetermines creation sequence
## Decisions Log
clarifying-assumptionsPhase-completion signal; resolved decisions
Per-task
Questions to answer
resolved
clarifying-assumptionsSubtask descriptions reflect resolved answers
Per-task
Implementation notes
updated
clarifying-assumptionsDescriptions include confirmed approach
Pre-flight gate: If
## Decisions Log
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.
计划文件必须包含以下由上游技能生成的模块:
必填模块生成方用途
带编号任务模块的
## Tasks
章节
planning-jira-tasks每个任务对应生成一个Jira子任务
## Execution Order Summary
章节
planning-jira-tasks决定子任务的创建顺序
## Decisions Log
章节
clarifying-assumptions阶段完成信号,存储已解决的决策
每个任务下的
Questions to answer
已解决
clarifying-assumptions子任务描述会体现已解决的问题答案
每个任务下的
Implementation notes
已更新
clarifying-assumptions子任务描述包含确认的实现方案
前置校验: 如果缺少
## Decisions Log
章节,说明计划还未完成澄清。子Agent会记录该警告但继续执行,需要向用户同步该警告,询问是继续执行还是先运行clarifying-assumptions。

Output

输出

  • 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使用)

AdditionRequired byPurpose
## Jira Subtasks
table (Task #, Key, Title, Status)
executing-jira-taskMaps task numbers to Jira keys for status updates
Jira Subtask: <KEY>
line in each task section
executing-jira-taskExecutor transitions the correct Jira issue
The orchestrator checks for
## Jira Subtasks
as the Phase 4 completion signal.
新增内容使用方用途
## Jira Subtasks
表格(包含任务序号、编号、标题、状态)
executing-jira-task映射任务序号和Jira编号,用于状态更新
每个任务章节下的
Jira Subtask: <KEY>
executing-jira-task执行器可以流转对应Jira issue的状态
编排器会将
## Jira Subtasks
章节的存在作为第4阶段完成的信号。

Subagent Registry

子Agent注册表

SubagentPathPurpose
subtask-creator
./subagents/subtask-creator.md
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路径用途
subtask-creator
./subagents/subtask-creator.md
全流程处理:解析计划 → 查询父工单 → 构建请求体 → 创建子任务 → 更新文件 → 校验结果
调度前请读取子Agent文件了解其输入输出约定,路径是相对于本技能目录的相对路径。

Execution Steps

执行步骤

1. Dispatch
subtask-creator

1. 调度
subtask-creator

Read
./subagents/subtask-creator.md
and dispatch the subagent with:
  • TICKET_KEY
    — the ticket key from the user's input.
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
    docs/<TICKET_KEY>-tasks.md
    : adds
    ## Jira Subtasks
    table and
    Jira Subtask: <KEY>
    per task.
  • Validates the output contract (table exists, keys present, counts match).
  • Cleans up any temporary files.
  • Returns a concise summary.
读取
./subagents/subtask-creator.md
,传入以下参数调度子Agent:
  • 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
    ## Decisions Log
    was missing:
    Relay this warning to the user.
  • 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.md

4. 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
    ## Jira Subtasks
    table. Tell the user Phase 4 is incomplete.
  • Subagent delegation fails: If the platform cannot dispatch the subagent, fall back to reading the subagent's
    .md
    file and executing its instructions directly.
  • Jira MCP不可用: 子Agent会上报该错误,同步给用户后终止流程
  • 父工单未找到: 子Agent会上报该错误,同步给用户后终止流程
  • 单个子任务创建失败: 子Agent会内部处理(记录日志 + 继续执行),从总结中提取失败信息同步给用户
  • 所有子任务创建失败: 子Agent不会写入
    ## Jira Subtasks
    表格,告知用户第4阶段未完成
  • 子Agent调度失败: 如果平台无法调度子Agent, fallback为读取子Agent的
    .md
    文件,直接执行其指令