cawplan skill check
Hard Gate (MUST)
tests/view→test_id, notresult_id; cold start must firstexecution failures --test-id, thendefects draft。defects draft/create-ticket/link-ticketpath of<result_id>can only come from Step 0items[].result_id(or A3 hot relay andresult_id !== test_id)。create-ticket=--body-file+--confirm; forbidden--description、--type、--result-idand other field flags.- Double Confirmation Gate: Step 2 decision gate →
--dry-run→ Step 4/5 submission gate →--confirm. Skipping gates is forbidden. - User Display: friendly field names (
ux.md §Glossary);result_idhidden by default; Agent on its ownAskUserQuestion(not written toallowed-tools)。
Reference Loading (MUST)
| Timing | Read | Forbidden |
|---|---|---|
| Opening | None | One-time Read of all references |
| Cold start / URL / Step 0–1 | execution.md corresponds to § |
— |
| Step 1.5 | execution.md §Title |
— |
| Step 2 / 4 / 5 confirmation and display | ux.md |
— |
Allowed Commands
| Step | Command |
|---|---|
| 0 | execution failures … --test-id; missing version → resolve-url |
| Auxiliary | products list、versions list |
| 1 | defects draft(field flag) |
| 4 | defects create-ticket(--body-file) |
| 5 | defects link-ticket(--ticket-id) |
Forbidden:cawplan api, no test_id full Version of failures, Run polling, asking for a Run link in the first round,--include-flaky(unless explicitly requested), unconfirmed write operations.
Workflow
| Step | Action | Detail |
|---|---|---|
| 0 | Parse context; cold start failures --test-id(no --run-id) |
execution §0 |
| 0.5 | default items[0]; multiple Results / no Result / already linked → interactive |
ux §Prompts |
| 1 | defects draft; placeholder remarks → back to Step 0 |
execution §1 |
| 1.5 | Title refinement (CREATE_NEW);SKIP_BUG skip |
execution §Title |
| 2 | Preview + decision gate (create/link/skip/change title) | ux §Prompts |
| 3 | CREATE_NEW→4;LINK_EXISTING→5;SKIP_BUG→stop (can force create→4) |
— |
| 4 | Assemble body → --dry-run → submission gate → --confirm |
execution §Create |
| 5 | link-ticket --dry-run → submission gate → --confirm |
execution §Create |
Can skip Step 0: same-session A3 failures line contains result_id+comment and result_id !== test_id; or the user-provided result_id is not a tests/view parsed value.
Output
Main text must not display by default result_id、UUID、recommendation/failure_category raw enums.
## 缺陷登记结果
| 项目 | 内容 |
|------|------|
| 用例 | {case_title} |
| TestRail 测试 | [{test_id}]({result_url}) |
| 目标版本 | {version_name} |
| 处理方式 | {新建缺陷 / 关联已有 / 暂不登记} |
| CawPlan 缺陷单 | [{display_id}]({ticket_url}) |
| 缺陷标题 | {final_description} |
| TestRail 回写 | {链接或「已关联」} |
Expand only when the user asks for "technical details":result_id、created_on、case_id、run_id、product_id、version_id。
References
- execution.md — URL, Step 0–1, title refinement, create/link body
- ux.md — friendly field names, AskUserQuestion, confirmation gate