English | 中文
Full documentation: https://pku-asal.github.io/CoPaper-OpenCode/
CoPaper is a paper-writing workflow tool for researchers. It does not generate a paper for you. Instead, it guides you through the process: research storyline, related work, paper.md, review, and final LaTeX drafting.
CoPaper is useful when your material already exists but is scattered across slides, PDFs, experiment notes, drafts, and conversations. It gives that material a structured workflow and a persistent state file.
This project distills the paper-writing workflow from Peking University's Operating Systems Lab.
CoPaper is an assistant, not a generator. It helps authors clarify their thinking and identify gaps in their writing, but it cannot produce papers or generate original research ideas. Whether the paper is sound, the experiments are credible, and the conclusions are valid is ultimately for the author to determine — every paragraph must be reviewed and owned by the author.
Experimental data, figures, metrics, case studies, and conclusions must come from real experiments or verifiable sources. Do not use CoPaper to plagiarize, fabricate data, invent citations, or overstate contributions.
Current models are not reliable for whole-paper generation. Work section by section, subsection by subsection, or paragraph by paragraph. Asking for too much at once increases the risk of missed constraints, context mixing, or uneven prose.
Content generated by CoPaper or a language model may contain hallucinations, inaccurate wording, or unverified inferences. Before submission or public use, manually verify facts, data, citations, experimental setup, conclusions, and originality.
- Researchers writing papers with OpenCode / Oh-My-OpenCode
- Anyone managing paper writing through phases such as storyline, literature, discussion, experiments, writing, and latex review
- Anyone who needs auditable records for phase status, artifact readiness, checker results, and related-work progress
- Researchers who have existing slides, a PDF draft, or a LaTeX draft and want to migrate them into structured
storyline.md/paper.mdworkflows
copaperCLI: initialize projects, inspect status, update phases, query logs, generate reports, and manage related work- OpenCode plugin: provides
/copaper,/copaper-doctor,/copaper-relatedwork, andcopaper_*tools - Subagents: separates coordinator, storyline, writer, reviewer, recorder, and literature roles
- Skills: covers storyline building, related work, Socratic discussion, experiment analysis, writing, review, and final LaTeX drafting
- State files: stores auditable workflow state in
.agents/state.jsonand.agents/events.jsonl
Install the Python CLI:
pip install -e .[dev]Verify:
copaper --help
python -m copaper --helpInstall the published OpenCode plugin:
bunx -p @copaper/opencode copaper-opencode initUse the local development version from this repository:
cd packages/opencode-plugin
bun install
bun run build
bun run dev:install <target-project>After installation, restart OpenCode and run these commands inside the target project:
/copaper-doctor
/copaper
# 1. Initialize a paper project
copaper --root <project-dir> init --name "My Paper" --domain "software engineering"
# 2. Inspect current status
copaper --root <project-dir> status
# 3. Enter a phase
copaper --root <project-dir> set-phase storyline --status in_progress
# 4. Mark a phase complete
copaper --root <project-dir> set-phase storyline --status complete
# 5. Query recent events
copaper --root <project-dir> log --last 10In OpenCode, start with /copaper to inspect the Dashboard, then route work to the appropriate subagent or skill.
Initialize project
-> Complete storyline.md
-> Find and organize related work
-> Run Socratic discussion
-> Prepare experiments or record a skip reason
-> Write paper.md section by section
-> Run checker / review-revise section by section
-> Run submission precheck
-> Generate the final LaTeX draft
Each phase can be re-entered. If a later step reveals an earlier gap, return to the corresponding phase and fix it.
Full documentation is available on GitHub Pages:
https://pku-asal.github.io/CoPaper-OpenCode/
Repository documentation:
- Chinese guide: docs/index.md
- English guide: docs/en.md
- Full reference manual: docs/full-manual.md
- OpenCode plugin docs: packages/opencode-plugin/README.md
- Architecture map: codemap.md
Python tests:
.venv/bin/pytestOpenCode plugin tests:
cd packages/opencode-plugin
bun run typecheck
bun test
bun run buildPreview docs locally:
pip install -r docs/requirements.txt
mkdocs serveMIT