plan-jira-ticket

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Plan Jira Ticket

Jira工单开发计划

Ticket ID: $ARGUMENTS
Ticket details: !
acli jira workitem view $ARGUMENTS
工单ID: $ARGUMENTS
工单详情: !
acli jira workitem view $ARGUMENTS

Workflow

工作流

  1. Parse ticket — Extract summary, description, acceptance criteria, linked issues, and attachments from the ticket details above.
  2. Create or switch to branch — Follow Branch Naming. Check for an existing branch matching this ticket before creating a new one.
  3. Transition ticket — Run
    acli jira workitem update $ARGUMENTS --status "In Progress"
    .
  4. Enter plan mode — Call EnterPlanMode.
  5. Create implementation plan — Write a plan covering:
    • Ticket ID and summary as the plan title
    • Acceptance criteria from the ticket (verbatim when available)
    • Technical approach with specific files to create or modify
    • Testing strategy
    • Out-of-scope items (what NOT to change)
  1. 解析工单 — 从上述工单详情中提取摘要、描述、验收标准、关联议题和附件。
  2. 创建或切换到分支 — 遵循分支命名规范。在创建新分支前检查是否存在与该工单匹配的现有分支。
  3. 更新工单状态 — 运行
    acli jira workitem update $ARGUMENTS --status "In Progress"
  4. 进入计划模式 — 调用EnterPlanMode。
  5. 制定实现计划 — 编写包含以下内容的计划:
    • 以工单ID和摘要作为计划标题
    • 来自工单的验收标准(如有则直接引用原文)
    • 包含具体创建或修改文件的技术方案
    • 测试策略
    • 范围外事项(哪些内容需要修改)

Branch Naming

分支命名

Format:
{TICKET-ID}-{slugified-summary}
RuleDetail
Preserve ticket ID case
PROJ-123
stays
PROJ-123
Slugify summaryLowercase, replace spaces and special characters with hyphens, collapse consecutive hyphens
Truncate slug50 characters max, break at word boundary
Remove trailing hyphens
add-user-login-
becomes
add-user-login
Result:
PROJ-123-add-user-login-page
格式:
{TICKET-ID}-{slugified-summary}
规则详情
保留工单ID大小写
PROJ-123
保持为
PROJ-123
摘要转slug格式转为小写,将空格和特殊字符替换为连字符,合并连续的连字符
截断slug最多50个字符,在单词边界处截断
移除末尾连字符
add-user-login-
变为
add-user-login
示例结果:
PROJ-123-add-user-login-page

Branch Check

分支检查

  1. List local branches:
    git branch --list '*{TICKET-ID}*'
  2. List remote branches:
    git branch -r --list '*{TICKET-ID}*'
  3. Match found →
    git checkout {branch}
    . Pull latest if remote tracking branch exists.
  4. No match →
    git checkout -b {new-branch-name}
    .
  1. 列出本地分支:
    git branch --list '*{TICKET-ID}*'
  2. 列出远程分支:
    git branch -r --list '*{TICKET-ID}*'
  3. 找到匹配分支 → 执行
    git checkout {branch}
    。若存在远程跟踪分支则拉取最新代码。
  4. 无匹配分支 → 执行
    git checkout -b {new-branch-name}

Plan Requirements

计划要求

Include:
  • Ticket ID and summary as the plan title
  • Acceptance criteria extracted from the ticket (verbatim when present)
  • Files to create or modify with rationale
  • Testing approach
  • Dependencies or blockers from the ticket
Exclude:
  • Work outside the ticket scope
  • Speculative features not in the ticket
  • Refactoring unrelated to ticket objectives
必须包含:
  • 以工单ID和摘要作为计划标题
  • 从工单中提取的验收标准(如有则直接引用原文)
  • 要创建或修改的文件及理由
  • 测试方案
  • 工单中的依赖项或阻塞项
必须排除:
  • 工单范围外的工作
  • 工单中未提及的推测性功能
  • 与工单目标无关的重构

Error Handling

错误处理

ErrorAction
acli
not found
Stop. Instruct user to install Atlassian CLI.
Ticket ID not foundStop. Report invalid ticket ID.
Branch creation failsCheck for name conflicts. Report error.
Status transition failsLog warning. Continue — ticket may already be In Progress or use a different workflow.
No
$ARGUMENTS
provided
Stop. Prompt user for a ticket ID.
错误操作
未找到
acli
终止操作,指导用户安装Atlassian CLI。
未找到工单ID终止操作,报告无效工单ID。
分支创建失败检查名称冲突,报告错误。
状态更新失败记录警告,继续执行——工单可能已处于“In Progress”状态或使用不同的工作流。
未提供
$ARGUMENTS
终止操作,提示用户提供工单ID。