Attributes
Attributes are the key-value pairs that appear in an entry’s trailer block — the final section below the body text (canonically indented). They carry the entry’s identity, type classification, trace links, and any domain-specific metadata declared by the active profile.
Universal attributes
These attributes apply to every entry regardless of type. They are defined by core and are always available, even in core-only mode (no profile configured).
| Attribute | Required | Cardinality | Value |
|---|---|---|---|
Id | Yes | Single | Bare ULID (Authored shape) or URI with scheme (Reference shape) |
Type | No | Single | Core or profile-declared type name |
Labels | No | Multi | Free-form tags; one Labels: line per tag |
Discipline | No | Single | ADR-017 — author-asserted discipline kind (software, hardware, …). Overrides the classifier’s derivation channels. |
Discipline-frozen | No | Single | ADR-017 — cached snapshot of a past derivation: <kind> or <kind> @ <YYYY-MM-DD>. Excluded from re-derivation. |
References | No | Multi | Display ID, optionally followed by a locator in […] |
External-id | No | Single | Cross-system identifier (Jira, DOORS, …) |
Supersedes | No | Single | Display ID of the predecessor entry (Authored only) |
Superseded-by | — | Generated | Inverse of Supersedes; written by markspec fmt |
Deprecated | No | Single | Quoted retirement reason string |
Id
The Id: attribute is the primary stable identifier. Its format determines the
entry’s shape:
Id: 01HGW2Q8MNP3RSTVWXYZABCDEF # Authored (26-char ULID)
Id: urn:iso:std:iso:26262:-6:ed-2 # Reference (URI with scheme)
ULIDs are assigned by markspec fmt. An entry without an Id: is “unstamped” —
the validator emits MSL-I003 for an Authored entry, and markspec fmt adds
one on the next run when formatting is safe.
Type
The Type: attribute holds the entry’s type name. It may be a core concrete
type (Requirement, Test, SoftwareComponent, …) or a profile-declared
subtype name (requirement, hazard, feature, …).
Type: requirement
When absent, the toolchain resolves the type through the 8-step chain described
in the Type taxonomy chapter. Unknown values raise MSL-T020.
Labels
Labels: is a multi-value attribute. Each value is a free-form tag. The
preferred form is one line per tag; CSV is accepted and normalized by
markspec fmt:
# One tag per line (preferred)
Labels: ASIL-B
Labels: safety-critical
Labels: DRAFT
# CSV on a single line (accepted, normalized on format)
Labels: ASIL-B, safety-critical, DRAFT
Labels are plain strings — they carry no semantics in core. Profiles can declare label concerns (a structured vocabulary of expected labels) and the validator then checks that label values are from the declared set.
References
References: links an entry to an external standard or resource by display ID,
optionally followed by a locator in square brackets:
References: ISO-26262-6 [§4.3]
References: RFC-2119 [§3]
References: serde-1-0
The locator ([§4.3]) is free text. It is kept, normalized, in the compiled
link (Link.locator) but not checked. See Locators.
External-id
External-id: records a cross-system identifier — the ID of a ticket in an
issue tracker, a DOORS object ID, a SharePoint item ID, etc. This is a
single-value attribute:
External-id: JIRA-4567
External-id: DOORS-MODULE-23/OBJ-0042
The value is opaque to MarkSpec. It is preserved in the compiled output and available for traceability matrix generation.
Supersedes and Superseded-by
Supersedes: records the display ID of a predecessor entry that this entry
replaces. It is only meaningful for Authored entries (external URIs have their
own versioning).
Supersedes: SRS_BRK_0042
When markspec fmt encounters a Supersedes: line, it writes the inverse
Superseded-by: attribute on the target entry automatically. The author only
writes Supersedes: — never Superseded-by:.
Deprecated
Deprecated: records a retirement reason. The value is a quoted string:
Deprecated: "Replaced by SRS_BRK_0107; no longer relevant after v2.0"
Deprecated entries are not removed — they remain in the compiled output, but the validator can be configured to warn or error on references to deprecated entries.
Multi-value attributes
Any attribute declared as cardinality: multi in the profile accepts one value
per line. The two equivalent forms are:
# One value per line (preferred for readability)
Labels: ASIL-B
Labels: safety-critical
# CSV (accepted; normalized by markspec fmt)
Labels: ASIL-B, safety-critical
markspec fmt always normalizes to the one-per-line form. If a CSV line
contains a value that includes a comma (e.g., a citation locator like
ISO-26262-6 [§4, §5]), the square-bracket content is treated as a single token
and not split.
Authored-only attributes
Supersedes is only meaningful for Authored entries. Reference entries have
stable external URIs as their Id: — versioning happens in the external system,
not in MarkSpec.
Reference-only attributes
The following attributes are core universal attributes and apply specifically to Reference-shape entries:
| Attribute | Value |
|---|---|
Reference-url | Canonical URL for the standard or package |
Reference-document | Human-readable citation string |
Example:
- [@ISO-26262-6] ISO 26262 Part 6
Id: urn:iso:std:iso:26262:-6:ed-2
Reference-document: ISO 26262-6:2018
Reference-url: https://www.iso.org/standard/68388.html
Both attributes are available in core-only mode. In core-only mode, a
Reference-url value that is not an http(s) URL raises MSL-A050.
License is not a universal attribute. Core declares it on SoftwareComponent
(see
Typical attributes by concrete type).
Typical attributes by concrete type
The tables below summarize typical attribute usage by type group. Attributes
under “Typical profile attributes” are not defined by core — they require
the relevant profile to be active. Core declares Bus-protocol,
Connector-type, Voltage-level and Signal-direction on HardwareInterface,
and License on SoftwareComponent.
In core-only mode, MSL-R010 is not reported for the universal attributes
above, the core relation keys, Type, or the attributes declared on core types.
The type checks (MSL-T022, MSL-R083) still apply.
Specification types
| Type | Typical profile attributes | Typical relation attributes |
|---|---|---|
Requirement | ASIL, Priority, Safety-goal | Satisfies, Derived-from |
Test | Test-level, Test-type, Test-result | Verifies, Tests |
Contract | (none typical) | Satisfies, Realized-by (generated) |
SoftwareInterface | (none typical) | Provided-by, Required-by, Realized-by (generated) |
HardwareInterface | (none typical) | Provided-by, Required-by, Realized-by (generated) |
Record | (none typical) | Affects, Caused-by |
Risk | ASIL, Severity, Probability | Caused-by, Mitigated-by |
Component types
| Type | Typical profile attributes | Typical relation attributes |
|---|---|---|
SoftwareComponent | Version, Supplier | Part-of, Depends-on |
HardwareComponent | Version, Supplier | Part-of |
Unit types
| Type | Typical profile attributes | Typical relation attributes |
|---|---|---|
SoftwareUnit | (none typical) | Part-of, Realizes |
HardwareUnit | (none typical) | Part-of |
Item types
| Type | Typical profile attributes | Notes |
|---|---|---|
Definition | (none typical) | Used in glossary cross-check lint rule |
Profile-declared attributes
A profile can declare additional attributes via its attributes: section:
profile:
attributes:
- key: ASIL
applies-to: [requirement, hazard, test]
cardinality: single
values: [ASIL-A, ASIL-B, ASIL-C, ASIL-D, QM]
- key: Priority
applies-to: [requirement, change]
cardinality: single
values: [critical, high, medium, low]
Profile-declared attributes are validated just like core attributes: unknown
cardinality violations raise MSL-A013. The difference is that these rules only
activate when the declaring profile is present.
Attribute ordering
markspec fmt normalizes the trailer attribute order:
IdType- Relation attributes (
Satisfies,Derived-from,Verifies,Tests, …) LabelsReferencesExternal-idSupersedes/Superseded-byDeprecated- Any remaining profile-declared attributes (alphabetical)
Attribute order has no semantic significance — the normalized order is purely for readability and diff stability.