Weave
Purpose
Views the shelf whole and weaves the atlas — every draft a Page, placed and linked, in shelf
order. Each draft's references are woven through the Resolution against its own stack; each
page's mentioners are the drafts whose woven references reach it — not merely every prose that
happens to speak the same word, so a name spoken in one stack never claims a reader in another.
Shelf order is the order a reader walks: the shelf's stacks as given, within a stack the
stack's own root first and then its layers floor to top as the stack holds them, within a layer
the root first and then data, projections, contexts, and ports, and within a kind the names in
alphabetical order. The weave adds nothing and drops nothing: one page per draft, however quiet
its prose.
Role Players
- shelf: Shelf — the published stacks, read whole
Props
(none)
Role Methods
shelf
- shelfOrder: reports every draft of every stack in shelf order — the shelf's stacks as given, a stack's own root before its layers, layers floor to top, a layer's root before its data, projections, contexts, and ports, names alphabetical within a kind. Result: the
Draftsin shelf order
Functionalities
weave
Walks the drafts in shelfOrder and, for each, weaves its references through the Resolution
against its own stack, then folds the mentioners in — for every page, the drafts whose woven
references reach it, themselves in shelf order — and yields the pages.
Result: the Pages, one per draft, in shelf order
Scenarios
One page per draft, the shelf in order
Given: a Shelf holding a Stack "convene" with its root Draft named "convene", whose Layer "mix" has a root Draft named "mix", a data Draft named "Cell", and a projection Draft named "Routing", none speaking any name When: weave is performed Then: exactly four pages are yielded, in the order "convene", "mix", "Cell", "Routing"
The mentioners fold in
Given: a Shelf holding a Stack "convene" whose Layer "mix" has a data Draft named "Cell" and a
data Draft named "Depot" whose prose speaks "Cell"
When: weave is performed
Then: the page for "Depot" carries a reference reaching "Cell", and the page for "Cell" carries
exactly the draft "Depot" as its mentioner
A name spoken in one stack never claims a reader in another
Given: a Shelf holding a Stack "convene" whose Layer "mix" has a data Draft named "Cell", and
a Stack "nordhavn-site" whose Layer "atlas" has a data Draft named "Page" whose prose speaks
"Cell"
When: weave is performed
Then: the page for the site's "Page" carries no references, and the page for convene's "Cell"
has no mentioners
Names read alphabetically within a kind
Given: a Shelf holding a Stack "convene" with its root Draft named "convene", whose Layer "mix" has data Drafts named "Tumbler", "Cell", and "Depot", none speaking any name When: weave is performed Then: the pages read "convene", "Cell", "Depot", "Tumbler", in that order