plan-jira-ticket
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePlan Jira Ticket
Jira工单开发计划
Ticket ID: $ARGUMENTS
Ticket details:
!
acli jira workitem view $ARGUMENTS工单ID: $ARGUMENTS
工单详情:
!
acli jira workitem view $ARGUMENTSWorkflow
工作流
- Parse ticket — Extract summary, description, acceptance criteria, linked issues, and attachments from the ticket details above.
- Create or switch to branch — Follow Branch Naming. Check for an existing branch matching this ticket before creating a new one.
- Transition ticket — Run .
acli jira workitem update $ARGUMENTS --status "In Progress" - Enter plan mode — Call EnterPlanMode.
- 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)
- 解析工单 — 从上述工单详情中提取摘要、描述、验收标准、关联议题和附件。
- 创建或切换到分支 — 遵循分支命名规范。在创建新分支前检查是否存在与该工单匹配的现有分支。
- 更新工单状态 — 运行 。
acli jira workitem update $ARGUMENTS --status "In Progress" - 进入计划模式 — 调用EnterPlanMode。
- 制定实现计划 — 编写包含以下内容的计划:
- 以工单ID和摘要作为计划标题
- 来自工单的验收标准(如有则直接引用原文)
- 包含具体创建或修改文件的技术方案
- 测试策略
- 范围外事项(哪些内容不需要修改)
Branch Naming
分支命名
Format:
{TICKET-ID}-{slugified-summary}| Rule | Detail |
|---|---|
| Preserve ticket ID case | |
| Slugify summary | Lowercase, replace spaces and special characters with hyphens, collapse consecutive hyphens |
| Truncate slug | 50 characters max, break at word boundary |
| Remove trailing hyphens | |
Result:
PROJ-123-add-user-login-page格式:
{TICKET-ID}-{slugified-summary}| 规则 | 详情 |
|---|---|
| 保留工单ID大小写 | |
| 摘要转slug格式 | 转为小写,将空格和特殊字符替换为连字符,合并连续的连字符 |
| 截断slug | 最多50个字符,在单词边界处截断 |
| 移除末尾连字符 | |
示例结果:
PROJ-123-add-user-login-pageBranch Check
分支检查
- List local branches:
git branch --list '*{TICKET-ID}*' - List remote branches:
git branch -r --list '*{TICKET-ID}*' - Match found → . Pull latest if remote tracking branch exists.
git checkout {branch} - No match → .
git checkout -b {new-branch-name}
- 列出本地分支:
git branch --list '*{TICKET-ID}*' - 列出远程分支:
git branch -r --list '*{TICKET-ID}*' - 找到匹配分支 → 执行 。若存在远程跟踪分支则拉取最新代码。
git checkout {branch} - 无匹配分支 → 执行 。
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
错误处理
| Error | Action |
|---|---|
| Stop. Instruct user to install Atlassian CLI. |
| Ticket ID not found | Stop. Report invalid ticket ID. |
| Branch creation fails | Check for name conflicts. Report error. |
| Status transition fails | Log warning. Continue — ticket may already be In Progress or use a different workflow. |
No | Stop. Prompt user for a ticket ID. |
| 错误 | 操作 |
|---|---|
未找到 | 终止操作,指导用户安装Atlassian CLI。 |
| 未找到工单ID | 终止操作,报告无效工单ID。 |
| 分支创建失败 | 检查名称冲突,报告错误。 |
| 状态更新失败 | 记录警告,继续执行——工单可能已处于“In Progress”状态或使用不同的工作流。 |
未提供 | 终止操作,提示用户提供工单ID。 |