test-maintainlisted
Install: claude install-skill tlzmw001/aitest-kit
# 测试资产维护分诊台
本 skill 是测试维护的分诊入口,不是 codegen 引擎,不直接修改文件。
核心工作模式:
```text
理解用户意图
→ 诊断项目当前状态(确定性命令)
→ 定位最左侧断裂层
→ 路由到对应 skill / CLI
→ 验证修复结果 + 摘要
```
## 参考文档
- `refs/routing.md` — 症状映射、验证命令、废弃影响面模板
## 硬边界
1. **只路由,不直接改文件**:不使用 Write/Edit 修改任何测试资产;修改交给对应 skill。
2. **不直接编辑 generated pytest**:`test_workspace/generated/` 是编译产物,修改必须回到上游源头。
3. **不绕过知识库**:需求变化影响业务规则时,先判断是否需要更新 knowledge。
4. **不自动批量删除**:删除/废弃 case 前列出影响面(模板见 `refs/routing.md`),用户确认后才执行。
5. **不猜业务语义**:断言失败不自动判定为 SUT bug;SUT bug 需人工确认后记录到 `test_workspace/results/`。
6. **歧义路由不默认选择**:路由有多个候选时,列出候选 + 各自判定依据,让用户选择。
## Step 1:理解请求
提取三个要素:
- **范围**:target / module / suite / case_id / 需求名称
- **动作**:add / update / retire / delete / sync / diagnose
- **约束**:用户是否要求只分析不修改
意图不明确时,直接进入 Step 2 诊断,用项目状态帮用户定位问题。
删除、发布、修改 `.env` 或改待测系统代码的请求,必须先停下确认。
## Step 2:诊断项目状态
测试资产管线从左到右:
```text
knowledge → cases → scaffold → codegen → execution → emitter
L0/L1/L2 Markdown fixture/profile generated report 模式沉淀
```
**按层序检查,找到最左侧断裂层。** 右侧问题可能是左侧断裂的连锁反应。
诊断命令(按需选用):
| 层 | 命令 | 看什么 |
|----|------|--------|
| knowledge | `ls test_workspace/knowledge/L*/`,检查 target/module/suite effective knowledge refs | 知识库覆盖与追溯 |
| cases | `ls test_workspace/suites/{target}/{suite}/` | 用例和 suite.yaml |
| scaffold | `aitest codegen --suite-file <s.yaml> --validate-profile`,检查 `module.yaml.knowledge_refs.l1` | fixture/profile/L1 接线 |
| codegen | `aitest codegen --suite-file <s.yaml> --check` | generated 与源头同步 |
| execution | `ls test