From f91d7cd901c19fc1111ca2042999a38be573bc87 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 10 Oct 2026 21:32:50 +0000 Subject: [PATCH] feat(libraries): add MigrationMetadata::AppliedStereotype MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A migrated element may carry a source stereotype its v2 form does not keep: the element is itself the stereotype's form (a dependency for a «Trace»), or the stereotype comes from a profile the migration did not write. AppliedStereotype records the stereotype, the profile when it is not in the document, and the tag values no v2 feature holds, so tooling can still query them instead of reading a comment. The engine contract lists it as migrator-emitted; semver minor. Co-Authored-By: jason.han --- engine-contract.json | 14 ++++++++++++++ libraries/MigrationMetadata.sysml | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/engine-contract.json b/engine-contract.json index 783385b..b0c8908 100644 --- a/engine-contract.json +++ b/engine-contract.json @@ -632,6 +632,20 @@ "kind": "package", "consumers": [] }, + { + "name": "MigrationMetadata::AppliedStereotype", + "kind": "metadata", + "attributes": [ + "stereotype", + "profile", + "tags" + ], + "migratorEmitted": true, + "consumers": [ + "internal/semantic/semantics/synthesized_name.go", + "internal/translate/migrate/migrate.go" + ] + }, { "name": "MigrationMetadata::DeferredEvent", "kind": "metadata", diff --git a/libraries/MigrationMetadata.sysml b/libraries/MigrationMetadata.sysml index 169dd88..af5bc02 100644 --- a/libraries/MigrationMetadata.sysml +++ b/libraries/MigrationMetadata.sysml @@ -34,6 +34,18 @@ library package MigrationMetadata { attribute sourceName : ScalarValues::String; } + metadata def AppliedStereotype { + doc /* The annotated element carried the named stereotype in the + * source, and its v2 form does not: the element is itself the + * stereotype's form, as a dependency is a «Trace»'s, or the + * stereotype comes from a profile the migration did not write, + * named by profile. tags keeps, as `tag = value`, the tag values + * no v2 feature holds. */ + attribute stereotype : ScalarValues::String; + attribute profile : ScalarValues::String[0..1]; + attribute tags : ScalarValues::String[0..*]; + } + metadata def StandIn { doc /* The annotated element stands for no element of the source: the * migration made it up to write what the source left implicit,