Documentation
¶
Overview ¶
Package naming derives filenames and human titles for the distillation pipeline: a source markdown file's title, and the *_rules.md / *_prompt.md output names beside it. Every function is pure except TitleFromFile, which reads the file and delegates to the pure helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PromptFilename ¶
PromptFilename derives the prompt filename from a source filename: "self-refinement.md" -> "self-refinement_prompt.md".
func RulesFilename ¶
RulesFilename derives the destination rules filename from a source filename: "My-Source File.md" -> "my_source_file_rules.md".
func Title ¶
Title converts a filename stem into a readable label: runs of space, underscore and hyphen become single spaces, and nothing else changes.
**It does not capitalize, and that is the point.** It used to upper-case the first letter of every word, which meant inventing a spelling it had no way to know. Measured over 342 skill slugs it got **78 (22%) wrong** -- 76 of them acronyms (`composite-slo` became `Composite Slo`) and 3 project names (`climax-cli-scaffold` became `Climax Cli Scaffold`). A lowercase stem carries no capitalization to recover, so any capital produced here is guessed. A stem -> canonical-title table was the alternative and was refused on 2026-09-07: it needed ~78 entries on the day it shipped and one more per skill after, and no authored display title exists anywhere in the corpus to fill it from -- 273 of 288 skills declare `name:` as the slug itself. See skillet's TODO.md.
The name is unchanged because the package's other Title* functions return a document's real title and this one still answers "the title for this stem"; what changed is that it no longer claims to know its casing.
Requires: stem is a filename stem; separators are whitespace, underscore or hyphen. Ensures: pure. Separator runs collapse to one space, case is never altered, and leading
or trailing separators produce no leading or trailing space.
func TitleFromFile ¶
TitleFromFile returns the first H1 heading of the markdown file at path, or a title derived from the filename stem when the file has no H1.
func TitleFromMarkdown ¶
TitleFromMarkdown returns the text of the first H1 ("# ") heading in content, or "" if there is none.
Types ¶
This section is empty.