A customer complains that the discount code SPRING5 was refused although "the order was over 25 euros". Support looks at the order total, which includes shipping, and agrees. The developer says the minimum is checked against the subtotal, before discount and shipping. The help article says "order value". Three words for amounts that are not the same, and each person reads the other two as their own.
FACET keeps a short, checkable description of each feature, called a record, next to your code and tells you when code and description DriftDrift is when code changes and the record describing it does not follow, so the two no longer match. facet drift lists the features whose anchored code changed since a chosen baseline.In the glossary apart. By the end of this guide the shop's money words are defined once, in one glossary file next to the records. npx facet lint warns in every pull request when a record spells a defined term differently, and fails when the same term gets a second meaning. FACET Atlas, the browser app for reading FACET records, shows each term with its definition and the records that use it.
The commands below use the example shop from “One answer instead of three”. In your own project, start with the two or three words that cause the most misunderstandings.
Step 1Define each word once
The glossary lives next to the records, in docs/facets/glossary.yaml. Save this there:
schema_version: "0.1"categories: - id: money title: Money purpose: Amounts the shop computes on a cart or an order.terms: - term: Subtotal category: money definition: | The sum of all line items in the cart, before any discount and before shipping. The minimum order value of a discount code is checked against it. - term: Total category: money definition: | What the customer pays: the Subtotal minus the discount, plus shipping.
termis the exact word as records should write it. Matching is case-sensitive and whole-word:Subtotalandsubtotalare different words to FACET.definitionsays what the word means and how it differs from its neighbours. What the shop does with the amount belongs in the records.categoriesgroup terms, and each term names at most one category. They are optional; a short glossary works without them.
Step 2Let the check find spellings that miss the term
npx facet lint


The existing discount-code record says When the cart subtotal is below that value. That is almost the term, but not exactly, so nothing links it to the definition. FACET reads intent.summary and every ScenarioA scenario is one behaviour a feature promises, written in a record as Given/When/Then steps. Each scenario has an id that tests and other records can refer to.Read more here statement of every record and reports each word that is a different case or a small typo away from a defined term.
Open docs/facets/features/checkout/discounts/redeem-code.yaml and change the line in the scenario minimum-order-value to:
When the cart Subtotal is below that valueRun the check again:
npx facet lint
The summary now ends with 0 error(s), 1 warning(s) (unclaimed-tests 1): the glossary warning is gone, and only the note about unclaimed test files from “One answer instead of three” remains.
Step 3Keep one meaning per word
A month later someone adds "Subtotal" again at the end of the glossary, meaning the amount with shipping:
terms: # Subtotal and Total from step 1 stay here - term: Subtotal category: money definition: | The order value including shipping.
npx facet lint


This one is an error, and the command exits with status 1, so the pull request that adds it fails. Remove the second entry. If the team really needs a word for the amount with shipping, give it its own name, as Total already does.
Step 4Read the glossary in Atlas
Atlas, the FACET reader, starts from the npm package. In the shop's folder, run:
npx facet-framework ui
The first run asks Download and start? [y/N] before it downloads Atlas; answer y. Later runs start without asking.
Atlas opens in the browser. Click Glossary:


Support, product and new colleagues read the same definitions here without opening YAML. Subtotal shows 1 record: the discount-code record that uses the exact spelling since step 2.
Step 5Commit the glossary so every pull request checks it
git add docs/facets/glossary.yaml docs/facets/features/checkout/discounts/redeem-code.yamlgit commit -m "Define Subtotal and Total in the glossary"
The workflow from “One answer instead of three” runs facet lint on every pull request. A spelling that misses a term shows up there as a warning; a term defined twice, or a term naming a category that does not exist, fails the run.
Step 6If the check says something else
"…" in contract.scenarios … is not a defined glossary term — did you mean "…"?for an ordinary word: a common word like "total" in normal prose now looks like a misspelled term. Either write the term as defined wherever you mean it, or define only words that are terms of art in your product.term "…" is defined more than once: two entries share the sameterm. Merge them, or give the second one its own name.term "…" names category "…", which the glossary does not declare: the category id is misspelled or was deleted. The message lists the declared categories; correct the term or declare the category.- No glossary warnings at all, although a record misspells a term: check that the file is called
docs/facets/glossary.yaml. Without the file, no glossary check runs.
For more on teams that need the same words for the same things, read the page for distributed teams.