Releases: yihui504/TestVDB
v2.2.0 — 命令解耦
🎉 命令解耦 — 三命令智能协作
把单一 /testvdb:mine 流水线拆成三个可独立触发、智能协作的子命令。mine 在不显式指定时自动判断是否需要先跑前两者。
✨ 新特性
三命令解耦
/testvdb:contract <db> <version> [--force]— 独立文档提取 + 契约生成(knowledge-extractor → contract-formalizer → 门控)/testvdb:intel <db> [--max-issues N] [--max-commits N] [--force]— 独立情报采集 + 威胁建模(issue-miner → bug-shape → threat-modeler)/testvdb:mine <db> <version> [--intel|--contract] [...]— 攻击挖掘(智能消费 intel/contract 缓存)
智能 D 判断(scripts/check_cache.py)
四条件缓存复用检测:存在 → TTL 新鲜 → 有效 → target/version 匹配
- 全满足 → 纯挖掘(跳过生成,省时)
- 任一不满足 → 重新生成
- CacheStatus:
USABLE/MISSING/STALE/INVALID/MISMATCH
C 边界(--intel / --contract false)
区分"我有但想用旧的" vs "压根没有"——避免无前置产物时静默挖掘:
| 缓存状态 | --xxx false 行为 |
|---|---|
| MISSING | 报错退出("缺失,请先 /testvdb:xxx") |
| STALE / INVALID | 用现有 + 警告(不刷新) |
| USABLE | 正常使用 |
✅ 端到端验收(CC 2.1.165)
5 场景验收,4/5 PASS(场景 4 核心点被场景 1 --force 覆盖——同一 agent 派发链):
| 场景 | 结果 | 证据 |
|---|---|---|
| contract 独立 | ✅ | 双重:缓存命中(weaviate 1.38.0, 83端点) + 真实 --force(milvus 2.4.0, 30端点/门控PASS) |
| intel 独立 | ✅ | 真实端到端(pgvector):issue-miner(25+11) → bug-shape(7) → threat-modeler(6盲点/3攻击面) |
| mine 缓存有效 | ✅ | 智能消费决策路径(contract+intel 双 USABLE→跳过→进挖掘) |
| mine --contract false | ✅ | C 边界:无契约 → MISSING → 报错退出 |
5 种 Agent 全部派发成功,零 unknown:knowledge-extractor / contract-formalizer / issue-miner / bug-shape-extractor / threat-modeler
📊 质量
- pytest:55 passed, 1 skipped(无回归,+7 check_cache)
agents/orchestrator.md瘦化 834 → 767 行(<800)- TDD:check_cache 测试先行,发现并修复 spec 决策 4 顺序 bug(有效性应先于 target/version 匹配)
📦 变更清单
- ➕
scripts/check_cache.py+tests/test_check_cache.py(D 判断核心,7 passed TDD) - ➕
commands/contract.md+commands/intel.md(独立命令,完整 agent prompt) - ♻️
commands/mine.md重构(智能消费,原地升级保编号——避免合并重编号破坏 Step 顺序) - ♻️
agents/orchestrator.md瘦化(情报/契约编排引用 intel/contract 命令) - ⚙️
.claude-plugin/plugin.json注册 intel/contract 命令 + version 2.1.1 → 2.2.0 - 📝
README.md+README_zh.md中英双语重写
🔗 关联
- PR #13:#13
- Spec / Plan:
docs/superpowers/specs/2026-06-14-batch-d-command-decoupling-design.md - 前序版本:v2.1.3(反偷工减料流水线门禁)
完整文档:README.md(English)| README_zh.md(中文)
v2.1.1 — Quality Hardening
v2.1.1 Quality Hardening
TestVDB v2.1.1 对缺陷挖掘流水线的全面质量加固。基于 Qdrant v1.18.2 冷启动实战验证。
冷启动验证结果 (Qdrant v1.18.2)
| 指标 | 结果 |
|---|---|
| API 格式验证通过率 | 71/71 (100%) |
| 脚本执行错误 | 0 |
| 虚构评论检测 | 0 |
| 虚构原子性约束 | 0 |
| 确认缺陷 | 6 |
新增脚本
- threat_model_injector.py — 威胁模型程序化注入(attack/judge/reporter 三模式)
- detect_risky_scripts.py — 脚本错误启发式静态检测
- scan_script_errors.py — 执行后错误扫描 + 打回修改机制
- dedup_defects.py — 多维度缺陷去重
- validate_api_format.py (enhanced) — AST 级别 API 调用格式验证
根因修复
| ID | 问题 | 修复方案 |
|---|---|---|
| H1 | evidence_tier 缺失 → 虚构断言 | 证据层级→断言映射原则机制 |
| H2 | 评论真实性无法验证 | 跨 issue 唯一性检查 |
| H4 | by_design 排除过于宽泛 | 具体可操作的排除规则 |
| P0 | 裸 .json() 调用导致未处理异常 | safe_request() 强制 + AST 验证 |
Agent 更新
12 个 Agent 定义全面更新:attack-boundary, attack-state, attack-semantic, orchestrator, contract-formalizer, judge-evidence, judge-novelty, judge-severity, bug-shape-extractor, issue-miner, threat-modeler, model-test
安装
Installing plugin "yihui504/TestVDB"...
升级
Checking for updates for plugin "TestVDB" at user scope…
v2.0.0 — First Release
TestVDB v2.0 — Automated Vector Database Defect Mining
New Features
Fan-Out Attack Trio: 9 concurrent agents (3 attack types x 3 focus profiles) with 3-tier deduplication
Cross-Session Strategy Evolution: strategy_extractor.py, strategy_registry/, strategy_injector.py with cross-DB migration
7-Mode AI Failure Checklist: LLM hallucination detection with halt/reject/rewind policies
Material Passport: SHA-256 contract hash integrity verification, tamper detection
Data Access Level: 4-tier permission declarations (raw/redacted/verified_only) on all 13 agents
Docker Executor: Dual-tier execution (host Python / Docker stdin pipe)
Quick Install
Supports
Milvus | Qdrant | Weaviate | pgvector
Requirements
- Claude Code CLI (latest), Docker 20.10+, Python 3.9+, 10GB+ disk
- License: MIT