Draft regen/units/<unit>.toml for a module that has no unit record yet.
Everything that can be read from the tree is filled in: path, the first paragraph of the module docstring as summary, the public names (__all__, else public defs, classes and upper-case constants), the package imports as depends_on, and every file that references the module as a consumer (test files named after the module as unit_tests). What only a person can supply is left open: the intent items, the evaluations, the decisions and the external, operational and human consumers. The draft therefore fails check with UNIT06 until at least one intent item is written, so a scaffold can never pass the check unreviewed.
If the module has no file below the source directory.
Examples
from pathlib import Pathfrom tempfile import TemporaryDirectoryfrom spotregen import load_spec, make_sample_repo, scaffold_unitwith TemporaryDirectory() as tmp: root = make_sample_repo(Path(tmp) /"demo") (root /"regen/units/core.calc.toml").unlink() target, text = scaffold_unit(load_spec(root), "core.calc", "slow", "high")print(target.relative_to(root))print([line for line in text.splitlines() if line.startswith(("unit", "path"))])