Skip to content

feat(ledger-core): wire up ufo-types — Stereotyped for ArtifactKind - #145

Open
elasticdotventures wants to merge 1 commit into
b00t-patchesfrom
chore/ufo-types-ledger-core-integration
Open

feat(ledger-core): wire up ufo-types — Stereotyped for ArtifactKind#145
elasticdotventures wants to merge 1 commit into
b00t-patchesfrom
chore/ufo-types-ledger-core-integration

Conversation

@elasticdotventures

Copy link
Copy Markdown
Member

Summary

  • ufo-types' own module docs describe the intended architecture as ufo-types (traits) -> ledger-core (domain impls) -> MCP actions, but ledger-core had zero actual reference to ufo-types — this PR realizes it.
  • ufo-types was recently extracted from elasticdotventures/_b00t_ into its own standalone repo: https://github.com/PromptExecution/ufo-types (git history preserved). This PR adds it as a real dependency of ledger-core, pinned to the v0.10.1 tag.
  • Implements Stereotyped for ArtifactKind in crates/ledger-core/src/ontology.rs, classifying every existing ArtifactKind variant according to Guizzardi's Unified Foundational Ontology:
    • Kind (rigid, independent entity): Document, Account, Institution, Transaction, TaxCategory, XeroContact, ModelJob, WorkbookRow
    • SubKind (rigid specialization of one of the above): XeroBankAccount (⊆ Account), XeroInvoice (⊆ Document), DocumentChunk (⊆ Document)
    • Relator (moment mediating between artifacts): EvidenceReference, ModelProposal, AuditEvent
    • Mode (intrinsic quality/state of one artifact): WorkflowTag, ValidationIssue, ClassificationOutcome
  • This gives a future record_is_a(subject, ufo_stereotype) evidence-layer call (NS-9, per ufo_types::stereotype docs) real ontological labels to emit for ledger-core artifacts, instead of ledger-core needing to invent its own classification scheme from scratch.

Test plan

  • cargo build -p ledger-core — clean, correctly resolves ufo-types from the new repo (Compiling ufo-types v0.10.1 (https://github.com/PromptExecution/ufo-types.git?tag=v0.10.1#2c919f24))
  • cargo test -p ledger-core ontology — all 6 ontology tests pass, including the 2 new ones (artifact_kind_ufo_stereotype_labels, artifact_kind_ufo_stereotype_covers_every_variant)

Realizes the architecture ufo-types' own module docs already describe:
ufo-types (traits) -> ledger-core (domain impls) -> MCP actions. This was
previously documented but unimplemented — ledger-core had zero reference
to ufo-types despite being its intended first real consumer.

Implements Stereotyped for ArtifactKind, classifying every existing
ontology.rs artifact kind per Guizzardi's UFO (Kind/SubKind/Relator/Mode)
so a future record_is_a(subject, ufo_stereotype) evidence-layer call has
real ontological labels to emit, instead of ledger-core reinventing its
own classification scheme.

Depends on ufo-types v0.10.1 from its new standalone repo
(github.com/PromptExecution/ufo-types), pinned via git tag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant