
Scenet
io.github.creatoanv0.9.0更新於 Oct 3, 2026
Write, check and render comic panels as SVG: a deterministic compiler, no image model.
概覽
讓助理透過確定性編譯器撰寫、檢查並把漫畫分鏡算繪成 SVG,全程不涉及影像生成模型。
- 功能
- Scenet 是針對漫畫分鏡的語意 DSL,能把作者撰寫的描述編譯成 SVG。這個 MCP 伺服器提供驗證、編譯與算繪工具,模型因此能讀取自身的錯誤訊息並加以修正。輸入可以是分鏡 YAML、稀疏的分鏡序列或漫畫劇本文字;編譯器會解析取景、角色站位、對話框與說明文字的位置、閱讀順序以及尾巴走向。輸出具確定性:相同輸入永遠產生逐位元組相同的 SVG。
- 適用情境
- 當助理需要以結構化文字創作或反覆調整漫畫分鏡畫面,而非生成影像,並透過編譯與算繪自行檢查結果時,適合加入。適用於劇本化分鏡、故事板與版面實驗等需要可重現 SVG 輸出的情境。
- 執行需求
- 以 PyPI 套件(scenet)形式透過 stdio 在本機執行,使用 pip 安裝並加上 mcp 額外項目,或以 uvx 啟動。需要 Python 3.12 或更新版本。未宣告任何帳號、API 金鑰、環境變數或標頭,也不需要系統函式庫或字型。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Scenet,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Scenet
A semantic DSL for comic panels, compiled to SVG.
⚠️ This project is deliberately AI-generated
This project is, by design, almost entirely generated by AI. It exists as a personal training ground for learning to work with AI coding tools. The architecture, code, tests and documentation are overwhelmingly AI-authored, under human direction and review.
Treat it accordingly: an experiment first, a usable tool second.
[CI] [PyPI] [Python] [License: 0BSD] [Status: alpha]
Playground · Documentation · Tutorial · Changelog
What this is
Music has notation. A score describes the semantics of a piece — pitch, duration, dynamics — without describing the waveform that eventually reaches your ear. Rendering is left to an interpreter, human or machine.
Images have no such thing. SVG describes how to draw, not what is depicted: it is closer to a WAV file than to a score. Scenet is an attempt at the missing layer, narrowed to one tractable domain — the comic panel.
You write what is in the panel:
You can also write a sequence, where each panel states only what changed from the one before — borrowed from OpenUSD's sparse override, because consecutive panels in a scene share nearly all their staging:
Or in comic script, the format writers already use:
From any of these, the compiler works out the rest: how large each figure must be for a medium shot, where they stand, which way they face, how big each balloon needs to be for its text, where a balloon can sit without covering a face, and how its tail reaches the speaker's mouth — all while preserving reading order.
No generative image model is involved. This is a deterministic compiler: constraint solving and computational geometry. The same input always produces byte-identical output.
Status
Alpha — panels and sequences compile end to end, from the command line, the browser, or an editor. Framing, actor placement, balloon and caption placement, reading order, tail routing, drawn faces and the marks around them, tonal backdrops and SVG emission all work, from either of two frontends. Not yet built: page composition (tiers, panels of varying size) and the interpretation layer that would give a panel a style. See the phase plan for detail.
--core writes the resolved intermediate tier as JSON; --debug writes an overlay showing
the geometry the solver was working against — silhouette hulls, face exclusion zones, anchors,
gaze vectors and tail routes.
How it works
The intermediate tier is a real, writable format rather than a hidden data structure — so layouts can be inspected, hand-adjusted, and diffed independently of how they are drawn. The approach is borrowed from Vega-Lite, which compiles a high-level grammar into a lower-level one before emitting SVG.
Try it in the browser
The playground runs this compiler — the
same Python, unmodified — in your browser under WebAssembly via
Pyodide. It is not a reimplementation: the page installs the exact
wheel uv build produces, so there is no second copy of the geometry to drift out of step.
Its worked examples cover every shot type, every balloon kind, every caption kind, every
expression and mark, every mass kind and place, both frontends and the constraint priorities. Each one is a real file under
examples/gallery/ that the test suite compiles, so the playground
cannot offer an example that does not work.
The editor is Monaco, fed the same JSON Schema the VS Code extension uses — generated from the compiler's own models, so completion and hover documentation cannot drift from what compiles. Everything is served from one origin: no CDN, no analytics, nothing fetched from anywhere else.
Editor support
The VS Code extension gives completion and inline validation for panel
documents, plus a side-by-side preview. Its JSON Schema is generated from the
compiler's own models by scenet schema, so what the editor offers is what actually
compiles. A test fails if the shipped schema goes stale.
Using it from a model
No model knows Scenet from training, so the project hands the language over instead. Driving Scenet from a model covers each kind of client:
- A chat app that cannot run code — NotebookLM, the Gemini app — gets the spec pack: the language, the comic-script format, the characters, every diagnostic and the whole gallery, in one file.
- An agent that loads skills gets
skills/scenet, an Agent Skills folder. - An MCP client gets
scenet mcp, whose tools validate, compile and render, so the model can read its own errors and fix them.
Install
Python 3.12 or newer. No system libraries, no fonts to install, nothing to configure. Ships
a py.typed marker, so mypy, pyright, ty and basedpyright read the annotations straight
from the package.
Development
Requires uv. It manages the Python version too, so this is the whole setup:
Checks, all of which run in CI:
Documentation
creatoan.github.io/scenet — or read the Markdown
source under docs/, which GitHub renders without a build step.
Every Python example in the documentation is executed by the test suite. An example that omits an import, or that has drifted out of step with the code, fails the build.
License
0BSD — see LICENSE. This is deliberately one step more permissive than MIT: you may use, copy, modify and distribute this software for any purpose, with no obligation to preserve a copyright notice or reproduce the license. No attribution is required, though it is always welcome.
Third-party components are listed in THIRD_PARTY_NOTICES.md. The lettering font arrives as an ordinary dependency under the SIL Open Font License, which does require its own notice be kept with it.
The language specification is free to implement. Anyone may build their own compiler, editor, renderer or tooling for this language, in any project, commercial or otherwise, without restriction or attribution. A notation is only worth having if it is not owned.
來源:README.md,提交 7e3dc04
工具
0版本歷史
1- v0.9.0最新Oct 3, 2026


