{ "version": "1.0.0", "description": "gongwen_lint.py 的规则数据。rules 为正则规则,逐段匹配;procedural 为引擎中以函数实现的检查,只在此登记。检查类别共 12 类,其中 style、defensive 由 style_patterns.json 提供。减负规定的篇幅上限(第2条、第6条)保留在 length 类(LEN-001、LEN-002),jianfu 类只查文风和减负要求,这样已有的 --checks length 调用不受影响。字段约定见 docs/开发规范.md 第 8 节。 本文件另有两段数据:evidence 为评价词与证据强度匹配(EVD-001~003,归入 style 类)的分级词表、白名单和适用文种;change_guard 登记 change_guard.py(改动范围守卫)输出的 CHG-001~004。要素完整性检查 ELM-001~007 归入 format 类,在 procedural 中登记。", "fields": { "check": "所属检查类别,对应 --checks:residue、punct、number、format、structure、privacy、legal、jianfu、marker、length(style、defensive 由 style_patterns.json 提供)", "gate": "对应核稿八关,供 gongwen-review 直接引用", "doc_types": "非空时只在这些文书类型中检查", "exempt_doc_types": "这些文书类型不检查", "yield_to": "同一段内与所列规则的命中区间重叠时,本规则不再报告", "once": "全文只报第一处,并注明总次数", "skip_line": "整段匹配该正则时跳过本规则", "skip_table": "不检查 docx 表格内的段落(表格内的编号写法不按层次序数要求)", "fix": "依次对命中文字执行的替换 [正则, 替换],结果写入修改建议", "flags": "正则标志,目前只支持 IGNORECASE", "hit_examples": "必错标本:单独成段时必须命中", "miss_examples": "必过标本:单独成段时不得命中", "also_public": "doc_types 之外,面向群众的文书(主送或称呼为居民、家长等,或标题为公示、告知书等)也检查", "public_only": "只在面向群众的文书中检查,不看 doc_types", "zone": "检查范围;first_body 表示只查正文第一段(标题、主送和层次标题之后的第一段)", "skip_if_basis": "同一句中命中位置之前已写明法律依据(依法、依照、《××法》、根据××条例等)时不报", "skip_in_quotes": "命中位置在引号内(举例或引述)时不报", "skip_if_negated": "命中位置之前 8 字内(同一句中)有“不要求”“不得”“严禁”“不再”“取消”等否定词时不报(如“不要求基层拍照留痕”)" }, "rules": [ { "id": "RES-001", "check": "residue", "category": "残留", "gate": "格式关", "level": "P1", "pattern": "^\\s{0,3}#{1,6}(?=\\s|[一-鿿])", "message": "Markdown 标题符号残留", "suggestion": "删除“#”,层次用 一、(一)1.(1) 表示", "basis": "references/_shared/guardrails.md 第三条;references/_shared/style/output-format.md 第一部分第 1 条", "doc_types": [], "exempt_doc_types": [], "hit_examples": [ "## 一、总体要求", "#关于开展安全生产检查的通知" ], "miss_examples": [ "#3楼东侧消防通道已清理完毕。", "一、总体要求" ] }, { "id": "RES-002", "check": "residue", "category": "残留", "gate": "格式关", "level": "P1", "pattern": "(?\\s?\\S", "message": "Markdown 引用符号残留", "suggestion": "删除“>”", "basis": "references/_shared/style/output-format.md 第一部分第 1 条", "doc_types": [], "exempt_doc_types": [], "hit_examples": [ "> 各单位要高度重视。" ], "miss_examples": [ "温度>30℃时停止室外作业。" ] }, { "id": "RES-005", "check": "residue", "category": "残留", "gate": "格式关", "level": "P1", "pattern": "^\\s*(?:```|~~~)", "message": "代码块符号残留", "suggestion": "删除代码块标记", "basis": "references/_shared/style/output-format.md 第一部分第 1 条", "doc_types": [], "exempt_doc_types": [], "hit_examples": [ "```text", "~~~" ], "miss_examples": [ "2026年10月16日" ] }, { "id": "RES-006", "check": "residue", "category": "残留", "gate": "格式关", "level": "P2", "pattern": "^\\s*\\|?\\s*:?-{3,}:?\\s*(?:\\|\\s*:?-{3,}:?\\s*)+\\|?\\s*$|^\\s*\\|(?:[^|\\n]*\\|){2,}\\s*$", "message": "Markdown 表格,粘贴进 Word 会显示为竖线", "suggestion": "确需表格的,交 gongwen-format 转为 Word 表格,或改为文字表述", "basis": "references/_shared/style/output-format.md 第一部分第 1 条(用户明确要求表格时可以给表格)", "doc_types": [], "exempt_doc_types": [], "hit_examples": [ "|---|---|", "| 序号 | 单位 | 完成率 |" ], "miss_examples": [ "一、总体要求", "附件:1. 汇总表" ] }, { "id": "RES-007", "check": "residue", "category": "残留", "gate": "格式关", "level": "P1", "pattern": "!?\\[[^\\]\\n]{1,80}\\]\\([^)\\s\\n]{1,200}\\)", "message": "Markdown 链接或图片语法残留", "suggestion": "删除链接语法,需要引用的写出文件全称和文号", "basis": "references/_shared/style/output-format.md 第一部分第 1 条", "doc_types": [], "exempt_doc_types": [], "hit_examples": [ "详见[通知原文](https://example.com)。" ], "miss_examples": [ "某发[2026]5号", "(一)强化组织领导" ] }, { "id": "RES-008", "check": "residue", "category": "残留", "gate": "格式关", "level": "P1", "pattern": "^\\s*(?:-{3,}|\\*{3,}|_{3,}|={3,})\\s*$", "message": "Markdown 分隔线残留", "suggestion": "删除分隔线", "basis": "references/_shared/style/output-format.md 第一部分第 1 条", "doc_types": [], "exempt_doc_types": [], "hit_examples": [ "---", "***" ], "miss_examples": [ "——在全市安全生产工作会议上的讲话" ] }, { "id": "RES-009", "check": "residue", "category": "残留", "gate": "文风关", "level": "P1", "pattern": "[\\U0001F300-\\U0001F5FF\\U0001F600-\\U0001F64F\\U0001F680-\\U0001F6FF\\U0001F900-\\U0001F9FF\\U0001FA70-\\U0001FAFF\\U0001F1E6-\\U0001F1FF✅❌❎✨⭐⭕‼⁉⚠⚡❓-❕❗➕-➗➡➰➿☔☕☝☺♿⚓⚪⚫⚽⚾⛄⛅⛔⛪⛲-⛵⛺⛽⬛⬜️]+", "message": "emoji 表情符号残留", "suggestion": "删除表情符号", "basis": "references/_shared/guardrails.md 第三条第 2 款", "doc_types": [], "exempt_doc_types": [], "hit_examples": [ "全年办件量创历史新高🎉", "✅ 已完成整改" ], "miss_examples": [ "密级:机密★5年", "(1)加强培训" ] }, { "id": "RES-010", "check": "residue", "category": "残留", "gate": "文风关", "level": "P0", "pattern": "作为(?:一[个名款种])?\\s*(?:AI|AI|人工智能|大?语言模型|大模型)(?:\\s*(?:助手|模型|语言模型|写作助手))?[,,]?\\s*我|我是(?:一[个名款种])?\\s*(?:AI|AI|人工智能|大?语言模型|大模型|智能助手|写作助手)|我的(?:训练数据|知识(?:库)?(?:截止|截至|更新))", "message": "AI 身份自述残留", "suggestion": "删除整句;需要说明的事项写进【起草说明】", "basis": "references/_shared/guardrails.md 第三条第 2 款", "doc_types": [], "exempt_doc_types": [], "hit_examples": [ "作为一个AI语言模型,我无法获取贵单位的内部数据。", "我是人工智能助手,以下内容根据您提供的材料整理。", "根据我的训练数据截至2024年,该政策尚未出台。" ], "miss_examples": [ "我市作为人工智能创新应用先导区,率先开展试点。" ] }, { "id": "RES-011", "check": "residue", "category": "残留", "gate": "文风关", "level": "P0", "pattern": "(?:以下|下面)是(?:我)?(?:为您|为你|根据您|按照您|按您)[^。!?\\n]{0,20}(?:撰写|起草|整理|修改|生成|润色|拟写|优化|改写|提供)的|(?:我)?(?:已经|已)?(?:为您|为你)(?:撰写|起草|整理|修改|生成|润色|拟写|优化|改写)(?:了|好了)", "message": "对话引导语残留", "suggestion": "删除引导语,正文从标题或主送机关开始", "basis": "references/_shared/guardrails.md 第三条第 2 款;references/_shared/style/output-format.md 第三部分", "doc_types": [], "exempt_doc_types": [], "hit_examples": [ "以下是为您撰写的通知全文:", "我已为您起草了一份请示。" ], "miss_examples": [ "以下是本次检查发现的主要问题:", "竭诚为您服务。" ] }, { "id": "RES-012", "check": "residue", "category": "残留", "gate": "文风关", "level": "P0", "pattern": "希望(?:以上|这些|这份|本次|我的)?(?:内容|回答|修改|建议|稿件|文稿)?(?:能)?(?:对您|对你)(?:有所)?(?:帮助|有帮助|有用)|如(?:需|果需要|有需要|您需要)(?:进一步|其他)?(?:调整|修改|补充|完善|润色|帮助)[^。\\n]{0,12}(?:请|欢迎|可以)?(?:随时)?(?:告诉我|告知我|联系我|让我知道)(?!们)|(?:请|欢迎)随时(?:告诉我|告知我|联系我)(?!们)|有任何(?:问题|疑问|需要)[^。\\n]{0,6}随时(?:告诉我|联系我|问我)(?!们)", "message": "对话结束语残留", "suggestion": "删除整句", "basis": "references/_shared/guardrails.md 第三条第 2 款", "doc_types": [], "exempt_doc_types": [], "hit_examples": [ "希望以上内容对您有所帮助。", "如需进一步调整,请随时告诉我。" ], "miss_examples": [ "如有疑问,请与市卫生健康委办公室联系。", "居民有任何问题可随时联系社区网格员。", "如需帮助,请随时联系我们。" ] }, { "id": "RES-013", "check": "residue", "category": "残留", "gate": "文风关", "level": "P1", "pattern": "^\\s*(?:好的|好嘞|没问题|当然可以|明白了|收到)[,,!!。::]", "message": "对话应答语残留", "suggestion": "删除应答语", "basis": "references/_shared/guardrails.md 第三条第 2 款", "doc_types": [], "exempt_doc_types": [], "hit_examples": [ "好的,以下是修改后的稿件。" ], "miss_examples": [ "好的做法要及时总结推广。" ] }, { "id": "RES-014", "check": "residue", "category": "残留", "gate": "文字关", "level": "P1", "pattern": "\\{\\{[^{}\\n]{0,30}\\}\\}|[\\[[【](?:此处|在此|这里)?(?:请)?(?:填写|填入|插入|输入)[^\\]]】\\n]{0,20}[\\]]】]", "message": "模板占位符残留", "suggestion": "补全内容;暂缺的改为【待补:说明】", "basis": "references/_shared/guardrails.md 第二条第 2 款", "doc_types": [], "exempt_doc_types": [], "hit_examples": [ "联系人:[请填写联系人姓名]", "{{单位名称}}关于开展自查的通知" ], "miss_examples": [ "全年开展专项检查【待补:次数】次。" ] }, { "id": "RES-015", "check": "residue", "category": "残留", "gate": "文字关", "level": "P2", "pattern": "(?\\n]{0,40}>", "message": "HTML 标签残留", "suggestion": "删除标签", "basis": "references/_shared/style/output-format.md 第一部分第 1 条", "doc_types": [], "exempt_doc_types": [], "flags": "IGNORECASE", "hit_examples": [ "成立工作专班。
由分管领导任组长。" ], "miss_examples": [ "温度<30℃且湿度>80%时停止作业。" ] }, { "id": "PUN-001", "check": "punct", "category": "标点", "gate": "文字关", "level": "P1", "pattern": "^\\s*[一二三四五六七八九十]{1,3}\\s*[,,..::](?!\\d)", "message": "“一、”类序数后应用顿号", "suggestion": "把序数后的标点改为顿号", "basis": "GB/T 15834-2011 4.5.3.3、附录 B.3.2", "doc_types": [], "exempt_doc_types": [], "skip_table": true, "fix": [ [ "^(\\s*[一二三四五六七八九十]{1,3})\\s*[,,..::]", "\\1、" ] ], "hit_examples": [ "一,总体要求", "二. 主要任务" ], "miss_examples": [ "一、总体要求", "一是加强组织领导。" ] }, { "id": "PUN-002", "check": "punct", "category": "标点", "gate": "文字关", "level": "P1", "pattern": "^\\s*[((]\\s*[一二三四五六七八九十\\d]{1,3}\\s*[))]\\s*[、,,..::]", "message": "带括号的序数后不加标点", "suggestion": "删除括号后的标点", "basis": "GB/T 15834-2011 附录 B.3.4", "doc_types": [], "exempt_doc_types": [], "skip_table": true, "fix": [ [ "([))])\\s*[、,,..::]$", "\\1" ] ], "hit_examples": [ "(一)、工作目标", "(1).加强培训" ], "miss_examples": [ "(一)工作目标", "(一)强化组织领导。成立工作专班。" ] }, { "id": "PUN-003", "check": "punct", "category": "标点", "gate": "文字关", "level": "P1", "pattern": "^\\s*\\d{1,2}\\s*、(?!\\d)", "message": "阿拉伯数字序数后应用下脚点“.”,不用顿号", "suggestion": "把“1、”改为“1.”", "basis": "GB/T 15834-2011 附录 B.3.3", "doc_types": [], "exempt_doc_types": [], "skip_table": true, "fix": [ [ "(\\d{1,2})\\s*、$", "\\1." ] ], "hit_examples": [ "1、加强培训" ], "miss_examples": [ "1. 加强培训", "1、2月份全市共受理投诉326件。" ] }, { "id": "PUN-004", "check": "punct", "category": "标点", "gate": "文字关", "level": "P1", "pattern": "(?<=[^\\s一二两三四五六七八九十第、])[一二两三四五六七八九]、[一二三四五六七八九十](?=[天个人次周名家项件条岁]|年(?!级))", "message": "相邻两数字连用表示概数,中间不加顿号", "suggestion": "删除顿号,如“三五天”", "basis": "GB/T 15834-2011 4.5.3.4;GB/T 15835-2011 5.2.1", "doc_types": [], "exempt_doc_types": [], "fix": [ [ "、", "" ] ], "hit_examples": [ "每户走访三、五天后再复核。", "预计需要两、三个月。" ], "miss_examples": [ "一、二年级学生", "第三、五条", "二、三产业" ] }, { "id": "PUN-005", "check": "punct", "category": "标点", "gate": "文字关", "level": "P1", "pattern": "》、《|”、“", "message": "并列的书名号或引号之间不加顿号", "suggestion": "删除顿号", "basis": "GB/T 15834-2011 4.5.3.5", "doc_types": [], "exempt_doc_types": [], "fix": [ [ "、", "" ] ], "hit_examples": [ "认真学习《条例》、《规定》。" ], "miss_examples": [ "认真学习《条例》《规定》。", "《条例》(2012年)、《规定》" ] }, { "id": "PUN-006", "check": "punct", "category": "标点", "gate": "文字关", "level": "P1", "pattern": "、\\s*等(?!级|同|效|值|待|候|量|额|比|高|距|分|位|次)", "message": "并列成分末尾的“等”前不加顿号", "suggestion": "删除“等”前的顿号", "basis": "GB/T 15834-2011 附录 B.1.2", "doc_types": [], "exempt_doc_types": [], "fix": [ [ "、\\s*", "" ] ], "hit_examples": [ "医院、学校、企业、等单位" ], "miss_examples": [ "医院、学校、企业等单位", "数据安全、等级保护" ] }, { "id": "PUN-007", "check": "punct", "category": "标点", "gate": "文字关", "level": "P1", "pattern": "(?:……|…|\\.{3,}|。{3,})\\s*等", "message": "省略号不与“等”“等等”同时使用", "suggestion": "保留其一:删去省略号,或删去“等”", "basis": "GB/T 15834-2011 附录 A.9.2", "doc_types": [], "exempt_doc_types": [], "hit_examples": [ "医院、学校、社区……等", "医院、学校...等等" ], "miss_examples": [ "医院、学校、社区等", "医院、学校、社区……" ] }, { "id": "PUN-008", "check": "punct", "category": "标点", "gate": "文字关", "level": "P1", "pattern": "\\.{3,}|。{3,}|(?