@erclx/canon 5.39.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/canvas-board/SKILL.md +1 -1
- package/claude/skills/draft-slides/SKILL.md +2 -3
- package/claude/skills/draft-slides/references/deck.md +183 -0
- 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/review-ui/SKILL.md +1 -0
- package/claude/skills/role-orchestrator/references/orchestrator-handback.md +1 -1
- package/claude/skills/task-board/references/board.md +1 -1
- package/claude/skills/task-board/references/tasks.md +1 -1
- package/claude/skills/ux-measure/SKILL.md +1 -1
- package/docs/agents/audits.md +61 -60
- package/docs/agents/context-audit.md +40 -58
- package/docs/agents/index.md +5 -51
- package/docs/agents/install-and-sync.md +1 -0
- package/docs/agents/markdown-audit.md +53 -99
- package/docs/agents/records.md +37 -79
- package/docs/agents/sessions-transfer.md +26 -70
- 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 +13 -0
- 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/intake.ts +17 -0
- package/src/commands/labels.ts +38 -5
- 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 +22 -4
- package/src/context/folders.ts +1 -1
- package/src/context/shape-gated.ts +4 -2
- 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 +1 -1
- package/src/gate/stages.ts +7 -7
- package/src/git/env.ts +6 -0
- package/src/markdown/scope.ts +5 -17
- 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/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/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/comments.md +0 -34
- package/docs/agents/context-audit-checks.md +0 -108
- 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/driver.md +0 -103
- package/docs/agents/gate.md +0 -90
- package/docs/agents/hooks.md +0 -78
- 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-density.md +0 -39
- package/docs/agents/markdown-audit-weight.md +0 -83
- 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/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
|
@@ -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
|
package/docs/target/index.md
CHANGED
|
@@ -13,5 +13,4 @@ Scaffold, sync, and migrate a toolkit-managed project, with worked setups for th
|
|
|
13
13
|
- [Target migrations](migrations.md): One-time moves a project scaffolded under an older toolkit runs before its next sync
|
|
14
14
|
- [Target projects](projects.md): Scaffold, add domains later, and sync upstream drift in a toolkit-managed project
|
|
15
15
|
- [Target scenarios](scenarios.md): Worked setups for a markdown-heavy project, a web application, and a monorepo
|
|
16
|
-
- [Target standards moved](standards-moved.md): Which skill owns each standard the retired standards verb used to serve, for a project that still calls it
|
|
17
16
|
- [Target sync](sync.md): Check what drifted in a toolkit-managed project and pull it in, per domain or all at once
|
|
@@ -6,13 +6,11 @@ category: Agent surface
|
|
|
6
6
|
|
|
7
7
|
# Target migrations
|
|
8
8
|
|
|
9
|
-
Each section
|
|
9
|
+
Each section is a move a project runs once, when it was scaffolded before the change it names. Run `canon upgrade` first. The recurring sync that follows is in [target sync](sync.md).
|
|
10
10
|
|
|
11
11
|
## Move the records first, once
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`4.7.0` carries `canon migrate records`, so run these three lines from inside the project. Run `canon upgrade` first regardless of what you hold, since the sweep learned to pass over the records themselves after that release and a `4.7.0` binary rewrites them.
|
|
13
|
+
Gitignored session records, being the task board, plans, review reports, and scratch, moved from `.claude/` to `.canon/`. Run these from inside the project, and read the `ok` field of the `--json` record rather than the exit code.
|
|
16
14
|
|
|
17
15
|
```bash
|
|
18
16
|
canon tooling sync claude . --write
|
|
@@ -20,61 +18,49 @@ canon migrate records --json
|
|
|
20
18
|
canon migrate records --write --json
|
|
21
19
|
```
|
|
22
20
|
|
|
23
|
-
The first line takes the `.canon/` ignore entry
|
|
24
|
-
|
|
25
|
-
Order matters between the first line and the two under it. The sync prunes the twelve old `.claude/` ignore entries down to the one `.canon/` line, which leaves every record still at the old root visible to git and therefore to the verb. The sweep passes over them on purpose, reporting a count of what it left alone rather than reading the memory pen and the groundwork trails as source.
|
|
26
|
-
|
|
27
|
-
## Back records up off this machine, once
|
|
28
|
-
|
|
29
|
-
Moving records under `.canon/` relocates them, and relocating them is not the same as backing them up. Run `canon records push` once a private repository exists for them, and it prints the one-time setup command when it finds none, since the task board, the memory pen, and the groundwork trails otherwise live on one disk with nothing pushing them off it. `canon init` prints the same reminder as a notice-only step rather than trying to run this non-interactively, since the private repository does not exist yet at scaffold time.
|
|
30
|
-
|
|
31
|
-
Read the `ok` field out of the `--json` record rather than the exit code. A shell profile that wraps `canon` in a function takes its status from whatever the function runs last, so an absent subcommand and a clean run can both exit 0, and a reader watching the exit alone concludes the move happened.
|
|
21
|
+
The first line takes the `.canon/` ignore entry the verb requires. The second reports the plan and the third applies it, repointing every tracked file that cites a moved folder. A line naming an old record path on purpose keeps it with `canon-keep-record-root` on that line or the nearest non-blank line above.
|
|
32
22
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Until the move runs, the project is exposed. The shipped ignore set no longer names the old record paths, so a project holding records at `.claude/` stops ignoring them on its next `canon tooling sync`, and the first sign is a memory file or a task board appearing in a commit. Every command reads either root, so nothing else breaks in the meantime, and running the move is what closes it.
|
|
36
|
-
|
|
37
|
-
Then sweep the records themselves, which the three lines above never reach. They enumerate through git, and the records are gitignored by construction, so a task still naming its plan at the old root resolves nothing once the folders move.
|
|
23
|
+
Then sweep the citations inside the records, which the verb above never reaches.
|
|
38
24
|
|
|
39
25
|
```bash
|
|
40
26
|
canon migrate record-tree --json
|
|
41
27
|
canon migrate record-tree --write --json
|
|
42
28
|
```
|
|
43
29
|
|
|
44
|
-
|
|
30
|
+
It covers `diagrams`, `memory`, `plans`, `proposals`, `review`, `tasks`, and `teach`. Read the report before `--write`. The record tree is untracked, and a wrong rewrite has no undo.
|
|
45
31
|
|
|
46
|
-
|
|
32
|
+
## Back records up off this machine, once
|
|
47
33
|
|
|
48
|
-
|
|
34
|
+
Run `canon records push` once a private repository exists. It prints the one-time setup command when it finds none, and `canon init` prints the same reminder.
|
|
49
35
|
|
|
50
|
-
|
|
36
|
+
## Move rules off the flat layout, once
|
|
51
37
|
|
|
52
|
-
|
|
38
|
+
Installed rules moved from `.claude/rules/<subdir>/` to `.claude/rules/canon/<subdir>/`. On the flat layout `canon gov sync` exits 0 reporting `No governance surfaces found in target`, and `canon gov install` lands a second copy.
|
|
53
39
|
|
|
54
40
|
```bash
|
|
55
41
|
canon migrate rule-layout --json
|
|
56
42
|
canon migrate rule-layout --write --json
|
|
57
43
|
```
|
|
58
44
|
|
|
59
|
-
|
|
45
|
+
Run it once, ahead of `canon gov sync` or `canon gov install`.
|
|
60
46
|
|
|
61
47
|
## Rename the skill citations, once
|
|
62
48
|
|
|
63
|
-
|
|
49
|
+
Plugin skills dropped their `claude-` prefix, so `canon:claude-docs` answers as `canon:context-fold` and `canon:claude-tasks` as `canon:task-board`. The five per-kind drafters merged into `draft-doc`, and no pointer under an old name ships. <!-- canon-keep-retired -->
|
|
64
50
|
|
|
65
|
-
|
|
51
|
+
- `canvas` is now `canvas-board`. The sweep rewrites only `canon:canvas` and `skills/canvas`, so replace a bare prose mention by hand. <!-- canon-keep-retired -->
|
|
52
|
+
- `design-extract` and `sketch-design` are replaced by `canon:canvas-board`. <!-- canon-keep-retired -->
|
|
53
|
+
- `review-branch`, `seed-sync`, `restate-plainly`, `bash-cli-script`, `canon-operator`, and `canon-rollout` have no successor <!-- canon-keep-retired -->
|
|
54
|
+
- `create-standard`, `markdown-propose`, `memory-review`, `project-commands`, `repo-metadata`, and `ux-walkthrough` have no successor <!-- canon-keep-retired -->
|
|
66
55
|
|
|
67
|
-
|
|
56
|
+
Replace a citation of a skill with no successor by hand, or delete the sentence.
|
|
68
57
|
|
|
69
|
-
|
|
58
|
+
- `canon repo metadata`, `canon autoship`, and the `120-bash` rule are gone, and `canon gov sync` removes the rule <!-- canon-keep-retired -->
|
|
59
|
+
- `memory-capture`, the `603-memory` rule, and the `memory` standard are gone, so send a lesson to the context entry that owns the fact <!-- canon-keep-retired -->
|
|
70
60
|
|
|
71
|
-
The
|
|
61
|
+
The `memory` record kind left `canon records`, so `canon records validate memory` refuses as an unknown kind and `canon records migrate` is gone.
|
|
72
62
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
Two of those files run rather than sit there. `.husky/post-merge` runs the `canon hooks post-merge` verb, so a stale copy of the hook calls a binary that may lack it, and `.claude/hooks/pr-create-log.sh` hands a session a message naming a skill, so a stale copy tells someone to invoke something that no longer exists. A copy older than `git-pr`'s move to REST also matches only `gh pr create`, so it stays silent on every pull request `git-pr` opens. A rule under `.claude/rules/canon/core/` names skills too, though a rule is read rather than run.
|
|
76
|
-
|
|
77
|
-
Resync what the toolkit owns, then sweep what the project wrote:
|
|
63
|
+
Two held files run, `.husky/post-merge` and `.claude/hooks/pr-create-log.sh`, and a stale copy calls a missing binary or names a removed skill. Resync what the toolkit owns before sweeping what the project wrote, and run the second line once per stack.
|
|
78
64
|
|
|
79
65
|
```bash
|
|
80
66
|
canon gov sync
|
|
@@ -83,65 +69,70 @@ canon migrate skill-names --json
|
|
|
83
69
|
canon migrate skill-names --write --json
|
|
84
70
|
```
|
|
85
71
|
|
|
86
|
-
Run the second line once per stack the project holds, since the two hooks above arrive from different ones. The third reports the plan and the fourth applies it.
|
|
87
|
-
|
|
88
|
-
The order carries the reason. A sync replaces each toolkit-owned copy with one already carrying the new names, and the sweep afterwards reaches the prose the project wrote itself. Sweeping first rewrites those installed files in place, which moves them off the hash the install recorded, so the next sync reads them as edited by the project and leaves them alone.
|
|
89
|
-
|
|
90
72
|
## Rename the pull request template headings, once
|
|
91
73
|
|
|
92
|
-
The
|
|
93
|
-
|
|
94
|
-
A project scaffolded earlier holds the old template at `.github/pull_request_template.md`, and a sync writes only a seed a target lacks. Rename the two headings in that file by hand, or delete it and run `canon tooling sync base . --write` to take the new seed. Do it ahead of the first pull request after `canon upgrade`. `canon pr key-changes` reads either casing, so a body already open keeps parsing, and only the scan needs the rename on its next edit.
|
|
74
|
+
The template headings are now `## Key changes` and `## Technical context`, and `canon labels scan` compares case exactly. Rename them in `.github/pull_request_template.md`, or delete it and run `canon tooling sync base . --write`.
|
|
95
75
|
|
|
96
76
|
## Move the surfaces off `.claude/`, once
|
|
97
77
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
Run `canon upgrade` first if you have not, then run this from inside the project:
|
|
78
|
+
`context/`, `wireframes/`, `ARCHITECTURE.md`, `REQUIREMENTS.md`, `DESIGN.md`, and the install stamp folder, now `canon/config/`, moved under `canon/`. `rules/`, `skills/`, `hooks/`, and `settings.json` stay where Claude Code reads them.
|
|
101
79
|
|
|
102
80
|
```bash
|
|
103
81
|
canon migrate surface-roots --json
|
|
104
82
|
canon migrate surface-roots --write --json
|
|
105
83
|
```
|
|
106
84
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
Neither `canon sync --check` nor any other command notices a surface still sitting at `.claude/`, so running this is on you rather than on a prompt from the toolkit.
|
|
85
|
+
It moves each surface with `git mv` and repoints every tracked citation. No other command notices a surface left at `.claude/`.
|
|
110
86
|
|
|
111
87
|
## Delete the retired snippets, once
|
|
112
88
|
|
|
113
|
-
|
|
89
|
+
A project scaffolded while snippets installed may hold `.claude/snippets/` or a root `snippets/`.
|
|
114
90
|
|
|
115
91
|
```bash
|
|
116
92
|
canon sync --check . --json | jq '.reverse'
|
|
117
93
|
```
|
|
118
94
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
- `
|
|
122
|
-
- `unattributed` holds files the toolkit shipped under those names with content it never published, which is usually a copy the project edited, so read what changed before deleting anything
|
|
123
|
-
- `project` is content the project wrote under the same name, which the retirement does not reach, so leave it alone
|
|
95
|
+
- `dropped` is the toolkit's copy, unchanged, so delete it
|
|
96
|
+
- `unattributed` is often an edited copy, so read what changed first
|
|
97
|
+
- `project` is the project's own content, so leave it
|
|
124
98
|
|
|
125
|
-
|
|
99
|
+
From the registry the walk reports `historyUnavailable`, so check both paths by hand.
|
|
126
100
|
|
|
127
101
|
## Stop calling the standards verb, once
|
|
128
102
|
|
|
129
|
-
`canon standards
|
|
103
|
+
`canon standards <name>` is gone, and a call now fails with a too-many-arguments error. Replace each call with the skill that owns the standard, at `references/<name>.md`. <!-- canon-allow-reference: verb retired -->
|
|
104
|
+
|
|
105
|
+
| Skill | Standards |
|
|
106
|
+
| ----------------- | ------------------------------------------------------------- |
|
|
107
|
+
| `task-board` | `board`, `tasks`, `tasks-decline` |
|
|
108
|
+
| `context-fold` | `context` |
|
|
109
|
+
| `canvas-board` | `canvas`, `design` |
|
|
110
|
+
| `docs-sync` | `docs`, `readme` |
|
|
111
|
+
| `draft-figure` | `figures`, `mermaid` |
|
|
112
|
+
| `create-rule` | `rule` |
|
|
113
|
+
| `create-skill` | `skill`, `skill-paths`, `skill-practice`, `skill-requirement` |
|
|
114
|
+
| `git-branch` | `branch`, `slug` |
|
|
115
|
+
| `git-commit` | `commit`, `versioning` |
|
|
116
|
+
| `git-pr` | `pr`, `publish` |
|
|
117
|
+
| `markdown-craft` | `markdown` |
|
|
118
|
+
| `teach-workspace` | `glossary`, `teach` |
|
|
119
|
+
| `plan-groundwork` | `groundwork`, `groundwork-spikes` |
|
|
120
|
+
| `plan-intake` | `intake` |
|
|
121
|
+
| `plan-feature` | `plan`, `plan-lifecycle` |
|
|
122
|
+
| `draft-ready` | `ready` |
|
|
123
|
+
| `draft-doc` | `requirements`, `wiki` |
|
|
124
|
+
| `session-map` | `session` |
|
|
125
|
+
|
|
126
|
+
The `standard` name became `skill-reference.md` in `create-skill`.
|
|
130
127
|
|
|
131
128
|
## Keep or delete the wireframes folder, your call
|
|
132
129
|
|
|
133
|
-
The
|
|
134
|
-
|
|
135
|
-
A project scaffolded earlier keeps what it already holds, and nothing deletes it:
|
|
130
|
+
The wireframes record is retired, and nothing deletes what a project holds.
|
|
136
131
|
|
|
137
|
-
- `canon/wireframes/` stays yours
|
|
138
|
-
-
|
|
139
|
-
- `.claude/rules/canon/standards/wireframes.md`
|
|
140
|
-
|
|
141
|
-
A `## States` table under `canon/wireframes/` is no longer checked against evidence folders, so `canon context audit --gate` passes without reading the folder.
|
|
132
|
+
- `canon/wireframes/` stays yours and unaudited. Keep it as notes or delete it.
|
|
133
|
+
- Delete the `@canon/wireframes/index.md` line in your `CLAUDE.md` with the folder. `canon claude sync` does not rewrite it.
|
|
134
|
+
- `canon gov sync` removes `.claude/rules/canon/standards/wireframes.md`
|
|
142
135
|
|
|
143
136
|
## Move decisions out of a held architecture record, once
|
|
144
137
|
|
|
145
|
-
The toolkit
|
|
146
|
-
|
|
147
|
-
Decide what to do with the file yourself, since where a decision belongs takes judgment no sync has. A decision about how one domain is built is recorded by the pull request that made it, and a context entry carries no decisions. Move a trap a session would hit into that domain's `## Gotchas`. Once the file is empty, delete it and its `@canon/ARCHITECTURE.md` line in `CLAUDE.md`.
|
|
138
|
+
The toolkit no longer seeds `canon/ARCHITECTURE.md`, and a held file and its `CLAUDE.md` import stay. Move a trap a session would hit into that domain's `## Gotchas`, then delete the file and its `@canon/ARCHITECTURE.md` line.
|
package/docs/target/projects.md
CHANGED
|
@@ -6,24 +6,18 @@ category: Agent surface
|
|
|
6
6
|
|
|
7
7
|
# Target projects
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
This doc stays at the narrative layer. For command flags and JSON shapes, see [agents](../agents/index.md). For per-domain mechanics, see each `canon/context/<domain>.md`.
|
|
9
|
+
A project outside this repo scaffolds once, adds a domain later, and syncs when the upstream moves. For flags and JSON shapes see [agents](../agents/index.md).
|
|
12
10
|
|
|
13
11
|
## Getting the skills
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
Install the plugin once per machine. The installed copy stays at its version until you refresh it with `claude plugin marketplace update canon` and `claude plugin update canon@canon`, or turn on auto-update under `/plugin`. The URL form clones over HTTPS, and the `erclx/canon` shorthand resolves to SSH.
|
|
16
14
|
|
|
17
15
|
```bash
|
|
18
16
|
claude plugin marketplace add https://github.com/erclx/canon
|
|
19
17
|
claude plugin install canon@canon
|
|
20
18
|
```
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
A machine that installed the plugin under its previous name re-registers by hand, once. The marketplace and the plugin both moved, so the old `enabledPlugins` entry and the old marketplace key name things that no longer resolve, and the plugin stops loading without reporting anything. `canon migrate rename` does not reach this: it takes a `--root` and rewrites inside one project, where the plugin registration is machine-level state outside every project.
|
|
25
|
-
|
|
26
|
-
Both stale keys come out explicitly, since installing under the new name writes a new entry and leaves the old one sitting there. Uninstall before removing the marketplace, so the plugin is cleared while the marketplace it came from still resolves.
|
|
20
|
+
A machine that installed the plugin under its previous name re-registers once, uninstalling before removing the marketplace.
|
|
27
21
|
|
|
28
22
|
```bash
|
|
29
23
|
claude plugin uninstall aitk@aitk
|
|
@@ -32,107 +26,71 @@ claude plugin marketplace add https://github.com/erclx/canon
|
|
|
32
26
|
claude plugin install canon@canon
|
|
33
27
|
```
|
|
34
28
|
|
|
35
|
-
|
|
29
|
+
Skills invoke the `canon` CLI, which the marketplace install does not put on `PATH`.
|
|
36
30
|
|
|
37
31
|
```bash
|
|
38
32
|
bun install --global @erclx/canon
|
|
39
33
|
```
|
|
40
34
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Pointing Claude Code at a checkout stays the development path, where a local skill edit overrides the installed copy for that session.
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
claude --plugin-dir <toolkit>/claude
|
|
47
|
-
```
|
|
35
|
+
To develop against a checkout, run `claude --plugin-dir <toolkit>/claude`.
|
|
48
36
|
|
|
49
37
|
## Scaffold
|
|
50
38
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
1. Run the framework's own scaffold if the project needs one, such as `bun init`, `npm create vite`, or `npm create astro`. The toolkit does not wrap framework scaffolding.
|
|
54
|
-
2. Invoke `canon:target-setup` in Claude Code. The skill detects the stack, asks `canon gov detect` which opt-in rules the project's evidence proposes, previews the full chain with those proposals for you to confirm, and runs it end-to-end.
|
|
55
|
-
|
|
56
|
-
The chain is:
|
|
39
|
+
1. Run the framework's own scaffold if the project needs one, such as `bun init` or `npm create vite`
|
|
40
|
+
2. Invoke `canon:target-setup` in Claude Code. It detects the stack, previews the chain with the opt-in rules `canon gov detect` proposes, and runs it on your confirmation.
|
|
57
41
|
|
|
58
|
-
|
|
59
|
-
- `canon tooling sync <stack> --write` adds stack-specific deps, scripts, and gitignore entries
|
|
60
|
-
- The agent reads `canon tooling reference <stack>` (plus parents) as its audit context, follows it to generate oxlint, vitest, playwright configs and the stack's setup script, and extends `canon/context/ci.md` and `canon/context/development.md` per the reference's extend sections <!-- audit-ignore-citations: canon/context/ci.md, canon/context/development.md -->
|
|
61
|
-
- The `verify` phase runs the installed `package.json` scripts (lint, typecheck, check, test, build) and reports pass or fail
|
|
62
|
-
- The `indexes` phase bootstraps the `index.md` system over the project's own documentation folders, confirming candidate folders with the operator rather than running unattended
|
|
42
|
+
The chain runs these phases:
|
|
63
43
|
|
|
64
|
-
|
|
44
|
+
- `canon init` installs base tooling, Claude seeds, and governance rules into `.claude/rules/`
|
|
45
|
+
- `canon tooling sync <stack> --write` adds stack dependencies, scripts, and gitignore entries
|
|
46
|
+
- The agent follows `canon tooling reference <stack>` and extends `canon/context/development/ci.md` and `canon/context/development/local-loop.md` <!-- audit-ignore-citations -->
|
|
47
|
+
- The `verify` phase runs the installed `package.json` scripts and reports pass or fail
|
|
48
|
+
- The `indexes` phase bootstraps `index.md` over the project's documentation folders, confirming candidates with you
|
|
65
49
|
|
|
66
|
-
|
|
50
|
+
An existing project goes to `canon:target-check` first. For the Claude layer alone, run `canon claude init` and then `canon:target-setup indexes`. Run `canon:target-setup verify deep` by hand for the heavier smoke and screenshot pass.
|
|
67
51
|
|
|
68
|
-
Keep the `## Scripts` table in `canon/context/development.md` current as scripts are added.
|
|
52
|
+
Keep the `## Scripts` table in `canon/context/development/local-loop.md` current as scripts are added. A split entry keeps it in `overview.md`. <!-- audit-ignore-citations: canon/context/development/local-loop.md -->
|
|
69
53
|
|
|
70
54
|
### From scaffold to first feature
|
|
71
55
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
1. Fill `canon/REQUIREMENTS.md`. The seed asks for the problem in one line, then goals and non-goals, and the scope is yours to write. The seed states its own cap of 600 words, and `canon context audit` gates on it. Edit the number in the record to loosen it. A decision about how the project is built lives in the pull request that made it, and a `canon/context/` entry carries the domain's folders and traps.
|
|
75
|
-
2. For a UI project, write `canon/DESIGN.md` from the seed template and name the project's stylesheet in its lead, or work the direction out with `canon:canvas-board` and carry the pick in. Skip for non-UI projects.
|
|
76
|
-
3. Optionally invoke `canon:draft-figure` naming an architecture view, such as system context or components, and the document it belongs in. It draws the view from the context index, the folder layout, and the requirements and renders it to verify the layout, which downloads the Mermaid CLI on first use and takes about 15 seconds.
|
|
77
|
-
4. Start the feature loop. See [AI workflow](../workflow/ai-workflow.md) for the per-feature sequence.
|
|
78
|
-
|
|
79
|
-
A machine without a renderer still gets the figure and is told which check was skipped.
|
|
56
|
+
Before the first feature session:
|
|
80
57
|
|
|
81
|
-
|
|
58
|
+
1. Fill `canon/REQUIREMENTS.md` with the problem, goals, and non-goals. The seed's 600-word cap gates under `canon context audit`.
|
|
59
|
+
2. For a UI project, write `canon/DESIGN.md` from the seed and name the stylesheet in its lead, or work the direction out with `canon:canvas-board`
|
|
60
|
+
3. Optionally invoke `canon:draft-figure` for an architecture view. The Mermaid CLI downloads on first use.
|
|
61
|
+
4. Start the feature loop in [AI workflow](../workflow/ai-workflow.md)
|
|
82
62
|
|
|
83
63
|
### Stack decision
|
|
84
64
|
|
|
85
|
-
The default
|
|
65
|
+
The default is `base`. Escalate only for a project writing code, and `target-setup` picks the tooling stack from the manifest and framework configs, and the governance stack for the root's language. Run `canon tooling list --json` and `canon gov list --json` for the catalogs.
|
|
86
66
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
The server-side security and persistence rules belong to no stack. `canon gov detect` proposes both from a server framework or database client in the manifest, which you confirm in the preview, or add them by hand with `--add security-server,database`.
|
|
92
|
-
|
|
93
|
-
Markdown-heavy projects, CLI tools, docs sites, research notebooks, and scripting repos stay on `base`. Escalation is a ceiling move, not a default.
|
|
94
|
-
|
|
95
|
-
A project the toolkit ships no stack for lands on `base` the same way, and the skill marks that resolution as a fallback in its preview rather than reporting it as a match. Configs, seeds, and gitignore entries land either way, and the JavaScript development dependencies, scripts, and hook activation land only where a `package.json` exists to carry them. A project outside that ecosystem declines at the preview and takes `canon:target-setup gov` for the governance layer alone, which is language-neutral. Go and PHP ship a governance stack beside their tooling stack, so a project in either takes `go` or `php` for both.
|
|
96
|
-
|
|
97
|
-
Run `canon tooling list --json` and `canon gov list --json` to see the current catalogs. Never hardcode stack names.
|
|
67
|
+
- In a monorepo each manifest folder gets `canon tooling sync <stack> <folder> --skip base`. Governance installs once at the root, with subfolder languages through `--add`.
|
|
68
|
+
- Server security and persistence rules come from `canon gov detect`, or `--add security-server,database`
|
|
69
|
+
- A language with no stack lands on `base`, marked as a fallback in the preview. Decline it and run `canon:target-setup gov` for governance alone.
|
|
98
70
|
|
|
99
71
|
### Core domains and skips
|
|
100
72
|
|
|
101
|
-
`canon init` installs base tooling, Claude workflow, and governance, and scaffolds `.claude/wiki/`.
|
|
102
|
-
|
|
103
|
-
No reference corpus is written into the project. Each governance rule carries its operative lines inline and names the plugin skill that owns the rest, and every toolkit skill reads the references in its own plugin root. A target that installs governance without the plugin gets the inline lines alone, since no verb answers for a skill's reference there. `canon markdown audit` needs no reference at all, its ban set and checkpoints shipping with the package as data.
|
|
73
|
+
`canon init` installs base tooling, the Claude workflow, and governance, and scaffolds `.claude/wiki/`. Pass `--stack <name>` for a language stack.
|
|
104
74
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
- `--skip governance`: leave `.claude/rules/` empty, so no coding standard loads on a file match. The preview names any `--add` rules the skip drops, and the run prints the `canon gov install <stack> <path>` command to add rules afterward, carrying those extras so one paste restores what the skip declined.
|
|
108
|
-
- `--skip wiki`: skip the `.claude/wiki/` scaffold. A target that already carries a root `wiki/` keeps it, since the verb reports that folder rather than migrating it.
|
|
109
|
-
|
|
110
|
-
The plugin corpus carries runtime behavior rather than reference prose alone, because the pre-publish scan and the branch-slug transform each have a standard of their own, `publish.md` and `slug.md`, cited by the skills that run them.
|
|
75
|
+
- `--skip governance` leaves `.claude/rules/` empty. The run prints the `canon gov install <stack> <path>` command that restores the rules it dropped.
|
|
76
|
+
- `--skip wiki` skips the `.claude/wiki/` scaffold. A root `wiki/` is kept.
|
|
111
77
|
|
|
112
78
|
## Add a domain later
|
|
113
79
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- Governance rule for a newly adopted library: run `canon gov detect <path> --json` to see what the project's evidence proposes, then `canon gov install --add <rule> <path>`, which installs the rule with no stack
|
|
117
|
-
- Project-specific rule the toolkit does not ship: invoke `canon:create-rule`. It scaffolds a rule into `.claude/rules/project/` with a non-colliding number, and `canon gov sync` leaves it untouched. A rule placed under `.claude/rules/canon/` instead is deleted on the next sync, since that folder belongs to the toolkit.
|
|
118
|
-
- Index.md system for a markdown-heavy folder that emerged: invoke `canon:target-setup indexes`
|
|
80
|
+
Install one domain without re-running `canon init`.
|
|
119
81
|
|
|
120
|
-
|
|
82
|
+
- A rule for a newly adopted library: run `canon gov detect <path> --json`, then `canon gov install --add <rule> <path>`
|
|
83
|
+
- A project-specific rule: invoke `canon:create-rule`, which writes into `.claude/rules/project/`. A rule under `.claude/rules/canon/` is deleted on the next sync.
|
|
84
|
+
- An `index.md` system for a markdown-heavy folder: invoke `canon:target-setup indexes`
|
|
121
85
|
|
|
122
|
-
|
|
86
|
+
For a leftover `.claude/snippets/` see [target migrations](migrations.md).
|
|
123
87
|
|
|
124
88
|
## Sync upstream drift
|
|
125
89
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
## Scenarios
|
|
129
|
-
|
|
130
|
-
[Target scenarios](scenarios.md) walks a markdown-heavy project, a web application, and a monorepo with several language roots from the first session through ongoing maintenance.
|
|
90
|
+
A project scaffolded before a layout move runs the one-time moves in [target migrations](migrations.md) first. [Target sync](sync.md) covers reading drift and running a sync. [Target scenarios](scenarios.md) walks three worked setups.
|
|
131
91
|
|
|
132
92
|
## Related
|
|
133
93
|
|
|
134
|
-
- [
|
|
135
|
-
- [
|
|
136
|
-
- [
|
|
137
|
-
- [tooling](../../canon/context/tooling/index.md), [governance](../../canon/context/governance/index.md), [claude plugin](../../canon/context/claude-plugin/index.md), [indexes](../../canon/context/context-model.md), [skill references](../../canon/context/claude-plugin/skill-references/index.md): per-domain mechanics
|
|
138
|
-
- [sandbox](../../canon/context/sandbox/index.md): scenario catalog for verifying domain flows
|
|
94
|
+
- [AI workflow](../workflow/ai-workflow.md): the feature loop inside a managed project
|
|
95
|
+
- [tooling](../../canon/context/surfaces/tooling.md), [governance](../../canon/context/surfaces/governance.md), [claude plugin](../../canon/context/surfaces/plugin.md), [indexes](../../canon/context/context-model.md): per-domain mechanics
|
|
96
|
+
- [sandbox](../../canon/context/development/sandbox.md): scenario catalog for verifying domain flows
|