1---2name: image-batch-runner3description: Run fact-grounded image generation batches for short-form video production, especially persona images, first-frame candidates, and light consistency edits. Use this when persona and concept inputs already exist and you need local image assets, prompt records, and durable run metadata. Keep requests anchored to benchmark-backed persona locks and save normalized local asset manifests.4---56# Image Batch Runner78## Use When9- Persona, concept, or shot inputs already exist and the next step is a hosted10 image generation or reference-based edit run.11- The output must include local image files plus durable request, response, and12 manifest records for later QA or video rendering.1314## Do Not Use When15- The task belongs to ideation, QA, or another released skill listed in the handoff section.16- Required inputs are missing and guessing would change the result.17- Creative classification, model/reference policy, or storyboard logic is still18 unresolved. Use `image-generation` first.1920## Execution Boundary21- Hosted image generation and edits run through the public `postplus media create`22 verb and are async. A submit records the run handle, current status, and23 completed artifact metadata (bytes are not24 auto-downloaded; see the download command below).25- This runner validates and executes resolved requests. It must not make creative26 strategy, task-classification, or reference-policy decisions.27- A higher-quality default and faster or cheaper model families are available;28 prefer the default unless the user or upstream brief asks for a specific family,29 ratio, quality, or resolution. The generated example below shows the default30 endpoint key.31- Only edit endpoints accept `--reference-image` (default edit endpoint:32 `image-gpt-image-2-edit`). Text endpoints such as `image-gpt-image-2-text`33 reject the flag with `Unknown option`, so any reference-bound generation must34 target an edit endpoint, not a text endpoint.35- Reference-based edits pass each source image via a repeated36 `--reference-image` flag. Each value may be a local path, HTTPS URL, existing37 PostPlus media reference, or data URI. The CLI validates and prepares local38 media before the single hosted submit; do not pre-upload it or construct a39 manual request object.40- Save a finished image output to disk with41 `postplus media-file download --reference <output.data.artifacts[0].mediaReference> --output-file <path>`.42 Use the completed result's artifact reference as the download source.43- Identifiers and run-local state (`assetId`, `runId`, `localAssetDir`, manifest44 paths) are minted or derived by the runner — do not supply them. Read them back45 from the result for the next handoff.4647## Source And Path48- Ground every request in a benchmark-backed persona lock, concept or shot need,49 visual constraints, `assetPurpose`, and `sourceBasis`.50- Use source files from the active project/client folder first. Do not treat one51 client directory as the default for all image work.52- Keep internal requests, responses, and manifests under `.postplus`; keep final53 user-facing images and manifests in the active asset folder. If no asset folder54 exists, choose one explicit workspace path.5556## Review And Handoff57- Before submission, verify persona grounding, asset purpose, source basis, and58 what must stay fixed versus vary.59- After generation, check realism, benchmark fit, repeatability across videos,60 copied-creator risk, and ad-like drift.61- If processing is still pending, return the manifest/request paths and the poll62 command `postplus media poll --handle <output.data.id> --output path/to/generation-result.json`.63 Reuse the exact `--output` path from the initial submit. A completed poll64 atomically replaces the processing JSON at that path with the completed result;65 rerun the same command while pending (each invocation waits up to 45s).6667## Stop Conditions68- Stop when required user intent, source evidence, or owned input artifacts are69 missing and guessing would change the result.70- If an owned CLI or script command fails, report the exact error and stop. Do71 not bypass the failure with metadata-only answers, readiness probing, local72 payload rewrites, alternate execution paths, or unpublished tools.73- Batch canary: before fanning out a batch of independent items, submit item 174 alone and poll it to a terminal state. If the canary is content-policy75 blocked (the per-item typed code below), record and skip it per batch76 isolation, then canary the next item; fan out only after a non-blocked77 canary completes successfully. Every other canary failure is systemic: stop.78 Some failures are only visible on poll (async terminal states), so a79 submit-accepted batch can still be 100% doomed — a canary caps the blast80 radius of any systemic defect (bad reference form, service outage, auth) at81 one item instead of the whole batch.82- Batch isolation: when producing a batch of independent items, a per-item83 content/safety rejection is isolated to that item. It is identified84 only by the typed code `postplus_cli_hosted_media_content_policy_blocked`,85 never by matching error prose, and it surfaces at either boundary: a failed86 `postplus media create` whose typed error `code` is that code, or a87 submitted run whose poll result carries `output.data.status: failed` and88 `output.data.error.code` set to that code. On either, record which item was89 blocked and its exact reason, skip it, and continue submitting and polling90 the remaining items, then report the incomplete set at the end. Do not retry,91 soften, or re-submit the blocked item — that is a forbidden payload rewrite.92 Every other failure (a failed owned CLI/script command whose typed `code` is93 not that content-policy code, or a run whose `error.code` is not that94 content-policy code — auth, transport, quota, malformed request, service95 outage) is systemic: stop per the rule above.9697## Public Command Boundary9899- Choose the smallest matching command or workflow from the user input and run100 it directly.101- Readiness diagnostics: `postplus doctor --skill image-batch-runner`.102- Poll a pending image job: `postplus media poll --handle <output.data.id> --output path/to/generation-result.json`.103 Reuse the initial submit's result path so the completed poll atomically104 replaces its processing JSON; rerun while pending (each invocation waits up105 to 45s).106- If an owned CLI or script command fails, report the exact error and stop. Do107 not bypass the failure with metadata-only answers, readiness probing, local108 payload rewrites, alternate execution paths, or unpublished tools.109- Use `postplus media schema --json` only when you need the full endpoint, flag,110 and enum contract or are repairing an unknown request shape.111- Run the hosted image job with the generated command below; do not use another112 execution interface.113114<!-- BEGIN GENERATED EXECUTION EXAMPLE -->115```bash116postplus media create image-gpt-image-2-text \117 --prompt "Describe the result you need" \118 --wait \119 --output ./result.json120```121<!-- END GENERATED EXECUTION EXAMPLE -->122123- If the CLI returns a quote-confirmation challenge, run `postplus quote confirm --json --challenge-file <challenge.json>` and retry with the returned token.