Mark Eaton 0238f5e5d7 iter 8: prompt rule 29 for CMOS 8.159 headline-case prepositions
Real-draft testing on the HML bibliography surfaced inconsistent
preposition capitalization in headline-style titles: the formatter
was sometimes lowercasing "among", "beyond", "within", "into", etc.
and sometimes capitalizing them, violating CMOS 8.159. The behavior
was nondeterministic across similar entries — smoking-gun evidence
of GPT-5 judgment drift on a rule the existing prompt only
implicitly covered via rule 6's "headline-style capitalization".

Rule 29 makes the carve-out explicit and instructs the model to
apply CMOS 8.159 independently of the source's casing, with:

- a substantial but illustrative preposition list including "as"
  (which CMOS 8.159 calls out as always lowercased)
- an explicit scope restriction to PREPOSITIONS, with subordinating
  conjunctions (If, That, Because, Although, Unless, etc.)
  capitalized
- a CMOS 8.161 carve-out for hyphenated compounds: the first
  element is always capitalized (so "In-School" stays, not
  "in-School")
- a first/last-word exception covering "last word of the main
  title immediately before a subtitle colon", which the model
  was treating as mid-title

Verified on the 134-entry HML draft: ~17 entries now produce more
CMOS-correct forms, and two consecutive re-runs show no new rule-
29-related regressions. Observed GPT-5 drift on orthogonal axes
(multi-author inversion, inner-quote style, periodical
italicization) washed out across re-runs, consistent with the
~5% single-run variance documented in project memory.

Rule count: 28 -> 29. No linter version bump required.
2026-04-11 15:29:43 -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%