Create regen/decisions/<id>.toml: the writer behind babregen new-decision.
The file is created and never overwritten. The text is the SPDX header of the architecture, the keys that were given in the order of the schema, and one [[alternatives]] block per rejected option. Nothing is made up: a key that has no value is left out, and the loader rejects a required value that is empty.
If the id is not valid, the file exists, the status or an evidence prefix is unknown, a file: evidence does not exist, a prose value holds a blank line, a name holds a line break or the result would not load.
Examples
from pathlib import Pathfrom tempfile import TemporaryDirectoryfrom babregen import load_spec, make_sample_repo, new_decisionwith TemporaryDirectory() as tmp: root = make_sample_repo(Path(tmp) /"demo") done = new_decision( load_spec(root),"why-sub", title="Subtraction is provided", driver="A user asked for it.", decision="Provide sub next to add.", approved_by="maintainer", dry_run=True, )print(done.text)
title = "Subtraction is provided"
date = 2026-11-29
status = "active"
driver = "A user asked for it."
decision = "Provide sub next to add."
approved_by = "maintainer"