One complete TOML record with comments and folded prose. It uses the names of the sample repository and checks clean when it replaces the corresponding record there.
from babregen.explain import example_textprint(example_text("decision"))
# regen/decisions/why-add.toml: a decision record. The file name is the id that intent
# items cite (decisions = ["why-add"]). The names are those of the sample repository.
title = "Addition is provided by the package" # what was decided, in one line
date = 2026-01-01
status = "active" # active (the default), superseded or expired
# What forced the decision: an incident, a requirement, a measurement. Prose is folded:
# wrap it, write no backslash.
driver = """
A user asked for a function that sums two integers, and three scripts had their own
copy of it."""
decision = """
The package provides add(a, b) in samplepkg.core.calc and promises plain arithmetic.
The scripts call it instead of keeping a copy."""
approved_by = "maintainer" # who stands behind the decision
# References: file:<path>, commit:<sha>, KB:<entry> or url:<url>.
evidence = ["file:src/samplepkg/core/calc.py"]
# What the decision rests on. When one of these stops holding, review the record.
assumes = [
"callers sum integers only",
]
# review_after = 2027-06-01 # the check warns when this date has passed
# Rejected options, kept because negative knowledge is fragile.
[[alternatives]]
option = "keep a copy of the sum in every script"
rejected_because = """
the copies drift, and a fix would have to be made three times."""