Skip to content

sangyu/lanting

Repository files navigation

Lanting

兰亭 (Lanting) — there is no original, only the truest copy.

After the Lantingji Xu, Wang Xizhi's 353 CE preface to a gathering of scholars composing poetry by a winding stream. The original no longer exists; every version we know is a copy. This project is built on the same premise: there is no ground truth manuscript, only the most faithful version we can produce together.


An agentic manuscript-writing loop for drafting, critique, collation, and revision.

How it works

Each loop iteration runs one section through four judges: scientific integrity, article-type fit, adversarial review, and rhetorical hierarchy. Scores feed the next revision. The loop stops when scores stabilize or a hard trigger fires for human review.

Setup

Phase 1 target: software application note (e.g. Briefings in Bioinformatics Application Note).

  1. Fill in paper/project_config.json with your software name, protected claim, forbidden phrases, and sections. See paper/profiles/software_application_note/required_fields.json for what is required.
  2. Fill in Claude/spec.md with the paper spec, novelty threats, and figure plan.
  3. Add 3+ target-paper PDFs to paper/style_ref/. (Style corpus extraction is a Phase 2 addition — in Phase 1, populate paper/rubrics/style_metrics.json manually from the target journal guidelines.)
  4. Fill in paper/groundtruth/ground_truth_examples.md with annotated good/bad examples as the paper develops.

Usage

# First draft of a section
python run_loop.py --section introduction --loops 3

# Check scores
python run_loop.py --status

# Resume after human review
python run_loop.py --resume

# Overnight run over all sections
bash run_overnight.sh

# Verify references against CrossRef + Semantic Scholar
python run_loop.py --verify-refs

Phase roadmap

  • Phase 1 (current): Software application note profile. JSON state, direct API calls, four judges, human-review triggers.
  • Phase 2: LangGraph checkpointing, style corpus extraction, metrics database. methods_paper profile.
  • Phase 3: Scheduled overnight runs, morning brief. Additional profiles.

Dependencies

pip install -r requirements-paper.txt

Requires ANTHROPIC_API_KEY in .env.

About

An agentic manuscript-writing loop for drafting, critique, collation, and revision: there is no original, only the truest copy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors