Nordhavn / specs / nordhavn-site / atlas / Resolution

nordhavn-site / atlasprojection

Resolution

Purpose

Views one draft against its stack and weaves the references its prose earns — the judgement of where each spoken name leads, made the same way every time. A spoken name is tried in this order: the draft's own name stays plain, because a page never links to itself; a name the draft's own layer bears reaches that layer's draft, because a vocabulary is nearest at home; a name exactly one other layer bears reaches across the stack, the way convene's app speaks of its core's seals; a name several other layers bear stays plain — an ambiguity is refused, never guessed. A stack's own root has no home layer, so its names go straight to the across-the-stack tries. A name nobody bears is tried once more as a plural: when it ends in "s" and the name with that trailing "s" dropped leads somewhere by the same rules, the mention reaches what its singular reaches and the reference keeps the plural as spoken — prose that says Cells links to Cell. What remains after all of that is ordinary prose and stays plain.

Role Players

Props

(none)

Role Methods

stack

draft

Functionalities

resolve

Takes the draft's spoken names with spokenNames and, for each in order, asks the stack to reach it; every name that reaches a draft becomes a Reference keeping the name as spoken, and the names that stay plain earn none. Result: the References earned, in the order first spoken — empty when every name stays plain

Scenarios

A vocabulary is nearest at home

Given: a Stack "convene" holding a Layer "core" with a Draft named "Seal" and a Layer "mix" with Drafts named "Cell" and "Tumbler", and the mix draft "Cell" speaking "Tumbler" When: resolve is performed Then: exactly one reference is earned, speaking "Tumbler" and reaching the mix draft "Tumbler"

A name reaches across the stack when home is silent

Given: a Stack "convene" holding a Layer "core" with a Draft named "Seal" and a Layer "app" with a Draft named "Run" speaking "Seal" When: resolve is performed Then: exactly one reference is earned, speaking "Seal" and reaching the core draft "Seal"

An ambiguity is refused, never guessed

Given: a Stack "convene" holding a Layer "core" with a Draft named "Key", a Layer "mix" with a Draft named "Key", and a Layer "app" with a Draft named "Run" speaking "Key" When: resolve is performed Then: no references are earned

A draft's own name stays plain

Given: a Stack "convene" holding a Layer "mix" with a Draft named "Cell" whose prose speaks "Cell" When: resolve is performed Then: no references are earned

A plural reaches its singular

Given: a Stack "convene" holding a Layer "mix" with a Draft named "Cell" and a Draft named "Depot" speaking "Cells" When: resolve is performed Then: exactly one reference is earned, speaking "Cells" and reaching the draft "Cell"

The stack's own root speaks across the whole stack

Given: a Stack "convene" whose root Draft named "convene" speaks "Cell", holding a Layer "mix" with a Draft named "Cell" When: resolve is performed for the root draft Then: exactly one reference is earned, speaking "Cell" and reaching the mix draft "Cell"

Ordinary prose stays plain

Given: a Stack "convene" holding a Layer "mix" with a Draft named "Cell" speaking "the morning news" When: resolve is performed Then: no references are earned

spoken of by