Skip to content

Add CategorySchema validator #1

Description

@keepsloading

Goal

Add a contract validator for category schema definitions.

Memact needs category schemas to be shaped consistently so Schema, SDK, Access, Wiki, and Memory can rely on the same structure.

Suggested fields

A category schema may include:

  • schema id
  • category name
  • version
  • description
  • context fields
  • example raw inputs
  • normalized output shape
  • Wiki entry templates
  • permission suggestions
  • safety notes

Work to do

  • Define the CategorySchema shape
  • Add a validator following the existing Contracts style
  • Return { ok: true, value } for valid input
  • Return { ok: false, errors: [{ path, message }] } for invalid input
  • Add valid examples
  • Add invalid examples
  • Export the validator from the package

Acceptance criteria

  • Valid category schemas pass
  • Missing required fields fail with useful errors
  • Invalid field types fail with useful errors
  • The validator is documented in the README or examples

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions