Skip to content

Decision needed: how does systhread's FR8/FR9 (ufo-types stereotypes + SysML derive) relate to sysml-derive? #202

Description

@elasticdotventures

Context

nem-poweragent-lab is building systhread, a standalone MBSE/SysML-v2 capability (spec:
docs/superpowers/specs/2026-08-25-systhread-design.md). Phase 0 (systhread-core) and Phase 1
(systhread-cli, PR nem-poweragent-lab#36)
are done. ledgrrr is planning to incorporate systhread in its next major version — this issue
is the concrete decision that needs settling before Phase 2 (FR8/FR9) can be planned.

FR8/FR9 were deliberately left open in the original design spec: they build on
ufo_types::UfoStereotype and this repo's sysml-derive crate rather than inventing a new
taxonomy or macro, but "which of {extend sysml-derive in place, wrap it, re-export it}" was
explicitly punted to Phase 2, needing this repo's owner's input.

What I found checking the current state of sysml-derive (not assuming from the spec)

crates/sysml-derive today is #[derive(SysmlBlock)] — a proc-macro that walks a Rust struct's
fields via syn and generates a part def { ... } SysML-v2 text block at compile time. Its own
Cargo.toml describes it as a "Spike." Real, current facts, not inferred:

  • It has no dependency on ufo_types::UfoStereotype at all — it maps Rust field types
    (Vec<T>, Option<T>, numeric primitives, chrono::DateTime, opaque domain types) to SysML
    ScalarValues/multiplicity syntax. It never touches the endurant/perdurant stereotype taxonomy
    UfoStereotype covers.
  • It's validated against a real grammar (ufo_types::sysml::validate_sysml_v2, via
    sysml-v2-parser) in crates/sysml-derive/tests/real_grammar_validation.rs — not just visually
    inspected.
  • It (and holon-viz) already pin ufo-types at PR chore: autonomous v1.1 closeout and archival #3's branch tip
    (rev = "1881d67", unmerged) as a dev-dependency workaround.
    This isn't a hypothetical
    blocker for systhread Phase 2 — ufo-types#3
    and ledgrrr#201 being unmerged is already
    a live workaround inside this repo today, for two different crates.

The actual decision needed

systhread's FR9 needs "a Rust→SysML derive macro" for Part/containment-only models (Phase 1 scope),
eventually covering UfoStereotype-tagged types (Phase 2+, FR8). Concretely:

  1. Depend on sysml-derive as-is. #[derive(SysmlBlock)]'s field-mapping logic already does
    most of what a Part-only model needs; systhread would consume it directly rather than
    reimplementing struct-to-part def mapping.
  2. Extend sysml-derive in place with whatever UfoStereotype-aware mapping FR8 needs beyond
    what the field-type mapping already covers (e.g. stereotype → SysML <<...>> metadata,
    endurant/perdurant → the right SysML construct).
  3. Wrap/re-export sysml-derive behind a systhread-owned trait, keeping sysml-derive itself
    Part/containment-agnostic.
  4. Build something independent in systhread-core — explicitly the option the design spec argues
    against ("don't reinvent the wheel"), listed here only for completeness.

I don't think this is mine to decide unilaterally — it's ledgrrr's crate and ledgrrr's owner who
has to live with whichever shape wins. Flagging it now, grounded in what the crate actually does
today, rather than letting Phase 2 planning start on an assumption.

Also relevant

  • #182 — the CLIF/FOL backlog item from
    the same reconciliation lineage; not the same question, but adjacent (both trace back to the
    ufo-types consolidation).
  • Regardless of which option above is chosen, ufo-types#3
    / ledgrrr#201 merging is a shared
    prerequisite — both sysml-derive and holon-viz are already pinned to its unmerged branch tip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions