Compare a canonical glossary against a document corpus and report where a term is defined in two incompatible ways, where a discouraged alias is used, and where a declared per-scope exception legitimately gives a term a different sense.
This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+; inspect the source before using it on your own files.
Run the checked-in example
node bin/glossary-term-consistency.mjs \
--root examples \
--glossary examples/glossary.json \
--config examples/policy.json \
clean/handbook.md clean/physics/notes.mdRead the result
broken/physics/notes.md defines charge as an electrostatic property, which contradicts the billing definition in the same run — and is not reported, because the glossary declares a physics scope and an exception for it with a stated reason. Delete that exception and the same line is reported as a conflict.
Where this check stops
It does not understand meaning. Two definitions are compared by lexical overlap — the Dice coefficient over their content words. That means a genuine paraphrase using different vocabulary can be reported as a conflict, and two definitions that contradict each other while sharing most of their words ("is always encrypted" versus "is never encrypted") will not be reported. A clean run is evidence that the wording agrees, not that the corpus is coherent. Tune similarityThreshold deliberately and read the findings; do not treat exit 0 as a semantic guarantee.
Before adapting the command to your own workflow, review the accepted inputs, exit codes and safety boundaries in the README.
Compiled with AI assistance from checked-in public documentation and example scripts. Run the example and review the repository's current documentation before relying on its result.