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
- 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
- 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.
- Read Other Materials: Review non-reference materials like research proposals, institutional guidelines, etc., to understand requirements and existing foundations.
Stage 2: Document Writing
- 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
- 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:
- 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.
- 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---2name: paper-engineering3description: Automated academic writing assistant based on a three-layer architecture: Framework Layer, Summary Layer, and Body Layer. Organizes all files in a structured project directory.4---56# Paper Engineering Assistant78## 1. Skill Description9This 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/`).1011## 2. When to Use12Use this skill when the user needs systematic assistance with academic writing, especially for long-form documents like theses or dissertations.13- User says: "Start working on my thesis."14- User says: "Read and structure all literature in the `references` folder."15- User says: "Generate a preliminary framework based on my research proposal."16- User says: "I've modified Section 2.1, please sync the framework and summaries."17- User says: "Find and download recent literature about 'performance management'."1819## 3. Core Concepts & Workflow20This skill strictly follows the three-layer architecture:2122### **A. Core Three-Layer Structure**231. **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.242. **Summary Layer (`summaries.json`)**: The content database. Provides detailed summaries for each framework node and records related node IDs for content traceability.253. **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.2627### **B. Workflow Stages**28**Stage 1: Literature Review & Processing**291. **Initialization**: Create necessary subdirectories in the project directory (e.g., `./document_body/`, `./processed_references/`).302. **Process References**:31 - Iterate through each reference in the `references` directory.32 - 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).33 - 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.34 - If the original text cannot be downloaded, only save the `information.md`.353. **Read Other Materials**: Review non-reference materials like research proposals, institutional guidelines, etc., to understand requirements and existing foundations.3637**Stage 2: Document Writing**381. **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.392. **Generate Summary Layer**: Write detailed summaries for each framework node, forming `summaries.json`.403. **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`).4142**Stage 3: Assembly & Synchronization**431. **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.442. **Critical: Synchronization Mechanism**:45 - **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.46 - **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.47 - This synchronization is crucial for maintaining logical consistency and preventing fragmentation, and must be executed after each modification.4849## 4. How to Use (Operating Steps)50When the user triggers the skill, I will work according to the following logic:51521. **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.532. **Execute the Requested Task**:54 - **If the request is "start" or "process references"**:55 a. Check the directory structure and list all items in the `references` folder.56 b. Execute the "Literature Review & Processing" workflow for each item.57 c. Generate a `literature_review_report.md` summarizing key findings and interconnections.58 - **If the request is "generate framework"**:59 a. Comprehensively analyze the research proposal, core insights from processed references, and institutional guidelines.60 b. Generate or update `structs.json` (Framework Layer) in the project root.61 - **If the request is "write body"**:62 a. Read `structs.json` and `summaries.json`.63 b. Create corresponding folders and files in the `./document_body/` directory and begin writing content. Existing files in this directory may be overwritten.64 c. While writing each section, query `summaries.json` and the associated reference knowledge bases.65 - **If the request is "sync modification"**:66 a. The user indicates which file was modified (e.g., `./document_body/Chapter_3/3.1_Current_Analysis.md`).67 b. I first read the modified file content, extract a new abstract and key points.68 c. Update the `section_summary` for the corresponding `section_id` in `summaries.json`.69 d. Update the `abstract` and `key_points` for the corresponding `section_id` in `structs.json`.70 - **If the request is "find literature"**:71 a. Perform a network search based on the user-provided keywords.72 b. Attempt to download PDFs to the `references` directory.73 c. Create a folder and `information.md` for each, regardless of download success. If downloaded successfully, proceed with structured parsing.743. **Output & Confirmation**: After each operation, I will clearly state which files were generated, their paths, and briefly describe their content.7576## 5. Edge Cases77- **Directory Doesn't Exist**: If the project directory doesn't exist, I will ask the user if they want to create it.78- **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.79- **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.80- **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.