@remits/remits-cli 0.1.115 → 0.1.117
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 +14 -4
- package/index.js +1033 -58
- package/package.json +1 -1
- package/skills/remits-cli/SKILL.md +26 -1
- package/skills/remits-cli/references/command-reference.md +126 -4
- package/skills/remits-cli/references/component-resolution.md +64 -9
- package/skills/remits-cli/references/development-loop.md +128 -3
- package/skills/remits-cli/references/support-tickets.md +21 -0
package/package.json
CHANGED
|
@@ -60,6 +60,19 @@ reference named after it.
|
|
|
60
60
|
- **edit → stage → run, every time.** The platform executes whatever is in the staging cache at the
|
|
61
61
|
moment a run starts. Edit a file, run a test without `remits-cli components stage`, and the test runs
|
|
62
62
|
the OLD code. This is the single most common mistake. (`development-loop.md`)
|
|
63
|
+
- **Stage your WORKSET, not the whole repo: `remits-cli components stage --workset`.** It uploads only
|
|
64
|
+
the components git reports changed and makes the lane hold exactly them. A plain `components stage` is
|
|
65
|
+
a FULL SNAPSHOT — it puts every component in the repo into the lane, so "115 staged" tells a human
|
|
66
|
+
nothing about what you are working on, and every one of those entries shadows committed source until
|
|
67
|
+
it expires. Keep the full stage for a deliberate complete snapshot or a "what is stale here?" reset.
|
|
68
|
+
(`development-loop.md`)
|
|
69
|
+
- **Give each agent its own lane: `remits-cli workspace use --auto`.** Without a workspace you are in
|
|
70
|
+
the SHARED lane, where a full stage replaces what another agent is testing rather than merging with
|
|
71
|
+
it. (`component-resolution.md`)
|
|
72
|
+
- **On a variant branch, sync with `remits-cli components sync --safe`.** It dry-runs first and refuses
|
|
73
|
+
a plan that would write components this checkout did not change — which is what a branch that is
|
|
74
|
+
behind trunk produces, because it still physically carries old copies of files nobody touched.
|
|
75
|
+
(`component-integrity.md`, `branch-variants.md`)
|
|
63
76
|
- **`stage` is always safe. `components commit` on trunk is the most dangerous command in the CLI.**
|
|
64
77
|
It is not a convenience wrapper: it `git add -A`, commits, pushes, and then reconciles the whole
|
|
65
78
|
pushed repo into the live component database — creating, updating, renaming, and **hard-deleting**
|
|
@@ -84,6 +97,10 @@ reference named after it.
|
|
|
84
97
|
- **Resolution order is staged → variant → trunk, and each layers over the one beneath.** A populated
|
|
85
98
|
staging cache makes a committed variant look broken through any tokenized entry point; clear it before
|
|
86
99
|
verifying variant resolution. (`component-resolution.md`)
|
|
100
|
+
- **A lane's staged count is the OVERLAY, not your workset.** The overlay is every staged entry the lane
|
|
101
|
+
holds — what a run resolves. The workset is what git says you changed. A full stage makes them differ
|
|
102
|
+
by the size of the repo, and `--changed-only` merges, so it can never shrink an overlay it inherited.
|
|
103
|
+
`components status` prints all three numbers; so does the console. (`component-resolution.md`)
|
|
87
104
|
- **Host and data mode are two independent decisions.** `--base-url` picks the Remits host,
|
|
88
105
|
`--data-mode` picks the data segment on it. Neither implies the other. (`command-reference.md`)
|
|
89
106
|
- **`test run` ignores the stored session data lane.** It defaults to `test` even when `whoami` shows
|
|
@@ -104,6 +121,11 @@ reference named after it.
|
|
|
104
121
|
component (preferred, because it becomes regression protection) or a browser flow through
|
|
105
122
|
`remits-cli token`. "Just do it" and "that's fine, commit it" are not evidence. If you genuinely
|
|
106
123
|
cannot verify, say what you would need and ask. (`development-loop.md`)
|
|
124
|
+
- **For concrete user workflows, start a verification envelope before you edit.** `remits-cli verify
|
|
125
|
+
start --summary "..."` records the account/source/lane tuple and a manifest when you have one.
|
|
126
|
+
Stage, test, token, tool, and sync commands attach evidence automatically while the envelope is
|
|
127
|
+
active; finish from `remits-cli verify report`, which separates verified claims from missing or stale
|
|
128
|
+
evidence. (`development-loop.md`, `component-resolution.md`)
|
|
107
129
|
- **Read the component's `.meta.yml` before changing behavior.** Sidecar descriptions can be dated
|
|
108
130
|
decision records. Before changing a displayed value, helper, calculation, schema field, or prompt
|
|
109
131
|
contract, check the sidecar and either preserve its decision or explicitly supersede it.
|
|
@@ -139,11 +161,14 @@ reference named after it.
|
|
|
139
161
|
|
|
140
162
|
```bash
|
|
141
163
|
remits-cli whoami # account, user, branch, data mode, host for the NEXT tool call
|
|
142
|
-
remits-cli
|
|
164
|
+
remits-cli workspace use --auto # your own staging lane, named after this checkout
|
|
165
|
+
remits-cli components status # trunk or variant checkout, staging lane, workset vs overlay, who else is staging
|
|
143
166
|
remits-cli tools # which tools this account actually has (tools are per-account)
|
|
144
167
|
```
|
|
145
168
|
|
|
146
169
|
plus the repo's `account-info.json` → `resolution` block for the account's shape.
|
|
170
|
+
For a workflow-shaped request, also run `remits-cli verify start --summary "..."` once the target tuple
|
|
171
|
+
is understood, then keep that envelope active through stage/test/token/sync.
|
|
147
172
|
|
|
148
173
|
If any command returns 401, run `remits-cli auth` (with the same `--base-url` if you were targeting a
|
|
149
174
|
non-default host).
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
- [Hierarchy-scoped tool reads](#hierarchy-scoped-tool-reads)
|
|
16
16
|
- [Data Mode](#data-mode)
|
|
17
17
|
- [Command Reference](#command-reference)
|
|
18
|
+
- [Verification envelopes](#verification-envelopes)
|
|
19
|
+
- [Staging modes: workset vs full snapshot](#staging-modes-workset-vs-full-snapshot)
|
|
18
20
|
- [Prod banners and retryable failures](#prod-banners-and-retryable-failures)
|
|
19
21
|
|
|
20
22
|
## Getting Started
|
|
@@ -189,12 +191,12 @@ remits-cli status [--base-url URL] [--account-id ID] [--data-mode test|prod] [--
|
|
|
189
191
|
remits-cli whoami [--base-url URL] [--account-id ID] [--data-mode test|prod] [--json]
|
|
190
192
|
remits-cli listen [stop|status] [--foreground true] # compatibility alias
|
|
191
193
|
remits-cli data-mode [set test|prod]
|
|
192
|
-
remits-cli components stage [--branch <name>] [--workspace <name>] [--
|
|
194
|
+
remits-cli components stage [--workset | --changed-only] [--branch <name>] [--workspace <name>] [--empty-workset clear] [--data-mode test|prod] [--json|--verbose] # default = FULL SNAPSHOT of the repo; --workset = only what git says changed, lane reconciled to it
|
|
193
195
|
remits-cli workspace [show | use <name> | use --auto | clear]
|
|
194
196
|
remits-cli components status [--branch <name>] [--component-type <type>] [--component-id <id>] [--json|--verbose]
|
|
195
197
|
remits-cli components clear [--branch <name>] [--component-type <type>] [--component-id <id>] [--all] [--json|--verbose] # id alone scopes to one component when unambiguous (ids are type-local; add --component-type if the same id is staged in multiple families); no filter clears the whole branch scope; --all forces the full wipe
|
|
196
|
-
remits-cli components sync [--branch <name>] [--data-mode test|prod] [--force-tombstones] [--dry-run] [--summary] [--changed-only [--changed-since <ref>]] # gated; on trunk = full repo->DB reconcile, on a variant branch = ComponentVariant overlays only
|
|
197
|
-
remits-cli components commit [--message "msg"] [--data-mode test|prod] [--force-tombstones]
|
|
198
|
+
remits-cli components sync [--safe [--yes]] [--branch <name>] [--data-mode test|prod] [--force-tombstones] [--dry-run] [--summary] [--changed-only [--changed-since <ref>]] # gated; on trunk = full repo->DB reconcile, on a variant branch = ComponentVariant overlays only
|
|
199
|
+
remits-cli components commit [--safe] [--message "msg"] [--data-mode test|prod] [--force-tombstones] # --safe gates phase 2; it cannot un-push phase 1
|
|
198
200
|
remits-cli components branches [--json] # branches carrying committed variants, with counts + drift
|
|
199
201
|
remits-cli components branch <name> [--json] # one branch: overridden / added / removed, drift flags, subscribers
|
|
200
202
|
remits-cli components branch <name> --diff <componentId> --component-type <kind> [--json]
|
|
@@ -208,8 +210,86 @@ remits-cli token inspect --token <token|tokenKey|URL> # inspect
|
|
|
208
210
|
remits-cli tools [--branch <name>] [--data-mode test|prod] [--variant-branch <name|none>]
|
|
209
211
|
remits-cli tool --name <toolName> [--branch <name>] [--input "{...}"] [--data-mode test|prod] [--variant-branch <name|none>] [--timeout-ms 60000] [--async true --wait true]
|
|
210
212
|
remits-cli tool status --call-id <callId> [--data-mode test|prod]
|
|
213
|
+
remits-cli verify start --summary "..." [--manifest file.json] [--ticket ID]
|
|
214
|
+
remits-cli verify use <envelopeId>
|
|
215
|
+
remits-cli verify current
|
|
216
|
+
remits-cli verify clear
|
|
217
|
+
remits-cli verify show [--envelope ID] [--json]
|
|
218
|
+
remits-cli verify manifest --file file.json [--envelope ID]
|
|
219
|
+
remits-cli verify manifest --print [--envelope ID]
|
|
220
|
+
remits-cli verify attach --artifact path --label "..." [--envelope ID]
|
|
221
|
+
remits-cli verify attach --screenshot path --label "..." [--envelope ID]
|
|
222
|
+
remits-cli verify attach --note "..." [--envelope ID]
|
|
223
|
+
remits-cli verify browser-start --url URL [--label "..."]
|
|
224
|
+
remits-cli verify browser-step [--action click|fill|upload|reload|observe|...] [--target "..."] [--value "..."] [--url URL] [--label "..."]
|
|
225
|
+
remits-cli verify browser-snapshot [--url URL] [--label "..."]
|
|
226
|
+
remits-cli verify stage --workset
|
|
227
|
+
remits-cli verify test --test <id|name> [--names "case"]
|
|
228
|
+
remits-cli verify token --path <embeddablePathOrId>
|
|
229
|
+
remits-cli verify sync --safe
|
|
230
|
+
remits-cli verify tool --name <toolName> [--input "{...}"]
|
|
231
|
+
remits-cli verify status [--envelope ID]
|
|
232
|
+
remits-cli verify report [--envelope ID]
|
|
211
233
|
```
|
|
212
234
|
|
|
235
|
+
### Verification envelopes
|
|
236
|
+
|
|
237
|
+
Use a verification envelope for workflow-shaped work: concrete user journeys, browser-facing changes,
|
|
238
|
+
branch variants, subscriber/forked accounts, production-vs-test lane questions, support tickets, and
|
|
239
|
+
multi-agent work. Start it after you know the target account/branch/workspace/data-mode tuple and before
|
|
240
|
+
the first edit:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
remits-cli workspace use --auto
|
|
244
|
+
remits-cli components status
|
|
245
|
+
remits-cli verify start --summary "Hosted upload updates an existing profile" --manifest acceptance.json
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
An active envelope is stored in `./.remits-cli/verification/active`. Stage/test/token/tool/sync commands
|
|
249
|
+
attach evidence automatically while an envelope is active. The explicit wrappers do the same thing and
|
|
250
|
+
make the intent visible in terminal history:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
remits-cli verify stage --workset
|
|
254
|
+
remits-cli verify test --test "Adyen Import Recovery" --names "browser upload recovery"
|
|
255
|
+
remits-cli verify token --path /page/pricing-config --as-account 21 --data-mode test
|
|
256
|
+
remits-cli verify sync --safe
|
|
257
|
+
remits-cli verify report
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Existing commands also accept `--verify-envelope <id>` to attach to a specific envelope and
|
|
261
|
+
`--no-verify-envelope` to suppress automatic attachment for one command.
|
|
262
|
+
|
|
263
|
+
The manifest is the proof contract. It should name the world being exercised: repo account, host,
|
|
264
|
+
git/component branch, workspace, data mode, source layer, user journeys, artifacts and hashes, and the
|
|
265
|
+
evidence categories required before the final response may claim the work is done. If the manifest
|
|
266
|
+
cannot be written because the workflow is ambiguous, ask before implementation. For machine-gated report
|
|
267
|
+
requirements, prefer structured entries like `{"id":"actual_upload","packetType":"browser_step",
|
|
268
|
+
"category":"browser_session.actual_upload"}`. Plain strings work when they match a packet type or an
|
|
269
|
+
evidence category, but structured entries are clearer when several agents collect packets for one
|
|
270
|
+
envelope.
|
|
271
|
+
|
|
272
|
+
Common packet meanings:
|
|
273
|
+
|
|
274
|
+
| Packet | It proves | It does not prove by itself |
|
|
275
|
+
|---|---|---|
|
|
276
|
+
| `stage` | Which components were uploaded to the staging lane, including workset vs overlay | The requested behavior works |
|
|
277
|
+
| `component_status` | Which source world and lane are currently staged or clean | Any behavior was exercised |
|
|
278
|
+
| `test_run` | A Test component passed in the recorded account/branch/workspace/data lane | A hosted browser journey unless that Test actually drove it |
|
|
279
|
+
| `token_inspect` | A token was minted/inspected for a specific account, source layer, and lane | A user clicked through the page |
|
|
280
|
+
| `browser_session` / `browser_step` / `browser_snapshot` | The browser journey was opened or observed with named actions | Server-side persistence unless paired with assertions or follow-up state checks |
|
|
281
|
+
| `tool_call` | A platform tool ran in the recorded world and returned the recorded result | User-visible behavior unless the tool is the requested entry point |
|
|
282
|
+
| `sync_dry_run` | The planned durable writes and safety gates | Anything was written |
|
|
283
|
+
| `sync_mutation` | Durable source moved to trunk or variant and returned a sync SHA | The committed source behaves after staging is cleared |
|
|
284
|
+
| `artifact` | A file/screenshot/note exists with path, size, and sha256 | The workflow consumed it |
|
|
285
|
+
|
|
286
|
+
Final claims should come from `remits-cli verify report`. Treat `Verified` as the acceptance boundary.
|
|
287
|
+
`Additional evidence` is useful handoff context, but it does not satisfy a missing required packet unless
|
|
288
|
+
the report lists it under `Verified`. If the report says `partially_verified`, stale, or missing evidence,
|
|
289
|
+
say that plainly instead of widening the claim. In particular, staged proof is not committed variant/trunk
|
|
290
|
+
proof, a token is not browser proof, and a direct DOM or Alpine state mutation is not the same as a user
|
|
291
|
+
click/upload/reload flow.
|
|
292
|
+
|
|
213
293
|
For tests specifically:
|
|
214
294
|
- If `--data-mode` is omitted, `remits-cli test run` uses `test` and sends `dataModeSource:"cliDefault"`.
|
|
215
295
|
An explicit `--data-mode prod` sends `dataModeSource:"explicitFlag"` so production test runs are
|
|
@@ -251,8 +331,50 @@ For tests specifically:
|
|
|
251
331
|
- `--names-only` — dry-run and print only `BUCKET type:id name` lines for the planned writes, then stop
|
|
252
332
|
without writing overlays.
|
|
253
333
|
|
|
334
|
+
- `--safe` — the NAME for that combination, and the recommended agent path on a variant branch. It
|
|
335
|
+
expands to `--summary --changed-only --fail-on-errors --fail-on-removed`, resolves `--changed-since`
|
|
336
|
+
from this branch's merge base with trunk when you did not name one (local refs only — it never runs
|
|
337
|
+
an implicit `git fetch`, and refuses with the fetch command when nothing local can answer), and
|
|
338
|
+
prints the planned writes before mutating unless `--yes` is passed. On TRUNK there is no plan to
|
|
339
|
+
gate, so it states what a trunk reconcile does (every row rewritten from the repo; any live component
|
|
340
|
+
missing from the repo DELETED) and requires `--yes`. It does not override a narrower
|
|
341
|
+
`--expected-removed`.
|
|
342
|
+
|
|
254
343
|
A good default for an unattended promotion is:
|
|
255
|
-
`remits-cli components sync --
|
|
344
|
+
`remits-cli components sync --safe`
|
|
345
|
+
|
|
346
|
+
When `--changed-only` refuses a plan far larger than your changed set, the usual cause is a branch that
|
|
347
|
+
is BEHIND trunk: it still physically carries old copies of files nobody on it touched, and a variant
|
|
348
|
+
sync turns each of those into an unrelated override. The refusal says so. Merge trunk in, push, re-run.
|
|
349
|
+
|
|
350
|
+
### Staging modes: workset vs full snapshot
|
|
351
|
+
|
|
352
|
+
`components stage` reports three numbers, and they answer three different questions:
|
|
353
|
+
|
|
354
|
+
| Number | Question |
|
|
355
|
+
|---|---|
|
|
356
|
+
| **workset** | how many components git reports this working tree changed |
|
|
357
|
+
| **submitted** | how many this command uploaded |
|
|
358
|
+
| **overlay** | how many staged entries the lane now holds — **what a run resolves** |
|
|
359
|
+
|
|
360
|
+
| Mode | Uploads | Lane afterwards |
|
|
361
|
+
|---|---|---|
|
|
362
|
+
| `components stage` (default) | the whole repository manifest | reconciled to the whole repo — a FULL SNAPSHOT |
|
|
363
|
+
| `components stage --workset` | only the git-changed components | reconciled to exactly those |
|
|
364
|
+
| `components stage --changed-only` | only the git-changed components | merged; earlier entries are left in place |
|
|
365
|
+
|
|
366
|
+
`--workset` is the iteration mode. `--changed-only` keeps its long-standing merge semantics, so it cannot
|
|
367
|
+
shrink a lane inherited from an earlier full stage; the command warns when it retains entries that way.
|
|
368
|
+
`--changed-only --replace-lane` is the explicit spelling of `--workset`.
|
|
369
|
+
|
|
370
|
+
An empty workset never clears a lane: `--workset` on a clean tree stages nothing and leaves the lane as
|
|
371
|
+
it is. `--empty-workset clear` opts into the clear; `components clear --all` is the direct way.
|
|
372
|
+
|
|
373
|
+
A deleted component file cannot be represented in Redis staging — clearing a staged entry falls back to
|
|
374
|
+
the committed row, so the component still resolves. The command reports those changes as NOT
|
|
375
|
+
REPRESENTABLE. On a non-trunk variant branch, prove a deletion through
|
|
376
|
+
`components sync --dry-run --summary --fail-on-errors`; on trunk there is no dry-run plan, so use the
|
|
377
|
+
full pre-sync safety check before any mutating reconcile.
|
|
256
378
|
|
|
257
379
|
### Prod banners and retryable failures
|
|
258
380
|
|
|
@@ -10,11 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
- [Component Resolution: Staging Cache vs DB (which "version" actually runs)](#component-resolution-staging-cache-vs-db-which-version-actually-runs)
|
|
12
12
|
- [The three source layers + the compile cache](#the-three-source-layers--the-compile-cache)
|
|
13
|
+
- [Verification envelopes record the source layer](#verification-envelopes-record-the-source-layer)
|
|
13
14
|
- [Staging cache key format](#staging-cache-key-format)
|
|
14
15
|
- [How the platform picks staged vs DB (the compile signature)](#how-the-platform-picks-staged-vs-db-the-compile-signature)
|
|
15
16
|
- [When staged overrides apply](#when-staged-overrides-apply)
|
|
16
17
|
- [Diagnosing which version is in play](#diagnosing-which-version-is-in-play)
|
|
17
18
|
- [Working alongside other agents: the staging WORKSPACE](#working-alongside-other-agents-the-staging-workspace)
|
|
19
|
+
- [A lane holds an OVERLAY; your workset is a different number](#a-lane-holds-an-overlay-your-workset-is-a-different-number)
|
|
18
20
|
- [Stage / sync / clear with remits-cli](#stage--sync--clear-with-remits-cli)
|
|
19
21
|
- [Stale after sync / commit (the in-memory compile cache)](#stale-after-sync--commit-the-in-memory-compile-cache)
|
|
20
22
|
|
|
@@ -47,6 +49,18 @@ Plus the compile cache:
|
|
|
47
49
|
cache of the parsed closure, keyed by `(componentId, type, compileSignature)`. This is why a change that
|
|
48
50
|
is correctly in the DB can still execute stale on a running instance — see "Stale after sync" below.
|
|
49
51
|
|
|
52
|
+
### Verification envelopes record the source layer
|
|
53
|
+
|
|
54
|
+
When a verification envelope is active, `components stage`, `components status`, `test run`, `token`,
|
|
55
|
+
`tool`, and `components sync` attach evidence packets with the branch/workspace/staging lane and the best
|
|
56
|
+
source-layer facts the command observed. A staged test packet is proof of the staged layer; a sync packet
|
|
57
|
+
is proof of a source transition; a token packet is proof of the browser token's resolution tuple. Those
|
|
58
|
+
are not interchangeable.
|
|
59
|
+
|
|
60
|
+
Use `remits-cli verify report` before summarizing the work. It will naturally say when the evidence only
|
|
61
|
+
covered staged source, when committed variant/trunk proof is missing, or when evidence became stale after
|
|
62
|
+
the git head, overlay, or platform sync moved.
|
|
63
|
+
|
|
50
64
|
### Staging cache key format
|
|
51
65
|
|
|
52
66
|
```
|
|
@@ -184,19 +198,60 @@ commit write `ComponentVariant` overlays for a branch nobody subscribes to).
|
|
|
184
198
|
- Every stage / test run / token / clear prints its `Staging lane:` — if a change seems to have had no
|
|
185
199
|
effect, check that line FIRST. A mismatched lane resolves committed source, which looks identical to
|
|
186
200
|
"the stage did not work".
|
|
187
|
-
- `remits-cli components status` lists every lane staged on the branch
|
|
188
|
-
agent is working alongside you.
|
|
201
|
+
- `remits-cli components status` lists every lane staged on the branch AND every lane on the account, so
|
|
202
|
+
you can see whether another agent is working alongside you. Each row names its world (trunk or variant
|
|
203
|
+
branch), its overlay, its workset where known, and whether it is the SHARED lane.
|
|
189
204
|
- `remits-cli components clear --all` is scoped to YOUR lane and never touches another agent's.
|
|
190
205
|
|
|
206
|
+
### A lane holds an OVERLAY; your workset is a different number
|
|
207
|
+
|
|
208
|
+
This is the distinction that decides whether a lane is legible to anyone but you.
|
|
209
|
+
|
|
210
|
+
- The **overlay** is every staged entry the lane currently holds. It is what a CLI-scoped run resolves,
|
|
211
|
+
and it is the number the console shows as "staged".
|
|
212
|
+
- The **workset** is what git reports this working tree changed. It is the work in flight.
|
|
213
|
+
|
|
214
|
+
A plain `components stage` is a FULL SNAPSHOT: it uploads the whole repository manifest and reconciles
|
|
215
|
+
the lane to it, so on a 115-component repo the overlay is 115 whether you edited five components or all
|
|
216
|
+
of them. That is safe — it is a complete, known state — but it is a poor signal. Everyone reading the
|
|
217
|
+
console sees a lane that looks like 115 edits in flight, and all 115 entries shadow committed source for
|
|
218
|
+
every run in that lane until they expire.
|
|
219
|
+
|
|
220
|
+
`components stage --workset` uploads only the changed components and reconciles the lane to exactly
|
|
221
|
+
them, so the overlay IS the workset. That is the mode to iterate in.
|
|
222
|
+
|
|
223
|
+
`components stage --changed-only` uploads the same narrow set but MERGES: it deliberately leaves every
|
|
224
|
+
other staged entry alone. So it can never shrink a lane inherited from an earlier full snapshot — the
|
|
225
|
+
overlay stays at 115 while you work on seven. The command warns when entries are retained that way.
|
|
226
|
+
|
|
227
|
+
Every count is `unknown` rather than `0` when it cannot be established. "git could not answer" and "git
|
|
228
|
+
says nothing changed" are different facts and only one of them is a number.
|
|
229
|
+
|
|
230
|
+
**Deletion is not expressible here.** There is no staged removal: clearing a staged entry falls back to
|
|
231
|
+
the committed row, so the component still resolves. `stage --workset` reports a deleted component file as
|
|
232
|
+
NOT REPRESENTABLE rather than quietly omitting it. On a non-trunk variant branch, prove a deletion
|
|
233
|
+
through the durable variant plan — `remits-cli components sync --dry-run --summary --fail-on-errors` —
|
|
234
|
+
and read the removed/tombstone bucket. On trunk there is no dry-run plan; a deletion is only proven by
|
|
235
|
+
the full pre-sync safety check before a mutating reconcile.
|
|
236
|
+
|
|
237
|
+
**An empty workset never clears the lane.** `--workset` on a clean tree stages nothing and leaves the
|
|
238
|
+
lane as it is; reconciling to an empty manifest would delete the overlay the next run depends on.
|
|
239
|
+
Clearing stays explicit (`components clear --all`), or `--empty-workset clear` if that really is what you
|
|
240
|
+
meant.
|
|
241
|
+
|
|
191
242
|
### Stage / sync / clear with remits-cli
|
|
192
243
|
|
|
193
|
-
- `remits-cli components stage`
|
|
194
|
-
|
|
195
|
-
- `remits-cli components stage
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
- `remits-cli components
|
|
199
|
-
|
|
244
|
+
- `remits-cli components stage --workset` stages exactly what git says this working tree changed and
|
|
245
|
+
reconciles the lane to it. **The normal iteration mode.**
|
|
246
|
+
- `remits-cli components stage` stages the whole repository manifest (a full snapshot). Use it for a
|
|
247
|
+
deliberate complete snapshot, when a `.meta.yml` key you deleted must be reconciled against the whole
|
|
248
|
+
repo, or as a "what is stale in here?" reset — then clear when you are done.
|
|
249
|
+
- `remits-cli components stage --changed-only` stages just the changed components and does NOT reconcile,
|
|
250
|
+
so entries it did not mention are left alone rather than deleted. Kept as-is for compatibility;
|
|
251
|
+
`--workset` is the same narrow upload with the lane reconciled.
|
|
252
|
+
- `remits-cli components status` shows which branch/variant world the checkout resolves, whether the lane
|
|
253
|
+
is shared, the overlay/workset/retained split with the last stage's mode, plus staged entries, staged
|
|
254
|
+
fields, aliases, hashes, and TTLs. Use `--json` or `--verbose` for the full staged-entry payload.
|
|
200
255
|
- **A full `stage` makes the `.meta.yml` AUTHORITATIVE.** Staging layers a payload over what is already
|
|
201
256
|
staged, which is what lets `mcp_component_edit` write a single field without blanking the others. But a
|
|
202
257
|
`remits-cli components stage` sends the whole sidecar, so a key you DELETE from a sidecar is removed from
|
|
@@ -10,17 +10,21 @@
|
|
|
10
10
|
|
|
11
11
|
- [Two Workflows](#two-workflows)
|
|
12
12
|
- [Test Mode vs Prod Mode](#test-mode-vs-prod-mode)
|
|
13
|
+
- [Verification Envelopes](#verification-envelopes)
|
|
13
14
|
- [Development Workflow](#development-workflow)
|
|
14
15
|
- [The Golden Rule: Writing Code Is Not Finishing the Job](#the-golden-rule-writing-code-is-not-finishing-the-job)
|
|
15
16
|
- [The Development Fast Loop](#the-development-fast-loop)
|
|
16
17
|
- [Step 1: Understand the Request](#step-1-understand-the-request)
|
|
17
18
|
- [Step 2: Make the Change](#step-2-make-the-change)
|
|
18
19
|
- [Step 3: Stage to Platform](#step-3-stage-to-platform)
|
|
20
|
+
- [Stage your workset, not the whole repo](#stage-your-workset-not-the-whole-repo)
|
|
21
|
+
- [Three numbers, three questions](#three-numbers-three-questions)
|
|
19
22
|
- [Step 4: Verify the Change](#step-4-verify-the-change)
|
|
20
23
|
- [Step 5: Iterate If Needed](#step-5-iterate-if-needed)
|
|
21
24
|
- [Step 6: Update Documentation](#step-6-update-documentation)
|
|
22
25
|
- [Temporary Experiment Workflow](#temporary-experiment-workflow)
|
|
23
26
|
- [Step 7: Commit and Durable Sync](#step-7-commit-and-durable-sync)
|
|
27
|
+
- [Verifying the COMMITTED variant, not your staging](#verifying-the-committed-variant-not-your-staging)
|
|
24
28
|
- [Step 8: Close the Ticket](#step-8-close-the-ticket)
|
|
25
29
|
- [User Confirmation Preferences](#user-confirmation-preferences)
|
|
26
30
|
|
|
@@ -63,6 +67,36 @@ The right model is:
|
|
|
63
67
|
|
|
64
68
|
Never treat "it looks right in prod data inspection" as sufficient proof that a code change is verified.
|
|
65
69
|
|
|
70
|
+
## Verification Envelopes
|
|
71
|
+
|
|
72
|
+
For a concrete user workflow, browser-facing change, branch-variant release, support ticket, or any loop
|
|
73
|
+
where earlier manual testing found a gap, start a verification envelope before editing:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
remits-cli verify start --summary "Hosted upload updates an existing profile" --manifest acceptance.json
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The envelope records the account, host, data lane, branch, workspace, git heads, staging lane, and the
|
|
80
|
+
acceptance manifest. It is mirrored locally under `.remits-cli/verification/<envelopeId>/` and becomes
|
|
81
|
+
active for this checkout. While active, `components stage`, `components status`, `test run`, `token`,
|
|
82
|
+
`token inspect`, `tool`, and `components sync` attach evidence packets automatically; pass
|
|
83
|
+
`--verify-envelope <id>` to name one explicitly or `--no-verify-envelope` when a command should not be
|
|
84
|
+
attached.
|
|
85
|
+
|
|
86
|
+
Use the wrappers when you want the intent to be unmistakable:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
remits-cli verify stage --workset
|
|
90
|
+
remits-cli verify test --test "Suite" --names "case name"
|
|
91
|
+
remits-cli verify token --path /page/example
|
|
92
|
+
remits-cli verify sync --safe
|
|
93
|
+
remits-cli verify attach --artifact sample.zip --label "user supplied ZIP"
|
|
94
|
+
remits-cli verify report
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The report is the final-response source. It separates verified claims, missing evidence, stale packets,
|
|
98
|
+
and the source/account/lane tuple, so do not replace it with a generic "verified" sentence.
|
|
99
|
+
|
|
66
100
|
## Development Workflow
|
|
67
101
|
|
|
68
102
|
### The Golden Rule: Writing Code Is Not Finishing the Job
|
|
@@ -121,6 +155,10 @@ runs resolve and what a sync writes. If `account-info.json` carries a `component
|
|
|
121
155
|
variants of these components exist: editing an origin component will drift them, so check
|
|
122
156
|
`remits-cli components branches` before changing shared code. See `branch-variants.md`.
|
|
123
157
|
|
|
158
|
+
If the request names a journey or acceptance behavior, start the envelope here, after the target tuple is
|
|
159
|
+
understood and before editing. A manifest can be lightweight JSON; the point is that the required
|
|
160
|
+
evidence is durable before the proof is collected.
|
|
161
|
+
|
|
124
162
|
#### Step 2: Make the Change
|
|
125
163
|
Edit component files under `components/`. This is local file editing — the platform doesn't know about your changes yet.
|
|
126
164
|
|
|
@@ -174,10 +212,63 @@ overlay instead of pruning cleanly.
|
|
|
174
212
|
#### Step 3: Stage to Platform
|
|
175
213
|
|
|
176
214
|
```bash
|
|
177
|
-
remits-cli
|
|
215
|
+
remits-cli workspace use --auto # once per checkout: your own lane
|
|
216
|
+
remits-cli components stage --workset # every edit: stage what you changed
|
|
178
217
|
```
|
|
179
218
|
|
|
180
|
-
This uploads your local
|
|
219
|
+
This uploads your local component changes to the platform's staging cache (Redis, 240-minute TTL). It does NOT commit anything. The platform cannot see your local edits until you stage them.
|
|
220
|
+
|
|
221
|
+
##### Stage your workset, not the whole repo
|
|
222
|
+
|
|
223
|
+
There are three stage modes, and the difference decides what a run in your lane resolves and what a
|
|
224
|
+
human watching the console sees:
|
|
225
|
+
|
|
226
|
+
| Command | What it uploads | What the lane holds afterwards |
|
|
227
|
+
|---|---|---|
|
|
228
|
+
| `components stage --workset` | only the components git reports changed | **exactly those** — the lane is reconciled to your workset |
|
|
229
|
+
| `components stage` | the whole repository manifest | **every component in the repo** (a full snapshot) |
|
|
230
|
+
| `components stage --changed-only` | only the changed components | the changed ones **merged into whatever was already there** |
|
|
231
|
+
|
|
232
|
+
**Use `--workset` for normal iteration.** A full stage is correct and safe, but on a real repository it
|
|
233
|
+
puts a hundred-plus components into your lane, and every one of them then shadows committed source for
|
|
234
|
+
any run in that lane until it expires. A human looking at `/admin/platforms` sees "115 staged" and cannot
|
|
235
|
+
tell whether you edited 115 components or five.
|
|
236
|
+
|
|
237
|
+
`--changed-only` MERGES. It cannot shrink a lane it inherited from an earlier full stage, so a lane can
|
|
238
|
+
sit at 115 overlay entries while you are working on seven. The command warns when that happens; the fix
|
|
239
|
+
is `--workset` (or `components clear --all` once, then keep using `--workset`).
|
|
240
|
+
|
|
241
|
+
**When a full stage is the right answer:**
|
|
242
|
+
|
|
243
|
+
- you deliberately want a complete snapshot of the repo in the lane;
|
|
244
|
+
- you changed a `.meta.yml` sidecar and want removed keys reconciled against the whole repo;
|
|
245
|
+
- you cannot tell what is stale in the lane and want a clean, known state (then `components clear --all`
|
|
246
|
+
when you are done).
|
|
247
|
+
|
|
248
|
+
**An empty workset never clears your lane.** `--workset` on a clean working tree stages nothing and
|
|
249
|
+
leaves the lane alone — reconciling to an empty manifest would delete the overlay your next test run
|
|
250
|
+
depends on. Clearing stays explicit: `components clear --all`.
|
|
251
|
+
|
|
252
|
+
**Deleting a component file cannot be verified by staging.** There is no staged "removal": clearing a
|
|
253
|
+
staged entry falls back to the committed row, so the component still resolves. `stage --workset` reports
|
|
254
|
+
those changes as NOT REPRESENTABLE.
|
|
255
|
+
|
|
256
|
+
On a non-trunk variant branch, prove the removal through the durable variant plan:
|
|
257
|
+
`remits-cli components sync --dry-run --summary --fail-on-errors` and read the removed/tombstone bucket.
|
|
258
|
+
On trunk there is no dry-run plan; treat deletion as a high-risk durable reconcile and pass the full
|
|
259
|
+
pre-sync safety check before running any mutating sync.
|
|
260
|
+
|
|
261
|
+
##### Three numbers, three questions
|
|
262
|
+
|
|
263
|
+
`components stage` and `components status` report all three, and so does the admin console. They are not
|
|
264
|
+
interchangeable:
|
|
265
|
+
|
|
266
|
+
- **workset** — components git reports this working tree changed. The work in flight.
|
|
267
|
+
- **submitted** — what this command uploaded.
|
|
268
|
+
- **overlay** — every staged entry the lane now holds. **This is what a run resolves.**
|
|
269
|
+
|
|
270
|
+
A missing answer is printed as `unknown`, never as `0`: "git could not answer" and "git says nothing
|
|
271
|
+
changed" are different facts and only one of them is a number.
|
|
181
272
|
|
|
182
273
|
**THE STAGE-BEFORE-RUN RULE:** You MUST run `remits-cli components stage` after EVERY file edit and BEFORE any test run or verification. The platform executes whatever version is in the staging cache at the moment the test starts. If you edit a file and run a test without staging first, the test runs the OLD code — not your changes. This is the single most common mistake. Never skip staging. The sequence is always: **edit → stage → run**.
|
|
183
274
|
|
|
@@ -310,13 +401,16 @@ Redis cache can affect later test/tool runs, so always clear it after restoring
|
|
|
310
401
|
|
|
311
402
|
```bash
|
|
312
403
|
# make temporary local edit
|
|
313
|
-
remits-cli components stage
|
|
404
|
+
remits-cli components stage --workset
|
|
314
405
|
remits-cli test run --test <id-or-name> --names "<case name>"
|
|
315
406
|
git restore <file>
|
|
316
407
|
remits-cli components clear --all
|
|
317
408
|
remits-cli components status
|
|
318
409
|
```
|
|
319
410
|
|
|
411
|
+
With `--workset` the restore-and-clear is belt and braces rather than the only thing standing between
|
|
412
|
+
the experiment and a later run: the lane only ever held the component you were experimenting on.
|
|
413
|
+
|
|
320
414
|
For narrower cleanup when only one staged component should be cleared:
|
|
321
415
|
|
|
322
416
|
```bash
|
|
@@ -352,10 +446,41 @@ IDs or when unexpected deletes/renumbers are present.
|
|
|
352
446
|
Only after those checks pass, and only when the user intends to promote the repo to the platform database:
|
|
353
447
|
|
|
354
448
|
```bash
|
|
449
|
+
# On a VARIANT branch — the recommended path. Dry-runs first and refuses a surprising plan.
|
|
450
|
+
remits-cli components sync --safe
|
|
451
|
+
git pull --ff-only origin <branch>
|
|
452
|
+
|
|
453
|
+
# On TRUNK — there is no plan to gate, so --safe explains what a trunk reconcile does and needs --yes.
|
|
355
454
|
remits-cli components sync
|
|
356
455
|
git pull --ff-only origin <branch>
|
|
357
456
|
```
|
|
358
457
|
|
|
458
|
+
`--safe` expands to `--summary --changed-only --fail-on-errors --fail-on-removed`, resolves the
|
|
459
|
+
comparison base from this branch's merge base with trunk when you did not pass `--changed-since`, and
|
|
460
|
+
prints the planned writes before mutating unless you pass `--yes`. It refuses when the plan would write
|
|
461
|
+
components this checkout did not change — which is exactly what a branch that is BEHIND trunk produces,
|
|
462
|
+
because it still physically carries old copies of files nobody on it touched, and a variant sync turns
|
|
463
|
+
each of those into an unrelated override. When it refuses that way, merge trunk into your branch, push,
|
|
464
|
+
and re-run the same command.
|
|
465
|
+
|
|
466
|
+
When a removal is intended, name it rather than disabling the gate:
|
|
467
|
+
|
|
468
|
+
```bash
|
|
469
|
+
remits-cli components sync --safe --expected-removed action:50
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
`--force-tombstones` stays explicit and human-owned. Never pass it to get past a refusal.
|
|
473
|
+
|
|
474
|
+
##### Verifying the COMMITTED variant, not your staging
|
|
475
|
+
|
|
476
|
+
After a sync, staged entries still win for CLI-scoped runs, so a test that passes may be testing your
|
|
477
|
+
staging rather than what you just committed. Clear the lane first:
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
remits-cli components clear --all
|
|
481
|
+
remits-cli test run --test <id-or-name> --as-account <subscriber-id>
|
|
482
|
+
```
|
|
483
|
+
|
|
359
484
|
`remits-cli components sync` is the authoritative platform-sync step. It does not perform local git operations,
|
|
360
485
|
and it is capable of reconciling creates/deletes/renames from the remote repository into the database. Treat it
|
|
361
486
|
as a gated promote/reconciliation command, not as an exploratory command or fallback.
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
- [Before you edit anything: where you are, and whether you may](#before-you-edit-anything-where-you-are-and-whether-you-may)
|
|
18
18
|
- [Your account's process is binding, and it is already in your brief](#your-accounts-process-is-binding-and-it-is-already-in-your-brief)
|
|
19
19
|
- [Some of that process is enforced, not requested](#some-of-that-process-is-enforced-not-requested)
|
|
20
|
+
- [Verification envelopes on tickets](#verification-envelopes-on-tickets)
|
|
20
21
|
- [Seeing the queue as a human does](#seeing-the-queue-as-a-human-does)
|
|
21
22
|
- [Agent components are workers too](#agent-components-are-workers-too)
|
|
22
23
|
- [Moving a ticket through its lifecycle](#moving-a-ticket-through-its-lifecycle)
|
|
@@ -191,6 +192,26 @@ start.
|
|
|
191
192
|
`--data-mode test` registers a fixture agent instead, which will never be routed a production ticket —
|
|
192
193
|
use it only when you are deliberately testing the routing itself.
|
|
193
194
|
|
|
195
|
+
### Verification envelopes on tickets
|
|
196
|
+
|
|
197
|
+
For ticket work that changes component behavior, especially browser workflows, branch variants, release
|
|
198
|
+
gates, or a previously failed manual loop, start an envelope tied to the ticket:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
remits-cli verify start --ticket 22454 --summary "Fix hosted upload recovery"
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Keep it active while you stage, run Tests, mint browser tokens, call tools, and sync. Those commands
|
|
205
|
+
attach evidence packets to the platform envelope and mirror them locally under `.remits-cli/verification/`.
|
|
206
|
+
Before completing or handing off the ticket, run:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
remits-cli verify report
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Use that output in the ticket update. It names what was verified, what is still missing, and whether the
|
|
213
|
+
proof covered staged source or committed source.
|
|
214
|
+
|
|
194
215
|
### If you are the worker
|
|
195
216
|
|
|
196
217
|
You know you are one when `REMITS_SUPPORT_TICKET_ID` is set in your environment. Your whole job is
|