mirror of
https://github.com/hanzoai/video.git
synced 2026-10-30 18:18:27 +00:00
New beta pipeline for reusable cartoon characters with SVG rigs, pose
libraries, action timelines, and Canvas/Remotion/HyperFrames rendering.
- pipeline_defs/character-animation.yaml: 11-stage manifest
- skills/pipelines/character-animation/: 11 stage director skills
- tools/character/: BaseTool implementations for char design, rigging,
pose libraries, action timelines, previews, and QA
- schemas/artifacts/{character_design,rig_plan,pose_library,
action_timeline,character_qa_report}.schema.json: canonical artifacts
- schemas/artifacts/scene_plan.schema.json: extended for character-led
scenes
- .agents/skills/{canvas-procedural-animation,character-animation-qa,
character-rigging,pose-library-design,svg-character-animation}/:
Layer 3 vendor knowledge
- AGENT_GUIDE / PROJECT_CONTEXT / README / ARCHITECTURE / PROVIDERS:
surface the new pipeline and its capability family
- tools/video/hyperframes_compose.py: SVG character rig support
- tests/contracts/test_character_animation_pipeline.py: contract tests
55 lines
1.3 KiB
Python
55 lines
1.3 KiB
Python
"""Artifact schema loading and validation utilities."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
from pathlib import Path
|
|
from typing import Any
|
|
|
|
import jsonschema
|
|
|
|
SCHEMA_DIR = Path(__file__).parent
|
|
|
|
ARTIFACT_NAMES = [
|
|
"research_brief",
|
|
"proposal_packet",
|
|
"brief",
|
|
"script",
|
|
"character_design",
|
|
"rig_plan",
|
|
"pose_library",
|
|
"scene_plan",
|
|
"action_timeline",
|
|
"asset_manifest",
|
|
"edit_decisions",
|
|
"render_report",
|
|
"publish_log",
|
|
"review",
|
|
"cost_log",
|
|
"decision_log",
|
|
"source_media_review",
|
|
"final_review",
|
|
"character_qa_report",
|
|
"video_analysis_brief",
|
|
]
|
|
|
|
|
|
def load_schema(name: str) -> dict:
|
|
"""Load a JSON schema by artifact name."""
|
|
path = SCHEMA_DIR / f"{name}.schema.json"
|
|
if not path.exists():
|
|
raise FileNotFoundError(f"Schema not found: {path}")
|
|
with open(path) as f:
|
|
return json.load(f)
|
|
|
|
|
|
def validate_artifact(name: str, data: dict[str, Any]) -> None:
|
|
"""Validate artifact data against its schema. Raises on failure."""
|
|
schema = load_schema(name)
|
|
jsonschema.validate(instance=data, schema=schema)
|
|
|
|
|
|
def list_schemas() -> list[str]:
|
|
"""List all available artifact schema names."""
|
|
return [p.stem.replace(".schema", "") for p in SCHEMA_DIR.glob("*.schema.json")]
|