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

    W9: 发布工作流校验 Tag 与清单版本号一致

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

    多仓库发布审计表明,只检查 vX.Y.Z 正则的发布 CI 经常发出 tag 与 package.json/pyproject.toml 版本不匹配的包。

    修复建议在发布 workflow 中提取 git tag 并与 manifest 版本号比对,不一致时非零退出。
    AgentLint 4,533 个开源仓库 CLAUDE.md 全量实证分析 (2026)
    多项目真实生产仓库审计记录 (2026)
    反例(会触发 W9 告警)
    # Anti-pattern triggering W9 (Release workflow validates version consistency)
    # Release workflow only validates tag format without checking package.json or pyproject.toml.
    推荐写法(通过 W9 检查)
    # Compliant harness passing W9 (Release workflow validates version consistency)
    # Release CI compares git tag version against manifest version and exits 1 on mismatch.
    本地 CLI 或浏览器一键验证
    npm install -g agentlint-ai && agentlint check --check W9

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