@erclx/canon 5.69.0 → 5.70.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +33 -159
  3. package/assets/brand/mark.svg +17 -9
  4. package/claude/.claude-plugin/plugin.json +1 -1
  5. package/claude/skills/app-drive/SKILL.md +3 -2
  6. package/claude/skills/app-drive/references/drive-record.md +52 -10
  7. package/claude/skills/app-drive/references/isolate.md +1 -1
  8. package/claude/skills/design-pick/SKILL.md +1 -0
  9. package/claude/skills/ui-craft/references/copy.md +4 -1
  10. package/claude/skills/ui-film/REQUIREMENT.md +4 -2
  11. package/claude/skills/ui-film/SKILL.md +24 -11
  12. package/claude/skills/ui-film/references/compose-craft.md +81 -0
  13. package/claude/skills/ui-film/references/config.md +6 -1
  14. package/claude/skills/ui-film/references/handoff.md +13 -3
  15. package/claude/skills/ui-film/references/take-craft.md +27 -1
  16. package/docs/index.md +1 -0
  17. package/docs/migrations/by-hand.md +107 -0
  18. package/docs/migrations/by-verb.md +118 -0
  19. package/docs/migrations/index.md +14 -0
  20. package/docs/target/index.md +1 -2
  21. package/docs/target/projects.md +2 -2
  22. package/docs/target/sync.md +22 -2
  23. package/docs/workflow/ai-workflow.md +1 -1
  24. package/governance/ledger/skills/ui-craft/copy.md +8 -4
  25. package/package.json +3 -1
  26. package/scripts/core/design-sync.ts +204 -0
  27. package/scripts/core/regen-web-favicon.ts +27 -12
  28. package/scripts/core/regen-web-previews.ts +8 -1
  29. package/scripts/core/render-film.ts +179 -0
  30. package/src/capture/frame-values.ts +12 -12
  31. package/src/commands/records.ts +3 -2
  32. package/src/commands/sandbox.ts +9 -2
  33. package/src/commands/take.ts +159 -11
  34. package/src/design/favicon.ts +85 -13
  35. package/src/design/reference.ts +98 -0
  36. package/src/design/render.ts +16 -14
  37. package/src/design/tokens.ts +4 -3
  38. package/src/gate/stages.ts +6 -0
  39. package/src/init/steps.ts +2 -2
  40. package/src/migrate/status.ts +3 -3
  41. package/src/records/validate.ts +14 -2
  42. package/src/sandbox/expect.ts +32 -0
  43. package/src/sandbox/headless/run.ts +6 -3
  44. package/src/take/camera.ts +99 -10
  45. package/src/take/film.ts +35 -2
  46. package/src/take/fixtures/input.html +138 -0
  47. package/src/take/keys.ts +193 -0
  48. package/src/take/log.ts +94 -1
  49. package/src/take/perform.ts +165 -10
  50. package/src/take/plan.ts +101 -6
  51. package/src/take/screencast.ts +28 -3
  52. package/src/take/stepper.ts +122 -18
  53. package/docs/target/migrations.md +0 -205
@@ -28,7 +28,12 @@ access = "/write?token=demo"
28
28
  - An absent `access` opens the served root
29
29
  - `personas` and `proposals` belong to `app-drive`, and a take reads neither
30
30
 
31
- Every beat opens the address fresh in its own browser, so a link the app honors once, such as a single-use edit ticket, serves one beat alone. Mint a fresh link and run `canon take` once per beat for such an app, or a later beat opens the page without the access the first one spent.
31
+ ### Single-use access
32
+
33
+ Every beat opens the address fresh in its own browser, so a link the app honors once, such as a single-use edit ticket, serves one beat alone. A beat that falls back to the screencast opens the address a second time, so the fallback spends the link too, even within one beat.
34
+
35
+ - Point `access` at a local redirect minting a fresh link per request, so each open gets its own, the one pattern that held across beats and fallbacks alike
36
+ - Run `canon take` once per beat with a freshly minted link only where no redirect can be served, with `"route": "screencast"` on each so no fallback reopens it
32
37
 
33
38
  ## When the file is absent
34
39
 
@@ -14,7 +14,7 @@ Read at Step 5 of `ui-film`. Canon stops at the clip, and a HyperFrames composit
14
14
  | File | Holds |
15
15
  | ------------- | ---------------------------------------------------------------------------- |
16
16
  | `clip.mp4` | H.264 at 60 fps, 3840x2160 when frame stepped, 1920x1080 when screencast |
17
- | `log.json` | Every move, click, typing burst, and scroll, with each target's box |
17
+ | `log.json` | Every move, click, drag, key press, typing burst, and scroll, with its boxes |
18
18
  | `camera.json` | One camera per frame of the clip, with the cursor and the click ring |
19
19
  | `still.jpg` | The clip's closing frame, the check on each take, which no composition needs |
20
20
 
@@ -24,10 +24,10 @@ Every coordinate in the log and the track is in CSS pixels of a 1920x1080 page,
24
24
 
25
25
  Each frame carries `scale`, the view's top-left `x` and `y`, the `cursor`, and `ring`.
26
26
 
27
- - `scale` is 1 for the whole page and 1.8 at the deepest zoom
27
+ - `scale` is 1 for the whole page and 1.8 at the deepest zoom, or about 1.35 on a screencast beat, and holds at 1 on a beat whose plan set `push: false`
28
28
  - `x` and `y` place the view's corner on the page, so the view spans `1920 / scale` by `1080 / scale` from there
29
29
  - `cursor` is the pointer's position on the page
30
- - `ring` runs from 0 to 1 across the 450 ms after a click and is `null` otherwise
30
+ - `ring` runs from 0 to 1 across the 450 ms after a click and is `null` otherwise. On a drag it grows to 0.3, holds there from press to release, and runs on to 1 from the release.
31
31
 
32
32
  The track is final. It already carries the easing, the spring, and the hold, so a composition sets each frame's values and never tweens between them.
33
33
 
@@ -45,6 +45,14 @@ bunx -y hyperframes init .canon/video/<slug>/composition
45
45
  - Leave renders in the project's `renders/` folder, which `canon records push` skips along with `takes/`, `snapshots/`, `node_modules/`, and any video file
46
46
  - An image the composition adds under `assets/`, such as a logo, is backed up with the project's source
47
47
 
48
+ A cut in another shape and the README loop are each a project of their own beside `composition/`, so one shape's edit never reflows another's. Each reads the takes from `../takes/` the same way.
49
+
50
+ | Project | Holds |
51
+ | ---------------------- | ------------------------------------------------ |
52
+ | `composition/` | The main cut, in the takes' 16:9 shape |
53
+ | `composition-<shape>/` | One other shape, such as `composition-square/` |
54
+ | `readme-loop/` | The short silent loop a README plays as its hero |
55
+
48
56
  Compose from a session started at the main worktree root. From a linked worktree or an isolated background session, `Write` and `Edit` refuse every file in `composition/` and redirect to a worktree copy no later session reads, so never take that redirect.
49
57
 
50
58
  Where composing from the main root is not possible, write each file whole through the route `${CLAUDE_SKILL_DIR}/../session-worktree/references/main-root-writes.md` states.
@@ -62,6 +70,8 @@ The cursor stays outside the wrapper because a cursor inside it would scale with
62
70
 
63
71
  ## What the composition still owns
64
72
 
73
+ Read `${CLAUDE_SKILL_DIR}/references/compose-craft.md` for the captions, the other shapes, the loop, and a sped-up clip, where app footage changes what HyperFrames advises.
74
+
65
75
  - The order and the cuts between takes, the captions, and any music or voice
66
76
  - Whether a take plays whole or trimmed. A trim keeps the track aligned only when it shifts the track by the same frames.
67
77
  - Motion blur stays off, by the operator's call on these takes
@@ -15,6 +15,7 @@ Read at Step 3 of `ui-film`, before writing the first beat. `canon take --help`
15
15
  - [Targets](#targets)
16
16
  - [The pointer](#the-pointer)
17
17
  - [The zoom](#the-zoom)
18
+ - [The harness route](#the-harness-route)
18
19
  - [Sources](#sources)
19
20
 
20
21
  ## The plan
@@ -44,6 +45,13 @@ A plan holds the approved beats in order. Each beat names its setup, which runs
44
45
  - Reach the beat's start state through `setup`, since every beat opens the page fresh and nothing a setup step does is filmed
45
46
  - Write the beat's `name` as the operator approved it, since it names the clip's folder
46
47
 
48
+ ### Server state
49
+
50
+ Every beat reloads the page, never the server. An app holding its state in server memory keeps a change one beat made, so the next beat opens on it.
51
+
52
+ - Undo the change in the next beat's `setup`, or order the beats so each one's result is the next one's start
53
+ - Restart the server between beats only when neither works, since a restart costs the served address its warm start
54
+
47
55
  ## Frame-stepping limits
48
56
 
49
57
  A step beat runs the page on a virtual clock, one frame per step. Most pages film this way, and some inputs are known to stall it.
@@ -52,10 +60,11 @@ A step beat runs the page on a virtual clock, one frame per step. Most pages fil
52
60
  - A scroll has not been proven under frame stepping, and a smooth scroll can jump. Give a scroll its own beat so a fallback costs that beat alone.
53
61
  - An animated GIF can freeze, so expect one to hold its first frame
54
62
  - Set `"route": "screencast"` on a beat known to stall, rather than paying for the stall before the fallback
63
+ - Set a top-level `"route": "screencast"` on a plan whose page stalls on every beat, and a beat naming its own `route` keeps it
55
64
 
56
65
  A fallback films the beat again from a fresh load, replaying its setup and the steps the stepper already ran. A beat whose steps persist in the app, such as a fill that renames something, would then start from the changed state, so set `"route": "screencast"` on it when it risks a stall.
57
66
 
58
- A screencast beat films in real time at 1920x1080, which goes soft at the 1.8x zoom. Tell the operator which beats ran that way.
67
+ A screencast beat films in real time at 1920x1080, so its camera zooms only to about 1.35x before it would go soft. Tell the operator which beats ran that way.
59
68
 
60
69
  ### Reading a take back
61
70
 
@@ -68,6 +77,7 @@ Two rules hold once a beat is filmed.
68
77
 
69
78
  - Prefer a stable attribute, such as an `aria-label`, a `data-testid`, or an `id`, over a position like `:nth-child`
70
79
  - Use `text=<words>` for a control whose only stable handle is its label
80
+ - Target a control with no visible text, such as an icon button, by its `aria-label`, since `text=` finds nothing on it
71
81
  - Use a `move` to a point only for a target the page reveals on hover, and follow it with the click
72
82
  - Read each target off the served page before writing it. The verb refuses `target-missing` rather than filming a guess, and a refusal costs a reload.
73
83
 
@@ -86,6 +96,22 @@ The camera track already carries the zoom, so these rules decide what to film fo
86
96
  - Expect a target filling most of the view to get less zoom, and one filling the page to get none
87
97
  - The push reaches 90% of its depth in about 633 ms, inside the 1 s ceiling a push onto an action keeps
88
98
 
99
+ ### Depth, opt-out, and speed
100
+
101
+ Three controls change the push itself.
102
+
103
+ - Expect a screencast beat's zoom to stop near 1.35x, since its clip has one pixel per page pixel, and a stepped beat's to reach 1.8x
104
+ - Set `"push": false` on a beat the edit holds wide, such as one showing a whole layout change. Its track keeps the cursor and the click ring and drops the zoom.
105
+ - Rebuild a beat's track with `canon take camera <dir>/log.json --rate <n> --out <file>` for a clip the edit plays `n` times faster, so the zoom settles on the clock a viewer sees
106
+
107
+ ## The harness route
108
+
109
+ A beat driven from outside the page, such as a drag between two windows or an input the step kinds lack, cannot run as `canon take` steps. Until the verb can run an outside script itself, film it through a harness.
110
+
111
+ - Drive the beat from a Playwright script that records the page and writes a log in the shape of a take's `log.json`
112
+ - Build its camera track from that log with `canon take camera <log> --out <file>`, so the composition applies it like any other take
113
+ - Tell the operator which beats ran this way, since their clips carry the harness's resolution rather than the stepper's
114
+
89
115
  ## Sources
90
116
 
91
117
  | Rule | Source |
package/docs/index.md CHANGED
@@ -8,5 +8,6 @@ subtitle: One-line reference for each doc in this folder.
8
8
  One-line reference for each doc in this folder.
9
9
 
10
10
  - [Agents](agents/index.md): CLI catalog and invocation rules for agents, split by command domain. Start with overview.
11
+ - [Target migrations](migrations/index.md): One-time moves a project scaffolded under an older toolkit makes before its next sync, split by whether a canon migrate verb runs them or a person makes them by hand.
11
12
  - [Target](target/index.md): Scaffold, sync, and migrate a toolkit-managed project, with worked setups for three project shapes.
12
13
  - [Workflow](workflow/index.md): How a person and their agents run a feature, from the design loop through the parallel-session loop to the shell that launches them.
@@ -0,0 +1,107 @@
1
+ ---
2
+ title: Target migrations by hand
3
+ description: One-time moves and keep-or-delete calls a person makes by hand, which no canon migrate verb runs or detects
4
+ category: Agent surface
5
+ ---
6
+
7
+ # Target migrations by hand
8
+
9
+ Each section is a move a project scaffolded before the change it names makes by hand, since no `canon migrate` verb runs it and `canon migrate status` never lists it. The moves a verb runs, and the order to run them in, are in [target migrations by verb](by-verb.md).
10
+
11
+ ## Back records up off this machine, once
12
+
13
+ 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.
14
+
15
+ ## Rename the pull request template headings, once
16
+
17
+ 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`.
18
+
19
+ ## Delete the retired snippets, once
20
+
21
+ A project scaffolded while snippets installed may hold `.claude/snippets/` or a root `snippets/`.
22
+
23
+ ```bash
24
+ canon sync --check . --json | jq '.reverse'
25
+ ```
26
+
27
+ - `dropped` is the toolkit's copy, unchanged, so delete it
28
+ - `unattributed` is often an edited copy, so read what changed first
29
+ - `project` is the project's own content, so leave it
30
+
31
+ From the registry the walk reports `historyUnavailable`, so check both paths by hand.
32
+
33
+ ## Stop calling the standards verb, once
34
+
35
+ `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 -->
36
+
37
+ | Skill | Standards |
38
+ | ----------------- | ------------------------------------------------------------- |
39
+ | `task-board` | `board`, `tasks`, `tasks-decline` |
40
+ | `context-fold` | `context` |
41
+ | `canvas-board` | `canvas`, `design` <!-- canon-keep-retired --> |
42
+ | `docs-sync` | `docs`, `readme` |
43
+ | `draw-figure` | `figures`, `mermaid` |
44
+ | `create-rule` | `rule` |
45
+ | `create-skill` | `skill`, `skill-paths`, `skill-practice`, `skill-requirement` |
46
+ | `git-branch` | `branch`, `slug` |
47
+ | `git-commit` | `commit`, `versioning` |
48
+ | `git-pr` | `pr`, `publish` |
49
+ | `markdown-craft` | `markdown` |
50
+ | `teach-workspace` | `glossary`, `teach` <!-- canon-keep-retired --> |
51
+ | `plan-groundwork` | `groundwork`, `groundwork-spikes` |
52
+ | `plan-intake` | `intake` |
53
+ | `plan-feature` | `plan`, `plan-lifecycle` |
54
+ | `plan-ready` | `ready` <!-- canon-keep-retired --> |
55
+ | `write-doc` | `requirements`, `wiki` |
56
+ | `session-map` | `session` |
57
+
58
+ The `standard` name became `skill-reference.md` in `create-skill`.
59
+
60
+ ## Keep or delete the wireframes folder, your call
61
+
62
+ The wireframes record is retired, and nothing deletes what a project holds.
63
+
64
+ - `canon/wireframes/` stays yours and unaudited. Keep it as notes or delete it.
65
+ - Delete the `@canon/wireframes/index.md` line in your `CLAUDE.md` with the folder. `canon claude sync` does not rewrite it.
66
+ - `canon gov sync` removes `.claude/rules/canon/standards/wireframes.md`
67
+
68
+ ## Keep or delete the retired product files, your call
69
+
70
+ The learning workspace, deck renderer, app recorder, canvas, and design install are retired with their verbs, and nothing deletes what a project holds.
71
+
72
+ - `.canon/teach/` holds HTML that opens as it is <!-- canon-keep-retired -->
73
+ - `.canon/slides/` and a `demos/` folder hold sources nothing renders any more, so delete them once nothing cites them <!-- canon-keep-retired -->
74
+ - Move the `.claude/design/project/` values, `fonts/`, and `fonts.css` to the stylesheet your `canon/DESIGN.md` lead names, then delete `.claude/design/`
75
+
76
+ A reference to a retired skill takes a hand edit.
77
+
78
+ - Replace a `canon:teach-workspace` reference with `canon:teach-craft` by hand, since `canon migrate skill-names` does not rewrite it <!-- canon-keep-retired -->
79
+ - Delete a `canon:make-deck`, `canon:script-screencast`, `canon:record-screencast`, `canon:read-frames`, or `canon:video-craft` reference, since none has a successor <!-- canon-keep-retired -->
80
+ - Delete a `canon:canvas-board` reference too. Frameboard, which `canon:design-pick` drives, reads each `.canon/canvas/` folder as a project, so move a kept page under one <!-- canon-keep-retired -->
81
+
82
+ ## Move decisions out of a held architecture record, once
83
+
84
+ 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.
85
+
86
+ ## Move the capture cases out of the harness, once
87
+
88
+ A web project's `e2e/screenshot.ts` is a config. It now loads `CASES` from a seeded `e2e/capture/cases.ts` that sync copies once and never overwrites. A harness you edited is held on `--write`, so the new one lands only once you pass `--replace e2e/screenshot.ts`.
89
+
90
+ - Copy your cases from the old `e2e/screenshot.ts` into `e2e/capture/cases.ts`, then sync with `--replace e2e/screenshot.ts`.
91
+ - Evidence now defaults to `e2e/evidence/`. Set `export const EVIDENCE_ROOT = 'evidence'` in `e2e/capture/cases.ts` to keep a committed baseline at the old path.
92
+ - A run from a folder with no `e2e/capture/cases.ts` exits 1 and names the file.
93
+
94
+ ## Fold the ui rules onto one pointer, once
95
+
96
+ Eleven ui rules moved unchanged into the `ui-craft` skill, being `a11y`, `keyboard`, `pointer`, `forms`, `motion`, `ux-controls`, `ux-completeness`, `surface-capture`, `copy`, `interface-casing`, and `link-behavior`. Update the plugin, then sync, which folds each one you hold and `design-taste.md` onto one `craft.md` pointer without local edits.
97
+
98
+ ```bash
99
+ canon gov sync .
100
+ ```
101
+
102
+ ## Group a long paths section in `CLAUDE.md`, once
103
+
104
+ The `## Key paths` section of `CLAUDE.md` now keeps to 5 bullets in a row, and every other section stays exempt. `canon claude sync` never rewrites a `CLAUDE.md` you hold, so it warns with the line of each longer run.
105
+
106
+ - Regroup the section by hand under H3s, each opening on a one-sentence lead.
107
+ - List `CLAUDE.md` in `canon/config/markdown.toml` to gate it from then on.
@@ -0,0 +1,118 @@
1
+ ---
2
+ title: Target migrations by verb
3
+ description: One-time moves a canon migrate verb runs, for a project scaffolded under an older toolkit, in the order canon migrate status lists them
4
+ category: Agent surface
5
+ ---
6
+
7
+ # Target migrations by verb
8
+
9
+ Each section is a move a `canon migrate` verb runs once, for a project scaffolded before the change it names. Run `canon upgrade` first, then `canon migrate status --json` to list the moves still pending in the order to run them. A pending verb with no section here, such as `scratch-evidence` or `rename`, is in [migrate](../agents/migrate.md).
10
+
11
+ `canon:target-update` is the guided path through both, running the moves in that order once you approve its preview. The moves no verb runs are in [target migrations by hand](by-hand.md), and the recurring sync that follows is in [target sync](../target/sync.md).
12
+
13
+ ## Move the records first, once
14
+
15
+ 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
+
17
+ ```bash
18
+ canon tooling sync claude . --write
19
+ canon migrate records --json
20
+ canon migrate records --write --json
21
+ ```
22
+
23
+ The first line takes the `.canon/` ignore entry. The second reports and the third applies, repointing files that cite a moved folder and deleting a `.gitignore` line `.canon/` covers, as `dropped`. A line naming an old path keeps it via `canon-keep-record-root` on that line or the nearest non-blank one above.
24
+
25
+ Then sweep the citations inside the records, which the verb above never reaches.
26
+
27
+ ```bash
28
+ canon migrate record-tree --json
29
+ canon migrate record-tree --write --json
30
+ ```
31
+
32
+ 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.
33
+
34
+ ## Move the design board to `board/`, once
35
+
36
+ A pick round with no board named now drafts in `.canon/board/`, the folder Frameboard reads, rather than `.canon/canvas/`. Stop any `frameboard serve` on the old folder first.
37
+
38
+ ```bash
39
+ canon migrate record-layout --json
40
+ canon migrate record-layout --write --json
41
+ ```
42
+
43
+ A project holding both folders gets a collision, and neither moves. A `board` key in `design.toml` naming `.canon/canvas` stays as written, so update it by hand.
44
+
45
+ ## Move rules off the flat layout, once
46
+
47
+ 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.
48
+
49
+ ```bash
50
+ canon migrate rule-layout --json
51
+ canon migrate rule-layout --write --json
52
+ ```
53
+
54
+ Run it once, ahead of `canon gov sync` or `canon gov install`.
55
+
56
+ ## Rename the skill citations, once
57
+
58
+ Plugin skills dropped their `claude-` prefix, so `canon:claude-docs` is now `canon:context-fold`. Five drafters merged into `write-doc`, seven `draft-` skills took verb-first names, and four joined their family. No old name keeps a pointer, and `canon migrate skill-names --write` moves a project. <!-- canon-keep-retired -->
59
+
60
+ | Old name | New name |
61
+ | ------------------ | ----------------------------------------------- |
62
+ | `draft-doc` | `write-doc` <!-- canon-keep-retired --> |
63
+ | `draft-figure` | `draw-figure` <!-- canon-keep-retired --> |
64
+ | `draft-identity` | `design-identity` <!-- canon-keep-retired --> |
65
+ | `draft-slides` | `make-deck` <!-- canon-keep-retired --> |
66
+ | `draft-and-pick` | `design-pick` <!-- canon-keep-retired --> |
67
+ | `draft-ready` | `plan-ready` <!-- canon-keep-retired --> |
68
+ | `draft-screencast` | `script-screencast` <!-- canon-keep-retired --> |
69
+ | `pick-by-eye` | `design-pick` <!-- canon-keep-retired --> |
70
+ | `ui-record` | `ui-film` <!-- canon-keep-retired --> |
71
+ | `ux-audit` | `ui-audit` <!-- canon-keep-retired --> |
72
+ | `ux-measure` | `ui-measure` <!-- canon-keep-retired --> |
73
+
74
+ Replace a citation of a skill with no successor by hand, or delete the sentence.
75
+
76
+ - `canvas` is now `canvas-board`. The sweep rewrites only `canon:canvas` and `skills/canvas`, so replace a bare mention by hand. <!-- canon-keep-retired -->
77
+ - `draft-ready` is rewritten only as `canon:draft-ready` and `skills/draft-ready`, since bare it also describes a pull request, so replace a bare mention by hand. <!-- canon-keep-retired -->
78
+ - `design-extract` and `sketch-design` are replaced by `canon:canvas-board`. <!-- canon-keep-retired -->
79
+ - `review-branch`, `seed-sync`, `restate-plainly`, `bash-cli-script`, `canon-operator`, `canon-rollout`, and `canon-feedback-triage` have no successor <!-- canon-keep-retired -->
80
+ - `create-standard`, `markdown-propose`, `memory-review`, `project-commands`, `repo-metadata`, `ux-walkthrough`, and `plan-ready` have no successor <!-- canon-keep-retired -->
81
+
82
+ The `memory` record kind left `canon records`, so `canon records validate memory` refuses as an unknown kind and `canon records migrate` is gone.
83
+
84
+ - `canon repo metadata`, `canon autoship`, and the `120-bash` rule are gone, and `canon gov sync` removes the rule <!-- canon-keep-retired -->
85
+ - `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 -->
86
+
87
+ 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, naming a held hook with `--replace`.
88
+
89
+ ```bash
90
+ canon gov sync
91
+ canon tooling sync <stack> . --write
92
+ canon migrate skill-names --json
93
+ canon migrate skill-names --write --json
94
+ ```
95
+
96
+ ## Move the surfaces off `.claude/`, once
97
+
98
+ `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.
99
+
100
+ ```bash
101
+ canon migrate surface-roots --json
102
+ canon migrate surface-roots --write --json
103
+ ```
104
+
105
+ It moves each surface with `git mv` and repoints every tracked citation. No other command notices a surface left at `.claude/`.
106
+
107
+ ## Deny subagents and merges, and turn auto memory off, once
108
+
109
+ The seeded `.claude/settings.json` now denies the `Agent` and `Task` tools and both merge commands, and sets `autoMemoryEnabled` to `false`. `canon claude sync` never rewrites a settings file you hold, so it warns while the file holds no default or lacks a merge entry. Removing `Agent` and `Task` later draws no warning.
110
+
111
+ ```bash
112
+ canon migrate session-defaults --json
113
+ canon migrate session-defaults --write --json
114
+ ```
115
+
116
+ The verb only adds a key that is absent. A person who wants auto memory back sets it in their own `.claude/settings.local.json`.
117
+
118
+ The verb adds `Bash(canon pr merge:*)` and `Bash(gh pr merge:*)` so a session cannot merge. A project migrated before them runs `--write` once more, which also restores `Agent` and `Task` for a person who removed them to allow subagents, so remove them again after.
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: Target migrations
3
+ subtitle: One-time moves a project scaffolded under an older toolkit makes before its next sync, split by whether a canon migrate verb runs them or a person makes them by hand.
4
+ category: Agent surface
5
+ ---
6
+
7
+ # Target migrations
8
+
9
+ One-time moves a project scaffolded under an older toolkit makes before its next sync, split by whether a canon migrate verb runs them or a person makes them by hand.
10
+
11
+ ## Agent surface
12
+
13
+ - [Target migrations by hand](by-hand.md): One-time moves and keep-or-delete calls a person makes by hand, which no canon migrate verb runs or detects
14
+ - [Target migrations by verb](by-verb.md): One-time moves a canon migrate verb runs, for a project scaffolded under an older toolkit, in the order canon migrate status lists them
@@ -10,7 +10,6 @@ Scaffold, sync, and migrate a toolkit-managed project, with worked setups for th
10
10
 
11
11
  ## Agent surface
12
12
 
13
- - [Target migrations](migrations.md): One-time moves a project scaffolded under an older toolkit runs before its next sync
14
13
  - [Target projects](projects.md): Scaffold, add domains later, and sync upstream drift in a toolkit-managed project
15
14
  - [Target scenarios](scenarios.md): Worked setups for a markdown-heavy project, a web application, and a monorepo
16
- - [Target sync](sync.md): Check what drifted in a toolkit-managed project and pull it in, per domain or all at once
15
+ - [Target sync](sync.md): Check what drifted in a toolkit-managed project and pull it in, per domain or all at once, and update canon itself
@@ -84,11 +84,11 @@ Install one domain without re-running `canon init`.
84
84
  - 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.
85
85
  - An `index.md` system for a markdown-heavy folder: invoke `canon:target-setup indexes`
86
86
 
87
- For a leftover `.claude/snippets/` see [target migrations](migrations.md).
87
+ For a leftover `.claude/snippets/` see [target migrations by hand](../migrations/by-hand.md).
88
88
 
89
89
  ## Sync upstream drift
90
90
 
91
- 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.
91
+ A project scaffolded before a layout move runs the one-time moves in [target migrations](../migrations/index.md) first. [Target sync](sync.md) covers reading drift and running a sync. [Target scenarios](scenarios.md) walks three worked setups.
92
92
 
93
93
  ## Related
94
94
 
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: Target sync
3
- description: Check what drifted in a toolkit-managed project and pull it in, per domain or all at once
3
+ description: Check what drifted in a toolkit-managed project and pull it in, per domain or all at once, and update canon itself
4
4
  category: Agent surface
5
5
  ---
6
6
 
7
7
  # Target sync
8
8
 
9
- A target pulls toolkit changes per domain, through one catch-all and several targeted entry points. A project scaffolded before a layout move runs [target migrations](migrations.md) first. See [install and sync](../agents/install-and-sync.md) for what each verb writes.
9
+ A target pulls toolkit changes per domain, through one catch-all and several targeted entry points. A project scaffolded before a layout move runs [target migrations](../migrations/index.md) first. See [install and sync](../agents/install-and-sync.md) for what each verb writes.
10
10
 
11
11
  ## Check first
12
12
 
@@ -36,6 +36,26 @@ Attribution reads `canon/config/config.json`, falling back to `.claude/canon/con
36
36
 
37
37
  Add `--json` for a machine-readable report and `--exit-code` to fail CI when a target falls behind. Project-authored files, superseded artifacts, seed drift, tooling, and `reverse` never count toward that code, and an unmigrated domain does.
38
38
 
39
+ ## Update canon itself
40
+
41
+ Nothing refreshes on its own. Claude Code ships auto-update off for third-party marketplaces, so an installed copy serves whatever version it was installed at until you refresh it.
42
+
43
+ ```bash
44
+ claude plugin marketplace update canon
45
+ claude plugin update canon@canon
46
+ canon upgrade
47
+ ```
48
+
49
+ The first two update the skills, the third updates the CLI, and they move independently. Restart Claude Code, or run `/reload-plugins`, to pick the skills up.
50
+
51
+ `canon upgrade` reads the package manager off its own install path and reinstalls with that one. It names what it detected before it runs anything, and it refuses a source checkout rather than reinstalling over your clone.
52
+
53
+ ### Checking for drift
54
+
55
+ `canon sync --check` and `canon claude skills drift` both report the installed version against the newest published one, and neither changes its exit code over it, so an offline machine reads unknown rather than red.
56
+
57
+ To stop doing this by hand, turn auto-update on once under `/plugin` in the Marketplaces tab. Confirm what you are running with `canon --version` and `claude plugin list`.
58
+
39
59
  ## Catch-all
40
60
 
41
61
  `canon sync <path>` runs every installed domain's sync and never touches user-owned seeds.
@@ -27,7 +27,7 @@ canon/
27
27
  └── tmp/ ← deletable scratch
28
28
  ```
29
29
 
30
- A project scaffolded before the move keeps its records under `.claude/`, and every command reads either root. See [target migrations](../target/migrations.md).
30
+ A project scaffolded before the move keeps its records under `.claude/`, and every command reads either root. See [target migrations by verb](../migrations/by-verb.md).
31
31
 
32
32
  Context loads always (`CLAUDE.md` and `canon/REQUIREMENTS.md`), by path (`.claude/rules/` with a `paths:` glob), or on demand (`canon/context/`, found through its `index.md`). Run `canon init` to seed `.claude/`, `CLAUDE.md`, and the rules.
33
33
 
@@ -13,10 +13,13 @@ The four casing sections rest on the GOV.UK style guide, which sets sentence cas
13
13
 
14
14
  ## Punctuation
15
15
 
16
- | Bullet | Source | Read |
17
- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
18
- | No em dash or semicolon | House choice: both read as generated copy in an interface, and a comma, a period, or a split sentence carries the same meaning in a shorter line | 2026-10-18 |
19
- | No trailing label punctuation | [Button](https://design-system.service.gov.uk/components/button/): every example label, such as "Start now", "Sign in", and "Continue", carries no trailing punctuation | 2026-10-18 |
16
+ | Bullet | Source | Read |
17
+ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
18
+ | No em dash or semicolon | House choice: both read as generated copy in an interface, and a comma, a period, or a split sentence carries the same meaning in a shorter line | 2026-10-18 |
19
+ | No end punctuation but a question mark | [A to Z of GOV.UK style](https://www.gov.uk/guidance/style-guide/a-to-z-of-gov-uk-style): page titles should "not have a full stop at the end", and [Button](https://design-system.service.gov.uk/components/button/) labels such as "Start now" and "Continue" carry none. Every other kind in the list, from headings to taglines, is a house choice by analogy to the title and the button. [Question pages](https://design-system.service.gov.uk/patterns/question-pages/) keep the question mark, since "Page headings can be questions or statements", as in "What is your date of birth?". | 2026-10-27 |
20
+ | One-sentence tagline | House choice: a period inside a tagline makes it prose, which the short-string rule then has to end with a period, so one sentence keeps it a title-like string | 2026-10-27 |
21
+ | One-sentence error, no period | [Error message](https://design-system.service.gov.uk/components/error-message/): every example, such as "Enter how many hours you work a week" and "Name must be 35 characters or less", ends with no full stop | 2026-10-27 |
22
+ | Prose keeps its period | House choice by analogy to [A to Z of GOV.UK style](https://www.gov.uk/guidance/style-guide/a-to-z-of-gov-uk-style), whose summaries should "end with a full stop". The reach to body copy, multi-sentence messages, and quoted text is canon's. | 2026-10-27 |
20
23
 
21
24
  ## Button copy
22
25
 
@@ -86,6 +89,7 @@ Every bullet the rewrite removed or reshaped, grouped by why.
86
89
 
87
90
  ### Merged or reworded
88
91
 
92
+ - Widened the button-label punctuation bullet to every short rendered string, since board frames shipped tagline periods under the narrower wording.
89
93
  - Merged the imperative verb and padded phrasing bullets. The `Save` over `Save changes` example went, since GOV.UK adds words "to better describe the action".
90
94
  - Merged "keep messages short and actionable" and "one sentence maximum" into the plain language bullet.
91
95
  - Reworded the error example to `Enter an email address`, the instruction form GOV.UK prefers over a description.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@erclx/canon",
3
3
  "type": "module",
4
- "version": "5.69.0",
4
+ "version": "5.70.0",
5
5
  "description": "Runs your agent's work and keeps its code good, on one setup for every repo.",
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -42,6 +42,8 @@
42
42
  "canon:sandbox:reset": "canon sandbox reset",
43
43
  "web:tokens": "bun src/cli.ts design css --no-components > web/src/styles/tokens.css.new && (echo '/* Generated by `canon design css --no-components`. Regenerate with `bun run web:tokens`. Do not hand-edit. */'; cat web/src/styles/tokens.css.new) > web/src/styles/tokens.css && rm web/src/styles/tokens.css.new",
44
44
  "web:dev": "cd web && astro dev",
45
+ "film:render": "bun scripts/core/render-film.ts",
46
+ "design:sync": "bun scripts/core/design-sync.ts",
45
47
  "web:favicon": "bun scripts/core/regen-web-favicon.ts",
46
48
  "web:previews": "bun scripts/core/regen-web-previews.ts",
47
49
  "web:build": "bun run web:tokens && bun run web:favicon && bun run web:previews && cd web && astro check && astro build",