@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
|
@@ -4,8 +4,8 @@ You turn a request into an approved scope: a subject, a change and a PRD
|
|
|
4
4
|
brief the human answers once. You build nothing. Declare the role with
|
|
5
5
|
`CANON_ROLE=planner` (or `--as planner`); `canon status` and `meta.next`
|
|
6
6
|
then show your steps and count the rest under `waitingOn`. The approvals are
|
|
7
|
-
the human's: `
|
|
8
|
-
`
|
|
7
|
+
the human's: `briefs approve`, `policy approve`, `divergences accept`, `changes drop`,
|
|
8
|
+
`changes defer`, `changes reopen` (six leaves) and the `migrate --commit` that
|
|
9
9
|
re-binds `Approved:` lines refuse every agent role
|
|
10
10
|
(`ACTOR_DENIED`, `retryable: false`) unless you record the answer the human gave
|
|
11
11
|
you in the conversation, with `--relayed-via <tool>` (step 4). Without a human's
|
|
@@ -14,43 +14,43 @@ explicit answer you never run them, and you never remove or unset your role
|
|
|
14
14
|
|
|
15
15
|
## Commands
|
|
16
16
|
|
|
17
|
-
Every
|
|
18
|
-
has) and an example
|
|
17
|
+
Every operation of this role is below with its full syntax line (every argument the
|
|
18
|
+
operation has) and an example, which runs as written against
|
|
19
19
|
the example story (subject `demo`, change `add-login`, scenario `auth.login.01`): swap
|
|
20
|
-
in your ids. Use only the
|
|
21
|
-
<
|
|
20
|
+
in your ids. Use only the arguments on a line; never guess one. Ask `canon schema
|
|
21
|
+
<operation> --json` only for an operation this block does not list, or after an `INPUT_INVALID` refusal.
|
|
22
22
|
|
|
23
23
|
<!-- canon:generated commands-planner begin -->
|
|
24
|
-
Every
|
|
25
|
-
A `usage:` line shows the syntax and is not itself a command to run (the runnable example under it is): `<X>` is a value, `[x]` optional, `a | b` a choice, `(a | b)` exactly one is required, `[--x <V>]*` may repeat, `<X>+` is one or more, `[--a --b <V>]` go together. An
|
|
24
|
+
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.
|
|
25
|
+
A `usage:` line shows the syntax and is not itself a command to run (the runnable example under it is): `<X>` is a value, `[x]` optional, `a | b` a choice, `(a | b)` exactly one is required, `[--x <V>]*` may repeat, `<X>+` is one or more, `[--a --b <V>]` go together. An argument that is not on the line does not exist: it is refused (`INPUT_INVALID`, reason `UNKNOWN_ARGUMENT`).
|
|
26
26
|
|
|
27
27
|
```text
|
|
28
|
-
# Record the human's approval of the brief, bound to its text; refused while `
|
|
29
|
-
usage: canon
|
|
28
|
+
# Record the human's approval of the brief, bound to its text; refused while `briefs check` has blockers
|
|
29
|
+
usage: canon briefs approve [<CHANGE_ID>]* (--approver <NAME> | --delegated) (--note <TEXT> | --delegated) [--relayed-via <NAME>] [--actor <ACTOR_ID>] [--digest <DIGEST> (with --relayed-via)]*
|
|
30
30
|
```
|
|
31
31
|
```bash
|
|
32
|
-
canon
|
|
32
|
+
canon briefs approve add-search --approver alice --note "approved as written" --json
|
|
33
33
|
```
|
|
34
34
|
```text
|
|
35
35
|
# Read the brief against the rules
|
|
36
|
-
usage: canon
|
|
36
|
+
usage: canon briefs check <ID>
|
|
37
37
|
```
|
|
38
38
|
```bash
|
|
39
|
-
canon
|
|
39
|
+
canon briefs check add-login --json
|
|
40
40
|
```
|
|
41
41
|
```text
|
|
42
42
|
# Show where the change stands and the next one to three steps; never edits
|
|
43
|
-
usage: canon
|
|
43
|
+
usage: canon briefs get <ID> [--body]
|
|
44
44
|
```
|
|
45
45
|
```bash
|
|
46
|
-
canon
|
|
46
|
+
canon briefs get add-login --json
|
|
47
47
|
```
|
|
48
48
|
```text
|
|
49
49
|
# Write .canon/changes/<slug>/brief.md, import it, and adopt it into a subject
|
|
50
|
-
usage: canon
|
|
50
|
+
usage: canon changes create --id <ID> --subject <SUBJECT_ID> --title <TEXT> [--change-kind <feature|chore>]
|
|
51
51
|
```
|
|
52
52
|
```bash
|
|
53
|
-
canon
|
|
53
|
+
canon changes create --id add-search --subject demo --title "Add search" --json
|
|
54
54
|
```
|
|
55
55
|
```text
|
|
56
56
|
# Write the shell completion script for canon (bash, zsh or fish)
|
|
@@ -61,31 +61,31 @@ canon completion zsh --json
|
|
|
61
61
|
```
|
|
62
62
|
```text
|
|
63
63
|
# Show what you can author here: record kinds, fields, enums, policies
|
|
64
|
-
usage: canon context
|
|
64
|
+
usage: canon context
|
|
65
65
|
```
|
|
66
66
|
```bash
|
|
67
67
|
canon context --json
|
|
68
68
|
```
|
|
69
69
|
```text
|
|
70
70
|
# List the current divergence burn-down state
|
|
71
|
-
usage: canon
|
|
71
|
+
usage: canon divergences list [--as-of <TIMESTAMP>] [--limit <LIMIT> | --all] [--cursor <CURSOR>]
|
|
72
72
|
```
|
|
73
73
|
```bash
|
|
74
|
-
canon
|
|
74
|
+
canon divergences list --as-of 2030-01-01 --json
|
|
75
75
|
```
|
|
76
76
|
```text
|
|
77
77
|
# Create a fresh .feature file for a new area.surface
|
|
78
|
-
usage: canon
|
|
78
|
+
usage: canon features create --id <ID> --title <TEXT> [--actor <ACTOR_ID>] [--session <SESSION_ID>] [--project <PROJECT_ID>]
|
|
79
79
|
```
|
|
80
80
|
```bash
|
|
81
|
-
canon
|
|
81
|
+
canon features create --id billing.invoice --title Invoices --json
|
|
82
82
|
```
|
|
83
83
|
```text
|
|
84
84
|
# List a change's committed findings at their latest version
|
|
85
|
-
usage: canon
|
|
85
|
+
usage: canon findings list --change <CHANGE_ID> [--open] [--limit <LIMIT> | --all] [--cursor <CURSOR>]
|
|
86
86
|
```
|
|
87
87
|
```bash
|
|
88
|
-
canon
|
|
88
|
+
canon findings list --change add-login --json
|
|
89
89
|
```
|
|
90
90
|
```text
|
|
91
91
|
# Validate a spec/artifact corpus against canon's format
|
|
@@ -103,73 +103,80 @@ canon gate check --json
|
|
|
103
103
|
```
|
|
104
104
|
```text
|
|
105
105
|
# Read stored records
|
|
106
|
-
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 <
|
|
106
|
+
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>]
|
|
107
107
|
```
|
|
108
108
|
```bash
|
|
109
109
|
canon query --kind evidence --json
|
|
110
110
|
```
|
|
111
111
|
```text
|
|
112
112
|
# Fetch role-scoped strategy guidance
|
|
113
|
-
usage: canon retrieve --for-role <ROLE> (--regime <KEY> | --domain <NAME>) [--subject <SUBJECT_ID> (with --domain)] [--
|
|
113
|
+
usage: canon retrieve --for-role <ROLE> (--regime <KEY> | --domain <NAME>) [--subject <SUBJECT_ID> (with --domain)] [--top <N>]
|
|
114
114
|
```
|
|
115
115
|
```bash
|
|
116
|
-
canon retrieve --for-role reviewer --domain dev --
|
|
116
|
+
canon retrieve --for-role reviewer --domain dev --top 20 --json
|
|
117
117
|
```
|
|
118
118
|
```text
|
|
119
119
|
# Append a tagged scenario stub to its .feature file (created if missing); many at once with `--input`
|
|
120
|
-
usage: canon
|
|
120
|
+
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>]
|
|
121
121
|
```
|
|
122
122
|
```bash
|
|
123
|
-
canon
|
|
123
|
+
canon scenarios create --id auth.login.02 --title "Sign out" --feature .canon/specs/kind=feature/area=auth/login.feature --json
|
|
124
124
|
```
|
|
125
125
|
```text
|
|
126
|
-
# Describe
|
|
127
|
-
usage: canon schema [<
|
|
126
|
+
# Describe the tool: its collections, operations, arguments, schemas and errors
|
|
127
|
+
usage: canon schema [<OPERATION>] [--collection <COLLECTION> | --errors | --error <CODE> | --warnings | --warning <CODE> | --search <TASK>] [--schemas (with --operation)]
|
|
128
128
|
```
|
|
129
129
|
```bash
|
|
130
|
-
canon schema
|
|
130
|
+
canon schema --json
|
|
131
131
|
```
|
|
132
132
|
```text
|
|
133
133
|
# Search records, brief sections and scenario text, with each hit's neighbors in the record graph
|
|
134
|
-
usage: canon search <TEXT> [--kind <change|task|scenario|run|handoff|review|divergence|trajectory|strategy_item|evidence|subject|finding|change_state|brief>]* [--expand <N>] [--
|
|
134
|
+
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>]
|
|
135
135
|
```
|
|
136
136
|
```bash
|
|
137
|
-
canon search timeout --kind finding --json
|
|
137
|
+
canon search timeout --node-kind finding --json
|
|
138
138
|
```
|
|
139
139
|
```text
|
|
140
|
-
#
|
|
141
|
-
usage: canon skills
|
|
140
|
+
# Show one guide for agents
|
|
141
|
+
usage: canon skills get <ID> [--full]
|
|
142
142
|
```
|
|
143
143
|
```bash
|
|
144
|
-
canon skills
|
|
144
|
+
canon skills get canon --json
|
|
145
|
+
```
|
|
146
|
+
```text
|
|
147
|
+
# List the guides for agents
|
|
148
|
+
usage: canon skills list [--limit <LIMIT>] [--cursor <CURSOR>] [--all]
|
|
149
|
+
```
|
|
150
|
+
```bash
|
|
151
|
+
canon skills list --json
|
|
145
152
|
```
|
|
146
153
|
```text
|
|
147
154
|
# Show where this repo stands: subjects by status, their gaps, and the next commands
|
|
148
|
-
usage: canon status
|
|
155
|
+
usage: canon status
|
|
149
156
|
```
|
|
150
157
|
```bash
|
|
151
158
|
canon status --json
|
|
152
159
|
```
|
|
153
160
|
```text
|
|
154
161
|
# Link an imported plan change to a subject (adopting it under another subject adds that subject; a change may belong to several)
|
|
155
|
-
usage: canon
|
|
162
|
+
usage: canon subjects adopt <ID> --change <CHANGE_ID> [--dry-run]
|
|
156
163
|
```
|
|
157
164
|
```bash
|
|
158
|
-
canon
|
|
165
|
+
canon subjects adopt demo --change add-login --json
|
|
159
166
|
```
|
|
160
167
|
```text
|
|
161
168
|
# Author a new subject at status `proposed`
|
|
162
|
-
usage: canon
|
|
169
|
+
usage: canon subjects create --id <ID> --domain <NAME> --title <TEXT> [--summary <TEXT>] [--owner-role <ROLE>] [--actor <ACTOR_ID>] [--session <SESSION_ID>]
|
|
163
170
|
```
|
|
164
171
|
```bash
|
|
165
|
-
canon
|
|
172
|
+
canon subjects create --id payments --domain dev --title Payments --json
|
|
166
173
|
```
|
|
167
174
|
```text
|
|
168
175
|
# Take a change back out of a subject (the mirror of adopt; refused for a change whose brief is approved)
|
|
169
|
-
usage: canon
|
|
176
|
+
usage: canon subjects unadopt <ID> --change <CHANGE_ID> [--dry-run]
|
|
170
177
|
```
|
|
171
178
|
```bash
|
|
172
|
-
canon
|
|
179
|
+
canon subjects unadopt demo --change add-login --json
|
|
173
180
|
```
|
|
174
181
|
```text
|
|
175
182
|
# Follow a finding's review loop in time order: review, finding, fix, re-review, evidence
|
|
@@ -180,26 +187,23 @@ canon trace add-login_1_1 --json
|
|
|
180
187
|
```
|
|
181
188
|
<!-- canon:generated commands-planner end -->
|
|
182
189
|
|
|
183
|
-
After the first `status`, follow `meta.next` of each write. Each `meta.next` entry is runnable:
|
|
184
|
-
lists blockers and advisories and exits 1 when it finds blockers; `canon
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
`change new`'s `meta.next`
|
|
189
|
-
send you to write it (`write the brief: canon brief check <slug>
|
|
190
|
+
After the first `status`, follow `meta.next` of each write. 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`. `briefs check`
|
|
191
|
+
lists blockers and advisories and exits 1 when it finds blockers; `canon briefs get <change> --as planner` names the next steps. The change is the operand of
|
|
192
|
+
both (`canon briefs check add-login`); it is required. While the brief has blockers, `status` and
|
|
193
|
+
`changes create`'s `meta.next`
|
|
194
|
+
send you to write it (`write the brief: canon briefs check <slug>
|
|
190
195
|
lists N blockers`); then, while prose advisories remain, to the polish pass
|
|
191
|
-
(`polish the brief in <path> (canon skills
|
|
192
|
-
brief check <slug>`, with the advisory count and the top rule
|
|
196
|
+
(`polish the brief in <path> (canon skills get brief-polish), then run canon briefs check <slug>`, with the advisory count and the top rule
|
|
193
197
|
ids); the human step comes after it. A policy that no longer matches its approval fails closed
|
|
194
198
|
(`POLICY_APPROVAL_STALE`): never edit it; the human re-approves.
|
|
195
199
|
|
|
196
200
|
## Steps
|
|
197
201
|
|
|
198
|
-
1. **Subject and change.** `
|
|
202
|
+
1. **Subject and change.** `subjects create`, then `changes create`. The change
|
|
199
203
|
writes the brief skeleton `.canon/changes/<slug>/brief.md` and no
|
|
200
204
|
`tasks.md` (`tasks.md` is an optional work note nothing gates on). A
|
|
201
205
|
change that also serves another subject is adopted there too
|
|
202
|
-
(`
|
|
206
|
+
(`subjects adopt`): it then belongs to both,
|
|
203
207
|
and its open blockers gate both. Planning the next change for a
|
|
204
208
|
`building`, `verifying` or `shipped` subject warns (stderr and JSON
|
|
205
209
|
`meta.warnings`) until its brief is approved: evidence for its existing scenarios is not
|
|
@@ -207,14 +211,14 @@ ids); the human step comes after it. A policy that no longer matches its approva
|
|
|
207
211
|
scope while no scenario is tagged for the draft and it was never approved
|
|
208
212
|
(a pending draft); once one is, the subject cannot ship before the approval.
|
|
209
213
|
A tagged scenario answers to the changes its `@flow:<change>.<F-id>`
|
|
210
|
-
tags name (`canon
|
|
214
|
+
tags name (`canon scenarios create --flow <F-id>` tags one for this change);
|
|
211
215
|
an untagged one answers to every change with an `Approved:` line.
|
|
212
|
-
To park a draft that should not gate a live subject, `
|
|
216
|
+
To park a draft that should not gate a live subject, `subjects unadopt`
|
|
213
217
|
it and adopt it into a `proposed` subject. Inside an approved scope there is no new
|
|
214
218
|
subject or change: a fix or follow-up stays in the existing change.
|
|
215
|
-
An approved change is not parked that way (`
|
|
219
|
+
An approved change is not parked that way (`subjects unadopt` is refused
|
|
216
220
|
with `APPROVED_BRIEF`): taking an approved change out of the work is the
|
|
217
|
-
human's `
|
|
221
|
+
human's `changes defer` or `changes drop` (below).
|
|
218
222
|
2. **Write the brief.** Briefs outlive the code that exists today and are
|
|
219
223
|
read by sessions that did not write them. Intent says what the product
|
|
220
224
|
does today, in behavior words, and why that is not enough; Desired outcome
|
|
@@ -225,7 +229,7 @@ ids); the human step comes after it. A policy that no longer matches its approva
|
|
|
225
229
|
numbered steps `F1`, `F2`, … (sees → does → becomes), step detail per
|
|
226
230
|
step, acceptance per step with its failure path, questions and
|
|
227
231
|
assumptions, out of scope. Write it in the language of the request, or
|
|
228
|
-
the `language:` of `canon.yaml` when it is set (`
|
|
232
|
+
the `language:` of `canon.yaml` when it is set (`briefs check` detects the
|
|
229
233
|
language of the text and reports whether it used the detected or the
|
|
230
234
|
configured one; a `languageNote` means they disagree: tell the human, and
|
|
231
235
|
ask "which language?" in the questions). Anything that could change
|
|
@@ -234,10 +238,10 @@ ids); the human step comes after it. A policy that no longer matches its approva
|
|
|
234
238
|
prepared (an openspec `proposal.md` read through `plans.sources`) gets a
|
|
235
239
|
`brief.md` whose `Source: <path>` line points at the plan; canon never
|
|
236
240
|
edits the plan.
|
|
237
|
-
3. **Check it.** `
|
|
241
|
+
3. **Check it.** `briefs check` (read-only) lists findings: fix every blocker
|
|
238
242
|
(structure) before you stop. Four optional refinement passes, each
|
|
239
243
|
standing alone and none needing another first; the text of each is
|
|
240
|
-
`canon skills
|
|
244
|
+
`canon skills get <name>`:
|
|
241
245
|
- `brief-shape`: structure (sections, order, leftover template text).
|
|
242
246
|
- `brief-clarify`: open questions.
|
|
243
247
|
- `brief-harden`: flow and step detail agree.
|
|
@@ -250,9 +254,9 @@ ids); the human step comes after it. A policy that no longer matches its approva
|
|
|
250
254
|
- Delete a sentence that restates another section: each fact lives in one place (single source of truth).
|
|
251
255
|
- An assumption goes to Questions and assumptions. A "not doing" list goes to Out of scope.
|
|
252
256
|
|
|
253
|
-
Then, when `
|
|
257
|
+
Then, when `briefs check` reports prose advisories (`prose.*`; `status` and
|
|
254
258
|
`meta.next` name the step), the polish pass is required before the human
|
|
255
|
-
stop: follow `canon skills
|
|
259
|
+
stop: follow `canon skills get brief-polish` and rerun `briefs check` until
|
|
256
260
|
the advisories are gone or each remaining one is waived with a reason.
|
|
257
261
|
It never blocks approval, but you do not hand the human a brief with
|
|
258
262
|
unexamined advisories.
|
|
@@ -262,14 +266,14 @@ ids); the human step comes after it. A policy that no longer matches its approva
|
|
|
262
266
|
until you show the brief. The one answer approves the brief and the policy
|
|
263
267
|
(`.canon/policy.yaml`, written by `canon init`), which is what the gate
|
|
264
268
|
grades the work against.
|
|
265
|
-
- **Show.** `canon
|
|
269
|
+
- **Show.** `canon briefs get <slug> --body` prints the brief file's bytes
|
|
266
270
|
as they are and, as its last line, `digest: sha256:<hex>`, the value
|
|
267
|
-
`
|
|
271
|
+
`briefs approve` records. Send that output to the human's own view; never
|
|
268
272
|
retype or paraphrase the brief into the conversation. In omp, redirect it
|
|
269
|
-
to `out://` (`canon
|
|
273
|
+
to `out://` (`canon briefs get add-login --body > out://add-login`).
|
|
270
274
|
`out://` is off for subagents and non-TUI sessions (the redirect then
|
|
271
275
|
errors) and caps a reply at 64 KiB: there, and in a harness with no such
|
|
272
|
-
channel, leave the tool output visible, which is the same. Read the digest alone with `canon
|
|
276
|
+
channel, leave the tool output visible, which is the same. Read the digest alone with `canon briefs get add-login --body |
|
|
273
277
|
tail -n 1`. Show every brief of one request, each with its digest.
|
|
274
278
|
- **Ask.** Use the harness's question tool: `ask` in omp, `AskUserQuestion`
|
|
275
279
|
in Claude Code; a harness without one, ask in the chat and wait for the
|
|
@@ -279,14 +283,14 @@ ids); the human step comes after it. A policy that no longer matches its approva
|
|
|
279
283
|
- **Count only an explicit approval.** The approve choice, or the human
|
|
280
284
|
saying in the chat that they approve. A question, a condition ("yes, if
|
|
281
285
|
…") or an approval of part of it is a revision request: change the brief,
|
|
282
|
-
`
|
|
286
|
+
`briefs check` until clean, show it again and ask again. No answer means
|
|
283
287
|
nothing is recorded: wait.
|
|
284
288
|
A subagent has no question tool and no human in front of it: the
|
|
285
289
|
orchestrator (the session talking to the human) shows, asks and records.
|
|
286
290
|
They may also approve on `canon dashboard` (the briefs page,
|
|
287
291
|
`/briefs.html`); you never click Approve or fill that form yourself.
|
|
288
|
-
5. **Record the answer you were given.** Run `
|
|
289
|
-
option: `canon
|
|
292
|
+
5. **Record the answer you were given.** Run `briefs approve` with the relay
|
|
293
|
+
option: `canon briefs approve add-login --approver <their name> --note "<their
|
|
290
294
|
answer, as they gave it>" --relayed-via <ask|AskUserQuestion|chat> --actor
|
|
291
295
|
<your actor id> --digest add-login=<the digest you showed>` (several slugs:
|
|
292
296
|
one `--digest <slug>=<digest>` each, one answer for all, nothing written if
|
|
@@ -299,66 +303,66 @@ ids); the human step comes after it. A policy that no longer matches its approva
|
|
|
299
303
|
the gate pass. A digest that differs from the brief now
|
|
300
304
|
(`RELAY_DIGEST_STALE`) means the brief changed after they saw it: show
|
|
301
305
|
it again and ask again; nothing was written. Without `--relayed-via` the call is
|
|
302
|
-
`ACTOR_DENIED`; with it and no role declared, `
|
|
306
|
+
`ACTOR_DENIED`; with it and no role declared, `INPUT_INVALID` (`MISSING_ARGUMENT`). When `canon.yaml`
|
|
303
307
|
turns relaying off (`approval: { relay: deny }`), the refusal names that key:
|
|
304
|
-
report the human's call (`canon
|
|
308
|
+
report the human's call (`canon briefs approve add-login --approver <their
|
|
305
309
|
name> --note "<their own words>"`) and wait for them to run it. Never
|
|
306
310
|
remove or unset your role (`env -u CANON_ROLE`, dropping `--as`) to run it.
|
|
307
|
-
`canon policy approve`, `canon
|
|
311
|
+
`canon policy approve`, `canon divergences accept` and `canon migrate
|
|
308
312
|
--commit --plan-digest <d>` follow the same procedure, each taking
|
|
309
313
|
`--approver <their name> --note "<their answer>" --relayed-via <tool>` (and
|
|
310
|
-
`--actor <your actor id>`, which `
|
|
314
|
+
`--actor <your actor id>`, which `divergences accept` already requires): show what is approved (the policy file, the divergent
|
|
311
315
|
evidence with its reason and tracking reference, the migrate plan), ask,
|
|
312
316
|
count only an explicit approval, then record with the relay option.
|
|
313
|
-
`canon
|
|
317
|
+
`canon briefs get <slug>` then reports `state: approved`. A brief edited
|
|
314
318
|
after its approval is not approved (`BRIEF_APPROVAL_STALE`): it
|
|
315
|
-
needs a new answer, shown and asked again, and a new `
|
|
319
|
+
needs a new answer, shown and asked again, and a new `briefs approve`. A follow-up that
|
|
316
320
|
adds or changes a step of the brief is a scope change and needs a new
|
|
317
321
|
answer.
|
|
318
322
|
|
|
319
|
-
When the owner delegated the approval (`delegation:` in the approved policy; `canon status` and `canon
|
|
320
|
-
brief does not wait for a human: an independent reviewer records a plan review (`canon
|
|
321
|
-
`blocker` you fix the brief, run `canon
|
|
323
|
+
When the owner delegated the approval (`delegation:` in the approved policy; `canon status` and `canon briefs get` say so), a clean
|
|
324
|
+
brief does not wait for a human: an independent reviewer records a plan review (`canon reviews brief`), and on `revise` or an open
|
|
325
|
+
`blocker` you fix the brief, run `canon briefs check`, close the findings (`canon findings close <slug>_<n>_<k>
|
|
322
326
|
--disposition fixed`, or `rejected --reason "<why>"` for a finding you do not accept), and a new independent reviewer records the
|
|
323
327
|
next round. The earlier round no longer counts once the brief changes. After round 3 with P0 or P1 findings still open, stop and
|
|
324
|
-
report to the owner. The orchestrator then approves with `canon
|
|
328
|
+
report to the owner. The orchestrator then approves with `canon briefs approve <slug> --as orchestrator --actor <id> --delegated`.
|
|
325
329
|
|
|
326
330
|
When no human can answer one of the brief's questions, write the question
|
|
327
331
|
into Questions and assumptions, state the assumption you will build on, and
|
|
328
332
|
say so in your report. That applies to the brief's questions, never to the
|
|
329
333
|
approval.
|
|
330
334
|
|
|
331
|
-
**Done when:** `canon
|
|
332
|
-
prose advisories are gone or waived with a reason) and `canon
|
|
335
|
+
**Done when:** `canon briefs check add-login` exits 0 (no blockers, and the
|
|
336
|
+
prose advisories are gone or waived with a reason) and `canon briefs get
|
|
333
337
|
add-login` reports `state: ready`: show it to the human and ask (step 4). The scope is approved
|
|
334
338
|
when you have recorded their explicit approval (step 5) and the same command
|
|
335
|
-
reports `state: approved`; read it in `data.state` of `canon
|
|
339
|
+
reports `state: approved`; read it in `data.state` of `canon briefs get
|
|
336
340
|
add-login --json`. Nothing else starts before that.
|
|
337
341
|
|
|
338
342
|
## Closing a change is the human's call
|
|
339
343
|
|
|
340
|
-
`
|
|
344
|
+
`changes drop`, `changes defer` and `changes reopen` are human-only like `brief
|
|
341
345
|
approve`: six leaves name no agent role, and each refuses every agent role
|
|
342
346
|
(`ACTOR_DENIED`) unless it records the answer the human gave you. When the human
|
|
343
347
|
says a change is not wanted, or not in this release, you do not stop it by
|
|
344
|
-
editing files or by `
|
|
348
|
+
editing files or by `subjects unadopt`; you ask, then record their answer.
|
|
345
349
|
|
|
346
350
|
1. **Ask** with the harness question tool (`ask` in omp, `AskUserQuestion` in
|
|
347
351
|
Claude Code, otherwise in the chat): defer it (not this release), drop it
|
|
348
352
|
(the end of it) or keep it. Count only an explicit answer; no answer closes
|
|
349
353
|
nothing.
|
|
350
|
-
2. **Record it:** `canon
|
|
351
|
-
`canon
|
|
354
|
+
2. **Record it:** `canon changes defer <slug> --reason "<their words>" --ref <link or date> --approver <their name> --relayed-via <the question tool> --actor <your actor id>`.
|
|
355
|
+
`canon changes drop <slug>` takes the same options. `--ref` names where the
|
|
352
356
|
decision lives (an issue link or a date) and may repeat. Never remove or
|
|
353
357
|
unset your role to run it.
|
|
354
358
|
|
|
355
|
-
- **Defer** is for "not this release": `canon
|
|
359
|
+
- **Defer** is for "not this release": `canon changes reopen <slug>` with the
|
|
356
360
|
human's answer brings it back, and the reopened change needs a new
|
|
357
|
-
`
|
|
361
|
+
`briefs approve` (the earlier approval line no longer counts).
|
|
358
362
|
- **Drop** is the end: a dropped change is never reopened (`CHANGE_CONFLICT`,
|
|
359
363
|
reason `DROPPED`); a new change is a new scope.
|
|
360
364
|
- A shipped change cannot be closed (`CHANGE_CONFLICT`, reason `SHIPPED`), and
|
|
361
|
-
`
|
|
365
|
+
`briefs approve` or `scenarios create --flow <F-id> --change <slug>` on a closed
|
|
362
366
|
change is refused (reason `CLOSED`).
|
|
363
367
|
- Evidence, reviews and findings stay as they are; the warning
|
|
364
368
|
`CHANGE_RECORDS_KEPT` lists what the closed change keeps.
|
|
@@ -372,15 +376,15 @@ reads its state (`--history` adds the records before a reopen).
|
|
|
372
376
|
## Non-behavior work is a chore
|
|
373
377
|
|
|
374
378
|
A refactor, dependency, build, CI or infra change that alters nothing a user
|
|
375
|
-
can observe: `
|
|
379
|
+
can observe: `changes create --change-kind chore`. Its brief is short (intent,
|
|
376
380
|
category, invariants, checks, out of scope) and approved like any brief, one
|
|
377
381
|
human answer. A chore adds no scenarios: the
|
|
378
382
|
implementer runs the subject's suite again where the code changed and binds
|
|
379
|
-
it with `canon evidence add
|
|
383
|
+
it with `canon evidence add-all` (a docs-only chore changes no
|
|
380
384
|
code and needs no new evidence), then the reviewer records one
|
|
381
|
-
change-level review of the chore (`canon
|
|
382
|
-
shipped subject `
|
|
383
|
-
(`
|
|
385
|
+
change-level review of the chore (`canon reviews change <slug>`). On a
|
|
386
|
+
shipped subject `changes create` prints the reopen command for the orchestrator
|
|
387
|
+
(`subjects move <id> --to verifying --reason "<why>"`); the subject cannot
|
|
384
388
|
ship again until the chore's change-level review exists and every scenario
|
|
385
389
|
whose code changed is evidenced after the chore's approval. Work that
|
|
386
390
|
changes behavior is never a chore: it is a feature change.
|
|
@@ -403,7 +407,7 @@ old column, delete the old format) in its own later change.
|
|
|
403
407
|
|---|---|
|
|
404
408
|
| "The human is unavailable; I will assume the approval." | Never. Show the brief and ask; without an explicit answer nothing is recorded and nothing is built. Put open questions into Questions and assumptions. |
|
|
405
409
|
| "This could change policy, but I will decide it." | Anything that could change policy goes to the questions. |
|
|
406
|
-
| "A small follow-up needs no new answer." | A follow-up that adds or changes a flow step is a scope change and needs a new answer and a new `
|
|
410
|
+
| "A small follow-up needs no new answer." | A follow-up that adds or changes a flow step is a scope change and needs a new answer and a new `briefs approve`. |
|
|
407
411
|
| "This migration is just a chore." | Data, interface or output changes are feature changes. |
|
|
408
412
|
| "Put the file and line in the brief so nobody has to look." | Paths rot; describe behavior. |
|
|
409
413
|
|