Skip to content

docs: align spec yaml ai_context shape#221

Open
CooperSheroy wants to merge 1 commit into
apache:mainfrom
CooperSheroy:catalina/spec-yaml-ai-context-20260717
Open

docs: align spec yaml ai_context shape#221
CooperSheroy wants to merge 1 commit into
apache:mainfrom
CooperSheroy:catalina/spec-yaml-ai-context-20260717

Conversation

@CooperSheroy

Copy link
Copy Markdown

Summary

  • update core-spec/spec.yaml so ai_context is shown as a structured object while noting simple strings are also accepted
  • add the relationship ai_context field that already exists in the JSON schema and spec docs

Closes #141.

Validation

  • ruby -e 'require "yaml"; YAML.load_stream(File.read("core-spec/spec.yaml")); puts "YAML parse OK"'
  • jq empty core-spec/osi-schema.json

@jbonofre jbonofre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

@khush-bhatia @QMalcolm as it's a spec change, can you please do a pass? Thanks!

Comment thread core-spec/spec.yaml
# Optional: Additional context for AI tools.
# Can be a simple string or a structured object with instructions,
# synonyms, examples, or vendor-specific keys.
ai_context:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This change is making the yaml version of the spec strictly only allow three subfields which are instructions, synonyms and examples.

Instead we shoudl change the type here to be {} so it can support arbitrary key values .

The issue #141 also suggests the same thing. See

# Optional: Additional context for AI tools.
# Can be either:
#   - A free-form string, or
#   - A structured object with optional keys:
#       instructions: string  # how AI should use this entity
#       synonyms:     []      # alternative names / terms
#       examples:     []      # sample questions or use cases
#     (additionalProperties: true — vendors may add more keys)
ai_context: {}  # see AIContext in osi-schema.json

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good point. Agree!

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.

core-spec/spec.yaml declares ai_context: string but the JSON schema + canonical example use a structured object

3 participants