REA
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
适用于 Claude Code / Agent 的论文写作 Skill (论文.SKILL)。涵盖论文内容、数据库ER图、整体流程图生成。针对本科论文进行aigc率降低、降重的优化,助力毕业设计高质量生成。
作者の方は、このコードを README に貼れます。バッジはこのページにリンクします。
[](https://mcp.popnx.com/en/skills/stars-oc-thesis-creator)同じ作業で AI をサービスにつなぐ MCP
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Codebase intelligence for TypeScript and JavaScript, exposed as structured MCP analysis tools.
MCP server for terminal commands, file operations, and process management
同じ種類の作業。Skill 一覧と同じ並び
| これ thesis-creator | rea | andrej-karpathy-skills | graphify | MoneyPrinterTurbo | |
|---|---|---|---|---|---|
| 作者 | Stars-OC | morluto | multica-ai | Graphify-Labs | harry0703 |
| Skill 数 | 1 | 1 | 1 | 1 | 1 |
| GitHub スター | 243 | 467,235 | 234,125 | 149,873 | 144,332 |
| 最終コード更新 | 2026年6月2日 | 2026年11月18日 | 2026年4月20日 | 2026年11月18日 | 2026年11月18日 |
| ライセンス | MIT | MIT | – | Apache-2.0 | MIT |
Stars-OC による 1 個の Skill(指示セット)。AI が読んでそのとおりに作業します · MCP server ではありません
MCP = 手
AI を外部のサービスやデータにつなぎます(例:Notion を読む、請求書を作る)。プログラムやサーバーが動いている必要があります。
Skill = 手順書
作業のやり方を AI に教えるテキストファイル。どのサービスにもつながりません。
重なる部分もあります。ツールを呼ぶスクリプト付きの Skill や、知識だけを渡す MCP もあります。やりたい作業から選んでください。
Claude CodeClaude (เว็บ/แอป)
提供元の README と repo のフォルダから判断
GitHub account Stars-OC (person), 8 years old
★ 243 stars, few users so far · code last changed 2026年6月2日
100 scripts that can run on a computer: scripts/aigc/__init__.py, scripts/aigc/aigc_detect.py, scripts/aigc/aigc_detect_technical.py, scripts/aigc/detect.py and 96 more
Could not check every script (some are too large); read them first
No hooks or writes to machine settings found
Checked automatically from the repo files at commit edf95df (read only, nothing was run). Not a safety guarantee: read it and decide for yourself
まず:どの AI を使っていますか
使っているアプリを選ぶと、そのアプリでのインストール方法だけが表示されます
Files are byte-for-byte the same as on GitHub at commit edf95df · View on GitHub ↗
100 scripts
Once uploaded it runs on Claude’s systems, not on your computer. No need to unzip
All 164 files · 2.1 MB
.openskills.json2 KBCONTRIBUTING.md3 KBLICENSE1 KBREADME.md27 KBSKILL.md19 KBconfig/.thesis-config.yaml5 KBdocs/CHANGELOG.md13 KBdocs/ROADMAP.md7 KBdocs/images/PaperPass.png92 KBdocs/images/diff.png138 KBdocs/images/paperYY.png131 KBdocs/images/全文朱雀检测.png279 KBdocs/plans/2026-06-01-docx-toc-design.md2 KBdocs/plans/2026-06-01-docx-toc.md9 KBdocs/usage_guide.md25 KBprompts/aigc_reducer_prompt.md43 KBprompts/discussion_guide.md3 KBprompts/er_textbook_single_entity_dot.md2 KBprompts/humanizer_guidelines.md36 KBprompts/idiom_replacement_dict.md9 KBprompts/image_generation.md12 KBprompts/post_replace_optimization.md9 KBprompts/reducer_guidelines.md9 KBprompts/reference_citation_prompt.md8 KBprompts/reference_format_gbt7714.md12 KBprompts/thesis_structure.md11 KBprompts/writer_guidelines.md35 KBprompts/writing_standards.md7 KBreferences/README.md2 KBreferences/examples/README.md6 KBreferences/guidelines/README.md6 KBreferences/prompt/README.md9 KBreferences/prompt/background_template.md3 KBreferences/prompt/template.md2 KBreferences/reference/README.md1 KBreferences/reference/code/README.md1 KBreferences/reference/doc/README.md1 KBreferences/templates/README.md5 KBscripts/INDEX.md1 KBscripts/aigc/INDEX.md1 KBscripts/aigc/__init__.py1 KBscripts/aigc/aigc_detect.py1 KBscripts/aigc/aigc_detect_technical.py1 KBscripts/aigc/detect.py28 KBscripts/aigc/enhanced_replace.py12 KBscripts/aigc/enhanced_synonyms.txt6 KBscripts/aigc/reduce_workflow.py34 KBscripts/aigc/simple_replace.py8 KBscripts/aigc/synonym_replace.py7 KBscripts/aigc/technical_detect.py15 KBscripts/aigc/term_whitelist.txt1 KBscripts/aigc/text_analysis.py10 KBscripts/charts/INDEX.md2 KBscripts/charts/__init__.py1 KBscripts/charts/chart_generator.py1 KBscripts/charts/chart_renderer.py1 KBscripts/charts/chart_renderer_offline.py23 KBscripts/charts/chart_template_loader.py10 KBscripts/charts/demo_chart_generation.py7 KBscripts/charts/demo_output/demo_er.png31 KBscripts/charts/demo_output/demo_flowchart.png56 KBscripts/charts/demo_output/demo_sequence.png47 KBscripts/charts/demo_output/themes/flowchart_academic.png45 KBscripts/charts/demo_output/themes/flowchart_business.png40 KBscripts/charts/demo_output/themes/flowchart_minimal.png38 KBscripts/charts/engines/__init__.py1 KBscripts/charts/engines/graphviz.py2 KBscripts/charts/engines/mermaid.py3 KBscripts/charts/engines/plantuml.py16 KBscripts/charts/er_dot_builder.py14 KBscripts/charts/image_manifest_builder.py7 KBscripts/charts/llm_chart_generator.py4 KBscripts/charts/manifest_builder.py6 KBscripts/charts/markdown_updater.py3 KBscripts/charts/render.py5 KBscripts/charts/schemas.py4 KBscripts/charts/single_entity_er_dot_builder.py9 KBscripts/charts/source_writer.py15 KBscripts/charts/validate.py3 KBscripts/content/INDEX.md1 KBscripts/content/__init__.py1 KBscripts/content/document_reader.py6 KBscripts/content/format_checker.py20 KBscripts/content/keyword_extractor.py16 KBscripts/content/merge_drafts.py28 KBscripts/core/INDEX.md1 KBscripts/core/__init__.py1 KBscripts/core/lifecycle.py12 KBscripts/core/logger.py18 KBscripts/core/status_manager.py12 KBscripts/core/task_dispatcher.py19 KBscripts/core/terminal_encoding.py1 KBscripts/document_exporter/INDEX.md1 KBscripts/document_exporter/__init__.py1 KBscripts/document_exporter/__main__.py1 KBscripts/document_exporter/cli.py1 KBscripts/document_exporter/config.py1 KBscripts/document_exporter/docx_writer.py28 KBscripts/document_exporter/enhanced_md_to_docx.py13 KBscripts/document_exporter/exporter.py2 KBscripts/document_exporter/markdown.py4 KBscripts/document_exporter/md_to_docx.py13 KBscripts/document_exporter/pdf_converter.py2 KBscripts/document_exporter/preflight.py2 KBscripts/install.ps15 KBscripts/references/INDEX.md2 KBscripts/references/__init__.py1 KBscripts/references/reference_engine.py44 KBscripts/references/reference_merger.py12 KBscripts/references/reference_searcher.py19 KBscripts/references/reference_validator.py44 KBscripts/references/verified_reference_pool.py21 KBscripts/requirements.txt1 KBscripts/templates/chart_themes.yaml3 KBscripts/templates/charts/_index.yaml2 KBscripts/templates/charts/architecture_web.yaml2 KBscripts/templates/charts/er_ecommerce.yaml2 KBscripts/templates/charts/flowchart_user.yaml2 KBscripts/templates/charts/sequence_api.yaml2 KBtemplates/code_summary_template.md3 KBtest/INDEX.md1 KBtest/__init__.py1 KBtest/test_aigc_modules.py5 KBtest/test_chart_generator_er_diagram.py2 KBtest/test_chart_generator_image_validation.py5 KBtest/test_chart_generator_manifest_flow.py2 KBtest/test_chart_generator_markdown_replace.py4 KBtest/test_chart_layout_config.py9 KBtest/test_chart_modules.py6 KBtest/test_chart_renderer_dot.py7 KBtest/test_chart_renderer_report.py3 KBtest/test_charts_e2e_pipeline.py4 KBtest/test_charts_er_dot_builder.py14 KBtest/test_charts_manifest_builder.py10 KBtest/test_charts_markdown_update.py12 KBtest/test_charts_plantuml_fallback.py6 KBtest/test_charts_render_dispatch.py7 KBtest/test_charts_schema.py4 KBtest/test_charts_single_entity_er_dot_builder.py12 KBtest/test_charts_source_writer.py35 KBtest/test_content_requirements.py4 KBtest/test_document_exporter_preflight.py4 KBtest/test_document_exporter_table.py2 KBtest/test_document_exporter_toc.py2 KBtest/test_image_manifest_builder.py4 KBtest/test_lifecycle_workspace_check.py5 KBtest/test_logger_replacements.py2 KBtest/test_merge_drafts_references.py4 KBtest/test_reduce_workflow_chapter_strategy.py10 KBtest/test_reduce_workflow_unique_output.py2 KBtest/test_reference_engine_verification_states.py2 KBtest/test_reference_merger.py6 KBtest/test_reference_validator.py4 KBtest/test_terminal_encoding.py3 KBtest/test_verified_reference_pool.py1 KBtest/test_workflow_p0_repairs.py7 KBworkflows/reference_workflow.md8 KBworkflows/step_0_init.md5 KBworkflows/step_3_outline.md2 KBworkflows/step_4_writing.md19 KBworkflows/step_6_review_polish.md12 KBworkflows/step_7_merge_detect.md4 KBworkflows/step_8_image.md13 KBworkflows/step_9_export.md4 KBコマンドを確認中 · 確認が通るとコピーボタンが出ます
+Create skillUpload a skillpick thesis-creator.zip
SettingsCapabilitiesCode execution and file creation
Turn on Code execution and file creation first (newer menus: Create and edit files) · personal plans: Settings → Capabilities · Team/Enterprise: an admin turns it on under Organization settings → Plugins & skills · every plan, including Free
Upload once; it works in claude.ai and Claude Desktop, and in recent Claude Code signed in with a Claude account (not with an API key)
Cowork and cloud sessions use the skills turned on in your claude.ai account, not ~/.claude/skills on your computer (Claude Desktop scheduled tasks run locally and still load it)
Checked against official docs 2026年11月12日 · Source: support.claude.com, support.claude.com, code.claude.com
この文をコピーして Claude Code のチャットに貼り付けます
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
Claude Code を開き直し、/thesis-creator と入力するか関連する作業を頼むと Claude が自動で使います
Checked against official docs 2026年11月12日 · Source: code.claude.com
Skill は AI が従う指示です。入れる前にファイルを読み、信頼できる提供元のものだけを入れてください。
Mac:Command+スペースで Terminal と入力 · Windows:下のコマンドは PowerShell では動きません。上の「AI にインストールしてもらう」を使ってください
repo を一時フォルダにダウンロードし、SKILL.md のあるフォルダだけをコピーします
コマンドを確認中 · 確認が通るとコピーボタンが出ます
ChatGPT デスクトップアプリには Codex が組み込まれていて、Codex は ~/.agents/skills フォルダから Skill を読み込みます
ChatGPT デスクトップアプリで Codex を開き、この文をチャットに貼り付けます
The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
thesis-creator フォルダを ~/.agents/skills/thesis-creator に置きます
~ はホームフォルダ($HOME)です
Skill は AI が従う指示です。入れる前にファイルを読み、信頼できる提供元のものだけを入れてください。
Mac:Command+スペースで Terminal と入力 · Windows:下のコマンドは PowerShell では動きません。上の「AI にインストールしてもらう」を使ってください
repo を一時フォルダにダウンロードし、SKILL.md のあるフォルダだけをコピーします
コマンドを確認中 · 確認が通るとコピーボタンが出ます
Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com
自分でインストールした Skill は使えません。ディレクトリのプラグインに含まれる Skill だけが使えます
この Skill を ChatGPT で使うには、上の方法で ChatGPT デスクトップアプリを使ってください
Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com
この文をコピーして Codex のチャットに貼り付けます · ChatGPT デスクトップアプリ内の Codex、Codex CLI、IDE 拡張機能で使えます
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
Codex は新しくインストールした Skill を自動で見つけます。表示されない場合は Codex を再起動してください · 使い方:ChatGPT では @ を入力して Skill を選びます · Codex CLI や IDE 拡張機能では /skills を実行するか、$ に続けて Skill 名を入力します
Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com
Skill は AI が従う指示です。入れる前にファイルを読み、信頼できる提供元のものだけを入れてください。
Mac:Command+スペースで Terminal と入力 · Windows:下のコマンドは PowerShell では動きません。上の「AI にインストールしてもらう」を使ってください
repo を一時フォルダにダウンロードし、SKILL.md のあるフォルダだけをコピーします
コマンドを確認中 · 確認が通るとコピーボタンが出ます
この文をコピーして Cursor のチャットに貼り付けます
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
Cursor の Agent チャットで / を入力し thesis-creator を選ぶ
Checked against official docs 2026年11月12日 · Source: cursor.com
Skill は AI が従う指示です。入れる前にファイルを読み、信頼できる提供元のものだけを入れてください。
Mac:Command+スペースで Terminal と入力 · Windows:下のコマンドは PowerShell では動きません。上の「AI にインストールしてもらう」を使ってください
repo を一時フォルダにダウンロードし、SKILL.md のあるフォルダだけをコピーします
コマンドを確認中 · 確認が通るとコピーボタンが出ます
Skill を読めるほかのアプリ向けです。この文には Claude Code、Codex、Cursor のパスが入っていて、AI が使っているアプリに合わせて選びます · Copy this sentence into the app’s chat
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
Checked against official docs 2026年11月12日 · Source: code.claude.com, learn.chatgpt.com, cursor.com
Gemini CLI や GitHub Copilot など Agent Skills 対応の他のアプリはフォルダが違います。そのアプリのガイドを見て、SKILL.md のあるフォルダをコピーしてください。
2026年11月11日 に Claude Code、Codex、Cursor の公式ガイドで skill フォルダを確認
以下は提供元の repo の文章で、PopNx MCP の指示ではありません
最初の 8,000 文字を表示 · GitHub で全文を開く
---
name: thesis-creator
description: 面向中国本科生的毕业论文全流程写作辅助系统。支持从选题到交稿的端到端工作流,包含降重优化、AIGC 降低和本地检测功能。用户说「帮我写论文」或「帮我降重」等时触发。
---
# 论文创作 Agent 系统
面向中国本科生的**毕业论文全流程写作辅助系统**。
---
## 核心原则
> [!IMPORTANT]
> **工作区隔离原则**:AI 始终在用户项目目录下的 `thesis-workspace/` 工作。所有产出文件都在用户工作区内。
---
## 触发条件
| 触发语 | 执行动作 |
|--------|----------|
| 「帮我写论文,主题是…」 | 全流程(Step 0-9) |
| 「帮我降重这段文字:…」 | 仅 Step 5 |
| 「降低这段的 AIGC 率:…」 | 仅 Step 6:必须输出“处理前计划 → 改写文本 → 清单自检”,并按场景化重写、自然承接、轻冗余控制和高密度句拆解处理,不得只给改写结果 |
| 「检测这段文字的 AIGC 率」 | AIGC 检测 |
| 「帮我生成论文大纲」 | Step 0-3 |
| 「初始化工作区」 | Step 0(工作区不存在直接初始化) |
| 「继续」 | 仅在当前步骤的强制交互点、前置校验和质量门禁均已满足后继续流程 |
| 「生成摘要」 | Step 4(仅摘要部分) |
| 「生成图片」「生成图表」 | Step 8 |
| 「导出 Word」「导出文档」 | Step 9 |
| 「一键导出」 | Step 8+9 |
---
## 工作流程概览
```mermaid
flowchart LR
A[Step 0: 初始化] --> B[Step 1-2: 准备]
B --> C[Step 3: 大纲]
C --> D[Step 3→4: 文献搜索与建池]
D --> E[Step 4: 撰写]
E --> F[Step 5-6: 降重]
F --> G[Step 7: 合并检测]
G --> H[Step 8: 图片生成]
H --> I[Step 9: 导出Word]
```
> **⚠️ 流程顺序**:大纲确认 → 文献搜索与建池 → 正文写作 → 合并 → 图片生成 → 导出 Word
> 状态文件路径:`thesis-workspace/.thesis-status.json`
> 若文件不存在,`status_manager.py` 会自动创建。
>
> **推荐统一入口**:`scripts/core/lifecycle.py`(整合日志 + 状态管理)
---
## 继续与暂停点规则
> [!IMPORTANT]
> **「继续」不是跳过按钮。** 若当前流程仍存在强制交互点、前置校验或质量门禁未完成,则必须先完成对应动作,再允许进入下一步。
### 不可跳过的暂停点
1. **Step 0 初始化后**:必须先运行 `python scripts/core/lifecycle.py --workspace thesis-workspace/ --check-workspace`,并检查 `thesis-workspace/references/prompt/background.md` 是否已补全;工作区必须通过脚本初始化并从 `config/.thesis-config.yaml` 复制生成 `thesis-workspace/.thesis-config.yaml`,同时生成 `thesis-workspace/.thesis-status.json`、`thesis-workspace/logs/`、`thesis-workspace/scripts/charts/render.py`、`thesis-workspace/workspace/final/images/sources` 与 `thesis-workspace/workspace/references/images.yaml`;未完成时只能提示用户编辑,禁止直接推进到 Step 1/3。
2. **Step 3 大纲确认后**:必须先询问用户文献数量(20-30 / 30-50 / 15-20),并展示搜索耗时预估后,进入 Step 3→4 之间的“文献搜索与建池”阶段;该阶段不是独立 Step,但后续在 Step 4/6/7 中如发现文献不足、语种比例失衡或文献失效,必须允许回流补池后再继续写作或检测。
3. **Step 4 每章写作时**:必须先完成 Stage 1 要点规划,待用户确认后才能进入 Stage 2 扩写;如果当前仍停留在 Stage 1,用户回复「继续」只能视为确认本章要点,不能跳过更早的未完成门禁。
4. **Step 7 合并检测后**:若同一 `ref_id` 在终稿中重复出现,必须硬阻断并回退修正,禁止带重复引用进入 AIGC 检测;若 AIGC 检测未通过,必须回退到 Step 5/6 继续改写与审校,禁止进入 Step 8 图片生成或 Step 9 导出。
5. **Step 8 图片生成前**:必须按“抽取图片需求 → 准备源码文件 → 大模型填写 `.dot/.mmd/.puml` → 渲染 PNG → 回填 `[image_N]` → 完整性验证”执行;使用 `scripts/charts/manifest_builder.py`、`source_writer.py`、`render.py`、`markdown_updater.py`、`validate.py`,最终已渲染 AI 图片不得残留 `[image_N]`。
---
## 详细步骤(按需加载)
| 步骤 | 说明 | 详细文档 |
|------|------|----------|
| Step 0 | 工作区初始化 | `workflows/step_0_init.md` |
| Step 3 | 生成论文大纲 | `workflows/step_3_outline.md` |
| Step 4 | 分章节撰写 | `workflows/step_4_writing.md` |
| Step 6 | 审校润色 | `workflows/step_6_review_polish.md` |
| Step 7 | 合并与检测 | `workflows/step_7_merge_detect.md` |
| Step 8 | 图片生成与渲染(ER图默认读取 `background.md`,优先输出教科书风格 DOT,信息不足时尽量生成并 warning) | `workflows/step_8_image.md` |
| Step 9 | 文档导出 | `workflows/step_9_export.md` |
| 参考文献 | 文献池管理 | `workflows/reference_workflow.md` |
---
## 参考文献(独立存放)
> **核心改进**:文献池独立存放在 `workspace/references/verified_references.yaml`
> **文献校验状态**:`verified_doi / verified_metadata_only / broken_doi_metadata_ok / missing_doi_unverified / invalid_reference`
> **规则说明**:无 DOI 不等于假文献;允许通过元数据验证的真实文献继续进入文献池。
### 图片需求清单
- 正文图片占位符统一使用 `[image_1]`、`[image_2]` 等格式
- 图片需求清单统一记录到 `workspace/references/images.yaml`
- `workspace/references/images.yaml` 必须采用结构化字段,至少包含 `id`、`title`、`chapter`、`section`、`source`、`diagram_type`、`engine`、`purpose`、`fact_source`、`placement`、`status`、`description`、`source_file`、`output_file`、`render_status`;可选 `prompt_hint` 用于指导大模型生成源码,`dot_mode` 可用于单图覆盖 ER 的 DOT 子模式
- Step 4 只负责记录 `[image_N]` 与 `image-requirement` 图片需求块,Step 8 再生成 `images.yaml`、准备源码文件、由大模型填写 `.dot/.mmd/.puml`、渲染 PNG 并回填 Markdown 图片引用
- 架构图、模块图、流程图、ER 图等 AI 图片必须先有 manifest 记录;用户提供图片必须在清单中标明 `source=user` 和待补状态
- 图表引擎按图类型明确映射,不自由摇摆:**流程图/活动图/用例图/时序图/类图 → PlantUML (`.puml`);ER 图由 `.thesis-config.yaml` 的 `er_modeling.graph_type` 决定,默认 Graphviz DOT (`.dot`) 教科书 Chen 风格,`erd` 时输出 Mermaid `erDiagram`;`diagram_type=overall_er` 必须第一个展示,且仅展示实体、联系与 `1:1` / `1:N` 基数,关系菱形节点必须结合外键字段或实体语义命名,如“拥有”“包含”,不得统一写成“关联”,且不展示字段;`diagram_type=entity_er` 可通过 `.thesis-config.yaml` 的 `er_modeling.dot_mode=textbook-single-entity-ring` 或 `images.yaml` 单图 `dot_mode` 启用单实体字段环绕 DOT,优先级为单图覆盖全局;架构图 → 用户自行生成/GPT image 后补入 (`source=user`);模块图 → Mermaid (`.mmd`);用户截图 → `user`**
- **仅当流程图使用 PlantUML 生成时**,必须附加固定提示词模板,并将其中主题替换为当前图表标题或用途描述:
```text
请生成一个用于毕业论文的PlantUML流程图,主题为“{{图表主题}}”。要求:
- 使用activity diagram
- 所有节点使用中文
- 起止节点使用“开始”“结束”
- 逻辑严谨,体现完整业务流或上下文流转机制
- 包含必要循环(如存在用户持续操作、重试或追问)
- 避免语法歧义(防止被解析为class diagram)
- 图结构简洁,不超过3层嵌套
- 判断分支连线必须明确标注 Y/N
- 全图只保留一个最终结束节点,所有分支和普通路径最终汇入该结束节点
- 适合论文插图展示
只输出PlantUML代码。
```
- 不再默认使用 Mermaid 流程图;普通流程图同样优先走 PlantUML。
- **生成测试图或单独响应“生成流程图”类指令时,默认行为是将源码写入 `thesis-workspace/workspace/final/images/sources/` 对应 `.puml/.dot/.mmd` 文件,而不是在控制台直接输出完整图表源码;仅在用户明确要求“只输出代码”时,才直接返回源码文本。**
### 流程
1. **Step 3 大纲确认后询问文献数量**(默认 20-30 篇)
2. **多源搜索**:Semantic Scholar + CrossRef + OpenAlex
3. **DOI 验证**:判断 4xx 错误状态码
4. **合并去重**:多源结果合并,按相关度选出最相关 x 篇(`scripts/references/reference_merger.py`)
5. **写作时从文献池选取未占用引用**
6. **文献搜索与建池阶段可回流复用**:在 Step 4/6/7 任一阶段,如果当前章节缺少可用未占用文献、文献验证失败、语种比例不达标或引用密度不足,必须回到该阶段补充搜索,并增量更新 `workspace/references/verified_references.yaml`
7. **单篇文献整篇仅允许引用一次**:一旦某个 `ref_id` 被正文使用一次,就必须标记为已占用,后续章节不得重复使用;Step 7 发现重复 `ref_id` 必须硬阻断
8. **中文文献质量不足时提示人工补充**:若自动源无法满足中文文献占比 >65%,必须提示用户从 CNKI、万方、学校图书馆等外部高质量来源人工补充真实中文文献,禁止伪造
9. **文献 YAML 输出必须安全可解析**:标题含英文冒号、中文冒号、括号等特殊字符时,仍必须能被 `yaml.safe_load()` 读取
详见 `workflows/reference_workflow.md`
---
## 用户工作区目录结构
```
thesis-workspace/
├── README.md # 工作区使用说明
├── .thesis-config.yaml # 配置文件
├── references/ # 参考资料(用户放入)
│ ├── templates/ # 学校模板
│ ├── examples/ # 范文
│ ├── guidelines/ # 规范
│ └── prompt/background.md # 论文背景(必填)
├── workspace/ # 论文产出
│ ├── outline.md # 大纲
│ ├── references/ # 参考文献池(独立)⭐
│ │ ├── verified_references.yaml # 已验证文献池
│ ├── cited_references.json # 引用记录(每章引用的ref_id)⭐
│ ├── drafts/ # 初稿(仅含临时引用编号,无参考文献列表)⭐
│ │ ├── 参考文献.md # 合并阶段生成的参考文献(独立MD文件,GB/T 7714格式)⭐
│ ├── final/ # 终稿
│ │ ├── 论文终稿.md # 终稿(引用编号已重排)
│ │ ├── 论文终稿.docx
│ │ └── images/ # 图片
│ └── reports/ # 报告
├── logs/ # 日志
└── .thesis-status.json # 状态
```
> ⭐ 标记为本次更新新增或变更的文件
---
## Markdown 标题输出硬约束(Markdown→Word 映射)
> [!IMPORTANT]
> **生成的 Markdown 必须能被 Pandoc / python-docx / markdown-it / Typora / VSCode Markdown 正确识别,并映射为 Word Heading 1~4,支持自动目录、导航窗格、标题折叠和大纲视图。**
### 标题生成规则
| Markdown 语法 | Word 映射 | 说明 |
|--------------|-----------|------|
| `# 标题名称` | Heading 1 | 章级标题(摘要、第N章、结论等) |
| `## 标题名称` | Heading 2 | 节级标题(1.1、4.2 等) |
| `### 标题名称` | Heading 3 | 小节级标题(1.2.1、4.4.1 等) |
| `#### 标题名称` | Heading 4 | 段级标题(5.2.1 等) |
**格式硬约束**:标题符号 `#` 后必须保留一个空格。正确:`## 研究背景`;错误:`##研究背景`。
### 禁止行为(标题模拟禁令)
以下方式视为**格式错误**,禁止用于模拟标题层级:
| 禁止方式 | 说明 |
|---------|------|
| **加粗文本** | `**第一章 绪论**` 不是标题 |
| **序号+普通段落** | `1.1 研究背景` 无 `##` 不是标题 |
| **列表项** | `- 第一章 绪论` 不是标题 |
| **表格标题** | 表格内文字不是标题 |
| **单纯放大字体** | HTML `<font size>` 不是标题 |
| **中文符号模拟层级** | `===系统设计===` 不是标题 |
| **HTML 标签** | `<h1>` 等不是标题 |
### 层级约束
标题必须满足严格层级结构,禁止跨级跳跃:
```
正确:# → ## → ### → ####
错误:# → ###(跳过 ##)
```
### 论文结构标题示例
```markdown
# 摘要
# Abstract
# 第一章 绪论
## 1.1 研究背景
## 1.2 国内外研究现状
# 第二章 系统分析
# 第三章 系统设计
# 第四章 系统实现
# 第五章 测试与分析
# 结论
# 参考文献
```
### 输出约束
1. 输出必须是**纯 Markdown 正文**
2. 禁止用 ````markdown```` 代码块包裹正文内容
3. 不要输出解释性文字(如"以下是论文内容")
4. 不要输出提示语
### 兼容性要求
生成结果必须兼容 `Markdown → docx` 转换流程,确保通过 `pypandoc.convert_file()` 或 `python-docx` 转换后能自动生成 Word 目录。
### 最终目标
导出的 docx 文档必须满足:
- Word「引用 → 目录」可自动生成目录
- Word「导航窗格」可显示章节树
- 标题可折叠
- 标题具备大纲级别
- Heading 1~4 自动识别
---
## 防错机制
| 问题 | 影响 | 处理 |
|------|------|------|
| 缺少规定动作章节 | 致命 | 自动补充 |
| 设计实现未分离 | 質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。