@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
|
@@ -10,15 +10,14 @@ domain agent follows.
|
|
|
10
10
|
- **"feature docs" / ".feature files" = Gherkin behavior specs** — the
|
|
11
11
|
`.feature` corpus `canon format`/`canon inventory sync` validate. "Read
|
|
12
12
|
the feature docs" ALWAYS means the Gherkin files, never a Subject.
|
|
13
|
-
- **"subject" = the management record** authored by `canon
|
|
13
|
+
- **"subject" = the management record** authored by `canon subjects create`.
|
|
14
14
|
A Subject is the product unit; its `.feature` files are its behavior
|
|
15
15
|
specs. Never the same word.
|
|
16
16
|
|
|
17
17
|
A Subject links, but does not contain, its work. Two joins, each
|
|
18
18
|
authored in one place:
|
|
19
19
|
|
|
20
|
-
- **Changes**: `change_ids` on the Subject, appended by `canon
|
|
21
|
-
adopt`.
|
|
20
|
+
- **Changes**: `change_ids` on the Subject, appended by `canon subjects adopt`.
|
|
22
21
|
- **Scenarios**: the `@subject:<id>` tag on each Gherkin scenario,
|
|
23
22
|
indexed onto `Scenario.subject_id` by the scenario index (rebuilt by
|
|
24
23
|
`canon inventory sync`, and refreshed on disk by the commands that write
|
|
@@ -42,7 +41,7 @@ downstream artifact has a `subject_id` to pin to.
|
|
|
42
41
|
```bash
|
|
43
42
|
# record kinds, enum domains, policy requirements
|
|
44
43
|
canon context --repo .
|
|
45
|
-
canon
|
|
44
|
+
canon subjects create --id subject-domain-loop \
|
|
46
45
|
--domain dev --title "Subject domain loop" \
|
|
47
46
|
--summary "The durable product unit + its per-domain loop" \
|
|
48
47
|
--owner-role implementer
|
|
@@ -69,16 +68,15 @@ canon subject new subject-domain-loop \
|
|
|
69
68
|
adopted changes and no tagged scenarios is a valid minimal record and
|
|
70
69
|
starts at status `proposed`. `--json` prints the written record. Several
|
|
71
70
|
subjects at once: `--input` takes inline JSON, a file or `-`; an array (or
|
|
72
|
-
NDJSON) is a batch validated before any write, with `
|
|
73
|
-
id and the other keys the
|
|
74
|
-
new --json` shows `input`, its limits and a complete `example`; `canon schema subject new --schemas --json`
|
|
71
|
+
NDJSON) is a batch validated before any write, with `id` holding the
|
|
72
|
+
id and the other keys the argument names in camelCase (`canon schema subjects.create --json` shows `input`, its limits and a complete `example`; `canon schema subjects.create --schemas --json`
|
|
75
73
|
gives `Input`, the schema of one document). Writing an identical subject
|
|
76
74
|
again is a no-op reported `unchanged` (`data.unchanged`).
|
|
77
75
|
|
|
78
76
|
### 2. Retrieve subject-scoped strategy memory BEFORE working
|
|
79
77
|
|
|
80
78
|
```bash
|
|
81
|
-
canon retrieve --for-role dev --domain dev --subject subject-domain-loop --
|
|
79
|
+
canon retrieve --for-role dev --domain dev --subject subject-domain-loop --top 5
|
|
82
80
|
```
|
|
83
81
|
|
|
84
82
|
- `--regime <key>` XOR the derived pair `--domain <d> [--subject <id>]`:
|
|
@@ -91,15 +89,14 @@ canon retrieve --for-role dev --domain dev --subject subject-domain-loop --limit
|
|
|
91
89
|
|
|
92
90
|
### 3. Work → pin every artifact to `subject_id`
|
|
93
91
|
|
|
94
|
-
- **Scenarios**: `canon
|
|
92
|
+
- **Scenarios**: `canon scenarios create --id <tag> --subject <subject-id>` emits
|
|
95
93
|
the `@subject:<subject-id>` tag; the scenario index maps the tag onto
|
|
96
94
|
the scenario's `subject_id` the next time a command reads it (no sync
|
|
97
95
|
step; see `canon-inventory`). A malformed/absent tag leaves it unset
|
|
98
96
|
(fail-soft), never an error. See `canon-authoring`.
|
|
99
97
|
- **Changes**: adopt imported plan changes under the Subject (see
|
|
100
98
|
[Adopt flow](#adopt-flow)).
|
|
101
|
-
- **Reviews / evidence / divergences**: authored as usual (`canon
|
|
102
|
-
scenario`, `canon finding add`, `canon gate check`, the `canon divergence` leaves) against
|
|
99
|
+
- **Reviews / evidence / divergences**: authored as usual (`canon reviews scenario`, `canon findings create`, `canon gate check`, the `canon divergences` leaves) against
|
|
103
100
|
the Subject's scenarios and adopted changes — the join spine carries
|
|
104
101
|
them back through `scenario_id` and `change_id`. See `canon-review`
|
|
105
102
|
for the finish-a-subject order.
|
|
@@ -107,15 +104,15 @@ canon retrieve --for-role dev --domain dev --subject subject-domain-loop --limit
|
|
|
107
104
|
### 4. Verdicts / trajectories → learn (knowledge out)
|
|
108
105
|
|
|
109
106
|
As work is reviewed, verdicts ingest under the subject-scoped regime
|
|
110
|
-
(`canon ingest
|
|
107
|
+
(`canon ingest-records`), so `canon strategies` distills strategies keyed to
|
|
111
108
|
this subject and domain — the exact memory step 2 retrieves next time.
|
|
112
109
|
|
|
113
|
-
**Done when:** `canon
|
|
110
|
+
**Done when:** `canon subjects get <id>` reports the status you moved it to
|
|
114
111
|
(`shipped` is the end of the loop) and `canon gate check` exits `0`.
|
|
115
112
|
|
|
116
113
|
## Status lifecycle + the shipped evidence gate
|
|
117
114
|
|
|
118
|
-
`canon
|
|
115
|
+
`canon subjects move <id> --to <state> [--override-reason <text>] [--reason <text>] [--actor <id>]`
|
|
119
116
|
performs a policy-gated transition.
|
|
120
117
|
The legal chain:
|
|
121
118
|
|
|
@@ -129,11 +126,11 @@ from anywhere). Any other transition is rejected by failure class, exits
|
|
|
129
126
|
1, and leaves the record UNCHANGED (fail closed).
|
|
130
127
|
|
|
131
128
|
```bash
|
|
132
|
-
canon
|
|
133
|
-
canon
|
|
134
|
-
canon
|
|
129
|
+
canon subjects move subject-domain-loop --to specced
|
|
130
|
+
canon subjects move subject-domain-loop --to building
|
|
131
|
+
canon subjects move subject-domain-loop --to verifying
|
|
135
132
|
# gated — see below
|
|
136
|
-
canon
|
|
133
|
+
canon subjects move subject-domain-loop --to shipped
|
|
137
134
|
```
|
|
138
135
|
|
|
139
136
|
On success the status updates in place; `--json` prints the updated
|
|
@@ -160,12 +157,12 @@ owns must also carry a scenario of each required `@case:` (e.g. one
|
|
|
160
157
|
Subject with no tagged scenario is refused rather than shipped on an
|
|
161
158
|
empty set; so is one whose `scenario` records route away from the
|
|
162
159
|
gate's rung. A `Divergent` latest verdict is refused as `uncovered-cell`
|
|
163
|
-
unless a reviewer accepted it (`canon
|
|
160
|
+
unless a reviewer accepted it (`canon divergences accept`, see
|
|
164
161
|
`canon-gate`): the hint names both ways out. Re-verification: a blocker
|
|
165
162
|
closed `fixed` keeps blocking, and a chore's approval keeps the subject
|
|
166
163
|
from shipping, until every evidenced scenario has evidence recorded after
|
|
167
164
|
the close or the approval; the refusal names the scenarios and the
|
|
168
|
-
`canon evidence add
|
|
165
|
+
`canon evidence add-all` command. Each refusal prints by
|
|
169
166
|
failure class (`uncovered-cell`), carries a `hint`,
|
|
170
167
|
exits 2, and the status stays `verifying`. `retired` is not gated.
|
|
171
168
|
|
|
@@ -178,15 +175,15 @@ with no `Approved:` line outside HTML comments and code fences, whose
|
|
|
178
175
|
(`BRIEF_APPROVAL_STALE`; the brief was edited after the human
|
|
179
176
|
answered), or has no canon `brief.md` yet but comes from an external
|
|
180
177
|
openspec plan with a `proposal.md` under the plan sources. It also
|
|
181
|
-
refuses while `canon
|
|
178
|
+
refuses while `canon briefs check` has blocker findings for that change,
|
|
182
179
|
which include a flow step with no scenario or no failure scenario (the
|
|
183
180
|
coverage rules gate shipping, never approval). It runs with or without
|
|
184
181
|
a policy. The refusal is an `unreviewed-promotion` naming the subject, and
|
|
185
182
|
says what to do:
|
|
186
183
|
|
|
187
184
|
```output
|
|
188
|
-
output: canon
|
|
189
|
-
output: canon
|
|
185
|
+
output: canon subjects move: SUBJECT_INVALID — unreviewed-promotion demo-subject — verifying → shipped: brief not approved — .canon/changes/c-demo/brief.md has no `Approved:` line; a human must answer the brief, and only from that answer the agent will record their words with `canon briefs approve c-demo --approver <the human> --note "<their words>"`
|
|
186
|
+
output: canon subjects move: refused — get the human's answer to the brief and record it with `canon briefs approve`, or pass --override-reason <text> to move anyway; the waiver is recorded on the subject
|
|
190
187
|
```
|
|
191
188
|
|
|
192
189
|
For an external change with no canon brief yet, the reason reads
|
|
@@ -194,12 +191,12 @@ For an external change with no canon brief yet, the reason reads
|
|
|
194
191
|
the external plan <proposal>, which canon reads and never edits, so its
|
|
195
192
|
approval lives in that canon file`` and the agent will ``create
|
|
196
193
|
.canon/changes/<c>/brief.md holding a `Source: <proposal>` line, then
|
|
197
|
-
record their words with `canon
|
|
194
|
+
record their words with `canon briefs approve <c> --approver <the human> --note "<their words>"` ``.
|
|
198
195
|
|
|
199
196
|
Never record the approval without the human's answer. When there is no brief to
|
|
200
197
|
answer (no adopted change, or a newest change with neither a canon
|
|
201
198
|
`brief.md` nor an external `proposal.md`), the move is not refused: it
|
|
202
|
-
prints ``canon
|
|
199
|
+
prints ``canon subjects move: advisory: <id>'s brief is not approved —
|
|
203
200
|
its newest adopted change `<c>` has no brief (no
|
|
204
201
|
.canon/changes/<c>/brief.md, no openspec proposal.md), so there is no
|
|
205
202
|
brief to answer and shipping is not refused`` (or `— <id> adopts no
|
|
@@ -210,7 +207,7 @@ the transition, not the check.
|
|
|
210
207
|
|
|
211
208
|
This refusal is a backstop, and so is the evidence one: shipping is not
|
|
212
209
|
the first thing an unapproved brief stops. The agent writes the brief,
|
|
213
|
-
runs `canon
|
|
210
|
+
runs `canon briefs check` until it has no blockers, then shows it to the
|
|
214
211
|
human and asks, and nothing is built or attested for the subject until the human
|
|
215
212
|
answers. `canon evidence add` refuses (exit 2, nothing staged) a
|
|
216
213
|
scenario whose `@subject` owner, or a task whose change
|
|
@@ -228,7 +225,7 @@ edited after its approval (`BRIEF_APPROVAL_STALE`) are named for
|
|
|
228
225
|
different reasons, and the answer does not depend on the order the changes
|
|
229
226
|
were adopted or approved. The ship guard's brief-structure check runs over
|
|
230
227
|
all of them. When several block, the hint is one
|
|
231
|
-
``canon
|
|
228
|
+
``canon briefs approve <id>+ --approver <the human> --note "<their words>"``
|
|
232
229
|
line naming every blocking change; a reopen refusal cannot be passed with
|
|
233
230
|
`--override-reason`, a ship brief refusal can. A change never approved, not a
|
|
234
231
|
chore and tagged by no scenario is a *pending draft* and blocks nothing: the
|
|
@@ -253,7 +250,7 @@ a scenario with evidence recorded before the subject first adopted a change
|
|
|
253
250
|
newest adopted change. A task answers to its own change. So planning the next
|
|
254
251
|
change for a `building`, `verifying` or `shipped` subject does not freeze
|
|
255
252
|
re-verification of its existing scenarios; scenarios written for the new
|
|
256
|
-
change (`canon
|
|
253
|
+
change (`canon scenarios create --flow <F-id>` tags them) wait for its approval.
|
|
257
254
|
|
|
258
255
|
### The review guard (`spec_coverage.require_review`, opt-in)
|
|
259
256
|
|
|
@@ -262,7 +259,7 @@ When `.canon/policy.yaml` sets `spec_coverage.require_review` (see
|
|
|
262
259
|
prints on stderr which it ran or skipped:
|
|
263
260
|
|
|
264
261
|
```output
|
|
265
|
-
output: canon
|
|
262
|
+
output: canon subjects move: review guard for building → verifying (spec_coverage.require_review, scope: verifying, shipped)
|
|
266
263
|
ran unreviewed-promotion — every owned scenario needs a review by an actor, and from a session, other than its evidence's
|
|
267
264
|
ran open-blocker — 1 adopted change(s) checked for open blocker findings
|
|
268
265
|
```
|
|
@@ -277,7 +274,7 @@ also refuses a `false-success` (a scenario whose latest audit is
|
|
|
277
274
|
`refuted`) and, when `require_audit.scope` covers `shipped`, an owed
|
|
278
275
|
sampled audit; see `canon-gate`. With `spec_coverage.require_ci_run` covering
|
|
279
276
|
`shipped` (the default scope) it also refuses a scenario whose newest evidence
|
|
280
|
-
is not a CI record (`canon evidence add
|
|
277
|
+
is not a CI record (`canon evidence add-all --from-ci`) of the
|
|
281
278
|
code as it stands now from a run of at least `min_cases` cases: one
|
|
282
279
|
`uncovered-cell` or `stale-evidence` per scenario with its reason
|
|
283
280
|
(`no_ci_run`, `other_code_tree`, `dirty_worktree`, `short_run`,
|
|
@@ -285,7 +282,7 @@ code as it stands now from a run of at least `min_cases` cases: one
|
|
|
285
282
|
`canon-policy`. `canon status` flags a shipped subject red for the same reason.
|
|
286
283
|
|
|
287
284
|
```bash
|
|
288
|
-
canon
|
|
285
|
+
canon subjects move demo-subject --to verifying \
|
|
289
286
|
--override-reason "reviewer out until Monday" --actor lead
|
|
290
287
|
```
|
|
291
288
|
|
|
@@ -321,13 +318,13 @@ gate now misses) reopens it: reopen, add tasks to the approved change,
|
|
|
321
318
|
scenario, evidence, review, ship.
|
|
322
319
|
|
|
323
320
|
```bash
|
|
324
|
-
canon
|
|
321
|
+
canon subjects move demo-subject --to verifying \
|
|
325
322
|
--reason "follow-up: the retry path leaks a file handle" --actor impl
|
|
326
323
|
```
|
|
327
324
|
|
|
328
325
|
```output
|
|
329
|
-
output: canon
|
|
330
|
-
output: canon
|
|
326
|
+
output: canon subjects move: reopened `demo-subject` from shipped, recorded by `impl`: follow-up: the retry path leaks a file handle; keep the follow-up in its approved change `c-demo`, then scenario, evidence and review; shipping again runs every guard
|
|
327
|
+
output: canon subjects move: demo-subject → verifying — written directly; nothing to promote
|
|
331
328
|
```
|
|
332
329
|
|
|
333
330
|
- `--reason "<one line>"` is required for `shipped → verifying` (exit 2
|
|
@@ -349,8 +346,8 @@ output: canon subject move: demo-subject → verifying — written directly; not
|
|
|
349
346
|
- A policy that fails closed (`POLICY_APPROVAL_STALE`,
|
|
350
347
|
`POLICY_APPROVAL_CORRUPT`, `POLICY_APPROVAL_DENIED`: see `canon-policy`) refuses the reopen and
|
|
351
348
|
the ship, and `--override-reason` does not waive it.
|
|
352
|
-
- `canon
|
|
353
|
-
(`canon
|
|
349
|
+
- `canon changes create` on a shipped subject prints the reopen command
|
|
350
|
+
(`canon subjects move <id> --to verifying --reason "<why it reopens>"`)
|
|
354
351
|
in its output and `meta.next`.
|
|
355
352
|
- `canon status` flags a shipped subject whose gate went red (whatever
|
|
356
353
|
`verifying → shipped` would now refuse it on) and its only step is
|
|
@@ -359,22 +356,22 @@ output: canon subject move: demo-subject → verifying — written directly; not
|
|
|
359
356
|
## Adopt flow
|
|
360
357
|
|
|
361
358
|
Planning docs written outside canon become change/task records via
|
|
362
|
-
`canon ingest
|
|
363
|
-
`canon
|
|
359
|
+
`canon ingest-plans` (see `canon-plan-import`), but that stops at import.
|
|
360
|
+
`canon subjects adopt` lifts an imported change into a managed Subject:
|
|
364
361
|
|
|
365
362
|
```bash
|
|
366
363
|
# import → change/task rows
|
|
367
|
-
canon ingest
|
|
364
|
+
canon ingest-plans --repo .
|
|
368
365
|
# link change → subject
|
|
369
|
-
canon
|
|
366
|
+
canon subjects adopt subject-domain-loop \
|
|
370
367
|
--change subject-domain-loop-plan
|
|
371
368
|
```
|
|
372
369
|
|
|
373
|
-
A change made with `canon
|
|
370
|
+
A change made with `canon changes create` (below) is recorded and adopted
|
|
374
371
|
already. A `tasks.md` in it is an optional work note nothing gates on
|
|
375
|
-
(`canon
|
|
376
|
-
`canon evidence add --task` and `canon
|
|
377
|
-
and a flip re-imports that change itself. Run `canon ingest
|
|
372
|
+
(`canon changes create` no longer writes one); an existing one is still read:
|
|
373
|
+
`canon evidence add --task` and `canon tasks done` read the file as it is,
|
|
374
|
+
and a flip re-imports that change itself. Run `canon ingest-plans` for a
|
|
378
375
|
plan written outside canon, or when `canon query --kind task` must list
|
|
379
376
|
rows nobody has flipped yet.
|
|
380
377
|
|
|
@@ -389,7 +386,7 @@ second subject adds that subject, never re-points the change, and says
|
|
|
389
386
|
so:
|
|
390
387
|
|
|
391
388
|
```output
|
|
392
|
-
output: canon
|
|
389
|
+
output: canon subjects adopt: linked change `refactor-core` to subject `editing` as well; the change now belongs to `perception` and `editing` — written directly; nothing to promote
|
|
393
390
|
```
|
|
394
391
|
|
|
395
392
|
Every reader joins a subject to its changes from both sides (the
|
|
@@ -403,10 +400,10 @@ as a one-element `subject_ids`.
|
|
|
403
400
|
The two records cannot be written atomically, so the subject is written
|
|
404
401
|
first: a half-done adoption still has that change's open blockers
|
|
405
402
|
counted. If the change write then fails, `adopt` exits `2`, names the
|
|
406
|
-
subject that now lists the change, and prints `canon
|
|
403
|
+
subject that now lists the change, and prints `canon subjects adopt
|
|
407
404
|
<subject_id> --change <change_id>` to complete it.
|
|
408
405
|
|
|
409
|
-
`canon
|
|
406
|
+
`canon changes create --id <slug> --subject <S>` and `canon subjects adopt
|
|
410
407
|
<S> --change <change>` print a warning on stderr, and in JSON
|
|
411
408
|
`meta.warnings`, when `<S>` is `building`, `verifying` or `shipped` and the
|
|
412
409
|
change's brief is not approved. The warning says the subject's existing
|
|
@@ -418,14 +415,14 @@ subject answers for (tagged, approved or chore), so a shipped subject can
|
|
|
418
415
|
reopen, re-verify and ship again while the draft waits; `canon status` still
|
|
419
416
|
lists it.
|
|
420
417
|
|
|
421
|
-
**Done when:** `canon
|
|
418
|
+
**Done when:** `canon subjects get <id>` lists the change in the subject's
|
|
422
419
|
`change_ids` and `canon query --kind change --change <change>` lists the
|
|
423
420
|
subject in the change's `subject_ids`.
|
|
424
421
|
|
|
425
|
-
### Taking a draft change back out: `canon
|
|
422
|
+
### Taking a draft change back out: `canon subjects unadopt`
|
|
426
423
|
|
|
427
424
|
```text
|
|
428
|
-
canon
|
|
425
|
+
canon subjects unadopt <S> --change <change> --json
|
|
429
426
|
```
|
|
430
427
|
|
|
431
428
|
Removes the link on both records and keeps the change and its brief, so the
|
|
@@ -436,31 +433,30 @@ the subject owns carries a `@flow:<change>.*` tag (it would fall back to an
|
|
|
436
433
|
older approval; remove or retag those scenarios first, the hint names them);
|
|
437
434
|
an unlinked pair is a no-op.
|
|
438
435
|
The refusal for an approved brief (`APPROVED_BRIEF`) is not a dead end: its
|
|
439
|
-
hint names `canon
|
|
436
|
+
hint names `canon changes defer` and `canon changes drop`, the human's way to take
|
|
440
437
|
an approved change out of the work (next section).
|
|
441
438
|
|
|
442
|
-
### Closing a change: `canon
|
|
439
|
+
### Closing a change: `canon changes defer`, `canon changes drop`, `canon changes reopen`
|
|
443
440
|
|
|
444
|
-
Three leaves are the human's, with `
|
|
445
|
-
`
|
|
441
|
+
Three leaves are the human's, with `briefs approve`, `policy approve` and
|
|
442
|
+
`divergences accept`: the human-only leaves are six, and each refuses every
|
|
446
443
|
agent role (`ACTOR_DENIED`) unless it records the answer the human gave you
|
|
447
444
|
(`--relayed-via`). When the human says a change is not wanted or not in this
|
|
448
445
|
release, ask with the harness question tool, count only an explicit answer, then
|
|
449
446
|
record it:
|
|
450
447
|
|
|
451
448
|
```text
|
|
452
|
-
canon
|
|
449
|
+
canon changes defer <change> --reason "<their words>" --ref <link or date> --approver <their name> --relayed-via <the question tool> --actor <your actor id>
|
|
453
450
|
```
|
|
454
451
|
|
|
455
|
-
`canon
|
|
456
|
-
role-planner` has the steps). **Defer** is for "not this release": `canon
|
|
457
|
-
|
|
458
|
-
`brief approve` (the earlier `Approved:` line no longer counts). **Drop** is the
|
|
452
|
+
`canon changes drop <change>` takes the same options (`canon skills get
|
|
453
|
+
role-planner` has the steps). **Defer** is for "not this release": `canon changes reopen <change>` brings it back, and the reopened change needs a new
|
|
454
|
+
`briefs approve` (the earlier `Approved:` line no longer counts). **Drop** is the
|
|
459
455
|
end: a dropped change cannot be reopened (`CHANGE_CONFLICT`, reason `DROPPED`).
|
|
460
456
|
A shipped change cannot be closed (reason `SHIPPED`), a closed one cannot be
|
|
461
457
|
closed again (`CLOSED`) and a change that is not deferred cannot be reopened
|
|
462
458
|
(`NOT_DEFERRED`). The change's evidence, reviews and findings stay as they are
|
|
463
|
-
(`CHANGE_RECORDS_KEPT`). `
|
|
459
|
+
(`CHANGE_RECORDS_KEPT`). `briefs approve` and `scenarios create --flow <F-id> --change
|
|
464
460
|
<change>` on a closed change are refused (reason `CLOSED`).
|
|
465
461
|
|
|
466
462
|
A closed change drops out of the requirements: the subject no longer answers
|
|
@@ -474,37 +470,36 @@ for it and the scenarios only closed changes made are not asked for.
|
|
|
474
470
|
- `canon query --kind change_state --change <change>` reads the current state;
|
|
475
471
|
`--history` adds the records before a reopen.
|
|
476
472
|
|
|
477
|
-
### Starting a new change: `canon
|
|
473
|
+
### Starting a new change: `canon changes create`
|
|
478
474
|
|
|
479
475
|
For a change that does not exist yet, one command writes it and records
|
|
480
476
|
it adopted:
|
|
481
477
|
|
|
482
478
|
```bash
|
|
483
|
-
canon
|
|
479
|
+
canon changes create --id add-login --subject auth --title "Add login"
|
|
484
480
|
```
|
|
485
481
|
|
|
486
482
|
```output
|
|
487
|
-
output: canon
|
|
488
|
-
output: canon
|
|
483
|
+
output: canon changes create: wrote .canon/changes/add-login/brief.md
|
|
484
|
+
output: canon changes create: recorded change `add-login` adopted into subject `auth` — written directly; nothing to promote
|
|
489
485
|
```
|
|
490
486
|
|
|
491
487
|
- **Writes** canon's own change dir, `.canon/changes/<slug>/`, holding
|
|
492
488
|
`brief.md` only: the PRD skeleton (`# <title>`, then the sections intent,
|
|
493
489
|
desired outcome, user flow, step detail, acceptance, questions and
|
|
494
490
|
assumptions, out of scope, each an empty `##` section under its English
|
|
495
|
-
heading; no comment, no hint: `canon
|
|
491
|
+
heading; no comment, no hint: `canon briefs get` and the brief-shape skill
|
|
496
492
|
carry each section's guidance, in the repo's `language:`), so the file
|
|
497
493
|
starts unapproved. The intent section's first paragraph holds the
|
|
498
494
|
title, which imports as the change summary. `--change-kind chore` writes the
|
|
499
495
|
short chore brief instead (intent, category, invariants, checks, out of
|
|
500
|
-
scope; see
|
|
496
|
+
scope; see brief workflow below). No `tasks.md` is written:
|
|
501
497
|
`canon status` lists each flow step's scenarios instead.
|
|
502
498
|
`.canon/changes/` is canon's native plan source: every plan reader
|
|
503
499
|
reads it with no `plans:` entry, so `canon.yaml` needs no edit and no
|
|
504
500
|
external plans source is needed (see `canon-plan-import`).
|
|
505
|
-
- **Reads** the files with the native `canon` plan adapter `canon ingest
|
|
506
|
-
|
|
507
|
-
same write as `canon subject adopt`. Its records carry the actor
|
|
501
|
+
- **Reads** the files with the native `canon` plan adapter `canon ingest-plans` uses, then **records** the change already adopted, through the
|
|
502
|
+
same write as `canon subjects adopt`. Its records carry the actor
|
|
508
503
|
`canon-plan-import-canon` (canon-written); an external openspec
|
|
509
504
|
change's carry `canon-plan-import-openspec`.
|
|
510
505
|
- **What a failure leaves behind.** The files are staged under `.canon/`
|
|
@@ -514,8 +509,7 @@ output: canon change new: recorded change `add-login` adopted into subject `auth
|
|
|
514
509
|
directory created for them: nothing is left behind. The two records
|
|
515
510
|
cannot be written atomically. If the change record fails after the
|
|
516
511
|
subject record was written, the command exits `2`, keeps the change
|
|
517
|
-
dir and that one subject record, and prints the repair, `canon ingest
|
|
518
|
-
plans && canon subject adopt <id> --change <slug>`, which completes
|
|
512
|
+
dir and that one subject record, and prints the repair, `canon ingest-plans && canon subjects adopt <id> --change <slug>`, which completes
|
|
519
513
|
the link and is safe to rerun.
|
|
520
514
|
- **Refuses** with exit `2`, writing nothing, when the subject does not
|
|
521
515
|
exist, or when the slug already has a `.canon/changes/<slug>` dir
|
|
@@ -523,34 +517,34 @@ output: canon change new: recorded change `add-login` adopted into subject `auth
|
|
|
523
517
|
|
|
524
518
|
A `tasks.md` is an optional work note canon never writes and nothing
|
|
525
519
|
gates on. If one exists, rows added as `- [ ] <n> <title>` are flipped with
|
|
526
|
-
`canon
|
|
520
|
+
`canon tasks done <n> --parent <change>` once evidence exists; `canon evidence add
|
|
527
521
|
--task` and the flip read the file as it is, so a new row needs no
|
|
528
|
-
`canon ingest
|
|
522
|
+
`canon ingest-plans` run.
|
|
529
523
|
|
|
530
524
|
A change from an external plan (an openspec change listed under
|
|
531
|
-
`plans.sources`, imported by `canon ingest
|
|
532
|
-
`canon
|
|
525
|
+
`plans.sources`, imported by `canon ingest-plans` and adopted with
|
|
526
|
+
`canon subjects adopt`) gets its brief as a canon file too:
|
|
533
527
|
`.canon/changes/<change>/brief.md` holding a `Source: <path>` line that
|
|
534
528
|
points at the external document and, once the human answers, the
|
|
535
|
-
`Approved:` line that `canon
|
|
529
|
+
`Approved:` line that `canon briefs approve` writes. Canon never edits the external document. Such a
|
|
536
530
|
pointer `brief.md` is not a change of its own: the native reader skips
|
|
537
531
|
it, so the external source keeps the change, its summary and its tasks.
|
|
538
532
|
|
|
539
|
-
**Done when:** `canon
|
|
540
|
-
`change_ids`, and `canon
|
|
533
|
+
**Done when:** `canon subjects get <id>` lists the new change in its
|
|
534
|
+
`change_ids`, and `canon briefs get <slug>` names the next step on its
|
|
541
535
|
brief (`data.next`, `meta.next`).
|
|
542
536
|
|
|
543
|
-
### The brief: `canon
|
|
537
|
+
### The brief: `canon briefs get`, `canon briefs check`, `canon briefs approve`
|
|
544
538
|
|
|
545
539
|
```text
|
|
546
540
|
# state and the next one to three steps; never edits
|
|
547
|
-
canon
|
|
541
|
+
canon briefs get [<slug>]
|
|
548
542
|
# findings; exit 0 clean, 2 blockers, 1 error
|
|
549
|
-
canon
|
|
550
|
-
canon
|
|
543
|
+
canon briefs check [<slug>] [--json]
|
|
544
|
+
canon briefs approve <slug> <slug> --approver <the human> --note "<their words>"
|
|
551
545
|
```
|
|
552
546
|
|
|
553
|
-
`canon
|
|
547
|
+
`canon briefs approve` takes one or more slugs and records the same name, the
|
|
554
548
|
same answer and one timestamp on every brief and on the policy approval
|
|
555
549
|
(0.31). Every slug is checked before anything is written (a brief that
|
|
556
550
|
exists and reads, no blocker, a one-line name and answer, a body that does not
|
|
@@ -563,12 +557,12 @@ leaves the slugs already written approved. The call is human-only for every
|
|
|
563
557
|
slug; the `ACTOR_DENIED` hint gives the human one line with all the slugs.
|
|
564
558
|
|
|
565
559
|
Without the change operand, the repo's only live change is read. The brief is the
|
|
566
|
-
PRD `canon
|
|
560
|
+
PRD `canon changes create` writes; sections are found by their English `##`
|
|
567
561
|
heading, never by a comment. A brief with fewer than two known headings
|
|
568
562
|
(written before 0.19) checks as `brief.legacy`, an advisory, and is read as
|
|
569
563
|
before. A brief with `<!-- canon:… -->` comments or Korean headings is in the
|
|
570
|
-
0.30 format: `
|
|
571
|
-
`canon migrate` rewrites it; `status`, `gate check`, `context` and `
|
|
564
|
+
0.30 format: `briefs check` gives it one blocker (`brief.old-format`) and
|
|
565
|
+
`canon migrate` rewrites it; `status`, `gate check`, `context` and `briefs get`
|
|
572
566
|
warn, and a command that writes and judges it is refused
|
|
573
567
|
(`BRIEF_MIGRATION_REQUIRED`).
|
|
574
568
|
|
|
@@ -587,7 +581,7 @@ warn, and a command that writes and judges it is refused
|
|
|
587
581
|
asides, dates and decision notes, stock vocabulary, Korean endings and
|
|
588
582
|
length budgets, in the normative sections plus Intent and Questions;
|
|
589
583
|
sentence, paragraph and key-sentence rules in normative sections.
|
|
590
|
-
Never an authorship verdict. `canon skills
|
|
584
|
+
Never an authorship verdict. `canon skills get brief-polish` has each rule.
|
|
591
585
|
- **Waivers**: entries of the frontmatter `waive` list (`rule`, `section`,
|
|
592
586
|
`reason`), one rule in one section, reason required; add `match` to waive
|
|
593
587
|
only the findings whose matched text contains it. Listed in the output.
|
|
@@ -603,18 +597,18 @@ warn, and a command that writes and judges it is refused
|
|
|
603
597
|
The optional refinement passes that fix findings before the approval step are
|
|
604
598
|
listed in `role-planner.md` in this directory.
|
|
605
599
|
|
|
606
|
-
A **chore** (`canon
|
|
600
|
+
A **chore** (`canon changes create --change-kind chore`) changes how the subject is
|
|
607
601
|
built or kept, never what it does. Its brief is intent, category,
|
|
608
602
|
invariants, checks, out of scope; it adds no scenarios, and its evidence
|
|
609
603
|
is the subject's suite run again at the chore commit with
|
|
610
|
-
`canon evidence add
|
|
604
|
+
`canon evidence add-all --report <kind>:<path>`. That
|
|
611
605
|
supersedes the old evidence; the pinned reviews stay current while the
|
|
612
606
|
verdicts and checks are the same, so the chore itself is reviewed once with
|
|
613
|
-
`canon
|
|
607
|
+
`canon reviews change <slug>` before it ships. Work that changes
|
|
614
608
|
behavior is a feature change, never a chore.
|
|
615
609
|
|
|
616
|
-
**Done when:** `canon
|
|
617
|
-
unchanged since its approval; the human's `canon
|
|
610
|
+
**Done when:** `canon briefs get <slug>` reports the brief approved and
|
|
611
|
+
unchanged since its approval; the human's `canon briefs approve` is the only
|
|
618
612
|
step that writes it.
|
|
619
613
|
|
|
620
614
|
## Where are we: `canon status`
|
|
@@ -648,7 +642,7 @@ uses, so status and the gate cannot disagree about a gap:
|
|
|
648
642
|
the next transition will require; `N stale review(s)` and `N unsigned
|
|
649
643
|
review(s)` (printed when non-zero) count scenarios whose review went
|
|
650
644
|
stale or whose latest reviews are all `indeterminate`/`unavailable`
|
|
651
|
-
(see `canon-review`), and the `canon
|
|
645
|
+
(see `canon-review`), and the `canon reviews scenario` step names both. With
|
|
652
646
|
`require_review` on, a `warning:` line counts the in-effect reviews that
|
|
653
647
|
predate 0.23 review pinning and wait for `canon migrate`.
|
|
654
648
|
- **Brief** (0.16, 0.17, 0.19) — for each `building`, `verifying` or `shipped`
|
|
@@ -662,7 +656,7 @@ uses, so status and the gate cannot disagree about a gap:
|
|
|
662
656
|
archived one), and only there: a line that starts with `Approved:` (indent allowed), says
|
|
663
657
|
something after it, and sits outside HTML comments (`<!-- … -->`,
|
|
664
658
|
multi-line included) and fenced code blocks (```` ``` ```` or `~~~`).
|
|
665
|
-
`canon
|
|
659
|
+
`canon briefs approve` writes it from the human's answer, as
|
|
666
660
|
`Approved: <who> <when> — "<the human's words>" (code tree <id>) (brief sha256:<digest>)`,
|
|
667
661
|
the digest covering the brief without its `Approved:` lines (the tree marker is outside it; a line without one is read as before). A brief
|
|
668
662
|
edited after that reads `brief: not approved (<brief> changed after its
|
|
@@ -677,7 +671,7 @@ uses, so status and the gate cannot disagree about a gap:
|
|
|
677
671
|
line inside an external `proposal.md` is not read. Before that canon
|
|
678
672
|
file exists, an external openspec `proposal.md` under the plan sources
|
|
679
673
|
(the first source holding the change; with no `plans:` section, the
|
|
680
|
-
`openspec` source rooted at the repo that `canon
|
|
674
|
+
`openspec` source rooted at the repo that `canon tasks done` also falls
|
|
681
675
|
back to) still makes the brief one to answer, and the line reads
|
|
682
676
|
``brief: not approved (.canon/changes/<c>/brief.md does not exist yet:
|
|
683
677
|
change `<c>` comes from the external plan <proposal>, which canon reads
|
|
@@ -685,8 +679,8 @@ uses, so status and the gate cannot disagree about a gap:
|
|
|
685
679
|
canon brief and no line it reads
|
|
686
680
|
``brief: not approved (<brief> has no `Approved:` line)``.
|
|
687
681
|
There is no record kind for it; the file is the record. For a brief in
|
|
688
|
-
the PRD format, `
|
|
689
|
-
(`canon
|
|
682
|
+
the PRD format, `briefs check: <n> blocker(s), <n> advisory(ies)` follows
|
|
683
|
+
(`canon status` names the next step), then, per flow step of the
|
|
690
684
|
change, `flow F1` (with ` — <gaps>` when it has no scenario or no
|
|
691
685
|
failure scenario) and under it each scenario that carries
|
|
692
686
|
`@flow:<change>.F1` with its title, `[failure]` when it is, its
|
|
@@ -696,7 +690,7 @@ uses, so status and the gate cannot disagree about a gap:
|
|
|
696
690
|
(owned scenarios, verdicts, required cases, audits, and, where
|
|
697
691
|
`require_review` covers `shipped`, reviews and open blockers under
|
|
698
692
|
`block_on_findings`; a gap its waiver recorded is not counted), prints
|
|
699
|
-
``gate: red — <n> <class> (first: <subject>), …; reopen with `canon
|
|
693
|
+
``gate: red — <n> <class> (first: <subject>), …; reopen with `canon subjects move <id> --to verifying --reason "<why it reopens>" --actor <unit>` ``,
|
|
700
694
|
carries `red: [...]` in `--json`, and that reopen is its only `next:`
|
|
701
695
|
step. Open blockers count against every subject a change belongs to.
|
|
702
696
|
- **Unowned** — scenarios with no `@subject:` tag.
|
|
@@ -712,33 +706,33 @@ uses, so status and the gate cannot disagree about a gap:
|
|
|
712
706
|
reason (see `canon-gate`).
|
|
713
707
|
- **`next:`** — at most five steps, each with a one-line reason; the
|
|
714
708
|
rest are counted. Rules, in order: no `canon.yaml` → `canon init`; an
|
|
715
|
-
unreadable one → `canon init
|
|
716
|
-
subject that has no record → `canon
|
|
717
|
-
at all → `canon
|
|
709
|
+
unreadable one → `canon init-check`; a scenario tagged with a
|
|
710
|
+
subject that has no record → `canon subjects create --id <that id>`; no subject
|
|
711
|
+
at all → `canon subjects create`; subjects and `.feature` scenarios but no
|
|
718
712
|
scenario records → `canon inventory sync` (status reads the index as a
|
|
719
713
|
refresh would leave it, so this means the refresh would be refused on a
|
|
720
714
|
format violation or a duplicate id, which the sync names). Then per subject, verifying
|
|
721
715
|
first, then building, specced, proposed, shipped: an unapproved brief
|
|
722
716
|
(building and later, and proposed once its change has a brief)
|
|
723
717
|
→ the human step below, which is then the subject's
|
|
724
|
-
only step; no scenario → `canon
|
|
725
|
-
`.feature` file holds a scenario yet, `canon
|
|
726
|
-
every subject waits on its brief); a missing case → `canon
|
|
718
|
+
only step; no scenario → `canon scenarios create --subject <id>` (and, when no
|
|
719
|
+
`.feature` file holds a scenario yet, `canon features create` first, unless
|
|
720
|
+
every subject waits on its brief); a missing case → `canon scenarios create
|
|
727
721
|
<surface>.<nn> --title "<what happens on this path>" --subject <id> --case <case>`; (building and later) an
|
|
728
722
|
unevidenced or divergent scenario → `canon evidence add --scenario <id>
|
|
729
723
|
--project <root> --class test-run --role implementer --ref "<test command>"` (its reason adds "then `canon gate promote`" only under
|
|
730
|
-
`write.promote: manual`); an open blocker → `canon
|
|
731
|
-
due, unreviewed, evidenced scenario → `canon
|
|
732
|
-
session; none of these → `canon
|
|
724
|
+
`write.promote: manual`); an open blocker → `canon findings close <change>`; a
|
|
725
|
+
due, unreviewed, evidenced scenario → `canon reviews scenario <id>` from another
|
|
726
|
+
session; none of these → `canon subjects move <id> --to <next status>`.
|
|
733
727
|
Last, unowned scenarios → `canon status`, after tagging them in their
|
|
734
728
|
`.feature` files (status re-indexes the edit; no sync step). With more
|
|
735
|
-
than one `specs.roots[]` entry, every suggested `canon
|
|
729
|
+
than one `specs.roots[]` entry, every suggested `canon scenarios create`
|
|
736
730
|
carries `--project`: the owning root for a missing case, `<root-id>`
|
|
737
731
|
(the reason lists the roots) for a subject that owns no scenario yet.
|
|
738
732
|
- **The one human step.** Every step is the agent's to run except one,
|
|
739
|
-
and it comes only once the brief is clean: while `canon
|
|
733
|
+
and it comes only once the brief is clean: while `canon briefs check
|
|
740
734
|
<slug>` has blockers, the subject gets the planner step
|
|
741
|
-
`write the brief: canon
|
|
735
|
+
`write the brief: canon briefs check <slug> lists N blockers`
|
|
742
736
|
(`role: planner`) instead. A subject whose brief is enforced (its
|
|
743
737
|
newest change's canon
|
|
744
738
|
`brief.md` has no `Approved:` line, or it has no canon `brief.md` yet
|
|
@@ -750,16 +744,16 @@ uses, so status and the gate cannot disagree about a gap:
|
|
|
750
744
|
and the approval is never assumed: `canon evidence add` refuses <id>'s
|
|
751
745
|
scenarios and tasks until it is recorded; once the human answers,
|
|
752
746
|
<record> (one call records the brief and the policy approval)``, where
|
|
753
|
-
`<record>` is ``record their words with `canon
|
|
747
|
+
`<record>` is ``record their words with `canon briefs approve
|
|
754
748
|
<c> --approver <the human> --note "<their words>"` ``, or, for an external
|
|
755
749
|
change, ``create <brief> holding a `Source: <proposal>` line, then
|
|
756
|
-
record their words with `canon
|
|
750
|
+
record their words with `canon briefs approve <c> --approver <the
|
|
757
751
|
human> --note "<their words>"` ``; for a brief edited after its
|
|
758
|
-
approval, ``re-approve with `canon
|
|
752
|
+
approval, ``re-approve with `canon briefs approve <c>` ``.
|
|
759
753
|
It is the subject's only step, whatever its status: nothing suggests
|
|
760
|
-
`canon
|
|
754
|
+
`canon features create`, `canon scenarios create`, `canon evidence add`, a
|
|
761
755
|
review or a move-on for it before the human answers, and
|
|
762
|
-
`canon
|
|
756
|
+
`canon subjects move <id> --to shipped` refuses on the same check. The
|
|
763
757
|
approval is never assumed. A subject with no brief to answer gets no human step;
|
|
764
758
|
its `brief:` line says
|
|
765
759
|
`not approved (no adopted change; advisory, nothing to approve yet)` or
|
|
@@ -767,7 +761,7 @@ uses, so status and the gate cannot disagree about a gap:
|
|
|
767
761
|
approve yet)`` and nothing is withheld (a `proposed` subject with no
|
|
768
762
|
brief, and a `specced` subject, show no `brief:` line at all). Once nothing blocks, a
|
|
769
763
|
ship-ready verifying subject gets the agent's own
|
|
770
|
-
`canon
|
|
764
|
+
`canon subjects move <id> --to shipped`; status never asks a human to ship.
|
|
771
765
|
|
|
772
766
|
Status fails closed rather than suggest progress the gate would refuse:
|
|
773
767
|
|
|
@@ -802,21 +796,21 @@ first, with `data.nextOmitted` counting what was cut and `data.waitingOn`
|
|
|
802
796
|
|
|
803
797
|
```json
|
|
804
798
|
"next": [
|
|
805
|
-
{ "
|
|
806
|
-
{ "
|
|
807
|
-
{ "
|
|
799
|
+
{ "operation": "briefs.get", "arguments": { "id": "c-promo" }, "reason": "promo: the brief is not approved; build and attest nothing for promo until the human answers", "x-canon": { "actor": "human" } },
|
|
800
|
+
{ "operation": "gate.check", "reason": "cart: 1 open blocker finding(s); fix it, commit, then close it with `canon findings close`", "x-canon": { "actor": "agent", "role": "implementer" } },
|
|
801
|
+
{ "operation": "status", "reason": "1 scenario(s) carry no @subject tag (first: cart.promo.01); add `@subject:<id>` above each in its .feature file, then check again", "x-canon": { "actor": "agent", "role": "planner" } }
|
|
808
802
|
]
|
|
809
803
|
```
|
|
810
804
|
|
|
811
|
-
`
|
|
812
|
-
|
|
805
|
+
`operation` is the operation id (`briefs.get` is `canon briefs get`) and `arguments` the argument
|
|
806
|
+
names in camelCase with their values, operands included (`id`); an entry with none is the bare call.
|
|
807
|
+
The call carries `--json` when you called in JSON mode. Every next entry is
|
|
813
808
|
runnable as it stands: guidance that needs a value only you know (an actor id,
|
|
814
809
|
a session, the human's words) is not a next entry, it is in the error `hint`
|
|
815
810
|
or the report text. On a repository that still holds 0.27 canon state,
|
|
816
811
|
`canon status` warns (`data.warnings`, `meta.warnings` as `[{code, message}]`) and puts `canon
|
|
817
812
|
migrate --json` first in `meta.next`: run `canon migrate`, then `canon
|
|
818
|
-
migrate --commit --plan-digest <digest from the preview>`, then `canon
|
|
819
|
-
skills install`.
|
|
813
|
+
migrate --commit --plan-digest <digest from the preview>`, then `canon skills-install`.
|
|
820
814
|
|
|
821
815
|
Each `missingCases` entry is `{ "projectId", "surface", "case" }`: the
|
|
822
816
|
spec root, the `<area>.<surface>`, and the required case it lacks.
|
|
@@ -837,7 +831,7 @@ line, or, before that file exists, the external `proposal.md`; omitted for a
|
|
|
837
831
|
canon-written change); `approval` the text after `Approved:`; `enforced`
|
|
838
832
|
whether the missing approval blocks (a brief exists to answer);
|
|
839
833
|
`legacyApproval` that the `Approved:` line carries no digest; and `findings`,
|
|
840
|
-
`{ "blockers", "advisories" }` from `canon
|
|
834
|
+
`{ "blockers", "advisories" }` from `canon briefs check` (PRD briefs only).
|
|
841
835
|
A subject with no such change has one entry, its newest adopted change, with no
|
|
842
836
|
`reason` (or, adopting none, an entry with no `change`). `pendingDrafts` lists
|
|
843
837
|
only the pending drafts, and `flow` lists each flow step of every tagged
|
|
@@ -845,8 +839,7 @@ change as `{ "id", "change", "scenarios": [{ id, title, failure, evidenced,
|
|
|
845
839
|
review }], "gaps" }`.
|
|
846
840
|
|
|
847
841
|
`setAsideChanges` and `setAsideScenarios` (0.42) are present only for a subject
|
|
848
|
-
that has them: the changes a human closed with `canon
|
|
849
|
-
change drop` that the subject adopted (`change`, `state` `deferred` or
|
|
842
|
+
that has them: the changes a human closed with `canon changes defer` or `canon changes drop` that the subject adopted (`change`, `state` `deferred` or
|
|
850
843
|
`dropped`, `reason`, `refs`, `approver`, `at`), and the scenarios only closed
|
|
851
844
|
changes made (`scenario`, `project`, `changes`). No check asks for either.
|
|
852
845
|
|
|
@@ -863,7 +856,7 @@ in 0.16, when `next[].command` stopped always being a command line
|
|
|
863
856
|
`brief` object became the `briefs` list.
|
|
864
857
|
The two set-aside fields are additions: `statusVersion` stays `4`.
|
|
865
858
|
|
|
866
|
-
`
|
|
859
|
+
`subjects create`, `adopt`, `unadopt` and `move` write their records directly; the
|
|
867
860
|
human-readable success line ends `— written directly; nothing to
|
|
868
861
|
promote` (`--json` prints the record and nothing else).
|
|
869
862
|
|