ECSS SMP L2 — Link General Rules (space-systems/ecss/e4008-link-general)
Use when the task is the part of an SMP Level-2 assembly artefact that every
link shares, per ECSS-E-ST-40-08C clause 5.2.7.1 — naming, kind, endpoint
resolution and duplication — decided before any interface, event or field
typing rule is applied.
Domain quick reference
- A link is a named element of the assembly, not an anonymous edge. The name is
what a Link Base entry, a diagnostic and a later amendment all refer to, so a
name that repeats makes two different connections indistinguishable in every
downstream report.
- Three link kinds exist: interface, event and field. Each adds its own typing
rule on top of these general ones. A kind outside the three cannot be graded
by any of those rules, so it is refused at the general level rather than
passed on to a loader that will guess.
- An endpoint is a single dotted path that contains both the instance and the
element on it, and the split between them is not syntactic. It is found by
matching the longest declared instance path that prefixes the endpoint, which
is why a nested instance and its parent can both be legitimate endpoints and
why the deeper one has to win.
- Two failure shapes look alike and are not: an endpoint that resolves to no
declared instance dangles, and an endpoint that resolves exactly onto an
instance names no element at all. The first usually means a missing instance;
the second means a truncated path.
- Scope is the assembly's own instance set. An endpoint reaching a path the
assembly did not create is out of scope even when that path exists somewhere
in the simulator, because the assembly cannot guarantee its presence at the
moment it is applied.
Workflow
- Build the instance scope from the declared instance paths, refusing a path
declared twice before any link is examined.
- For each link, validate the name as an identifier and record it, flagging a
repeat against the position that first used it.
- Categorize the declared kind against the three admitted kinds and stop
grading a link whose kind is outside them.
- Resolve each endpoint by longest declared-prefix match, separating the
dangling case from the names-no-element case in the finding text.
- Compare the two resolved instances; unless the assembly explicitly permits a
self-link, a link whose endpoints sit on one instance is refused.
- Form the (kind, source, target) signature and flag a second link carrying a
signature already seen, naming the link it duplicates.
- Report the accepted links, a per-kind tally for the kind-specific gates that
run next, and every finding.
Pitfalls
- Splitting an endpoint on the last dot. The element of a link can itself be a
nested path, so a fixed split puts the wrong boundary between instance and
element and turns a valid endpoint into a dangling one.
- Matching the first instance prefix rather than the longest. A parent instance
prefixes every child path, so first-match silently attaches a child's element
to its parent and the link connects something that was never intended.
- Treating a repeated link as harmless because both copies are identical. The
duplicate is what makes a later single-sided amendment diverge, and an
identical pair is the only kind a text diff will not show as a conflict.
- Grading kind-specific typing before the general rules. A field-type mismatch
reported on a link whose target does not exist sends the reader to the
datatypes when the real defect is a missing instance.
- Permitting a self-link by default because a model legitimately feeds itself.
Self-connection is a deliberate assembly decision; making it the default hides
the common case where a copied link never had its target updated.
Behavior contract (gate 3)
The identifier rule, instance-scope construction, longest-prefix endpoint
resolution, kind grading, self-link rule and duplicate-signature detection are
exercised by the gate 3 contract test:
scripts/test_e4008_link_general.py against
scripts/e4008_link_general_logic.py (stdlib unittest, offline). Run:
python3 scripts/test_e4008_link_general.py
Compliance
- ECSS standards are freely downloadable (ESA); cite the source and
paraphrase per standards-map.yaml.
- compliance: STANDARDS-REF, gated: false.
1---2name: e4008-link-general3description: "Verify the general rules every link in an SMP Level-2 assembly artefact obeys before its kind-specific typing is reached, per ECSS-E-ST-40-08C clause 5.2.7.1: each link name is a valid identifier and unique in the assembly, the declared kind is interface, event or field, both endpoints resolve onto a declared instance by longest-path match with an element left over, no endpoint dangles or reaches outside the assembly scope, the same kind-source-target triple is not declared twice, and an instance is not joined to itself. Use when an assembly fails to connect, a link silently does nothing, or a whole link set needs grading. Trigger: ecss, e-st-40-08c, smp-level-2, assembly-link-set, link-endpoint-resolution, duplicate-link-detection, dangling-link-endpoint, assembly-link-naming."4license: Apache-2.05compliance: STANDARDS-REF6standards:7 - id: ecss8 reference-only: true9gated: false10domain: space-systems11pack: space-systems12compatibility: "agentskills.io SKILL.md; any SKILL.md host (Claude Code, Hermes, OpenClaw)"13metadata:14 source: https://skillmd.com/skills/ashfordeou/e4008-link-general15 domain: space-systems16 subdomain: ecss17 tags: [ecss, e-st-40-08c-smp-level-2, e4008-link-general, smp-assembly-artefact, assembly-link-set, link-endpoint-resolution, duplicate-assembly-link, assembly-link-scope]18 version: 0.1.019 author: Aero Agent Skills20---2122# ECSS SMP L2 — Link General Rules (space-systems/ecss/e4008-link-general)2324Use when the task is the part of an SMP Level-2 assembly artefact that every25link shares, per ECSS-E-ST-40-08C clause 5.2.7.1 — naming, kind, endpoint26resolution and duplication — decided before any interface, event or field27typing rule is applied.2829## Domain quick reference3031- A link is a named element of the assembly, not an anonymous edge. The name is32 what a Link Base entry, a diagnostic and a later amendment all refer to, so a33 name that repeats makes two different connections indistinguishable in every34 downstream report.35- Three link kinds exist: interface, event and field. Each adds its own typing36 rule on top of these general ones. A kind outside the three cannot be graded37 by any of those rules, so it is refused at the general level rather than38 passed on to a loader that will guess.39- An endpoint is a single dotted path that contains both the instance and the40 element on it, and the split between them is not syntactic. It is found by41 matching the longest declared instance path that prefixes the endpoint, which42 is why a nested instance and its parent can both be legitimate endpoints and43 why the deeper one has to win.44- Two failure shapes look alike and are not: an endpoint that resolves to no45 declared instance dangles, and an endpoint that resolves exactly onto an46 instance names no element at all. The first usually means a missing instance;47 the second means a truncated path.48- Scope is the assembly's own instance set. An endpoint reaching a path the49 assembly did not create is out of scope even when that path exists somewhere50 in the simulator, because the assembly cannot guarantee its presence at the51 moment it is applied.5253## Workflow54551. Build the instance scope from the declared instance paths, refusing a path56 declared twice before any link is examined.572. For each link, validate the name as an identifier and record it, flagging a58 repeat against the position that first used it.593. Categorize the declared kind against the three admitted kinds and stop60 grading a link whose kind is outside them.614. Resolve each endpoint by longest declared-prefix match, separating the62 dangling case from the names-no-element case in the finding text.635. Compare the two resolved instances; unless the assembly explicitly permits a64 self-link, a link whose endpoints sit on one instance is refused.656. Form the (kind, source, target) signature and flag a second link carrying a66 signature already seen, naming the link it duplicates.677. Report the accepted links, a per-kind tally for the kind-specific gates that68 run next, and every finding.6970## Pitfalls7172- Splitting an endpoint on the last dot. The element of a link can itself be a73 nested path, so a fixed split puts the wrong boundary between instance and74 element and turns a valid endpoint into a dangling one.75- Matching the first instance prefix rather than the longest. A parent instance76 prefixes every child path, so first-match silently attaches a child's element77 to its parent and the link connects something that was never intended.78- Treating a repeated link as harmless because both copies are identical. The79 duplicate is what makes a later single-sided amendment diverge, and an80 identical pair is the only kind a text diff will not show as a conflict.81- Grading kind-specific typing before the general rules. A field-type mismatch82 reported on a link whose target does not exist sends the reader to the83 datatypes when the real defect is a missing instance.84- Permitting a self-link by default because a model legitimately feeds itself.85 Self-connection is a deliberate assembly decision; making it the default hides86 the common case where a copied link never had its target updated.8788## Behavior contract (gate 3)8990The identifier rule, instance-scope construction, longest-prefix endpoint91resolution, kind grading, self-link rule and duplicate-signature detection are92exercised by the gate 3 contract test:93scripts/test_e4008_link_general.py against94scripts/e4008_link_general_logic.py (stdlib unittest, offline). Run:95python3 scripts/test_e4008_link_general.py9697## Compliance9899- ECSS standards are freely downloadable (ESA); cite the source and100 paraphrase per standards-map.yaml.101- compliance: STANDARDS-REF, gated: false.