Cinematography Knowledge Base Invocation (Cinematography KB)
1. What This Library Solves
The most critical part of a shot prompt is not "write it long," but whether the key details are correct: aperture determines depth of field and texture, focal length determines spatial relationships, light position determines whether skin looks plastic, and color tone determines the mood. Previously, these were left to the model's free interpretation, resulting in ten different styles for the same subject. This skill forces the Agent to consult the library before writing the prompt field, selecting "the most appropriate row" for the current scene and translating parametric intent into visual language.
Library principle (must be followed): Video generation models do not recognize technical parameters (F-stop/ISO/shutter speed), only visual effect descriptions. Therefore: parameters go into the trace (for the producer to review), and the prompt body only contains visual language.
2. Library Structure
- Location:
bundles/ai-video/library/cinematography-kb/(19 articles +_INDEX.md) - Unified nine-chapter format: Core concept → Quick classification → Scenario-specific practice → Video-specific rules → Common pitfalls → ⑥ Intent → Prompt mapping table (core invocation zone, bilingual Chinese/English) → Prompt template → Decision tree → Related knowledge
- Topics: OPTICS-001 Aperture / 002 Focal length & perspective / 003 Shutter speed & motion blur / 004 ISO & image quality; CINE-001 Camera movement / 002 Shot scale; LIGHT-001 Light position & texture / 002 Time of day & color temperature / 003 Night scene & artificial light; COLOR-001 Color tone & palette / 002 Tonal range; PHYS-001 Fluid & particles / 002 Material & texture; SCENE-001 Weather & atmosphere / 002 Crowds & space; STYLE-001 Style spectrum / 002 Shot rhythm; HUMAN-001 Portrait complete guide; NARR-001 Emotion → Visual recipe (recipe layer / closure layer)
3. How to Invoke (Tools)
| Tool | Purpose |
|---|---|
cineread.index | Full library index + missing article check (missing articles must be explicitly reported, not silently ignored) |
cineread.search | Search by intent (returns bilingual Chinese/English phrasing ready for direct prompt insertion) |
cineread.aperture | Recommend aperture stop based on scene (f-stop → visual language; based on OPTICS-001 §3 Scenario table / §8 Decision tree) |
cineread.recipe | Emotion recipe (NARR-001): first retrieve the full recipe, then cross-reference each topic's details from the recipe |
cinewrite.enrich | Inject knowledge entries into shot card fields, must include traceability |
CLI equivalent: node bundles/ai-video/connectors/cine-kb-bridge/cli.mjs <health|index|search|aperture|recipe|enrich>
4. Injection Discipline (Rules for Writing into Prompts)
- Quantity: Maximum 3 entries per shot (plus 1 aperture advisor entry), each entry populates only one field (
depth_of_field/lighting/composition/camera_movement/color_palette/props/baseline/makeup). - Contradiction gate: Knowledge that contradicts the time of day/weather/style must never be injected—a daytime scene does not pair with "backlit sunset silhouette," lanterns at a daytime alley are not a night scene, and a traditional water town does not pair with "cyber neon."
- No duplication: Do not superimpose a different shot scale when one is already written on the card; do not add aperture advisor visual language when depth of field is already on the card.
- Traceable: Each injection must include a
cine-kb trace(topic matched / row name / injected text / suggested parameters / missing articles), allowing the producer to verify "which knowledge entry this visual language came from." - Add only, never modify: The knowledge base is a product asset; upgrades are achieved by adding new versions and entries. In-place overwriting or deletion is prohibited.
5. Boundaries
- Covers only "shot language and texture." Does not modify narrative, factual content, shot duration, or number of shots (those belong to the script/editing stage).
- For topics not covered by the library, truthfully state "the library has no corresponding entry." Do not forcibly substitute with a nearby entry.
- When a suitable entry cannot be found, the conclusion is allowed to be "this shot does not require additional knowledge injection"—better to add nothing than to add the wrong thing.
6. Process Criteria (Scene → Which Row to Use → Which Field to Populate → Source)
| Criterion | Library Retrieval Method | Field to Populate | Criterion Source |
|---|---|---|---|
| Depth of field/texture direction needed | cineread.aperture (Scenario table / Decision tree) | depth_of_field | KB:OPTICS-001 §3 / §8 |
| Spatial relationship/compression needed | Focal length entry (perspective & distortion) | composition | KB:OPTICS-002 |
| Motion blur/rhythm needed | Shutter speed & motion entry | camera_movement | KB:OPTICS-003 |
| Light position & skin texture needed | Light position entry (direction/texture) | lighting | KB:LIGHT-001 |
| Time-of-day color temperature consistency needed | Time-of-day entry | lighting / color_palette | KB:LIGHT-002 |
| Color palette & tonal range needed | Color tone/tonal range entry | color_palette | KB:COLOR-001/002 |
| Material & fluid detail needed | Physical entry (water/smoke/fabric/food) | props / baseline | KB:PHYS-001/002 |
| Emotion recipe (closure) needed | cineread.recipe retrieves full recipe then cross-references topics | Multiple fields (≤3 entries + 1 aperture entry) | KB:NARR-001 |
| Scene not covered by knowledge | Truthfully report "no corresponding entry in library" | — | KB:Suite §5 |
7. Failure Modes (Symptom → Detector → Resolution)
| Symptom | Detector | Resolution |
|---|---|---|
| F-stop/ISO/frame rate parameters appear in prompt | Parameter scan (parameters go into trace only) | Rewrite as visual language and regenerate |
| Injected phrase contradicts card's time/weather | Contradiction gate (time/weather/style co-occurrence check) | Discard the injection, retrieve another from library; "inject first, then explain" is not allowed |
| Same field injected with multiple entries / total limit exceeded | Quantity validation (max 3 per shot + 1 aperture entry) | Trim by priority and leave trace |
Template placeholders submitted ([subject]/[element]) | Degradation sentinel (NaN/undefined/[placeholder]) | Instantiate then regenerate; if uninferable, exclude from prompt |
| Negative keywords treated as positive signals ("starry sky without light pollution") | Negation stripping before matching | Correct the signal term and add a regression test case |
| Injected entry cannot be traced back to source (unclear which knowledge it came from) | Trace traceability check (topic/row name/text) | Declare the injection failed; supplement the trace or withdraw |
| Library missing articles/rows | cineread.index missing article check | Explicitly report the gap and propose a library update; do not silently skip |