Choose a Language for Your Project
All the patterns in this book together form one language. Any small sequence of them is also a language: a language for one assistant, one pipeline, one registry. This procedure, adapted from the procedure in A Pattern Language for choosing a language for a building project, shows how to pick that smaller language. The second half turns the chosen language into a solution manifest that engineers can build from and auditors can check.
Choosing the language is the real design work. Alexander observed that preparing a language may take weeks or months while using it takes hours, and that what the language leaves out cannot be added later by cleverness in the design. Expect to spend most of your time here.
Before you begin
- Read the summary of the language once, reading only the italic connecting sentences.
- Open the language checklist. It is the master sequence with a box beside each pattern.
- Know who owns the outcome. If no one does, stop; the first decision a language records is whose system it is.
Part 1. Choose the patterns
- Find the starting pattern. Scan the checklist and find the pattern that best describes the overall scope of your project: a narrow assistant starts at RETRIEVAL CONTENT LAYER (3); a migration starts at CONTENT ENGINEERING PIPELINE (4); a knowledge base built from calls starts at CLAIMS KNOWLEDGE REGISTRY (5). Tick it. If two or three seem to fit, pick the one that seems best; the others will fall into place.
- Read the starting pattern. Read it through. The patterns named in its context paragraph are larger than your project; the patterns named in its closing paragraph are smaller.
- Tick the smaller patterns. Tick nearly every pattern named in the closing paragraph, unless you have a specific reason not to. Do not tick the larger patterns unless your project can actually do something about them. A narrow assistant cannot create THE QUESTIONS PEOPLE ASK (1) for the whole organization, but it can collect the questions its own readers ask, and then it should tick that pattern too.
- Work down the list. Go to the next ticked pattern in the sequence, read it, and tick the smaller patterns it names that are relevant. Keep going until no ticked pattern leads to anything new.
- When in doubt, leave it out. A language that grows too long becomes confusing, and a system built from it becomes heavy. The list will be long enough with only the patterns you clearly need.
- Add your own patterns. Where your project has a need no pattern covers, write a pattern for it (see Write a pattern) and put it in the sequence beside patterns of the same size and importance. A team that must handle regulatory redaction, for example, might write its own pattern and place it next to BOUNDARY SCREENING (55).
- Change patterns to fit. If you know a version of a pattern that is truer for your situation, change it in your copy, and rename it so the change is visible. The language becomes yours by being changed.
- Picture the whole. Before going further, close your eyes and walk through the system your list describes: a reader asking a question, an author receiving a proposal, an on-call engineer tracing a bad answer. If you cannot picture it, or the picture is not a system you would want to work in, the list is incomplete or wrong. Fix the language now; a design cannot repair what its language leaves out.
Result of Part 1: an ordered list of ticked patterns, with your additions and changes marked. This is your project’s language.
Part 2. Record the language as a manifest
The ticked list is enough to design with. A system that will run in production also needs the commitments the composition grammar asks for. Copy the solution manifest template and fill it from the list.
- Name the whole and its boundary. Record the outcome, stopping point, content boundary, external systems, owners, risk class, success measures, consequence of release, budget, and horizon (Rule 0). Say whether the outcome is full or partial.
- Check the substrate. Test the substrate against the six conditions in Content is the substrate, and record any condition it meets only partly.
- Close the obligations. For every ticked pattern, check its record: add any unguarded requirement you missed, decide every guard and record its value, choose a member of every choice set, and record substitutions (Rules 1–3).
- Name every handoff. For each pair of adjacent operations, name the artifact exchanged (see Artifact contracts), its owner, its freshness rule, its gate, and its failure destination (Rule 4).
- Fill the authority matrix and state table from the decision and state tables (Rule 5).
- Choose the execution mode and, for any runtime choice, the admission check (Rule 6).
- Define the evaluation, including how you will learn whether the people who use the system find it trustworthy and good to work in (Rule 7; see Test a pattern against life).
- Look for compression. Read The poetry of the language and find places where one component, record, or step can carry several of your patterns at once.
- Write one rejected alternative and the invariant it violates.
- Have someone else review it against the grammar, and record their findings.
Result
A small language for your project, and a manifest that commits to it. Build it one pattern at a time, as Differentiation and intensity describes, and in the order of Implement a complete system.