跨平台学术写作与 OpenXML 排版技能 · 3-OS CI Verified Cross-Agent Academic Writing & OpenXML Compiler · 3-OS CI Verified

客观平实的社科汇报文风,
纯粹规范的学术三线表 Word。

Plain-Spoken Academic Prose.
Publication-Grade Word Typesetting.

告别大模型生成汇报时的“第一人称口语聊天腔”、“生僻古词与 AI 套话堆砌”以及“蓝标彩色网格表”。通过语境文风门禁、实证数字交叉对账与底层 OpenXML 重写引擎,一键交付中文宋体 + 西文 Times New Roman + 全域纯黑 + 标准 GB/T 7713.1 三段式三线表的 Word 文档。

Eliminate conversational 1st-person drift, AI buzzword clutter, sign-flip typos, and messy blue grid tables. Enforces context-aware objective Chinese reporting prose, cross-verifies empirical statistics, and compiles native SimSun + Times New Roman pure-black GB/T 7713.1 Three-Line Table .docx manuscripts.

原生兼容五大终端及目录市场安装器 NATIVE MULTI-AGENT COMPATIBILITY
Claude Code OpenAI Codex dsh (DeepSeek Harness) ZCode WorkBuddy
PASS · #000000
地方治理数字化转型:数据清洗与基准回归汇报
(数据口径、稳健性检验与模型设定审阅稿)
一、基准回归模型设定与估计结果

全量底表去重后保留 285 个地级市 3,378 个平衡面板观测值,核心指标综合合格率达 99.65%。双向固定效应方程设定如下:

Yc,t = β1 DigitalGovc,t + ρ Yc,t−1 + X′c,tγ + μc + λt + εc,t
表 1 政务数字化转型对跨部门响应时长的回归结果
解释变量 基准与动态面板 稳健性检验
(1) 双固定效应 (2) 滞后因变量 (3) 安慰剂前置
数字化指数 (digital_gov) −1.842*** −1.516*** −0.084
(0.291) (0.264) (0.245)
观测数 N 3,257 2,972 2,972
注:括号内为地级市聚类稳健标准误;顶底线 1.5pt、分组子线 0.5pt、栏目线 0.75pt。*** p < 0.001。
1. 我最近做完的数据清洗和模型结果汇报

我已经把全样本定稿宽表跑完了,实现了跨库实体链接与空间校准,满足条件随机缺失(MAR)假定。你看下表 1 里的系数保持在 +1.516***,是不是可以直接定稿?

变量名 模型 (1) 模型 (2) 安慰剂
digital_gov -1.842*** (0.291) -1.516*** (0.264) -0.084 (0.245)
N 3257 2972 2972
× [人称代词违规] 出现第一/第二人称“我”、“你”
× [文风词表告警] AI 复合黑话“定稿宽表 / 跨库实体链接” + 括号英文“(MAR)”
× [正负号不一致] 正文 +1.516*** 与表内 -1.516*** 符号反转
× [版式违规] Calibri 蓝色标题 + 灰底全网格竖线表 + 缺失表上表题与表下表注
Portrait A4 → Landscape A4 (w:w="16838") → Portrait A4 cols ≥ 7
表 2 分区域与分行政层级的多模型稳健性回归结果(自动横向分节页)
解释变量 东部城市子样本 中西部城市子样本 全样本
(1) 基线 (2) 控制 (3) IV (4) 基线 (5) 控制 (6) IV (7) 汇总
digital_gov −1.842*** −1.621*** −1.705*** −1.214** −1.108** −1.190** −1.516***
(0.291) (0.275) (0.312) (0.388) (0.364) (0.402) (0.264)
观测数 N 1,200 1,200 1,200 1,800 1,800 1,800 3,000
注:7 列及以上宽表(或标注 <!-- landscape -->)自动插入前后 <w:sectPr> 横向分节符,表后正文自动恢复纵向 A4 页面且零多余空白页。
PIPELINE ARCHITECTURE

拒绝“生成即交付”:三道自动化脚本门禁

Three Deterministic Quality Gates Before Delivery

每一次文档编译均自动串联文风扫描、表文实证数字对账与底层 OpenXML 结构断言,任何一项不达标即按行号精准阻断回报。

Every compilation chains context-aware prose linting, narrative-vs-table numerical reconciliation, and strict OpenXML schema assertions.

GATE 01 · PROSE Context-Aware

语境感知汇报文风门禁

Context-Aware Prose Gate

强制零第一/第二人称客观汇报视角(自动豁免双引号 “……” 与 > 引用块内的访谈原话),拦截生僻古语、AI 套话、句中英文括号路障与超 38 字长分句,严格校验“表上表题、图下图题”。

Enforces zero 1st/2nd-person narrative voice while exempting quoted interview/archival speech, blocks AI jargon and inline English brackets, caps unbroken CJK clauses at 38 chars, and checks caption placement.

python scripts/audit_report_prose.py report.md
GATE 02 · EMPIRICAL Anti-Hallucination

实证数字表文交叉对账门禁

Empirical Number Verification

自动提取每张表格的带符号系数、标准误与样本量 N,交叉核验正文引用句,精准捕获正负号抄反与小数移位;支持 --data-source 绑定统计脚本导出的 JSON/CSV 真值逐数对账。

Cross-checks narrative claims against cited tables to catch coefficient sign flips and digit transpositions, with optional --data-source results.json ground-truth reconciliation.

python scripts/verify_numbers.py report.md --data-source res.json
GATE 03 · OPENXML GB/T 7713.1

底层 OpenXML 版式断言门禁

OpenXML Typesetting Assertions

直接重写 document.xml、styles.xml 与 footer1.xml 并解包重验:断言全篇颜色集合恒等于 {#000000}、中西文字体严格分离为宋体与 Times New Roman、三线表磅值精确闭合。

Rewrites raw OpenXML parts and unpacks the resulting .docx to assert 100% #000000 black ink, exact SimSun + Times New Roman font separation, and 1.5pt / 0.75pt / 1.5pt Three-Line Tables.

python scripts/md_to_academic_docx.py report.md --verify
EDITORIAL SPECIFICATION

行文分寸与版式细节对照

Prose & Typesetting Specification

专为发给合作者、导师(PI)与评审团队的阶段性研究进展汇报、数据清洗说明与实证模型把关文档设计。

Engineered specifically for research progress reports, data-cleaning audits, and empirical specification memos shared with PIs and collaborators.

规范维度Dimension 自动拦截的典型反例Intercepted Anti-Pattern 技能强制执行的学术标准Enforced Academic Standard
汇报人称视角Narrative Voice “我把清洗完的数据整理好了,想请你帮忙把把关……” “本报告汇总近期完成的三部分实证准备工作……文末列出三个待确认口径供审阅把关。”(双引号内直接引语自动豁免)
术语与信息密度Lexical Clarity 堆砌“双轨奏疏、藩臬铨选”等晦涩古语,或“跨库实体链接、定稿宽表、毛坯对账”等工程套话 平实直白交代具体数据动作与因果逻辑;单分句 ≤ 38 汉字;支持 core 与 historical 词库按需切换
表文分工法则Prose-Table Split 正文每隔几字塞入英文缩写括号:“条件随机缺失(MAR)”、“假说一(H1)” 叙述段保持纯粹流畅中文;所有斜体英文变量名(*var_name*)、标准误与样本量 100% 归入三段式三线表
字体与纯黑规范Fonts & Ink Pandoc 默认等线/Calibri 混排、蓝色分级标题、超链接下划线、代码块灰底 中文强制宋体、西文数字强制 Times New Roman、公式强制 Cambria Math;全域锁定 #000000 纯黑;小四 1.5 倍行距首行缩进 2 字符
图表国标版式Tables & Figures 带竖线与彩色底纹的网格表;图题误放在图片上方;居中插图带 2 字符首行缩进右偏 表题在表上、图题在图下;顶底线 1.5pt、跨列子线 0.5pt、栏目线 0.75pt、零竖线;插图等比限宽 ≤ 14.5 cm 并清零缩进
RELEASE v1.1.0 UPGRADES

面向真实科研工作流的六重工程鲁棒性

Six Production-Grade Robustness Upgrades in v1.1.0

针对多列回归宽表、质性访谈引文、既有杂乱 Word 改排、无 Pandoc 裸机环境与 Windows 文件占用锁等高频实战痛点逐一加固。

Hardened against wide regression tables, qualitative quotes, legacy Word restyling, Pandoc-free machines, and Windows file locks.

01 / QUOTE EXEMPTION & PROFILES

引语豁免与可插拔学科词库

Quote Exemption & Profiles

自动识别并豁免 “……” 与 > 块引用中的受访者原话与史料引文;词表外置至 configs/prose_rules.json,支持学科配置自由扩展。

Exempts direct interview/archival quotes inside quotation marks and blockquotes; externalizes lexical rules into pluggable JSON profiles.

02 / LANDSCAPE & CMIDRULE

宽表自动横向分节与双层跨列表头

Auto-Landscape & Spanned Headers

7 列及以上宽表自动切换至横向 A4 分节页并在表后切回纵向;表头首行写入 > 自动生成 w:gridSpan 跨列组表头与 0.5pt 栏目子线。

Wraps ≥7-column tables in dedicated Landscape A4 sections and merges 2-row grouped headers with partial 0.5pt cmidrule sub-borders.

03 / FIGURE NORMALIZATION

插图自适应限宽与 SVG 支持

Figure Engine & SVG Support

自动限宽超宽图片至 ≤ 14.5 cm,清零图片段首行缩进消除右偏,兼容 .png/.jpg/.svg,锁定 keepNext 防止图文跨页分离。

Clamps figure extents to ≤14.5 cm, zeroes first-line indent on image paragraphs, handles PNG/JPEG/SVG, and locks figures to captions below.

04 / DIRECT DOCX RESTYLE & LOCK SAFE

既有 .docx 一键重排与占用锁保护

Direct --restyle & Lock Fallback

传入 --restyle 直接清洗合作者发来的杂乱彩色 Word 文档;检测到 Word/WPS ~$ 占用锁时自动回退输出至 *_updated.docx。

Cleans messy existing .docx files directly via --restyle, and safely falls back to *_updated.docx when Word/WPS holds a file lock.

05 / EMPIRICAL NUMBER GATE

表文数字与 JSON 真值交叉核验

Empirical Number Cross-Check

自动扫描正文与引用表格的系数符号及高精度小数一致性,支持绑定 --data-source results.json 阻断手写填数错漏。

Detects sign contradictions and transposed digits between prose and tables, and reconciles every statistic against JSON/CSV outputs.

06 / ZERO-PANDOC NATIVE OMML

零 Pandoc 原生公式与三端矩阵 CI

Zero-Pandoc OMML & 3-OS CI

内置纯 Python 递归解析器将 LaTeX 分式、根式、求和积分直接编译为可编辑 Word <m:oMath> 公式;GitHub Actions 持续验证三端兼容性。

Compiles LaTeX equations directly into native Word <m:oMath> AST in pure Python without Pandoc, continuously tested on Ubuntu, macOS, and Windows.

QUICKSTART & DEPLOYMENT

三十秒安装至五大智能体终端

Install in 30 Seconds Across All Five Agents

仓库同时提供根目录直装包与 skills/academic-report-docx/ 目录镜像,支持一键脚本全量部署或单终端独立克隆。

Ships with one-command multi-agent installers as well as standalone per-agent directory clones and CLI scripts.

# 克隆并一键部署至 Claude Code、Codex、dsh、ZCode、WorkBuddy git clone https://github.com/icgma/academic-report-docx.git cd academic-report-docx .\install.ps1
# Install across Claude Code, Codex, dsh, ZCode & WorkBuddy on macOS / Linux git clone https://github.com/icgma/academic-report-docx.git cd academic-report-docx chmod +x install.sh && ./install.sh all
# 方式 A:直接克隆至 Claude Code 全局技能目录 git clone https://github.com/icgma/academic-report-docx.git ~/.claude/skills/academic-report-docx # 方式 B:在 Claude Code 会话内扫描 skills/ 目录自动安装 /skill-install https://github.com/icgma/academic-report-docx
# OpenAI Codex (含 agents/openai.yaml 界面配置) git clone https://github.com/icgma/academic-report-docx.git ~/.codex/skills/academic-report-docx # dsh (DeepSeek Harness — Chokidar 免重启自动热加载) git clone https://github.com/icgma/academic-report-docx.git ~/.dsh/skills/academic-report-docx # ZCode & WorkBuddy git clone https://github.com/icgma/academic-report-docx.git ~/.zcode/skills/academic-report-docx git clone https://github.com/icgma/academic-report-docx.git ~/.workbuddy/skills/academic-report-docx
# 1. 编译 Markdown 汇报并串联文风、真值数据对账与 OpenXML 验证 python scripts/md_to_academic_docx.py examples/sample_empirical_report.md \ -o examples/sample_empirical_report.docx \ --data-source examples/sample_results.json --verify # 2. 将既有杂乱彩色网格表 .docx 直接一键清洗为宋体 + Times New Roman 纯黑三线表 python scripts/md_to_academic_docx.py messy_draft.docx --restyle -o clean_report.docx --verify
对话唤起提示词示例(Prompt Example) AGENT INVOCATION PROMPT
“请调用 academic-report-docx 技能,把当前项目的数据清洗、缺失检验和回归结果整理成一份发给合作者审阅的工作汇报 Word 文档(使用客观汇报风格、不要用第一人称,与 results.json 对账,导出宋体 + Times New Roman、纯黑、三段式三线表 .docx)。”
“Use academic-report-docx to compile our data-cleaning and regression results into a collaborator review report in objective reporting prose (zero 1st-person pronouns, verified against results.json, exported as a pure-black SimSun + Times New Roman Three-Line Table .docx).”