Skip to content

feat: add premise-driven schema selection#47

Merged
rlippmann merged 1 commit into
mainfrom
premise-schema-selection
Jul 5, 2026
Merged

feat: add premise-driven schema selection#47
rlippmann merged 1 commit into
mainfrom
premise-schema-selection

Conversation

@rlippmann

Copy link
Copy Markdown
Owner

Summary

Adds premise-driven schema selection to the generic refund_intake examples in Python and TypeScript while preserving the existing policy-driven behavior.

The examples now show two host-owned schema-selection paths:

  • use refund_intake / use technical_support selects a schema from policy state.
  • Saved order facts in premise select a schema through a deterministic intake-context rule.

The same ambiguous request, I need help with order A-100., can now select different schemas based on authoritative state rather than model output or user wording.

Why

Schema selection is a natural fit for premise because factual context can change how the same request should be interpreted.

This strengthens premise coverage outside prompt construction and shows:

authoritative premise -> host-owned intake context -> selected schema

without adding provider, live-model, or directive-drafter complexity.

Example metadata

  • Enforcement point: schema selection
  • Domain: customer order/support intake
  • Technology/runtime: generic Python and TypeScript
  • Example type: minimal example
  • Does this use directive drafter? should normally be no: no
  • Does this derive state from model output? must be no for primary examples: no

Checklist

  • Repository scaffolding / governance change
  • One primary enforcement point
  • Explicit authoritative state
  • No model-derived state mutation
  • Adversarial stub or equivalent test
  • Observable runtime behavior change
  • Domain vocabulary is natural
  • Framework is secondary to the enforcement point
  • Docs updated
  • Tests/smoke checks added where practical

Notes

Validation performed:

  • ./scripts/validate_python.sh — passed, 178 passed, 6 skipped
  • ./scripts/validate_typescript_fast.sh — passed
  • npx --yes markdownlint-cli2 python/examples/schema_selection/refund_intake/README.md python/examples/schema_selection/README.md typescript/examples/schema_selection/refund_intake/README.md typescript/examples/schema_selection/README.md — passed, 0 error(s)

Ollama, LiteLLM, Vercel AI SDK, live-model paths, and directive-drafter behavior were intentionally left unchanged.

@rlippmann
rlippmann merged commit e9bd750 into main Jul 5, 2026
6 checks passed
@rlippmann
rlippmann deleted the premise-schema-selection branch July 5, 2026 21:56
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