Local video editor for coding agents: 42 FFmpeg tools with a machine-readable contract and an MCP server, for Claude Code, Cursor and Codex. Cut, captions, reframe, loudness, platform exports. No cloud, no API keys.
Python agent-skillsai-agentsaudio-processingcaptionsclaude-codecodexcoding-agentcursorffmpegloudness-normalizationmcpmcp-servermodel-context-protocolpythonsubtitlestranscodingvideovideo-editingvideo-processingwhisper
fix(render): plan check step honours "content": true (#295)
Shogo Kajiyama4adbe50630b5
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 8588482..7fd258e 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,7 +4,7 @@## Unreleased-(nothing yet)+- fix(render): a plan's `check` verify step honours `"content": true` (`check.py --content`), with or without a `platform`, the same key a project's `check` stage takes. Before, `render.py PLAN` ran a check step only when it named a platform and never passed `--content`.## 2.3.0diff --git a/docs/contract.md b/docs/contract.mdindex 4b9ed4b..255dffd 100644--- a/docs/contract.md+++ b/docs/contract.md@@ -225,7 +225,8 @@ subtitle/LUT/font files a filter reads. Tools that print their document without(`probe`, the analysis tools) still write the plan at exit; `verify.py` and `render.py`refuse `--plan` (their steps run for real; a project file is already a plan). `render.py FILE` executes a plan:it refuses (`kind: input`) when an input's size or head/tail hash differs from the plan,-runs the tool with the planned `argv`, then the verify steps, and reports `plan`, `tool`,+runs the tool with the planned `argv`, then the verify steps (a `check` step may also carry+`"content": true`, added by hand, for `check.py --content`), and reports `plan`, `tool`,`tool_result` and `check`. `plan_version` is bumped when the document's shape changes.### Repeatabilitydiff --git a/references/scripts.md b/references/scripts.mdindex fbf3253..839c060 100644--- a/references/scripts.md+++ b/references/scripts.md@@ -631,7 +631,8 @@ A plan is a single tool's dry run as an artifact: `cut.py in.mp4 --start 2 --endhead+tail), commands, output, verify}` and runs nothing. `render.py cut.json`re-fingerprints the inputs (refusing, `kind: input`, if any changed since theplan), runs the tool with the planned argv, then the verify steps (probe; `check`-for a `--platform` or a platform export preset), and reports `plan`, `tool`,+for a `--platform` or a platform export preset; add `"content": true` to a check+step for the black/frozen/silence rows), and reports `plan`, `tool`,`tool_result` and `check`. Show the plan to the user, get the yes, execute:one round trip instead of re-deriving the command.`"export": {"preset": "reels", "normalize": true}` forwards `export.py --normalize`diff --git a/scripts/render.py b/scripts/render.pyindex 1f7f550..e87525a 100755--- a/scripts/render.py+++ b/scripts/render.py@@ -729,8 +729,11 @@ def execute_plan(plan: Dict[str, Any], path: str) -> int:check_result = Noneexit_code = 0for step in plan.get("verify") or []:- if step.get("tool") == "check" and step.get("platform") and output:- cp = run_tool([str(HERE / "check.py"), output, "--platform", step["platform"], "--json"] + child_args())+ # a check step names a platform, asks for check.py --content's black/frozen/silence rows+ # ("content": true), or both -- the same keys a project's "check" stage takes+ if step.get("tool") == "check" and (step.get("platform") or step.get("content") is True) and output:+ cp = run_tool([str(HERE / "check.py"), output] + (["--platform", str(step["platform"])] if step.get("platform") else [])+ + (["--content"] if step.get("content") is True else []) + ["--json"] + child_args())try:check_result = json.loads(cp.stdout)except ValueError:@@ -742,7 +745,7 @@ def execute_plan(plan: Dict[str, Any], path: str) -> int:# same command run by hand)if exit_code:failed_rows = [r["check"] for r in (check_result or {}).get("checks", []) if r.get("status") == "FAIL"]- info(f"plan done: {output}, but the {check_result.get('platform')} check failed" + (f": {', '.join(failed_rows)}" if failed_rows else ""))+ info(f"plan done: {output}, but the {check_result.get('platform') or 'content'} check failed" + (f": {', '.join(failed_rows)}" if failed_rows else ""))else:info(f"plan done: {output}")emit(output, plan=path, tool=tool, stages=[tool] + (["check"] if check_result else []), check=check_result, tool_result=doc,diff --git a/tests/test_contract.py b/tests/test_contract.pyindex b728c37..fcb0cca 100644--- a/tests/test_contract.py+++ b/tests/test_contract.py@@ -2191,6 +2191,12 @@ class ContractTests(unittest.TestCase):doc = json.loads(tool("render", xplan, "--json", check=False).stdout)self.assertIn(doc["status"], ("completed", "failed"))self.assertEqual(doc["check"]["platform"], "x")+ # a check step with "content": true runs check.py --content (same key as a project's check stage)+ cp = json.loads(plan.read_text()); cp["verify"].append({"tool": "check", "content": True})+ cplan = self.out("plan_content.json"); cplan.write_text(json.dumps(cp))+ doc = json.loads(tool("render", cplan, "--json", "--overwrite", check=False).stdout)+ self.assertEqual(doc["stages"], ["cut", "check"])+ self.assertTrue({"black", "frozen"} & {r["check"].split()[0].lower() for r in doc["check"]["checks"]}, doc["check"]["checks"])# a changed input is refusedffmpeg("-i", self.src, "-t", "0.5", "-c", "copy", "-y", src)proc = tool("render", plan, "--json", "--overwrite", check=False)