@journeykit/canon 0.48.1 → 0.49.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 +142 -130
- package/dist/skills/reference/brief-align.md +8 -8
- package/dist/skills/reference/brief-clarify.md +6 -6
- package/dist/skills/reference/brief-harden.md +5 -5
- package/dist/skills/reference/brief-polish.md +13 -13
- package/dist/skills/reference/brief-shape.md +9 -9
- package/dist/skills/reference/canon-artifact-ingest.md +7 -7
- package/dist/skills/reference/canon-authoring.md +11 -11
- package/dist/skills/reference/canon-context.md +13 -13
- package/dist/skills/reference/canon-fmt.md +1 -1
- package/dist/skills/reference/canon-gate.md +52 -53
- package/dist/skills/reference/canon-inventory.md +10 -11
- package/dist/skills/reference/canon-learn.md +13 -14
- package/dist/skills/reference/canon-plan-import.md +15 -15
- package/dist/skills/reference/canon-plugins.md +8 -8
- package/dist/skills/reference/canon-policy.md +11 -11
- package/dist/skills/reference/canon-report-dashboard.md +6 -7
- package/dist/skills/reference/canon-retrieve.md +6 -6
- package/dist/skills/reference/canon-review.md +52 -53
- package/dist/skills/reference/canon-storage.md +16 -19
- package/dist/skills/reference/canon-subject.md +120 -127
- package/dist/skills/reference/role-implementer.md +90 -76
- package/dist/skills/reference/role-orchestrator.md +196 -172
- package/dist/skills/reference/role-planner.md +101 -97
- package/dist/skills/reference/role-reviewer.md +91 -85
- package/dist/skills/scripts/canon-retrieve-pre-dispatch.sh +5 -5
- package/man/canon-adapter-authorize.1 +11 -8
- package/man/canon-adapter-validate.1 +15 -8
- package/man/canon-artifacts-prune.1 +11 -11
- package/man/canon-artifacts-store.1 +8 -8
- package/man/canon-artifacts-verify.1 +7 -7
- package/man/canon-artifacts.1 +10 -4
- package/man/{canon-brief-approve.1 → canon-briefs-approve.1} +20 -17
- package/man/{canon-brief-check.1 → canon-briefs-check.1} +9 -6
- package/man/{canon-brief-show.1 → canon-briefs-get.1} +14 -11
- package/man/canon-briefs.1 +59 -0
- package/man/{canon-change-new.1 → canon-changes-create.1} +14 -14
- package/man/{canon-change-defer.1 → canon-changes-defer.1} +19 -16
- package/man/{canon-change-drop.1 → canon-changes-drop.1} +19 -16
- package/man/{canon-change-reopen.1 → canon-changes-reopen.1} +20 -17
- package/man/canon-changes.1 +65 -0
- package/man/canon-completion.1 +8 -5
- package/man/{canon-context-pack-add.1 → canon-context-packs-create.1} +9 -9
- package/man/{canon-context-pack-show.1 → canon-context-packs-get.1} +10 -7
- package/man/{canon-context-pack-verify.1 → canon-context-packs-verify.1} +10 -7
- package/man/canon-context-packs.1 +56 -0
- package/man/canon-context.1 +9 -6
- package/man/canon-dashboard.1 +10 -10
- package/man/canon-demo-init.1 +12 -7
- package/man/canon-demo-review.1 +7 -7
- package/man/{canon-divergence-accept.1 → canon-divergences-accept.1} +12 -12
- package/man/{canon-divergence-add.1 → canon-divergences-add.1} +12 -12
- package/man/{canon-divergence-defer.1 → canon-divergences-defer.1} +12 -12
- package/man/{canon-divergence-list.1 → canon-divergences-list.1} +10 -7
- package/man/{canon-divergence-resolve.1 → canon-divergences-resolve.1} +12 -12
- package/man/{canon-divergence.1 → canon-divergences.1} +16 -10
- package/man/canon-evidence-add-all.1 +117 -0
- package/man/canon-evidence-add.1 +16 -22
- package/man/canon-evidence-approval-payload.1 +10 -7
- package/man/canon-evidence-audit.1 +11 -11
- package/man/canon-evidence.1 +15 -5
- package/man/canon-export.1 +11 -11
- package/man/{canon-feature-new.1 → canon-features-create.1} +14 -14
- package/man/{canon-feature.1 → canon-features.1} +12 -6
- package/man/{canon-finding-close.1 → canon-findings-close.1} +17 -23
- package/man/{canon-finding-add.1 → canon-findings-create.1} +13 -13
- package/man/{canon-finding-list.1 → canon-findings-list.1} +11 -8
- package/man/{canon-finding.1 → canon-findings.1} +18 -20
- package/man/canon-format.1 +7 -4
- package/man/canon-gate-check.1 +9 -6
- package/man/canon-gate-install-hooks.1 +12 -12
- package/man/canon-gate-promote.1 +8 -8
- package/man/canon-gate.1 +11 -5
- package/man/canon-ingest-plans.1 +10 -10
- package/man/canon-ingest-records.1 +13 -13
- package/man/canon-init-check.1 +48 -0
- package/man/canon-init.1 +10 -13
- package/man/canon-inventory-sync.1 +8 -8
- package/man/canon-inventory.1 +10 -4
- package/man/canon-ledger-compact.1 +10 -10
- package/man/canon-ledger.1 +10 -4
- package/man/canon-migrate-revert.1 +58 -0
- package/man/canon-migrate.1 +19 -22
- package/man/{canon-plugin-sync.1 → canon-plugins-sync.1} +10 -10
- package/man/{canon-plugin.1 → canon-plugins.1} +12 -6
- package/man/canon-policy-approve.1 +13 -10
- package/man/{canon-policy-show.1 → canon-policy-get.1} +8 -5
- package/man/canon-policy.1 +13 -7
- package/man/{canon-prompt-add.1 → canon-prompts-create.1} +14 -14
- package/man/{canon-prompt-show.1 → canon-prompts-get.1} +10 -7
- package/man/canon-prompts.1 +49 -0
- package/man/canon-purge.1 +12 -16
- package/man/canon-query.1 +11 -8
- package/man/canon-regime-show.1 +10 -7
- package/man/canon-report-build.1 +4 -4
- package/man/canon-report-check.1 +7 -4
- package/man/canon-report-snapshot.1 +6 -6
- package/man/canon-report.1 +10 -4
- package/man/canon-retrieve.1 +11 -8
- package/man/{canon-review-brief.1 → canon-reviews-brief.1} +14 -14
- package/man/{canon-review-change.1 → canon-reviews-change.1} +13 -13
- package/man/{canon-review-scenario.1 → canon-reviews-scenario.1} +12 -12
- package/man/{canon-review.1 → canon-reviews.1} +16 -10
- package/man/{canon-dispatch-begin.1 → canon-runs-create.1} +11 -11
- package/man/{canon-task-done.1 → canon-runs-diff.1} +7 -10
- package/man/{canon-dispatch-end.1 → canon-runs-end.1} +11 -11
- package/man/{canon-dispatch.1 → canon-runs.1} +15 -9
- package/man/{canon-scenario-new.1 → canon-scenarios-create.1} +14 -14
- package/man/{canon-scenario.1 → canon-scenarios.1} +12 -6
- package/man/canon-schema.1 +22 -34
- package/man/canon-search.1 +15 -12
- package/man/canon-selftest.1 +7 -4
- package/man/canon-skills-check.1 +10 -7
- package/man/canon-skills-doctor.1 +10 -7
- package/man/canon-skills-get.1 +47 -0
- package/man/canon-skills-install.1 +10 -10
- package/man/canon-skills-list.1 +53 -0
- package/man/canon-skills.1 +16 -16
- package/man/canon-status.1 +10 -7
- package/man/{canon-strategy-approval-payload.1 → canon-strategies-approval-payload.1} +13 -10
- package/man/{canon-strategy-promote.1 → canon-strategies-promote.1} +12 -12
- package/man/{canon-strategy-rollback.1 → canon-strategies-rollback.1} +12 -12
- package/man/{canon-strategy.1 → canon-strategies.1} +14 -8
- package/man/{canon-subject-adopt.1 → canon-subjects-adopt.1} +10 -10
- package/man/{canon-subject-new.1 → canon-subjects-create.1} +14 -14
- package/man/{canon-subject-show.1 → canon-subjects-get.1} +9 -6
- package/man/{canon-subject-move.1 → canon-subjects-move.1} +12 -12
- package/man/{canon-subject-unadopt.1 → canon-subjects-unadopt.1} +12 -12
- package/man/{canon-subject.1 → canon-subjects.1} +16 -10
- package/man/canon-tasks-done.1 +50 -0
- package/man/{canon-task.1 → canon-tasks.1} +13 -7
- package/man/canon-trace.1 +8 -5
- package/man/canon.1 +66 -36
- package/package.json +5 -5
- package/man/canon-adapter.1 +0 -46
- package/man/canon-brief.1 +0 -64
- package/man/canon-change.1 +0 -59
- package/man/canon-context-pack.1 +0 -50
- package/man/canon-demo.1 +0 -47
- package/man/canon-dispatch-diff.1 +0 -41
- package/man/canon-ingest.1 +0 -46
- package/man/canon-prompt.1 +0 -43
- package/man/canon-regime.1 +0 -39
- package/man/canon-skills-show.1 +0 -102
|
@@ -9,24 +9,24 @@ build nothing meanwhile. The only waiver is `--override-reason
|
|
|
9
9
|
"<why>"`, for the case where you were told to attest while the brief waits for
|
|
10
10
|
the human's answer: canon records it on the evidence, echoes it in
|
|
11
11
|
`data.overrides[]` and lists it in `status` for the human. Never use it to
|
|
12
|
-
skip the wait yourself. `
|
|
13
|
-
`
|
|
12
|
+
skip the wait yourself. `briefs approve`, `policy approve`, `divergences accept`,
|
|
13
|
+
`changes drop`, `changes defer` and `changes reopen` are the human's; they refuse you (`ACTOR_DENIED`) unless they record an
|
|
14
14
|
answer the human gave in the conversation (`--relayed-via`, the planner's
|
|
15
|
-
procedure: `canon skills
|
|
15
|
+
procedure: `canon skills get role-planner`). You never run them without that
|
|
16
16
|
answer, and never remove or unset your role (`env -u CANON_ROLE`, dropping
|
|
17
17
|
`--as`) to get past the refusal.
|
|
18
18
|
|
|
19
19
|
## Commands
|
|
20
20
|
|
|
21
|
-
Every
|
|
22
|
-
has) and an example
|
|
21
|
+
Every operation of this role is below with its full syntax line (every argument the
|
|
22
|
+
operation has) and an example, which runs as written against
|
|
23
23
|
the example story (subject `demo`, change `add-login`, scenario `auth.login.01`): swap
|
|
24
|
-
in your ids. Use only the
|
|
25
|
-
<
|
|
24
|
+
in your ids. Use only the arguments on a line; never guess one. Ask `canon schema
|
|
25
|
+
<operation> --json` only for an operation this block does not list, or after an `INPUT_INVALID` refusal.
|
|
26
26
|
|
|
27
27
|
<!-- canon:generated commands-implementer begin -->
|
|
28
|
-
Every
|
|
29
|
-
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
|
|
28
|
+
Every operation takes `--as <ROLE>` and `--json`; `--repo <DIR>` too, except `completion`, `schema`, `skills get`, `skills list`. `--input <JSON|FILE|->` runs an operation from one JSON document (an array is a batch) and is on every operation. Its keys are the argument names in camelCase, operands included (`id`), singular even when the argument repeats (the value is then an array; `[]` is equivalent to leaving the key out), and a number is a JSON number. An argv integer is `-?(0|[1-9][0-9]*)`: `+1` and `01` are refused. `--fields <FIELDS>` is a comma list of the paths `canon schema <OPERATION> --json` declares under `outputs[].fields.paths`; a path is the record's own key, spelled as the answer spells it.
|
|
29
|
+
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 argument that is not on the line does not exist: it is refused (`INPUT_INVALID`, reason `UNKNOWN_ARGUMENT`).
|
|
30
30
|
|
|
31
31
|
```text
|
|
32
32
|
# Write the shell completion script for canon (bash, zsh or fish)
|
|
@@ -37,94 +37,101 @@ canon completion zsh --json
|
|
|
37
37
|
```
|
|
38
38
|
```text
|
|
39
39
|
# Show what you can author here: record kinds, fields, enums, policies
|
|
40
|
-
usage: canon context
|
|
40
|
+
usage: canon context
|
|
41
41
|
```
|
|
42
42
|
```bash
|
|
43
43
|
canon context --json
|
|
44
44
|
```
|
|
45
45
|
```text
|
|
46
46
|
# Create an immutable context pack from a repository-local JSON manifest
|
|
47
|
-
usage: canon context-
|
|
47
|
+
usage: canon context-packs create --manifest <FILE>
|
|
48
48
|
```
|
|
49
49
|
```bash
|
|
50
|
-
canon context-
|
|
50
|
+
canon context-packs create --manifest .canon/context-manifest.json --json
|
|
51
51
|
```
|
|
52
52
|
```text
|
|
53
53
|
# Show a context pack after verifying its manifest and content objects
|
|
54
|
-
usage: canon context-
|
|
54
|
+
usage: canon context-packs get <ID>
|
|
55
55
|
```
|
|
56
56
|
```bash
|
|
57
|
-
canon context-
|
|
57
|
+
canon context-packs get sha256:0000000000000000000000000000000000000000000000000000000000000000 --json
|
|
58
58
|
```
|
|
59
59
|
```text
|
|
60
60
|
# Verify a context pack's manifest and immutable content objects
|
|
61
|
-
usage: canon context-
|
|
61
|
+
usage: canon context-packs verify <ID>
|
|
62
62
|
```
|
|
63
63
|
```bash
|
|
64
|
-
canon context-
|
|
64
|
+
canon context-packs verify sha256:0000000000000000000000000000000000000000000000000000000000000000 --json
|
|
65
65
|
```
|
|
66
66
|
```text
|
|
67
67
|
# Add a divergence candidate, staged with no run_seq yet
|
|
68
|
-
usage: canon
|
|
68
|
+
usage: canon divergences add <SCENARIO_ID> --actor <ACTOR_ID> [--project <PROJECT_ID>] [--rev <REV>] [--state <open|still-divergent|resolved|deferred> (with --reason)] [--reason <TEXT>] [--expiry <TIMESTAMP>] [--round <N>] [--session <SESSION_ID>] [--detail <TEXT>] [--role <ROLE>] [--promote | --no-promote]
|
|
69
69
|
```
|
|
70
70
|
```bash
|
|
71
|
-
canon
|
|
71
|
+
canon divergences add auth.login.01 --actor alice --role reviewer --json
|
|
72
72
|
```
|
|
73
73
|
```text
|
|
74
74
|
# Directly record a deferred divergence (requires --reason/--expiry)
|
|
75
|
-
usage: canon
|
|
75
|
+
usage: canon divergences defer <SCENARIO_ID> --actor <ACTOR_ID> --reason <TEXT> --expiry <TIMESTAMP> [--project <PROJECT_ID>] [--rev <REV>] [--round <N>] [--session <SESSION_ID>] [--role <ROLE>]
|
|
76
76
|
```
|
|
77
77
|
```bash
|
|
78
|
-
canon
|
|
78
|
+
canon divergences defer auth.login.01 --actor alice --reason "waiting on the vendor" --expiry 2030-01-01T00:00:00Z --role reviewer --json
|
|
79
79
|
```
|
|
80
80
|
```text
|
|
81
81
|
# List the current divergence burn-down state
|
|
82
|
-
usage: canon
|
|
82
|
+
usage: canon divergences list [--as-of <TIMESTAMP>] [--limit <LIMIT> | --all] [--cursor <CURSOR>]
|
|
83
83
|
```
|
|
84
84
|
```bash
|
|
85
|
-
canon
|
|
85
|
+
canon divergences list --as-of 2030-01-01 --json
|
|
86
86
|
```
|
|
87
87
|
```text
|
|
88
88
|
# Directly record a resolved divergence
|
|
89
|
-
usage: canon
|
|
89
|
+
usage: canon divergences resolve <SCENARIO_ID> --actor <ACTOR_ID> [--project <PROJECT_ID>] [--rev <REV>] [--round <N>] [--session <SESSION_ID>] [--detail <TEXT>] [--role <ROLE>]
|
|
90
90
|
```
|
|
91
91
|
```bash
|
|
92
|
-
canon
|
|
92
|
+
canon divergences resolve auth.login.01 --actor alice --role reviewer --json
|
|
93
93
|
```
|
|
94
94
|
```text
|
|
95
95
|
# Record one attributed EvidenceRecord for a task or scenario
|
|
96
|
-
usage: canon evidence add
|
|
96
|
+
usage: canon evidence add (--class <CLASS> | --report <FORMAT:PATH>) (--ref <TEXT> | --report <FORMAT:PATH>) (--task <TASK_ID> | --scenario <SCENARIO_ID>) [--project <PROJECT_ID>] [--verdict <faithful|not-applicable|divergent>] [--summary <TEXT>] [--command-result <TEXT> (with --summary)] [--run <RUN_ID>] [--surface-ref <PATH_OR_EFFECT>]* [--actor <ACTOR_ID>] [--role <ROLE>] [--session <SESSION_ID>] [--approver <NAME> --approval-role <human> --signature-file <FILE> --approval-at <TIMESTAMP>] [--rev <REV>] [--artifact <PATH>]* [--report-case <NAME> (with --report)]* [--max-artifact-mib <N>] [--override-reason <TEXT>] [--promote | --no-promote]
|
|
97
97
|
```
|
|
98
98
|
```bash
|
|
99
|
-
canon evidence add --
|
|
99
|
+
canon evidence add --class test-run --ref "npm test" --scenario auth.login.01 --role implementer --json
|
|
100
|
+
```
|
|
101
|
+
```text
|
|
102
|
+
# Record one attributed EvidenceRecord per indexed scenario of --project that owns a case in the --report(s), all or nothing (promoted like `evidence add`)
|
|
103
|
+
usage: canon evidence add-all --report <FORMAT:PATH> [--project <PROJECT_ID>] [--class <CLASS>] [--ref <TEXT>] [--verdict <faithful|not-applicable|divergent> | --from-ci] [--summary <TEXT>] [--command-result <TEXT> (with --summary)] [--run <RUN_ID>] [--surface-ref <PATH_OR_EFFECT>]* [--actor <ACTOR_ID>] [--role <ROLE>] [--session <SESSION_ID>] [--rev <REV> | --from-ci] [--artifact <PATH>]* [--max-artifact-mib <N>] [--override-reason <TEXT>] [--promote | --no-promote]
|
|
104
|
+
```
|
|
105
|
+
```bash
|
|
106
|
+
canon evidence add-all --role implementer --report junit:test-results.xml --json
|
|
100
107
|
```
|
|
101
108
|
```text
|
|
102
109
|
# Emit exact bytes for external `ssh-keygen -Y sign -n canon-approval-v1`
|
|
103
|
-
usage: canon evidence approval-payload --approver <NAME> --approval-at <TIMESTAMP>
|
|
110
|
+
usage: canon evidence approval-payload --approver <NAME> --approval-at <TIMESTAMP> (--task <TASK_ID> | --scenario <SCENARIO_ID>) [--project <PROJECT_ID>] [--run <RUN_ID>] [--rev <REV>] [--surface-ref <PATH_OR_EFFECT>]*
|
|
104
111
|
```
|
|
105
112
|
```bash
|
|
106
|
-
canon evidence approval-payload --scenario auth.login.01 --
|
|
113
|
+
canon evidence approval-payload --project root --scenario auth.login.01 --approver alice --approval-at 2030-01-01T00:00:00Z --json
|
|
107
114
|
```
|
|
108
115
|
```text
|
|
109
116
|
# Record an external evaluator's re-audit of one scenario (class `audit`; the verdict follows --audit-result; canon never runs the evaluator)
|
|
110
|
-
usage: canon evidence audit <SCENARIO_ID> --ref <TEXT> --evaluator <EVALUATOR_ID> --evaluator-version <TEXT> --evaluator-digest <DIGEST> --audit-result <confirmed|refuted|indeterminate> [--project <PROJECT_ID>] [--summary <TEXT>] [--command-result <TEXT> (with --summary)] [--run <RUN_ID>] [--actor <ACTOR_ID>] [--role <ROLE>] [--session <SESSION_ID>] [--rev <REV>] [--artifact <PATH>]* [--report <FORMAT:PATH>]* [--report-case <NAME> (with --report)]* [--max-artifact-mib <N>] [--override-reason <TEXT>] [--promote | --no-promote]
|
|
117
|
+
usage: canon evidence audit <SCENARIO_ID> --ref <TEXT> --evaluator <EVALUATOR_ID> --evaluator-version <TEXT> --evaluator-digest <DIGEST> --audit-result <confirmed|refuted|indeterminate> [--project <PROJECT_ID>] [--summary <TEXT>] [--command-result <TEXT> (with --summary)] [--run <RUN_ID>] [--actor <ACTOR_ID>] [--role <ROLE>] [--session <SESSION_ID>] [--rev <REV>] [--artifact <PATH>]* [--report <FORMAT:PATH>]* [--report-case <NAME> (with --report)]* [--max-artifact-mib <N>] [--override-reason <TEXT>] [--promote | --no-promote]
|
|
111
118
|
```
|
|
112
119
|
```bash
|
|
113
|
-
canon evidence audit auth.login.01 --ref audit-report.json --evaluator eval-1 --evaluator-version 2.1 --evaluator-digest 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef --audit-result confirmed --
|
|
120
|
+
canon evidence audit auth.login.01 --ref audit-report.json --role implementer --evaluator eval-1 --evaluator-version 2.1 --evaluator-digest 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef --audit-result confirmed --json
|
|
114
121
|
```
|
|
115
122
|
```text
|
|
116
123
|
# Create a fresh .feature file for a new area.surface
|
|
117
|
-
usage: canon
|
|
124
|
+
usage: canon features create --id <ID> --title <TEXT> [--actor <ACTOR_ID>] [--session <SESSION_ID>] [--project <PROJECT_ID>]
|
|
118
125
|
```
|
|
119
126
|
```bash
|
|
120
|
-
canon
|
|
127
|
+
canon features create --id billing.invoice --title Invoices --json
|
|
121
128
|
```
|
|
122
129
|
```text
|
|
123
130
|
# List a change's committed findings at their latest version
|
|
124
|
-
usage: canon
|
|
131
|
+
usage: canon findings list --change <CHANGE_ID> [--open] [--limit <LIMIT> | --all] [--cursor <CURSOR>]
|
|
125
132
|
```
|
|
126
133
|
```bash
|
|
127
|
-
canon
|
|
134
|
+
canon findings list --change add-login --json
|
|
128
135
|
```
|
|
129
136
|
```text
|
|
130
137
|
# Validate a spec/artifact corpus against canon's format
|
|
@@ -142,73 +149,80 @@ canon gate check --json
|
|
|
142
149
|
```
|
|
143
150
|
```text
|
|
144
151
|
# Promote staged records (evidence, findings, divergences) to the committed ledger
|
|
145
|
-
usage: canon gate promote [--kind <evidence|finding|divergence>] [--dry-run]
|
|
152
|
+
usage: canon gate promote [--kind <evidence|finding|divergence>] [--dry-run]
|
|
146
153
|
```
|
|
147
154
|
```bash
|
|
148
155
|
canon gate promote --kind evidence --json
|
|
149
156
|
```
|
|
150
157
|
```text
|
|
151
158
|
# Validate each spec root, then materialize scenario index records
|
|
152
|
-
usage: canon inventory sync [--spec-root <DIR>] [--dry-run]
|
|
159
|
+
usage: canon inventory sync [--spec-root <DIR>] [--dry-run]
|
|
153
160
|
```
|
|
154
161
|
```bash
|
|
155
162
|
canon inventory sync --json
|
|
156
163
|
```
|
|
157
164
|
```text
|
|
158
165
|
# Read stored records
|
|
159
|
-
usage: canon query --kind <change|task|scenario|run|handoff|review|divergence|trajectory|strategy_item|evidence|subject|finding|change_state> [--since <TIMESTAMP>] [--plugin <PLUGIN_ID> | --history] [--change <CHANGE_ID>] [--status <STATUS>] [--domain <NAME>] [--include-sensitive] [--limit <
|
|
166
|
+
usage: canon query --kind <change|task|scenario|run|handoff|review|divergence|trajectory|strategy_item|evidence|subject|finding|change_state> [--since <TIMESTAMP>] [--plugin <PLUGIN_ID> | --history] [--change <CHANGE_ID>] [--status <STATUS>] [--domain <NAME>] [--include-sensitive] [--limit <LIMIT> | --all] [--cursor <CURSOR>]
|
|
160
167
|
```
|
|
161
168
|
```bash
|
|
162
169
|
canon query --kind evidence --json
|
|
163
170
|
```
|
|
164
171
|
```text
|
|
165
172
|
# Fetch role-scoped strategy guidance
|
|
166
|
-
usage: canon retrieve --for-role <ROLE> (--regime <KEY> | --domain <NAME>) [--subject <SUBJECT_ID> (with --domain)] [--
|
|
173
|
+
usage: canon retrieve --for-role <ROLE> (--regime <KEY> | --domain <NAME>) [--subject <SUBJECT_ID> (with --domain)] [--top <N>]
|
|
167
174
|
```
|
|
168
175
|
```bash
|
|
169
|
-
canon retrieve --for-role reviewer --domain dev --
|
|
176
|
+
canon retrieve --for-role reviewer --domain dev --top 20 --json
|
|
170
177
|
```
|
|
171
178
|
```text
|
|
172
179
|
# Append a tagged scenario stub to its .feature file (created if missing); many at once with `--input`
|
|
173
|
-
usage: canon
|
|
180
|
+
usage: canon scenarios create --id <ID> --title <TEXT> [--subject <SUBJECT_ID>] [--lane <NAME>] [--case <NAME>] [--flow <FLOW_ID>] [--change <CHANGE_ID> (with --flow)] [--actor <ACTOR_ID>] [--session <SESSION_ID>] [--feature <FILE>] [--project <PROJECT_ID>]
|
|
174
181
|
```
|
|
175
182
|
```bash
|
|
176
|
-
canon
|
|
183
|
+
canon scenarios create --id auth.login.02 --title "Sign out" --feature .canon/specs/kind=feature/area=auth/login.feature --json
|
|
177
184
|
```
|
|
178
185
|
```text
|
|
179
|
-
# Describe
|
|
180
|
-
usage: canon schema [<
|
|
186
|
+
# Describe the tool: its collections, operations, arguments, schemas and errors
|
|
187
|
+
usage: canon schema [<OPERATION>] [--collection <COLLECTION> | --errors | --error <CODE> | --warnings | --warning <CODE> | --search <TASK>] [--schemas (with --operation)]
|
|
181
188
|
```
|
|
182
189
|
```bash
|
|
183
|
-
canon schema
|
|
190
|
+
canon schema --json
|
|
184
191
|
```
|
|
185
192
|
```text
|
|
186
193
|
# Search records, brief sections and scenario text, with each hit's neighbors in the record graph
|
|
187
|
-
usage: canon search <TEXT> [--kind <change|task|scenario|run|handoff|review|divergence|trajectory|strategy_item|evidence|subject|finding|change_state|brief>]* [--expand <N>] [--
|
|
194
|
+
usage: canon search <TEXT> [--node-kind <change|task|scenario|run|handoff|review|divergence|trajectory|strategy_item|evidence|subject|finding|change_state|brief>]* [--expand <N>] [--top <N>]
|
|
195
|
+
```
|
|
196
|
+
```bash
|
|
197
|
+
canon search timeout --node-kind finding --json
|
|
198
|
+
```
|
|
199
|
+
```text
|
|
200
|
+
# Show one guide for agents
|
|
201
|
+
usage: canon skills get <ID> [--full]
|
|
188
202
|
```
|
|
189
203
|
```bash
|
|
190
|
-
canon
|
|
204
|
+
canon skills get canon --json
|
|
191
205
|
```
|
|
192
206
|
```text
|
|
193
|
-
#
|
|
194
|
-
usage: canon skills
|
|
207
|
+
# List the guides for agents
|
|
208
|
+
usage: canon skills list [--limit <LIMIT>] [--cursor <CURSOR>] [--all]
|
|
195
209
|
```
|
|
196
210
|
```bash
|
|
197
|
-
canon skills
|
|
211
|
+
canon skills list --json
|
|
198
212
|
```
|
|
199
213
|
```text
|
|
200
214
|
# Show where this repo stands: subjects by status, their gaps, and the next commands
|
|
201
|
-
usage: canon status
|
|
215
|
+
usage: canon status
|
|
202
216
|
```
|
|
203
217
|
```bash
|
|
204
218
|
canon status --json
|
|
205
219
|
```
|
|
206
220
|
```text
|
|
207
221
|
# Flip one task checkbox, gated on real evidence (fails closed)
|
|
208
|
-
usage: canon
|
|
222
|
+
usage: canon tasks done <ID> --parent <ID>
|
|
209
223
|
```
|
|
210
224
|
```bash
|
|
211
|
-
canon
|
|
225
|
+
canon tasks done 1 --parent add-login --json
|
|
212
226
|
```
|
|
213
227
|
```text
|
|
214
228
|
# Follow a finding's review loop in time order: review, finding, fix, re-review, evidence
|
|
@@ -220,7 +234,7 @@ canon trace add-login_1_1 --json
|
|
|
220
234
|
<!-- canon:generated commands-implementer end -->
|
|
221
235
|
|
|
222
236
|
After the first `status`, follow `meta.next` of each write; do not call
|
|
223
|
-
`canon status` again to learn the next step. Each `meta.next` entry is runnable:
|
|
237
|
+
`canon status` again to learn the next step. Each `meta.next` entry is runnable: `operation` is the operation id and `arguments` its arguments (camelCase), so the call is `canon <operation as words>` with them; guidance that needs a value you must fill in is in the error `hint` or the report text, not in `meta.next`. Every record you write takes
|
|
224
238
|
the commit it is about from `--rev` (default `HEAD`, any git revision). You
|
|
225
239
|
need not commit first: code that is not committed yet is recorded with its
|
|
226
240
|
`codeTree` and `worktreeDirty: true`, never refused. Outside git, or in a
|
|
@@ -229,38 +243,38 @@ repo with no commits, a write that needs a commit refuses `COMMIT_REQUIRED`.
|
|
|
229
243
|
The forms you reach for most (the story's ids; swap in yours):
|
|
230
244
|
|
|
231
245
|
```bash
|
|
232
|
-
canon evidence add
|
|
246
|
+
canon evidence add-all --report junit:a.xml --report junit:b.xml --role implementer
|
|
233
247
|
canon evidence add --scenario auth.login.01 --report junit:red.xml
|
|
234
248
|
canon evidence add --scenario auth.login.01 --verdict divergent --class test-run --ref "upstream limit, tracked in issue 118" --artifact limit.log
|
|
235
|
-
canon
|
|
249
|
+
canon findings create --change add-login --round 1 --seq 1 --severity should-fix --introduced-unknown --actor unit-1 --summary "Token is logged"
|
|
236
250
|
```
|
|
237
251
|
|
|
238
|
-
Batches are one `--input` document (the keys are
|
|
239
|
-
|
|
252
|
+
Batches are one `--input` document (the keys are argument names in camelCase,
|
|
253
|
+
an operand included):
|
|
240
254
|
|
|
241
255
|
```text
|
|
242
|
-
canon
|
|
256
|
+
canon scenarios create --input '[{"id":"auth.login.01","title":"Logs in","case":"happy","flow":"F1"},{"id":"auth.login.02","title":"Rejects a wrong password","case":"failure","flow":"F1"}]'
|
|
243
257
|
canon evidence add --input '[{"scenario":"auth.login.01","class":"test-run","ref":"npm test","role":"implementer"},{"scenario":"auth.login.02","class":"test-run","ref":"npm test","role":"implementer"}]'
|
|
244
258
|
```
|
|
245
259
|
|
|
246
260
|
## Steps
|
|
247
261
|
|
|
248
|
-
1. **Scenarios.** One `
|
|
249
|
-
`
|
|
262
|
+
1. **Scenarios.** One `features create` per feature surface, then one
|
|
263
|
+
`scenarios create` per behavior, each pointing at the brief's flow step it
|
|
250
264
|
proves, with failure paths (`--case failure`) as well as `happy` and
|
|
251
|
-
`edge`. Several scenarios at once are one `
|
|
265
|
+
`edge`. Several scenarios at once are one `scenarios create --input` with a
|
|
252
266
|
JSON array: inline, a file or `-` for stdin, one object per scenario whose
|
|
253
|
-
keys are the
|
|
267
|
+
keys are the argument names in camelCase (`id` is the scenario id);
|
|
254
268
|
every element is validated before the first write, so a bad element
|
|
255
269
|
writes nothing and `error.field` names it (`/1/case`).
|
|
256
|
-
`canon schema
|
|
257
|
-
(`
|
|
270
|
+
`canon schema scenarios.create --json` shows `input` (its limits and a complete `example`); `canon schema scenarios.create --schemas --json` gives `Input`, the schema of one document.
|
|
271
|
+
(`scenarios create --from` is gone.) When the gate asks for a missing case
|
|
258
272
|
(`require_cases`), add a new scenario; never retag an existing one. Every
|
|
259
273
|
bug fix adds or extends a scenario. Canon indexes added, edited or deleted
|
|
260
274
|
`.feature` files itself; run `inventory sync` only when a command prints
|
|
261
275
|
`NOT refreshed` (a format violation or a duplicate id: it names each
|
|
262
276
|
problem). Specs live at `<root>/kind=feature/area=<area>/<surface>.feature`
|
|
263
|
-
under a `specs.roots[]` root (default `.canon/specs`); `canon skills
|
|
277
|
+
under a `specs.roots[]` root (default `.canon/specs`); `canon skills get
|
|
264
278
|
canon-authoring` has the scaffold. When you fill in a scenario, keep its
|
|
265
279
|
`# canon: {...}` provenance lines: dropping one aborts `inventory sync`
|
|
266
280
|
on `missing-provenance`. `--project` is needed only when the repo
|
|
@@ -275,7 +289,7 @@ canon evidence add --input '[{"scenario":"auth.login.01","class":"test-run","ref
|
|
|
275
289
|
note, not a record.
|
|
276
290
|
3. **Code and tests.** Name tests by scenario id (`game.run.01: …`) so a test
|
|
277
291
|
report binds to its scenario. Record a defect you find in your own work
|
|
278
|
-
with `
|
|
292
|
+
with `findings create` the moment you find it, before review.
|
|
279
293
|
**A fix fails first.** For a bug fix, write or extend the scenario's test
|
|
280
294
|
and run it red on the unfixed code, then bind that failing run before you
|
|
281
295
|
change the code (`evidence add --scenario <id> --report <fmt>:<path>`).
|
|
@@ -289,9 +303,9 @@ canon evidence add --input '[{"scenario":"auth.login.01","class":"test-run","ref
|
|
|
289
303
|
`--ref` what the closest check is and why.
|
|
290
304
|
4. **Evidence.** With at least one `--report`, `--class` defaults to
|
|
291
305
|
`test-run` and `--ref` to the report paths; without a report, pass both.
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
306
|
+
Bind a test run that proves several scenarios with `canon evidence add-all`.
|
|
307
|
+
It writes one record per indexed scenario with a matching case, using each
|
|
308
|
+
scenario's own verdict. A preflight refusal writes nothing. Pass
|
|
295
309
|
`--project` only when the repo has several spec roots. For one scenario
|
|
296
310
|
use `--scenario <id>` with `--report` or `--artifact`; for many
|
|
297
311
|
records with different values, one `evidence add --input` with an array
|
|
@@ -309,7 +323,7 @@ canon evidence add --input '[{"scenario":"auth.login.01","class":"test-run","ref
|
|
|
309
323
|
For a scenario about what users see, let the test report carry its
|
|
310
324
|
screenshots: Playwright's JUnit reporter attaches, per test case, what a
|
|
311
325
|
test attaches (`testInfo.attach(name, {path})`, or `screenshot: 'on'`), and
|
|
312
|
-
one `evidence add
|
|
326
|
+
one `evidence add-all --report junit:<path>` binds to each
|
|
313
327
|
record only its own tests' files. A file the report does not name goes
|
|
314
328
|
with `--artifact <scenario-id>=<path>`; a bare `--artifact` in a batch is
|
|
315
329
|
refused. An external evaluator's audit is
|
|
@@ -318,7 +332,7 @@ canon evidence add --input '[{"scenario":"auth.login.01","class":"test-run","ref
|
|
|
318
332
|
the task; a canon command is never that proof. When the behavior cannot
|
|
319
333
|
match the scenario because of something outside this change, record the
|
|
320
334
|
evidence `divergent` and say why in `--ref`; never record `faithful` to
|
|
321
|
-
pass. The human accepts the tracked gap (`canon
|
|
335
|
+
pass. The human accepts the tracked gap (`canon divergences accept`
|
|
322
336
|
refuses agent roles unless it records their explicit answer); fixing the behavior and recording again is the
|
|
323
337
|
other way out.
|
|
324
338
|
5. **Promote.** Under `write: { promote: auto }` (what `canon init` writes)
|
|
@@ -330,7 +344,7 @@ canon evidence add --input '[{"scenario":"auth.login.01","class":"test-run","ref
|
|
|
330
344
|
digests) of the evidence it saw, not which record it was. Recording the
|
|
331
345
|
same verdict from the same checks keeps every review current; a different
|
|
332
346
|
verdict, different checks or an edited scenario stales it. The add prints
|
|
333
|
-
the reviewer and the `canon
|
|
347
|
+
the reviewer and the `canon reviews scenario` call that signs it again; that
|
|
334
348
|
is the reviewer's call. Do not run it yourself. A review of an uncommitted
|
|
335
349
|
working tree survives the commit you make from it: the review is judged by
|
|
336
350
|
the scenario and the evidence it pins, never by the commit.
|
|
@@ -346,7 +360,7 @@ canon evidence add --input '[{"scenario":"auth.login.01","class":"test-run","ref
|
|
|
346
360
|
says so): it asks for no evidence at all. When code did change, the shipping refusal, `status` and
|
|
347
361
|
`meta.next` lead with one command over every report, with the real paths
|
|
348
362
|
(`--project <id>` is added only with several spec roots):
|
|
349
|
-
`canon evidence add
|
|
363
|
+
`canon evidence add-all --report junit:a.xml --report junit:b.xml --role implementer`.
|
|
350
364
|
Run the suite and bind it with that one command, not one scenario at a
|
|
351
365
|
time. Reviews stay current while the verdicts and checks are unchanged; a
|
|
352
366
|
scenario whose gap was accepted needs the human to accept again once new
|
|
@@ -381,7 +395,7 @@ not another evidence step.
|
|
|
381
395
|
`evidence add` is content-keyed: repeating it with identical input returns
|
|
382
396
|
the existing record with `data.unchanged: true` instead of a duplicate (a
|
|
383
397
|
batch reports that element `unchanged`). After a timeout or a lost
|
|
384
|
-
response, run the same command again. `
|
|
398
|
+
response, run the same command again. `scenarios create` is not: an existing
|
|
385
399
|
scenario id is refused (`SCENARIO_TAG_EXISTS`) and nothing changes, so check
|
|
386
400
|
before you repeat it.
|
|
387
401
|
|
|
@@ -391,6 +405,6 @@ When every scenario has evidence, the review is the reviewer's session, in a
|
|
|
391
405
|
separate process: do not review your own change. A chore adds no scenarios:
|
|
392
406
|
once it is approved, record evidence where the code changed (the batch
|
|
393
407
|
above names it) and the reviewer records one change-level review of the
|
|
394
|
-
chore (`
|
|
395
|
-
when the verdicts and checks are unchanged. Reference: `canon skills
|
|
408
|
+
chore (`reviews change`); shipping needs both. Scenario reviews stay current
|
|
409
|
+
when the verdicts and checks are unchanged. Reference: `canon skills get
|
|
396
410
|
canon-gate`.
|