@journeykit/canon 0.26.0 → 0.28.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 +245 -89
- package/dist/skills/reference/brief-align.md +4 -2
- package/dist/skills/reference/brief-clarify.md +7 -5
- package/dist/skills/reference/brief-harden.md +4 -2
- package/dist/skills/reference/brief-polish.md +7 -5
- package/dist/skills/reference/brief-shape.md +4 -2
- package/dist/skills/reference/canon-artifact-ingest.md +11 -7
- package/dist/skills/reference/canon-authoring.md +16 -2
- package/dist/skills/reference/canon-context.md +21 -11
- package/dist/skills/reference/canon-fmt.md +10 -2
- package/dist/skills/reference/canon-gate.md +119 -83
- package/dist/skills/reference/canon-inventory.md +34 -22
- package/dist/skills/reference/canon-learn.md +23 -19
- package/dist/skills/reference/canon-plan-import.md +10 -7
- package/dist/skills/reference/canon-plugins.md +15 -8
- package/dist/skills/reference/canon-policy.md +20 -16
- package/dist/skills/reference/canon-report-dashboard.md +30 -19
- package/dist/skills/reference/canon-retrieve.md +13 -10
- package/dist/skills/reference/canon-review.md +96 -68
- package/dist/skills/reference/canon-session-ingest.md +7 -3
- package/dist/skills/reference/canon-storage.md +82 -51
- package/dist/skills/reference/canon-subject.md +123 -84
- package/dist/skills/reference/canon-vocab.md +1 -1
- package/dist/skills/reference/role-implementer.md +295 -64
- package/dist/skills/reference/role-orchestrator.md +547 -55
- package/dist/skills/reference/role-planner.md +189 -32
- package/dist/skills/reference/role-reviewer.md +257 -58
- package/dist/skills/scripts/canon-retrieve-pre-dispatch.sh +10 -5
- package/man/canon-adapter-authorize.1 +44 -0
- package/man/canon-adapter-validate.1 +44 -0
- package/man/canon-adapter.1 +46 -0
- package/man/canon-artifacts-move.1 +63 -0
- package/man/canon-artifacts-store.1 +54 -0
- package/man/canon-artifacts-verify.1 +48 -0
- package/man/canon-artifacts.1 +45 -0
- package/man/canon-brief-approve.1 +62 -0
- package/man/canon-brief-check.1 +44 -0
- package/man/canon-brief-show.1 +50 -0
- package/man/canon-brief.1 +63 -0
- package/man/canon-change-new.1 +66 -0
- package/man/canon-change.1 +42 -0
- package/man/canon-completion.1 +60 -0
- package/man/canon-context-pack-add.1 +47 -0
- package/man/canon-context-pack-show.1 +44 -0
- package/man/canon-context-pack-verify.1 +44 -0
- package/man/canon-context-pack.1 +50 -0
- package/man/canon-context.1 +44 -0
- package/man/canon-dashboard.1 +50 -0
- package/man/canon-demo-init.1 +44 -0
- package/man/canon-demo-review.1 +44 -0
- package/man/canon-demo.1 +47 -0
- package/man/canon-dispatch-begin.1 +80 -0
- package/man/canon-dispatch-diff.1 +41 -0
- package/man/canon-dispatch-end.1 +60 -0
- package/man/canon-dispatch.1 +45 -0
- package/man/canon-divergence-accept.1 +68 -0
- package/man/canon-divergence-add.1 +97 -0
- package/man/canon-divergence-defer.1 +71 -0
- package/man/canon-divergence-list.1 +56 -0
- package/man/canon-divergence-resolve.1 +68 -0
- package/man/canon-divergence.1 +51 -0
- package/man/canon-evidence-add.1 +168 -0
- package/man/canon-evidence-approval-payload.1 +65 -0
- package/man/canon-evidence-audit.1 +121 -0
- package/man/canon-evidence.1 +57 -0
- package/man/canon-export.1 +108 -0
- package/man/canon-feature-new.1 +62 -0
- package/man/canon-feature.1 +39 -0
- package/man/canon-finding-add.1 +196 -0
- package/man/canon-finding-close.1 +117 -0
- package/man/canon-finding-list.1 +59 -0
- package/man/canon-finding.1 +67 -0
- package/man/canon-format.1 +49 -0
- package/man/canon-gate-check.1 +44 -0
- package/man/canon-gate-install-hooks.1 +59 -0
- package/man/canon-gate-promote.1 +62 -0
- package/man/canon-gate.1 +50 -0
- package/man/canon-ingest-plans.1 +53 -0
- package/man/canon-ingest-records.1 +56 -0
- package/man/canon-ingest-sessions.1 +62 -0
- package/man/canon-ingest.1 +50 -0
- package/man/canon-init.1 +98 -0
- package/man/canon-inventory-sync.1 +50 -0
- package/man/canon-inventory.1 +39 -0
- package/man/canon-ledger-compact.1 +50 -0
- package/man/canon-ledger.1 +54 -0
- package/man/canon-migrate.1 +89 -0
- package/man/canon-plugin-sync.1 +53 -0
- package/man/canon-plugin.1 +39 -0
- package/man/canon-policy-approve.1 +50 -0
- package/man/canon-policy-show.1 +41 -0
- package/man/canon-policy.1 +52 -0
- package/man/canon-prompt-add.1 +47 -0
- package/man/canon-prompt-show.1 +41 -0
- package/man/canon-prompt.1 +43 -0
- package/man/canon-purge.1 +70 -0
- package/man/canon-query.1 +111 -0
- package/man/canon-regime-show.1 +50 -0
- package/man/canon-regime.1 +39 -0
- package/man/canon-report-build.1 +44 -0
- package/man/canon-report-check.1 +41 -0
- package/man/canon-report-snapshot.1 +47 -0
- package/man/canon-report.1 +45 -0
- package/man/canon-retrieve.1 +56 -0
- package/man/canon-review-change.1 +98 -0
- package/man/canon-review-scenario.1 +98 -0
- package/man/canon-review.1 +42 -0
- package/man/canon-scenario-new.1 +80 -0
- package/man/canon-scenario.1 +39 -0
- package/man/canon-schema.1 +63 -0
- package/man/canon-selftest.1 +69 -0
- package/man/canon-skills-check.1 +47 -0
- package/man/canon-skills-doctor.1 +47 -0
- package/man/canon-skills-install.1 +53 -0
- package/man/canon-skills-show.1 +104 -0
- package/man/canon-skills.1 +48 -0
- package/man/canon-status.1 +51 -0
- package/man/canon-strategy-approval-payload.1 +53 -0
- package/man/canon-strategy-promote.1 +59 -0
- package/man/canon-strategy-rollback.1 +62 -0
- package/man/canon-strategy.1 +45 -0
- package/man/canon-subject-adopt.1 +53 -0
- package/man/canon-subject-move.1 +80 -0
- package/man/canon-subject-new.1 +65 -0
- package/man/canon-subject-show.1 +44 -0
- package/man/canon-subject-unadopt.1 +63 -0
- package/man/canon-subject.1 +51 -0
- package/man/canon-task-done.1 +47 -0
- package/man/canon-task.1 +42 -0
- package/man/canon-tier-age.1 +50 -0
- package/man/canon-tier.1 +39 -0
- package/man/canon.1 +169 -0
- package/package.json +9 -5
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# canon-artifact-ingest
|
|
2
2
|
|
|
3
|
-
`canon ingest
|
|
3
|
+
`canon ingest records` turns a repo's canon-native ARTIFACTS — the
|
|
4
4
|
outputs of review/divergence/task/handoff work — into the regime-keyed
|
|
5
5
|
verdict trajectories that strategy memory and the reward gate consume
|
|
6
6
|
(see `canon-learn`). One pass runs the four adapters, normalizes, derives
|
|
7
7
|
verdicts, and writes idempotently.
|
|
8
8
|
|
|
9
|
-
## `canon ingest
|
|
9
|
+
## `canon ingest records [--repo <dir>] [--watch]`
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
canon ingest
|
|
13
|
-
canon ingest
|
|
14
|
-
canon ingest
|
|
12
|
+
canon ingest records # one pass over the repo's artifacts
|
|
13
|
+
canon ingest records --repo ../svc # a specific repo
|
|
14
|
+
canon ingest records --watch # poll loop
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
Source roots resolve from `canon.yaml`'s `artifacts.sources` config
|
|
@@ -19,6 +19,10 @@ Source roots resolve from `canon.yaml`'s `artifacts.sources` config
|
|
|
19
19
|
hardcoded path; ordinarily the consumer repo's own roots. Unconfigured =
|
|
20
20
|
no scan for that family.
|
|
21
21
|
|
|
22
|
+
**Done when:** the pass exits `0` and reports no malformed artifact;
|
|
23
|
+
`canon query --kind trajectory` lists the new trajectories. A rerun over an
|
|
24
|
+
unchanged corpus writes nothing (`trajectories_skipped_duplicate`).
|
|
25
|
+
|
|
22
26
|
## The four adapters
|
|
23
27
|
|
|
24
28
|
Each reads one artifact family and emits a normalized event keyed by that
|
|
@@ -58,7 +62,7 @@ new trajectories (reported as `trajectories_skipped_duplicate`).
|
|
|
58
62
|
|
|
59
63
|
Verdicts persist regime-keyed (`<role>/<repo>/<area>/<hash>`), so a
|
|
60
64
|
role-scoped agent reads only its own lane — the same regime namespacing
|
|
61
|
-
`canon retrieve --role <r> --regime <k>` and `canon
|
|
65
|
+
`canon retrieve --for-role <r> --regime <k>` and `canon strategy` query. This
|
|
62
66
|
verdict stream is the evidence the reward gate scores when deciding
|
|
63
67
|
promotion/demotion.
|
|
64
68
|
|
|
@@ -69,4 +73,4 @@ promotion/demotion.
|
|
|
69
73
|
- Strategy promotion/demotion mechanics — see the `canon-learn` skill;
|
|
70
74
|
this skill only produces the verdict evidence promotion reads.
|
|
71
75
|
- The `regime_key` grammar itself — see `canon-retrieve`, which derives
|
|
72
|
-
the same key via the `canon regime
|
|
76
|
+
the same key via the `canon regime show` serializer.
|
|
@@ -74,7 +74,7 @@ spec_coverage:
|
|
|
74
74
|
|
|
75
75
|
Every feature surface (`<area>.<surface>`) with in-scope scenarios must
|
|
76
76
|
then carry at least one scenario of each listed case, or `canon gate
|
|
77
|
-
check` reports it as `uncovered-cell`, and `canon subject
|
|
77
|
+
check` reports it as `uncovered-cell`, and `canon subject move <id>
|
|
78
78
|
--to shipped` refuses for a subject that owns such a surface. An untagged
|
|
79
79
|
scenario counts toward its surface but satisfies no case, so an
|
|
80
80
|
untagged corpus reports every surface instead of passing silently. The
|
|
@@ -101,13 +101,23 @@ canon scenario new checkout.cart.04 --title "Adding an out-of-stock item is refu
|
|
|
101
101
|
|
|
102
102
|
There is no format or sync step after these: the scaffold writes a
|
|
103
103
|
format-clean scenario, and `canon status`, `canon gate check`,
|
|
104
|
-
`canon evidence add`, `canon review
|
|
104
|
+
`canon evidence add`, `canon review scenario` and `canon subject move`
|
|
105
105
|
index added, edited and deleted `.feature` files before they read. When
|
|
106
106
|
one of them prints `NOT refreshed`, the corpus has a format violation
|
|
107
107
|
(for example a hand-written header with no `# canon:` line) or a
|
|
108
108
|
duplicate id; `canon inventory sync` (or `canon format <root>`) names it.
|
|
109
109
|
Fix it and the next command indexes the files (see `canon-inventory`).
|
|
110
110
|
|
|
111
|
+
Many scenarios at once: `--input` takes inline JSON, a file or `-`. An
|
|
112
|
+
array (or NDJSON) is a batch, validated whole before anything is written;
|
|
113
|
+
each element holds `operands` (the scenario tag) and the other options as
|
|
114
|
+
camelCase keys. `canon schema scenario new --json` shows the input schema
|
|
115
|
+
and an example. There is no `--from`.
|
|
116
|
+
|
|
117
|
+
```text
|
|
118
|
+
canon scenario new --input '[{"operands":["checkout.cart.01"],"title":"Adding an item raises the count","subjectId":"checkout-core","lane":"behavior","case":"happy"},{"operands":["checkout.cart.04"],"title":"Adding an out-of-stock item is refused","subjectId":"checkout-core","lane":"behavior","case":"failure"}]'
|
|
119
|
+
```
|
|
120
|
+
|
|
111
121
|
- `--actor-id <id>` (or `CANON_ACTOR` in the environment) puts YOUR id on the
|
|
112
122
|
provenance line. Default is `canon-scaffold`.
|
|
113
123
|
- **Keep the `# canon:` lines when you fill in the scenario.** Dropping one
|
|
@@ -135,6 +145,10 @@ Fix it and the next command indexes the files (see `canon-inventory`).
|
|
|
135
145
|
- Steps are yours to write; the scaffold's `Given a step` is a
|
|
136
146
|
placeholder, not a spec.
|
|
137
147
|
|
|
148
|
+
**Done when:** `canon status` shows no `@subject`-less scenario (`data.unowned`
|
|
149
|
+
is empty) and no `NOT refreshed` line appears; the new scenarios then
|
|
150
|
+
wait for evidence, which `canon gate check` reports.
|
|
151
|
+
|
|
138
152
|
## Anti-patterns, by name
|
|
139
153
|
|
|
140
154
|
- **The grab-bag surface.** One `experience.feature` holding pointer
|
|
@@ -31,9 +31,16 @@ or has no `spec_coverage` section (the gate then requires no evidence,
|
|
|
31
31
|
cases or review), or when that section is invalid (the gate refuses until
|
|
32
32
|
it is fixed); it is omitted when coverage is in force. `context` describes what CAN be
|
|
33
33
|
authored; `canon status` (see `canon-subject`) says where the repo stands
|
|
34
|
-
and what to run next. `--json`
|
|
35
|
-
and `policy.spec_coverage`/`policy.diagnostics`
|
|
36
|
-
fact.
|
|
34
|
+
and what to run next. `--json` prints the `{ok, data, meta}` envelope: the
|
|
35
|
+
header adds no field, and `policy.spec_coverage`/`policy.diagnostics`
|
|
36
|
+
already carry the same fact. `--fields <list>` keeps only the named
|
|
37
|
+
top-level fields (`kinds`, `enums`, `policy`, `review`, …); an unknown name is
|
|
38
|
+
`UNKNOWN_FIELD` (exit 2).
|
|
39
|
+
|
|
40
|
+
On a repository that still holds 0.27 canon state, `canon context` warns
|
|
41
|
+
and puts `canon migrate --json` first in `meta.next`: run `canon migrate`
|
|
42
|
+
(a preview), then `canon migrate --commit --plan-digest <digest from the
|
|
43
|
+
preview>`, then `canon skills install`.
|
|
37
44
|
|
|
38
45
|
## Reproducible context packs and prompt bundles
|
|
39
46
|
|
|
@@ -43,13 +50,13 @@ an immutable content-addressed registry and records only metadata and digests
|
|
|
43
50
|
in the pack manifest.
|
|
44
51
|
|
|
45
52
|
```bash
|
|
46
|
-
canon context-pack
|
|
47
|
-
canon context-pack
|
|
53
|
+
canon context-pack add --manifest .canon/context-manifest.json
|
|
54
|
+
canon context-pack add --manifest .canon/context-manifest.json --repo ../my-repo --json
|
|
48
55
|
canon context-pack show sha256:<pack-digest> --repo . --json
|
|
49
56
|
canon context-pack verify sha256:<pack-digest>
|
|
50
57
|
```
|
|
51
58
|
|
|
52
|
-
`
|
|
59
|
+
`add` prints only the pack id by default, so captured content is never
|
|
53
60
|
written to concise terminal output. `--json` prints the pack manifest,
|
|
54
61
|
including selected-path metadata and content digests. `show` verifies the
|
|
55
62
|
manifest and immutable content objects before returning it; `verify` exits
|
|
@@ -57,6 +64,9 @@ nonzero when the pack is missing, stale, or tampered. Manifest paths must be
|
|
|
57
64
|
relative to the resolved repo, remain inside it, and contain no symlink;
|
|
58
65
|
missing or unsafe paths are rejected by the context-pack module.
|
|
59
66
|
|
|
67
|
+
**Done when:** `canon context-pack verify sha256:<pack-digest>` exits `0`;
|
|
68
|
+
`canon context-pack show` returns the manifest you recorded.
|
|
69
|
+
|
|
60
70
|
## Provider-neutral adapter responses
|
|
61
71
|
|
|
62
72
|
An execution provider may return a versioned response envelope for Canon to
|
|
@@ -87,9 +97,9 @@ Version prompt inputs separately when several runs should share the same
|
|
|
87
97
|
prompt files:
|
|
88
98
|
|
|
89
99
|
```bash
|
|
90
|
-
canon prompt add
|
|
100
|
+
canon prompt add reviewer@v1 \
|
|
91
101
|
--manifest .canon/reviewer-prompt.json
|
|
92
|
-
canon prompt show
|
|
102
|
+
canon prompt show reviewer@v1 --json
|
|
93
103
|
```
|
|
94
104
|
|
|
95
105
|
Prompt registration uses the same immutable content registry. `prompt show`
|
|
@@ -97,7 +107,7 @@ verifies the selected bundle and returns its metadata/digests; neither concise
|
|
|
97
107
|
output form includes captured prompt bytes.
|
|
98
108
|
|
|
99
109
|
- **A capability query, never validation:** `canon context` ALWAYS exits
|
|
100
|
-
`0` with the full surface — even when `canon format
|
|
110
|
+
`0` with the full surface — even when `canon format` or
|
|
101
111
|
`canon gate` would report diagnostics against the same repo. It reads
|
|
102
112
|
only the schema/policy/vocabulary registry, never the corpus or the
|
|
103
113
|
evidence ledger.
|
|
@@ -154,7 +164,7 @@ AND `canon format`'s diagnostics from one edit site, never two.
|
|
|
154
164
|
|
|
155
165
|
## Reading an "expected one of: …" validator error
|
|
156
166
|
|
|
157
|
-
When `canon format
|
|
167
|
+
When `canon format` rejects an out-of-domain enum value it emits:
|
|
158
168
|
|
|
159
169
|
```
|
|
160
170
|
`not-a-real-kind` is not a valid value for `kind` of `run` (expected one of: run, review, divergence, …)
|
|
@@ -167,7 +177,7 @@ same schema, no hand-maintained second copy.
|
|
|
167
177
|
|
|
168
178
|
## What this skill does NOT cover
|
|
169
179
|
|
|
170
|
-
- `canon format
|
|
180
|
+
- `canon format`'s full violation taxonomy — see `canon-fmt`;
|
|
171
181
|
this skill only covers reading its enum diagnostic against the surface.
|
|
172
182
|
- Authoring a typed task atom / handoff body — see
|
|
173
183
|
`canon-vocab`; `canon context`'s `vocab`/`cel` sections
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# canon-fmt
|
|
2
2
|
|
|
3
|
-
`canon format
|
|
3
|
+
`canon format` is canon's read-only format validator over a
|
|
4
4
|
consumer-repo artifact corpus: ledger records (run/drill/review/clear/
|
|
5
5
|
code-review/design-review), divergence events (manifest/review/
|
|
6
6
|
remediation), `kind=feature/` spec files, `inventory/`, and `policy.yaml`. It never
|
|
@@ -9,9 +9,14 @@ rewrites or mutates the corpus — it only validates and reports.
|
|
|
9
9
|
## Running
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
canon format
|
|
12
|
+
canon format spec # e.g. a consumer repo's spec/
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
With no operand, `canon format` validates every `specs.roots[]` entry of
|
|
16
|
+
`canon.yaml`; a relative `<dir>` resolves under the repo root when `--repo`
|
|
17
|
+
is given, else under the current directory. The old `fmt` spelling
|
|
18
|
+
and the no-op `--check` are gone.
|
|
19
|
+
|
|
15
20
|
Read-only, always. Exits nonzero if any violation is found, and prints
|
|
16
21
|
a report grouped by failure class in this fixed order:
|
|
17
22
|
|
|
@@ -30,6 +35,9 @@ a report grouped by failure class in this fixed order:
|
|
|
30
35
|
|
|
31
36
|
Every class is a stable string, safe to grep/diff across runs.
|
|
32
37
|
|
|
38
|
+
**Done when:** `canon format` exits `0` and prints no violation; a
|
|
39
|
+
violation names its class and file in the report.
|
|
40
|
+
|
|
33
41
|
## What it does NOT do
|
|
34
42
|
|
|
35
43
|
- **Rewrite anything.** It only validates and reports; a one-shot
|