overlord-cli 0.2610241050.0 → 0.2610242007.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +2 -2
  2. package/dist/connectors/AGENTS.md +22 -5
  3. package/dist/connectors/VERSION +1 -1
  4. package/dist/connectors/adapters/antigravity/conformance-manifest.yaml +1 -1
  5. package/dist/connectors/adapters/antigravity/plugin.json +1 -1
  6. package/dist/connectors/adapters/antigravity/skills/record-work.md +2 -3
  7. package/dist/connectors/adapters/claude/.claude-plugin/plugin.json +1 -1
  8. package/dist/connectors/adapters/claude/codec/claude.codec.yaml +5 -0
  9. package/dist/connectors/adapters/claude/commands/record-work.md +2 -3
  10. package/dist/connectors/adapters/claude/conformance-manifest.yaml +1 -1
  11. package/dist/connectors/adapters/claude/fixtures/normalize-post-tool-use-notebook.json +1 -0
  12. package/dist/connectors/adapters/claude/fixtures/normalize-post-tool-use-shell.json +1 -0
  13. package/dist/connectors/adapters/claude/fixtures/normalize-post-tool-use-write.json +1 -0
  14. package/dist/connectors/adapters/codex/.codex-plugin/plugin.json +2 -2
  15. package/dist/connectors/adapters/codex/CAPABILITIES.md +2 -2
  16. package/dist/connectors/adapters/codex/codec/codex.codec.yaml +10 -1
  17. package/dist/connectors/adapters/codex/conformance-manifest.yaml +2 -2
  18. package/dist/connectors/adapters/codex/fixtures/normalize-post-tool-use-failed.json +42 -0
  19. package/dist/connectors/adapters/codex/fixtures/normalize-post-tool-use-rename.json +42 -0
  20. package/dist/connectors/adapters/codex/fixtures/normalize-post-tool-use.json +6 -3
  21. package/dist/connectors/adapters/codex/harness-capabilities.yaml +2 -0
  22. package/dist/connectors/adapters/cursor/.cursor-plugin/plugin.json +1 -1
  23. package/dist/connectors/adapters/cursor/codec/cursor.codec.yaml +5 -0
  24. package/dist/connectors/adapters/cursor/commands/record-work.md +2 -3
  25. package/dist/connectors/adapters/cursor/conformance-manifest.yaml +1 -1
  26. package/dist/connectors/adapters/cursor/fixtures/normalize-post-tool-use-write.json +1 -0
  27. package/dist/connectors/adapters/cursor/rules/overlord-local.mdc +1 -1
  28. package/dist/connectors/adapters/opencode/conformance-manifest.yaml +1 -1
  29. package/dist/connectors/adapters/pi/conformance-manifest.yaml +1 -1
  30. package/dist/connectors/core/README.md +1 -1
  31. package/dist/connectors/core/overlord-mission/SKILL.md +113 -70
  32. package/dist/connectors/core/overlord-mission/reference/cli.md +53 -63
  33. package/dist/connectors/core/overlord-mission/reference/context.md +1 -1
  34. package/dist/connectors/core/overlord-mission/reference/mcp.md +3 -2
  35. package/dist/connectors/core/overlord-mission/reference/record-work.md +23 -43
  36. package/dist/connectors/core/overlord-mission/reference/shell-escaping.md +7 -5
  37. package/dist/connectors/core/scripts/capture-change-hook.sh +6 -4
  38. package/dist/connectors/core/scripts/overlord-mcp.mjs +81 -164
  39. package/dist/connectors/docs/05-connectors-and-agent-plugins.md +3 -3
  40. package/dist/connectors/docs/testing.md +5 -0
  41. package/dist/index.js +665 -236
  42. package/dist/index.js.map +4 -4
  43. package/package.json +1 -1
@@ -32,14 +32,18 @@ when none apply. Human actions are concrete work a user must perform outside com
32
32
  never include Git operations or routine review/testing. Every human action needs `action`, `reason`,
33
33
  and `category`; add `command`, `verify`, and `link` whenever they exist so the operator can act
34
34
  without re-reading the delivery (see **Delivery Evidence** below). Tradeoffs record the
35
- implementation decision, alternatives considered, and rationale. Each `deferredWork` item
36
- must be a recommended new objective that is not part of this mission (for example a bug
37
- discovered here that belongs outside it). Name the component or file involved and say why
38
- the work was left. Never list work already covered by this mission's future objectives,
39
- leftover slices of the current objective (add an objective to this mission instead), or
40
- human implementation follow-up such as deploy, secrets, or migrations (those belong in
41
- `humanActions`). Use an empty array when nothing qualifies. These fields improve
42
- review visibility but never block delivery.
35
+ implementation decision, alternatives considered, and rationale.
36
+ Each `deferredWork` item is one recommended objective outside this mission. Be very
37
+ concise. `title` names the work in an imperative phrase. `change` states only the specific
38
+ change that is needed. `location` says where to find it in the code: the file, function,
39
+ component, or command. `doneWhen` states the observable result in one sentence. Do not add
40
+ instructions on how to do the work, background, or rationale. The operator turns the item
41
+ into an objective or a mission as written, so it must read as a task, not as a note.
42
+ Never list work already covered by this mission's future objectives, leftover slices of
43
+ the current objective (add an objective to this mission instead), or human implementation
44
+ follow-up such as deploy, secrets, or migrations (those belong in `humanActions`). Use an
45
+ empty array when nothing qualifies. These fields improve review visibility but never block
46
+ delivery.
43
47
 
44
48
  For full command syntax, flags, phase values, and event types see **CLI Command Reference** below.
45
49
 
@@ -95,7 +99,7 @@ Use this mode when the conversation starts normally and the user asks the agent
95
99
  5. If the user wants to establish a persistent session with a mission by ID, run `ovld protocol attach --mission-id <mission_id>`.
96
100
  6. If the user wants to find a mission but does not know the ID, run `ovld protocol search-missions --query "..." --status execute,review` and ask the user to confirm.
97
101
  7. If you need to understand project routing before prompting, use `ovld protocol discover-project`.
98
- 8. If the user wants to **record work that is already finished** in this chat (for example, something you just built in a chat app) as a completed mission, run `ovld protocol record-work --project-id <project-id>` (or the hosted `overlord_record_work` MCP tool). This creates a mission with one completed objective, records explicitly supplied changed files and optional rationales, lands it in the review column, and runs the standard Gemini delivery summary — all in one call, with no `attach`/`deliver`. Do **not** use it for in-progress work. The exact submission format is in [reference/record-work.md](reference/record-work.md).
102
+ 8. If the user wants to **record work that is already finished** in this chat (for example, something you just built in a chat app) as a completed mission, run `ovld protocol record-work --project-id <project-id>` (or the hosted `overlord_record_work` MCP tool). This creates a mission with one completed objective, records any paths you declare as Declared evidence, lands it in the review column, and runs the standard Gemini delivery summary — all in one call, with no `attach`/`deliver`. Do **not** use it for in-progress work. The exact submission format is in [reference/record-work.md](reference/record-work.md).
99
103
  9. If you need other lifecycle commands or flags, run `ovld protocol help` and use the real subcommand list instead of guessing.
100
104
  10. Once you attach to a mission, switch back to Mode 1 and follow the full mission lifecycle.
101
105
 
@@ -172,15 +176,18 @@ ovld protocol deliver --session-key <sessionKey> \
172
176
  ```
173
177
 
174
178
  This is the normal delivery shape: a summary is sufficient. The CLI syncs objective-ledger
175
- evidence independently before the lifecycle transition.
176
-
177
- After running a generator, migration, or script that writes files, you may add its known outputs
178
- to this existing call with `--paths path/one.ts,path/two.ts`. This is optional, paths-only
179
- metadata for outputs the native hook cannot name; never use it to enumerate every changed or
180
- opened file, and never make a separate call just to declare paths.
181
-
182
- Artifacts, optional change rationales, and a delivery report remain current annotations when
183
- they add review value. Use `--payload-json` when the full delivery object fits comfortably inline
179
+ evidence independently before the lifecycle transition, and tracking gaps or sync failures never
180
+ block delivery. See **Delivery And Change Evidence** below for how to prepare the summary.
181
+
182
+ When you know you changed files that native capture could not name (shell or heredoc writes,
183
+ script or generator outputs, deletes, and both endpoints of a rename), add exactly those to the
184
+ same `update` or `deliver` call with `--paths path/one.ts,path/two.ts`, or `--paths-file <path|->`
185
+ with a JSON string array when a path contains a comma or the list is long. They are recorded as
186
+ Declared, never as native capture. Never use it to enumerate every changed or opened file, and
187
+ never make a separate call just to declare paths.
188
+
189
+ Artifacts and a delivery report remain optional annotations when they add review value. There
190
+ is no per-file explanation input. Use `--payload-json` when the full delivery object fits comfortably inline
184
191
  (roughly under 8 KB). Larger inline `--*-json` values are rejected; stream them through the
185
192
  corresponding `--*-file -` flag. A real scratch path belongs under `$OVERLORD_TMPDIR` (this launch's private
186
193
  `.overlord/tmp/sessions/<id>/` directory); `deliver` removes that directory for you, and nothing
@@ -212,13 +219,31 @@ Only list a human action when a person must perform a concrete non-Git step outs
212
219
  agent's completed work (for example, add a secret, run a production migration, deploy, or
213
220
  configure an external integration). Never list committing, pushing, opening a pull request,
214
221
  reviewing code, or ordinary tests. A tradeoff must state the decision, alternatives considered,
215
- and rationale. Each `deferredWork` item must be a recommended new objective that is not
216
- part of this mission (for example a bug discovered here that belongs outside it). Name
217
- the component or file involved and say why the work was left. Never list work already
218
- covered by this mission's future objectives, leftover slices of the current objective
219
- (add an objective to this mission instead), or human implementation follow-up such as
220
- deploy, secrets, or migrations (those belong in `humanActions`). Use an empty array when
221
- nothing qualifies. Omit the report when none of these facts apply.
222
+ and rationale.
223
+ Each `deferredWork` item is one recommended objective outside this mission. Be very
224
+ concise. `title` names the work in an imperative phrase. `change` states only the specific
225
+ change that is needed. `location` says where to find it in the code: the file, function,
226
+ component, or command. `doneWhen` states the observable result in one sentence. Do not add
227
+ instructions on how to do the work, background, or rationale. The operator turns the item
228
+ into an objective or a mission as written, so it must read as a task, not as a note.
229
+ Never list work already covered by this mission's future objectives,
230
+ leftover slices of the current objective (add an objective to this mission instead), or
231
+ human implementation follow-up such as deploy, secrets, or migrations (those belong in
232
+ `humanActions`). Use an empty array when nothing qualifies. Omit the report when none of these facts apply.
233
+
234
+ #### Writing a deferred-work item
235
+
236
+ | Field | Limit | What to write |
237
+ | ---------- | --------- | ------------------------------------------------------------------- |
238
+ | `title` | 80 chars | The work, as an imperative phrase. Shown as the row title. |
239
+ | `change` | 400 chars | The specific change that is needed, in one or two sentences. |
240
+ | `location` | 200 chars | Where to find it: the file, function, component, or command. |
241
+ | `doneWhen` | 200 chars | The observable result, in one sentence. |
242
+
243
+ All four fields are required. A plain string item is rejected with `invalid_input`.
244
+
245
+ > Vague: `{ "title": "Fix flaky test", "change": "The sync worker has a flaky test.", "location": "backend", "doneWhen": "It passes." }`
246
+ > Good: `{ "title": "Advance the fake clock before the second retry", "change": "The test asserts the retry fired but never advances the fake clock between attempts, so it passes or fails on real time.", "location": "backend/sync-worker.test.ts › retries after a 503", "doneWhen": "The test passes 20 consecutive runs with the fake clock driving both attempts." }`
222
247
 
223
248
  #### Writing a human action the operator can complete
224
249
 
@@ -260,21 +285,42 @@ migrations, `.env.example` changes, dependency manifests, CI workflow files) and
260
285
  them, so leaving one out never hides it; reporting it yourself with a real `command` and
261
286
  `verify` replaces the generic wording with something the operator can follow.
262
287
 
263
- ### Change ledger health (diagnostic)
288
+ ### Reading captured file evidence
264
289
 
265
- Use this only to inspect or troubleshoot objective-ledger synchronization and hook health:
290
+ Read the objective's captured paths once before you write the delivery summary:
266
291
 
267
292
  ```bash
268
- ovld protocol changes --mission-id $MISSION_ID
293
+ ovld protocol changes --objective-id $OBJECTIVE_ID
269
294
  ```
270
295
 
271
- It may flush pending metadata-only ledger entries for the attached objective, then reports the
272
- binding, synchronization result, evidence source/quality, and bounded hook health. It does not
273
- read or diff the worktree, classify files by agent ownership, draft rationales, or gate delivery.
274
- Native paths normalized by the connector-owned codec as `file.edited` are valid, non-exclusive
275
- `declared_edit`/`direct` evidence. Codec-normalized read, search, and fetch callbacks are silent
276
- no-ops. Mutation-capable callbacks without a normalized edit path, plus shell, generic, unknown,
277
- and unmapped callbacks, report unavailable evidence health.
296
+ This is a local read of this checkout's sessions for the objective. It syncs pending ledger
297
+ entries first (sync failure is advisory), then returns synced and pending paths deduplicated by
298
+ path, capped at 200 rows with a pre-cap `total` and `truncated`, plus capture and sync warnings.
299
+ `coverage: "unavailable"` means no local session matched, not "no files changed". It is not
300
+ complete cross-device history: `ovld protocol objective-changes --objective-id $OBJECTIVE_ID`
301
+ (hosted MCP `overlord_changes`) reads the objective's synchronized evidence across sessions,
302
+ resources, and devices, but cannot see unsynchronized local rows. Neither read diffs the
303
+ worktree, classifies ownership, or gates delivery.
304
+
305
+ Each row is cumulative objective evidence, including edits later reverted, with a source:
306
+
307
+ - `declared_edit` (shown as Native): at least one successful native edit callback named the path.
308
+ - `agent_declared` (shown as Declared): you or a record-work call declared the path.
309
+ - `null` (shown as Unknown): historical evidence whose provenance could not be established.
310
+
311
+ Native capture appends a path only for a codec-normalized edit whose outcome is successful.
312
+ Reads, searches, and fetches are silent. Warnings tell you where capture may be incomplete:
313
+
314
+ - `shell_activity_unverified`: a shell command ran; it may or may not have written files.
315
+ - `outcome_partial` / `outcome_unavailable`: an edit failed partway or its result was unknown,
316
+ so no path was recorded.
317
+ - `direct_path_unavailable`: a tool ran that capture cannot map to paths.
318
+ - Binding warnings: tracking was not active for the session (unbound), is configured but no
319
+ callback has been observed, or its availability is unknown (hosted).
320
+ - Sync warnings: some captured paths have not synchronized yet.
321
+
322
+ A warning is not proof that a file changed. Declare only files you know you changed and capture
323
+ missed; when unsure, say in the summary that coverage may be incomplete instead of guessing.
278
324
 
279
325
  ### Shared worktree safety (critical)
280
326
 
@@ -291,42 +337,33 @@ uses the same summary-only delivery as every other objective.
291
337
 
292
338
  Ordinary deliver artifacts should use `next_steps`, `test_results`, `migration`, `note`, `url`, or `decision`.
293
339
 
294
- ### Optional Change Rationales
295
-
296
- Rationales are optional annotations. Overlord records which files an objective changed on its
297
- own, so a delivery never needs them and can never fail for lacking them. Supply one only when
298
- the reason for a change is not obvious from the diff.
340
+ ### Declaring paths native capture missed
299
341
 
300
- Attach them to `update` while working, or to `deliver` at the end. Inline
301
- `--change-rationales-json` is fine for a few entries; larger arrays are **rejected** — use
302
- `--change-rationales-file -` and stream JSON on stdin. The same ~8 KB inline limit applies to
303
- `--payload-json` and other `--*-json` flags.
342
+ Per-file explanations no longer exist: `--change-rationales-*`, `--changed-files-*`, and the
343
+ `changeRationales` / `changedFiles` payload fields are rejected. Explain changes in the summary.
304
344
 
305
- **Fields per entry:** `filePath`, `label`, `summary`, `why`, `impact` (all strings).
306
- Use the canonical `filePath` spelling. Do not wrap the entry under a `rationale` key.
307
-
308
- **Never revert, restore, or delete file changes from other agents or missions.** Leave
309
- unrelated dirty files intact.
345
+ Declare known misses on the call you are already making. A rename declares both endpoints, and
346
+ a deleted or renamed-away path is valid even though it no longer exists:
310
347
 
311
348
  ```bash
312
- ovld protocol update --session-key <sessionKey> --mission-id $MISSION_ID \
313
- --summary "Added retry logic." --phase execute \
314
- --change-rationales-json '[{"label":"Add backoff","filePath":"lib/api.ts","summary":"Added retry.","why":"Transient failures.","impact":"Retries 3x.","hunks":[{"header":"@@ -22,4 +22,18 @@"}]}]'
349
+ ovld protocol deliver --session-key <sessionKey> --objective-id $OBJECTIVE_ID \
350
+ --summary "Narrative: what you did and next steps." \
351
+ --paths src/generated/schema.ts,docs/old-name.md,docs/new-name.md
315
352
  ```
316
353
 
317
- For many entries (roughly 5+), stream them through `--change-rationales-file -` to avoid shell quoting failures:
354
+ For a long list, or a path containing a comma, stream a JSON string array:
318
355
 
319
356
  ```bash
320
- ovld protocol deliver --session-key <sessionKey> --mission-id $MISSION_ID \
357
+ ovld protocol deliver --session-key <sessionKey> --objective-id $OBJECTIVE_ID \
321
358
  --summary "Narrative: what you did and next steps." \
322
- --change-rationales-file - <<'EOF'
323
- [
324
- {"label":"Add backoff","filePath":"lib/api.ts","summary":"Added retry.","why":"Transient failures.","impact":"Retries 3x."},
325
- {"label":"Update config","filePath":"lib/config.ts","summary":"Added timeout.","why":"Match new defaults.","impact":"Requests time out after 30s."}
326
- ]
359
+ --paths-file - <<'EOF'
360
+ ["src/generated/schema.ts", "fixtures/a,b.json"]
327
361
  EOF
328
362
  ```
329
363
 
364
+ Paths are normalized against the checkout. Traversal, symlinks that leave the checkout, ignored
365
+ paths, and Overlord-managed paths are rejected with a reason on stderr and never fail the call.
366
+
330
367
  ### Project Discovery And Mission Creation
331
368
 
332
369
  When creating missions from within a repository:
@@ -427,19 +464,25 @@ A checkout may be linked to more than one project. Default mission association t
427
464
 
428
465
  ## Delivery And Change Evidence
429
466
 
430
- Normal delivery contains the narrative summary only. The CLI synchronizes objective-ledger
431
- evidence independently; neither the agent nor a shared working tree supplies an ownership list.
432
-
433
- - Add a change rationale only when a non-obvious implementation reason materially helps review.
434
- - Do not send `file_changes` as an artifact or reconstruct paths from `git status`.
435
- - `ovld protocol changes` is a ledger-sync and hook-health diagnostic. It does not classify
436
- ownership or draft annotations.
437
- - Do not include unrelated worktree changes in delivery annotations or artifacts.
467
+ The reviewer sees your summary and, separately, a cumulative **Files changed during this
468
+ objective** list grouped by resource. Prepare delivery cheaply:
469
+
470
+ 1. Read the captured paths once (`ovld protocol changes --objective-id <id>`, or
471
+ `overlord_changes` over MCP). See **Reading captured file evidence** above.
472
+ 2. If capture warns about shell, partial, or unsupported activity and you know of files you
473
+ changed that it missed, declare exactly those with `--paths` / `--paths-file` on `deliver`.
474
+ 3. Write the summary by behavior or component: the outcome, why it matters, how you verified it,
475
+ and material limitations, including any capture gap you could not reconcile. A handful of
476
+ representative paths is enough; never enumerate every file or explain files one by one.
477
+
478
+ - Do not run `git status` or `git diff` on a shared worktree to build the list, and do not send
479
+ `file_changes` artifacts. Never infer ownership from timestamps, cwd, a branch, or an
480
+ unrelated dirty file.
481
+ - The list is not a Git diff, a delivery-time snapshot, or proof of exclusive ownership; late
482
+ synchronization may extend it after delivery. That never blocks or invalidates delivery.
438
483
  - **Never revert, restore, or delete file changes from other agents or missions.**
439
484
  - A read-only result uses the same delivery command; summarize that no code change was needed.
440
485
 
441
- The optional annotation shape and `--change-rationales-file -` guidance are under **Optional Change Rationales** above.
442
-
443
486
  ## Rules
444
487
 
445
488
  - Always attach first and always deliver last once you are on a mission.
@@ -473,4 +516,4 @@ The optional annotation shape and `--change-rationales-file -` guidance are unde
473
516
  - [reference/context.md](reference/context.md) — Shared state, attachments, and large artifact policy
474
517
  - [reference/shell-escaping.md](reference/shell-escaping.md) — Heredoc input through explicit `--*-file -` flags
475
518
 
476
- <!-- version: 0.6.0 -->
519
+ <!-- version: 0.8.0 -->
@@ -88,34 +88,60 @@ ovld protocol deliver --session-key <sessionKey> \
88
88
  ```
89
89
 
90
90
  This is the normal delivery shape: a summary is sufficient. The CLI syncs objective-ledger
91
- evidence independently before the lifecycle transition.
91
+ evidence independently before the lifecycle transition; tracking gaps and sync failures never
92
+ block delivery. Write the summary by behavior or component (outcome, why, verification, and
93
+ limitations); there is no per-file explanation input.
92
94
 
93
- Artifacts, optional change rationales, and a delivery report remain current annotations when
94
- they add review value. Use `--payload-json` when the full delivery object fits comfortably inline
95
- (roughly under 8 KB). Larger inline `--*-json` values are rejected; stream them through the
96
- corresponding `--*-file -` flag.
95
+ Artifacts and a delivery report remain optional annotations when they add review value. Use
96
+ `--payload-json` when the full delivery object fits comfortably inline (roughly under 8 KB).
97
+ Larger inline `--*-json` values are rejected; stream them through the corresponding `--*-file -`
98
+ flag.
97
99
 
98
100
  If `heartbeat` succeeds but `deliver` or `update` fails, the session is likely fine — retry with the corresponding `--*-file -` flag instead of inline `--*-json`.
99
101
 
100
- ### Change ledger health
102
+ ### Captured file evidence
101
103
 
102
- Use this only to inspect or troubleshoot objective-ledger synchronization and hook health:
104
+ Read the objective's captured paths once before writing the delivery summary:
103
105
 
104
106
  ```bash
105
- ovld protocol changes --mission-id $MISSION_ID
107
+ ovld protocol changes --objective-id $OBJECTIVE_ID # this checkout's sessions
108
+ ovld protocol objective-changes --objective-id $OBJECTIVE_ID # synchronized server history
106
109
  ```
107
110
 
108
- It may flush pending metadata-only ledger entries for the attached objective, then reports the
109
- binding, synchronization result, evidence source/quality, and bounded hook health. It does not
110
- read or diff the worktree, classify files by agent ownership, draft rationales, or gate delivery.
111
- Native paths normalized by the connector-owned codec as `file.edited` are valid, non-exclusive
112
- `declared_edit`/`direct` evidence. Codec-normalized read, search, and fetch callbacks are silent
113
- no-ops. Mutation-capable callbacks without a normalized edit path, plus shell, generic, unknown,
114
- and unmapped callbacks, report unavailable evidence health.
111
+ `changes` is local-only: it syncs pending ledger entries (failure is advisory) and returns
112
+ `LocalObjectiveChangesDto` with `scope: "local_objective_sessions"`, synced and pending paths
113
+ deduplicated by path, a 200-row cap with pre-cap `total` and `truncated`, and capture and sync
114
+ warnings. `coverage: "unavailable"` means no local session matched, not that nothing changed.
115
+ `objective-changes` (hosted MCP `overlord_changes`) returns `ObjectiveFileChangesDto` with
116
+ `scope: "server_objective"` across every session, resource, and device, but cannot see
117
+ unsynchronized local rows. Neither read diffs the worktree, classifies ownership, or gates
118
+ delivery.
119
+
120
+ Rows are cumulative objective evidence, including edits later reverted. `source` is
121
+ `declared_edit` (Native: at least one successful native edit callback), `agent_declared`
122
+ (Declared), or `null` (Unknown historical provenance). Native capture appends a path only for a
123
+ codec-normalized edit with a successful outcome; reads, searches, and fetches are silent. Gap
124
+ codes mean capture may be incomplete, not that a file changed: `shell_activity_unverified`
125
+ (shell ran), `outcome_partial` / `outcome_unavailable` (an edit failed partway or its result was
126
+ unknown, so no path was recorded), and `direct_path_unavailable` (an unmappable tool ran).
127
+ Binding warnings distinguish an unbound session, a bound session with no observed callback, and
128
+ unknown (hosted) availability.
129
+
130
+ When you know you changed files capture missed (shell or heredoc writes, script or generator
131
+ outputs, deletes, and both rename endpoints), declare exactly those on the existing `update` or
132
+ `deliver` call:
115
133
 
116
- For outputs of a generator, migration, or file-writing script that the hook cannot name, an agent
117
- may add `--paths path/one.ts,path/two.ts` to its existing `update` or `deliver` call. It is
118
- optional, paths-only metadata; it is never a request to enumerate every changed or opened file.
134
+ ```bash
135
+ ovld protocol deliver --session-key <sessionKey> --objective-id $OBJECTIVE_ID \
136
+ --summary "Narrative: what you did and next steps." \
137
+ --paths src/generated/schema.ts,docs/old-name.md,docs/new-name.md
138
+ ```
139
+
140
+ Use `--paths-file <path|->` with a JSON string array for long lists or paths containing commas.
141
+ Paths are normalized against the checkout; traversal, symlinks leaving the checkout, ignored
142
+ paths, and Overlord-managed paths are rejected with a reason on stderr and never fail the call.
143
+ Absent targets (deleted or renamed-away files) are valid. Never enumerate every changed or
144
+ opened file, and when unsure, describe the coverage gap in the summary instead of guessing.
119
145
 
120
146
  ### Shared worktree safety (critical)
121
147
 
@@ -132,42 +158,11 @@ uses the same summary-only delivery as every other objective.
132
158
 
133
159
  Ordinary deliver artifacts should use `next_steps`, `test_results`, `migration`, `note`, `url`, or `decision`.
134
160
 
135
- ## Optional Change Rationales
161
+ ## Retired Per-File Inputs
136
162
 
137
- Rationales are optional annotations stored as `change_rationales` rows. Overlord records
138
- which files an objective changed on its own, so a delivery never requires them and cannot
139
- fail for lacking them. Supply one only when the reason for a change is not obvious from the
140
- diff.
141
-
142
- Attach them to `update` while working, or to `deliver` at the end. Inline
143
- `--change-rationales-json` is fine for a few entries; larger arrays are **rejected** — use
144
- `--change-rationales-file -` and stream JSON on stdin. The same ~8 KB inline limit applies to
145
- `--payload-json` and other `--*-json` flags.
146
-
147
- **Fields per entry:** `filePath`, `label`, `summary`, `why`, `impact` (all strings),
148
- plus optional `hunks` containing only a `header` string. Use the canonical
149
- `filePath` spelling. Do not wrap the entry under a `rationale` key. Unknown keys
150
- discard only that advisory item or hunk with a bounded warning; the last valid
151
- item wins when a canonical path is repeated.
152
-
153
- ```bash
154
- ovld protocol update --session-key <sessionKey> --mission-id $MISSION_ID \
155
- --summary "Added retry logic." --phase execute \
156
- --change-rationales-json '[{"label":"Add backoff","filePath":"lib/api.ts","summary":"Added retry.","why":"Transient failures.","impact":"Retries 3x.","hunks":[{"header":"@@ -22,4 +22,18 @@"}]}]'
157
- ```
158
-
159
- For many entries (roughly 5+), stream them through `--change-rationales-file -` to avoid shell quoting failures:
160
-
161
- ```bash
162
- ovld protocol deliver --session-key <sessionKey> --mission-id $MISSION_ID \
163
- --summary "Narrative: what you did and next steps." \
164
- --change-rationales-file - <<'EOF'
165
- [
166
- {"label":"Add backoff","filePath":"lib/api.ts","summary":"Added retry.","why":"Transient failures.","impact":"Retries 3x."},
167
- {"label":"Update config","filePath":"lib/config.ts","summary":"Added timeout.","why":"Match new defaults.","impact":"Requests time out after 30s."}
168
- ]
169
- EOF
170
- ```
163
+ `--change-rationales-json|file`, `--changed-files-json|file`, and the `changeRationales` /
164
+ `changedFiles` payload fields are rejected on `update`, `deliver`, and `record-work`. Explain
165
+ changes in the summary and declare missed paths with `--paths` / `--paths-file`.
171
166
 
172
167
  ## Project Discovery And Mission Creation
173
168
 
@@ -183,7 +178,7 @@ When creating missions from within a repository:
183
178
  - `add-objectives` uses the same per-item `autoAdvance` field and `--auto-advance` / `--no-auto-advance` mapping.
184
179
  - Every objective item on `create`, `prompt`, and `add-objectives` also takes optional `"agent"` and `"model"` (a model requires an agent), and `--objective-agent <id>` / `--objective-model <id>` set the default for items that name no `agent` of their own. Assign the agent on the objectives you are already creating rather than appending a second objective just to name one. `--objective-agent` is distinct from `--agent`, which records creation provenance (and, on `prompt`, the attaching agent).
185
180
  - Use `ovld protocol run-queue [--project-id <id|slug|name>|--objective-id <id>|--mission-id <id>] [--queue <id|name>]` to inspect live queues. Entry operations use `queue-objective --objective-id <id> [--queue <id|name>] [--after <queued-entry|objective>|--front|--position <rank>]`, `dequeue-objective --objective-id <id>`, and `reorder-run-queue --queue <id|name> --ordered-entries-json <json>`; they require `execution_request:create`. Queue-definition operations use `create-run-queue`, `update-run-queue`, `delete-run-queue`, and `reorder-project-run-queues`; they require `project:update` and therefore a full-scope token.
186
- - `record-work` creates exactly one **completed** objective from a single `--objective` (or positional / an `objective` field in `--payload-json`) plus a `--summary` and file-change data — it does not take `--objectives-json`. See [record-work.md](record-work.md).
181
+ - `record-work` creates exactly one **completed** objective from a single `--objective` (or positional / an `objective` field in `--payload-json`) plus a `--summary` and optional `declaredPaths` — it does not take `--objectives-json`. See [record-work.md](record-work.md).
187
182
 
188
183
  ```bash
189
184
  ovld protocol create --project-id <project-id> --agent <agent-identifier> --objectives-json '[{"objective":"Capture follow-up work from this repository"}]'
@@ -211,25 +206,20 @@ ovld protocol update-objective --objective-id <objective-uuid> --auto-advance
211
206
  ### Record Completed Work
212
207
 
213
208
  Record already-finished chat work as a completed review mission in one call — no
214
- `attach`/`deliver`. Creates a mission with one completed objective, records explicitly supplied
215
- changed files and optional rationales, lands it in review, and runs the Gemini delivery summary.
209
+ `attach`/`deliver`. Creates a mission with one completed objective, records declared paths as
210
+ Declared evidence, lands it in review, and runs the Gemini delivery summary.
216
211
 
217
212
  ```bash
218
213
  ovld protocol record-work --payload-file - <<'EOF'
219
214
  {
220
215
  "objective": "Add a CSV export button to the reports page.",
221
216
  "summary": "Added a CSV export control and the serializer behind it.",
222
- "changeRationales": [
223
- { "filePath": "src/reports/export.ts", "label": "CSV serializer",
224
- "summary": "New CSV serializer.", "why": "Users need offline reports.",
225
- "impact": "Reports can be exported as CSV." }
226
- ]
217
+ "declaredPaths": ["src/reports/export.ts"]
227
218
  }
228
219
  EOF
229
220
  ```
230
221
 
231
- The full submission format, including the `record-work`-only `changedFiles` field and MCP
232
- equivalent, is in [record-work.md](record-work.md).
222
+ The full submission format, including `declaredPaths` rules and the MCP equivalent, is in [record-work.md](record-work.md).
233
223
 
234
224
  To inspect project resolution explicitly:
235
225
 
@@ -34,7 +34,7 @@ When a later objective or follow-up must revise a plan, notes, or URL artifact c
34
34
  For large artifacts such as planning documents, architecture decisions, research summaries, or design documents: **save the full content as a markdown file in the linked repository, then summarize it in the artifact returned to the mission.**
35
35
 
36
36
  - Save to a meaningful path in the repository (e.g., `ai/feature-plans/my-feature.md` for feature plans, `docs/decisions/my-decision.md` for architecture decision records).
37
- - Commit the file as part of the mission's work so it appears in `changeRationales`.
37
+ - Write it with your normal edit tool so native capture lists it among the objective's changed files (declare it with `--paths` if you wrote it from a shell command).
38
38
  - Prefer `add-artifact` mid-turn (or a delivery artifact) with a `note` or `decision` type, a concise summary, and the repository file path — not the full document content.
39
39
 
40
40
  This keeps the mission feed readable while preserving the full document in version control where it can be reviewed, diffed, and referenced later. If that summary artifact already exists on the mission, revise it with `update-artifact` rather than creating another copy.
@@ -6,9 +6,10 @@
6
6
  - `discover_project` accepts an explicit project id (`projectId` hosted, `project_id` local shim) or a working directory (`workingDirectory` hosted, `working_directory` local shim). When resolving by directory and a device fingerprint is available, include `deviceFingerprint` / `device_fingerprint` so resource-directory matching prefers the current device.
7
7
  - `permission-request` is invoked by connector permission hooks installed by adapter bundles. Agents do not normally call it directly.
8
8
  - Execution request tools (`request_execution`, `claim_execution`, `list_execution_requests`, `clear_execution_requests`, `complete_execution_launch`, `fail_execution_launch`) back the local runner queue. Agents normally work missions with `attach`/`update`/`deliver`; runner processes use these queue tools.
9
- - Change rationales are optional annotations attached to `update` or `deliver` (`--change-rationales-json` / `--change-rationales-file`, or `changeRationales` over MCP) and stored as `change_rationales` rows. Normal delivery requires only a summary; objective-ledger evidence is captured locally and synchronized independently.
9
+ - Normal delivery requires only a summary, written by behavior or component; there is no per-file explanation input, and the retired `changeRationales` / `changedFiles` fields are rejected. `overlord_update_session`, `overlord_deliver_session`, and `overlord_record_work` accept optional `declaredPaths`: a JSON array of repository-relative paths you know you changed that native capture missed, such as script outputs, deletes, and both rename endpoints. They are recorded as Declared evidence and never block the call.
10
+ - `overlord_changes` (hosted MCP) reads one objective's synchronized file evidence across every session, resource, and device (`scope: "server_objective"`, rows capped at 200 with a pre-cap `total` and `truncated`, plus capture warnings). It needs no attached session, mutates nothing, and cannot see unsynchronized local rows; the local `ovld protocol changes --objective-id` read covers this checkout's pending evidence. The route is `POST /api/protocol/objective-changes`.
10
11
  - `overlord_create_mission` requires `projectId` for a mission, unless `unassignedToProject: true` deliberately requests an account-owned inbox item; omission of both is rejected. `overlord_create_inbox_item` is also explicit by name.
11
- - `overlord_record_work` (hosted MCP) and `ovld protocol record-work` (CLI) record already-completed chat work as a single review-column mission with a completed objective, explicitly supplied changed files, optional rationales, and the standard Gemini delivery summary — no `attach`/`deliver`. Both require an explicit project reference. The submission format is in [record-work.md](record-work.md). The route is `POST /api/protocol/record-work`.
12
+ - `overlord_record_work` (hosted MCP) and `ovld protocol record-work` (CLI) record already-completed chat work as a single review-column mission with a completed objective, optional declared paths, and the standard Gemini delivery summary — no `attach`/`deliver`. Both require an explicit project reference. The submission format is in [record-work.md](record-work.md). The route is `POST /api/protocol/record-work`.
12
13
  - `overlord_add_artifact` (hosted MCP) and `ovld protocol add-artifact` (CLI) create a mission artifact during a turn without delivering. Required: `type` / `--type`, `label` / `--label`, mission scope (`missionId` / `--mission-id`, or an objective display id as `objectiveId` / `--objective-id`), plus at least one of `contentText` / `--content-text`/`--content-text-file` or `externalUrl` / `--external-url`. Optional `sessionKey` / `--session-key` stamps session/objective provenance; `objectiveId` / `--objective-id` does the same when there is no live session, and the session key wins if both are given. Same service as REST `POST /api/missions/:id/artifacts`. The route is `POST /api/protocol/add-artifact`.
13
14
  - `overlord_update_artifact` (hosted MCP) and `ovld protocol update-artifact` (CLI) revise an existing mission artifact's label, Markdown content, and/or HTTP(S) URL in place. Required: `artifactId` / `--artifact-id`, `expectedRevision` / `--expected-revision`, and mission scope (`missionId` / `--mission-id`, or an objective display id as `objectiveId` / `--objective-id`). Provide at least one editable field. No session key is required. Same service as REST `PATCH /api/missions/:id/artifacts/:artifactId`. The route is `POST /api/protocol/update-artifact`.
14
15
  - `overlord_delete_missions` / `overlord_delete_objectives` (hosted MCP) and `ovld protocol delete-missions` / `delete-objectives` (CLI) bulk soft-delete one to 100 mission or objective UUID/display-id references atomically. They require `confirm: true` / `--confirm`; before setting it, agents must show the resolved list to the user and receive affirmative approval. A missing, duplicate, deleted, or unauthorized target rejects the entire request. Mission deletion includes live child objectives; objective deletion removes live Run Queue membership.
@@ -5,7 +5,7 @@ just built for the user in a chat app — as a completed Overlord mission. It is
5
5
  after-the-fact equivalent of `create` + `attach` + `deliver`, collapsed into one call:
6
6
 
7
7
  1. Creates a mission with a **single completed objective** matching the work done.
8
- 2. Records explicitly supplied changed files and any optional reviewer annotations.
8
+ 2. Records any paths you declare as the objective's Declared file evidence.
9
9
  3. Lands the mission in the **review** column.
10
10
  4. Runs the delivery through the **standard Gemini delivery summarizer**, so the result
11
11
  reads like any other delivered (in-review) mission.
@@ -24,18 +24,7 @@ identical across the CLI (`--payload-file -`) and the hosted MCP tool
24
24
  "objective": "What was asked and what you did, phrased as a completed objective (1–3 sentences).",
25
25
  "summary": "Reviewer-facing narrative of what changed and why. This is what the PM reads first.",
26
26
  "title": "Optional mission title; defaults to a title derived from the objective.",
27
- "changeRationales": [
28
- {
29
- "filePath": "src/widget.ts", // repository-relative path
30
- "label": "Add widget", // short reviewer title
31
- "summary": "New widget module.", // what changed in this file
32
- "why": "User asked for a widget.", // why it changed
33
- "impact": "Widget now renders on the dashboard." // behavioral impact
34
- }
35
- ],
36
- "changedFiles": [
37
- { "filePath": "src/generated.ts", "vcsStatus": "M" }
38
- ],
27
+ "declaredPaths": ["src/widget.ts", "src/generated.ts"], // optional repository-relative paths
39
28
  "artifacts": [
40
29
  { "type": "next_steps", "label": "Next steps", "content": "…" } // optional
41
30
  ]
@@ -48,24 +37,29 @@ identical across the CLI (`--payload-file -`) and the hosted MCP tool
48
37
  `--objective`/positional on the CLI; a flag always wins over the envelope.
49
38
  - **`summary`** (required) — narrative, not a command list.
50
39
  - **`title`** (optional) — omit to derive from the objective.
51
- - **`changeRationales`** (optional reviewer annotations) — same shape as `deliver`. All
52
- five string fields (`filePath`, `label`, `summary`, `why`, `impact`) are required per
53
- entry. Use canonical `filePath`; do **not** wrap entries under a `rationale` key.
54
- - **`changedFiles`** (optional, `record-work` only) — files known to have changed during
55
- this completed chat work. Each entry is an object with a canonical repository-relative
56
- `filePath` and optional bounded `vcsStatus`; raw strings, absolute paths, and extra fields
57
- are rejected. A rationale's `filePath` is recorded automatically, so do not list it twice.
58
- Do not infer ownership from a shared-worktree-wide status or diff.
40
+ - **`declaredPaths`** (optional) — the files you know you changed for this work, as a
41
+ JSON array of canonical repository-relative path strings (deleted files and both
42
+ endpoints of a rename are valid). There is no native capture for record-work, so every
43
+ path is recorded with Declared provenance and no resource. Absolute, traversing, and
44
+ Overlord-managed paths are ignored with a bounded warning and never fail the record. A
45
+ handful of representative paths is fine; do not infer the list from a shared-worktree
46
+ status or diff. Explain the change in `summary`: there is no per-file explanation field,
47
+ and the retired `changeRationales` / `changedFiles` inputs are rejected.
59
48
  - **`artifacts`** (optional) — `next_steps`, `test_results`, `migration`, `note`, `url`,
60
49
  or `decision`.
61
50
  - **`deliveryReport`** (optional) — you may include a `deliveryReport.agentReport`
62
51
  (`humanActions`, `tradeoffsMade`, `knownRisks`, `deferredWork`, `assumptions`) just as
63
- in `deliver`. Each `deferredWork` item must be a recommended new objective that is not
64
- part of this mission (for example a bug discovered here that belongs outside it). Name
65
- the component or file involved and say why the work was left. Never list work already
66
- covered by this mission's future objectives, leftover slices of the current objective,
67
- or human implementation follow-up (those belong in `humanActions`). Use an empty array
68
- when nothing qualifies. It improves review visibility but never blocks the record.
52
+ in `deliver`. Each `deferredWork` item is one recommended objective outside this
53
+ mission. Be very concise. `title` names the work in an imperative phrase. `change`
54
+ states only the specific change that is needed. `location` says where to find it in
55
+ the code: the file, function, component, or command. `doneWhen` states the observable
56
+ result in one sentence. Do not add instructions on how to do the work, background, or
57
+ rationale. The operator turns the item into an objective or a mission as written, so it
58
+ must read as a task, not as a note. All four fields are required (at most 80, 400, 200
59
+ and 200 characters); a plain string item is rejected with `invalid_input`. Never list
60
+ work already covered by this mission's future objectives, leftover slices of the
61
+ current objective, or human implementation follow-up (those belong in `humanActions`).
62
+ Use an empty array when nothing qualifies. It improves review visibility but never blocks the record.
69
63
 
70
64
  ## CLI
71
65
 
@@ -76,14 +70,7 @@ ovld protocol record-work --payload-file - <<'EOF'
76
70
  {
77
71
  "objective": "Add a CSV export button to the reports page.",
78
72
  "summary": "Added a CSV export control and the serializer behind it.",
79
- "changeRationales": [
80
- { "filePath": "src/reports/export.ts", "label": "CSV serializer",
81
- "summary": "New CSV serializer.", "why": "Users need offline reports.",
82
- "impact": "Reports can be exported as CSV." }
83
- ],
84
- "changedFiles": [
85
- { "filePath": "src/reports/generated-schema.ts", "vcsStatus": "M" }
86
- ]
73
+ "declaredPaths": ["src/reports/export.ts", "src/reports/generated-schema.ts"]
87
74
  }
88
75
  EOF
89
76
  ```
@@ -103,14 +90,7 @@ Call `overlord_record_work` with the same fields as first-class arguments
103
90
  "projectId": "acme-web",
104
91
  "objective": "Add a CSV export button to the reports page.",
105
92
  "summary": "Added a CSV export control and the serializer behind it.",
106
- "changeRationales": [
107
- { "filePath": "src/reports/export.ts", "label": "CSV serializer",
108
- "summary": "New CSV serializer.", "why": "Users need offline reports.",
109
- "impact": "Reports can be exported as CSV." }
110
- ],
111
- "changedFiles": [
112
- { "filePath": "src/reports/generated-schema.ts", "vcsStatus": "M" }
113
- ]
93
+ "declaredPaths": ["src/reports/export.ts", "src/reports/generated-schema.ts"]
114
94
  }
115
95
  ```
116
96