๐ Reviewer copy: snapshot a draft, then diff it¶
Status: reference.
Written for an author who wants to keep earlier versions of a draft
and see what changed between them, for example before sending a draft
to a supervisor and again when it comes back. Assumed: you have a
draft under content/drafts/ and its dossier under content/dossiers/
(WRITING-PROCESS.md
if you don't yet). Not covered here: every flag and exit code
(CLI.md), or how a reviser uses the
diff at the end of a pass
(DRAFT-ITERATION.md).
๐ฏ Why keep snapshots at all¶
content/ is outside git on purpose, so nothing else keeps a draft's
earlier text. If you hand-edit a draft
(USER-EDITS.md) or ask a skill to revise it, the old
wording is gone unless a snapshot holds it. A snapshot is that copy,
and draft diff is what reads it back.
๐ธ Take a snapshot¶
1 | |
This prints
Snapshot 001-sent-to-supervisor of content/drafts/dt-overview/survey.md
and writes the draft and both forms of each figure it uses
(figures/<name>.tex and figures/<name>.txt) to
content/dossiers/dt-overview/survey/versions/001-sent-to-supervisor/.
- Snapshots are numbered
001,002, and so on, in the order they are taken. A named snapshot is always taken, even when the draft has not changed since the last one. - The label is required and names a milestone. It must contain a
letter or digit, must not be all digits (so
--against 3always means version 3), and must not repeat an earlier label. - Skills take snapshots too. Every
dossier mark-revisiontakes an unlabelled one when the draft changed since the latest snapshot, so a revised draft always has a version to compare against.
List what you have:
1 | |
1 2 | |
Add --json for a machine-readable list.
Snapshots live in the dossier, so chitragupta draft dossier export
carries them with everything else
(MIGRATION.md). They do not back up the rest of
content/.
๐ Compare two versions¶
1 2 3 4 | |
diff compares the draft as it is now with a baseline:
--against |
Baseline |
|---|---|
| omitted | the latest snapshot |
a number (1, 001) |
that snapshot |
a label ("sent to supervisor") |
the snapshot with that label |
| a path to a file | that file; a file wins over a label with the same text |
Everything is written to content/review/<topic>/:
<stem>.diff.mdand<stem>.diff.json: the change report. It is also printed, as Markdown or, with--json, as JSON.<stem>.diff.pdf: the redline, with--format pdfonly. It needs latexdiff, LuaLaTeX and bibtexu;chitragupta doctorchecks them. Without them the report is still written and the command exits 1.
When nothing changed, the report says No changes. and no PDF is made.
๐ Read the redline¶
The redline is the draft rendered once, with deleted text struck through in red and added text underlined in blue. Section moves and redrawn figures are noted in the right margin.
The example below is a real redline. A short note was snapshotted, then edited five ways: a figure deleted, a phrase replaced, a section renamed, a sentence deleted, and a section deleted.

| # | Change | In the redline | In the report |
|---|---|---|---|
| 1 | Deleted figure | The caption is struck through. The drawing is not shown, and a sentence that pointed at it reads Figure ?? |
Figures: figures/twin-loop: removed |
| 2 | Replaced phrase | Old words struck, new words underlined, side by side | The section is listed as changed with a word count |
| 3 | Renamed section | Old heading struck, new heading underlined | Listed as one section removed and one added: the report does not detect a rename |
| 4 | Deleted sentence | The sentence is struck through in place | Part of that section's changed or removed entry |
| 5 | Deleted section | Heading and body struck through | removed: Historical background |
The report for the same edits:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
Read the report alongside the redline for two things the PDF cannot show:
- Citations. The report lists citekeys added and dropped. A
baseline citation that is no longer citable prints as
(citation withdrawn)in the redline. - Unexplained changes.
## Needs a log entrynames every changed section that norevisions.mdentry since the baseline explains. DRAFT-ITERATION.md shows the entry format.
๐ซ What a reviewer copy is not¶
The report and the redline are for reading. They are never gated, never submitted, and never used as a source for another draft. Send the rendered draft, not the redline, as the deliverable.