W1可运行与验证级别: 核心权重: 3修复方式: 手动修改
W1: 明确列出可执行的构建与测试命令
为什么设立这条规则(一手实证依据)
GitHub 对 2,500+ 仓库的分析与 Agent READMEs 均表明:构建与测试命令是 AI 规则文件中最具杠杆的部分。不写清楚命令,代理就会瞎猜包管理器和测试框架。
修复建议添加
## Commands 章节,给出可直接复制执行的 install、fast test、lint 和 build 命令。OpenAI AGENTS.md 实践规范 (2026)
反例(会触发 W1 告警)
# Coding style Prefer small pure functions. (Zero build or test commands documented.)
推荐写法(通过 W1 检查)
## Commands - Fast test: `pytest tests/unit/ -x -q` - Lint: `ruff check .` - Build: `uv build`
本地 CLI 或浏览器一键验证
npm install -g agentlint-ai && agentlint check --check W1