dapei-validationlisted
Install: claude install-skill ygwa/dapei-skill
# dapei.validation skill
负责测试命令发现、执行与 validation 报告生成。
## 边界
| dapei 平台 | Agent |
|------------|-------|
| 测试命令发现、测试执行、报告聚合 | 理解测试失败原因、修复问题 |
| 输出结构化 validation-report.yaml | 理解「哪些验证未通过」 |
**禁止**:平台替 Agent 修复代码或修改测试本身。
## 路由能力
| 意图 | Capability |
|------|------------|
| 发现 repo 测试命令 | `validation.detect` |
| 执行测试并收集结果 | `validation.execute` |
| 执行完整验证流程 | `validation.run` |
| 获取验证报告路径 | `validation.report` |
---
## 工作流(方法,非实现)
### Detect(发现)
**目标**:识别 repo 中所有可用的测试命令。
1. 读取 repo manifest(package.json, Makefile, pom.xml 等)
2. 识别测试命令类型:
- `npm test` / `yarn test` (Node)
- `pytest`, `tox` (Python)
- `go test` (Go)
- `mvn test`, `gradle test` (Java)
3. 识别验证命令:
- lint (eslint, flake8, golangci-lint)
- type-check (tsc, mypy)
- format-check (prettier, black)
4. 输出发现结果
**产出示例**:
```yaml
repo: payment-service
detected_commands:
- type: unit_test
command: npm test
coverage: npm run test:coverage
- type: e2e_test
command: npm run test:e2e
- type: lint
command: npm run lint
- type: type_check
command: npm run type-check
```
### Execute(执行)
**目标**:按指定顺序执行验证命令并收集结果。
1. 按优先级执行命令(lint → type-check → unit → e2e)
2. 捕获 stdout/stderr 和退出码
3. 解析测试结果(如 JUnit XML, TAP, JSON 格式)
4. 记录每项验证的 pass/fail 状态
**产出示例**:
```yaml
results:
- command: npm run lint
status: pass
duration: 12s
- command: npm run type-check
status: pass
duration: 8s
- command: npm test
status: fail
duration: 45s
failures: 2
error