cmos dev abb75888c5 Expand exemplar corpus to 14 across 8 CMOS 18 source types
Add 11 new exemplars pulled verbatim from the CMOS official quick guide
(chicagomanualofstyle.org/tools_citationguide/citation-guide-1.html):

- book_two_authors_binder: Binder & Kidder (two-author book)
- book_chapter_doyle: Doyle in Marks & Parkin (chapter in edited volume,
  no page range per CMOS 18)
- book_translated_liu: Liu Xinwu, trans. Tiang (translated book, non-
  Western name not comma-inverted)
- book_edition_borel: Borel, 2nd ed. via EBSCOhost (edition + database)
- book_ebook_roy: Roy, Kindle format
- journal_many_authors_snyder: 7 authors in PLOS ONE, exercises the
  CMOS 18 "first 3 + et al." threshold and article-ID page format
- magazine_mead: New Yorker (tests leading-"The" drop)
- newspaper_blum: NYT with URL (tests abbreviation expansion)
- social_media_cmos_facebook: Facebook post with case preservation
- podcast_ober: Pushkin podcast with season/episode/duration
- video_cowan_ted: TED Talk with venue and duration

Every exemplar is marked canary=true — we want byte-exact regression
detection on all of them. Source citations and CMOS rule justifications
are in the TOML doc comments.

All 14 canonical outputs lint clean under LINTER_VERSION v0.2.0. The
harness will score them in the following commit.
2026-04-10 21:48:59 -04:00

cmos — Chicago Manual of Style 18 bibliography reformatter

A Python tool that reformats the bibliography section of an English-language markdown draft to CMOS 18th edition, notes-and-bibliography form.

Accuracy-first, iterative, built with a karpathy/autoresearch-style dev loop.

See program.md for the goal specification and /home/claudecode1/.claude/plans/pure-mixing-yao.md for the implementation plan.

Quick start

uv sync
uv run pytest
uv run cmos format path/to/draft.md > out.md

Layout

  • src/cmos/formatter.py — the iterable artifact (edited every loop iteration).
  • src/cmos/parser.py — extracts the bibliography section from a draft.
  • src/cmos/linter.py — deterministic CMOS 18 rule checks (versioned).
  • src/cmos/cli.pycmos format entry point.
  • harness/score.py, harness/diff.py — frozen scoring.
  • exemplars/ — TOML test corpus.
  • tests/ — pytest suite (linter, parser, formatter, cli).
  • rough_drafts/ — user-supplied messy drafts for ad-hoc iteration.
  • logs/ — per-run scores, model ids, linter version hashes.
S
Description
No description provided
Readme
209 KiB
Languages
Python 100%