skills / rik / agent-batch-protocol

Agent batch protocol

by Rik

Run a batch of videos with agents without burning your plan: one session per gate, state in a file, no polling.

@rikv1.0.0CC-BY-4.0 licenceEdit and cut, PublishingUpdated 2026-11-26

With the vibeedit MCP server added (see https://vibeedit.fun/agent), ask your agent:

Any agentprompt
Install the rik/agent-batch-protocol skill from vibeedit.fun. Show me its SKILL.md first.
Download zip
SKILL.mdRaw file

Agent batch protocol

Cost is turns times context. A long session re-reads everything it holds on every turn, so context size, not video count, sets the bill. These habits keep context small, keep helpers cheap and make sure a human only reviews finished work.

Hard rules

  1. Never ask for review while you know of a change you have not applied. Apply it first, then show the work.
  2. Never poll. Start a long job once, end the turn, and let its completion bring the result.
  3. State lives in a run-state file, not in the chat. Read it once at the start of a session. Every helper writes its result there.
  4. A waiver exists only in the human's own words. A builder never waives a check.
  5. Never delete files to make room unless the user says yes. Offer caches that regenerate first.

The gates

A batch moves through three human decisions. Each is one session over every video in the batch, and the session ends when the human has something to decide.

  1. Intake. Every video gets its cut, its spec and its frames card. Intake is not done until all of them have one.
  2. Frames review. Layout, media and motion per beat, shown before any first render.
  3. Render review. The rendered cut with timestamped notes.

A new gate is a new session. Never keep a session open across a human's review.

The habits

  1. One session per gate, for the whole batch. Never one session per video or per take. Start a feedback round fresh. Start near 250k tokens of context as the line past which you do not begin a round, and 300k as the line where you write a hand-off note and end. Then measure your own.
  2. Thin orchestrator. The main session dispatches and reads one-line verdicts. It does not edit a video, apply notes itself or read pipeline source. Start every builder for a gate in one message, with the whole instruction in the first brief. No back and forth messaging. Builders return one line.
  3. A model per job. Use the table in references/limits-and-measuring.md: a cheaper model for orchestrating a gate, building, applying notes, critics and captions; the cheapest for mechanical chores; the strongest only for motion design and pipeline code.
  4. Helpers have a budget. A builder stops near 60 tool calls and returns BLOCKED with the reason. A chore helper stops sooner. A critic does one full pass and at most one block-only recheck.
  5. Long jobs run once. Start a batch render as one background run, end the turn, read the one-line result per video when it returns. Inside a helper, run one long check in the foreground in a single call with the longest timeout your tool allows. Never loop, sleep, or read the same log a third time. One long wait costs one cache rewrite. Each poll costs a full turn.
  6. One heavy render at a time. Use a queue or a lock. Check free disk before you queue. Starting values are in the reference file.
  7. Fix before you ask. A review round goes up only when every known change is applied and rendered: critic blocks, fixes and nits, rule breaks, and your own "should I change this?" ideas. The only open items on a card are real taste calls with no rule behind them, and decisions you already applied that the human should confirm, one line each. If you are out of critic passes or renders, apply the fix anyway and say so.
  8. Say what waits on the human. Before you end a turn that needs them, write waiting_on and a one-line question into the run state. Clear both when they answer.
  9. Waivers come first. When the human's instruction conflicts with a rule, write the waiver in their words, then fix the rest. Never present a rule as the reason something cannot be done, and never offer an option your own check will refuse. If a check needs a note made inside the review tool, say that up front, because a chat answer will not satisfy it.
  10. Classify every revision. Copy, label, timing and cue fixes skip the frames review and re-render at once. Layout, new or swapped media, beats added or removed, a spoken line added or dropped and new custom motion go to the frames review first. Mixed note: split it. Unsure: frames review. The human can override in their words.
  11. A ready render starts now. It does not wait for another video's review.
  12. Tooling work is its own session. Pipeline code never shares a session with a gate. Freeze the pipeline for the batch, or work on a branch.

Measure it

After every batch, measure spend from the session transcripts with a script, not by reading them in the model. Compare units per video with the last batch. Propose at most three rule changes, one line each. The human decides before anything changes. How to read the report is in references/limits-and-measuring.md.

Files

  • references/limits-and-measuring.md: starting limits, the model-per-job table, render rules, revision classes, how to read a spend report.
  • templates/run-state.md: the run-state file and the hand-off note.
  • prompts/gate-session.md: starter prompts for a gate session, a builder and a helper.

What to tell the user

At the end of a gate, say in a few lines what is on the review, how many videos, what to check, and what you applied since the last round. Then end the session. If you hit a budget, a refusal or a block, name it and what you wrote to the run state.

What this is not

It is not a video editing method. It is how to run any video pipeline built from agents without waste. A step that can only be done by changing your tool's own permissions or configuration is left out on purpose.