Skip to content

13. Capabilities

Contents of ATD 0.1

13.1 What a capability is

A capability is a named algorithm the platform provides and a description calls, for work the script is not meant for: heavy or numeric algorithms, and readers of formats FBL's families cannot declare (FR-018). A capability is generic: its name, contract, inputs and outputs are in the terms of its algorithm or the format it reads, never in a tool type's vocabulary (a two-sided tree layout, not a mind map layout; a reader named for its format), even when one tool type is its only user (spec 035, Q7). Code reached only through a capability is not tool-specific code.

13.2 Requiring a capability

requires capability <name>@<range> names a capability the description uses, with a semver range of its versions (^1, ~1.2, >=1.0). A capability the description uses and does not require, and one it requires that is not in the catalogue (section 13.6), are findings (ATD2010). A range is resolved as npm's semver ranges are: the highest version the host provides that satisfies it.

13.3 Extension points

A capability is called only where its extension point allows:

Point Called from Input Output
layout algorithm <name> capability <name> { … } nodes with sizes and pins, edges ($defs/LayoutInput) positions ($defs/LayoutResult)
routing an edge's line { routing: … } edge ends and obstacles ($defs/RoutingInput) route points ($defs/RoutingResult)
reader binding … family capability <name> a body ($defs/ReaderInput) a reading and splices ($defs/ReaderResult)
analysis a derived element's or relation's from, a constraint a model ($defs/AnalysisInput) derived elements, relations, findings ($defs/AnalysisResult)
arrange an operation, as call plugin <name>(…) the selection and the model actions
render a label, a preview a value ($defs/RenderInput) text runs or a drawing ($defs/RenderResult)

13.4 A capability the host lacks

A description that requires a capability the running host does not provide, or whose range it cannot meet, still opens: the gestures that need the capability are refused with a reason, and one finding names the capability (ATD9010).

13.5 Determinism of capabilities

A capability is held to the determinism of section 12.5. A capability that must read beyond its input states each exception in its contract's exceptions, with its reason, and takes what it reads as input from the working copy, so that a conformance case lists those files among its inputs (analysis.msbuildImports reads the .props and .targets files a project imports).

13.6 The catalogue

The catalogue is the capabilities with a contract in capabilities/ beside this document. It grows as the tool descriptions in scope are written, each capability entering with its contract and recorded fixtures (section 2.6):

Capability Point Status
analysis.msbuildImports analysis provisional
arrange.selfOrganising arrange provisional
layout.bandedGrid layout provisional
layout.bandedLayers layout provisional
layout.bands layout provisional
layout.crossingOrder layout provisional
layout.depthColumns layout provisional
layout.flowRelaxation layout provisional
layout.grid layout provisional
layout.layeredColumns layout provisional
layout.layeredRegions layout provisional
layout.nestedGrid layout provisional
layout.rankedBoundaries layout provisional
layout.rankedColumns layout provisional
layout.rowPacked layout provisional
layout.rowPacking layout provisional
layout.tidyTree layout provisional
layout.twoSidedTree layout provisional
reader.ansibleProject reader provisional
reader.azurePipelinesYaml reader provisional
reader.databricksBundle reader provisional
reader.helmChart reader provisional
reader.markdown reader provisional
reader.msbuildSolution reader provisional
reader.onlineWardleyMaps reader provisional
reader.sparql reader provisional
reader.structurizr reader provisional
reader.turtle reader provisional
render.descriptionLogic render provisional
render.markdown render provisional
routing.forwardBezier routing provisional

Referenced from