CanonBall

Guide / What people write

Vocabulary

vocabulary.md defines each noun once, and people and agents both work from it.

The problem with “delivery”

The promise “a customer can request a refund within 30 days of delivery” looks complete until three people are asked when delivery happens.

  • The warehouse lead says it is when the parcel leaves the building.
  • The support lead says it is when the carrier scans it at the door.
  • The engineer finds a delivered_at column and uses it, without knowing which of the two it records.

All three will read the promise and agree with it. The system that gets built will satisfy one of them, and the other two may learn of the difference from a customer complaint.

Agents make this both worse and better: worse, because an agent picks a meaning without telling you, and better, because an agent follows a written definition every time.

The file

vocabulary.md is part of the canon. It lists the nouns the team uses and gives each one a single definition. This excerpt is from the refunds service at CanonBall 12.

## Order
One purchase by a customer: one or more items, paid for together.

## Dispatch
The carrier's collection of the last item of an order.

## Delivery
The carrier's delivered scan for the last item of an order. Not the dispatch.

## Refund
Money returned to the customer for an order. Each refund is separate; an order can have more than one.

## Payout
One transfer through the payment gateway.

The file is kept by these rules.

  1. One word per concept. If “refund” is defined, nobody writes “reimbursement” or “return of funds”.
  2. No undefined nouns. A clause that uses a noun missing from the vocabulary is blocked until the word is defined.
  3. Agents read it first. It is one of the files every agent reads before it starts.

One language from promise to incident

Eric Evans called this a ubiquitous language: one vocabulary shared by the domain experts, the code, and the tests. Once the file exists, the same word appears at every step of the work with the same meaning.

One word, carried unchanged through every step of the work.

The incident report matters as much as the promise. Because the people who operate the system describe what went wrong in the words that were used to specify it, an incident report can become an example and a check without anyone translating.

Where entries come from

Most entries start as questions, and most of those questions surface at the Shape station, where a milestone’s clauses are drafted. The agent meets a word it cannot define and files a question:

Q-044  What is a delivery?
       a) The parcel leaves our warehouse.
       b) The carrier's delivered scan.
       c) The customer confirms receipt.

A person picks an answer, the answer becomes the definition, and the question is kept as history. Expect undefined words to be the most common source of open questions, which makes a vocabulary that is filling up a sign that the team is converging.

A word can also be missing where nobody expected it. At Shape, a proposal to approve refunds “under $100” automatically left open whether $100 meant the order total or the amount refunded, and the vocabulary gained an entry.

## Refund amount
The money returned by one refund. Not the order total.

Alignment across teams

A vocabulary belongs to a unit, which is a separately owned part of a larger system. A unit inherits its parent’s vocabulary and may add to it.

Sometimes two teams mean different things by one word, and both are right. “Account” in billing differs from “account” in identity. A unit may redefine an inherited word only by writing an explicit translation at its interface. Readers of Evans will recognize a bounded context and its context map.

What it costs

A vocabulary is cheap to start and takes discipline to keep. Expect the first clauses to raise many questions about words; those questions were always there, and they now arrive when they are cheapest to answer. Later, people want synonyms because “refund” feels repetitive, and the rule has to be held against them, because a second word for the same thing reads to an agent as a second thing.