@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
|
@@ -4,15 +4,17 @@ You build inside an approved scope: scenarios, code, tests and evidence.
|
|
|
4
4
|
Declare the role with `CANON_ROLE=implementer` (or `--as implementer`); `--role`
|
|
5
5
|
on what you record then defaults to `implementer`.
|
|
6
6
|
Build nothing before the brief is approved: `canon evidence add` refuses an
|
|
7
|
-
unapproved brief's scenarios. If it is not approved,
|
|
8
|
-
|
|
7
|
+
unapproved brief's scenarios. If it is not approved, tell the orchestrator or planner, who show it to the human and ask;
|
|
8
|
+
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
12
|
skip the wait yourself. `brief approve`, `policy approve` and `divergence
|
|
13
|
-
accept` are the human's; they refuse you (`HUMAN_ONLY`)
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
accept` are the human's; they refuse you (`HUMAN_ONLY`) unless they record an
|
|
14
|
+
answer the human gave in the conversation (`--relayed-via`, the planner's
|
|
15
|
+
procedure: `canon skills show role-planner`). You never run them without that
|
|
16
|
+
answer, and never remove or unset your role (`env -u CANON_ROLE`, dropping
|
|
17
|
+
`--as`) to get past the refusal.
|
|
16
18
|
|
|
17
19
|
## Commands
|
|
18
20
|
|
|
@@ -63,17 +65,17 @@ canon context-pack verify sha256:00000000000000000000000000000000000000000000000
|
|
|
63
65
|
```
|
|
64
66
|
```text
|
|
65
67
|
# Add a divergence candidate, staged with no run_seq yet
|
|
66
|
-
canon divergence add <SCENARIO_ID> --actor
|
|
68
|
+
canon divergence add <SCENARIO_ID> --actor <ACTOR_ID> [--project <PROJECT_ID>] [--rev <REV>] [--state <open|still-divergent|resolved|deferred>] [--reason <TEXT>] [--expiry <TIMESTAMP>] [--round <N>] [--session <SESSION_ID>] [--detail <TEXT>] [--role <ROLE>] [--promote | --no-promote] [--input]
|
|
67
69
|
```
|
|
68
70
|
```bash
|
|
69
|
-
canon divergence add auth.login.01 --actor
|
|
71
|
+
canon divergence add auth.login.01 --actor alice --role reviewer
|
|
70
72
|
```
|
|
71
73
|
```text
|
|
72
74
|
# Directly record a deferred divergence (requires --reason/--expiry)
|
|
73
|
-
canon divergence defer <SCENARIO_ID> --actor
|
|
75
|
+
canon divergence defer <SCENARIO_ID> --actor <ACTOR_ID> --reason <TEXT> --expiry <TIMESTAMP> [--project <PROJECT_ID>] [--rev <REV>] [--round <N>] [--session <SESSION_ID>] [--role <ROLE>] [--input]
|
|
74
76
|
```
|
|
75
77
|
```bash
|
|
76
|
-
canon divergence defer auth.login.01 --actor
|
|
78
|
+
canon divergence defer auth.login.01 --actor alice --reason "waiting on the vendor" --expiry 2030-01-01T00:00:00Z --role reviewer
|
|
77
79
|
```
|
|
78
80
|
```text
|
|
79
81
|
# List the current divergence burn-down state
|
|
@@ -84,45 +86,45 @@ canon divergence list --as-of 2030-01-01
|
|
|
84
86
|
```
|
|
85
87
|
```text
|
|
86
88
|
# Directly record a resolved divergence
|
|
87
|
-
canon divergence resolve <SCENARIO_ID> --actor
|
|
89
|
+
canon divergence resolve <SCENARIO_ID> --actor <ACTOR_ID> [--project <PROJECT_ID>] [--rev <REV>] [--round <N>] [--session <SESSION_ID>] [--detail <TEXT>] [--role <ROLE>] [--input]
|
|
88
90
|
```
|
|
89
91
|
```bash
|
|
90
|
-
canon divergence resolve auth.login.01 --actor
|
|
92
|
+
canon divergence resolve auth.login.01 --actor alice --role reviewer
|
|
91
93
|
```
|
|
92
94
|
```text
|
|
93
95
|
# Record one attributed EvidenceRecord for a task or scenario
|
|
94
|
-
canon evidence add [--task
|
|
96
|
+
canon evidence add [--task <TASK_ID>] [--project <PROJECT_ID>] [--class <CLASS>] [--ref <TEXT>] [--verdict <faithful|not-applicable|divergent>] [--summary <TEXT>] [--command-result <TEXT>] [--scenario <SCENARIO_ID>] [--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 <FORMAT:PATH>]* [--report-case <NAME>]* [--all-scenarios] [--max-artifact-mib <N>] [--override-reason <TEXT>] [--promote | --no-promote] [--input]
|
|
95
97
|
```
|
|
96
98
|
```bash
|
|
97
|
-
canon evidence add --scenario
|
|
99
|
+
canon evidence add --scenario auth.login.01 --class test-run --ref "npm test" --role implementer
|
|
98
100
|
```
|
|
99
101
|
```text
|
|
100
102
|
# Emit exact bytes for external `ssh-keygen -Y sign -n canon-approval-v1`
|
|
101
|
-
canon evidence approval-payload --approver <NAME> --approval-at <TIMESTAMP> [--task
|
|
103
|
+
canon evidence approval-payload --approver <NAME> --approval-at <TIMESTAMP> [--task <TASK_ID>] [--project <PROJECT_ID>] [--scenario <SCENARIO_ID>] [--run <RUN_ID>] [--rev <REV>] [--surface-ref <PATH_OR_EFFECT>]*
|
|
102
104
|
```
|
|
103
105
|
```bash
|
|
104
|
-
canon evidence approval-payload --scenario
|
|
106
|
+
canon evidence approval-payload --scenario auth.login.01 --project root --approver alice --approval-at 2030-01-01T00:00:00Z
|
|
105
107
|
```
|
|
106
108
|
```text
|
|
107
109
|
# Record an external evaluator's re-audit of one scenario (class `audit`; the verdict follows --audit-result; canon never runs the evaluator)
|
|
108
|
-
canon evidence audit <SCENARIO_ID> --ref <TEXT> --evaluator
|
|
110
|
+
canon evidence audit <SCENARIO_ID> --ref <TEXT> --evaluator <ID> --evaluator-version <TEXT> --evaluator-digest <DIGEST> --audit-result <confirmed|refuted|indeterminate> [--project <PROJECT_ID>] [--summary <TEXT>] [--command-result <TEXT>] [--run <RUN_ID>] [--actor <ACTOR_ID>] [--role <ROLE>] [--session <SESSION_ID>] [--rev <REV>] [--artifact <PATH>]* [--report <FORMAT:PATH>]* [--report-case <NAME>]* [--max-artifact-mib <N>] [--override-reason <TEXT>] [--promote | --no-promote] [--input]
|
|
109
111
|
```
|
|
110
112
|
```bash
|
|
111
|
-
canon evidence audit auth.login.01 --ref audit-report.json --evaluator
|
|
113
|
+
canon evidence audit auth.login.01 --ref audit-report.json --evaluator eval-1 --evaluator-version 2.1 --evaluator-digest 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef --audit-result confirmed --role implementer
|
|
112
114
|
```
|
|
113
115
|
```text
|
|
114
116
|
# Create a fresh .feature file for a new area.surface
|
|
115
|
-
canon feature new <SURFACE> --title <TEXT> [--actor
|
|
117
|
+
canon feature new <SURFACE> --title <TEXT> [--actor <ACTOR_ID>] [--session <SESSION_ID>] [--project <PROJECT_ID>] [--input]
|
|
116
118
|
```
|
|
117
119
|
```bash
|
|
118
120
|
canon feature new billing.invoice --title Invoices
|
|
119
121
|
```
|
|
120
122
|
```text
|
|
121
123
|
# List a change's committed findings at their latest version
|
|
122
|
-
canon finding list --change
|
|
124
|
+
canon finding list --change <CHANGE_ID> [--open] [--limit <N> | --all] [--cursor <CURSOR>] [--fields <FIELDS>]
|
|
123
125
|
```
|
|
124
126
|
```bash
|
|
125
|
-
canon finding list --change
|
|
127
|
+
canon finding list --change add-login
|
|
126
128
|
```
|
|
127
129
|
```text
|
|
128
130
|
# Validate a spec/artifact corpus against canon's format
|
|
@@ -154,21 +156,21 @@ canon inventory sync
|
|
|
154
156
|
```
|
|
155
157
|
```text
|
|
156
158
|
# Read stored records across every storage tier
|
|
157
|
-
canon query --kind <change|task|scenario|session|run|event|handoff|review|divergence|trajectory|strategy_item|evidence|subject|finding> [--since <TIMESTAMP>] [--plugin
|
|
159
|
+
canon query --kind <change|task|scenario|session|run|event|handoff|review|divergence|trajectory|strategy_item|evidence|subject|finding> [--since <TIMESTAMP>] [--plugin <PLUGIN_ID> | --history] [--change <CHANGE_ID>] [--status <STATUS>] [--domain <NAME>] [--include-sensitive] [--limit <N> | --all] [--cursor <CURSOR>] [--fields <FIELDS>]
|
|
158
160
|
```
|
|
159
161
|
```bash
|
|
160
162
|
canon query --kind evidence
|
|
161
163
|
```
|
|
162
164
|
```text
|
|
163
165
|
# Fetch role-scoped strategy guidance
|
|
164
|
-
canon retrieve --for-role <ROLE> [--regime <KEY>] [--domain <NAME>] [--subject
|
|
166
|
+
canon retrieve --for-role <ROLE> [--regime <KEY>] [--domain <NAME>] [--subject <SUBJECT_ID>] [--limit <N>]
|
|
165
167
|
```
|
|
166
168
|
```bash
|
|
167
169
|
canon retrieve --for-role reviewer --domain dev --limit 20
|
|
168
170
|
```
|
|
169
171
|
```text
|
|
170
172
|
# Append a tagged scenario stub to its .feature file (created if missing); many at once with `--input`
|
|
171
|
-
canon scenario new <SCENARIO_ID> --title <TEXT> [--subject
|
|
173
|
+
canon scenario new <SCENARIO_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>] [--input]
|
|
172
174
|
```
|
|
173
175
|
```bash
|
|
174
176
|
canon scenario new auth.login.02 --title "Sign out" --feature .canon/specs/kind=feature/area=auth/login.feature
|
|
@@ -181,6 +183,13 @@ canon schema [<PATH>]* [--errors | --error <CODE>]
|
|
|
181
183
|
canon schema evidence add
|
|
182
184
|
```
|
|
183
185
|
```text
|
|
186
|
+
# Search records, brief sections and scenario text, with each hit's neighbors in the record graph
|
|
187
|
+
canon search <TEXT> [--kind <change|task|scenario|session|run|event|handoff|review|divergence|trajectory|strategy_item|evidence|subject|finding|brief>]* [--expand <N>] [--limit <N>]
|
|
188
|
+
```
|
|
189
|
+
```bash
|
|
190
|
+
canon search timeout --kind finding
|
|
191
|
+
```
|
|
192
|
+
```text
|
|
184
193
|
# Print a guide built into this binary (markdown on stdout); the installed SKILL.md is a stub that points here
|
|
185
194
|
canon skills show <NAME> [--full]
|
|
186
195
|
```
|
|
@@ -201,6 +210,13 @@ canon task done <TASK_ID> [--input]
|
|
|
201
210
|
```bash
|
|
202
211
|
canon task done add-login#1
|
|
203
212
|
```
|
|
213
|
+
```text
|
|
214
|
+
# Follow a finding's review loop in time order: review, finding, fix, re-review, evidence
|
|
215
|
+
canon trace <ID>
|
|
216
|
+
```
|
|
217
|
+
```bash
|
|
218
|
+
canon trace add-login_1_1
|
|
219
|
+
```
|
|
204
220
|
<!-- canon:generated commands-implementer end -->
|
|
205
221
|
|
|
206
222
|
After the first `status`, follow `meta.next` of each write; do not call
|
|
@@ -214,9 +230,9 @@ The forms you reach for most (the story's ids; swap in yours):
|
|
|
214
230
|
|
|
215
231
|
```bash
|
|
216
232
|
canon evidence add --all-scenarios --report junit:a.xml --report junit:b.xml --role implementer
|
|
217
|
-
canon evidence add --scenario
|
|
218
|
-
canon evidence add --scenario
|
|
219
|
-
canon finding add --change
|
|
233
|
+
canon evidence add --scenario auth.login.01 --report junit:red.xml
|
|
234
|
+
canon evidence add --scenario auth.login.01 --verdict divergent --class test-run --ref "upstream limit, tracked in issue 118" --artifact limit.log
|
|
235
|
+
canon finding add --change add-login --round 1 --seq 1 --severity should-fix --introduced-unknown --actor unit-1 --summary "Token is logged"
|
|
220
236
|
```
|
|
221
237
|
|
|
222
238
|
Batches are one `--input` document (the keys are option names in camelCase,
|
|
@@ -224,7 +240,7 @@ Batches are one `--input` document (the keys are option names in camelCase,
|
|
|
224
240
|
|
|
225
241
|
```text
|
|
226
242
|
canon scenario new --input '[{"operands":["auth.login.01"],"title":"Logs in","case":"happy","flow":"F1"},{"operands":["auth.login.02"],"title":"Rejects a wrong password","case":"failure","flow":"F1"}]'
|
|
227
|
-
canon evidence add --input '[{"
|
|
243
|
+
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"}]'
|
|
228
244
|
```
|
|
229
245
|
|
|
230
246
|
## Steps
|
|
@@ -247,7 +263,7 @@ canon evidence add --input '[{"scenarioId":"auth.login.01","class":"test-run","r
|
|
|
247
263
|
under a `specs.roots[]` root (default `.canon/specs`); `canon skills show
|
|
248
264
|
canon-authoring` has the scaffold. When you fill in a scenario, keep its
|
|
249
265
|
`# canon: {...}` provenance lines: dropping one aborts `inventory sync`
|
|
250
|
-
on `missing-provenance`. `--project
|
|
266
|
+
on `missing-provenance`. `--project` is needed only when the repo
|
|
251
267
|
configures more than one spec root.
|
|
252
268
|
2. **Units.** One unit is one flow step's complete path (sees, does,
|
|
253
269
|
becomes) that can be verified on its own, sized to one session. Name the
|
|
@@ -262,7 +278,7 @@ canon evidence add --input '[{"scenarioId":"auth.login.01","class":"test-run","r
|
|
|
262
278
|
with `finding add` the moment you find it, before review.
|
|
263
279
|
**A fix fails first.** For a bug fix, write or extend the scenario's test
|
|
264
280
|
and run it red on the unfixed code, then bind that failing run before you
|
|
265
|
-
change the code (`evidence add --scenario
|
|
281
|
+
change the code (`evidence add --scenario <id> --report <fmt>:<path>`).
|
|
266
282
|
A bound report decides the verdict: a failed case records `divergent`, a
|
|
267
283
|
skipped case and none failed records `not-applicable`, otherwise
|
|
268
284
|
`faithful`; an explicit `--verdict faithful` over a failed or skipped case
|
|
@@ -276,8 +292,8 @@ canon evidence add --input '[{"scenarioId":"auth.login.01","class":"test-run","r
|
|
|
276
292
|
One test run that proves several scenarios is bound once with
|
|
277
293
|
`--all-scenarios`: one record per indexed scenario owning a case, each
|
|
278
294
|
with the verdict its own cases show; any refusal writes none. It needs
|
|
279
|
-
`--project
|
|
280
|
-
use `--scenario
|
|
295
|
+
`--project` only when the repo has several spec roots. For one scenario
|
|
296
|
+
use `--scenario <id>` with `--report` or `--artifact`; for many
|
|
281
297
|
records with different values, one `evidence add --input` with an array
|
|
282
298
|
(validated before any write; a write that fails stops the batch, the
|
|
283
299
|
earlier elements stay written and a rerun reports them `unchanged`).
|
|
@@ -299,12 +315,12 @@ canon evidence add --input '[{"scenarioId":"auth.login.01","class":"test-run","r
|
|
|
299
315
|
with `--artifact <scenario-id>=<path>`; a bare `--artifact` in a batch is
|
|
300
316
|
refused. An external evaluator's audit is
|
|
301
317
|
`canon evidence audit`; canon never generates one. Evidence for a task of an
|
|
302
|
-
imported plan (`--task
|
|
318
|
+
imported plan (`--task <id>`) must bind the artifact or report that proves
|
|
303
319
|
the task; a canon command is never that proof. When the behavior cannot
|
|
304
320
|
match the scenario because of something outside this change, record the
|
|
305
321
|
evidence `divergent` and say why in `--ref`; never record `faithful` to
|
|
306
322
|
pass. The human accepts the tracked gap (`canon divergence accept`
|
|
307
|
-
refuses agent roles); fixing the behavior and recording again is the
|
|
323
|
+
refuses agent roles unless it records their explicit answer); fixing the behavior and recording again is the
|
|
308
324
|
other way out.
|
|
309
325
|
5. **Promote.** Under `write: { promote: auto }` (what `canon init` writes)
|
|
310
326
|
the record is final when `evidence add` returns. Only with
|
|
@@ -328,7 +344,7 @@ canon evidence add --input '[{"scenarioId":"auth.login.01","class":"test-run","r
|
|
|
328
344
|
is `docs/**` and `*.md`). A docs-only chore needs its change-level review
|
|
329
345
|
alone. When code did change, the shipping refusal, `status` and
|
|
330
346
|
`meta.next` lead with one command over every report, with the real paths
|
|
331
|
-
(`--project
|
|
347
|
+
(`--project <id>` is added only with several spec roots):
|
|
332
348
|
`canon evidence add --all-scenarios --report junit:a.xml --report junit:b.xml --role implementer`.
|
|
333
349
|
Run the suite and bind it with that one command, not one scenario at a
|
|
334
350
|
time. Reviews stay current while the verdicts and checks are unchanged; a
|
|
@@ -347,10 +363,10 @@ not another evidence step.
|
|
|
347
363
|
|---|---|
|
|
348
364
|
| "The suite is slow; record `faithful` to pass." | `faithful` over a failed case is refused; a limit outside this change is recorded `divergent` with the reason in `--ref`. |
|
|
349
365
|
| "I fixed it, the test would pass." | Run the test red first and bind it, then green. Evidence is a claim; the history is what the reviewer reads. |
|
|
350
|
-
| "The brief is as good as approved." | `evidence add` refuses an unapproved brief's scenarios.
|
|
366
|
+
| "The brief is as good as approved." | `evidence add` refuses an unapproved brief's scenarios. Tell the orchestrator or planner, who show it to the human and ask; build nothing meanwhile. |
|
|
351
367
|
| "I will attest the other unit's work under my id." | Each unit records under its own actor id and session id. |
|
|
352
368
|
| "I was told this twice already." | A correction repeated across runs belongs in a scenario, the policy or a gate; tell the orchestrator. |
|
|
353
|
-
| "I will accept the divergence myself." |
|
|
369
|
+
| "I will accept the divergence myself." | The human accepts a gap: report the scenario, the reason and the tracking reference so they are asked, and never record an answer they did not give. |
|
|
354
370
|
|
|
355
371
|
## Retry safety
|
|
356
372
|
|
|
@@ -4,9 +4,10 @@ You run the loop across agents and move the subject. You write no brief,
|
|
|
4
4
|
code or review yourself. Declare the role with `CANON_ROLE=orchestrator` (or
|
|
5
5
|
`--as orchestrator`); your `canon status` also lists the human's steps. The
|
|
6
6
|
human's acts (`brief approve`, `policy approve`, `divergence accept`) refuse
|
|
7
|
-
every agent role, you included (`HUMAN_ONLY`)
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
every agent role, you included (`HUMAN_ONLY`), unless you record the answer the
|
|
8
|
+
human gave you in the conversation with `--relayed-via <tool>` (below). You never
|
|
9
|
+
run them without that answer, and never remove or unset your role (`env -u CANON_ROLE`,
|
|
10
|
+
dropping `--as`) to get past the refusal.
|
|
10
11
|
|
|
11
12
|
## Commands
|
|
12
13
|
|
|
@@ -114,7 +115,7 @@ canon demo review
|
|
|
114
115
|
```
|
|
115
116
|
```text
|
|
116
117
|
# Mint a Run manifest with retrieved guidance and context/policy lineage
|
|
117
|
-
canon dispatch begin --regime <KEY> [--role <ROLE>] [--actor
|
|
118
|
+
canon dispatch begin --regime <KEY> [--role <ROLE>] [--actor <ACTOR_ID>] [--session <SESSION_ID>] [--provider <NAME>] [--model <NAME>] [--skill <ID>] [--skill-digest <DIGEST>] [--manifest <FILE>] [--prompt-bundle <NAME@VERSION>] [--task <TASK_ID>] [--parent-run <RUN_ID>] [--input]
|
|
118
119
|
```
|
|
119
120
|
```bash
|
|
120
121
|
canon dispatch begin --regime implementer/my-repo/api/abcdef012345 --role implementer
|
|
@@ -142,10 +143,10 @@ canon divergence list --as-of 2030-01-01
|
|
|
142
143
|
```
|
|
143
144
|
```text
|
|
144
145
|
# Emit exact bytes for external `ssh-keygen -Y sign -n canon-approval-v1`
|
|
145
|
-
canon evidence approval-payload --approver <NAME> --approval-at <TIMESTAMP> [--task
|
|
146
|
+
canon evidence approval-payload --approver <NAME> --approval-at <TIMESTAMP> [--task <TASK_ID>] [--project <PROJECT_ID>] [--scenario <SCENARIO_ID>] [--run <RUN_ID>] [--rev <REV>] [--surface-ref <PATH_OR_EFFECT>]*
|
|
146
147
|
```
|
|
147
148
|
```bash
|
|
148
|
-
canon evidence approval-payload --scenario
|
|
149
|
+
canon evidence approval-payload --scenario auth.login.01 --project root --approver alice --approval-at 2030-01-01T00:00:00Z
|
|
149
150
|
```
|
|
150
151
|
```text
|
|
151
152
|
# Export a redacted retention manifest without deleting records
|
|
@@ -156,10 +157,10 @@ canon export --kind evidence --output evidence.json
|
|
|
156
157
|
```
|
|
157
158
|
```text
|
|
158
159
|
# List a change's committed findings at their latest version
|
|
159
|
-
canon finding list --change
|
|
160
|
+
canon finding list --change <CHANGE_ID> [--open] [--limit <N> | --all] [--cursor <CURSOR>] [--fields <FIELDS>]
|
|
160
161
|
```
|
|
161
162
|
```bash
|
|
162
|
-
canon finding list --change
|
|
163
|
+
canon finding list --change add-login
|
|
163
164
|
```
|
|
164
165
|
```text
|
|
165
166
|
# Validate a spec/artifact corpus against canon's format
|
|
@@ -191,7 +192,7 @@ canon ingest plans
|
|
|
191
192
|
```
|
|
192
193
|
```text
|
|
193
194
|
# Import review/divergence/task/handoff records and derive verdicts
|
|
194
|
-
canon ingest records [--watch] [--interval-secs <N>] [--dry-run] [--run
|
|
195
|
+
canon ingest records [--watch] [--interval-secs <N>] [--dry-run] [--run <RUN_ID>] [--input]
|
|
195
196
|
```
|
|
196
197
|
```bash
|
|
197
198
|
canon ingest records
|
|
@@ -227,7 +228,7 @@ canon ledger compact
|
|
|
227
228
|
```
|
|
228
229
|
```text
|
|
229
230
|
# Bring a repo from an earlier canon up to date
|
|
230
|
-
canon migrate [--commit --plan-digest <DIGEST>] [--revert] [--backup <DIR> (with --revert)] [--input]
|
|
231
|
+
canon migrate [--commit --plan-digest <DIGEST>] [--revert | --relayed-via <NAME>] [--backup <DIR> (with --revert)] [--actor <ACTOR_ID> (with --relayed-via)] [--approver <NAME> (with --relayed-via)] [--note <TEXT> (with --relayed-via)] [--input]
|
|
231
232
|
# a bare run previews and prints planDigest; `--commit --plan-digest <DIGEST>` with that digest acts
|
|
232
233
|
```
|
|
233
234
|
```bash
|
|
@@ -271,7 +272,7 @@ canon purge --kind session --before 2020-01-01T00:00:00Z
|
|
|
271
272
|
```
|
|
272
273
|
```text
|
|
273
274
|
# Read stored records across every storage tier
|
|
274
|
-
canon query --kind <change|task|scenario|session|run|event|handoff|review|divergence|trajectory|strategy_item|evidence|subject|finding> [--since <TIMESTAMP>] [--plugin
|
|
275
|
+
canon query --kind <change|task|scenario|session|run|event|handoff|review|divergence|trajectory|strategy_item|evidence|subject|finding> [--since <TIMESTAMP>] [--plugin <PLUGIN_ID> | --history] [--change <CHANGE_ID>] [--status <STATUS>] [--domain <NAME>] [--include-sensitive] [--limit <N> | --all] [--cursor <CURSOR>] [--fields <FIELDS>]
|
|
275
276
|
```
|
|
276
277
|
```bash
|
|
277
278
|
canon query --kind evidence
|
|
@@ -306,7 +307,7 @@ canon report snapshot snapshot-out
|
|
|
306
307
|
```
|
|
307
308
|
```text
|
|
308
309
|
# Fetch role-scoped strategy guidance
|
|
309
|
-
canon retrieve --for-role <ROLE> [--regime <KEY>] [--domain <NAME>] [--subject
|
|
310
|
+
canon retrieve --for-role <ROLE> [--regime <KEY>] [--domain <NAME>] [--subject <SUBJECT_ID>] [--limit <N>]
|
|
310
311
|
```
|
|
311
312
|
```bash
|
|
312
313
|
canon retrieve --for-role reviewer --domain dev --limit 20
|
|
@@ -319,6 +320,13 @@ canon schema [<PATH>]* [--errors | --error <CODE>]
|
|
|
319
320
|
canon schema evidence add
|
|
320
321
|
```
|
|
321
322
|
```text
|
|
323
|
+
# Search records, brief sections and scenario text, with each hit's neighbors in the record graph
|
|
324
|
+
canon search <TEXT> [--kind <change|task|scenario|session|run|event|handoff|review|divergence|trajectory|strategy_item|evidence|subject|finding|brief>]* [--expand <N>] [--limit <N>]
|
|
325
|
+
```
|
|
326
|
+
```bash
|
|
327
|
+
canon search timeout --kind finding
|
|
328
|
+
```
|
|
329
|
+
```text
|
|
322
330
|
# Run canon's built-in fixture self-tests
|
|
323
331
|
canon selftest [--suite <trust-spine-gate|tiered-storage|typed-authoring-vocabulary|policy-expressions|format-authority|session-ingest|canon-context|artifact-ingest|spec-ledger-selftest|plugin-overlays|plan-import>]
|
|
324
332
|
```
|
|
@@ -376,28 +384,28 @@ canon strategy promote 01ARZ3NDEKTSV4RRFFQ69G5FAV
|
|
|
376
384
|
```
|
|
377
385
|
```text
|
|
378
386
|
# Disable an active strategy with durable rollback provenance
|
|
379
|
-
canon strategy rollback <STRATEGY_ID> --reason <TEXT> --actor
|
|
387
|
+
canon strategy rollback <STRATEGY_ID> --reason <TEXT> --actor <ACTOR_ID> --signature-file <FILE> --approval-at <TIMESTAMP> [--contradicting-trajectory <ID>] [--input]
|
|
380
388
|
```
|
|
381
389
|
```bash
|
|
382
|
-
canon strategy rollback 01ARZ3NDEKTSV4RRFFQ69G5FAV --reason "regressed in production" --actor
|
|
390
|
+
canon strategy rollback 01ARZ3NDEKTSV4RRFFQ69G5FAV --reason "regressed in production" --actor alice --signature-file approval.sig --approval-at 2030-01-01T00:00:00Z
|
|
383
391
|
```
|
|
384
392
|
```text
|
|
385
393
|
# Link an imported plan change to a subject (adopting it under another subject adds that subject; a change may belong to several)
|
|
386
|
-
canon subject adopt <SUBJECT_ID> --change
|
|
394
|
+
canon subject adopt <SUBJECT_ID> --change <CHANGE_ID> [--dry-run] [--input]
|
|
387
395
|
```
|
|
388
396
|
```bash
|
|
389
|
-
canon subject adopt demo --change
|
|
397
|
+
canon subject adopt demo --change add-login
|
|
390
398
|
```
|
|
391
399
|
```text
|
|
392
400
|
# Move a subject to another lifecycle state (shipping is evidence-gated; with spec_coverage.require_review, entering its scope is review-gated; shipped → verifying reopens with --reason)
|
|
393
|
-
canon subject move <SUBJECT_ID> --to <proposed|specced|building|verifying|shipped|retired> [--override-reason <TEXT>] [--reason <TEXT>] [--actor
|
|
401
|
+
canon subject move <SUBJECT_ID> --to <proposed|specced|building|verifying|shipped|retired> [--override-reason <TEXT>] [--reason <TEXT>] [--actor <ACTOR_ID>] [--session <SESSION_ID>] [--input]
|
|
394
402
|
```
|
|
395
403
|
```bash
|
|
396
404
|
canon subject move demo --to specced
|
|
397
405
|
```
|
|
398
406
|
```text
|
|
399
407
|
# Author a new subject at status `proposed`
|
|
400
|
-
canon subject new <SUBJECT_ID> --domain <NAME> --title <TEXT> [--summary <TEXT>] [--owner-role <ROLE>] [--actor
|
|
408
|
+
canon subject new <SUBJECT_ID> --domain <NAME> --title <TEXT> [--summary <TEXT>] [--owner-role <ROLE>] [--actor <ACTOR_ID>] [--session <SESSION_ID>] [--input]
|
|
401
409
|
```
|
|
402
410
|
```bash
|
|
403
411
|
canon subject new payments --domain dev --title Payments
|
|
@@ -411,10 +419,10 @@ canon subject show demo
|
|
|
411
419
|
```
|
|
412
420
|
```text
|
|
413
421
|
# Take a change back out of a subject (the mirror of adopt; refused for a change whose brief is approved)
|
|
414
|
-
canon subject unadopt <SUBJECT_ID> --change
|
|
422
|
+
canon subject unadopt <SUBJECT_ID> --change <CHANGE_ID> [--dry-run] [--input]
|
|
415
423
|
```
|
|
416
424
|
```bash
|
|
417
|
-
canon subject unadopt demo --change
|
|
425
|
+
canon subject unadopt demo --change add-login
|
|
418
426
|
```
|
|
419
427
|
```text
|
|
420
428
|
# Apply canon.yaml aging rules, moving old records to their destination tier
|
|
@@ -424,6 +432,13 @@ canon tier age [--commit --plan-digest <DIGEST>] [--input]
|
|
|
424
432
|
```bash
|
|
425
433
|
canon tier age
|
|
426
434
|
```
|
|
435
|
+
```text
|
|
436
|
+
# Follow a finding's review loop in time order: review, finding, fix, re-review, evidence
|
|
437
|
+
canon trace <ID>
|
|
438
|
+
```
|
|
439
|
+
```bash
|
|
440
|
+
canon trace add-login_1_1
|
|
441
|
+
```
|
|
427
442
|
<!-- canon:generated commands-orchestrator end -->
|
|
428
443
|
|
|
429
444
|
## Read the state
|
|
@@ -454,7 +469,7 @@ on every canon call (or run `export CANON_ROLE=<role>` first in its own
|
|
|
454
469
|
shell).
|
|
455
470
|
|
|
456
471
|
Order: planner, then (after the human's answer) implementer, then reviewer.
|
|
457
|
-
Give each a unit: its own `--actor
|
|
472
|
+
Give each a unit: its own `--actor` and a session id.
|
|
458
473
|
|
|
459
474
|
### Spawn contract
|
|
460
475
|
|
|
@@ -463,7 +478,7 @@ one flow step or review it serves); the scope it owns (the scenarios or
|
|
|
463
478
|
paths it may write); what it must not touch (the brief, the policy, other
|
|
464
479
|
units' scenarios, anything outside its scope); the command that proves it is
|
|
465
480
|
done (the unit's verify command, or `canon gate check` for the reviewer); and
|
|
466
|
-
its own `--actor
|
|
481
|
+
its own `--actor` and `--session`. Two agents never write the same
|
|
467
482
|
paths: give parallel implementers disjoint scopes, and where the harness can
|
|
468
483
|
isolate a child in its own worktree, use it. The child reports what it
|
|
469
484
|
verified apart from what it only claims.
|
|
@@ -477,40 +492,55 @@ text.
|
|
|
477
492
|
| Harness | In-harness subagents | Isolation | Ask the human | Hooks | Skipped |
|
|
478
493
|
|---|---|---|---|---|---|
|
|
479
494
|
| claude (`.claude`) | yes, a subagent tool; a child shares your environment, so pass the role in the task | a subagent can run in its own git worktree | yes, a question tool | yes, in the harness settings; `scripts/canon-retrieve-pre-dispatch.sh` is a sidecar, not installed | none |
|
|
480
|
-
| codex (`.agents`) | `verify`: none when #39 was filed; start the reviewer as a new `codex exec` run | none from canon: use a separate worktree you create | no in `codex exec`;
|
|
495
|
+
| codex (`.agents`) | `verify`: none when #39 was filed; start the reviewer as a new `codex exec` run | none from canon: use a separate worktree you create | no in `codex exec`; ask in the chat | `verify` | in-harness spawn, unless a newer version provides it |
|
|
481
496
|
| omp (`.omp`) | yes, the task tool | `verify` | yes, an ask tool | yes | none |
|
|
482
497
|
| pi (`.pi`) | `verify`: assume none; start a new `pi` process | none from canon | `verify` | `verify` | in-harness spawn, isolation |
|
|
483
498
|
|
|
484
499
|
Where a harness has no subagent tool, the reviewer is still a separate
|
|
485
500
|
process with its own session id: start it from the shell with its own
|
|
486
|
-
`CANON_ROLE=reviewer`. A harness that cannot ask the human means you
|
|
487
|
-
and
|
|
501
|
+
`CANON_ROLE=reviewer`. A harness that cannot ask the human means you ask
|
|
502
|
+
in the chat and record only the reply; you never assume the answer.
|
|
488
503
|
|
|
489
504
|
The reviewer is a separate process with its own session id, never your
|
|
490
505
|
session or the implementer's under another label. Start it as a new process
|
|
491
506
|
(a new `codex exec` run, or the harness's subagent), pass nothing of the
|
|
492
507
|
implementer's context, and have it record its real session id as
|
|
493
|
-
`--session
|
|
508
|
+
`--session` (#39). A reviewer that cannot run the tests says so and does
|
|
494
509
|
not sign off.
|
|
495
510
|
|
|
496
|
-
## Relay the human
|
|
511
|
+
## Relay the human's answer
|
|
497
512
|
|
|
498
513
|
When `status` or `meta.next` shows a step with `actor: human` (the brief's
|
|
499
|
-
approval), stop everything for that scope
|
|
500
|
-
its language
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
514
|
+
approval), stop everything for that scope and put the brief in front of the
|
|
515
|
+
human in its language: `canon brief show <slug> --body` prints the brief and,
|
|
516
|
+
last, its digest. Send the output to the human's own view, never retyped (omp:
|
|
517
|
+
redirect it to `out://`, off for subagents and non-TUI sessions and capped at
|
|
518
|
+
64 KiB; there, and where there is no such channel, leave the tool output
|
|
519
|
+
visible). You are the session that talks to the human: a subagent has no
|
|
520
|
+
question tool, so you show, ask and record for it. Ask with the harness question tool (`ask` in omp, `AskUserQuestion`
|
|
521
|
+
in Claude Code, otherwise in the chat), approve or request changes, all the
|
|
522
|
+
clean briefs in one question. Only an explicit approval counts; a question or a
|
|
523
|
+
condition is a revision request for the planner, and no answer means you wait.
|
|
524
|
+
They may also approve in `canon dashboard` (the briefs page); you never click
|
|
525
|
+
Approve or fill the form. On their approval record it: `canon brief approve
|
|
526
|
+
<slug> <slug> --approver <their name> --note "<their own words>" --relayed-via
|
|
527
|
+
<ask|AskUserQuestion|chat> --actor <your actor id> --digest <slug>=<the digest
|
|
528
|
+
shown>` (several slugs take one answer, each with its own `--digest`; nothing is written
|
|
529
|
+
if one is refused). The record says you recorded it, with your role, actor and
|
|
530
|
+
tool. `RELAY_DIGEST_MISMATCH` means the brief changed after they saw it: show it
|
|
531
|
+
again. When `canon.yaml` has `approval: { relay: deny }` the call is refused
|
|
532
|
+
(`HUMAN_ONLY`, naming the key): report the human's own call and wait for them to
|
|
533
|
+
run it. Removing or unsetting your declared role (`env -u CANON_ROLE`,
|
|
534
|
+
dropping `--as`) to get past a refusal is the same act under another label.
|
|
535
|
+
`canon skills show role-planner` has the full procedure. Do not start the
|
|
507
536
|
implementer before `canon brief show <slug>` reports `state: approved`.
|
|
508
537
|
Never approve it yourself and never edit the policy to pass the gate. A
|
|
509
538
|
policy that no longer matches the approval fails closed
|
|
510
539
|
(`POLICY_CHANGED_SINCE_APPROVAL`, or `POLICY_APPROVAL_UNREADABLE`): the ship
|
|
511
540
|
guard and the reopen refuse, and `--override-reason` does not waive it. Run
|
|
512
|
-
`canon policy show`, then
|
|
513
|
-
|
|
541
|
+
`canon policy show`, then show the policy to the human, ask them to re-approve
|
|
542
|
+
and record their explicit answer (`canon policy approve --approver <their name>
|
|
543
|
+
--note "<their words>" --relayed-via <tool> --actor <your actor id>`), or restore the
|
|
514
544
|
approved policy from git; never edit the policy yourself. Inside an
|
|
515
545
|
approved scope never stop for a human: fixes, follow-ups and re-reviews go
|
|
516
546
|
straight to the implementer and reviewer in the same change. A known gap the
|
|
@@ -548,7 +578,7 @@ its preview, never from an old digest.
|
|
|
548
578
|
|---|---|
|
|
549
579
|
| "Edit the policy so the gate passes." | A changed policy fails closed (`POLICY_CHANGED_SINCE_APPROVAL`); ask the human to re-approve or restore it from git. |
|
|
550
580
|
| "The reviewer can be me under another label." | The reviewer is a separate process with its own real session id (#39). |
|
|
551
|
-
| "Approve the brief; the human said they are busy." |
|
|
581
|
+
| "Approve the brief; the human said they are busy." | An answer they did not give is not recorded. Show the brief, ask, and record only an explicit approval with `--relayed-via`. |
|
|
552
582
|
| "Override the refusal to ship." | Fix the gap the refusal names; `--override-reason` waives only the `require_review` gaps and the brief gap, is recorded on the subject, and is for the human's call, not a shortcut. |
|
|
553
583
|
| "Run the commit now, the preview looked fine earlier." | A bare run previews; `--commit --plan-digest` acts only on the plan you just previewed (`PLAN_CHANGED` otherwise). Preview again, then act. |
|
|
554
584
|
| "I have corrected this agent before." | A correction repeated across runs belongs in a scenario, the policy or a gate, not more prose. Tell the human. |
|