Skip to content
Back to search

chinese-thesis-workbench-skill

本科毕业论文skill:会把你的项目的源码、数据库、截图和文献,按学校模板与样文风格,工程化地写成整合成可追溯、可续写、可审查的本科毕业论文

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/zyhsechub--chinese-thesis-workbench-skill/badge.svg)](/listings/zyhsechub--chinese-thesis-workbench-skill)

HTML

<a href="/listings/zyhsechub--chinese-thesis-workbench-skill"><img src="/api/listings/zyhsechub--chinese-thesis-workbench-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 139 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. name: chinese-thesis-workbench
  3. description: Standardize, draft, revise, check, and package Chinese undergraduate thesis or graduation-design papers from school templates, task books, proposals, sample papers, source code, screenshots, databases, APIs, tests, literature PDFs, Word comments, and existing drafts. Use when the user asks to write, generate, refactor, polish, reduce AIGC style, verify, format, or deliver a Chinese thesis with evidence traceability, figure registries, workflow logs, chapter word control, screenshots, references, DOCX output, and appendix DOCX.
  4. ---
  5. # Chinese Thesis Workbench
  6. ## Operating Model
  7. Use standards and evidence as the control layer, then use the Chinese thesis drafting pipeline as the output layer. Treat school templates, advisor requirements, task books, sample papers, source code, databases, APIs, tests, literature PDFs, screenshots, Word comments, and existing drafts as materials that must be resolved into structured state before formal prose is written.
  8. The workbench has two sides:
  9. - Governance side: `paper-context/` stores workflow state, standards, evidence, literature, AIGC reports, and Word comment revisions.
  10. - Delivery side: `paper-output/` stores thesis Markdown, DOCX, appendix DOCX, figures, screenshots, image maps, and reference verification artifacts.
  11. - User-facing visibility and decision side: `paper-context/workflow/user-dashboard.md` summarizes current progress, missing materials, user decisions needed, and the next recommended action. `paper-context/workflow/content-decisions.md` records optional content emphasis and exclusion decisions when candidate content is available. `paper-context/workflow/blocker-report.md` records the latest blocker, options, recommendation, and limited-continuation status. `paper-context/workflow/user-decisions.md` records user-approved choices that affect scope, evidence, standards, outline, delivery, or limitations. These files improve transparency; they do not override standards, evidence, or delivery quality gates.
  12. ## Required Workflow
  13. Run the workflow in this order unless the user is only asking for a narrow inspection or revision:
  14. 1. `intake_materials`: collect materials and record priority, gaps, missing impact, continuation limits, and user next steps in `paper-context/workflow/material-inventory.md`.
  15. 2. `init_workspace`: initialize `thesis-ai-standard/`, `paper-context/`, and workflow logs.
  16. 3. `resolve_standards`: fill `thesis-ai-standard/templates/standard-profile.yaml`.
  17. 4. `analyze_sample_and_template`: normalize school template and sample-paper parser outputs into lightweight analysis reports, outline suggestions, and word budgets before drafting; parser output does not drive DOCX formatting unless the user explicitly selects sample-style generation via `--sample-analysis` or template-copy filling via `--from-template`.
  18. 5. `build_evidence`: extract project facts into `paper-context/evidence/`.
  19. 6. `stop_and_report`: stop or limit only the affected scope whenever evidence, standards, figures, citations, or DOCX delivery cannot be verified; record options in `blocker-report.md`.
  20. 7. `build_thesis_spec`: fill `thesis-ai-standard/templates/thesis-ai-spec.yaml`.
  21. 8. `build_figure_registry`: fill `thesis-ai-standard/templates/figure-registry.yaml`.
  22. 9. `confirm_outline`: confirm chapter structure, word counts, sample/template observations, and any available content emphasis/exclusion decisions before writing.
  23. 10. `draft_chapters`: write only from confirmed structured facts and evidence.
  24. 11. `produce_assets`: generate or collect figures, diagrams, screenshots, tables, and appendix sources.
  25. 12. `produce_docx`: generate or edit the main DOCX and appendix DOCX into `paper-output/` using the recorded delivery path.
  26. 13. `quality_gates`: run standards, evidence, reference, figure, DOCX, and AIGC checks.
  27. 14. `delivery_report`: report outputs, limitations, remaining human decisions, and verification evidence.
  28. `stop_and_report` is a global blocking mechanism, not just step 6. Read `references/workflow/stop-and-report.md` whenever continuing may require guessing.
  29. ## Phase + Status State Model
  30. Use this two-layer state model in `paper-context/workflow/workflow-status.md`, and mirror the user-facing summary in `paper-context/workflow/user-dashboard.md`:
  31. | Field | Allowed values |
  32. | --- | --- |
  33. | `phase` | `intake_only`, `workspace_ready`, `standards_resolved`, `sample_analysis_done`, `evidence_built`, `spec_confirmed`, `outline_confirmed`, `writing_allowed`, `delivery_done` |
  34. | `status` | `pending`, `in_progress`, `blocked`, `needs_review`, `done`, `deprecated` |
  35. When status becomes `blocked`, write `blocked_reason`, `missing_materials`, `next_action`, and `can_continue_with_limitations` in the status file. Do not hide blockers in chat only.
  36. After any meaningful phase, blocker, material, outline, or delivery-scope change, update `user-dashboard.md` so the user can see:
  37. - current phase and status
  38. - completed work
  39. - decisions waiting for user confirmation
  40. - missing materials and their impact
  41. - next recommended action
  42. - limited-continuation options, if any
  43. ## Decision Tree
  44. 1. If there is no workspace, run `scripts/workspace/init_thesis_workspace.py`.
  45. 2. If school/advisor/template rules are missing or conflicting, resolve standards first.
  46. 3. If sample/template analysis is missing, analyze it before `thesis-ai-spec.yaml`.
  47. 4. If source evidence or literature is missing, build evidence and reference pools before writing.
  48. 5. If `thesis-ai-spec.yaml` is not confirmed, do not write formal thesis body.
  49. 6. If `figure-registry.yaml` is not ready, do not claim figures/tables/screenshots are complete.
  50. 7. If asked to revise Word comments, extract comments and route back to `writing_allowed`.
  51. 8. If asked for final delivery, run quality gates and produce both main and appendix DOCX.
  52. ## Hard Rules
  53. - School and advisor requirements override default rules.
  54. - Do not write formal thesis body before materials are collected or the user explicitly confirms there are no more materials.
  55. - During intake, classify materials as `required`, `strongly_recommended`, or `optional`, and explain the effect of each missing required or strongly recommended material.
  56. - Use `content-decisions.md` when the user provides feature/module/experiment/appendix candidates, but do not block the main workflow only because no candidate content has been provided yet.
  57. - Record user-approved scope, material-unavailable, limited-continuation, standard-conflict, content-exclusion, outline, word-count, DOCX, appendix, and filename decisions in `user-decisions.md`.
  58. - User-facing workflow files are decision aids only. They must not weaken school/advisor requirements, evidence requirements, citation verification, figure provenance, or DOCX delivery checks.
  59. - Do not write formal thesis body before standards, sample/template analysis, and evidence building are complete.
  60. - When evidence is insufficient, trigger `stop_and_report`; do not guess missing facts.
  61. - When blocked, classify the issue as `hard_blocker`, `limited_continue`, or `user_choice_needed`, then provide user options and a recommended path.
  62. - `thesis-ai-spec.yaml` is the single entry point for thesis facts.
  63. - `figure-registry.yaml` is the single entry point for figures, tables, screenshots, and diagram sources.
  64. - Thesis prose may consume structured facts and evidence only; do not expand directly from README files or old notes.
  65. - Do not write content that `content-decisions.md` marks as rejected, excluded, or waiting for evidence.
  66. - Do not invent features, fields, APIs, test results, experiment data, or references.
  67. - AIGC style governance runs after the evidence chain is complete and may only improve academic expression, evidence density, and vague wording.
  68. - Thesis body must not expose AI workflow language.
  69. - Chapter 4 implementation must bind to real modules, screenshots, core code, SQL, or equivalent evidence.
  70. - System-design theses without an E-R diagram or equivalent data-design evidence cannot be marked complete.
  71. - Generate both the main thesis DOCX and appendix DOCX. For strict school formatting, prefer template-copy filling via `scripts/docx/apply_textual_edits.py --from-template`; otherwise use default or sample-style generation. Do not promise full template reproduction. Preserve diagram source, E-R source, flowchart source, and related assets in the appendix.
  72. - Formula delivery must be explicit: `latex_text` preserves source formula text, while `formula_image` requires matching image assets.
  73. - Output filenames must use the thesis title, not generic names such as `final`, `draft`, `paper-final`, or `doc1`.
  74. - Literature workflow must be: build pool -> verify -> filter -> format -> generate verification checklist.
  75. ## Resource Map
  76. | Need | Resource |
  77. | --- | --- |
  78. | Intake and fast workflow | `references/workflow/intake.md`, `references/workflow/rapid-thesis-workflow.md` |
  79. | Workflow state, blockers, and sparse-material handoff | `references/workflow/workflow-state-management.md`, `references/workflow/stop-and-report.md`, `references/workflow/material-gap-handoff.md` |
  80. | Standards and template resolution | `references/standards/standards-and-template-resolution.md`, `references/standards/style-extraction.md`, `references/standards/default-style.md` |
  81. | Evidence extraction | `references/evidence/source-to-thesis-workflow.md`, `references/evidence/fact-extraction.md` |
  82. | Literature/PDF workflow | `references/evidence/literature-and-pdf-workflow.md`, `scripts/literature/` |
  83. | Writing and chapter control | `references/writing/writing-pipeline.md`, `references/writing/chapter-patterns.md`, `references/writing/sample-analysis.md` |
  84. | AIGC style governance | `references/writing/aigc-style-governance.md`, `scripts/review/analyze_aigc_style.py` |
  85. | DOCX delivery and Word comments | `references/delivery/docx-delivery.md`, `references/delivery/word-comment-revision-workflow.md`, `scripts/docx/` |
  86. | Figures and screenshots | `scripts/figures/`, `scripts/screenshots/`, `thesis-ai-standard/templates/figure-registry.yaml` |
  87. | Merge provenance | `references/merge-map.md` |
  88. ## Quality Gates
  89. Before claiming delivery quality, check:
  90. - `standard-profile.yaml`, `thesis-ai-spec.yaml`, and `figure-registry.yaml` exist and are internally consistent.
  91. - Every major factual claim has a source in `paper-context/evidence/` or verified literature.
  92. - Every figure/table has `source_kind`, `source_path`, `image_path`, `evidence_source`, `first_mention`, and `status`.
  93. - References are real, selected from a verified pool, and have a generated verification checklist.
  94. - AIGC style changes do not add facts.
  95. - Main DOCX and appendix DOCX exist in `paper-output/`.
  96. - Screenshot, diagram, and image-map paths resolve on Windows.
  97. - Workflow logs reflect the current phase, status, blockers, and delivery limitations.
  98. - `user-dashboard.md` reflects the user-visible progress, pending decisions, missing materials, and next action.
  99. - `blocker-report.md` reflects the latest blocker, affected scope, user options, recommended path, and whether limited continuation is allowed.
  100. - `user-decisions.md` records user-approved choices that affect scope, missing-material handling, limitations, standards, outline, or delivery.
  101. - If `content-decisions.md` has active candidates, their approved/deferred/excluded status is consistent with the outline, thesis spec, and figure registry.
  102. ## Delivery Contract
  103. Deliver thesis artifacts under `paper-output/`:
  104. - `<论文标题>.md`
  105. - `<论文标题>.docx`
  106. - `<论文标题>-附件.docx`
  107. - `<论文标题>-image-map.json`
  108. - `<论文标题>-文献核验清单.json`
  109. - `figures/`
  110. - `screenshots/`
  111. Report what was verified, what could not be verified, and what still needs human confirmation. If verification cannot run, state the command and the reason.
README.md · README · 303 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # chinese-thesis-workbench
  2. > 以标准和证据为骨架,以四种 DOCX 交付路径为输出,把项目源码、学校模板、往届样文、文献和截图整合成可追溯、可续写、可检查的中文本科论文交付工作台。
  3. [![Skill Type](https://img.shields.io/badge/Codex-Skill-blue)](https://codex.claude.ai)
  4. [![Language](https://img.shields.io/badge/Language-中文-red)]()
  5. ---
  6. ## 定位
  7. **chinese-thesis-workbench** 不是一键生成论文的工具。它是一套论文标准化交付工作台,把毕业论文拆成可审查、可回退的步骤——收集材料 → 选择交付路径 → 构建证据 → 确认大纲 → 分章写作 → 生成/填充/编辑 DOCX → 质量检查。
  8. 核心原则:**能复制/编辑就保留原 DOCX 格式,不能复制时再生成结构清晰的默认格式文档**。
  9. ### 适合
  10. - 有真实项目(软件系统、实验、调研等)需要写成毕业论文的学生
  11. - 需要控制章节字数、管理图表截图、核验参考文献的用户
  12. - 需要严格匹配学校模板格式的用户
  13. - 导师批注后需要系统化修订、且不能丢失已有排版格式的用户
  14. - 素材不足、需要联网检索同领域文献或头脑风暴写作思路的用户
  15. ### 不适合
  16. - 没有真实项目或数据、希望凭空生成论文的用户
  17. - 纯文科论文可参考流程但需重配证据链
  18. ---
  19. ## 四种 DOCX 交付路径
  20. v1.0.0 起提供四种路径,用户 intake 阶段选择并记录到 `user-decisions.md`:
  21. | 路径 | 输入 | 输出 | 格式策略 |
  22. | ------------- | ----------------------------------- | ----------- | ----------------------------------- |
  23. | **M1** 默认样式生成 | Markdown | 全新 `.docx` | 内置默认格式(宋体小四正文、黑体标题) |
  24. | **M2** 样文版式贴近 | Markdown + 样文分析 JSON | 全新 `.docx` | 从样文提取高置信度字号/字体/缩进,deep_merge 进默认值 |
  25. | **M3** 模板副本填充 | Markdown + 学校模板 `.docx` + spec YAML | 模板副本被填充 | 复制模板 OOXML 底座,仅替换占位文本 + 插入章节正文,不动样式 |
  26. | **M4** 已有稿编辑 | 初稿 `.docx` + 编辑指令 | 同一份 `.docx` | 只改段落文本,不动 pPr/rPr/sectPr/批注 |
  27. **M3 是格式要求严格的学校的推荐路径**——它复制模板后只做文本替换和插入,模板的 styles.xml、页眉页脚、分节符全部原封不动。M2 是轻量近似,不承诺模板复刻。
  28. ---
  29. ## 快速开始
  30. ```powershell
  31. # 1. 安装 Python 依赖
  32. pip install -r requirements.txt
  33. # 2. 初始化论文工作区
  34. python scripts/workspace/init_thesis_workspace.py <你的论文项目目录>
  35. # 3. 编辑模板
  36. # <项目目录>/thesis-ai-standard/templates/standard-profile.yaml
  37. # 4. 在 Claude Code 中加载本 skill,告诉 AI:
  38. # "帮我把这个项目整理成一篇结构完整的毕业论文"
  39. ```
  40. ### M3 学校模板副本填充
  41. ```powershell
  42. # 先用 analyze_docx.py 分析模板结构(可选但推荐)
  43. python scripts/docx/analyze_docx.py 学校模板.docx --json-out result.json
  44. # 从 markdown 论文 + 学校模板生成填充好的 docx
  45. python scripts/docx/apply_textual_edits.py --from-template 学校模板.docx \
  46. --thesis-md paper-output/<论文标题>.md \
  47. --spec thesis-ai-standard/templates/thesis-ai-spec.yaml \
  48. --out paper-output/<论文标题>.docx
  49. ```
  50. 模板原文件不被修改。输出报告 `paper-output/<论文标题>-template-fill-report.md` 列出已替换的占位、未匹配字段和章节插入位置。
  51. ### M2 样文版式贴近
  52. ```powershell
  53. python scripts/docx/analyze_docx.py 样文.docx --json-out paper-context/workflow/sample-docx-analysis.json
  54. python scripts/docx/generate_thesis_docx.py thesis.md output/thesis.docx \
  55. --sample-analysis paper-context/workflow/sample-docx-analysis.json
  56. ```
  57. 高置信度(sample_count ≥ 3)的样式值会被合并进默认 profile。低频出现但高置信的类别(如标题、摘要标题)降为 sample_count ≥ 1 即可采用。
  58. ### M4 已有初稿编辑
  59. ```powershell
  60. python scripts/docx/apply_textual_edits.py draft.docx draft-edited.docx \
  61. --replace "原文锚点" "新文本" \
  62. --insert-after "锚点段落" "新增段落" \
  63. --delete "要删除的段落锚点"
  64. ```
  65. 只改段落文本,不重建样式。锚点命中 0 次或多于 1 次时报错退出。
  66. ### 样文/模板分析(所有路径通用)
  67. ```powershell
  68. python scripts/docx/analyze_docx.py 学校模板.docx --json-out result.json
  69. python scripts/workspace/build_sample_template_outputs.py result.json --target <项目目录>
  70. ```
  71. ---
  72. ## 核心能力
  73. ### 标准与证据
  74. | 能力 | 说明 |
  75. | --------- | ---------------------------------- |
  76. | 材料摄入 | 按必需/建议/可选分级,说明缺失影响和是否可继续 |
  77. | 项目证据提取 | 按论文类型从源码、数据库、API、测试、实验数据中生成证据索引 |
  78. | 文献治理 | PDF 参考文献抽取 → 候选池 → 核验 → 格式化 → 核验清单 |
  79. | 素材稀缺处置 | 素材不足时征得用户同意,联网检索同领域文献或头脑风暴写作思路 |
  80. | AIGC 风格治理 | 减少空泛表达,不伪造事实 |
  81. | Word 批注修订 | 抽取导师批注,逐条修订并记录变更日志 |
  82. ### 论文成稿
  83. | 能力 | 说明 |
  84. | ------- | ---------------------------------------------------- |
  85. | 样文分析 | 提取往届样文的目录结构、章级字数、图表节奏和段落样式 |
  86. | 模板分析 | 提取学校模板的页面设置、样式定义和段落格式特征 |
  87. | 章节控字 | 写作前定预算,写完统计,超出自动压缩 |
  88. | 图表 | 支持 Mermaid / PlantUML / draw.io 三种图源;Playwright 自动截图 |
  89. | DOCX 成稿 | 四种交付路径:默认生成 / 样文贴近 / 模板填充 / 初稿编辑 |
  90. | 模板填充报告 | M3 输出已替换占位、未匹配字段、章节配对方法、需人工核对项 |
  91. | 公式 | 支持 LaTeX 文本保留或图片插入两种模式 |
  92. | 文件命名 | 所有交付物使用论文标题命名 |
  93. ### 用户可见性
  94. 工作流初始化后在 `paper-context/workflow/` 下生成五类控制文件:
  95. | 文件 | 作用 |
  96. | ----------------------- | ------------------------ |
  97. | `user-dashboard.md` | 当前进度、待确认事项、下一步建议 |
  98. | `material-inventory.md` | 材料等级、缺失影响、是否可继续 |
  99. | `content-decisions.md` | 候选内容的取舍:正文重点/简写/附录/暂缓/不写 |
  100. | `blocker-report.md` | 阻断原因、影响范围、可选路径、是否可有限继续 |
  101. | `user-decisions.md` | 用户已确认的关键选择归档(含交付路径选择) |
  102. 详细规则和工作流见 [SKILL.md](SKILL.md)。
  103. ### 素材稀缺与头脑风暴
  104. 当材料摄入后发现素材过少(两个以上必需材料缺失、文献池为空、或证据仅停留在 README 级别),工作台不会直接阻断,而是走 `material-gap-handoff` 流程:
  105. 1. **联网检索**:征得用户同意后,检索近五年同领域文献,写入 `paper-context/literature/web-suggested.md`(标记 `needs_check`),不直接加入参考文献。
  106. 2. **头脑风暴**:征得用户同意后启动头脑风暴,写作思路只写入 `content-decisions.md` 的候选区,供用户审批取舍。
  107. 3. 用户确认的进入大纲和正文;拒绝的标记 `discarded`,论文正文、spec、图表注册表都不会引用。
  108. 4. 用户拒绝联网检索和头脑风暴的,记录到 `blocker-report.md`,在可见限制下继续推进。
  109. ---
  110. ## 架构
  111. ```
  112. 治理侧 paper-context/
  113. workflow/ 用户仪表盘、材料清单、内容取舍、阻断报告、用户决策、进度日志
  114. evidence/ 项目证据、技术栈、数据库 Schema、API 列表
  115. literature/ 参考文献抽取、交叉引用、联网检索建议
  116. standards/ 标准解析、样式提取
  117. aigc/ AIGC 风格报告
  118. word-comments/ 导师批注待办和修订记录
  119. 交付侧 paper-output/
  120. <论文标题>.md Markdown 源稿
  121. <论文标题>.docx 主论文(默认格式 / 样文贴近 / 模板填充)
  122. <论文标题>-附件.docx 附件(图源码等)
  123. <论文标题>-template-fill-report.md 模板填充报告(仅 M3)
  124. <论文标题>-image-map.json 图片映射
  125. <论文标题>-文献核验清单.json 参考文献核验
  126. figures/ 图表
  127. screenshots/ 截图
  128. ```
  129. ---
  130. ## 目录
  131. ```
  132. chinese-thesis-workbench/
  133. SKILL.md Skill 路由入口
  134. README.md 本文件
  135. requirements.txt Python 依赖
  136. package.json Node.js 依赖(截图)
  137. references/ 按需加载的参考文档
  138. workflow/ 工作流、状态管理、阻断、质量门禁、素材稀缺交接
  139. standards/ 标准解析、样式提取、默认格式
  140. evidence/ 源码证据、文献治理、事实提取
  141. writing/ 样文分析、章节写作、参考文献选择、AIGC 治理
  142. delivery/ DOCX 成稿(含四种路径)、最终检查、Word 批注修订
  143. scripts/ 可执行脚本
  144. workspace/ 工作区初始化、工作流日志、分析结果归并
  145. evidence/ 项目证据构建
  146. literature/ PDF 参考文献抽取、交叉引用、候选池
  147. docx/ DOCX 分析、生成、模板填充、文本编辑、批注抽取
  148. figures/ Mermaid 渲染、图表资产检查、图片映射
  149. screenshots/ 截图占位提取、截图计划、浏览器截图
  150. review/ 章节字数统计、AIGC 风格分析
  151. assets/thesis-ai-standard/
  152. templates/ 结构化配置模板(YAML)
  153. drawio/ 图表模板(6 张)
  154. tests/ 核心合约测试(9 个)
  155. ```
  156. ---
  157. ## 与上一版本(v0.1.0)的比较
  158. ### 功能差异
  159. | 功能 | v0.1.0 | v1.0.0 |
  160. | ---------------------- | -------------------- | ---------------------------------------- |
  161. | DOCX 生成 | 仅默认样式 | 四种路径(M1/M2/M3/M4) |
  162. | 学校模板处理 | 只能分析,格式靠用户手动贴 | M3 复制模板底座直接填充文本 |
  163. | 样文样式利用 | 分析后不进生成器 | M2 `--sample-analysis` 直通生成器 |
  164. | 已有初稿编辑 | 不支持 | M4 `--replace/--insert/--delete` |
  165. | 素材稀缺场景 | `stop_and_report` 阻断 | 可征得同意后联网检索 / 头脑风暴 |
  166. | `load_style_profile()` | 无参数,只返回默认值 | 可选 `sample_analysis` 参数,deep_merge 高置信样式 |
  167. | 测试数量 | 5 个 | 9 个 |
  168. ### 改动范围
  169. - **新增** `scripts/docx/apply_textual_edits.py`(466 行)—— M3 + M4 文本编辑内核
  170. - **新增** `references/workflow/material-gap-handoff.md`(9 行)—— 素材稀缺流程
  171. - **修改** `scripts/docx/generate_thesis_docx.py` —— 新增 `sample_style_override` + `--sample-analysis` 参数
  172. - **修改** `SKILL.md` —— 4 处更新(交付路径、格式例外、硬规则、资源映射)
  173. - **修改** `references/workflow/intake.md` —— 新增四选一交付路径问题
  174. - **修改** `references/delivery/docx-delivery.md` —— 四种模式说明和命令示例
  175. - **修改** `references/delivery/word-comment-revision-workflow.md` —— 追加 M4 文本编辑模式一节
  176. - **修改** `tests/test_core_contracts.py` —— 新增 4 个测试
  177. ### 向后兼容
  178. - M1 默认路径代码零改动,`build_doc()` 一行未变
  179. - `load_style_profile()` 无参调用行为与 v2.x 完全一致
  180. - v2.x 所有 5 个测试在新版中全部通过
  181. - 无新增 Python 依赖(`pyyaml` 已在 requirements.txt 中)
  182. ---
  183. ## 依赖
  184. | 包 | 用途 |
  185. | ---------------------- | ------------- |
  186. | `python-docx` | DOCX 生成、分析、编辑 |
  187. | `PyYAML` | YAML 配置读写 |
  188. | `pypdf` / `pdfplumber` | PDF 解析 |
  189. Node.js 和 Playwright 仅自动截图功能需要:
  190. ```powershell
  191. npm install && npm run install:browsers
  192. ```
  193. ---
  194. ## 验证
  195. ```powershell
  196. # Python 编译检查
  197. python -m compileall scripts tests
  198. # 单元测试(当前 9 个)
  199. python -m unittest discover tests
  200. # 工作区模板校验
  201. python scripts/workspace/check_thesis_workspace.py assets/thesis-ai-standard
  202. ```
  203. ---
  204. ## 参考项目
  205. 本 skill 参考了以下两个项目:
  206. | skill | 角色 |
  207. | ---------------------------- | ------------------------------------------------ |
  208. | **xiaou61/thesis-skills** | 标准与证据骨架:标准解析、证据构建、质量门禁、AIGC 治理、Word 批注、状态管理 |
  209. | **Doryoku1223/lunwen-skill** | 中文论文成稿引擎:样文分析、章节控字、图表截图、Mermaid/PlantUML、DOCX 成稿 |
  210. ---
  211. ## 许可
  212. MIT License
  213. ---
  214. ## 致谢
  215. - **[xiaou61/thesis-skills](https://github.com/xiaou61/thesis-skills)** — 提供标准与证据骨架
  216. - **[Doryoku1223/lunwen-skill](https://github.com/Doryoku1223/lunwen-skill)** — 提供中文论文成稿引擎
  217. 感谢两个项目的作者为中文毕业论文标准化写作做出的贡献。

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.