# 内容元素规范 Gate 规则
# 来源: openJiuwen-style-guide-content-elements.md

rules:
  # === 项目列表 ===

  - id: ce-list-dash-format
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#列表-1"
    message: "无序列表统一使用破折号(-)跟一空格, 有序列表使用数字+英文句点+空格, 禁止用 */+ /)"
    pattern: "^\\s*(?:\\*|\\+|\\d+\\))\\s+"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-list-consistent-style
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#列表-2"
    message: "列表项采用相似结构、统一句式 (需人工确认)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-list-punctuation-rule
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#列表-3"
    message: "术语/短语列表项句末不加标点, 句子列表项句末加句号 (需人工确认)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-list-item-count
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#列表-4"
    message: "一个项目列表的列表项建议为2~9项 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-list-single-item-merge
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#列表-5"
    message: "只有一项的列表应和前后上下文合并, 采用正文样式 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-list-max-depth-2
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#列表-6"
    message: "列表层级不超过2层 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  # === 表格 ===

  - id: ce-table-min-size
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#表格-1"
    message: "表格至少为两行两列"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-table-size-limit
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#表格-2"
    message: "表格行数≤9行, 列数≤4列, 推荐2~3列 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-table-markdown-readable
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#表格-3"
    message: "Markdown表格预览不佳时需减少列数或改写为项目列表"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-table-header-consistent
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#表格-4"
    message: "相同类型的表头风格保持一致, 采用名词或名词词组 (需人工确认)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-table-column-punctuation
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#表格-5"
    message: "同一列信息表达方式一致, 句末标点符号一致 (需人工确认)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-table-no-empty-cells
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#表格-6"
    message: "不出现空白单元格, 无内容区分'无'和'不涉及'(用'—')"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-table-no-merge-cells
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#表格-7"
    message: "Markdown不支持合并单元格, 需拆分表格或合并行内容"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-table-left-align
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#表格-8"
    message: "表格内容默认使用左对齐"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-table-transpose-wide
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#表格-9"
    message: "列多行少时建议把列转换成行 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-table-title-consistent
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#表格-10"
    message: "同类表格的表标题风格保持一致 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  # === 图片 ===

  - id: ce-img-copyright-required
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#图片-1"
    message: "严禁使用无版权图片, 无法确认版权的需改用自绘/自拍"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-img-clear-content
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#图片-2"
    message: "图片应清晰展示目标信息 (需人工确认)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-img-size-limit
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#图片-3"
    message: "图片尺寸不能大于一屏 (需人工确认)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-img-local-not-url
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#图片-4"
    message: "图片禁止通过URL地址引用, 需存放到本地引用"
    pattern: "!\\[.*\\]\\(https?://"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-img-naming-convention
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#图片-5"
    message: "图片命名: 字母+数字+中划线, 语义化, 不超过4个英文单词, 同目录不重复"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-img-size-recommendation
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#图片-6"
    message: "建议图片宽度: 大图800px/中图480px/小图260px (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-img-title-style-consistent
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#图片-7"
    message: "同类图形图标题风格保持一致 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  # === 绘图 ===

  - id: ce-drawing-english-capitalization
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#绘图-1"
    message: "绘图中英文单词大小写: 术语/缩略语统一大小写, 其他用Sentence caps"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-drawing-font-size
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#绘图-2"
    message: "字号: 中英文正常10.5pt(14px), 中文下限9pt(12px), 英文下限8pt(11px) (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-drawing-color-scheme
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#绘图-3"
    message: "优先灰蓝配色, 一张图不超过3套配色 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  # === 截图 ===

  - id: ce-screenshot-complete-border
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#截图-1"
    message: "截图边缘完整清晰, 无边界时添加浅灰外边框(RGB:217/217/217) (需人工确认)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-screenshot-no-extra-info
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#截图-2"
    message: "截图中不要截取非必要信息 (需人工确认)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-screenshot-no-sensitive-info
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#截图-3"
    message: "截图中不能包含敏感信息 (私人邮箱/公网IP等) (需人工确认)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-screenshot-highlight-style
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#截图-4"
    message: "关键信息使用1px蓝色(RGB:37/79/247)线框框选 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  # === 提示与说明 ===

  - id: ce-note-use-proper-marker
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#提示-1"
    message: "使用 说明/注意/警告 信息标识符, 区分严重程度"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-note-blockquote-syntax
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#提示-2"
    message: "使用 Markdown 引用语法 (>) 描述提示信息"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-note-no-table-image
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#提示-3"
    message: "提示或补充信息中不能包含表格和图片 (图标除外)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-note-length-limit
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#提示-4"
    message: "提示内容不能过长, 建议在一个段落范围内"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-note-caution-before-text
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#提示-5"
    message: "'注意'及以上级别提示统一放在正文或步骤之前"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-note-no-abuse
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#提示-6"
    message: "禁止滥用'说明', 一屏超过2个需改为正文"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  # === 链接 ===

  - id: ce-link-click-verb
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#链接-1"
    message: "使用动词'单击'表示网页类链接操作"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-link-third-party-must-be-standard
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#链接-2"
    message: "链接到第三方网页须确保业界认可的标准公共信息, 否则禁止提供链接"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-link-cross-doc-style
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#链接-3"
    message: "跨文档链接推荐'请参见xxx'表达 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-link-short-content-inline
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#链接-4"
    message: "内容少于100字直接重述, 不添加链接 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-link-avoid-excessive
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#链接-5"
    message: "避免过多交叉引用和外部链接 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-link-text-descriptive
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#链接-6"
    message: "链接文字可根据上下文描述, 无需与被链接标题一致 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  # === 链接样式 ===

  - id: ce-link-no-bare-url
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#链接样式-1"
    message: "链接URL须写入内容, 不可直接暴露URL地址"
    pattern: "(?<!\\]\\()https?://[^\\s\\)]+"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-link-markdown-only
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#链接样式-2"
    message: "链接使用纯净 Markdown 格式, 不可使用 HTML 标签"
    pattern: "<a\\s+href="
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-link-to-doc-not-heading
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#链接样式-3"
    message: "链接其他文档时直接链接到文档, 避免链接到文档中一级标题"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  # === 术语及缩略语 ===

  - id: ce-term-consistent-with-glossary
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#术语-1"
    message: "术语/缩略语须同 openJiuwen 术语表保持一致且全文统一 (需人工确认)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-term-match-industry-standard
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#术语-2"
    message: "未涵盖的行业通用术语须同国际/国家/行业标准一致 (需人工确认)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-term-no-custom-abbreviation
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#术语-3"
    message: "禁止随意缩写英文单词, 禁止自创缩略语"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-term-must-have-explanation
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#术语-4"
    message: "除行业通用术语外, 所有术语/缩略语需在术语表中给出解释 (需人工确认)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-term-abbreviation-uppercase
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#术语-5"
    message: "中文文档中缩略语全称中对应字母大写"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-term-glossary-format
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#术语-6"
    message: "术语表格式: '英文全称 (缩略语)；中文全称'"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-term-first-occurrence-full-name
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#术语-7"
    message: "缩略语首次出现时应提供英文全称 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-term-no-component-in-glossary
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#术语-8"
    message: "组件名称/Agent应用名不作为术语或缩略语 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  # === 单位符号 ===

  - id: ce-unit-use-symbol
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#单位-1"
    message: "用单位符号代替汉字名称 (如 mm 代替 毫米)"
    pattern: "(?:毫米|厘米|千米|小时|分钟|秒钟|字节|千克|克重)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-unit-no-mixed-chinese-symbol
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#单位-2"
    message: "不能在组合单位中同时使用中文符号和单位符号"
    pattern: "(?:千米/?小时|米/?秒|克/?立方厘米)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-unit-no-isolated-prefix
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#单位-3"
    message: "词头不得孤立使用 (如 64K 应为 64Kbit/s)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-unit-use-standard-symbols
    type: regex-check
    blocking: false
    severity: warning
    scope: full-only
    source: "内容元素规范#单位-4"
    message: "常用单位符号参照规范表 (建议确认)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  # === 标点符号 ===

  - id: ce-punct-no-comma-abuse
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#标点-1"
    message: "逗号不可滥用, 不可'一逗到底'"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-punct-period-before-figure
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#标点-2"
    message: "紧接图或表时句子以句号结束; 括号内从属内容不加句号 (需人工确认)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-punct-no-double-colon
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#标点-3"
    message: "冒号不能在一个句子中连续使用"
    pattern: "[：:][^\\n]{0,50}[：:]"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-punct-fullwidth-parenthesis
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#标点-4"
    message: "中文文档默认使用全角括号 (代码块等特殊位置除外)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-punct-no-punctuation-at-line-start
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#标点-5"
    message: "句号/问号/叹号/逗号等不出现在一行之首"
    pattern: "^[，。？！；：、）」』]"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-punct-bracket-not-at-line-end
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#标点-6"
    message: "引号/括号/书名号前半不出现在一行之末, 后半不出现在一行之首"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-punct-dash-no-break
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#标点-7"
    message: "破折号和省略号占两个字位置, 中间不能断开"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-punct-fullwidth-quote
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#标点-8"
    message: "中文文档默认使用全角引号 (代码块等特殊位置除外)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-punct-question-mark-limited
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#标点-9"
    message: "问号仅限界面提示/CLI/语音/FAQ使用 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-punct-no-exclamation
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#标点-10"
    message: "任何场景下不建议使用感叹号 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-punct-minimize-ellipsis
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#标点-11"
    message: "应尽量少用省略号或'等' (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-punct-careful-check-cross
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#标点-12"
    message: "谨慎使用√/×, 不同国家理解可能相反 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  # === 字符转义 ===

  - id: ce-escape-markdown-chars
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#转义-1"
    message: "显示格式化字符时请添加反斜杠转义"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-escape-special-chars
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#转义-2"
    message: "特殊字符需使用特定转义符号: < 用 &lt;, > 用 &gt;, & 用 &amp;"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  # === 文件路径 ===

  - id: ce-path-include-root
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#路径-1"
    message: "涉及电脑分区的文件路径需包含明确的根目录"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-path-use-forward-slash
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#路径-2"
    message: "文件路径尽量使用斜杠 / 作为分隔符 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-path-avoid-long
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#路径-3"
    message: "尽量避免文件路径过长 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  # === IP 及 MAC 地址 ===

  - id: ce-ip-no-public-ip
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#IP-1"
    message: "IP地址举例只能使用私网IP, 禁止使用公网IP"
    pattern: "(?<![0-9.])(?!10\\.|172\\.(?:1[6-9]|2[0-9]|3[01])\\.|192\\.168\\.)\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"
    match_mode: absent
    includes:
      - "**/*.md"
      - "**/*.ts"
      - "**/*.js"
    excludes:
      - "**/node_modules/**"
      - "**/*.d.ts"

  - id: ce-ip-must-have-mask
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#IP-2"
    message: "表示组网和路由信息时, IP地址和掩码必须同时出现 (需人工确认)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-ip-domain-example-com
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#IP-3"
    message: "涉及域名示例时使用 www.example.com"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-mac-mask-with-x
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#IP-4"
    message: "涉及MAC地址示例时使用X进行模糊处理 (如 00-01-XX-XX-XX-XX)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  # === 个人信息 ===

  - id: ce-pii-no-real-data
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#个人信息-1"
    message: "严禁使用真实的个人信息"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
      - "**/*.ts"
      - "**/*.js"
    excludes: []

  - id: ce-pii-phone-mask
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#个人信息-2"
    message: "涉及个人电话号码示例时使用*模糊处理"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-pii-phone-country-code
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#个人信息-3"
    message: "国际电话号码前添加国家码和地区码 (如 (86)(755) ****)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-pii-id-mask
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#个人信息-4"
    message: "涉及身份证号/账号名示例时使用*模糊处理"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-pii-email-mask
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#个人信息-5"
    message: "涉及邮箱示例时进行模糊处理 (如 **@example.com)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []

  - id: ce-pii-name-generic
    type: regex-check
    blocking: false
    severity: warning
    scope: incremental
    source: "内容元素规范#个人信息-6"
    message: "涉及个人姓名示例时尽可能使用通用名 (建议)"
    pattern: "(?!)"
    match_mode: absent
    includes:
      - "**/*.md"
    excludes: []
