Expand description
The document tree’s logical path grammar: classification, escaping, and the physical boundary.
A logical path is a POSIX path with no extension. The seven forms a v4 document tree spells
are manifest, pkg/<package>/<module>/module, pkg/<package>/<module>/<stem>.type,
pkg/<package>/<module>/<stem>.value, and their deps/<package>/@<version>/... counterparts
(the v4 model carries no package version, so the version slot is always the bare @,
decision 0015). .type and .value are part of the logical name, not filename extensions.
This mirrors IR/src/layout/paths.ts in ecosystem/morphir-typescript, function for
function; see .dev/docs/superpowers/maps/2026-09-17-reference-tree-layout-map.md section 1.
Enums§
- Node
File Kind - Which of the two node-file kinds a path names.
- Path
Kind - The kind a physical or logical path names, and what
classifycan read out of it. - Root
- Which of the tree’s two roots a path or directory sits under.
Constants§
- MANIFEST
- The distribution manifest’s logical path.
- VERSION_
SLOT - The bare version segment a dependency directory carries, because the v4 model has no package version to hold (decision 0015).
Functions§
- classify
- Classifies a logical path the way the reference’s
classifydoes, line for line: the manifest path first, then the root, then the leaf. - from_
physical - The logical path a physical name carries, or
Nonewhen its extension is not one the tree recognizes. - module_
dir - The escaped directory a module’s files sit under: the package directory, then the module path’s escaped stems.
- module_
dir_ prefix - The physical-path prefix every file under a module directory shares:
<root>/<dir>/. - module_
manifest_ path - The logical path of a module’s manifest.
- node_
file_ path - The logical path of one type’s or value’s node file.
- package_
dir - The escaped directory a package’s files sit under: the package path’s escaped stems, joined
by
/, with a trailing bare@underdeps/. - to_
physical - The physical path a profile writes a logical path under: the logical path plus the profile’s extension.