swarmxq-video-pipeline-architect

Designs and validates the SwarmXQ six-stage AI video generation pipeline with immutable stage contracts.

1|Updated Aug 25, 2026
One-click install
npx skills add https://github.com/sabiscore/swarmxq --skill swarmxq-video-pipeline-architect-sabiscore
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swarmxq-video-pipeline-architect
Source: https://github.com/sabiscore/swarmxq/tree/main/.ai/skills/swarmxq-video-pipeline-architect
Command: npx skills add https://github.com/sabiscore/swarmxq --skill swarmxq-video-pipeline-architect-sabiscore

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Modifying the SwarmXQ video generation pipeline without breaking its invariants is risky: stages have immutable ordering, Ollama responses need sanitization, AbortControllers leak listeners, and FFmpeg renders conflict with resident LLMs. This Skill encodes every contract, invariant, and failure mode so changes to video-orchestrator.ts, video-queue.ts, and the render backends stay correct. ## Core Features & Use Cases - Stage Contract Enforcement: Defines the immutable six-stage pipeline (intent_classification through finalizing) with per-stage model tiers, token limits, and error codes. - Invariant Auditing: Detects violations such as unsanitized DeepSeek reasoning output, missing modelsUsed recording, hardcoded ComfyUI poll limits, and FFmpeg renders without model eviction. - Queue & Resume Logic: Covers BullMQ idempotency via clientRequestId, the SINGLE-VIDEO lock, Redis fallback, and resumeJob artifact validation. - Use Case: When asked to add a new render backend or fix a storyboard failure, load this Skill to get the exact contracts, code patterns, and violation checklist before editing any pipeline file. ## Quick Start Ask the AI to review or modify a video pipeline file such as video-orchestrator.ts while enforcing the SwarmXQ stage contracts and invariants.

Frequently Asked Questions about swarmxq-video-pipeline-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add or modify a stage in the SwarmXQ video pipeline?

The six-stage order (intent_classification through finalizing) is immutable and must never be resequenced, skipped, or merged. Modify behavior inside an existing stage function while preserving its contract: model tier, max tokens, output shape, and error code.

FFmpeg vs ComfyUI render backend: which should I use?

Selection is driven by SWARMX_VIDEO_RENDER_BACKEND. ComfyUI (LTX-Video) is used when explicitly set and reachable, or first in auto mode with FFmpeg fallback; FFmpeg is the CPU-only default. An explicit comfyui setting with an unreachable server fails with COMFY_UNAVAILABLE rather than falling back.

Why does the video pipeline fail with corrupted JSON from DeepSeek models?

DeepSeek reasoning models emit <think> blocks that corrupt JSON parsing. Every Ollama response must pass through sanitizeReasoningOutput() before parsing intent JSON, script text, or storyboard frames; parsing raw output is a Critical violation.

Why must all Ollama models be unloaded before FFmpeg rendering?

FFmpeg transcoding and LLM inference share the same CPU core pool, so running both degrades each other. The render_assembly stage must evict every loaded model via ModelOrchestrator.unloadModel(), including Pilot despite its 5-minute keep-alive.

How does video job idempotency work with BullMQ?

clientRequestId serves as the BullMQ dedup key: if a job with that ID exists and is not failed or completed, the existing job is returned instead of enqueueing a duplicate. Queue and Worker must use separate ioredis connections to avoid deadlocks.

Why does resumeJob fail with ARTIFACT_MISSING?

Resuming from a stage whose prerequisite artifacts are absent fails late with a confusing error. resumeJob() must validate that all prior artifact-producing stages (scripting, storyboard_generation, render_assembly) have artifacts before re-queueing, failing fast with RESUME_INVALID_STAGE.