kata-linear
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLinear Ticket Lifecycle
Linear工单生命周期
This skill wraps the general skill with structured start/next/end workflows.
Always invoke for the actual MCP calls.
/linear/linear该Skill在通用 Skill的基础上,封装了结构化的开始/后续/结束工作流。实际MCP调用请始终通过触发。
/linear/linearDetermining the Mode
模式判定
Parse the user's request to determine which workflow to run:
| User says | Mode |
|---|---|
| "start KAT-N", "pick up KAT-N", "implement KAT-N", "work on KAT-N" | Start |
| "finish KAT-N", "complete KAT-N", "done with KAT-N", "close KAT-N" | End |
| "what's next", "what should I work on", "next ticket", "next issue" | Next |
If ambiguous, ask.
解析用户请求以确定要执行的工作流:
| 用户指令 | 模式 |
|---|---|
| "start KAT-N"、"pick up KAT-N"、"implement KAT-N"、"work on KAT-N" | 开始 |
| "finish KAT-N"、"complete KAT-N"、"done with KAT-N"、"close KAT-N" | 结束 |
| "what's next"、"what should I work on"、"next ticket"、"next issue" | 后续 |
若指令模糊,请询问用户确认。
Identifying the Project
项目识别
- Check the current working directory's CLAUDE.md for a Linear project reference.
- If not found, call and ask the user which project to use.
list_projects - Cache the project name for the remainder of the session.
- 检查当前工作目录下的CLAUDE.md文件,查找Linear项目引用。
- 若未找到,调用接口并询问用户要使用哪个项目。
list_projects - 缓存项目名称,用于本次会话的后续操作。
Mode: Next
模式:后续
Find the next actionable issue.
- Query for the project with state
list_issues.Todo - If results exist, present them. The first issue is the recommended next pick.
Todo - If no issues, resolve from blocking relations: a. Query
Todofor the project with statelist_issues. b. For each Backlog issue, callBacklogwithget_issue. c. Find issues whoseincludeRelations: trueentries are allblockedBy(or have no blockers). d. Present unblocked issues as candidates.Done - If the project has Linear documents (execution model, workflow contract), fetch them
with and
list_documentsto understand pillar/phase ordering.get_document
查找下一个可处理的工单。
- 调用接口,查询项目中状态为
list_issues的工单。Todo - 若存在结果,展示给用户。首个工单为推荐的后续处理项。
Todo - 若无工单,则从阻塞关系中查找: a. 调用
Todo接口,查询项目中状态为list_issues的工单。 b. 针对每个Backlog工单,调用Backlog接口并设置get_issue。 c. 找出所有includeRelations: true条目均为blockedBy状态(或无阻塞项)的工单。 d. 将无阻塞的工单作为候选项展示给用户。Done - 若项目包含Linear文档(执行模型、工作流契约),调用和
list_documents接口获取文档,以了解支柱/阶段顺序。get_document
Mode: Start
模式:开始
Step 1 — Validate the issue
步骤1 — 工单验证
- Call for the requested issue with
get_issue.includeRelations: true - Check every entry in . For each blocker, confirm its status is
blockedBy.Done - If any blocker is not , stop and report which blockers remain open.
Done
- 调用接口获取目标工单信息,设置
get_issue。includeRelations: true - 检查中的每个条目,确认每个阻塞项的状态均为
blockedBy。Done - 若存在未完成的阻塞项,终止流程并告知用户剩余的未完成阻塞项。
Step 2 — Move to In Progress
步骤2 — 标记为进行中
- Call to set state to
update_issue.In Progress
- 调用接口将工单状态设置为
update_issue。In Progress
Step 3 — Load context
步骤3 — 加载上下文
- Read the issue description for references to specs, mocks, docs, or design files.
- Check the project's CLAUDE.md for pointers to spec/mock/design directories.
- Read relevant spec files, mock images, or design references found in steps 1 and 2.
- Check existing source code in the areas the issue will touch.
- 读取工单描述,查找对规格说明、原型、文档或设计文件的引用。
- 检查项目的CLAUDE.md文件,查找规格/原型/设计目录的指向。
- 读取步骤1和2中找到的相关规格文件、原型图或设计参考。
- 查看工单涉及代码区域的现有源代码。
Step 4 — Create feature branch
步骤4 — 创建功能分支
- Use the field from the issue response as the branch name.
gitBranchName - Create the branch from the main branch.
- 使用工单返回结果中的字段作为分支名称。
gitBranchName - 基于主分支创建该功能分支。
Step 5 — Summarize
步骤5 — 总结
Present to the user:
- Issue title and acceptance criteria
- Blocker status (all clear)
- Context loaded (specs, mocks, relevant code)
- Branch name created
- Any project-specific workflow reminders from CLAUDE.md (e.g., TDD mandate)
向用户展示以下内容:
- 工单标题与验收标准
- 阻塞项状态(全部已清除)
- 已加载的上下文(规格、原型、相关代码)
- 创建的分支名称
- 来自CLAUDE.md的项目特定工作流提醒(如TDD要求)
Mode: End
模式:结束
Step 1 — Gather evidence
步骤1 — 收集证据
Ask the user to confirm or provide:
- PR link or branch with changes
- Test results (unit and/or E2E)
- Screenshots or spec-state references demonstrating acceptance criteria
If a PR already exists on the current branch, detect it with .
gh pr view请用户确认或提供以下内容:
- 变更对应的PR链接或分支
- 测试结果(单元测试和/或端到端测试)
- 验证验收标准的截图或规格状态引用
若当前分支已存在PR,可通过检测。
gh pr viewStep 2 — Validate completion gate
步骤2 — 验证完成校验
Check if the project's CLAUDE.md or Linear workflow contract defines a hard gate.
Common gates:
- Referenced spec states/interactions are verified
- Evidence links are attached (tests, screenshots, or traceable PR notes)
- Gap analysis items are either closed or split into follow-up issues
If evidence is insufficient, list what's missing and stop.
检查项目的CLAUDE.md或Linear工作流契约是否定义了强制校验规则。常见校验规则:
- 已验证引用的规格状态/交互
- 已附加证据链接(测试、截图或可追溯的PR说明)
- 差距分析项已关闭或拆分为后续工单
若证据不足,列出缺失项并终止流程。
Step 3 — Attach evidence to the issue
步骤3 — 为工单附加证据
- Call on the issue with a structured evidence summary:
create_comment## Completion Evidence - PR: [link] - Tests: [pass/fail summary] - Acceptance coverage: [which criteria verified] - Screenshots: [if applicable]
- 调用接口为工单添加结构化的证据总结:
create_comment## 完成证据 - PR: [链接] - 测试: [通过/失败总结] - 验收覆盖: [已验证的验收标准] - 截图: [如有提供]
Step 4 — Move to Done
步骤4 — 标记为已完成
- Call to set state to
update_issue.Done
- 调用接口将工单状态设置为
update_issue。Done
Step 5 — Promote next in chain
步骤5 — 推进链式工单
- Call with
get_issueon the completed issue.includeRelations: true - For each issue in the list: a. Call
blockswithget_issueon that downstream issue. b. Check if ALL of itsincludeRelations: trueentries are nowblockedBy. c. If yes, callDoneto move it toupdate_issue. d. Report which issue was promoted.Todo
- 调用接口获取已完成工单的信息,设置
get_issue。includeRelations: true - 针对列表中的每个工单: a. 调用
blocks接口获取下游工单信息,设置get_issue。 b. 检查其所有includeRelations: true条目是否均已变为blockedBy状态。 c. 若是,调用Done接口将其状态改为update_issue。 d. 告知用户哪个工单已被推进。Todo
Step 6 — Summarize
步骤6 — 总结
Present:
- Issue marked Done with evidence link
- Which downstream issue(s) were promoted to Todo
- Suggested next action
向用户展示:
- 已标记为Done的工单及证据链接
- 哪些下游工单已被推进至Todo状态
- 建议的下一步操作