**AI-authored 2D rigging and animation, verified before it is written.** rigc is
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
a rig compiler: a rig spec and a motion spec in, skeleton data out — in the Spine 4.3
format, with rigc's own compiled model beside it —
gated by a list of named assertions before a byte is written — rigc's own validator in
the published package, held to a spine-core round trip's verdicts in this
repository's CI. Built so AI agents can author rigs and check their own work; it ships
as an agent skill. On npm it is rig-c — the same package as spine-rigc, the name it
first shipped under, and as @rig-c/core, its name under the toolchain's scope, both
published beside it with the same files at every version.
What you get
Fourteen part PNGs drawn from scratch for this repo, one rig spec, one motion spec — the assembly,
the breathing and the wave are all rigc-compiled Spine animations, rendered with
rigc render .
Loose part PNGs and two small JSON files in; **Spine 4.3 skeleton data out** — a
skeleton.json and a skeleton.atlas that load in any Spine runtime and **import
into the Spine editor**. Nothing is written unless a list of named assertions comes
back green — assertions this repository holds to the verdicts of a round-trip through
Spine's own parser, all but the parse itself, which runs only where the runtime is
installed.
| You have | You run | You get |
| --- | --- | --- |
| part PNGs, a rig spec and a motion spec | rigc build | skeleton.json + skeleton.atlas — or a failure named by rule, and **nothing on disk** |
| the same, and one texture instead of many | rigc build --pack | the parts arranged onto shared atlas pages, written beside the skeleton — losslessly, so the picture is the picture |
| a pack somebody already made | rigc build --atlas-in | the same skeleton, with every part resolved to a region of that atlas — or a named refusal, never a part that silently does not draw |
| a compiled rig | rigc render | every animation as PNG frames, plus one labelled contact sheet of the whole shot |
| a compiled rig and a question about its geometry | rigc inspect | one picture of its bones, axes, mesh edges and hulls, one bone's weights, the triangles folded over, the draw order, a world grid or a declared axis over the art — at the setup pose, one time or a sheet of several, zoomed to a bone or a slot, or beside a second build on one transform — and a legend that puts every mark back in world units |
| a compiled rig | rigc preview | one self-contained .html that plays it in Spine's own web player |
| two to four compiled rigs | rigc vote | one ballot page a human picks from, and the answer checked into a ledger |
| a picture of a key pose | rigc pose | where each loose part PNG sits in it, in spec coordinates — the movement between two poses is then yours to key (docs/MOTION.md) |
| the same picture, and a rig | rigc chainfit | the parts pose refuses because something is drawn over them — read through the candidate's own draw order and hierarchy, with the share of each part the answer was measured on |
Everything in that table needs Bun and this package — preview and vote also
@esotericsoftware/spine-core installed beside it (see below) — and no clone, no
reference art, no art pipeline, no server.
What rigc is, and what it is not
rigc emits **Spine's own skeleton data format**. That is the whole positioning, and
it cuts both ways:
- The output loads in any Spine runtime, and it **imports into the Spine editor**.
A compiled rig is a starting point on a timeline, not a finished shot — **an AI
drafts, a human refines in the editor**. That hand-off is what emitting somebody
else's format buys, and tools/editor_roundtrip.ts measures that it survives
the trip in both directions.
- The published package **links no Spine runtime**. @esotericsoftware/spine-core
is a development dependency: this repository uses it to hold rigc's own validator
to the round trip's verdicts — in CI, on the public example recipes and every
selftest call, and on a private corpus of production rigs measured before each
release. Of the 50 assertions, 49 run on both; A00_ROUNDTRIP_PARSE, the official
parser's own parse, runs only where the runtime is installed and is reported as a
SKIP elsewhere. There, in the parse's place, the report also carries the model
side's own two parse rules, A00_MODEL_READ and A00_MODEL_REGIONS_ON_PAGES,
which no round-trip rule matches and the registry does not hold — so its summary
totals 52 on the core entry, and its last line counts 42 rules on the model side
(AUTHORING §5.2 has a row for each). Install it beside rigc
(bun add -d @esotericsoftware/spine-core) and the same rigc runs the round