Skip to content

feat(core-spec): add semantic_model.behavior with actions/effects#105

Open
zljie wants to merge 1 commit into
open-semantic-interchange:mainfrom
zljie:feat/semantic-model-behavior
Open

feat(core-spec): add semantic_model.behavior with actions/effects#105
zljie wants to merge 1 commit into
open-semantic-interchange:mainfrom
zljie:feat/semantic-model-behavior

Conversation

@zljie
Copy link
Copy Markdown

@zljie zljie commented Apr 14, 2026

PR: feat(core-spec): add semantic_model.behavior with actions/effects (alias action_types)

What

This PR adds an optional, vendor-agnostic first-class behavior block to OSI Core:

  • semantic_model.behavior
  • behavior.actions (preferred) with legacy alias behavior.action_types
  • action.effects for machine-readable impact annotations (what a behavior reads/writes/derives)

Why

Many agent-driven workflows require deterministic action planning and attribution:

  • verify an action plan is executable (inputs are satisfiable; steps are consistent)
  • explain “what changed/why” for state fields and master data mutations
  • derive impacted scope for governance and impact analysis

Embedding behavior under custom_extensions works but is not easily discoverable/validatable by generic tooling. Promoting a standard first-class block improves interoperability while preserving extensibility.

Backwards compatibility

  • semantic_model.behavior is optional (additive change).
  • Tools may keep supporting legacy embedded behavior JSON under custom_extensions.
  • Within behavior, actions is preferred; action_types remains a supported alias.

Validation

Local validation passed using validation/validate.py:

  • examples/p2p_behavior_effects_minimal.yaml
  • examples/tpcds_semantic_model.yaml

Files changed

  • core-spec/spec.yaml
  • core-spec/spec.md
  • core-spec/osi-schema.json
  • core-spec/behavior-layer.schema.json (new)
  • core-spec/behavior-layer.md (new)
  • examples/p2p_behavior_effects_minimal.yaml (new)
  • examples/tpcds_semantic_model.yaml (version bump)

Example included

Minimal SAP P2P example:

  • suppliers/block and suppliers/unblock actions
  • effects impacting suppliers.status

@jbonofre jbonofre self-requested a review April 21, 2026 12:30
Copy link
Copy Markdown
Collaborator

@jbonofre jbonofre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please clarify between behavior-layer.schema.json and osi-schema.json?

Comment thread core-spec/osi-schema.json
"required": ["vendor_name", "data"],
"additionalProperties": false
},
"Behavior": {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused here: it seems we have two behavior type definition:

  • in behavior-layer.schema.json with standalone schema
  • in osi-schema.json inline as $defs/Behavior, $defs/BehaviorAction, $defs/BehaviorEffect, $defs/BehaviorRule

I see already some differences before the two definitions.

Why not having osi-schema.json reference behavior-layer.schema.json via $ref.

I guess that having two schemas that must kept in sync manually will drift.

"properties": {
"entity": { "type": "string", "enum": ["dataset", "field", "metric", "relationship"] },
"mode": { "type": "string", "enum": ["read", "write", "derive"] },
"impact_type": { "type": "string" },
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

impact_type is a string here, but an implicit enum in spec.yaml.

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.

2 participants