swarmxq-video-pipeline-architect

Designs and audits the SwarmXQ 6-stage AI video generation pipeline for TypeScript services.

1|Updated Sep 3, 2026
One-click install
npx skills add https://github.com/sabiscore/the-yap-engine --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/the-yap-engine/tree/main/.ai/skills/swarmxq-video-pipeline-architect
Command: npx skills add https://github.com/sabiscore/the-yap-engine --skill swarmxq-video-pipeline-architect-sabiscore

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents contract violations, memory leaks, and rendering failures when modifying the SwarmXQ video generation pipeline, where six immutable stages, coordinated timeouts, and CPU-only resource constraints make ad-hoc changes risky. ## Core Features & Use Cases - Stage Contract Enforcement: Defines immutable contracts for intent_classification, planning, scripting, storyboard_generation, render_assembly, and finalizing, including model tiers, token limits, and error codes. - Invariant Auditing: Scans for critical violations such as unsanitized Ollama output, AbortController listener leaks, hardcoded ComfyUI poll attempts, and missing FFmpeg model eviction. - Queue and Resume Logic: Specifies BullMQ job persistence, SINGLE-VIDEO lock, clientRequestId idempotency, and resumeJob artifact validation. - Use Case: When editing video-orchestrator.ts or ffmpeg-video-renderer.ts, load this skill to validate that modelsUsed recording, sanitizeReasoningOutput, and dual-timeout coordination remain intact before committing. ## Quick Start Ask the AI to review your changes to video-orchestrator.ts against the pipeline 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 6-stage order intent_classification through finalizing is immutable and must never be resequenced, skipped, or merged. Modify behavior inside a stage function while preserving its contract: model tier, max tokens, key output, and error code.

FFmpeg vs ComfyUI render backend: which should I use?▼

ComfyUI with LTX-Video is used when SWARMX_VIDEO_RENDER_BACKEND=comfyui and the server is reachable; FFmpeg is the CPU-only fallback in auto mode. An explicit comfyui setting with an unreachable server fails with COMFY_UNAVAILABLE rather than falling back.

Why must Ollama models be unloaded before FFmpeg rendering?▼

FFmpeg transcoding and LLM inference share the same CPU core pool, so running both concurrently degrades each other. The render_assembly stage must evict all loaded models, including the Pilot despite its 5-minute keep-alive, before starting FFmpeg.

Why does my video job fail with ARTIFACT_MISSING on resume?▼

resumeJob requires artifacts from all prior artifact-producing stages before re-queueing. Resuming from storyboard_generation without a scripting artifact fails, so resume from an earlier stage that has its dependencies present.

Can the video queue run multiple jobs concurrently?▼

No. MAX_CONCURRENT_JOBS is a protected constant of 1 because CPU inference is serial. Additional requests are queued with a position, and clientRequestId serves as the BullMQ dedup key for idempotent submission.

Why does DeepSeek output corrupt intent or storyboard JSON parsing?▼

DeepSeek emits <think> reasoning blocks that break JSON parsing. Every Ollama response must pass through sanitizeReasoningOutput before parsing so think blocks never reach intent JSON, script text, or storyboard frames.