mcpField
C
cawplan-defect-ticket

cawplan-defect-ticket

github.com/cawcutTesting & quality1120 installsUpdated 3d ago
Repository

About cawplan-defect-ticket

cawplan-defect-ticket is a defect-registration skill for testing and quality teams. It guides failed test results through drafting, review, and either ticket creation or linking, with confirmation gates before writes.

Key features

  1. 01Draft defects from failed tests
  2. 02Create or link existing tickets
  3. 03Preview and confirm before writing
  4. 04Hide technical identifiers by default

Use cases

  1. 01Register a defect from a failed test
  2. 02Link a test result to an existing defect
  3. 03Review defect details before submission

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/cawcut/skill-cawplan --skill cawplan-defect-ticket

After installing, type/cawplan-defect-ticketin Claude Code to confirm it loaded.

Bundled filesreferences/execution.mdreferences/ux.md

Details

From the project README

CawPlan Defect Ticket — A4 失败转缺陷

cawplan skill check

硬门禁(MUST)

  1. tests/view → test_id,不是 result_id;冷启动必须先 execution failures --test-id,再 defects draft。
  2. defects draft / create-ticket / link-ticket 的路径 <result_id> 只能来自 Step 0 items[].result_id(或 A3 热接力且 result_id !== test_id)。
  3. create-ticket = --body-file + --confirm;禁止 --description、--type、--result-id 等字段 flag。
  4. 双确认闸:Step 2 决策闸 → --dry-run → Step 4/5 提交闸 → --confirm。禁止跳闸。
  5. 用户展示:友好字段名(ux.md §Glossary);result_id 默认隐藏;Agent 自行 AskUserQuestion(不写入 allowed-tools)。

Reference 加载(MUST)

时机Read禁止
开场无一次性 Read 全部 references
冷启动 / URL / Step 0–1execution.md 对应 §—
Step 1.5execution.md §Title—
Step 2 / 4 / 5 确认与展示ux.md—

允许命令

Step命令
0execution failures … --test-id;缺 version → resolve-url
辅助products list、versions list
1defects draft(字段 flag)
4defects create-ticket(--body-file)
5defects link-ticket(--ticket-id)

禁止:cawplan api、无 test_id 的全 Version failures、Run 轮询、首轮要 Run 链接、--include-flaky(除非明确要求)、未确认写操作。

Workflow

Step动作Detail
0解析上下文;冷启动 failures --test-id(首轮无 --run-id)execution §0
0.5默认 items[0];多 Result / 无 Result / 已关联 → 交互ux §Prompts
1defects draft;占位 remarks → 回 Step 0execution §1
1.5标题精炼(CREATE_NEW);SKIP_BUG 跳过execution §Title
2预览 + 决策闸(新建/关联/跳过/改标题)ux §Prompts
3CREATE_NEW→4;LINK_EXISTING→5;SKIP_BUG→停(可强制新建→4)—
4组装 body → --dry-run → 提交闸 → --confirmexecution §Create
5link-ticket --dry-run → 提交闸 → --confirmexecution §Create

可跳过 Step 0:同会话 A3 failures 行含 result_id+comment 且 result_id !== test_id;或用户给的 result_id 非 tests/view 解析值。

输出

主文禁止默认展示 result_id、UUID、recommendation/failure_category 原始枚举。

## 缺陷登记结果

| 项目 | 内容 |
|------|------|
| 用例 | {case_title} |
| TestRail 测试 | [{test_id}]({result_url}) |
| 目标版本 | {version_name} |
| 处理方式 | {新建缺陷 / 关联已有 / 暂不登记} |
| CawPlan 缺陷单 | [{display_id}]({ticket_url}) |
| 缺陷标题 | {final_description} |
| TestRail 回写 | {链接或「已关联」} |

用户要「技术详情」时再展开:result_id、created_on、case_id、run_id、product_id、version_id。

References

  • execution.md — URL、Step 0–1、标题精炼、create/link body
  • ux.md — 字段友好名、AskUserQuestion、确认闸

Comments

Markdown supported