@journeykit/canon 0.30.0 → 0.32.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 +77 -32
- package/dist/skills/reference/brief-align.md +2 -2
- package/dist/skills/reference/brief-clarify.md +2 -2
- package/dist/skills/reference/brief-harden.md +2 -2
- package/dist/skills/reference/brief-polish.md +8 -8
- package/dist/skills/reference/brief-shape.md +40 -9
- package/dist/skills/reference/canon-authoring.md +6 -6
- package/dist/skills/reference/canon-gate.md +45 -36
- package/dist/skills/reference/canon-learn.md +2 -2
- package/dist/skills/reference/canon-plan-import.md +2 -2
- package/dist/skills/reference/canon-plugins.md +6 -6
- package/dist/skills/reference/canon-policy.md +7 -4
- package/dist/skills/reference/canon-report-dashboard.md +17 -10
- package/dist/skills/reference/canon-review.md +24 -24
- package/dist/skills/reference/canon-storage.md +2 -2
- package/dist/skills/reference/canon-subject.md +137 -103
- package/dist/skills/reference/role-implementer.md +52 -36
- package/dist/skills/reference/role-orchestrator.md +68 -38
- package/dist/skills/reference/role-planner.md +99 -45
- package/dist/skills/reference/role-reviewer.md +69 -43
- 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-move.1 +2 -2
- package/man/canon-artifacts-store.1 +2 -2
- package/man/canon-artifacts-verify.1 +2 -2
- package/man/canon-artifacts.1 +2 -2
- package/man/canon-brief-approve.1 +17 -5
- package/man/canon-brief-check.1 +2 -2
- package/man/canon-brief-show.1 +6 -3
- package/man/canon-brief.1 +8 -7
- package/man/canon-change-new.1 +4 -4
- package/man/canon-change.1 +3 -3
- 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 +10 -10
- 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 +15 -6
- package/man/canon-divergence-add.1 +6 -6
- package/man/canon-divergence-defer.1 +6 -6
- package/man/canon-divergence-list.1 +2 -2
- package/man/canon-divergence-resolve.1 +6 -6
- package/man/canon-divergence.1 +2 -2
- package/man/canon-evidence-add.1 +16 -16
- package/man/canon-evidence-approval-payload.1 +10 -10
- package/man/canon-evidence-audit.1 +10 -10
- package/man/canon-evidence.1 +3 -3
- package/man/canon-export.1 +2 -2
- package/man/canon-feature-new.1 +6 -6
- package/man/canon-feature.1 +2 -2
- package/man/canon-finding-add.1 +11 -11
- package/man/canon-finding-close.1 +8 -8
- package/man/canon-finding-list.1 +4 -4
- package/man/canon-finding.1 +4 -4
- 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 +4 -4
- package/man/canon-ingest-sessions.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 +20 -3
- package/man/canon-plugin-sync.1 +2 -2
- package/man/canon-plugin.1 +2 -2
- package/man/canon-policy-approve.1 +9 -3
- 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 +5 -5
- package/man/canon-review-change.1 +6 -6
- package/man/canon-review-scenario.1 +6 -6
- package/man/canon-review.1 +2 -2
- package/man/canon-scenario-new.1 +10 -10
- package/man/canon-scenario.1 +2 -2
- package/man/canon-schema.1 +2 -2
- package/man/canon-search.1 +104 -0
- 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 +7 -2
- package/man/canon-strategy-approval-payload.1 +2 -2
- package/man/canon-strategy-promote.1 +2 -2
- package/man/canon-strategy-rollback.1 +5 -5
- package/man/canon-strategy.1 +2 -2
- package/man/canon-subject-adopt.1 +4 -4
- package/man/canon-subject-move.1 +5 -5
- package/man/canon-subject-new.1 +5 -5
- package/man/canon-subject-show.1 +2 -2
- package/man/canon-subject-unadopt.1 +5 -5
- 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-tier-age.1 +2 -2
- package/man/canon-tier.1 +2 -2
- package/man/canon-trace.1 +56 -0
- package/man/canon.1 +8 -2
- package/package.json +4 -4
|
@@ -129,11 +129,11 @@ A present section, even `require_evidence: false` or a malformed one
|
|
|
129
129
|
|
|
130
130
|
- **Unimplemented** — no `EvidenceRecord` carries the scenario's
|
|
131
131
|
`(project_id, scenario_id)`. Author one with
|
|
132
|
-
`canon evidence add --scenario
|
|
132
|
+
`canon evidence add --scenario <id> --project <root-id>`; the
|
|
133
133
|
root id is needed once more than one spec root is configured, because
|
|
134
134
|
two roots may carry the same scenario id. `--summary` is allowed here too (scanned for fabrication
|
|
135
135
|
markers like a task's); it is a row suffix only when the record also
|
|
136
|
-
names a `--task
|
|
136
|
+
names a `--task`. A record carrying both `--task` and `--scenario`
|
|
137
137
|
is one attestation answering both joins: it counts for the task cell
|
|
138
138
|
and for the scenario cell (verdicts, the shipped gate, the review gate).
|
|
139
139
|
- **Mismatched** — the folded divergence state is `open`,
|
|
@@ -161,7 +161,7 @@ A present section, even `require_evidence: false` or a malformed one
|
|
|
161
161
|
(a review written before 0.15 has no pins and skips this check), and,
|
|
162
162
|
when `distinct_actor` (default `true`), is by a reviewer and actor
|
|
163
163
|
other than the scenario's evidence actor and from a session other than
|
|
164
|
-
any evidence session when both carry one (`--session
|
|
164
|
+
any evidence session when both carry one (`--session`);
|
|
165
165
|
gaps are `unreviewed-promotion`, and the detail says whether the
|
|
166
166
|
review is missing, a self-review, stale (naming whether the spec, the
|
|
167
167
|
evidence or both changed), or not signed. With `block_on_findings`
|
|
@@ -218,7 +218,7 @@ report such files.
|
|
|
218
218
|
### Accepted divergence and re-verification
|
|
219
219
|
|
|
220
220
|
```bash
|
|
221
|
-
canon divergence accept cart.add.01 --project
|
|
221
|
+
canon divergence accept cart.add.01 --project root --reason "known gap" --tracking "issue#12" --expiry 2026-12-31 --actor reviewer-2 --role reviewer --session review-session-1
|
|
222
222
|
```
|
|
223
223
|
|
|
224
224
|
Accepting a scenario whose latest evidence is `divergent` as a known gap
|
|
@@ -240,10 +240,10 @@ Re-verification is one rule with two triggers: a blocker whose latest
|
|
|
240
240
|
disposition is `fixed`, and a chore change once approved, keep the subject
|
|
241
241
|
from shipping until every one of its evidenced scenarios has evidence
|
|
242
242
|
recorded after the close or the approval. A blocker that names its
|
|
243
|
-
scenarios (`finding add --scenario
|
|
244
|
-
names them with the per-scenario command (`canon evidence add --project
|
|
245
|
-
<root-id> --scenario
|
|
246
|
-
refusal names the scenarios and the batch command: `canon evidence add --project
|
|
243
|
+
scenarios (`finding add --scenario`) asks only those, and the refusal
|
|
244
|
+
names them with the per-scenario command (`canon evidence add --project
|
|
245
|
+
<root-id> --scenario <id> --report <format>:<path>` plus `--class`, `--role` and `--ref`). Otherwise the
|
|
246
|
+
refusal names the scenarios and the batch command: `canon evidence add --project <root-id>
|
|
247
247
|
--all-scenarios --report <format>:<path> --class test-run --role
|
|
248
248
|
implementer --ref "<test command>"`. Reviews pin what the evidence says
|
|
249
249
|
(its verdict and the identity of its checks), not which record it is, so
|
|
@@ -259,17 +259,17 @@ canon never generates or runs an audit. An external evaluator does, and
|
|
|
259
259
|
canon records its result:
|
|
260
260
|
|
|
261
261
|
```bash
|
|
262
|
-
canon evidence audit cart.add.01 --project
|
|
262
|
+
canon evidence audit cart.add.01 --project root \
|
|
263
263
|
--ref "judge run 42" --role reviewer \
|
|
264
|
-
--evaluator
|
|
264
|
+
--evaluator judge --evaluator-version 1.2 \
|
|
265
265
|
--evaluator-digest 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 \
|
|
266
266
|
--audit-result refuted --report junit:audit/counterexample.xml
|
|
267
267
|
```
|
|
268
268
|
|
|
269
|
-
- `evidence audit` requires the scenario operand, `--ref`, `--evaluator
|
|
269
|
+
- `evidence audit` requires the scenario operand, `--ref`, `--evaluator`,
|
|
270
270
|
`--evaluator-version`, `--evaluator-digest` (sha256, 64 lowercase hex)
|
|
271
|
-
and `--audit-result confirmed|refuted|indeterminate`, with `--project
|
|
272
|
-
where several spec roots exist. It takes no `--task
|
|
271
|
+
and `--audit-result confirmed|refuted|indeterminate`, with `--project`
|
|
272
|
+
where several spec roots exist. It takes no `--task`, `--verdict`,
|
|
273
273
|
`--surface-ref` or `--approval-*`; the evaluator flags exist on no other
|
|
274
274
|
command. All refusals exit `2`.
|
|
275
275
|
- The record carries `audit: {evaluator_id, evaluator_version,
|
|
@@ -299,23 +299,23 @@ never rides along into a confirming audit. `--drop-attachment` and
|
|
|
299
299
|
|
|
300
300
|
### Nothing is attested before the brief is approved (`--override-reason`)
|
|
301
301
|
|
|
302
|
-
The approval is never assumed: the agent writes the brief,
|
|
303
|
-
|
|
304
|
-
`canon evidence add` is the backstop for that
|
|
302
|
+
The approval is never assumed: the agent writes the brief, shows it to the
|
|
303
|
+
human and asks, and builds nothing for that scope until the human answers.
|
|
304
|
+
`canon evidence add` is the backstop for that rule (0.16 M7). It
|
|
305
305
|
refuses (exit `1`, nothing staged or stored) while a subject the record
|
|
306
|
-
attests for has an enforced, unapproved brief: the
|
|
307
|
-
|
|
306
|
+
attests for has an enforced, unapproved brief: a change the record
|
|
307
|
+
answers to (below) has a canon `.canon/changes/<change>/brief.md` with no `Approved:`
|
|
308
308
|
line, was edited after its approval (`BRIEF_CHANGED_SINCE_APPROVAL`), or
|
|
309
309
|
there is no canon `brief.md` yet but the change comes from an
|
|
310
310
|
external openspec plan with a `proposal.md` under the plan sources (the
|
|
311
311
|
check `canon status` and the ship guard use; see
|
|
312
312
|
`canon-subject`; which changes a scenario answers to is scoped by its `@flow:<change>.<F-id>` tags, described there). The subjects are the scenario's `@subject` owner for
|
|
313
|
-
`--scenario
|
|
314
|
-
`--task
|
|
313
|
+
`--scenario`, and every subject adopting the task's change for
|
|
314
|
+
`--task`:
|
|
315
315
|
|
|
316
316
|
```stderr
|
|
317
317
|
canon evidence add: unreviewed-promotion demo-subject — evidence for world.demo.01: brief not approved — .canon/changes/c-demo/brief.md has no `Approved:` line, so the human has not answered it; once they do, record their words with `canon brief approve c-demo --approver <the human> --note "<their words>"`
|
|
318
|
-
canon evidence add: refused — stop
|
|
318
|
+
canon evidence add: refused — stop and get the human's answer to the brief: nothing is built or attested for a subject before its brief is approved. Show it (`canon brief show --body`), ask with the harness question tool, and on their explicit approval record it with `canon brief approve --approver <their name> --note "<their words>" --relayed-via <the question tool> --actor <your actor id> --digest <change>=<the digest shown>` (or they approve on `canon dashboard`); never unset your role to run it; to attest anyway, pass --override-reason <text>, which is recorded on the evidence record
|
|
319
319
|
```
|
|
320
320
|
|
|
321
321
|
For a change from an external plan with no canon brief yet, the first
|
|
@@ -341,7 +341,7 @@ brief_override:
|
|
|
341
341
|
reason: the human approved in chat; the line follows
|
|
342
342
|
waived:
|
|
343
343
|
- { class: unreviewed-promotion, subject: demo-subject }
|
|
344
|
-
actor: { agent_id: lead } # from --actor
|
|
344
|
+
actor: { agent_id: lead } # from --actor
|
|
345
345
|
```
|
|
346
346
|
|
|
347
347
|
Under `--json` the same waiver is `data.overrides[]` (`code` of the waived
|
|
@@ -376,8 +376,9 @@ review waivers: 1 advisory(ies) — not failing the gate:
|
|
|
376
376
|
The waiver lasts only until the subject's next status write.
|
|
377
377
|
|
|
378
378
|
`canon subject move <id> --to shipped` also refuses where a brief exists and
|
|
379
|
-
is not approved (the subject
|
|
380
|
-
|
|
379
|
+
is not approved (a change the subject answers for, that is one a scenario of
|
|
380
|
+
the subject is tagged `@flow:<change>.*` for, one with an `Approved:` line,
|
|
381
|
+
or a chore, has a canon
|
|
381
382
|
`brief.md` with no `Approved:` line or one the brief's text no longer
|
|
382
383
|
matches, or an external `proposal.md` and no canon `brief.md` yet;
|
|
383
384
|
see `canon-subject`), as an `unreviewed-promotion` naming
|
|
@@ -437,14 +438,14 @@ what backed the claim:
|
|
|
437
438
|
|
|
438
439
|
```bash
|
|
439
440
|
# any file: a Playwright trace, screenshots, an agent QA log — by sha256
|
|
440
|
-
canon evidence add --scenario
|
|
441
|
+
canon evidence add --scenario cart.add.04 --project root \
|
|
441
442
|
--class agent-qa --ref "stagehand run 7" --role implementer \
|
|
442
443
|
--artifact test-results/cart-trace.zip
|
|
443
444
|
# a JUnit XML or Cucumber JSON report: also records the matched case + outcome
|
|
444
|
-
canon evidence add --scenario
|
|
445
|
-
canon evidence add --scenario
|
|
445
|
+
canon evidence add --scenario cart.add.04 --project root --class test-run --ref "cargo nextest run" --role implementer --report junit:target/nextest/default/junit.xml
|
|
446
|
+
canon evidence add --scenario cart.add.04 --project root --class test-run --ref "cucumber-js" --role implementer --report cucumber:reports/cucumber.json
|
|
446
447
|
# a Swift Testing event stream (swift test --experimental-event-stream-output <path>)
|
|
447
|
-
canon evidence add --scenario
|
|
448
|
+
canon evidence add --scenario cart.add.04 --project root --class test-run --ref "swift test" --role implementer --report swift-testing:.build/events.jsonl
|
|
448
449
|
```
|
|
449
450
|
|
|
450
451
|
A case is bound when the scenario id is its OWN: the first
|
|
@@ -496,12 +497,12 @@ not close it.
|
|
|
496
497
|
One test run proves many scenarios. Bind it once:
|
|
497
498
|
|
|
498
499
|
```bash
|
|
499
|
-
canon evidence add --project
|
|
500
|
+
canon evidence add --project root --all-scenarios \
|
|
500
501
|
--report junit:target/nextest/default/junit.xml \
|
|
501
502
|
--class test-run --ref "cargo nextest run" --role implementer
|
|
502
503
|
```
|
|
503
504
|
|
|
504
|
-
Each indexed scenario of `--project
|
|
505
|
+
Each indexed scenario of `--project` that owns a case (the rule above)
|
|
505
506
|
gets its own record, with only its own cases. Its verdict comes from
|
|
506
507
|
them: `faithful` when every case passed, `divergent` when one failed,
|
|
507
508
|
`not-applicable` when one was skipped and none failed. `--verdict <v>`
|
|
@@ -521,18 +522,18 @@ It is all or nothing: a claimed `faithful` verdict over a failed case,
|
|
|
521
522
|
a fabrication marker in `--summary`, an unapproved brief for any
|
|
522
523
|
scenario's subject refuses the whole batch, and nothing is written. Each
|
|
523
524
|
record binds only what the batch names (nothing is carried forward).
|
|
524
|
-
`--scenario
|
|
525
|
+
`--scenario`, `--task`,
|
|
525
526
|
`--report-case`, `canon evidence audit` and the approval flags name one subject
|
|
526
527
|
and are refused with `--all-scenarios`.
|
|
527
528
|
|
|
528
|
-
A task's evidence with `--report` and no `--scenario
|
|
529
|
+
A task's evidence with `--report` and no `--scenario` binds EVERY case
|
|
529
530
|
in the report, so a `faithful` verdict needs all of them to pass.
|
|
530
531
|
|
|
531
532
|
Many records at once without a report: `--input` takes inline JSON, a file
|
|
532
533
|
or `-`; an array (or NDJSON) is a batch, validated element by element before
|
|
533
534
|
the first write (a refusal writes nothing, exit 2). Keys are the option
|
|
534
535
|
names in camelCase plus `operands`: one object per scenario, with
|
|
535
|
-
`
|
|
536
|
+
`scenario`, `class`, `ref` and `role`. `canon schema evidence add --json`
|
|
536
537
|
shows the input schema and an example. Each element reports `written`,
|
|
537
538
|
`unchanged` or `failed` in `data.items[]`.
|
|
538
539
|
|
|
@@ -552,7 +553,7 @@ current pinned review saw, `canon evidence add` prints one line per
|
|
|
552
553
|
review it makes stale (its verdict or checks differ from what the review saw), with the command that re-pins it:
|
|
553
554
|
|
|
554
555
|
```stderr
|
|
555
|
-
canon evidence add: review by `reviewer-2` of cart.add.01 is now stale (this record's verdict or checks differ from what it saw); re-pin it: canon review scenario cart.add.01 --project
|
|
556
|
+
canon evidence add: review by `reviewer-2` of cart.add.01 is now stale (this record's verdict or checks differ from what it saw); re-pin it: canon review scenario cart.add.01 --project root --actor reviewer-2 --role reviewer --original-spec-ref specs/kind=feature/area=cart/add.feature
|
|
556
557
|
```
|
|
557
558
|
|
|
558
559
|
The decision is the gate's own (the same stale-review rule `canon gate
|
|
@@ -684,7 +685,7 @@ task at all is a loud failure naming every source consulted. A repo with
|
|
|
684
685
|
no `.canon/changes/` and `sources: []` is refused: "this repo configures
|
|
685
686
|
no plan sources (no `.canon/changes` and no `plans.sources` entries in
|
|
686
687
|
canon.yaml) … write the change with `canon change new`, or list your
|
|
687
|
-
external plans under `plans.sources`" (`canon dispatch begin --task
|
|
688
|
+
external plans under `plans.sources`" (`canon dispatch begin --task` says the
|
|
688
689
|
same).
|
|
689
690
|
It requires
|
|
690
691
|
a matching non-`Divergent` evidence record, and flips `- [ ]` → `- [x]`
|
|
@@ -706,7 +707,7 @@ A flip on evidence that cannot prove the task still succeeds, but warns
|
|
|
706
707
|
on stderr: when none of the task's evidence records binds a file and one
|
|
707
708
|
of them cites a canon command as its `--ref` (`canon gate check`,
|
|
708
709
|
`canon status`), the warning says to bind the artifact or report that
|
|
709
|
-
proves the task (`canon evidence add --task
|
|
710
|
+
proves the task (`canon evidence add --task <id> --artifact <path>` or
|
|
710
711
|
`--report <format>:<path>`). A canon command reports on canon's own
|
|
711
712
|
records, so it is never the proof of a task.
|
|
712
713
|
|
|
@@ -779,6 +780,14 @@ canon gate install-hooks --repo .
|
|
|
779
780
|
canon gate install-hooks --repo . --event PreToolUse --matcher Edit --command "canon gate check" --timeout 30
|
|
780
781
|
```
|
|
781
782
|
|
|
783
|
+
It installs no git hook: copy the script into git's `pre-commit` hook
|
|
784
|
+
(`.git/hooks/pre-commit`) or call it from a hook runner. The output names the two
|
|
785
|
+
agent hook files and the script, also under `--dry-run`. In `--json`,
|
|
786
|
+
`installed` is true when an agent hook file changed and
|
|
787
|
+
`preCommitScriptWritten` when the script was written. A `--repo` that is not an
|
|
788
|
+
existing directory exits 2 with `HOOKS_INSTALL_FAILED` (also under `--dry-run`)
|
|
789
|
+
and creates nothing.
|
|
790
|
+
|
|
782
791
|
Prefer this over hand-editing `settings.json`/`hooks.json`.
|
|
783
792
|
|
|
784
793
|
## `canon selftest --suite trust-spine-gate`
|
|
@@ -183,9 +183,9 @@ record.
|
|
|
183
183
|
An operator-requested rollback is a distinct authenticated action:
|
|
184
184
|
|
|
185
185
|
```text
|
|
186
|
-
canon strategy rollback <strategy_id> --reason "<reason>" --actor
|
|
186
|
+
canon strategy rollback <strategy_id> --reason "<reason>" --actor alice \
|
|
187
187
|
--signature-file rollback.sig --approval-at 2026-10-02T12:00:00Z \
|
|
188
|
-
[--contradicting-trajectory
|
|
188
|
+
[--contradicting-trajectory <trajectory_id>] --repo .
|
|
189
189
|
```
|
|
190
190
|
|
|
191
191
|
`--signature-file` is an armored SSH detached signature over the
|
|
@@ -13,8 +13,8 @@ one, and neither can `canon gate`.
|
|
|
13
13
|
one `<slug>/` directory per change holding `brief.md` (and a `tasks.md`
|
|
14
14
|
only when someone adds one: an optional work note), written by
|
|
15
15
|
`canon change new` (see `canon-subject`). Every plan reader —
|
|
16
|
-
`canon ingest plans`, `canon task done`, `canon evidence add --task
|
|
17
|
-
`canon dispatch begin --task
|
|
16
|
+
`canon ingest plans`, `canon task done`, `canon evidence add --task`,
|
|
17
|
+
`canon dispatch begin --task`, `canon status` and the brief check — reads it
|
|
18
18
|
first whenever the directory exists, with no `plans:` entry. Being first,
|
|
19
19
|
it owns a change id an external source also carries (the external copy
|
|
20
20
|
is the later duplicate, skipped and counted under `duplicate_change_id`).
|
|
@@ -70,12 +70,12 @@ error; the next step (3) reads the overlay back.
|
|
|
70
70
|
## 3. Project a read
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
|
-
canon query --kind scenario --plugin
|
|
74
|
-
canon query --kind scenario --plugin
|
|
75
|
-
canon query --kind scenario # no --plugin
|
|
73
|
+
canon query --kind scenario --plugin porting # human table, projected fields appended
|
|
74
|
+
canon query --kind scenario --plugin porting --json # merged record bodies
|
|
75
|
+
canon query --kind scenario # no --plugin: byte-identical to the core view
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
`--plugin
|
|
78
|
+
`--plugin <id>` folds the plugin's overlay records (latest-by-
|
|
79
79
|
`(join_key, at)`) onto each queried core record. Fail-soft everywhere:
|
|
80
80
|
|
|
81
81
|
- No overlay record for a core key → that record projects UNMODIFIED (no
|
|
@@ -85,7 +85,7 @@ canon query --kind scenario # no --plugin-id: byte-ide
|
|
|
85
85
|
SKIPPED + diagnosed; siblings still project.
|
|
86
86
|
- An absent plugin/manifest → the unmodified core view + a diagnostic,
|
|
87
87
|
never a process error.
|
|
88
|
-
- Omitting `--plugin
|
|
88
|
+
- Omitting `--plugin` is byte-identical to `canon query`'s output without
|
|
89
89
|
plugins — it's a purely additive layer.
|
|
90
90
|
|
|
91
91
|
**Done when:** the projected table or JSON shows the plugin's fields on the
|
|
@@ -108,7 +108,7 @@ scenarios you synced.
|
|
|
108
108
|
(zero new files) and a genuine coverage edit supersedes the prior
|
|
109
109
|
overlay via latest-`at`-wins.
|
|
110
110
|
3. `canon plugin sync porting` writes/dedupes those candidates.
|
|
111
|
-
4. `canon query --kind scenario --plugin
|
|
111
|
+
4. `canon query --kind scenario --plugin porting [--json]` projects
|
|
112
112
|
`covered`/`surface_ref` back onto each scenario.
|
|
113
113
|
|
|
114
114
|
`canon gate check`'s verdicts are byte-identical with and without a
|
|
@@ -75,10 +75,13 @@ canon policy approve --approver <who> [--note <text>] [--repo <dir>]
|
|
|
75
75
|
A human approves the policy after reviewing `.canon/policy.yaml`, in the
|
|
76
76
|
same answer that approves a subject's brief (0.16; see the skill's working
|
|
77
77
|
loop). `canon brief approve` records both in one call. `canon policy
|
|
78
|
-
approve` is a human
|
|
79
|
-
it is refused with `HUMAN_ONLY` (exit 2, not retryable)
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
approve` is a human's decision: with a role declared (`--as` or `CANON_ROLE`)
|
|
79
|
+
it is refused with `HUMAN_ONLY` (exit 2, not retryable) unless it records the
|
|
80
|
+
answer the human gave in the conversation: show them `.canon/policy.yaml`, ask,
|
|
81
|
+
and on an explicit approval run it (the steps are in `canon skills show role-planner`) with `--relayed-via <tool>`, `--actor`,
|
|
82
|
+
`--approver` and `--note` (their name and words); the file then carries `relay`
|
|
83
|
+
(role, actor, tool). The human may run it themselves, for a policy-only change
|
|
84
|
+
or after the brief answer, supplying `--approver` and `--note`. It
|
|
82
85
|
writes `.canon/policy.approval.json` directly (nothing to promote):
|
|
83
86
|
|
|
84
87
|
```json
|
|
@@ -151,18 +151,25 @@ canon dashboard --snapshot /tmp/canon-snap --port 8080
|
|
|
151
151
|
`/briefs.html` lists every live change whose brief awaits the human (no
|
|
152
152
|
`Approved:` line, or edited since) with its intent, outcome, flow steps,
|
|
153
153
|
acceptance, questions and assumptions, and its `canon brief check`
|
|
154
|
-
blockers and advisories.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
154
|
+
blockers and advisories. Each brief that has no blocker has a selection box
|
|
155
|
+
and the page shows how many are selected. The human types their name and their
|
|
156
|
+
answer once and clicks Approve: one request carries every selected brief with
|
|
157
|
+
the sha256 of the file the page read, and records exactly what `canon brief
|
|
158
|
+
approve <id>+ --approver <name> --note <text>` records, the `Approved:` line
|
|
159
|
+
bound to the brief digest and the policy approval, for each. A brief that
|
|
160
|
+
changed after the page loaded (`BRIEF_CHANGED_SINCE_PAGE_LOAD`) or that has
|
|
161
|
+
blockers refuses the whole request (409 `BRIEF_APPROVE_REFUSED`, naming each
|
|
162
|
+
refused brief): nothing is written and the page says to read it again. A request
|
|
163
|
+
naming one brief the old way (`changeId`, `sha256`) is still accepted. The server is localhost only and
|
|
160
164
|
refuses requests from other origins (`DASHBOARD_ORIGIN_REFUSED`).
|
|
161
165
|
|
|
162
|
-
For an agent
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
`canon brief approve` only from the
|
|
166
|
+
For an agent: when clean briefs are waiting, show them (`canon brief show
|
|
167
|
+
<slug> --body`), ask with the harness question tool, and tell the human they
|
|
168
|
+
can approve them in `canon dashboard` (briefs page) instead. An agent never
|
|
169
|
+
clicks Approve or fills the form; it runs `canon brief approve` only from the
|
|
170
|
+
human's explicit answer, with `--relayed-via`. The page lists the approvals an
|
|
171
|
+
agent recorded for the human under "Approved through an agent" (`relayed` in
|
|
172
|
+
`GET /api/briefs`), with the role, actor and tool of each.
|
|
166
173
|
|
|
167
174
|
The dashboard renders SEVEN panels — trust matrix, session costs, role
|
|
168
175
|
memory, flywheel funnel, review burn-down, review rounds, review totals.
|
|
@@ -17,7 +17,7 @@ state they are in.
|
|
|
17
17
|
The order an agent follows to claim a subject done:
|
|
18
18
|
|
|
19
19
|
1. **Test-run evidence** per owned scenario (`canon evidence add
|
|
20
|
-
--scenario
|
|
20
|
+
--scenario <id> --project <root-id> --session <session>` and the
|
|
21
21
|
rest of its options;
|
|
22
22
|
final when it returns under `write: { promote: auto }`, which
|
|
23
23
|
`canon init` writes, and followed by `canon gate promote` only under
|
|
@@ -26,9 +26,9 @@ The order an agent follows to claim a subject done:
|
|
|
26
26
|
each issue the reviewer raises as a Finding, fix it, then close it:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
canon finding add --change
|
|
30
|
-
--severity blocker --introduced-unknown --disposition open --actor
|
|
31
|
-
--summary "unbounded subprocess wait" --session
|
|
29
|
+
canon finding add --change c-demo --round 1 --seq 1 \
|
|
30
|
+
--severity blocker --introduced-unknown --disposition open --actor reviewer-2 \
|
|
31
|
+
--summary "unbounded subprocess wait" --session review-session-1
|
|
32
32
|
# ... fix, commit ...
|
|
33
33
|
canon finding close c-demo --round 1 --seq 1 \
|
|
34
34
|
--disposition fixed --resolution-rev HEAD
|
|
@@ -42,9 +42,9 @@ The order an agent follows to claim a subject done:
|
|
|
42
42
|
the evidence is in (the review pins what it saw):
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
canon review scenario world.demo.01 --project
|
|
46
|
-
--actor
|
|
47
|
-
--session
|
|
45
|
+
canon review scenario world.demo.01 --project root \
|
|
46
|
+
--actor reviewer-2 --role reviewer \
|
|
47
|
+
--session review-session-1 \
|
|
48
48
|
--rev HEAD --upstream-ref "pr#41"
|
|
49
49
|
```
|
|
50
50
|
|
|
@@ -72,12 +72,12 @@ key, because two different findings under one key are two reviewers'
|
|
|
72
72
|
work collapsed into one identity.
|
|
73
73
|
|
|
74
74
|
```text
|
|
75
|
-
canon finding add --change
|
|
75
|
+
canon finding add --change <c> --round <n> --seq <n> \
|
|
76
76
|
--severity blocker|should-fix|note --disposition open \
|
|
77
|
-
--actor
|
|
78
|
-
[--rev <rev>] [--resolution-rev <rev>] [--introduced-rev <rev> | --introduced-unknown] [--file-ref path/to/file.rs:120-134] [--scenario
|
|
77
|
+
--actor <who> --summary "<one line>" \
|
|
78
|
+
[--rev <rev>] [--resolution-rev <rev>] [--introduced-rev <rev> | --introduced-unknown] [--file-ref path/to/file.rs:120-134] [--scenario <id>] [--session <id>]
|
|
79
79
|
canon finding close <c> --round <n> --seq <n> \
|
|
80
|
-
--disposition fixed --resolution-rev <rev> [--actor
|
|
80
|
+
--disposition fixed --resolution-rev <rev> [--actor <id>] [--session <id>] # or rejected / deferred / open
|
|
81
81
|
canon finding close <c> --round <n> --seq <n> \
|
|
82
82
|
--disposition rejected|deferred --reason "<why, one line>"
|
|
83
83
|
```
|
|
@@ -88,7 +88,7 @@ on the closing version, shown by `finding list` as `[reason: …]` and carried
|
|
|
88
88
|
in the JSON. Give the reason when you reject or defer: it is the only record
|
|
89
89
|
of why the finding was not fixed.
|
|
90
90
|
|
|
91
|
-
`--scenario
|
|
91
|
+
`--scenario` (repeatable, each a scenario the index knows; refused with
|
|
92
92
|
`FINDING_UNKNOWN_SCENARIO` otherwise) names the scenarios the finding is
|
|
93
93
|
about. After a `fixed` close, fresh evidence for those scenarios alone
|
|
94
94
|
re-verifies the fix; a finding naming none asks every evidenced scenario of
|
|
@@ -103,7 +103,7 @@ run; nothing to promote``); under `write.promote: manual`
|
|
|
103
103
|
changes only the disposition (and `resolution_sha` with it); severity,
|
|
104
104
|
reviewer, summary, and refs are copied from the committed record. It
|
|
105
105
|
appends a second version at the same natural key — the first stays. Its
|
|
106
|
-
`--actor
|
|
106
|
+
`--actor` and `--session` name who authored the transition; the
|
|
107
107
|
raiser's stay on the first version.
|
|
108
108
|
|
|
109
109
|
Every commit option (`--rev`, `--resolution-rev`, `--introduced-rev`)
|
|
@@ -120,7 +120,7 @@ Outside git, or in a repository with no commit, the write is refused with
|
|
|
120
120
|
|
|
121
121
|
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
|
-
names in camelCase (`
|
|
123
|
+
names in camelCase (`change`, `actor`, `resolutionRev`); `canon schema
|
|
124
124
|
finding add --json` shows the input schema and an example. An identical
|
|
125
125
|
repeat is `unchanged` (`meta.unchanged`) and writes nothing; a different
|
|
126
126
|
finding under an occupied key is `FINDING_SEQ_OCCUPIED`.
|
|
@@ -128,13 +128,13 @@ finding under an occupied key is `FINDING_SEQ_OCCUPIED`.
|
|
|
128
128
|
### A defect the author found in its own work
|
|
129
129
|
|
|
130
130
|
Record it like any other finding, at the moment you find it and before
|
|
131
|
-
review, with `--actor
|
|
131
|
+
review, with `--actor` set to your own id; never ask
|
|
132
132
|
the reviewer to record it later under theirs. Nothing refuses a finding
|
|
133
133
|
whose reviewer is also the implementer, and an open `blocker` the author
|
|
134
134
|
raised blocks under `block_on_findings` exactly like a reviewer's.
|
|
135
135
|
`--introduced-rev` names the commit that introduced the defect, not who
|
|
136
136
|
found it: `--introduced-rev self` is a usage error (exit 2) that points at
|
|
137
|
-
`--actor
|
|
137
|
+
`--actor`.
|
|
138
138
|
|
|
139
139
|
### Severities
|
|
140
140
|
|
|
@@ -169,20 +169,20 @@ fixed finding reopened with `--disposition open` counts as open again.
|
|
|
169
169
|
## `canon review scenario`
|
|
170
170
|
|
|
171
171
|
```text
|
|
172
|
-
canon review scenario <scenario-id> [<scenario-id>] --project
|
|
173
|
-
--actor
|
|
174
|
-
(--upstream-ref <ref> | --original-spec-ref <ref>) [--session
|
|
172
|
+
canon review scenario <scenario-id> [<scenario-id>] --project <root-id> \
|
|
173
|
+
--actor <who> [--rev <rev>] --role <role> \
|
|
174
|
+
(--upstream-ref <ref> | --original-spec-ref <ref>) [--session <id>] \
|
|
175
175
|
[--review-outcome signed|indeterminate|unavailable] \
|
|
176
176
|
[--reviewer-provider <p>] [--reviewer-model <m>] [--reviewer-harness <h>] \
|
|
177
177
|
[--artifact <path>] [--artifact <path>] [--max-artifact-mib <MiB>]
|
|
178
|
-
canon review change <slug> --project
|
|
178
|
+
canon review change <slug> --project <root> --actor <who> [--rev <rev>] \
|
|
179
179
|
--role reviewer (--upstream-ref <ref> | --original-spec-ref <ref>) # a chore, below
|
|
180
180
|
```
|
|
181
181
|
|
|
182
182
|
One attributed Review record per scenario, joined on
|
|
183
183
|
`(project_id, scenario_id)` — both are required because two spec roots
|
|
184
184
|
may carry the same scenario id. Exactly one provenance ref is required.
|
|
185
|
-
`--actor
|
|
185
|
+
`--actor` is the reviewer and is required; `--session` fills `actor.session_id`.
|
|
186
186
|
A Review carries no verdict about the behavior; the `verifying → shipped`
|
|
187
187
|
ship gate still refuses missing or `Divergent` evidence verdicts on its
|
|
188
188
|
own (a `Divergent` one passes only while a human's `canon divergence
|
|
@@ -321,7 +321,7 @@ sign-off or a rejection, and `review scenario` says so. `--reviewer-provider`,
|
|
|
321
321
|
`--reviewer-model` and `--reviewer-harness` record the runtime that
|
|
322
322
|
produced the review, as given. An empty or padded label is a usage error.
|
|
323
323
|
|
|
324
|
-
`--session
|
|
324
|
+
`--session` (on `evidence add`, `review scenario`, `finding add` and
|
|
325
325
|
`finding close`) takes one opaque token: non-empty, no surrounding
|
|
326
326
|
whitespace, no control characters. Anything else is a usage error
|
|
327
327
|
(exit 2) and nothing is written.
|
|
@@ -346,7 +346,7 @@ spec_coverage:
|
|
|
346
346
|
`spec_coverage.scope`. `spec_coverage.exclude_lanes` also exempts
|
|
347
347
|
scenarios from review.
|
|
348
348
|
- **`distinct_actor`** — a review only counts when both its `reviewer`
|
|
349
|
-
and its actor (`--actor
|
|
349
|
+
and its actor (`--actor`) differ from every actor on that
|
|
350
350
|
scenario's evidence records, and, when the review carries a session,
|
|
351
351
|
that session differs from every session on those evidence records. An
|
|
352
352
|
agent cannot review its own attested work, under another id or from
|
|
@@ -484,7 +484,7 @@ routing. The new Subject record lists exactly the violations it let
|
|
|
484
484
|
through:
|
|
485
485
|
`status_override: {to, reason, waived: [{class, subject}], actor: {agent_id}}`
|
|
486
486
|
(`subject` is the scenario id, or `<change_id>#<round>.<seq>` for a
|
|
487
|
-
blocker; actor from `--actor
|
|
487
|
+
blocker; actor from `--actor`, default `canon`). The command prints
|
|
488
488
|
the `waived ...` lines and `override recorded by `lead` for the N
|
|
489
489
|
violation(s) above: <reason>`. A blank or multi-line reason exits 2. The
|
|
490
490
|
waiver covers only what it recorded, and clears on the subject's next
|
|
@@ -265,8 +265,8 @@ write:
|
|
|
265
265
|
`--promote` / `--no-promote` decide for one write and win over the config
|
|
266
266
|
without reading it; both at once is a usage error (exit `2`). If the
|
|
267
267
|
promotion refuses the command's own record, the record stays staged, the
|
|
268
|
-
line ends ``— run `canon gate promote` to commit it`` (`canon
|
|
269
|
-
|
|
268
|
+
line ends ``— run `canon gate promote` to commit it`` (`canon gate promote
|
|
269
|
+
--kind divergence` for a divergence), and the command exits `1`. With neither flag,
|
|
270
270
|
a malformed `write:` section (anything but `promote: auto | manual`)
|
|
271
271
|
refuses the write, exit `2`, before anything is staged. `canon init
|
|
272
272
|
--check` reports `[PASS] write (promote: auto)`, `[not configured]
|