Four worked examples
All examples use synthetic parties and documents. Concordance flags inconsistencies; a human reads and decides.
1. A mathematics paper (LaTeX)
concordance analyze paper.tex
A real run over a 317-construct paper returns:
{"summary": {"constructs": 317, "ref_edges": 529, "cite_keys": 10, "bib_entries": 25},
"findings": {
"dangling_refs": {"Dfn-Foo": [{"file": "paper.tex", "line": 1017}]},
"duplicate_labels": [],
"missing_cites": {},
"unused_labels": ["Rmk-Bar", "sec:appendix-a"]}}
Read it as: one \ref{Dfn-Foo} points at a definition that was never written (fix it); no
duplicate labels; no missing citations; some labels are unused (the section anchors are fine;
review the theorem-like ones).
2. A GDPR data-export request (Markdown folder)
concordance corpus-md ./gdpr-request/
A folder holding a data-subject request letter and the controller’s reply. Concordance graphs the parties (data subject, controller), the defined terms, and the cited provisions — and flags a reply that cites “Article 15(3)” where the request only invoked “Article 15(1)”: a cross-reference the human should reconcile.
3. A cross-continent hiring package (multi-document)
concordance corpus-md ./hiring-acme-northwind/
An offer letter, an NDA, and a contractor agreement between synthetic parties Acme and Northwind across two jurisdictions. Concordance surfaces a defined term (“Confidential Information”) used in the offer letter but never defined there — it is defined only in the NDA. The graph makes the dangling definition visible so the drafter can add a cross-reference.
4. A registry round-trip (canonical labels)
concordance emit-registry paper.tex > registry.json
concordance reconcile paper.tex --registry registry.json
emit-registry produces the canonical-label registry; reconcile rewrites any legacy numbered
\ref/\cref to the canonical labels. On an already-canonical document reconcile reports
0 rewrite(s) and returns the file byte-for-byte unchanged — the idempotence guarantee.