A Requirements Pattern Library Worth Reusing
A requirements pattern library keeps shapes, not values. Eleven candidates from one case: seven admitted, four refused, then run back over the register.
Numbers in this note carry source tags ([POLICY], [THREADS n=10], [MINE]). What the tags mean.
This piece stands on the returns case published on this site: damaged-delivery refunds at a mid-size online retailer, built only from public sources - a published returns policy, help centre articles, ten public complaint threads I selected myself, consumer law and a walk through the published customer journey. No client, no interviews, no access to the retailer. The raw material is the case register as published: five requirements with three acceptance criteria each, fifteen criteria in all, and four business rules. The candidates, the admission rule and every verdict below are mine [MINE].
A requirements pattern is a sentence shape that recurs across requirements, with named slots and one question it forces the author to answer, and with every value removed. A pattern library worth reusing stores those shapes, the weak version each one replaces and the check that catches it. It does not store the numbers. A number copied from the last project arrives in the next one looking like a decision somebody made.
In short
- Harvest patterns from a register you have already had reviewed, not from a blank page. Eleven candidates came out of this one. Seven passed the admission rule and four did not.
- The four refusals teach more than the admissions. The most frequent candidate in the register is a label, and the second most frequent is one number of mine repeated three times.
- When a pattern travels, the value stays home. Every value slot enters a new project tagged
[OPEN], whatever tag it carried in the old one. - Run the library back over the register it came from. Seven probes: one passes, four land on gaps other pieces on this site already logged, and two find gaps no piece on this site has logged.
Where do reusable requirements patterns come from?
Christopher Alexander's definition, quoted in the Wikipedia article on pattern languages, sets the bar: "Each pattern describes a problem that occurs over and over again in our environment, and then describes the core solution to that problem, in such a way that you can use the solution a million times over, without ever doing it the same way twice."
Two words in that sentence do the work for an analyst. "Over and over" means a pattern is found, not designed: one clever sentence is not a pattern. "The core" means the library keeps what survives when the particular case is taken away. Applied to a register, that gives a three-part admission rule [MINE]:
- Recurrence. The shape appears in at least two lines, in two different requirements or rules.
- Survives stripping. Delete every value, every role and every noun from the domain, and a sentence with slots is left.
- Forces a question. The pattern makes the author answer something a reader could otherwise answer two ways.
The case register is a good source because two peers have already argued with it, and five objections came back.
The harvest: seven shapes that passed
| # | Pattern | Shape, values stripped | Lines in the case | The question it forces |
|---|---|---|---|---|
| P1 | Anchored clock | [Duration] from [recorded event], not from [the event it is easily confused with] | REQ-014/2, REQ-015/2, REQ-016/1, REQ-017/1 | From what moment, recorded where? |
| P2 | Named holder | Assigned to [a named individual]. [Group, mailbox, queue] does not satisfy this | REQ-015/1, REQ-017/3, BR-12 | Who, by name or role, and what does not count? |
| P3 | Asymmetric automation | The [automated step] may [favourable act] and never [adverse act]. Anything it does not do goes to a person | REQ-018/1-2, REQ-017/3 | Which act may a machine never take alone? |
| P4 | Boundary at the threshold | [Option] only above [value]. At or below it, [stated outcome] | REQ-014/1, REQ-014/3, BR-11 | What happens exactly at the line? |
| P5 | Record that outlives the act | Every [act] records [id, version, time], and the record outlives [the thing acted on] | REQ-016/3, REQ-018/3 | What will somebody need to reconstruct later? |
| P6 | Counted message | The customer receives [n] message naming [who] and [by when]. [Event] sends [n]. [Event] sends none | REQ-015/3, REQ-014/2, REQ-016/2 | How many messages, on which events, and when none? |
| P7 | Reason in stated words | A stop carries its reason from [a stated list, the rule's own wording], not [free text, an error code] | REQ-014/1, REQ-017/2, REQ-018/2 | What does the person on the other end actually read? |
P2 at its best is REQ-015 criterion 1: "Assignment to a shared mailbox, a group or a queue does not satisfy this criterion." P1 came out of the review. RL-02 asked "Under 48 hours from what moment?", and the case's summary of that fix is the best argument for a library: "One vague sentence was concealing two decisions."
Which candidates were refused, and why?
| # | Candidate | How often it appears | Rule it fails | Where it belongs instead |
|---|---|---|---|---|
| R1 | "Must have, release 1" | 5 of 5 requirements | 3: forces no question | The priority column. The case flags it itself: "Five must-haves in one release is a smell" (4.1) |
| R2 | "48 hours" | REQ-014/2, REQ-015/1, REQ-017/3 | 2: strip the value and nothing is left | It is one [MINE] number written in three places. The shape behind it is P1 |
| R3 | "3 files, 10 MB each" | REQ-014/1 only | 1 and 2 | A [MINE] value. The shape behind it is P4 |
| R4 | "The upload can sit on the existing order page" | The mechanism note under REQ-014 in template 3 only | 1, and it is a suggestion | Nowhere in a library. Stored there, a suggestion becomes a default |
R1 and R2 are the trap. Counted by frequency, they are the two strongest candidates in the register, so a library built by counting phrases would open with a priority label and a number I chose.
What travels with a pattern, and what stays home?
Template 3 in this pack names the risk in one line: "A requirement is where numbers get laundered: a threshold you chose on a Tuesday reads exactly like a threshold the business set, unless one of them says [MINE]."
A library that stores values launders them. The 48 hours is tagged [MINE], and the register says of it: "It is the single number in this case most likely to be changed by its rule owner, and the design does not fall over if it becomes 72." Copy the criterion into the next project and the sentence survives while the tag drops off. There, nobody chose it.
So the carry rule [MINE]: the shape, the question, the weak version and the check travel. The value and its tag stay with the case they came from. Every value slot enters the new project as [OPEN] until a source there gives it a tag of its own. The 40 EUR in BR-11 is [POLICY] here. In a library entry it is "[value]".
Is EARS already a pattern library?
Partly. Alistair Mavin's EARS gives five sentence templates and one generic form: "While
EARS fixes the grammar of a sentence. The seven patterns above fix slots that the grammar leaves free. Three of them map cleanly [MINE]. P3 and P7 are the EARS unwanted-behaviour template, "If
P2 and P4 also hold in BR-12 and BR-11, which are business rules with no system in them, so a library that only accepts "the system shall" loses half their instances.
The probe: running the library back over its own register
A library proves itself by finding something. Run each pattern over the lines that do not use it yet, and ask whether they should.
| Probe | Line | Result | Logged before? |
|---|---|---|---|
| P3 | REQ-016/1, the deletion job | Passes. REQ-016/2: "A case reopened inside the retention window keeps its evidence." That is the never clause | - |
| P1 | REQ-016/1, "deleted 90 days after the case closes" | The closing event is not named | Yes, U5 in the data model piece |
| P4 | REQ-014/1, file size | The count has an outcome, size does not. A 12 MB file has no expected result | Yes, in the UAT script piece |
| P4 | REQ-017/1, "within five working days of receipt" | Day six has no outcome | Yes, in the UAT script piece |
| P7 | REQ-017/2, "a list of stated reasons" | The list has no values and no owner | Yes, U8 in the data model piece |
| P6 | REQ-017, all three criteria | Nothing says what the customer receives when goods-in reopens a case | No |
| P5 | REQ-015/1, the rota assignment | Nothing records which rota entry assigned the case | No |
Four of the seven probes reach gaps that two earlier pieces found by two different methods, one by drawing a data model and one by typing test data. The library reaches them in one pass, which says that those gaps were never about refunds. The two new ones are worth spelling out.
The goods-in reopen has no message. REQ-015 counts messages down to "sends none". REQ-017 reopens a case after the money has moved, at the dock, and its criteria say nothing to the customer. The intent sits in the note under criterion 3, which nobody tests: "A person decides, and the customer hears from a person." REQ-015/3 does not cover it either, because "a case reopened by the customer" is not a case reopened at the dock. Proposed [MINE]: "A goods-in reopen sends the customer one message, from the named owner, before any decision on the money is recorded."
The assignment records nothing. P5 holds in REQ-018/3 so that "a later change to BR-11 can be traced to the cases decided under the old one". REQ-015/1 is also an automated act, and the rota it reads is itself open: OQ-04 asks whether it covers weekends. If the rota changes after that answer, nothing shows which cases were assigned under the old one. Proposed [MINE]: "Every assignment records the rota entry and the time it was read."
The pattern card, filled in for P1
| Field | Value |
|---|---|
| Pattern | P1 Anchored clock |
| Shape | [Duration] from [recorded event], not from [the event it is easily confused with] |
| Question it forces | From what moment, and where is that moment recorded? |
| Weak version | "Refunds are paid within 5 working days." (template 3, section D, item 2) |
| Fixed version | "within 48 hours of the timestamp on the submitted form, not the moment an agent opens it" (REQ-014/2) |
| Lines in the source case | REQ-014/2, REQ-015/2, REQ-016/1, REQ-017/1 |
| Admitted by | Recurrence: four requirements. Survives stripping: yes. Forces a question: yes, and the review asked it (RL-02) |
| Values that stay home | 48 hours [MINE], five working days [HELP] (BR-07), 90 days [MINE, OPEN, OQ-01] |
| Arrives in a new project as | [Duration] [OPEN], [recorded event] [OPEN] |
| Companion question | Clock hours or working hours, and whose calendar? (OQ-04 in the source case) |
| Check | Scorecard check 13 |
| EARS | No template slot. Write it inside the response and name the event |
| Last probe | REQ-016/1: closing event not named (U5) |
The pattern card, blank
| Field | Value |
|---|---|
| Pattern | [Id and a name a reviewer can say out loud] |
| Shape | [The sentence with every value replaced by a named slot] |
| Question it forces | [The thing a reader could otherwise read two ways] |
| Weak version | [The sentence this pattern replaces, quoted from a real draft] |
| Fixed version | [One line where the pattern is used well, with its id] |
| Lines in the source case | [At least two, in two different requirements or rules] |
| Admitted by | [Recurrence / survives stripping / forces a question, one line each] |
| Values that stay home | [Every value from the source, with the tag it carried there] |
| Arrives in a new project as | [Each slot, tagged [OPEN]] |
| Companion question | [The question this pattern usually exposes next] |
| Check | [The review check that catches the weak version] |
| EARS | [The template it maps to, or "no slot" and where it goes instead] |
| Last probe | [The line it was last run over, and what it found] |
Where does this method stop?
Seven patterns from one register is a seed, not a library. Recurrence inside one register proves a habit of one author. Recurrence across projects needs a second register: harvest it with the same rule and keep what both produce. And the method cannot see a pattern the register never needed. No requirement here calculates an amount or produces a report.
The full case is at /case, the tags are explained on the method page, and the weak and fixed pairs behind several of these patterns are in acceptance criteria that survive a sprint review. Checks 02, 13 and 15 of the scorecard are the ones a library should be written to pass: criteria testable without the author, a start event for every clock, a rule's condition and outcome in one sentence.
Read next
Turning Acceptance Criteria Into a UAT Script
A UAT script names who acts, what they do, the result they should see and the acceptance criterion each step proves. One
Acceptance Criteria That Survive a Sprint Review
What an acceptance criterion actually is, six weak ones shown as they arrived and as they went out, and the three object
Get the Proof Pack
Six blank templates and one worked case. Free, one email. The scorecard is a separate file and needs none.
Send it to meAll field notes · The portfolio guide · More in Requirements That Survive Review