eclipse-score/communication/score-safety-analysis
Claude Code and agent skill by eclipse-score/communication
- community
Checking that the SKILL.md file is still in the repository.
Step-by-step workflow for creating or extending a FMEA-based safety analysis in TRLC format for S-CORE software components. Use when asked to: add failure modes, create FTA diagrams, assess root causes, or validate the safety analysis traceability chain. Covers clustering, FailureMode records, FTA PlantUML files, RootCauseAssessment records, BUILD wiring, and trlc validation.
Install
npx vskill@latest install eclipse-score/communication/score-safety-analysisSKILL.md
S-CORE Safety Analysis — TRLC Workflow
When to Use
- Adding new failure modes to an existing safety analysis
- Creating FTA diagrams for root-cause decomposition
- Assessing identified root causes with RootCauseAssessment records that list CompReq / AoU measures
- Validating the full traceability chain before a review of a safety analysis
Key Files and Locations
The canonical RSL (type definitions) lives in: eclipse-score-tooling/bazel/rules/rules_score/trlc/config/score_requirements_model.rsl
Workflow: analyse first, then wire the artifacts
Safety analysis has two phases, in order — the TRLC/FTA files are the output of the analysis, not the analysis itself:
Step A — Perform the FMEA (safety reasoning)
Reason about failures before writing records. This is a safety-engineering activity governed by the S-CORE Safety Analysis in `docs/user_guide/dependability_analysis.rst` (Performing the Analysis). See Authoring guidance below.
Collaborate when severity, plausibility, or measure sufficiency is uncertain — propose the failure modes / causes / measures you intend to record and confirm the safety judgement rather than inventing it.
Step B — Wire the artifacts (mechanical)
Only once the failure modes, causes, and measures are decided, transcribe them into the files below (Steps 1–5). This is mechanical: one FailureMode per decided effect, one FTA per failure mode, one RootCauseAssessment per $RootCause (or per group sharing one argument), matching aliases, BUILD wired, trlc clean.
Authoring guidance: performing the FMEA
Step 1 — identify failure modes per interface. Walk the public_api method by method; for each, apply the applicable fault models and ask "can this occur, and would it violate a safety goal?" Dismiss low-relevance models with a short rationale.
| Fault-model category | Example models | Guideword labels | |
|---|---|---|---|
| Message (send/receive) | not sent/received, corrupted, lost, unintended (MF_01_*) | LossOfFunction, PartialFunction, Corrupted, UnintendedFunction, Wrong | |
| Timing / duration | too late/early, boundary violated (CO_01_*) | TooEarly, TooLate, DelayedFunction | |
| Execution | wrong result, loss, arbitrary/incomplete (EX_01_*) | Wrong, LossOfFunction, ExceedingFunction, ArbitraryExecution |
Clustering: oneFailureModeper (interface, guide word) effect — group methods sharing aroot cause in theinterfacelist; one root cause under two guide words → two records.
Step 2 — effect, then causes. Write failureeffect from the caller/system perspective in worst-case terms relative to the safety goal. Then build the FTA top-down to actionable root causes: $OrGate (default) when any single cause suffices; $AndGate only when all must co-occur (a fault and a failed safety mechanism — this justifies lower residual risk). Decompose until each $RootCause is something you can place a measure on.
Step 3 — one assessment per root cause, listing the measures that close it, chosen by who closes it:
Measure in measures | Use when it… | |
|---|---|---|
CompReq | the SEooC itself closes it with an implemented-and-tested component requirement | |
AoU | can only be guaranteed by the integrator/caller | |
none (measures = []) | the root cause does not apply; the rationale says why |
The measures never reference the root cause; only the RootCauseAssessment does. Use an AoU to push an obligation outward when the SEooC cannot close a cause itself; it must be forwarded to the integrating project. Record why the measures are sufficient in the rationale (AND-gate argument, diagnostic coverage), and give a FailureMode the ASIL of the safety goal it can violate.
Step 1 — Write FailureMode Records (failure_modes.trlc)
Package: match the existing package declaration in the folder structure
<ArchApiPkg> is the package of the architectural_design target. The build generates one ScoreReq.ApiMethod record per public method (all overloads) and per free function of its public_api class diagrams, named <Entity>_<method> (<Entity> = namespace-qualified entity id, . → _, e.g. ns_Interface_Send); the failure_modes target lists the architectural_design in deps.
Guideword enum values: LossOfFunction, PartialFunction, Corrupted, UnintendedFunction, TooEarly, TooLate, Wrong, DelayedFunction, ExceedingFunction, ArbitraryExecution
Rules:
- One record per FailureMode, not per interface method.
- Same root cause spanning multiple guide words → separate records.
interfacemay list severalApiMethodrecords when the root cause is shared.
Step 2 — Create FTA Diagrams (fta_<snake_name>.puml)
Use $FailureMode(name, fm1, fm2="", ..., fm8="") to link the diagram's top-level node directly to the FailureMode record(s) it covers — fm1 is mandatory, up to fm8 may be given, each a fully-qualified <Pkg>.<FailureModeRecord> name. fm1 also doubles as the node's connection point for gates.
Procedures reference:
| Procedure | Purpose | connection points to | |
|---|---|---|---|
$FailureMode(name, fm1, fm2, ..., fm8) | Top failure mode; fm1..fm8 are FailureMode FQNs it covers | — (root, no connection); fm1 is the alias used by child gates | |
$OrGate(alias, connection) | Any child sufficient | parent alias | |
$AndGate(alias, connection) | All children required | parent alias | |
$RootCause(name, alias, connection) | Root cause / leaf — alias must be a plain TRLC identifier (no dotted Package.Name) | enclosing gate alias | |
$IntermediateEvent(name, alias, connection) | Intermediate cause | parent gate alias | |
$TransferInGate(alias, connection) | Transfer in the root causes of another tree; alias is a FailureMode FQN covered by that tree's $FailureMode (any of fm1..fm8) | parent alias |
Rules:
$RootCausealias is a plain identifier; thepuml_cliFTA parser auto-generates afta_events.trlcstub (imported as<fta_package>, default derived from the target label) containing aRootCauserecord named after that alias (itsfailure_modeslists theFailureModes of the tree's$FailureModeroot) — aRootCauseAssessmentreferences it explicitly (e.g.root_causes = [sample_safety_analysis_fta.JustBadLuck]); there is no implicit name-matching.- Build top-down in the file:
$FailureModefirst, then gates, then$RootCauseleaves. - The same
$RootCausealias may appear in multiple FTAs (shared root cause). $TransferInGatetarget must be covered by exactly one$FailureModein thesrcsof the samefault_treestarget (other diagrams or the same one); unknown, ambiguous or cyclic targets fail the build. The transferring tree also inherits the root causes of the target tree (transitively).$TransferInGatelimits: the alias must be a failure-mode FQN (free labels such asTransfer1fail); no transfer into anotherfault_treestarget; the alias is also the PlantUML shape name, so gates of one diagram with the same target share one triangle, and a gate cannot namefm1of a$FailureModein its own diagram (namefm2..fm8or use a separate diagram). An inherited root cause is assessed once, and its assessment ASIL must be at least that of every failure mode of every tree it is part of.$OrGateis the default for independent root causes; use$AndGateonly when all causes must co-occur.
Step 3 — Write Root Cause Assessments (assessments.trlc)
Every $RootCause alias in every FTA is covered by exactly one RootCauseAssessment. Root causes that share the same argument may be grouped in one assessment. root_causes, measures, safety, rationale and version are all mandatory; root_causes references the generated RootCause stub(s), measures the versioned AoU / CompReq records closing them ([] states that the root causes do not apply):
The measures:
ScoreReq.CompReq— a normal component requirement; it derives fromFeatReq/AssumedSystemReqas usual and does not reference the root cause. AnAoUinderived_fromis only for an AoU received from another dependable element; the element's own AoUs are never aderived_fromsourceScoreReq.AoU— own assumption the caller must satisfy; a plain condition with no root-cause field
The @<version> of a measure pins the reviewed version; a version change of the measure breaks the reference and forces a new review.
safety is the ASIL of the argument: at least the ASIL of the failure modes of the covered root causes, at most the ASIL of every listed measure ([] measures skip the upper bound). The assembler fails the build otherwise.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/score-safety-analysis/SKILL.md
Popularity
- Repository stars
- 60
- Repository forks
- 94
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/eclipse-score/communication/score-safety-analysis)