# sub-level/marketing-videos architecture

> Architecture diagram of the GitHub repository sub-level/marketing-videos, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sub-level/marketing-videos
- Repository: https://github.com/sub-level/marketing-videos

## Overview

This repository is an agent-oriented marketing-video method and a working Remotion scaffold. The workflow is: a creator briefs an AI coding agent; repository skills and guidance shape the story, look, and footage; the agent authors a film as timed scenes; reusable motion and audio primitives support those scenes; and Remotion renders editions from the registered compositions. The graph includes documented device, AI-footage, and sound-design capabilities, though their implementations are not sampled here. Source-level links reflect excerpts; README links represent documented workflow, not inspected runtime calls.

Main entry points: [`src/grammar/GrammarVideo.tsx`](https://github.com/sub-level/marketing-videos/blob/main/src/grammar/GrammarVideo.tsx) (Grammar film), [`.claude/skills/remotion-marketing-video/SKILL.md`](https://github.com/sub-level/marketing-videos/blob/main/.claude/skills/remotion-marketing-video/SKILL.md) (Composition method), [`src/grammar/components/Ground.tsx`](https://github.com/sub-level/marketing-videos/blob/main/src/grammar/components/Ground.tsx) (Scene ground), [`.claude/skills/video-audio-stack/SKILL.md`](https://github.com/sub-level/marketing-videos/blob/main/.claude/skills/video-audio-stack/SKILL.md) (Audio method)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Authoring method"]
  node_video_skill["Composition method<br/>[SKILL.md]"]
  node_reference_skill["Reference measurement<br/>[SKILL.md]"]
  node_device_skill["3D device staging<br/>[SKILL.md]"]
  node_footage_skill["AI footage method<br/>[SKILL.md]"]
  node_audio_skill["Audio method<br/>[SKILL.md]"]
  node_guidance["Process and case studies<br/>[process.md]"]
  node_device["3D device stage<br/>[DeviceStage.tsx]"]
end

subgraph group_films["Film compositions"]
  node_example["Example film<br/>[ExampleVideo.tsx]"]
  node_grammar["Grammar film<br/>[GrammarVideo.tsx]"]
  node_opener["Opener scene<br/>[OpenerScene.tsx]"]
  node_words["Words scene<br/>[WordsScene.tsx]"]
  node_close["Close scene<br/>[CloseScene.tsx]"]
  node_grammar_tokens["Grammar timing and palette<br/>[tokens.ts]"]
  node_example_tokens["Example timing and palette<br/>[tokens.ts]"]
end

subgraph group_primitives["Motion primitives"]
  node_ground["Scene ground<br/>[Ground.tsx]"]
  node_dust["Living dust field<br/>[DustField.tsx]"]
  node_typed["Typed line<br/>[TypedLine.tsx]"]
  node_geometry["Continuous geometry words<br/>[GeometryWords.tsx]"]
  node_caption["Kinetic captions<br/>[KineticCaption.tsx]"]
  node_music["Music bed<br/>[MusicBed.tsx]"]
  node_sfx["Sound cues<br/>[SfxCue.tsx]"]
end

subgraph group_editions["Editions and render"]
  node_composition["Remotion compositions<br/>[Root.tsx]"]
  node_theme["Theme context<br/>[theme-context.ts]"]
  node_vertical["Portrait context"]
end

node_creator(("Film creator"))
node_agent(("AI coding agent"))
node_ai_media["AI image and video services"]
node_music_service["Licensed music service"]

node_creator -->|"briefs film"| node_agent
node_agent -->|"uses method"| node_video_skill
node_agent -->|"follows process"| node_guidance
node_video_skill -->|"derives motion"| node_reference_skill
node_agent -->|"authors compositions"| node_composition
node_composition -->|"registers"| node_example
node_composition -->|"registers"| node_grammar
node_grammar -->|"sequences"| node_opener
node_grammar -->|"sequences"| node_words
node_grammar -->|"sequences"| node_close
node_grammar -->|"reads timing"| node_grammar_tokens
node_opener -->|"renders"| node_ground
node_opener -->|"renders"| node_typed
node_words -->|"renders"| node_ground
node_words -->|"renders"| node_geometry
node_close -->|"renders"| node_ground
node_close -->|"renders"| node_typed
node_ground -->|"renders in dark"| node_dust
node_geometry -->|"uses letter primitives"| node_typed
node_grammar -->|"provides theme"| node_theme
node_grammar -->|"provides portrait mode"| node_vertical
node_grammar_tokens -->|"computes duration"| node_geometry
node_example -.->|"uses film tokens"| node_example_tokens
node_video_skill -->|"covers device staging"| node_device_skill
node_video_skill -->|"covers footage pipeline"| node_footage_skill
node_video_skill -->|"covers sound design"| node_audio_skill
node_agent -.->|"generates footage"| node_ai_media
node_agent -.->|"sources music"| node_music_service
node_device_skill -.->|"documents staging"| node_device
node_audio_skill -.->|"documents music bed"| node_music
node_audio_skill -.->|"documents sound cues"| node_sfx
node_agent -.->|"can use captions"| node_caption

click node_composition "https://github.com/sub-level/marketing-videos/blob/main/src/Root.tsx"
click node_example "https://github.com/sub-level/marketing-videos/blob/main/src/example/ExampleVideo.tsx"
click node_grammar "https://github.com/sub-level/marketing-videos/blob/main/src/grammar/GrammarVideo.tsx"
click node_opener "https://github.com/sub-level/marketing-videos/blob/main/src/grammar/scenes/OpenerScene.tsx"
click node_words "https://github.com/sub-level/marketing-videos/blob/main/src/grammar/scenes/WordsScene.tsx"
click node_close "https://github.com/sub-level/marketing-videos/blob/main/src/grammar/scenes/CloseScene.tsx"
click node_grammar_tokens "https://github.com/sub-level/marketing-videos/blob/main/src/grammar/tokens.ts"
click node_example_tokens "https://github.com/sub-level/marketing-videos/blob/main/src/tokens.ts"
click node_ground "https://github.com/sub-level/marketing-videos/blob/main/src/grammar/components/Ground.tsx"
click node_dust "https://github.com/sub-level/marketing-videos/blob/main/src/lib/DustField.tsx"
click node_typed "https://github.com/sub-level/marketing-videos/blob/main/src/lib/TypedLine.tsx"
click node_geometry "https://github.com/sub-level/marketing-videos/blob/main/src/lib/GeometryWords.tsx"
click node_caption "https://github.com/sub-level/marketing-videos/blob/main/src/lib/KineticCaption.tsx"
click node_music "https://github.com/sub-level/marketing-videos/blob/main/src/lib/MusicBed.tsx"
click node_sfx "https://github.com/sub-level/marketing-videos/blob/main/src/lib/SfxCue.tsx"
click node_theme "https://github.com/sub-level/marketing-videos/blob/main/src/theme-context.ts"
click node_vertical "https://github.com/sub-level/marketing-videos/blob/main/src/vertical-context.ts"
click node_video_skill "https://github.com/sub-level/marketing-videos/blob/main/.claude/skills/remotion-marketing-video/SKILL.md"
click node_reference_skill "https://github.com/sub-level/marketing-videos/blob/main/.claude/skills/motion-from-reference/SKILL.md"
click node_device_skill "https://github.com/sub-level/marketing-videos/blob/main/.claude/skills/device-3d-stage/SKILL.md"
click node_footage_skill "https://github.com/sub-level/marketing-videos/blob/main/.claude/skills/ai-cinematic-broll/SKILL.md"
click node_audio_skill "https://github.com/sub-level/marketing-videos/blob/main/.claude/skills/video-audio-stack/SKILL.md"
click node_guidance "https://github.com/sub-level/marketing-videos/blob/main/docs/process.md"
click node_device "https://github.com/sub-level/marketing-videos/blob/main/.claude/skills/device-3d-stage/references/DeviceStage.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_video_skill,node_reference_skill,node_device_skill,node_footage_skill,node_audio_skill,node_guidance,node_device toneBlue
class node_example,node_grammar,node_opener,node_words,node_close,node_grammar_tokens,node_example_tokens toneAmber
class node_ground,node_dust,node_typed,node_geometry,node_caption,node_music,node_sfx toneMint
class node_composition,node_theme,node_vertical toneRose
class node_creator,node_agent,node_ai_media,node_music_service toneIndigo
```

## Components

### Authoring method

- [Composition method](https://github.com/sub-level/marketing-videos/blob/main/.claude/skills/remotion-marketing-video/SKILL.md): `.claude/skills/remotion-marketing-video/SKILL.md`
- [Reference measurement](https://github.com/sub-level/marketing-videos/blob/main/.claude/skills/motion-from-reference/SKILL.md): `.claude/skills/motion-from-reference/SKILL.md`
- [3D device staging](https://github.com/sub-level/marketing-videos/blob/main/.claude/skills/device-3d-stage/SKILL.md): `.claude/skills/device-3d-stage/SKILL.md`
- [AI footage method](https://github.com/sub-level/marketing-videos/blob/main/.claude/skills/ai-cinematic-broll/SKILL.md): `.claude/skills/ai-cinematic-broll/SKILL.md`
- [Audio method](https://github.com/sub-level/marketing-videos/blob/main/.claude/skills/video-audio-stack/SKILL.md): `.claude/skills/video-audio-stack/SKILL.md`
- [Process and case studies](https://github.com/sub-level/marketing-videos/blob/main/docs/process.md): `docs/process.md`
- [3D device stage](https://github.com/sub-level/marketing-videos/blob/main/.claude/skills/device-3d-stage/references/DeviceStage.tsx): `.claude/skills/device-3d-stage/references/DeviceStage.tsx`

### Film compositions

- [Example film](https://github.com/sub-level/marketing-videos/blob/main/src/example/ExampleVideo.tsx): `src/example/ExampleVideo.tsx`
- [Grammar film](https://github.com/sub-level/marketing-videos/blob/main/src/grammar/GrammarVideo.tsx): `src/grammar/GrammarVideo.tsx`
- [Opener scene](https://github.com/sub-level/marketing-videos/blob/main/src/grammar/scenes/OpenerScene.tsx): `src/grammar/scenes/OpenerScene.tsx`
- [Words scene](https://github.com/sub-level/marketing-videos/blob/main/src/grammar/scenes/WordsScene.tsx): `src/grammar/scenes/WordsScene.tsx`
- [Close scene](https://github.com/sub-level/marketing-videos/blob/main/src/grammar/scenes/CloseScene.tsx): `src/grammar/scenes/CloseScene.tsx`
- [Grammar timing and palette](https://github.com/sub-level/marketing-videos/blob/main/src/grammar/tokens.ts): `src/grammar/tokens.ts`
- [Example timing and palette](https://github.com/sub-level/marketing-videos/blob/main/src/tokens.ts): `src/tokens.ts`

### Motion primitives

- [Scene ground](https://github.com/sub-level/marketing-videos/blob/main/src/grammar/components/Ground.tsx): `src/grammar/components/Ground.tsx`
- [Living dust field](https://github.com/sub-level/marketing-videos/blob/main/src/lib/DustField.tsx): `src/lib/DustField.tsx`
- [Typed line](https://github.com/sub-level/marketing-videos/blob/main/src/lib/TypedLine.tsx): `src/lib/TypedLine.tsx`
- [Continuous geometry words](https://github.com/sub-level/marketing-videos/blob/main/src/lib/GeometryWords.tsx): `src/lib/GeometryWords.tsx`
- [Kinetic captions](https://github.com/sub-level/marketing-videos/blob/main/src/lib/KineticCaption.tsx): `src/lib/KineticCaption.tsx`
- [Music bed](https://github.com/sub-level/marketing-videos/blob/main/src/lib/MusicBed.tsx): `src/lib/MusicBed.tsx`
- [Sound cues](https://github.com/sub-level/marketing-videos/blob/main/src/lib/SfxCue.tsx): `src/lib/SfxCue.tsx`

### Editions and render

- [Remotion compositions](https://github.com/sub-level/marketing-videos/blob/main/src/Root.tsx): `src/Root.tsx`
- [Theme context](https://github.com/sub-level/marketing-videos/blob/main/src/theme-context.ts): `src/theme-context.ts`
- [Portrait context](https://github.com/sub-level/marketing-videos/blob/main/src/vertical-context.ts): `src/vertical-context.ts`

### Other components

- **Film creator**
- **AI coding agent**
- **AI image and video services**
- **Licensed music service**

## Connections

- Film creator → AI coding agent: briefs film (evidence: `README.md`)
- AI coding agent → Composition method: uses method (evidence: `README.md`)
- AI coding agent → Process and case studies: follows process (evidence: `README.md`)
- Composition method → Reference measurement: derives motion (evidence: `README.md`)
- AI coding agent → Remotion compositions: authors compositions (evidence: `README.md`)
- Remotion compositions → Example film: registers (evidence: `src/Root.tsx`)
- Remotion compositions → Grammar film: registers (evidence: `src/Root.tsx`)
- Grammar film → Opener scene: sequences (evidence: `src/grammar/GrammarVideo.tsx`)
- Grammar film → Words scene: sequences (evidence: `src/grammar/GrammarVideo.tsx`)
- Grammar film → Close scene: sequences (evidence: `src/grammar/GrammarVideo.tsx`)
- Grammar film → Grammar timing and palette: reads timing (evidence: `src/grammar/GrammarVideo.tsx`)
- Opener scene → Scene ground: renders (evidence: `src/grammar/scenes/OpenerScene.tsx`)
- Opener scene → Typed line: renders (evidence: `src/grammar/scenes/OpenerScene.tsx`)
- Words scene → Scene ground: renders (evidence: `src/grammar/scenes/WordsScene.tsx`)
- Words scene → Continuous geometry words: renders (evidence: `src/grammar/scenes/WordsScene.tsx`)
- Close scene → Scene ground: renders (evidence: `src/grammar/scenes/CloseScene.tsx`)
- Close scene → Typed line: renders (evidence: `src/grammar/scenes/CloseScene.tsx`)
- Scene ground → Living dust field: renders in dark (evidence: `src/grammar/components/Ground.tsx`)
- Continuous geometry words → Typed line: uses letter primitives (evidence: `src/lib/GeometryWords.tsx`)
- Grammar film → Theme context: provides theme (evidence: `src/grammar/GrammarVideo.tsx`)
- Grammar film → Portrait context: provides portrait mode (evidence: `src/grammar/GrammarVideo.tsx`)
- Grammar timing and palette → Continuous geometry words: computes duration (evidence: `src/grammar/tokens.ts`)
- Example film → Example timing and palette: uses film tokens
- Composition method → 3D device staging: covers device staging (evidence: `README.md`)
- Composition method → AI footage method: covers footage pipeline (evidence: `README.md`)
- Composition method → Audio method: covers sound design (evidence: `README.md`)
- AI coding agent → AI image and video services: generates footage (evidence: `README.md`)
- AI coding agent → Licensed music service: sources music (evidence: `README.md`)
- 3D device staging → 3D device stage: documents staging
- Audio method → Music bed: documents music bed
- Audio method → Sound cues: documents sound cues
- AI coding agent → Kinetic captions: can use captions (evidence: `README.md`)
