ISO 26262 / ASPICE workflow
A reference setup for automotive functional-safety and process-compliance projects. This recipe covers the entry type vocabulary, V-model traceability structure, and required label vocabulary.
Profile
MarkSpec does not bundle a turnkey ISO 26262 / ASPICE profile — declare the
compliance vocabulary in a local profile and point .markspec.yaml at it:
profiles:
- "./profiles/compliance"
with profiles/compliance/markspec.yaml declaring the types below. Each type
extends: a core type and gets a display-id-pattern:
id: "@acme/compliance"
version: 0.1.0
markspec-schema: "1"
profile:
types:
system-requirement:
extends: Requirement
display-id-pattern: "SYS_{n:4d}"
traceability:
Satisfies:
target: [stakeholder]
software-requirement:
extends: Requirement
display-id-pattern: "SRS_{n:4d}"
traceability:
Satisfies:
target: [system-requirement]
# … hazard (extends Risk), validation-test/unit-test (extends Test), etc.
See the Profile guide for the full manifest schema.
Entry type vocabulary
A complete compliance profile declares entry types along these lines:
| Display-ID prefix | Type | Extends | Level |
|---|---|---|---|
STK_ | stakeholder | Requirement | Acceptance |
SYS_ | system-requirement | Requirement | System |
SRS_ | software-requirement | Requirement | Software |
ARC_ | architecture | Contract | Software |
ICD_ | interface | SoftwareInterface | Software |
TST_ | validation-test | Test | Acceptance |
SIT_ | integration-test | Test | System |
SWT_ | unit-test | Test | Software |
HZD_ | hazard | Risk | System |
V-model traceability structure
STK (stakeholder)
└─ Satisfies ─→ SYS (system requirement)
└─ Satisfies ─→ SRS (software requirement)
└─ Satisfies ─→ ARC / ICD
TST (validation) ←─ Verifies ─ STK
SIT (integration) ←─ Verifies ─ SYS
SWT (unit test) ←─ Verifies ─ SRS
The compiler generates inverse edges automatically — authors only write the
forward Satisfies: and Verifies: attributes.
ASIL labels
Entries carry an ASIL label in the trailer block via the Labels: attribute —
no separate declaration is required. labels: in project.yaml is inert org
project metadata (tags on the project itself); it does not constrain or enforce
which Labels: values entries may carry.
- [SRS_BRK_0107] Sensor debouncing
The sensor driver shall debounce raw inputs to eliminate transient noise
spikes of duration less than 10 ms.
Id: 01HGW2Q8MNP3RSTVWXYZABCDEF
Satisfies: SYS_BRK_0042
Labels: ASIL-B
In-code entries (V-model colocated)
Software requirements and unit tests at the SRS/SWT level are colocated in source files using doc comments:
#![allow(unused)]
fn main() {
/// [SRS_BRK_0107] Sensor debouncing
///
/// The sensor driver shall debounce raw inputs to eliminate
/// transient noise spikes of duration less than 10 ms.
///
/// Id: 01HGW2Q8MNP3RSTVWXYZABCDEF
/// Satisfies: SYS_BRK_0042
/// Labels: ASIL-B
#[cfg(test)]
fn swt_brk_0107_debounce_rejects_short_pulse() {
let result = debounce(5); // 5 ms pulse, below 10 ms threshold
assert!(!result.passed);
}
}
Coverage report
markspec compile "docs/**/*.md" "src/**/*.rs"
markspec report coverage "docs/**/*.md" "src/**/*.rs"
The coverage report shows which requirements have at least one linked test and which are uncovered — the key metric for ISO 26262 traceability audits.
CI gate
Add to your pipeline (see CI traceability gate):
markspec check --strict "docs/**/*.md" "src/**/*.rs"
markspec report coverage "docs/**/*.md" "src/**/*.rs" --output coverage.md
Flag the coverage report as a required CI artifact for the functional safety manager’s review.