Canon Database Manager Skill
Purpose
Create and maintain CANON_DB.json - the machine-readable source of truth that powers all visual generation and consistency checking.
Trigger
All Phase 1 (story foundation) artifacts pass Gate 5.
Inputs Required
- •
CREATIVE_BRIEF.md - •
CHARACTER_SHEETS/*.md - •
RELATIONSHIP_MAP.json - •
EP{{XX}}_SCENELIST.md(all episodes) - •
SCRIPTS/SCRIPT_EP{{XX}}.md(all episodes) - •
SHOW_BIBLE.md
Outputs Produced
- •
CANON_DB.json- Machine-readable canon database
Process
Step 1: Initialize Database Structure
Create the base CANON_DB.json with all required sections:
{
"meta": {},
"characters": {},
"locations": {},
"props": {},
"visual_style": {},
"factions": {},
"canon_facts": [],
"continuity_log": []
}
Step 2: Populate Meta Section
"meta": {
"show_title": "",
"version": "1.0.0",
"last_updated": "",
"knowledge_cutoff": "",
"phase": "PRE_VISUAL"
}
Step 3: Extract Characters
For each character in CHARACTER_SHEETS:
- •
Create character ID: UPPERCASE_SNAKE_CASE (e.g., "ALICE_CHEN")
- •
Extract psychology:
- •want, need, lie, wound from character sheet
- •virtue_with_cost
- •
Extract visual data:
- •Physical description (prompt-optimized)
- •Signature outfit
- •Color palette
- •Signature props
- •Negative prompts
- •Initialize empty reference_images object
- •
Extract voice data:
- •Sentence length pattern
- •Metaphor domain
- •Sarcasm/directness levels
- •Linguistic fingerprints
- •Taboo topics
- •
Extract relationships:
- •Convert from RELATIONSHIP_MAP.json
- •Include all axes, bond/pressure mechanisms
Step 4: Extract Locations
Scan all SCENELIST files for unique locations:
- •
Create location ID: UPPERCASE_SNAKE_CASE
- •
Determine type: primary / secondary / recurring / one-off
- •
Extract visual data:
- •Description from scene headers
- •Time variants needed (from scenes)
- •Key areas (from action descriptions)
- •Mood associations
- •Initialize empty reference_images object
- •
Define blocking rules (if applicable):
- •Standard character positions
- •Key furniture/feature placement
Step 5: Extract Props
Identify signature props from CHARACTER_SHEETS and scripts:
- •
Create prop ID: UPPERCASE_SNAKE_CASE
- •
Define properties:
- •type: signature / functional / environmental
- •owner (if character-specific)
- •description
- •significance
- •Initialize empty reference_images object
Step 6: Define Visual Style
From CREATIVE_BRIEF.md aesthetic section:
"visual_style": {
"global_aesthetic": "",
"color_grading": "",
"lighting_style": "",
"lens_language": "",
"camera_movement": "",
"shot_taxonomy": {}
}
Step 7: Extract Factions/Groups
If applicable, identify organizational groupings:
- •Members list (character IDs)
- •Values
- •Conflicts with other factions
Step 8: Compile Canon Facts
List all established facts that cannot be contradicted:
- •Timeline events
- •Character history facts
- •World rules
- •Relationship history
Step 9: Initialize Continuity Log
Empty array ready for tracking changes:
"continuity_log": [
{
"date": "",
"change": "",
"affected_artifacts": [],
"reason": ""
}
]
Step 10: Validate Completeness
Check that:
- • All characters from CHARACTER_SHEETS are present
- • All locations from SCENELISTs are present
- • All relationships from RELATIONSHIP_MAP are present
- • Visual descriptions are prompt-ready
- • No placeholder text remains
Schema Reference
See templates/CANON_DB_schema.json for complete JSON schema.
Key Design Principles
IDs
- •All IDs are UPPERCASE_SNAKE_CASE
- •Character IDs match first_last format
- •Location IDs are descriptive but concise
Visual Descriptions
- •Optimized for image generation prompts
- •Include specific, concrete details
- •Include negative prompts (what to avoid)
- •Reference images start empty, populated by generators
Relationships
- •Bidirectional (A→B stored under A, includes B reference)
- •Axes use -5 to +5 scale
- •Arc directions describe season trajectory
Extensibility
- •New fields can be added
- •Reference_images objects expand as images are generated
- •Continuity_log grows with each update
Update Protocol
When updating CANON_DB.json:
- •Read current version
- •Make targeted changes only
- •Update meta.version (semver)
- •Update meta.last_updated
- •Add entry to continuity_log
- •Validate against schema
Notes
- •CANON_DB.json is the single source of truth for visual generation
- •All reference generators read from this database
- •Updates must be logged in continuity_log
- •Never edit directly in scripts—use this skill
- •Visual reference paths are added by generators, not this skill