Skip to content

Latest commit

 

History

History
162 lines (112 loc) · 5.2 KB

File metadata and controls

162 lines (112 loc) · 5.2 KB

Copaper — Paper Assistant for CS

English | 中文

Full documentation: https://pku-asal.github.io/CoPaper-OpenCode/

English Quick Guide

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.

Before You Use CoPaper

Tool Scope

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.

Academic Integrity

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.

Step-by-Step Generation

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.

Human Verification

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.

Who It Is For

  • 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.md workflows

Core Capabilities

  • copaper CLI: initialize projects, inspect status, update phases, query logs, generate reports, and manage related work
  • OpenCode plugin: provides /copaper, /copaper-doctor, /copaper-relatedwork, and copaper_* 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.json and .agents/events.jsonl

Quick Install

Install the Python CLI:

pip install -e .[dev]

Verify:

copaper --help
python -m copaper --help

Install the published OpenCode plugin:

bunx -p @copaper/opencode copaper-opencode init

Use 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

Minimal Workflow

# 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 10

In OpenCode, start with /copaper to inspect the Dashboard, then route work to the appropriate subagent or skill.

Recommended Writing Path

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.

Documentation

Full documentation is available on GitHub Pages:

https://pku-asal.github.io/CoPaper-OpenCode/

Repository documentation:

Development and Testing

Python tests:

.venv/bin/pytest

OpenCode plugin tests:

cd packages/opencode-plugin
bun run typecheck
bun test
bun run build

Preview docs locally:

pip install -r docs/requirements.txt
mkdocs serve

License

MIT