Skip to content

Add JSON schema validation for sop.json #21

@ldraney

Description

@ldraney

User Story

AS a dev-sop-engine user
I WANT sop.json validated before generation
SO THAT I catch config errors early with helpful messages

Current State

  • No validation before generation
  • Invalid config may cause silent failures or confusing errors

Expected Behavior

npx dev-sop-engine .
# Error: sop.json validation failed:
#   - rules.my-rule.events: must be an array
#   - agents.foo.prompt_file: file not found

Implementation Options

  1. JSON Schema - Create sop.schema.json, validate with ajv
  2. TypeScript - Runtime type checking with zod or similar
  3. Both - Schema for editor autocomplete + runtime validation

Acceptance Criteria

  • Invalid sop.json produces clear error message
  • Missing required fields are caught
  • Invalid field types are caught
  • File path references are validated (files exist)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions