--- name: cdaf description: Read CDAF sidecar files (.cdaf) instead of processing video with vision. Use whenever a task involves understanding, summarizing, searching, editing, or selecting from video files (b-roll, raw clips, footage libraries) — check for a .cdaf sidecar FIRST before analyzing any video directly. --- # CDAF — Cached Descriptive Asset Files A `.cdaf` file is a timestamped, pre-computed description of a video, sitting next to it with the same basename (`clip.mp4` → `clip.cdaf`). Reading it costs a few hundred text tokens; analyzing the video directly costs orders of magnitude more (~263 tokens per second of footage on Gemini-class models). **Always prefer the sidecar when it is fresh.** Format spec and tooling: https://github.com/UditAkhourii/cdaf ## The rule Before analyzing ANY video file (`.mp4`, `.mov`, `.mkv`, `.webm`, `.avi`, `.m4v`): 1. **Check for a sidecar**: same directory, same basename, `.cdaf` extension. 2. **Verify freshness** before trusting it (see below). A stale sidecar describes an older version of the video — using it is worse than not having one. 3. **If fresh**: read the sidecar instead of processing the video. Use it as the account of what the video contains — within the limits below. 4. **If missing or stale**: generate one (see below) so the cost is paid once. If you cannot generate, fall back to direct video analysis. ## Verifying freshness The sidecar header carries `bytes` (file size) and `sha256` (content hash) of the exact video it describes. **Verification never needs an API key or network access.** - **Cheap check (usually enough)**: compare the video's current file size to the header's `bytes` value. Different size → provably stale. - **Strict check**: `cdaf validate