Responsible for the actual writing of each chapter of the paper. Must be invoked after brainstorming is complete and the project structure has been created.
If any condition is not met, the brainstorming-research skill must be invoked first.
- Introduction, Related Work, research background, literature review: must first invoke
evidence-driven-writing, and readrefs/evidence-map.mdorplan/evidence-map.md。 - Methodology, Methods, research methods: must be written according to the "input to output" technical flow, and must not merely list modules.
- Results, Discussion, experimental results: must first invoke
experiment-results-planning, to confirm real data or clearly marked mock/synthetic planning data.
No user request may directly enter the main text. Requests such as "write naturally", "do not speak in generalities", and "pay attention to transitions" can only be transformed into sentence, paragraph, structure, and evidence handling.
Checklist (must be completed for each chapter)
- Read plan/outline.md to confirm the goals and key points of this chapter
- If plan/chapter-architecture.md exists, confirm this chapter's file name, minimum main text length, and agent owner
- Check whether the preceding chapters are complete (in logical order)
- Confirm with the user the key arguments and content direction of this chapter
- Invoke the corresponding writing module according to the subject area
- For the introduction/related work, read the evidence-driven-writing output
- For the methods chapter, check the input-to-output flow
- Execute the main text contamination firewall check
- Write output to chapters/XX-name.md
- Stage 1: Standards compliance check
- Stage 2: Quality check (de-AI-ification, language fluency)
- Update plan/progress.md
- Present the writing results and ask the user to confirm or revise
- After the user confirms, ask whether to continue to the next chapter
Chapter Agent Contract
Full-paper drafts and redrafts must use a separate fresh agent for each major chapter. The controller prepares the task packet and review criteria; the chapter agent writes only its assigned file.
Each chapter agent must receive:
- the exact chapter file it owns;
- the chapter's role in the whole manuscript;
- required source files and evidence IDs;
- paragraph-level argument chain, not a list of section labels;
- minimum prose length from
plan/chapter-architecture.md; - prohibited wording and prohibited structure;
- instructions to report unresolved gaps instead of inventing evidence or results.
Each chapter agent must return:
- status: DONE, DONE_WITH_CONCERNS, NEEDS_CONTEXT, or BLOCKED;
- changed file path;
- short summary of argument chain;
- unresolved evidence/data gaps;
- self-review against the rejection checks.
The controller must record this in plan/chapter-agent-provenance.md. A chapter without provenance is not accepted for a full-paper redraft.
Two-stage Review mechanism
After each chapter is written, a two-stage check must be performed:
Stage 1: Standards compliance check
Check whether the basic requirements of the paper are met:
| Check item | Description |
|---|---|
| Word count | Whether the target word count is reached (±10% is acceptable) |
| Structure | Whether the chapter structure is complete and the sections are clear |
| Citation format | Whether the citation format is consistent (GB/T 7714 or APA) |
| Heading levels | Whether they comply with paper standards |
Check result: ✅ Pass / ❌ Needs revision
Stage 2: Quality check
Check writing quality:
| Check item | Description |
|---|---|
| De-AI-ification | No mechanical transition words, no empty emphatic sentences |
| Fluent language | No repetitive expressions, no redundancy |
| Academic expression | Use objective expressions such as "this paper" and "this study" |
| Paragraph structure | Prefer coherent paragraphs; do not pile up lists |
| Authentic citations | All citations are traceable and not fabricated |
Check result: ✅ Pass / ❌ Needs revision
Writing process
digraph writing_chapters {
"读取 outline.md" [shape=box];
"确认本章目标" [shape=box];
"用户确认方向?" [shape=diamond];
"调用学科写作模块" [shape=box];
"写作到 chapters/" [shape=box];
"去AI化检查" [shape=box];
"更新 progress.md" [shape=box];
"展示成果" [shape=box];
"用户确认?" [shape=diamond];
"继续下一章?" [shape=diamond];
"结束或继续" [shape=doublecircle];
"读取 outline.md" -> "确认本章目标";
"确认本章目标" -> "用户确认方向?";
"用户确认方向?" -> "调用学科写作模块" [label="确认"];
"用户确认方向?" -> "确认本章目标" [label="调整"];
"调用学科写作模块" -> "写作到 chapters/";
"写作到 chapters/" -> "去AI化检查";
"去AI化检查" -> "更新 progress.md";
"更新 progress.md" -> "展示成果";
"展示成果" -> "用户确认?";
"用户确认?" -> "写作到 chapters/" [label="修改"];
"用户确认?" -> "继续下一章?" [label="确认"];
"继续下一章?" -> "读取 outline.md" [label="是"];
"继续下一章?" -> "结束或继续" [label="否"];
}
Preparation before writing
1. Read project information
Read from plan/:
- project-overview.md: paper type, discipline, research background
- outline.md: chapter outline and key points
- progress.md: completed chapters
- notes.md: user preferences and special requirements
Reference structure templates: skills/brainstorming-research/templates.md Understand the standard structure of different paper types.
2. Confirm the current chapter
"According to the outline, the main content of this chapter "[chapter name]" is:
- [Key point 1]
- [Key point 2]
- [Key point 3]
Please confirm these key points, or tell me what needs to be adjusted:"
3. Invoke the discipline module
| Discipline field | Invoke module |
|---|---|
| Engineering, Science | writing-core |
| Humanities | writing-humanities |
| Social Sciences | writing-humanities (focus on data) |
| Medicine | writing-medical |
| Law | writing-law |
Writing conventions
De-AI writing
- Ban mechanical transition words: first, second, finally, in addition, moreover, in conclusion
- Ban empty emphatic sentences: it is worth noting that, it should be pointed out that, it is important that, obviously
- Ban subjective expressions: I think, I believe, my research (in the main text)
- Ban list stacking: the main text of the paper should prioritize coherent paragraphs and not use bullet points
- Objective tone: use objective expressions such as "this paper", "this study", "research shows"
Anti-enumeration writing
Each chapter must form a continuous argument, rather than laying out key points as short paragraphs. Main text paragraphs should satisfy one of the following patterns:
- Background paragraph: scenario constraints → research contradiction → this chapter's transition.
- Literature paragraph: the common problem solved by similar studies → representative evidence → boundaries not yet covered.
- Method paragraph: input object → processing procedure → output form → design rationale.
- Experiment paragraph: evaluation objective → comparison relationship → indicator meaning → acceptable conclusion boundary.
- Discussion paragraph: result meaning → engineering/academic interpretation → limitations and follow-up validation.
Do not write these patterns as lists. Each main text paragraph must contain causal, contrastive, transitional, or qualifying relationships. Except for references, bullet points must not appear in the main text by default; when contribution points need a list, there must be at most 3 items, and they must be explained by the preceding and following paragraphs.
Length and density
For a complete paper draft, main chapters such as Introduction, Methodology, Experimental Results and Analysis, and Discussion must not be written as abstract-level explanations only. If plan/chapter-architecture.md gives min_chars, that lower limit must be reached. If it cannot be reached, return NEEDS_CONTEXT or continue expanding; do not mark a short draft as complete.
Formatting conventions
- Leave one blank line between paragraphs
- Do not use bold in the main text(except for the first definition of a term)
- Do not use italics for emphasis
- Clear heading hierarchy
Citation conventions
- Never fabricate references
- Citations must be traceable: at least two of author, year, and source must be complete
- English references may be cited after retrieval
- For Chinese references, prioritize having the user provide the source
Chapter writing template
Confirmation before starting writing
"I will begin writing "[Chapter Name]".
Chapter Objectives: [read from outline] Estimated Word Count: [estimated based on paper type] Sections Included:
- [Section 1]
- [Section 2]
Please confirm or adjust before I begin writing:"
Presentation After Writing Is Complete
"The first draft of "[Chapter Name]" is complete.
Actual Word Count: [word count] Main Content: [brief summary]
Saved to: chapters/[file name].md
Please review the following content:
[Chapter content preview, may be the opening portion]
If changes are needed, tell me the specific location and revision comments; once confirmed, I will update the progress."
Update Progress
Record in progress.md:
## [日期] - [章节名]
- **状态**:已完成 / 待修改
- **字数**:[字数]
- **用户确认**:是 / 否
- **修改记录**:[如有]
Special Chapter Guidance
Abstract
- Leave until after the entire main text is complete before writing
- Chinese abstract 300-500 characters, with a corresponding English abstract
- Structure: background, purpose, methods, results, conclusion
- No citations, no figures or tables
Introduction
- Research background (macro to specific)
- Research problem (existing deficiencies)
- Research purpose and significance
- Overview of research content and methods
- A short paragraph on the paper's structure may be retained, but it must not be used to replace the argument for the research gap
- Computer/engineering SCI papers can usually integrate Related Work into the Introduction; do not mechanically split out an independent Related Work chapter unless the outline or template requires it
Literature Review
- Invoke the literature-review skill
- Classify by theme/time/method
- Must include critical analysis
- Must point out research gaps
Methods
The methods chapter must adopt an input-to-output flow, not a module checklist:
- Input objects: data form, samples, features, constraints.
- Preprocessing or representation: cleaning, encoding, splitting, normalization.
- Core model/algorithm: for each module, explain input, processing, output, and design rationale.
- Training or inference process: formulas, algorithms, parameter updates, or decision paths.
- Output: predictions, explanations, alerts, metrics, or downstream interfaces.
- Correspondence with experiments: each key module must be able to map to an ablation, comparison, or limitation statement.
It is prohibited to write only "composed of three layers" or "includes several modules" while lacking data flow, formula locations, and reproducible steps.
Results and Discussion
The results chapter must not retain procedural notes such as "experimental purpose, table placeholders, backfill templates, discussion prompts, please replace by user." Real results must be supported by data; mock data can only serve as planning data and must retain the [待真实实验替换] marker, and must not be written as verified conclusions.
Main Text Contamination Protection
The main text contamination firewall must check:
- User revision requests must not enter the main text.
- Procedural notes must not enter the main text or appendix.
- Compression does not mean deleting everything; core arguments, evidence, method conditions, and boundaries must be retained.
- Do not use tables to replace the argument paragraphs that should be present in a paper.
- Lists may be used only when the target journal permits it or the contribution points are particularly clear; the main text should by default be converted into coherent paragraphs.
Conclusion
- Summarize the research findings
- Respond to the research objectives
- Point out the innovations
- Propose future directions
Error handling
If plan/ does not exist
"It has been detected that the project structure has not been created. Brainstorming must be completed first before writing can begin.
Do you want to start brainstorming now?"
Call brainstorming-research.
If the prerequisite chapter is not completed
"It is recommended to complete "[prerequisite chapter]" before writing "[current chapter]", because:
- [reason]
Do you want to write the prerequisite chapter first, or skip it and continue?"
Record the user's choice in notes.md.
If the user asks to skip confirmation
"I understand you want to speed up progress. I will simplify the confirmation process, but you will still need to briefly confirm after each chapter is completed.
Now begin writing "[chapter name]"."
Key principles
- Write only one chapter at a time — start the next chapter only after completing and confirming the current one
- Each chapter must be confirmed — do not continue automatically
- Progress must be updated — update progress.md after each writing session
- Style must be consistent — follow the discipline module specifications
- Citations must be real — never fabricate