Default reference pipeline for image, video, and audio projects — routes through media-image / media-video / media-audio atoms based on the project kind, wraps
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-od-media-generation-a01bf22d8f28 ,按照其中的说明把「od-media-generation」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
This scenario plugin is the bundled default for projects whose
metadata.kind is image, video, or audio. The web client and the
daemon both look up defaultScenarioPluginIdForKind(kind) from
@open-design/contracts and, when no other plugin is applied, bind
this scenario at project / run creation time.
{
"stages": [
{ "id": "discovery", "atoms": ["discovery-question-form"] },
{ "id": "plan", "atoms": ["todo-write"] },
{ "id": "generate", "atoms": ["media-image", "media-video", "media-audio", "live-artifact"] },
{
"id": "critique", "atoms": ["critique-theater"],
"repeat": true,
"until": "critique.score>=4 || iterations>=3"
}
]
}
The generate stage lists all three media atoms even though a single
run only calls one of them. Picking the right atom is the agent's job:
metadata.kind === 'image' → media-imagemetadata.kind === 'video' → media-videometadata.kind === 'audio' → media-audioIf the user picks this plugin manually without a media-typed project,
prefer media-image and explain the assumption in the first reply.
Every media atom takes the same kernel of inputs and returns a media
artifact reference that live-artifact can wrap:
prompt — the rendered useCase.query after input substitution.aspect — one of 1:1 / 16:9 / 9:16 / 4:3 / 3:4. Default
16:9. The contracts MediaAspect union enumerates the legal
values.provider — left blank by default so the daemon picks the user's
configured provider for this media kind
(see Settings → Media providers).
Only set this when the user names a provider explicitly.After the media atom returns:
<cwd>/media/<timestamp>.<ext>.live-artifact to register a preview surface pointing at the
saved file. The preview is what the user sees in the right pane.critique-theater reads the artifact, scores it across the standard
five dimensions, and emits a critique.score signal. The until
clause stops the loop at score ≥ 4 or three iterations, whichever
comes first. Use the critique notes to drive the next media call's
prompt, not to re-pick the media atom.
Enterprise editions that need a different default for media work
should ship a sibling scenario plugin and add the right mapping in
@open-design/contracts/scenario-defaults, not patch this manifest.