Documentation
¶
Overview ¶
Package scaffold renders the starter Saga `draugr init` writes for a source tree.
It holds the part of init that decides what a descriptor says, and none of what writes it or prints a summary, so every caller that proposes a descriptor for a directory proposes the same one: the CLI writes it to a file, and the MCP server returns it for an assistant to show.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PathList ¶
PathList joins paths with a separator, the first shownPaths of them and a count of the rest.
func ProjectName ¶
ProjectName turns a directory name into one a descriptor accepts.
Lowercase letters, digits and dashes, starting and ending with a letter or digit, which is what `pkg/saga` enforces. Anything else becomes a dash, runs of dashes collapse, and the ends are trimmed. A name with nothing usable left in it, which a directory of punctuation or of non-Latin script produces, falls back to the same placeholder an unnamed directory gets: a scaffold somebody renames beats one that will not load.
func Scalar ¶ added in v0.135.1
Scalar is s as a YAML scalar that reads back as the same string, in a block mapping or inside a flow sequence: bare where it would, double-quoted where YAML would read it as a number, a boolean or null (2024, 1e3, 0x10, true) or where it holds a character that means something in YAML. Names and paths come from directory names, which can be any of these.
The YAML 1.1 booleans are quoted too, because an editor's parser may read yes and on as true, and the schema then rejects the value.
Types ¶
This section is empty.