Skip to content

Schema composability: shared building blocks and team-composed schemas #17

@mindsocket

Description

@mindsocket

Architecture for composable schemas so teams can express their specific model without forking the core schema files.

Context

The schema reorganization (#13) introduces schemas/_shared.json with common $defs, and strict_ost.json (#15) demonstrates a schema that selects a subset of entity types with tighter rules. These are already a form of composability. This issue tracks the broader design.

Vision

A team should be able to say: "I want the general entity types, but with RICE scoring fields on opportunities and strict parent validation for solutions" — and compose that schema from building blocks rather than duplicating and editing general.json.

Possible building blocks:

  • RICE / ICE scoring field sets
  • confidence field
  • Strict parentage rules for specific entity types
  • Custom status enums

Questions to explore

  • What's the right JSON Schema composition mechanism? (allOf with $ref overlays, unevaluatedProperties, schema inheritance patterns?)
  • Where do building blocks live? (schemas/blocks/?)
  • How does a team add custom blocks without modifying core files?
  • What's the boundary between "composable building block" and "just write your own schema"?

Approach

Don't over-engineer early. Let concrete needs drive the design. The immediate value is in the shared $defs and the two explicit schemas. Revisit this issue when a third distinct schema is needed and repetition becomes a real problem.

Relates to #13 (schema reorganization), #15 (strict_ost schema), #9 (team-specific adaptations).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions