@journeykit/canon 0.45.0 → 0.47.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.
- package/dist/skills/SKILL.src.md +29 -18
- package/dist/skills/reference/canon-gate.md +17 -24
- package/dist/skills/reference/canon-inventory.md +1 -1
- package/dist/skills/reference/canon-plan-import.md +1 -1
- package/dist/skills/reference/canon-policy.md +29 -5
- package/dist/skills/reference/canon-report-dashboard.md +2 -6
- package/dist/skills/reference/canon-review.md +24 -3
- package/dist/skills/reference/canon-storage.md +76 -155
- package/dist/skills/reference/canon-subject.md +1 -8
- package/dist/skills/reference/role-implementer.md +6 -8
- package/dist/skills/reference/role-orchestrator.md +32 -28
- package/dist/skills/reference/role-planner.md +15 -4
- package/dist/skills/reference/role-reviewer.md +32 -1
- package/man/canon-adapter-authorize.1 +2 -2
- package/man/canon-adapter-validate.1 +2 -2
- package/man/canon-adapter.1 +2 -2
- package/man/canon-artifacts-prune.1 +4 -4
- package/man/canon-artifacts-store.1 +6 -4
- package/man/canon-artifacts-verify.1 +7 -7
- package/man/canon-artifacts.1 +5 -8
- package/man/canon-brief-approve.1 +18 -8
- package/man/canon-brief-check.1 +2 -2
- package/man/canon-brief-show.1 +2 -2
- package/man/canon-brief.1 +3 -3
- package/man/canon-change-defer.1 +3 -4
- package/man/canon-change-drop.1 +2 -2
- package/man/canon-change-new.1 +2 -2
- package/man/canon-change-reopen.1 +2 -2
- package/man/canon-change.1 +2 -2
- package/man/canon-completion.1 +2 -2
- package/man/canon-context-pack-add.1 +2 -2
- package/man/canon-context-pack-show.1 +2 -2
- package/man/canon-context-pack-verify.1 +2 -2
- package/man/canon-context-pack.1 +2 -2
- package/man/canon-context.1 +2 -2
- package/man/canon-dashboard.1 +2 -2
- package/man/canon-demo-init.1 +2 -2
- package/man/canon-demo-review.1 +2 -2
- package/man/canon-demo.1 +2 -2
- package/man/canon-dispatch-begin.1 +2 -2
- package/man/canon-dispatch-diff.1 +2 -2
- package/man/canon-dispatch-end.1 +2 -2
- package/man/canon-dispatch.1 +2 -2
- package/man/canon-divergence-accept.1 +2 -2
- package/man/canon-divergence-add.1 +2 -2
- package/man/canon-divergence-defer.1 +2 -2
- package/man/canon-divergence-list.1 +2 -2
- package/man/canon-divergence-resolve.1 +2 -2
- package/man/canon-divergence.1 +2 -2
- package/man/canon-evidence-add.1 +2 -2
- package/man/canon-evidence-approval-payload.1 +2 -2
- package/man/canon-evidence-audit.1 +2 -2
- package/man/canon-evidence.1 +2 -2
- package/man/canon-export.1 +2 -2
- package/man/canon-feature-new.1 +2 -2
- package/man/canon-feature.1 +2 -2
- package/man/canon-finding-add.1 +2 -2
- package/man/canon-finding-close.1 +2 -2
- package/man/canon-finding-list.1 +2 -2
- package/man/canon-finding.1 +2 -2
- package/man/canon-format.1 +2 -2
- package/man/canon-gate-check.1 +2 -2
- package/man/canon-gate-install-hooks.1 +2 -2
- package/man/canon-gate-promote.1 +2 -2
- package/man/canon-gate.1 +2 -2
- package/man/canon-ingest-plans.1 +2 -2
- package/man/canon-ingest-records.1 +2 -2
- package/man/canon-ingest.1 +2 -2
- package/man/canon-init.1 +2 -2
- package/man/canon-inventory-sync.1 +2 -2
- package/man/canon-inventory.1 +2 -2
- package/man/canon-ledger-compact.1 +2 -2
- package/man/canon-ledger.1 +2 -2
- package/man/canon-migrate.1 +3 -3
- package/man/canon-plugin-sync.1 +2 -2
- package/man/canon-plugin.1 +2 -2
- package/man/canon-policy-approve.1 +2 -2
- package/man/canon-policy-show.1 +2 -2
- package/man/canon-policy.1 +2 -2
- package/man/canon-prompt-add.1 +2 -2
- package/man/canon-prompt-show.1 +2 -2
- package/man/canon-prompt.1 +2 -2
- package/man/canon-purge.1 +2 -2
- package/man/canon-query.1 +5 -5
- package/man/canon-regime-show.1 +2 -2
- package/man/canon-regime.1 +2 -2
- package/man/canon-report-build.1 +2 -2
- package/man/canon-report-check.1 +2 -2
- package/man/canon-report-snapshot.1 +2 -2
- package/man/canon-report.1 +2 -2
- package/man/canon-retrieve.1 +2 -2
- package/man/canon-review-brief.1 +84 -0
- package/man/canon-review-change.1 +2 -2
- package/man/canon-review-scenario.1 +2 -2
- package/man/canon-review.1 +5 -2
- package/man/canon-scenario-new.1 +2 -2
- package/man/canon-scenario.1 +2 -2
- package/man/canon-schema.1 +2 -2
- package/man/canon-search.1 +2 -2
- package/man/canon-selftest.1 +2 -2
- package/man/canon-skills-check.1 +2 -2
- package/man/canon-skills-doctor.1 +2 -2
- package/man/canon-skills-install.1 +2 -2
- package/man/canon-skills-show.1 +2 -2
- package/man/canon-skills.1 +2 -2
- package/man/canon-status.1 +2 -2
- package/man/canon-strategy-approval-payload.1 +2 -2
- package/man/canon-strategy-promote.1 +2 -2
- package/man/canon-strategy-rollback.1 +2 -2
- package/man/canon-strategy.1 +2 -2
- package/man/canon-subject-adopt.1 +2 -2
- package/man/canon-subject-move.1 +2 -2
- package/man/canon-subject-new.1 +2 -2
- package/man/canon-subject-show.1 +2 -2
- package/man/canon-subject-unadopt.1 +2 -2
- package/man/canon-subject.1 +2 -2
- package/man/canon-task-done.1 +2 -2
- package/man/canon-task.1 +2 -2
- package/man/canon-trace.1 +2 -2
- package/man/canon.1 +4 -7
- package/package.json +5 -5
- package/man/canon-artifacts-move.1 +0 -63
- package/man/canon-tier-age.1 +0 -50
- package/man/canon-tier.1 +0 -39
package/dist/skills/SKILL.src.md
CHANGED
|
@@ -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
|
|
@@ -154,22 +168,20 @@ what its own write names: evidence carries nothing forward from an earlier
|
|
|
154
168
|
record, and a review stays current while the verdict and checks of the
|
|
155
169
|
evidence it saw are unchanged and the code tree is the one it saw.
|
|
156
170
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
`canon artifacts verify` (`--full` re-hashes every blob)
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
binds any more (the store only grows: a report written anew on every run adds a
|
|
171
|
+
Evidence attachment bytes live in `.canon/artifacts/sha256/`, git-tracked. With
|
|
172
|
+
`storage: { attachments: lfs }` in `canon.yaml` git LFS stores them, and
|
|
173
|
+
`evidence add`, `review scenario --artifact` and `artifacts store` write bytes
|
|
174
|
+
only when git-lfs is installed (`ARTIFACTS_STORE_REQUIRED` otherwise). The gate
|
|
175
|
+
and `canon artifacts verify` (`--full` re-hashes every blob) read that
|
|
176
|
+
directory. `canon artifacts prune` is the repo owner's decision, not a step
|
|
177
|
+
of the loop. It deletes the blobs no record binds any more (the store only
|
|
178
|
+
grows: a report written anew on every run adds a
|
|
166
179
|
blob per run). A blob stays while the latest evidence or a current review binds
|
|
167
180
|
it (what the gate and `artifacts verify` read), while a record not promoted yet
|
|
168
181
|
binds it, and, with `--keep-days N`, while any evidence or review of the last
|
|
169
182
|
`N` days binds it; the bare run previews the blobs it deletes and why the rest
|
|
170
|
-
stay, and `--commit --plan-digest` deletes. A deleted
|
|
171
|
-
history (shrinking that history is the repo owner's call, not the command's)
|
|
172
|
-
deleted object of an object-store tier is gone for good. The preview and the
|
|
183
|
+
stay, and `--commit --plan-digest` deletes. A deleted blob stays in git
|
|
184
|
+
history (shrinking that history is the repo owner's call, not the command's). The preview and the
|
|
173
185
|
commit also cover the stale temp files a killed blob write leaves in
|
|
174
186
|
`.canon/artifacts/sha256` (`.tmp-<sha256>-<pid>-<nanos>`, a regular file
|
|
175
187
|
modified over five minutes ago): the plan lists them in `data.staleTemps`, and
|
|
@@ -193,8 +205,7 @@ fix, re-review and evidence chain of a loop in time order, the archive's
|
|
|
193
205
|
earlier versions included. Both read, and first refresh, a derived index,
|
|
194
206
|
`.canon/index/search.db`: gitignored, never a source of records, safe to delete
|
|
195
207
|
(the next run rebuilds it, and only `data.index.rebuilt` differs). Records still
|
|
196
|
-
staged
|
|
197
|
-
names the stores not read.
|
|
208
|
+
staged are not in it.
|
|
198
209
|
|
|
199
210
|
## Know your role
|
|
200
211
|
|
|
@@ -344,9 +355,9 @@ leaves below take one object only.
|
|
|
344
355
|
|
|
345
356
|
### Preview, then `--commit`
|
|
346
357
|
|
|
347
|
-
The
|
|
348
|
-
`canon
|
|
349
|
-
|
|
358
|
+
The four commands that delete or rewrite existing data (`canon purge`,
|
|
359
|
+
`canon ledger compact`, `canon artifacts prune`, `canon migrate`) act in
|
|
360
|
+
two steps. The bare run previews: it writes nothing,
|
|
350
361
|
exits 0 and prints the effects and a `planDigest`. Read the effects, then act
|
|
351
362
|
with `--commit --plan-digest <planDigest>`. It refuses (`PLAN_STALE`) when
|
|
352
363
|
the plan differs from the one you previewed, so run the preview again. Appends
|
|
@@ -459,7 +470,7 @@ current step needs.
|
|
|
459
470
|
| `canon-review` | Findings and reviews. |
|
|
460
471
|
| `canon-artifact-ingest` | `canon ingest records`: artifacts into verdict trajectories. |
|
|
461
472
|
| `canon-plan-import` | `canon ingest plans`: plan state into change and task records. |
|
|
462
|
-
| `canon-storage` |
|
|
473
|
+
| `canon-storage` | Where records live, the `storage:` block, retention, export, purge. |
|
|
463
474
|
| `canon-policy` | The policy and the CEL expressions behind it. |
|
|
464
475
|
| `canon-plugins` | Plugin overlays on core records. |
|
|
465
476
|
| `canon-learn` | Strategy memory: promote, approve, roll back. |
|
|
@@ -209,18 +209,13 @@ A present section, even `require_evidence: false` or a malformed one
|
|
|
209
209
|
The ship guard and `canon status` read the same decision, and
|
|
210
210
|
`--override-reason` does not waive it. Keys: `canon-policy`.
|
|
211
211
|
|
|
212
|
-
|
|
213
|
-
`uncovered-cell` on the subject `spec_coverage`:
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
unusable`). It is never treated as
|
|
220
|
-
absent — a typo must not be silently equivalent to not opting in.
|
|
221
|
-
- A **corpus kind routed off the gate's rung** (`scenario`,
|
|
222
|
-
`divergence`, or `subject` sent anywhere but `local`) refuses, because
|
|
223
|
-
the gate reads one tier and would otherwise pass by seeing nothing.
|
|
212
|
+
A **malformed section** refuses rather than silently passes, and surfaces as
|
|
213
|
+
`uncovered-cell` on the subject `spec_coverage`: an unknown key, an unknown `scope` status, or a
|
|
214
|
+
malformed `require_cases`/`require_review`/`require_audit`/`require_ci_run` — unknown
|
|
215
|
+
key, bad status, `null`, non-mapping, a missing or out-of-range
|
|
216
|
+
`rate`, a `min_cases` that is not an integer of 1 or more — refuses at check time (`uncovered-cell spec_coverage — ...
|
|
217
|
+
unusable`). It is never treated as
|
|
218
|
+
absent — a typo must not be silently equivalent to not opting in.
|
|
224
219
|
|
|
225
220
|
Unparseable rows in those three kinds do NOT surface as
|
|
226
221
|
`malformed-evidence`; they are kept off the evidence violation set on
|
|
@@ -730,21 +725,19 @@ again. The directory is tracked in git (`canon init` never ignores it):
|
|
|
730
725
|
commit it with the ledger. A file larger than 25 MiB is refused (exit 2);
|
|
731
726
|
raise the limit with `--max-artifact-mib <N>`.
|
|
732
727
|
|
|
733
|
-
Where those bytes live is `canon.yaml`'s `
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
`
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
`
|
|
741
|
-
|
|
742
|
-
`canon artifacts move --tier <tier>` (a preview; `--commit --plan-digest` acts) moves an existing local
|
|
743
|
-
store; it is the repo owner's decision. `canon artifacts prune` (a preview;
|
|
728
|
+
Where those bytes live is `canon.yaml`'s `storage.attachments`: `git` (the
|
|
729
|
+
default) keeps the directory above git-tracked, `lfs` has git LFS store the
|
|
730
|
+
blobs. With `lfs`, `evidence add`, `review scenario --artifact` and `artifacts
|
|
731
|
+
store` write bytes only when git-lfs is installed and exit 2 with
|
|
732
|
+
`ARTIFACTS_STORE_REQUIRED` otherwise. `canon gate check` and `canon artifacts
|
|
733
|
+
verify [--full]` read the directory (`--full` re-hashes every blob). A blob file
|
|
734
|
+
that is an LFS pointer is bytes not received: `artifacts verify` reports it as
|
|
735
|
+
`lfs_pointer` and the gate counts the attachment as a violation; run `git lfs
|
|
736
|
+
pull`. `canon artifacts prune` (a preview;
|
|
744
737
|
`--commit --plan-digest` acts) deletes the blobs no record binds any more and
|
|
745
738
|
leaves what `gate check` and `artifacts verify` read, so their answers do not
|
|
746
739
|
change (it also deletes the stale `.tmp-` files a killed blob write left, which
|
|
747
|
-
`artifacts verify` counts without deleting); it is the repo owner's decision
|
|
740
|
+
`artifacts verify` counts without deleting); it is the repo owner's decision. See `canon-storage`.
|
|
748
741
|
|
|
749
742
|
`canon gate check` re-checks every file bound to a LATEST evidence record
|
|
750
743
|
(the latest per task and per `(project_id, scenario_id)`):
|
|
@@ -115,7 +115,7 @@ Per configured root, in order:
|
|
|
115
115
|
visible; plain tags (`@p2`) are ignored. The index derives from the
|
|
116
116
|
`.feature` corpus alone. See `canon-authoring` for the organizing rule.
|
|
117
117
|
3. **Materialize** — upserts ONE scenario index record per
|
|
118
|
-
`(project_id, scenario_id)` via the append-only
|
|
118
|
+
`(project_id, scenario_id)` via the append-only ledger write.
|
|
119
119
|
Logically idempotent: an unchanged `source_digest` is a no-op; a
|
|
120
120
|
changed `.feature` file appends exactly one new record. A `.feature`
|
|
121
121
|
edit re-materializes every scenario in that file (file granularity).
|
|
@@ -74,7 +74,7 @@ canon ingest plans --repo ../svc
|
|
|
74
74
|
|
|
75
75
|
Per source the summary reports `changes_parsed`/`tasks_parsed`,
|
|
76
76
|
`changes_persisted`/`tasks_persisted`, `changes_unwritten`/
|
|
77
|
-
`tasks_unwritten` (
|
|
77
|
+
`tasks_unwritten` (a store that cannot be written — printed, never silently
|
|
78
78
|
dropped), `duplicate_change_id` (two sources producing the same
|
|
79
79
|
`change_id` this pass — the LATER is skipped and counted, never merged),
|
|
80
80
|
the adapter's `unmapped` drop counts, and `malformed` (structurally
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# canon-policy
|
|
2
2
|
|
|
3
3
|
Canon uses ONE expression language — CEL — for every conditional knob a
|
|
4
|
-
spec needs: policy-routing predicates,
|
|
4
|
+
spec needs: policy-routing predicates, verdict-
|
|
5
5
|
mapping guards, retrieval filters, and a template's `applies_when:`
|
|
6
6
|
section. Wherever a `policy.yaml` predicate or an `applies_when:` string
|
|
7
7
|
appears, it is a CEL expression evaluated against the target record.
|
|
@@ -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`, `
|
|
13
|
-
`
|
|
14
|
-
`spec_coverage`, `staleness`, `trust_required`,
|
|
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
|
|
@@ -44,12 +44,8 @@ canon report build
|
|
|
44
44
|
canon report build --repo /path/to/repo
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
(`canon.yaml`'s static `routing`/`tiers` tables), not a live backend
|
|
50
|
-
probe, and an empty set renders NO section at all — so a repo routing
|
|
51
|
-
nothing to a not-directly-readable backend renders exactly as before
|
|
52
|
-
the section existed.
|
|
47
|
+
The report reads every record directly: the ledger, `.canon/hot.db` and the
|
|
48
|
+
learn parquet under `.canon/learn/`. No section lists kinds it did not read.
|
|
53
49
|
|
|
54
50
|
**Done when:** `canon report build` exits `0` and `canon report check`
|
|
55
51
|
then exits `0` (no `DRIFT`).
|
|
@@ -249,9 +249,9 @@ screenshot, a recording, a trace — exactly as `canon evidence add
|
|
|
249
249
|
--artifact` binds one: the path must resolve to a file inside the
|
|
250
250
|
repository, a file over 25 MiB is refused unless `--max-artifact-mib <N>`
|
|
251
251
|
raises the limit, and the bytes are stored by digest (in
|
|
252
|
-
`.canon/artifacts/sha256/<hex
|
|
253
|
-
|
|
254
|
-
|
|
252
|
+
`.canon/artifacts/sha256/<hex>`; commit the store with the ledger; with
|
|
253
|
+
`storage.attachments: lfs` the review is refused with `ARTIFACTS_STORE_REQUIRED`
|
|
254
|
+
when git-lfs is missing) before the
|
|
255
255
|
review is written. Any refusal exits 2 and writes and stores nothing. The
|
|
256
256
|
review records each distinct file once, in the order given:
|
|
257
257
|
|
|
@@ -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
|