Pattern Template
Pattern records live in YAML files under source/patterns/. The build renders each record into a pattern topic (a principle delivered as a concept) and a record topic (a fact delivered as a reference). Write references to other patterns as [[slug]].
- n: 88 # next unused number; never reuse a retired number
slug: short-kebab-name
name: Short Noun Phrase
scale: 1 | 2 | 3
group: <group key from tools/build.py>
stars: 0 | 1 | 2 # confidence in the invariant
status: Proposed | Incubating | Implemented | Retired
facets:
problem: architecture | language | acquisition | understanding | transformation |
governance | delivery | retrieval | integration | orchestration | evaluation
agency: fixed | human-gated | model-assisted | runtime-choice
state: [execution, artifact, knowledge, source, environment, goal, authority, resource, behavior]
risk: [fidelity, omission, staleness, retrieval-quality, unauthorized-action,
inconsistent-state, incomplete-work, resource-overrun, latency, drift, disclosure]
lineage: <new, or the pattern it generalizes or replaces>
intent: <one sentence: the outcome>
instance: |
<a concrete picture of the pattern at work>
context: |
<the larger patterns it helps complete, with [[slug]] links>
headline: |
<the problem in one or two sentences>
body: |
<forces explained, with evidence>
forces:
- <X, while Y>
- <X, while Y>
- <X, while Y>
therefore: |
<the arrangement, as an instruction>
diagram: |
flowchart LR
A["..."] --> B["..."]
costs: |
<liabilities and operating costs>
failures:
- <misapplication or boundary, with destination>
closing: |
<the smaller patterns that complete it, with [[slug]] links>
relations:
- "Requires: other-slug"
- "Requires: other-slug when <guard>"
- "Requires one of: slug-a, slug-b"
- "Enables: other-slug"
- "Refines: other-slug"
- "Contained in: other-slug"
- "Often used with: other-slug"
notes:
- <families of implementation choices and the properties they must preserve>
impl:
- "<implementation name (owner, maturity): what it realizes>" # or "None ..."
sources:
- <design sources; a source is not evidence>
retirement: # only for retired patterns
date: <YYYY-MM-DD>
reason: <why>
replaced_by: <slug or none>
Required sections, in order
| Field | Rule |
|---|---|
| name | Noun phrase; unique |
| intent | One sentence; outcome, not mechanism |
| instance | Concrete; one system |
| context | Names at least one larger pattern unless scale 1 |
| headline | One or two sentences |
| body and forces | At least three forces |
| therefore | Instruction; technology-neutral |
| diagram | Three to seven nodes |
| costs | At least one liability |
| failures | At least one |
| closing | Names smaller patterns, or says there are none |
| relations | Every target resolves; guards in plain language |