scenario-asset-analysis

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Scenario Asset Analysis

Scenario 资产分析

Overview

概述

Four tools read assets back instead of making new ones: three fixed-purpose, one open-ended. With
search
(default toolset) they answer the questions that come after a batch lands, which is where most of the work actually is: is this on brief, what look is this, what does this show, what can the next model condition on, where did last week's approved version go.
None of them are in the default toolset. Get schemas with
scenario_tools_search
, then run each through the executor matching its
permission
:
asset_caption
and
asset_describe
are read-class,
asset_analyze
and
asset_detect
are write-class. Or reconnect with
?toolsets=full
. Connection and scope: see the
scenario
skill in this repo. If a sibling skill named here is missing from your available skills, ask the user to install it (
npx skills add scenario-labs/skills --skill <name>
); unattended, proceed from tool schemas and flag the gap.
有四款工具用于读取资产信息而非生成新资产:三款为固定用途,一款为开放式。结合
search
(默认工具集),它们可以解答批量生成后出现的问题——这也是实际工作中占比最大的部分:是否符合brief要求、是什么风格、展示了什么内容、下一个模型可以用什么作为条件、上周通过的版本在哪里。
这四款工具都不在默认工具集中。可通过
scenario_tools_search
获取schema,然后根据每个工具的
permission
(权限)使用对应的执行器运行:
asset_caption
和
asset_describe
属于读取类,
asset_analyze
和
asset_detect
属于写入类。也可以通过
?toolsets=full
重新连接。连接方式与适用范围:参见本仓库中的
scenario
Skill。如果你的可用Skill中缺少这里提到的同级Skill,请让用户安装(命令:
npx skills add scenario-labs/skills --skill <name>
);若处于无人值守模式,则从工具schema继续执行并标记缺失项。

Quick reference

快速参考

NeedToolShape
A caption for one image
asset_caption
(read)
details_level
:
action
or
action+style
A reusable look off one image
asset_describe
(read)
Returns a full description plus a promptable synthesis
Anything else, in your own words
asset_analyze
(write)
instruction
plus up to 10
images
and 10
text_inputs
A conditioning map for another model
asset_detect
(write)
modality
, one of ten including canny, depth, pose, segmentation
All four bill credits and all four take
dry_run: true
for an estimate first. Read-class does not mean free.
需求工具功能详情
为单张图像生成说明文字
asset_caption
(读取类)
details_level
可选值:
action
或
action+style
从单张图像提取可复用的风格
asset_describe
(读取类)
返回完整描述以及可用于提示词的合成风格
其他任何自定义需求,用你自己的话描述
asset_analyze
(写入类)
需传入
instruction
,以及最多10张
images
和10个
text_inputs
为其他模型生成条件控制图
asset_detect
(写入类)
modality
支持10种类型,包括canny、depth、pose、segmentation
这四款工具都会消耗credits,且都支持先传入
dry_run: true
进行预估。读取类不代表免费。

The four facts that change the plan

改变使用方案的四个要点

  • asset_analyze
    batches.
    One call carries up to 10 images against one
    instruction
    , so reviewing 200 assets is 20 calls, not 200.
    num_outputs
    (1 to 5) is unrelated: it returns several distinct answers to the same instruction, not one answer per image. Ask for a fixed per-image output shape in the
    instruction
    so the answers stay parseable.
  • asset_detect
    strips the background by default.
    remove_background
    defaults to true, so a depth or pose map comes back with the frame's context already gone. Set it false whenever the map has to cover the whole image.
  • It reads a render, not the file. On a vector or layered source it cannot confirm what the file is or report its exact values: one call called a 16-path SVG raster, shifted a
    #101614
    fill to
    #131A18
    , and missed an off-palette path. Parse the file for exact color and structure; the tool judges what the render shows.
  • Fixed beats flexible when it fits.
    asset_caption
    and
    asset_describe
    are purpose-built and faster than instructing an LLM to do the same job. Reach for
    asset_analyze
    for classification, extraction, comparison, translation, or a verdict against a brief. One carve-out: for a structured pass/warn/fail verdict against a configured brand brief, teams with the Quality Gate add-on have a dedicated tool that stores its verdict and re-reads it free (see
    scenario-quality-gate
    );
    asset_analyze
    stays the route when the add-on is missing or the brief exists only as prose.
asset_analyze
and
asset_detect
wait up to 180s and then hand back a
job_id
; carry on with
jobs_wait
as anywhere else.
  • asset_analyze
    支持批量处理。
    单次调用可针对一条
    instruction
    处理最多10张图像,因此审核200个资产只需20次调用,而非200次。
    num_outputs
    (1到5)与此无关:它是针对同一条指令返回多个不同的答案,而非每张图像返回一个答案。请在
    instruction
    中要求固定的单张图像输出格式,以确保答案可解析。
  • asset_detect
    默认移除背景。
    remove_background
    默认值为true,因此返回的深度或姿态图会去掉画面的背景上下文。如果需要控制图覆盖整张图像,请将其设为false。
  • 它读取的是渲染结果,而非源文件。 对于矢量或分层源文件,它无法确认文件本身的信息或返回精确值:有一次调用将16路径的SVG识别为栅格图,将
    #101614
    的填充色误判为
    #131A18
    ,还漏掉了一条调色板外的路径。如需精确的颜色和结构信息,请直接解析源文件;该工具仅判断渲染后呈现的内容。
  • 适用场景下,固定工具优于灵活工具。
    asset_caption
    和
    asset_describe
    是专用工具,比直接指令LLM完成同类任务速度更快。如需分类、提取、比较、翻译或针对brief的评估结论,请使用
    asset_analyze
    。一个例外:如果需要针对已配置的品牌brief生成结构化的通过/警告/不通过结论,拥有Quality Gate附加组件的团队可以使用专用工具,该工具会存储评估结论且可免费重新读取(参见
    scenario-quality-gate
    );如果没有该附加组件,或brief仅为文字描述,则仍需使用
    asset_analyze
    。
asset_analyze
和
asset_detect
的最长等待时间为180秒,之后会返回
job_id
;后续可像其他场景一样使用
jobs_wait
继续处理。

Finding an asset again

重新检索资产

Retrieval is
search
with
target="assets"
, and at least one of
query
,
filters
,
filter
,
image
, or
images
must be set: an empty call is a 400, not an everything-list.
  • By text.
    query
    is keyword matching by default;
    query_semantic_ratio
    moves it toward meaning (0.5 to 0.8 suits mood queries like "dark medieval atmosphere", 1 is pure semantic).
    sort_by
    (say
    ["createdAt:desc"]
    ) is ignored while that ratio is above 0, so a newest-first list needs keyword mode.
  • By similarity.
    image
    takes one asset id or image URL and returns lookalikes;
    images
    takes
    {"like": [...], "unlike": [...]}
    to steer with positive and negative examples (the two fields are mutually exclusive).
    image_semantic_ratio
    decides what similar means: 1, the default, matches subject and mood; 0 matches image features, the setting for hunting near-duplicates and crops. Add a
    query
    beside it for "like these, but more stylized".
  • By structure.
    filters
    narrows on
    kind
    ,
    tags
    ,
    model_id
    ,
    collection_ids
    , and
    created_after
    /
    created_before
    , ANDed with everything above.
资产检索使用
search
工具并设置
target="assets"
,且必须至少设置
query
、
filters
、
filter
、
image
、
images
中的一个参数:空调用会返回400错误,而不是返回所有资产列表。
  • 按文本检索。
    query
    默认是关键词匹配;
    query_semantic_ratio
    可调整为语义匹配模式(0.5到0.8适合情绪类查询,比如“黑暗中世纪氛围”,1为纯语义匹配)。当该比值大于0时,
    sort_by
    (例如
    ["createdAt:desc"]
    )会被忽略,因此需要按最新排序的列表请使用关键词模式。
  • 按相似性检索。
    image
    参数传入单个资产ID或图像URL,返回相似图像;
    images
    参数传入
    {"like": [...], "unlike": [...]}
    格式,通过正例和负例引导检索(两个字段互斥)。
    image_semantic_ratio
    决定相似性的判定标准:默认值为1,匹配主题和氛围;0匹配图像特征,用于查找近似重复图和裁剪图。可同时添加
    query
    参数实现“类似这些,但风格更突出”的检索效果。
  • 按结构检索。
    filters
    可通过
    kind
    、
    tags
    、
    model_id
    、
    collection_ids
    以及
    created_after
    /
    created_before
    进行筛选,且与上述所有条件为逻辑与关系。

Worked example: reviewing a batch against a brief

示例:针对brief审核批量资产

  1. Collect the asset ids from the run (
    jobs_wait
    returns them).
  2. asset_analyze
    with
    dry_run: true
    on the first chunk to price the pass.
  3. asset_analyze
    with
    images
    set to 10 ids and an
    instruction
    that states the brief and fixes the output: "For each image in order, reply
    <index>: pass|fail, <reason in under 12 words>
    , a reason on every line, passes included. Fail anything not centered, not on a plain field, or carrying text." Repeat per chunk. Answers land as text assets (one, or one per image):
    asset_download
    them to read the verdicts.
  4. asset_describe
    on the strongest pass. Its promptable synthesis goes straight into the next batch's prompt, which holds the look without a training run (see
    scenario-consistency
    ); when the synthesis is only a short title, prompt with the description instead.
  5. File the result:
    collection_create
    , then
    collection_add_assets
    in chunks of at most 49 ids.
    asset_add_tags
    is additive, so tag the failures rather than rebuilding a tag set. The set comes back later with
    search
    filters={"collection_ids": [...]}
    , and its lookalikes with
    images={"like": [...]}
    .
  1. 从运行任务中收集资产ID(
    jobs_wait
    会返回这些ID)。
  2. 对第一批资产调用
    asset_analyze
    并设置
    dry_run: true
    ,预估本次审核的成本。
  3. 调用
    asset_analyze
    ,将
    images
    设为10个ID,并在
    instruction
    中说明brief要求和固定输出格式:“按顺序处理每张图像,回复
    <index>: pass|fail, <12字以内的原因>
    ,每行一个结果,通过的也要写原因。任何未居中、背景不简洁或带有文字的图像都判定为不通过。” 每批重复此操作。结果会以文本资产的形式返回(要么是一个文本文件,要么每张图像对应一个):使用
    asset_download
    下载后即可查看评审结论。
  4. 对最优的通过资产调用
    asset_describe
    。它返回的可用于提示词的合成风格可以直接用于下一批次的提示词中,无需训练即可保持风格一致(参见
    scenario-consistency
    );如果合成结果只是短标题,则用完整描述作为提示词。
  5. 归档结果:先调用
    collection_create
    创建集合,然后以最多49个ID为一批调用
    collection_add_assets
    添加资产。
    asset_add_tags
    是追加式的,因此只需给不通过的资产打标签即可,无需重建标签集。后续可以通过
    search
    的
    filters={"collection_ids": [...]}
    检索该集合,通过
    images={"like": [...]}
    检索相似资产。

Common mistakes

常见错误

  • One
    asset_analyze
    call per asset when 10 fit in a call.
  • Treating
    num_outputs
    as a batch size over
    images
    .
  • Leaving
    remove_background
    at its default on an
    asset_detect
    map that must match the source frame.
  • Running
    asset_analyze
    or
    asset_detect
    through
    scenario_tool_execute_read
    : both are write-class and the call is rejected by lane, not by argument.
  • Sending more than 49 ids to
    collection_add_assets
    , or re-adding an asset already in the collection: both are hard errors, not no-ops.
  • Asking
    asset_analyze
    to produce an image. It returns text; control maps come from
    asset_detect
    and final renders from
    model_run
    .
  • 每个资产调用一次
    asset_analyze
    ,但实际上单次调用可处理10个资产。
  • 将
    num_outputs
    当成
    images
    的批量大小。
  • 在需要与源画面匹配的
    asset_detect
    控制图中,仍保持
    remove_background
    的默认值。
  • 通过
    scenario_tool_execute_read
    运行
    asset_analyze
    或
    asset_detect
    :这两个都是写入类工具,调用会被通道拒绝,而非参数校验失败。
  • 向
    collection_add_assets
    传入超过49个ID,或者重复添加已在集合中的资产:这两种情况都会触发硬错误,而非无操作。
  • 要求
    asset_analyze
    生成图像。它只返回文本;控制图由
    asset_detect
    生成,最终渲染图由
    model_run
    生成。