@remits/remits-cli 0.1.114 → 0.1.116
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 +17 -7
- package/index.js +1112 -84
- package/package.json +1 -1
- package/skills/remits-cli/SKILL.md +43 -2
- package/skills/remits-cli/references/account-targeting.md +12 -3
- package/skills/remits-cli/references/agent-sessions.md +5 -1
- package/skills/remits-cli/references/branch-variants.md +20 -1
- package/skills/remits-cli/references/command-reference.md +52 -7
- package/skills/remits-cli/references/component-integrity.md +6 -1
- package/skills/remits-cli/references/component-resolution.md +64 -10
- package/skills/remits-cli/references/development-loop.md +147 -5
- package/skills/remits-cli/references/investigation.md +4 -1
- package/skills/remits-cli/references/support-tickets.md +101 -7
- package/skills/remits-cli/references/tool-reference.md +1 -1
- package/skills/remits-cli/references/troubleshooting.md +1 -1
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**
|
|
@@ -76,11 +89,24 @@ reference named after it.
|
|
|
76
89
|
- **Ask which world your checkout resolves before you run anything:** `remits-cli components status`.
|
|
77
90
|
A trunk checkout and a variant-branch checkout differ on both ends of the loop — what a run resolves
|
|
78
91
|
and what a sync writes. Do not infer it from the branch name. (`branch-variants.md`)
|
|
92
|
+
- **Start from a steady git baseline before the first edit.** Run `git fetch origin`; confirm
|
|
93
|
+
`git log origin/<branch>..<branch>` and `git log <branch>..origin/<branch>` are both empty; then run
|
|
94
|
+
`remits-cli components status`. On a variant branch also run `remits-cli components promotion --branch
|
|
95
|
+
<branch>`. A workspace isolates staging, not the commit your files are based on. (`development-loop.md`,
|
|
96
|
+
`branch-variants.md`)
|
|
79
97
|
- **Resolution order is staged → variant → trunk, and each layers over the one beneath.** A populated
|
|
80
98
|
staging cache makes a committed variant look broken through any tokenized entry point; clear it before
|
|
81
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`)
|
|
82
104
|
- **Host and data mode are two independent decisions.** `--base-url` picks the Remits host,
|
|
83
105
|
`--data-mode` picks the data segment on it. Neither implies the other. (`command-reference.md`)
|
|
106
|
+
- **`test run` ignores the stored session data lane.** It defaults to `test` even when `whoami` shows
|
|
107
|
+
the session parked on prod; production Test runs require explicit prod provenance (`--data-mode prod`)
|
|
108
|
+
or Test source declaring `dataMode 'prod'` / `[dataMode:'prod']`. Check returned `dataModeSource`
|
|
109
|
+
when auditing a run. (`command-reference.md`)
|
|
84
110
|
- **A tool's `dataMode` input never widens the lane.** It may narrow `prod` → `test`, never escalate
|
|
85
111
|
`test` → `prod`. The response's `dataMode` is the truth, not your input. To reach prod data, pass
|
|
86
112
|
`--data-mode prod` on the command line. (`account-targeting.md`)
|
|
@@ -95,6 +121,10 @@ reference named after it.
|
|
|
95
121
|
component (preferred, because it becomes regression protection) or a browser flow through
|
|
96
122
|
`remits-cli token`. "Just do it" and "that's fine, commit it" are not evidence. If you genuinely
|
|
97
123
|
cannot verify, say what you would need and ask. (`development-loop.md`)
|
|
124
|
+
- **Read the component's `.meta.yml` before changing behavior.** Sidecar descriptions can be dated
|
|
125
|
+
decision records. Before changing a displayed value, helper, calculation, schema field, or prompt
|
|
126
|
+
contract, check the sidecar and either preserve its decision or explicitly supersede it.
|
|
127
|
+
(`development-loop.md`)
|
|
98
128
|
- **Read the account's `resolution` block before acting on it** — `role`, `type`,
|
|
99
129
|
`resolvedDatabaseName`, `relationships`. More than one relationship means the account can legitimately
|
|
100
130
|
resolve differently depending on the path a request travelled. Never infer an account's shape from its
|
|
@@ -111,6 +141,12 @@ reference named after it.
|
|
|
111
141
|
- **Reading and investigating are parallel-safe; editing one account's repository is exclusive**, via a
|
|
112
142
|
lease. A refusal is not an error — carry on read-only and hand off with `ticket progress --next-step`.
|
|
113
143
|
Never wait or poll for a lease. (`support-tickets.md`)
|
|
144
|
+
- **A brief's `## Rules you will be held to` section is ENFORCED, not requested.** The platform refuses
|
|
145
|
+
the verb and the message says what to do instead — act on that sentence rather than retrying or
|
|
146
|
+
looking for another door. A `[require]` rule needs a person; hand off. (`support-tickets.md`)
|
|
147
|
+
- **`components commit` takes a short landing lease on `(account, branch)`.** Refused means somebody else
|
|
148
|
+
is landing right now — keep staging and iterating, which is lane-isolated, and retry in a minute.
|
|
149
|
+
Never loop on it. (`development-loop.md`)
|
|
114
150
|
- **If something looks wrong, stop — do not paper over it.** Unexpected deletes, creates, renames,
|
|
115
151
|
uniqueness errors, id drift, or a 500 from the platform: stop, preserve the session log and tool
|
|
116
152
|
responses, and escalate. Never create replacement components to make ids line up, and never discover
|
|
@@ -120,7 +156,8 @@ reference named after it.
|
|
|
120
156
|
|
|
121
157
|
```bash
|
|
122
158
|
remits-cli whoami # account, user, branch, data mode, host for the NEXT tool call
|
|
123
|
-
remits-cli
|
|
159
|
+
remits-cli workspace use --auto # your own staging lane, named after this checkout
|
|
160
|
+
remits-cli components status # trunk or variant checkout, staging lane, workset vs overlay, who else is staging
|
|
124
161
|
remits-cli tools # which tools this account actually has (tools are per-account)
|
|
125
162
|
```
|
|
126
163
|
|
|
@@ -139,7 +176,11 @@ repo's `account-info.json`. `cli-state.md` maps every remaining question to its
|
|
|
139
176
|
|
|
140
177
|
Keep support and development sessions lean:
|
|
141
178
|
|
|
142
|
-
- Prefer local repo files over remote tools whenever the target account repo exists locally.
|
|
179
|
+
- Prefer local repo files over remote component tools whenever the target account repo exists locally.
|
|
180
|
+
`mcp_component_view` / `mcp_component_grep` are fallback surfaces for agents without that checkout,
|
|
181
|
+
or for confirming what the live DB has stored after you already understand the files. For a ticket
|
|
182
|
+
with `implementationAccountId`, resolve that account's indexed repo first, pull the appropriate
|
|
183
|
+
branch when the checkout is clean, and inspect `account-info.json` + `components/` there.
|
|
143
184
|
- Do not read entire `.remits-cli/sessions/*.jsonl` or large tool response files unless you first narrow
|
|
144
185
|
to the relevant request, endpoint, tool, or ticket.
|
|
145
186
|
- Prefer targeted Firestore queries: use `documentId`, tight `filters`, narrow `fields`, and low `limit`
|
|
@@ -53,9 +53,18 @@ Two more, easily confused: top-level **`componentBranches`** lists the variant b
|
|
|
53
53
|
|
|
54
54
|
### Repo selection rules
|
|
55
55
|
|
|
56
|
-
- **Inside the target implementation repo**:
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
- **Inside the target implementation repo**: make sure you are on the relevant branch and the checkout is
|
|
57
|
+
current before reading source or editing. Run `git fetch origin`; when the tree is clean,
|
|
58
|
+
`git pull --ff-only origin <branch>`; then confirm `git log origin/<branch>..<branch>` and
|
|
59
|
+
`git log <branch>..origin/<branch>` are both empty. A worktree can have an isolated staging workspace
|
|
60
|
+
and still be based on a stale commit. Then read `account-info.json` and inspect `components/` directly.
|
|
61
|
+
- **Inside one repo but supporting a different account**: switch to that account's indexed repo if it
|
|
62
|
+
exists. For tickets, prefer `implementationAccountId` / `implementationAccountName` over the reporting
|
|
63
|
+
`accountId` when choosing that repo; a subscriber or client often reports the symptom while the
|
|
64
|
+
implementation lives in an upstream `PLATFORM` / `PRODUCT` repo.
|
|
65
|
+
- **Only use `mcp_component_view` / `mcp_component_grep` when the correct repo is not available locally,**
|
|
66
|
+
or when you are deliberately comparing local source to the live DB after reading the files. They are not
|
|
67
|
+
the normal way to learn source on a machine with the account repo.
|
|
59
68
|
- **Outside any repo**: rely on the tools, and `mcp_get_guide` for the front-stage guides.
|
|
60
69
|
- **Never create a new local repo/directory just because a ticket references an account name.** Resolve the
|
|
61
70
|
account type and parent hierarchy first, and work only from an existing indexed repo unless the user
|
|
@@ -68,7 +68,7 @@ capacity. For each new ticket it launches a headless worker:
|
|
|
68
68
|
|
|
69
69
|
| | headless invocation | edit mode | investigate mode |
|
|
70
70
|
|---|---|---|---|
|
|
71
|
-
| `codex` | `codex exec --cd <repo>` | `--sandbox workspace-write` |
|
|
71
|
+
| `codex` | `codex exec --cd <repo>` | `--sandbox workspace-write` | `workspace-write with investigation-only brief and no edit lease` |
|
|
72
72
|
| `claude` | `claude -p --add-dir <repo>` | `--permission-mode acceptEdits` | `--permission-mode plan` |
|
|
73
73
|
| `gemini` | `gemini -p` in `<repo>` | `--approval-mode auto_edit` | `--approval-mode plan` |
|
|
74
74
|
|
|
@@ -83,6 +83,9 @@ and the worker are one answer, not two.
|
|
|
83
83
|
The brief always arrives on **stdin**, never in argv — it is a page of prose and argv has a hard
|
|
84
84
|
length limit, so an argv brief would fail on exactly the detailed tickets that most need the detail.
|
|
85
85
|
The brief itself is generated by the platform, so all three worker types are told the same thing.
|
|
86
|
+
In `--mode investigate`, the supervisor still claims tickets and may update them with findings, but it
|
|
87
|
+
does **not** acquire or renew the repository edit lease. The brief says the run was launched for
|
|
88
|
+
investigation only and forbids file edits, component staging, commits, and manual lease escalation.
|
|
86
89
|
|
|
87
90
|
**Following a run.** `remits-cli start`'s control center lists every worker; **Follow live** streams
|
|
88
91
|
that run's transcript into the page, rendering commands with their exit codes, file edits, and the
|
|
@@ -162,6 +165,7 @@ and holds a PID lock (`~/.remits-cli/listener.pid`) so only one runs per machine
|
|
|
162
165
|
|
|
163
166
|
The control center shows, in one browser view:
|
|
164
167
|
- which agent sessions are registered, what each is doing right now, and its recent activity
|
|
168
|
+
- live and recent worker runs, with historical transcript follow/stop controls keyed to the exact run
|
|
165
169
|
- the open support-ticket queue, and which agent each ticket is routed to
|
|
166
170
|
- a control to route a ticket at a specific available agent
|
|
167
171
|
- websocket connection and topic health
|
|
@@ -81,6 +81,22 @@ checkout and 15/15 from trunk, with no code difference.) **Run branch-variant su
|
|
|
81
81
|
- **Nothing is renamed.** A variant sync never renames files and never repoints the account's trunk
|
|
82
82
|
branch. A `new_*` file stays `new_*`.
|
|
83
83
|
|
|
84
|
+
**Start from a current branch, not just an isolated workspace.** Before the first edit in a variant
|
|
85
|
+
checkout:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
git fetch origin
|
|
89
|
+
git status --porcelain
|
|
90
|
+
git log origin/<branch>..<branch> # must be empty: nothing local-only
|
|
91
|
+
git log <branch>..origin/<branch> # must be empty: not behind the remote
|
|
92
|
+
remits-cli components promotion --branch <branch>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
`components promotion` reads the remote and reports whether the branch is also current with trunk. If it
|
|
96
|
+
says `diverged` or `STALE`, merge trunk in or sync first, as instructed, before writing new work. A
|
|
97
|
+
workspace lane prevents another agent from overwriting your staged Redis snapshot; it does not say which
|
|
98
|
+
commit your files are based on.
|
|
99
|
+
|
|
84
100
|
**Branch-local `account-info.json` can describe a subscriber.** On a variant branch the repository is
|
|
85
101
|
still the OWNER's component repo — files overlay that owner's trunk ids and sync writes overlays owned by
|
|
86
102
|
that owner. But when the checkout was synced from a subscribing account reached through an
|
|
@@ -193,7 +209,10 @@ resolution on production/subscription semantics. Do **not** use this pattern wit
|
|
|
193
209
|
### The SDLC is identical on a variant branch
|
|
194
210
|
|
|
195
211
|
```bash
|
|
196
|
-
git
|
|
212
|
+
git fetch origin
|
|
213
|
+
git checkout feature_branch
|
|
214
|
+
git pull --ff-only origin feature_branch
|
|
215
|
+
remits-cli components promotion --branch feature_branch
|
|
197
216
|
# edit components/actions/50_ExtractInvoice.groovy (KEEP the trunk id)
|
|
198
217
|
remits-cli components stage # Redis, scoped to this branch — same as always
|
|
199
218
|
remits-cli test run --test "Invoice Tests" # the feature_branch world
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
- [Hierarchy-scoped tool reads](#hierarchy-scoped-tool-reads)
|
|
16
16
|
- [Data Mode](#data-mode)
|
|
17
17
|
- [Command Reference](#command-reference)
|
|
18
|
+
- [Staging modes: workset vs full snapshot](#staging-modes-workset-vs-full-snapshot)
|
|
18
19
|
- [Prod banners and retryable failures](#prod-banners-and-retryable-failures)
|
|
19
20
|
|
|
20
21
|
## Getting Started
|
|
@@ -158,7 +159,7 @@ remits-cli data-mode set test # Switch back to test for development
|
|
|
158
159
|
remits-cli auth [--base-url URL] [--account-id ID] [--data-mode test|prod]
|
|
159
160
|
remits-cli sessions [list|remove] [--account-id ID]
|
|
160
161
|
remits-cli config [set] [--agent claude|codex|gemini]
|
|
161
|
-
remits-cli agent serve [--worker-agent claude|codex|gemini] [--max-concurrent N] [--mode edit|investigate] [--label NAME] [--data-mode test|prod]
|
|
162
|
+
remits-cli agent serve [--worker-agent claude|codex|gemini] [--max-concurrent N] [--mode edit|investigate] [--serves a,b] [--label NAME] [--data-mode test|prod]
|
|
162
163
|
remits-cli agent workers [--json]
|
|
163
164
|
remits-cli agent register [--label NAME] [--data-mode test|prod] [--account-id ID] [--max-concurrent N]
|
|
164
165
|
remits-cli agent work [--wait SECONDS] [--json]
|
|
@@ -181,7 +182,7 @@ remits-cli ticket artifact --ticket ID --type TYPE --label "..." [--url U | --co
|
|
|
181
182
|
remits-cli ticket participant --ticket ID --email E [--role watcher|requester|agent]
|
|
182
183
|
remits-cli ticket field --ticket ID --key K --value V # the ORGANIZATION's own field, outside the planning slots
|
|
183
184
|
remits-cli ticket reclaim [--ticket ID | --account-id ID] [--stale-hours 24] [--apply] # OPERATOR: take back an agent's abandoned ticket
|
|
184
|
-
remits-cli ticket queue --account-id ID [--status ...] [--unrouted] [--unassigned] [--awaiting-response] [--workstream W] [--board-stage S] [--planned-in P] [--search "..."] [--sort-by ...] [--json]
|
|
185
|
+
remits-cli ticket queue --account-id ID [--status ...] [--unrouted] [--unassigned] [--awaiting-response] [--min-runs N] [--workstream W] [--board-stage S] [--planned-in P] [--search "..."] [--sort-by ...] [--json]
|
|
185
186
|
remits-cli ticket create --account-id ID --subject "..." --type defect|question|task|incident|enhancement [--priority P] [--description "..."] [--tags a,b] [--workstream W] [--affected-component C] [--implementation-account-id ID] [--reference-id KEY]
|
|
186
187
|
remits-cli start [--foreground true] [--port 8787]
|
|
187
188
|
remits-cli stop
|
|
@@ -189,12 +190,12 @@ remits-cli status [--base-url URL] [--account-id ID] [--data-mode test|prod] [--
|
|
|
189
190
|
remits-cli whoami [--base-url URL] [--account-id ID] [--data-mode test|prod] [--json]
|
|
190
191
|
remits-cli listen [stop|status] [--foreground true] # compatibility alias
|
|
191
192
|
remits-cli data-mode [set test|prod]
|
|
192
|
-
remits-cli components stage [--branch <name>] [--workspace <name>] [--
|
|
193
|
+
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
194
|
remits-cli workspace [show | use <name> | use --auto | clear]
|
|
194
195
|
remits-cli components status [--branch <name>] [--component-type <type>] [--component-id <id>] [--json|--verbose]
|
|
195
196
|
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]
|
|
197
|
+
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
|
|
198
|
+
remits-cli components commit [--safe] [--message "msg"] [--data-mode test|prod] [--force-tombstones] # --safe gates phase 2; it cannot un-push phase 1
|
|
198
199
|
remits-cli components branches [--json] # branches carrying committed variants, with counts + drift
|
|
199
200
|
remits-cli components branch <name> [--json] # one branch: overridden / added / removed, drift flags, subscribers
|
|
200
201
|
remits-cli components branch <name> --diff <componentId> --component-type <kind> [--json]
|
|
@@ -211,7 +212,9 @@ remits-cli tool status --call-id <callId> [--data-mode test|prod]
|
|
|
211
212
|
```
|
|
212
213
|
|
|
213
214
|
For tests specifically:
|
|
214
|
-
- If `--data-mode` is omitted, `remits-cli test run` uses `test`.
|
|
215
|
+
- If `--data-mode` is omitted, `remits-cli test run` uses `test` and sends `dataModeSource:"cliDefault"`.
|
|
216
|
+
An explicit `--data-mode prod` sends `dataModeSource:"explicitFlag"` so production test runs are
|
|
217
|
+
auditable from the server status payload even when the original terminal history is gone.
|
|
215
218
|
- `--names` is `|`-delimited (a comma still splits a single value) and may be repeated; an unmatched
|
|
216
219
|
selector fails the run instead of reporting zero cases as success.
|
|
217
220
|
- `--as-account <ID>` runs AS a descendant subscriber so its edge selects the component branch
|
|
@@ -249,8 +252,50 @@ For tests specifically:
|
|
|
249
252
|
- `--names-only` — dry-run and print only `BUCKET type:id name` lines for the planned writes, then stop
|
|
250
253
|
without writing overlays.
|
|
251
254
|
|
|
255
|
+
- `--safe` — the NAME for that combination, and the recommended agent path on a variant branch. It
|
|
256
|
+
expands to `--summary --changed-only --fail-on-errors --fail-on-removed`, resolves `--changed-since`
|
|
257
|
+
from this branch's merge base with trunk when you did not name one (local refs only — it never runs
|
|
258
|
+
an implicit `git fetch`, and refuses with the fetch command when nothing local can answer), and
|
|
259
|
+
prints the planned writes before mutating unless `--yes` is passed. On TRUNK there is no plan to
|
|
260
|
+
gate, so it states what a trunk reconcile does (every row rewritten from the repo; any live component
|
|
261
|
+
missing from the repo DELETED) and requires `--yes`. It does not override a narrower
|
|
262
|
+
`--expected-removed`.
|
|
263
|
+
|
|
252
264
|
A good default for an unattended promotion is:
|
|
253
|
-
`remits-cli components sync --
|
|
265
|
+
`remits-cli components sync --safe`
|
|
266
|
+
|
|
267
|
+
When `--changed-only` refuses a plan far larger than your changed set, the usual cause is a branch that
|
|
268
|
+
is BEHIND trunk: it still physically carries old copies of files nobody on it touched, and a variant
|
|
269
|
+
sync turns each of those into an unrelated override. The refusal says so. Merge trunk in, push, re-run.
|
|
270
|
+
|
|
271
|
+
### Staging modes: workset vs full snapshot
|
|
272
|
+
|
|
273
|
+
`components stage` reports three numbers, and they answer three different questions:
|
|
274
|
+
|
|
275
|
+
| Number | Question |
|
|
276
|
+
|---|---|
|
|
277
|
+
| **workset** | how many components git reports this working tree changed |
|
|
278
|
+
| **submitted** | how many this command uploaded |
|
|
279
|
+
| **overlay** | how many staged entries the lane now holds — **what a run resolves** |
|
|
280
|
+
|
|
281
|
+
| Mode | Uploads | Lane afterwards |
|
|
282
|
+
|---|---|---|
|
|
283
|
+
| `components stage` (default) | the whole repository manifest | reconciled to the whole repo — a FULL SNAPSHOT |
|
|
284
|
+
| `components stage --workset` | only the git-changed components | reconciled to exactly those |
|
|
285
|
+
| `components stage --changed-only` | only the git-changed components | merged; earlier entries are left in place |
|
|
286
|
+
|
|
287
|
+
`--workset` is the iteration mode. `--changed-only` keeps its long-standing merge semantics, so it cannot
|
|
288
|
+
shrink a lane inherited from an earlier full stage; the command warns when it retains entries that way.
|
|
289
|
+
`--changed-only --replace-lane` is the explicit spelling of `--workset`.
|
|
290
|
+
|
|
291
|
+
An empty workset never clears a lane: `--workset` on a clean tree stages nothing and leaves the lane as
|
|
292
|
+
it is. `--empty-workset clear` opts into the clear; `components clear --all` is the direct way.
|
|
293
|
+
|
|
294
|
+
A deleted component file cannot be represented in Redis staging — clearing a staged entry falls back to
|
|
295
|
+
the committed row, so the component still resolves. The command reports those changes as NOT
|
|
296
|
+
REPRESENTABLE. On a non-trunk variant branch, prove a deletion through
|
|
297
|
+
`components sync --dry-run --summary --fail-on-errors`; on trunk there is no dry-run plan, so use the
|
|
298
|
+
full pre-sync safety check before any mutating reconcile.
|
|
254
299
|
|
|
255
300
|
### Prod banners and retryable failures
|
|
256
301
|
|
|
@@ -135,9 +135,14 @@ file is catastrophic.
|
|
|
135
135
|
variant branch the id/delete/renumber checks below apply to the **overlay set** instead: confirm every
|
|
136
136
|
component absent from the branch is *meant* to be tombstoned for subscribers.
|
|
137
137
|
- The user intends durable platform promotion now — not just local edits, staging, or verification.
|
|
138
|
+
- `git fetch origin` has run, and this checkout matches the remote branch the platform will sync:
|
|
139
|
+
`git log origin/<branch>..<branch>` and `git log <branch>..origin/<branch>` are both empty. A local
|
|
140
|
+
commit that is not pushed is invisible to Remits; a local branch behind the remote is a stale baseline.
|
|
138
141
|
- `git status --short` shows only intended changes; every rename/delete is explained. **No component file has
|
|
139
142
|
been renumbered to a different id.**
|
|
140
|
-
- Local branch is committed and pushed; sync will read the intended remote commit.
|
|
143
|
+
- Local branch is committed and pushed; sync will read the intended remote commit. If a sync just
|
|
144
|
+
completed, `git pull --ff-only origin <branch>` has run before any next git operation, because sync may
|
|
145
|
+
push generated artifacts back to the branch.
|
|
141
146
|
- Local filenames and live inventory (`mcp_account_view`) **agree on id and name for every component**: no live
|
|
142
147
|
component appears locally under a different id, and no expected component is missing a repo file.
|
|
143
148
|
> **Do not run this comparison against `account-info.json` alone — it will report false orphans.** That
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
- [When staged overrides apply](#when-staged-overrides-apply)
|
|
16
16
|
- [Diagnosing which version is in play](#diagnosing-which-version-is-in-play)
|
|
17
17
|
- [Working alongside other agents: the staging WORKSPACE](#working-alongside-other-agents-the-staging-workspace)
|
|
18
|
+
- [A lane holds an OVERLAY; your workset is a different number](#a-lane-holds-an-overlay-your-workset-is-a-different-number)
|
|
18
19
|
- [Stage / sync / clear with remits-cli](#stage--sync--clear-with-remits-cli)
|
|
19
20
|
- [Stale after sync / commit (the in-memory compile cache)](#stale-after-sync--commit-the-in-memory-compile-cache)
|
|
20
21
|
|
|
@@ -153,7 +154,11 @@ overwrite each other, and a `components commit` clears the lane out from under t
|
|
|
153
154
|
If more than one agent is working on the same branch, give each its own workspace:
|
|
154
155
|
|
|
155
156
|
```bash
|
|
156
|
-
git
|
|
157
|
+
git fetch origin
|
|
158
|
+
git switch forked
|
|
159
|
+
git pull --ff-only origin forked
|
|
160
|
+
git rev-list --left-right --count HEAD...origin/forked # must print: 0 0
|
|
161
|
+
git worktree add --force ../repo-agent-a forked # one checkout per agent, same branch
|
|
157
162
|
cd ../repo-agent-a
|
|
158
163
|
remits-cli workspace use --auto # names the lane after this directory
|
|
159
164
|
remits-cli components stage # isolated: nobody else sees it, nobody overwrites it
|
|
@@ -161,6 +166,14 @@ remits-cli test run --test 42
|
|
|
161
166
|
remits-cli token --path /page/whatever
|
|
162
167
|
```
|
|
163
168
|
|
|
169
|
+
That first block matters. `git worktree add ... forked` uses the local `forked` ref; it does not fetch or
|
|
170
|
+
prove that `forked` equals `origin/forked`. If the local ref is stale, every isolated staging lane starts
|
|
171
|
+
from the same stale files and a later sync looks like a deliberate revert. Before the first edit in a new
|
|
172
|
+
or reused worktree, `git status --porcelain`, `git log origin/<branch>..<branch>`, and
|
|
173
|
+
`git log <branch>..origin/<branch>` should all be empty. For variant branches, run
|
|
174
|
+
`remits-cli components promotion --branch <branch>` too; a branch can be current with its own remote and
|
|
175
|
+
still stale relative to trunk.
|
|
176
|
+
|
|
164
177
|
A workspace narrows STAGING and nothing else. A commit still targets the same branch and the same owner
|
|
165
178
|
account, and the run still resolves whatever committed variant branch the account subscribes to — so it
|
|
166
179
|
does **not** have the side effects of inventing a throwaway git branch per agent (which would make a
|
|
@@ -172,19 +185,60 @@ commit write `ComponentVariant` overlays for a branch nobody subscribes to).
|
|
|
172
185
|
- Every stage / test run / token / clear prints its `Staging lane:` — if a change seems to have had no
|
|
173
186
|
effect, check that line FIRST. A mismatched lane resolves committed source, which looks identical to
|
|
174
187
|
"the stage did not work".
|
|
175
|
-
- `remits-cli components status` lists every lane staged on the branch
|
|
176
|
-
agent is working alongside you.
|
|
188
|
+
- `remits-cli components status` lists every lane staged on the branch AND every lane on the account, so
|
|
189
|
+
you can see whether another agent is working alongside you. Each row names its world (trunk or variant
|
|
190
|
+
branch), its overlay, its workset where known, and whether it is the SHARED lane.
|
|
177
191
|
- `remits-cli components clear --all` is scoped to YOUR lane and never touches another agent's.
|
|
178
192
|
|
|
193
|
+
### A lane holds an OVERLAY; your workset is a different number
|
|
194
|
+
|
|
195
|
+
This is the distinction that decides whether a lane is legible to anyone but you.
|
|
196
|
+
|
|
197
|
+
- The **overlay** is every staged entry the lane currently holds. It is what a CLI-scoped run resolves,
|
|
198
|
+
and it is the number the console shows as "staged".
|
|
199
|
+
- The **workset** is what git reports this working tree changed. It is the work in flight.
|
|
200
|
+
|
|
201
|
+
A plain `components stage` is a FULL SNAPSHOT: it uploads the whole repository manifest and reconciles
|
|
202
|
+
the lane to it, so on a 115-component repo the overlay is 115 whether you edited five components or all
|
|
203
|
+
of them. That is safe — it is a complete, known state — but it is a poor signal. Everyone reading the
|
|
204
|
+
console sees a lane that looks like 115 edits in flight, and all 115 entries shadow committed source for
|
|
205
|
+
every run in that lane until they expire.
|
|
206
|
+
|
|
207
|
+
`components stage --workset` uploads only the changed components and reconciles the lane to exactly
|
|
208
|
+
them, so the overlay IS the workset. That is the mode to iterate in.
|
|
209
|
+
|
|
210
|
+
`components stage --changed-only` uploads the same narrow set but MERGES: it deliberately leaves every
|
|
211
|
+
other staged entry alone. So it can never shrink a lane inherited from an earlier full snapshot — the
|
|
212
|
+
overlay stays at 115 while you work on seven. The command warns when entries are retained that way.
|
|
213
|
+
|
|
214
|
+
Every count is `unknown` rather than `0` when it cannot be established. "git could not answer" and "git
|
|
215
|
+
says nothing changed" are different facts and only one of them is a number.
|
|
216
|
+
|
|
217
|
+
**Deletion is not expressible here.** There is no staged removal: clearing a staged entry falls back to
|
|
218
|
+
the committed row, so the component still resolves. `stage --workset` reports a deleted component file as
|
|
219
|
+
NOT REPRESENTABLE rather than quietly omitting it. On a non-trunk variant branch, prove a deletion
|
|
220
|
+
through the durable variant plan — `remits-cli components sync --dry-run --summary --fail-on-errors` —
|
|
221
|
+
and read the removed/tombstone bucket. On trunk there is no dry-run plan; a deletion is only proven by
|
|
222
|
+
the full pre-sync safety check before a mutating reconcile.
|
|
223
|
+
|
|
224
|
+
**An empty workset never clears the lane.** `--workset` on a clean tree stages nothing and leaves the
|
|
225
|
+
lane as it is; reconciling to an empty manifest would delete the overlay the next run depends on.
|
|
226
|
+
Clearing stays explicit (`components clear --all`), or `--empty-workset clear` if that really is what you
|
|
227
|
+
meant.
|
|
228
|
+
|
|
179
229
|
### Stage / sync / clear with remits-cli
|
|
180
230
|
|
|
181
|
-
- `remits-cli components stage`
|
|
182
|
-
|
|
183
|
-
- `remits-cli components stage
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
- `remits-cli components
|
|
187
|
-
|
|
231
|
+
- `remits-cli components stage --workset` stages exactly what git says this working tree changed and
|
|
232
|
+
reconciles the lane to it. **The normal iteration mode.**
|
|
233
|
+
- `remits-cli components stage` stages the whole repository manifest (a full snapshot). Use it for a
|
|
234
|
+
deliberate complete snapshot, when a `.meta.yml` key you deleted must be reconciled against the whole
|
|
235
|
+
repo, or as a "what is stale in here?" reset — then clear when you are done.
|
|
236
|
+
- `remits-cli components stage --changed-only` stages just the changed components and does NOT reconcile,
|
|
237
|
+
so entries it did not mention are left alone rather than deleted. Kept as-is for compatibility;
|
|
238
|
+
`--workset` is the same narrow upload with the lane reconciled.
|
|
239
|
+
- `remits-cli components status` shows which branch/variant world the checkout resolves, whether the lane
|
|
240
|
+
is shared, the overlay/workset/retained split with the last stage's mode, plus staged entries, staged
|
|
241
|
+
fields, aliases, hashes, and TTLs. Use `--json` or `--verbose` for the full staged-entry payload.
|
|
188
242
|
- **A full `stage` makes the `.meta.yml` AUTHORITATIVE.** Staging layers a payload over what is already
|
|
189
243
|
staged, which is what lets `mcp_component_edit` write a single field without blanking the others. But a
|
|
190
244
|
`remits-cli components stage` sends the whole sidecar, so a key you DELETE from a sidecar is removed from
|