Lukasz Boryn 246a81d0dc refactor(skills): retarget canonical knowledge paths into OKF/
- refactor(domain-modeling): CONTEXT.md, adr/ and multi-context layout move under OKF/
- refactor(domain-modeling): bounded-context-only split rule; per-issue glossaries forbidden
- refactor(grill-with-docs): glossary and ADR updates target OKF/ paths
2026-07-19 23:18:16 +02:00

80 lines
2.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ADR format
ADRs live in `OKF/adr/` with sequential numbering: `0001-<slug>.md`,
`0002-<slug>.md`, etc. Create `OKF/adr/` lazily — only when the first
ADR is needed.
## Template
```md
# {Short title of the decision}
{1–3 sentences: context, what was decided, and why.}
```
That's it. An ADR can be a single paragraph. The value is recording
*that* a decision was made and *why* — not in filling out sections.
## Optional sections
Add only when they add genuine value. Most ADRs won't need them.
- **Status** frontmatter (`proposed | accepted | deprecated | superseded
by ADR-NNNN`) — when decisions are revisited.
- **Considered Options** — when rejected alternatives are worth
remembering.
- **Consequences** — when non-obvious downstream effects need calling
out.
## Numbering
Scan `OKF/adr/` for the highest existing number and increment by one.
## When to offer an ADR — three-of-three test
All three must hold. If any one is missing, skip the ADR.
1. **Hard to reverse.** The cost of changing your mind later is
meaningful.
2. **Surprising without context.** A future reader will look at the code
and wonder *"why on earth did they do it this way?"*
3. **The result of a real trade-off.** There were genuine alternatives
and you picked one for specific reasons.
### What qualifies
- **Architectural shape.** "Monorepo." "Write model is event-sourced,
read model is projected into Postgres." "Bookdown chapters are knit
per-chapter to bound render time."
- **Integration patterns between contexts.** "Ordering and Billing
communicate via domain events, not synchronous HTTP."
- **Technology choices that carry lock-in.** Database, message bus, auth
provider, deployment target, pipeline framework (`targets` vs
`drake`). Not every library — only the ones that would take a quarter
to swap.
- **Boundary and scope decisions.** "Customer data is owned by the
Customer context; others reference by ID only." The *no*-s are as
valuable as the *yes*-s.
- **Deliberate deviations from the obvious path.** "Manual SQL instead
of an ORM because X." "`data.table` instead of `dplyr` in `R/inf/`
because of memory." Stops the next engineer from "fixing" something
deliberate.
- **Constraints not visible in the code.** "Can't use cloud X because of
compliance." "Response times must be < 200 ms because of partner
contract."
- **Rejected alternatives when the rejection is non-obvious.** If you
considered GraphQL and picked REST for subtle reasons, record it —
otherwise someone will suggest GraphQL again in six months.
### What does NOT qualify
- Easy to reverse: a function rename, a config tweak. You'll just
reverse it.
- Not surprising: the obvious choice nobody would question.
- No real alternative: there was nothing to weigh.
---
_Format adapted from
<https://github.com/mattpocock/skills/blob/main/skills/engineering/domain-modeling/ADR-FORMAT.md>._