Files
timmy-config/training/data/scene-descriptions/schema.json
Alexander Whitestone eb0ff150ea
Some checks failed
Architecture Lint / Linter Tests (pull_request) Successful in 26s
Smoke Test / smoke (pull_request) Failing after 18s
Validate Config / YAML Lint (pull_request) Failing after 15s
Validate Config / JSON Validate (pull_request) Successful in 17s
Validate Config / Python Syntax & Import Check (pull_request) Failing after 1m25s
Validate Config / Shell Script Lint (pull_request) Failing after 1m4s
Validate Config / Cron Syntax Check (pull_request) Successful in 11s
Validate Config / Deploy Script Dry Run (pull_request) Successful in 13s
Validate Config / Playbook Schema Validation (pull_request) Successful in 20s
Validate Training Data / validate (pull_request) Successful in 22s
PR Checklist / pr-checklist (pull_request) Failing after 5m17s
Architecture Lint / Lint Repository (pull_request) Has been cancelled
Validate Config / Python Test Suite (pull_request) Has been cancelled
feat: JSON schema + validator for scene description training data (#647)
- schema.json: JSON Schema for scene description entries (song, artist,
  beat, timestamp, duration_seconds, lyric_line, scene with
  mood/colors/composition/camera/description)
- validate.py: CLI validator for JSONL files (no jsonschema dependency,
  manual fallback). Validates all fields, types, ranges, empty values.
- .gitea/workflows/validate-training-data.yml: CI check on PR

Tested: 100/100 entries in scene-descriptions-r&b-soul.jsonl pass.

Closes #647
2026-04-14 23:11:51 -04:00

81 lines
2.3 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://timmy-foundation/scene-description/v1",
"title": "Scene Description Entry",
"description": "A single lyrics-to-visual scene description beat from a song.",
"type": "object",
"required": ["song", "artist", "beat", "timestamp", "duration_seconds", "lyric_line", "scene"],
"properties": {
"song": {
"type": "string",
"minLength": 1,
"description": "Song title"
},
"artist": {
"type": "string",
"minLength": 1,
"description": "Artist name (may be fictional)"
},
"beat": {
"type": "integer",
"minimum": 1,
"maximum": 20,
"description": "Beat number within the song (1-indexed)"
},
"timestamp": {
"type": "string",
"pattern": "^[0-9]{1,2}:[0-9]{2}$",
"description": "Timestamp in M:SS or MM:SS format"
},
"duration_seconds": {
"type": "integer",
"minimum": 1,
"maximum": 600,
"description": "Duration of this beat in seconds"
},
"lyric_line": {
"type": "string",
"minLength": 1,
"description": "The lyric line for this beat"
},
"scene": {
"type": "object",
"required": ["mood", "colors", "composition", "camera", "description"],
"properties": {
"mood": {
"type": "string",
"minLength": 1,
"description": "Emotional mood of this beat"
},
"colors": {
"type": "array",
"minItems": 1,
"maxItems": 5,
"items": {
"type": "string",
"minLength": 1
},
"description": "Color palette for this scene (1-5 colors)"
},
"composition": {
"type": "string",
"minLength": 1,
"description": "Camera composition (e.g., wide shot, close-up, low angle)"
},
"camera": {
"type": "string",
"minLength": 1,
"description": "Camera movement (e.g., slow zoom, steady hold, pan right)"
},
"description": {
"type": "string",
"minLength": 10,
"description": "Full visual scene description (min 10 chars)"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}