Global process collaboration constraints (long-conversation drift prevention)
- This skill must not be used as an isolated entry point. When the user requests a complete paper, Word generation, continuation of the process, or the stage is uncertain, first return to
paper-workflow-orchestratorto determine the current S0-S8 stage. - Before starting or continuing a formal task of this skill, you must run:
python .claude/skills/paper-workflow-orchestrator/scripts/workflow_guard.py --skill paper-micro-unit-generator - If the output is
[WORKFLOW FAIL]or the reportstatus != "PASS", stop this skill and backfill the prerequisite stages according to the failed items inpaper_output/qa/workflow_guard_report.json; do not continue from memory. - This skill only writes the
paper_output/artifacts within its own contract scope; after completion, you must return topaper-workflow-orchestratorto determine the next step, and usecontext-memory-keeperto record completed artifacts, blockers, and the next step. - In a long conversation, if the context grows long, the stage is uncertain, or the user invokes skills separately, first run:
Then readpython .claude/skills/paper-workflow-orchestrator/scripts/workflow_guard.py --statuspaper_output/qa/workflow_guard_report.json、paper_output/preflight_report.json、paper_output/input_manifest.json、paper_output/results/run_manifest.jsonand this skill's upstream JSON contract, and continue according to therecommended_skillandnext_actionin the report. - Before continuing the process, you must treat
paper_output/context/workflow_memory.jsonas a long-term breakpoint record; if itscurrent_step、next_step、recommended_skillandworkflow_guard.py --statusare inconsistent, the guard report shall prevail. - After completing this skill's artifacts each time, first return to
paper-workflow-orchestratoror runworkflow_guard.py --status, then update workflow memory:
After updating, readpython .claude/skills/context-memory-keeper/scripts/update_workflow_memory.pypaper_output/context/workflow_memory.json/.mdto confirm that the next step and recommended skill have been recorded.
Execution contract
- Upstream input: must read
paper_output/tasks.json; may refer topaper_output/plan/model_route.json、rubric_alignment.json、data_plan.json、visualization_plan.json、paper_output/figure_index.json、paper_output/results/andpaper_output/tables/table_index.json。 - Can output:
paper_output/micro_units/*.txt、paper_output/generate_log.json、paper_output/final_paper.md、paper_output/ref_check.mdandpaper_output/final_paper.docx。 - Downstream handoff: the merged
final_paper.mdandfinal_paper.docxare verification drafts or local writing material; the formal paper must be globally rewritten or rewritten by the Agent after reading the complete evidence chain, andquality-assurance-auditor。 - must be invoked again. Recommended next step: after merging is complete, enter
quality-assurance-auditorfor the final consistency check; for a complete paper goal, return topaper-workflow-orchestratorto summarize artifacts. - Failure fallback: if
tasks.jsonis missing, first runquality-assurance-auditor; if the chart or result contract has not yet been generated, the main text can only generate a generic draft, and indicate in the QA warning orref_check.mdthat the real results are pending.
Goal
- Retain and organize high-quality long-form prompt assets in CUMCM style, including chapter breakdown, paragraph/sentence-level writing templates, scoring point coverage, and cross-reference requirements.
- Together with
scripts/generate_all_offline.pyandscripts/merge.py, it can automatically complete: micro-unit generation → merging → numbering and cross-reference checking, generating a quickstart verification draft or a fallback draft for low-capability models. - The formal paper should not mechanically concatenate micro-units. The Agent should treat this skill as a prompt asset library, structure assistant, and source for local rewriting, and perform global writing after the evidence gate is passed.
- The formal paper main writing,
1 / 1.1 / 1.1.1paradigm constraints,18000-25000word count gate, and formal Word formatting are handled bypaper-formal-writer; this skill no longer undertakes the responsibilities of formal paper main writing or formal Word formatting. scripts/generate_all_offline.pyis an offline template generator: it can readtasks.json、step3_filled_placeholder.pyand result evidence, fill the current competition problem information into the draft. It must output natural paper paragraphs, should not write micro-unit numbers into the main text, and should not replace the official lead writer.
When to use
- When the user has explicitly adopted the CUMCM-style fine-grained decomposition template and wants to split a large paper into many small fragments, generating them step by step and merging them automatically.
- There is already problem alignment and a model route (for example from
problem-doc-model-selector), and data computation and placeholder filling have been completed; the next step is the scenario of systematically "finishing writing all the text".
Script list (actually used by this skill)
scripts/generate_all_offline.py- When to use: already have
paper_output/tasks.json, and need to produce micro-unit text files in batches. - What it does: generate
paper_output/micro_units/*.txtandpaper_output/generate_log.json; each file is a draft of formal main-text paragraphs, without【章节 | 编号】and similar process labels.
- When to use: already have
scripts/merge.py- When to use: when micro-units have been generated (or partially generated) and need to be merged into a readable paper draft.
- What it does: clean up historical micro-unit process labels, merge by chapter, and generate
paper_output/final_paper.md、paper_output/final_paper.docxandpaper_output/ref_check.md。
Input
- Required:
- Task list:
paper_output/tasks.json(generated byquality-assurance-auditor/scripts/pipeline.py).
- Task list:
- Optional:
- Placeholder dictionary:
step3_filled_placeholder.pyinPLACEHOLDER, used to write the problem, model names, and result values into the main text. - Problem alignment results and model route:
paper_output/step1/problem_analysis.json、paper_output/plan/model_route.json、paper_output/plan/rubric_alignment.json, used to guide the writing focus and cross-references of each micro-unit. - Data and figure evidence chain:
paper_output/plan/data_plan.json、visualization_plan.json、paper_output/figure_index.json, used to remind that figures, data sources, and output paths in the main text must be traceable. - Result and table evidence chain: preferentially read through
tasks.json, these fields are usually written by QA fromresult_summary、key_metrics、tables、conclusions、evidence_statusandpaper_output/results/.paper_output/tables/table_index.jsonTo integrate large-model generation, generation logic can be extended on the basis of this skill script. - If you want to connect to large model generation, you can extend the generation logic based on this skill script.
- Placeholder dictionary:
Output
- Unit-level output:
paper_output/micro_units/*.txt: each micro-unit corresponds to a text file, and the file name contains the number (such asABS-1.txt)。paper_output/generate_log.json: records the generation length and output path of each unit.
- Document-level output:
paper_output/final_paper.md: the complete paper draft merged in the order of the task list.paper_output/ref_check.md: cross-reference and numbering check report.
Directory conventions (aligned with the project globally)
- Competition problem and attachments:
problem_files/(QA checks whether it is empty). - This skill only reads
paper_output/tasks.json, and writes topaper_output/。
Before and after linkage
- Prerequisite:
quality-assurance-auditor(first generatepaper_output/tasks.json)。 - Follow-up: if it is only a quickstart or fallback draft, you can return to
quality-assurance-auditorto do a consistency check; if it is to be a formal competition paper, you must enterpaper-formal-writer。 - If you want to continue to the complete paper workflow: return to
paper-workflow-orchestrator。
Constraints (must be followed)
- Memory Interaction (required):
- Before starting generation: it is recommended to read
context-memory-keeperto obtain the latest global constraints and style requirements;Pay special attentioncheckExternal Resources / Literature, to ensure that the cited references are consistent with the records in memory. - After merging is complete: you must call
context-memory-keeper, update the project progress to "paper draft generated", and record the path offinal_paper.md.
- Before starting generation: it is recommended to read
- Before running, the following must be satisfied:
paper_output/tasks.jsonalready exists and is readable; otherwise you must first callquality-assurance-auditor。 - If
tasks.jsonalready containsmain_model、model_reason、validation_plan、figure_suggestions、planned_figures、rubric_points、result_summary、key_metrics、tables、conclusionsand other fields, the main text generation must prioritize compliance with these model routes, scoring evidence, and result evidence, and must not improvise beyond the contract. - Micro-unit numbers are only used for file names, logs, and local reruns, and must not be written into the final draft as main text headings; the final draft retains only chapter headings and natural paragraphs.
- The 200+ micro-unit prompts in the original Appendix A are the core prompt assets of this project and must be retained. During formal writing, these prompts may be referenced as needed, but they must not be mechanically concatenated paragraph by paragraph into low-quality main text.
- The offline draft should be as close as possible to
tasks.jsonthetarget_wordsin , avoiding generating only one task-style short sentence per micro-unit. - The merged output uses
paper_output/final_paper.mdas the sole authoritative merged draft; do not create another "final_paper.md" in the root directory or other directories, to avoid reference confusion. - If the user's goal is "complete paper production", after this skill is completed you must confirm that
paper_output/final_paper.mdandpaper_output/ref_check.mdexist simultaneously; ifref_check.mdreports a broken link, it is considered incomplete, and the merge must be rerun after fixing.
Workflow
1. Prepare micro-unit templates and placeholders
- Read from the CUMCM micro-unit prompts in "Appendix A: Extended Materials" of this file:
- Overall paper decomposition plan: the micro-unit number, role, input placeholders, target word count, acceptance criteria, and cross-reference requirements corresponding to each chapter/section/paragraph/sentence.
- Pay special attention to the abstract, problem restatement, model establishment and solution, result analysis, and model validation, which carry high scoring weight, and ensure that the templates and acceptance requirements for these micro-units are stricter.
- Fill key information such as the problem, model, algorithm, and numerical results into the placeholder dictionary for uniform replacement during generation.
2. Unit-level generation strategy
- Generation logic:
- In micro-unit number order (such as
ABS-1-1、ABS-1-2、BG-1-1, etc.), call the large model in sequence, passing in:- The role setting, input placeholders, target word count, and acceptance criteria of the corresponding row.
- Relevant problem-alignment and model-route information (for example, which part of Problem 1/Problem 2/Problem 3 the sentence belongs to, and whether the core model, algorithm, or metric keywords of the problem need to be mentioned).
- After the model outputs, immediately perform local validation:
- Whether the word count is within the required range (for example, 15–20 words).
- Whether it contains the specified keywords or symbols (such as problem background words, core model names, key metric units, etc.).
- Whether it meets grammar and style requirements (such as passive voice, academic expression, citation format).
- In micro-unit number order (such as
- Units that pass validation are written to
paper_output/micro_units/, and units that fail record the failure reason for retry.
3. Batch generation script coordination
scripts/generate_all_offline.py:- Read
paper_output/tasks.json, generate offline text micro-unit by micro-unit, and write topaper_output/micro_units/*.txt。 - Each micro-unit should generate a natural paragraph that can go directly into the paper, developed around task type, main model, validation plan, figure suggestions, and result evidence, without outputting task number labels.
- Read
- When this skill is invoked, it guides how to configure and call these scripts, and explains the meaning of each parameter and its impact on the final paper style/length.
4. Merging and automatic numbering
- Use
scripts/merge.py:- in the order of
paper_output/tasks.jsonto read and merge the micro-unit files. - Automatically clean up any process tags such as
【摘要 | ABS-1】that may remain from historical generation. - Merge into a single Markdown text, and execute:
- Automatically generate the table of contents and chapter numbering (e.g., "1 Problem Background", "2 Problem Statement").
- Unified numbering of figures/tables/formulas/references (e.g., "Figure 1", "Table 2", "Equation (3)", and "[4]").
- Cross-reference replacement and checking: parse text such as "see Figure Y in Chapter X" and "see Equation (3)" and ensure the corresponding targets exist.
- [New] Directly generate Word (docx):
- The script internally integrates the
python-docxlibrary, and writes directly to the.docxfile while merging. - Does not depend on Pandoc, and can be generated without installing additional software.
- Note: Mathematical formulas will be retained in Word as LaTeX source code (e.g.,
$E=mc^2$), and users need to render them using MathType or Word's built-in tools.
- The script internally integrates the
- in the order of
- If broken links or duplicate numbering are found,
ref_check.mdwill provide the specific locations and suggested correction methods.
5. Acceptance and adjustment
- For the generated
final_paper.md, this skill recommends:- First quickly check chapter by chapter: whether every question has been fully answered, and whether there are paragraphs that "only write the method without giving results" or "only give results without verification".
- Compare against
C_评分点对齐表.md: check that each scoring point appears at least once in the paper with corresponding text and figures/tables. - If some parts are found to have clearly insufficient word count or inconsistent style, you can return to the corresponding micro-unit template, relax or adjust the word count and acceptance conditions, and then use
generate_all.pyto rerun locally.
Relationship with other skills
- With
problem-doc-model-selector:- The former solves the problem of "understanding the problem and choosing the modeling route"; this skill completes large-scale text generation based on these results.
- With chapter planning capabilities:
- Chapter planning is responsible for determining the paper outline and subsection logic; this skill further refines it to "sentence-level/paragraph-level micro-units", which is more suitable for scenarios requiring precise control of word count and scoring point coverage.
- With
paper-workflow-orchestrator:paper-workflow-orchestratorIt connects "problem analysis -> data calculation -> placeholders -> micro-units -> merging" from the perspective of the whole workflow; this skill focuses on the "micro-unit generation and merging" segment.
- With
paper-formal-writer:paper-formal-writeris responsible for the formal paper paradigm, formal outline,final_paper_source.mdwriting constraints, Word layout, and format gating; this skill only provides prompt assets, local expansion, and fallback drafts for low-capability models.
Anti-deviation check
- Do not skip filling the placeholder dictionary and start batch generation, otherwise the generated content will lack specific values or contain descriptions with inconsistent style.
- The acceptance conditions in the micro-unit template should be aligned with the scoring points as much as possible, to avoid "the micro-unit is written beautifully, but does not support the competition scoring indicators".
- If you only want to write a relatively short explanatory report rather than a long paper at the national competition level, you can reduce the number of micro-units, or adjust the granularity of the decomposition based on the prompts in Appendix A; this skill is still applicable.
When this skill need not be used
- When you only need to fill in a small number of paragraphs or revise an existing paper, you can generate locally on the corresponding paragraphs directly, and there is no need to use the full micro-unit system.
- When the task is a short English abstract or PPT text, etc., and the granularity does not need to be as fine as "sentence-level micro-units," this skill will appear too heavy.
Appendix A: Extended Materials (Optional)
The following content is used for the extended mode of "finer-grained micro-units/LLM-generated access"; the current offline script will not read it.
Step-by-step generation prompts for CUMCM papers (super detailed version)This file splits the paper into four levels: "chapter -> section -> paragraph -> sentence," with a total of 200+ micro-units, and each unit provides:
- Role setting
- Input placeholders
- Output word count/format
- Acceptance criteria
- Cross-reference requirements
It can be fed directly to an LLM for unit-by-unit generation, and finally merged automatically.
0. Pre-common variables
Please always use the following placeholders throughout the entire writing process, and replace them with real values when they first appear (needs to be defined in step3_filled_placeholder.py ):
- {{Paper Title}}
- {{Background Keywords}} (e.g.: photovoltaics, traffic flow, carbon emissions, medical resources)
- {{Core Indicators}} (e.g.: thickness, efficiency, cost, correlation coefficient)
- {{Problem One Model}} / {{Problem One Algorithm}} / {{Problem One Result}}
- {{Problem Two Model}} / {{Problem Two Algorithm}} / {{Problem Two Result}}
- {{Problem Three Model}} / {{Problem Three Algorithm}} / {{Problem Three Result}}
- {{Main Software}} = MATLAB / Python / SPSS / LINGO
- {{Data Attachment}} = description of the current competition problem attachment
1. Abstract (about 800 words, 6 paragraphs, 48 sentences)
| Micro-unit number | Sentence order | Role | Input placeholder | Output word count | Acceptance criteria | Cross-reference |
|---|---|---|---|---|---|---|
| ABS-1-1 | Sentence 1 | Background expert | {{Macro background}} | 15-20 | Include {{background keywords}} and the application field | None |
| ABS-1-2 | Sentence 2 | Background expert | {{Industry pain points}} | 15-20 | Cite data or the current situation to explain the urgency of the problem | None |
| ABS-1-3 | Sentence 3 | Background expert | {{Research value}} | 15-20 | Clarify the core advantages of the method in this paper (e.g., non-destructive, efficient, accurate) | None |
| ABS-2-1 | Sentence 4 | Model overview | {{Overview of the three problems}} | 20-25 | Passive voice, summarize the main tasks solved in the full text | None |
| ABS-3-1 | Sentence 5 | Problem One expert | {{Problem One Model}} | 20-25 | The core terms of the model appear (e.g., "planning," "regression," "differential equation") | See Chapter 1, Equation (1) |
| ABS-3-2 | Sentence 6 | Problem One expert | {{Problem One Algorithm}} | 20-25 | Specify the exact algorithm name (e.g., "genetic algorithm", "least squares") | See Figure 3 in Chapter 5 |
| ABS-3-3 | Sentence 7 | Problem 1 expert | {{Problem 1 results}} | 20-25 | Give the key numerical results + units | See Table 2 in Chapter 6 |
| ABS-4-1 | Sentence 8 | Problem 2 expert | {{Problem 2 model}} | 20-25 | Describe the improvement points of the advanced model | See Equation (3) in Chapter 1 |
| ABS-4-2 | Sentence 9 | Problem 2 expert | {{Problem 2 algorithm}} | 20-25 | Mention the solution strategy or optimization method | See Algorithm 2 in Chapter 5 |
| ABS-4-3 | Sentence 10 | Problem 2 expert | {{Problem 2 results}} | 20-25 | Give the improvement magnitude or specific values of the core indicators | See Table 3 in Chapter 6 |
| … | … | … | … | … | … | … |
| ABS-6-4 | Sentence 48 | Outlook expert | {{future work}} | 15-20 | Propose a specific extensible direction | None |
Generation method:
- Call the LLM sentence by sentence, replacing placeholders;
- Self-check each sentence: word count, keywords, passive voice;
- After 48 sentences are completed, automatically concatenate them into 1 paragraph, then manually polish.
2. Problem restatement (≈1500 words, 2 sections, 12 paragraphs, 96 sentences)
2.1 Problem background (≈400 words, 4 paragraphs, 32 sentences)
| Micro-unit | In-paragraph sentence | Role | Input | Word count | Acceptance | Citation |
|---|---|---|---|---|---|---|
| BG-1-1 | 1 | Macro narrative | {{macro policy/trend}} | 25-30 | Cite national policies, industry white papers, or statistical data | Government documents |
| BG-1-2 | 2 | Macro narrative | {{current status of the research object}} | 25-30 | Describe the market size, development trend, or social impact | Reference [1] |
| BG-1-3 | 3 | Macro narrative | {{limitations of existing methods}} | 25-30 | Compare the shortcomings of traditional methods (high cost/low efficiency/poor accuracy) | Reference [2] |
| … | … | … | … | … | … | … |
| BG-4-8 | 32 | Micro-level focus | {{specific task objective}} | 25-30 | Clarify the specific technical indicators or decision objectives required by the problem | Experimental data |
2.2 Problem statement (≈1100 words, 8 paragraphs, 64 sentences)
Subdivide further by "Problem 1/2/3", with 3 paragraphs per problem: (1) restate the original text → (2) academic rewriting → (3) computable task definition
Example:
| Micro-unit | Sentence | Role | Input | Word count | Acceptance | Citation |
|---|---|---|---|---|---|---|
| PR1-1 | 1 | Original text quotation | One sentence from original Problem Q1 | ≤30 | Double quotation marks + source in parentheses | Problem statement |
| PR1-2 | 2 | Academic rewriting | "Establish...model" → "Construct...quantitative framework" | 25-30 | Upgrade verbs, transform colloquial language into mathematical terminology | None |
| PR1-3 | 3 | Task definition | Input: {{input variable}}; Output: {{output variable}} | 20-25 | Clearly define I/O, use a symbol list | See symbol table |
…The same applies below, 96 sentences in total.
3. Problem Analysis (≈1000 words, 3 sections, 24 paragraphs, 192 sentences)
Each question has 8 paragraphs, each paragraph has 8 sentences, following the “funnel” logic: (1) essential determination → (2) data characteristics → (3) model motivation → (4) algorithmic rationale → (5) metric selection → (6) validation plan → (7) difficulty preview → (8) summary
Example (Question 1, Paragraph 1):
| Micro-unit | Sentence | Role | Input | Word count | Acceptance | Citation |
|---|---|---|---|---|---|---|
| AN1-1-1 | 1 | Essential determination | {{mathematical essence of Question 1}} | 20-25 | Determined as: optimization/prediction/classification/evaluation/mechanism | Reference [3] |
| AN1-1-2 | 2 | Essential determination | {{key theoretical basis}} | 20-25 | Mention the name of the core formula or theorem | Equation (1) |
| … | … | … | … | … | … | … |
| AN1-1-8 | 8 | Summary | “In summary, Q1 is a {{task type}} task” | 15-20 | Summarize the task type and connect the previous and following parts | None |
4. Model Assumptions (≈600 words, 6 items, 48 sentences)
Each assumption is split into 8 sentences: (1) necessity → (2) reasonableness → (3) simplification scope → (4) impact assessment → (5) data support → (6) counterexample exclusion → (7) literature support → (8) symbol convention
Example: Assumption 1 “{{Assumption 1 title}}”
| Micro-unit | Sentence | Role | Input | Word count | Acceptance | Citation |
|---|---|---|---|---|---|---|
| AS1-1 | 1 | Necessity | {{Assumption 1 content}} | 15-20 | Start with “To simplify…” or “Considering…” | None |
| AS1-2 | 2 | Reasonableness | {{basis for the reasonableness of Assumption 1}} | 15-20 | Provide support from data statistical characteristics or physical common sense | Attachment data |
| … | … | … | … | … | … | … |
| AS1-8 | 8 | Symbol | Represented by {{related symbol}} | ≤15 | Consistent with the definition in the symbol table | Symbol table |
5. Symbol Description (≈800 words, table + list, 2 sections, 16 paragraphs, 128 sentences)
5.1 Symbol Definition Table (automatically generated by script)
Each row = 1 sentence, N rows in total, each sentence format:
| Micro-unit | Sentence | Role | Input | Word count | Acceptance | Citation |
|---|---|---|---|---|---|---|
| SYM-i | 1 | Table row | Symbol, definition, unit | 20-30 | LaTeX format is correct, units are standardized | None |
5.2 Plain Text Comparison List (automatically generated by script)
Each sentence format: “Chinese characters --- symbol”
6. Model Establishment and Solution (≈3000 words, 3 sections, 72 paragraphs, 576 sentences)
Each question has 24 paragraphs, split according to the “general modeling template”:
6.1 Question 1 (basic model, 8 paragraphs, 192 sentences)
| Paragraph number | Paragraph topic | Number of sentences | Micro-unit example | Acceptance points |
|---|---|---|---|---|
| 1 | Mechanism/principle analysis | 24 | MD1-1-1~24 | Explain the logical or physical relationships among variables, and introduce {{core variables}} |
| 2 | Mathematical derivation/construction | 24 | MD1-2-1~24 | Establish equations, objective functions, or constraints, and derive the core formulas |
| 3 | Algorithm process/strategy | 24 | MD1-3-1~24 | Describe the solution steps and provide flowchart references |
| 4 | Core solution process | 24 | MD1-4-1~24 | Show key code logic or intermediate calculation results |
| 5 | Optimization/improvement/joint formulation | 24 | MD1-5-1~24 | Handle complex situations, multiple objectives, or parameter adjustments |
| 6 | Error/uncertainty | 24 | MD1-6-1~24 | Analyze error sources or parameter sensitivity |
| 7 | Results presentation | 24 | MD1-7-1~24 | Present final numerical values, tables, or classification results |
| 8 | Summary | 24 | MD1-8-1~24 | Respond to Question 1 and restate the core conclusion |
Each sentence 15-25 characters, 192 sentences in total.
6.2 Question 2 (advanced/complex model, 8 paragraphs, 192 sentences)
Same structure as above, with the focus on:
- The progressive relationship of the model (improvement based on Q1 or adaptation to a new scenario).
- More complex algorithms (such as heuristic algorithms, deep learning, nonlinear programming).
- More in-depth result comparison (comparison of effects before and after improvement).
6.3 Question 3 (comprehensive evaluation/extension/application, 8 paragraphs, 192 sentences)
The focus is on:
- Establishing an evaluation index system (objective/subjective weights).
- Multi-scheme comparison and ranking (TOPSIS/AHP/DEA, etc.).
- Robustness testing and sensitivity analysis of the model.
- Practical application suggestions or extension value.
7. Results analysis and visualization (≈1500 words, 3 sections, 24 paragraphs, 192 sentences)
8 paragraphs per question:
- Main result summary (one-sentence conclusion)
- Detailed numerical table presentation
- Error analysis/confidence interval (error bar chart)
- Scheme comparison/model comparison (bar chart/radar chart)
- Trends of change/pattern discovery (line chart/scatter plot)
- Statistical significance test (P value/R-squared)
- Business/physical meaning explanation
- Paragraph summary
8. Model validation (≈1200 words, 3 sections, 18 paragraphs, 144 sentences)
6 paragraphs per question:
- Validation purpose and method selection
- Dataset splitting (training/testing) or experimental design
- Cross-validation results / control group analysis
- Residual distribution / error normality test
- Extreme scenario testing / stress testing
- Validation conclusion (robustness/applicability)
9. Conclusions and recommendations (≈800 words, 3 sections, 12 paragraphs, 96 sentences)
4 paragraphs per question:
- Answer the original question directly (≤20 characters)
- Give specific numerical answers + confidence level/applicable scope
- Business/management recommendations based on the results
- Policy implications or social value
10. Limitations and prospects (≈600 words, 2 paragraphs, 48 sentences)
- 3 limitations (8 sentences each): self-criticism regarding strong model assumptions, data limitations, and algorithm complexity.
- 3 prospects (8 sentences each): directions for future data expansion, model extension, and algorithm optimization.
11. References (≈400 words, automatic script)
Generate 10-15 entries according to GB/T 7714-2015, with 20-30 characters per sentence.
12. Appendix (≈2000 words, code + charts)
12.1 Core Code (Python/MATLAB)
1 paragraph per function, 16 sentences per paragraph: function description → input parameters → output results → key logic → comments → example call → result screenshot → summary
12.2 Additional Charts
1 paragraph per chart, 8 sentences per paragraph: figure title → coordinate meaning → color description → legend explanation → chart-reading conclusion → comparison with other charts → main text citation → file path
Automation Script
Provide script:
- The current offline implementation uses
scripts/generate_all_offline.py; to connect to a real large model for unit-by-unit generation, you can extend newgenerate_micro_unit.py。
After running, you get:
{
"unit_id": "ABS-1-1",
"text": "本文针对{{行业/领域}}中的{{核心问题}},通过建立{{模型名称}},利用{{算法名称}},解决了{{具体难点}},对{{应用价值}}具有重要的指导意义。",
"pass": true,
"msg": ""
}
Merging Process
- Read all micro-unit JSON files in numerical order;
- Filter units with
pass=falseand give a rerun prompt; - Concatenate into a
.mdfile according to the "chapter-section-paragraph-sentence" hierarchy; - Automatic numbering: figures/tables/equations/references;
- Generate a cross-reference index, replacing "see Chapter X, Figure Y" with actual numbers;
- Output:
final_paper.md(complete paper)unit_log.json(verification log for each unit)ref_check.md(broken citation report)
Usage Steps
- First call
quality-assurance-auditor, generatingpaper_output/tasks.json; - If specific values and model names are needed, fill in
step3_filled_placeholder.py(optional); - Run
python .claude/skills/paper-micro-unit-generator/scripts/generate_all_offline.pyto generatepaper_output/micro_units/*.txt; - Run
python .claude/skills/paper-micro-unit-generator/scripts/merge.pyto generatepaper_output/final_paper.md; - Finally use
quality-assurance-auditorto conduct a consistency and scoring-point audit of the full text (optional but recommended).
Extension Notes
- Add micro-units: continue rows in the corresponding table to ensure consecutive numbering;
- Adjust word count: modify the "word count" column, and the script will automatically truncate or prompt for expansion;
- Switch language: replace the template Chinese with English to output an English paper;
- Insert charts: use
placeholders in the corresponding micro-unit templates, and the merge script will automatically number them.
This prompt splits out a total of ≈2000 micro-units, with a total word count of ≈15,000 Chinese characters, and can directly generate the length and depth of a national competition first prize complete paper.
Appendix B: Merge Script
Provide script:
scripts/merge.py