Expand description
Artifact specs, loaded from the vendored, language-neutral asdecided-spec registry embedded at build time. Field, section, and map order are preserved everywhere (PORT-CONTRACT.d/04 §1, PORT-CONTRACT.d/09, PORT-CONTRACT.d/05 §3.1).
The Python registry ARTIFACT_SPECS is an ordered tuple of 5 specs:
requirement, decision, roadmap, prompt, design. That order is
load-bearing (classification tie-break, available_schemas(), registry
iteration). All maps below preserve their JSON insertion order via
Vec<(K, V)> so lookups and iteration match Python dict semantics.
Structs§
- Artifact
Spec - One artifact type’s schema. Field names/order mirror the Python dataclass.
Constants§
- RELATIONSHIP_
SECTIONS - The canonical relationship-section vocabulary (
references.py, PORT-CONTRACT.d/05 §3.1). Order is load-bearing: it is the canonical aggregation order for stats/relationship counts. Each entry is(canonical space name, snake key).
Functions§
- available_
schemas available_schemas()= the spec names in registry order.- canonical_
value canonical_valuetail: matchcandidateagainst the allowed vocabulary by casefold equality — the canonical allowed spelling wins, otherwise the candidate passes through. Callers supply their own first-line extraction.- relationship_
descriptions - Canonical relationship-section descriptions, in declared order
(
relationship_descriptionsfrom the JSON; PORT-CONTRACT.d/05). - snake
_snake(section)=section.replace(" ", "_")(spaces -> underscores only).- spec_
for - The spec for a canonical type name, or
Nonefor"unknown"/ unregistered. - specs
- The ordered spec registry (
ARTIFACT_SPECS): requirement, decision, roadmap, prompt, design — in that exact order.