gongwen-skill 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/.dsh/skills/gongwen-skill/SKILL.md +3 -4
  2. package/.dsh/skills/gongwen-skill.md +3 -4
  3. package/CHANGELOG.md +22 -0
  4. package/README.md +7 -6
  5. package/SKILL.md +3 -4
  6. package/cordis.patch.yml +4 -0
  7. package/dsh/client.js +3 -1
  8. package/dsh/index.js +4 -2
  9. package/engine/__init__.py +1 -0
  10. package/engine/auto_optimizer.py +5 -0
  11. package/engine/chat_review.py +5 -0
  12. package/engine/config.py +1 -0
  13. package/engine/core/__init__.py +1 -0
  14. package/engine/core/document/__init__.py +1 -0
  15. package/engine/core/document/_generator_helpers.py +5 -0
  16. package/engine/core/document/ai_structure_analyzer.py +1 -0
  17. package/engine/core/document/annotator.py +5 -0
  18. package/engine/core/document/editor.py +6 -0
  19. package/engine/core/document/font_utils.py +1 -0
  20. package/engine/core/document/generator.py +1 -0
  21. package/engine/core/document/markdown_converter.py +5 -0
  22. package/engine/core/document/models.py +1 -0
  23. package/engine/core/document/modifier.py +1 -0
  24. package/engine/core/document/ooxml_parser.py +5 -0
  25. package/engine/core/document/ooxml_workflow.py +5 -0
  26. package/engine/core/document/parser.py +1 -0
  27. package/engine/core/document/parser_format.py +6 -0
  28. package/engine/core/document/reviewer_comments.py +5 -0
  29. package/engine/core/document/structure_analyzer.py +1 -0
  30. package/engine/core/document/tracked_annotator.py +5 -0
  31. package/engine/core/document/tracked_changes.py +5 -0
  32. package/engine/core/document/tracked_common.py +5 -0
  33. package/engine/core/rules/__init__.py +1 -0
  34. package/engine/core/rules/checker.py +1 -0
  35. package/engine/core/rules/engine.py +1 -0
  36. package/engine/core/rules/fixer.py +1 -0
  37. package/engine/core/rules/loader.py +1 -0
  38. package/engine/core/rules/manager.py +1 -0
  39. package/engine/docx_to_image.py +5 -0
  40. package/engine/fact_check.py +5 -0
  41. package/engine/focus_checker.py +5 -0
  42. package/engine/handoff.py +1 -0
  43. package/engine/inject.py +1 -1
  44. package/engine/live_edit.py +5 -0
  45. package/engine/optimizer.py +1 -1
  46. package/engine/review_generator.py +5 -0
  47. package/engine/structure_checker.py +5 -0
  48. package/engine/style_profile.py +5 -0
  49. package/engine/table_sign_generator.py +5 -0
  50. package/engine/table_sign_template.py +6 -0
  51. package/engine/template_builder.py +1 -0
  52. package/engine/utils/__init__.py +6 -0
  53. package/engine/utils/errors.py +5 -0
  54. package/engine/utils/logger.py +1 -0
  55. package/engine/utils/parse.py +5 -0
  56. package/engine/utils/zip_utils.py +5 -0
  57. package/gongwen/__init__.py +2 -1
  58. package/gongwen/__main__.py +1 -0
  59. package/gongwen/_bootstrap.py +6 -0
  60. package/gongwen/_legacy.py +2 -2
  61. package/gongwen/cli/__init__.py +1 -0
  62. package/gongwen/cli/content_cmds.py +6 -0
  63. package/gongwen/cli/doctor_cmds.py +6 -0
  64. package/gongwen/cli/font_cmds.py +7 -0
  65. package/gongwen/cli/helpers.py +7 -0
  66. package/gongwen/cli/misc_cmds.py +6 -0
  67. package/gongwen/cli/review_cmds.py +6 -0
  68. package/gongwen/cli/style_helpers.py +6 -0
  69. package/gongwen/cli/update_cmds.py +6 -0
  70. package/package.json +1 -1
  71. package/prompts/style-prompts.md +5 -4
  72. package/prompts/usage-prompts.md +7 -1
  73. package/pyproject.toml +1 -1
  74. package/rules/official/_common.yaml +4 -0
  75. package/rules/official/announcement.yaml +4 -0
  76. package/rules/official/bill.yaml +13 -0
  77. package/rules/official/bulletin.yaml +13 -0
  78. package/rules/official/command.yaml +4 -0
  79. package/rules/official/communique.yaml +21 -0
  80. package/rules/official/decision.yaml +4 -0
  81. package/rules/official/instruction.yaml +13 -0
  82. package/rules/official/letter.yaml +4 -0
  83. package/rules/official/meeting.yaml +13 -0
  84. package/rules/official/minutes.yaml +13 -0
  85. package/rules/official/news.yaml +50 -0
  86. package/rules/official/notice.yaml +27 -1
  87. package/rules/official/notice_public.yaml +4 -0
  88. package/rules/official/opinion.yaml +13 -0
  89. package/rules/official/regulation.yaml +13 -0
  90. package/rules/official/reply.yaml +13 -0
  91. package/rules/official/report.yaml +13 -0
  92. package/rules/official/request.yaml +4 -0
  93. package/rules/official/resolution.yaml +13 -0
  94. package/rules/official/speech.yaml +4 -0
  95. package/rules/official/summary.yaml +13 -0
  96. package/rules/official/table_sign.yaml +4 -0
  97. package/rules/official/technical_proposal.yaml +4 -0
  98. package/rules/official/work_plan.yaml +13 -0
@@ -14,10 +14,9 @@ metadata:
14
14
  ---
15
15
 
16
16
  <!--
17
- 公文文档格式化 Skill
18
- (c) 2026 Jose AI (https://www.linhut.cn)
19
- 项目出处:AI 公文智能优化助手(https://github.com/linhut/document-ai-assistant)
20
- Licensed under the MIT License. See the LICENSE file for details.
17
+ (c) 2026 Jose AI (https://www.linhut.cn)
18
+ https://github.com/linhut/gongwen-skill
19
+ Licensed under the MIT License. See the LICENSE file for details.
21
20
  -->
22
21
 
23
22
  # 公文文档格式化 Skill(GB/T 9704)
@@ -14,10 +14,9 @@ metadata:
14
14
  ---
15
15
 
16
16
  <!--
17
- 公文文档格式化 Skill
18
- (c) 2026 Jose AI (https://www.linhut.cn)
19
- 项目出处:AI 公文智能优化助手(https://github.com/linhut/document-ai-assistant)
20
- Licensed under the MIT License. See the LICENSE file for details.
17
+ (c) 2026 Jose AI (https://www.linhut.cn)
18
+ https://github.com/linhut/gongwen-skill
19
+ Licensed under the MIT License. See the LICENSE file for details.
21
20
  -->
22
21
 
23
22
  # 公文文档格式化 Skill(GB/T 9704)
package/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ <!--
2
+ (c) 2026 Jose AI (https://www.linhut.cn)
3
+ https://github.com/linhut/gongwen-skill
4
+ Licensed under the MIT License. See the LICENSE file for details.
5
+ -->
6
+
7
+ ## v2.1.0 (2026-08-20)
8
+
9
+ ### Added
10
+ - **格式规则完善**:为 24 种公文类型新增 30+ 条 check/fix 规则,提升规则覆盖率
11
+ - `news.yaml`:从 0 条规则扩展至 5 条(导语段/稿源信息/标题风格/标题字数/听取通报段检查)
12
+ - `notice.yaml`:新增标题格式和通知事项检查
13
+ - `communique.yaml`:新增公报签署和标题格式检查
14
+ - 12 个原只有 2 条规则的类型各新增 1 条检查规则(bill/bulletin/instruction/meeting/minutes/opinion/regulation/reply/report/resolution/summary/work_plan)
15
+ - **版本发布清单**:RELEASE.md 扩展版本号检查点从 4 处代码→9 处(含文档/提示词/DSH 桥接)
16
+ - **pre-commit hook**:`.githooks/pre-commit` 自动检查 4 处代码版本号一致性,阻止版本漂移的提交
17
+ - **动态 PyPI 徽章**:README.md 的 PyPI 徽章改为动态版本号(`https://img.shields.io/pypi/v/gongwen-skill`),自动显示最新版本
18
+
19
+ ### Changed
20
+ - RELEASE.md 全面更新:修复 12 处残留 1.12.x 引用,更新 npm 发布状态,新增 pre-commit hook 说明
21
+ - 规则文件统一添加 `template_name` 和 `document_type` 字段(news.yaml 补齐)
22
+
1
23
  ## v2.0.0 (2026-08-20)
2
24
 
3
25
  ### Major
package/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  <!--
2
2
  (c) 2026 Jose AI (https://www.linhut.cn)
3
+ https://github.com/linhut/gongwen-skill
3
4
  Licensed under the MIT License. See the LICENSE file for details.
4
5
  -->
5
6
 
@@ -12,7 +13,7 @@ Licensed under the MIT License. See the LICENSE file for details.
12
13
  > 中文公文全流程处理工具——基于 **GB/T 9704《党政机关公文格式》** 国家标准,支持 **格式检查与修复、内容优化(Word 原生修订+批注/差异对比版)、模板生成、Markdown 转公文、版头版记页码注入、事实核验、风格增强** 等完整能力。原生支持 **DeepSeek Harness (DSH)** 技能系统,打包为可被 AI Agent 直接调用的 Skill,完全自包含,克隆即用。
13
14
 
14
15
  [![CI](https://img.shields.io/badge/CI-Passing-brightgreen)](https://github.com/linhut/gongwen-skill/actions)
15
- [![PyPI](https://img.shields.io/badge/PyPI-v2.0.0-blue)](https://pypi.org/project/gongwen-skill/)
16
+ [![PyPI](https://img.shields.io/pypi/v/gongwen-skill)](https://pypi.org/project/gongwen-skill/)
16
17
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
17
18
  ![Python](https://img.shields.io/badge/Python-3.10%2B-blue.svg)
18
19
  ![GB/T 9704](https://img.shields.io/badge/standard-GB%2FT%209704-red.svg)
@@ -336,7 +337,7 @@ DSH 采用 **Cordis 模块化微内核架构**:技能体系基于本地文件
336
337
  git clone https://github.com/linhut/gongwen-skill.git
337
338
  cd gongwen-skill
338
339
  pip install -r requirements.txt # 或 pip install gongwen-skill(已上 PyPI)
339
- python -m gongwen --version # 检验:gongwen-skill v2.0.0
340
+ python -m gongwen --version # 检验:gongwen-skill v2.1.0
340
341
  ```
341
342
 
342
343
  ### 方式一:作为 DSH Skill 注册(基于本地文件系统)
@@ -392,7 +393,7 @@ pnpm add -w gongwen-skill
392
393
  "dependencies": {
393
394
  "@deepseek-ai/dsh-base": "...",
394
395
  "@deepseek-ai/dsh-web-app": "...",
395
- "gongwen-skill": "^2.0.0"
396
+ "gongwen-skill": "^2.1.0"
396
397
  },
397
398
  "dsh": {
398
399
  "profile": {
@@ -447,9 +448,9 @@ dsh --profile web
447
448
  | CLI 独立可执行(`python -m gongwen <命令>`) | ✅ |
448
449
  | PyPI 上架(`pip install gongwen-skill`) | ✅ |
449
450
  | 零外部运行时依赖(仅 python-docx/pydantic/pyyaml) | ✅ |
450
- | DSH 配置化排版参数(页边距/行距/字体/默认模板版本) | ✅ v2.0.0+ |
451
+ | DSH 配置化排版参数(页边距/行距/字体/默认模板版本) | ✅ v2.1.0+ |
451
452
 
452
- ### DSH 插件配置化(v2.0.0+)
453
+ ### DSH 插件配置化(v2.1.0+)
453
454
 
454
455
  DSH 插件支持通过配置文件管理排版参数,Agent 调用时自动注入,纯 CLI 用户不受影响。
455
456
 
@@ -573,7 +574,7 @@ pip install -r requirements.txt
573
574
  用户:帮我优化这份会议通知的第二章节措辞
574
575
 
575
576
  Agent:📋 合规自检报告
576
- Skill 版本: v2.0.0(多渠道自检已确认最新)
577
+ Skill 版本: v2.1.0(多渠道自检已确认最新)
577
578
  路径判定: B(内容优化)
578
579
  依据: 用户指定了已有文档,且要求"优化措辞"
579
580
  命令调用: 1. python -m gongwen optimize-content 会议通知.docx --changes changes.json --apply --paragraphs "5-8"
package/SKILL.md CHANGED
@@ -14,10 +14,9 @@ metadata:
14
14
  ---
15
15
 
16
16
  <!--
17
- 公文文档格式化 Skill
18
- (c) 2026 Jose AI (https://www.linhut.cn)
19
- 项目出处:AI 公文智能优化助手(https://github.com/linhut/document-ai-assistant)
20
- Licensed under the MIT License. See the LICENSE file for details.
17
+ (c) 2026 Jose AI (https://www.linhut.cn)
18
+ https://github.com/linhut/gongwen-skill
19
+ Licensed under the MIT License. See the LICENSE file for details.
21
20
  -->
22
21
 
23
22
  # 公文文档格式化 Skill(GB/T 9704)
package/cordis.patch.yml CHANGED
@@ -1,3 +1,7 @@
1
+ # (c) 2026 Jose AI (https://www.linhut.cn)
2
+ # https://github.com/linhut/gongwen-skill
3
+ # Licensed under the MIT License. See the LICENSE file for details.
4
+
1
5
  # dsh bundle layer: 公文全流程处理工具 (gongwen-skill, host + client)
2
6
  - insert:
3
7
  - id: gongwen-skill
package/dsh/client.js CHANGED
@@ -1,5 +1,7 @@
1
1
  // 公文全流程处理工具 DSH client — 可视化配置面板(gongwen-skill,不做皮肤,仅设置面板)
2
- // (c) 2026 Jose AI (https://www.linhut.cn) MIT License
2
+ // (c) 2026 Jose AI (https://www.linhut.cn)
3
+ // https://github.com/linhut/gongwen-skill
4
+ // Licensed under the MIT License. See the LICENSE file for details.
3
5
  //
4
6
  // 在 DSH Web GUI 系统设置 → 插件配置 中渲染公文排版参数编辑界面。
5
7
  // 通过 /plugins/gongwen-skill/api/config (GET/POST) 与宿主端通信。
package/dsh/index.js CHANGED
@@ -1,5 +1,7 @@
1
- // 公文全流程处理工具 - DSH plugin bridge (gongwen-skill, v2.0.0+)
2
- // (c) 2026 Jose AI (https://www.linhut.cn) MIT License
1
+ // 公文全流程处理工具 - DSH plugin bridge (gongwen-skill, v2.1.0+)
2
+ // (c) 2026 Jose AI (https://www.linhut.cn)
3
+ // https://github.com/linhut/gongwen-skill
4
+ // Licensed under the MIT License. See the LICENSE file for details.
3
5
  //
4
6
  // 分层架构:
5
7
  // - Python CLI:纯工具层,通过 --config-overrides 接收规则覆盖 JSON
@@ -1,6 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
4
5
  # Licensed under the MIT License. See the LICENSE file for details.
5
6
  #
6
7
  # engine 包初始化文件
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  内置 LLM 内容优化建议生成(v1.12.30 内容优化架构改进方案 改进 E)。
4
9
 
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  ChatReview —— 审稿意见对话提示模板。
4
9
 
package/engine/config.py CHANGED
@@ -3,6 +3,7 @@
3
3
  # 公文文档格式化 Skill —— 独立引擎配置
4
4
  #
5
5
  # (c) 2026 Jose AI (https://www.linhut.cn)
6
+ # https://github.com/linhut/gongwen-skill
6
7
  # Licensed under the MIT License. See the LICENSE file for details.
7
8
  #
8
9
  # 本文件为独立发行版专用配置,替代原项目中依赖 PyInstaller / Electron /
@@ -1,5 +1,6 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
4
5
  """
5
6
  engine 包:独立发行版引擎核心。
@@ -1,3 +1,4 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  Generator helper functions: table and page number field creation.
4
9
  Extracted from generator.py (tier-2 split).
@@ -1,5 +1,6 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
4
5
  """
5
6
  AI Structure Analyzer — 基于AI的文档结构智能分析
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  Word 原生批注注入器 —— 将内容优化建议以 <w:comment> 形式写入 .docx。
4
9
 
@@ -1,3 +1,9 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
1
7
  """
2
8
  Content revision engine for official document optimization.
3
9
  Produces comparison documents showing original vs revised content
@@ -1,5 +1,6 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
4
5
  """
5
6
  Font utilities: Handle Chinese font settings correctly for Word documents.
@@ -1,5 +1,6 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
4
5
  """
5
6
  Document generator: converts DocumentModel back into a .docx file.
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  Markdown → DocumentModel 转换器。
4
9
  从 modifier.py 提取(阶梯2 拆分)。
@@ -1,5 +1,6 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
4
5
  """
5
6
  Pydantic data models for the intermediate document representation.
@@ -1,5 +1,6 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
4
5
  """
5
6
  Document modifier: the single source of truth for all DocumentModel mutations.
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  OOXML 原生文档解析器 —— 解决 python-docx 的局限。
4
9
 
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  OOXML 解包-编辑-打包工作流。
4
9
 
@@ -1,5 +1,6 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
4
5
  """
5
6
  Document parser: converts a .docx file into DocumentModel.
@@ -1,3 +1,9 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
1
7
  """
2
8
  Format and run-level parsing helpers for the Document Parser.
3
9
 
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  五角色审稿批注嵌入 —— 将审稿意见以不同作者的 Word 批注嵌入文档。
4
9
 
@@ -1,5 +1,6 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
4
5
  """
5
6
  文档结构分析器 - 智能识别文档结构
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  tracked + comments 单次 ZIP 注入器(优化方案 v4.0 F2/F4)。
4
9
 
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  修订追踪支持 —— Word 原生 <w:ins>/<w:del> 修订标记。
4
9
 
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  tracked 修订公共工具(P2-10 修复:消除 tracked_changes / tracked_annotator 重复代码)。
4
9
 
@@ -1,3 +1,4 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
@@ -1,5 +1,6 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
4
5
  """
5
6
  Format checker: validates a DocumentModel against loaded rules.
@@ -1,5 +1,6 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
4
5
  """
5
6
  Rule engine: orchestrates loading, checking, and fixing using the rule system.
@@ -1,5 +1,6 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
4
5
  """
5
6
  Rule-based fixer: interprets YAML fix_rules and delegates to DocumentModifier.
@@ -1,5 +1,6 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
4
5
  """
5
6
  YAML rule file loader. Reads rule definitions from the rules/ directory.
@@ -1,5 +1,6 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
4
5
  """
5
6
  Rule Manager: unified rule loading with priority layering.
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  docx 转图片可视化验证(借鉴 docx-skill 的文档转图片思路)。
4
9
 
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  事实核验模块 —— 对用户文档中的关键人事信息做主动交叉核验。
4
9
 
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  focus_checks 自动检查(v1.12.30 内容优化架构改进方案 改进 C)。
4
9
 
package/engine/handoff.py CHANGED
@@ -1,5 +1,6 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
4
5
  """
5
6
  会话交接文档管理(Handoff)。
package/engine/inject.py CHANGED
@@ -3,7 +3,7 @@
3
3
  # 公文文档格式化 Skill —— 版头 / 版记 / 页码注入(独立发行版)
4
4
  #
5
5
  # (c) 2026 Jose AI (https://www.linhut.cn)
6
- # 项目出处:AI 公文智能优化助手 (https://www.linhut.cn)
6
+ # https://github.com/linhut/gongwen-skill
7
7
  # Licensed under the MIT License. See the LICENSE file for details.
8
8
  #
9
9
  # 本模块从原项目 backend/api/routes/optimize.py 中抽取版头/版记/页码
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  LiveEdit —— 内存级 DocumentModel 编辑会话。
4
9
 
@@ -3,7 +3,7 @@
3
3
  # 公文文档格式化 Skill —— 内容优化差异对比引擎
4
4
  #
5
5
  # (c) 2026 Jose AI (https://www.linhut.cn)
6
- # 项目出处:AI 公文智能优化助手 (https://www.linhut.cn)
6
+ # https://github.com/linhut/gongwen-skill
7
7
  # Licensed under the MIT License. See the LICENSE file for details.
8
8
  #
9
9
  # 功能:将原文段落与优化后段落进行句子级 diff,生成带标注的 .docx 文档。
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  审稿流转文书生成器 —— 为五角色审稿机制提供模板文档。
4
9
 
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  结构完整性检查(v1.12.30 内容优化架构改进方案 改进 B)。
4
9
 
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  样式学习引擎 —— 从标准 .docx 文档提取完整排版样式,生成自定义命名模板。
4
9
 
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  桌签批量生成器 —— 基于模板文件的桌签生成。
4
9
 
@@ -1,4 +1,10 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
7
+ # -*- coding: utf-8 -*-
2
8
  """
3
9
  座签默认模板生成器(方案六 P2-2:内置默认模板)。
4
10
 
@@ -3,6 +3,7 @@
3
3
  # 公文文档格式化 Skill —— 模板生成器(独立发行版)
4
4
  #
5
5
  # (c) 2026 Jose AI (https://www.linhut.cn)
6
+ # https://github.com/linhut/gongwen-skill
6
7
  # Licensed under the MIT License. See the LICENSE file for details.
7
8
  #
8
9
  # 本模块从原项目 backend/api/routes/template_download.py 中抽取纯逻辑,
@@ -0,0 +1,6 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  统一错误处理策略(跨模块#4 修复)。
4
9
 
@@ -1,5 +1,6 @@
1
1
  # This file is part of the Official Document AI Assistant.
2
2
  # (c) 2026 Jose AI (https://www.linhut.cn)
3
+ # https://github.com/linhut/gongwen-skill
3
4
  # Licensed under the MIT License. See the LICENSE file for details.
4
5
  """
5
6
  Logging configuration for the application.
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  统一值解析工具(跨模块#3 修复)。
4
9
 
@@ -1,4 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
+ #
3
+ # (c) 2026 Jose AI (https://www.linhut.cn)
4
+ # https://github.com/linhut/gongwen-skill
5
+ # Licensed under the MIT License. See the LICENSE file for details.
6
+ #
2
7
  """
3
8
  公共 ZIP / OOXML 工具(优化方案 v1.12.25 E3)。
4
9