rig-c 0.0.0-stage → 2.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/.claude-plugin/marketplace.json +19 -0
  2. package/.claude-plugin/plugin.json +13 -0
  3. package/LICENSE +30 -0
  4. package/NOTICE.md +145 -0
  5. package/README.md +817 -3
  6. package/bin/rigc.cjs +83 -0
  7. package/cli.ts +61 -0
  8. package/cli_core.ts +46 -0
  9. package/docs/AUTHORING.md +9923 -0
  10. package/docs/FACE.md +1948 -0
  11. package/docs/INGEST.md +1488 -0
  12. package/docs/MOTION.md +1241 -0
  13. package/docs/PROMPTING.md +109 -0
  14. package/docs/RIGGING.md +1441 -0
  15. package/docs/SPEC_COVERAGE.md +357 -0
  16. package/package.json +108 -4
  17. package/skills/rigc/SKILL.md +133 -0
  18. package/skills/rigc-face/SKILL.md +60 -0
  19. package/skills/rigc-ingest/SKILL.md +78 -0
  20. package/skills/rigc-motion/SKILL.md +51 -0
  21. package/skills/rigc-rigging/SKILL.md +49 -0
  22. package/src/areaband.ts +159 -0
  23. package/src/assertions/bodies/a01.ts +23 -0
  24. package/src/assertions/bodies/a02.ts +21 -0
  25. package/src/assertions/bodies/a03.ts +27 -0
  26. package/src/assertions/bodies/a04.ts +40 -0
  27. package/src/assertions/bodies/a05.ts +56 -0
  28. package/src/assertions/bodies/a06.ts +245 -0
  29. package/src/assertions/bodies/a07.ts +68 -0
  30. package/src/assertions/bodies/a08.ts +76 -0
  31. package/src/assertions/bodies/a09.ts +82 -0
  32. package/src/assertions/bodies/a10.ts +116 -0
  33. package/src/assertions/bodies/a11.ts +15 -0
  34. package/src/assertions/bodies/a12.ts +30 -0
  35. package/src/assertions/bodies/a13.ts +51 -0
  36. package/src/assertions/bodies/a14.ts +35 -0
  37. package/src/assertions/bodies/a15.ts +97 -0
  38. package/src/assertions/bodies/a16.ts +24 -0
  39. package/src/assertions/bodies/a17.ts +26 -0
  40. package/src/assertions/bodies/a18.ts +62 -0
  41. package/src/assertions/bodies/a19.ts +404 -0
  42. package/src/assertions/bodies/a20.ts +122 -0
  43. package/src/assertions/bodies/a21.ts +190 -0
  44. package/src/assertions/bodies/a22.ts +39 -0
  45. package/src/assertions/bodies/a23.ts +305 -0
  46. package/src/assertions/bodies/a24.ts +68 -0
  47. package/src/assertions/bodies/a25.ts +39 -0
  48. package/src/assertions/bodies/a26.ts +61 -0
  49. package/src/assertions/bodies/a27.ts +33 -0
  50. package/src/assertions/bodies/a28.ts +70 -0
  51. package/src/assertions/bodies/a29.ts +34 -0
  52. package/src/assertions/bodies/a30.ts +50 -0
  53. package/src/assertions/bodies/a31.ts +61 -0
  54. package/src/assertions/bodies/a32.ts +44 -0
  55. package/src/assertions/bodies/a33.ts +110 -0
  56. package/src/assertions/bodies/a34.ts +133 -0
  57. package/src/assertions/bodies/a35.ts +160 -0
  58. package/src/assertions/bodies/a36.ts +81 -0
  59. package/src/assertions/bodies/a37.ts +77 -0
  60. package/src/assertions/bodies/a38.ts +73 -0
  61. package/src/assertions/bodies/a39.ts +303 -0
  62. package/src/assertions/bodies/a40.ts +128 -0
  63. package/src/assertions/bodies/a42.ts +97 -0
  64. package/src/assertions/bodies/a43.ts +181 -0
  65. package/src/assertions/bodies/a44.ts +23 -0
  66. package/src/assertions/bodies/a45.ts +172 -0
  67. package/src/assertions/bodies/a46.ts +224 -0
  68. package/src/assertions/bodies/a47.ts +126 -0
  69. package/src/assertions/bodies/a48.ts +83 -0
  70. package/src/assertions/bodies/a49.ts +81 -0
  71. package/src/assertions/bodies/a50.ts +97 -0
  72. package/src/assertions/constraint_words.ts +169 -0
  73. package/src/assertions/emitted/index.ts +148 -0
  74. package/src/assertions/facts/animated_bones.ts +30 -0
  75. package/src/assertions/facts/animation_durations.ts +37 -0
  76. package/src/assertions/facts/atlas_pages.ts +19 -0
  77. package/src/assertions/facts/atlas_regions.ts +52 -0
  78. package/src/assertions/facts/bone_timelines.ts +37 -0
  79. package/src/assertions/facts/constraint_targets.ts +56 -0
  80. package/src/assertions/facts/constraints.ts +155 -0
  81. package/src/assertions/facts/deform_survey.ts +27 -0
  82. package/src/assertions/facts/event_keys.ts +55 -0
  83. package/src/assertions/facts/linked_meshes.ts +38 -0
  84. package/src/assertions/facts/mesh_attachments.ts +100 -0
  85. package/src/assertions/facts/region_joins.ts +34 -0
  86. package/src/assertions/facts/sequences.ts +85 -0
  87. package/src/assertions/facts/skeleton_roster.ts +45 -0
  88. package/src/assertions/facts/skin_entries.ts +37 -0
  89. package/src/assertions/facts/skin_members.ts +53 -0
  90. package/src/assertions/facts/slider_composition.ts +78 -0
  91. package/src/assertions/facts/slot_colour.ts +43 -0
  92. package/src/assertions/facts/stage.ts +27 -0
  93. package/src/assertions/facts/stage_box.ts +65 -0
  94. package/src/assertions/facts/stepped_poses.ts +74 -0
  95. package/src/assertions/facts/two_colour.ts +52 -0
  96. package/src/assertions/facts/vertex_polygons.ts +53 -0
  97. package/src/assertions/footprints.ts +367 -0
  98. package/src/assertions/harness.ts +109 -0
  99. package/src/assertions/inward_advance.ts +58 -0
  100. package/src/assertions/kinds.ts +105 -0
  101. package/src/assertions/mesh_kinds.ts +56 -0
  102. package/src/assertions/model/animated_bones.ts +38 -0
  103. package/src/assertions/model/animation_durations.ts +57 -0
  104. package/src/assertions/model/atlas_pages.ts +15 -0
  105. package/src/assertions/model/atlas_regions.ts +76 -0
  106. package/src/assertions/model/bone_timelines.ts +58 -0
  107. package/src/assertions/model/constraint_targets.ts +82 -0
  108. package/src/assertions/model/constraints.ts +233 -0
  109. package/src/assertions/model/declared.ts +125 -0
  110. package/src/assertions/model/deform_survey.ts +24 -0
  111. package/src/assertions/model/event_keys.ts +45 -0
  112. package/src/assertions/model/given.ts +45 -0
  113. package/src/assertions/model/index.ts +398 -0
  114. package/src/assertions/model/linked_meshes.ts +24 -0
  115. package/src/assertions/model/mesh_attachments.ts +119 -0
  116. package/src/assertions/model/parse.ts +146 -0
  117. package/src/assertions/model/region_joins.ts +67 -0
  118. package/src/assertions/model/runtime_timelines.ts +78 -0
  119. package/src/assertions/model/sequences.ts +157 -0
  120. package/src/assertions/model/skeleton_roster.ts +23 -0
  121. package/src/assertions/model/skin_entries.ts +69 -0
  122. package/src/assertions/model/skin_members.ts +64 -0
  123. package/src/assertions/model/slider_composition.ts +193 -0
  124. package/src/assertions/model/slot_colour.ts +81 -0
  125. package/src/assertions/model/stage.ts +28 -0
  126. package/src/assertions/model/stage_box.ts +51 -0
  127. package/src/assertions/model/stepped_poses.ts +105 -0
  128. package/src/assertions/model/two_colour.ts +61 -0
  129. package/src/assertions/model/vertex_polygons.ts +72 -0
  130. package/src/assertions/reasons.ts +129 -0
  131. package/src/assertions/region_lookups.ts +61 -0
  132. package/src/assertions/report.ts +189 -0
  133. package/src/assertions/values.ts +39 -0
  134. package/src/atlas.ts +2870 -0
  135. package/src/ballot.ts +866 -0
  136. package/src/bonedist.ts +643 -0
  137. package/src/chainfit.ts +2752 -0
  138. package/src/chains.ts +170 -0
  139. package/src/check.ts +4303 -0
  140. package/src/checkpics.ts +295 -0
  141. package/src/cli/core_commands.ts +1627 -0
  142. package/src/cli/repack.ts +414 -0
  143. package/src/cli/shared.ts +2776 -0
  144. package/src/cli/spine_commands.ts +820 -0
  145. package/src/compile.ts +9414 -0
  146. package/src/core/additive.ts +458 -0
  147. package/src/core/animation.ts +1050 -0
  148. package/src/core/clipping.ts +696 -0
  149. package/src/core/constraints.ts +1876 -0
  150. package/src/core/constraints_path.ts +964 -0
  151. package/src/core/constraints_physics.ts +881 -0
  152. package/src/core/constraints_slider.ts +635 -0
  153. package/src/core/deform.ts +613 -0
  154. package/src/core/draw_order.ts +125 -0
  155. package/src/core/events.ts +135 -0
  156. package/src/core/hooks.ts +249 -0
  157. package/src/core/index.ts +1400 -0
  158. package/src/core/raw.ts +739 -0
  159. package/src/core/skins.ts +129 -0
  160. package/src/core/uvs.ts +469 -0
  161. package/src/core/vertices.ts +490 -0
  162. package/src/core/walk.ts +197 -0
  163. package/src/core/world.ts +289 -0
  164. package/src/correspondence.ts +15 -0
  165. package/src/deformbuild.ts +60 -0
  166. package/src/deformgen.ts +630 -0
  167. package/src/deformmeasure.ts +732 -0
  168. package/src/deformreport.ts +373 -0
  169. package/src/deformstructure.ts +386 -0
  170. package/src/deformsurvey.ts +2162 -0
  171. package/src/depth.ts +784 -0
  172. package/src/diff.ts +2252 -0
  173. package/src/emit.ts +134 -0
  174. package/src/emit_spine.ts +854 -0
  175. package/src/errors.ts +53 -0
  176. package/src/framing.ts +819 -0
  177. package/src/generation.ts +139 -0
  178. package/src/ingest.ts +2293 -0
  179. package/src/json-position.ts +253 -0
  180. package/src/keyorder.ts +587 -0
  181. package/src/keys.ts +486 -0
  182. package/src/ladder.ts +121 -0
  183. package/src/mesh.ts +2382 -0
  184. package/src/meshcompare.ts +1191 -0
  185. package/src/meshquality.ts +2051 -0
  186. package/src/meshrasters.ts +944 -0
  187. package/src/meshreduce.ts +1444 -0
  188. package/src/model.ts +1245 -0
  189. package/src/motion.ts +809 -0
  190. package/src/nonfinite.ts +54 -0
  191. package/src/package_meta.ts +48 -0
  192. package/src/png.ts +297 -0
  193. package/src/pose.ts +2324 -0
  194. package/src/preview.ts +434 -0
  195. package/src/region_joins.ts +54 -0
  196. package/src/render.ts +1013 -0
  197. package/src/render_core.ts +871 -0
  198. package/src/render_shared.ts +2958 -0
  199. package/src/repack.ts +495 -0
  200. package/src/rig.ts +2941 -0
  201. package/src/slots.ts +892 -0
  202. package/src/spine_side.ts +138 -0
  203. package/src/timelines.ts +837 -0
  204. package/src/trackgen.ts +364 -0
  205. package/src/transform.ts +310 -0
  206. package/src/types.ts +1797 -0
  207. package/src/validate.ts +3875 -0
  208. package/tools/contact.ts +126 -0
  209. package/tools/editor_roundtrip.ts +1641 -0
  210. package/tools/font5x7.ts +101 -0
  211. package/tools/measure_contact_depth.ts +105 -0
  212. package/tools/plate.ts +508 -0
  213. package/tools/png_probe.mjs +72 -0
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "rigc",
3
+ "owner": {
4
+ "name": "firejune",
5
+ "url": "https://github.com/firejune"
6
+ },
7
+ "description": "rigc, the rig compiler for Spine, packaged as agent skills over the guides the npm package ships.",
8
+ "plugins": [
9
+ {
10
+ "name": "rigc",
11
+ "source": "./",
12
+ "description": "Author Spine 4.3 rigs with rigc: an entry skill with the install line and the build, validate, render, check and vote loop, plus routers for rigging, motion, faces and foreign skeletons, each linking the shipped guide that owns its rules.",
13
+ "homepage": "https://github.com/firejune/rigc#readme",
14
+ "repository": "https://github.com/firejune/rigc",
15
+ "license": "MIT",
16
+ "keywords": ["spine", "spine2d", "skeletal-animation", "rig", "compiler", "ai-agents"]
17
+ }
18
+ ]
19
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
+ "name": "rigc",
4
+ "description": "Author Spine 4.3 rigs with rigc, the rig compiler that verifies its own output with named assertions before writing it. Skills that route an agent to the shipped guide for the need at hand: the hierarchy, a motion, a face, or a skeleton somebody else authored.",
5
+ "author": {
6
+ "name": "firejune",
7
+ "url": "https://github.com/firejune"
8
+ },
9
+ "homepage": "https://github.com/firejune/rigc#readme",
10
+ "repository": "https://github.com/firejune/rigc",
11
+ "license": "MIT",
12
+ "keywords": ["spine", "spine2d", "skeletal-animation", "rig", "compiler", "ai-agents"]
13
+ }
package/LICENSE ADDED
@@ -0,0 +1,30 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 firejune (Joon Kyoung)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+
24
+ THIRD-PARTY MATERIAL
25
+
26
+ The licence above covers rigc's own code, documentation and art. It does not cover
27
+ third-party material distributed alongside them - in particular the rendered
28
+ reference frames under bench/reference/, which carry Esoteric Software's example
29
+ image data and are governed by each example's own license.txt beside them:
30
+ redistribution only with that file, and no commercial use. See NOTICE.md.
package/NOTICE.md ADDED
@@ -0,0 +1,145 @@
1
+ # Third-party notices
2
+
3
+ ## Spine Runtimes
4
+
5
+ This repository depends on `@esotericsoftware/spine-core`, part of the
6
+ [Spine Runtimes](https://github.com/EsotericSoftware/spine-runtimes),
7
+ Copyright (c) 2013-2025 Esoteric Software LLC, licensed under the
8
+ [Spine Runtimes License Agreement](https://esotericsoftware.com/spine-runtimes-license),
9
+ as a **development dependency**: a clone and CI install it, and every Spine file
10
+ `rigc build` writes there is read back through it before it is written. **The
11
+ published package does not carry it** — an install of `spine-rigc` has no Spine
12
+ runtime in it unless one is installed beside it, and then the same `rigc` uses it.
13
+
14
+ Its terms, as the licence states them: integration of the Spine Runtimes into
15
+ software is permitted **under the terms and conditions of Section 2 of the
16
+ [Spine Editor License Agreement](https://esotericsoftware.com/spine-editor-license)**;
17
+ otherwise it is permitted **provided that each user of the Products obtains their
18
+ own Spine Editor license** and any redistribution of the Products includes the
19
+ licence and copyright notice. Where a Spine Runtime is integrated with rigc — this
20
+ repository, its CI, or an install with the runtime beside it — those terms apply
21
+ there.
22
+
23
+ ### What that means for rigc, as a chain of facts
24
+
25
+ rigc's own code is MIT (see `LICENSE`). The following is a restatement of Esoteric
26
+ Software's terms, not a licence term of this project:
27
+
28
+ 1. rigc's output **is Spine skeleton data**.
29
+ 2. A product that plays it with **a Spine Runtime** — the official runtimes, the Web
30
+ Player — has integrated the Spine Runtimes. rigc also writes the model document
31
+ its own core poses, and a product may play that or anything else; what the terms
32
+ turn on is the integration.
33
+ 3. Integrating a Spine Runtime into a product is permitted **under Section 2 of the
34
+ Spine Editor License Agreement**, or otherwise on the condition that **each user
35
+ of the product obtains their own Spine Editor license** and the product carries
36
+ the Runtimes licence and copyright notice — the two routes above.
37
+ 4. The published rigc **links no Spine runtime**. This repository does, as a
38
+ development dependency for its own gate, and so does an install with
39
+ `spine-core` added beside it. Validation is not optional on either: the gate
40
+ runs through the runtime where it is installed and through rigc's own validator
41
+ where it is not, and the two are held to the same verdicts in CI on 49 of the
42
+ 50 assertions — the official parser's own parse runs only where the runtime is.
43
+
44
+ > **If a product integrates a Spine Runtime to play rigc's output, that integration
45
+ > is subject to the terms above** — rigc neither creates those terms nor removes
46
+ > them. Running the published rigc links no Spine runtime, and whether its output is
47
+ > then played by one, by rigc's own core, or by something else is the consumer's
48
+ > choice.
49
+
50
+ ### The Spine Web Player, and what `rigc preview` does with it
51
+
52
+ `rigc preview` writes an HTML file that plays a compiled rig in the **Spine Web
53
+ Player** (`@esotericsoftware/spine-player`), also part of the Spine Runtimes and
54
+ under the same licence as above.
55
+
56
+ ⚖️ **It is referenced, never redistributed.** The generated page loads the player
57
+ from a CDN with a `<script src>` and a `<link rel="stylesheet">`; no byte of it is
58
+ committed to this repository, bundled into the published npm package, or copied
59
+ into the generated file. What the generated file *does* contain is the user's own
60
+ skeleton, atlas and page images, embedded as data URIs so the page opens without a
61
+ server — those are the user's, not Esoteric Software's.
62
+
63
+ Two consequences worth stating plainly:
64
+
65
+ - a generated preview needs a network connection the first time it is opened, and
66
+ says so in the page when the player does not arrive;
67
+ - using the Spine Web Player is a Spine Runtimes integration, subject to the
68
+ terms described above.
69
+
70
+ ## Example assets
71
+
72
+ The official Spine example projects are the yardstick this compiler is measured
73
+ against. They are owned by Esoteric Software. **The example projects themselves are
74
+ not committed to this repository**: `scripts/fetch-examples.sh` downloads them into a
75
+ gitignored `examples/` directory for local evaluation. What this repository *does*
76
+ commit is its own rendered frames of them, under the grant the examples' own licence
77
+ files carry — *Rendered reference frames*, below.
78
+
79
+ Each example directory upstream carries its own `license.txt`, so the terms are
80
+ per-directory rather than repository-wide. Verified on 2026-08-22 against
81
+ `spine-runtimes` branch `4.3`:
82
+
83
+ | Example | `license.txt` | Copyright line |
84
+ | --------------------- | ------------- | ----------------------------------------------- |
85
+ | `1-weight-and-mass` | present | (c) 2021-2025, Esoteric Software LLC |
86
+ | `2-the-12-principles` | present | (c) 2021-2025, Esoteric Software LLC |
87
+ | `3-timing-and-spacing`| present | (c) 2021-2025, Esoteric Software |
88
+ | `4-wave-principle` | present | (c) 2021-2025, Esoteric Software LLC |
89
+ | `5-squash-and-stretch`| present | (c) 2021-2025, Esoteric Software |
90
+ | `6-arcs` | present | (c) 2022-2025, Esoteric Software |
91
+ | `7-anticipation` | **absent** | — |
92
+ | `8-follow-through` | present | (c) 2024-2025, Esoteric Software |
93
+ | `spineboy` | present | (c) 2013, Esoteric Software LLC |
94
+
95
+ Every `license.txt` above states the same two terms verbatim, differing only in
96
+ the copyright line:
97
+
98
+ > The images in this project may be redistributed as long as they are accompanied
99
+ > by this license file. The images may not be used for commercial use of any
100
+ > kind.
101
+ >
102
+ > The project file is released into the public domain. It may be used as the basis
103
+ > for derivative work.
104
+
105
+ So, for this repository's purposes:
106
+
107
+ - **Images** — redistributable only with the accompanying `license.txt`, and
108
+ **non-commercial only**. That is why the example projects are fetched rather than
109
+ committed, and why the rendered frames this repository *does* commit each carry a
110
+ verbatim copy of that file beside them — *Rendered reference frames*, below.
111
+ - **Project files** (`.spine`, and the exports derived from them) — **public
112
+ domain**, usable as the basis for derivative work. This is what makes the
113
+ examples usable as a structural yardstick.
114
+ - ⚠️ **`7-anticipation` has no `license.txt` upstream**, so the redistribution
115
+ grant its siblings carry does not exist for it — there is no licence file to
116
+ accompany its images with. `scripts/fetch-examples.sh` prints a warning naming
117
+ it. Treat its images as not redistributable.
118
+
119
+ ### Rendered reference frames
120
+
121
+ `bench/reference/` contains **1,293 PNG frames rendered by this project** from the
122
+ examples' own exports: `bench/render_reference.ts` loads each example's `export/`
123
+ out of the gitignored `examples/`, poses it with `spine-core`, and rasterises each
124
+ posed attachment.
125
+
126
+ A rendered frame contains those images' pixels, so committing one **is**
127
+ redistribution — and each example's `license.txt` grants exactly that, *"as long as
128
+ they are accompanied by this license file"*. So **a verbatim copy of the relevant
129
+ `license.txt` sits at each example root** under `bench/reference/`, put there by
130
+ `render_reference.ts` rather than left to memory; all eight are present. The
131
+ **non-commercial** condition in that same file rides along with those images, and
132
+ `LICENSE` says so — rigc's MIT grant covers rigc's own code, documentation and art,
133
+ and does not extend to this material.
134
+
135
+ ⚠️ **`7-anticipation` is excluded, and mechanically so.** With no upstream
136
+ `license.txt` there is no grant to rely on, so its frames are never committed:
137
+ `render_reference.ts` writes them only into a gitignored directory, refuses any
138
+ `--out` inside the repository that `git check-ignore` will not accept, fails closed
139
+ if git cannot answer, and drops a `LOCAL-ONLY.txt` beside them in place of the
140
+ licence file that does not exist.
141
+
142
+ `bench/reference/` is repository material — it is not in `package.json`'s `files`
143
+ list, so it is not part of the published npm package. The full reasoning, and the
144
+ per-rung framing behind it, is in
145
+ [`bench/reference/README.md`](https://github.com/firejune/rigc/blob/main/bench/reference/README.md).