Draft
Purpose
One specification document as the atlas understands it — the name its header declares, the
Kind its place gives it, the layer it belongs to, and its text as authored. The atlas
publishes the text as it stands; the one thing it reads out of the text is the names the
prose speaks, because those are what the weaving turns into links.
Attributes
- layer: is
Textthat names the layer the draft belongs to — empty for a stack's own root, which belongs to no layer - kind: is
Kindthat places it on its shelf - name: is
Textthat its header declares - text: is
Textthat holds the draft as authored
Invariants
- The name is not empty.
Operations
mentions
Reports the names the draft's prose speaks — every backticked run of text in the draft's body, each spoken name reported once, in the order first spoken. The draft's own header line is not prose and contributes nothing. Result: the names spoken, each once, in the order first spoken — empty when the prose speaks none
Scenarios
A draft is its name, kind, and text
Given: the layer "mix", the kind "data", the name "Cell", and a text of several lines — a
leading header declaring "Cell" and a body speaking "Tumbler"
When: a Draft is created
Then: it is accepted, belongs to "mix", is a "data" draft named "Cell", and its text is exactly
as given
Mentions are the backticked names, each once, in first-spoken order
Given: a Draft whose text body speaks "Tumbler", then "Cell", then "Tumbler" again
When: mentions is performed
Then: exactly "Tumbler" then "Cell" are reported, in that order
A prose with nothing backticked mentions nothing
Given: a Draft whose text body speaks no backticked names When: mentions is performed Then: no names are reported