Keeping exports in sync with changing PDFs

What happens when a source document changes after you have already converted it.

Re-running is the sync mechanism

There is no separate update command. Running Convert Folder to Markdown on a folder you have already converted is the way to bring the corpus back into line with its sources.

Each source is compared against what the manifest recorded:

SituationResult
Source unchanged, output intactunchanged — no work, no threshold usage
Source unchanged, output deletedRegenerated, no threshold usage
Source changedReconverted, counts once for that revision
Source unchanged, output edited by handconflict — your edit is left alone

The practical consequence: re-running on a large folder where only two PDFs changed does work for two files. The rest are compared and skipped. There is no penalty for running it often.

Where a stale corpus actually bites

A Markdown corpus that has drifted from its sources is worse than no corpus, because the failure is silent. An agent reading last quarter's converted spec will answer from it with full confidence. Nothing in the output announces that the underlying PDF moved on.

Two habits reduce that risk:

Reconvert when the source folder changes, not on a calendar. If PDFs arrive by drop or download rather than by commit, the arrival is the trigger. Waiting for a weekly ritual means a window where the corpus is quietly wrong.

Let the diff tell you. If pdf-forge-exports/ is committed, a reconversion that changes nothing produces an empty diff, and one that changes something shows you exactly what moved. That is the cheapest staleness check available — and it is the reason Markdown in version control beats PDFs sitting in a folder.

When your edits and the source both change

If you have hand-edited a generated file and its source PDF then changes, the new conversion is written beside your file as document.pdf-forge-new.md, and the index marks the row conflict. Your version is untouched.

Further changes to the same source replace that single candidate rather than piling up new files. Merging is manual and deliberate — the tool will not decide for you which version is correct.

Sequencing with a coding agent

If an agent is working against the corpus, reconvert before the session rather than during it. A file changing underneath a running agent produces the confusing case where two answers in the same conversation disagree and neither is wrong.