Write a Pattern

Before you begin

Have an identified candidate (see Identify a pattern) and a copy of the pattern template.

Steps

  1. Name it. Choose a noun phrase that can travel in conversation: “Abstain on Thin Evidence,” not “declining to answer when retrieval returns few sources.” Names may improve later; the identifier will not change.
  2. State the intent. One sentence that states the outcome, not the mechanism.
  3. Write the instance. A short, concrete picture of the pattern at work in one system, with real-seeming details. Readers recognize a pattern from an instance before they understand it from a definition.
  4. Write the context. One paragraph naming the larger patterns this one helps complete, and the conditions that activate it.
  5. Write the headline problem. One or two sentences, in bold, naming what goes wrong and why.
  6. Write the body and the forces. Explain the forces and the evidence that they are real. List at least three forces as tensions (“X, while Y”).
  7. Write the solution. Begin with “Therefore.” State the arrangement as an instruction, in terms of responsibilities, artifacts, contracts, and feedback, never in terms of a product.
  8. Draw the structure. A Mermaid diagram of three to seven nodes. A larger diagram means the pattern should be split.
  9. Write what it costs. The liabilities and operating costs. A pattern that lists only benefits is advocacy.
  10. Write how it fails. Misapplications, boundary conditions, and signals for review, each with a destination.
  11. Write the closing. One paragraph naming the smaller patterns that complete this one.
  12. Fill the record. Assign facets, typed relationships with guards, implementation notes that name families of choices, known implementations with their actual maturity, design sources, and lineage. Set the confidence (asterisks) and the evidence status no higher than the evidence supports; a new pattern is usually Proposed.
  13. Build and validate. Run the build and validation tools. Fix every unresolved reference and every validation finding.
  14. Submit for review. Open a change with the pattern, its record, and its evidence. State any relationship between the contribution and work done for an employer or client.

Result

A pattern and its record, validated and ready for review.