@rig-c/review 0.0.0-stage → 0.1.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.
- package/README.md +285 -2
- package/docs/DESIGN.md +43 -0
- package/docs/REVIEW_PACKAGE.md +607 -0
- package/examples/demo/SOURCE.md +5 -0
- package/examples/demo/chime.wav +0 -0
- package/examples/demo/lantern.svg +10 -0
- package/examples/demo/pose.json +244 -0
- package/examples/demo/review.json +67 -0
- package/package.json +47 -4
- package/src/animation-selection.ts +29 -0
- package/src/build.ts +8 -0
- package/src/cli.ts +114 -0
- package/src/compare-playhead.ts +55 -0
- package/src/compare-presentation.ts +43 -0
- package/src/compare-server.ts +60 -0
- package/src/compare-session.ts +26 -0
- package/src/compare.ts +57 -0
- package/src/control-server.ts +83 -0
- package/src/control.ts +103 -0
- package/src/feedback-export.ts +197 -0
- package/src/feedback-validation.ts +38 -0
- package/src/frame-clock.ts +36 -0
- package/src/manifest.ts +140 -0
- package/src/open-protocol.ts +14 -0
- package/src/open-selection.ts +11 -0
- package/src/open-shell.ts +2 -0
- package/src/open-worker.ts +2 -0
- package/src/open.ts +126 -0
- package/src/pose.ts +27 -0
- package/src/probe-reference.ts +16 -0
- package/src/reference-frame-index.ts +16 -0
- package/src/reference-frames.ts +62 -0
- package/src/reference.ts +63 -0
- package/src/report.ts +88 -0
- package/src/server.ts +61 -0
- package/src/session-history.ts +99 -0
- package/src/session.ts +58 -0
- package/src/strip-export.ts +69 -0
- package/src/strip-render.ts +171 -0
- package/src/strip.ts +51 -0
- package/src/versions.ts +20 -0
- package/web/camera-view.ts +34 -0
- package/web/compare.css +96 -0
- package/web/compare.html +7 -0
- package/web/compare.ts +502 -0
- package/web/control.ts +65 -0
- package/web/index.html +13 -0
- package/web/inspection-persistence.ts +200 -0
- package/web/main.ts +928 -0
- package/web/renderer-status.ts +31 -0
- package/web/report-view.ts +51 -0
- package/web/rig-overlays.ts +147 -0
- package/web/styles.css +98 -0
- package/web/view-controls.ts +67 -0
package/README.md
CHANGED
|
@@ -1,3 +1,286 @@
|
|
|
1
|
-
#
|
|
1
|
+
# review
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A reusable local workspace for a person to inspect an agent's rig output, compare source references, and export feedback ready to become an issue. The person receives a package or opens an existing output folder; the agent does not build a new viewer for each rig.
|
|
4
|
+
|
|
5
|
+
The app provides one inspection workspace for setup geometry and motion, compiled-model playback through `@rig-c/play`, local image, video and pose-sequence references, checkpoints, audio audition, and saved structured feedback. **Motion is view, annotate and export only.** Navigation changes inspection time; it never retimes, authors keys, or writes `motion.json`. Modeling touch-up remains a design goal; this starter does not edit meshes, weights or source art.
|
|
6
|
+
|
|
7
|
+
## Place in the toolchain
|
|
8
|
+
|
|
9
|
+
[Parts](https://github.com/rig-c/parts) → [Pose](https://github.com/rig-c/pose) →
|
|
10
|
+
[Core / rigc](https://github.com/rig-c/core) → **Review** →
|
|
11
|
+
[Play](https://github.com/rig-c/play) → **Adapter** (consumer integration).
|
|
12
|
+
|
|
13
|
+
Review is the human inspection and source-bound feedback gate in this delivery
|
|
14
|
+
flow. It inspects the upstream build without replacing Core's compiler gate or
|
|
15
|
+
authoring motion. Review itself uses the published Play runtime for previews;
|
|
16
|
+
the chain describes delivery and feedback responsibilities, not runtime import
|
|
17
|
+
order. Adapter denotes downstream consumer integration, without promising an
|
|
18
|
+
unreleased adapter API or changing existing compilation/playback dependencies.
|
|
19
|
+
|
|
20
|
+
## Start
|
|
21
|
+
|
|
22
|
+
Install it beside the agent that produced the output, then open that output folder:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
npm i -D @rig-c/review
|
|
26
|
+
npx rig-review open /absolute/path/to/output
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`rig-review` runs under **Bun 1.3.0 or later**, which must be on `PATH`; CI runs the installed package on 1.3.0 and on the latest Bun. `open` prints a loopback URL and exits; see [One-command owner handoff](#one-command-owner-handoff). `npx rig-review --help` lists every command.
|
|
30
|
+
|
|
31
|
+
The package is 0.1.x: the CLI is the supported surface, and no importable API is promised yet (`exports` exposes only `package.json`).
|
|
32
|
+
|
|
33
|
+
## Existing output handoff
|
|
34
|
+
|
|
35
|
+
Open the current output folder directly, without changing the producing agent or inserting a manifest:
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
bun run check -- /absolute/path/to/output
|
|
39
|
+
bun run review -- /absolute/path/to/output
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The adapter recognizes root `skeleton.model.json` or the fixed rigc build layout `build/skeleton.model.json` (root model takes precedence), root `motion.json`, `report.json`, `skeleton.json`/`.skel`/`.atlas`, source videos (`.mp4`, `.webm`, `.mov`), image filenames containing `strip`, `contact`, `sheet`, `filmstrip` or `띠`, and canonical `*pose*.json` sequences. Model discovery checks only those two named paths; it never recursively searches directories. Model page images resolve relative to the selected model, while motion and references remain relative to the opened folder. It builds the normalized review manifest in memory and reads source files without changing them. Motion/report/skeleton evidence links are read only. A recognized `rig-pose-report/1` also supplies read-only event markers: frame-only events retain their producer interval and explicitly lack seek until a declared clock is present; explicit event seconds can seek. Empty reported categories show none, while missing fields remain missing. Report markers prefill known feedback coordinates and actual bone/slot names without creating a review decision or motion keys. It exposes each matching video/strip separately, without guessing synchronization or source-to-rig bindings.
|
|
43
|
+
|
|
44
|
+
When the report declares `fps` plus `frame0` (seconds offset) and a frame count, or exact `frameTimes[]`, the matching animation also shows a producer-frame readout and frame seek controls. Without a bounded declared clock it shows `rate unknown`; current unchanged v19 has no clock. Sample times come only from the report, and feedback context records the recalculated frame or null.
|
|
45
|
+
|
|
46
|
+
A raw `skeleton.json`/`.skel` can still be inspected as evidence, but cannot play through the compiled-model runtime. Playback requires an upstream gated rigc build's `skeleton.model.json` with portable local page images inside the opened folder. `check` validates the delivery contract and model envelope, not the upstream compiler gate or visual quality.
|
|
47
|
+
|
|
48
|
+
For a curated handoff, [REVIEW_PACKAGE.md](docs/REVIEW_PACKAGE.md) documents optional `review.json` with named checkpoints, references and angle axes:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
bun run review -- /absolute/path/to/package/review.json --checkpoint silhouette
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The server prints the exact link, for example `http://127.0.0.1:4317/?checkpoint=silhouette`. `--port 0` selects a free port. It binds only `127.0.0.1` and never opens a browser automatically. A folder containing `review.json` uses that explicit manifest.
|
|
55
|
+
|
|
56
|
+
## Compare two outputs
|
|
57
|
+
|
|
58
|
+
Open two compiled packages against one explicitly selected local reference video:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
bun run review -- compare /absolute/output-a /absolute/output-b --reference /absolute/reference.mp4 --animation dance
|
|
62
|
+
bun run check -- compare /absolute/output-a /absolute/output-b --reference /absolute/reference.mp4 --animation dance
|
|
63
|
+
bun run feedback -- compare /absolute/output-a /absolute/output-b --reference /absolute/reference.mp4 --animation dance
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Both models must contain the named animation. The video is a separate read-only CLI input, served only through a fixed endpoint; it is never inserted into either package. A separate compare page uses one video playhead to seek both rigs at the same time. Frame readouts use each side's explicit producer clock; no video FPS or missing clock is inferred.
|
|
67
|
+
|
|
68
|
+
Compare feedback requires side `a` or `b` and carries both package source hashes, both exact rig/motion identities, the shared video hash and animation. A changed input on either side or in the video refuses saved feedback until restart. State stays outside all source inputs. Single-package commands and sessions retain their existing contract. See [the comparison contract](docs/REVIEW_PACKAGE.md#two-package-comparison).
|
|
69
|
+
|
|
70
|
+
## Feedback ownership
|
|
71
|
+
|
|
72
|
+
Opening leaves status **pending**. The person explicitly saves **approved**, **changes-requested**, or **pending**, checkpoint outcomes/notes, and feedback containing an inclusive frame interval, a bone/slot/rig target, defect/quality category and one-line summary. Frame numbers are entered explicitly; the app does not invent a source FPS. The primary **리뷰 제출** action saves that explicit status and feedback. JSON and issue-ready Markdown exports carry the original source binding and reproducible inspection context. Each submission records `reviewedSource`: package revision, actual viewer/runtime versions, and separate exact-byte SHA-256 plus path for the reviewed rig and motion; an absent artifact stays null. An active compiled model is the rig identity; raw skeleton JSON is evidence with playback unavailable.
|
|
73
|
+
|
|
74
|
+
New submissions validate bone/slot names against the exact loaded model; the target field offers those names. A rig target names the package id. Source-only packages cannot validate a bone/slot target and say so explicitly. When a matching animation has a declared producer clock, the inclusive interval cannot end beyond the last declared sample at or before the actual clip end. Unknown clocks keep manual frame intervals without inventing a limit. `context.interval` records the chosen interval; inspection `time`/`frame` remain separate. Older invalid feedback stays readable with per-row warnings and exports its original evidence, but cannot be resubmitted until corrected or removed.
|
|
75
|
+
|
|
76
|
+
Feedback lives under `~/.local/state/rig-c-review/`, separate from delivered files. Identity, revision and a streaming SHA-256 of the normalized manifest plus declared files/model pages bind each saved session. Changed content starts a new pending session, even without a revision bump. Restart the server after changing inputs. Saving or exporting feedback never modifies a model, authors correction keys, writes motion output or publishes an issue automatically.
|
|
77
|
+
|
|
78
|
+
After the person submits, the producing agent retrieves the stored review without needing the hashed state filename:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
bun run feedback -- /absolute/path/to/output
|
|
82
|
+
# Or the same explicit review.json originally opened:
|
|
83
|
+
bun run feedback -- /absolute/path/to/package/review.json
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
This read-only command prints the session JSON, including reviewed artifact identity and feedback. The exact current-tool session wins when present. After a viewer/runtime upgrade, if that exact session is absent, the CLI can retrieve the latest saved submission over the same content with its original recorded versions and `retrieval: {kind:"prior-tools", toolsChangedSince:true, matchingSubmissions, currentTools}`. It does not migrate approval into the current UI or change saved bytes. Changed inputs still return a fresh pending session; a prior submission is never borrowed across content, revision or reviewed-artifact changes. The same lookup applies to `feedback compare`, preserving both recorded side bindings, reference identity and animation. See [historical retrieval](docs/REVIEW_PACKAGE.md#historical-feedback-retrieval) for selection and validation rules.
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
For grouped issue-ready text, use the same input/reference binding with `--format issue`:
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
rig-review feedback /absolute/output --reference /absolute/original.mp4 --format issue
|
|
93
|
+
rig-review feedback /absolute/a --compare /absolute/b --reference /absolute/original.mp4 --animation dance --format issue
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The header counts feedback records by defect/quality and by build; blocks group by category, then exact target kind/name. Overlapping intervals and A/B sides remain distinct items. Each block retains its id, inclusive interval, one-line summary and selected/full paired provenance. Historical tool identities and validation warnings remain visible; output never migrates approval, writes state or publishes an issue. Default output and `--format json` remain the existing session JSON. Only feedback accepts `--format`, with `json` or `issue` as its value.
|
|
97
|
+
|
|
98
|
+
## Development
|
|
99
|
+
|
|
100
|
+
From a clone:
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
bun install
|
|
104
|
+
bun run demo
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Open the printed loopback URL. The bundled original lantern study has source art, an explicitly synthetic canonical pose-sequence sample and an original synthetic chime. It has no compiled model: playback remains unavailable until a real model is supplied. Inside a clone, `bun run review -- <dir>`, `bun run check -- <dir>` and `bun src/cli.ts <command>` are the same CLI as `npx rig-review`.
|
|
108
|
+
|
|
109
|
+
```sh
|
|
110
|
+
bun run typecheck
|
|
111
|
+
bun test
|
|
112
|
+
bun run build
|
|
113
|
+
bun run smoke
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
`smoke` packs this tree, installs the tarball into an empty project, and runs the installed bin: `--help`, `open --help`, `check` on the bundled demo, and a served page whose browser bundle is built from the installed files. A file missing from `files` in `package.json` fails there, not after publishing.
|
|
117
|
+
|
|
118
|
+
The server bundles `web/main.ts` at startup using the pinned installed runtime, with no CDN. `build` verifies that browser bundle in memory. CI checks types, focused path/state/API tests, bundling and the demo package. Follow AGENTS.md for contributor verification policy. [DESIGN.md](docs/DESIGN.md) distinguishes the runnable foundation from future modeling touch-up and preserves the illustrative screen concept.
|
|
119
|
+
|
|
120
|
+
## Frame strip export
|
|
121
|
+
|
|
122
|
+
The strip panel exports the explicitly entered inclusive feedback interval, or all current in-memory feedback intervals, as a PNG or JSON download. Batch selections include unsaved annotations; they do not submit or approve a review. Choose a declared reference video in single-package mode and an explicit clock basis A/B in compare mode. Every selected feedback interval must identify the selected animation. Separate intervals remain separate strip groups, including overlaps.
|
|
123
|
+
|
|
124
|
+
The same export is available without a browser:
|
|
125
|
+
|
|
126
|
+
```sh
|
|
127
|
+
bun src/cli.ts strip /absolute/package/review.json --reference source-video --animation dance --frames 176:184 --out /absolute/external/strip.png
|
|
128
|
+
bun src/cli.ts strip compare /absolute/a /absolute/b --reference /absolute/reference.mp4 --animation dance --basis b --frames 176:184 --out /absolute/external/compare.png
|
|
129
|
+
bun src/cli.ts strip /absolute/package/review.json --reference source-video --animation dance --all-feedback --json
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Single `--reference` is a declared video **id**; compare uses the explicitly selected local video path. `--all-feedback` reads only the exact current saved session, and retains each item's side/interval. `--json` produces a selection/provenance plan without rendering; optionally add `--out`. PNG writes an additional `.png.json` provenance sidecar with the actual decoded samples and PNG hash. Destinations must be new files outside every input package, in existing directories without symlink parents. The server exposes download blobs, never a destination-path API.
|
|
133
|
+
|
|
134
|
+
Strip times require the selected report's exact `frameTimes` and matching animation. Missing or uniform-only clocks refuse PNG with `Report has no frameTimes — regenerate with pose 0.30.0 or later`; JSON retains requested frames with `time:null`. The other compare side may lack a clock: it can still be posed at the common seconds, while its frame label stays unknown. No frame rate is inferred from frame count, duration or video metadata.
|
|
135
|
+
|
|
136
|
+
PNG export uses the pinned published `@rig-c/play` canvas player and real Node Canvas2D, with `ffmpeg` and `ffprobe` available on PATH for reference decoding. Missing capabilities fail by name. Each requested sample chooses the nearest actual decoded reference PTS (ties earlier); both rigs seek that actual PTS using the viewer's fixed step. JSON distinguishes requested time, actual PTS, delta, decoded frame index, actual player times and independently known producer frames. Requests outside the common domain refuse instead of clamping. The PNG shows source rows, chronological frame columns, and full source hashes/revisions/tool and renderer versions. Batch groups stack vertically. Exports are bounded to64 intervals,256 total frames,64 megapixels and16384 pixels per dimension; larger selections must be split.
|
|
137
|
+
|
|
138
|
+
The footer fits its measured text while retaining full hashes. RGB/dark-tint features unsupported by the published Canvas2D path refuse with `STRIP_UNSUPPORTED_TINT`; they are not silently omitted.
|
|
139
|
+
|
|
140
|
+
## One-command owner handoff
|
|
141
|
+
|
|
142
|
+
`open` validates and hashes an existing folder, starts a background loopback
|
|
143
|
+
instance or reuses the exact matching one, prints its hash-bound URL, and exits:
|
|
144
|
+
|
|
145
|
+
```sh
|
|
146
|
+
bun run open -- /absolute/output --reference /absolute/original.mp4
|
|
147
|
+
# Installed executable mapping:
|
|
148
|
+
rig-review open /absolute/output --reference /absolute/original.mp4 --animation dance
|
|
149
|
+
rig-review feedback /absolute/output --reference /absolute/original.mp4
|
|
150
|
+
rig-review open /absolute/a --compare /absolute/b --reference /absolute/original.mp4 --animation dance
|
|
151
|
+
rig-review feedback /absolute/a --compare /absolute/b --reference /absolute/original.mp4 --animation dance
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
`open` chooses an explicit `--animation` first, then the normalized report's
|
|
155
|
+
`animation` after validating actual model membership, then a unique actual clip
|
|
156
|
+
(or unique common clip in compare). Thus `rig-review open /absolute/output
|
|
157
|
+
--reference /absolute/original.mp4` opens a report-bound `dance` without the flag
|
|
158
|
+
and prints `animation: dance (from report.json)` on stderr. Conflicting A/B reports,
|
|
159
|
+
a stale report name or multiple clips without a report refuse by name; no first
|
|
160
|
+
entry, filename or frame rate supplies a guess. Explicit invalid names never fall
|
|
161
|
+
back. The selected clip actually initializes single playback, while an explicit
|
|
162
|
+
checkpoint link or later manual choice takes priority. Incompatible automatic
|
|
163
|
+
checkpoints do not apply another clip's time or axis. Static/source-only packages
|
|
164
|
+
remain inspectable without claiming clip selection; explicit unvalidatable clips
|
|
165
|
+
refuse. Single review sessions remain package-wide; animation selection does not
|
|
166
|
+
create an animation-specific approval identity. Opening never
|
|
167
|
+
approves a review. The command prints the matching feedback retrieval command on
|
|
168
|
+
stderr; stdout contains the URL alone. A selected external video takes precedence
|
|
169
|
+
at automatic startup; an explicit checkpoint link or manual checkpoint selection
|
|
170
|
+
still chooses that checkpoint's reference.
|
|
171
|
+
|
|
172
|
+
The selected video is a separate CLI capability, not a manifest path escape or a
|
|
173
|
+
file copied into the source package. Its name and streaming byte hash, plus the
|
|
174
|
+
base package hash, appear as `referenceBinding` in single review responses,
|
|
175
|
+
sessions and feedback exports. Use the same `--reference` when retrieving that
|
|
176
|
+
submission; omitting it reads the separate reference-free identity. Changed
|
|
177
|
+
package or reference bytes start pending state. Existing historical retrieval
|
|
178
|
+
preserves earlier recorded tool versions over exactly the same reference content.
|
|
179
|
+
|
|
180
|
+
The single strip panel can export the selected external video using that same
|
|
181
|
+
binding. Headless equivalent (the original declared-reference form stays valid):
|
|
182
|
+
|
|
183
|
+
```sh
|
|
184
|
+
rig-review strip /absolute/output --reference-video /absolute/original.mp4 --animation dance --frames 176:184 --out /absolute/external/strip.png
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Only tool-owned instances with matching content, canonical input locations, tool
|
|
188
|
+
fingerprint and a private capability handshake are reused. The URL hash is
|
|
189
|
+
checked before serving the app; a stale link never selects another instance's
|
|
190
|
+
package. Input hashes are freshly computed, not trusted from mtime caches. Idle
|
|
191
|
+
open-managed workers stop after 30 minutes. Their private registry, requests and
|
|
192
|
+
logs live beside feedback under `~/.local/state/rig-c-review/open/`; nothing is
|
|
193
|
+
written into supplied folders. `RIG_REVIEW_STATE_DIR` selects another state root
|
|
194
|
+
outside all input packages. Existing foreground review commands still work.
|
|
195
|
+
|
|
196
|
+
No browser is opened, no LAN listener is added, and no misleading phone/QR URL is
|
|
197
|
+
printed: every current instance binds only `127.0.0.1`.
|
|
198
|
+
|
|
199
|
+
The printed feedback retrieval command uses POSIX shell quoting for literal path
|
|
200
|
+
arguments. It is not a PowerShell or cmd.exe command string.
|
|
201
|
+
|
|
202
|
+
## Control the current inspection page
|
|
203
|
+
|
|
204
|
+
Opt in once when opening a fixed package, then keep that page open:
|
|
205
|
+
|
|
206
|
+
```sh
|
|
207
|
+
rig-review open /absolute/output --reference /absolute/original.mp4 --control
|
|
208
|
+
rig-review control /absolute/output --reference /absolute/original.mp4
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
The second command reads the connected page's actual inspection state and its
|
|
212
|
+
`pageId`/`revision`; it does not open a browser or start another worker. To change
|
|
213
|
+
that page, use the observed values and a closed inspection command:
|
|
214
|
+
|
|
215
|
+
```sh
|
|
216
|
+
rig-review control /absolute/output --reference /absolute/original.mp4 --page '<pageId>' --expected-revision 0 --request-id theme-1 --command '{"type":"theme","value":"light"}'
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Use the same reference/compare/animation inputs as the controlled `open`. Multiple
|
|
220
|
+
pages require an explicit `--page`. The URL and source binding stay unchanged;
|
|
221
|
+
existing ordinary servers do not become controllable. Starting the opt-in worker
|
|
222
|
+
is a one-time handoff, not a new link for each parameter change.
|
|
223
|
+
|
|
224
|
+
Commands cover appearance, automatic layout, synchronized or independent pane
|
|
225
|
+
cameras, playback, single animation, time and actual inspection layers. Camera
|
|
226
|
+
pan is measured in viewport CSS pixels (right/down positive). New inspections
|
|
227
|
+
start with camera sync on: zoom relative to fit and pan normalized by each pane's
|
|
228
|
+
viewport move all visible measurable reference/rig panes together. Turn sync off
|
|
229
|
+
with `{"type":"camera-sync","value":false}` to inspect each pane independently;
|
|
230
|
+
turning it off preserves current views. Turning it on aligns the visible panes
|
|
231
|
+
to the last active pane. Camera/fit targets are `rig|reference` in single review
|
|
232
|
+
and `a|b|reference` in compare. For legacy clients, compare `target:"rig"` explicitly
|
|
233
|
+
moves both A/B even when sync is off; its CSS readback aliases A. Comparison retains its
|
|
234
|
+
fixed animation and actual video-master seek path. A single-video time request
|
|
235
|
+
uses the actual decoded timestamp for both reference and rig; the applied
|
|
236
|
+
acknowledgement reports that time, which may differ from the requested seconds.
|
|
237
|
+
Unsupported features, stale
|
|
238
|
+
page/source/revision, unsubmitted feedback drafts and out-of-range values refuse
|
|
239
|
+
by name. No command changes a package/reference, authors motion, or submits or
|
|
240
|
+
approves feedback. Local controls and remote readback use the same inspection
|
|
241
|
+
state. A live view-link/history change supersedes pending remote work, and
|
|
242
|
+
commands refuse while that view is being restored.
|
|
243
|
+
|
|
244
|
+
Remote inspection readback also includes versioned numeric `view` coordinates
|
|
245
|
+
when the page can measure them: rig/world center and zoom, reference/image center
|
|
246
|
+
and zoom, each panel's current CSS viewport size and visible rectangle. World
|
|
247
|
+
coordinates use Y up; reference image coordinates use Y down. Compare reports
|
|
248
|
+
actual A and B rectangles separately; unavailable measurements are null. The
|
|
249
|
+
canonical view also reports `cameraSync` and `activeCamera`. These
|
|
250
|
+
are the same current cameras used by the local controls, rather than a second
|
|
251
|
+
simulated view. Camera commands still use the documented viewport CSS pan.
|
|
252
|
+
|
|
253
|
+
The CLI waits up to10 seconds for the page's actual acknowledgment. `queued` or
|
|
254
|
+
`dispatched` is not success; non-applied commands exit2 and may carry
|
|
255
|
+
`timedOut:true`. Reuse the same `--request-id` and original request to obtain its
|
|
256
|
+
receipt without applying it twice. `--wait-ms 0` returns the queued receipt;
|
|
257
|
+
`--wait-ms` is bounded to30000. A timeout does not mean an already delivered action
|
|
258
|
+
was rolled back. Tokens stay in private tool state, not URLs or command output.
|
|
259
|
+
|
|
260
|
+
## Keep and share an inspection
|
|
261
|
+
|
|
262
|
+
The view link stores the current numeric inspection in a bounded, versioned
|
|
263
|
+
`#review=` fragment. It includes the exact loaded source/model binding, selected
|
|
264
|
+
animation/time and reference selection, appearance/layers, camera sync and the
|
|
265
|
+
active pane, and each canonical camera center with visible bounds. Reloading a matching link restores a paused view;
|
|
266
|
+
it does not restart an idle loop or submit a review. Coordinates adapt to the
|
|
267
|
+
current viewport instead of replaying another window's CSS pan offsets.
|
|
268
|
+
Historical links without a sync mode restore with sync off to preserve their
|
|
269
|
+
saved views; fresh inspections start with sync on. Legacy modeling/motion
|
|
270
|
+
workspace selections are accepted without restoring a top-level workspace switch. A link
|
|
271
|
+
for a different source binding is refused.
|
|
272
|
+
|
|
273
|
+
Ordinary form inputs, selected panels, view state and unsent feedback/checkpoint
|
|
274
|
+
choices are kept in browser local storage for the same source. Changing the
|
|
275
|
+
model/source clears the previous draft in that page's storage scope. The global
|
|
276
|
+
appearance preference remains, while a source-bound appearance override does
|
|
277
|
+
not carry over. URL view state takes precedence over the locally saved view.
|
|
278
|
+
|
|
279
|
+
Local recovery compares the original submitted server-session fingerprint,
|
|
280
|
+
including its update time. It cannot replace a newer server review: conflicting
|
|
281
|
+
or corrupt saved data remains available to download, with an explicit warning;
|
|
282
|
+
recovering a conflicting draft requires choosing a pending review. Storage
|
|
283
|
+
errors never count as a successful save. Nothing is written to the server or
|
|
284
|
+
input package merely by restoring a page. Browser storage is convenient local
|
|
285
|
+
recovery, not a durable backup; export feedback separately when it must be kept.
|
|
286
|
+
Control capabilities are excluded from links and browser persistence.
|
package/docs/DESIGN.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Human rig inspection and modeling touch-up direction
|
|
2
|
+
|
|
3
|
+
## Product boundary
|
|
4
|
+
|
|
5
|
+
The delivery unit is an existing output folder or an optional curated review package handed from an agent to a person. This reusable app owns inspection, reference comparison, annotations and feedback export. Upstream compiler, splitter and runtime remain their respective tools. The existing producing agent needs no change to open its output here.
|
|
6
|
+
|
|
7
|
+
The person uses one inspection workspace with **View**, **Rig**, **Playback** and **Feedback** sections. Rig covers setup geometry, source art, pivot/joint placement, meshes, weights, draw order and angle coverage; Playback covers frame intervals, reference video/poses, contact/deformation and audio inspection. Motion is strictly **view, annotate and export**: time/angle controls navigate inspection. This app does not author animation keys, retime motion or write `motion.json`. Future modeling touch-up remains in scope as a design goal; it is not implemented by this starter.
|
|
8
|
+
|
|
9
|
+
## Implemented foundation
|
|
10
|
+
|
|
11
|
+
The CLI opens `review.json` or an existing output directory. The directory adapter builds a manifest in memory from `skeleton.*`, `motion.json`, `report.json`, source video, contact strips and canonical pose-sequence evidence. It never changes delivered output. A compiled model uses the published play runtime. Raw Spine output is evidence with playback explicitly unavailable. Source-only data never becomes a fabricated playback success.
|
|
12
|
+
|
|
13
|
+
Inspection supports local references, checkpoint context, runtime playback when a real compatible model exists, available angle/audio facilities and explicit review state. The canonical `rig-pose-sequence/1` format documented by `@rig-c/pose` preserves frame times, person IDs, joint states/coordinates/confidence and optional camera metadata. The demo pose is an authored synthetic transport example, not extracted from footage.
|
|
14
|
+
|
|
15
|
+
Feedback has an inclusive integer frame interval, target `{kind: bone|slot|rig, name}`, category `defect|quality`, and one-line summary. Optional context records the checkpoint, time, reference/person and camera/axis state. The person can export data and issue-ready Markdown; this app neither posts issues automatically nor writes proposed motion keys. Notes must be useful to the producing agent without interpreting a free-form key-edit JSON blob.
|
|
16
|
+
|
|
17
|
+
Identity, revision and content hash bind every decision. A submission also records separate exact rig/motion hashes and paths, packageRevision, viewerVersion and installed runtimeVersion; absent source stays null. The producing agent can retrieve the saved JSON with the read-only feedback CLI after the UI closes. Opening never means reviewed. The person explicitly approves, requests changes or returns to pending, independently of checkpoint outcomes. Changed inputs do not inherit prior approval. Feedback writes remain outside source, are bounded and atomic, and require the app's exact Origin.
|
|
18
|
+
|
|
19
|
+
## Modeling touch-up direction
|
|
20
|
+
|
|
21
|
+
Future modeling interactions should select actual parts, bones, pivots and mesh vertices in the posed view, inspect weights and ordering, and adjust bounded setup geometry with before/after comparison. Angle inspection needs declared axes and measured coverage; one scalar animation dial does not establish compound view synthesis.
|
|
22
|
+
|
|
23
|
+
The modeling requirements to preserve are local mesh-density adjustment, edge/curvature refinement, direct source-image comparison, a chest-region center/radius control, an integrated parts viewer with preset switching, and a face/body angle deformation sweep. These need actual geometry/source evidence and explicit acceptance criteria; they are not implemented by illustrative controls or a successful parser load.
|
|
24
|
+
|
|
25
|
+
Any future modeling edit needs provenance, undo/redo, explicit units and an exportable patch identifying the original hash and authoritative authoring target. A named adapter must apply it and rerun the owning tool's validation. Compiled-model rewrites are insufficient when source files are authoritative; conflicts must be named. This is a future modeling requirement, not permission to build a motion authoring tool.
|
|
26
|
+
|
|
27
|
+
## Acceptance progression
|
|
28
|
+
|
|
29
|
+
1. Delivery and feedback: one command opens unchanged output; declared assets load; explicit frame/target/category feedback saves and exports; changed source invalidates approval.
|
|
30
|
+
2. Runtime inspection: a real gated artifact plays and seeks through the public runtime, survives reference and Inspector section changes and names missing dependencies. Source-only fixtures cannot close this item.
|
|
31
|
+
3. Modeling touch-up: a bounded real geometry edit round-trips into authoritative source, reruns its gate and presents measured before/after evidence with undo/conflict controls.
|
|
32
|
+
|
|
33
|
+
## Screen prototype
|
|
34
|
+
|
|
35
|
+
[design-prototype.html](design-prototype.html) preserves the interactive screen concept. It is **illustrative**, with sample controls/data, separate from the implemented app. Its older motion key/curve editing concept is superseded by the current view/annotate/export boundary. It does not demonstrate completed mesh, motion, angle or audio editing.
|
|
36
|
+
|
|
37
|
+
## Inspection strips
|
|
38
|
+
|
|
39
|
+
An inclusive annotation interval can also become a derived frame strip. The single view selects one declared source video; compare retains its explicit shared video and chooses a producer clock basis for each interval. A batch preserves separate feedback intervals and side provenance. Source rows run down the sheet and requested producer frames run across it. A vertical batch repeats this grid rather than merging overlapping annotations.
|
|
40
|
+
|
|
41
|
+
Exact report `frameTimes` selects the requested seconds. Actual video decoding selects the nearest presented PTS (ties earlier), which drives all rig rows through the same published player/poser and fixed seek step as inspection. Requested frames, decoded PTS and each side's independently known frame remain distinct data. Missing clocks do not become a guessed rate or an empty rendered cell: PNG names the regeneration requirement and JSON can preserve an unmapped selection.
|
|
42
|
+
|
|
43
|
+
The export uses dedicated real canvas players and leaves the live playhead/session alone. PNG pixels, full source identity/footer and JSON are derived output outside the input packages. Exporting never approves a review or authors motion. Browser download controls share the bounded backend plan; a CLI can render and write new external files without providing a filesystem endpoint to the browser. Real CLI canvas/video tests do not establish browser WebGL or interactive presentation parity.
|