SLOPSHOPPER

cav-review

Shows the open cav review notes above the prompt, says when the reviewer sends notes, and can start a turn to handle them.

bandtoastpromptprocess
★ 6v0.1.0MITupdated 2026-10-15rock3r/cav/plugins/cav-review
A shopper browsing a rack in a slop shop
README

Cav

cav builds motion graphics in Cavalry from a terminal. A person or coding agent writes JavaScript files, and cav runs them in the open Cavalry app. It makes contact sheets, checks common mistakes and renders video with optional music.

PartWhat it is
cavA command-line tool for macOS and Windows. It runs JavaScript in Cavalry, renders frames, contact sheets and MP4 videos, inspects scenes, finds the beats and the structure of a music track, draws it as a picture, checks a render against it, and searches the Cavalry API and docs offline. cav guide explains the workflow and has motion design recipes.
cav-bridgeA small Cavalry script that cav talks to. cav setup installs it.
cavalry skillA short entry point for coding agents. It checks the setup and sends the agent to cav guide. Packaged as a Claude Code, Codex and Antigravity plugin.

The CLI sends scene work to Cavalry on the desktop. Agents can call commands from a shell and request guidance when needed. cav mcp has a separate role: it displays the review page in supported chats. See Review in the chat.

Requirements

  • Cavalry 2.4 or newer. Tested on 2.7.2 and 2.8.0.
  • macOS or Windows. See What was tested for the details on Windows.
  • ffmpeg, for videos with audio and for beat detection (brew install ffmpeg, or winget install Gyan.FFmpeg).

Install

1. Install cav. On macOS:

curl -fsSL https://raw.githubusercontent.com/rock3r/cav/main/install.sh | sh

On Windows, in PowerShell:

irm https://raw.githubusercontent.com/rock3r/cav/main/install.ps1 | iex

The installer checks the download against release checksums and runs cav setup.

2. Start the bridge. In Cavalry, click Scripts > cav-bridge and keep its window open. Repeat this after each Cavalry restart. Then check the setup:

cav doctor

3. Optional: add the agent plugin. In Claude Code:

/plugin marketplace add rock3r/cav
/plugin install cavalry@cav

The optional /plugin install cav-review@cav plugin shows open review notes above the Claude Code prompt. It can start a turn when the reviewer sends notes.

In Codex:

codex plugin marketplace add rock3r/cav
codex plugin add cavalry@cav

In the Antigravity CLI, from a clone of this repository:

agy plugin install ./plugins/cavalry

The plugin gives Antigravity the skill, cav mcp and a review hook. The Antigravity CLI runs plugin hooks. The app and IDE load the skill and server without the hook. See the user guide.

Other agents: copy plugins/cavalry/skills/cavalry into the agent's skills folder.

Agents in a sandbox. Some sandboxes block 127.0.0.1 or writes outside the project. cav doctor then reports blocked: a sandbox. Allow access to 127.0.0.1:8723 or run cav relay outside the sandbox. The relay forwards commands through a folder. See Agents in a sandbox.

Try it

cav scene new --width 1920 --height 1080 --fps 60 --seconds 4
cav guide            # how to build a scene, with a first script to copy
cav run title.js     # run your script inside Cavalry
cav sheet            # look at 12 frames in renders/sheet.png
cav check            # find problems a viewer would notice
cav render -o out/title.mp4

The user guide covers a first animation, music timing and troubleshooting.

What it looks like

cav spectrogram draws musical bars, sections and accents for visual inspection.

cav spectrogram

cav board sheet shows storyboard shots planned against beats.

cav board sheet

cav guide --search "keys dropped" finds guidance for a reported symptom.

cav guide --search

Commands

CommandWhat it does
cav setup / cav doctorInstall or check everything: token, bridge script, Cavalry, ffmpeg, docs, running bridge
cav guide [topic]How to work: building a scene, the production flow (or a custom flow.md), design recipes, music sync, traps, native features, production, software showcase videos
cav guide --search <words>The best guide sections for a symptom when its topic is unknown (offline)
cav statusExisting bridge state; no scene work is queued
`cav scene new\comp\open\save`New scene (refuses to discard unsaved work), change the comp, open, save
`cav run <file.js>... \-e <code>`Run JavaScript in Cavalry with the helper library loaded; prints the return value
cav job wait [<id>]Wait for one raw job without continuing command phases
cav operation status/resume <id>Inspect or continue a complete scene open, frame, sheet, render, check or run after a timeout
cav tree / cav layer <id>The layer tree; one layer's position, bounding box and keys
cav frame [n...] / cav sheet [frames]Render frames to PNG, or a labelled contact sheet
cav onion [start-end]Draw several frames on top of each other to show a motion path and its easing
cav check [--quick] [--profile]Structural performance warnings and bounded visual/measured checks
cav render [-o out.mp4] [--audio track]Render to MP4, check the frame count, add the music
cav beats <audio>Tempo, beats and downbeats as frame numbers, plus sections, rises, silences and accents
cav spectrogram <audio>Draw the track: spectrogram, loudness, beats, sections and accents on one time axis
cav sync <video.mp4>Measure the cuts and hits of a render against the beats
`cav review [video.mp4 \brief.json \moodboard.json \storyboard.json]`A review page: step frames or look at items, draw, comment, approve a stage of stills, then send the notes to the agent (wait, export, resolve)
cav mcpAn MCP server (stdio) that shows the review page (video or stills) inside the chat, as an MCP App
`cav brief init\show`Write and check brief.json, the brief agreed with the user; cav board init and cav scene new take size, fps and length from it
cav planShow each stage of the production flow (or a custom flow.md): done, waiting for approval, missing or unknown. It also names the next step. It only reads
`cav board init\frames\sheet\animatic\mood`Storyboard timed in beats, frames per shot, a board image, an animatic on the music, mood boards
`cav gen image\vector`Generate stills, transparent PNGs and SVG; trace a PNG to SVG
cav ref / `cav sfx search\get\gen\index`Find reference images, sounds and music under free licences; generate sound effects
`cav music gen\render / cav listen <track>`Generate music planned on the storyboard, or render a written score locally; judge takes: loudness, cuts, picture, local scores, critique
cav score [storyboard.json]A REAPER project with the render, a marker per shot and the takes, to finish the music by ear
`cav credits [check\licence]`Credit lines and licence checks for every asset the project uses
`cav config [check\set-key\order\model]`Which service does each job, where its key lives; cav doctor --services tests them
cav api / cav docs / cav types / cav helpersOffline search: API, Cavalry docs, layer types, the helper library
cav relay --spool <dir>Forward commands for agents whose sandbox blocks cav
cav version [--check] / cav updateVersions, and updates that ask before they install

Production commands have paths without API keys: greybox frames, Openverse, Wikimedia, written scores, local uv models, and user-run ComfyUI, ACE-Step and YuE2 servers. Configured keys add other services. cav guide production explains the service order.

Every command accepts --json. Exit code 0 means success; 1 means error; 2 means the bridge is unreachable; 3 means work remains pending; and 4 means bridge loss.

Update

cav update

cav update shows the release and asks before installing. It checks the download and runs cav setup. If cav doctor reports an older running bridge, restart its Cavalry window. Update the Claude Code plugin with /plugin marketplace update cav.

How well it works

An agent using GLM-5.3 Flash completed the same 11 motion briefs under three tool conditions. Automatic checks and a blind judge compared the Cavalry 2.8.0 results:

Agent usedTasks passedMean timeMean tokens
cav and the skill8 of 111,177 s1.22 M
cav only8 of 111,025 s0.98 M
the upstream cavalry-mcp server3 of 111,604 s3.22 M

The CLI and CLI-plus-skill conditions each passed 8 of 11 tasks. The cavalry-mcp condition passed 3 of 11 and used more tokens. This sample found no measured gain from the old long skill. Version 1.0 moved its guidance into cav guide. See the evaluation for methods, full results and limits.

What was tested

WhatmacOSWindows
Install from the release, cav setup, offline commandstestedtested (Windows 11, x64)
cav update from 1.0.0 to 1.0.1testedtested
Driving Cavalry: jobs, sheets, checks, renderstested (65 helper and 14 native-feature checks live)not tested
Claude Code and Codex plugins, with a sandboxed agent through cav relaytestednot tested
Antigravity pluginagy plugin validate onlynot tested

Documentation

Recovery, diagnostics and signed macOS bundles

scene open, frame, sheet, render, check and run return operation IDs. After a timeout, inspect cav operation status <id> and continue with cav operation resume <id> --timeout 90m. Do not submit the original command again. cav check --quick --json avoids playhead changes, bounds and rendering. --profile measures a small frame set. Quick checks follow referenced pre-comps without switching the active comp and include comp paths in findings. Select later frames with --profile-frames 840,1560,1908. Simulations need chronological PNG warm-up. Allow extra frames with --max-warmup 2000 and enough time. Reports identify failures and skipped work. A profile that reaches its budget between samples records skipped coverage, even if no sample finishes. It does not report an API failure for that case. See operation recovery for states, concurrency and remaining limits.

macOS releases keep a signed, notarized and stapled Cav.app. The installer adds its executable to PATH through a symlink. Users with an older shipped updater need the current installer once to migrate. Development builds need no credentials. Release builds require signing. See notarization.

Development

go test ./...
node --test assets/helpers/test/*.test.js assets/bridge/test/*.test.js
cav scene new --force --width 1280 --height 720 --fps 30 --seconds 3   # a throwaway scene
cav run assets/helpers/test/live.js                                    # live checks in Cavalry
claude plugin validate . --strict

Credits

  • cavalry-mcp by Michael Essandoh (MIT): This project derives its bridge script from that bridge. The token handshake, API reference and docs search also follow its ideas. See NOTICE.
  • cavalry-types by Remco Janssen (MIT): API names and signatures.
  • Cavalry is made by Scene Group (now part of Canva). Cav is a community plugin and is not affiliated with Cavalry, Scene Group, or Canva. The Cavalry docs are not included; cav docs update downloads them to the local computer.

Licence: MIT.

Source 2 files
hooks/register.tsx 149 lines
1import { atom, read, update } from 'claude-code'
2import type { EngineInterface, Register } from 'claude-code'
3
4import type { ReviewSummary } from '../types'
5
6// cav review keeps its notes in <renders>/<video>.review.json. This plugin asks Claude Code
7// to watch that folder and reads the newest file when it changes: a band above the prompt
8// shows the open notes and links to the page, a toast says when the reviewer presses "Send to
9// agent", and (option `wake`) a turn starts that reads the notes with `cav review wait`.
10
11const summary = atom({ plugin: 'cav-review', key: 'summary' } as const, null)
12const hidden = atom({ plugin: 'cav-review', key: 'hidden' } as const, false)
13const announced = atom({ plugin: 'cav-review', key: 'announced' } as const, null)
14
15// What `cav review export --json` prints (the fields the band uses).
16type Export = {
17  video: string
18  reviewFile: string
19  notes?: { status: string; onOlderRender?: boolean }[] | null
20  sends?: { n: number; comments: string[]; deliveredAt?: string }[] | null
21  server?: { url: string } | null
22}
23
24function summarize(x: Export): ReviewSummary {
25  const notes = x.notes ?? []
26  const open = notes.filter(n => n.status === 'open')
27  const pending = (x.sends ?? []).find(s => !s.deliveredAt)
28  return {
29    video: x.video,
30    file: x.reviewFile,
31    open: open.length,
32    resolved: notes.length - open.length,
33    olderOpen: open.filter(n => n.onOlderRender).length,
34    pending: pending ? { n: pending.n, notes: pending.comments.length } : null,
35    // Surfaces link only https: and http://localhost; the review server answers both names.
36    url: x.server?.url ? x.server.url.replace('//127.0.0.1:', '//localhost:') : null,
37  }
38}
39
40function wakePrompt(s: ReviewSummary): string {
41  return (
42    `The reviewer pressed "Send to agent" in cav review: ${s.pending?.notes ?? 0} note(s) on ${s.video}. ` +
43    `Run \`cav review wait ${s.video} --timeout 10s\` to read them. It prints each note's frame, text, drawing and snapshot path. ` +
44    `It also marks the send received. Look at each snapshot and address the feedback. Re-render to the same file. Resolve each note with ` +
45    `\`cav review resolve <id> --note "what changed"\`.`
46  )
47}
48
49// Reads the newest review file and updates the band. Nothing polls: this runs when the
50// session starts, when Claude Code reports a change to a watched file, and around turns.
51async function refresh($: EngineInterface, folder: string, wake: boolean) {
52  // cav finds the newest review file and reads it, so the format lives in one place.
53  const r = await $.process.run(['cav', 'review', 'export', '--json', '--dir', folder], { timeoutMs: 15000 })
54  let x: Export | null = null
55  if (r.exitCode === 0) {
56    try {
57      x = JSON.parse(r.stdout)
58    } catch {
59      return
60    }
61  }
62  if (x === null || !x.reviewFile) {
63    if ((await read($, summary)) !== null) await update($, summary, () => null)
64    return
65  }
66  const s = summarize(x)
67  const before = await read($, summary)
68  if (JSON.stringify(before) !== JSON.stringify(s)) await update($, summary, () => s)
69
70  if (s.pending) {
71    const key = `${s.file}#${s.pending.n}`
72    if ((await read($, announced)) !== key) {
73      await update($, announced, () => key)
74      await update($, hidden, () => false)
75      $.ui.toast(`cav review: the reviewer sent ${s.pending.notes} note(s) on ${s.video}`, { timeoutMs: 8000 })
76      if (wake) await $.prompt.submit({ text: wakePrompt(s) })
77    }
78  }
79}
80
81export const register: Register = (on, options) => {
82  const folder = typeof options.folder === 'string' && options.folder !== '' ? options.folder : 'renders'
83  const wake = options.wake !== false
84
85  // Ask Claude Code to watch the renders folder and the review files in it.
86  on('classic.SessionStart', async ($, e, next) => {
87    const result = await next(e)
88    const base = `${e.cwd}/${folder}`
89    const paths = [base]
90    try {
91      for (const f of await $.fs.list(folder)) {
92        if (f.kind === 'file' && f.name.endsWith('.review.json')) paths.push(`${base}/${f.name}`)
93      }
94    } catch {
95      // the folder appears later; watching it catches that
96    }
97    return { ...result, watchPaths: [...(result.watchPaths ?? []), ...paths] }
98  }).catch(($, e, next) => next(e))
99
100  on('classic.FileChanged', async ($, e, next) => {
101    if (e.file_path.endsWith('.review.json') || e.file_path.endsWith(`/${folder}`)) await refresh($, folder, wake)
102    return next(e)
103  }).catch(($, e, next) => next(e))
104
105  on('session.start', async ($, e, next) => {
106    await refresh($, folder, wake)
107    return next(e)
108  })
109
110  // A failure here must never hold up the person's prompt.
111  on('prompt.submit', async ($, e, next) => {
112    refresh($, folder, wake).catch(() => {})
113    return next(e)
114  }).catch(($, e, next) => next(e))
115
116  on('turn.complete', async ($, e, next) => {
117    refresh($, folder, wake).catch(() => {})
118    return next(e)
119  }).catch(($, e, next) => next(e))
120
121  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
122    const s = await read($, summary)
123    if (s === null || e.props.hasSurvey || (await read($, hidden)) || (s.open === 0 && !s.pending)) {
124      return next(e)
125    }
126    const { Box, Button, Link, Text } = $.ui.resolve(e)
127    const name = s.video.split('/').pop()
128    return (
129      <Box flexDirection="row" gap={1} flexWrap="wrap">
130        <Text bold>cav review</Text>
131        <Text>
132          {name}: {s.open} open note{s.open === 1 ? '' : 's'}
133          {s.olderOpen > 0 ? ` (${s.olderOpen} on an older render)` : ''}
134        </Text>
135        {s.pending ? (
136          <Text color="yellow">
137            send #{s.pending.n} waiting: {s.pending.notes} note{s.pending.notes === 1 ? '' : 's'}
138          </Text>
139        ) : null}
140        {s.url ? <Link href={s.url} label="open the page" /> : null}
141        {s.pending ? (
142          <Button key="handle" label="Handle notes" onPress={() => $.prompt.submit({ text: wakePrompt(s) })} />
143        ) : null}
144        <Button key="hide" label="Hide" onPress={() => update($, hidden, () => true)} />
145      </Box>
146    )
147  })
148}
149
types/index.d.ts 22 lines
1// What the band draws: the newest review file in the renders folder.
2export type ReviewSummary = {
3  video: string // the render's path, as cav review recorded it
4  file: string // the review file
5  open: number // open notes
6  resolved: number
7  olderOpen: number // open notes made on an older render
8  pending: { n: number; notes: number } | null // a send no agent has picked up
9  url: string | null // the running review page, when cav review serves it
10}
11
12declare module 'claude-code' {
13  interface PluginState {
14    'cav-review': {
15      summary: ReviewSummary | null
16      hidden: boolean
17      // The last send announced, so a send wakes the session once.
18      announced: string | null
19    }
20  }
21}
22