explain-with-anim
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseexplain-with-anim
explain-with-anim
The user asked a question. Answer it with a picture and the words that walk
the picture — not a picture instead of an answer, and not a paragraph with
a decorative diagram after it. The figure is drawn from the code (or the
facts) by , checked, and delivered as a file; the prose follows
the figure beat by beat and names the things in it by their ids.
vlmkit-animRead for how to write and check a scene. This skill
is about what to draw, from what, and how to explain with it.
explanatory-animation用户提出了一个问题。用一幅图和沿着图逐步讲解的文字来回答——不能用图片代替答案,也不能写完一段话后再附上一张纯装饰性的示意图。图由 根据代码(或事实)绘制,经过校验,并作为文件交付;正文逐拍跟随图,并使用图中的 id 指称其中的对象。
vlmkit-anim阅读 ,了解如何编写和校验场景。这个 skill 关注的是画什么、依据什么,以及如何借助它进行解释。
explanatory-animationFirst: does a picture help?
首先:图片有帮助吗?
Draw when the answer has things and relations — four or more modules,
states, participants, steps — or an order in time, or a before and
after. Do not draw for a one-line answer, a single function's body, or a
question about a value. If in doubt, write the answer first; if it needs a
list of more than four named things that point at each other, draw them.
当答案包含对象及其关系——四个或更多模块、状态、参与者、步骤——或者包含时间顺序,或者需要展示前后变化时,就绘图。不要为一行答案、单个函数体或有关某个值的问题绘图。如果拿不准,先写答案;如果答案需要一个包含四个以上彼此指向的命名对象列表,就绘图。
Choose the picture from the question
根据问题选择图形
| The user asks… | Draw | From |
|---|---|---|
| "How is this repo / package / directory structured?" | | |
| "How does a request / event / message flow through it?" | | the code path you read; the map from |
| "How does this algorithm / data structure work?" | the kind that owns it: | the function's own steps; small concrete values (five to eight) so every beat is readable |
| "What states can this be in? What happens on X?" | | the enum / reducer / status field and its transitions |
| "How do these services talk? What if one is slow / lost?" | | the protocol as implemented; the failure the user asked about as the trace |
| "Why does it go this way here?" (a decision) | | the branch conditions, as their labels |
| "What does this branch / PR change?" | | git; |
| "What is the schedule / what slipped?" | | the plan, the slips as |
| "The docs already have a mermaid diagram" | | the diagram; read its |
"Give me a D2 file" / "something I can paste in the README as ASCII" / the repo keeps | | the same |
One picture per question. Two aspects that both matter (structure and a
walk) are one scene with a , or — not
two files.
modulessequencekind: compose| 用户询问…… | 绘制 | 依据 |
|---|---|---|
| “这个仓库/package/directory 的结构是怎样的?” | | |
| “一个请求/事件/消息如何在其中流转?” | | 所阅读的代码路径;来自 |
| “这个算法/数据结构如何工作?” | 使用适合它的 kind: | 函数自身的步骤;使用五到八个较小且具体的值,确保每一拍都清晰可读 |
| “它可能处于哪些状态?X 时会发生什么?” | | enum/reducer/status 字段及其状态转换 |
| “这些服务如何通信?如果某个服务变慢/消息丢失会怎样?” | | 实际实现的协议;将用户询问的故障作为 trace |
| “它为什么会在这里走这条路?”(某个决策) | | 分支条件及其标签 |
| “这个 branch/PR 改了什么?” | | git; |
| “日程是什么?哪些事项延期了?” | | 计划,以及以 |
| “文档中已经有 Mermaid 图” | | 该图;读取其中的 |
“给我一个 D2 文件”/“给我一段能粘贴到 README 的 ASCII”/“仓库中已有 | | 同一份 |
每个问题只生成一幅图。如果两个方面都很重要(结构和走查),将它们合并为一个带 的 场景,或使用 ,不要生成两个文件。
sequencemoduleskind: composeGround it in the source, not in memory
以源码为依据,而不是凭记忆
- A map of code is drawn from the code: for a directory,
factsfor the workspace, the import list orrepofiles by hand when neither fits. Thenpackage.json. A map drawn from memory and not checked is a guess with a border round it.check --expect - A walk is drawn from the path you read: cite the file and function each
beat corresponds to in the caption or in the prose ("in
handle()→router.ts").dispatch - Anything you could not verify goes in the prose as "not drawn: …", never in the picture.
- 代码映射必须根据代码绘制:目录使用 ,workspace 使用
facts;如果两者都不适合,则手工使用导入列表或repo文件。然后执行package.json。仅凭记忆绘制且未经校验的映射,只是加边框的猜测。check --expect - 走查必须根据你实际阅读的路径绘制:在 caption 或正文中注明每一拍对应的文件和函数(“中的
router.ts→handle()”)。dispatch - 任何无法验证的内容都应在正文中标为“not drawn: …”,绝不能放进图片。
Produce
产出
1. write <name>.scene.json in the repo's docs/ or .vlmkit-anim/, or the scratch dir if it is not to be kept
2. vlmkit-anim check <name>.scene.json [--expect <name>.expect.json]
3. vlmkit-anim layout <name>.scene.json must report no issue; `why` when the canvas warning names a pair
4. vlmkit-anim still <name>.scene.json --out <name>.svg a still (structure, a map, a state diagram)
vlmkit-anim video <name>.scene.json --out <name>.gif --width 640 a walk (a request, an algorithm, a trace)
5. vlmkit-anim explain <name>.scene.json the beats — this is the skeleton of your proseFive rounds of edit → at most. If it is not clean by then, deliver
the explanation in words, say the figure did not converge and which line
stopped it, and keep the scene file for the reader.
check按以下步骤产出:
1. write <name>.scene.json in the repo's docs/ or .vlmkit-anim/, or the scratch dir if it is not to be kept
2. vlmkit-anim check <name>.scene.json [--expect <name>.expect.json]
3. vlmkit-anim layout <name>.scene.json must report no issue; `why` when the canvas warning names a pair
4. vlmkit-anim still <name>.scene.json --out <name>.svg a still (structure, a map, a state diagram)
vlmkit-anim video <name>.scene.json --out <name>.gif --width 640 a walk (a request, an algorithm, a trace)
5. vlmkit-anim explain <name>.scene.json the beats — this is the skeleton of your prose最多进行五轮“编辑 → ”。如果届时仍未通过,则用文字交付解释,说明图未能收敛以及具体是哪一行导致停滞,并保留场景文件供读者查看。
checkWrite the explanation
编写解释
- One sentence of what the picture is and what it was drawn from
("the packages under , from their imports, 12 modules, 19 dependencies").
packages/ - The beats, in order, one short paragraph or bullet each, reworded
from — say why at each step, not what moved. Name things by the ids in the picture so the reader can find them.
explain - What the picture leaves out and where to read it (a file, a function, a config).
- The files: the SVG / GIF path, the scene, the fact sheet.
Do not describe the picture's geometry ("on the left", "the blue box") —
layout is the compiler's and may move on the next edit. Say the id.
- 用一句话说明图片是什么,以及它依据什么绘制(“下的各个包,依据它们的导入关系绘制,共 12 个模块、19 条依赖关系”)。
packages/ - 按顺序讲解各个节拍,每拍一个简短段落或要点,基于 的结果改写——说明每一步的原因,而不只是描述发生了什么。使用图片中的 id 称呼对象,让读者能够找到它们。
explain - 图片省略了什么,以及到哪里阅读相关内容(文件、函数、配置)。
- 文件:SVG/GIF 路径、场景文件、事实表。
不要描述图片的几何布局(“左侧”“蓝色方框”)——布局由编译器决定,下次编辑时可能移动。请直接说出 id。
Deliver
交付
- In a chat: the prose, then the figure as a file the user can open
(when available; otherwise the path). A GIF for a walk, an SVG for a structure.
SendUserFile - In a PR or issue: paste the that
<name>.md/prwrite, or the figure with the beats under it. If the repository already postsrepoon every PR (vlmkit'svlmkit-anim pr --mermaidworkflow does), do not post a second one.pr-visual - In docs: a fence (the animation) or
```vlm-anim(the figure) with the scene inline, so the page stays checkable; or the SVG committed next to the page.```vlm-anim still
- 在聊天中:先给出正文,再给出用户可以打开的图片文件(可用时使用 ;否则给出路径)。走查使用 GIF,结构图使用 SVG。
SendUserFile - 在 PR 或 issue 中:粘贴 /
pr生成的repo,或者放置图片并在其下方附上节拍说明。如果仓库已经通过 vlmkit 的<name>.mdworkflow 在每个 PR 上发布pr-visual,不要再次发布。vlmkit-anim pr --mermaid - 在文档中:使用 围栏(动画)或
```vlm-anim围栏(静态图),并内嵌场景,使页面保持可校验;也可以把 SVG 提交在页面旁边。```vlm-anim still
Done condition
完成条件
- green (and
checkgreen when a sheet exists),--expectclean.layout - Every id named in the prose is in the picture, and every beat in the
prose is a step in .
explain - The user can answer their own question from the figure alone; the prose says why each step is there.
- 通过(存在事实表时,
check也必须通过),--expect无问题。layout - 正文提到的每个 id 都出现在图片中,正文的每一拍都是 中的一个步骤。
explain - 用户仅凭图片就能回答自己的问题;正文说明每个步骤为何存在。
Anti-patterns
反模式
- A figure after the answer, unreferenced. If the prose never names an id from the picture, the picture is decoration; drop it or rewrite.
- Drawing what you believe the structure is. Run first. Two of five green module maps in one evaluation round were wrong about a real dependency.
facts - Coordinates. A scene with x / y is a drawing, not an explanation, and cannot be re-edited by the next reader. Use the kind that owns the things.
- Twelve beats where four would do. Pick the values and the trace that show the one mechanism the question is about.
- Skipping because
layoutwas green. Lines through labels are what a reader sees first.check
- 答案之后才放图,且正文未引用它。 如果正文从未提到图片中的任何 id,这张图就是装饰;删除它或重写正文。
- 绘制你相信的结构。 先运行 。在某轮评估中,五张显示为绿色的模块图里,有两张对真实依赖关系的描述是错误的。
facts - 坐标。 带 x/y 的场景只是一幅绘图,不是解释,而且下一位读者无法重新编辑。请使用适合这些对象的 kind。
- 十二拍才够,而四拍即可。 只选择能够展示问题所指核心机制的值和 trace。
- 因为 已通过就跳过
check。 穿过标签的线是读者第一眼就会看到的问题。layout