F8可发现性级别: 核心权重: 1修复方式: 手动修改

    F8: 规则文件 frontmatter 使用 globs 而非 paths

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

    4,533 仓库全量统计发现:26.8% 的 .claude/rules/*.md 误把 frontmatter 字段写成 paths: 而非官方字段 globs:,导致作用域规则悄悄不生效。

    修复建议把规则文件 YAML frontmatter 中的 paths: 统一改为 globs: 并确认匹配模式正确。
    AgentLint 4,533 个开源仓库 CLAUDE.md 全量实证分析 (2026)
    反例(会触发 F8 告警)
    # Anti-pattern triggering F8 (Rule file frontmatter uses globs)
    # Rule or repository configuration violates this check without verification.
    推荐写法(通过 F8 检查)
    # Compliant harness passing F8 (Rule file frontmatter uses globs)
    # Concrete, verifiable repository configuration backed by corpus-4533.
    本地 CLI 或浏览器一键验证
    npm install -g agentlint-ai && agentlint check --check F8

    同属「可发现性」维度的更多规则