@journeykit/canon 0.48.0 → 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.
Files changed (144) hide show
  1. package/dist/skills/SKILL.src.md +142 -130
  2. package/dist/skills/reference/brief-align.md +8 -8
  3. package/dist/skills/reference/brief-clarify.md +6 -6
  4. package/dist/skills/reference/brief-harden.md +5 -5
  5. package/dist/skills/reference/brief-polish.md +13 -13
  6. package/dist/skills/reference/brief-shape.md +9 -9
  7. package/dist/skills/reference/canon-artifact-ingest.md +7 -7
  8. package/dist/skills/reference/canon-authoring.md +11 -11
  9. package/dist/skills/reference/canon-context.md +13 -13
  10. package/dist/skills/reference/canon-fmt.md +1 -1
  11. package/dist/skills/reference/canon-gate.md +52 -53
  12. package/dist/skills/reference/canon-inventory.md +10 -11
  13. package/dist/skills/reference/canon-learn.md +13 -14
  14. package/dist/skills/reference/canon-plan-import.md +15 -15
  15. package/dist/skills/reference/canon-plugins.md +8 -8
  16. package/dist/skills/reference/canon-policy.md +11 -11
  17. package/dist/skills/reference/canon-report-dashboard.md +6 -7
  18. package/dist/skills/reference/canon-retrieve.md +6 -6
  19. package/dist/skills/reference/canon-review.md +52 -53
  20. package/dist/skills/reference/canon-storage.md +16 -19
  21. package/dist/skills/reference/canon-subject.md +120 -127
  22. package/dist/skills/reference/role-implementer.md +90 -76
  23. package/dist/skills/reference/role-orchestrator.md +196 -172
  24. package/dist/skills/reference/role-planner.md +101 -97
  25. package/dist/skills/reference/role-reviewer.md +91 -85
  26. package/dist/skills/scripts/canon-retrieve-pre-dispatch.sh +5 -5
  27. package/man/canon-adapter-authorize.1 +11 -8
  28. package/man/canon-adapter-validate.1 +15 -8
  29. package/man/canon-artifacts-prune.1 +11 -11
  30. package/man/canon-artifacts-store.1 +8 -8
  31. package/man/canon-artifacts-verify.1 +7 -7
  32. package/man/canon-artifacts.1 +10 -4
  33. package/man/{canon-brief-approve.1 → canon-briefs-approve.1} +20 -17
  34. package/man/{canon-brief-check.1 → canon-briefs-check.1} +9 -6
  35. package/man/{canon-brief-show.1 → canon-briefs-get.1} +14 -11
  36. package/man/canon-briefs.1 +59 -0
  37. package/man/{canon-change-new.1 → canon-changes-create.1} +14 -14
  38. package/man/{canon-change-defer.1 → canon-changes-defer.1} +19 -16
  39. package/man/{canon-change-drop.1 → canon-changes-drop.1} +19 -16
  40. package/man/{canon-change-reopen.1 → canon-changes-reopen.1} +20 -17
  41. package/man/canon-changes.1 +65 -0
  42. package/man/canon-completion.1 +8 -5
  43. package/man/{canon-context-pack-add.1 → canon-context-packs-create.1} +9 -9
  44. package/man/{canon-context-pack-show.1 → canon-context-packs-get.1} +10 -7
  45. package/man/{canon-context-pack-verify.1 → canon-context-packs-verify.1} +10 -7
  46. package/man/canon-context-packs.1 +56 -0
  47. package/man/canon-context.1 +9 -6
  48. package/man/canon-dashboard.1 +10 -10
  49. package/man/canon-demo-init.1 +12 -7
  50. package/man/canon-demo-review.1 +7 -7
  51. package/man/{canon-divergence-accept.1 → canon-divergences-accept.1} +12 -12
  52. package/man/{canon-divergence-add.1 → canon-divergences-add.1} +12 -12
  53. package/man/{canon-divergence-defer.1 → canon-divergences-defer.1} +12 -12
  54. package/man/{canon-divergence-list.1 → canon-divergences-list.1} +10 -7
  55. package/man/{canon-divergence-resolve.1 → canon-divergences-resolve.1} +12 -12
  56. package/man/{canon-divergence.1 → canon-divergences.1} +16 -10
  57. package/man/canon-evidence-add-all.1 +117 -0
  58. package/man/canon-evidence-add.1 +16 -22
  59. package/man/canon-evidence-approval-payload.1 +10 -7
  60. package/man/canon-evidence-audit.1 +11 -11
  61. package/man/canon-evidence.1 +15 -5
  62. package/man/canon-export.1 +11 -11
  63. package/man/{canon-feature-new.1 → canon-features-create.1} +14 -14
  64. package/man/{canon-feature.1 → canon-features.1} +12 -6
  65. package/man/{canon-finding-close.1 → canon-findings-close.1} +17 -23
  66. package/man/{canon-finding-add.1 → canon-findings-create.1} +13 -13
  67. package/man/{canon-finding-list.1 → canon-findings-list.1} +11 -8
  68. package/man/{canon-finding.1 → canon-findings.1} +18 -20
  69. package/man/canon-format.1 +7 -4
  70. package/man/canon-gate-check.1 +9 -6
  71. package/man/canon-gate-install-hooks.1 +12 -12
  72. package/man/canon-gate-promote.1 +8 -8
  73. package/man/canon-gate.1 +11 -5
  74. package/man/canon-ingest-plans.1 +10 -10
  75. package/man/canon-ingest-records.1 +13 -13
  76. package/man/canon-init-check.1 +48 -0
  77. package/man/canon-init.1 +10 -13
  78. package/man/canon-inventory-sync.1 +8 -8
  79. package/man/canon-inventory.1 +10 -4
  80. package/man/canon-ledger-compact.1 +10 -10
  81. package/man/canon-ledger.1 +10 -4
  82. package/man/canon-migrate-revert.1 +58 -0
  83. package/man/canon-migrate.1 +19 -22
  84. package/man/{canon-plugin-sync.1 → canon-plugins-sync.1} +10 -10
  85. package/man/{canon-plugin.1 → canon-plugins.1} +12 -6
  86. package/man/canon-policy-approve.1 +13 -10
  87. package/man/{canon-policy-show.1 → canon-policy-get.1} +8 -5
  88. package/man/canon-policy.1 +13 -7
  89. package/man/{canon-prompt-add.1 → canon-prompts-create.1} +14 -14
  90. package/man/{canon-prompt-show.1 → canon-prompts-get.1} +10 -7
  91. package/man/canon-prompts.1 +49 -0
  92. package/man/canon-purge.1 +12 -16
  93. package/man/canon-query.1 +11 -8
  94. package/man/canon-regime-show.1 +10 -7
  95. package/man/canon-report-build.1 +4 -4
  96. package/man/canon-report-check.1 +7 -4
  97. package/man/canon-report-snapshot.1 +6 -6
  98. package/man/canon-report.1 +10 -4
  99. package/man/canon-retrieve.1 +11 -8
  100. package/man/{canon-review-brief.1 → canon-reviews-brief.1} +14 -14
  101. package/man/{canon-review-change.1 → canon-reviews-change.1} +13 -13
  102. package/man/{canon-review-scenario.1 → canon-reviews-scenario.1} +12 -12
  103. package/man/{canon-review.1 → canon-reviews.1} +16 -10
  104. package/man/{canon-dispatch-begin.1 → canon-runs-create.1} +11 -11
  105. package/man/{canon-task-done.1 → canon-runs-diff.1} +7 -10
  106. package/man/{canon-dispatch-end.1 → canon-runs-end.1} +11 -11
  107. package/man/{canon-dispatch.1 → canon-runs.1} +15 -9
  108. package/man/{canon-scenario-new.1 → canon-scenarios-create.1} +14 -14
  109. package/man/{canon-scenario.1 → canon-scenarios.1} +12 -6
  110. package/man/canon-schema.1 +22 -34
  111. package/man/canon-search.1 +15 -12
  112. package/man/canon-selftest.1 +7 -4
  113. package/man/canon-skills-check.1 +10 -7
  114. package/man/canon-skills-doctor.1 +10 -7
  115. package/man/canon-skills-get.1 +47 -0
  116. package/man/canon-skills-install.1 +10 -10
  117. package/man/canon-skills-list.1 +53 -0
  118. package/man/canon-skills.1 +16 -16
  119. package/man/canon-status.1 +10 -7
  120. package/man/{canon-strategy-approval-payload.1 → canon-strategies-approval-payload.1} +13 -10
  121. package/man/{canon-strategy-promote.1 → canon-strategies-promote.1} +12 -12
  122. package/man/{canon-strategy-rollback.1 → canon-strategies-rollback.1} +12 -12
  123. package/man/{canon-strategy.1 → canon-strategies.1} +14 -8
  124. package/man/{canon-subject-adopt.1 → canon-subjects-adopt.1} +10 -10
  125. package/man/{canon-subject-new.1 → canon-subjects-create.1} +14 -14
  126. package/man/{canon-subject-show.1 → canon-subjects-get.1} +9 -6
  127. package/man/{canon-subject-move.1 → canon-subjects-move.1} +12 -12
  128. package/man/{canon-subject-unadopt.1 → canon-subjects-unadopt.1} +12 -12
  129. package/man/{canon-subject.1 → canon-subjects.1} +16 -10
  130. package/man/canon-tasks-done.1 +50 -0
  131. package/man/{canon-task.1 → canon-tasks.1} +13 -7
  132. package/man/canon-trace.1 +8 -5
  133. package/man/canon.1 +66 -36
  134. package/package.json +5 -5
  135. package/man/canon-adapter.1 +0 -46
  136. package/man/canon-brief.1 +0 -64
  137. package/man/canon-change.1 +0 -59
  138. package/man/canon-context-pack.1 +0 -50
  139. package/man/canon-demo.1 +0 -47
  140. package/man/canon-dispatch-diff.1 +0 -41
  141. package/man/canon-ingest.1 +0 -46
  142. package/man/canon-prompt.1 +0 -43
  143. package/man/canon-regime.1 +0 -39
  144. package/man/canon-skills-show.1 +0 -102
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: canon
3
- description: Use for every build, implement, add-a-feature, change-a-feature or fix request in a repo that has canon.yaml, including sites, apps and games; prefer it there over generic site, app or game builder skills. Runs canon's working loop (brief, subject, scenarios with failure paths, units, implement, evidence, independent review, status transition) split by role (planner, implementer, reviewer, orchestrator). The full guide is `canon skills show canon`.
3
+ description: Use for every build, implement, add-a-feature, change-a-feature or fix request in a repo that has canon.yaml, including sites, apps and games; prefer it there over generic site, app or game builder skills. Runs canon's working loop (brief, subject, scenarios with failure paths, units, implement, evidence, independent review, status transition) split by role (planner, implementer, reviewer, orchestrator). The full guide is `canon skills get canon`.
4
4
  ---
5
5
 
6
6
  # Canon
@@ -9,13 +9,16 @@ Features in this repo are managed with canon. This is the shared core guide:
9
9
  the loop, how to drive the CLI, and how to find your role. The guide is built
10
10
  into the `canon` binary, so it always matches the version you run:
11
11
 
12
- - `canon skills show canon` prints this guide.
13
- - `canon skills show <name>` prints one topic or role guide (the table at the
14
- end lists every name); `canon skills show canon --full` prints this guide
12
+ - `canon skills get canon` prints this guide.
13
+ - `canon skills get <name>` prints one topic or role guide (the table at the
14
+ end lists every name); `canon skills get canon --full` prints this guide
15
15
  followed by every topic.
16
- - Your role guide's **Commands** block lists every option of every leaf the
17
- role uses. Ask `canon schema <command>` (or `--help`) only for a leaf it does
18
- not list, or after a `USAGE` refusal. Never guess an option name.
16
+ - Your role guide's **Commands** block lists every argument of every operation
17
+ the role uses. Ask `canon schema <operation>` (or `--help`) only for an
18
+ operation it does not list, or after an `INPUT_INVALID` refusal. Never guess an
19
+ argument name.
20
+ - `canon skills list` lists the guides (`id`, `description`; paged, `--limit`,
21
+ `--cursor`, `--all`, `--fields`); `canon skills get <ID>` prints one.
19
22
 
20
23
  The `SKILL.md` your harness loaded is only a stub that sends you here.
21
24
 
@@ -26,14 +29,14 @@ a feature, a one-line request included. A human is needed once per scope:
26
29
 
27
30
  - **The approval** (step 1). For a new subject or a scope change, the
28
31
  human must approve the brief. Write the brief,
29
- run `canon brief check` until it reports no blockers, then show it, ask and
32
+ run `canon briefs check` until it reports no blockers, then show it, ask and
30
33
  record the answer: build nothing for that scope (no
31
34
  scenarios, code or evidence) before the human answers. The approval is
32
35
  the one thing you never assume, even when the human said they cannot
33
36
  answer until you show it. The one answer
34
37
  approves the brief and the policy, `.canon/policy.yaml`, which is what
35
38
  the gate grades the work against. The human may also approve it on the `canon dashboard` briefs page; you never use that form.
36
- 1. **Show** with `canon brief show <slug> --body`: the brief file's bytes and,
39
+ 1. **Show** with `canon briefs get <slug> --body`: the brief file's bytes and,
37
40
  last, `digest: sha256:<hex>`. Send it to the human's own view without
38
41
  retyping it (omp: redirect it to `out://`, which is off for subagents and
39
42
  non-TUI sessions and caps at 64 KiB; there, and in a harness with no such
@@ -46,7 +49,7 @@ a feature, a one-line request included. A human is needed once per scope:
46
49
  revision request (change the brief, check, show and ask again); no answer
47
50
  records nothing.
48
51
  4. **Record it** with the relay option:
49
- `canon brief approve <slug> <slug> --approver <their name> --note "<their words>" --relayed-via <ask|AskUserQuestion|chat> --actor <your actor id> --digest <slug>=<digest shown>`
52
+ `canon briefs approve <slug> <slug> --approver <their name> --note "<their words>" --relayed-via <ask|AskUserQuestion|chat> --actor <your actor id> --digest <slug>=<digest shown>`
50
53
  (one or more slugs, each with its own `--digest`, one answer for all, nothing written if any is refused).
51
54
  The `Approved:` line then carries `(relayed by <role> <actor> via <tool>)`.
52
55
  A digest that no longer matches the brief is `RELAY_DIGEST_STALE`: show
@@ -56,15 +59,15 @@ a feature, a one-line request included. A human is needed once per scope:
56
59
  (`env -u CANON_ROLE`, dropping `--as`) to run it yourself.
57
60
  5. **Delegated approval.** When the owner is away or busy and `.canon/policy.yaml`
58
61
  has a `delegation:` entry for your role (the policy approved by the human),
59
- `canon status` and `canon brief show <slug>` name the steps and no human's
62
+ `canon status` and `canon briefs get <slug>` name the steps and no human's
60
63
  answer is needed: an independent reviewer in a separate session records
61
- `canon review brief <slug> --actor <reviewer id> --round <n> --verdict approve|revise --digest <slug>=<digest shown>`
62
- and each finding with `canon finding add --change <slug> --review <review id> --severity blocker|should-fix|note`
64
+ `canon reviews brief <slug> --actor <reviewer id> --round <n> --verdict approve|revise --digest <slug>=<digest shown>`
65
+ and each finding with `canon findings create --change <slug> --review <review id> --severity blocker|should-fix|note`
63
66
  (P0 and P1 are `blocker`, P2 `should-fix`, P3 `note`). A `revise` or an open
64
67
  `blocker` sends the brief back to the planner, who fixes it, closes the findings and has a new
65
68
  reviewer record the next round; after round 3 with P0 or P1 still open, stop and report to the owner.
66
69
  When the latest review of the brief as it is now is an `approve` by another actor with no open `blocker`, the orchestrator
67
- records it with `canon brief approve <slug> --as orchestrator --actor <your actor id> --delegated`
70
+ records it with `canon briefs approve <slug> --as orchestrator --actor <your actor id> --delegated`
68
71
  (`DELEGATION_REQUIRED` names the condition that is not met, and nothing is written). The `Approved:` line
69
72
  then carries `(delegated to <role> <actor> under policy <digest> after review <id>)`. A delegation gives
70
73
  no other authority: `canon policy approve` stays the human's.
@@ -77,10 +80,10 @@ a feature, a one-line request included. A human is needed once per scope:
77
80
  - **Approval is scoped.** Evidence for a scenario tagged `@flow:<change>.<F-id>`
78
81
  needs the approval of the changes its tags name only, so a new unapproved
79
82
  change on a live subject waits on its own scenarios; an untagged scenario
80
- answers to every change with an `Approved:` line (an edited one refuses); `change new` and
81
- `subject adopt` warn when the subject is live. `canon subject unadopt <subject-id> --change <change>`
83
+ answers to every change with an `Approved:` line (an edited one refuses); `changes create` and
84
+ `subjects adopt` warn when the subject is live. `canon subjects unadopt <subject-id> --change <change>`
82
85
  takes a draft change back off (refused once approved: the human's
83
- `change defer` or `change drop` takes an approved one out). The subject
86
+ `changes defer` or `changes drop` takes an approved one out). The subject
84
87
  answers for every adopted change that is tagged (a scenario of the subject
85
88
  is tagged `@flow:<change>.*`), has an `Approved:` line, or is a chore:
86
89
  reopen and ship pass only when all of them are approved now, whatever the
@@ -88,33 +91,33 @@ a feature, a one-line request included. A human is needed once per scope:
88
91
  per such change in `briefs`. A pending draft (never approved, not a chore,
89
92
  tagged by no scenario) blocks nothing and the transition prints one line
90
93
  naming every draft; a draft a scenario is tagged for blocks until it is
91
- approved. `canon skills show canon-subject`
94
+ approved. `canon skills get canon-subject`
92
95
  - **Inside an approved scope, never stop for a human.** Fixes, follow-ups,
93
96
  review rounds and re-reviews stay in the approved change (never
94
- `canon change new`: a new change is a new scope) and go straight on: scenario,
97
+ `canon changes create`: a new change is a new scope) and go straight on: scenario,
95
98
  implement, evidence, independent review. A follow-up that adds or changes
96
99
  a step of the brief edits the brief: that is a scope change and needs a
97
100
  new answer. A follow-up on a shipped subject reopens it
98
- (`canon subject move <id> --to verifying --reason "<why>"`); a fix
101
+ (`canon subjects move <id> --to verifying --reason "<why>"`); a fix
99
102
  closed `fixed`, and an approved chore, then need evidence again for every
100
103
  scenario whose code changed (see "Evidence follows the code" below) before
101
104
  it ships, and a chore also needs one change-level review
102
- (`canon review change <slug>`).
105
+ (`canon reviews change <slug>`).
103
106
  - When no human can answer one of the brief's questions, write your
104
107
  assumption into the brief's Questions and assumptions, build on it, and say
105
108
  so in your report. That covers the brief's questions and work inside an
106
109
  approved scope, never the approval itself.
107
110
 
108
- 1. **Brief.** The planner writes the PRD brief (`.canon/changes/<slug>/brief.md`), checks it with `canon brief check`, shows it to the human, asks, and records their explicit approval. `canon skills show role-planner`
109
- 2. **Subject.** `canon subject new`, then `canon change new` (`--change-kind chore` for work that alters no behavior); the change writes the brief skeleton. `canon skills show role-planner`
110
- 3. **Scenarios.** `canon scenario new --flow <F-id> --case <case>` per behavior of a flow step, failure paths (`--case failure`) included; many at once with `--input` (below). `canon skills show role-implementer`
111
+ 1. **Brief.** The planner writes the PRD brief (`.canon/changes/<slug>/brief.md`), checks it with `canon briefs check`, shows it to the human, asks, and records their explicit approval. `canon skills get role-planner`
112
+ 2. **Subject.** `canon subjects create`, then `canon changes create` (`--change-kind chore` for work that alters no behavior); the change writes the brief skeleton. `canon skills get role-planner`
113
+ 3. **Scenarios.** `canon scenarios create --flow <F-id> --case <case>` per behavior of a flow step, failure paths (`--case failure`) included; many at once with `--input` (below). `canon skills get role-implementer`
111
114
  4. **Units.** Split the work; one unit is one flow step's slice with a named verify command, and each unit has its own actor id and session id, passed on everything it records. A unit never attests another unit's work.
112
- 5. **Implement.** Code with tests named by scenario id (`game.run.01: …`). `canon skills show role-implementer`
113
- 6. **Evidence.** `canon evidence add` binds the test run to its scenarios; one `--input` array records many at once. `canon skills show role-implementer`
114
- 7. **Independent review.** A different session, a separate process with its own session id, that can run the checks it signs off, records `canon finding add` and `canon review scenario`. Every change. `canon skills show role-reviewer`
115
- 8. **Transition.** `canon subject move <id> --to <state>` along `proposed → specced → building → verifying → shipped`, with `canon gate check` clean; fix a refused guard rather than overriding it. `canon skills show role-orchestrator`
115
+ 5. **Implement.** Code with tests named by scenario id (`game.run.01: …`). `canon skills get role-implementer`
116
+ 6. **Evidence.** `canon evidence add` binds the test run to its scenarios; one `--input` array records many at once. `canon skills get role-implementer`
117
+ 7. **Independent review.** A different session, a separate process with its own session id, that can run the checks it signs off, records `canon findings create` and `canon reviews scenario`. Every change. `canon skills get role-reviewer`
118
+ 8. **Transition.** `canon subjects move <id> --to <state>` along `proposed → specced → building → verifying → shipped`, with `canon gate check` clean; fix a refused guard rather than overriding it. `canon skills get role-orchestrator`
116
119
 
117
- **Done when:** `canon gate check` exits 0 with no violations, `canon subject show <id>` reports status `shipped`, and `canon status` names no next step for the subject (a human step left in `meta.next` is the one thing you report instead of doing).
120
+ **Done when:** `canon gate check` exits 0 with no violations, `canon subjects get <id>` reports status `shipped`, and `canon status` names no next step for the subject (a human step left in `meta.next` is the one thing you report instead of doing).
118
121
 
119
122
  Every write command says whether the record is final (`written directly`,
120
123
  or `staged and promoted in this run`) or staged; only a staged record
@@ -124,7 +127,7 @@ needs `canon gate promote`, and only `write.promote: manual` leaves one.
124
127
 
125
128
  Records that are about code take `--rev <REV>`: any git revision (`HEAD~1`,
126
129
  a branch, a tag, a short sha), default `HEAD`, so you never copy a sha out of
127
- git. `finding add` also takes `--resolution-rev` (default HEAD when the
130
+ git. `findings create` also takes `--resolution-rev` (default HEAD when the
128
131
  finding is `fixed`) and `--introduced-rev` (no default: say where the defect
129
132
  came from). Evidence, a review or a finding of uncommitted work is allowed,
130
133
  never refused: the record carries `codeTree` (the git tree id of the code the
@@ -149,7 +152,7 @@ current tree) asks for no evidence at all, whatever tree the evidence is on, and
149
152
  When code did change,
150
153
  `canon status`, `meta.next` and the refusal hint lead with one batch over
151
154
  every report, for example
152
- `canon evidence add --all-scenarios --report junit:a.xml --report junit:b.xml --role implementer`
155
+ `canon evidence add-all --report junit:a.xml --report junit:b.xml --role implementer`
153
156
  (with the real report paths, and `--project <id>` when the repo has several
154
157
  spec roots), never a loop per scenario. With a `--report`, `--class` defaults
155
158
  to `test-run` and `--ref` to the report paths, and the bound cases decide the
@@ -170,9 +173,9 @@ evidence it saw are unchanged and the code tree is the one it saw.
170
173
 
171
174
  Evidence attachment bytes live in `.canon/artifacts/sha256/`, git-tracked. With
172
175
  `storage: { attachments: lfs }` in `canon.yaml` git LFS stores them, and
173
- `evidence add`, `review scenario --artifact` and `artifacts store` write bytes
176
+ `evidence add`, `reviews scenario --artifact` and `artifacts store` write bytes
174
177
  only when git-lfs is installed (`ARTIFACTS_STORE_REQUIRED` otherwise). The gate
175
- and `canon artifacts verify` (`--full` re-hashes every blob) read that
178
+ and `canon artifacts verify` (which re-hashes every blob) read that
176
179
  directory. `canon artifacts prune` is the repo owner's decision, not a step
177
180
  of the loop. It deletes the blobs no record binds any more (the store only
178
181
  grows: a report written anew on every run adds a
@@ -191,14 +194,14 @@ that git already tracks must be taken out of the commit.
191
194
 
192
195
  ### Search and trace
193
196
 
194
- `canon search "<text>"` finds a record, a brief section or flow step, or a
197
+ `canon search <text>` finds a record, a brief section or flow step, or a
195
198
  scenario's text (title, steps, tables, `Examples`, the Background and Rule it
196
199
  inherits) and lists each hit with its neighbors in the record graph: the
197
200
  records it names or that name it, the review loop around a finding, the brief
198
201
  step a scenario covers. A reference no committed source holds is a neighbor
199
- marked `placeholder`, never an error. `--kind` (repeatable) keeps hits of those
200
- kinds, `--expand <N>` sets the hops (default 1), `--limit <N>` the hits (default
201
- 20). Korean is found from three characters; a shorter text is found as a part of
202
+ marked `placeholder`, never an error. `--node-kind` (repeatable) keeps hits of those
203
+ kinds, `--expand <N>` sets the hops (default 1), `--top <N>` the hits (default
204
+ 20; there is no next page). Korean is found from three characters; a shorter text is found as a part of
202
205
  a node's text, in id order. The text is read as typed: quotes and `AND` are not
203
206
  syntax. `canon trace <finding key|review id|sha>` follows the review, finding,
204
207
  fix, re-review and evidence chain of a loop in time order, the archive's
@@ -214,7 +217,7 @@ canon cannot detect a role; you declare it. Pass `--as <role>` or set
214
217
  variable, and an unknown value is refused (`ROLE_INVALID`).
215
218
 
216
219
  - **A role is set, or you were spawned as one:** load only
217
- `canon skills show role-<role>` and do that role's steps. `canon status`
220
+ `canon skills get role-<role>` and do that role's steps. `canon status`
218
221
  and `meta.next` then show only your role's steps, and count the others in
219
222
  `data.waitingOn`; `canon schema --as <role>` lists only your role's commands.
220
223
  Do not load another role's guide.
@@ -224,76 +227,75 @@ variable, and an unknown value is refused (`ROLE_INVALID`).
224
227
  for 8.
225
228
 
226
229
  A role is guidance, not enforcement: `--role` on `evidence add` and
227
- `review scenario` defaults to it. `CANON_ROLE` never filters or fails
228
- `canon schema`, `canon context` or `canon skills show`; only `--as` filters.
230
+ `reviews scenario` defaults to it. `CANON_ROLE` never filters or fails
231
+ `canon schema`, `canon context` or `canon skills get`; only `--as` filters.
229
232
 
230
233
  ## Driving the CLI
231
234
 
232
235
  - Start a session with `canon status`: where each subject stands and the next
233
- commands. After that, do not call it only to learn the next step: every
234
- write returns `meta.next` (`[{command, argv, reason, x-canon: {actor, role}}]`), the same
236
+ steps. After that, do not call it only to learn the next step: every
237
+ write returns `meta.next` (`[{operation, arguments, reason, x-canon: {actor, role}}]`), the same
235
238
  steps `status` would give, narrowed to what the write touched. Each entry is
236
- runnable: `argv` is the command without `canon` (with `--json` when you
237
- called in JSON mode). Guidance that needs a value you must fill in is not a
239
+ runnable: `operation` is the operation id (`findings.close`, `status`) and `arguments` the argument
240
+ names (camelCase, the `--input` document's keys) with their values; the call is
241
+ the command words followed by the options, with operands in their declared positions. Guidance that needs a value you must fill in is not a
238
242
  next entry; it is in the error `hint` or the report text. `x-canon.actor: human`
239
243
  marks a step only the human takes.
240
- - Your role guide's **Commands** block (`canon skills show role-<role>`) is
241
- your complete command set, every option of every leaf included. Run `canon schema <command> --json` only for a
242
- command it does not list, or after a `USAGE` refusal (read `error.field`
243
- and `error.expected` first). `canon schema --json` is the tree of every group and command
244
- with its `effect` and `x-canon.roles` (`--as <role>` lists one role's, and `x-canon.as` names it).
245
- `x-canon.roles` is the string `all` for a command all four roles use, else an array of
244
+ - Your role guide's **Commands** block (`canon skills get role-<role>`) is
245
+ your complete command set, every argument of every operation included. Run `canon schema <operation> --json` only for an
246
+ operation it does not list, or after an `INPUT_INVALID` refusal (read `error.field`
247
+ and `error.expected` first). `canon schema --json` is the tree document: `binding` (`cli`), `level`, `surface`,
248
+ the `arguments` shared by several operations (`--repo`, `--as`, `--actor`, …), the `collections` and every
249
+ operation with its `effect` (`--as <role>` lists one role's, and `x-canon.as` names it).
250
+ `x-canon.roles` is the string `all` for an operation all four roles use, else an array of
246
251
  role names (empty: only a human runs it), so read it as `roles == "all"` or a name in the array;
247
- the root's `x-canon.rolesForm` says so once. The tree's
248
- `options` define once the options that two or more commands share (`--repo`, `--as`, `--actor`, …)
249
- and a command names them. `canon schema <group> --json` lists a group's
250
- commands; `canon schema <command> --json` is the call surface of one command and nothing
251
- else: `options` (each name of a tree option, or an object with `valueType`, a typed
252
- `default`, `possibleValues`, `env`, `flagOnly`), `operands`, `constraints`, `validators`, `errors`,
253
- `outputs`, `input` (what one `--input` document is and a complete `example`) and `examples`.
254
- A member at its default is absent. `--json` is always accepted, `--input` when the command
255
- has `input`, `--fields` when an output has `fields`, and the codes `USAGE` (with canon's
256
- finer `*_INVALID`/`*_REQUIRED` argument codes), `INTERNAL`, `INPUT_*`, `BATCH_INCOMPLETE`,
252
+ the root's `x-canon.rolesForm` says so once. `canon schema <collection> --json` lists a collection's
253
+ operations; `canon schema <operation> --json` (an id such as `findings.close`) is the call surface of one operation and nothing
254
+ else: `arguments` (each a shared argument's name, or an object with `name`, `help`, `valueType`, a typed
255
+ `default`, `possibleValues`, `domain`, `repeatable`, and `cli` holding `position` (an operand), `valueName`, `short`, `env`), `constraints`
256
+ (`atMostOne`, `requires`, `forbids`), `errors`, `outputs`, `input` and `examples` (input documents, not command lines).
257
+ A member at its default is absent. `--json` is always accepted, `--input` on every operation,
258
+ `--fields` when an output has `fields`, and the codes `INPUT_INVALID` (with its `reason`),
259
+ `INTERNAL`, `INPUT_*`, `BATCH_INCOMPLETE`,
257
260
  `PLAN_STALE` (with `--commit`) and `CURSOR_INVALID` (with `--cursor`) can come without
258
- being listed. `--commit` and `--plan-digest` are listed on exactly the commands that offer
259
- them: a command that lists `commit` previews on a bare run. `canon schema <command> --schemas --json`
261
+ being listed. `--commit` and `--plan-digest` are listed on exactly the operations that offer
262
+ them: an operation that lists `commit` previews on a bare run. `canon schema <operation> --schemas --json`
260
263
  gives the JSON Schema of each report in `schemas`, `Input` (the schema of one `--input`
261
264
  document) and `rejects` (what each validator refuses, in order); `#/schemas/<Name>` in
262
- the command document resolves there. The first line of every `--help` points at it.
265
+ the operation document resolves there. The first line of every `--help` points at the tree.
263
266
  - An option of the same name takes the same value in every command that has it, and `canon schema` declares it once. An id
264
267
  (`--project`, `--role`, `--domain`) is a kebab slug: lowercase letters and digits, single hyphens between them. A name
265
268
  (`--actor`, `--approver`, `--relayed-via`) and a sentence (`--reason`, `--summary`, `--override-reason`) are one line of text:
266
269
  the white space around it is trimmed (what is recorded, and what a signature is made of, is the trimmed text), and a value
267
- that is empty once trimmed, or has a control character (a tab, an escape) or a line break inside it, is refused with the
268
- command's own argument code. `--round` and `--limit` start at 1, and `--regime` is the four-part key `retrieve` and
269
- `dispatch begin` both take. `finding close` takes `fixed`, `rejected` or `deferred`, never `open`.
270
+ that is empty once trimmed, or has a control character (a tab, an escape) or a line break inside it, is refused (`INPUT_INVALID`, reason `INVALID_VALUE`, or the operation's own code). `--round` and `--limit` start at 1, and `--regime` is the four-part key `retrieve` and
271
+ `runs create` both take. `findings close` takes `fixed`, `rejected` or `deferred`, never `open`.
270
272
  - Pass `--json` and read stdout as one document, nothing on stderr. Success is
271
273
  `{"ok":true,"data":…,"meta":…}`; failure is
272
274
  `{"ok":false,"error":{…},"meta":…}` (a check that fails keeps its report in
273
- `data`). `meta` carries `tool`, `toolVersion`, `contract` (`atip/1`),
274
- `contractVersion` (`1.6`), `schemaVersion`,
275
- `command`, and when present `next`, `warnings` (`[{code, message}]`) and
276
- `page`; a repeated write that changed nothing reports `data.unchanged: true`.
275
+ `data`). `meta` carries `tool`, `toolVersion`, `contract` (`atip/2`),
276
+ `contractVersion` (`2.0`), `schemaVersion`,
277
+ `operation` (the id of the operation that ran; absent when none was resolved), and when present `next`, `warnings` (`[{code, message}]`) and
278
+ `page`; a repeated write that changed nothing reports `data.unchanged: true` (a batch answer carries `unchanged`, `waitingOn` and `nextOmitted` in `meta.x-canon`, its `data` only `items`).
277
279
  Absent members are omitted, never `null` or `[]` (a value you sent empty comes back as `received: ""`).
278
280
  Read the members you know and ignore the ones you do not: a later canon
279
281
  adds members, and a value of a closed set you have not seen (a `severity`, an
280
282
  `outcome`, a `reason`) is one item to leave out, never a reason to reject the document. A paged list puts
281
- `meta.page.nextCursor` in the first entry of the call's `meta.next` as `--cursor=<nextCursor>`
283
+ `meta.page.nextCursor` in the first entry of the call's `meta.next` as `arguments.cursor`
282
284
  (run that entry as it is); no `nextCursor` means no more.
283
285
  On failure branch on `error.code`, and on `error.reason` where the code has
284
286
  reasons (`INPUT_INVALID` says `NOT_JSON`, `UNKNOWN_KEY`, `STDIN_TTY`, … so you
285
- know whether to fix the JSON or the shell); fix the option `error.field` names
286
- using the `error.expected` values (`field` is an option name, or a JSON
287
- pointer such as `/2/scenario` into an `--input` document, `/<index>/<key>` in a batch), and
288
- follow `error.hint`: it is one runnable command line that starts with `canon`, the
289
- same with `<PLACEHOLDER>`s you fill in, or one sentence. The codes
287
+ know whether to fix the JSON or the shell); fix the argument `error.field` names
288
+ using the `error.expected` values (`field` is always a JSON pointer into the input document: `/round`,
289
+ `/2/scenario` in a batch `/<index>/<key>`, `""` for the whole document, even when the value came from the command line), and
290
+ follow `error.hint`: an object, `{text}` or `{operation, arguments?, missing?, text?}`; `operation` and `arguments` name a working
291
+ call, `missing` the arguments you fill in. `error.refused` is `true` when canon stopped before it did any work. The codes
290
292
  are stable; `canon schema --errors --json` lists them with their reasons and
291
293
  `canon schema --error <CODE>` explains one. A warning code (`meta.warnings`) is in
292
294
  `canon schema --warnings --json`; `canon schema --warning <CODE>` explains one.
293
295
  - **Exit codes:** only 0, 1 and 2 exist: 0 ok; 1 the command ran and its answer
294
296
  is negative or incomplete (a failed check, a violation, `unverifiable` when
295
- nothing was examined, a partly failed batch); 2 refused to run (usage,
296
- `CONFIG_REQUIRED`, an id or file that does not exist, an invalid argument).
297
+ nothing was examined, a partly failed batch); 2 refused to run (`error.refused` is `true`: `INPUT_INVALID`,
298
+ `OPERATION_NOT_FOUND`, `CONFIG_REQUIRED`, an id or file that does not exist).
297
299
  A refusal leaves the tree unchanged.
298
300
  - Repeating a write is safe: a record that already exists with identical
299
301
  content is reported `unchanged` (`data.unchanged`), not duplicated.
@@ -301,29 +303,28 @@ A role is guidance, not enforcement: `--role` on `evidence add` and
301
303
  `--scenario auth.login.01`, `--actor reviewer-1`, `--project root`,
302
304
  `--session s-1`), and an `--input` document key is that name without `Id`
303
305
  (`scenario`, `actor`; the stored record and report JSON keep `scenario_id`,
304
- `scenarioId`). The primary object of a command is its operand
305
- (`canon subject move <id> --to verifying`, `canon change new <slug>`), and
306
+ `scenarioId`). The primary object of an operation on an existing item is its operand `<id>`
307
+ (`canon subjects move <id> --to verifying`); `create` takes `--id` (`canon changes create --id <slug>`), and
306
308
  `--kind` values carry no `_record` suffix (`--kind evidence`).
307
- - `canon status` sends the planner to write the brief while `brief check`
309
+ - `canon status` sends the planner to write the brief while `briefs check`
308
310
  has blockers; the approval step appears only when the brief is clean and
309
311
  unapproved.
310
312
  - Page long lists with `--limit <n>` and `--cursor <nextCursor>` (`--all`
311
- for everything); a cursor holds only for the call that issued it, so change nothing but `--limit`, `--all`, `--fields` and `--json`, and keep `CANON_ROLE` as it was; the next call is `meta.next[0].argv` as it stands (the arguments you gave and the cursor, never a default). An argument you add is a change even when it states the default (`--repo .`): canon binds an explicit default to the cursor (`CURSOR_INVALID` with `error.reason` `ARGUMENTS_CHANGED`, `error.field` `--cursor`; `FOREIGN` for a cursor of another command or another canon version: start again from the first page). `--limit`, `--cursor`, `--all` and `--fields` are flags: an `--input` document key of that name is `INPUT_INVALID` with `reason` `FLAG_ONLY_KEY`. Project fields with `--fields a,b`
312
- (`status`, `export`, `query`, `finding list`, `divergence list`, `context`): the paths `canon schema <command> --json` lists under `outputs[].fields`, spelled as the answer spells them; `meta.fields` lists what was kept.
313
+ for everything); a cursor holds only for the call that issued it, so change nothing but `--limit`, `--all`, `--fields` and `--json`, and keep `CANON_ROLE` as it was; the next call is `meta.next[0]` as it stands (the arguments you gave and the cursor, never a default). An argument you add is a change even when it states the default (`--repo .`): canon binds an explicit default to the cursor (`CURSOR_INVALID` with `error.reason` `ARGUMENTS_CHANGED`, `error.field` `/cursor`; `FOREIGN` for a cursor of another command or another canon version: start again from the first page). `--limit`, `--cursor`, `--all` and `--fields` are control arguments: an `--input` document key of that name is `INPUT_INVALID` with `reason` `CONTROL_IN_DOCUMENT`. Project fields with `--fields a,b`
314
+ (`status`, `export`, `query`, `findings list`, `divergences list`, `context`): the paths `canon schema <command> --json` lists under `outputs[].fields`, spelled as the answer spells them; `meta.fields` lists what was kept.
313
315
  - `--override-reason <text>` is the only way to proceed past a waivable
314
316
  refusal; it is recorded, echoed in `data.overrides[]` and listed by `status`
315
- for the human. There is no `--force`. `brief approve`, `policy approve`,
316
- `divergence accept`, `change drop`, `change defer`, `change reopen` (six
317
+ for the human. There is no `--force`. `briefs approve`, `policy approve`,
318
+ `divergences accept`, `changes drop`, `changes defer`, `changes reopen` (six
317
319
  leaves) and the `migrate --commit` that re-binds `Approved:`
318
320
  lines record a human's decision and refuse every agent role (`ACTOR_DENIED`)
319
321
  unless they record the explicit answer the human gave you, with
320
- `--relayed-via <tool>` (show, ask, record, as for the brief; `canon skills
321
- show role-planner`); never unset your role to run one.
322
+ `--relayed-via <tool>` (show, ask, record, as for the brief; `canon skills get role-planner`); never unset your role to run one.
322
323
  To close a change the human no longer wants, ask with the question tool, then
323
- record their answer with `canon change defer <slug> --reason "<their words>" --ref <link or date> --approver <their name> --relayed-via <the question tool> --actor <your actor id>`
324
- (defer is "not this release", `canon change drop` is the end and takes the
325
- same options, a deferred change comes back with `canon change reopen` and a
326
- new `brief approve`; a shipped change cannot be closed; evidence, reviews and
324
+ record their answer with `canon changes defer <slug> --reason "<their words>" --ref <link or date> --approver <their name> --relayed-via <the question tool> --actor <your actor id>`
325
+ (defer is "not this release", `canon changes drop` is the end and takes the
326
+ same options, a deferred change comes back with `canon changes reopen` and a
327
+ new `briefs approve`; a shipped change cannot be closed; evidence, reviews and
327
328
  findings stay). A closed change drops out of the requirements: `canon status`
328
329
  lists it in `setAsideChanges` and `setAsideScenarios`, `canon gate check`
329
330
  prints the advisory `closed_change`, `canon query --kind change_state` reads
@@ -332,8 +333,7 @@ A role is guidance, not enforcement: `--role` on `evidence add` and
332
333
  ### Many records at once: `--input`
333
334
 
334
335
  Every write leaf takes `--input` instead of flags: inline JSON, a file, or `-`
335
- for stdin. The keys are the option names in camelCase, and `operands` holds
336
- the positional arguments. An object is one invocation; a JSON array (or NDJSON
336
+ for stdin. The keys are the argument names in camelCase, operands included (`id`, `scenario`; an operand that takes several values has a plural key: `changes` of `briefs approve`, `scenarios` of `divergences accept` and `reviews scenario`); a number is a JSON number. An object is one invocation; a JSON array (or NDJSON
337
337
  from a file or stdin) is a batch, run in order and answered with
338
338
  `data.items[]` (`index`, `status` of `written`, `unchanged`, `failed` or
339
339
  `skipped`, and that element's `data` or `error`). A batch is validated whole
@@ -341,13 +341,13 @@ before anything is written, and that check reads no state: an invalid element wr
341
341
  its own code, `error.field` pointing at `/<i>/<key>` and no `data`. An element that fails when it runs (the object
342
342
  it names does not exist) stops the batch: exit 1, `BATCH_INCOMPLETE`, `error.field` exactly `/<i>`, the element
343
343
  `failed` with its own `error` (no `data`), the later ones `skipped`, and the earlier ones done (not undone). Re-running the same batch reports the finished elements
344
- `unchanged`. A typo in a key is refused (`INPUT_INVALID`, `field` naming the key), never dropped; a document with several problems reports them all, the first as the error (`field` is the first `error.details` entry's) and every one in `error.details` in the order the document wrote its keys, and a value outside a closed set is `INPUT_INVALID` too (`reason` `INVALID_VALUE`, `field` the key), not `USAGE`. Every non-empty line of an NDJSON file is a document (a `#` line is not a comment). Integers compare by number: `1`, `"1"` and `--round +1` are one value, `"+1"`, `"0x1"` and `1.0` in a document are `INVALID_VALUE`, and an integer beyond ±9007199254740991 is refused as a number and as a string, in a document (`INVALID_VALUE`, `field` its pointer) and on the command line (`USAGE`). `--input` may give a required option and the command line only the operand; an option given in both with different values is `INPUT_CONFLICT` at the key's pointer. A repeatable option's none is the key left out: `[]` is refused (`INPUT_INVALID`, `reason` `INVALID_VALUE`, `field` the key's pointer), as is `[]` for any other option and for `operands`.
345
- `canon schema <command> --json` shows the leaf's `input` (what one document is, and a complete `example`); `canon schema <command> --schemas --json` gives `Input`, the JSON Schema of one document.
344
+ `unchanged`. A typo in a key is refused (`INPUT_INVALID`, `reason` `UNKNOWN_ARGUMENT`, `field` naming the key), never dropped; a document with several problems reports them all, the first as the error (`field` is the first `error.details` entry's) and every one in `error.details` in the order the document wrote its keys, and a value outside a closed set is `INPUT_INVALID` too (`reason` `INVALID_VALUE`, `field` the key), like every refusal of an argument. Every non-empty line of an NDJSON file is a document (a `#` line is not a comment). Integers compare by number: `1`, `"1"`, `1.0` and `1e3` in a document are one integer, `"+1"` and `"0x1"` are `INVALID_VALUE`, an integer word on the command line is `-?(0|[1-9][0-9]*)` (`+1` and `01` are refused), and an integer beyond ±9007199254740991 is refused as a number and as a string, in a document (`INVALID_VALUE`, `field` its pointer) and on the command line (`INPUT_INVALID`, `INVALID_VALUE`). `--input` may give a required option and the command line only the operand; an option given in both with different values is `INPUT_CONFLICT` at the key's pointer. A repeatable option's none is the key left out: `[]` is refused (`INPUT_INVALID`, `reason` `INVALID_VALUE`, `field` the key's pointer), as is `[]` for any other argument.
345
+ `canon schema <operation> --json` shows the operation's `input` and `examples`; `canon schema <operation> --schemas --json` gives `Input`, the JSON Schema of one document.
346
346
 
347
347
  ```text
348
- canon scenario new --input '[{"operands":["auth.login.01"],"title":"Logs in","case":"happy"},{"operands":["auth.login.02"],"title":"Wrong password","case":"failure"}]'
348
+ canon scenarios create --input '[{"id":"auth.login.01","title":"Logs in","case":"happy"},{"id":"auth.login.02","title":"Wrong password","case":"failure"}]'
349
349
  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"}]'
350
- canon finding add --input '[{"change":"add-login","round":1,"seq":1,"severity":"note","actor":"reviewer-1","summary":"Token is logged"},{"change":"add-login","round":1,"seq":2,"severity":"blocker","introducedUnknown":true,"actor":"reviewer-1","summary":"No rate limit"}]'
350
+ canon findings create --input '[{"change":"add-login","round":1,"seq":1,"severity":"note","actor":"reviewer-1","summary":"Token is logged"},{"change":"add-login","round":1,"seq":2,"severity":"blocker","introducedUnknown":true,"actor":"reviewer-1","summary":"No rate limit"}]'
351
351
  ```
352
352
 
353
353
  `--input` never carries `--commit` or `--plan-digest`, and the destructive
@@ -361,31 +361,43 @@ two steps. The bare run previews: it writes nothing,
361
361
  exits 0 and prints the effects and a `planDigest`. Read the effects, then act
362
362
  with `--commit --plan-digest <planDigest>`. It refuses (`PLAN_STALE`) when
363
363
  the plan differs from the one you previewed, so run the preview again. Appends
364
- and state transitions (`gate promote`, `subject move`) run directly. Where a
365
- preview helps elsewhere (`init`, `skills install`, `export`, `inventory sync`,
366
- `subject adopt`, …) `--dry-run` validates fully and writes nothing.
364
+ and state transitions (`gate promote`, `subjects move`) run directly. Where a
365
+ preview helps elsewhere (`init`, `skills-install`, `export`, `inventory sync`,
366
+ `subjects adopt`, …) `--dry-run` validates fully and writes nothing.
367
367
 
368
368
  ```bash
369
369
  canon purge --kind run --before 2026-01-01
370
370
  ```
371
371
 
372
- ## Upgrading a repo from 0.27
372
+ ## Upgrading a repo from an earlier canon
373
373
 
374
- 0.28 changed the CLI grammar with no aliases: an old spelling fails with exit 2
375
- and an `error.hint` naming the replacement. `canon status`, `canon gate check`
376
- and `canon context` warn when the repo holds 0.27-era state and put
374
+ 0.28 and 0.49 changed the CLI grammar with no aliases: an old spelling fails with
375
+ exit 2 (`OPERATION_NOT_FOUND` for a command word, `INPUT_INVALID` for an option) and an
376
+ `error.hint` naming the replacement. `canon status`, `canon gate check`
377
+ and `canon context` warn (`LEGACY_STATE_FOUND`) when the repo holds state of an earlier canon: a hook command in an old
378
+ spelling, an `AGENTS.md` canon block, the skill stub or the retrieve hook script of a canon older than 0.49 (that
379
+ script calls `canon regime-show`, which 0.49 refuses; the hook ignores a failed call and exits 0 printing
380
+ nothing, so it gives no guidance until `canon migrate` replaces it; it never blocks a dispatch). They put
377
381
  `canon migrate --json` first in `meta.next`. Then:
378
382
 
379
383
  1. `canon migrate` previews and prints the `planDigest`.
380
384
  2. `canon migrate --commit --plan-digest <digest>` with that digest applies it.
381
385
  It moves the layout, rewrites canon's own hooks and scripts, compacts the
382
- ledger, replaces an old full skill with the stub, and backs up every file it
383
- rewrites under `.canon/migrate-backup/` (local and git-ignored; `--revert` needs it). It refuses uncommitted changes
384
- under a path it moves.
385
- 3. `canon skills install` refreshes the stub and the scripts; `canon skills check`
386
+ ledger, replaces an old full skill with the stub, installs the 0.49 stub and
387
+ retrieve hook script again, rewrites the canon block of `AGENTS.md` between its
388
+ markers (text outside them stays as it is; markers that are not one pair leave the block
389
+ as it is and the preview says why), puts the 0.49 spelling in the hook commands of
390
+ `.claude/settings.json` and `.codex/hooks.json` where the command word alone changes
391
+ (`canon skills-install` becomes `canon skills-install`), and backs up every file it
392
+ rewrites under `.canon/migrate-backup/` (local and git-ignored; `canon migrate-revert` needs it). A hook line
393
+ a word change would not mend (a `create` that now takes `--id`, `task done <change>#<n>`, `finding close`,
394
+ `brief show`, `brief check` or `skills show` without its operand, a removed option such as
395
+ `init --check`, `search --limit`) is listed in the preview and left as written: edit it by hand. It refuses uncommitted changes
396
+ under a path it moves; a file that changed after the preview makes the commit `PLAN_STALE`.
397
+ 3. `canon skills-install` refreshes the stub and the scripts; `canon skills-check`
386
398
  confirms them.
387
399
 
388
- **Done when:** `canon migrate` reports nothing left to move, `canon skills check` exits 0, and `canon status` and `canon gate check` no longer warn about 0.27 state.
400
+ **Done when:** `canon migrate` reports nothing left to move, `canon skills-check` exits 0, and `canon status` and `canon gate check` no longer warn about old state.
389
401
 
390
402
  ## Setup and provider projection
391
403
 
@@ -395,23 +407,23 @@ canon init
395
407
  # harnesses for the canon skill, one --harness each (--no-harness for none); without them init takes the detected .claude/.codex/.omp/.pi (it never asks)
396
408
  canon init --harness claude --harness codex
397
409
  # follows canon.yaml skills.providers (else the install lock's, else the detected ones; none detected installs nothing); prunes projected files the bundle no longer ships when their bytes match the lock, keeps a modified one and reports `kept:`
398
- canon skills install
410
+ canon skills-install
399
411
  # any subset; rewrites skills.providers (--no-harness records none)
400
- canon skills install --harness claude --harness codex --harness omp --harness pi
412
+ canon skills-install --harness claude --harness codex --harness omp --harness pi
401
413
  # read-only drift check; exit 1 (SKILLS_CHECK_FAILED) names each orphan, a projected file the bundle no longer ships
402
- canon skills check
414
+ canon skills-check
403
415
  # diagnostics, incl. a stray canon projection for an unselected harness and a projection a formatter rewrote, and `orphan:` lines for projected files the bundle no longer ships; never deletes user files
404
- canon skills doctor
416
+ canon skills-doctor
405
417
  ```
406
418
 
407
419
  `install` writes, per selected harness, a short `SKILL.md` stub (this file's
408
- frontmatter plus a pointer to `canon skills show canon`) and the `scripts/**`
420
+ frontmatter plus a pointer to `canon skills get canon`) and the `scripts/**`
409
421
  sidecars; the guides themselves are not copied, they come from the binary.
410
422
  Claude gets `.claude/skills/canon/`, Codex `.agents/skills/canon/`, OMP
411
423
  `.omp/skills/canon/`, Pi `.pi/skills/canon/` (the retrieve script is a sidecar,
412
424
  not an installed hook). `check` reports a stub written by another canon
413
425
  version; `install` rewrites it. The harness list lives in `canon.yaml` as
414
- `skills: { providers: [...] }`; change it with `canon skills install --harness <name>` once for each name (or `--no-harness`),
426
+ `skills: { providers: [...] }`; change it with `canon skills-install --harness <name>` once for each name (or `--no-harness`),
415
427
  never by assuming a default.
416
428
 
417
429
  `install` and `doctor` end with `owned-paths:`, the globs of every path
@@ -421,29 +433,29 @@ drift (`doctor` reports it as `formatter-rewritten` and names the entry to
421
433
  add). Specs, `policy.yaml` and the changes are written by hand and are not
422
434
  on the list.
423
435
 
424
- **Done when:** `canon skills check` exits 0 and `canon skills doctor` lists no `orphan:`, `stray:` or `outdated:` line.
436
+ **Done when:** `canon skills-check` exits 0 and `canon skills-doctor` lists no `orphan:`, `stray:` or `outdated:` line.
425
437
 
426
438
  ## Route by task
427
439
 
428
- - **Fix a bug:** the approved change if there is one, else the planner (`canon change new`); first a failing run of the scenario (`canon scenario new --case failure`, then `canon evidence add`), then the fix. `canon skills show role-implementer`.
429
- - **Add or change a feature:** `canon subject new`, `canon change new`, then the brief. `canon skills show role-planner`.
430
- - **Pure refactor, dependency, build, CI or infra:** `canon change new <slug> --subject <id> --change-kind chore`; data or interface changes are not chores. `canon skills show role-planner`.
431
- - **Review someone's change:** `CANON_ROLE=reviewer`, `canon brief check <slug>`. `canon skills show role-reviewer`.
432
- - **Resume:** `canon status --json`, then follow `meta.next`. `canon skills show role-orchestrator`.
433
- - **Plan more work on a live subject:** `canon change new <slug> --subject <id>` (it warns until the brief is approved; `canon subject unadopt` parks a draft). `canon skills show canon-subject`, `canon skills show role-planner`.
434
- - **Upgrade canon in a repo:** `canon migrate` (previews), then `canon migrate --commit --plan-digest <digest>`, then `canon skills install`. See "Upgrading a repo from 0.27" above and `canon skills show role-orchestrator`.
440
+ - **Fix a bug:** the approved change if there is one, else the planner (`canon changes create`); first a failing run of the scenario (`canon scenarios create --case failure`, then `canon evidence add`), then the fix. `canon skills get role-implementer`.
441
+ - **Add or change a feature:** `canon subjects create`, `canon changes create`, then the brief. `canon skills get role-planner`.
442
+ - **Pure refactor, dependency, build, CI or infra:** `canon changes create --id <slug> --subject <id> --change-kind chore`; data or interface changes are not chores. `canon skills get role-planner`.
443
+ - **Review someone's change:** `CANON_ROLE=reviewer`, `canon briefs check <slug>`. `canon skills get role-reviewer`.
444
+ - **Resume:** `canon status --json`, then follow `meta.next`. `canon skills get role-orchestrator`.
445
+ - **Plan more work on a live subject:** `canon changes create --id <slug> --subject <id>` (it warns until the brief is approved; `canon subjects unadopt` parks a draft). `canon skills get canon-subject`, `canon skills get role-planner`.
446
+ - **Upgrade canon in a repo:** `canon migrate` (previews), then `canon migrate --commit --plan-digest <digest>`, then `canon skills-install`. See "Upgrading a repo from 0.27" above and `canon skills get role-orchestrator`.
435
447
 
436
448
  **Done when:** you have named your role and loaded its guide, and `canon status --json` lists your next step in `meta.next`.
437
449
 
438
450
  ## Safety contract
439
451
 
440
- `canon status`, `canon format`, `canon skills check`, `canon skills show` and
452
+ `canon status`, `canon format`, `canon skills-check`, `canon skills get` and
441
453
  `canon gate check` do not change the repo's records. Do not hand-edit generated
442
454
  reports, provenance lines, locks, or task evidence. Inspect `canon context`
443
455
  before authoring typed artifacts, and treat every failure class as actionable
444
456
  evidence rather than bypassing the gate.
445
457
 
446
- ## Guides: `canon skills show <name>`
458
+ ## Guides: `canon skills get <name>`
447
459
 
448
460
  Every name below is a guide built into the binary. Load only the one the
449
461
  current step needs.
@@ -455,12 +467,12 @@ current step needs.
455
467
  | `role-implementer` | Implementer steps 3–6: scenarios, units, code, evidence. |
456
468
  | `role-reviewer` | Reviewer step 7: findings and signed reviews in a separate session. |
457
469
  | `role-orchestrator` | Orchestrator step 8: dispatch, transitions, resuming, upgrading. |
458
- | `brief-shape` | Brief pass: the structure `canon brief check` expects. |
470
+ | `brief-shape` | Brief pass: the structure `canon briefs check` expects. |
459
471
  | `brief-clarify` | Brief pass: turn open points into questions a human answers in one reply. |
460
472
  | `brief-harden` | Brief pass: make flow and step detail agree, with failure paths. |
461
473
  | `brief-align` | Brief pass: scenarios cover the brief's flow and the brief still says what they prove. |
462
474
  | `brief-polish` | Brief pass: make the brief readable once (clears `prose.*` advisories). |
463
- | `canon-subject` | Status, subjects and changes: `canon subject new|adopt|show|move`, `canon change new`. |
475
+ | `canon-subject` | Status, subjects and changes: `canon subjects create|adopt|show|move`, `canon changes create`. |
464
476
  | `canon-authoring` | Write or reorganize `.feature` specs; the scaffold. |
465
477
  | `canon-context` | `canon context`: fields, enums, policy bindings, context packs and prompts. |
466
478
  | `canon-vocab` | Typed authoring vocabulary and the handoff template. |
@@ -468,8 +480,8 @@ current step needs.
468
480
  | `canon-inventory` | `canon inventory sync`: index specs into scenario records. |
469
481
  | `canon-gate` | Evidence, gates, task checkboxes, hooks. |
470
482
  | `canon-review` | Findings and reviews. |
471
- | `canon-artifact-ingest` | `canon ingest records`: artifacts into verdict trajectories. |
472
- | `canon-plan-import` | `canon ingest plans`: plan state into change and task records. |
483
+ | `canon-artifact-ingest` | `canon ingest-records`: artifacts into verdict trajectories. |
484
+ | `canon-plan-import` | `canon ingest-plans`: plan state into change and task records. |
473
485
  | `canon-storage` | Where records live, the `storage:` block, retention, export, purge. |
474
486
  | `canon-policy` | The policy and the CEL expressions behind it. |
475
487
  | `canon-plugins` | Plugin overlays on core records. |
@@ -477,4 +489,4 @@ current step needs.
477
489
  | `canon-retrieve` | Dispatch-time guidance (`canon retrieve`); `scripts/canon-retrieve-pre-dispatch.sh` is the hook sidecar. |
478
490
  | `canon-report-dashboard` | `canon report build|check|snapshot` and `canon dashboard`. |
479
491
 
480
- **Done when:** `canon skills show <name>` prints the guide you needed; a name that is not in the table is a usage error (exit 2) whose `error.expected` lists the valid ones.
492
+ **Done when:** `canon skills get <name>` prints the guide you needed; a name that is not in the table is a usage error (exit 2) whose `error.expected` lists the valid ones.