Context

The H1 repeats title:, and every scheme wrote it as # CODE: Title. Since #405’s first part the lint accepts # Title as well, because what it guards is the agreement, not the prefix. A downstream record (dmarx/nucleation) asked to drop the code: on GitHub the file is already named for it, and a graph or index label spends characters repeating it. But luria new still scaffolded # CODE: Title, so a record that wanted the bare form had to edit every new document by hand.

Decision

A scheme declares heading:, a template over {code} and {title}. The default, {code}: {title}, is today’s form, so no record changes unless it asks to. luria new derives the H1 from the template once the title is final, whether it came from --title or from the template’s placeholder, and finds the H1 in either form when it replaces a body. A template that does not place {title}, or that names anything but {code} and {title}, is refused at load, since those are the only values a heading is written from.

Alternatives considered

  • A record-wide switch. One setting for every scheme. Rejected: the form is a property of a kind of document, and a record may well want decisions cited by code in their headings and readings not.
  • A boolean, heading_code: false. Simpler to read, but it names one variation; a template covers that and the separators records already use (—, -), which the lint’s own prefix pattern accepts.
  • Status quo. Records that want the bare form hand-edit each scaffold, and the lint lets them, so the scaffold and the record drift.

Consequences

  • Existing documents are not rewritten. Changing heading: changes what luria new scaffolds; documents already filed keep their headings until someone edits them, and the lint accepts both forms meanwhile.
  • The site’s page title takes the same form of template, site.page_title (#405, part 3), validated by the same rule: a record can drop the code from its headings, its page titles, or both.