@erclx/canon 5.38.0 → 5.40.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/README.md +5 -5
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/api-design/SKILL.md +12 -9
- package/claude/skills/auto-ship/SKILL.md +43 -23
- package/claude/skills/backlog-triage/SKILL.md +62 -53
- package/claude/skills/backlog-triage/references/apply.md +69 -0
- package/claude/skills/build-in-slices/SKILL.md +8 -4
- package/claude/skills/canon-cli/SKILL.md +5 -1
- package/claude/skills/canon-feedback/SKILL.md +18 -8
- package/claude/skills/canon-feedback-triage/SKILL.md +10 -3
- package/claude/skills/canvas-board/SKILL.md +37 -18
- package/claude/skills/ci-workflow/SKILL.md +5 -4
- package/claude/skills/code-craft/SKILL.md +10 -6
- package/claude/skills/codebase-layout/SKILL.md +3 -5
- package/claude/skills/context-fold/REQUIREMENT.md +4 -4
- package/claude/skills/context-fold/SKILL.md +42 -23
- package/claude/skills/context-fold/references/context-refresh.md +4 -3
- package/claude/skills/context-fold/references/context.md +79 -64
- package/claude/skills/create-rule/SKILL.md +7 -3
- package/claude/skills/create-skill/SKILL.md +27 -7
- package/claude/skills/create-skill/references/skill-reference.md +41 -17
- package/claude/skills/decision-escalate/SKILL.md +8 -5
- package/claude/skills/deploy-app/SKILL.md +1 -1
- package/claude/skills/deprecation-migration/SKILL.md +12 -4
- package/claude/skills/design-taste/SKILL.md +17 -11
- package/claude/skills/docs-sync/REQUIREMENT.md +1 -0
- package/claude/skills/docs-sync/SKILL.md +17 -6
- package/claude/skills/docs-sync/references/docs.md +54 -21
- package/claude/skills/docs-sync/references/readme.md +32 -8
- package/claude/skills/document-health/SKILL.md +3 -4
- package/claude/skills/draft-and-pick/SKILL.md +73 -47
- package/claude/skills/draft-doc/SKILL.md +9 -4
- package/claude/skills/draft-doc/references/context.md +4 -4
- package/claude/skills/draft-doc/references/docs.md +1 -0
- package/claude/skills/draft-doc/references/wiki.md +3 -2
- package/claude/skills/draft-figure/SKILL.md +9 -7
- package/claude/skills/draft-identity/SKILL.md +24 -52
- package/claude/skills/draft-identity/references/card-route.md +46 -0
- package/claude/skills/draft-ready/SKILL.md +19 -7
- package/claude/skills/draft-screencast/SKILL.md +6 -112
- package/claude/skills/draft-screencast/references/beats-template.md +119 -0
- package/claude/skills/draft-slides/SKILL.md +9 -7
- package/claude/skills/draft-slides/references/deck.md +183 -0
- package/claude/skills/git-branch/SKILL.md +3 -3
- package/claude/skills/git-commit/SKILL.md +5 -3
- package/claude/skills/git-followup/SKILL.md +16 -9
- package/claude/skills/git-issue/SKILL.md +6 -5
- package/claude/skills/git-pr/SKILL.md +56 -44
- package/claude/skills/git-pr/references/evidence.md +2 -2
- package/claude/skills/git-pr/references/final-command.md +1 -1
- package/claude/skills/git-pr/references/labels.md +1 -1
- package/claude/skills/git-pr/references/publish.md +1 -1
- package/claude/skills/git-ship/SKILL.md +43 -34
- package/claude/skills/git-ship/references/ci-watch.md +31 -0
- package/claude/skills/git-split/SKILL.md +28 -100
- package/claude/skills/git-split/references/independent.md +40 -0
- package/claude/skills/git-split/references/stacked.md +73 -0
- package/claude/skills/git-stage/SKILL.md +9 -7
- package/claude/skills/git-worktree/SKILL.md +27 -49
- package/claude/skills/git-worktree/references/cleanup.md +55 -0
- package/claude/skills/markdown-craft/SKILL.md +2 -2
- package/claude/skills/markdown-craft/references/markdown.md +82 -53
- package/claude/skills/plan-feature/SKILL.md +52 -46
- package/claude/skills/plan-feature/references/batches.md +46 -0
- package/claude/skills/plan-groundwork/SKILL.md +60 -74
- package/claude/skills/plan-groundwork/references/output.md +48 -0
- package/claude/skills/plan-intake/SKILL.md +28 -21
- package/claude/skills/plan-intake-answer/SKILL.md +14 -13
- package/claude/skills/read-frames/SKILL.md +2 -0
- package/claude/skills/record-screencast/SKILL.md +31 -11
- package/claude/skills/review-address/SKILL.md +76 -158
- package/claude/skills/review-address/references/rebase-only.md +34 -0
- package/claude/skills/review-craft/SKILL.md +27 -11
- package/claude/skills/review-pr/SKILL.md +91 -40
- package/claude/skills/review-ui/SKILL.md +63 -37
- package/claude/skills/review-ui/references/hosted-preview.md +30 -0
- package/claude/skills/role-orchestrator/SKILL.md +105 -74
- package/claude/skills/role-orchestrator/references/orchestrator-filing.md +26 -0
- package/claude/skills/role-orchestrator/references/orchestrator-handback.md +1 -1
- package/claude/skills/role-planner/SKILL.md +66 -64
- package/claude/skills/role-reviewer/SKILL.md +57 -46
- package/claude/skills/role-worker/SKILL.md +68 -63
- package/claude/skills/search-craft/SKILL.md +7 -5
- package/claude/skills/session-compact/SKILL.md +16 -11
- package/claude/skills/session-map/SKILL.md +31 -10
- package/claude/skills/session-relay/SKILL.md +32 -65
- package/claude/skills/session-resume/SKILL.md +18 -13
- package/claude/skills/session-worktree/SKILL.md +70 -42
- package/claude/skills/systematic-debugging/SKILL.md +6 -1
- package/claude/skills/target-check/SKILL.md +13 -6
- package/claude/skills/target-setup/SKILL.md +39 -27
- package/claude/skills/task-board/SKILL.md +68 -60
- package/claude/skills/task-board/references/board.md +1 -1
- package/claude/skills/task-board/references/create-report.md +36 -0
- package/claude/skills/task-board/references/tasks.md +1 -1
- package/claude/skills/task-complete/SKILL.md +20 -18
- package/claude/skills/teach-workspace/SKILL.md +61 -33
- package/claude/skills/test-craft/SKILL.md +2 -1
- package/claude/skills/test-first/SKILL.md +15 -9
- package/claude/skills/ui-checklist/SKILL.md +18 -16
- package/claude/skills/ux-audit/SKILL.md +9 -10
- package/claude/skills/ux-measure/SKILL.md +23 -19
- package/claude/skills/video-craft/SKILL.md +15 -7
- package/claude/skills/write-human/SKILL.md +9 -1
- package/claude/skills/youtube-transcripts/SKILL.md +2 -1
- package/docs/agents/audits.md +61 -60
- package/docs/agents/context-audit.md +40 -58
- package/docs/agents/index.md +11 -61
- package/docs/agents/indexes.md +25 -29
- package/docs/agents/install-and-sync.md +125 -235
- package/docs/agents/markdown-audit.md +54 -96
- package/docs/agents/migrate.md +41 -16
- package/docs/agents/output-shape.md +60 -45
- package/docs/agents/overview.md +36 -12
- package/docs/agents/records.md +37 -79
- package/docs/agents/sessions-transfer.md +26 -70
- package/docs/agents/targets.md +25 -77
- package/docs/target/index.md +0 -1
- package/docs/target/migrations.md +57 -66
- package/docs/target/projects.md +36 -78
- package/docs/target/scenarios.md +9 -19
- package/docs/target/sync.md +27 -68
- package/docs/workflow/ai-workflow.md +22 -68
- package/docs/workflow/operating-model.md +32 -186
- package/docs/workflow/parallel-features.md +29 -66
- package/docs/workflow/skill-map-on-request.md +22 -24
- package/docs/workflow/skill-map.md +72 -76
- package/docs/workflow/visual-design-workflow.md +25 -118
- package/docs/workflow/zshrc-aliases.md +18 -37
- package/package.json +1 -1
- package/src/canvas/client/inspector/fields.css +4 -0
- package/src/canvas/index.html +6 -0
- package/src/claude/skills-reach.ts +2 -2
- package/src/cli/ui.ts +3 -1
- package/src/commands/canvas.ts +23 -0
- package/src/commands/capture.ts +14 -0
- package/src/commands/claude.ts +14 -1
- package/src/commands/context.ts +106 -7
- package/src/commands/demo.ts +22 -0
- package/src/commands/deps.ts +6 -0
- package/src/commands/driver.ts +28 -2
- package/src/commands/gov.ts +52 -18
- package/src/commands/hooks.ts +63 -0
- package/src/commands/intake.ts +17 -0
- package/src/commands/labels.ts +38 -5
- package/src/commands/markdown.ts +169 -32
- package/src/commands/pr.ts +160 -43
- package/src/commands/records.ts +8 -0
- package/src/commands/secrets.ts +6 -0
- package/src/commands/sessions.ts +8 -0
- package/src/commands/tasks.ts +52 -0
- package/src/commands/teach.ts +13 -0
- package/src/commands/upstream.ts +25 -1
- package/src/commands/worktrees.ts +5 -0
- package/src/context/audit.ts +274 -5
- package/src/context/classify/prompts.ts +1 -1
- package/src/context/folders.ts +1 -1
- package/src/context/gate.ts +23 -7
- package/src/context/shape-gated.ts +30 -0
- package/src/counts/scan.ts +1 -1
- package/src/design/components.ts +1 -1
- package/src/design/document.ts +1 -1
- package/src/design/tokens.ts +1 -1
- package/src/gate/boundaries.ts +4 -1
- package/src/gate/measures.ts +16 -191
- package/src/gate/stages.ts +14 -30
- package/src/git/env.ts +6 -0
- package/src/hooks/reply-links.ts +110 -0
- package/src/markdown/density.ts +258 -0
- package/src/markdown/gate.ts +57 -18
- package/src/markdown/reference-shape.ts +103 -0
- package/src/markdown/scope.ts +162 -0
- package/src/markdown/structure.ts +9 -59
- package/src/pr/lift.ts +153 -19
- package/src/pr/painted.ts +87 -0
- package/src/roots/record.ts +18 -1
- package/src/sandbox/census.ts +1 -1
- package/src/sandbox/headless/run.ts +3 -2
- package/src/sandbox/headless/watch.ts +3 -4
- package/src/shipped/references.ts +1 -1
- package/src/slides/convert/master.ts +3 -0
- package/src/sync/format.ts +46 -0
- package/src/sync/stamp.ts +6 -0
- package/tooling/astro/reference.md +2 -2
- package/tooling/base/reference.md +1 -1
- package/tooling/claude/seeds/.claude/hooks/reply-links.sh +72 -0
- package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +22 -1
- package/tooling/claude/seeds/.claude/settings.json +4 -0
- package/tooling/go/reference.md +1 -1
- package/tooling/nextjs/reference.md +1 -1
- package/tooling/php/reference.md +1 -1
- package/tooling/python/reference.md +1 -1
- package/tooling/vite-react/reference.md +1 -1
- package/tooling/web/reference.md +1 -1
- package/docs/agents/canvas.md +0 -86
- package/docs/agents/capture.md +0 -65
- package/docs/agents/census.md +0 -23
- package/docs/agents/commands.md +0 -154
- package/docs/agents/comments.md +0 -34
- package/docs/agents/context-audit-checks.md +0 -90
- package/docs/agents/context-classify.md +0 -101
- package/docs/agents/counts.md +0 -74
- package/docs/agents/demo.md +0 -140
- package/docs/agents/docs.md +0 -27
- package/docs/agents/drift-surfaces.md +0 -201
- package/docs/agents/driver.md +0 -103
- package/docs/agents/gate.md +0 -90
- package/docs/agents/gov-detect.md +0 -47
- package/docs/agents/hooks.md +0 -58
- package/docs/agents/intake.md +0 -81
- package/docs/agents/key-changes.md +0 -116
- package/docs/agents/label-coverage.md +0 -86
- package/docs/agents/markdown-audit-weight.md +0 -81
- package/docs/agents/pr-evidence-layout.md +0 -70
- package/docs/agents/pr-evidence.md +0 -273
- package/docs/agents/pr-frames.md +0 -131
- package/docs/agents/pr-lift.md +0 -132
- package/docs/agents/pr-local.md +0 -111
- package/docs/agents/pr-preview.md +0 -155
- package/docs/agents/pr-reads.md +0 -111
- package/docs/agents/pr-tick.md +0 -72
- package/docs/agents/records-push.md +0 -61
- package/docs/agents/records-stale.md +0 -40
- package/docs/agents/records-validate.md +0 -57
- package/docs/agents/restated.md +0 -83
- package/docs/agents/routing.md +0 -61
- package/docs/agents/rule-citations.md +0 -90
- package/docs/agents/sandbox.md +0 -126
- package/docs/agents/scripting.md +0 -142
- package/docs/agents/sessions.md +0 -128
- package/docs/agents/skills-audit.md +0 -120
- package/docs/agents/skills-reach.md +0 -64
- package/docs/agents/slides.md +0 -176
- package/docs/agents/state-scoped-risk.md +0 -105
- package/docs/agents/superseded.md +0 -85
- package/docs/agents/tasks-archive.md +0 -83
- package/docs/agents/tasks-plans.md +0 -152
- package/docs/agents/tasks-validate.md +0 -133
- package/docs/agents/tasks.md +0 -123
- package/docs/agents/teach-authoring.md +0 -118
- package/docs/agents/teach.md +0 -157
- package/docs/agents/test-order.md +0 -58
- package/docs/agents/upstream.md +0 -94
- package/docs/agents/worktrees.md +0 -118
- package/docs/target/standards-moved.md +0 -34
- package/src/markdown/growth.ts +0 -43
package/docs/agents/migrate.md
CHANGED
|
@@ -1,34 +1,59 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Migrate
|
|
3
|
-
description: What each canon migrate verb moves
|
|
3
|
+
description: What each canon migrate verb moves, the markers that keep an old spelling, and what each one refuses
|
|
4
|
+
kind: reference
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Migrate
|
|
7
8
|
|
|
8
|
-
`canon migrate <verb>` moves a project off a retired name or layout. Each verb reports its plan and writes nothing until `--write
|
|
9
|
+
`canon migrate <verb>` moves a project off a retired name or layout. Each verb reports its plan and writes nothing until `--write`, takes `--json`, and, except `rename`, takes `--root`. A second run rewrites nothing, which confirms the exclusions and markers fired.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
| Verb | Moves |
|
|
12
|
+
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
+
| `rename` | The retired `aitk` name. `--scope target` rewrites toolkit-owned folders only. |
|
|
14
|
+
| `skill-names` | Plugin skills off their `claude-` prefix and other retired names, with every citation |
|
|
15
|
+
| `records` | Session records from `.claude/` to `.canon/`, with every tracked citation |
|
|
16
|
+
| `surface-roots` | `context/`, `wireframes/`, `ARCHITECTURE.md`, `REQUIREMENTS.md`, `DESIGN.md`, and the stamp folder from `.claude/` to `canon/`, by `git mv` |
|
|
17
|
+
| `record-tree` | Citations inside `.canon/` folders a session still follows: `diagrams`, `memory`, `plans`, `proposals`, `review`, `tasks`, `teach` |
|
|
18
|
+
| `rule-layout` | A flat installed-rule layout onto the `canon/`-wrapped one |
|
|
19
|
+
| `scratch-evidence` | A folder a durable record cites out of `.tmp/`, with its citations |
|
|
20
|
+
| `record-layout` | Review receipts, memory archives, feedback, renders, picks, and evidence into their current folders |
|
|
11
21
|
|
|
12
|
-
|
|
22
|
+
- `skill-names` takes no `--scope` and skips the changelog and eval transcripts
|
|
23
|
+
- `surface-roots` leaves `rules/`, `skills/`, `hooks/`, and `settings.json` where Claude Code reads them
|
|
24
|
+
- `rule-layout` classifies each flat file against the stamp as clean, edited, or unclaimed. Clean and edited files move untouched, and an unclaimed name stays.
|
|
25
|
+
- `record-layout` labels each evidence folder `(pick)` or `(evidence)` in the dry run
|
|
13
26
|
|
|
14
|
-
|
|
27
|
+
## Output
|
|
15
28
|
|
|
16
|
-
|
|
29
|
+
- The plan lists every citation in scope by file, line number, and line text
|
|
30
|
+
- `record-tree` reports closed groundwork and intake trails, the scratch folder, and backup history as counts and rewrites none
|
|
31
|
+
- `records` reports skipped record folders as a count on its own line
|
|
32
|
+
- A `record-tree` rewrite has no undo in version control, so read the report before `--write`
|
|
17
33
|
|
|
18
|
-
|
|
34
|
+
Three markers keep an old spelling on a line. Each also covers the nearest non-blank line, below it for `canon-keep-record-root` and above it for `canon-keep-surface-root`.
|
|
19
35
|
|
|
20
|
-
|
|
36
|
+
| Marker | Keeps |
|
|
37
|
+
| ------------------------- | ---------------------------------------------- |
|
|
38
|
+
| `canon-keep-record-root` | The old record folder spelling |
|
|
39
|
+
| `canon-keep-surface-root` | The old `.claude/` surface root |
|
|
40
|
+
| `canon-keep-retired` | A retired name, for `rename` and `skill-names` |
|
|
21
41
|
|
|
22
|
-
`
|
|
42
|
+
`surface-roots` also reports and leaves a rule's frontmatter `paths:` glob, a path into another repository, and a citation in a dated paragraph.
|
|
23
43
|
|
|
24
|
-
|
|
44
|
+
## Refusals
|
|
25
45
|
|
|
26
|
-
|
|
46
|
+
| Verb | Refuses when |
|
|
47
|
+
| ------------------ | ----------------------------------------------------------------------------------- |
|
|
48
|
+
| `records` | The project does not ignore `.canon/`. Run `canon tooling sync --write` first. |
|
|
49
|
+
| `records` | A record folder already exists at the destination |
|
|
50
|
+
| `surface-roots` | Any destination already exists under `canon/`, refusing the whole plan |
|
|
51
|
+
| `scratch-evidence` | A destination is occupied |
|
|
52
|
+
| `record-layout` | A destination already exists, each move refused on its own |
|
|
53
|
+
| `rule-layout` | A destination holds different bytes. Neither file is touched and other moves apply. |
|
|
27
54
|
|
|
28
|
-
|
|
55
|
+
A `rule-layout` destination holding the same bytes marks a duplicate, which `--write` deletes.
|
|
29
56
|
|
|
30
|
-
|
|
57
|
+
## See also
|
|
31
58
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
The same verb leaves `.canon/review/` holding only reviews. Feedback moves to `.canon/feedback/`, and the design, board, slides, and diagram renders move to `.canon/tmp/render/<kind>/`, off the records remote since the commands regenerate them. Reference images move to `.canon/picks/references/`. A branch report flattens from `review/branch/review-<slug>.md` to `review/branch-<slug>.md`, and a flat `review/ui-checklist-<slug>.md` moves into `.canon/tmp/handoff/ui-checklist/`. Each folder under `review/evidence/` is decided from what it holds: one directly carrying an `arm-<id>` capture or a `design-handoff.md` is a pick and moves to `.canon/picks/<slug>/`, and any other is evidence and moves to `.canon/evidence/<nn>-<slug>/`. Evidence folders are numbered by the oldest file each holds, continuing past any ordinal `evidence/` already carries. The dry run labels each derived destination `(pick)` or `(evidence)`, so a misfiled folder shows before `--write`, and one filed wrong moves back by hand. A bare mention of an emptied folder, such as `review/evidence/` with no slug or `review/branch/` with no report name, matches no row and stays as written.
|
|
59
|
+
- `install-and-sync.md`: the drift report that names these verbs as remedies
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Output shape
|
|
3
|
-
description:
|
|
3
|
+
description: The framed output shape every command renders into, the JSON and color modes, the exit discipline, the runtime catalogs, and a headless invocation per domain
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Output shape
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Data goes to stdout. UI and logs go to stderr. Help is the exception and prints to stdout so it can be piped.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Data shape (lists, runs, errors)
|
|
10
|
+
## Frame
|
|
13
11
|
|
|
14
12
|
```plaintext
|
|
15
13
|
┌
|
|
@@ -17,54 +15,71 @@ Help output is the exception. It prints to stdout so it can be piped and grepped
|
|
|
17
15
|
│
|
|
18
16
|
├ Section
|
|
19
17
|
│ ✓ item
|
|
20
|
-
│ ✓ item
|
|
21
18
|
└
|
|
22
19
|
```
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
- `├ Section` headers introduce groups of items. `log_step` produces the blank `│` spacer before each.
|
|
29
|
-
- `└` closes the frame on stderr, wired via `trap close_timeline EXIT`
|
|
30
|
-
- Errors render as `│ ✗ message` inside the same frame. Never emit a lone error line without a frame.
|
|
21
|
+
- `┌` opens the frame, `│ canon <domain>` is the banner, and `├ Section` groups items
|
|
22
|
+
- `└` closes the frame on stderr
|
|
23
|
+
- An error renders as `│ ✗ message` inside the frame, never as a lone line
|
|
24
|
+
- Help skips the banner and puts `Usage:` directly on `├`
|
|
31
25
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
```plaintext
|
|
35
|
-
┌
|
|
36
|
-
├ Usage: canon <domain> [command]
|
|
37
|
-
│
|
|
38
|
-
│ Commands:
|
|
39
|
-
│ ...
|
|
40
|
-
└
|
|
41
|
-
```
|
|
26
|
+
A help request naming an unknown subcommand, under a group taking no operand, writes its refusal to stderr and exits 1.
|
|
42
27
|
|
|
43
|
-
|
|
28
|
+
## JSON and names modes
|
|
44
29
|
|
|
45
|
-
|
|
30
|
+
`--json` and `--names` keep stdout pure data. The frame still renders on stderr, and diagnostics reach stderr in every mode. A JSON refusal carries an action and a reason, so branch on the record rather than on stderr.
|
|
46
31
|
|
|
47
|
-
|
|
32
|
+
A shell profile may wrap `canon` in a function that takes its status from a later command. Where a verb documents a record field, read the field rather than the exit.
|
|
48
33
|
|
|
49
34
|
## Color
|
|
50
35
|
|
|
51
|
-
Escape sequences reach a destination that renders them and nowhere else
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
36
|
+
Escape sequences reach a destination that renders them and nowhere else, decided per stream. `NO_COLOR` set to any non-empty value turns color off, and so does a destination that is not a terminal. The frame glyphs and the `✓ ! + - ✗` marks survive both.
|
|
37
|
+
|
|
38
|
+
## Exit discipline
|
|
39
|
+
|
|
40
|
+
A command action sets `process.exitCode` and returns. Calling `process.exit()` in an action truncates piped output at the 64K buffer. A file redirect hides the truncation, so test through a pipe.
|
|
41
|
+
|
|
42
|
+
## Runtime catalogs
|
|
43
|
+
|
|
44
|
+
Discover names at runtime rather than hardcoding them.
|
|
45
|
+
|
|
46
|
+
| Command | Returns |
|
|
47
|
+
| --------------------------------- | ---------------------------------------------------------------- |
|
|
48
|
+
| `canon tooling list --json` | Stacks, extends chain, dep and script counts |
|
|
49
|
+
| `canon gov list --json` | Governance stacks, rule sets, evidence, and unreferenced rules |
|
|
50
|
+
| `canon gov detect --json` | Opt-in rules a target's dependencies and paths propose |
|
|
51
|
+
| `canon claude seeds list --json` | Seed doc sources with content |
|
|
52
|
+
| `canon claude skills list --json` | Plugin skills, descriptions, requirement flag, family vocabulary |
|
|
53
|
+
| `canon docs list --json` | Consumer docs plus per-domain context |
|
|
54
|
+
| `canon audits list --json` | Audits the set runs, the corpus each reads, and whether it gates |
|
|
55
|
+
|
|
56
|
+
- `gov list` expands each stack to its rules and carries `unreferenced`, the rules no stack reaches, which install only through `--add`
|
|
57
|
+
- `claude skills list` reports shipped skills only. Each carries `family` (or `null`) and `requirement`, and a `false` requirement is a gap to close. `--names` and `--by-family` change the render.
|
|
58
|
+
- A skill with unparseable frontmatter returns an empty description rather than failing the listing
|
|
59
|
+
|
|
60
|
+
## Headless invocation
|
|
61
|
+
|
|
62
|
+
Set `CANON_NON_INTERACTIVE=1` to refuse every prompt.
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
CANON_NON_INTERACTIVE=1 canon init --stack node --skip wiki /path/to/project
|
|
66
|
+
CANON_NON_INTERACTIVE=1 canon sync /path/to/project
|
|
67
|
+
CANON_NON_INTERACTIVE=1 canon gov install node --add astro,shadcn /path/to/project
|
|
68
|
+
CANON_NON_INTERACTIVE=1 canon gov sync /path/to/project
|
|
69
|
+
CANON_NON_INTERACTIVE=1 canon gov build /path/to/project
|
|
70
|
+
CANON_NON_INTERACTIVE=1 canon tooling diff astro /path/to/project
|
|
71
|
+
CANON_NON_INTERACTIVE=1 canon tooling sync astro /path/to/project --write
|
|
72
|
+
CANON_NON_INTERACTIVE=1 canon wiki init /path/to/project
|
|
73
|
+
canon tooling inject base /path/to/project --configs --seeds
|
|
74
|
+
canon tooling prune-gitignore base /path/to/project
|
|
75
|
+
canon tooling verify vite-react
|
|
76
|
+
canon audits run --json
|
|
77
|
+
canon secrets scan --json
|
|
78
|
+
canon deps audit --json
|
|
79
|
+
```
|
|
69
80
|
|
|
70
|
-
|
|
81
|
+
- `canon tooling sync` needs `--check` or `--write` headlessly. With neither it reports and exits 1.
|
|
82
|
+
- `--skip base` syncs a monorepo subtree without the layer the root owns
|
|
83
|
+
- `canon audits run` exits 2 on a fact and 3 for an audit that did not report
|
|
84
|
+
- `secrets scan` and `deps audit` exit 2 on findings. Only a credential fails `audits run`, and an advisory reports without moving the verdict.
|
|
85
|
+
- Both refuse with a `reason` when they have no corpus, `no-manifest` for the scan and `no-lockfile` for the audit
|
package/docs/agents/overview.md
CHANGED
|
@@ -1,26 +1,50 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Overview
|
|
3
|
-
description: What this folder covers, the invocation rules every command inherits, and
|
|
3
|
+
description: What this folder covers, the invocation rules every command inherits, and how canon docs resolves a topic name
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Overview
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Reference for an agent driving the `canon` CLI, in this repository or in any project that installed it. It covers invocation and output contracts, not domain behavior. Read the project's own `CLAUDE.md` for that.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
`canon --help` is the command catalog. `canon <command> --help` lists subcommands, and `canon <command> <subcommand> --help` prints a leaf's flags, exit codes, and examples. `--help --all` prints both. A pipe gets the same text without the frame glyphs.
|
|
11
11
|
|
|
12
12
|
## Invocation rules
|
|
13
13
|
|
|
14
|
-
`output-shape.md` holds the stream and exit contract
|
|
14
|
+
`output-shape.md` holds the stream and exit contract every command follows. Every command has a non-interactive path, and data on stdout pipes clean.
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Reading a page by name
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
- `commands.md`: the full command catalog, project-level and per-domain
|
|
20
|
-
- `scripting.md`: the runtime catalogs that replace hardcoded names, plus headless invocation examples
|
|
18
|
+
`canon docs list [--json]` lists the consumer docs, plus the per-domain context entries when the install carries `canon/context/`. A registry install carries `docs/` alone. A clone or a linked worktree carries both.
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
`canon docs <topic>` prints one doc to stdout, and an unknown topic names the available ones on stderr and exits 1. Three spellings are tried in order, each across both roots before the next, with `docs/` ahead of `canon/context/`.
|
|
23
21
|
|
|
24
|
-
- `
|
|
25
|
-
-
|
|
26
|
-
- `docs/
|
|
22
|
+
- A sibling file, such as `docs/agents/indexes.md` for `indexes`
|
|
23
|
+
- A folder of that name, which prints its generated `index.md`
|
|
24
|
+
- A sub-area file one level down, such as `operating-model` reaching `docs/workflow/operating-model.md`
|
|
25
|
+
|
|
26
|
+
A bare name carried by two folders of one root resolves to neither and exits 1. Toolkit-internal topics resolve by name and stay off the list.
|
|
27
|
+
|
|
28
|
+
## Commands with no page
|
|
29
|
+
|
|
30
|
+
`canon serve [dir]` binds loopback and prints the link that opens the directory.
|
|
31
|
+
|
|
32
|
+
- Read `url` off `--json`, since a busy port walks forward to the next free one
|
|
33
|
+
- `--entry` escaping the root refuses as `no-entry` before a port is taken
|
|
34
|
+
- Any other bind failure refuses as `bind-failed` carrying the error code
|
|
35
|
+
- `entryExists` reads true with no `--entry` and no root `index.html`
|
|
36
|
+
|
|
37
|
+
`canon inventory [subject]` reads `inventory.toml` at the project root and never gates. A missing server and an unmatched query refuse rather than list nothing.
|
|
38
|
+
|
|
39
|
+
```toml
|
|
40
|
+
base-url = "http://localhost:4173"
|
|
41
|
+
routes = ["/", "/pricing"]
|
|
42
|
+
|
|
43
|
+
[subjects.focus]
|
|
44
|
+
query = "button, a[href], input"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## See also
|
|
48
|
+
|
|
49
|
+
- `output-shape.md`: the frame, `--json`, color, and exit discipline
|
|
50
|
+
- `docs/index.md`: the full docs directory
|
package/docs/agents/records.md
CHANGED
|
@@ -1,103 +1,61 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Records
|
|
3
|
-
description:
|
|
3
|
+
description: Backing the record folders to a private remote, restoring them on a new machine, reading folder size, and pruning stale scratch
|
|
4
|
+
kind: reference
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Records
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Every verb here resolves a record folder at two roots rather than one. `.canon/<folder>` is read first, `.claude/<folder>` second, and a folder neither root carries resolves to the creation default, which is `.canon/`. The scratch folder is the one name that differs by root, spelled `.canon/tmp` and `.claude/.tmp`, since inside a dotted root the leading dot hides nothing already hidden. <!-- canon-keep-record-root -->
|
|
11
|
-
|
|
12
|
-
The read order and the creation default agree. While the record folders were moving to a root of their own, creation stayed at `.claude/` so no record landed under a root whose ignore line had yet to reach a project. The ignore line ships now, so a fresh project scaffolds `.canon/` alone, and `.claude/` stays as a read fallback for a project the move has not reached.
|
|
13
|
-
|
|
14
|
-
A caller never spells a record root by hand for the same reason. A path written as `.canon/plans/...` resolves against one root and reports nothing when it is wrong, which is the quiet failure this ordering exists to prevent: a stale binary meeting a moved layout, writing to the old path, and reporting success. Read a folder through the verb that owns it, and where a skill needs the path itself, take it from that verb's record rather than composing one.
|
|
15
|
-
|
|
16
|
-
A refusal names every root it looked at, so a message reading `no-folder` says where a write would land as well as where the read failed.
|
|
17
|
-
|
|
18
|
-
## Validate
|
|
19
|
-
|
|
20
|
-
`canon records validate <kind>` reports where a record folder disagrees with the standard governing it. Its flags, the per-kind checks, and the refusals are in `records-validate.md`.
|
|
21
|
-
|
|
22
|
-
## Ordinal
|
|
23
|
-
|
|
24
|
-
`canon records ordinal <kind> <slug>` reports the next ordinal `intake` and `groundwork` share, or claims it with `--claim`. The two kinds share one sequence, per `claude/skills/plan-intake/references/intake.md` and `claude/skills/plan-groundwork/references/groundwork.md`, so this reads both `.canon/intake/` and `.canon/groundwork/` regardless of which kind was asked for.
|
|
9
|
+
`canon records` backs the record folders under `.canon/` to a private remote and reports on them. `canon hooks post-merge` runs `push` after every merge.
|
|
25
10
|
|
|
26
11
|
```bash
|
|
27
|
-
canon records
|
|
28
|
-
canon records
|
|
29
|
-
canon records ordinal groundwork my-topic --claim --json
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
| Option | Behavior |
|
|
33
|
-
| --------------- | ------------------------------------------------------ |
|
|
34
|
-
| `--json` | Add a machine-readable record on stdout |
|
|
35
|
-
| `--claim` | Create the folder atomically instead of only reporting |
|
|
36
|
-
| `--root <path>` | Project root, defaulting to the main worktree |
|
|
37
|
-
|
|
38
|
-
Without `--claim` this only reports, so two sessions reading at once can still report the same number, which is what let two sessions open two different record folders under one ordinal on the same day. `--claim` closes that: it reserves the number at a path both an `intake` claim and a `groundwork` claim resolve to identically, whichever kind is asking, and only creates the kind's own `<nn>-<slug>/` folder once that reservation is won. A losing reservation is retried against a freshly read ordinal rather than reported as a collision, bounded to five attempts before refusing as `ordinal-contended`.
|
|
39
|
-
|
|
40
|
-
Exit codes: `0` reported the next ordinal, or `--claim` created the folder. `1` refused, `unknown-kind` when the argument names neither `intake` nor `groundwork`. `2` `--claim` lost every retry to a collision.
|
|
41
|
-
|
|
42
|
-
## Size
|
|
43
|
-
|
|
44
|
-
`canon records size` reports what each record folder holds and how much of it is recent. It reads the same backed folders push carries, resolved the same way, plus the scratch folder, and it gates nothing.
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
canon records size
|
|
12
|
+
canon records push
|
|
13
|
+
canon records pull
|
|
48
14
|
canon records size --json
|
|
15
|
+
canon records prune-tmp --older-than 30
|
|
49
16
|
```
|
|
50
17
|
|
|
51
|
-
|
|
52
|
-
| --------------- | --------------------------------------------- |
|
|
53
|
-
| `--json` | Add a machine-readable record on stdout |
|
|
54
|
-
| `--root <path>` | Project root, defaulting to the main worktree |
|
|
55
|
-
|
|
56
|
-
The table carries one row per folder that exists, heaviest first, with the file count, the bytes, a count for each growth window, and the dates of the least and most recently written file. Those dates render in the machine's local time, which is the calendar day whoever wrote the file was living in, and the reading is per-machine already. Folders that do not exist are named on one line below it rather than printed as rows of zeros. At the legacy `.claude` root, the record a `--json` call emits carries every folder in the fixed list either way, each with a `present` flag, so a caller reading the record gets a stable set of keys and can tell an absent folder from one the reading skipped. At a `.canon` root, the folder set is read off the directory itself rather than off a fixed list, so an absent folder is not listed at all: nothing enumerates a name nobody has created yet.
|
|
57
|
-
|
|
58
|
-
Ordering by weight is what makes the reading worth taking. A folder listed alphabetically hides behind its neighbors, and the row a reader came for is the one that grew.
|
|
59
|
-
|
|
60
|
-
The reading carries two windows rather than one, at 7 and 30 days. A single window cannot separate a folder growing steadily from one that took a single batch: a folder whose 7-day count is most of its 30-day count moved in one pass, and one where the two are proportional is growing at a rate.
|
|
18
|
+
Run `canon records <verb> --help` for every flag.
|
|
61
19
|
|
|
62
|
-
|
|
20
|
+
## Output
|
|
63
21
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
The window counts read `mtime`, so what they report is a file written inside the window rather than one created there. An entry edited long after it landed reads as recent, which overstates growth and never understates it, and these folders are append-mostly so the two readings agree on nearly every file. The one reading that is wrong rather than early is a machine restored by `canon records pull`, which resets the work tree hard and re-dates every file it writes, so a window taken there counts the restore. Nothing on the filesystem separates the two, since a restored file is new by every stamp it carries.
|
|
67
|
-
|
|
68
|
-
Exit codes: `0` the reading completed, `1` refused. The one refusal is `no-folder`, raised when the project holds neither record root. A project holding a root and no records is empty rather than absent: at the legacy `.claude` root each folder's own `present` flag says which ones it carries, and at a `.canon` root the folder list itself is already the answer, since nothing absent is named.
|
|
69
|
-
|
|
70
|
-
## Prune
|
|
71
|
-
|
|
72
|
-
`canon records prune-tmp` reports scratch nobody has touched inside an age window, and deletes it only with `--write`. Nothing removed an abandoned scratch folder before this, so a spike folder from months ago sat beside the ones a session still needs.
|
|
22
|
+
Set the history up once per machine, pointed at a private repository that is not a remote of the project.
|
|
73
23
|
|
|
74
24
|
```bash
|
|
75
|
-
canon
|
|
76
|
-
canon
|
|
77
|
-
canon
|
|
25
|
+
git --git-dir=.canon/.records.git init
|
|
26
|
+
git --git-dir=.canon/.records.git remote add origin <private-repo-url>
|
|
27
|
+
printf '.canon/\n' >> .gitignore
|
|
78
28
|
```
|
|
79
29
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
| `--older-than <days>` | Age a unit's newest file must clear to be offered (default 14) |
|
|
85
|
-
| `--root <path>` | Project root, defaulting to the main worktree |
|
|
86
|
-
|
|
87
|
-
A candidate is a unit whose newest file is older than the threshold: a `tmp/<slug>/` folder, a folder one level inside `runs/`, `render/`, or `pr/`, or a single marker file inside `hooks/<hook>/`. `pr/review/` groups its body files by pull request number rather than reporting as one folder, since a review pass leaves one file per pass and a folder holding thousands of them would otherwise report as a single row nobody can prune apart. A unit holding no files, empty subfolders included, is offered whatever its age.
|
|
88
|
-
|
|
89
|
-
`tmp/handoff/` and `tmp/pr/poll/` are never offered. A reader deletes a handoff themselves once it has been read, and a poll baseline is live state rather than scratch. The pre-split names the reserved split replaced, `memory-routing/`, `teach-promotion/`, `ui-checklist/`, and `pr-poll/` at the scratch root, are skipped the same way on a project the rename never reached, naming the folder they moved to, rather than being offered as ordinary slugs. An unread handoff is the one thing a wrong delete here loses for good.
|
|
30
|
+
- `push` commits every top-level folder under `.canon/` except `tmp`, `ordinal-locks`, and `.records.git`, then pushes. New folders list under `added`.
|
|
31
|
+
- `pull` restores the folders on a new machine after the setup above. It refuses rather than overwrite records the history lacks.
|
|
32
|
+
- `size` reports one row per folder, heaviest first, with file count, bytes, and growth over 7 and 30 days. After a `pull` every file reads as new.
|
|
33
|
+
- `prune-tmp` lists scratch untouched for 14 days and deletes it only with `--write`. It never offers `tmp/handoff/` or `tmp/pr/poll/`.
|
|
90
34
|
|
|
91
|
-
|
|
35
|
+
`push` blocks a file over 25 MB or one `canon secrets scan` would report, listing it under `blocked`. Move it out of the record folders, then push again.
|
|
92
36
|
|
|
93
|
-
|
|
37
|
+
Every verb exits `0` when done and `1` when refused. `prune-tmp` exits `2` when candidates exist and `--write` was not passed.
|
|
94
38
|
|
|
95
|
-
|
|
39
|
+
## Refusals
|
|
96
40
|
|
|
97
|
-
|
|
41
|
+
Branch on `reason` in the `--json` record, not the exit code.
|
|
98
42
|
|
|
99
|
-
|
|
43
|
+
| Reason | Meaning |
|
|
44
|
+
| ------------------- | ------------------------------------------------------------------------------ |
|
|
45
|
+
| `no-folder` | The project holds neither record root, from `size` or `prune-tmp` |
|
|
46
|
+
| `split-roots` | Record folders sit under both roots. Finish the move or put them back together |
|
|
47
|
+
| `no-repository` | No `.canon/.records.git`. Run the setup above |
|
|
48
|
+
| `no-remote` | The records history has no `origin` |
|
|
49
|
+
| `remote-unreadable` | The project's own remotes could not be read |
|
|
50
|
+
| `remote-shared` | The records origin is also a remote of the project. Use a private repository |
|
|
51
|
+
| `no-remote-records` | `pull` found no branch on the records origin |
|
|
52
|
+
| `local-changes` | `pull` found records on disk that the history lacks. Run `push` first |
|
|
53
|
+
| `local-ahead` | `pull` found local commits that never reached the origin. Run `push` first |
|
|
54
|
+
| `unsafe-payload` | `push` found a file over 25 MB or carrying a credential |
|
|
55
|
+
| `git-failed` | A git call failed, with its stderr in the message |
|
|
100
56
|
|
|
101
|
-
##
|
|
57
|
+
## See also
|
|
102
58
|
|
|
103
|
-
|
|
59
|
+
- `canon records ordinal <kind> <slug> --claim`: reserve the next intake or groundwork ordinal
|
|
60
|
+
- `canon records validate <kind> --help`: where a record folder disagrees with its standard
|
|
61
|
+
- `canon records stale --help`: when the requirements record was last reviewed
|
|
@@ -1,93 +1,49 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Sessions transfer
|
|
3
|
-
description: Moving a session to another machine
|
|
3
|
+
description: Moving a session to another machine with export and import, the manifest fields, the refusal reasons, and what a resume on the target depends on
|
|
4
|
+
kind: reference
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Sessions transfer
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## Export
|
|
11
|
-
|
|
12
|
-
`canon sessions export <id>` packs one session into a single gzip tarball so it can resume on another machine. The bundle holds the transcript, its side folder with every path kept, and a manifest.
|
|
9
|
+
`canon sessions export` packs one session into a gzip tarball, and `canon sessions import` places it under this machine's configuration directory so `claude` can resume it.
|
|
13
10
|
|
|
14
11
|
```bash
|
|
15
|
-
canon sessions export <id>
|
|
16
12
|
canon sessions export <id> --out ~/session.tar.gz --json
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
| Option | Behavior |
|
|
20
|
-
| -------------- | ---------------------------------------------------------- |
|
|
21
|
-
| `--out <path>` | Write the bundle here rather than under the scratch folder |
|
|
22
|
-
| `--json` | Add a machine-readable record on stdout |
|
|
23
|
-
|
|
24
|
-
Without `--out` the bundle lands at `.canon/tmp/session-export/<id>.tar.gz` under the main worktree root, which is gitignored and reclaimed by `canon records prune-tmp`. It writes locally and never uploads. A transcript holds whatever tool output passed through the session, credentials included where one was printed, so treat the bundle as private.
|
|
25
|
-
|
|
26
|
-
Exit codes: `0` the bundle was written, `1` refused. The refusal carries a `reason` of `not-found`, where no project folder holds a transcript for the id, or `no-archive`, where the running Bun predates `Bun.Archive`.
|
|
27
|
-
|
|
28
|
-
The lookup walks every folder under the configuration directory's `projects/`, so a transcript filed under any encoding is found. The transcript is read up to its last newline and never rewritten, so a session exporting itself mid-append drops at most the half line it was writing.
|
|
29
|
-
|
|
30
|
-
Export runs no skill. Write a handoff with `canon:session-compact` and push it with `canon records push` first where one is wanted. The manifest reports whether a handoff exists and whether it reached the records history, and whatever calls the verb owns that order.
|
|
31
|
-
|
|
32
|
-
### The manifest
|
|
33
|
-
|
|
34
|
-
| Field | Holds |
|
|
35
|
-
| ------------------ | ---------------------------------------------------------------------------- |
|
|
36
|
-
| `format` | The bundle format version, `1` |
|
|
37
|
-
| `sessionId` | The exported id |
|
|
38
|
-
| `title` | The last custom title the transcript recorded, or `null` |
|
|
39
|
-
| `cwd` | The last working directory the transcript recorded, or `null` |
|
|
40
|
-
| `root` | The main worktree root of the repository the export read |
|
|
41
|
-
| `origin` | The `origin` remote reduced to `host/path`, or `null` |
|
|
42
|
-
| `branch`, `head` | The branch and commit of the checkout the export ran in |
|
|
43
|
-
| `recordsHead` | The records history `HEAD`, or `null` where no records history exists |
|
|
44
|
-
| `compacted` | Whether the transcript carries a compaction boundary |
|
|
45
|
-
| `live` | Whether the id was live in the roster at export |
|
|
46
|
-
| `handoff` | The newest `.canon/compact/` note written since the session began, or `null` |
|
|
47
|
-
| `handoffCommitted` | Whether that note is committed in the records history |
|
|
48
|
-
| `recommend` | `handoff` where a handoff exists, `transcript` otherwise |
|
|
49
|
-
|
|
50
|
-
`recommend` prefers the handoff even though the transcript resumes in full. A resumed transcript carries the source machine's absolute paths into a session working somewhere else, and a handoff states the work without them.
|
|
51
|
-
|
|
52
|
-
## Import
|
|
53
|
-
|
|
54
|
-
`canon sessions import <bundle>` places an exported session under this machine's configuration directory so `claude` can resume it.
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
canon sessions import session.tar.gz
|
|
58
13
|
canon sessions import session.tar.gz --root ~/repos/canon --json
|
|
59
14
|
```
|
|
60
15
|
|
|
61
|
-
|
|
62
|
-
| --------------- | ---------------------------------------------------------- |
|
|
63
|
-
| `--root <path>` | The repository to resume in. Defaults to the main worktree |
|
|
64
|
-
| `--json` | Add a machine-readable record on stdout |
|
|
16
|
+
Run `canon sessions export --help` and `canon sessions import --help` for every flag.
|
|
65
17
|
|
|
66
|
-
|
|
18
|
+
## Output
|
|
67
19
|
|
|
68
|
-
|
|
20
|
+
Export writes the transcript, its side folder, and a manifest to `.canon/tmp/session-export/<id>.tar.gz` unless `--out` says otherwise. It never uploads. A transcript can hold credentials printed in the session, so treat the bundle as private.
|
|
69
21
|
|
|
70
|
-
|
|
71
|
-
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
72
|
-
| `not-a-bundle` | the file is no gzip tarball, carries no manifest at format `1`, or names a path outside its own session, such as one climbing out with `..` or an absolute one |
|
|
73
|
-
| `other-repository` | the local `origin` differs from the one the bundle recorded |
|
|
74
|
-
| `exists` | the target transcript or side folder is already there, or any other project folder already holds a transcript for the id, which `--resume <id>` could reach first |
|
|
75
|
-
| `live-here` | the id is live in the local roster, so a second copy would fork it |
|
|
76
|
-
| `write-failed` | a write failed partway for a reason other than a copy appearing, such as a bundle carrying a file where it also needs a folder |
|
|
77
|
-
| `no-archive` | the running Bun predates `Bun.Archive` |
|
|
22
|
+
The manifest names the session, its `branch` and `head`, and these fields:
|
|
78
23
|
|
|
79
|
-
|
|
24
|
+
- `live`: whether the id was live in the roster at export
|
|
25
|
+
- `handoff` and `handoffCommitted`: the newest `.canon/compact/` note since the session began, and whether the records history holds it
|
|
26
|
+
- `recommend`: `handoff` where one exists, `transcript` otherwise, since a transcript carries the source machine's absolute paths
|
|
80
27
|
|
|
81
|
-
|
|
28
|
+
Import writes new files only. The record's `behind` list carries `repository-behind` when this checkout lacks the exported `HEAD`, and `records-behind` when `canon records pull` has records to bring. Neither refuses. Its two `routes` are `claude --resume <id>` and a fresh `claude` running `/canon:session-resume`.
|
|
82
29
|
|
|
83
|
-
|
|
30
|
+
Resuming while the source keeps running forks the conversation, and only `live` warns of it.
|
|
84
31
|
|
|
85
|
-
|
|
32
|
+
## Refusals
|
|
86
33
|
|
|
87
|
-
|
|
34
|
+
Branch on `reason` in the record, not the exit code.
|
|
88
35
|
|
|
89
|
-
|
|
36
|
+
| Reason | Meaning |
|
|
37
|
+
| ------------------ | ------------------------------------------------------------------------------------- |
|
|
38
|
+
| `not-found` | Export found no transcript for the id |
|
|
39
|
+
| `not-a-bundle` | No gzip tarball, no manifest at format `1`, or a path outside itself |
|
|
40
|
+
| `other-repository` | The local `origin` differs from the one the bundle recorded |
|
|
41
|
+
| `exists` | The transcript or side folder is already here, or another project folder holds the id |
|
|
42
|
+
| `live-here` | The id is live in the local roster, so a second copy would fork it |
|
|
43
|
+
| `write-failed` | A write failed partway. The run removes what it placed before refusing |
|
|
44
|
+
| `no-archive` | The running Bun predates `Bun.Archive` |
|
|
90
45
|
|
|
91
|
-
|
|
46
|
+
## See also
|
|
92
47
|
|
|
93
|
-
|
|
48
|
+
- `canon sessions list --help`: the roster these verbs check an id against
|
|
49
|
+
- `canon:session-compact` and [records push](records.md): write and back up a handoff before export
|