W7可运行与验证级别: 核心权重: 2修复方式: 手动修改
W7: 提供快速本地单测验证命令
为什么设立这条规则(一手实证依据)
如果文档里只有跑 5 分钟的全量测试命令,AI 要么每次小改都卡死数分钟,要么直接跳过测试。提供单文件或 -m 'not slow' 快速命令能把迭代提速 10 倍。
修复建议在
## Commands 首行写出 15 秒内完成的单测命令(如 npx vitest run <file> 或 uv run pytest tests/unit/ -x -q)。 反例(会触发 W7 告警)
# Anti-pattern triggering W7 (Local fast test command documented) # Rule or repository configuration violates this check without verification.
推荐写法(通过 W7 检查)
# Compliant harness passing W7 (Local fast test command documented) # Concrete, verifiable repository configuration backed by anthropic-265.
本地 CLI 或浏览器一键验证
npm install -g agentlint-ai && agentlint check --check W7