Includes AirPlan design documents, AircOding-alpha1-plan, AirPlanV2, AirPlan-ParaV2, AirPlan-Para V1 reference docs, and all working code changes across packages. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
50 lines
1.4 KiB
Markdown
Executable File
50 lines
1.4 KiB
Markdown
Executable File
---
|
||
description: "AirPlan sdb mode - multi-language static analyzer (cppcheck/clang-tidy/clippy/go-vet/tsc/mypy)"
|
||
argument-hint: "[analyze]"
|
||
allowed-tools: "[Read, Glob, Grep, Bash, Write, Edit]"
|
||
---
|
||
|
||
# /sdb
|
||
|
||
AirSDB 是多语言静态分析器。支持六种后端和 diff 模式。
|
||
|
||
## 支持的后端
|
||
|
||
| 后端 | --backend 值 | 语言 |
|
||
|------|-------------|------|
|
||
| Cppcheck | `cppcheck` | C/C++ |
|
||
| Clang-Tidy | `clang-tidy` | C/C++ |
|
||
| Clippy | `clippy` | Rust |
|
||
| go vet + staticcheck | `go-vet` | Go |
|
||
| tsc --noEmit | `tsc` | TypeScript |
|
||
| mypy + ruff | `mypy` | Python |
|
||
|
||
## 子命令
|
||
|
||
### 执行静态分析
|
||
|
||
```bash
|
||
python scripts/airplan.py --mode sdb --project . --backend cppcheck --target ./src
|
||
```
|
||
|
||
参数:
|
||
- `--backend`:分析后端(默认 `cppcheck`)
|
||
- `--target`:分析目标路径
|
||
|
||
返回每行一个 finding:`{file}:{line}: {severity}: {message}`。最多显示 10 个。
|
||
|
||
## diff 模式
|
||
|
||
两次扫描结果对比,高亮新增/消除的 finding:
|
||
```bash
|
||
# 第一次扫描 → 保存基线
|
||
python scripts/airplan.py --mode sdb --project . --backend cppcheck --target ./src > baseline.txt
|
||
# 修改代码后第二次扫描 → Agent 读取两次结果对比 diff
|
||
```
|
||
|
||
## 集成路径
|
||
|
||
**Dbg 取证**:Dbg 在 `locate_root_cause` 步骤可调 sdb 获取静态分析证据。
|
||
|
||
**Do Worker 完成前**:Worker finish 前可调 sdb 验证代码质量。
|