@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.
- 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
|
@@ -27,7 +27,7 @@ Every violation carries one of these stable, grep-able strings:
|
|
|
27
27
|
| `stale-evidence` | A passing record degraded to stale: a path that changed since its `evidence_sha` matches its declared surface (`--surface-ref`, a path pattern read from the repository root; the detail names the declarations and paths that matched), or HEAD moved past `staleness.max_commits_behind`. Only degrades an already-green record. Also: a file bound to a latest evidence record whose bytes are gone — no intact blob in `.canon/artifacts/sha256/` and no working-tree copy with the recorded digest — or a file bound to an in-effect review with no intact blob (see Bound evidence stays provable below). |
|
|
28
28
|
| `malformed-evidence` | A candidate record doesn't parse, is misfiled, or carries an unparseable interim tag. Malformed evidence is no evidence. |
|
|
29
29
|
| `flagged` | The human-only `flagged` overlay is set — never green regardless of passing evidence. |
|
|
30
|
-
| `unevidenced-flip` | `canon
|
|
30
|
+
| `unevidenced-flip` | `canon tasks done <n> --parent <change>` was asked to flip a checkbox with no matching, non-`Divergent` evidence record. |
|
|
31
31
|
| `fabricated-evidence` | An evidence note contains a blocklisted marker (`"would pass"`, `"TBD"`, `"n/a"`) standing as a whole word — never inside a path, a file name, a URL or a longer word, so `pack.json/atlas` is not `n/a` — or a bare `verified` claim with no attached command result. `canon evidence add` refuses such a note before writing (refused with `fabricated-evidence`, `EVIDENCE_NOTE_INVALID`, exit 2). |
|
|
32
32
|
| `open-blocker` | With `spec_coverage.require_review` set (and `block_on_findings`, the default), a Finding whose latest version is severity `blocker`, disposition `open`, on a change an in-scope subject adopted — or closed `fixed` while an evidenced scenario of the subject has no evidence recorded after the close (re-verification). Subject string `<change_id>#<round>.<seq>`. See `canon-review`. |
|
|
33
33
|
| `false-success` | The latest audit record (`canon evidence audit`) of a scenario says `refuted`: an external evaluator found a counterexample to the claimed success. Always on, regardless of policy or sampling, and takes precedence over any declared faithful verdict; only a newer audit (`confirmed` or `indeterminate`) clears it. The detail names the evaluator, its version, its sha256 and the counterexample paths. |
|
|
@@ -63,8 +63,7 @@ the gate fails closed: the violation is reported and the exit is `1` (see
|
|
|
63
63
|
On a repository that still holds 0.27 canon state, `canon gate check` (like
|
|
64
64
|
`canon status` and `canon context`) warns and puts `canon migrate --json`
|
|
65
65
|
first in `meta.next`: run `canon migrate` (a preview), then `canon migrate
|
|
66
|
-
--commit --plan-digest <digest from the preview>`, then `canon skills
|
|
67
|
-
install`. Read the whole result with `--json`: `data.violations` lists the
|
|
66
|
+
--commit --plan-digest <digest from the preview>`, then `canon skills-install`. Read the whole result with `--json`: `data.violations` lists the
|
|
68
67
|
failures by class and `meta.next` the steps.
|
|
69
68
|
|
|
70
69
|
**Done when:** `canon gate check` exits `0` with no violation; `canon status`
|
|
@@ -75,7 +74,7 @@ stale (a `.feature` file added, edited or deleted since the last sync) is
|
|
|
75
74
|
graded as the refresh would leave it, built in memory from the changed
|
|
76
75
|
files with the code `canon inventory sync` runs; the index on disk is
|
|
77
76
|
brought up to date by the next command that writes (`canon evidence add`,
|
|
78
|
-
`canon
|
|
77
|
+
`canon reviews scenario`, `canon subjects move`) or by `canon inventory sync`.
|
|
79
78
|
It prints no refresh line.
|
|
80
79
|
|
|
81
80
|
A root that fails to sync (format violations, a duplicate id) cannot be
|
|
@@ -153,12 +152,12 @@ A present section, even `require_evidence: false` or a malformed one
|
|
|
153
152
|
case). This is the gap evidence presence cannot see: every scenario
|
|
154
153
|
attested, none of them specifying a refusal. Untagged scenarios satisfy
|
|
155
154
|
no case, so an unclassified corpus is reported, not passed. Works with
|
|
156
|
-
`require_evidence: false` too. `canon
|
|
155
|
+
`require_evidence: false` too. `canon subjects move <id> --to shipped`
|
|
157
156
|
applies the same rule to the scenarios the subject owns.
|
|
158
157
|
- **Independent review** (`require_review`) — scenarios whose subject is
|
|
159
158
|
in `require_review.scope` (default `[verifying, shipped]`; `[]` = every
|
|
160
159
|
scenario; independent of `scope` above) need a `Review` record
|
|
161
|
-
(`canon
|
|
160
|
+
(`canon reviews scenario`) whose latest version per reviewer is `signed`,
|
|
162
161
|
still matches the scenario digest and latest evidence it pinned
|
|
163
162
|
(a review written before 0.15 has no pins and skips this check), and,
|
|
164
163
|
when `distinct_actor` (default `true`), is by a reviewer and actor
|
|
@@ -230,7 +229,7 @@ report such files.
|
|
|
230
229
|
### Accepted divergence and re-verification
|
|
231
230
|
|
|
232
231
|
```bash
|
|
233
|
-
canon
|
|
232
|
+
canon divergences accept cart.add.01 --project root --reason "known gap" --tracking "issue#12" --expiry 2026-12-31 --actor reviewer-2 --role reviewer --session review-session-1
|
|
234
233
|
```
|
|
235
234
|
|
|
236
235
|
Accepting a scenario whose latest evidence is `divergent` as a known gap
|
|
@@ -252,18 +251,18 @@ Re-verification is one rule with two triggers: a blocker whose latest
|
|
|
252
251
|
disposition is `fixed`, and a chore change once approved, keep the subject
|
|
253
252
|
from shipping until every one of its evidenced scenarios has evidence
|
|
254
253
|
recorded after the close or the approval. A blocker that names its
|
|
255
|
-
scenarios (`
|
|
254
|
+
scenarios (`findings create --scenario`) asks only those, and the refusal
|
|
256
255
|
names them with the per-scenario command (`canon evidence add --project
|
|
257
256
|
<root-id> --scenario <id> --report <format>:<path>` plus `--class`, `--role` and `--ref`). Otherwise the
|
|
258
|
-
refusal names the scenarios and the batch command: `canon evidence add --project <root-id>
|
|
259
|
-
--
|
|
257
|
+
refusal names the scenarios and the batch command: `canon evidence add-all --project <root-id>
|
|
258
|
+
--report <format>:<path> --class test-run --role
|
|
260
259
|
implementer --ref "<test command>"`. Reviews pin what the evidence says
|
|
261
260
|
(its verdict and the identity of its checks), not which record it is, so
|
|
262
261
|
recording the suite again with the same verdicts from the same cases leaves
|
|
263
262
|
every scenario review current. A chore instead needs one change-level
|
|
264
|
-
review of the chore itself (`canon
|
|
263
|
+
review of the chore itself (`canon reviews change <slug>`) before
|
|
265
264
|
`--to shipped`; a changed verdict or case set stales that scenario's
|
|
266
|
-
review as before (and a new `
|
|
265
|
+
review as before (and a new `divergences accept`, where the gap remains).
|
|
267
266
|
|
|
268
267
|
A chore's approval records the code tree of the work tree at that moment, as
|
|
269
268
|
`(code tree <id>)` in its `Approved:` line (outside the brief digest; none
|
|
@@ -295,7 +294,7 @@ belongs in the scope of every scenario that depends on it.
|
|
|
295
294
|
A key none of whose patterns matches a file of the current code tree declares no
|
|
296
295
|
scope (a misspelt `Core/**` never exempts; matching is byte-exact), and an empty
|
|
297
296
|
list is malformed, so that scenario follows the rule above; both are warned.
|
|
298
|
-
`canon
|
|
297
|
+
`canon briefs approve` records the policy approval in its own call except when
|
|
299
298
|
the policy's `code_scopes` differs from the last approved policy's: then it
|
|
300
299
|
approves the brief only, leaves the policy approval stale (the gate fails closed
|
|
301
300
|
until a human reads the scopes and runs `canon policy approve`) and names the
|
|
@@ -330,7 +329,7 @@ canon evidence audit cart.add.01 --project root \
|
|
|
330
329
|
- Audits fold apart: per `(project_id, scenario_id)` there is a latest
|
|
331
330
|
declared record and a latest audit. An audit never becomes the
|
|
332
331
|
scenario's latest declared verdict.
|
|
333
|
-
- `canon
|
|
332
|
+
- `canon subjects move <id> --to shipped` refuses `false-success`, and an
|
|
334
333
|
owed sampled audit when `require_audit.scope` covers `shipped`.
|
|
335
334
|
- `canon status` shows an `audits` section (sampled / confirmed / owed /
|
|
336
335
|
refuted) and suggests `canon evidence audit` in `next:`.
|
|
@@ -340,7 +339,7 @@ canon evidence audit cart.add.01 --project root \
|
|
|
340
339
|
`canon evidence add` binds exactly the files the write names
|
|
341
340
|
(`--artifact`, `--report`, `--report-case`). Nothing is carried forward
|
|
342
341
|
from an earlier record, in a single add or in a suite batch
|
|
343
|
-
(
|
|
342
|
+
(`canon evidence add-all`), and no drop is recorded: history keeps the earlier
|
|
344
343
|
records, and a new record is reviewed on its own files. An audit
|
|
345
344
|
(`canon evidence audit`) replaces a refutation the same way, so a counterexample
|
|
346
345
|
never rides along into a confirming audit. `--drop-attachment` and
|
|
@@ -363,8 +362,8 @@ check `canon status` and the ship guard use; see
|
|
|
363
362
|
`--task`:
|
|
364
363
|
|
|
365
364
|
```stderr
|
|
366
|
-
stderr: canon evidence add: unreviewed-promotion demo-subject — evidence for world.demo.01: brief not approved — .canon/changes/c-demo/brief.md has no `Approved:` line, so the human has not answered it; once they do, record their words with `canon
|
|
367
|
-
stderr: canon evidence add: refused — stop and get the human's answer to the brief: nothing is built or attested for a subject before its brief is approved. Show it (`canon
|
|
365
|
+
stderr: canon evidence add: unreviewed-promotion demo-subject — evidence for world.demo.01: brief not approved — .canon/changes/c-demo/brief.md has no `Approved:` line, so the human has not answered it; once they do, record their words with `canon briefs approve c-demo --approver <the human> --note "<their words>"`
|
|
366
|
+
stderr: canon evidence add: refused — stop and get the human's answer to the brief: nothing is built or attested for a subject before its brief is approved. Show it (`canon briefs get <change> --body`), ask with the harness question tool, and on their explicit approval record it with `canon briefs approve --approver <their name> --note "<their words>" --relayed-via <the question tool> --actor <your actor id> --digest <change>=<the digest shown>` (or they approve on `canon dashboard`); never unset your role to run it; to attest anyway, pass --override-reason <text>, which is recorded on the evidence record
|
|
368
367
|
```
|
|
369
368
|
|
|
370
369
|
For a change from an external plan with no canon brief yet, the first
|
|
@@ -374,13 +373,13 @@ openspec/changes/c-ext/proposal.md, which canon reads and never edits, so
|
|
|
374
373
|
its approval lives in that canon file, so the human has not answered it;
|
|
375
374
|
once they do, create .canon/changes/c-ext/brief.md holding a `Source:
|
|
376
375
|
openspec/changes/c-ext/proposal.md` line, then record their words with
|
|
377
|
-
`canon
|
|
376
|
+
`canon briefs approve c-ext --approver <the human> --note "<their words>"` ``. An `Approved:` line in the
|
|
378
377
|
external `proposal.md` itself is never read.
|
|
379
378
|
|
|
380
379
|
A subject with no brief to answer (no adopted change, or a newest change
|
|
381
380
|
with neither a canon `brief.md` nor an external `proposal.md`) and a
|
|
382
381
|
scenario no subject owns are unaffected.
|
|
383
|
-
`canon
|
|
382
|
+
`canon reviews scenario` and `canon findings create` are never refused.
|
|
384
383
|
`--override-reason "<one line>"` attests anyway, prints the `waived …`
|
|
385
384
|
lines and `override recorded by `<actor>` for the N brief refusal(s)
|
|
386
385
|
above: <reason>`, and records on the evidence record:
|
|
@@ -397,7 +396,7 @@ Under `--json` the same waiver is `data.overrides[]` (`code` of the waived
|
|
|
397
396
|
refusal, `reason` verbatim), so a caller sees what its `--override-reason`
|
|
398
397
|
let through; a repeat of an identical record is `unchanged`
|
|
399
398
|
(`data.unchanged`) and records no second override. `--override-reason`
|
|
400
|
-
exists on `
|
|
399
|
+
exists on `subjects move` too (see `canon-subject`).
|
|
401
400
|
|
|
402
401
|
A blank or multi-line reason exits 2; an override when nothing refused is
|
|
403
402
|
not recorded. `canon status` lists each such record as a `warning:`, and
|
|
@@ -410,7 +409,7 @@ brief overrides: 1 evidence record(s) attested before their brief was approved
|
|
|
410
409
|
|
|
411
410
|
### Review-waiver advisories
|
|
412
411
|
|
|
413
|
-
A subject moved into a review-scoped status with `canon
|
|
412
|
+
A subject moved into a review-scoped status with `canon subjects move <id> --to <state>
|
|
414
413
|
--override-reason` (see `canon-subject`) keeps the `unreviewed-promotion`
|
|
415
414
|
and `open-blocker` gaps its waiver recorded visible without failing the
|
|
416
415
|
gate. Only those exact `(class, subject)` pairs are waived; a gap that
|
|
@@ -424,14 +423,14 @@ review waivers: 1 advisory(ies) — not failing the gate:
|
|
|
424
423
|
|
|
425
424
|
The waiver lasts only until the subject's next status write.
|
|
426
425
|
|
|
427
|
-
`canon
|
|
426
|
+
`canon subjects move <id> --to shipped` also refuses where a brief exists and
|
|
428
427
|
is not approved (a change the subject answers for, that is one a scenario of
|
|
429
428
|
the subject is tagged `@flow:<change>.*` for, one with an `Approved:` line,
|
|
430
429
|
or a chore, has a canon
|
|
431
430
|
`brief.md` with no `Approved:` line or one the brief's text no longer
|
|
432
431
|
matches, or an external `proposal.md` and no canon `brief.md` yet;
|
|
433
432
|
see `canon-subject`), as an `unreviewed-promotion` naming
|
|
434
|
-
the subject, and while `canon
|
|
433
|
+
the subject, and while `canon briefs check` has structure blockers or a
|
|
435
434
|
flow step has no scenario or no failure scenario (the coverage rules gate
|
|
436
435
|
shipping, never approval). With no brief to answer it prints an advisory
|
|
437
436
|
and does not refuse. Like the evidence refusal above, it is a backstop:
|
|
@@ -546,7 +545,7 @@ not close it.
|
|
|
546
545
|
One test run proves many scenarios. Bind it once:
|
|
547
546
|
|
|
548
547
|
```bash
|
|
549
|
-
canon evidence add --project root
|
|
548
|
+
canon evidence add-all --project root \
|
|
550
549
|
--report junit:target/nextest/default/junit.xml \
|
|
551
550
|
--class test-run --ref "cargo nextest run" --role implementer
|
|
552
551
|
```
|
|
@@ -584,17 +583,17 @@ scenarios a brief holds (`heldScenarios`). Each record binds only what the
|
|
|
584
583
|
batch names (nothing is carried forward).
|
|
585
584
|
`--scenario`, `--task`,
|
|
586
585
|
`--report-case`, `canon evidence audit` and the approval flags name one subject
|
|
587
|
-
and are refused with
|
|
586
|
+
and are refused with `canon evidence add-all`.
|
|
588
587
|
|
|
589
588
|
A task's evidence with `--report` and no `--scenario` binds EVERY case
|
|
590
589
|
in the report, so a `faithful` verdict needs all of them to pass.
|
|
591
590
|
|
|
592
591
|
Many records at once without a report: `--input` takes inline JSON, a file
|
|
593
592
|
or `-`; an array (or NDJSON) is a batch, validated element by element before
|
|
594
|
-
the first write (a refusal writes nothing, exit 2). Keys are the
|
|
595
|
-
names in camelCase
|
|
596
|
-
`scenario`, `class`, `ref` and `role`. `canon schema evidence
|
|
597
|
-
shows `input` (its limits and a complete `example`) and `canon schema evidence
|
|
593
|
+
the first write (a refusal writes nothing, exit 2). Keys are the argument
|
|
594
|
+
names in camelCase: one object per scenario, with
|
|
595
|
+
`scenario`, `class`, `ref` and `role`. `canon schema evidence.add --json`
|
|
596
|
+
shows `input` (its limits and a complete `example`) and `canon schema evidence.add --schemas --json`
|
|
598
597
|
gives `Input`, the schema of one document. Each element reports `written`,
|
|
599
598
|
`unchanged` or `failed` in `data.items[]`.
|
|
600
599
|
|
|
@@ -617,7 +616,7 @@ small number you can see. Nothing of this is recorded unless the batch is a
|
|
|
617
616
|
CI run:
|
|
618
617
|
|
|
619
618
|
```bash
|
|
620
|
-
canon evidence add --project root --
|
|
619
|
+
canon evidence add-all --project root --from-ci \
|
|
621
620
|
--ref "cargo nextest run --workspace --profile ci" \
|
|
622
621
|
--report junit:target/nextest/ci/junit.xml --role implementer --promote
|
|
623
622
|
```
|
|
@@ -632,7 +631,7 @@ set) and gives every record of the batch the same `ci` block: `provider`
|
|
|
632
631
|
canon bound), `workflow` and `job`, and `reports`: one entry per report file
|
|
633
632
|
with its digest and counts, a report that matched no scenario included. It is
|
|
634
633
|
never implied: without `--from-ci` a record names no run, in CI or not. It
|
|
635
|
-
needs
|
|
634
|
+
needs `canon evidence add-all` and an explicit `--ref` (the command line that ran the
|
|
636
635
|
suite: the default, the report path, names no suite) and refuses `--rev` and
|
|
637
636
|
`--verdict` (`EVIDENCE_ARGUMENT_CONFLICT`). Outside GitHub Actions it is
|
|
638
637
|
`CI_ENV_REQUIRED`, naming the variable (exit 2). On a work tree whose code
|
|
@@ -678,7 +677,7 @@ jobs:
|
|
|
678
677
|
- if: always()
|
|
679
678
|
run: |
|
|
680
679
|
canon inventory sync
|
|
681
|
-
canon evidence add --project root --
|
|
680
|
+
canon evidence add-all --project root --from-ci \
|
|
682
681
|
--ref "cargo nextest run --workspace --profile ci" \
|
|
683
682
|
--report junit:target/nextest/ci/junit.xml \
|
|
684
683
|
--role implementer --promote
|
|
@@ -712,7 +711,7 @@ current pinned review saw, `canon evidence add` prints one line per
|
|
|
712
711
|
review it makes stale (its verdict or checks differ from what the review saw), with the command that re-pins it:
|
|
713
712
|
|
|
714
713
|
```stderr
|
|
715
|
-
stderr: canon evidence add: review by `reviewer-2` of cart.add.01 is now stale (this record's verdict or checks differ from what it saw); re-pin it: canon
|
|
714
|
+
stderr: canon evidence add: review by `reviewer-2` of cart.add.01 is now stale (this record's verdict or checks differ from what it saw); re-pin it: canon reviews scenario cart.add.01 --project root --actor reviewer-2 --role reviewer --original-spec-ref specs/kind=feature/area=cart/add.feature
|
|
716
715
|
```
|
|
717
716
|
|
|
718
717
|
The decision is the gate's own (the same stale-review rule `canon gate
|
|
@@ -721,7 +720,7 @@ session, provenance ref, runtime labels and artifacts, at the default
|
|
|
721
720
|
`--rev` (`HEAD`). A record that is only staged says
|
|
722
721
|
the review "goes stale once this evidence is promoted": promote first,
|
|
723
722
|
then re-review. The reviewer re-reviews before re-pinning; several
|
|
724
|
-
scenarios re-review in one `canon
|
|
723
|
+
scenarios re-review in one `canon reviews scenario` (see `canon-review`).
|
|
725
724
|
|
|
726
725
|
**Done when:** `canon gate check` reports no stale review for the scenarios
|
|
727
726
|
you recorded evidence for; the re-review's own output says `pinned`.
|
|
@@ -737,10 +736,10 @@ raise the limit with `--max-artifact-mib <N>`.
|
|
|
737
736
|
|
|
738
737
|
Where those bytes live is `canon.yaml`'s `storage.attachments`: `git` (the
|
|
739
738
|
default) keeps the directory above git-tracked, `lfs` has git LFS store the
|
|
740
|
-
blobs. With `lfs`, `evidence add`, `
|
|
739
|
+
blobs. With `lfs`, `evidence add`, `reviews scenario --artifact` and `artifacts
|
|
741
740
|
store` write bytes only when git-lfs is installed and exit 2 with
|
|
742
741
|
`ARTIFACTS_STORE_REQUIRED` otherwise. `canon gate check` and `canon artifacts
|
|
743
|
-
verify
|
|
742
|
+
verify` read the directory (`artifacts verify` re-hashes every blob). A blob file
|
|
744
743
|
that is an LFS pointer is bytes not received: `artifacts verify` reports it as
|
|
745
744
|
`lfs_pointer` and the gate counts the attachment as a violation; run `git lfs
|
|
746
745
|
pull`. `canon artifacts prune` (a preview;
|
|
@@ -776,7 +775,7 @@ subject's status, and a repo with no `spec_coverage` would otherwise never
|
|
|
776
775
|
have its bindings checked. A superseded record is not checked —
|
|
777
776
|
re-attesting is the fix.
|
|
778
777
|
|
|
779
|
-
Files bound to a review (`canon
|
|
778
|
+
Files bound to a review (`canon reviews scenario --artifact`, see
|
|
780
779
|
`canon-review`) are checked by the same rule for every CURRENT in-effect
|
|
781
780
|
review: the latest per `(project_id, scenario_id, reviewer)`, less any
|
|
782
781
|
that went stale against its scenario (its spec or evidence pin moved). A stale review is
|
|
@@ -853,10 +852,10 @@ Malformed `risk_tiers` sections produce a stable `uncovered-cell` policy
|
|
|
853
852
|
violation (`risk_tiers policy-invalid: ...`) instead of degrading to an
|
|
854
853
|
empty clean map.
|
|
855
854
|
|
|
856
|
-
## `canon
|
|
855
|
+
## `canon tasks done <n> --parent <change> [--repo <dir>]`
|
|
857
856
|
|
|
858
857
|
For imported external plans, and for a `tasks.md` that already exists in
|
|
859
|
-
a canon change. `canon
|
|
858
|
+
a canon change. `canon changes create` writes no `tasks.md` (0.19), and
|
|
860
859
|
nothing gates on one: a canon-owned change is covered by its flow steps'
|
|
861
860
|
scenarios (`canon status`).
|
|
862
861
|
|
|
@@ -871,8 +870,8 @@ default `[{ dialect: openspec, root: <repo> }]`; no source locating the
|
|
|
871
870
|
task at all is a loud failure naming every source consulted. A repo with
|
|
872
871
|
no `.canon/changes/` and `sources: []` is refused: "this repo configures
|
|
873
872
|
no plan sources (no `.canon/changes` and no `plans.sources` entries in
|
|
874
|
-
canon.yaml) … write the change with `canon
|
|
875
|
-
external plans under `plans.sources`" (`canon
|
|
873
|
+
canon.yaml) … write the change with `canon changes create`, or list your
|
|
874
|
+
external plans under `plans.sources`" (`canon runs create --task` says the
|
|
876
875
|
same).
|
|
877
876
|
It requires
|
|
878
877
|
a matching non-`Divergent` evidence record, and flips `- [ ]` → `- [x]`
|
|
@@ -885,8 +884,8 @@ note on any of the task's records — leaves the row byte-unchanged and
|
|
|
885
884
|
exits `2` with the blocking violation on stderr. After a flip, the plan
|
|
886
885
|
source is re-ingested so the record store's task status agrees with the
|
|
887
886
|
checkbox (`canon query --kind task` reads `done`); a failed re-ingest is
|
|
888
|
-
a stderr warning naming `canon ingest
|
|
889
|
-
The success line is `canon
|
|
887
|
+
a stderr warning naming `canon ingest-plans`, never a failed flip.
|
|
888
|
+
The success line is `canon tasks done: <task_id> flipped — written
|
|
890
889
|
directly; nothing to promote`. An already-`[x]` row is an idempotent no-op (exit `0`). An unknown
|
|
891
890
|
`task_id` is reported (exit `1`).
|
|
892
891
|
|
|
@@ -899,14 +898,14 @@ proves the task (`canon evidence add --task <id> --artifact <path>` or
|
|
|
899
898
|
records, so it is never the proof of a task.
|
|
900
899
|
|
|
901
900
|
```bash
|
|
902
|
-
canon
|
|
901
|
+
canon tasks done 5.2 --parent my-change --repo .
|
|
903
902
|
```
|
|
904
903
|
|
|
905
904
|
This is canon's own authority for the checkbox grammar — always flip
|
|
906
|
-
through `canon
|
|
905
|
+
through `canon tasks done`, never by hand.
|
|
907
906
|
|
|
908
907
|
Canon only reads external plans, with this one exception: for a task
|
|
909
|
-
from an external plan source, `canon
|
|
908
|
+
from an external plan source, `canon tasks done` flips the checkbox in
|
|
910
909
|
that plan's own `tasks.md` (or plan document). It is the one place canon
|
|
911
910
|
writes into an external plan; their briefs and approvals still live in
|
|
912
911
|
`.canon/changes/<change>/brief.md`. (Open for the maintainer: record
|
|
@@ -930,7 +929,7 @@ canon gate promote --repo .
|
|
|
930
929
|
canon gate promote --repo . --dry-run
|
|
931
930
|
```
|
|
932
931
|
|
|
933
|
-
Which writes need this step: `evidence add`, `
|
|
932
|
+
Which writes need this step: `evidence add`, `findings create` and `finding
|
|
934
933
|
close` stage, and under `write: { promote: manual }` (or an absent
|
|
935
934
|
`write:` key) their success line ends ``— run `canon gate promote` to
|
|
936
935
|
commit it``. Under `write: { promote: auto }` (what `canon init` writes)
|
|
@@ -943,15 +942,15 @@ promote`, so no separate
|
|
|
943
942
|
staged. A record another run staged is not touched: only `gate promote`
|
|
944
943
|
commits everything staged. It stays safe to run anyway: with nothing
|
|
945
944
|
staged it prints
|
|
946
|
-
`nothing staged` and exits `0`. `
|
|
945
|
+
`nothing staged` and exits `0`. `divergences add` stages for `canon
|
|
947
946
|
gate promote` and names it, under the same `write:` rule. Every
|
|
948
|
-
other write — `
|
|
949
|
-
`
|
|
947
|
+
other write — `reviews scenario`, `subjects create|adopt|move`, `changes create`, `scenarios create`, `features create`,
|
|
948
|
+
`tasks done` (it edits the plan document and re-ingests it)
|
|
950
949
|
— is final when it returns, and its success line ends `— written
|
|
951
950
|
directly; nothing to promote`. Full promote-on-write contract:
|
|
952
|
-
`canon-storage` (Staged writes and promotion). `
|
|
951
|
+
`canon-storage` (Staged writes and promotion). `divergences resolve|defer|accept` stage and promote their own record in the same run and end `— staged and promoted in this run; nothing to promote`.
|
|
953
952
|
|
|
954
|
-
## `canon gate install-hooks [--repo] [--event] [--matcher] [--command] [--timeout]`
|
|
953
|
+
## `canon gate install-hooks [--repo] [--event] [--matcher] [--command] [--hook-timeout]`
|
|
955
954
|
|
|
956
955
|
Idempotent, diff-only hook-seam installation: merges one
|
|
957
956
|
`{matcher?, hooks: [{type: "command", command, timeout}]}` entry into
|
|
@@ -966,7 +965,7 @@ gate`-invoking command, it ALSO emits
|
|
|
966
965
|
```bash
|
|
967
966
|
canon gate install-hooks --repo .
|
|
968
967
|
# non-default wiring:
|
|
969
|
-
canon gate install-hooks --repo . --event PreToolUse --matcher Edit --command "canon gate check" --timeout 30
|
|
968
|
+
canon gate install-hooks --repo . --event PreToolUse --matcher Edit --command "canon gate check" --hook-timeout 30
|
|
970
969
|
```
|
|
971
970
|
|
|
972
971
|
It installs no git hook: copy the script into git's `pre-commit` hook
|
|
@@ -8,8 +8,7 @@ records every downstream stage joins against.
|
|
|
8
8
|
|
|
9
9
|
Since 0.16 the commands that read the index see added, edited and deleted
|
|
10
10
|
`.feature` files without a sync step. `canon evidence add`, `canon evidence
|
|
11
|
-
audit`, `canon artifacts store`, `canon
|
|
12
|
-
scenario` and `canon subject move` refresh the index on disk first, with the
|
|
11
|
+
audit`, `canon artifacts store`, `canon divergences accept`, `canon reviews scenario` and `canon subjects move` refresh the index on disk first, with the
|
|
13
12
|
same code this command runs, scoped to the changed files, and say so in one
|
|
14
13
|
stderr line:
|
|
15
14
|
|
|
@@ -22,7 +21,7 @@ they grade the index as that refresh would leave it, built in memory, and
|
|
|
22
21
|
print no line.
|
|
23
22
|
|
|
24
23
|
So the working loop has no sync step and no `canon format` step: write the
|
|
25
|
-
scenario (`canon
|
|
24
|
+
scenario (`canon scenarios create` writes it format-clean) and run the next
|
|
26
25
|
command. Run `canon inventory sync` when:
|
|
27
26
|
|
|
28
27
|
- a command prints `NOT refreshed` — a root has a format violation (a
|
|
@@ -50,7 +49,7 @@ fix it; run `canon migrate`, which moves `features/kind=feature/` to
|
|
|
50
49
|
moves has uncommitted changes, and when a destination already exists.
|
|
51
50
|
A root at the repo-level `specs` moves to `.canon/specs`, and
|
|
52
51
|
`canon.yaml` records `former_roots: [specs]`, so reviews pinned before
|
|
53
|
-
the move still find their scenarios. Changes `canon
|
|
52
|
+
the move still find their scenarios. Changes `canon changes create` wrote
|
|
54
53
|
under `openspec/changes/` move to `.canon/changes/<slug>/`
|
|
55
54
|
(`proposal.md` becomes `brief.md`). An `Approved:` line in an external
|
|
56
55
|
`proposal.md` is copied into a canon pointer `brief.md`. The command
|
|
@@ -70,18 +69,18 @@ kept an old index gets it rewritten on the first read.
|
|
|
70
69
|
## Where the index sits in the loop
|
|
71
70
|
|
|
72
71
|
```text
|
|
73
|
-
author .feature corpus (canon
|
|
72
|
+
author .feature corpus (canon scenarios create)
|
|
74
73
|
│
|
|
75
74
|
▼
|
|
76
75
|
scenario index # refreshed by the writers; `canon inventory sync` rebuilds it
|
|
77
76
|
│
|
|
78
77
|
▼
|
|
79
|
-
review: canon
|
|
80
|
-
diverge: canon
|
|
78
|
+
review: canon reviews scenario # attests a review — see canon-inventory downstream / canon-gate
|
|
79
|
+
diverge: canon divergences add|resolve|defer|accept|list # tracks/resolves a divergence
|
|
81
80
|
gate: canon gate check [--release] # trust-ladder / staleness / coverage — see canon-gate
|
|
82
81
|
│
|
|
83
82
|
▼
|
|
84
|
-
ingest: canon ingest
|
|
83
|
+
ingest: canon ingest-records # with artifacts.native_records: true in canon.yaml —
|
|
85
84
|
# feeds review/divergence verdicts into the flywheel
|
|
86
85
|
# (see canon-artifact-ingest)
|
|
87
86
|
```
|
|
@@ -173,12 +172,12 @@ specs:
|
|
|
173
172
|
|
|
174
173
|
## How the index feeds the rest
|
|
175
174
|
|
|
176
|
-
- **Review** — `canon
|
|
175
|
+
- **Review** — `canon reviews scenario` attests a verdict against a synced
|
|
177
176
|
scenario. (See `canon-inventory` downstream commands and each command's `--help`.)
|
|
178
|
-
- **Divergence** — `canon
|
|
177
|
+
- **Divergence** — `canon divergences add|resolve|defer|accept|list`
|
|
179
178
|
tracks/resolves divergences against synced scenarios.
|
|
180
179
|
- **Gate** — `canon gate check` enforces trust-ladder / staleness /
|
|
181
180
|
coverage over the corpus (see `canon-gate`).
|
|
182
|
-
- **Ingest** — `canon ingest
|
|
181
|
+
- **Ingest** — `canon ingest-records` with `artifacts.native_records:
|
|
183
182
|
true` in `canon.yaml` feeds review/divergence verdicts into the
|
|
184
183
|
reward flywheel (see `canon-artifact-ingest`).
|
|
@@ -13,18 +13,18 @@ trajectories into retrievable, promotable insights. Two tiers:
|
|
|
13
13
|
## Rebuilding strategy memory
|
|
14
14
|
|
|
15
15
|
Strategy memory is re-derived from the current trajectory set as part of
|
|
16
|
-
`canon ingest
|
|
16
|
+
`canon ingest-records` (see `canon-artifact-ingest`): after it
|
|
17
17
|
persists a repo's verdict trajectories, it re-derives the distilled
|
|
18
18
|
strategies. This is NON-DESTRUCTIVE — a rebuild never drops a
|
|
19
19
|
hand-promoted strategy the trajectory rows don't touch. There is no
|
|
20
|
-
standalone rebuild command under `canon
|
|
20
|
+
standalone rebuild command under `canon strategies`; its subcommands are
|
|
21
21
|
`promote`, `approval-payload` and `rollback`.
|
|
22
22
|
|
|
23
|
-
# `canon
|
|
23
|
+
# `canon strategies promote <strategy_id> [--repo <dir>] [--evaluation <path> --approval <path>] [--signature-file <path>] [--dry-run]`
|
|
24
24
|
|
|
25
25
|
The production activation path is a signed, paired-evaluation workflow:
|
|
26
26
|
|
|
27
|
-
1. Run `canon ingest
|
|
27
|
+
1. Run `canon ingest-records`. Ingest resolves covering verdicts and rebuilds
|
|
28
28
|
newly distilled strategies as `lifecycle: quarantined`.
|
|
29
29
|
2. Check eligibility with the configured `occurrence` or `crn` gate. This is
|
|
30
30
|
only a prerequisite; occurrence alone MUST NOT activate a strategy.
|
|
@@ -44,7 +44,7 @@ The production activation path is a signed, paired-evaluation workflow:
|
|
|
44
44
|
5. Produce the unsigned approval payload:
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
|
-
canon
|
|
47
|
+
canon strategies approval-payload 01J8ZQ4W7K2M5N6P8R0S3T9VXY --evaluation evaluation.json \
|
|
48
48
|
--approver alice --approval-at 2026-10-02T12:00:00Z --repo .
|
|
49
49
|
```
|
|
50
50
|
|
|
@@ -101,10 +101,10 @@ The production activation path is a signed, paired-evaluation workflow:
|
|
|
101
101
|
8. Activate only with both evidence files:
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
|
-
canon
|
|
104
|
+
canon strategies promote 01J8ZQ4W7K2M5N6P8R0S3T9VXY --repo . \
|
|
105
105
|
--evaluation evaluation.json --approval approval.json
|
|
106
106
|
# Or attach an armored signature file and recompute the approval digest:
|
|
107
|
-
canon
|
|
107
|
+
canon strategies promote 01J8ZQ4W7K2M5N6P8R0S3T9VXY --repo . \
|
|
108
108
|
--evaluation evaluation.json --approval approval.json \
|
|
109
109
|
--signature-file approval.sig
|
|
110
110
|
```
|
|
@@ -127,7 +127,7 @@ An unknown `strategy_id` fails nonzero. A candidate's lifecycle defaults to
|
|
|
127
127
|
The old public writer is retained only for already-`active` items; it is not a
|
|
128
128
|
way to activate new or legacy candidates.
|
|
129
129
|
|
|
130
|
-
**Done when:** `canon
|
|
130
|
+
**Done when:** `canon strategies promote <strategy_id>` exits `0` and
|
|
131
131
|
`canon retrieve` returns the strategy for its regime (a quarantined
|
|
132
132
|
candidate stays out of retrieval).
|
|
133
133
|
|
|
@@ -167,12 +167,11 @@ A role with no explicit `promotion.<role>` entry defaults to
|
|
|
167
167
|
signature.
|
|
168
168
|
|
|
169
169
|
Both gates read resolved `verdict_record.outcome`, not raw verdict rows.
|
|
170
|
-
`Pending` trajectories neither corroborate nor contradict. `canon ingest
|
|
171
|
-
records` is therefore always first:
|
|
170
|
+
`Pending` trajectories neither corroborate nor contradict. `canon ingest-records` is therefore always first:
|
|
172
171
|
|
|
173
172
|
```bash
|
|
174
|
-
canon ingest
|
|
175
|
-
canon
|
|
173
|
+
canon ingest-records
|
|
174
|
+
canon strategies promote 01J8ZQ4W7K2M5N6P8R0S3T9VXY --evaluation evaluation.json --approval approval.json
|
|
176
175
|
```
|
|
177
176
|
|
|
178
177
|
### Demotion versus authenticated rollback
|
|
@@ -187,7 +186,7 @@ record.
|
|
|
187
186
|
An operator-requested rollback is a distinct authenticated action:
|
|
188
187
|
|
|
189
188
|
```text
|
|
190
|
-
canon
|
|
189
|
+
canon strategies rollback <strategy_id> --reason "<reason>" --actor alice \
|
|
191
190
|
--signature-file rollback.sig --approval-at 2026-10-02T12:00:00Z \
|
|
192
191
|
[--contradicting-trajectory <trajectory_id>] --repo .
|
|
193
192
|
```
|
|
@@ -212,7 +211,7 @@ not upgrade legacy rows or establish measured uplift.
|
|
|
212
211
|
|
|
213
212
|
## How verdicts feed scoring
|
|
214
213
|
|
|
215
|
-
Verdicts arrive from `canon ingest
|
|
214
|
+
Verdicts arrive from `canon ingest-records` (see
|
|
216
215
|
`canon-artifact-ingest`), persisted regime-keyed
|
|
217
216
|
(`<role>/<repo>/<area>/<hash>`). Each verdict scores its covering
|
|
218
217
|
trajectory into `Success` / `Failure` / `RolledBack` / `Pending`; the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# canon-plan-import
|
|
2
2
|
|
|
3
|
-
`canon ingest
|
|
3
|
+
`canon ingest-plans` imports plan state into canon's `change`/`task`
|
|
4
4
|
records, through the same validated path every other ingest family uses:
|
|
5
5
|
canon's own changes under `.canon/changes/`, and any FOREIGN plan dialect
|
|
6
6
|
listed in `canon.yaml`. Imported rows carry no special marker — once
|
|
@@ -12,9 +12,9 @@ one, and neither can `canon gate`.
|
|
|
12
12
|
`.canon/changes/` is canon's native plan source (dialect id `canon`):
|
|
13
13
|
one `<slug>/` directory per change holding `brief.md` (and a `tasks.md`
|
|
14
14
|
only when someone adds one: an optional work note), written by
|
|
15
|
-
`canon
|
|
16
|
-
`canon ingest
|
|
17
|
-
`canon
|
|
15
|
+
`canon changes create` (see `canon-subject`). Every plan reader —
|
|
16
|
+
`canon ingest-plans`, `canon tasks done`, `canon evidence add --task`,
|
|
17
|
+
`canon runs create --task`, `canon status` and the brief check — reads it
|
|
18
18
|
first whenever the directory exists, with no `plans:` entry. Being first,
|
|
19
19
|
it owns a change id an external source also carries (the external copy
|
|
20
20
|
is the later duplicate, skipped and counted under `duplicate_change_id`).
|
|
@@ -23,11 +23,11 @@ openspec change's carry `canon-plan-import-openspec`. A `brief.md` with a
|
|
|
23
23
|
`Source: <path>` line is not a change of its own: it is the canon brief
|
|
24
24
|
of a change imported from an external plan (it points at the external
|
|
25
25
|
document and holds the human's `Approved:` line, written by
|
|
26
|
-
`canon
|
|
26
|
+
`canon briefs approve`), so the native reader
|
|
27
27
|
skips that directory and the external source keeps the change id.
|
|
28
28
|
|
|
29
29
|
`plans.sources` lists only EXTERNAL plans — documents you prepare outside
|
|
30
|
-
canon, which canon only reads. The one exception: `canon
|
|
30
|
+
canon, which canon only reads. The one exception: `canon tasks done`
|
|
31
31
|
flips the task's checkbox in an external plan's `tasks.md` (see
|
|
32
32
|
`canon-gate`). Their briefs and approvals live in
|
|
33
33
|
`.canon/changes/<change>/brief.md`, never in the external document.
|
|
@@ -58,18 +58,18 @@ single ad hoc import, reading only the source it names; either flag alone
|
|
|
58
58
|
fails loud):
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
canon ingest
|
|
61
|
+
canon ingest-plans --dialect openspec --plan-source ../other-repo
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
## 2. Run the import
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
67
|
# .canon/changes/ + every configured source
|
|
68
|
-
canon ingest
|
|
68
|
+
canon ingest-plans
|
|
69
69
|
# machine-readable outcome
|
|
70
|
-
canon ingest
|
|
70
|
+
canon ingest-plans --json
|
|
71
71
|
# a specific repo root
|
|
72
|
-
canon ingest
|
|
72
|
+
canon ingest-plans --repo ../svc
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
Per source the summary reports `changes_parsed`/`tasks_parsed`,
|
|
@@ -81,7 +81,7 @@ the adapter's `unmapped` drop counts, and `malformed` (structurally
|
|
|
81
81
|
broken constructs). A source whose content is byte-identical to its last
|
|
82
82
|
successful run is `skipped_unchanged` — re-importing writes zero records.
|
|
83
83
|
|
|
84
|
-
**Done when:** `canon ingest
|
|
84
|
+
**Done when:** `canon ingest-plans` exits `0` with `malformed` and
|
|
85
85
|
`changes_unwritten` at `0` for every source; step 3 lists the imported rows.
|
|
86
86
|
|
|
87
87
|
## 3. Read the imported rows
|
|
@@ -176,18 +176,18 @@ yields zero records, never an error.
|
|
|
176
176
|
An imported `Task.task_id` is byte-identical to the join key of the
|
|
177
177
|
openspec-task verdict events canon's artifact ingest derives from the same
|
|
178
178
|
checkbox tree — so `canon report`'s trust matrix joins the two sides on
|
|
179
|
-
`task_id` for its coverage columns, and `canon ingest
|
|
180
|
-
join's bulk producer. `canon ingest
|
|
179
|
+
`task_id` for its coverage columns, and `canon ingest-plans` is that
|
|
180
|
+
join's bulk producer. `canon ingest-plans` itself performs no join and
|
|
181
181
|
writes no verdict/evidence — joining plan state against evidence is a
|
|
182
182
|
downstream reader's job.
|
|
183
183
|
|
|
184
184
|
## What this skill does NOT cover
|
|
185
185
|
|
|
186
|
-
- **Authoring a change** — `canon
|
|
186
|
+
- **Authoring a change** — `canon changes create` writes
|
|
187
187
|
`.canon/changes/<slug>/brief.md` (no `tasks.md`) and adopts the change
|
|
188
188
|
into a subject (see `canon-subject`); it never scaffolds an openspec
|
|
189
189
|
change dir. This skill covers IMPORTING plans.
|
|
190
|
-
- **`canon gate check`/`canon
|
|
190
|
+
- **`canon gate check`/`canon tasks done`** (the hand-authored one-task-at-
|
|
191
191
|
a-time path this complements at bulk) — see `canon-gate`.
|
|
192
192
|
- **Wiring an imported `Task`/`Change` into a `canon gate` decision** —
|
|
193
193
|
out of scope; needs its own reviewed change.
|