Paper Engineering Assistant
1. Skill Description
This skill automates a structured academic writing workflow based on a three-layer architecture:
Framework Layer,
Summary Layer, and
Body Layer. It maintains data consistency across all layers through automatic synchronization mechanisms. The skill operates within a user-designated project directory (default:
./PaperProject/).
2. When to Use
Use this skill when the user needs systematic assistance with academic writing, especially for long-form documents like theses or dissertations.
- - User says: "Start working on my thesis."
- User says: "Read and structure all literature in the
references folder." - User says: "Generate a preliminary framework based on my research proposal."
- User says: "I've modified Section 2.1, please sync the framework and summaries."
- User says: "Find and download recent literature about 'performance management'."
3. Core Concepts & Workflow
This skill strictly follows the three-layer architecture:
A. Core Three-Layer Structure
- 1. Framework Layer (
structs.json): The blueprint/map of the entire paper. A JSON array describing the hierarchical structure of chapters, sections, and paragraphs with IDs, titles, abstracts, keywords, and key points. - Summary Layer (
summaries.json): The content database. Provides detailed summaries for each framework node and records related node IDs for content traceability. - Body Layer (
./document_body/ directory): The actual written content. A directory and Markdown file collection that exactly mirrors the framework layer structure, with each file corresponding to a writing unit.
B. Workflow Stages
Stage 1: Literature Review & Processing
- 1. Initialization: Create necessary subdirectories in the project directory (e.g.,
./document_body/, ./processed_references/). - Process References:
- Iterate through each reference in the
references directory.
- Create a dedicated folder for each reference (named after the reference) and initialize an
information.md file with metadata (title, author, abstract, keywords, download link).
- If the reference file (e.g., PDF) is available, parse it using the same three-layer architecture, generating corresponding
structs.json,
summaries.json, and body files stored within that reference's folder. This creates a "knowledge base" for each reference.
- If the original text cannot be downloaded, only save the
information.md.
- 3. Read Other Materials: Review non-reference materials like research proposals, institutional guidelines, etc., to understand requirements and existing foundations.
Stage 2: Document Writing
- 1. Generate Framework Layer: Create the initial
structs.json based on the research topic, proposal, and processed references. If an exemplary reference paper exists, its structure can be emulated. - Generate Summary Layer: Write detailed summaries for each framework node, forming
summaries.json. - Write Body Layer: Based on the framework structure and summary content, write detailed content for each part in the
./document_body/ directory, following the format Chapter_X/Section_X.X_Title.md. If a section becomes too long, split it into multiple files (e.g., Section_X.X_Title_trunc_1.md).
Stage 3: Assembly & Synchronization
- 1. Assemble Final Document: Run a concatenation script that reads all Markdown files in
./document_body/ and merges them in the order defined by the framework layer into a complete thesis_final.md file. This is a programmatic process, not reliant on AI. - Critical: Synchronization Mechanism:
-
Top-down Modification: When the user or AI modifies the
Framework Layer (structs.json) or
Summary Layer (summaries.json), the corresponding
Body Layer files must be rewritten or updated.
-
Bottom-up Modification: When the user or AI modifies a
Body Layer file, extract its core information to update the corresponding
Summary Layer entry and
Framework Layer abstract.
- This synchronization is crucial for maintaining logical consistency and preventing fragmentation, and must be executed after each modification.
4. How to Use (Operating Steps)
When the user triggers the skill, I will work according to the following logic:
- 1. Confirm Working Directory: I will first establish the project root directory. If not specified, I will use the default
./PaperProject/ in the current working directory. All generated files will be placed within this directory or its subdirectories. - Execute the Requested Task:
-
If the request is "start" or "process references":
a. Check the directory structure and list all items in the
references folder.
b. Execute the "Literature Review & Processing" workflow for each item.
c. Generate a
literature_review_report.md summarizing key findings and interconnections.
-
If the request is "generate framework":
a. Comprehensively analyze the research proposal, core insights from processed references, and institutional guidelines.
b. Generate or update
structs.json (Framework Layer) in the project root.
-
If the request is "write body":
a. Read
structs.json and
summaries.json.
b. Create corresponding folders and files in the
./document_body/ directory and begin writing content. Existing files in this directory may be overwritten.
c. While writing each section, query
summaries.json and the associated reference knowledge bases.
-
If the request is "sync modification":
a. The user indicates which file was modified (e.g.,
./document_body/Chapter_3/3.1_Current_Analysis.md).
b. I first read the modified file content, extract a new abstract and key points.
c. Update the
section_summary for the corresponding
section_id in
summaries.json.
d. Update the
abstract and
key_points for the corresponding
section_id in
structs.json.
-
If the request is "find literature":
a. Perform a network search based on the user-provided keywords.
b. Attempt to download PDFs to the
references directory.
c. Create a folder and
information.md for each, regardless of download success. If downloaded successfully, proceed with structured parsing.
- 3. Output & Confirmation: After each operation, I will clearly state which files were generated, their paths, and briefly describe their content.
5. Edge Cases
- - Directory Doesn't Exist: If the project directory doesn't exist, I will ask the user if they want to create it.
- References Folder Empty: If the
references folder is empty, I will notify the user and ask if they want to proceed directly to framework design or start a network search for literature. - Research Proposal Missing: If no research proposal is found, I will generate a very basic initial framework based on the paper title and general academic structure, noting that it will require significant revision.
- Sync Conflict: If major, irreconcilable discrepancies are detected between the Framework, Summary, and Body layers for the same section, I will list the conflicts and pause automatic synchronization, requesting manual user judgment and instruction.
纸工程助手
1. 技能描述
该技能基于三层架构自动化结构化学术写作工作流程:
框架层、
摘要层和
正文层。通过自动同步机制保持所有层级的数据一致性。该技能在用户指定的项目目录(默认:./PaperProject/)内运行。
2. 使用时机
当用户需要系统性的学术写作辅助时使用此技能,尤其适用于论文或学位论文等长篇文档。
- - 用户说:开始写我的论文。
- 用户说:读取并结构化references文件夹中的所有文献。
- 用户说:基于我的研究计划生成初步框架。
- 用户说:我修改了第2.1节,请同步框架和摘要。
- 用户说:查找并下载关于绩效管理的最新文献。
3. 核心概念与工作流程
该技能严格遵循三层架构:
A. 核心三层结构
- 1. 框架层(structs.json):整篇论文的蓝图/地图。一个JSON数组,描述章节、节和段落的层级结构,包含ID、标题、摘要、关键词和关键点。
- 摘要层(summaries.json):内容数据库。为每个框架节点提供详细摘要,并记录相关节点ID以实现内容可追溯性。
- 正文层(./document_body/目录):实际撰写的内容。一个与框架层结构完全镜像的目录和Markdown文件集合,每个文件对应一个写作单元。
B. 工作流程阶段
阶段1:文献综述与处理
- 1. 初始化:在项目目录中创建必要的子目录(例如./documentbody/、./processedreferences/)。
- 处理参考文献:
- 遍历references目录中的每个参考文献。
- 为每个参考文献创建一个专用文件夹(以参考文献命名),并初始化一个包含元数据(标题、作者、摘要、关键词、下载链接)的information.md文件。
- 如果参考文献文件(如PDF)可用,使用相同的三层架构进行解析,生成相应的structs.json、summaries.json和正文文件,存储在该参考文献的文件夹内。这为每个参考文献创建了一个知识库。
- 如果无法下载原文,仅保存information.md。
- 3. 阅读其他材料:审阅非参考文献材料,如研究计划、机构指南等,以了解要求和现有基础。
阶段2:文档撰写
- 1. 生成框架层:基于研究主题、计划和处理过的参考文献创建初始structs.json。如果存在可参考的示例论文,可以模仿其结构。
- 生成摘要层:为每个框架节点撰写详细摘要,形成summaries.json。
- 撰写正文层:基于框架结构和摘要内容,在./documentbody/目录中为每个部分撰写详细内容,遵循ChapterX/SectionX.XTitle.md格式。如果某个节过长,将其拆分为多个文件(例如SectionX.XTitletrunc1.md)。
阶段3:组装与同步
- 1. 组装最终文档:运行拼接脚本,读取./documentbody/中的所有Markdown文件,按照框架层定义的顺序合并成一个完整的thesisfinal.md文件。这是一个程序化过程,不依赖AI。
- 关键:同步机制:
-
自上而下修改:当用户或AI修改
框架层(structs.json)或
摘要层(summaries.json)时,必须重写或更新相应的
正文层文件。
-
自下而上修改:当用户或AI修改
正文层文件时,提取其核心信息以更新相应的
摘要层条目和
框架层摘要。
- 这种同步对于保持逻辑一致性和防止碎片化至关重要,必须在每次修改后执行。
4. 使用方法(操作步骤)
当用户触发该技能时,我将按照以下逻辑工作:
- 1. 确认工作目录:我将首先建立项目根目录。如果未指定,我将使用当前工作目录中的默认./PaperProject/。所有生成的文件将放置在此目录或其子目录中。
- 执行请求的任务:
-
如果请求是开始或处理参考文献:
a. 检查目录结构并列出references文件夹中的所有项目。
b. 对每个项目执行文献综述与处理工作流程。
c. 生成一个literature
reviewreport.md,总结关键发现和相互联系。
-
如果请求是生成框架:
a. 全面分析研究计划、处理过的参考文献的核心见解以及机构指南。
b. 在项目根目录生成或更新structs.json(框架层)。
-
如果请求是撰写正文:
a. 读取structs.json和summaries.json。
b. 在./document_body/目录中创建相应的文件夹和文件,并开始撰写内容。此目录中的现有文件可能会被覆盖。
c. 在撰写每个节时,查询summaries.json和相关的参考文献知识库。
-
如果请求是同步修改:
a. 用户指明哪个文件被修改(例如./document
body/Chapter3/3.1
CurrentAnalysis.md)。
b. 我首先读取修改后的文件内容,提取新的摘要和关键点。
c. 更新summaries.json中对应section
id的sectionsummary。
d. 更新structs.json中对应section
id的abstract和keypoints。
-
如果请求是查找文献:
a. 根据用户提供的关键词进行网络搜索。
b. 尝试将PDF下载到references目录。
c. 无论下载是否成功,为每个文献创建一个文件夹和information.md。如果下载成功,继续进行结构化解析。
- 3. 输出与确认:每次操作后,我将明确说明生成了哪些文件、它们的路径,并简要描述其内容。
5. 边界情况
- - 目录不存在:如果项目目录不存在,我将询问用户是否要创建它。
- 参考文献文件夹为空:如果references文件夹为空,我将通知用户,并询问是直接进行框架设计,还是开始网络搜索文献。
- 缺少研究计划:如果未找到研究计划,我将基于论文标题和通用学术结构生成一个非常基础的初始框架,并注明需要大量修改。
- 同步冲突:如果检测到同一节的框架层、摘要层和正文层之间存在重大且不可调和的不一致,我将列出冲突并暂停自动同步,请求用户手动判断和指示。