cawplan-testplan-layout
Orchestrate CawPlan QA Insights TestRail test plans from Version/Ticket-scoped imported cases with preview-first workflow. Use when: creating or executing A2 TestRail Plans/Runs for a CawPlan version or one or more CawPlan tickets after cases have been imported. NOT for: importing test cases (use `cawplan-testcase-import`); generating test points; execution summaries; defect filing; release risk. Do NOT use `cawplan api GET /api/v1/public/openapi/product/{product_id}` to resolve product name — that route does not exist.
How do I install this agent skill?
npx skills add https://github.com/cawcut/skill-cawplan --skill cawplan-testplan-layoutIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill facilitates TestRail test plan orchestration through a structured workflow using the cawplan CLI tool. It incorporates multiple safety measures, including a mandatory preview-first process, user confirmation gates, and input validation steps. No malicious behavior or security risks were identified.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
CawPlan TestPlan Layout — A2 测试计划编排
cawplan skill check
硬门禁(MUST)
- preview-first:禁止跳过 preview 直接
plan execute。 - execute 仅用
preview_id;禁止 execute 前重算范围或改 Milestone /ticket_reuse_strategy。 - Milestone 名 =
{product_name} {version_name}(禁止{version_name} - QA Execution)。 - Ticket 增量编排:默认
ticket_reuse_strategy=AUTO(BE 默认);已绑定 TicketREUSE不新建 Run;全量重建须 preview 时显式--ticket-reuse-strategy CREATE_ALL。 - 阻断性 gap → 硬禁止 execute。见
ux.md §Gaps。 - 用户展示:
ux.md §Glossary;UUID/preview_id默认隐藏;跟随用户主语言;Agent 自行AskUserQuestion。 - 双确认闸:预览决策闸(Step 3)→ 执行提交闸(Step 5
--confirm)。 - plan-rules set:仅 SQA 明确要求调整 R1–R7 时执行。
- 首次 Milestone 闸门:
mapping-get返回has_mapping=false时,禁止跳过框 M 直接plan preview(§Intent命中或§ConfirmState复用除外)。 - 非首次免询问:
has_mapping=true时禁止弹框 M;直接AUTOpreview。框 M 或 Intent 确认后至 execute 前禁止改milestone_strategy/milestone_id。
Reference 加载(MUST)
| 时机 | Read | 禁止 |
|---|---|---|
| Step 0 / preview / execute CLI | execution.md | 一次性 Read 全部 references |
| Step 1.5 / 1.6 / Milestone 首次确认 | execution.md §MilestoneProbe · §MilestoneValidate · §MilestoneFirstLayout | — |
| 交互、preview、gap、确认闸 | ux.md | — |
| Milestone REUSE 二次确认(Step 2.1) | execution.md §Incremental · ux.md §Prompts | — |
允许命令
plan-rules get(默认);plan-rules set(仅用户明确要求)milestone mapping-get、milestone validateplan preview(可选--milestone-strategy、--milestone-id、--ticket-reuse-strategy)、plan executeproducts list、versions list
禁止:cawplan api、链式 &&、手动传 suite_id、直连 TestRail。
Workflow
| Step | 动作 | Detail |
|---|---|---|
| 0 | 解析 product_id/version_id/名称;编排范围 | execution.md §0 · 缺信息 → ux.md §Prompts |
| 1 | plan-rules get;用户要求才 set | execution.md §Rules |
| 1.5 | milestone mapping-get | execution.md §MilestoneProbe |
| 1.5a | has_mapping=false → 框 M(默认新建) | ux.md §MilestoneFirstConfirm · §ConfirmState |
| 1.6 | 框 M 选「绑定已有」→ milestone validate(Intent REUSE_BY_ID 免本步) | execution.md §MilestoneValidate |
| 2 | plan preview(策略见 §MilestoneFirstLayout 或 AUTO) | execution.md §Preview · §Incremental |
| 2.1 | AUTO + REUSE + LATEST_MAPPING → Milestone 二次确认 | ux.md §Prompts · 框 M / Intent 已确认则跳过 |
| 3 | 友好 preview → 预览决策闸 | ux.md;NEW_CASES_NOT_IN_RUN 须确认 |
| 4 | 无阻断 gap 且过闸 → 执行提交闸 | ux.md §Prompts |
| 5 | plan execute --preview-id … --confirm | execution.md §Execute |
输出
主文禁止默认展示 UUID。plan_count/run_count = 将新建(不含 REUSE)。
## 测试计划编排结果 — {product_name} {version_name}
| 项目 | 内容 |
|------|------|
| 里程碑 | [{milestone.name}]({milestone.url}) |
| 工单范围 | {全版本 / ticket 列表} |
| 复用 | {to_reuse_ticket_count} 个工单沿用已有 Run |
| 新建 | {to_create_ticket_count} 个工单 · {plan_count} 计划 · {run_count} 运行 |
### 按工单
| 工单 | 处理方式 | 计划/运行 | 链接 |
|------|----------|-----------|------|
| {display_id} | 复用/新建 | … | [查看](url) |
用户要「技术详情」时再展开:preview_id、plan_mapping_id、reused_plan_mapping_ids、created_plan_mapping_ids、confirmed_milestone_strategy。
References
- execution.md — 范围、CLI、Milestone 探测、增量编排、R1–R7、execute
- ux.md — 友好名、框 M、ConfirmState、确认闸、gap/warning、AskUserQuestion
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/cawcut/skill-cawplan/cawplan-testplan-layout">View cawplan-testplan-layout on skillZs</a>