بنقرة واحدة
tapd-workitem-sync
// Use when development requirements are confirmed and before implementation starts - ensures a TAPD work item exists for the work, creating one if needed.
// Use when development requirements are confirmed and before implementation starts - ensures a TAPD work item exists for the work, creating one if needed.
| name | tapd-workitem-sync |
| description | Use when development requirements are confirmed and before implementation starts - ensures a TAPD work item exists for the work, creating one if needed. |
在用户确认开发需求后、开始开发前,确保 TAPD 当前空间中存在对应单据;若已存在则直接返回 ID,否则创建并返回 ID。
digraph tapd_sync {
"用户确认开发需求" [shape=ellipse];
"获取 workspace_id" [shape=box];
"提取搜索关键词" [shape=box];
"查询需求/缺陷" [shape=box];
"是否已存在?" [shape=diamond];
"返回已有单据 ID" [shape=box];
"获取最新迭代" [shape=box];
"创建需求或缺陷" [shape=box];
"返回新单据 ID" [shape=box];
"用户确认开发需求" -> "获取 workspace_id";
"获取 workspace_id" -> "提取搜索关键词";
"提取搜索关键词" -> "查询需求/缺陷";
"查询需求/缺陷" -> "是否已存在?";
"是否已存在?" -> "返回已有单据 ID" [label="是"];
"是否已存在?" -> "获取最新迭代" [label="否"];
"获取最新迭代" -> "创建需求或缺陷";
"创建需求或缺陷" -> "返回新单据 ID";
"返回已有单据 ID" -> "开始开发" [style=dashed];
"返回新单据 ID" -> "开始开发" [style=dashed];
}
workspace_id 或项目名,直接使用workspace_id = 70120217get_user_participant_projects,从返回列表中按项目名匹配从开发需求中提取 2–5 个核心关键词,用于模糊匹配:
示例:需求「构建研发 skills」→ 关键词 构建研发skills 或 研发skills
需求(stories):调用 get_stories_or_tasks:
workspace_id, options: { entity_type: "stories", name: "%关键词%", limit: 10 }
缺陷(bugs):调用 get_bug:
workspace_id, options: { title: "%关键词%", limit: 10 }
匹配逻辑:遍历返回结果,若任一单据的 name(需求)或 title(缺陷)包含关键词,或关键词包含单据标题的核心部分,视为匹配。
1070120217131972327,短 ID 为后 9 位 131972327TAPD 单据 ID:131972327https://tapd.woa.com/70120217/prong/stories/view/131972327获取最新迭代:调用 get_iterations:
workspace_id, options: { status: "open", order: "enddate desc", limit: 5 }
取第一条(enddate 最晚的开放迭代)的 id 作为 iteration_id。
创建需求:调用 create_story_or_task:
workspace_id, name: "汇总后的需求标题", options: { entity_type: "stories", iteration_id, description }
创建缺陷:调用 create_bug:
workspace_id, title: "汇总后的缺陷标题", options: { iteration_id, description }
汇总规则:
data.Story.id 或 data.Bug.id 提取短 ID| 项目 | TAPD 空间名 | workspace_id |
|---|---|---|
| bk-flow | BKFlow | 70120217 |
其他项目可通过 get_user_participant_projects 查询。
无论找到或新建,最终必须返回:
TAPD 单据 ID:{短ID}
可选:附上可点击的 TAPD 链接。
Use when creating a TAPD test request from PRs or requirement changes and needing a standardized, reusable template for BKFlow.
独立的原型生成工具。用自然语言描述需求,AI 澄清后生成高保真可交互的 HTML 原型。触发条件:"做个原型"、"设计页面"、"出个交互稿"、"prototype xxx"
After implementing or modifying API code in bkflow/apigw, automatically updates or generates apidoc markdown files in bkflow/apigw/docs/zh/. Use when API views, serializers, or routes are changed, or when the user asks to sync API docs or generate apidoc.
基于现有页面快速生成 UI 原型。当需要设计新页面、修改现有页面布局、新增 UI 功能模块,或需要向产品/设计对齐 UI 方案时使用。支持截图输入和文字描述输入。