@journeykit/canon 0.38.0 → 0.39.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 +8 -3
- package/dist/skills/reference/canon-artifact-ingest.md +0 -2
- package/dist/skills/reference/canon-gate.md +27 -2
- package/dist/skills/reference/canon-report-dashboard.md +27 -36
- package/dist/skills/reference/canon-storage.md +25 -1
- package/dist/skills/reference/role-implementer.md +2 -2
- package/dist/skills/reference/role-orchestrator.md +10 -15
- package/dist/skills/reference/role-planner.md +2 -2
- package/dist/skills/reference/role-reviewer.md +2 -2
- package/man/canon-adapter-authorize.1 +2 -2
- package/man/canon-adapter-validate.1 +2 -2
- package/man/canon-adapter.1 +2 -2
- package/man/canon-artifacts-move.1 +2 -2
- package/man/canon-artifacts-prune.1 +4 -2
- package/man/canon-artifacts-store.1 +2 -2
- package/man/canon-artifacts-verify.1 +4 -2
- package/man/canon-artifacts.1 +2 -2
- package/man/canon-brief-approve.1 +2 -2
- package/man/canon-brief-check.1 +2 -2
- package/man/canon-brief-show.1 +2 -2
- package/man/canon-brief.1 +2 -2
- package/man/canon-change-new.1 +2 -2
- package/man/canon-change.1 +2 -2
- package/man/canon-completion.1 +2 -2
- package/man/canon-context-pack-add.1 +2 -2
- package/man/canon-context-pack-show.1 +2 -2
- package/man/canon-context-pack-verify.1 +2 -2
- package/man/canon-context-pack.1 +2 -2
- package/man/canon-context.1 +2 -2
- package/man/canon-dashboard.1 +2 -2
- package/man/canon-demo-init.1 +2 -2
- package/man/canon-demo-review.1 +2 -2
- package/man/canon-demo.1 +2 -2
- package/man/canon-dispatch-begin.1 +2 -2
- package/man/canon-dispatch-diff.1 +2 -2
- package/man/canon-dispatch-end.1 +2 -2
- package/man/canon-dispatch.1 +2 -2
- package/man/canon-divergence-accept.1 +2 -2
- package/man/canon-divergence-add.1 +2 -2
- package/man/canon-divergence-defer.1 +2 -2
- package/man/canon-divergence-list.1 +2 -2
- package/man/canon-divergence-resolve.1 +2 -2
- package/man/canon-divergence.1 +2 -2
- package/man/canon-evidence-add.1 +3 -3
- package/man/canon-evidence-approval-payload.1 +2 -2
- package/man/canon-evidence-audit.1 +2 -2
- package/man/canon-evidence.1 +2 -2
- package/man/canon-export.1 +2 -6
- package/man/canon-feature-new.1 +2 -2
- package/man/canon-feature.1 +2 -2
- package/man/canon-finding-add.1 +2 -2
- package/man/canon-finding-close.1 +2 -2
- package/man/canon-finding-list.1 +2 -2
- package/man/canon-finding.1 +2 -2
- package/man/canon-format.1 +2 -2
- package/man/canon-gate-check.1 +2 -2
- package/man/canon-gate-install-hooks.1 +2 -2
- package/man/canon-gate-promote.1 +2 -2
- package/man/canon-gate.1 +2 -2
- package/man/canon-ingest-plans.1 +2 -2
- package/man/canon-ingest-records.1 +2 -2
- package/man/canon-ingest.1 +4 -8
- package/man/canon-init.1 +2 -2
- package/man/canon-inventory-sync.1 +2 -2
- package/man/canon-inventory.1 +2 -2
- package/man/canon-ledger-compact.1 +2 -2
- package/man/canon-ledger.1 +2 -2
- package/man/canon-migrate.1 +2 -2
- package/man/canon-plugin-sync.1 +2 -2
- package/man/canon-plugin.1 +2 -2
- package/man/canon-policy-approve.1 +2 -2
- package/man/canon-policy-show.1 +2 -2
- package/man/canon-policy.1 +2 -2
- package/man/canon-prompt-add.1 +2 -2
- package/man/canon-prompt-show.1 +2 -2
- package/man/canon-prompt.1 +2 -2
- package/man/canon-purge.1 +8 -8
- package/man/canon-query.1 +2 -6
- package/man/canon-regime-show.1 +2 -2
- package/man/canon-regime.1 +2 -2
- package/man/canon-report-build.1 +2 -2
- package/man/canon-report-check.1 +2 -2
- package/man/canon-report-snapshot.1 +2 -2
- package/man/canon-report.1 +2 -2
- package/man/canon-retrieve.1 +2 -2
- package/man/canon-review-change.1 +2 -2
- package/man/canon-review-scenario.1 +2 -2
- package/man/canon-review.1 +2 -2
- package/man/canon-scenario-new.1 +2 -2
- package/man/canon-scenario.1 +2 -2
- package/man/canon-schema.1 +2 -2
- package/man/canon-search.1 +2 -6
- package/man/canon-selftest.1 +2 -4
- package/man/canon-skills-check.1 +2 -2
- package/man/canon-skills-doctor.1 +2 -2
- package/man/canon-skills-install.1 +2 -2
- package/man/canon-skills-show.1 +2 -4
- package/man/canon-skills.1 +2 -2
- package/man/canon-status.1 +2 -2
- package/man/canon-strategy-approval-payload.1 +2 -2
- package/man/canon-strategy-promote.1 +2 -2
- package/man/canon-strategy-rollback.1 +2 -2
- package/man/canon-strategy.1 +2 -2
- package/man/canon-subject-adopt.1 +2 -2
- package/man/canon-subject-move.1 +2 -2
- package/man/canon-subject-new.1 +2 -2
- package/man/canon-subject-show.1 +2 -2
- package/man/canon-subject-unadopt.1 +2 -2
- package/man/canon-subject.1 +2 -2
- package/man/canon-task-done.1 +2 -2
- package/man/canon-task.1 +2 -2
- package/man/canon-tier-age.1 +2 -2
- package/man/canon-tier.1 +2 -2
- package/man/canon-trace.1 +2 -2
- package/man/canon.1 +4 -4
- package/package.json +4 -4
- package/dist/skills/reference/canon-session-ingest.md +0 -224
- package/man/canon-ingest-sessions.1 +0 -62
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.ie \n(.g .ds Aq \(aq
|
|
2
2
|
.el .ds Aq '
|
|
3
|
-
.TH canon-subject-unadopt 1 "unadopt 0.
|
|
3
|
+
.TH canon-subject-unadopt 1 "unadopt 0.39.0"
|
|
4
4
|
.SH NAME
|
|
5
5
|
canon\-subject\-unadopt \- Take a change back out of a subject (the mirror of adopt; refused for a change whose brief is approved)
|
|
6
6
|
.SH SYNOPSIS
|
|
@@ -60,4 +60,4 @@ change whose brief carries an `Approved:` line: it is the subject\*(Aqs approved
|
|
|
60
60
|
scope, and for a change a scenario the subject owns is tagged
|
|
61
61
|
`@flow:<change>.*` for (remove or retag it first). A pair that is not linked writes nothing and exits 0.
|
|
62
62
|
.SH VERSION
|
|
63
|
-
v0.
|
|
63
|
+
v0.39.0
|
package/man/canon-subject.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.ie \n(.g .ds Aq \(aq
|
|
2
2
|
.el .ds Aq '
|
|
3
|
-
.TH canon-subject 1 "subject 0.
|
|
3
|
+
.TH canon-subject 1 "subject 0.39.0"
|
|
4
4
|
.SH NAME
|
|
5
5
|
canon\-subject \- Create and manage subjects (durable product units)
|
|
6
6
|
.SH SYNOPSIS
|
|
@@ -48,4 +48,4 @@ Show a subject (read\-only)
|
|
|
48
48
|
canon\-subject\-move(1)
|
|
49
49
|
Move a subject to another lifecycle state (shipping is evidence\-gated; with spec_coverage.require_review, entering its scope is review\-gated; shipped → verifying reopens with \-\-reason)
|
|
50
50
|
.SH VERSION
|
|
51
|
-
v0.
|
|
51
|
+
v0.39.0
|
package/man/canon-task-done.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.ie \n(.g .ds Aq \(aq
|
|
2
2
|
.el .ds Aq '
|
|
3
|
-
.TH canon-task-done 1 "done 0.
|
|
3
|
+
.TH canon-task-done 1 "done 0.39.0"
|
|
4
4
|
.SH NAME
|
|
5
5
|
canon\-task\-done \- Flip one task checkbox, gated on real evidence (fails closed)
|
|
6
6
|
.SH SYNOPSIS
|
|
@@ -44,4 +44,4 @@ Print version
|
|
|
44
44
|
<\fITASK_ID\fR>
|
|
45
45
|
The task id (<change_id>#<n>)
|
|
46
46
|
.SH VERSION
|
|
47
|
-
v0.
|
|
47
|
+
v0.39.0
|
package/man/canon-task.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.ie \n(.g .ds Aq \(aq
|
|
2
2
|
.el .ds Aq '
|
|
3
|
-
.TH canon-task 1 "task 0.
|
|
3
|
+
.TH canon-task 1 "task 0.39.0"
|
|
4
4
|
.SH NAME
|
|
5
5
|
canon\-task \- Flip a plan task\*(Aqs checkbox once committed evidence supports it
|
|
6
6
|
.SH SYNOPSIS
|
|
@@ -39,4 +39,4 @@ Flip one task checkbox, gated on real evidence (fails closed)
|
|
|
39
39
|
Examples:
|
|
40
40
|
canon task done my\-change#3
|
|
41
41
|
.SH VERSION
|
|
42
|
-
v0.
|
|
42
|
+
v0.39.0
|
package/man/canon-tier-age.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.ie \n(.g .ds Aq \(aq
|
|
2
2
|
.el .ds Aq '
|
|
3
|
-
.TH canon-tier-age 1 "age 0.
|
|
3
|
+
.TH canon-tier-age 1 "age 0.39.0"
|
|
4
4
|
.SH NAME
|
|
5
5
|
canon\-tier\-age \- Apply canon.yaml aging rules, moving old records to their destination tier
|
|
6
6
|
.SH SYNOPSIS
|
|
@@ -47,4 +47,4 @@ Print help
|
|
|
47
47
|
\fB\-V\fR, \fB\-\-version\fR
|
|
48
48
|
Print version
|
|
49
49
|
.SH VERSION
|
|
50
|
-
v0.
|
|
50
|
+
v0.39.0
|
package/man/canon-tier.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.ie \n(.g .ds Aq \(aq
|
|
2
2
|
.el .ds Aq '
|
|
3
|
-
.TH canon-tier 1 "tier 0.
|
|
3
|
+
.TH canon-tier 1 "tier 0.39.0"
|
|
4
4
|
.SH NAME
|
|
5
5
|
canon\-tier \- Age records between storage tiers
|
|
6
6
|
.SH SYNOPSIS
|
|
@@ -36,4 +36,4 @@ Print version
|
|
|
36
36
|
canon\-tier\-age(1)
|
|
37
37
|
Apply canon.yaml aging rules, moving old records to their destination tier
|
|
38
38
|
.SH VERSION
|
|
39
|
-
v0.
|
|
39
|
+
v0.39.0
|
package/man/canon-trace.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.ie \n(.g .ds Aq \(aq
|
|
2
2
|
.el .ds Aq '
|
|
3
|
-
.TH canon-trace 1 "trace 0.
|
|
3
|
+
.TH canon-trace 1 "trace 0.39.0"
|
|
4
4
|
.SH NAME
|
|
5
5
|
canon\-trace \- Follow a finding\*(Aqs review loop in time order: review, finding, fix, re\-review, evidence
|
|
6
6
|
.SH SYNOPSIS
|
|
@@ -53,4 +53,4 @@ the ledger archive\*(Aqs old versions included, oldest first. Reads the same der
|
|
|
53
53
|
`canon search`. Exit 2 for an id no record says, an ambiguous sha prefix or an operand of none
|
|
54
54
|
of the three shapes.
|
|
55
55
|
.SH VERSION
|
|
56
|
-
v0.
|
|
56
|
+
v0.39.0
|
package/man/canon.1
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
.ie \n(.g .ds Aq \(aq
|
|
2
2
|
.el .ds Aq '
|
|
3
|
-
.TH canon 1 "canon 0.
|
|
3
|
+
.TH canon 1 "canon 0.39.0"
|
|
4
4
|
.SH NAME
|
|
5
5
|
canon \- Specs, evidence gates, and agent memory for your repo
|
|
6
6
|
.SH SYNOPSIS
|
|
7
7
|
\fBcanon\fR [\fB\-\-as\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] <\fIsubcommands\fR>
|
|
8
8
|
.SH DESCRIPTION
|
|
9
|
-
canon keeps a repo\*(Aqs specs, review evidence, and agent strategy memory in one place: author .feature specs, task done completion on real evidence, ingest
|
|
9
|
+
canon keeps a repo\*(Aqs specs, review evidence, and agent strategy memory in one place: author .feature specs, task done completion on real evidence, ingest plans and records, and retrieve role\-scoped guidance.
|
|
10
10
|
.SH OPTIONS
|
|
11
11
|
.TP
|
|
12
12
|
\fB\-\-as\fR \fI<ROLE>\fR
|
|
@@ -103,7 +103,7 @@ canon\-divergence(1)
|
|
|
103
103
|
Stage, promote, resolve, and inspect spec divergences
|
|
104
104
|
.TP
|
|
105
105
|
canon\-ingest(1)
|
|
106
|
-
Import
|
|
106
|
+
Import records and plans into canon\*(Aqs store
|
|
107
107
|
.TP
|
|
108
108
|
canon\-retrieve(1)
|
|
109
109
|
Fetch role\-scoped strategy guidance
|
|
@@ -172,4 +172,4 @@ Learn more:
|
|
|
172
172
|
plus the script sidecar; `skills check` and `skills doctor` inspect the
|
|
173
173
|
target without deleting user files.
|
|
174
174
|
.SH VERSION
|
|
175
|
-
v0.
|
|
175
|
+
v0.39.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@journeykit/canon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"description": "canon — harness knowledge substrate. JS launcher: platform detection + native binary resolution.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@journeykit/canon-core-darwin-arm64": "0.
|
|
38
|
-
"@journeykit/canon-core-linux-x64": "0.
|
|
39
|
-
"@journeykit/canon-core-win32-x64": "0.
|
|
37
|
+
"@journeykit/canon-core-darwin-arm64": "0.39.0",
|
|
38
|
+
"@journeykit/canon-core-linux-x64": "0.39.0",
|
|
39
|
+
"@journeykit/canon-core-win32-x64": "0.39.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^20.0.0",
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
# canon-session-ingest
|
|
2
|
-
|
|
3
|
-
`canon ingest sessions` turns every agent CLI's on-disk transcript store
|
|
4
|
-
into `Session`/`Run`/`Event` records on canon's join spine, scanning four
|
|
5
|
-
adapters, normalizing, and persisting through the same tier resolution
|
|
6
|
-
`canon query` / `canon tier age` use. The default corpus is scoped to the
|
|
7
|
-
current PROJECT; the watermark gate is per-file; user directives are
|
|
8
|
-
metadata-only unless explicitly opted in by bounded privacy config.
|
|
9
|
-
|
|
10
|
-
**Quick start needs zero docker/services.** `canon init` scaffolds `hot`
|
|
11
|
-
as a local sqlite file (`.canon/hot.db`) with `session`/`run`/`event`
|
|
12
|
-
already routed to it — a fresh repo's FIRST `canon ingest sessions`
|
|
13
|
-
persists real records with no `docker compose` stack, no `CANON_PG_DSN`,
|
|
14
|
-
no live database. Swap `hot` to postgres (the commented stanza `canon
|
|
15
|
-
init` ships beside the sqlite one) once team-scale multi-agent
|
|
16
|
-
concurrency outgrows sqlite's single-writer mode.
|
|
17
|
-
|
|
18
|
-
## `canon ingest sessions [--watch] [--interval-secs N] [--home <dir>] [--full] [--all-workspaces]`
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
# one pass over this project's sources
|
|
22
|
-
canon ingest sessions
|
|
23
|
-
# poll every 30s (see --interval-secs)
|
|
24
|
-
canon ingest sessions --watch
|
|
25
|
-
# ignore the watermark; re-parse every in-scope file
|
|
26
|
-
canon ingest sessions --full
|
|
27
|
-
# machine-wide scan
|
|
28
|
-
canon ingest sessions --all-workspaces
|
|
29
|
-
# override the scan-root home ($HOME)
|
|
30
|
-
canon ingest sessions --home /custom
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
**Done when:** the run summary (below) ends with `malformed records … : 0`
|
|
34
|
-
and `canon query --kind session` lists the sessions; a rerun reports the
|
|
35
|
-
files as `skipped unchanged (watermark)` and writes nothing.
|
|
36
|
-
|
|
37
|
-
## The four adapters
|
|
38
|
-
|
|
39
|
-
Registered in order: **`omp`** (omp/pi sessions), **`hermes`**,
|
|
40
|
-
**`claude`** (`~/.claude/projects/**/*.jsonl`), **`codex`**
|
|
41
|
-
(`${CODEX_HOME:-~/.codex}/sessions/` unioned with `archived_sessions/`).
|
|
42
|
-
Each resolves its default root and honors an env override
|
|
43
|
-
(`CANON_INGEST_OMP_SESSIONS_DIR`, `CANON_INGEST_CLAUDE_SESSIONS_DIR`,
|
|
44
|
-
`CODEX_HOME`, `HERMES_HOME`). An absent source root is a zero-record,
|
|
45
|
-
non-fatal skip.
|
|
46
|
-
|
|
47
|
-
### Per-source root overrides (`canon.yaml`)
|
|
48
|
-
|
|
49
|
-
```yaml
|
|
50
|
-
ingest:
|
|
51
|
-
sources:
|
|
52
|
-
omp:
|
|
53
|
-
roots: [/data/omp-sessions] # relative paths resolve against the canon.yaml dir
|
|
54
|
-
codex:
|
|
55
|
-
roots: [] # explicit empty = scan ZERO (not the default)
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
A source with a **present** `roots` scans exactly those (explicit
|
|
59
|
-
`roots: []` scans nothing); a source whose key or `roots` is **absent**
|
|
60
|
-
keeps its env-override + default resolution. Unlike artifacts (where
|
|
61
|
-
unconfigured = no scan), sessions default to their home roots when
|
|
62
|
-
unconfigured. A PRESENT but broken `ingest:` section fails **loud** (a
|
|
63
|
-
typo like `root:` for `roots:`, an unknown source id, or a non-YAML
|
|
64
|
-
canon.yaml) rather than silently scanning the wrong corpus; a
|
|
65
|
-
missing/unreadable canon.yaml stays a soft no-config.
|
|
66
|
-
|
|
67
|
-
## Project scope — the default corpus
|
|
68
|
-
|
|
69
|
-
`canon ingest sessions` defaults to THIS PROJECT's sessions, never the
|
|
70
|
-
whole machine: the repo's main `git worktree` root plus every linked
|
|
71
|
-
worktree (`git worktree list --porcelain`). Outside a git repo, the scope
|
|
72
|
-
fails soft to the repo root alone.
|
|
73
|
-
|
|
74
|
-
- **omp/pi and Claude Code are cwd-partitioned on disk** — one
|
|
75
|
-
subdirectory per project. Out-of-scope subdirectories are pruned at
|
|
76
|
-
enumerate time — never read or counted.
|
|
77
|
-
- **Codex and Hermes are not partitioned** — rows are filtered
|
|
78
|
-
post-parse by workspace membership; a row with no captured workspace is
|
|
79
|
-
kept, fail-soft.
|
|
80
|
-
- **`--all-workspaces`** restores the machine-wide scan. Scope is still
|
|
81
|
-
resolved (so `project_key` stamping stays correct); only the
|
|
82
|
-
pruning/filtering are disabled.
|
|
83
|
-
- Every ingested session whose workspace resolves into the active project
|
|
84
|
-
gets `project_key` stamped to the MAIN worktree's key, so `canon query
|
|
85
|
-
--kind session` aggregates a whole project's sessions regardless of
|
|
86
|
-
which worktree recorded them.
|
|
87
|
-
- The run summary's first line always names the active scope:
|
|
88
|
-
`scope: project /repo/root (2 roots)` or `scope: all workspaces`.
|
|
89
|
-
|
|
90
|
-
### Provenance, digests, and parser generations
|
|
91
|
-
|
|
92
|
-
The parser semantics are compared against Tokscale upstream at
|
|
93
|
-
https://github.com/junhoyeo/tokscale (revision
|
|
94
|
-
`fe72e1f9b5a2b1a927108b353a9730a5c631a196`); the cache-accounting comparison
|
|
95
|
-
reference is commit
|
|
96
|
-
[`2cd6c648df026fb43d37e492efa9c344e2d681ee`](https://github.com/junhoyeo/tokscale/commit/2cd6c648df026fb43d37e492efa9c344e2d681ee).
|
|
97
|
-
Canon ports the selected parser semantics, including Claude's nested
|
|
98
|
-
cache-write buckets, but does **not** vendor Tokscale's pricing or cache
|
|
99
|
-
service.
|
|
100
|
-
|
|
101
|
-
Three identities are intentionally distinct:
|
|
102
|
-
|
|
103
|
-
* the raw file SHA-256 watermark identifies unchanged transcript bytes;
|
|
104
|
-
* the normalized content digest is canonical JSON over the complete
|
|
105
|
-
normalized event and changes when normalized token detail changes; and
|
|
106
|
-
* the parse-generation cursor identity combines adapter id and parse version,
|
|
107
|
-
forcing a re-read when parser semantics change even if raw bytes do not.
|
|
108
|
-
|
|
109
|
-
## The watermark — per-file, incremental `--watch`
|
|
110
|
-
|
|
111
|
-
Each pass content-digests every present (post-pruning) file and diffs it
|
|
112
|
-
against its source's persisted cursor (under
|
|
113
|
-
`<repo>/.canon/ingest/cursors/`, gitignored), written after a durable
|
|
114
|
-
pass. A file whose digest matches its cursor is SKIPPED — never parsed; a
|
|
115
|
-
new or changed file is (re-)parsed. One session derives from exactly one
|
|
116
|
-
file, so a single growing transcript re-parses alone instead of dragging
|
|
117
|
-
the whole source back through parse/persist.
|
|
118
|
-
|
|
119
|
-
- The gate is sound: a file is skipped only when its digest matches the
|
|
120
|
-
cursor, so a new, changed, copied, or restored file is always
|
|
121
|
-
re-scanned.
|
|
122
|
-
- Correctness never depends on the cursor: a missing/corrupt cursor
|
|
123
|
-
treats every present file as new, and the digest-idempotent write path
|
|
124
|
-
keeps any rescan from double-writing.
|
|
125
|
-
- A cursor's identity carries its adapter's PARSE VERSION as well as its
|
|
126
|
-
files, so changing an adapter's normalization re-reads that adapter's
|
|
127
|
-
transcripts instead of reporting them unchanged — no `--full`, no
|
|
128
|
-
cursor deletion. Version `1` IS the bare `client_id` (`omp.json`), so a
|
|
129
|
-
cursor already on disk is never invalidated just by installing the
|
|
130
|
-
mechanism; a bump appends the suffix (`claude-code-v3.json`) and that
|
|
131
|
-
`omp` is at `2` because the logical adapter now deduplicates forks
|
|
132
|
-
across files; `hermes` remains at `1`; `codex` is at `2` because its
|
|
133
|
-
reasoning-token accounting is split; and `claude-code` is at `3` because
|
|
134
|
-
cache accounting now recognizes `cache_write_1h` buckets. Each changed
|
|
135
|
-
adapter re-reads once to backfill the normalization change that the old
|
|
136
|
-
watermark would otherwise hide.
|
|
137
|
-
|
|
138
|
-
**`--full`** ignores the cursors and re-parses every present in-scope
|
|
139
|
-
file (a full rescan / cursor reset) — safe because a byte-identical
|
|
140
|
-
resubmission is a no-op; cursors re-advance afterward.
|
|
141
|
-
|
|
142
|
-
## User directives
|
|
143
|
-
|
|
144
|
-
Every adapter (except Hermes, whose format carries no user-turn text)
|
|
145
|
-
emits one parsed `DirectiveRow` per USER-role message. Parsing retains
|
|
146
|
-
source text only in memory; the shared post-adapter privacy boundary
|
|
147
|
-
controls whether it becomes a durable event. The default when
|
|
148
|
-
`ingest.sessions.privacy` is absent is metadata-only: no
|
|
149
|
-
`user_directive` event reaches normalized output.
|
|
150
|
-
|
|
151
|
-
Repositories that explicitly opt in MUST set a positive bound:
|
|
152
|
-
|
|
153
|
-
```yaml
|
|
154
|
-
ingest:
|
|
155
|
-
sessions:
|
|
156
|
-
privacy:
|
|
157
|
-
capture_user_directives: true
|
|
158
|
-
max_directive_chars: 4096
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Captured text is classified and redacted BEFORE the Unicode-scalar capture
|
|
162
|
-
bound is applied. The conservative classifier replaces known API
|
|
163
|
-
key/token/password assignments, bearer credentials, PEM private keys, and
|
|
164
|
-
email addresses with deterministic `[REDACTED_SECRET_N]` /
|
|
165
|
-
`[REDACTED_PII_N]` placeholders and includes `redaction_counts`. The
|
|
166
|
-
detail's `redacted` is true only when a known value was replaced;
|
|
167
|
-
`truncated` is independent and may be true for otherwise unredacted text.
|
|
168
|
-
This classifier is not a guarantee against every kind of secret or PII.
|
|
169
|
-
`workspace_key`/`workspace_label` remain metadata. The source transcript
|
|
170
|
-
remains the source of truth and is not rewritten, purged, or replaced by
|
|
171
|
-
Canon's normalized event.
|
|
172
|
-
|
|
173
|
-
The source cursor identity includes the privacy mode and positive bound, so
|
|
174
|
-
toggling capture or changing its bound re-scans unchanged source bytes.
|
|
175
|
-
Re-scans retain stable event sequence/key ordinals; they do not purge
|
|
176
|
-
previously stored normalized records. Operators owning pre-existing raw
|
|
177
|
-
data MUST handle purge/migration separately.
|
|
178
|
-
|
|
179
|
-
These events interleave with `token_usage` events in one deterministic
|
|
180
|
-
order (directive-before-token on a timestamp tie). Query them with:
|
|
181
|
-
|
|
182
|
-
```bash
|
|
183
|
-
# filter detail.label == "user_directive"
|
|
184
|
-
canon query --kind event
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## Reading the run summary
|
|
188
|
-
|
|
189
|
-
Each pass prints the active scope, one line per adapter, then totals:
|
|
190
|
-
|
|
191
|
-
```
|
|
192
|
-
scope: project /path/to/repo (2 roots)
|
|
193
|
-
omp: 3 file(s) scanned, 1 reparsed, 2 skipped unchanged (watermark), 4 row(s) parsed, 0 malformed record(s)
|
|
194
|
-
claude-code: 1 file(s) scanned, 0 reparsed, 1 skipped unchanged (watermark), 0 row(s) parsed, 0 malformed record(s)
|
|
195
|
-
sessions normalized: 4
|
|
196
|
-
malformed records (corrupt line/db, counted as violations): 0
|
|
197
|
-
rows skipped (malformed session_id): 0
|
|
198
|
-
runs written: 4
|
|
199
|
-
events written: 37
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
- **scope** — the active project scope (`--all-workspaces` names it).
|
|
203
|
-
- **file(s) scanned** — every present file this source matched, after
|
|
204
|
-
pruning, before the per-file gate.
|
|
205
|
-
- **reparsed** — the subset actually (re-)parsed this pass (`0` on a
|
|
206
|
-
steady-state pass).
|
|
207
|
-
- **skipped unchanged (watermark)** — files skipped because that file's
|
|
208
|
-
digest was byte-identical to its cursor entry.
|
|
209
|
-
- **malformed records** — corrupt lines / dbs an adapter hit but could
|
|
210
|
-
not extract a row from (counted as a violation, never crashing).
|
|
211
|
-
- **store tiers unreachable** — if `canon.yaml`'s tiers aren't reachable
|
|
212
|
-
(e.g. `tiers.pg` set but `CANON_PG_DSN` unset) or `session`/`run`/
|
|
213
|
-
`event` aren't routed, the pass prints a metadata-only JSON fallback
|
|
214
|
-
instead of persisting — never a partial write. The fallback contains
|
|
215
|
-
scope, adapter counts, record counts, IDs/digests, and a stable
|
|
216
|
-
routing/tier failure class/reason; it never contains directive text,
|
|
217
|
-
task/context prose, or raw event detail.
|
|
218
|
-
|
|
219
|
-
## What this skill does NOT cover
|
|
220
|
-
|
|
221
|
-
- Artifact/verdict ingestion (`canon ingest records`) — a different
|
|
222
|
-
pipeline; see the `canon-artifact-ingest` skill.
|
|
223
|
-
- Cost-parity computation — omp/pi's own cost is `0.0`/`Unknown` per the
|
|
224
|
-
ported behavior.
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
.ie \n(.g .ds Aq \(aq
|
|
2
|
-
.el .ds Aq '
|
|
3
|
-
.TH canon-ingest-sessions 1 "sessions 0.38.0"
|
|
4
|
-
.SH NAME
|
|
5
|
-
canon\-ingest\-sessions \- Import agent CLI session transcripts (omp/pi, Claude Code, Codex, Hermes)
|
|
6
|
-
.SH SYNOPSIS
|
|
7
|
-
\fBcanon ingest sessions\fR [\fB\-\-as\fR] [\fB\-\-watch\fR] [\fB\-\-interval\-secs\fR] [\fB\-\-home\fR] [\fB\-\-repo\fR] [\fB\-\-full\fR] [\fB\-\-all\-workspaces\fR] [\fB\-\-dry\-run\fR] [\fB\-\-json\fR] [\fB\-\-input\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR]
|
|
8
|
-
.SH DESCRIPTION
|
|
9
|
-
Import agent CLI session transcripts (omp/pi, Claude Code, Codex, Hermes)
|
|
10
|
-
.SH OPTIONS
|
|
11
|
-
.TP
|
|
12
|
-
\fB\-\-as\fR \fI<ROLE>\fR
|
|
13
|
-
The role you act as: planner, implementer, reviewer or orchestrator. Overrides `CANON_ROLE`. `schema` and `context` list only the role\*(Aqs commands, `status` keeps its steps, and `\-\-role` on `evidence add` / `evidence audit` / `review scenario` / `review change` is this role unless given
|
|
14
|
-
.br
|
|
15
|
-
|
|
16
|
-
.br
|
|
17
|
-
\fIPossible values:\fR
|
|
18
|
-
.RS 14
|
|
19
|
-
.IP \(bu 2
|
|
20
|
-
planner
|
|
21
|
-
.IP \(bu 2
|
|
22
|
-
implementer
|
|
23
|
-
.IP \(bu 2
|
|
24
|
-
reviewer
|
|
25
|
-
.IP \(bu 2
|
|
26
|
-
orchestrator
|
|
27
|
-
.RE
|
|
28
|
-
.TP
|
|
29
|
-
\fB\-\-watch\fR
|
|
30
|
-
Keep polling instead of exiting after one pass
|
|
31
|
-
.TP
|
|
32
|
-
\fB\-\-interval\-secs\fR \fI<N>\fR [default: 30]
|
|
33
|
-
Seconds between polls
|
|
34
|
-
.TP
|
|
35
|
-
\fB\-\-home\fR \fI<DIR>\fR
|
|
36
|
-
The scan root\*(Aqs home directory (defaults to $HOME)
|
|
37
|
-
.TP
|
|
38
|
-
\fB\-\-repo\fR \fI<DIR>\fR
|
|
39
|
-
The repo to act on (default: the nearest ancestor directory holding a canon.yaml)
|
|
40
|
-
.TP
|
|
41
|
-
\fB\-\-full\fR
|
|
42
|
-
Ignore watermark cursors and re\-parse every in\-scope file
|
|
43
|
-
.TP
|
|
44
|
-
\fB\-\-all\-workspaces\fR
|
|
45
|
-
Scan every workspace on this machine, not just this project
|
|
46
|
-
.TP
|
|
47
|
-
\fB\-\-dry\-run\fR
|
|
48
|
-
Validate fully and report what would be written, without writing anything
|
|
49
|
-
.TP
|
|
50
|
-
\fB\-\-json\fR
|
|
51
|
-
Output JSON instead of the human\-readable form
|
|
52
|
-
.TP
|
|
53
|
-
\fB\-\-input\fR \fI<JSON|FILE|\->\fR
|
|
54
|
-
The arguments as JSON: an object (one run) or an array / NDJSON file or `\-` (a batch); keys are the option names in camelCase, `operands` an array
|
|
55
|
-
.TP
|
|
56
|
-
\fB\-h\fR, \fB\-\-help\fR
|
|
57
|
-
Print help
|
|
58
|
-
.TP
|
|
59
|
-
\fB\-V\fR, \fB\-\-version\fR
|
|
60
|
-
Print version
|
|
61
|
-
.SH VERSION
|
|
62
|
-
v0.38.0
|