Autonomously execute paper writing cycles. Specify the cycle limit as an argument (e.g., /write 3). Default: 5.
Draft research findings as an academic paper. The responsibility is to shape the knowledge accumulated through research (/run) into paper form.
AskUserQuestion is prohibited. Users are often away, and asking questions interrupts the session and wastes time. Text output is limited to the final report only. Work silentlyagenda.md and leave it to /run. Do not launch researcher or scout yourselfBash("sleep ...") is prohibited. Polling is prohibited. For waiting on agent completion, use only Pattern A / B/write {N} — Set the cycle limit to N (default: 5). Hereafter referred to as MAX_CYCLES.
| Term | Definition |
|---|---|
| Session | An entire /write execution |
| Cycle | One iteration of judgment → task execution → result collection |
| Task | A single agent invocation |
research/ # Read-only — research tree
note.md # Root: thesis, background
story.md # Paper narrative structure
principles.md # Constraints
{branch}/note.md # Verified knowledge (Source of Truth — what the node established)
{branch}/log.md # Research process (ladder — kind/status in frontmatter)
{branch}/report_*.md # PI-verified reports (self-contained analyses)
concepts/ # Read-only — concept definitions
agenda.md # Writable — destination for reporting research gaps
manuscript/
outline.md # Paper outline (generated by outliner)
conventions.md # Terminology and notation conventions
sections/{N}_{slug}.md # Per-section drafts (generated by writer)
drafts/v{N}.md # Integrated paper (generated by finalizer)
logs/
{timestamp}_review_{slug}.md # reviewer output
{timestamp}_audit.md # reference-auditor output
{timestamp}_write.md # Permanent session record
last_write_session.md # Session handoff (overwrite each session)
| Agent | Role |
|---|---|
| outliner | Design the overall paper structure from the narrative structure and research tree |
| writer | Draft a specified section as an academic paper |
| reviewer | Verify the logical consistency of a section |
| finalizer | Integrate all sections and produce the final version |
| reference-auditor | Verify the mechanical accuracy of references and citations |
logs/_DRAFT_write.md — a system hook auto-renames it with the correct timestamp on writelogs/last_write_session.md (if it exists)research/note.md (thesis, background) + research/story.md (narrative structure) + research/principles.mdls research/ → read children's note.md (SoT) for established knowledge, and log.md frontmatter for kind/statusconcepts/ for relevant concept definitions as neededmanuscript/outline.md (if it exists)manuscript/sections/*.md)Writing readiness check:
agenda.md, report to the user in the final report, and exitDecide the next action based on the current state:
Phase flow:
Phases are guidelines; judge flexibly. If a review reveals insufficient content, record the research gap in agenda.md, put that section on hold, and proceed with others.
Maximize parallelization. Always launch independent tasks together.
Launch method: Use the same Pattern A / Pattern B as /run.
Prompt template:
Each agent is defined in .claude/agents/{agent}.md and invoked with subagent_type="{name}". Write only task-specific information:
## Task
{specific instructions}
Dynamic data by agent:
Assigned section: #{N} {title} (slug: {slug}) / Related nodes: {paths} / Evidence: {paths} / For revisions: Review report: {path}Target section: manuscript/sections/{N}_{slug}.md / Related nodes: {paths}Audit report: {path} (if available)Target deliverable: {path}Retrieve deliverable paths from task return values and Read as needed:
agenda.md (which node is lacking what)logs/last_write_session.md (overwrite):
logs/{timestamp}_write.md (permanent record — never overwrite):
# Write YYYY-MM-DD HH:MM
## Accomplished
- {sections drafted, reviewed, finalized}
## Section Status
- {per-section status: not started / drafted / review PASS / FAIL}
## Issues
- {research gaps reported, blockers}
Use the timestamp captured at session start (step 1).agenda.md if anygit add -A && git commit -m "write: {concise summary of achievements}"