@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.
@@ -16,11 +16,14 @@
16
16
  - [Step 1: Understand the Request](#step-1-understand-the-request)
17
17
  - [Step 2: Make the Change](#step-2-make-the-change)
18
18
  - [Step 3: Stage to Platform](#step-3-stage-to-platform)
19
+ - [Stage your workset, not the whole repo](#stage-your-workset-not-the-whole-repo)
20
+ - [Three numbers, three questions](#three-numbers-three-questions)
19
21
  - [Step 4: Verify the Change](#step-4-verify-the-change)
20
22
  - [Step 5: Iterate If Needed](#step-5-iterate-if-needed)
21
23
  - [Step 6: Update Documentation](#step-6-update-documentation)
22
24
  - [Temporary Experiment Workflow](#temporary-experiment-workflow)
23
25
  - [Step 7: Commit and Durable Sync](#step-7-commit-and-durable-sync)
26
+ - [Verifying the COMMITTED variant, not your staging](#verifying-the-committed-variant-not-your-staging)
24
27
  - [Step 8: Close the Ticket](#step-8-close-the-ticket)
25
28
  - [User Confirmation Preferences](#user-confirmation-preferences)
26
29
 
@@ -93,6 +96,22 @@ This is how every development task should flow:
93
96
  #### Step 1: Understand the Request
94
97
  Read the user's request. If you may need a repo other than the current one, read `~/.remits-cli/account-repos.json` first. Then review `account-info.json` and `README.md` to understand what components exist and how they relate. Read the source of any component you'll modify before changing it.
95
98
 
99
+ **Establish a steady git baseline before the first edit.** The platform syncs from the GitHub remote, not
100
+ from your local files, and a worktree can be stale even when its staging lane is isolated. In the checkout
101
+ you will edit:
102
+
103
+ ```bash
104
+ git fetch origin
105
+ git status --porcelain # empty, or only generated guide files you will discard
106
+ git log origin/<branch>..<branch> # empty: no local commits invisible to the platform
107
+ git log <branch>..origin/<branch> # empty: not behind the remote the platform syncs
108
+ remits-cli components status
109
+ ```
110
+
111
+ For a non-trunk variant branch, also run `remits-cli components promotion --branch <branch>`. If it reports
112
+ that the branch is behind trunk or that overlays were computed from an old SHA, settle that before changing
113
+ code. A workspace prevents staged-cache collisions; it does not make a stale branch current.
114
+
96
115
  **Establish the account's shape too, not just its components.** Read the `resolution` block in
97
116
  `account-info.json` (or `mcp_account_view`): the account `type` decides whether this repo is even the right
98
117
  place to change code, `resolution.relationships` shows whether the account has more than one parent (and
@@ -108,6 +127,11 @@ variants of these components exist: editing an origin component will drift them,
108
127
  #### Step 2: Make the Change
109
128
  Edit component files under `components/`. This is local file editing — the platform doesn't know about your changes yet.
110
129
 
130
+ Before changing a displayed value, helper, calculation, schema field, or prompt contract, read that
131
+ component's existing `.meta.yml` sidecar too. Descriptions often carry dated decisions and line-number
132
+ references explaining why a value looks odd. If you are reversing one, say so in the new sidecar text;
133
+ otherwise you are probably reopening a closed bug.
134
+
111
135
  **Creating a component that does not exist yet.** Files are named `<id>_<Name>.<ext>`, where the numeric
112
136
  prefix is the platform's component id. A new component has no id, so name its files with the **`new_`
113
137
  prefix** and let the sync assign one (it then renames the files to that id):
@@ -153,10 +177,63 @@ overlay instead of pruning cleanly.
153
177
  #### Step 3: Stage to Platform
154
178
 
155
179
  ```bash
156
- remits-cli components stage
180
+ remits-cli workspace use --auto # once per checkout: your own lane
181
+ remits-cli components stage --workset # every edit: stage what you changed
157
182
  ```
158
183
 
159
- This uploads your local file 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.
184
+ 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.
185
+
186
+ ##### Stage your workset, not the whole repo
187
+
188
+ There are three stage modes, and the difference decides what a run in your lane resolves and what a
189
+ human watching the console sees:
190
+
191
+ | Command | What it uploads | What the lane holds afterwards |
192
+ |---|---|---|
193
+ | `components stage --workset` | only the components git reports changed | **exactly those** — the lane is reconciled to your workset |
194
+ | `components stage` | the whole repository manifest | **every component in the repo** (a full snapshot) |
195
+ | `components stage --changed-only` | only the changed components | the changed ones **merged into whatever was already there** |
196
+
197
+ **Use `--workset` for normal iteration.** A full stage is correct and safe, but on a real repository it
198
+ puts a hundred-plus components into your lane, and every one of them then shadows committed source for
199
+ any run in that lane until it expires. A human looking at `/admin/platforms` sees "115 staged" and cannot
200
+ tell whether you edited 115 components or five.
201
+
202
+ `--changed-only` MERGES. It cannot shrink a lane it inherited from an earlier full stage, so a lane can
203
+ sit at 115 overlay entries while you are working on seven. The command warns when that happens; the fix
204
+ is `--workset` (or `components clear --all` once, then keep using `--workset`).
205
+
206
+ **When a full stage is the right answer:**
207
+
208
+ - you deliberately want a complete snapshot of the repo in the lane;
209
+ - you changed a `.meta.yml` sidecar and want removed keys reconciled against the whole repo;
210
+ - you cannot tell what is stale in the lane and want a clean, known state (then `components clear --all`
211
+ when you are done).
212
+
213
+ **An empty workset never clears your lane.** `--workset` on a clean working tree stages nothing and
214
+ leaves the lane alone — reconciling to an empty manifest would delete the overlay your next test run
215
+ depends on. Clearing stays explicit: `components clear --all`.
216
+
217
+ **Deleting a component file cannot be verified by staging.** There is no staged "removal": clearing a
218
+ staged entry falls back to the committed row, so the component still resolves. `stage --workset` reports
219
+ those changes as NOT REPRESENTABLE.
220
+
221
+ On a non-trunk variant branch, prove the removal through the durable variant plan:
222
+ `remits-cli components sync --dry-run --summary --fail-on-errors` and read the removed/tombstone bucket.
223
+ On trunk there is no dry-run plan; treat deletion as a high-risk durable reconcile and pass the full
224
+ pre-sync safety check before running any mutating sync.
225
+
226
+ ##### Three numbers, three questions
227
+
228
+ `components stage` and `components status` report all three, and so does the admin console. They are not
229
+ interchangeable:
230
+
231
+ - **workset** — components git reports this working tree changed. The work in flight.
232
+ - **submitted** — what this command uploaded.
233
+ - **overlay** — every staged entry the lane now holds. **This is what a run resolves.**
234
+
235
+ A missing answer is printed as `unknown`, never as `0`: "git could not answer" and "git says nothing
236
+ changed" are different facts and only one of them is a number.
160
237
 
161
238
  **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**.
162
239
 
@@ -272,7 +349,7 @@ If the work is tied to a support ticket:
272
349
 
273
350
  Before committing, update metadata so the next session understands what changed:
274
351
 
275
- 1. **`.meta.yml` sidecars** — Update `summary`, `description`, and `mermaid` for each modified component. `summary` is what drives the compact component description in generated `account-info.json`; `description` is the fallback when no summary is set and is capped in that file.
352
+ 1. **`.meta.yml` sidecars** — Update `summary`, `description`, and `mermaid` for each modified component. `summary` is what drives the compact component description in generated `account-info.json`; `description` is the fallback when no summary is set and is capped in that file. Preserve or explicitly revise dated decision notes; do not delete the evidence the next agent needs.
276
353
  2. **`README.md`** — If the change affects account-level capabilities or workflows.
277
354
  3. **New components** — Always fill in `.meta.yml` immediately.
278
355
 
@@ -289,13 +366,16 @@ Redis cache can affect later test/tool runs, so always clear it after restoring
289
366
 
290
367
  ```bash
291
368
  # make temporary local edit
292
- remits-cli components stage
369
+ remits-cli components stage --workset
293
370
  remits-cli test run --test <id-or-name> --names "<case name>"
294
371
  git restore <file>
295
372
  remits-cli components clear --all
296
373
  remits-cli components status
297
374
  ```
298
375
 
376
+ With `--workset` the restore-and-clear is belt and braces rather than the only thing standing between
377
+ the experiment and a later run: the lane only ever held the component you were experimenting on.
378
+
299
379
  For narrower cleanup when only one staged component should be cleared:
300
380
 
301
381
  ```bash
@@ -316,17 +396,56 @@ This separates the local failure boundaries cleanly:
316
396
  1. Local git commit
317
397
  2. Remote push
318
398
 
319
- After the push, run the **`component-integrity.md`** safety checks before any durable platform sync. Do not run
399
+ After the push, run `git fetch origin` and confirm both local and remote agree on the branch you are about
400
+ to sync:
401
+
402
+ ```bash
403
+ git log origin/<branch>..<branch> # empty
404
+ git log <branch>..origin/<branch> # empty
405
+ ```
406
+
407
+ Then run the **`component-integrity.md`** safety checks before any durable platform sync. Do not run
320
408
  `remits-cli components sync` when local files, `account-info.json`, and live inventory disagree about component
321
409
  IDs or when unexpected deletes/renumbers are present.
322
410
 
323
411
  Only after those checks pass, and only when the user intends to promote the repo to the platform database:
324
412
 
325
413
  ```bash
414
+ # On a VARIANT branch — the recommended path. Dry-runs first and refuses a surprising plan.
415
+ remits-cli components sync --safe
416
+ git pull --ff-only origin <branch>
417
+
418
+ # On TRUNK — there is no plan to gate, so --safe explains what a trunk reconcile does and needs --yes.
326
419
  remits-cli components sync
327
420
  git pull --ff-only origin <branch>
328
421
  ```
329
422
 
423
+ `--safe` expands to `--summary --changed-only --fail-on-errors --fail-on-removed`, resolves the
424
+ comparison base from this branch's merge base with trunk when you did not pass `--changed-since`, and
425
+ prints the planned writes before mutating unless you pass `--yes`. It refuses when the plan would write
426
+ components this checkout did not change — which is exactly what a branch that is BEHIND trunk produces,
427
+ because it still physically carries old copies of files nobody on it touched, and a variant sync turns
428
+ each of those into an unrelated override. When it refuses that way, merge trunk into your branch, push,
429
+ and re-run the same command.
430
+
431
+ When a removal is intended, name it rather than disabling the gate:
432
+
433
+ ```bash
434
+ remits-cli components sync --safe --expected-removed action:50
435
+ ```
436
+
437
+ `--force-tombstones` stays explicit and human-owned. Never pass it to get past a refusal.
438
+
439
+ ##### Verifying the COMMITTED variant, not your staging
440
+
441
+ After a sync, staged entries still win for CLI-scoped runs, so a test that passes may be testing your
442
+ staging rather than what you just committed. Clear the lane first:
443
+
444
+ ```bash
445
+ remits-cli components clear --all
446
+ remits-cli test run --test <id-or-name> --as-account <subscriber-id>
447
+ ```
448
+
330
449
  `remits-cli components sync` is the authoritative platform-sync step. It does not perform local git operations,
331
450
  and it is capable of reconciling creates/deletes/renames from the remote repository into the database. Treat it
332
451
  as a gated promote/reconciliation command, not as an exploratory command or fallback.
@@ -340,6 +459,29 @@ unexpectedly, stop and inspect the repo-local session log before running any mut
340
459
 
341
460
  **Git is required for durable sync.** The platform syncs by pulling from the git remote (`GitHubClient.syncFromRepository`). If `git push` fails, the server has nothing new to sync. You can still **stage** and **test** without git — only durable sync requires it.
342
461
 
462
+ **Landing is serial, and the platform now enforces it.** `components commit` takes a short exclusive
463
+ landing lease on `(account, branch)` before it pushes, and `components sync` takes it too. If another agent
464
+ is landing that branch you are refused with a sentence naming who holds it and how long is left:
465
+
466
+ ```
467
+ Refused: Branch 'forked' on account 33 is being landed by dev@acme.test in /Users/dev/wt/acme-a ...
468
+ Keep staging and iterating — staging is lane-isolated — and land when this clears.
469
+ ```
470
+
471
+ Do exactly that. **Do not loop on the refusal**: the lease is minutes at most, staging and testing are
472
+ unaffected because they are lane-isolated, and retrying in a tight loop just burns the run. The reason it
473
+ is serial at all is that `git add -A` sweeps a shared checkout and the platform pushes a regenerated
474
+ `account-info.json` back to the branch during sync, so two commits racing one branch collide on the remote.
475
+
476
+ **Staging also refreshes your presence.** You do not need `remits-cli agent register` for other agents to
477
+ see you: `components stage` records `(user, checkout, branch, workspace)` so headless workers on other
478
+ machines find you in their "current repository activity" block instead of assuming the repository is
479
+ theirs. A derived record is never routed work.
480
+
481
+ **An account may make `commit` a refusal outright.** A `no-commit` rule in its `OPERATIONS` process means
482
+ the platform refuses the landing lease and the sync — leave your changes in the working tree and describe
483
+ them on the ticket. Read `support-tickets.md` §"Some of that process is enforced, not requested".
484
+
343
485
  #### Step 8: Close the Ticket
344
486
 
345
487
  If the request came from a support ticket, the task is not complete until you update the ticket lifecycle yourself:
@@ -187,7 +187,10 @@ Before starting an investigation outside the confirmed current repo:
187
187
  8. `mcp_user_activity` — for "user X is slow right now" reports, list sessions by `userId`/`accountId`, open the session story, and use the returned beat pivots.
188
188
  9. `mcp_performance_trace` — for slow/sluggish reports, open the beat `traceId` with `action:"trace"`; use `action:"slowest"` when you only have a broad time window.
189
189
  10. `mcp_system_logs` — correlate via `threadGroupingId` for raw log context when the trace needs supporting log lines.
190
- 11. `mcp_component_view`/`mcp_component_grep` — explain how the responsible component works.
190
+ 11. If no local checkout exists for the responsible implementation account, use
191
+ `mcp_component_view`/`mcp_component_grep` to explain how the component works. If the repo exists on
192
+ this machine, inspect the branch/files there instead; the remote component tools are fallback and
193
+ live-DB comparison surfaces, not the starting point for source comprehension.
191
194
 
192
195
  **Slow / sluggish user report:**
193
196
 
@@ -11,10 +11,12 @@
11
11
  - [Support Ticket Mental Model](#support-ticket-mental-model)
12
12
  - [You are an agent, and you register yourself](#you-are-an-agent-and-you-register-yourself)
13
13
  - [Autonomous: one ticket, one process](#autonomous-one-ticket-one-process)
14
+ - [Serving only some workstreams](#serving-only-some-workstreams)
14
15
  - [The manual loop](#the-manual-loop)
15
16
  - [If you are the worker](#if-you-are-the-worker)
16
17
  - [Before you edit anything: where you are, and whether you may](#before-you-edit-anything-where-you-are-and-whether-you-may)
17
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
+ - [Some of that process is enforced, not requested](#some-of-that-process-is-enforced-not-requested)
18
20
  - [Seeing the queue as a human does](#seeing-the-queue-as-a-human-does)
19
21
  - [Agent components are workers too](#agent-components-are-workers-too)
20
22
  - [Moving a ticket through its lifecycle](#moving-a-ticket-through-its-lifecycle)
@@ -80,10 +82,17 @@ and it expires on its own so a killed worker cannot park a ticket forever. You d
80
82
  remits-cli agent serve # workers are whichever agent THIS session is
81
83
  remits-cli agent serve --worker-agent codex --max-concurrent 2
82
84
  remits-cli agent serve --mode investigate # read-only workers: no file edits
85
+ remits-cli agent serve --serves support,sdlc # only these workstreams are routed here
83
86
  remits-cli agent workers # what is running right now
84
87
  remits-cli agent release # stop serving, go offline
85
88
  ```
86
89
 
90
+ `--mode investigate` is still autonomous ticket work. The supervisor claims a ticket, launches a
91
+ worker, and the worker should read/reproduce/localize the issue and update the ticket with useful
92
+ findings or a handoff. What it must **not** do is become the repository editor: investigation-mode
93
+ polls do not acquire or renew the repo edit lease, and the brief explicitly forbids file edits,
94
+ component staging, commits, and `remits-cli ticket lease`.
95
+
87
96
  **Run it in a plain terminal tab.** That tab becomes the agent host: `serve` returns immediately, a
88
97
  detached supervisor is anchored to the tab's shell, and closing the tab stops the agent. Nothing in
89
98
  that tab is an AI session — the AI only ever appears as the worker processes the supervisor spawns.
@@ -111,6 +120,33 @@ runs, reporting the worker's activity to the dashboard, dropping the claim when
111
120
  failed ticket once, and releasing a ticket back to the queue when it has failed too often. Closing
112
121
  the terminal stops everything and hands any in-flight work back.
113
122
 
123
+ ### Serving only some workstreams
124
+
125
+ `--serves` declares which of the account's **workstreams** this machine covers, so a fleet can be a
126
+ set of queues rather than a pool of interchangeable machines:
127
+
128
+ ```bash
129
+ remits-cli agent serve --serves support,incident --mode investigate # the support desk box
130
+ remits-cli agent serve --serves sdlc --max-concurrent 2 # the engineering box
131
+ ```
132
+
133
+ The names are the account's own — the platform compares them and learns nothing about any of them.
134
+ Read `remits-cli ticket queue --workstream ...` or the account's `OPERATIONS` prompts to find out
135
+ what this account calls its processes; do not invent names.
136
+
137
+ **Omit it unless the user asked for it.** A session that declares nothing is a generalist and takes
138
+ everything, which is the right default and what every existing fleet does. Specialising has a real
139
+ cost: a specialist is only routed tickets in its workstreams *and its unrouted sweep takes only
140
+ those*, so a workstream no live session covers is routed to nobody. The platform reports that rather
141
+ than quietly overriding the declaration —
142
+
143
+ - `dispatch` answers `reason: 'no_agent_serves_workstream'` and names what the live sessions do cover;
144
+ - `agent map` prints each session's declared queues;
145
+ - the supervisor logs `serve.out_of_scope` when it passes over unrouted work it does not serve.
146
+
147
+ **So after specialising a fleet, run `remits-cli agent map`** and confirm every workstream the
148
+ account ingests is covered by something.
149
+
114
150
  ### The manual loop
115
151
 
116
152
  Only when the session registered with `agent register` rather than `agent serve`.
@@ -137,6 +173,15 @@ timer.
137
173
  local directory through `~/.remits-cli/account-repos.json` and `cd` there before making changes. You
138
174
  registered from anywhere; you do not fix anything from anywhere.
139
175
 
176
+ For subscriber/fork tickets, this is also the investigation starting point. The reporting account may be
177
+ the fork or client that observed the issue, while `implementationAccountId` names the repo whose branch
178
+ contains the front-stage source. Read the ticket, run/inspect the run context (`ticket where` when useful),
179
+ open the indexed implementation repo, then establish the relevant branch's steady starting state before
180
+ the first edit: fetch origin, fast-forward the branch, and confirm local and remote have no commits missing
181
+ from either side. Then read `account-info.json` and the component files. Use `mcp_component_view` /
182
+ `mcp_component_grep` only when that repo is unavailable locally or when explicitly comparing live DB source
183
+ to the files.
184
+
140
185
  **Capacity is real, not advisory.** A serving session tells the platform how many workers it can run
141
186
  (`--max-concurrent`, default 1), and the router will not send it more than that. So a session at
142
187
  capacity is skipped in favour of one that is free, rather than accumulating tickets it will never
@@ -155,6 +200,14 @@ headless run is invisible otherwise), and **end in a terminal state** — `compl
155
200
  resolution, or `update_status` with what you established and what the next agent should try. Exiting
156
201
  quietly leaves a ticket that looks in-flight forever.
157
202
 
203
+ **If your brief says this is not the first autonomous run on this ticket, believe it.** Earlier runs
204
+ picked it up and handed it back unfinished; whatever they tried did not work, so repeating it will not
205
+ work either. Read what they recorded, then either take a genuinely different approach or **stop and
206
+ ask** (`remits-cli ticket ask`). Asking is a complete, successful outcome, and it is the right one when
207
+ the obstacle is not something a run can remove. Accounts cap how many times a ticket may be picked up
208
+ and handed back — past that the ticket stops being offered to workers at all and waits for a person, so
209
+ a run that exits quietly at the limit has cost every earlier run as well as its own.
210
+
158
211
  ### Before you edit anything: where you are, and whether you may
159
212
 
160
213
  Presence answers *who*. Two more facts answer *whether you may edit*, and with git worktrees and
@@ -185,12 +238,31 @@ Four things are worth knowing and are not obvious:
185
238
  - **A staging workspace does not replace the lease.** Separate lanes stop two runs *resolving* each
186
239
  other's staged code; they do nothing about two processes writing the same files or pushing the same
187
240
  branch, which is what actually destroys work.
188
- - **One editing worker per repository account per lane — worktrees do not change this.** Two worktrees
189
- of one repo push to the same branch on the same remote, so per-directory leases would trade file
190
- conflicts for non-fast-forward push conflicts, which surface later and are worse.
191
- - **A spawned ticket worker already has its own staging lane** (`REMITS_WORKSPACE=ticket-<id>`). You do
192
- not set it, and your brief states it. Say which lane you staged into when you report what you verified
193
- — somebody looking at the shared lane will not see your changes.
241
+ - **You are not restricted to trunk, and you do not choose the branch.** You work on whatever branch your
242
+ checkout is on — `ticket where` prints it — and nothing switches it underneath you. Separately, if this
243
+ account subscribes to a **component variant branch**, its variant components (including its
244
+ `OPERATIONS` process) resolve for you automatically, server-side, without you doing anything. Those are
245
+ two different facts and only the first is about your files. Load `branch-variants.md` before working in
246
+ a non-trunk checkout.
247
+ - **The edit lease excludes per repository account and lane, NOT per branch.** So an agent editing a
248
+ different branch of this same repository still blocks you, even though your files and your pushes would
249
+ not collide. That is deliberate over-exclusion, not a bug — investigate read-only and hand off, exactly
250
+ as for any other refusal.
251
+ - **A spawned local ticket worker owns its checkout grounding and already has its staging lane.** For
252
+ repository work, `remits-cli agent serve` appends the local repository checkout, target branch and a
253
+ suggested per-ticket worktree path. Before editing, create or choose an isolated worktree appropriate to
254
+ the ticket. For a ticket with no component branch subscription, the target branch is the repository
255
+ default before it is the launch checkout's current branch. The supervisor sets
256
+ `REMITS_WORKSPACE=ticket-<id>` for you; if you choose a detached worktree, export
257
+ `REMITS_GIT_BRANCH=<branch>` before running `remits-cli`. A worktree is a checkout-isolation tool, not
258
+ a freshness proof: fetch, fast-forward and prove `HEAD...origin/<branch>` is `0 0` before the first
259
+ edit, following `multi-agent-development.md`.
260
+ - **GCP Agent components do not get a local checkout.** The same ticket brief can name a component branch
261
+ subscription, but for a GCP Agent component that is component-resolution context, not a filesystem
262
+ instruction.
263
+ - **One editing worker per repository account per lane is still the server lease rule.** The worker-owned
264
+ worktree protects a human's checkout from the spawned worker; it does not make the edit lease
265
+ per-directory. A branch-aware edit lease with same-branch exclusion is a separate design.
194
266
 
195
267
  `unlease` returns **your own** lease and deliberately cannot touch anybody else's. Breaking a stale one
196
268
  is a separate, human verb: `remits-cli ticket force-unlease --ticket ID --reason "..."`.
@@ -213,6 +285,27 @@ from the prompt, so **edit the prompt, not the file**.
213
285
  `workstream` is not `type`: a type classifies the request, a workstream names the procedure, and they
214
286
  cross — a `defect` handled by incident response out of hours goes through the SDLC in the morning.
215
287
 
288
+ ### Some of that process is enforced, not requested
289
+
290
+ Part of an account's process can be **deterministic**. If your brief has a `## Rules you will be held to`
291
+ section, those rules are enforced by the platform at the write door — the verb is refused, not
292
+ discouraged.
293
+
294
+ - **Read that section before you act.** A refusal you were warned about costs one command; a refusal you
295
+ were not costs the run.
296
+ - **A refusal is an ANSWER.** The message names the rule and says what to do instead. Act on that
297
+ sentence. Do not retry the identical call, and do not go looking for another door — the rules govern the
298
+ DSL, the MCP tools and this CLI identically.
299
+ - **`[require]` rules mean a human.** You cannot acknowledge one: the platform decides "human" from the
300
+ absence of an agent run identity, which your commands always carry. Record what you found with
301
+ `ticket progress` and hand off.
302
+ - **`[warn]` rules let the call through and write a `policy` worklog entry.** Mention it in your handoff.
303
+ - **If you see "POLICY NOT ENFORCED"**, the account's rules could not be parsed. Do not read the absence
304
+ of a refusal as permission — say so on the ticket. It is a defect in the account's `OPERATIONS` prompt.
305
+
306
+ The same rules govern `components stage` and `components commit`. A `no-commit` rule is why
307
+ `remits-cli components commit` refuses rather than asks.
308
+
216
309
  ### Seeing the queue as a human does
217
310
 
218
311
  `remits-cli start` opens a browser control center showing the same facts you are acting on: which
@@ -385,5 +478,6 @@ Sandbox note:
385
478
  Use the same repo/context rules as other tools:
386
479
  - If the ticket targets a `CLIENT` account, do not assume that client's repo is the implementation repo. Confirm the parent `PLATFORM` / `PRODUCT` relationship first.
387
480
  - Read `~/.remits-cli/account-repos.json` before choosing which local repo to open.
388
- - If the correct repo for the relevant account type exists locally, switch there and inspect `account-info.json` and `/components`.
481
+ - If the correct repo for the relevant account type exists locally, switch there, confirm/pull the relevant
482
+ branch when clean, and inspect `account-info.json` and `/components`.
389
483
  - If the repo is not available locally, use `mcp_account_view`, `mcp_component_view`, and `mcp_component_grep`.
@@ -880,7 +880,7 @@ When a component "can't find" an obviously-present document, run `action:'inspec
880
880
  first — that shows what was indexed, which is usually the answer.
881
881
 
882
882
  ### `mcp_get_guide`
883
- Load the packaged front-stage guides — the same `docs/guides/` set `remits-cli` syncs into a repo. Use it when
883
+ Load the packaged front-stage guides — the same `docs/front-stage/` set `remits-cli` syncs into a repo. Use it when
884
884
  you are working **outside a repo** (or the repo's `guides/` is stale) and need the authoritative guidance
885
885
  before writing a component.
886
886
 
@@ -81,7 +81,7 @@ with `REMITS_PLATFORM_DIR`); `remits-cli` clones it on first authenticated run i
81
81
 
82
82
  Apply the boy-scout rule to the guides themselves: **whenever you only solved the problem by reading the
83
83
  core back stage because a front-stage guide was unclear or missing — even when there was no platform
84
- defect at all — open a guide-only PR** updating the relevant guide in the platform repo's `docs/guides/`,
84
+ defect at all — open a guide-only PR** updating the relevant guide in the platform repo's `docs/front-stage/`,
85
85
  which is the source served to every account repo. Better guides over time are an explicit goal.
86
86
 
87
87
  #### Escalation Bundle (tooling/operational issue)