@journeykit/canon 0.44.0 → 0.46.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 (117) hide show
  1. package/dist/skills/SKILL.src.md +14 -0
  2. package/dist/skills/reference/canon-policy.md +28 -4
  3. package/dist/skills/reference/canon-review.md +21 -0
  4. package/dist/skills/reference/role-orchestrator.md +23 -1
  5. package/dist/skills/reference/role-planner.md +14 -0
  6. package/dist/skills/reference/role-reviewer.md +31 -0
  7. package/man/canon-adapter-authorize.1 +2 -2
  8. package/man/canon-adapter-validate.1 +2 -2
  9. package/man/canon-adapter.1 +2 -2
  10. package/man/canon-artifacts-move.1 +2 -2
  11. package/man/canon-artifacts-prune.1 +2 -2
  12. package/man/canon-artifacts-store.1 +2 -2
  13. package/man/canon-artifacts-verify.1 +2 -2
  14. package/man/canon-artifacts.1 +2 -2
  15. package/man/canon-brief-approve.1 +18 -8
  16. package/man/canon-brief-check.1 +2 -2
  17. package/man/canon-brief-show.1 +2 -2
  18. package/man/canon-brief.1 +3 -3
  19. package/man/canon-change-defer.1 +2 -2
  20. package/man/canon-change-drop.1 +2 -2
  21. package/man/canon-change-new.1 +2 -2
  22. package/man/canon-change-reopen.1 +2 -2
  23. package/man/canon-change.1 +2 -2
  24. package/man/canon-completion.1 +2 -2
  25. package/man/canon-context-pack-add.1 +2 -2
  26. package/man/canon-context-pack-show.1 +2 -2
  27. package/man/canon-context-pack-verify.1 +2 -2
  28. package/man/canon-context-pack.1 +2 -2
  29. package/man/canon-context.1 +2 -2
  30. package/man/canon-dashboard.1 +2 -2
  31. package/man/canon-demo-init.1 +2 -2
  32. package/man/canon-demo-review.1 +2 -2
  33. package/man/canon-demo.1 +2 -2
  34. package/man/canon-dispatch-begin.1 +2 -2
  35. package/man/canon-dispatch-diff.1 +2 -2
  36. package/man/canon-dispatch-end.1 +2 -2
  37. package/man/canon-dispatch.1 +2 -2
  38. package/man/canon-divergence-accept.1 +2 -2
  39. package/man/canon-divergence-add.1 +2 -2
  40. package/man/canon-divergence-defer.1 +2 -2
  41. package/man/canon-divergence-list.1 +2 -2
  42. package/man/canon-divergence-resolve.1 +2 -2
  43. package/man/canon-divergence.1 +2 -2
  44. package/man/canon-evidence-add.1 +2 -2
  45. package/man/canon-evidence-approval-payload.1 +2 -2
  46. package/man/canon-evidence-audit.1 +2 -2
  47. package/man/canon-evidence.1 +2 -2
  48. package/man/canon-export.1 +2 -2
  49. package/man/canon-feature-new.1 +2 -2
  50. package/man/canon-feature.1 +2 -2
  51. package/man/canon-finding-add.1 +2 -2
  52. package/man/canon-finding-close.1 +2 -2
  53. package/man/canon-finding-list.1 +2 -2
  54. package/man/canon-finding.1 +2 -2
  55. package/man/canon-format.1 +2 -2
  56. package/man/canon-gate-check.1 +2 -2
  57. package/man/canon-gate-install-hooks.1 +2 -2
  58. package/man/canon-gate-promote.1 +2 -2
  59. package/man/canon-gate.1 +2 -2
  60. package/man/canon-ingest-plans.1 +2 -2
  61. package/man/canon-ingest-records.1 +2 -2
  62. package/man/canon-ingest.1 +2 -2
  63. package/man/canon-init.1 +2 -2
  64. package/man/canon-inventory-sync.1 +2 -2
  65. package/man/canon-inventory.1 +2 -2
  66. package/man/canon-ledger-compact.1 +2 -2
  67. package/man/canon-ledger.1 +2 -2
  68. package/man/canon-migrate.1 +2 -2
  69. package/man/canon-plugin-sync.1 +2 -2
  70. package/man/canon-plugin.1 +2 -2
  71. package/man/canon-policy-approve.1 +2 -2
  72. package/man/canon-policy-show.1 +2 -2
  73. package/man/canon-policy.1 +2 -2
  74. package/man/canon-prompt-add.1 +2 -2
  75. package/man/canon-prompt-show.1 +2 -2
  76. package/man/canon-prompt.1 +2 -2
  77. package/man/canon-purge.1 +2 -2
  78. package/man/canon-query.1 +3 -3
  79. package/man/canon-regime-show.1 +2 -2
  80. package/man/canon-regime.1 +2 -2
  81. package/man/canon-report-build.1 +2 -2
  82. package/man/canon-report-check.1 +2 -2
  83. package/man/canon-report-snapshot.1 +2 -2
  84. package/man/canon-report.1 +2 -2
  85. package/man/canon-retrieve.1 +2 -2
  86. package/man/canon-review-brief.1 +84 -0
  87. package/man/canon-review-change.1 +2 -2
  88. package/man/canon-review-scenario.1 +2 -2
  89. package/man/canon-review.1 +5 -2
  90. package/man/canon-scenario-new.1 +2 -2
  91. package/man/canon-scenario.1 +2 -2
  92. package/man/canon-schema.1 +2 -2
  93. package/man/canon-search.1 +2 -2
  94. package/man/canon-selftest.1 +2 -2
  95. package/man/canon-skills-check.1 +2 -2
  96. package/man/canon-skills-doctor.1 +2 -2
  97. package/man/canon-skills-install.1 +2 -2
  98. package/man/canon-skills-show.1 +2 -2
  99. package/man/canon-skills.1 +2 -2
  100. package/man/canon-status.1 +2 -2
  101. package/man/canon-strategy-approval-payload.1 +2 -2
  102. package/man/canon-strategy-promote.1 +2 -2
  103. package/man/canon-strategy-rollback.1 +2 -2
  104. package/man/canon-strategy.1 +2 -2
  105. package/man/canon-subject-adopt.1 +2 -2
  106. package/man/canon-subject-move.1 +2 -2
  107. package/man/canon-subject-new.1 +2 -2
  108. package/man/canon-subject-show.1 +2 -2
  109. package/man/canon-subject-unadopt.1 +2 -2
  110. package/man/canon-subject.1 +2 -2
  111. package/man/canon-task-done.1 +2 -2
  112. package/man/canon-task.1 +2 -2
  113. package/man/canon-tier-age.1 +2 -2
  114. package/man/canon-tier.1 +2 -2
  115. package/man/canon-trace.1 +2 -2
  116. package/man/canon.1 +2 -2
  117. package/package.json +5 -5
@@ -54,6 +54,20 @@ a feature, a one-line request included. A human is needed once per scope:
54
54
  does a repo whose `canon.yaml` says `approval: { relay: deny }`: then the
55
55
  human runs the call themselves. Never remove or unset your role
56
56
  (`env -u CANON_ROLE`, dropping `--as`) to run it yourself.
57
+ 5. **Delegated approval.** When the owner is away or busy and `.canon/policy.yaml`
58
+ has a `delegation:` entry for your role (the policy approved by the human),
59
+ `canon status` and `canon brief show <slug>` name the steps and no human's
60
+ answer is needed: an independent reviewer in a separate session records
61
+ `canon review brief <slug> --actor <reviewer id> --round <n> --verdict approve|revise --digest <slug>=<digest shown>`
62
+ and each finding with `canon finding add --change <slug> --review <review id> --severity blocker|should-fix|note`
63
+ (P0 and P1 are `blocker`, P2 `should-fix`, P3 `note`). A `revise` or an open
64
+ `blocker` sends the brief back to the planner, who fixes it, closes the findings and has a new
65
+ reviewer record the next round; after round 3 with P0 or P1 still open, stop and report to the owner.
66
+ When the latest review of the brief as it is now is an `approve` by another actor with no open `blocker`, the orchestrator
67
+ records it with `canon brief approve <slug> --as orchestrator --actor <your actor id> --delegated`
68
+ (`DELEGATION_REQUIRED` names the condition that is not met, and nothing is written). The `Approved:` line
69
+ then carries `(delegated to <role> <actor> under policy <digest> after review <id>)`. A delegation gives
70
+ no other authority: `canon policy approve` stays the human's.
57
71
  Never edit the policy to make the gate pass: a policy that differs from
58
72
  the approved one fails closed (`POLICY_APPROVAL_STALE`, not
59
73
  waivable); stop and ask the human. A brief edited after its
@@ -9,20 +9,44 @@ appears, it is a CEL expression evaluated against the target record.
9
9
  ## Top-level keys
10
10
 
11
11
  `.canon/policy.yaml` accepts exactly these top-level keys:
12
- `adapter_capabilities`, `allowed_signers`, `approval`, `experimental`,
13
- `query`, `risk_approvals`, `risk_routing`, `risk_tiers`, `schema`,
14
- `spec_coverage`, `staleness`, `trust_required`, `trust_sample`
12
+ `adapter_capabilities`, `allowed_signers`, `approval`, `code_scopes`,
13
+ `delegation`, `experimental`, `query`, `risk_approvals`, `risk_routing`,
14
+ `risk_tiers`, `schema`, `spec_coverage`, `staleness`, `trust_required`,
15
+ `trust_sample`
15
16
  (`risk_approvals` and a top-level `allowed_signers` are compatibility
16
17
  aliases for `approval.allowed_signers`). Any other key, usually a typo,
17
18
  is a policy diagnostic, and `canon gate check` fails on it:
18
19
 
19
20
  ```
20
- uncovered-cell spec_coverag — `spec_coverag` is not a known top-level policy.yaml key (known keys: adapter_capabilities, allowed_signers, approval, experimental, query, risk_approvals, risk_routing, risk_tiers, schema, spec_coverage, staleness, trust_required, trust_sample); fix it or remove it — an unknown key is never silently ignored
21
+ uncovered-cell spec_coverag — `spec_coverag` is not a known top-level policy.yaml key (known keys: adapter_capabilities, allowed_signers, approval, code_scopes, delegation, experimental, query, risk_approvals, risk_routing, risk_tiers, schema, spec_coverage, staleness, trust_required, trust_sample); fix it or remove it — an unknown key is never silently ignored
21
22
  ```
22
23
 
23
24
  The known keys still resolve normally, and `canon context` lists the
24
25
  diagnostic and reports `clean: false`.
25
26
 
27
+ ### `delegation:` (0.46)
28
+
29
+ The owner delegates the approval of briefs to an agent role while they sleep or are busy. The entry is written by the owner,
30
+ never by an agent, and stands only while the policy is the one a human approved:
31
+
32
+ ```yaml
33
+ delegation:
34
+ - approver: Journey Hwang # who delegates: the <who> of the delegated Approved: line
35
+ to: orchestrator # one canon role (planner, implementer, reviewer, orchestrator)
36
+ acts: [brief-approve] # the one act of this release
37
+ requires: clean-plan-review # the one condition of this release; the key is required
38
+ ```
39
+
40
+ All four keys are required and unknown keys are refused. With the entry and an approved policy the role may run
41
+ `canon brief approve <slug> --as <role> --actor <id> --delegated`, which canon grants when the latest plan review of the brief
42
+ as it is now (`canon review brief`) is an `approve` by another actor with no open `blocker` finding. An entry that is invalid
43
+ (a key missing or unknown, an act this release does not know, a `to` that is no canon role, a blank `approver`, two entries
44
+ for one role, or a key that is not a list) gives no authority and `canon status` and `canon init --check` say
45
+ `DELEGATION_INVALID`, with the entry's position in the list (from 0) as the `field`. Editing the policy undoes its approval,
46
+ so the delegation stops until a human runs `canon policy approve`; `canon brief approve` never approves a changed `delegation:`
47
+ along with a brief (`policyHeld` names it). `canon init` writes no entry, only a commented example. To withdraw a
48
+ delegation, delete the entry and run `canon policy approve`; an `Approved:` line already written stays.
49
+
26
50
  ## The starter policy `canon init` writes
27
51
 
28
52
  A fresh `canon init` writes `.canon/policy.yaml` (skip it with
@@ -338,6 +338,27 @@ produced the review, as given. An empty or padded label is a usage error.
338
338
  whitespace, no control characters. Anything else is a usage error
339
339
  (exit 2) and nothing is written.
340
340
 
341
+ ## `canon review brief`
342
+
343
+ ```bash
344
+ canon review brief add-login --actor reviewer-1 --round 1 --verdict approve --digest add-login=sha256:0123456789abcdef
345
+ ```
346
+
347
+ `--verdict` is `approve` or `revise`; `--digest` is `<change>=sha256:<hex>`. `--project`, `--session`, `--reviewer-provider`, `--reviewer-model` and `--reviewer-harness` are as on `review change`.
348
+
349
+ A plan review (0.46): an independent reviewer's verdict on a change's brief, written to the ledger as a `Review` with a `plan`
350
+ (`round`, `verdict`, `digest`) and no `pins`. `--digest` is the digest `canon brief show <change> --body` printed for the brief the
351
+ reviewer read; one that is not the brief's now is `RELAY_DIGEST_STALE` (exit 2), a missing or ill-formed one `USAGE`, a change with no brief
352
+ `BRIEF_NOT_FOUND`, a closed change `CHANGE_CONFLICT` (reason `CLOSED`), and nothing is written. The data carries `reviewId`, `round`,
353
+ `verdict` and `digest`; a repeat of the same call is `unchanged`. The provenance is the brief's path and the pin is `HEAD` (`COMMIT_REQUIRED`
354
+ in a repo with no commit).
355
+
356
+ Findings of the review are `canon finding add --change <id> --review <review id>`, with `--severity blocker` for P0 and P1, `should-fix`
357
+ for P2 and `note` for P3. `canon brief approve --delegated` reads the latest plan review of the brief as it is now (by round, then by the
358
+ time it was recorded): it must be an `approve` by another actor than the approving one, and none of its findings may be an open `blocker`
359
+ (`deferred` counts as open; the findings of earlier rounds are not read). A plan review never counts as a chore's sign-off, never
360
+ replaces one in the ledger or the archive, and `canon query --kind review --change <id>` lists it with its `plan`.
361
+
341
362
  ## The `require_review` policy (opt-in)
342
363
 
343
364
  ```yaml
@@ -67,6 +67,13 @@ usage: canon artifacts verify [--full]
67
67
  canon artifacts verify --json
68
68
  ```
69
69
  ```text
70
+ # Record the human's approval of the brief, bound to its text; refused while `brief check` has blockers
71
+ usage: canon brief approve [<CHANGE_ID>]* [--approver <NAME> | --delegated] [--note <TEXT> | --delegated] [--relayed-via <NAME> | --delegated] [--actor <ACTOR_ID>] [--digest <DIGEST> | --delegated]* [--input]
72
+ ```
73
+ ```bash
74
+ canon brief approve add-search --approver alice --note "approved as written" --json
75
+ ```
76
+ ```text
70
77
  # Write the shell completion script for canon (bash, zsh or fish)
71
78
  usage: canon completion <SHELL>
72
79
  ```
@@ -510,6 +517,21 @@ implementer's context, and have it record its real session id as
510
517
  `--session` (#39). A reviewer that cannot run the tests says so and does
511
518
  not sign off.
512
519
 
520
+ ## Approve under a delegation
521
+
522
+ The owner can delegate the approval of briefs to a role while they sleep or are busy: a `delegation:` entry in
523
+ `.canon/policy.yaml` (`approver`, `to`, `acts: [brief-approve]`, `requires: clean-plan-review`), in force only while the
524
+ policy is the one a human approved. You never write the entry, and `canon brief approve` never approves a changed
525
+ `delegation:` along with a brief (`policyHeld` says so): the human reads it and runs `canon policy approve`.
526
+
527
+ When `canon status` or `canon brief show <slug>` names a delegation step for your role, follow the order and stop for no human:
528
+
529
+ 1. A reviewer in a separate process and session records the plan review: `canon review brief <slug> --actor <reviewer id> --session <its session> --round <n> --verdict approve|revise --digest <slug>=<digest>`, where `<digest>` is the last line `canon brief show <slug> --body` printed, and each finding with `canon finding add --change <slug> --review <review id> --round <n> --seq <k> --severity blocker`: P0 and P1 are `blocker` (with `--introduced-rev` or `--introduced-unknown`), P2 `should-fix`, P3 `note`.
530
+ 2. On `revise`, or an open `blocker`, the planner fixes the brief, runs `canon brief check`, closes the findings (`canon finding close <slug> --round <n> --seq <k> --disposition fixed`, or `rejected --reason "<why>"`), and a new independent reviewer records the next round. The earlier review no longer counts: it was of another text. Repeat until the latest review is an `approve` with no open `blocker`. If round 3 still leaves P0 or P1 findings, stop and report to the owner.
531
+ 3. Approve with one call: `canon brief approve <slug> --as orchestrator --actor <your actor id> --delegated` (several slugs take one call; none is written unless every one is approvable). There is no name, answer, relay tool or digest to give: canon writes them. `DELEGATION_REQUIRED` names the condition not met in its `reason` (`NO_GRANT`, `POLICY_UNAPPROVED`, `NO_REVIEW`, `REVIEW_REVISE`, `SAME_ACTOR`, `OPEN_BLOCKER`), and nothing is written.
532
+
533
+ The reviewer must be another actor than the one approving: canon compares the actor ids only, so the separate session is yours to keep. The `Approved:` line says `(delegated to <role> <actor> under policy <digest> after review <id>)`, and `status`, `brief show` and the dashboard show it apart from a human's answer and a relayed one. To take a delegation back the owner deletes the entry and runs `canon policy approve`.
534
+
513
535
  ## Relay the human's answer
514
536
 
515
537
  When `status` or `meta.next` shows a step with `x-canon.actor: human` (the brief's
@@ -595,7 +617,7 @@ its preview, never from an old digest.
595
617
  |---|---|
596
618
  | "Edit the policy so the gate passes." | A changed policy fails closed (`POLICY_APPROVAL_STALE`); ask the human to re-approve or restore it from git. |
597
619
  | "The reviewer can be me under another label." | The reviewer is a separate process with its own real session id (#39). |
598
- | "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`. |
620
+ | "Approve the brief; the human said they are busy." | An answer they did not give is not recorded. If `delegation:` of the approved policy holds an entry for your role, `canon brief approve --delegated` is the call; otherwise show the brief, ask, and record only an explicit approval with `--relayed-via`. |
599
621
  | "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. |
600
622
  | "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. |
601
623
  | "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. |
@@ -24,6 +24,13 @@ in your ids. Use only the options on a line; never guess one. Ask `canon schema
24
24
  Every leaf takes `--as <ROLE>` and `--json`; `--repo <DIR>` too, except `completion`, `schema`, `skills show`. `--input <JSON|FILE|->` runs a leaf from one JSON document (an array is a batch) and is only on the lines ending `[--input]`. Its document keys are the option names in camelCase, singular even when the option repeats (the value is then an array; none is the key left out, `[]` is refused), and `operands` holds the operands. `--fields <FIELDS>` is a comma list of the paths `canon schema <COMMAND> --json` declares under `outputs[].fields.paths`; a path is the record's own key, spelled as the answer spells it.
25
25
  A `usage:` line shows the syntax and is not itself a command to run (the runnable example under it is): `<X>` is a value, `[x]` optional, `a | b` a choice, `(a | b)` exactly one is required, `[--x <V>]*` may repeat, `<X>+` is one or more, `[--a --b <V>]` go together. An option that is not on the line does not exist: it is refused (`USAGE`).
26
26
 
27
+ ```text
28
+ # Record the human's approval of the brief, bound to its text; refused while `brief check` has blockers
29
+ usage: canon brief approve [<CHANGE_ID>]* [--approver <NAME> | --delegated] [--note <TEXT> | --delegated] [--relayed-via <NAME> | --delegated] [--actor <ACTOR_ID>] [--digest <DIGEST> | --delegated]* [--input]
30
+ ```
31
+ ```bash
32
+ canon brief approve add-search --approver alice --note "approved as written" --json
33
+ ```
27
34
  ```text
28
35
  # Read the brief against the rules
29
36
  usage: canon brief check [<CHANGE_ID>]
@@ -309,6 +316,13 @@ ids); the human step comes after it. A policy that no longer matches its approva
309
316
  adds or changes a step of the brief is a scope change and needs a new
310
317
  answer.
311
318
 
319
+ When the owner delegated the approval (`delegation:` in the approved policy; `canon status` and `canon brief show` say so), a clean
320
+ brief does not wait for a human: an independent reviewer records a plan review (`canon review brief`), and on `revise` or an open
321
+ `blocker` you fix the brief, run `canon brief check`, close the findings (`canon finding close <slug> --round <n> --seq <k>
322
+ --disposition fixed`, or `rejected --reason "<why>"` for a finding you do not accept), and a new independent reviewer records the
323
+ next round. The earlier round no longer counts once the brief changes. After round 3 with P0 or P1 findings still open, stop and
324
+ report to the owner. The orchestrator then approves with `canon brief approve <slug> --as orchestrator --actor <id> --delegated`.
325
+
312
326
  When no human can answer one of the brief's questions, write the question
313
327
  into Questions and assumptions, state the assumption you will build on, and
314
328
  say so in your report. That applies to the brief's questions, never to the
@@ -128,6 +128,13 @@ usage: canon retrieve --for-role <ROLE> (--regime <KEY> | --domain <NAME>) [--su
128
128
  canon retrieve --for-role reviewer --domain dev --limit 20 --json
129
129
  ```
130
130
  ```text
131
+ # Record an independent reviewer's verdict on a change's brief (a plan review), bound to the brief's digest as the reviewer read it (`canon brief show --body`)
132
+ usage: canon review brief <CHANGE_ID> --actor <ACTOR_ID> --round <N> --verdict <approve|revise> --digest <DIGEST> [--project <PROJECT_ID>] [--session <SESSION_ID>] [--reviewer-provider <NAME>] [--reviewer-model <NAME>] [--reviewer-harness <NAME>] [--input]
133
+ ```
134
+ ```bash
135
+ canon review brief add-login --actor alice --round 1 --verdict approve --digest add-login=sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef --json
136
+ ```
137
+ ```text
131
138
  # Write one attributed Review record for a chore change directly to the ledger (exactly one provenance ref required)
132
139
  usage: canon review change <CHANGE_ID> --actor <ACTOR_ID> (--upstream-ref <TEXT> | --original-spec-ref <TEXT>) [--project <PROJECT_ID>] [--rev <REV>] [--role <ROLE>] [--session <SESSION_ID>] [--review-outcome <signed|indeterminate|unavailable>] [--reviewer-provider <NAME>] [--reviewer-model <NAME>] [--reviewer-harness <NAME>] [--artifact <PATH>]* [--max-artifact-mib <N>] [--input]
133
140
  ```
@@ -309,6 +316,30 @@ human accepts (or the implementer fixes) again. An accepted gap counts as
309
316
  covered for the ship guard and stays listed as `accepted-divergence` in
310
317
  `status` and `gate check`.
311
318
 
319
+ ## Review a brief (a plan review)
320
+
321
+ When `canon status` or `canon brief show <slug>` names a plan review (the owner delegated the approval of briefs), you read the
322
+ brief as an independent reviewer, in a session of your own, never the planner's or the orchestrator's. Read it with
323
+ `canon brief show <slug> --body`, which prints the text and, last, `digest: sha256:<hex>`, and record the verdict bound to that digest:
324
+
325
+ ```bash
326
+ canon review brief add-login --actor reviewer-1 --session reviewer-session --round 1 --verdict revise --digest add-login=sha256:0123456789abcdef
327
+ ```
328
+
329
+ Record every defect with `canon finding add --change add-login --review <review id> --round 1 --seq <k> --severity <s>`
330
+ (`--introduced-unknown` for a new blocker or should-fix). The `review id` is in the output. Severity follows your priority:
331
+
332
+ | Your priority | `--severity` |
333
+ |---|---|
334
+ | P0, P1 | `blocker` |
335
+ | P2 | `should-fix` |
336
+ | P3 | `note` |
337
+
338
+ `--verdict approve` is for a brief with no P0 or P1 left in your view; `revise` otherwise. The review counts only while the brief's
339
+ digest is the one you read: when the planner edits the brief, record the next round (`--round 2`) on the new digest. A digest that is
340
+ not the brief's now is `RELAY_DIGEST_STALE` and nothing is written. canon counts no rounds: after round 3 with P0 or P1 findings still open,
341
+ the orchestrator stops and reports to the owner. A plan review is not a chore's sign-off (`review change`).
342
+
312
343
  ## Record
313
344
 
314
345
  - Every defect is a finding; `finding list` shows round, seq, severity and
@@ -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.44.0"
3
+ .TH canon-adapter-authorize 1 "authorize 0.46.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.44.0
44
+ v0.46.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.44.0"
3
+ .TH canon-adapter-validate 1 "validate 0.46.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.44.0
44
+ v0.46.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.44.0"
3
+ .TH canon-adapter 1 "adapter 0.46.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.44.0
46
+ v0.46.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.44.0"
3
+ .TH canon-artifacts-move 1 "move 0.46.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
@@ -60,4 +60,4 @@ The bare run previews: it lists every upload and removal and prints a planDigest
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.44.0
63
+ v0.46.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-artifacts-prune 1 "prune 0.44.0"
3
+ .TH canon-artifacts-prune 1 "prune 0.46.0"
4
4
  .SH NAME
5
5
  canon\-artifacts\-prune \- Delete the artifact blobs no record binds any more (the bare run previews; \-\-commit \-\-plan\-digest deletes)
6
6
  .SH SYNOPSIS
@@ -74,4 +74,4 @@ It also deletes the stale temp files a killed blob write left in .canon/artifact
74
74
 
75
75
  Exit 0 for a preview or a commit, 1 when a delete failed, 2 when the plan is stale or the records or the store cannot be read.
76
76
  .SH VERSION
77
- v0.44.0
77
+ v0.46.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.44.0"
3
+ .TH canon-artifacts-store 1 "store 0.46.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.44.0
54
+ v0.46.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.44.0"
3
+ .TH canon-artifacts-verify 1 "verify 0.46.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
@@ -47,4 +47,4 @@ Exit 0 when every file is stored, 1 when one is missing or altered (data.problem
47
47
 
48
48
  It also counts the stale temp files a killed blob write left in .canon/artifacts/sha256 (`.tmp\-<sha256>\-<pid>\-<nanos>`, modified over five minutes ago): data.staleTemps has their files and bytes (unreadable, never 0, when the directory cannot be read) and a line names `canon artifacts prune`, which deletes them. verify deletes nothing, and a temp file never changes the exit.
49
49
  .SH VERSION
50
- v0.44.0
50
+ v0.46.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.44.0"
3
+ .TH canon-artifacts 1 "artifacts 0.46.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
@@ -45,4 +45,4 @@ Move the local artifact blobs to an object\-store tier, verify them, and remove
45
45
  canon\-artifacts\-prune(1)
46
46
  Delete the artifact blobs no record binds any more (the bare run previews; \-\-commit \-\-plan\-digest deletes)
47
47
  .SH VERSION
48
- v0.44.0
48
+ v0.46.0
@@ -1,16 +1,16 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-brief-approve 1 "approve 0.44.0"
3
+ .TH canon-brief-approve 1 "approve 0.46.0"
4
4
  .SH NAME
5
- canon\-brief\-approve \- Record the human\*(Aqs approval of the brief, bound to its text; refused while `brief check` has blockers
5
+ canon\-brief\-approve \- Record the human\*(Aqs approval of the brief, bound to its text; refused while `brief check` has blockers. With \-\-delegated, the approval the owner delegated in the policy
6
6
  .SH SYNOPSIS
7
- \fBcanon brief approve\fR <\fB\-\-approver\fR> [\fB\-\-as\fR] <\fB\-\-note\fR> [\fB\-\-relayed\-via\fR] [\fB\-\-actor\fR] [\fB\-\-digest\fR] [\fB\-\-repo\fR] [\fB\-\-json\fR] [\fB\-\-input\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] [\fICHANGE_ID\fR]
7
+ \fBcanon brief approve\fR [\fB\-\-approver\fR] [\fB\-\-as\fR] [\fB\-\-note\fR] [\fB\-\-relayed\-via\fR] [\fB\-\-actor\fR] [\fB\-\-digest\fR] [\fB\-\-delegated\fR] [\fB\-\-repo\fR] [\fB\-\-json\fR] [\fB\-\-input\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] [\fICHANGE_ID\fR]
8
8
  .SH DESCRIPTION
9
- Record the human\*(Aqs approval of the brief, bound to its text; refused while `brief check` has blockers
9
+ Record the human\*(Aqs approval of the brief, bound to its text; refused while `brief check` has blockers. With \-\-delegated, the approval the owner delegated in the policy
10
10
  .SH OPTIONS
11
11
  .TP
12
12
  \fB\-\-approver\fR \fI<NAME>\fR
13
- Who approved (the human, not the agent)
13
+ Who approved (the human, not the agent). Required unless \-\-delegated
14
14
  .TP
15
15
  \fB\-\-as\fR \fI<ROLE>\fR
16
16
  The role you act as: planner, implementer, reviewer or orchestrator. Overrides `CANON_ROLE`. `schema` and `context` list only the role\*(Aqs commands, `status` keeps its steps, and `\-\-role` on `evidence add` / `evidence audit` / `review scenario` / `review change` is this role unless given
@@ -30,17 +30,20 @@ orchestrator
30
30
  .RE
31
31
  .TP
32
32
  \fB\-\-note\fR \fI<TEXT>\fR
33
- The human\*(Aqs own words
33
+ The human\*(Aqs own words. Required unless \-\-delegated
34
34
  .TP
35
35
  \fB\-\-relayed\-via\fR \fI<NAME>\fR
36
36
  Record the human\*(Aqs answer on their behalf: the tool they were asked with (`ask`, `AskUserQuestion`, `chat`); an agent role may run the call only with it
37
37
  .TP
38
38
  \fB\-\-actor\fR \fI<ACTOR_ID>\fR
39
- With \-\-relayed\-via, the agent\*(Aqs actor id (default: the CANON_ACTOR environment variable)
39
+ With \-\-relayed\-via or \-\-delegated, the agent\*(Aqs actor id (default: the CANON_ACTOR environment variable)
40
40
  .TP
41
41
  \fB\-\-digest\fR \fI<DIGEST>\fR
42
42
  With \-\-relayed\-via, the digest `canon brief show \-\-body` showed the human, as `<change>=<sha256:digest>`, once per change; a brief whose digest differs is refused
43
43
  .TP
44
+ \fB\-\-delegated\fR
45
+ Approve under a delegation (`delegation:` in `.canon/policy.yaml`, approved with the policy) instead of a human\*(Aqs answer: the declared role (\-\-as or CANON_ROLE) must hold a `brief\-approve` entry, and the latest plan review of each brief (`canon review brief`) must be an `approve` by another actor with no open blocker finding. Takes no \-\-approver, \-\-note, \-\-relayed\-via or \-\-digest; an unmet condition is DELEGATION_REQUIRED with the condition as its reason, and nothing is written
46
+ .TP
44
47
  \fB\-\-repo\fR \fI<DIR>\fR
45
48
  The repo to act on (default: the nearest ancestor directory holding a canon.yaml)
46
49
  .TP
@@ -62,6 +65,7 @@ The changes to approve, one answer for all, none written unless every one is app
62
65
  Examples:
63
66
  canon brief approve add\-login \-\-approver Ana \-\-note \*(AqGo. Ship the failure flow too.\*(Aq
64
67
  canon brief approve add\-login add\-search fix\-sync \-\-approver Ana \-\-note \*(AqAll three, go.\*(Aq
68
+ canon brief approve add\-login \-\-as orchestrator \-\-actor impl\-1 \-\-delegated
65
69
 
66
70
  Several ids take one name, one answer and one timestamp. Every id is checked
67
71
  first; one refused id refuses the call (the first refused id\*(Aqs code, with a
@@ -73,5 +77,11 @@ chore whose approval saw the code tree that is still the current one asks for no
73
77
  `canon policy approve` in the same call. Edit the brief afterwards and it reads as
74
78
  not approved (BRIEF_APPROVAL_STALE) until a human answers again and this
75
79
  runs again. Run it only from the human\*(Aqs answer, with their words as \-\-note.
80
+
81
+ \-\-delegated is the one call an agent makes when the owner delegated the approval in
82
+ \&.canon/policy.yaml (`delegation:`): canon checks the entry, that the policy is approved, and that
83
+ the brief\*(Aqs latest plan review is an approve by another actor with no open blocker, then writes
84
+ `Approved: <owner> <when> — "<canon\*(Aqs words>" (delegated to <role> <actor> under policy <digest> after review <id>) …`.
85
+ It records no policy approval.
76
86
  .SH VERSION
77
- v0.44.0
87
+ v0.46.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.44.0"
3
+ .TH canon-brief-check 1 "check 0.46.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.44.0
44
+ v0.46.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.44.0"
3
+ .TH canon-brief-show 1 "show 0.46.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.44.0
53
+ v0.46.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.44.0"
3
+ .TH canon-brief 1 "brief 0.46.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
@@ -40,7 +40,7 @@ canon\-brief\-check(1)
40
40
  Read the brief against the rules: blocker and advisory findings (exit 0 clean, 1 blockers, 2 refused)
41
41
  .TP
42
42
  canon\-brief\-approve(1)
43
- Record the human\*(Aqs approval of the brief, bound to its text; refused while `brief check` has blockers
43
+ Record the human\*(Aqs approval of the brief, bound to its text; refused while `brief check` has blockers. With \-\-delegated, the approval the owner delegated in the policy
44
44
  .SH EXTRA
45
45
  Examples:
46
46
  canon brief show State and the next one to three steps
@@ -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.44.0
64
+ v0.46.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-change-defer 1 "defer 0.44.0"
3
+ .TH canon-change-defer 1 "defer 0.46.0"
4
4
  .SH NAME
5
5
  canon\-change\-defer \- Set an approved change aside for now (a human\*(Aqs decision: needs a reason, a reference and the approver); `canon change reopen` brings it back
6
6
  .SH SYNOPSIS
@@ -88,4 +88,4 @@ other values (the same call again is `unchanged`). CHANGE_NOT_FOUND for a change
88
88
  record. A repo with no `change_state:` line under `routing:` is refused (CONFIG_INVALID, TIERS):
89
89
  run `canon migrate`. Not destructive: nothing is deleted, so there is no \-\-commit.
90
90
  .SH VERSION
91
- v0.44.0
91
+ v0.46.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-change-drop 1 "drop 0.44.0"
3
+ .TH canon-change-drop 1 "drop 0.46.0"
4
4
  .SH NAME
5
5
  canon\-change\-drop \- Give up an approved change for good (a human\*(Aqs decision: needs a reason, a reference and the approver); it is never brought back
6
6
  .SH SYNOPSIS
@@ -74,4 +74,4 @@ and the same call again is `unchanged`; any other call is CHANGE_CONFLICT (CLOSE
74
74
  the work back, write a new change (`canon change new`) and name the dropped one in its
75
75
  `Source:`.
76
76
  .SH VERSION
77
- v0.44.0
77
+ v0.46.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.44.0"
3
+ .TH canon-change-new 1 "new 0.46.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.44.0
66
+ v0.46.0
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH canon-change-reopen 1 "reopen 0.44.0"
3
+ .TH canon-change-reopen 1 "reopen 0.46.0"
4
4
  .SH NAME
5
5
  canon\-change\-reopen \- Bring a deferred change back (a human\*(Aqs decision); the old approval is void and the brief needs a new one
6
6
  .SH SYNOPSIS
@@ -75,4 +75,4 @@ stale, and `canon brief approve` writes a new line even for the same name and an
75
75
  Human only, like `canon change defer`; \-\-ref is optional here. This reopens a change; to
76
76
  reopen a shipped subject use `canon subject move \-\-to verifying`.
77
77
  .SH VERSION
78
- v0.44.0
78
+ v0.46.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.44.0"
3
+ .TH canon-change 1 "change 0.46.0"
4
4
  .SH NAME
5
5
  canon\-change \- Write a plan change (.canon/changes/<slug>/brief.md) and adopt it into a subject; a human can defer, drop or reopen it
6
6
  .SH SYNOPSIS
@@ -56,4 +56,4 @@ role is refused (ACTOR_DENIED) unless it relays the human\*(Aqs explicit answer
56
56
  (deferred or dropped) change is no longer required by `gate check`, `status` or the ship guard, and the
57
57
  scenarios only it made are set aside; nothing is deleted. A shipped change cannot be closed.
58
58
  .SH VERSION
59
- v0.44.0
59
+ v0.46.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.44.0"
3
+ .TH canon-completion 1 "completion 0.46.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.44.0
60
+ v0.46.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.44.0"
3
+ .TH canon-context-pack-add 1 "add 0.46.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.44.0
47
+ v0.46.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.44.0"
3
+ .TH canon-context-pack-show 1 "show 0.46.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.44.0
44
+ v0.46.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.44.0"
3
+ .TH canon-context-pack-verify 1 "verify 0.46.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.44.0
44
+ v0.46.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.44.0"
3
+ .TH canon-context-pack 1 "context-pack 0.46.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.44.0
50
+ v0.46.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.44.0"
3
+ .TH canon-context 1 "context 0.46.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.44.0
44
+ v0.46.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.44.0"
3
+ .TH canon-dashboard 1 "dashboard 0.46.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.44.0
50
+ v0.46.0