SuperAPI AI 工具集

self-audit

测试与质量

查看项目

更新于 10-16 08:00

技能介绍

用途:对 agent-scaffolders 自身和测试夹具运行 analyze-plugin 分析器,作为回归冒烟测试,验证分析器输出一致、符合预期。

主要能力与用法:

  1. 对自身跑清单(默认开启安全扫描):python ./scripts/inventory_plugin.py --path . --format json
  2. 对测试夹具跑扫描:python ./scripts/inventory_plugin.py --path ./tests/gold-standard-plugin --format json 以及 python ./scripts/inventory_plugin.py --path ./tests/flawed-plugin --format json
  3. 校验确定性扫描结果:自分析需确认 security_flags = []、issues = [];gold-standard 夹具需确认 security_flags = []、issues = []、warnings = [];flawed 夹具需确认 security_flags 数量 ≥ 4(网络调用与环境访问;混淆凭据仅由 LLM 判断)、issues 数量 ≥ 1(bash 脚本违规)、warnings 数量 ≥ 2(缺少验收标准与引用)。完整预期清单见 ./README.md。
  4. 程序化断言:python ./scripts/assert_audit.py --fixture flawed --json-output <path-to-scan-output.json>。
  5. 对每个夹具跑完整 6 阶段分析:gold-standard-plugin 成熟度应 ≥ L2、无 Critical、至少识别 2 个模式;flawed-plugin 需由 LLM 额外检测缺少 README 文件树与缺少插件清单。
  6. 对分析器自身跑完整 6 阶段:成熟度 ≥ L3、安全评分 ≥ 4/5、结构评分 ≥ 4/5、存在带生命周期状态模式目录治理模型。

报告格式:偏差时输出 ⚠️ SELF-AUDIT REGRESSION: [dimension] expected [X] got [Y];通过时输出 ✅ SELF-AUDIT PASSED: [N] scanner checks passed, [M] fixtures validated, [K] 6-phase checks passed。

适用场景:修改分析器自身文件后、为外部评审创建 bundle 前、更新模式目录前(验证治理合规)。

限制:依赖 Python 3.8+ 且仅标准库,requirements.txt 当前为空;触发语包括“run self-audit”“test the analyzer”“regression test the plugin analyzer”“audit the agent-scaffolders”“verify the analyzer works…”。其他收费、平台等信息暂未提供。