W4可运行与验证级别: 核心权重: 1修复方式: 手动修改

    W4: 项目配置了代码格式化与 Linter 工具

    为什么设立这条规则(一手实证依据)

    用 ESLint / Ruff / Clippy / golangci-lint 机械化执行代码风格,远比在 CLAUDE.md 里写 50 行风格规范更省 token 且 100% 稳定。

    修复建议在仓库根目录配置 linter 并在入口文件里注明对应的单行校验命令。
    Harness Engineering 工程实践指南 (2026)
    反例(会触发 W4 告警)
    # Anti-pattern triggering W4 (Linter configured)
    # Rule or repository configuration violates this check without verification.
    推荐写法(通过 W4 检查)
    # Compliant harness passing W4 (Linter configured)
    # Concrete, verifiable repository configuration backed by harness-engineering.
    本地 CLI 或浏览器一键验证
    npm install -g agentlint-ai && agentlint check --check W4

    同属「可运行与验证」维度的更多规则