html-d3-anime-video-workflow

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

HTML D3 Anime Video Workflow

HTML D3 Anime 视频工作流

Core Workflow

核心工作流

  1. In isolated validation workspaces, read
    ../prompt.md
    directly first when it exists; do not probe for it with shell-specific commands such as PowerShell
    Get-ChildItem
    or
    Test-Path
    in a bash runtime, and do not read
    README.md
    as a prompt substitute. The isolated
    pi
    shell is bash; a PowerShell probe in bash is validation noise. Treat
    ../prompt.md
    as the path and command contract before inspecting optional references. Reading
    SKILL.md
    does not satisfy a prompt-reading requirement. If the prompt says to run an exact command or gives a fenced command for a required video scaffold or validation artifact, run that command verbatim immediately after reading the prompt from the current workspace root; do not prepend
    cd /mnt/data
    ,
    cd .
    ,
    pwd
    , or any other directory-changing/probing command. For render, browser, ffmpeg, or Metro audit commands, set the shell tool timeout to at least 600 seconds so successful long-running visual audits do not become validation-noise retries. Do not replace concrete paths with placeholders, infer alternate project IDs, inspect target script source, or list directories with
    Get-ChildItem
    ,
    ls
    ,
    dir
    ,
    find
    , or
    pwd
    first. Do not ask questions, read optional references, open helper script source, or stop after reading the skill file before that command runs. Do not read
    scripts/build_standalone_explainer.py
    ,
    scripts/build_from_prompt_contract.py
    ,
    scripts/run_metro_audit_suite.py
    , any
    scripts/audit_metro_*.py
    , or
    scripts/check_video_outputs.py
    during normal task use unless the task is to modify or debug those scripts. After the command finishes, verify the exact requested paths and only then refine or respond.
    • If
      ../prompt.md
      gives an exact command, run that exact command first. Otherwise, if
      ../prompt.md
      contains
      Required exact outputs
      , run this fast lane immediately and do not open the wrapper, suite, audit, or checker source:
      uv run --script skills/html-d3-anime-video-workflow/scripts/build_from_prompt_contract.py --prompt ../prompt.md
      . The wrapper derives the report path, state checks, and Metro audits when the prompt contract calls for them. Verify with the compact wrapper report plus direct existence checks for required paths; read child audit manifests only when a wrapper or audit result fails.
  2. Route component work to the existing skill that owns it:
    • Use
      d3
      for D3 visualization form selection, deterministic SVG geometry, labels, token colors, composition, and D3 gallery patterns.
    • Use
      slidev-animejs
      for Anime.js lifecycle, scoped selectors, cleanup, SVG helpers, text helpers, and Slidev click states.
    • Use
      slidev-video
      for Slidev deck recording, native navigation, MP4/WebM export, manifests, screenshots, and start trimming.
    • Use
      slidev-quality-audit
      for Slidev visual QA.
    • Use
      animated-svg-to-gif
      for GIF conversion from animated SVG assets.
    • Use
      manim-svg-video
      when the job is composing many existing SVG assets into a Manim-rendered MP4.
  3. Use this skill only for the orchestration layer that those skills do not own: research-backed script refresh, multi-video planning, timestamp-driven HTML renderers, frame capture, ffmpeg encoding, repeated critique passes, manifests, and production notes.
  4. When the user requests an artifact, write the exact requested output path. Do not substitute a descriptive filename, put the content only in chat, ask clarifying questions instead of acting, or write into the copied skill directory during isolated validation.
  5. If the prompt supplies exact output paths plus enough source facts to start, proceed with conservative defaults for anything optional. Do not ask for duration, audience, style, narration, or format when the prompt already states them or gives a usable range. Record missing non-blocking facts as
    null
    ,
    missingFacts
    , or production-note risks, then build the smallest valid source package, renderer, render script, video, and review artifacts requested.
  6. For isolated complete-video requests where no project renderer exists yet, treat the bundled builders as executable tools, not files to inspect. When the prompt gives the exact wrapper command, run it exactly. When a prompt lists exact paths, source facts, and anchors but does not provide a full helper command, run
    scripts/build_from_prompt_contract.py --prompt ../prompt.md --manifest <report.json>
    to derive and run the standalone helper deterministically. If the prompt already names a
    prompt-contract-build.json
    report path, the wrapper can derive that manifest path when
    --manifest
    is omitted. If the prompt asks for Metro, design fidelity, complex dynamic visuals, low text, camera movement, colorset1, grayscale hierarchy, or says the result is not following the design, the wrapper derives a
    metroPatternMix
    from
    scripts/plan_metro_pattern_mix.py
    ; when the scaffold pattern was
    auto
    , it applies the mix's
    helperPattern
    before deriving state checks. If the prompt names a
    render-state
    or
    browser-state
    JSON report path and no state flags are supplied, the wrapper can derive
    --state-manifest
    and default pattern, label-containment, final-state,
    false->true
    mechanism-reveal, and monotonic
    visibleMechanismCount
    progression checks from the selected scaffold pattern and preserved label headings. If the prompt names
    metro-style-audit.json
    ,
    metro-composition-audit.json
    ,
    metro-rendered-frame-audit.json
    ,
    metro-mute-test-audit.json
    ,
    metro-video-composition-audit.json
    , or
    metro-audit-suite.json
    , the wrapper can derive those audit paths, run the reusable Metro audit suite plus encoded-MP4 composition audit, and write the reports before exact-output verification. Add explicit
    --state-manifest
    ,
    --metro-style-manifest
    ,
    --metro-composition-manifest
    ,
    --metro-rendered-frame-manifest
    ,
    --metro-mute-test-manifest
    ,
    --metro-video-composition-manifest
    ,
    --metro-audit-suite-manifest
    ,
    --state-expect
    ,
    --state-expect-final
    ,
    --state-expect-contains
    ,
    --state-expect-transition
    ,
    --state-expect-monotonic
    , and
    --state-min-distinct
    flags when the prompt asks for stricter proof in the same pass. For zone evidence, use
    --state-expect-final visibleZoneCount=<count>
    to prove the megacanvas exposes enough zones and use
    --state-min-distinct activeZoneId=<count>
    to prove the camera or beat path visits several zones; never add
    --state-min-distinct visibleZoneCount
    , because a stable visible zone count is expected. This prompt-contract wrapper path is the fast lane: do not read
    visual-metaphor-design.md
    ,
    scene-pattern-recipes.md
    ,
    html-video-orchestration-patterns.md
    ,
    metro-minimal-tonal-motion.md
    ,
    visual-density-pattern-bank.md
    , or
    production-loop.md
    before the wrapper run unless the prompt explicitly asks for bespoke design work. Read
    references/standalone-helper-contract.md
    only for manual fallback when the prompt lacks a wrapper command and the wrapper cannot derive a valid contract; in copied isolated workspaces use
    skills/html-d3-anime-video-workflow/references/standalone-helper-contract.md
    . Never open helper, wrapper, suite, audit, or checker source just to learn arguments or diagnose a passing run. The helper creates the source package, production notes, HTML with
    renderConceptFrame
    ,
    render.mjs
    , draft MP4, metric contact sheet with JSON manifest, and self-review; the prompt-contract wrapper also writes a compact JSON derivation/build/media/source-preservation report when a manifest path is supplied or detected in the prompt, embeds
    metroPatternMix
    with selected density patterns, functional zones, semantic motion systems, camera path, transition contracts, and anti-pattern risks, embeds a compact
    contactSheet
    summary from the generated contact-sheet manifest with per-tile metrics plus
    openingTile
    ,
    finalTile
    , and
    openingTileAssessment
    , adds a
    weak-opening-tile
    finding when the opening assessment is weak, and can embed compact
    stateCheck
    ,
    metroAuditSuite
    ,
    metroStyleAudit
    ,
    metroCompositionAudit
    ,
    metroRenderedFrameAudit
    ,
    metroMuteTestAudit
    , and
    metroVideoCompositionAudit
    results when their manifest paths are supplied or derived. When the wrapper report and its embedded
    contactSheet
    summary both show
    passed: true
    , the generated contact-sheet manifest shows
    passed: true
    ,
    contactSheet.openingTileAssessment.weak
    is
    false
    , any requested or derived
    stateCheck.passed
    is
    true
    , any requested
    metroPatternMix.passed
    is
    true
    , and any requested Metro audit reports including
    metroVideoCompositionAudit
    show
    passed: true
    , treat the requested scaffold outputs as validated, including prompt fact, anchor, and pattern label preservation from
    sourcePreservation
    plus MP4 duration, fps, width, and height from
    media
    ; do not read child audit manifests or script sources unless a reported result fails. Passing these reports validates a scaffold, not a final polished design, when the prompt asks for Metro Minimal Tonal Motion, design fidelity, complex dynamic visuals, or low-text narrated output; after the wrapper run, load
    references/metro-minimal-tonal-motion.md
    and
    references/visual-density-pattern-bank.md
    before accepting or redesigning that artifact. If the wrapper fails only because a Metro child audit timed out or reported a transient browser failure, rerun the same wrapper command once before any diagnosis; if it still fails, report the manifest failure instead of reading helper, suite, audit, checker, HTML, or render source. If
    contactSheet.openingTileAssessment.weak
    is true or
    contactSheet.openingTile
    is much weaker than later tiles, improve the opening frame before accepting the draft even when aggregate metrics pass. If a Metro audit fails, regenerate from the source prompt with corrected helper inputs rather than patching generated HTML by hand. If you run extra diagnostics, write them to separate report paths and do not overwrite the requested MP4, contact sheet, or contact-sheet manifest. Edit or extend those outputs afterward only if the prompt requires richer visuals.
  7. Apply the two production principles before writing scenes:
    • Show mechanics visually. Express each concept through cause/effect motion, state changes, flows, ranking, accumulation, branching, blocking, or feedback loops.
    • Default to zero visible explanatory text for narrated explainers. Assume narration carries names, definitions, and caveats; the video should carry diagrams, motion, and state changes.
    • Graph only the concept. Do not add video duration, progress bars, chapter rails, timestamps, watermarks, status widgets, or decorative UI chrome unless those elements are the thing being explained.
    • For tokenization scenes, render text as data-owned token groups from the first frame. Reveal a token group's own fill, border, numeric state, and destination instead of drawing boxes over an independent text node.
    • For Metro Minimal Tonal Motion, strict-grid, or square-edge critiques, treat the design as a navigable modular megacanvas, not as a slide sequence. Build multiple functional zones that the camera explores through zooms, pans, expanding blocks, masks, or tile morphs; do not reserve title, subtitle, caption, or date bands inside the video frame. Use hard 0-radius rectangles, snapped 4 px grid edges, shared baselines, no internal box padding, the colorset1 Open Sans font stack, and distinct grayscale levels for visual hierarchy as the default visual contract. Do not leave latent rounded fallbacks such as
      rx: masonryRequired ? 0 : 14
      in Metro sources; source-level nonzero
      rx
      ,
      ry
      , or radius branches are a design failure even if the current render path normalizes them. For polished Metro or "not following the design" repair work, require the source package to expose
      visualZones
      and
      semanticBindings
      , the SVG DOM to expose
      data-zone-id
      ,
      data-zone-role
      , and
      data-source-anchor-json
      markers with legacy
      data-source-anchor
      fallback, and
      renderConceptFrame
      state to expose
      visibleZoneCount
      , changing
      activeZoneId
      , and
      activeSourceAnchors
      . For helper-generated Masonry work, the encoded MP4 contact sheet must show the same low-text wall construction as the sampled HTML, with a non-weak opening tile and visible module growth rather than labels. Low-text Masonry is not just label suppression: selected helper marks must sit on a visible shared masonry megacanvas base, so the first frame already reads as an aligned modular wall instead of an isolated chart or panel.
    • Do not abbreviate functional labels with
      ...
      or
      in final SVG output. If labels do not fit, recompute the layout, move labels to flush lanes, use smaller local type, or shorten source labels deliberately in the source package; visible truncation is a design failure.
  8. Before choosing D3 examples, reusing previous scenes, or coding a beat, design the visual metaphor. Write the concept claim, the causal mechanic, two or three candidate metaphors, the rejected alternatives, the chosen visual vocabulary, and the exact repeated roles for shapes, colors, motion, and layout. Reuse an old visual pattern only when it preserves the same semantic role.
  9. Read
    references/visual-metaphor-design.md
    when designing a new concept video, redesigning a weak beat, or responding to feedback that a scene feels generic, copied, decorative, or text-dependent.
  10. Read
    references/metro-minimal-tonal-motion.md
    when the request mentions Metro Minimal Tonal Motion, colorset1, colorset2, strict-grid, hard edges, no rounded borders, no padding, grayscale hierarchy, Masonry, megacanvas, camera movement, or design feedback that the output is not aligned with the design.
    • Use the bundled
      references/metro-design-profile.json
      as the runtime palette and geometry source of truth. It records hashes of the source
      style.md
      ,
      colorset1.yml
      , and
      colorset2.yaml
      ; do not replace it with a hand-written palette. Recompile it with
      scripts/compile_metro_design_profile.py
      when those source files change.
    • When the user says the video is not following the design, treat the current artifact as rejected. Recompose from the design contract before re-rendering: remove title/caption/date bands, remove padded boxes and rounded geometry, restore colorset1 gray hierarchy, prove modular alignment, and add camera or block-based transitions that preserve the megacanvas structure.
  11. Read
    references/visual-density-pattern-bank.md
    when the request asks for more complex, dynamic, information-dense, visual rather than textual, pattern-based, or D3-influenced videos. Use it before accepting a scaffold that otherwise looks like boxes plus labels. For Metro redesign, run or inspect the wrapper's
    metroPatternMix
    from
    scripts/plan_metro_pattern_mix.py
    and require at least six named density patterns, three used beat patterns, five functional zones, four semantic motion systems, three camera events, three transition contracts, at least two transition types, one modular transition type such as tile morph, masked reframe, surface wipe, masonry construction, or expanding block, zero internal padding, 0-radius geometry, grayscale hierarchy, and
    reusableD3PatternIds
    when the mix maps to existing D3 patterns before accepting the design direction.
  • Treat named visual anchors from
    design/videos.md
    as render contracts. If a module names motifs such as
    probability_bars
    ,
    passN_grid
    ,
    test_runner
    , context-window shifts, judge/rubric cards,
    agent_loop_ring
    ,
    context_window_box
    , fixed workflow versus adaptive agent lanes, environment changes, Model + Tools + State + Loop modules,
    shield_gate
    , Input/Output/Action gates, prompt bubble versus hard gate, Model Armor filter lanes,
    risk_score
    , human approval, protected
    .env
    /destructive/deploy actions, safety-versus-friction balance, policy matrix cues,
    comparison_grid
    , runtime stack, engine-to-dashboard morph, same model in different harness shells, three-column harness cards,
    credit_meter
    , feature grid versus use-case matrix, highlighted selection path,
    event_timeline
    , lifecycle event pulse, Hook
    shield_gate
    overlay, GitHub hook badges, Claude event cloud, OpenCode event list, PreToolUse command block, log-filter path, token-savings counter, speed-vs-cost slider, lifecycle-controls stamp, Atlassian Rovo, Gemini App, GitHub Copilot, Claude Desktop or Claude Code, workflow gravity, home-base workspace blocks, radar chart, use-case selector, guardrails, permissions, or observability wraps, those motifs must appear as visible low-text geometry in the final MP4 and contact sheet, not merely as preserved source strings in JSON.
  • For a multi-video source such as
    design/videos.md
    , run
    scripts/plan_metro_video_series.py
    before rendering the series. Do not accept one global
    metroPatternMix
    for the whole document as proof of design fidelity. Require the report to pass with per-module
    helperPattern
    ,
    primaryPattern
    ,
    reusableD3PatternIds
    , enough helper/primary diversity, and no long repeated-helper run, so distinct topics do not collapse into the same generic scaffold.
  • When a whole series is being regenerated after design-rejection feedback, generate prompt contracts with
    scripts/build_metro_series_contract_prompts.py
    before running
    pi
    . The generated prompts must include the wrapper command, render-state manifest, full Metro audit suite, encoded-MP4 composition audit, and semantic-density audit as exact required outputs. Use those generated prompts instead of hand-written per-video prompts so the batch cannot silently skip
    metro-video-composition-audit.json
    or the masonry/megacanvas repair contract.
  1. Read
    references/scene-pattern-recipes.md
    when reusing an approved scene pattern, extracting a shared visual component, or preserving a good example from the current project. Treat the compact recipes as the runtime source of truth; inspect
    assets/examples/
    only when maintaining the acceptance fixture.
  2. Before coding each beat, run a visual decision pass: identify the mechanism, the chosen shape metaphor, the visible data states, the elements omitted because narration carries them, and the existing D3/gallery/component example to adapt after the metaphor is chosen.
  3. Define layout regions before drawing. Use explicit rows, columns, quadrants, shared baselines, and shared scale targets so related objects line up and keep consistent visual weight across a beat.
  4. Split long videos into modules as soon as a block is approved or substantial: one orchestration entry point, shared data/palette/layout helpers, and separate files for beats or subscenes. Do not let one renderer file accumulate the full video.
  5. When a user explicitly approves a video iteration, update this skill or the owning component skill with the transferable lesson before moving to the next beat.
  6. Read
    references/html-video-orchestration-patterns.md
    when the request resembles a broader video workflow such as product/site source material, arbitrary text explainers, PR/code-change videos, short motion graphics, music-driven edits, captions, existing footage overlays, or multi-frame generated compositions.
  7. Read
    references/production-loop.md
    before creating or improving a standalone HTML+D3+Anime.js video pipeline.
  8. Read
    references/routing.md
    when the request overlaps another video, SVG, Slidev, D3, or Anime.js skill and the ownership boundary is unclear.
  9. Keep one structured source of truth for video data: concepts, scenes, timings, references, metrics, color tokens, and output IDs.
  10. Prefer deterministic timestamp rendering for final capture. Anime.js can enhance live preview, but final export should be reproducible from
    renderFrame(conceptId, seconds)
    .
  11. For reusable browser capture, use
    scripts/capture_html_video.py
    against an HTML file that exposes
    window.renderConceptFrame
    . It serves the HTML over local HTTP, calls the deterministic frame function in Chromium for each timestamp, captures the requested selector, encodes frames with ffmpeg, and can assert returned render-state contracts such as
    --expect-state visualPattern=systems-flow
    ,
    --expect-state-final queueSlots=8
    ,
    --expect-state-final retryVisible=true
    ,
    --expect-state-transition retryVisible=false->true
    ,
    --expect-state-final activeState=5
    ,
    --expect-state-final atlasVisible=true
    ,
    --expect-state-final activeRouteNodeCount=8
    ,
    --expect-state-final lateClusterVisible=true
    ,
    --expect-state-final rollbackVisible=true
    ,
    --expect-state-final criteriaRevealed=4
    ,
    --expect-state-final recommendationVisible=true
    ,
    --expect-state-final interventionVisible=true
    ,
    --expect-state-final activePhase=5
    ,
    --expect-state-final anomalyVisible=true
    ,
    --expect-state-final forecastVisible=true
    ,
    --expect-state-final criticalPathVisible=true
    ,
    --expect-state-final responseVisible=true
    ,
    --expect-state-final fallbackVisible=true
    ,
    --expect-state-final activeFlowCount=7
    ,
    --expect-state-final outputVisible=true
    ,
    --expect-state-final activeHandoffCount=8
    ,
    --expect-state-final completeVisible=true
    ,
    --expect-state-final activeThreatCount=4
    ,
    --expect-state-final actionVisible=true
    ,
    --expect-state-final activeScenarioCount=7
    ,
    --expect-state-final outcomeVisible=true
    ,
    --expect-state-final activeEvidenceCount=6
    ,
    --expect-state-final confidenceVisible=true
    ,
    --expect-state-final activeLayerCount=6
    ,
    --expect-state-final rolloutVisible=true
    ,
    --expect-state-final activeLineageCount=6
    ,
    --expect-state-final rollbackVisible=true
    ,
    --expect-state-monotonic visibleMechanismCount=nondecreasing
    , and
    --min-distinct-state visibleMechanismCount=4
    . For a cheaper semantic gate before full encoding, run
    scripts/check_html_render_state.py
    against the same HTML; it samples
    renderConceptFrame
    in Chromium, writes a JSON state summary, and can assert pattern-specific state values without producing an MP4. For advanced systems, route-map, skill-tree-route, lifecycle, comparison, causal-loop, timeline, metric-dashboard, dependency-map, sequence-trace, sankey-flow, swimlane-handoff, risk-bowtie, scenario-tree, evidence-ladder, layered-architecture, or data-lineage videos, sample or capture the full mechanism duration at least once so branch, failure, feedback, queue fill, active state progress, route-node progress, damage/defense clusters, attribute bridge, keystone tradeoff, respec route, late specialization, keystone, Atlas, rollback, compensation, criteria reveal, score shift, recommendation, guardrail, loop, delay, damping, side-effect, intervention, active phase progress, handoff, anomaly, forecast, decision-window, dependency risk, bottleneck, cutover, latency budget, retry, fallback, response, split, loss branch, merge, active-flow count, final output, owner-lane handoff, SLA, rework, escalation, active-handoff count, completion, active-threat count, preventive barrier, top event, mitigative barrier, consequence, degraded barrier, repair action, active-scenario count, probability, upside, risk, decision gate, fallback, selected outcome, evidence tiers, counterevidence, source gap, confidence, uncertainty, recommendation timing, layer activation, cross-cutting policy, failure path, observability, rollout, lineage activation, transform rule, quality gate, drift monitor, consumer contract, or rollback route states are proven to transition from hidden to visible, not inferred from early-frame motion or static always-on flags.
  12. For Harness Plugin videos, do not let
    swimlane-handoff
    fall back to rounded owner-lane cards. Use a hard-edge plugin-bundle megacanvas where
    plugin_bundle_cube
    , detachable modules, GitHub manifest, Claude marketplace allowlist, OpenCode npm/runtime drop, team install fanout, versioning/upgrade arrows, noisy-plugin cost risk, package install, and the packaged harness behavior stamp are state-checked visual mechanisms.
  13. For Skill definition videos, do not let
    systems-flow
    fall back to queue, worker, retry, and dead-letter cards. Use a hard-edge skill-package megacanvas where
    skill_card_stack
    , the long prompt wall collapse, compatible
    SKILL.md
    folder structures, progressive disclosure cost meter, example skill cards, tool badges, script blocks, read-surface levels, bloated skill trimming, and the final on-demand reusable workflow stamp are state-checked visual mechanisms.
  14. For AI alternatives videos, do not let
    swimlane-handoff
    fall back to owner-lane cards. Use a hard-edge AI-alternatives megacanvas where
    comparison_grid
    , Atlassian Rovo, Gemini App, GitHub Copilot, Claude Desktop or Claude Code home-base workspace blocks, a radar chart, use-case quadrants,
    credit_meter
    , workflow gravity selector, selected workflow path, guardrail/permission wraps, and observability wraps are state-checked visual mechanisms.
  15. Render drafts quickly, but never treat low-frame-rate drafts as final. Use 6 fps only for iteration; use at least 30 fps for final delivery, and consider 60 fps for subtle motion.
  16. Validate in layers: content schema, browser render-state smoke, draft render, automated MP4 review, visual contact-sheet critique, final render, final full review. For render-state gates, use
    scripts/check_html_render_state.py
    to verify exact labels, pattern identity, mechanism visibility, and state progression before paying for another video encode. For MP4 gates, use
    scripts/review_video_quality.py
    when a reusable report is needed; it checks expected duration, resolution, fps, file size, black spans, and freeze spans. For frame-level visual richness, use
    scripts/audit_video_motion.py
    ; it samples frames and checks color diversity, nonbackground area, and changing frame pairs. For honest visual review sheets, use
    scripts/make_video_contact_sheet.py
    ; it samples the encoded MP4, avoids exact-EOF frame misses, composes only real tiles, and can fail on low tile diversity, empty content, or repeated adjacent tiles. For exact output contracts, run the bundled checker at
    uv run --script skills/html-d3-anime-video-workflow/scripts/check_video_outputs.py
    in isolated workspaces, or the same skill-bundle-relative checker path in a repository checkout, with positional paths or
    --require
    ,
    --require-json-passed
    ,
    --required-anchors
    , and media expectations such as
    --duration
    ,
    --fps
    ,
    --width
    , and
    --height
    ; do not probe root-level
    scripts/
    or open the checker source just to discover CLI arguments. If the prompt-contract wrapper already verified exact outputs and reports
    passed: true
    , do not run or inspect
    check_video_outputs.py
    again.
  17. For Metro Minimal Tonal Motion or other color-restricted video requests, require the reusable
    scripts/run_metro_audit_suite.py
    runner, which invokes
    scripts/audit_metro_tonal_style.py
    ,
    scripts/audit_metro_composition.py
    ,
    scripts/audit_metro_rendered_frames.py
    , and
    scripts/audit_metro_mute_test.py
    , plus
    scripts/audit_metro_video_composition.py
    against the encoded MP4. Prefer naming
    metro-style-audit.json
    ,
    metro-composition-audit.json
    ,
    metro-rendered-frame-audit.json
    ,
    metro-mute-test-audit.json
    ,
    metro-video-composition-audit.json
    , and
    metro-audit-suite.json
    in the prompt or passing
    --metro-style-manifest
    ,
    --metro-composition-manifest
    ,
    --metro-rendered-frame-manifest
    ,
    --metro-mute-test-manifest
    ,
    --metro-video-composition-manifest
    , and
    --metro-audit-suite-manifest
    so the wrapper runs the full suite before exact-output verification; if only the suite manifest is supplied, the wrapper derives the four child report paths beside it and a sibling MP4 composition report. Do not open the suite or child audit source in normal video generation; their public contract is the wrapper flags and manifest fields. The tonal audit checks colorset1-only HTML color usage, absence of visible editorial
    checked ... draft/scaffold
    frame text, and source-package visual anchors. The composition audit checks 0-radius borders, hard line caps/joins, 4 px grid-aligned rectangle edges, shared-edge structure, runtime normalization for dynamic rectangles, zero box-padding/inset signals, and enough distinct grayscale levels to separate hierarchy in both the HTML source and the selected
    visualPattern
    branch from
    source-package.json
    , including a minimum luminance spread. The rendered-frame audit loads the generated HTML in Chromium, samples
    renderConceptFrame
    , then checks the live SVG DOM for 0-radius rects, hard line caps/joins, transformed/rendered 4 px grid-aligned rect edges, shared-edge composition, the declared zero-padding policy, measured zero-padding geometry for any
    data-box-id
    /
    data-fill-for
    fill associations, high-confidence untagged inset rectangles that look like internal padding,
    data-zone-id
    /
    data-zone-role
    functional-zone markers, area-weighted visible grayscale hierarchy levels, median active-sample gray hierarchy, active-sample pass ratio, final-frame grayscale hierarchy, text-area ratio, mark-to-text density, dominant text boxes, title/date/editorial text bands, required Masonry module count and size variety,
    masonryModuleCounts
    construction progression, nondecreasing module growth, low text-element/text-character counts for required Masonry, and red rectangle area for product-choice modules. The MP4 composition audit samples the encoded video and fails slide-like contact sheets with weak grid coverage, weak quadrant distribution, weak opening composition, weak distributed spatial progression, excessive text-like small-component pressure, or red-family pixel area above the configured threshold; it catches cases where DOM audits pass but the delivered video still reads as six labeled slides or broad red panels. The suite forwards a bounded four-sample mute test by default; because the mute-test still requires three hidden changing pairs, every adjacent hidden-text pair must change. The mute-test audit hides rendered SVG text and verifies that the remaining marks still show changing frame pairs, nonbackground area, functional zones, gray hierarchy, and enough visual marks, so the concept is not carried only by labels. Treat a failed audit as a style or composition failure before accepting the video.
  1. 在独立验证工作区中,若
    ../prompt.md
    存在,需直接优先读取;不要在bash运行环境中使用PowerShell特定命令(如
    Get-ChildItem
    Test-Path
    )探测该文件,也不要将
    README.md
    作为prompt的替代文件读取。独立的
    pi
    shell为bash环境;在bash中执行PowerShell探测属于无效验证操作。在检查可选参考文件前,需将
    ../prompt.md
    视为路径和命令约定。读取
    SKILL.md
    无法满足读取prompt的要求。若prompt指定了精确命令或提供了用于生成所需视频框架或验证工件的代码块命令,需在从当前工作区根目录读取prompt后立即严格执行该命令;不要添加
    cd /mnt/data
    cd .
    pwd
    或任何其他目录切换/探测命令。对于渲染、浏览器、ffmpeg或Metro审计命令,需将shell工具超时时间设置为至少600秒,确保耗时较长的可视化审计能成功完成,不会因超时导致无效重试。不要用占位符替换具体路径,不要推断替代项目ID,不要检查目标脚本源码,也不要先用
    Get-ChildItem
    ls
    dir
    find
    pwd
    命令列出目录。不要提问、读取可选参考文件、打开辅助脚本源码,也不要在执行该命令前仅读取技能文件就停止操作。除非任务是修改或调试这些脚本,否则在常规任务使用过程中,不要读取
    scripts/build_standalone_explainer.py
    scripts/build_from_prompt_contract.py
    scripts/run_metro_audit_suite.py
    、任何
    scripts/audit_metro_*.py
    scripts/check_video_outputs.py
    。命令执行完成后,先验证要求的精确路径,再进行优化或响应。
    • ../prompt.md
      提供了精确命令,优先执行该命令。否则,若
      ../prompt.md
      包含
      Required exact outputs
      ,需立即执行以下快速通道命令,不要打开包装器、套件、审计或检查器源码:
      uv run --script skills/html-d3-anime-video-workflow/scripts/build_from_prompt_contract.py --prompt ../prompt.md
      。当prompt约定需要时,该包装器会生成报告路径、状态检查和Metro审计内容。通过紧凑的包装器报告加上对所需路径的直接存在性检查进行验证;仅当包装器或审计结果失败时,才读取子审计清单。
  2. 将组件工作路由至对应的已有技能:
    • 使用
      d3
      技能处理D3可视化形式选择、确定性SVG几何图形、标签、令牌颜色、构图以及D3图库模式。
    • 使用
      slidev-animejs
      技能处理Anime.js生命周期、作用域选择器、清理操作、SVG辅助工具、文本辅助工具以及Slidev点击状态。
    • 使用
      slidev-video
      技能处理Slidev演示文稿录制、原生导航、MP4/WebM导出、清单、截图以及起始片段修剪。
    • 使用
      slidev-quality-audit
      技能处理Slidev视觉质量检测。
    • 使用
      animated-svg-to-gif
      技能处理从动画SVG资产转换为GIF格式的操作。
    • 当任务是将多个现有SVG资产合成为Manim渲染的MP4时,使用
      manim-svg-video
      技能。
  3. 仅在这些技能未覆盖的编排层使用本技能:基于研究的脚本更新、多视频规划、时间戳驱动的HTML渲染器、帧捕获、ffmpeg编码、反复评审环节、清单以及生产说明。
  4. 当用户要求生成工件时,需写入要求的精确输出路径。不要替换为描述性文件名,不要仅将内容放在聊天中,不要提问澄清而不执行操作,也不要在独立验证过程中写入复制的技能目录。
  5. 若prompt提供了精确输出路径以及足够的源事实以启动任务,对任何可选内容采用保守默认值。当prompt已说明或提供了可用范围时,不要询问时长、受众、风格、旁白或格式。将缺失的非阻塞事实记录为
    null
    missingFacts
    或生产说明风险,然后构建所需的最小有效源包、渲染器、渲染脚本、视频和评审工件。
  6. 对于尚无项目渲染器的独立完整视频请求,需将捆绑的构建器视为可执行工具,而非需要检查的文件。若prompt提供了精确的包装器命令,需严格执行。若prompt列出了精确路径、源事实和锚点,但未提供完整的辅助命令,需执行
    scripts/build_from_prompt_contract.py --prompt ../prompt.md --manifest <report.json>
    以确定性地生成并运行独立辅助工具。若prompt已指定
    prompt-contract-build.json
    报告路径,省略
    --manifest
    参数时包装器可自动推导该清单路径。若prompt要求Metro风格、设计保真度、复杂动态视觉效果、低文本量、镜头移动、colorset1、灰度层级,或指出结果不符合设计要求,包装器会从
    scripts/plan_metro_pattern_mix.py
    生成
    metroPatternMix
    ;当框架模式为
    auto
    时,会在推导状态检查前应用混合模式中的
    helperPattern
    。若prompt指定了
    render-state
    browser-state
    JSON报告路径且未提供状态标志,包装器可从所选框架模式和保留的标签标题中推导
    --state-manifest
    以及默认模式、标签包含、最终状态、
    false->true
    机制展示、单调递增的
    visibleMechanismCount
    进度检查。若prompt指定了
    metro-style-audit.json
    metro-composition-audit.json
    metro-rendered-frame-audit.json
    metro-mute-test-audit.json
    metro-video-composition-audit.json
    metro-audit-suite.json
    ,包装器可推导这些审计路径,运行可复用的Metro审计套件以及编码后的MP4构图审计,并在验证精确输出前写入报告。当prompt要求在同一环节中提供更严格的验证依据时,添加明确的
    --state-manifest
    --metro-style-manifest
    --metro-composition-manifest
    --metro-rendered-frame-manifest
    --metro-mute-test-manifest
    --metro-video-composition-manifest
    --metro-audit-suite-manifest
    --state-expect
    --state-expect-final
    --state-expect-contains
    --state-expect-transition
    --state-expect-monotonic
    --state-min-distinct
    标志。对于区域验证,使用
    --state-expect-final visibleZoneCount=<count>
    证明巨幅画布(megacanvas)展示了足够的区域,使用
    --state-min-distinct activeZoneId=<count>
    证明镜头或节拍路径覆盖了多个区域;绝不要添加
    --state-min-distinct visibleZoneCount
    ,因为稳定的可见区域数量是预期要求。此prompt约定包装器路径为快速通道:除非prompt明确要求定制设计工作,否则在运行包装器前不要读取
    visual-metaphor-design.md
    scene-pattern-recipes.md
    html-video-orchestration-patterns.md
    metro-minimal-tonal-motion.md
    visual-density-pattern-bank.md
    production-loop.md
    。仅当prompt缺少包装器命令且包装器无法推导有效约定时,才读取
    references/standalone-helper-contract.md
    作为手动回退方案;在复制的独立工作区中,使用
    skills/html-d3-anime-video-workflow/references/standalone-helper-contract.md
    。不要仅为了解参数或诊断通过的运行结果而打开辅助工具、包装器、套件、审计或检查器源码。辅助工具会生成源包、生产说明、带有
    renderConceptFrame
    的HTML、
    render.mjs
    、草稿MP4、带JSON清单的指标联系表以及自我评审内容;当提供或在prompt中检测到清单路径时,prompt约定包装器还会写入紧凑的JSON推导/构建/媒体/源保留报告,嵌入包含所选密度模式、功能区域、语义运动系统、镜头路径、转场约定和反模式风险的
    metroPatternMix
    ,嵌入从生成的联系表清单中提取的紧凑
    contactSheet
    摘要(包含每个图块的指标以及
    openingTile
    finalTile
    openingTileAssessment
    ),当开场评估较弱时添加
    weak-opening-tile
    检测结果,并且当提供或推导了对应的清单路径时,可嵌入紧凑的
    stateCheck
    metroAuditSuite
    metroStyleAudit
    metroCompositionAudit
    metroRenderedFrameAudit
    metroMuteTestAudit
    metroVideoCompositionAudit
    结果。当包装器报告及其嵌入的
    contactSheet
    摘要均显示
    passed: true
    ,生成的联系表清单显示
    passed: true
    contactSheet.openingTileAssessment.weak
    false
    ,任何要求或推导的
    stateCheck.passed
    true
    ,任何要求的
    metroPatternMix.passed
    true
    ,且任何要求的Metro审计报告(包括
    metroVideoCompositionAudit
    )均显示
    passed: true
    时,可认为所需的框架输出已通过验证,包括
    sourcePreservation
    中保留的prompt事实、锚点和模式标签,以及
    media
    中的MP4时长、帧率、宽度和高度;除非报告结果失败,否则不要读取子审计清单或脚本源码。当prompt要求Metro极简色调运动、设计保真度、复杂动态视觉效果或低文本旁白输出时,通过这些报告仅能验证框架的有效性,而非最终打磨完成的设计;包装器运行完成后,需读取
    references/metro-minimal-tonal-motion.md
    references/visual-density-pattern-bank.md
    ,再接受或重新设计该工件。若包装器仅因Metro子审计超时或报告临时浏览器故障而失败,需先重新运行一次相同的包装器命令,再进行诊断;若仍失败,需报告清单失败情况,而非读取辅助工具、套件、审计、检查器、HTML或渲染源码。若
    contactSheet.openingTileAssessment.weak
    true
    contactSheet.openingTile
    远弱于后续图块,即使整体指标通过,也需先优化开场帧再接受草稿。若Metro审计失败,需从源prompt重新生成并修正辅助工具输入,而非手动修改生成的HTML。若执行额外诊断,需将结果写入单独的报告路径,不要覆盖要求的MP4、联系表或联系表清单。仅当prompt要求更丰富的视觉效果时,才对这些输出进行编辑或扩展。
  7. 编写场景前需遵循两项生产原则:
    • 可视化展示机制。通过因果运动、状态变化、流程、排名、累积、分支、阻塞或反馈循环来表达每个概念。
    • 带旁白的讲解视频默认不显示任何解释性文本。假设旁白承载名称、定义和注意事项;视频应展示图表、动画和状态变化。
    • 仅针对概念进行可视化。不要添加视频时长、进度条、章节轨道、时间戳、水印、状态小部件或装饰性UI边框,除非这些元素本身就是讲解的对象。
    • 对于令牌化场景,从第一帧开始就将文本渲染为数据所属的令牌组。展示令牌组自身的填充色、边框、数值状态和目标位置,而非在独立文本节点上绘制框。
    • 对于Metro极简色调运动、严格网格或直角边框评审,需将设计视为可导航的模块化巨幅画布(megacanvas),而非幻灯片序列。构建多个功能区域,通过缩放、平移、扩展块、遮罩或图块变形让镜头探索这些区域;不要在视频帧内预留标题、副标题、说明或日期栏。默认视觉约定为:使用圆角半径为0的矩形、对齐4px网格的边缘、共享基线、无内部框内边距、colorset1的Open Sans字体栈,以及不同灰度级别构建视觉层级。不要在Metro源码中保留潜在的圆角回退逻辑,如
      rx: masonryRequired ? 0 : 14
      ;即使当前渲染路径会将其归一化,源码级别的非零
      rx
      ry
      或半径分支也属于设计失误。对于打磨后的Metro或“不符合设计要求”的修复工作,需要求源包暴露
      visualZones
      semanticBindings
      ,SVG DOM暴露
      data-zone-id
      data-zone-role
      data-source-anchor-json
      标记(兼容旧版
      data-source-anchor
      回退),
      renderConceptFrame
      状态暴露
      visibleZoneCount
      、变化的
      activeZoneId
      activeSourceAnchors
      。对于辅助工具生成的Masonry布局作品,编码后的MP4联系表需展示与采样HTML一致的低文本量墙体构建效果,开场图块不能较弱,且需展示模块增长而非标签。低文本量Masonry布局不仅是隐藏标签:所选辅助标记必须位于可见的共享Masonry巨幅画布基底上,因此第一帧应呈现为对齐的模块化墙体,而非孤立的图表或面板。
    • 最终SVG输出中不要用
      ...
      缩写功能标签。若标签无法容纳,需重新计算布局、将标签移至对齐通道、使用更小的本地字体,或在源包中有意缩短源标签;可见的截断属于设计失误。
  8. 在选择D3示例、复用先前场景或编写节拍前,需设计视觉隐喻。写出概念主张、因果机制、两到三个候选隐喻、被否决的备选方案、选定的视觉词汇,以及形状、颜色、动画和布局的具体重复作用。仅当旧视觉模式能保留相同语义作用时才复用。
  9. 当设计新的概念视频、重新设计较弱的节拍,或响应“场景通用、复制、装饰性过强或依赖文本”的反馈时,需读取
    references/visual-metaphor-design.md
  10. 当请求提及Metro极简色调运动、colorset1、colorset2、严格网格、直角边框、无圆角边框、无内边距、灰度层级、Masonry、巨幅画布、镜头移动,或反馈输出不符合设计要求时,需读取
    references/metro-minimal-tonal-motion.md
    • 使用捆绑的
      references/metro-design-profile.json
      作为运行时调色板和几何图形的权威来源。它记录了源文件
      style.md
      colorset1.yml
      colorset2.yaml
      的哈希值;不要用手写调色板替换它。当这些源文件更改时,需用
      scripts/compile_metro_design_profile.py
      重新编译。
    • 当用户表示视频不符合设计要求时,需将当前工件视为已被否决。重新渲染前需根据设计约定重新构图:移除标题/说明/日期栏,移除带内边距的框和圆角几何图形,恢复colorset1的灰度层级,证明模块化对齐,并添加能保留巨幅画布结构的镜头或块级转场。
  11. 当请求要求更复杂、动态、信息密集、可视化而非文本化、基于模式或受D3启发的视频时,需读取
    references/visual-density-pattern-bank.md
    。在接受仅包含框和标签的框架前需使用该文件。对于Metro重新设计,需运行或检查包装器从
    scripts/plan_metro_pattern_mix.py
    生成的
    metroPatternMix
    ,并要求至少包含六个命名密度模式、三个使用的节拍模式、五个功能区域、四个语义运动系统、三个镜头事件、三个转场约定、至少两种转场类型、一种模块化转场类型(如图块变形、遮罩重构图、表面擦除、Masonry构建或扩展块)、无内部内边距、圆角半径为0的几何图形、灰度层级,以及当混合模式映射到现有D3模式时的
    reusableD3PatternIds
    ,之后才能接受设计方向。
  • design/videos.md
    中的命名视觉锚点视为渲染约定。若模块指定了
    probability_bars
    passN_grid
    test_runner
    、上下文窗口切换、评审/评分卡、
    agent_loop_ring
    context_window_box
    、固定工作流与自适应代理通道、环境变化、Model + Tools + State + Loop模块、
    shield_gate
    、输入/输出/操作门、提示气泡与硬门、Model Armor过滤通道、
    risk_score
    、人工审批、受保护的
    .env
    /破坏性/部署操作、安全与摩擦平衡、策略矩阵提示、
    comparison_grid
    、运行时栈、引擎到仪表板变形、不同 harness 外壳中的同一模型、三列harness卡片、
    credit_meter
    、功能网格与用例矩阵、高亮选择路径、
    event_timeline
    、生命周期事件脉冲、Hook
    shield_gate
    覆盖层、GitHub Hook徽章、Claude事件云、OpenCode事件列表、PreToolUse命令块、日志过滤路径、令牌节省计数器、速度与成本滑块、生命周期控制标记、Atlassian Rovo、Gemini App、GitHub Copilot、Claude Desktop或Claude Code、工作流引力、主工作区块、雷达图、用例选择器、防护栏、权限或可观测性包装器等主题,这些主题必须作为可见的低文本量几何图形出现在最终MP4和联系表中,而非仅作为JSON中保留的源字符串。
  • 对于
    design/videos.md
    这类多视频源,渲染系列视频前需运行
    scripts/plan_metro_video_series.py
    。不要接受整个文档使用单一全局
    metroPatternMix
    作为设计保真度的证明。需要求报告通过验证,每个模块的
    helperPattern
    primaryPattern
    reusableD3PatternIds
    具有足够多样性,且无长时间重复使用同一辅助模式的情况,确保不同主题不会退化为相同的通用框架。
  • 当收到设计否决反馈后重新生成整个系列视频时,需先使用
    scripts/build_metro_series_contract_prompts.py
    生成prompt约定,再运行
    pi
    。生成的prompt必须包含包装器命令、渲染状态清单、完整Metro审计套件、编码后的MP4构图审计和语义密度审计作为精确要求的输出。使用这些生成的prompt而非手动编写的单视频prompt,确保批量任务不会跳过
    metro-video-composition-audit.json
    或Masonry/巨幅画布修复约定。
  1. 当复用已批准的场景模式、提取共享视觉组件或保留当前项目中的优秀示例时,需读取
    references/scene-pattern-recipes.md
    。将紧凑的配方视为运行时权威来源;仅在维护验收夹具时才检查
    assets/examples/
  2. 在编写每个节拍前,需执行视觉决策环节:确定机制、选定的形状隐喻、可见的数据状态、因旁白承载而省略的元素,以及选定隐喻后要适配的现有D3/图库/组件示例。
  3. 在绘制前定义布局区域。使用明确的行、列、象限、共享基线和共享缩放目标,确保相关对象对齐,并在整个节拍中保持一致的视觉权重。
  4. 一旦某个模块获得批准或内容足够丰富,需将长视频拆分为多个模块:一个编排入口点、共享的数据/调色板/布局辅助工具,以及每个节拍或子场景的单独文件。不要让单个渲染器文件包含完整视频内容。
  5. 当用户明确批准某个视频迭代版本时,需在进入下一个节拍前,将可迁移的经验更新到本技能或对应的组件技能中。
  6. 当请求涉及更广泛的视频工作流(如产品/站点源素材、任意文本讲解视频、PR/代码变更视频、短动画图形、音乐驱动的剪辑、字幕、现有素材叠加或多帧生成构图)时,需读取
    references/html-video-orchestration-patterns.md
  7. 在创建或改进独立的HTML+D3+Anime.js视频流水线前,需读取
    references/production-loop.md
  8. 当请求与其他视频、SVG、Slidev、D3或Anime.js技能重叠且所有权边界不明确时,需读取
    references/routing.md
  9. 为视频数据保留一个结构化的权威来源:概念、场景、时间安排、参考资料、指标、颜色令牌和输出ID。
  10. 最终捕获时优先使用确定性时间戳渲染。Anime.js可用于增强实时预览,但最终导出需可通过
    renderFrame(conceptId, seconds)
    实现复现。
  11. 对于可复用的浏览器捕获,需针对暴露
    window.renderConceptFrame
    的HTML文件使用
    scripts/capture_html_video.py
    。它通过本地HTTP服务HTML文件,在Chromium中为每个时间戳调用确定性帧函数,捕获要求的选择器,用ffmpeg编码帧,并且可断言返回的渲染状态约定,如
    --expect-state visualPattern=systems-flow
    --expect-state-final queueSlots=8
    --expect-state-final retryVisible=true
    --expect-state-transition retryVisible=false->true
    --expect-state-final activeState=5
    --expect-state-final atlasVisible=true
    --expect-state-final activeRouteNodeCount=8
    --expect-state-final lateClusterVisible=true
    --expect-state-final rollbackVisible=true
    --expect-state-final criteriaRevealed=4
    --expect-state-final recommendationVisible=true
    --expect-state-final interventionVisible=true
    --expect-state-final activePhase=5
    --expect-state-final anomalyVisible=true
    --expect-state-final forecastVisible=true
    --expect-state-final criticalPathVisible=true
    --expect-state-final responseVisible=true
    --expect-state-final fallbackVisible=true
    --expect-state-final activeFlowCount=7
    --expect-state-final outputVisible=true
    --expect-state-final activeHandoffCount=8
    --expect-state-final completeVisible=true
    --expect-state-final activeThreatCount=4
    --expect-state-final actionVisible=true
    --expect-state-final activeScenarioCount=7
    --expect-state-final outcomeVisible=true
    --expect-state-final activeEvidenceCount=6
    --expect-state-final confidenceVisible=true
    --expect-state-final activeLayerCount=6
    --expect-state-final rolloutVisible=true
    --expect-state-final activeLineageCount=6
    --expect-state-final rollbackVisible=true
    --expect-state-monotonic visibleMechanismCount=nondecreasing
    --min-distinct-state visibleMechanismCount=4
    。在完整编码前进行低成本语义检查时,需针对同一HTML文件运行
    scripts/check_html_render_state.py
    ;它在Chromium中采样
    renderConceptFrame
    ,写入JSON状态摘要,并且可断言特定模式的状态值而无需生成MP4。对于高级系统、路线图、技能树路线、生命周期、对比、因果循环、时间线、指标仪表板、依赖图、序列跟踪、桑基流、泳道交接、风险蝴蝶结图、场景树、证据阶梯、分层架构或数据血缘视频,至少需采样或捕获完整的机制时长一次,确保分支、故障、反馈、队列填充、活动状态进度、路线节点进度、损坏/防御集群、属性桥、关键权衡、重新指定路线、后期特化、关键组件、Atlas、回滚、补偿、标准展示、分数变化、建议、防护栏、循环、延迟、阻尼、副作用、干预、活动阶段进度、交接、异常、预测、决策窗口、依赖风险、瓶颈、切换、延迟预算、重试、回退、响应、拆分、损失分支、合并、活动流计数、最终输出、所有者泳道交接、SLA、返工、升级、活动交接计数、完成、活动威胁计数、预防屏障、顶级事件、缓解屏障、后果、降级屏障、修复操作、活动场景计数、概率、上行空间、风险、决策门、回退、选定结果、证据层级、反证、源缺口、置信度、不确定性、建议时机、层激活、跨领域策略、故障路径、可观测性、部署、血缘激活、转换规则、质量门、漂移监控、消费者约定或回退路线状态从隐藏变为可见,而非从早期帧动画或静态始终开启的标志推断。
  12. 对于Harness Plugin视频,不要让
    swimlane-handoff
    退化为圆角所有者泳道卡片。需使用直角边框的插件捆绑巨幅画布,其中
    plugin_bundle_cube
    、可分离模块、GitHub清单、Claude市场白名单、OpenCode npm/运行时部署、团队安装扩散、版本控制/升级箭头、 noisy-plugin 成本风险、包安装以及打包后的harness行为标记均为经过状态检查的视觉机制。
  13. 对于技能定义视频,不要让
    systems-flow
    退化为队列、工作者、重试和死信卡片。需使用直角边框的技能包巨幅画布,其中
    skill_card_stack
    、长prompt墙折叠、兼容的
    SKILL.md
    文件夹结构、渐进式披露成本计量器、示例技能卡片、工具徽章、脚本块、读取表面级别、臃肿技能修剪以及最终的按需可复用工作流标记均为经过状态检查的视觉机制。
  14. 对于AI替代方案视频,不要让
    swimlane-handoff
    退化为所有者泳道卡片。需使用直角边框的AI替代方案巨幅画布,其中
    comparison_grid
    、Atlassian Rovo、Gemini App、GitHub Copilot、Claude Desktop或Claude Code主工作区块、雷达图、用例象限、
    credit_meter
    、工作流引力选择器、选定的工作流路径、防护栏/权限包装器以及可观测性包装器均为经过状态检查的视觉机制。
  15. 快速渲染草稿,但绝不要将低帧率草稿视为最终版本。仅在迭代时使用6 fps;最终交付时至少使用30 fps,对于精细动画可考虑使用60 fps。
  16. 分层验证:内容架构、浏览器渲染状态冒烟测试、草稿渲染、自动化MP4评审、视觉联系表评审、最终渲染、最终全面评审。对于渲染状态检查,需使用
    scripts/check_html_render_state.py
    在进行下一次视频编码前验证精确标签、模式标识、机制可见性和状态进度。对于MP4检查,当需要可复用报告时使用
    scripts/review_video_quality.py
    ;它检查预期时长、分辨率、帧率、文件大小、黑屏片段和冻结片段。对于帧级视觉丰富度,使用
    scripts/audit_video_motion.py
    ;它采样帧并检查颜色多样性、非背景区域和变化的帧对。对于真实的视觉评审表,使用
    scripts/make_video_contact_sheet.py
    ;它采样编码后的MP4,避免精确EOF帧遗漏,仅合成真实图块,并且可在图块多样性低、内容为空或相邻图块重复时标记失败。对于精确输出约定,在独立工作区中运行捆绑的检查器
    uv run --script skills/html-d3-anime-video-workflow/scripts/check_video_outputs.py
    ,或在代码库检出中使用相同的技能捆绑相对检查器路径,传入位置路径或
    --require
    --require-json-passed
    --required-anchors
    以及媒体预期参数(如
    --duration
    --fps
    --width
    --height
    );不要探测根级
    scripts/
    或打开检查器源码以发现CLI参数。若prompt约定包装器已验证精确输出并报告
    passed: true
    ,则无需再次运行或检查
    check_video_outputs.py
  17. 对于Metro极简色调运动或其他颜色受限的视频请求,需使用可复用的
    scripts/run_metro_audit_suite.py
    运行器,它会调用
    scripts/audit_metro_tonal_style.py
    scripts/audit_metro_composition.py
    scripts/audit_metro_rendered_frames.py
    scripts/audit_metro_mute_test.py
    ,以及针对编码后MP4的
    scripts/audit_metro_video_composition.py
    。优先在prompt中指定
    metro-style-audit.json
    metro-composition-audit.json
    metro-rendered-frame-audit.json
    metro-mute-test-audit.json
    metro-video-composition-audit.json
    metro-audit-suite.json
    ,或传入
    --metro-style-manifest
    --metro-composition-manifest
    --metro-rendered-frame-manifest
    --metro-mute-test-manifest
    --metro-video-composition-manifest
    --metro-audit-suite-manifest
    ,让包装器在验证精确输出前运行完整套件;若仅提供了套件清单,包装器会在其旁边推导四个子报告路径以及同级的MP4构图报告。在常规视频生成过程中不要打开套件或子审计源码;它们的公开约定为包装器标志和清单字段。色调审计检查仅使用colorset1的HTML颜色、无可见的编辑性
    checked ... draft/scaffold
    帧文本,以及源包视觉锚点。构图审计检查圆角半径为0的边框、硬线帽/连接线、对齐4px网格的矩形边缘、共享边缘结构、动态矩形的运行时归一化、无框内边距/内缩信号,以及HTML源码和
    source-package.json
    中所选
    visualPattern
    分支具有足够的不同灰度级别以区分层级,包括最小亮度范围。渲染帧审计在Chromium中加载生成的HTML,采样
    renderConceptFrame
    ,然后检查实时SVG DOM中的圆角半径为0的矩形、硬线帽/连接线、变换/渲染后对齐4px网格的矩形边缘、共享边缘构图、声明的零内边距策略、任何
    data-box-id
    /
    data-fill-for
    填充关联的测量零内边距几何图形、看似内部内边距的高置信度未标记内缩矩形、
    data-zone-id
    /
    data-zone-role
    功能区域标记、按面积加权的可见灰度层级、活动样本的中位灰度层级、活动样本通过率、最终帧灰度层级、文本区域比例、标记与文本密度、主导文本框、标题/日期/编辑文本栏、所需的Masonry模块数量和尺寸多样性、
    masonryModuleCounts
    构建进度、模块数量非递减增长、所需Masonry布局的低文本元素/文本字符计数,以及产品选择模块的红色矩形面积。MP4构图审计采样编码后的视频,若联系表呈现出幻灯片式的弱网格覆盖、弱象限分布、弱开场构图、弱分布式空间进度、过多类文本小组件压力,或红色系像素面积超过配置阈值,则标记失败;它能捕获DOM审计通过但交付的视频仍呈现为六个带标签的幻灯片或大面积红色面板的情况。套件默认执行有限的四样本静音测试;由于静音测试仍需要三个隐藏的变化帧对,因此每个相邻的隐藏文本帧对必须发生变化。静音测试审计隐藏渲染的SVG文本,并验证剩余标记仍能展示变化的帧对、非背景区域、功能区域、灰度层级和足够的视觉标记,确保概念并非仅由标签承载。接受视频前需将审计失败视为风格或构图失误。

Plan Artifact Tasks

计划工件任务

When the task is to produce a Markdown plan, manifest, storyboard, production notes, or review file:
  1. Read only the references needed for the requested source type and deliverable.
  2. Write the requested file path in the workspace root or user-specified project directory before composing a final chat response.
  3. Use the exact filename from the prompt, such as
    production-plan.md
    ; do not rename it to
    plan.md
    ,
    implementation-plan.md
    , or a project-specific default.
  4. Preserve the user's source facts in the artifact. Include literal titles, identifiers, constants, event names, file names, durations, and named constraints from the prompt when they are part of the requested source package or plan.
  5. Do not leave placeholders for facts the prompt already provides. A table cell like
    _[exact title]_
    is a validation failure when the title was supplied.
  6. For PR/code-change plan artifacts, make the first section a filled
    Source Facts
    table copied from the prompt or source package. It must include exact PR title/summary, change size, behavior, filenames, constants, events, audience, style, and duration whenever supplied.
  7. Verify the file exists, is non-empty, and contains the task's required literal anchors before final response.
  8. Keep the final chat response brief and point to the created file.
当任务是生成Markdown计划、清单、故事板、生产说明或评审文件时:
  1. 仅读取与请求的源类型和交付物相关的参考资料。
  2. 在工作区根目录或用户指定的项目目录中写入请求的文件路径,再撰写最终聊天响应。
  3. 使用prompt中指定的精确文件名,如
    production-plan.md
    ;不要重命名为
    plan.md
    implementation-plan.md
    或项目特定的默认名称。
  4. 在工件中保留用户的源事实。当prompt中的字面标题、标识符、常量、事件名称、文件名、时长和命名约束属于请求的源包或计划的一部分时,需将其包含在内。
  5. 不要为prompt已提供的事实留下占位符。若标题已提供,表格单元格中的
    _[exact title]_
    属于验证失败。
  6. 对于PR/代码变更计划工件,第一部分需为从prompt或源包复制的已填充
    Source Facts
    表格。只要prompt提供,表格必须包含精确的PR标题/摘要、变更规模、行为、文件名、常量、事件、受众、风格和时长。
  7. 最终响应前需验证文件存在、非空且包含任务所需的字面锚点。
  8. 最终聊天响应需简洁,并指向已创建的文件。

Non-Duplication Rules

非重复规则

  • Do not copy D3 chart taxonomy, Anime.js API examples, Slidev recording options, or animated SVG conversion details into this skill. Link to the owning skill and load it when needed.
  • Store workflow lessons here only when they affect the cross-stack production process.
  • If a lesson is specific to D3 SVG extraction, Anime.js lifecycle, Slidev recording, or GIF encoding, update that owning skill instead of adding it here.
  • 不要将D3图表分类、Anime.js API示例、Slidev录制选项或动画SVG转换细节复制到本技能中。链接到对应的技能,并在需要时加载该技能。
  • 仅当工作流经验影响跨技术栈的生产流程时,才在此处存储。
  • 若经验特定于D3 SVG提取、Anime.js生命周期、Slidev录制或GIF编码,需更新对应的技能而非添加到本技能中。

Pattern Promotion

模式推广

When an approved scene, shared helper, render preset, storyboard gate, production loop, or validation routine proves reusable, update
references/scene-pattern-recipes.md
,
references/visual-metaphor-design.md
, or
references/production-loop.md
before finishing. If the pattern is component-local, update the owning component skill instead. Include trigger, visual metaphor, data/timing contract, implementation steps, validation command, and isolated-workspace caveats when relevant.
当已批准的场景、共享辅助工具、渲染预设、故事板检查点、生产循环或验证流程被证明可复用时,需在完成前更新
references/scene-pattern-recipes.md
references/visual-metaphor-design.md
references/production-loop.md
。若模式属于组件本地范围,需更新对应的组件技能。相关时需包含触发条件、视觉隐喻、数据/时间约定、实现步骤、验证命令和独立工作区注意事项。

Validation

验证

After changing this skill, run:
powershell
uv run --script scripts/validate-skills.py
For SkillOpt or SkillOpt-Sleep maintenance, use reviewed task files or exact
pi
prompts with required output paths and scoring commands. Do not auto-adopt mined session proposals unless the candidate passes the prompt-contract wrapper report plus the relevant Metro audits. A no-edit SkillOpt result with
baseline: 0
and
candidate: 0
means the harvested tasks lacked enough scoring signal for this skill, not that the skill is optimal; add or repair the task gate instead of weakening runtime instructions.
When changing standalone scaffold patterns, wrapper label extraction, source-preservation fields, or derived render-state defaults, also run:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/check_standalone_pattern_contracts.py --output projects/<project-id>/artifacts/reviews/pattern-contract-check.json
When changing Metro tonal style handling, also run:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/audit_metro_tonal_style.py --html projects/<project-id>/src/index.html --source-package projects/<project-id>/source/source-package.json --output projects/<project-id>/artifacts/reviews/metro-style-audit.json
When changing Metro composition or zero-padding handling, also run:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/run_metro_audit_suite.py --html projects/<project-id>/src/index.html --source-package projects/<project-id>/source/source-package.json --style-output projects/<project-id>/artifacts/reviews/metro-style-audit.json --composition-output projects/<project-id>/artifacts/reviews/metro-composition-audit.json --rendered-frame-output projects/<project-id>/artifacts/reviews/metro-rendered-frame-audit.json --mute-test-output projects/<project-id>/artifacts/reviews/metro-mute-test-audit.json --output projects/<project-id>/artifacts/reviews/metro-audit-suite.json
When changing Metro audit behavior, also run:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/validate_metro_audit_fixtures.py --output projects/<project-id>/artifacts/reviews/metro-audit-fixtures.json
When changing Metro design-contract references, storyboard prompts, or plan-output requirements, also run:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/validate_metro_design_contract.py --plan projects/<project-id>/production-plan.md --contract projects/<project-id>/design-contract.json --output projects/<project-id>/metro-design-validation.json --require-text "<literal source anchor>"
When changing Metro semantic-density expectations, wrapper report summaries, state checks, contact-sheet metrics, encoded-MP4 composition metrics, camera-state requirements, or rendered adherence to
metroPatternMix
, also run:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/audit_metro_semantic_density.py --wrapper-report projects/<project-id>/artifacts/reviews/prompt-contract-build.json --state-manifest projects/<project-id>/artifacts/reviews/render-state-check.json --contact-sheet-manifest projects/<project-id>/artifacts/video-renders/draft/review/<output-id>-contact-sheet.json --metro-audit-suite projects/<project-id>/artifacts/reviews/metro-audit-suite.json --metro-mute-test-audit projects/<project-id>/artifacts/reviews/metro-mute-test-audit.json --metro-video-composition-audit projects/<project-id>/artifacts/reviews/metro-video-composition-audit.json --output projects/<project-id>/artifacts/reviews/metro-semantic-density-audit.json
This semantic-density command requires the wrapper's
metroPatternMix
by default. It should fail when
selected.helperPattern
does not match the rendered
visualPattern
, when the pattern mix lacks enough zones, semantic motion systems, camera events, transition contracts, transition type variety, a modular transition type, a required Masonry pattern plus transition contract, anti-pattern risks, zero-padding contract, 0-radius contract, or grayscale hierarchy, when
source-package.json
lacks enough
visualZones
or
semanticBindings
, when source anchors are not bound to zones, mechanisms, rendered
data-source-anchor-json
/
data-source-anchor
markers, and render-state
activeSourceAnchors
, when render-state evidence lacks
visibleZoneCount
or changing
activeZoneId
, when ordered
statesSample
evidence lacks enough adjacent active-zone changes, camera-coupled zone changes, camera travel, or zoom depth, when rendered DOM evidence lacks enough zone markers to support the mix, when rendered text ends with three dots or a single-character ellipsis, when the MP4 composition audit shows slide-like grid/quadrant/progression weakness, or when the mute-test audit shows that hiding text removes the visual progression. Use JSON source-anchor attributes as the primary rendered evidence because Markdown tables and code snippets can contain
|
characters that break delimiter-based attributes. For required Masonry, it must also fail unless the rendered-frame audit proves real
data-masonry-module
geometry with enough modules, varied module sizes, enough occupied visual area, nondecreasing
masonryModuleCounts
with at least three distinct counts, enough count growth, low text-element/text-character counts, measured zero-padding coverage, and zero
paddedModuleInteriorViolationCount
. Treat
visibleZoneCount
as a presence/count signal and
activeZoneId
as the changing traversal signal.
When changing Metro pattern-mix selection, design-following gates, or low-text visual-density routing, also run:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/plan_metro_pattern_mix.py --prompt-file design/videos.md --output projects/<project-id>/artifacts/reviews/metro-pattern-mix.json --require-anchor "LLM" --require-anchor "MCP" --require-anchor "agent"
When changing multi-video Metro planning or generating from a document with several
###
video modules, also run:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/plan_metro_video_series.py --prompt-file design/videos.md --output projects/<project-id>/artifacts/reviews/metro-video-series-plan.json
Inspect
moduleCount
,
metrics.helperDiversity
,
metrics.primaryPatternDiversity
,
metrics.reusableD3PatternCount
,
metrics.maxSameHelperRun
,
helperSequence
, and each module's selected patterns before accepting a batch. A series report that fails for low diversity means the batch is still too generic even when individual Metro audits pass.
When changing design-repair series contracts, prompt generation, exact-output video batches, or Google Drive delivery prompts for a Metro series, also run:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/build_metro_series_contract_prompts.py --source design/videos.md --output-dir projects/<project-id>/artifacts/prompts --project-root projects/<project-id>/videos --duration 6 --fps 6 --width 1280 --height 720 --limit 2
Inspect the generated manifest and prompt files. Each prompt should require
prompt-contract-build.json
,
render-state-check.json
,
metro-audit-suite.json
,
metro-video-composition-audit.json
, and
metro-semantic-density-audit.json
so a design-repair batch is validated from source package through encoded MP4.
When the source design or palette files change, refresh the self-contained runtime profile first:
powershell
uv run --script <skill-root>/scripts/compile_metro_design_profile.py --style design/style.md --colorset1 design/colorset1.yml --colorset2 design/colorset2.yaml --output <skill-root>/references/metro-design-profile.json
uv run --script skills/html-d3-anime-video-workflow/scripts/validate_metro_design_profile.py --style design/style.md --colorset1 design/colorset1.yml --colorset2 design/colorset2.yaml --output projects/<project-id>/artifacts/reviews/metro-design-profile-validation.json
The profile must pass and its digest must appear in generated series prompts and tonal-audit reports.
--allow-colorset2
is valid only with a non-empty
--colorset2-reason
; it still permits only colors declared by the compiled colorset2 source.
When changing standalone scaffold geometry, gray hierarchy, zero-padding normalization, or selected-pattern rendering, also run the no-video cross-pattern smoke:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/validate_metro_pattern_smoke.py --output projects/<project-id>/artifacts/reviews/metro-pattern-smoke.json --workdir projects/<project-id>/artifacts/reviews/metro-pattern-smoke-work --no-install-browser --timeout-seconds 180
For design-rejection, low-text, or Masonry changes, add
--masonry-layout
to this smoke command. Inspect the report's top-level
aggregateMetrics
:
maxRenderedInternalPaddingPx
, total padding/inset violation counts,
minMedianGrayLevelCount
,
minFinalGrayLevelCount
,
patternsWithWeakGrayHierarchy
,
minMaxMasonryModuleCount
,
minMaxMasonrySizeCount
,
minMasonryModuleCountDistinct
,
maxMasonryTextElementCount
, and
patternsWithWeakMasonry
should all support the no-padding, grayscale-hierarchy, modular-composition, and low-text claims. For product-choice modules such as AI alternatives, also inspect
metro-rendered-frame-audit.json
for
maxRedRectAreaRatio
; broad red rectangles are a design failure even when alignment, padding, and text metrics pass.
When changing a referenced example pipeline, also run its content validator, a browser smoke test, one representative render, and the final MP4 review script for the affected output set.
修改本技能后,运行:
powershell
uv run --script scripts/validate-skills.py
对于SkillOpt或SkillOpt-Sleep维护,需使用已评审的任务文件或带有精确输出路径和评分命令的
pi
prompt。除非候选对象通过prompt约定包装器报告以及相关的Metro审计,否则不要自动采用挖掘的会话提案。无编辑的SkillOpt结果显示
baseline: 0
candidate: 0
意味着收集的任务缺乏足够的本技能评分信号,而非技能已达最优;需添加或修复任务检查点,而非削弱运行时指令。
修改独立框架模式、包装器标签提取、源保留字段或推导的渲染状态默认值时,还需运行:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/check_standalone_pattern_contracts.py --output projects/<project-id>/artifacts/reviews/pattern-contract-check.json
修改Metro色调风格处理时,还需运行:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/audit_metro_tonal_style.py --html projects/<project-id>/src/index.html --source-package projects/<project-id>/source/source-package.json --output projects/<project-id>/artifacts/reviews/metro-style-audit.json
修改Metro构图或零内边距处理时,还需运行:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/run_metro_audit_suite.py --html projects/<project-id>/src/index.html --source-package projects/<project-id>/source/source-package.json --style-output projects/<project-id>/artifacts/reviews/metro-style-audit.json --composition-output projects/<project-id>/artifacts/reviews/metro-composition-audit.json --rendered-frame-output projects/<project-id>/artifacts/reviews/metro-rendered-frame-audit.json --mute-test-output projects/<project-id>/artifacts/reviews/metro-mute-test-audit.json --output projects/<project-id>/artifacts/reviews/metro-audit-suite.json
修改Metro审计行为时,还需运行:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/validate_metro_audit_fixtures.py --output projects/<project-id>/artifacts/reviews/metro-audit-fixtures.json
修改Metro设计约定参考资料、故事板prompt或计划输出要求时,还需运行:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/validate_metro_design_contract.py --plan projects/<project-id>/production-plan.md --contract projects/<project-id>/design-contract.json --output projects/<project-id>/metro-design-validation.json --require-text "<literal source anchor>"
修改Metro语义密度预期、包装器报告摘要、状态检查、联系表指标、编码后MP4构图指标、镜头状态要求或对
metroPatternMix
的渲染依从性时,还需运行:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/audit_metro_semantic_density.py --wrapper-report projects/<project-id>/artifacts/reviews/prompt-contract-build.json --state-manifest projects/<project-id>/artifacts/reviews/render-state-check.json --contact-sheet-manifest projects/<project-id>/artifacts/video-renders/draft/review/<output-id>-contact-sheet.json --metro-audit-suite projects/<project-id>/artifacts/reviews/metro-audit-suite.json --metro-mute-test-audit projects/<project-id>/artifacts/reviews/metro-mute-test-audit.json --metro-video-composition-audit projects/<project-id>/artifacts/reviews/metro-video-composition-audit.json --output projects/<project-id>/artifacts/reviews/metro-semantic-density-audit.json
此语义密度命令默认需要包装器的
metroPatternMix
。当
selected.helperPattern
与渲染的
visualPattern
不匹配、模式混合缺少足够的区域、语义运动系统、镜头事件、转场约定、转场类型多样性、模块化转场类型、所需的Masonry模式加转场约定、反模式风险、零内边距约定、圆角半径为0的约定或灰度层级、
source-package.json
缺少足够的
visualZones
semanticBindings
、源锚点未绑定到区域、机制、渲染的
data-source-anchor-json
/
data-source-anchor
标记以及渲染状态
activeSourceAnchors
、渲染状态证据缺少
visibleZoneCount
或变化的
activeZoneId
、有序的
statesSample
证据缺少足够的相邻活动区域变化、镜头耦合区域变化、镜头移动或缩放深度、渲染的DOM证据缺少足够的区域标记以支持混合模式、渲染的文本以三个点或单个字符省略号结尾、MP4构图审计显示幻灯片式的网格/象限/进度弱点,或静音测试审计显示隐藏文本后视觉进度消失时,该命令应标记失败。使用JSON源锚点属性作为主要渲染证据,因为Markdown表格和代码片段可能包含会破坏基于分隔符的属性的
|
字符。对于所需的Masonry布局,除非渲染帧审计证明存在真实的
data-masonry-module
几何图形(具有足够的模块数量、多样的模块尺寸、足够的占用视觉区域、非递减的
masonryModuleCounts
且至少有三个不同的计数、足够的计数增长、低文本元素/文本字符计数、测量的零内边距覆盖率,以及零
paddedModuleInteriorViolationCount
),否则也应标记失败。将
visibleZoneCount
视为存在/计数信号,将
activeZoneId
视为变化的遍历信号。
修改Metro模式混合选择、设计依从检查点或低文本量视觉密度路由时,还需运行:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/plan_metro_pattern_mix.py --prompt-file design/videos.md --output projects/<project-id>/artifacts/reviews/metro-pattern-mix.json --require-anchor "LLM" --require-anchor "MCP" --require-anchor "agent"
修改多Metro视频规划或从包含多个
###
视频模块的文档生成时,还需运行:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/plan_metro_video_series.py --prompt-file design/videos.md --output projects/<project-id>/artifacts/reviews/metro-video-series-plan.json
接受批量任务前需检查
moduleCount
metrics.helperDiversity
metrics.primaryPatternDiversity
metrics.reusableD3PatternCount
metrics.maxSameHelperRun
helperSequence
以及每个模块的选定模式。若系列报告因多样性低而失败,意味着即使单个Metro审计通过,批量任务仍过于通用。
修改设计修复系列约定、prompt生成、精确输出视频批量任务或Metro系列的Google Drive交付prompt时,还需运行:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/build_metro_series_contract_prompts.py --source design/videos.md --output-dir projects/<project-id>/artifacts/prompts --project-root projects/<project-id>/videos --duration 6 --fps 6 --width 1280 --height 720 --limit 2
检查生成的清单和prompt文件。每个prompt应要求
prompt-contract-build.json
render-state-check.json
metro-audit-suite.json
metro-video-composition-audit.json
metro-semantic-density-audit.json
,确保设计修复批量任务从源包到编码后的MP4都经过验证。
当源设计或调色板文件更改时,需先刷新自包含的运行时配置文件:
powershell
uv run --script <skill-root>/scripts/compile_metro_design_profile.py --style design/style.md --colorset1 design/colorset1.yml --colorset2 design/colorset2.yaml --output <skill-root>/references/metro-design-profile.json
uv run --script skills/html-d3-anime-video-workflow/scripts/validate_metro_design_profile.py --style design/style.md --colorset1 design/colorset1.yml --colorset2 design/colorset2.yaml --output projects/<project-id>/artifacts/reviews/metro-design-profile-validation.json
配置文件必须通过验证,且其摘要必须出现在生成的系列prompt和色调审计报告中。仅当提供非空的
--colorset2-reason
时,
--allow-colorset2
才有效;它仍仅允许编译后的colorset2源文件中声明的颜色。
修改独立框架几何图形、灰度层级、零内边距归一化或选定模式渲染时,还需运行无视频跨模式冒烟测试:
powershell
uv run --script skills/html-d3-anime-video-workflow/scripts/validate_metro_pattern_smoke.py --output projects/<project-id>/artifacts/reviews/metro-pattern-smoke.json --workdir projects/<project-id>/artifacts/reviews/metro-pattern-smoke-work --no-install-browser --timeout-seconds 180
对于设计否决、低文本量或Masonry布局更改,需在此冒烟命令中添加
--masonry-layout
。检查报告的顶级
aggregateMetrics
maxRenderedInternalPaddingPx
、总内边距/内缩违规计数、
minMedianGrayLevelCount
minFinalGrayLevelCount
patternsWithWeakGrayHierarchy
minMaxMasonryModuleCount
minMaxMasonrySizeCount
minMasonryModuleCountDistinct
maxMasonryTextElementCount
patternsWithWeakMasonry
都应支持无内边距、灰度层级、模块化构图和低文本量的要求。对于AI替代方案等产品选择模块,还需检查
metro-rendered-frame-audit.json
中的
maxRedRectAreaRatio
;即使对齐、内边距和文本指标通过,大面积红色矩形也属于设计失误。
修改参考示例流水线时,还需运行其内容验证器、浏览器冒烟测试、一次代表性渲染,以及针对受影响输出集的最终MP4评审脚本。