Skip to content

Export says which family a rule belongs to, and an axiom rule its kind and declaring predicate - #910

Merged
WaylandYang merged 1 commit into
devfrom
feat/rule-export-family-and-kind
Sep 24, 2026
Merged

WaylandYang merged 1 commit into
devfrom
feat/rule-export-family-and-kind

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

The first cut decided in #902.

A derivation's generating rule reached the export as a prov:Activity with only an rdfs:label, so a reader parsed the label to learn whether an axiom or a business rule produced a conclusion, and for inverse and sub_property could not recover which predicate the axiom was declared on without re-deriving the engine's convention from the exported owl:inverseOf / rdfs:subPropertyOf.

  • Every rule resource is typed utopia:AxiomRule or utopia:BusinessRule.
  • An axiom rule carries utopia:axiomKind (transitive, symmetric, inverse, sub_property) and utopia:declaredOn, the IRI of the predicate the declaration sits on, which for inverse and sub_property differs from the conclusion's rdf:predicate. derived_page reads rules.predicate_id in the same query; a predicate outside the base's vocabulary is simply not emitted, as rdf:predicate already behaves.
  • The label stays. No storage names in the vocabulary.
  • Business-rule conditions and expressions are not exported, and 0020 now says why under What is not here: a business rule is edited in place, so …:rule:{id} cannot vouch for the definition an older conclusion was drawn under. That waits for rule versioning.

Recorded as a dated revision of 0020 (index row updated); web/src/docs/mcp.md says the same. The two serializer tests assert the family type on both families, the kind and the declaring predicate on the axiom one, and their absence on the business one. rdf and export tests and clippy pass locally.

Refs #902.

🤖 Generated with Claude Code

…d and declaring predicate

A derivation's generating rule reached the export as a prov:Activity
with only an rdfs:label, so a reader parsed the label to learn whether
an axiom or a business rule produced a conclusion, and for inverse and
sub_property could not recover which predicate the axiom was declared
on without re-deriving the engine's convention from the exported
owl:inverseOf / rdfs:subPropertyOf.

Every rule resource is now typed utopia:AxiomRule or utopia:BusinessRule.
An axiom rule carries utopia:axiomKind (the closed enum) and
utopia:declaredOn, the IRI of the predicate the declaration sits on,
read from rules.predicate_id in the same derived_page query. The label
stays. Business-rule conditions and expressions are not exported: a
business rule is edited in place, so its IRI cannot vouch for the
definition an older conclusion was drawn under; that waits for rule
versioning. Recorded as a dated revision of 0020; the MCP guide says
the same.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Wayland Yang <wayland0916@gmail.com>
@WaylandYang
WaylandYang merged commit 8857be5 into dev Sep 24, 2026
7 checks passed
@WaylandYang
WaylandYang deleted the feat/rule-export-family-and-kind branch September 24, 2026 17:06
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