# How the WRITE Stage of the ARS Pipeline Functions: Inside the 12-Agent Paper Authoring System

> Explore the WRITE stage of the ARS pipeline. Discover how 12 specialized agents transform research concepts into polished academic manuscripts in a coordinated workflow.

- Repository: [Edward Cheng-I Wu/academic-research-skills](https://github.com/Imbad0202/academic-research-skills)
- Tags: deep-dive
- Published: 2026-05-13

---

**The WRITE stage (Stage 2) of the Academic Research Skills (ARS) pipeline orchestrates 12+ specialized agents to transform research concepts into complete, style-calibrated academic manuscripts through a tightly coordinated, multi-phase workflow.**

The WRITE stage serves as the core paper-authoring engine within the [Imbad0202/academic-research-skills](https://github.com/Imbad0202/academic-research-skills) repository. When triggered by the `academic-pipeline` orchestrator, this stage executes the `academic-paper` skill to manage everything from literature intake and structural outlining to draft generation and final formatting.

## What Triggers the WRITE Stage in the ARS Pipeline

The WRITE stage activates when the `academic-pipeline` orchestrator detects a user intent to "write a paper," typically invoked via the `/ars-plan` command followed by a write request. According to [`academic-pipeline/SKILL.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-pipeline/SKILL.md), the orchestrator dispatches the **`academic-paper`** skill in either **plan** or **full** mode, depending on whether the user requires only an outline or a complete manuscript.

This stage operates as a **decision-heavy checkpoint**: the pipeline pauses after generating the section outline to await user approval before the `draft_writer_agent` begins composing the actual text. Machine checks—including anti-leakage protocols, VLM figure verification, and style-calibration—run automatically in the background but do not block progress without explicit user intervention.

## The 12 Agents That Power the WRITE Stage

The WRITE stage relies on a coordinated team of agents defined in [`docs/ARCHITECTURE.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/docs/ARCHITECTURE.md), each specialized for a specific authoring task. These agents execute sequentially and in parallel across four distinct phases.

### Configuration and Literature Phase

**`intake_agent`** gathers the **Paper Configuration Record** immediately upon stage entry, capturing target journal specifications, word-count caps, citation style requirements, and formatting preferences.

**`literature_strategist_agent`** (denoted as `📚 literature_strategist_agent` in the architecture) processes any user-provided **Literature Corpus** during Phase 1, identifying research gaps and extracting relevant sources to inform the argument structure.

### Structure and Argument Design

**`structure_architect_agent`** generates a detailed **section outline** during Phase 2, allocating specific word-count budgets to each section to ensure the final manuscript meets journal constraints.

**`argument_builder_agent`** constructs the **Argument Blueprint** in Phase 3, establishing the thesis statement and mapping claim-evidence-reasoning (CER) chains that guide the draft writer's logical flow.

### Core Drafting Phase

**`draft_writer_agent`** serves as the heart of the WRITE stage during **Phase 4**, composing the manuscript section-by-section while strictly enforcing the outline's word-count allocations and incorporating citation markers.

**`visualization_agent`** operates on-demand during Phase 4, generating **figures and captions** based on data supplied in the Material Passport when the `draft_writer_agent` encounters visual content requirements.

### Quality Assurance and Finalization

**`citation_compliance_agent`** verifies that every in-text citation adheres to the selected citation style (e.g., APA 7) and inserts hidden reference-code markers immediately after the draft is produced.

**`abstract_bilingual_agent`** produces a **bilingual abstract** (English and Chinese) after the main text completion, ensuring it respects the target journal's word-count limits for abstracts.

**`peer_reviewer_agent`** performs a **self-review** of the draft during Phase 4a/b loops, checking for quality compliance and style adherence while generating revision instructions for optional improvement cycles.

**`formatter_agent`** applies final formatting during the exit phase, converting markdown to PDF or DOCX while performing a hard gate check to ensure no unresolved citation markers remain in the output.

### Advisory and Revision Support

**`socratic_mentor_agent`** runs continuously as an advisory observer, offering **interactive guidance** (such as explaining specific paragraphs) when users request clarification during the writing process.

**`revision_coach_agent`** translates reviewer comments into actionable edit items for the `draft_writer_agent` when users opt for revision loops, effectively bridging Stage 4 (REVISE) with the core WRITE flow.

## The WRITE Stage Execution Flow: From Configuration to Final Manuscript

The orchestrator documented in [`academic-pipeline/agents/pipeline_orchestrator_agent.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-pipeline/agents/pipeline_orchestrator_agent.md) manages the WRITE stage through a six-step pipeline that registers a **"WRITE" state-tracker entry** for downstream stages to reference.

1. **Collect configuration and literature**: The `intake_agent` captures journal requirements while the `literature_strategist_agent` processes the corpus.
2. **Architect the paper structure**: The `structure_architect_agent` produces the outline and word-count allocation.
3. **Map the argument**: The `argument_builder_agent` creates the CER chains and thesis blueprint.
4. **Generate the manuscript**: The `draft_writer_agent` composes the draft section-by-section, leveraging the `visualization_agent` for figures and tracking word counts against the outline limits.
5. **Execute self-review and formatting**: The `peer_reviewer_agent` quality-checks the draft, followed by the `formatter_agent` applying style-calibrated output formats.
6. **Output the final manuscript**: The stage emits a complete, citation-compliant document ready for the Stage 2.5 integrity gate and subsequent peer review.

## Code Example: Triggering the WRITE Stage via CLI

You can exercise the WRITE stage through the ARS CLI or interactive chat interface. The following commands demonstrate the complete flow from initiation to final export:

```bash

# Start the ARS pipeline and trigger the WRITE stage

/ars-plan
"Write a research paper on AI-assisted education assessment"

# Approve the outline to proceed to drafting

"Proceed with the outline I propose"

# Direct the draft_writer_agent to compose specific sections

"Write the Introduction section (≈ 500 words)"

# Generate bilingual abstract after main text completion

"Generate a bilingual abstract (English + Traditional Chinese)"

# Run the peer_reviewer_agent quality check

"Run the writing quality check"

# Apply suggested revisions (optional loop)

"Apply the first three revision items"

# Export the final manuscript via the formatter_agent

/export paper.pdf

```

The same workflow executes via command-line aliases (e.g., `ars-write --topic "..."`), with the `academic-pipeline` orchestrator invoking the exact agent sequence defined in the architecture documentation.

## Key Source Files and Agent Implementations

The WRITE stage implementation spans multiple directories within the repository:

- **[`docs/ARCHITECTURE.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/docs/ARCHITECTURE.md)**: Defines the complete stage-by-stage matrix, including the WRITE row listing all 12+ agents and decision checkpoints.
- **[`academic-pipeline/SKILL.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-pipeline/SKILL.md)**: Specifies the Stage 2 dispatch contract for `academic-paper` skill modes (plan vs. full).
- **[`academic-pipeline/agents/pipeline_orchestrator_agent.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-pipeline/agents/pipeline_orchestrator_agent.md)**: Orchestrates agent sequencing, state registration, and cite-time provenance finalization.
- **[`academic-paper/agents/draft_writer_agent.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-paper/agents/draft_writer_agent.md)**: Implements the core Phase 4 drafting logic with word-count enforcement and citation marker emission.
- **[`academic-paper/agents/structure_architect_agent.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-paper/agents/structure_architect_agent.md)**: Generates outlines consumed by the draft writer.
- **[`academic-paper/agents/argument_builder_agent.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-paper/agents/argument_builder_agent.md)**: Supplies CER chains for argumentation structure.
- **[`academic-paper/agents/citation_compliance_agent.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-paper/agents/citation_compliance_agent.md)**: Handles style verification and hidden marker insertion.
- **[`academic-paper/agents/abstract_bilingual_agent.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-paper/agents/abstract_bilingual_agent.md)**: Creates dual-language abstracts with journal-specific constraints.
- **[`academic-paper/agents/peer_reviewer_agent.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-paper/agents/peer_reviewer_agent.md)**: Performs automated self-review before formatting.
- **[`academic-paper/agents/formatter_agent.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-paper/agents/formatter_agent.md)**: Executes final format conversion and unresolved citation gate checks.
- **[`academic-paper/agents/revision_coach_agent.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-paper/agents/revision_coach_agent.md)**: Mediates between reviewer feedback and draft rewrites.
- **[`academic-paper/agents/visualization_agent.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-paper/agents/visualization_agent.md)**: Generates figures and captions from Material Passport data.
- **[`academic-paper/agents/socratic_mentor_agent.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-paper/agents/socratic_mentor_agent.md)**: Provides on-demand explanatory guidance.
- **[`shared/style_calibration_protocol.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/shared/style_calibration_protocol.md)**: Supplies voice-matching profiles for the `draft_writer_agent`.
- **[`shared/ground_truth_isolation_pattern.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/shared/ground_truth_isolation_pattern.md)**: Documents the partial-inversion discipline preventing front-matter leakage during citation emission.

## Summary

- The **WRITE stage (Stage 2)** is the core authoring phase of the ARS pipeline, triggered by the `academic-pipeline` orchestrator when users request paper generation.
- **12+ specialized agents** execute across four phases: configuration (`intake_agent`, `literature_strategist_agent`), structure (`structure_architect_agent`), argumentation (`argument_builder_agent`), and drafting/quality assurance (`draft_writer_agent`, `peer_reviewer_agent`, `formatter_agent`).
- The **`draft_writer_agent`** serves as the heart of the stage during Phase 4, composing section-by-section while the `visualization_agent` handles figure generation.
- **Decision checkpoints** require user approval of the outline before drafting begins, while automated machine checks run non-blocking verification protocols.
- The stage outputs a **style-calibrated, citation-compliant manuscript** ready for the Stage 2.5 integrity gate and subsequent review cycles.

## Frequently Asked Questions

### What is the difference between plan mode and full mode in the WRITE stage?

According to [`academic-pipeline/SKILL.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-pipeline/SKILL.md), **plan mode** generates only the section outline and argument blueprint for user review, while **full mode** executes the complete WRITE workflow including Phase 4 drafting, citation compliance checks, and final formatter output. The orchestrator selects the mode based on whether the user requests an outline preview or immediate full manuscript generation.

### Which agent is responsible for generating the actual manuscript draft?

The **`draft_writer_agent`** defined in [`academic-paper/agents/draft_writer_agent.md`](https://github.com/Imbad0202/academic-research-skills/blob/main/academic-paper/agents/draft_writer_agent.md) handles the core manuscript composition during Phase 4. It writes content section-by-section, strictly adhering to the word-count allocations set by the `structure_architect_agent` and incorporating argument blueprints from the `argument_builder_agent` while emitting citation markers for the `citation_compliance_agent` to verify.

### How does the ARS pipeline ensure citation compliance during the WRITE stage?

The **`citation_compliance_agent`** verifies that all in-text citations follow the configured style guide (such as APA 7) and inserts hidden reference-code markers immediately after the `draft_writer_agent` produces the draft. Subsequently, the **`formatter_agent`** performs a hard gate check to ensure no unresolved citation markers remain before final PDF or DOCX generation, as documented in the respective agent files.

### Can the user intervene during the WRITE stage to modify the paper structure?

Yes. The WRITE stage operates as a **decision-heavy checkpoint** where the orchestrator pauses after the `structure_architect_agent` generates the outline, requiring explicit user approval before the `draft_writer_agent` begins composition. Users can modify the outline, adjust word-count allocations, or request structural changes at this checkpoint, and the `socratic_mentor_agent` remains available throughout the stage to provide interactive guidance on specific paragraphs or sections.