@journeykit/canon 0.32.0 → 0.33.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 (118) hide show
  1. package/dist/index.js +4 -0
  2. package/dist/skills/SKILL.src.md +19 -11
  3. package/dist/skills/reference/canon-context.md +1 -1
  4. package/dist/skills/reference/canon-gate.md +1 -1
  5. package/dist/skills/reference/canon-review.md +2 -2
  6. package/dist/skills/reference/canon-storage.md +4 -3
  7. package/dist/skills/reference/canon-subject.md +14 -12
  8. package/dist/skills/reference/role-implementer.md +2 -2
  9. package/dist/skills/reference/role-orchestrator.md +8 -8
  10. package/dist/skills/reference/role-planner.md +1 -1
  11. package/dist/skills/reference/role-reviewer.md +2 -2
  12. package/man/canon-adapter-authorize.1 +2 -2
  13. package/man/canon-adapter-validate.1 +2 -2
  14. package/man/canon-adapter.1 +2 -2
  15. package/man/canon-artifacts-move.1 +3 -3
  16. package/man/canon-artifacts-store.1 +2 -2
  17. package/man/canon-artifacts-verify.1 +2 -2
  18. package/man/canon-artifacts.1 +2 -2
  19. package/man/canon-brief-approve.1 +2 -2
  20. package/man/canon-brief-check.1 +2 -2
  21. package/man/canon-brief-show.1 +2 -2
  22. package/man/canon-brief.1 +2 -2
  23. package/man/canon-change-new.1 +2 -2
  24. package/man/canon-change.1 +2 -2
  25. package/man/canon-completion.1 +2 -2
  26. package/man/canon-context-pack-add.1 +2 -2
  27. package/man/canon-context-pack-show.1 +2 -2
  28. package/man/canon-context-pack-verify.1 +2 -2
  29. package/man/canon-context-pack.1 +2 -2
  30. package/man/canon-context.1 +2 -2
  31. package/man/canon-dashboard.1 +2 -2
  32. package/man/canon-demo-init.1 +2 -2
  33. package/man/canon-demo-review.1 +2 -2
  34. package/man/canon-demo.1 +2 -2
  35. package/man/canon-dispatch-begin.1 +2 -2
  36. package/man/canon-dispatch-diff.1 +2 -2
  37. package/man/canon-dispatch-end.1 +2 -2
  38. package/man/canon-dispatch.1 +2 -2
  39. package/man/canon-divergence-accept.1 +2 -2
  40. package/man/canon-divergence-add.1 +2 -2
  41. package/man/canon-divergence-defer.1 +2 -2
  42. package/man/canon-divergence-list.1 +2 -2
  43. package/man/canon-divergence-resolve.1 +2 -2
  44. package/man/canon-divergence.1 +2 -2
  45. package/man/canon-evidence-add.1 +2 -2
  46. package/man/canon-evidence-approval-payload.1 +2 -2
  47. package/man/canon-evidence-audit.1 +2 -2
  48. package/man/canon-evidence.1 +2 -2
  49. package/man/canon-export.1 +2 -2
  50. package/man/canon-feature-new.1 +2 -2
  51. package/man/canon-feature.1 +2 -2
  52. package/man/canon-finding-add.1 +2 -2
  53. package/man/canon-finding-close.1 +2 -2
  54. package/man/canon-finding-list.1 +2 -2
  55. package/man/canon-finding.1 +2 -2
  56. package/man/canon-format.1 +2 -2
  57. package/man/canon-gate-check.1 +2 -2
  58. package/man/canon-gate-install-hooks.1 +2 -2
  59. package/man/canon-gate-promote.1 +2 -2
  60. package/man/canon-gate.1 +2 -2
  61. package/man/canon-ingest-plans.1 +2 -2
  62. package/man/canon-ingest-records.1 +2 -2
  63. package/man/canon-ingest-sessions.1 +2 -2
  64. package/man/canon-ingest.1 +2 -2
  65. package/man/canon-init.1 +2 -2
  66. package/man/canon-inventory-sync.1 +2 -2
  67. package/man/canon-inventory.1 +2 -2
  68. package/man/canon-ledger-compact.1 +2 -2
  69. package/man/canon-ledger.1 +2 -2
  70. package/man/canon-migrate.1 +2 -2
  71. package/man/canon-plugin-sync.1 +2 -2
  72. package/man/canon-plugin.1 +2 -2
  73. package/man/canon-policy-approve.1 +2 -2
  74. package/man/canon-policy-show.1 +2 -2
  75. package/man/canon-policy.1 +2 -2
  76. package/man/canon-prompt-add.1 +2 -2
  77. package/man/canon-prompt-show.1 +2 -2
  78. package/man/canon-prompt.1 +2 -2
  79. package/man/canon-purge.1 +2 -2
  80. package/man/canon-query.1 +2 -2
  81. package/man/canon-regime-show.1 +2 -2
  82. package/man/canon-regime.1 +2 -2
  83. package/man/canon-report-build.1 +2 -2
  84. package/man/canon-report-check.1 +2 -2
  85. package/man/canon-report-snapshot.1 +2 -2
  86. package/man/canon-report.1 +2 -2
  87. package/man/canon-retrieve.1 +2 -2
  88. package/man/canon-review-change.1 +2 -2
  89. package/man/canon-review-scenario.1 +2 -2
  90. package/man/canon-review.1 +2 -2
  91. package/man/canon-scenario-new.1 +2 -2
  92. package/man/canon-scenario.1 +2 -2
  93. package/man/canon-schema.1 +2 -2
  94. package/man/canon-search.1 +2 -2
  95. package/man/canon-selftest.1 +2 -2
  96. package/man/canon-skills-check.1 +2 -2
  97. package/man/canon-skills-doctor.1 +2 -2
  98. package/man/canon-skills-install.1 +2 -2
  99. package/man/canon-skills-show.1 +2 -2
  100. package/man/canon-skills.1 +2 -2
  101. package/man/canon-status.1 +2 -2
  102. package/man/canon-strategy-approval-payload.1 +2 -2
  103. package/man/canon-strategy-promote.1 +2 -2
  104. package/man/canon-strategy-rollback.1 +2 -2
  105. package/man/canon-strategy.1 +2 -2
  106. package/man/canon-subject-adopt.1 +2 -2
  107. package/man/canon-subject-move.1 +2 -2
  108. package/man/canon-subject-new.1 +2 -2
  109. package/man/canon-subject-show.1 +2 -2
  110. package/man/canon-subject-unadopt.1 +2 -2
  111. package/man/canon-subject.1 +2 -2
  112. package/man/canon-task-done.1 +2 -2
  113. package/man/canon-task.1 +2 -2
  114. package/man/canon-tier-age.1 +2 -2
  115. package/man/canon-tier.1 +2 -2
  116. package/man/canon-trace.1 +2 -2
  117. package/man/canon.1 +2 -2
  118. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  // src/index.ts
4
4
  import { spawnSync, execSync } from "node:child_process";
5
5
  import { existsSync, readdirSync, realpathSync } from "node:fs";
6
+ import { constants as osConstants } from "node:os";
6
7
  import { resolve, join, basename } from "node:path";
7
8
  import { fileURLToPath } from "node:url";
8
9
  var binaryName = process.platform === "win32" ? "canon.exe" : "canon";
@@ -165,4 +166,7 @@ var result = spawnSync(binary, process.argv.slice(2), {
165
166
  if (result.error) {
166
167
  console.error(`canon: failed to run ${binary}: ${result.error.message}`);
167
168
  }
169
+ if (result.status === null && result.signal) {
170
+ process.exit(128 + (osConstants.signals[result.signal] ?? 0));
171
+ }
168
172
  process.exit(result.status ?? 1);
@@ -186,7 +186,7 @@ variable, and an unknown value is refused (`UNKNOWN_ROLE`).
186
186
  - **A role is set, or you were spawned as one:** load only
187
187
  `canon skills show role-<role>` and do that role's steps. `canon status`
188
188
  and `meta.next` then show only your role's steps, and count the others in
189
- `waitingOn`; `canon schema --as <role>` lists only your role's commands.
189
+ `data.waitingOn`; `canon schema --as <role>` lists only your role's commands.
190
190
  Do not load another role's guide.
191
191
  - **No role (one agent doing everything):** follow `canon status` and load
192
192
  each role guide as its phase starts: planner for steps 1–2,
@@ -201,8 +201,11 @@ A role is guidance, not enforcement: `--role` on `evidence add` and
201
201
 
202
202
  - Start a session with `canon status`: where each subject stands and the next
203
203
  commands. After that, do not call it only to learn the next step: every
204
- write returns `meta.next` (`[{command, argv, why, actor, role}]`), the same
205
- steps `status` would give, narrowed to what the write touched. `actor: human`
204
+ write returns `meta.next` (`[{command, argv, reason, x-canon: {actor, role}}]`), the same
205
+ steps `status` would give, narrowed to what the write touched. Each entry is
206
+ runnable: `argv` is the command without `canon` (with `--json` when you
207
+ called in JSON mode). Guidance that needs a value you must fill in is not a
208
+ next entry; it is in the error `hint` or the report text. `x-canon.actor: human`
206
209
  marks a step only the human takes.
207
210
  - Your role guide's **Commands** block (`canon skills show role-<role>`) is
208
211
  your complete command set, every option of every leaf included. Run `canon schema <command> --json` only for a
@@ -211,20 +214,25 @@ A role is guidance, not enforcement: `--role` on `evidence add` and
211
214
  - Pass `--json` and read stdout as one document, nothing on stderr. Success is
212
215
  `{"ok":true,"data":…,"meta":…}`; failure is
213
216
  `{"ok":false,"error":{…},"meta":…}` (a check that fails keeps its report in
214
- `data`). `meta` carries `command`, `schemaVersion`, `canonVersion`, `next`,
215
- `warnings` and, for a repeated write that changed nothing, `unchanged: true`.
217
+ `data`). `meta` carries `tool`, `toolVersion`, `contract` (`atip/1`), `schemaVersion`,
218
+ `command`, and when present `next`, `warnings` (`[{code, message}]`) and
219
+ `page`; a repeated write that changed nothing reports `data.unchanged: true`.
220
+ Absent members are omitted, never `null` or `[]`. A paged list puts
221
+ `meta.page.nextCursor` on the call's `meta.next` as `--cursor <nextCursor>`;
222
+ no `nextCursor` means no more.
216
223
  On failure branch on `error.code`, fix the option `error.field` names
217
224
  using the `error.expected` values (`field` is an option name, or a JSON
218
225
  pointer such as `/items/2/scenario` into an `--input` document), and
219
226
  follow `error.hint`: every refusal carries a working invocation. The codes
220
227
  are stable; `canon schema --errors --json` lists them and
221
228
  `canon schema --error <CODE>` explains one.
222
- - **Exit codes:** 0 ok; 1 the command's own finding (a failed check, a
223
- violation, or `unverifiable` when nothing was examined); 2 refused (usage,
229
+ - **Exit codes:** only 0, 1 and 2 exist: 0 ok; 1 the command ran and its answer
230
+ is negative or incomplete (a failed check, a violation, `unverifiable` when
231
+ nothing was examined, a partly failed batch); 2 refused to run (usage,
224
232
  `CONFIG_MISSING`, an id or file that does not exist, an invalid argument).
225
233
  A refusal leaves the tree unchanged.
226
234
  - Repeating a write is safe: a record that already exists with identical
227
- content is reported `unchanged` (`meta.unchanged`), not duplicated.
235
+ content is reported `unchanged` (`data.unchanged`), not duplicated.
228
236
  - An option that takes an id is the bare noun (`--change add-login`,
229
237
  `--scenario auth.login.01`, `--actor reviewer-1`, `--project root`,
230
238
  `--session s-1`), and an `--input` document key is that name without `Id`
@@ -257,8 +265,8 @@ from a file or stdin) is a batch, run in order and answered with
257
265
  `skipped`, and that element's `data` or `error`). A batch is validated whole
258
266
  before anything is written: an invalid element writes nothing and exits 2,
259
267
  `error.field` pointing at `/items/<i>/<key>`; a write that fails stops there
260
- (exit 1) and re-running the same batch reports the finished elements
261
- `unchanged`. A typo in a key is refused (`INPUT_UNKNOWN_FIELD`), never dropped.
268
+ (exit 1, `BATCH_INCOMPLETE`) and re-running the same batch reports the finished elements
269
+ `unchanged`. A typo in a key is refused (`INPUT_INVALID`, `field` naming the key), never dropped.
262
270
  `canon schema <command> --json` shows the leaf's input schema and an example.
263
271
 
264
272
  ```text
@@ -276,7 +284,7 @@ The five commands that delete or rewrite existing data (`canon purge`,
276
284
  `canon tier age`, `canon ledger compact`, `canon artifacts move`,
277
285
  `canon migrate`) act in two steps. The bare run previews: it writes nothing,
278
286
  exits 0 and prints the effects and a `planDigest`. Read the effects, then act
279
- with `--commit --plan-digest <planDigest>`. It refuses (`PLAN_CHANGED`) when
287
+ with `--commit --plan-digest <planDigest>`. It refuses (`PLAN_STALE`) when
280
288
  the plan differs from the one you previewed, so run the preview again. Appends
281
289
  and state transitions (`gate promote`, `subject move`) run directly. Where a
282
290
  preview helps elsewhere (`init`, `skills install`, `export`, `inventory sync`,
@@ -35,7 +35,7 @@ and what to run next. `--json` prints the `{ok, data, meta}` envelope: the
35
35
  header adds no field, and `policy.spec_coverage`/`policy.diagnostics`
36
36
  already carry the same fact. `--fields <list>` keeps only the named
37
37
  top-level fields (`kinds`, `enums`, `policy`, `review`, …); an unknown name is
38
- `UNKNOWN_FIELD` (exit 2).
38
+ `USAGE` (exit 2; `field` is `--fields`, `expected` lists the selectable fields).
39
39
 
40
40
  On a repository that still holds 0.27 canon state, `canon context` warns
41
41
  and puts `canon migrate --json` first in `meta.next`: run `canon migrate`
@@ -347,7 +347,7 @@ brief_override:
347
347
  Under `--json` the same waiver is `data.overrides[]` (`code` of the waived
348
348
  refusal, `reason` verbatim), so a caller sees what its `--override-reason`
349
349
  let through; a repeat of an identical record is `unchanged`
350
- (`meta.unchanged`) and records no second override. `--override-reason`
350
+ (`data.unchanged`) and records no second override. `--override-reason`
351
351
  exists on `subject move` too (see `canon-subject`).
352
352
 
353
353
  A blank or multi-line reason exits 2; an override when nothing refused is
@@ -122,7 +122,7 @@ Many findings at once: `--input` takes inline JSON, a file or `-`; an array
122
122
  (or NDJSON) is a batch validated before any write. Keys are the option
123
123
  names in camelCase (`change`, `actor`, `resolutionRev`); `canon schema
124
124
  finding add --json` shows the input schema and an example. An identical
125
- repeat is `unchanged` (`meta.unchanged`) and writes nothing; a different
125
+ repeat is `unchanged` (`data.unchanged`) and writes nothing; a different
126
126
  finding under an occupied key is `FINDING_SEQ_OCCUPIED`.
127
127
 
128
128
  ### A defect the author found in its own work
@@ -198,7 +198,7 @@ allowed, and the commit made from it has the same code tree, so committing it
198
198
  afterwards leaves the review as it was: a review is judged by its pins (the
199
199
  scenario and what its evidence says), not by the commit. Outside git, or
200
200
  with no commit, the write is refused with `NO_COMMIT`. An identical review
201
- written again is `unchanged` (`meta.unchanged` under `--json`) and adds no
201
+ written again is `unchanged` (`data.unchanged` under `--json`) and adds no
202
202
  record.
203
203
 
204
204
  **Done when:** `canon gate check` reports no `unreviewed-promotion` for the
@@ -104,7 +104,8 @@ canon query --kind handoff --since 2026-06-01T00:00:00Z
104
104
  canon query --kind trajectory --json
105
105
 
106
106
  # Page a long result and keep only the fields you need; `meta` carries
107
- # returned, total, hasMore and nextCursor (`--all` returns everything).
107
+ # `page` = {returned, total, nextCursor}; a present `nextCursor` means more, and
108
+ # `meta.next` repeats the call with `--cursor <nextCursor>` (`--all` returns everything).
108
109
  canon query --kind trajectory --json --limit 50 --fields at,kind
109
110
  canon query --kind trajectory --json --limit 50 --cursor <nextCursor>
110
111
  ```
@@ -189,7 +190,7 @@ section listing them and emits a matching stderr `WARN`.
189
190
  `canon purge --kind <kind> --before <RFC3339> [--commit --plan-digest <planDigest>] [--repo <dir>] [--json]`
190
191
  is the canonical data-lifecycle boundary: the bare run previews: it prints the removal set and
191
192
  its `planDigest` and deletes nothing; `--commit --plan-digest <planDigest>` deletes only if
192
- the plan recomputed now has the same digest (`PLAN_CHANGED`, exit 2, when the
193
+ the plan recomputed now has the same digest (`PLAN_STALE`, exit 2, when the
193
194
  data moved). The only purgeable kinds are
194
195
  `session`, `run`, `event`, and `trajectory`; the cutoff applies to every
195
196
  routed rung and every configured aging destination, including retained
@@ -210,7 +211,7 @@ arguments previews an empty removal set.
210
211
  With `--json`, `purge` and `export` answer `{ "data", "meta" }` like every other
211
212
  command: `data` is the plan or manifest, `meta.next` the step after (a plan's is the
212
213
  human's review and `--commit --plan-digest`), and an export's page state (`total`, `returned`,
213
- `nextCursor`) sits in `meta`. `export --json --output <file>` writes the manifest to the
214
+ `nextCursor`) sits in `meta.page`. `export --json --output <file>` writes the manifest to the
214
215
  file and answers with `data: { output, kind, recordCount }`; `--dry-run`
215
216
  answers with what it would write and writes nothing.
216
217
 
@@ -71,7 +71,7 @@ canon subject new subject-domain-loop \
71
71
  NDJSON) is a batch validated before any write, with `operands` holding the
72
72
  id and the other keys the option names in camelCase (`canon schema subject
73
73
  new --json` shows the schema and an example). Writing an identical subject
74
- again is a no-op reported `unchanged` (`meta.unchanged`).
74
+ again is a no-op reported `unchanged` (`data.unchanged`).
75
75
 
76
76
  ### 2. Retrieve subject-scoped strategy memory BEFORE working
77
77
 
@@ -747,21 +747,23 @@ Status fails closed rather than suggest progress the gate would refuse:
747
747
  ```
748
748
 
749
749
  The steps that follow are not in `data`: they are `meta.next`, most useful
750
- first, with `meta.nextOmitted` counting what was cut and `meta.waitingOn`
750
+ first, with `data.nextOmitted` counting what was cut and `data.waitingOn`
751
751
  (with a declared role, `--as`) counting the steps each other owner holds:
752
752
 
753
753
  ```json
754
754
  "next": [
755
- { "command": "show the brief in openspec/changes/c-promo/proposal.md; build and attest nothing for promo until the human answers; then record their words with `canon brief approve c-promo --approver <the human> --note \"<their words>\"`", "argv": [], "why": "promo: the brief is not approved", "actor": "human", "role": null },
756
- { "command": "canon finding close c-cart --round 1 --seq 1 --disposition fixed --actor <unit> --session <session>", "argv": [], "why": "cart: 1 open blocker finding(s); fix it, commit, then close it", "actor": "agent", "role": "implementer" },
757
- { "command": "canon status", "argv": ["canon", "status"], "why": "1 scenario(s) carry no @subject tag (first: cart.promo.01); add `@subject:<id>` above each in its .feature file, then check again", "actor": "agent", "role": "planner" }
755
+ { "command": "canon brief show c-promo --json", "argv": ["brief", "show", "c-promo", "--json"], "reason": "promo: the brief is not approved; build and attest nothing for promo until the human answers", "x-canon": { "actor": "human" } },
756
+ { "command": "canon gate check --json", "argv": ["gate", "check", "--json"], "reason": "cart: 1 open blocker finding(s); fix it, commit, then close it with `canon finding close`", "x-canon": { "actor": "agent", "role": "implementer" } },
757
+ { "command": "canon status --json", "argv": ["status", "--json"], "reason": "1 scenario(s) carry no @subject tag (first: cart.promo.01); add `@subject:<id>` above each in its .feature file, then check again", "x-canon": { "actor": "agent", "role": "planner" } }
758
758
  ]
759
759
  ```
760
760
 
761
- `argv` is the command split into words, and is empty when the command still
762
- holds a `<placeholder>` for what only the agent knows (or is not a canon
763
- command at all). On a repository that still holds 0.27 canon state,
764
- `canon status` warns (`data.warnings`, `meta.warnings`) and puts `canon
761
+ `argv` is the command without the executable (`canon` + `argv` is the call),
762
+ and carries `--json` when you called in JSON mode. Every next entry is
763
+ runnable as it stands: guidance that needs a value only you know (an actor id,
764
+ a session, the human's words) is not a next entry, it is in the error `hint`
765
+ or the report text. On a repository that still holds 0.27 canon state,
766
+ `canon status` warns (`data.warnings`, `meta.warnings` as `[{code, message}]`) and puts `canon
765
767
  migrate --json` first in `meta.next`: run `canon migrate`, then `canon
766
768
  migrate --commit --plan-digest <digest from the preview>`, then `canon
767
769
  skills install`.
@@ -792,14 +794,14 @@ only the pending drafts, and `flow` lists each flow step of every tagged
792
794
  change as `{ "id", "change", "scenarios": [{ id, title, failure, evidenced,
793
795
  review }], "gaps" }`.
794
796
 
795
- Each `meta.next` entry's `actor` is `agent` (its `command` is a canon command
796
- line) or `human` (its `command` says what to get from the human).
797
+ Each `meta.next` entry's `x-canon.actor` is `agent` or `human` (a step only the
798
+ human takes; its `reason` says what to get from them).
797
799
 
798
800
  `policy.spec_coverage` has the shape `canon context --json` prints
799
801
  (`null` when absent, `{"invalid": …}` when unusable). `statusVersion`
800
802
  changes only when a field changes meaning or is removed. It became `2`
801
803
  in 0.16, when `next[].command` stopped always being a command line
802
- (`actor` tells which), and `brief` was added alongside. It is `3` since
804
+ (`actor` told which), and `brief` was added alongside. It is `3` since
803
805
  0.17, when `brief.proposal` was removed: the canon `brief.md` is
804
806
  `brief.brief`, with `briefExists` and `source`. It is `4` since 0.31, when the
805
807
  `brief` object became the `briefs` list.
@@ -220,7 +220,7 @@ canon trace add-login_1_1
220
220
  <!-- canon:generated commands-implementer end -->
221
221
 
222
222
  After the first `status`, follow `meta.next` of each write; do not call
223
- `canon status` again to learn the next step. Every record you write takes
223
+ `canon status` again to learn the next step. Each `meta.next` entry is runnable: run `canon` + its `argv`; guidance that needs a value you must fill in is in the error `hint` or the report text, not in `meta.next`. Every record you write takes
224
224
  the commit it is about from `--rev` (default `HEAD`, any git revision). You
225
225
  need not commit first: code that is not committed yet is recorded with its
226
226
  `codeTree` and `worktreeDirty: true`, never refused. Outside git, or in a
@@ -371,7 +371,7 @@ not another evidence step.
371
371
  ## Retry safety
372
372
 
373
373
  `evidence add` is content-keyed: repeating it with identical input returns
374
- the existing record with `meta.unchanged: true` instead of a duplicate (a
374
+ the existing record with `data.unchanged: true` instead of a duplicate (a
375
375
  batch reports that element `unchanged`). After a timeout or a lost
376
376
  response, run the same command again. `scenario new` is not: an existing
377
377
  scenario id is refused (`SCENARIO_TAG_EXISTS`) and nothing changes, so check
@@ -444,10 +444,10 @@ canon trace add-login_1_1
444
444
  ## Read the state
445
445
 
446
446
  `canon status` lists the next steps, each with the `role` that takes it
447
- (`null` for the human), and `waitingOn` counts the steps held by each other
447
+ (`null` for the human), and `data.waitingOn` counts the steps held by each other
448
448
  owner, `human` included. Call it once at the start and when resuming, not
449
449
  after a write: after `subject move --to` or a spawned role's write, the
450
- write's `meta.next` and `meta.waitingOn` are the status for what it touched.
450
+ write's `meta.next` and `data.waitingOn` are the status for what it touched.
451
451
 
452
452
  ## Spawn each role
453
453
 
@@ -510,7 +510,7 @@ not sign off.
510
510
 
511
511
  ## Relay the human's answer
512
512
 
513
- When `status` or `meta.next` shows a step with `actor: human` (the brief's
513
+ When `status` or `meta.next` shows a step with `x-canon.actor: human` (the brief's
514
514
  approval), stop everything for that scope and put the brief in front of the
515
515
  human in its language: `canon brief show <slug> --body` prints the brief and,
516
516
  last, its digest. Send the output to the human's own view, never retyped (omp:
@@ -563,7 +563,7 @@ holds the next command and the verified claims (`canon skills show canon-vocab`)
563
563
  After a timeout or a lost response, repeat the write only when its repeat is
564
564
  safe. `evidence add`, `review scenario`, `review change` and `finding add`
565
565
  are content-keyed: an identical repeat returns the existing record with
566
- `meta.unchanged: true` (a batch reports the element `unchanged`).
566
+ `data.unchanged: true` (a batch reports the element `unchanged`).
567
567
  `finding close`, `subject adopt`, `inventory sync`, `ingest *`, `gate
568
568
  promote` and `task done` are replay-safe the same way. `subject new`,
569
569
  `change new`, `feature new`, `scenario new`, `subject move` and `dispatch
@@ -580,7 +580,7 @@ its preview, never from an old digest.
580
580
  | "The reviewer can be me under another label." | The reviewer is a separate process with its own real session id (#39). |
581
581
  | "Approve the brief; the human said they are busy." | An answer they did not give is not recorded. Show the brief, ask, and record only an explicit approval with `--relayed-via`. |
582
582
  | "Override the refusal to ship." | Fix the gap the refusal names; `--override-reason` waives only the `require_review` gaps and the brief gap, is recorded on the subject, and is for the human's call, not a shortcut. |
583
- | "Run the commit now, the preview looked fine earlier." | A bare run previews; `--commit --plan-digest` acts only on the plan you just previewed (`PLAN_CHANGED` otherwise). Preview again, then act. |
583
+ | "Run the commit now, the preview looked fine earlier." | A bare run previews; `--commit --plan-digest` acts only on the plan you just previewed (`PLAN_STALE` otherwise). Preview again, then act. |
584
584
  | "I have corrected this agent before." | A correction repeated across runs belongs in a scenario, the policy or a gate, not more prose. Tell the human. |
585
585
 
586
586
  ## Move the subject
@@ -623,10 +623,10 @@ read the refusal in `error` of `canon subject move demo --to shipped --json`.
623
623
  move` and `canon migrate` delete or rewrite existing data. A bare run only
624
624
  previews: exit 0, nothing written, a report with `planDigest` and
625
625
  `effects[]`. Read the effects, then act with `--commit --plan-digest
626
- <planDigest>`; it refuses (`PLAN_CHANGED`, exit 2) when the plan recomputed
626
+ <planDigest>`; it refuses (`PLAN_STALE`, exit 2) when the plan recomputed
627
627
  now differs from the one you previewed. A document passed with `--input`
628
628
  never carries `--commit` or `--plan-digest`, and these five leaves take one
629
- object only (`INPUT_BATCH_UNSUPPORTED`).
629
+ object only (`INPUT_INVALID`).
630
630
 
631
631
  ```bash
632
632
  canon purge --kind session --before 2026-01-01
@@ -678,6 +678,6 @@ git-ignored, and `canon migrate --revert` needs it (keep it until you are sure).
678
678
  **Done when:** `canon migrate` reports nothing left to move, `canon skills
679
679
  check` exits 0, and `canon status` and `canon gate check` no longer warn
680
680
  about 0.27 state; read the first in `data` of `canon migrate --json`, the
681
- others in `meta.warnings`.
681
+ others in `meta.warnings` (`[{code, message}]`).
682
682
 
683
683
  Reference: `canon skills show canon-subject`.
@@ -172,7 +172,7 @@ canon trace add-login_1_1
172
172
  ```
173
173
  <!-- canon:generated commands-planner end -->
174
174
 
175
- After the first `status`, follow `meta.next` of each write. `brief check`
175
+ After the first `status`, follow `meta.next` of each write. Each `meta.next` entry is runnable: run `canon` + its `argv`; guidance that needs a value you must fill in is in the error `hint` or the report text, not in `meta.next`. `brief check`
176
176
  lists blockers and advisories and exits 1 when it finds blockers; `canon
177
177
  brief show --as planner` names the next steps. The change is an optional
178
178
  operand of both (`canon brief check add-login`); without it they read the
@@ -220,7 +220,7 @@ advisory names it); that is the orchestrator's step, not yours.
220
220
  Run `gate check` once, before `review scenario`: its `unreviewed-promotion`
221
221
  violations are the subjects and scenarios that need your review. Do not loop
222
222
  it. After `review scenario`, read its `meta.next` instead of calling `gate check`
223
- or `status` again.
223
+ or `status` again. Each `meta.next` entry is runnable: run `canon` + its `argv`; guidance that needs a value you must fill in is in the error `hint` or the report text, not in `meta.next`.
224
224
 
225
225
  ## Separate session
226
226
 
@@ -355,7 +355,7 @@ implementer owns. Your last write's `meta.next` names the next step.
355
355
  ## Retry safety
356
356
 
357
357
  `review scenario`, `review change` and `finding add` are content-keyed: an
358
- identical repeat is reported `unchanged` (`meta.unchanged: true`, or the
358
+ identical repeat is reported `unchanged` (`data.unchanged: true`, or the
359
359
  element's `status` in a batch), so after a timeout run the same command
360
360
  again. A different finding under an occupied round and seq is refused
361
361
  (`FINDING_SEQ_OCCUPIED`): take the next seq. `finding close` with the same
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-adapter-authorize 1 "authorize 0.32.0"
3
+ .TH canon-adapter-authorize 1 "authorize 0.33.0"
4
4
  .SH NAME
5
5
  canon\-adapter\-authorize \- Authorize declared capabilities against repository policy (preflight only)
6
6
  .SH SYNOPSIS
@@ -41,4 +41,4 @@ Print help
41
41
  \fB\-V\fR, \fB\-\-version\fR
42
42
  Print version
43
43
  .SH VERSION
44
- v0.32.0
44
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-adapter-validate 1 "validate 0.32.0"
3
+ .TH canon-adapter-validate 1 "validate 0.33.0"
4
4
  .SH NAME
5
5
  canon\-adapter\-validate \- Read and validate one provider\-neutral response envelope
6
6
  .SH SYNOPSIS
@@ -41,4 +41,4 @@ Print help
41
41
  \fB\-V\fR, \fB\-\-version\fR
42
42
  Print version
43
43
  .SH VERSION
44
- v0.32.0
44
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-adapter 1 "adapter 0.32.0"
3
+ .TH canon-adapter 1 "adapter 0.33.0"
4
4
  .SH NAME
5
5
  canon\-adapter \- Validate a provider\-neutral adapter response without executing a provider
6
6
  .SH SYNOPSIS
@@ -43,4 +43,4 @@ Examples:
43
43
  canon adapter validate \-\-response response.json
44
44
  canon adapter validate \-\-response response.json \-\-repo . \-\-json
45
45
  .SH VERSION
46
- v0.32.0
46
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-artifacts-move 1 "move 0.32.0"
3
+ .TH canon-artifacts-move 1 "move 0.33.0"
4
4
  .SH NAME
5
5
  canon\-artifacts\-move \- Move the local artifact blobs to an object\-store tier, verify them, and remove the local copies
6
6
  .SH SYNOPSIS
@@ -54,10 +54,10 @@ Examples:
54
54
  canon artifacts move \-\-tier cold
55
55
  canon artifacts move \-\-tier cold \-\-commit \-\-plan\-digest <DIGEST>
56
56
 
57
- The bare run previews: it lists every upload and removal and prints a planDigest, and writes nothing. \-\-commit \-\-plan\-digest acts on exactly that plan (PLAN_CHANGED, exit 2, when it changed since).
57
+ The bare run previews: it lists every upload and removal and prints a planDigest, and writes nothing. \-\-commit \-\-plan\-digest acts on exactly that plan (PLAN_STALE, exit 2, when it changed since).
58
58
 
59
59
  \-\-tier names an `s3` tier of canon.yaml\*(Aqs `tiers:` (for example `cold`; its credentials are the tier\*(Aqs own). Every blob in .canon/artifacts/sha256 is hashed, uploaded under <prefix>sha256/<digest> (prefix artifacts/), and read back; only when all of them verified does canon.yaml gain `artifact_store: { backend: <tier>, prefix: artifacts/ }`, after which the local copies are removed and `.canon/artifacts/` is added to .gitignore. Commit the removal with the ledger.
60
60
 
61
61
  Idempotent and resumable: a run stopped anywhere leaves a repo the gate still passes, and the next run finishes; a second run finds nothing to do. A blob whose bytes do not match its name is never moved. Moving back to local is refused; `\-\-tier local` on a local repo is a no\-op.
62
62
  .SH VERSION
63
- v0.32.0
63
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-artifacts-store 1 "store 0.32.0"
3
+ .TH canon-artifacts-store 1 "store 0.33.0"
4
4
  .SH NAME
5
5
  canon\-artifacts\-store \- Store the bound files of existing evidence records and current reviews in the artifact store (.canon/artifacts/sha256/)
6
6
  .SH SYNOPSIS
@@ -51,4 +51,4 @@ For records written before canon stored bound bytes (0.11\-0.13), and for any ev
51
51
 
52
52
  Exit 0 when the pass ran (the gate decides whether an unstored file matters), 2 when the ledger cannot be read or a write fails.
53
53
  .SH VERSION
54
- v0.32.0
54
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-artifacts-verify 1 "verify 0.32.0"
3
+ .TH canon-artifacts-verify 1 "verify 0.33.0"
4
4
  .SH NAME
5
5
  canon\-artifacts\-verify \- Check that the artifact store holds every file the latest evidence and current reviews bind (\-\-full re\-hashes the stored bytes)
6
6
  .SH SYNOPSIS
@@ -45,4 +45,4 @@ Asks the store canon.yaml\*(Aqs `artifacts:` block selects (default: local, .can
45
45
 
46
46
  Exit 0 when every file is stored, 1 when one is missing or altered (data.problems names each), 2 when the store cannot be used or reached: an unreachable store is a refusal, never a pass.
47
47
  .SH VERSION
48
- v0.32.0
48
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-artifacts 1 "artifacts 0.32.0"
3
+ .TH canon-artifacts 1 "artifacts 0.33.0"
4
4
  .SH NAME
5
5
  canon\-artifacts \- Check or move the evidence artifact store (local, or an object\-store tier)
6
6
  .SH SYNOPSIS
@@ -42,4 +42,4 @@ Store the bound files of existing evidence records and current reviews in the ar
42
42
  canon\-artifacts\-move(1)
43
43
  Move the local artifact blobs to an object\-store tier, verify them, and remove the local copies
44
44
  .SH VERSION
45
- v0.32.0
45
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-brief-approve 1 "approve 0.32.0"
3
+ .TH canon-brief-approve 1 "approve 0.33.0"
4
4
  .SH NAME
5
5
  canon\-brief\-approve \- Record the human\*(Aqs approval of the brief, bound to its text; refused while `brief check` has blockers
6
6
  .SH SYNOPSIS
@@ -71,4 +71,4 @@ brief (the digest covers the brief without its `Approved:` lines) and records
71
71
  not approved (BRIEF_CHANGED_SINCE_APPROVAL) until a human answers again and this
72
72
  runs again. Run it only from the human\*(Aqs answer, with their words as \-\-note.
73
73
  .SH VERSION
74
- v0.32.0
74
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-brief-check 1 "check 0.32.0"
3
+ .TH canon-brief-check 1 "check 0.33.0"
4
4
  .SH NAME
5
5
  canon\-brief\-check \- Read the brief against the rules: blocker and advisory findings (exit 0 clean, 1 blockers, 2 refused)
6
6
  .SH SYNOPSIS
@@ -41,4 +41,4 @@ Print version
41
41
  [\fICHANGE_ID\fR]
42
42
  The change to read (default: the repo\*(Aqs only live change)
43
43
  .SH VERSION
44
- v0.32.0
44
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-brief-show 1 "show 0.32.0"
3
+ .TH canon-brief-show 1 "show 0.33.0"
4
4
  .SH NAME
5
5
  canon\-brief\-show \- Show where the change stands and the next one to three steps; never edits
6
6
  .SH SYNOPSIS
@@ -50,4 +50,4 @@ Examples:
50
50
 
51
51
  The operand names the change; without it the repo\*(Aqs only live change is read.
52
52
  .SH VERSION
53
- v0.32.0
53
+ v0.33.0
package/man/canon-brief.1 CHANGED
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-brief 1 "brief 0.32.0"
3
+ .TH canon-brief 1 "brief 0.33.0"
4
4
  .SH NAME
5
5
  canon\-brief \- Check a change\*(Aqs brief (PRD format) and see the next steps; never edits
6
6
  .SH SYNOPSIS
@@ -61,4 +61,4 @@ gets one blocker, `brief.old\-format`: `canon migrate` rewrites it. A brief
61
61
  with fewer than two known headings (written before 0.19) checks as `brief.legacy`, an
62
62
  advisory. Without \-\-change, the repo\*(Aqs only live change is checked.
63
63
  .SH VERSION
64
- v0.32.0
64
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-change-new 1 "new 0.32.0"
3
+ .TH canon-change-new 1 "new 0.33.0"
4
4
  .SH NAME
5
5
  canon\-change\-new \- Write .canon/changes/<slug>/brief.md, import it, and adopt it into a subject
6
6
  .SH SYNOPSIS
@@ -63,4 +63,4 @@ Print version
63
63
  <\fICHANGE_ID\fR>
64
64
  The change\*(Aqs slug (its change_id)
65
65
  .SH VERSION
66
- v0.32.0
66
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-change 1 "change 0.32.0"
3
+ .TH canon-change 1 "change 0.33.0"
4
4
  .SH NAME
5
5
  canon\-change \- Write a plan change (.canon/changes/<slug>/brief.md) and adopt it into a subject
6
6
  .SH SYNOPSIS
@@ -39,4 +39,4 @@ Write .canon/changes/<slug>/brief.md, import it, and adopt it into a subject
39
39
  Examples:
40
40
  canon change new add\-login \-\-subject auth \-\-title \*(AqAdd login\*(Aq
41
41
  .SH VERSION
42
- v0.32.0
42
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-completion 1 "completion 0.32.0"
3
+ .TH canon-completion 1 "completion 0.33.0"
4
4
  .SH NAME
5
5
  canon\-completion \- Write the shell completion script for canon (bash, zsh or fish)
6
6
  .SH SYNOPSIS
@@ -57,4 +57,4 @@ Examples:
57
57
 
58
58
  The script is generated from the command tree, so it completes exactly what the parser accepts. It needs no repo and no network.
59
59
  .SH VERSION
60
- v0.32.0
60
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-context-pack-add 1 "add 0.32.0"
3
+ .TH canon-context-pack-add 1 "add 0.33.0"
4
4
  .SH NAME
5
5
  canon\-context\-pack\-add \- Create an immutable context pack from a repository\-local JSON manifest
6
6
  .SH SYNOPSIS
@@ -44,4 +44,4 @@ Print help
44
44
  \fB\-V\fR, \fB\-\-version\fR
45
45
  Print version
46
46
  .SH VERSION
47
- v0.32.0
47
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-context-pack-show 1 "show 0.32.0"
3
+ .TH canon-context-pack-show 1 "show 0.33.0"
4
4
  .SH NAME
5
5
  canon\-context\-pack\-show \- Show a context pack after verifying its manifest and content objects
6
6
  .SH SYNOPSIS
@@ -41,4 +41,4 @@ Print version
41
41
  <\fIPACK_ID\fR>
42
42
  Context pack id (sha256:<64 hex digits>)
43
43
  .SH VERSION
44
- v0.32.0
44
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-context-pack-verify 1 "verify 0.32.0"
3
+ .TH canon-context-pack-verify 1 "verify 0.33.0"
4
4
  .SH NAME
5
5
  canon\-context\-pack\-verify \- Verify a context pack\*(Aqs manifest and immutable content objects
6
6
  .SH SYNOPSIS
@@ -41,4 +41,4 @@ Print version
41
41
  <\fIPACK_ID\fR>
42
42
  Context pack id (sha256:<64 hex digits>)
43
43
  .SH VERSION
44
- v0.32.0
44
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-context-pack 1 "context-pack 0.32.0"
3
+ .TH canon-context-pack 1 "context-pack 0.33.0"
4
4
  .SH NAME
5
5
  canon\-context\-pack \- Create, inspect, and verify reproducible context packs
6
6
  .SH SYNOPSIS
@@ -47,4 +47,4 @@ Examples:
47
47
  canon context\-pack show sha256:<pack\-digest> \-\-repo . \-\-json
48
48
  canon context\-pack verify sha256:<pack\-digest>
49
49
  .SH VERSION
50
- v0.32.0
50
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-context 1 "context 0.32.0"
3
+ .TH canon-context 1 "context 0.33.0"
4
4
  .SH NAME
5
5
  canon\-context \- Show what you can author here: record kinds, fields, enums, policies
6
6
  .SH SYNOPSIS
@@ -41,4 +41,4 @@ Print help
41
41
  \fB\-V\fR, \fB\-\-version\fR
42
42
  Print version
43
43
  .SH VERSION
44
- v0.32.0
44
+ v0.33.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-dashboard 1 "dashboard 0.32.0"
3
+ .TH canon-dashboard 1 "dashboard 0.33.0"
4
4
  .SH NAME
5
5
  canon\-dashboard \- Serve the local status dashboard
6
6
  .SH SYNOPSIS
@@ -47,4 +47,4 @@ Print help
47
47
  \fB\-V\fR, \fB\-\-version\fR
48
48
  Print version
49
49
  .SH VERSION
50
- v0.32.0
50
+ v0.33.0