rig-create 1.0.1 → 1.0.2
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 +31 -23
- package/docs/CHECKS.md +9 -8
- package/docs/INTERVIEW.md +11 -4
- package/docs/LIVE-REVIEW.md +525 -0
- package/package.json +3 -2
- package/src/agent-guide.ts +16 -13
- package/src/choice-writers.ts +8 -2
- package/src/choices.ts +1 -1
- package/src/cli.ts +9 -1
- package/src/direction-writers.ts +3 -1
- package/src/direction.ts +2 -1
- package/src/feedback.ts +5 -2
- package/src/init.ts +1 -1
- package/src/job-acts.ts +44 -3
- package/src/job-host.ts +1 -1
- package/src/next.ts +113 -53
- package/src/record-input.ts +1 -1
- package/src/reopen.ts +1 -1
- package/src/review-package.ts +2 -1
- package/src/scene-writers.ts +2 -1
- package/src/scene.ts +3 -1
- package/src/signoff-pair.ts +60 -0
- package/src/signoff-target.ts +7 -4
- package/src/signoff.ts +5 -0
- package/src/structure.ts +1 -1
- package/templates/agent-guide.md +29 -31
- package/templates/example-chain/AGENTS.md +41 -43
- package/templates/example-chain/chain.json +55 -55
- package/templates/example-chain/checkpoints/0a-interview-options/AGENTS.md +41 -43
- package/templates/example-chain/checkpoints/0a-interview-options.json +1 -1
- package/templates/example-chain/checkpoints/0b-plan-pending/AGENTS.md +41 -43
- package/templates/example-chain/checkpoints/0b-plan-pending.json +1 -1
- package/templates/example-chain/checkpoints/1-parts-verdict/AGENTS.md +41 -43
- package/templates/example-chain/checkpoints/1-parts-verdict/project.json +2 -2
- package/templates/example-chain/checkpoints/1-parts-verdict.json +5 -5
- package/templates/example-chain/checkpoints/2-rigging-answers/AGENTS.md +41 -43
- package/templates/example-chain/checkpoints/2-rigging-answers/project.json +2 -2
- package/templates/example-chain/checkpoints/2-rigging-answers.json +5 -5
- package/templates/example-chain/checkpoints/3-rig-review/AGENTS.md +41 -43
- package/templates/example-chain/checkpoints/3-rig-review/project.json +4 -4
- package/templates/example-chain/checkpoints/3-rig-review.json +9 -9
- package/templates/example-chain/checkpoints/4-direction-post/AGENTS.md +41 -43
- package/templates/example-chain/checkpoints/4-direction-post/project.json +5 -5
- package/templates/example-chain/checkpoints/4-direction-post.json +9 -9
- package/templates/example-chain/evidence/captions.json +1 -1
- package/templates/example-chain/evidence/direction/v2.json +1 -1
- package/templates/example-chain/evidence/direction-input.json +1 -1
- package/templates/example-chain/evidence/scene/s1.json +1 -1
- package/templates/example-chain/project.json +10 -10
- package/templates/example-direction/derived/review/v1/out/check/build/run.json +2 -2
- package/templates/example-draft/derived/drafts/lantern/out/check/build/run.json +2 -2
- package/templates/example-draft/derived/drafts/lantern/out/run.json +2 -2
- package/templates/example-draft/derived/review/v1/out/check/build/run.json +2 -2
- package/templates/example-draft/derived/review/v1/out/rig/run.json +2 -2
- package/templates/example-draft/derived/review/v2/out/check/build/run.json +2 -2
- package/templates/example-draft/derived/review/v2/out/rig/run.json +2 -2
- package/templates/example-draft/evidence/direction/v4.json +3 -3
- package/templates/example-draft/evidence/direction-input-v4.json +3 -3
- package/templates/example-draft/evidence/parts-review.json +1 -1
- package/templates/example-draft/evidence/review-reads/{4ed0507381809746443021554e012032be5b5f8417da0f2e525e9b6df16e9f05.json → 52673b635b9cbc92da1a9e3d4c023a249bbacf79cd21b59724f03f18f8caf09b.json} +2 -2
- package/templates/example-draft/evidence/scene/s1.json +3 -3
- package/templates/example-draft/evidence/scene-citations.json +1 -1
- package/templates/example-draft/out/check/build/run.json +2 -2
- package/templates/example-draft/out/run.json +2 -2
- package/templates/example-draft/outputs/v1/out/check/build/run.json +2 -2
- package/templates/example-draft/outputs/v1/out/rig/run.json +2 -2
- package/templates/example-draft/outputs/v2/out/check/build/run.json +2 -2
- package/templates/example-draft/outputs/v2/out/rig/run.json +2 -2
- package/templates/example-interview-choice.json +68 -68
- package/templates/example-interview-options/constraint.json +2 -2
- package/templates/example-interview-options/example-assemble.json +2 -2
- package/templates/example-interview-options/example-bones.json +5 -5
- package/templates/example-interview-options/example-camera-depth.json +3 -3
- package/templates/example-interview-options/example-constraints.json +5 -5
- package/templates/example-interview-options/example-meshes.json +5 -5
- package/templates/example-interview-options/example-motion.json +5 -5
- package/templates/example-interview-options/example-picks.json +2 -2
- package/templates/example-interview-options/example-post-composition.json +3 -3
- package/templates/example-interview-options/example-post-timing.json +3 -3
- package/templates/example-interview-options/example-reference.json +2 -2
- package/templates/example-interview-options/example-rig-type.json +2 -2
- package/templates/example-interview-options/example-seethrough.json +2 -2
- package/templates/example-interview-options/fullscreen.json +2 -2
- package/templates/example-interview-options/other-explicit.json +2 -2
- package/templates/example-interview-options/other-pending.json +2 -2
- package/templates/example-interview-options/other-picks.json +2 -2
- package/templates/example-invariants/invariants.json +164 -164
- package/templates/example-project.json +249 -249
- package/templates/example-remesh/AGENTS.md +41 -43
- package/templates/example-remesh/evidence/captions.json +1 -1
- package/templates/example-remesh/evidence/direction/v4.json +1 -1
- package/templates/example-remesh/evidence/direction/v5.json +1 -1
- package/templates/example-remesh/evidence/direction-input-v4.json +1 -1
- package/templates/example-remesh/evidence/direction-input-v5.json +1 -1
- package/templates/example-remesh/evidence/interview/assemble.json +1 -1
- package/templates/example-remesh/evidence/interview/bones.json +4 -4
- package/templates/example-remesh/evidence/interview/camera_depth.json +2 -2
- package/templates/example-remesh/evidence/interview/constraints.json +4 -4
- package/templates/example-remesh/evidence/interview/meshes.json +4 -4
- package/templates/example-remesh/evidence/interview/motion.json +4 -4
- package/templates/example-remesh/evidence/interview/post_composition.json +2 -2
- package/templates/example-remesh/evidence/interview/post_timing.json +2 -2
- package/templates/example-remesh/evidence/interview/reference.json +1 -1
- package/templates/example-remesh/evidence/interview/rig_type.json +1 -1
- package/templates/example-remesh/evidence/interview/seethrough.json +1 -1
- package/templates/example-remesh/evidence/parts-review.json +1 -1
- package/templates/example-remesh/evidence/review-reads/{6a17db694db96f1b6049a61a017e0c8e66757b982b8851e0187e561cfcf9af68.json → afe2522be4087f7f2fa7e97746d5f8574b0aedb474245ce2dbce0455e662f041.json} +2 -2
- package/templates/example-remesh/evidence/scene/s1.json +2 -2
- package/templates/example-remesh/evidence/v1/registration/at-source.json +2 -2
- package/templates/example-remesh/evidence/v1/registration/rigc-run-1.json +2 -2
- package/templates/example-remesh/evidence/v2/registration/at-source.json +2 -2
- package/templates/example-remesh/evidence/v2/registration/rigc-run-1.json +2 -2
- package/templates/example-remesh/evidence/v3/registration/at-source.json +2 -2
- package/templates/example-remesh/evidence/v3/registration/rigc-run-1.json +2 -2
- package/templates/example-remesh/project.json +225 -225
- package/templates/example-reopened/project.json +289 -289
- package/templates/example-split/captions.json +1 -1
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
# Writer-owned live review
|
|
2
|
+
|
|
3
|
+
Open the standing owner window from a foreground terminal. Keep that command
|
|
4
|
+
running while writers commit results. The reviewer identity is the trusted
|
|
5
|
+
bootstrap identity used by Review.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
rig-create job open <project> --reviewer <id> --role owner [--draft <id> | --rig <n> | --plan | --question <id>]
|
|
9
|
+
rig-create job reconcile <project>
|
|
10
|
+
rig-create job close <project>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The open command prints the private owner-window URL. Keep it private.
|
|
14
|
+
`--rig <n>` selects an already registered rig or post and its retained review package,
|
|
15
|
+
including on a new job with an empty publication head. It accepts `1` or `v1`.
|
|
16
|
+
The version, complete retained package inventory and compiled model are checked
|
|
17
|
+
before starting the host or installing its binding, including pre-interview rigs.
|
|
18
|
+
Invalid selections refuse with `JOB_PUBLICATION_INVALID`; missing or changed
|
|
19
|
+
package files use the existing package-check refusal codes. Choose one of `--draft` and `--rig`; combining them
|
|
20
|
+
refuses with `JOB_BINDING_INVALID`. For a post, it retains the recorded parent rig and asks only
|
|
21
|
+
`review-verdict direction-review`. The legacy direction panel cannot render a post
|
|
22
|
+
publication with pending sign-off or checkpoint asks. Reopening an older post head
|
|
23
|
+
that declares those subjects replaces it with a verdict-only publication.
|
|
24
|
+
Reopening the same result over unchanged record
|
|
25
|
+
bytes reuses its publication and asks each declared subject once.
|
|
26
|
+
|
|
27
|
+
Judge direction on the post page with `job open --rig <post>`,
|
|
28
|
+
then ingest `review <post> --from-review <actId>`. Before the current live post has an accepted live verdict,
|
|
29
|
+
the record request refuses `JOB_DIRECTION_VERDICT_REQUIRED` without writing.
|
|
30
|
+
After verdict ingest, `job open --plan` asks `signoff direction-review` on the
|
|
31
|
+
record page. Ingest `signoff direction-review --from-review <actId>`, then
|
|
32
|
+
`advance accepted`. This route is supported by release-pinned
|
|
33
|
+
[Review 4.0.2](https://github.com/rig-c/review/tree/v4.0.2), including the
|
|
34
|
+
record direction-review sign-off from
|
|
35
|
+
[Review #795](https://github.com/rig-c/review/pull/795).
|
|
36
|
+
|
|
37
|
+
The act has no version selector. Its record hash binds the exact displayed
|
|
38
|
+
`project.json` bytes. Before the first write, create checks those bytes and
|
|
39
|
+
selects the current/latest live post and its accepted live direction verdict.
|
|
40
|
+
Earlier accepted post versions do not make the current target ambiguous.
|
|
41
|
+
Missing, duplicate or unaccepted current targets refuse
|
|
42
|
+
`REVIEW_ACT_RECORD_TARGET_INVALID`. Create's compact receipt retains
|
|
43
|
+
`record_sha256`, equal to the act's record hash, plus the resolved
|
|
44
|
+
`target_version` and `verdict` reference. Ledger validation and replay compare
|
|
45
|
+
that target with the recorded signoff and verify the act's hash binding even
|
|
46
|
+
after later records or reopens. The full record is not copied into its receipt;
|
|
47
|
+
Review's wire shape is unchanged. Immutable-byte replay precedes current-record
|
|
48
|
+
checks; a changed act or compact receipt refuses without writing.
|
|
49
|
+
|
|
50
|
+
The default in `parts` and `parts-review` publishes the latest recorded draft.
|
|
51
|
+
`--draft` names a recorded draft in any stage. Opening asks every subject that publication declares (see
|
|
52
|
+
[Asks](#asks)). It prints `job: draft <id> published`, or `already published`
|
|
53
|
+
when the job's head publication is already that draft (or an acknowledged `rig`
|
|
54
|
+
or `post` version) over the current record,
|
|
55
|
+
then `job: asked …` and `job: already asked …` with each subject. A `--draft` id
|
|
56
|
+
the record does not hold refuses `JOB_DRAFT_UNKNOWN` before writing `review_job`. A refused publish or ask
|
|
57
|
+
is printed while the foreground host keeps serving. The
|
|
58
|
+
versioned `review_job` stores only `jobId` and `origin`. The host installs its
|
|
59
|
+
fetch grant in the owner-only sibling `.rig-create-review-binding.json` and
|
|
60
|
+
ensures it and the durable `.rig-create-review/` outbox are ignored before
|
|
61
|
+
writing either. New projects declare both root patterns in init's `.gitignore`.
|
|
62
|
+
Existing Git projects receive only missing patterns in `.git/info/exclude`,
|
|
63
|
+
preserving their tracked `.gitignore` bytes. A folder without Git receives a
|
|
64
|
+
minimal `.gitignore` append. Effective ignores are checked before writing.
|
|
65
|
+
A tracked private path refuses startup. Agents invoke writers and never construct this file.
|
|
66
|
+
Explicit close revokes the grant and removes the matching binding (see
|
|
67
|
+
[Job retirement](JOB-RETIREMENT.md)). Listener shutdown alone preserves the
|
|
68
|
+
active job. A new incarnation receives a new grant.
|
|
69
|
+
|
|
70
|
+
Re-opening with an existing binding keeps its job. A running host is reused.
|
|
71
|
+
A stopped host restarts on the same job, state directory and port, and the
|
|
72
|
+
draft is published again only when the head publication no longer matches the
|
|
73
|
+
current record bytes. A binding whose root is another directory was copied
|
|
74
|
+
with the project (a clone or a move). `job open` never reads that binding's
|
|
75
|
+
host state or connects to its port: it opens this root's own job in its own
|
|
76
|
+
state directory, replaces the copied binding and rewrites `review_job`. Before
|
|
77
|
+
that, `job close` with the copied binding refuses `JOB_HOST_REUSE_MISMATCH` on
|
|
78
|
+
`root` before any attach, and a copied outbox entry refuses
|
|
79
|
+
`JOB_OUTBOX_INVALID`.
|
|
80
|
+
|
|
81
|
+
The outbox, intents and discard log live in the project-root
|
|
82
|
+
`.rig-create-review/`, independently of the binding and TMPDIR. Its directories
|
|
83
|
+
are owner-only 0700 and files 0600, with symlinks refused. Private Review host
|
|
84
|
+
state stays outside the project under the system temporary directory, as its
|
|
85
|
+
host contract requires. Losing that host state leaves the durable publication
|
|
86
|
+
HOLE visible.
|
|
87
|
+
|
|
88
|
+
## Phase 1 results
|
|
89
|
+
|
|
90
|
+
| Writer | Published result | Review subject |
|
|
91
|
+
| --- | --- | --- |
|
|
92
|
+
| `draft-rig` | The labelled draft, C4 input inventory and retained output | `draft` selector and `parts-verdict`, plus sign subjects |
|
|
93
|
+
| `rig-version` | The recorded rig and retained review package | `rig` selector and `review-verdict` for `rig-review`, plus sign subjects |
|
|
94
|
+
| `direction write` and `direction patch` | The recorded post, direction document and retained rig package | `post` selector and only `review-verdict` for `direction-review` |
|
|
95
|
+
| `advance rig-review` | The current live rig at the entered review stage | `rig` selector, `review-verdict`, and the stage's `signoff` subject |
|
|
96
|
+
| `advance direction-review` | The current live post at the entered review stage | `post` selector and only `review-verdict direction-review` |
|
|
97
|
+
|
|
98
|
+
The sign subjects are the `signoff` and `checkpoint` subjects of
|
|
99
|
+
[Live sign-off routes](#live-sign-off-routes).
|
|
100
|
+
|
|
101
|
+
Writers produce `review-live-v<N>.json` over the existing model and original
|
|
102
|
+
direction bytes, using project-relative paths. Its title is `rig v<N>` or
|
|
103
|
+
`post v<N> (rig v<R>)`, so Review's previous/current publication notice names
|
|
104
|
+
the exact versions. A post needs the rig's complete retained review package.
|
|
105
|
+
Package-less option, plan, scene and stage-only writes await Review's separate
|
|
106
|
+
package-less-result contract. Act ingestion belongs to create#182.
|
|
107
|
+
|
|
108
|
+
The reader takes plan step hashes from create's `stepHash`, binds the retained
|
|
109
|
+
package against its recorded file hashes, and calls the installed public Parts
|
|
110
|
+
enumerator on the recorded `review_package.from` producer root. Its manifest
|
|
111
|
+
must match the packaged manifest hash, and every packaged PNG must match too.
|
|
112
|
+
Registration copies every image returned by Parts' public enumerator into its
|
|
113
|
+
retained producer output and records it in `review_package.files`. Historical
|
|
114
|
+
packages retain their existing file declarations, including their earlier
|
|
115
|
+
sibling omissions. Their recorded producer root remains the read path.
|
|
116
|
+
A package without `from` uses its own `out` directory. Its `images` preserves every returned row, role, duplicate path and
|
|
117
|
+
position. The enumerator version is read from the installed package metadata.
|
|
118
|
+
Review re-enumerates and validates the supplied identity under API@2/act@2.
|
|
119
|
+
|
|
120
|
+
## Commit and recovery
|
|
121
|
+
|
|
122
|
+
Participating bound writers hold a shared write lock as well as their existing
|
|
123
|
+
writer lock until publication acknowledgment. Before replacing the project,
|
|
124
|
+
the writer fsyncs a private outbox intent containing the published `versions[]`
|
|
125
|
+
entry hash and result selector. The hash uses that entry's two-space JSON
|
|
126
|
+
serialization with a final newline. After commit, the matching entry is pending until Review
|
|
127
|
+
acknowledges it. The pending identity and generation
|
|
128
|
+
remain stable across retries, including acknowledgment loss. A publish failure
|
|
129
|
+
leaves the committed result and reports `JOB_PUBLISH_PENDING` beside the write.
|
|
130
|
+
`interview --check` includes every pending entry in `holes[]` and exits 1.
|
|
131
|
+
Unbound projects retain their existing report shape and writer behavior.
|
|
132
|
+
|
|
133
|
+
On a bound job, `advance rig-review` and `advance direction-review` follow the
|
|
134
|
+
same commit-then-durable-outbox order for the current live `rig` or `post`
|
|
135
|
+
version: holding the shared job write lock, the writer validates the post-advance
|
|
136
|
+
candidate and live version before writing, records the outbox intent for the
|
|
137
|
+
post-advance record bytes, atomically replaces `project.json`, and publishes the
|
|
138
|
+
version with its `review-verdict` and, for a rig, stage `signoff` subjects. If publication
|
|
139
|
+
fails after `project.json` is committed, the stage advance stays committed in
|
|
140
|
+
`project.json`, `JOB_PUBLISH_PENDING` remains in the durable outbox and is
|
|
141
|
+
reported in `interview --check` `holes[]`, and `rig-create job reconcile`
|
|
142
|
+
publishes and clears it. If the atomic record write itself fails before
|
|
143
|
+
`project.json` is replaced, the uncommitted advance intent is removed and
|
|
144
|
+
`project.json` stays byte-identical, so there is never a silent half-advance
|
|
145
|
+
where the stage is advanced without either an acknowledged publication or a
|
|
146
|
+
durable pending outbox entry. Advances into any other stage and advances when no
|
|
147
|
+
job is bound do not publish or touch the outbox.
|
|
148
|
+
|
|
149
|
+
Run `job reconcile` after restoring the host or declared package. It holds the
|
|
150
|
+
same lock, verifies the retained version and files, publishes against the
|
|
151
|
+
current whole-record hash and removes the acknowledged entry. Later signoffs,
|
|
152
|
+
inputs and other independent writes remain in that current record.
|
|
153
|
+
Reconciliation never rewrites `project.json`. A changed or missing committed
|
|
154
|
+
version refuses with `JOB_PUBLICATION_STALE`. Another participating writer and explicit close
|
|
155
|
+
wait until pending work is reconciled. After process loss, `check` and reconcile
|
|
156
|
+
recover a dead writer's shared lock. An intent with a matching version entry is
|
|
157
|
+
a pending HOLE, including after other writers change the surrounding record.
|
|
158
|
+
An intent whose version is absent is dropped with its ID and version hash
|
|
159
|
+
in the private `discarded-intents.jsonl` log. Active writer intents stay held.
|
|
160
|
+
A different version hash remains a named HOLE and is preserved. A refused
|
|
161
|
+
write cancels its absent-version intent. Each current-record snapshot has its
|
|
162
|
+
own idempotent request key, with a stable key/generation for retries of that
|
|
163
|
+
snapshot. Receipt recovery and
|
|
164
|
+
acknowledgment never edit project bytes.
|
|
165
|
+
|
|
166
|
+
## Host attachment and delivery
|
|
167
|
+
|
|
168
|
+
Before attaching, the writer compares root, state directory, fingerprint,
|
|
169
|
+
reviewer, callback IDs, schemas and installed enumerator version with the
|
|
170
|
+
frozen private binding. A mismatch produces a pending receipt containing the
|
|
171
|
+
differing field and both values. The writer loads Review's public
|
|
172
|
+
`startJobHost` facade and publishes through its in-process `ports.handleJobApi`
|
|
173
|
+
with bootstrap agent authority held only in memory.
|
|
174
|
+
|
|
175
|
+
`job open` stores the bound listener's `listenerIncarnation` in the private
|
|
176
|
+
binding when Review returns an attested `attachment`. A `null` attachment from
|
|
177
|
+
ordinary reuse means "not strictly attached": it is not an error and nothing
|
|
178
|
+
is reinstalled. Every later attach is Review's strict reuse-only POST, with
|
|
179
|
+
`reuseOnly.expected.{jobId, origin, listenerIncarnation, binding}` taken from
|
|
180
|
+
the locked binding, so Review never starts a replacement listener for a
|
|
181
|
+
reconcile. A refused attach keeps Review's `reason` and `phase` in a
|
|
182
|
+
`JOB_HOST_ATTACH_REFUSED` pending receipt, including `incarnation-missing` for
|
|
183
|
+
a host that predates the token. A field-level mismatch keeps its `field`,
|
|
184
|
+
`expected` and `actual` values in `JOB_HOST_REUSE_MISMATCH`. A reuse-only
|
|
185
|
+
attach never writes the binding.
|
|
186
|
+
|
|
187
|
+
Cross-process subscription delivery uses a **30-second server wait cycle**.
|
|
188
|
+
Scheduling, transport and rendering add elapsed time. Review 2.8.0 defines
|
|
189
|
+
`jobWaitLimitMs = 30_000` in `src/job-api.ts` and reads durable events
|
|
190
|
+
after the timer in `src/job-session.ts`. The window's previous/new label
|
|
191
|
+
notice is implemented in `web/job-session.ts`.
|
|
192
|
+
|
|
193
|
+
Review 2.8.0 carries answered scene-context choices and historical reader
|
|
194
|
+
diagnostics in `publication.interview` (`rig-review/job-interview@1`), and
|
|
195
|
+
refuses invalid or stale editable `pending_options` sets with
|
|
196
|
+
`JOB_RECORD_INCOMPLETE` before this reader runs.
|
|
197
|
+
|
|
198
|
+
## Finalized verdict ingestion
|
|
199
|
+
|
|
200
|
+
```sh
|
|
201
|
+
rig-create review <version> <project> --from-review <actId> --json
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
The synchronous writer uses its private #184 binding to fetch the finalized act
|
|
205
|
+
from the exact loopback job API. Its subprocess receives no Review state path or
|
|
206
|
+
host callbacks. It opens no host and carries no producer storage file. The grant
|
|
207
|
+
travels in Authorization, and the private process transport uses stdin/stdout.
|
|
208
|
+
Human-value and feedback flags are exclusive with `--from-review`.
|
|
209
|
+
|
|
210
|
+
The shared reader checks `rig-review/job-api@2` for semantic API responses,
|
|
211
|
+
`rig-review/act@2` for historical acts and `rig-review/act@3` for rig stills, and the
|
|
212
|
+
act's Parts enumerator version against `>=2.25.0 <4.0.0`. API@1 and act@1 are
|
|
213
|
+
refused without migration. Rig/post `review-verdict` and draft `parts-verdict` use their respective writers.
|
|
214
|
+
Interview picks use `interview-answer --from-review`. A passed `checkpoint` act is recorded by
|
|
215
|
+
`signoff <stage> --checkpoint <id> --from-review <actId>`: the act's `planStepId` must be `<id>`, an
|
|
216
|
+
enabled checkpoint `--checkpoint` accepts in that stage, and its displayed plan must be the current
|
|
217
|
+
one. The sign-off takes `by`, `at` and the words from the act and names it in `source`; a `fail`
|
|
218
|
+
outcome is refused (`REVIEW_ACT_CHECKPOINT_FAILED`) and writes nothing. A `signoff` act is recorded by
|
|
219
|
+
`signoff <stage> --from-review <actId>` (PROJECT.md § Recording a sign-off). Which publications
|
|
220
|
+
carry these two subjects is below, in Live sign-off routes. Image-review has no create version writer mapping. Described
|
|
221
|
+
correction and mesh-edit retain Review's reserved status.
|
|
222
|
+
|
|
223
|
+
`approved`, `changes-requested` and `pending` map to the existing verdict
|
|
224
|
+
vocabulary `accepted`, `bounced` and `provisional`. Host-attested owner maps to
|
|
225
|
+
`by: user`, and delegate maps to `by: delegate`. The complete reviewer identity,
|
|
226
|
+
authority, original words, time and source remain in the immutable act receipt.
|
|
227
|
+
Verdict ingestion records its verdict and bound still. Signoff and stage advance require their own
|
|
228
|
+
separate writer invocations.
|
|
229
|
+
|
|
230
|
+
### Source checks and replay
|
|
231
|
+
|
|
232
|
+
The #184 job/write lock spans fetch, validation and commit. Every first ingest
|
|
233
|
+
and replay checks the explicit selector, retained model, direction, package,
|
|
234
|
+
plan step identities, Parts manifest and declared image hashes against current
|
|
235
|
+
files. Create never reconstructs Review's composite `sourceHash` or producer
|
|
236
|
+
measurements. `source.projectHash` remains exact publication provenance inside
|
|
237
|
+
the retained act. Later unrelated signoffs can change project.json without
|
|
238
|
+
invalidating a displayed version.
|
|
239
|
+
|
|
240
|
+
A successful publish now retains an owner-only acknowledged receipt beside the
|
|
241
|
+
outbox in `.rig-create-review/acknowledged-publications/`. It records the job,
|
|
242
|
+
publication ID, generation, request ID, selector and #184 `publicationVersionHash`
|
|
243
|
+
before the outbox entry is removed. `JobAct.publicationId` links first ingest to
|
|
244
|
+
that receipt. A changed version entry refuses `REVIEW_ACT_SOURCE_STALE`. When
|
|
245
|
+
private receipts are absent, including after a clone, ingest emits
|
|
246
|
+
`REVIEW_ACT_VERSION_UNVERIFIED` and still checks every explicit source binding.
|
|
247
|
+
The JSON command result carries `warnings[]`, and the text result prints the
|
|
248
|
+
named warning. This warning describes the skipped first-ingest version-entry
|
|
249
|
+
comparison. It grants no exemption from the explicit source checks.
|
|
250
|
+
|
|
251
|
+
The versioned record's `review_acts[]` stores `rig-create/review-act@1` receipts
|
|
252
|
+
keyed by `(jobId, actId)`. Review verdicts retain the exact raw export bytes as
|
|
253
|
+
`bytes`, their SHA-256, the version and verdict index, the pre-append
|
|
254
|
+
version-entry hash and the exact still entries added by ingestion. Historical
|
|
255
|
+
semantic-API receipts keep their original encoding. No act has a self-hash.
|
|
256
|
+
|
|
257
|
+
For rig act@3, `review --from-review <actId>` fetches raw act bytes and the
|
|
258
|
+
PNG through the live job API with the consumer grant.
|
|
259
|
+
The writer verifies the PNG hash, retains both files under `evidence/v<N>/`,
|
|
260
|
+
and records the displayed still first in `evidence[]`. Numeric frames name
|
|
261
|
+
the animation in `what`. Create never renders or reconstructs these pixels.
|
|
262
|
+
A missing or mismatched PNG refuses `REVIEW_ACT_STILL_INVALID` before writing.
|
|
263
|
+
The result and receipt are validated with the checker, fsynced and atomically
|
|
264
|
+
replaced together. Refusal preserves project.json bytes. `check` validates the
|
|
265
|
+
receipt hash, immutable act and linked verdict, including words and authority.
|
|
266
|
+
Historical receipts are checked against retained evidence, independently of
|
|
267
|
+
whether their sources are still current.
|
|
268
|
+
|
|
269
|
+
An unchanged replay reports the existing verdict without rewriting the record.
|
|
270
|
+
Replay discounts verdicts and exact still entries appended by ingestion after
|
|
271
|
+
its recorded verdict index when comparing the pre-append version-entry hash. Other original version fields and
|
|
272
|
+
prior verdicts remain covered. Source changes refuse `REVIEW_ACT_SOURCE_STALE`
|
|
273
|
+
with the recorded verdict untouched. This implements create#182's C4 ruling
|
|
274
|
+
against the installed dedupe-first order in Review 2.8.0 `src/job-contract.ts`. C4's source-check requirement is recorded in create#182's
|
|
275
|
+
“C4 act-side checks” ruling and review#501. [Create ruling](https://github.com/rig-c/create/issues/182), [Review C4](https://github.com/rig-c/review/issues/501).
|
|
276
|
+
|
|
277
|
+
### Isolation evidence and legacy inputs
|
|
278
|
+
|
|
279
|
+
The path test starts the host with relocated state, excludes its actual state
|
|
280
|
+
path from the writer binding, and guards filesystem calls in the writer and
|
|
281
|
+
fetch subprocess against that state path. It exercises the producer-bound
|
|
282
|
+
chain checkpoint's rig verdict over the loopback API. Separate-UID filesystem
|
|
283
|
+
unreadability is not measurable in this local test environment. The guarded
|
|
284
|
+
path test establishes the accepted consumer access boundary.
|
|
285
|
+
|
|
286
|
+
`--picks-file`, `--verbatim-file`, parts `--evidence`, and reshaped feedback JSON
|
|
287
|
+
remain available for legacy/history workflows. The current semantic verdict
|
|
288
|
+
path uses `--from-review` and preserves the fetched act directly.
|
|
289
|
+
|
|
290
|
+
## Live sign-off routes
|
|
291
|
+
|
|
292
|
+
Every draft or rig package publication also declares the `signoff` and `checkpoint` subjects
|
|
293
|
+
that its record can sign, in the stage the check reads that record in (its
|
|
294
|
+
effective stage). The rules are in `src/signable.ts`:
|
|
295
|
+
|
|
296
|
+
- A `checkpoint` subject is declared for each plan step whose checkpoint
|
|
297
|
+
`signoff <stage> --checkpoint <id>` accepts in that stage. The step runs in
|
|
298
|
+
the stage and its checkpoint is enabled. `signoff` uses the same function.
|
|
299
|
+
- A `signoff` subject is declared for the stage itself while it closes on a
|
|
300
|
+
sign-off and has no live stage-level signature. `rig-review` is declared only
|
|
301
|
+
on a `rig` publication, because the act's selector is the signature's target.
|
|
302
|
+
Post publications carry only the direction verdict; direction sign-off uses
|
|
303
|
+
the separate source-linked record page described above. A plan-bound stage
|
|
304
|
+
(`plan-approved`, `rigging-interview`, `post-interview`) also needs displayed
|
|
305
|
+
plan steps.
|
|
306
|
+
|
|
307
|
+
Review 2.8.0 asks only for a declared subject and refuses any other with
|
|
308
|
+
`JOB_ASK_INVALID` (`bindJobAsk`, `src/job-act.ts`). Both the ask and the act
|
|
309
|
+
also require `project.json` to still hold the published bytes
|
|
310
|
+
(`assertJobSourceCurrent`, `src/job-source.ts`). So either the owner submits
|
|
311
|
+
both the verdict and `signoff` acts for parts or rig review in the Review UI before any writer mutates
|
|
312
|
+
`project.json`, or after a CLI writer (`parts-review --from-review`,
|
|
313
|
+
`diff-classes`, or `review <n> --from-review`) updates `project.json`, the
|
|
314
|
+
agent runs `rig-create job open` to republish the current selector (`draft`,
|
|
315
|
+
or `rig`) over the updated `project.json` bytes and re-ask the stage's
|
|
316
|
+
declared subjects before the owner signs off in the UI.
|
|
317
|
+
|
|
318
|
+
`job reconcile` keeps the declared subjects in the acknowledged receipt.
|
|
319
|
+
`signoff … --from-review` compares the act's subject with that list and
|
|
320
|
+
refuses one the publication did not declare (`REVIEW_ACT_SUBJECT_UNDECLARED`).
|
|
321
|
+
create asks only declared subjects, but an act can also answer an ask sent by
|
|
322
|
+
another holder of the agent authority, so the check stays. A receipt without
|
|
323
|
+
the list, or no receipt at all (a clone), leaves only Review's ask binding.
|
|
324
|
+
|
|
325
|
+
### Asks
|
|
326
|
+
|
|
327
|
+
Every publication create acknowledges is followed, in the same process, by an
|
|
328
|
+
ask for each subject it declares. That covers `draft-rig`, `rig-version`,
|
|
329
|
+
`direction write|patch`, `advance rig-review|direction-review`, `job reconcile`
|
|
330
|
+
and `job open`. The process already
|
|
331
|
+
holds Review's agent authority in memory for the publish, so the ask needs no
|
|
332
|
+
other transport. The authority never enters argv, the environment or a project
|
|
333
|
+
file, and agents never handle it. A subject already asked on that publication,
|
|
334
|
+
pending or answered, is not asked again (create reads the job's own `pending`
|
|
335
|
+
events), so a retry or re-open shows no second control. A new publication
|
|
336
|
+
supersedes the previous one's pending asks, as Review defines.
|
|
337
|
+
|
|
338
|
+
An ask Review refuses never makes the acknowledged publication pending again.
|
|
339
|
+
`job open` and `job reconcile` name it `JOB_ASK_REFUSED`, with each subject and
|
|
340
|
+
Review's code. A writer's own publish step reports only publication failures,
|
|
341
|
+
so after a writer run whose page lacks a control, run `job open` to ask
|
|
342
|
+
again.
|
|
343
|
+
|
|
344
|
+
| Sign-off | Carried by | When |
|
|
345
|
+
| --- | --- | --- |
|
|
346
|
+
| `parts` checkpoints | draft | `draft-rig` commits while the record is in `parts` and the checkpoint is enabled |
|
|
347
|
+
| `rigging` checkpoints | rig version | `rig-version` commits in `rigging` |
|
|
348
|
+
| `post` checkpoints | record plan | `job open --plan` in `post` when the checkpoint is enabled and at-checkpoint |
|
|
349
|
+
| `parts-review` | draft | `draft-rig` commits in `parts-review`, or the agent runs `job open` to refresh the draft after `parts-review --from-review` / `diff-classes` |
|
|
350
|
+
| `rig-review` | rig version | `advance rig-review` commits the move into `rig-review`, `rig-version` commits in `rig-review`, or the agent runs `job open` to refresh the live `rig` head after `review <n> --from-review` |
|
|
351
|
+
| `direction-review` | record plan, using release-pinned Review 4.0.2 | `job open --plan` after the current post's accepted live verdict is ingested; ingest the real signature, then `advance accepted` |
|
|
352
|
+
| `plan-approved`, `rigging-interview`, `post-interview` | record plan | `job open --plan` in the approval stage |
|
|
353
|
+
| `interview` | record plan, using release-pinned Review 4.0.2 with the interview carrier ([Review #803](https://github.com/rig-c/review/pull/803), issue #800) | `job open --plan` after `interview --check` passes and the displayed plan has steps; ingest `signoff interview --from-review <actId>`, then `advance plan-approved` |
|
|
354
|
+
|
|
355
|
+
Interview picks use `job open --question <id>`. After ingesting every pick,
|
|
356
|
+
run `interview --check`, then `job open --plan` for the interview signature.
|
|
357
|
+
This record route is supported by release-pinned
|
|
358
|
+
[Review 4.0.2](https://github.com/rig-c/review/tree/v4.0.2), including the
|
|
359
|
+
[Review #803](https://github.com/rig-c/review/pull/803) carrier (issue #800).
|
|
360
|
+
The record subject is `plan`, with non-empty
|
|
361
|
+
displayed steps, even though the signature approves the interview answers
|
|
362
|
+
and does not approve or fill the plan's checkpoints. After advancing,
|
|
363
|
+
`next` offers the separate `plan-approved` signature.
|
|
364
|
+
|
|
365
|
+
Publication and first ingest use the same full `checkProject` function as
|
|
366
|
+
`interview --check`. An unclean record refuses `INTERVIEW_SIGNOFF_NOT_CLEAN`;
|
|
367
|
+
an empty displayed plan refuses `INTERVIEW_SIGNOFF_PLAN_REQUIRED`.
|
|
368
|
+
First ingest also checks the act's record hash, displayed plan identities
|
|
369
|
+
and current interview stage. Refusals leave `project.json` byte-identical.
|
|
370
|
+
Immutable replay returns the recorded signature before current-stage checks.
|
|
371
|
+
The CLI `--by` route and earlier package-mode acts retain their behavior.
|
|
372
|
+
|
|
373
|
+
## Parts drafts and independent verdicts
|
|
374
|
+
|
|
375
|
+
```sh
|
|
376
|
+
rig-create draft-rig <id> <project> --config <config> --from <output> --parts <parts>
|
|
377
|
+
rig-create parts-review <project> --from-review <actId> --json
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
Bound draft registration holds the #184 shared lock through intent, atomic
|
|
381
|
+
record commit and publication acknowledgment. Its durable identity is the exact
|
|
382
|
+
`drafts[id]` entry, hashed by `publicationVersionHash` with the existing
|
|
383
|
+
serialization. A rebuild receives a new draft ID. Failed publication retains
|
|
384
|
+
its original intent and retries through `job reconcile`. Unbound registration
|
|
385
|
+
continues to record the existing draft inventory.
|
|
386
|
+
|
|
387
|
+
The writer publishes `review-draft-<id>.json` with a labelled draft title, an
|
|
388
|
+
entry-hash revision, the recorded compiled model when available, declared image
|
|
389
|
+
references, and read-only rig/motion/mesh-report artifacts. Standalone output
|
|
390
|
+
without a compiled model uses Review's optional-model manifest form. The host
|
|
391
|
+
reader supplies the draft selector and `parts-verdict` subject, part IDs and the
|
|
392
|
+
exact C4 Parts enumeration over the recorded draft input. Config, config inputs
|
|
393
|
+
and retained outputs are sealed as publication files. Producer bytes are read
|
|
394
|
+
and hash-bound. Publication performs no build or producer measurement.
|
|
395
|
+
|
|
396
|
+
`parts-review` uses the shared API@2/act@2 reader and writer-owned fetch grant.
|
|
397
|
+
It records all three verdict values and each part/mesh outcome and note exactly.
|
|
398
|
+
The human words, host-attested reviewer, authority, time and original source
|
|
399
|
+
remain inside the complete act. The JSON result reports the role mapping and
|
|
400
|
+
its explicit evidence path. It appends a `kind: parts-verdict` receipt in
|
|
401
|
+
`review_acts[]`, with draft ID, the pinned draft-entry hash and evidence identity.
|
|
402
|
+
The evidence file under `evidence/review-acts/` is the same immutable act encoding
|
|
403
|
+
and SHA-256 as the ledger bytes.
|
|
404
|
+
|
|
405
|
+
The semantic evidence branch reads act@2 directly. The legacy
|
|
406
|
+
`rig-review-parts-verdict/1` and `/2` approval, source, draft-match, structure and
|
|
407
|
+
difference gates continue through their existing branches. A semantic approval
|
|
408
|
+
must cover the selected draft's manifest and part membership. Its published
|
|
409
|
+
config, config inputs and mesh/output identities remain bound to that draft,
|
|
410
|
+
with all C4 image hashes checked. These retain the parts/draft and mesh-output
|
|
411
|
+
binding obligations of create#236 and #245. The semantic form carries its actual
|
|
412
|
+
C4 inventory and draft receipt, without synthesizing a legacy `source.files`
|
|
413
|
+
report or interpreting mesh geometry.
|
|
414
|
+
|
|
415
|
+
Use the returned evidence explicitly in the separate writers.
|
|
416
|
+
|
|
417
|
+
```sh
|
|
418
|
+
rig-create structure-snapshot <project> --draft <id> --verdict <returned-path> --out evidence/structure.json
|
|
419
|
+
rig-create signoff parts-review <project> --draft <id> --evidence <returned-path> --structure-file evidence/structure.json --diff-report <report> --by <human> --verbatim-file <words>
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
The existing difference component options still apply to the report. A pending
|
|
423
|
+
or changes-requested act can be retained, while the separate approval writer
|
|
424
|
+
refuses it with `PARTS_VERDICT_NOT_APPROVED`. Recording evidence leaves signoff
|
|
425
|
+
and stage progression to those explicit writes.
|
|
426
|
+
|
|
427
|
+
At check, structure-snapshot and signoff, retained parts approval checks its draft
|
|
428
|
+
bindings independently of later plan changes, including checkpoint decisions.
|
|
429
|
+
The full plan comparison still applies at ingest and replay. Draft publications
|
|
430
|
+
declare no direction document, so their acts have `source.direction: null`.
|
|
431
|
+
|
|
432
|
+
Every ingest and replay checks the draft selection, Parts manifest/images,
|
|
433
|
+
config and config inputs, retained outputs, package revision and any declared
|
|
434
|
+
model/plan/direction identities before deduplication. Package revision is the
|
|
435
|
+
create-owned draft-entry hash. A changed config, part or draft entry refuses
|
|
436
|
+
`REVIEW_ACT_SOURCE_STALE`. `sourceHash` remains producer provenance, and
|
|
437
|
+
`projectHash` stays publication provenance across unrelated record writes.
|
|
438
|
+
First ingest also joins `publicationId` to the private acknowledged receipt.
|
|
439
|
+
An absent receipt emits `REVIEW_ACT_VERSION_UNVERIFIED` while the explicit
|
|
440
|
+
bindings remain enforced and the current draft-entry hash is pinned.
|
|
441
|
+
|
|
442
|
+
Evidence is exclusively created, fsynced with its directory, and then linked by
|
|
443
|
+
an atomic project commit. If a process dies between staging and record commit,
|
|
444
|
+
an identical retry reuses the staged file and commits once. Different bytes at
|
|
445
|
+
the deterministic `(jobId, actId)` path refuse
|
|
446
|
+
`PARTS_REVIEW_EVIDENCE_CONFLICT`. A failed invocation removes only evidence it
|
|
447
|
+
created and has not committed. Existing evidence is preserved.
|
|
448
|
+
|
|
449
|
+
## Sealed checkpoint attachments
|
|
450
|
+
|
|
451
|
+
The agent attaches a producer's ordered presentation through the writer.
|
|
452
|
+
|
|
453
|
+
```sh
|
|
454
|
+
rig-create checkpoint-table --file evidence/classification.json --rows pairFrames --out evidence/checkpoint-table.json
|
|
455
|
+
rig-create checkpoint-evidence --file evidence/checkpoint-packets.json
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
`checkpoint-table` converts every object in the selected top-level array into
|
|
459
|
+
one row, preserving input order and all columns. Columns follow the first row's
|
|
460
|
+
key order. Every later row must have the same keys. Nested objects and arrays
|
|
461
|
+
become JSON text cells. Scalars retain their values. The command validates the
|
|
462
|
+
complete signed table grammar and size before writing, preserves the producer
|
|
463
|
+
source, and refuses to overwrite different output bytes.
|
|
464
|
+
|
|
465
|
+
`checkpoint-evidence` takes a JSON array of `rig-review-checkpoint-evidence/1`
|
|
466
|
+
packets. Each packet declares `checkpointId`, `planStepId`, ordered
|
|
467
|
+
`tiles[{id,label,path,sha256}]`, `table{path,sha256,label?}`, `routesText` and
|
|
468
|
+
`recommendationText`. Paths are literal project-relative asset paths. The table's
|
|
469
|
+
raw UTF-8 JSON has exactly `schema`, `columns` and `rows`, with schema
|
|
470
|
+
`rig-review-checkpoint-table/1`. Labels, all ordered rows, routes and recommendation
|
|
471
|
+
text remain verbatim. The declaration contains the table seal and optional label.
|
|
472
|
+
|
|
473
|
+
The writer stores the canonical ordered packets in `plan.checkpoint_evidence`.
|
|
474
|
+
Each checkpoint ID equals its existing plan step ID. It validates the candidate
|
|
475
|
+
with the ordinary check, verifies raw asset seals and table grammar, and commits
|
|
476
|
+
atomically under the attachment lock and any bound job write freeze. Refused writes
|
|
477
|
+
preserve `project.json` bytes. An identical retry writes nothing. The writer adds
|
|
478
|
+
presentation evidence without changing plan approval fields or stage authority.
|
|
479
|
+
|
|
480
|
+
`checkpoint-evidence --clear` removes the optional `plan.checkpoint_evidence`
|
|
481
|
+
field entirely, allowing its plan steps to be edited or removed through the plan
|
|
482
|
+
writer. Choose one of `--file` and `--clear`. Clear uses the same locks, candidate
|
|
483
|
+
check and atomic commit. Its JSON result is `null`. Repeating clear on an absent
|
|
484
|
+
field writes nothing.
|
|
485
|
+
|
|
486
|
+
The trusted record-plan and package readers include `checkpointEvidence` only
|
|
487
|
+
for checkpoint subjects they actually declare. Every supplied asset enters the
|
|
488
|
+
trusted closure with its exact path and raw SHA-256. Record option sets omit this
|
|
489
|
+
extension. Historical absence emits no evidence field. Review's signed extension
|
|
490
|
+
owns full PNG decoding, source/instance hashing, retained delivery and EN/KO owner
|
|
491
|
+
presentation. Runtime publication requires that extension in the served Review.
|
|
492
|
+
|
|
493
|
+
For Create's parts-bound package publications, Review metadata currently requires
|
|
494
|
+
a PNG original painting. An SVG source reaches the PNG-only Parts view loader
|
|
495
|
+
and refuses with `JOB_SOURCE_MISMATCH` from `PARTS_PAINTING_PNG` before projecting
|
|
496
|
+
checkpoint evidence. The PNG-positive and SVG-refusal regression cases cover
|
|
497
|
+
this boundary. [Review #636](https://github.com/rig-c/review/issues/636)
|
|
498
|
+
|
|
499
|
+
The adjacent owner routes use pass for (i), accepting the openings, and fail with
|
|
500
|
+
the person's verbatim words for (ii) or (iii). The browser sends
|
|
501
|
+
`{checkpointId,outcome,words}` and Review supplies `planStepId`. The separate
|
|
502
|
+
`signoff <stage> --checkpoint <id> --from-review <actId>` writer consumes passed
|
|
503
|
+
package `act@2` or record `act@4` checkpoints. Failed acts refuse sign-off. A
|
|
504
|
+
changed checkpoint packet makes first ingest stale. The immutable passed receipt
|
|
505
|
+
keeps its existing replay behavior. The recommendation remains labelled producer
|
|
506
|
+
text and grants no approval authority.
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
### Withdrawn checkpoint subjects
|
|
510
|
+
|
|
511
|
+
After `plan checkpoint-withdraw`, the next normal publication omits the matching
|
|
512
|
+
withdrawn checkpoint subject and its checkpoint presentation. Other checkpoint
|
|
513
|
+
and signoff subjects retain their existing selection rules. The withdrawal
|
|
514
|
+
writer does not refresh an existing publication or alter packet records/assets.
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
### Execution-bar policy journal
|
|
518
|
+
|
|
519
|
+
`plan bar-amend <id> --by <operator> --reason-file <file> --quote-file <file>
|
|
520
|
+
--bar-file <file>` records an explicitly authorized operator policy with its
|
|
521
|
+
exact quoted words. It creates no Review act or signature, changes no original
|
|
522
|
+
step approval hash and adds no Review panel, subject or gate. This narrow policy
|
|
523
|
+
operation does not replace the Review path for any other human decision.
|
|
524
|
+
The bound journal and effective-bar rules are in PROJECT.md, "Operator amendment
|
|
525
|
+
of an execution bar". Existing publications are not refreshed by this writer.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rig-create",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Create a rig project: its folder, decision record, repository and pinned rig-c packages",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"docs/PROJECT.md",
|
|
13
13
|
"docs/INTERVIEW.md",
|
|
14
14
|
"docs/CHECKS.md",
|
|
15
|
+
"docs/LIVE-REVIEW.md",
|
|
15
16
|
"docs/COLLECTIONS.md",
|
|
16
17
|
"docs/CRAFT.md",
|
|
17
18
|
"docs/SOURCE.md",
|
|
@@ -28,7 +29,7 @@
|
|
|
28
29
|
"dependencies": {
|
|
29
30
|
"@rig-c/core": "3.7.0",
|
|
30
31
|
"@rig-c/parts": "2.37.0",
|
|
31
|
-
"@rig-c/review": "4.0.
|
|
32
|
+
"@rig-c/review": "4.0.2"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@types/bun": "^1.3.0",
|
package/src/agent-guide.ts
CHANGED
|
@@ -53,7 +53,7 @@ export const PACKAGE_DOCS: readonly PackageDoc[] = [
|
|
|
53
53
|
{
|
|
54
54
|
package: '@rig-c/parts',
|
|
55
55
|
path: 'docs/DEPTH.md',
|
|
56
|
-
why: '
|
|
56
|
+
why: 'depth reference; unavailable in current direction',
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
package: '@rig-c/parts',
|
|
@@ -88,7 +88,7 @@ export const PACKAGE_DOCS: readonly PackageDoc[] = [
|
|
|
88
88
|
{
|
|
89
89
|
package: '@rig-c/core',
|
|
90
90
|
path: 'docs/FACE.md',
|
|
91
|
-
why: 'blink
|
|
91
|
+
why: 'blink and gaze in the accepted rig',
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
package: '@rig-c/core',
|
|
@@ -155,13 +155,13 @@ function createLink(label: string, path: string, anchor?: string): string {
|
|
|
155
155
|
* linked, because the package links below are exactly PACKAGE_DOCS.
|
|
156
156
|
*/
|
|
157
157
|
export const READ_FIRST = [
|
|
158
|
-
'1. **Before the interview**: INTERVIEW.md
|
|
159
|
-
'
|
|
160
|
-
`
|
|
161
|
-
'2. **Before `seethrough` and `assemble`**: SOURCE.md,
|
|
162
|
-
`
|
|
163
|
-
` ${createLink('
|
|
164
|
-
'
|
|
158
|
+
'1. **Before the interview**: INTERVIEW.md; CRAFT.md (waypoint defaults);',
|
|
159
|
+
' parts AUTHORING §3, *`config.json`, field by field*;',
|
|
160
|
+
` ${createLink('CHECKS.md', 'docs/CHECKS.md')} before a sign-off.`,
|
|
161
|
+
'2. **Before `seethrough` and `assemble`**: SOURCE.md, split/cut order:',
|
|
162
|
+
` ${createLink('bad-split reruns', 'docs/SOURCE.md', 're-run-first')},`,
|
|
163
|
+
` ${createLink('allowed cuts', 'docs/SOURCE.md', 'where-a-cut-is-allowed')};`,
|
|
164
|
+
' parts AUTHORING *See-through head-run source reading*, *Source before',
|
|
165
165
|
' scissors* and *Limbs: cut at their joints*.',
|
|
166
166
|
`3. **Before rigging**: ${createLink('CRAFT.md § For the gates', 'docs/CRAFT.md', 'for-the-gates-not-the-interview')}`,
|
|
167
167
|
' (G1–G9); core RIGGING and MOTION; parts AUTHORING §7, the bars `check` enforces.',
|
|
@@ -175,7 +175,9 @@ export const READ_FIRST = [
|
|
|
175
175
|
* rig-c/create#3 it is `rig-create interview --check`, which refuses every
|
|
176
176
|
* `null` answer by name, so the line names the command, not the doc reference.
|
|
177
177
|
*/
|
|
178
|
-
export const INTERVIEW_CHECK_LINE = '
|
|
178
|
+
export const INTERVIEW_CHECK_LINE = 'Run `rig-create interview --check` before interview sign-off: it names every `null` answer.';
|
|
179
|
+
|
|
180
|
+
export const REOPEN_EXCEPTION = 'Until create#493, agents may type `reopen` only from Review host raw export `act@4`: save nonempty `value.words` byte-for-byte to a verbatim file; `--source` names `actId`. Empty/missing words: STOP. Never supply words. `job fetch-act` rejects act@4.';
|
|
179
181
|
|
|
180
182
|
export const GUIDE_TEMPLATE = 'agent-guide.md';
|
|
181
183
|
|
|
@@ -198,12 +200,13 @@ function linkLine(label: string, href: string, why: string): string {
|
|
|
198
200
|
/** The text of AGENTS.md, from the template and the tables above. */
|
|
199
201
|
export function renderAgentGuide(): string {
|
|
200
202
|
const fills: Record<string, string> = {
|
|
201
|
-
RESUME_LINK: `[
|
|
203
|
+
RESUME_LINK: `[Resume](${createDocUrl(RESUME_LINK.path, RESUME_LINK.anchor)})`,
|
|
202
204
|
INTERVIEW_CHECK: INTERVIEW_CHECK_LINE,
|
|
205
|
+
REOPEN_EXCEPTION,
|
|
203
206
|
DERIVED_LINK: `[INTERVIEW.md § Derived answers](${createDocUrl(DERIVED_LINK.path, DERIVED_LINK.anchor)})`,
|
|
204
207
|
GATES_LINK: `[CRAFT.md G8](${createDocUrl(GATES_LINK.path, GATES_LINK.anchor)})`,
|
|
205
|
-
DRAFTS_LINK: `[
|
|
206
|
-
STAGES_LINK: `[
|
|
208
|
+
DRAFTS_LINK: `[Draft rigs](${createDocUrl(DRAFTS_LINK.path, DRAFTS_LINK.anchor)})`,
|
|
209
|
+
STAGES_LINK: `[Stages](${createDocUrl(STAGES_LINK.path, STAGES_LINK.anchor)})`,
|
|
207
210
|
LIFETIME_LINK: `[PROJECT.md § Data is split by lifetime](${createDocUrl(LIFETIME_LINK.path, LIFETIME_LINK.anchor)})`,
|
|
208
211
|
INTAKE_LINK: `[PROJECT.md § Advisory intake reports](${createDocUrl(INTAKE_LINK.path, INTAKE_LINK.anchor)})`,
|
|
209
212
|
CG_GATES_LINK: `[CHECKS.md § CG gates](${createDocUrl(CG_GATES_LINK.path, CG_GATES_LINK.anchor)})`,
|
package/src/choice-writers.ts
CHANGED
|
@@ -24,7 +24,13 @@ interview-answer <question> [<dir>] --set <path> --sha256 <shown sha> --by <huma
|
|
|
24
24
|
[--note-file <file>] [--source <location>] [--why-file <file> for a member override]
|
|
25
25
|
interview-decision <question> [<dir>] --by <agent> --reasoning-file <file>
|
|
26
26
|
--fragment <ask>=<JSON file>...
|
|
27
|
-
Retain the shown set first. Each ask is picked explicitly; no recommended option is preselected
|
|
27
|
+
Retain the shown set first. Each ask is picked explicitly; no recommended option is preselected.
|
|
28
|
+
To ask an answered question again, retain and register a new set id/path with
|
|
29
|
+
interview-options <question> --file <path>, then job open --question <question>
|
|
30
|
+
and ingest interview-answer <question> --from-review <actId>; history is kept.
|
|
31
|
+
--adopt: split-order projects adopt all choices; legacy-order projects may adopt
|
|
32
|
+
post choices at post-interview only. For full adoption, first adopt the split
|
|
33
|
+
stage order with a fresh parts/rigging interview (docs/INTERVIEW.md).`;
|
|
28
34
|
function usage(why: string): never { refuse('INTERVIEW_OPTIONS_USAGE', `interview: ${why}; ${CHOICE_HELP}`, USAGE_EXIT); }
|
|
29
35
|
interface Args { positional: string[]; one: Record<string,string>; many: Record<string,Map<string,string>>; adopt: boolean; }
|
|
30
36
|
function parse(args: string[], allowed: string[], repeat: string[] = []): Args {
|
|
@@ -97,7 +103,7 @@ export function interviewOptionsCommand(args: string[], now: number): string { r
|
|
|
97
103
|
const dir = resolve(opts.positional[0] ?? process.cwd()); const {file,project} = readProject(dir); const next = structuredClone(project);
|
|
98
104
|
const interview = isObject(next.interview) ? next.interview : null;
|
|
99
105
|
if (interview && interview.order === undefined && isObject(interview.post)) {
|
|
100
|
-
if (project.stage !== 'post-interview') refuse('INTERVIEW_CHOICE_INVALID', 'interview.post: advance to post-interview before
|
|
106
|
+
if (project.stage !== 'post-interview') refuse('INTERVIEW_CHOICE_INVALID', 'interview.post: for post-only choices, advance to post-interview before interview-options --adopt; for full adoption, first adopt the split stage order with a fresh parts/rigging interview (docs/INTERVIEW.md)');
|
|
101
107
|
if (interview.post.choices_adopted_at !== undefined) {
|
|
102
108
|
if (!Number.isFinite(Date.parse(String(interview.post.choices_adopted_at)))) refuse('INTERVIEW_CHOICE_INVALID', 'interview.post: restore the original valid choices_adopted_at');
|
|
103
109
|
return 'interview: post choices already adopted; original date preserved';
|