Skip to content

Repository files navigation

ufo-types

UFO-grounded domain types for the b00t ecosystem.

This crate provides a domain-generic ontological foundation — grounded in Guizzardi's Unified Foundational Ontology (UFO) — for any project that wants ontologically-grounded types with deterministic, audit-ready constraint evaluation. It defines:

  • UFO stereotypes (stereotype): UfoStereotype enum grounding every domain type in Guizzardi's Unified Foundational Ontology. Domain-generic — nothing here is specific to any one consumer.
  • Satisfies<C> trait (satisfies): The core constraint evaluation pattern — any domain type can implement Satisfies<Constraint> with deterministic, audit-ready results. Domain-generic.
  • Graph IR (iso_ir): Node / Edge — the free-form graph vocabulary a domain uses to describe connectivity before anything lays it out or renders it. The transport floor of the semantic-graph layer. Domain-generic; promoted from systhread-core.
  • Canonical UFO semantic graph (ontology): the ontological middle layer between iso_ir and sysml_model. UfoRelation — a closed (#[non_exhaustive]), 25-variant vocabulary that normalizes overloaded domain verbs (Kubernetes especially) via a lenient from_synonym; OntologicalEdge — a typed, category-checked edge carrying TemporalExtent and deterministic SourceAnchor provenance. Pure data, no traits, not feature-gated. Domain-neutral — verb-classification tables live downstream (kr0ki), never here.
  • SysML v2 model types (sysml_model, view): ElementKind, Relation, ElementId (opaque, never numeric), SysmlViewKind — closed, data-level KerML/SysML-v2 abstract syntax + the standard ViewDefinition kinds. The SysML v2 replacement for the rejected SysML 1.x DiagramKind / UmlRelation taxonomy. Pure data, not feature-gated. Domain-generic.
  • MBSE / statechart export (mbse, statechart): render Stereotyped types as SysML v2 part usages; bridge OODA state machines to W3C SCXML (feature-gated). Domain-generic.
  • Capability types (capability): Task, Attempt, ActionRecord, Episode, ReviewVerdict, Solution, TrainingCorpus, EnergyBudget, etc. — generic agent-capability/OODA types. Domain-generic.
  • DARED proposal types (dare): Decision, Alternative, Risk, ExecutiveDecision, OodaStateMachine — a generic OODA state-change proposal framework codified as Rust generics. Domain-generic.
  • ISO standard wrappers (iso): Lei (ISO 17442 Legal Entity Identifier), Iso4217 currency codes, and Ifrs9Classification financial-instrument types. These ARE domain-specific — they encode financial/legal-entity accounting standards and are only meaningful to consumers working in that space (e.g. Tax-Lawyer platforms). Not intended as a generic building block for unrelated domains.

Any project needing UFO-grounded domain types and the Satisfies<T> pattern (e.g. stereotype, satisfies, capability, dare) can depend on this crate directly. Only iso carries genuinely finance/tax-domain-specific types.

Versioning & stability

ufo-types is pre-1.0. Under Cargo's SemVer rules a 0.MINOR.PATCH bump gives no compatibility guarantee: a 0.MINOR release MAY remove, rename, narrow, or otherwise reverse capability. CHANGELOG.md entries that say "additive, non-breaking" state intent — a courtesy, not a contract — until 1.0.0.

Consume it accordingly:

  • Pin exact. ufo-types = "=0.14.0" (crates.io, once published) or ufo-types = { git = "https://github.com/PromptExecution/ufo-types", tag = "v0.14.0" }.
  • Read CHANGELOG.md before every bump. It is the compatibility contract until 1.0.
  • The closed #[non_exhaustive] enums (UfoRelation, ElementKind, Relation, SysmlViewKind) may gain variants in a 0.MINOR (match with a _ => arm). The lenient mappings (UfoRelation::from_synonym, case-insensitive FromStr) may be re-tuned between 0.MINORs — do not treat a specific synonym→variant mapping as stable; the strict canonical FromStr is the stable surface.
  • The "IDs are never numeric" rule (ElementId, OntologicalEdge.id) is a hard invariant and will not change.

1.0.0 will be cut once the semantic-graph layer has a downstream consumer in production (currently kr0ki's model-ingestion path, planned).

Downstream consumers

Projects cleared to depend on ufo-types directly (retire any vendored copy):

project crates modules used pin
b00t (elasticdotventures/b00t) b00t-c0re-lib, b00t-lib-chat, b00t-cli stereotype, satisfies, capability, dare =0.14.0
ledgrrr (PromptExecution/ledgrrr) ledger-core, ledgerr-mcp stereotype, satisfies, iso =0.14.0 (vendored copy retired)
kr0ki (PromptExecution/kr0ki) kr0ki-core iso_ir, ontology, sysml_model, view — the model-ingestion path tag = "v0.14.0"
m0ltis (elasticdotventures/moltis-b00t) (planned) provider→ufo-types lowering iso_ir, stereotype, sysml_model tag = "v0.14.0"
critter-keeper (app4dog) stereotype =0.14.0
cim-gridy mission-engine stereotype, satisfies =0.14.0

Rule for consumers: ufo-types stays domain-neutral. Domain vocabularies (the Kubernetes verb table, tax/finance rules beyond iso, per-lab extraction) live in the consumer, not here. If you need a new canonical UfoRelation variant or ElementKind, open an issue — do not fork the enum.

Architecture

┌───────────┐     ┌───────────────┐     ┌────────────────┐
│ ufo-types │────→│ domain impls  │────→│  MCP actions   │
│ (traits)  │     │ (consumer)    │     │ (thin wrappers)│
└───────────┘     └───────────────┘     └────────────────┘

Consumers wire ufo-types into their own domain-impl layer — for example ledger-core (part of PromptExecution/ledgrrr) implements Stereotyped for its own artifact-classification types.

Integration with evidence layers

The Stereotyped trait (from stereotype) and IsoAuditable trait (from satisfies) are designed to bridge domain types to an audit-evidence layer:

  • record_is_a(subject, ufo_stereotype) — uses Stereotyped::ufo_stereotype()
  • record_audited_by(subject, iso_standard) — uses IsoAuditable::iso_standard_ids()

The EvidenceBridge::evaluate() method on SatisfiesResult produces all labels needed for both calls in one step.

Origin

This crate was extracted from elasticdotventures/b00t (crates/ufo-types), where it originated as part of the b00t governance platform, with git history preserved. It is consumed both inside _b00t_ (b00t-c0re-lib, b00t-lib-chat) and by external projects (e.g. critter-keeper in app4dog) that only need this small, dependency-light types crate without pulling in the full _b00t_ monorepo (34 git submodules).

References

  • Guizzardi, G. (2005). Ontological Foundations for Structural Conceptual Models. PhD Thesis, University of Twente.
  • ISO 17442:2012 — Legal Entity Identifier (LEI) (iso module only)
  • ISO 4217:2015 — Codes for the representation of currencies (iso module only)
  • IFRS 9 — Financial Instruments (IASB, 2014) (iso module only)

License

MIT — see LICENSE.

About

UFO stereotypes, Satisfies<T> constraint trait, DARE proposal types, and ISO wrappers — ontology/types library for the b00t ecosystem

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages