@erclx/canon 5.26.0 → 5.27.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 +2 -2
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/api-design/SKILL.md +2 -0
- package/claude/skills/auto-ship/SKILL.md +3 -11
- package/claude/skills/auto-ship/references/review-findings.md +20 -0
- package/claude/skills/backlog-triage/SKILL.md +2 -0
- package/claude/skills/bash-cli-script/SKILL.md +2 -0
- package/claude/skills/build-in-slices/SKILL.md +2 -0
- package/claude/skills/canon-cli/SKILL.md +2 -0
- package/claude/skills/canon-feedback/SKILL.md +2 -0
- package/claude/skills/canon-feedback-triage/SKILL.md +2 -0
- package/claude/skills/canon-operator/SKILL.md +2 -0
- package/claude/skills/canon-rollout/SKILL.md +3 -11
- package/claude/skills/canon-rollout/references/failure-recovery.md +20 -0
- package/claude/skills/canvas/SKILL.md +13 -0
- package/claude/skills/ci-workflow/SKILL.md +2 -0
- package/claude/skills/code-craft/SKILL.md +2 -0
- package/claude/skills/codebase-layout/SKILL.md +2 -0
- package/claude/skills/context-fold/SKILL.md +3 -17
- package/claude/skills/context-fold/references/completion-report.md +26 -0
- package/claude/skills/create-rule/SKILL.md +2 -0
- package/claude/skills/create-skill/SKILL.md +2 -0
- package/claude/skills/create-standard/SKILL.md +2 -0
- package/claude/skills/decision-escalate/SKILL.md +2 -0
- package/claude/skills/deploy-app/SKILL.md +2 -0
- package/claude/skills/deprecation-migration/SKILL.md +2 -0
- package/claude/skills/design-extract/SKILL.md +2 -0
- package/claude/skills/design-taste/SKILL.md +2 -0
- package/claude/skills/docs-sync/SKILL.md +2 -0
- package/claude/skills/document-health/SKILL.md +2 -0
- package/claude/skills/draft-and-pick/SKILL.md +2 -0
- package/claude/skills/draft-doc/SKILL.md +2 -0
- package/claude/skills/draft-doc/references/wiki.md +1 -1
- package/claude/skills/draft-figure/SKILL.md +2 -0
- package/claude/skills/draft-identity/SKILL.md +2 -0
- package/claude/skills/draft-ready/SKILL.md +2 -0
- package/claude/skills/draft-screencast/SKILL.md +2 -0
- package/claude/skills/draft-slides/SKILL.md +2 -0
- package/claude/skills/git-branch/SKILL.md +2 -0
- package/claude/skills/git-commit/SKILL.md +2 -0
- package/claude/skills/git-followup/SKILL.md +2 -0
- package/claude/skills/git-issue/SKILL.md +2 -0
- package/claude/skills/git-pr/SKILL.md +2 -0
- package/claude/skills/git-pr/references/evidence.md +6 -6
- package/claude/skills/git-ship/SKILL.md +2 -0
- package/claude/skills/git-split/SKILL.md +2 -0
- package/claude/skills/git-stage/SKILL.md +2 -0
- package/claude/skills/git-worktree/SKILL.md +2 -0
- package/claude/skills/index-lookup/SKILL.md +2 -0
- package/claude/skills/markdown-propose/SKILL.md +2 -0
- package/claude/skills/memory-capture/SKILL.md +2 -0
- package/claude/skills/memory-review/SKILL.md +2 -0
- package/claude/skills/plan-feature/SKILL.md +2 -0
- package/claude/skills/plan-groundwork/SKILL.md +2 -0
- package/claude/skills/plan-intake/SKILL.md +2 -0
- package/claude/skills/plan-intake-answer/SKILL.md +2 -0
- package/claude/skills/project-commands/SKILL.md +2 -0
- package/claude/skills/read-frames/SKILL.md +2 -0
- package/claude/skills/record-screencast/SKILL.md +2 -0
- package/claude/skills/repo-metadata/SKILL.md +2 -0
- package/claude/skills/restate-plainly/SKILL.md +2 -0
- package/claude/skills/review-address/SKILL.md +3 -7
- package/claude/skills/review-address/references/post-review-findings.md +16 -0
- package/claude/skills/review-branch/SKILL.md +2 -0
- package/claude/skills/review-craft/SKILL.md +2 -0
- package/claude/skills/review-craft/references/ui.md +2 -2
- package/claude/skills/review-pr/SKILL.md +4 -8
- package/claude/skills/review-pr/references/body-variants.md +52 -0
- package/claude/skills/review-pr/references/key-changes.md +16 -0
- package/claude/skills/review-pr/references/post.md +15 -43
- package/claude/skills/review-ui/SKILL.md +3 -1
- package/claude/skills/role-orchestrator/SKILL.md +5 -14
- package/claude/skills/role-orchestrator/references/orchestrator-handback.md +1 -1
- package/claude/skills/role-orchestrator/references/orchestrator-inbound.md +23 -0
- package/claude/skills/role-orchestrator/references/orchestrator-launch.md +5 -33
- package/claude/skills/role-orchestrator/references/orchestrator-poll.md +1 -21
- package/claude/skills/role-orchestrator/references/orchestrator-review-dispatch.md +1 -1
- package/claude/skills/role-orchestrator/references/orchestrator-reviewer-launch.md +38 -0
- package/claude/skills/role-orchestrator/references/orchestrator-watch.md +26 -0
- package/claude/skills/role-planner/SKILL.md +2 -0
- package/claude/skills/role-reviewer/REQUIREMENT.md +1 -1
- package/claude/skills/role-reviewer/SKILL.md +2 -0
- package/claude/skills/role-worker/SKILL.md +2 -0
- package/claude/skills/search-craft/SKILL.md +2 -0
- package/claude/skills/seed-sync/SKILL.md +2 -0
- package/claude/skills/session-compact/SKILL.md +2 -0
- package/claude/skills/session-map/SKILL.md +2 -0
- package/claude/skills/session-relay/SKILL.md +2 -0
- package/claude/skills/session-resume/SKILL.md +2 -0
- package/claude/skills/session-worktree/SKILL.md +3 -11
- package/claude/skills/session-worktree/references/install-command.md +20 -0
- package/claude/skills/sketch-design/SKILL.md +2 -0
- package/claude/skills/systematic-debugging/SKILL.md +2 -0
- package/claude/skills/target-check/SKILL.md +2 -0
- package/claude/skills/target-setup/SKILL.md +2 -0
- package/claude/skills/task-board/SKILL.md +2 -0
- package/claude/skills/teach-workspace/SKILL.md +5 -15
- package/claude/skills/teach-workspace/references/lesson-build.md +75 -0
- package/claude/skills/teach-workspace/references/lesson-craft.md +13 -69
- package/claude/skills/teach-workspace/references/revisit.md +22 -0
- package/claude/skills/test-craft/SKILL.md +2 -0
- package/claude/skills/test-first/SKILL.md +2 -0
- package/claude/skills/ui-checklist/SKILL.md +2 -0
- package/claude/skills/ux-audit/SKILL.md +2 -0
- package/claude/skills/ux-measure/SKILL.md +2 -0
- package/claude/skills/ux-walkthrough/SKILL.md +2 -0
- package/claude/skills/video-craft/SKILL.md +2 -0
- package/claude/skills/write-human/SKILL.md +2 -0
- package/claude/skills/youtube-transcripts/SKILL.md +2 -0
- package/docs/agents/canvas.md +23 -7
- package/docs/agents/capture.md +5 -5
- package/docs/agents/commands.md +2 -2
- package/docs/agents/index.md +3 -3
- package/docs/agents/install-and-sync.md +7 -0
- package/docs/agents/key-changes.md +1 -1
- package/docs/agents/pr-evidence.md +38 -15
- package/docs/agents/pr-local.md +19 -13
- package/docs/agents/pr-preview.md +44 -21
- package/docs/agents/sandbox.md +28 -4
- package/docs/agents/scripting.md +8 -1
- package/docs/agents/skills-audit.md +2 -1
- package/docs/workflow/operating-model.md +5 -6
- package/docs/workflow/parallel-features.md +22 -1
- package/docs/workflow/skill-map.md +3 -1
- package/docs/workflow/zshrc-aliases.md +1 -1
- package/package.json +1 -1
- package/scripts/core/regen-hero.ts +1 -1
- package/scripts/lib/sandbox-path.sh +6 -162
- package/src/audits/run.ts +1 -1
- package/src/canvas/address.ts +12 -3
- package/src/canvas/client/inspector/align-grid.tsx +162 -0
- package/src/canvas/client/inspector/color-field.tsx +201 -171
- package/src/canvas/client/inspector/color-inputs.tsx +139 -0
- package/src/canvas/client/inspector/color-picker.tsx +668 -0
- package/src/canvas/client/inspector/color-space.ts +240 -0
- package/src/canvas/client/inspector/field.tsx +5 -1
- package/src/canvas/client/inspector/fields.css +395 -6
- package/src/canvas/client/inspector/size-field.tsx +69 -0
- package/src/canvas/client/inspector/values.ts +43 -1
- package/src/canvas/client/inspector.tsx +190 -4
- package/src/canvas/client/selection.tsx +197 -0
- package/src/canvas/client/shell.css +104 -12
- package/src/canvas/client/state.ts +69 -9
- package/src/canvas/client/surface.tsx +147 -22
- package/src/canvas/content.ts +50 -1
- package/src/canvas/edit.ts +37 -4
- package/src/canvas/editing.ts +203 -0
- package/src/canvas/global.d.ts +15 -0
- package/src/canvas/server.ts +149 -12
- package/src/canvas/tokens.ts +59 -17
- package/src/census/count.ts +1 -1
- package/src/claude/seeds.ts +1 -1
- package/src/claude/skills-audit.ts +28 -0
- package/src/claude/skills-drift.ts +1 -1
- package/src/claude/skills-families.ts +36 -0
- package/src/claude/skills-list.ts +76 -15
- package/src/commands/audits.ts +2 -2
- package/src/commands/canvas.ts +179 -2
- package/src/commands/claude.ts +67 -9
- package/src/commands/design.ts +142 -2
- package/src/commands/gov.ts +1 -1
- package/src/commands/hooks.ts +1 -1
- package/src/commands/indexes.ts +1 -1
- package/src/commands/init.ts +1 -1
- package/src/commands/intake.ts +1 -1
- package/src/commands/migrate.ts +1 -1
- package/src/commands/pr.ts +105 -58
- package/src/commands/records.ts +1 -1
- package/src/commands/repo.ts +1 -1
- package/src/commands/sandbox.ts +54 -2
- package/src/commands/sessions.ts +1 -1
- package/src/commands/sync.ts +1 -1
- package/src/commands/tasks.ts +2 -2
- package/src/commands/teach.ts +1 -1
- package/src/commands/transcripts.ts +1 -1
- package/src/commands/worktrees.ts +1 -1
- package/src/comments/scan.ts +1 -1
- package/src/comments/trend.ts +1 -1
- package/src/context/citations.ts +1 -1
- package/src/context/classify/extract.ts +2 -2
- package/src/design/project-fonts.ts +392 -0
- package/src/feedback/github.ts +1 -1
- package/src/gate/measures.ts +47 -9
- package/src/gate/sequencer.ts +1 -1
- package/src/gate/stages.ts +9 -0
- package/src/{git-files.ts → git/files.ts} +2 -2
- package/src/{git-ignore.ts → git/ignore.ts} +1 -1
- package/src/{worktree.ts → git/worktree.ts} +1 -1
- package/src/gov/citations.ts +1 -1
- package/src/gov/install.ts +1 -1
- package/src/gov/superseded.ts +1 -1
- package/src/gov/test-order.ts +2 -2
- package/src/help.ts +1 -1
- package/src/hooks/post-merge.ts +1 -1
- package/src/indexes/walk.ts +1 -1
- package/src/labels/audit.ts +1 -1
- package/src/markdown/files.ts +1 -1
- package/src/migrate/apply.ts +1 -1
- package/src/pr/bijection.ts +1 -1
- package/src/pr/evidence.ts +96 -43
- package/src/pr/local.ts +16 -10
- package/src/pr/preview.ts +78 -2
- package/src/records/backup.ts +1 -1
- package/src/records/stale-canonical.ts +1 -1
- package/src/sandbox/headless/dispatch.ts +264 -0
- package/src/sandbox/headless/run.ts +653 -0
- package/src/sandbox/headless/watch.ts +145 -0
- package/src/sandbox/provision.ts +12 -1
- package/src/sandbox/tree.ts +4 -8
- package/src/secrets/scan.ts +1 -1
- package/src/sessions/claim.ts +1 -1
- package/src/sessions/resolve.ts +1 -1
- package/src/sessions/transfer/bundle.ts +1 -1
- package/src/slides/package/fonts.ts +6 -2
- package/src/standards/audit.ts +2 -2
- package/src/sync/check.ts +2 -2
- package/src/sync/engine.ts +2 -2
- package/src/sync/git.ts +1 -1
- package/src/sync/history.ts +1 -1
- package/src/sync/reverse.ts +1 -1
- package/src/sync/target.ts +1 -1
- package/src/sync/workflow.ts +1 -1
- package/src/targets/pulls.ts +2 -2
- package/src/targets/sweep.ts +2 -2
- package/src/tasks/reach.ts +1 -1
- package/src/tasks/trunk.ts +1 -1
- package/src/tooling/inject.ts +1 -1
- package/src/tooling/subfolder.ts +1 -1
- package/src/web/readme-citations.ts +1 -1
- package/src/worktrees/bare-flag.ts +1 -1
- package/src/worktrees/reclaim.ts +2 -2
- package/src/worktrees/remove.ts +1 -1
- package/standards/canvas.md +2 -1
- package/standards/skill.md +1 -0
- package/standards/wiki.md +12 -3
- package/tooling/base/configs/.github/workflows/pr-local-preview.yml +2 -2
- package/scripts/lib/sandbox-dispatch.sh +0 -190
- /package/src/{client-commands.ts → gate/client-commands.ts} +0 -0
- /package/src/{git-base.ts → git/base.ts} +0 -0
- /package/src/{git-env.ts → git/env.ts} +0 -0
- /package/src/{copy.ts → sync/copy.ts} +0 -0
- /package/src/{target.ts → targets/validate.ts} +0 -0
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Lesson craft reference
|
|
3
|
-
description: Typography, restraint, quiz construction, what makes a lesson worth returning to
|
|
3
|
+
description: Typography, restraint, quiz construction, and what makes a lesson worth returning to
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Lesson craft reference
|
|
7
7
|
|
|
8
|
-
Judgment rather than shape. The workspace standard fixes where a lesson sits and what it is named, and this file covers what makes one worth opening twice.
|
|
8
|
+
Judgment rather than shape. The workspace standard fixes where a lesson sits and what it is named, and this file covers what makes one worth opening twice. The block list and the verbs that build the lesson body sit in `lesson-build.md`.
|
|
9
|
+
|
|
10
|
+
## Contents
|
|
11
|
+
|
|
12
|
+
- [One course, not a pile of pages](#one-course-not-a-pile-of-pages)
|
|
13
|
+
- [Typography](#typography)
|
|
14
|
+
- [Restraint](#restraint)
|
|
15
|
+
- [Diagrams](#diagrams)
|
|
16
|
+
- [Quiz construction](#quiz-construction)
|
|
17
|
+
- [Teach back](#teach-back)
|
|
18
|
+
- [Tokens travel with the course](#tokens-travel-with-the-course)
|
|
19
|
+
- [What makes a lesson worth returning to](#what-makes-a-lesson-worth-returning-to)
|
|
9
20
|
|
|
10
21
|
## One course, not a pile of pages
|
|
11
22
|
|
|
@@ -79,23 +90,6 @@ The quiz shape is a contract rather than a convention. `canon teach nav` splices
|
|
|
79
90
|
|
|
80
91
|
The stepper hides and shows and sets nothing else, so how a selected option looks, and whether a wrong one is marked as wrong, is the workspace stylesheet's to grow. Name the correct option in the feedback text for that reason: it is what a learner reads to find out whether they were right.
|
|
81
92
|
|
|
82
|
-
## The block list
|
|
83
|
-
|
|
84
|
-
`canon teach render` takes a JSON array of blocks and renders it through the same components a lesson body composes. Six types, and every structural body composes from them:
|
|
85
|
-
|
|
86
|
-
- `{"type":"heading","level":1|2,"text":"<text>"}`: an `<h1>` or `<h2>`.
|
|
87
|
-
- `{"type":"paragraph","text":"<text>","lede":true,"cites":[1]}`: a `<p>`, marked `lede` for the dek that opens the lesson. `cites` adds a footnote marker per reference number after the text, and a lede takes none.
|
|
88
|
-
- `{"type":"list","items":["<text>", ...],"ordered":true}`: a `<ul>` or, with `ordered`, an `<ol>`.
|
|
89
|
-
- `{"type":"refs","items":[{"title":"<name>","url":"<https URL>","note":"<text>"}, ...]}`: the lesson's one reference list, numbered from 1 in item order. `url` and `note` are optional, and a `url` must be http or https.
|
|
90
|
-
- `{"type":"code","lang":"ts","text":"<source>"}`: a code sample, highlighted at render time with no script. `lang` is optional and takes a highlight.js name or alias. One the renderer does not register renders as plain escaped code.
|
|
91
|
-
- `{"type":"raw","html":"<markup>"}`: the escape hatch, passed through unescaped.
|
|
92
|
-
|
|
93
|
-
Code never travels through `raw`. A hand-written `<pre><code>` renders with no color, and `nav` never highlights markup already in a lesson body, so a sample written that way stays plain for good. A fenced block in a reference page's markdown is highlighted by `nav` on its own.
|
|
94
|
-
|
|
95
|
-
The quiz and the teach-back block above are the one case `raw` is always needed for, since their fixed contract is not a components concern. Give them the array's last `raw` entry, followed only by `refs`, rather than reaching for `raw` anywhere the other types could carry the content instead.
|
|
96
|
-
|
|
97
|
-
A claim resting on a source carries a `cites` number, and the source goes in the lesson's one `refs` block rather than into the sentence. Draw every reference from what `canon teach resource --read` recorded, never from a lead, since a lead is a source nobody opened. Render refuses a cite no reference resolves, so number the list before citing into it.
|
|
98
|
-
|
|
99
93
|
## Teach back
|
|
100
94
|
|
|
101
95
|
A quiz is recognition and a teach-back is production, which is the form retrieval practice prefers. Carry both: the quiz places the learner against options someone could hold, and the teach-back is where the learner finds out what they cannot say without help.
|
|
@@ -131,53 +125,3 @@ Pick values the material needs rather than values the project happens to hold. I
|
|
|
131
125
|
- The lesson states what it assumes. A returning reader can tell in one line whether they are in the right place.
|
|
132
126
|
- The hard part is named as the hard part. Material that flattens everything to one difficulty gives a returning reader nothing to navigate by.
|
|
133
127
|
- Nothing depends on the session it was written in. A lesson referring to what was discussed is unreadable a week later.
|
|
134
|
-
|
|
135
|
-
## Building the lesson body
|
|
136
|
-
|
|
137
|
-
Step 4 of `teach-workspace` reads this section before writing a lesson, after the lesson verb has resolved its path and quiz order. Write the chrome as four empty marker pairs rather than composing it by hand: `<!-- canon:teach:style -->`/`<!-- /canon:teach:style -->` inside `<head>`, and `<!-- canon:teach:header -->`, `<!-- canon:teach:footnav -->`, and `<!-- canon:teach:scripts -->` each with its own close marker, in that order in `<body>`.
|
|
138
|
-
|
|
139
|
-
Build the authored `<h1>`, lede, body, and quiz as a JSON array of blocks rather than composing markup by hand, and render it through the verb rather than through a component import:
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
echo '[
|
|
143
|
-
{"type":"heading","level":1,"text":"<title>"},
|
|
144
|
-
{"type":"paragraph","lede":true,"text":"<the dek>"},
|
|
145
|
-
{"type":"paragraph","text":"<a body paragraph>"},
|
|
146
|
-
{"type":"paragraph","text":"<a claim resting on a source>","cites":[1]},
|
|
147
|
-
{"type":"list","ordered":true,"items":["<step one>","<step two>"]},
|
|
148
|
-
{"type":"raw","html":"<the quiz and teach-back block composed above>"},
|
|
149
|
-
{"type":"refs","items":[{"title":"<source name>","url":"<https URL>"}]}
|
|
150
|
-
]' | canon teach render --json
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
`## The block list` above states each type and where `raw` belongs. Take the call's `html` field and write it between the header's close marker and the footnav's open marker, and nothing else anywhere in the file.
|
|
154
|
-
|
|
155
|
-
Report it rather than proceeding silently when the verb does not resolve, which is an installed CLI predating it, and never compose the lesson body by hand as a fallback. That is the state this section exists to end, and a target holds this skill body before it holds the verb, since a plugin skill reaches a target the moment it merges while the CLI reaches one only when a release publishes.
|
|
156
|
-
|
|
157
|
-
Then run:
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
canon teach nav <topic> --json
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
It fills every marker pair from what the workspace holds on disk: the embedded stylesheet, the header with its breadcrumb and jump menus, the prev/next footer nav, and the behavior scripts, and it rewrites the workspace's contents page and the teach-root listing in the same run. It refuses a lesson missing one of the four marker pairs by name rather than guessing at the boundary, so a marker dropped while writing the lesson is caught here rather than read back later as a lesson nothing links to. Report it rather than proceeding silently when the verb does not resolve, which is an installed CLI predating it, and never compose the chrome by hand as a fallback.
|
|
164
|
-
|
|
165
|
-
Seed the stylesheet through the verb rather than authoring a palette, on the first lesson in a workspace:
|
|
166
|
-
|
|
167
|
-
```bash
|
|
168
|
-
canon teach stylesheet <topic> --json
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
It writes the design tokens as custom properties and the components built on them, from the one source every other rendered surface reads. Add lesson rules under the seed and reach a value through its property rather than restating the hex, which is what let each workspace fork the palette from every other. It refuses to overwrite, so running it again on a workspace that has grown its own rules is safe and reports `written` as false.
|
|
172
|
-
|
|
173
|
-
Report it rather than proceeding silently when the verb does not resolve, which is an installed CLI predating it. Do not fall back to writing a palette by hand.
|
|
174
|
-
|
|
175
|
-
Add every term the lesson defines to `GLOSSARY.md` through the verb, which places the entries alphabetically in the shape the standard fixes:
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
canon teach glossary <topic> --json \
|
|
179
|
-
--term "<term>=<definition, written without using the term>" \
|
|
180
|
-
--first-seen <the lesson or reference page this batch comes from>
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
`--term` repeats and one call writes the file once, which is what keeps a batch of terms from racing on it. A term already defined is refused, since a definition the subject has moved under is a revision of the entry rather than a second one.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Revisit schedule
|
|
3
|
+
description: How teach-workspace Step 5 writes a learning record's Revisit section, being the bullet shape, where each date and rung is copied from, the first schedule for a new item, and how a later record revises one
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Write the Revisit section
|
|
7
|
+
|
|
8
|
+
Part of Step 5 of `teach-workspace`. The session reads this file once the record's lessons, retrievals, and wrong answers are written, before restating the mission's success lines.
|
|
9
|
+
|
|
10
|
+
Then write `## Revisit`, one bullet per item, in the shape `${CLAUDE_SKILL_DIR}/../../standards/teach.md` fixes:
|
|
11
|
+
|
|
12
|
+
```markdown
|
|
13
|
+
## Revisit
|
|
14
|
+
|
|
15
|
+
- **<what comes back up>**: due <YYYY-MM-DD>, rung <n>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Take both the date and the rung from the `due` entry Step 1 already read, copying `hit` for an item the learner retrieved unaided and `miss` for one they did not, with the rung stepped the same way. Do not compute a date from the ladder. A session told to widen a gap still picks the number by judgment, which is the reason the verb reports both dates at all.
|
|
19
|
+
|
|
20
|
+
An item the records have never scheduled has no `due` entry to copy from. Open it at rung 1, dated the day after this session, which is the ladder's floor and the one number this body states. Every later date for it comes from the verb.
|
|
21
|
+
|
|
22
|
+
An entry outside this shape schedules nothing and nothing reports that it was skipped, so write the shape exactly. A later record naming the same item supersedes an earlier entry, so revise a schedule by writing the new bullet rather than editing the record it was set in.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: test-craft
|
|
3
3
|
description: Carries the rule that decides which layer a test belongs at, the question each one opens with, the end to end budget, and the final filter a session runs over what it wrote. Use when writing, changing, or judging a test, after implementing as well as before, when adding a regression guard, when choosing between unit, component, or end to end, or when asked "where should this test go", "is this a good test", "should this be an e2e test", or "why is our e2e suite so slow". Do NOT use for the red, green, refactor procedure, which is `test-first`, or for a bug nobody has explained yet, which is `systematic-debugging`.
|
|
4
|
+
metadata:
|
|
5
|
+
family: build
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Test craft
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: test-first
|
|
3
3
|
description: Write the failing test for a behavior before writing the code that satisfies it, confirm it fails for the right reason, implement the smallest change that turns it green, then refactor with the suite green. Auto-triggers before implementing a planned feature, adding a function or an endpoint, or extending existing behavior whose new shape is already decided. Do NOT use for a failure with no known cause, which is canon:systematic-debugging, or when the test for the behavior already exists and already passes.
|
|
4
|
+
metadata:
|
|
5
|
+
family: build
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Test first
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ui-checklist
|
|
3
3
|
description: Writes the visual checklist a reviewer reads beside the evidence screenshots, and names each changed behavior shipping with no test so `test-craft` can place one. Use after implementing UI changes, or when asked "what should I look at", "what do I verify", or "give me a visual checklist". Do NOT use in empty sessions with no implementation context, and do NOT use to write the tests themselves.
|
|
4
|
+
metadata:
|
|
5
|
+
family: build
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# UI checklist
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ux-audit
|
|
3
3
|
description: Audits the current UI for incomplete, inconsistent, or confusing patterns. Reads DESIGN.md and canon/wireframes/ for intent, scans UI files, and outputs observations grouped by surface. Use when asked "audit the UX", "audit the UI", "UX audit", or "find UI roughness". Do NOT use for new feature planning or code changes, and do NOT use to measure what a running interface costs to paint, which is `ux-measure`.
|
|
4
|
+
metadata:
|
|
5
|
+
family: check
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# UX audit
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ux-measure
|
|
3
3
|
description: Measures paint, processor, and layout cost against a running interface and reports numbers against published thresholds. Detects the project's existing browser harness rather than requiring one. Use when asked "how fast is this page", "measure the UI", "what does this cost to render", "check Core Web Vitals", or "profile the interface". Do NOT use to judge UI quality by reading source, which is `ux-audit`.
|
|
4
|
+
metadata:
|
|
5
|
+
family: check
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# UX measure
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ux-walkthrough
|
|
3
3
|
description: Runs an inspection walkthrough over a running app with the operator. Measures each finding off the built page, drafts arms as served HTML pages lifted from the app's own markup and stylesheet, hands over the localhost link before every pick question, records findings and picks with the arms they beat in one walkthrough file, and relays picks only in batches the operator calls. Use when asked to "run a first-use walkthrough", "do an operator walkthrough", "go through my findings one by one", "inspection walkthrough over the app", or "walk through everything I listed with me". Do NOT use for one decision on its own, which is `draft-and-pick`, to read source for roughness, which is `ux-audit`, or to build a pick, which is `plan-feature` and a worker.
|
|
4
|
+
metadata:
|
|
5
|
+
family: check
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# UX walkthrough
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: video-craft
|
|
3
3
|
description: Carries what makes a composed video of software read as designed rather than generic, being captions that name only what the frame shows, which moment earns a zoom and how fast it lands, how a real pointer behaves on a real interface, music or silence and how far under a voice the music sits, and reading a frame before dismissing a checker finding. Every number traces to a source. Use before composing or judging any video, whether a product demo, an explainer, a pull request walkthrough, or a launch clip, when a render reads generic or slow, or when asked "make this video look designed", "is this zoom too slow", "what should this caption say", "should this have music", or "the checker flagged a frame, is it real". Do NOT use for general motion such as easing, speed variety, and click timing, which HyperFrames' `hyperframes-animation` and `hyperframes-creative` carry, to fetch or generate a media file, which is `media-use`, or to record the take, which is `record-screencast`.
|
|
4
|
+
metadata:
|
|
5
|
+
family: build
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Video craft
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: write-human
|
|
3
3
|
description: Carries the voice, word choice, rhythm, sentence construction, and information density rules a banned-character scan cannot express, plus the catalog of machine tells that survive a clean ban scan. Use when writing or revising prose a person will read, when a passage reads flat or uniform, or when asked to "make this read like a person", "fix the cadence", "this reads like AI wrote it", "vary the sentences", or "tighten this without gutting it". Do NOT use for banned characters, which `markdown.md` states and `canon markdown audit` gates, and do NOT use to restate text that already exists in plainer words, which is `restate-plainly`, whose body loads these rules from here.
|
|
4
|
+
metadata:
|
|
5
|
+
family: answer
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Write human
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: youtube-transcripts
|
|
3
3
|
description: Fetches a YouTube video transcript with metadata frontmatter into the current repo via `canon transcripts`. Use when the user pastes a YouTube URL and asks to "grab the transcript", pull captions, or save a transcript for context. Do NOT use for downloading the video file, summarizing a transcript that already exists, or non-YouTube links.
|
|
4
|
+
metadata:
|
|
5
|
+
family: answer
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# YouTube transcripts
|
package/docs/agents/canvas.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Canvas
|
|
3
|
-
description: The canvas server, its content format, and the verbs that list, arrange, select, edit, and capture frames
|
|
3
|
+
description: The canvas server, its content format, and the verbs that list, arrange, select, edit, mark, and capture frames
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Canvas
|
|
@@ -11,7 +11,9 @@ description: The canvas server, its content format, and the verbs that list, arr
|
|
|
11
11
|
|
|
12
12
|
`canvas serve` serves the canvas on `127.0.0.1`, walks ports like `canon serve`, refuses a `Host` other than loopback on its own port, and runs until interrupted. Each frame gets the project's token stylesheet injected, being this toolkit's tokens in its own checkout, else `.claude/design/base.css` plus anything under `.claude/design/project/`, else none with a notice. An open canvas reloads a frame whose file changes.
|
|
13
13
|
|
|
14
|
-
The toolkit's own tokens arrive with the font faces they name embedded, so a frame renders in them on a machine that never installed them. An installed base
|
|
14
|
+
The toolkit's own tokens arrive with the font faces they name embedded, so a frame renders in them on a machine that never installed them. An installed base gets the same treatment: each vendored face its sheets name is embedded, unless a project rule declares that family itself.
|
|
15
|
+
|
|
16
|
+
A project's own `@font-face` rules under `.claude/design/project/` have each `url()` inlined as a `data:` URI. A rule whose file is missing, or whose path leads out of `.claude/design/project/` after links resolve, is dropped and the frame still renders. `canvas serve` warns once per dropped rule and names each under `tokens.dropped` in its `--json` record. The confinement check reads each `url()` after percent-decoding it. `canon design fonts add` writes those rules.
|
|
15
17
|
|
|
16
18
|
Before it binds a port, `canvas serve` checks that `preact` and `@preact/signals` resolve from the package the CLI runs from, never from the served project. When either is missing it refuses with reason `missing-client-deps` and names `bun install` in the detail, rather than serving a shell that loads as a blank page.
|
|
17
19
|
|
|
@@ -25,28 +27,42 @@ The write routes the shell posts to also refuse a request carrying an `Origin` o
|
|
|
25
27
|
|
|
26
28
|
`frame move <page> <name> --x <px> --y <px>` rewrites one frame's position in `layout.json` and keeps its size. An omitted axis stays where the frame is. It refuses a frame or page that does not exist and a layout that does not parse.
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
`frame resize <page> <name> --width <px> --height <px>` rewrites one frame's whole box in one write, and `--x` and `--y` move it at the same time. An omitted flag keeps the frame's current value. It refuses a width or height that is not a positive number as `invalid-size`, a position that is not a number as `invalid-position`, and a missing frame, a missing page, or a layout that does not parse as `frame move` does.
|
|
31
|
+
|
|
32
|
+
The shell writes through the same writer when the operator drags a frame or one of its corner handles. Both take a lock file beside the layout, read it, merge their change, and replace it, so a drag released while a verb writes loses neither position. A writer that cannot get the lock within two seconds refuses with reason `busy`.
|
|
29
33
|
|
|
30
34
|
`canvas selection --json` emits `{ ok, selection }` with the page, frame, file, box, and path of the frame the operator selected, or `selection: null` when nothing is selected or the selected frame has since been removed. Read it when the operator says "this one".
|
|
31
35
|
|
|
32
36
|
The operator can also pick one element inside a frame, by clicking it on the surface or in the frame's layers tree. The selection then carries `element`, recording the `index` in document order, `tag`, `classes`, and `text` excerpt as they were at the pick. An edit to the frame since can shift that index onto another element, so `stale` turns true once the file's content no longer matches what the pick was made against. Check it before acting on the index.
|
|
33
37
|
|
|
34
|
-
A pick is refused as `address-mismatch` when the browser builds elements the file never states, such as a `tbody` a table leaves out or the
|
|
38
|
+
A pick is refused as `address-mismatch` when the browser builds elements the file never states, such as a `tbody` a table leaves out or a `body` after a `head` the file states. A fragment is picked like a whole document, since the server writes the missing `html`, `head`, and `body` into the served frame and the shell leaves them out of its count. The shell sends its own element count beside the index, so a frame the two sides count differently is reported rather than recorded against the wrong element. A pick is refused as `stale-address` when the frame file changed between the frame being served and the pick arriving, since every served frame carries the hash of its file and the shell sends that hash back.
|
|
35
39
|
|
|
36
40
|
## Edit
|
|
37
41
|
|
|
38
|
-
`canvas edit <page>/<frame> --element <index> --set <property>=<value>` sets one property of the element at that index, the same index `canvas selection` reports. The properties are `text`, `color`, `background-color`, `font-size`, `font-weight`, `width`, `height`, `padding`, `gap`,
|
|
42
|
+
`canvas edit <page>/<frame> --element <index> --set <property>=<value>` sets one property of the element at that index, the same index `canvas selection` reports. The properties are `text`, `color`, `background-color`, `font-size`, `font-weight`, `width`, `height`, `padding`, `gap`, `display`, `flex-direction`, `justify-content`, `align-items`, `flex-wrap`, `opacity`, `border-radius`, `border-top-left-radius`, `border-top-right-radius`, `border-bottom-right-radius`, and `border-bottom-left-radius`. A style property is written into the element's inline `style`, replacing that property and leaving the others as they were, and an empty value drops it. Writing `border-radius` or `padding` also drops that shorthand's longhands from the same `style`, so no corner or side left over overrides the new value. Writing a longhand leaves its shorthand in place, since the longhand comes later and wins.
|
|
39
43
|
|
|
40
44
|
`text` replaces the text of an element holding text alone and refuses one holding other elements as `not-text-only`. Every byte outside the element stays as it was. `--json` emits the page, frame, file, path, and the file's new `hash`.
|
|
41
45
|
|
|
42
|
-
The operator edits the same set from the inspector, which posts to the same writer with the hash the frame was served with. An edit made against a version of the file Claude has since rewritten is refused as `stale-address` and the shell reloads the frame, so nothing lands on a shifted element. Both writers take the frame file's lock, and an edit that keeps the selected element where it was keeps the selection fresh.
|
|
46
|
+
The operator edits the same set from the inspector, which posts to the same writer with the hash the frame was served with. Dragging a selected element's corner handle writes `width` and then `height` in pixels through that writer, the second edit carrying the hash the first answered. An edit made against a version of the file Claude has since rewritten is refused as `stale-address` and the shell reloads the frame, so nothing lands on a shifted element. Both writers take the frame file's lock, and an edit that keeps the selected element where it was keeps the selection fresh.
|
|
43
47
|
|
|
44
|
-
|
|
48
|
+
Size, padding, opacity, and radius show in the inspector for every element. The flex fields show only on a flex container, a grid container gets none, and the inspector sets `display` only to `flex`, so any other `display` change goes through the verb.
|
|
49
|
+
|
|
50
|
+
A color picked from the project's tokens is written as `var(--<name>)`, and below full opacity as a `color-mix()` of that `var()` with `transparent` at the opacity percent, so it keeps following the theme. A browser older than 2023 drops a `color-mix()` value, which leaves the property unset there. A hex is written as six digits, or eight below full opacity. The inspector's full color picker writes a hex for any color it sets, so the field marks the value raw, and only its alpha keeps a token through the `color-mix()` form.
|
|
45
51
|
|
|
46
52
|
Inline style beats a class, so an operator's edit masks a class change Claude makes later. Read a frame's inline styles before restyling it, and remove one the change should replace. The inspector marks a color or background set inline with the word `raw` when its value names no `var()` and is not `currentColor` or a CSS-wide keyword, since that value stays fixed when the theme changes. A property outside the set, or a value carrying `;`, `{`, `}`, `<`, `>`, or a line break, is refused as `invalid-edit`.
|
|
47
53
|
|
|
48
54
|
The Theme tab in the shell lists what the token stylesheet defines, grouped as color, spacing, radius, font family, font size, and other. The page record at `/api/pages` carries the same list as `tokens.groups`.
|
|
49
55
|
|
|
56
|
+
## Mark a frame being edited
|
|
57
|
+
|
|
58
|
+
`canvas editing <page>/<frame>` marks a frame as being edited, so an open canvas can show who is working on it before the write lands. Run it before writing a frame and again with `--done` once the edits are written. A bare `canvas editing` lists the live marks, and `--json` emits `{ ok, editing }` after each of the three, with each mark carrying `page`, `frame`, `by`, `since`, and `until`.
|
|
59
|
+
|
|
60
|
+
The label is `--by <name>` when given. Without it, the verb reads the caller's name off the session roster, and falls back to `a session` when the environment names no session or the roster holds none matching it.
|
|
61
|
+
|
|
62
|
+
The marks live in `.canon/canvas/editing.json`, keyed by `<page>/<frame>`. Each write takes the record's lock and merges its one key, so two sessions marking two frames both keep their marks. A mark lapses five minutes after it was written, and marking the frame again renews it, so a session that never clears its mark misleads the operator for five minutes at most. A read leaves out a lapsed mark and a mark on a frame since removed, and a record that does not parse reads as holding none and is replaced by the next mark.
|
|
63
|
+
|
|
64
|
+
A mark refuses `no-page` or `no-frame` for a target not on disk, and `invalid-name` for a target that is not `<page>/<frame>` or for `--done` with no target. `--done` on a frame holding no mark succeeds and writes nothing. The mark gates no write, so an inspector edit to a marked frame still lands, and the hash check still refuses one made against a file the session rewrote. The page record at `/api/pages` carries the live marks as `editing`, each with `page`, `frame`, `by`, and `until`.
|
|
65
|
+
|
|
50
66
|
## Capture
|
|
51
67
|
|
|
52
68
|
`canvas capture <page>/<frame>` renders one frame as a PNG, and `canvas capture <page>` renders every frame on the page. Each goes through a server started for the call, so the injected tokens are in the image, and renders at the frame's own width from the layout, so a media query resolves there. It never captures the file on disk.
|
package/docs/agents/capture.md
CHANGED
|
@@ -5,11 +5,11 @@ description: Rendering HTML sources to PNG, what the command asserts about fonts
|
|
|
5
5
|
|
|
6
6
|
# Capture
|
|
7
7
|
|
|
8
|
-
`canon capture [source] --selector <sel>` renders HTML sources to PNG, which is how a generated documentation image is rebuilt from the markup it was generated out of. The source defaults to `assets/`, where a directory expands to every `.html` directly inside it, so adding a capture means dropping a file beside the first one and running the same command. That default is a generic starting point rather than a convention every target shares, and it stays because a missing folder still refuses loud, naming the argument, rather than failing silently. This repository no longer takes it: its own sources moved to `assets/captures/` and its images moved to `assets/
|
|
8
|
+
`canon capture [source] --selector <sel>` renders HTML sources to PNG, which is how a generated documentation image is rebuilt from the markup it was generated out of. The source defaults to `assets/`, where a directory expands to every `.html` directly inside it, so adding a capture means dropping a file beside the first one and running the same command. That default is a generic starting point rather than a convention every target shares, and it stays because a missing folder still refuses loud, naming the argument, rather than failing silently. This repository no longer takes it: its own sources moved to `assets/captures/` and its images moved to `assets/frames/`, so a run here names the source explicitly and sends the output where that run wants it, `--out assets/frames` to rebuild the committed images and somewhere disposable to preview them.
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
11
|
canon capture --selector .window
|
|
12
|
-
canon capture assets/captures/install.html --selector .window --out assets/
|
|
12
|
+
canon capture assets/captures/install.html --selector .window --out assets/frames
|
|
13
13
|
canon capture assets/captures --selector .window --out .canon/review/captures
|
|
14
14
|
canon capture https://example.com --selector .window --out preview.png
|
|
15
15
|
```
|
|
@@ -18,9 +18,9 @@ canon capture https://example.com --selector .window --out preview.png
|
|
|
18
18
|
|
|
19
19
|
## What this repository captures
|
|
20
20
|
|
|
21
|
-
A capture set here spans two folders. `assets/captures/` holds three sources and the two templates they are written from, and `assets/
|
|
21
|
+
A capture set here spans two folders. `assets/captures/` holds three sources and the two templates they are written from, and `assets/frames/` holds their images and the built-page capture a document points at with the stamp answering for each, outside the `evidence` segment `canon pr evidence` compares. The folder name is this repository's own layout, and a target picks its own `--out`. One run over the source folder rebuilds every image, and it takes `--out assets/frames` to put each PNG where its document points rather than beside the markup it rendered. None of the sources is edited by hand. `scripts/core/regen-hero.ts` writes each `.html` from the template beside it, filling one shared value map into all of them. A branch commits none of them for a moved count or token, since the refresh workflow regenerates them from `main` and opens one pull request, and `bun run check` runs the script with `--check`, which fills every template into a temp folder and fails when the regeneration cannot run.
|
|
22
22
|
|
|
23
|
-
The `hero` template takes catalog data, so a stack gaining a rule moves the frame on the next run. `install.html` is the exception, since it holds terminal text from a real run in its template rather than derived from a live catalog at build time. `assets/
|
|
23
|
+
The `hero` template takes catalog data, so a stack gaining a rule moves the frame on the next run. `install.html` is the exception, since it holds terminal text from a real run in its template rather than derived from a live catalog at build time. `assets/frames/arrival.png` is the one image with no source here: it is the built page's `.fold` element captured in dark mode against a local `web/` preview, since `canon capture` takes no color scheme and the page follows the browser's default of light, so it is retaken by hand when the page's first screen changes.
|
|
24
24
|
|
|
25
25
|
The README shows each still in two themes through `<picture>`, so a frame is a pair named `<name>` and `<name>-light`. `install` takes the light half from its template, which `regen-hero.ts` fills a second time with the plain color roles pointed at the light ones, and each half is its own capture set with its own stamp. `arrival-light.png` is the same `.fold` capture of the same address taken without forcing dark, so it is retaken by hand alongside `arrival.png`, and nothing catches one drifting from the other.
|
|
26
26
|
|
|
@@ -28,7 +28,7 @@ A stamp for a URL source digests the address string rather than the page it serv
|
|
|
28
28
|
|
|
29
29
|
`assets/captures/` is read flat and never descends, by the regeneration script and by this command alike. A source nested a further folder down is skipped by both with nothing reported, so a new frame is a template dropped directly in rather than a folder of its own. The split is what retired the name prefix the flat layout used to need: a frame is named for itself now, since `assets/captures/` no longer mixes markup in with the images.
|
|
30
30
|
|
|
31
|
-
A branch is not asked whether the HTML is current. The PNG is a chromium render whose bytes move with the browser version, so the refresh workflow rebuilds it with `canon capture assets/captures --selector .window --out assets/
|
|
31
|
+
A branch is not asked whether the HTML is current. The PNG is a chromium render whose bytes move with the browser version, so the refresh workflow rebuilds it with `canon capture assets/captures --selector .window --out assets/frames` only when the regenerated HTML changed.
|
|
32
32
|
|
|
33
33
|
Every render writes a stamp beside its PNG, `hero.png` next to `hero.stamp`, holding the source filename, a `source-sha256` over the markup bytes it read, and an `image-sha256` over the image bytes it wrote. Both digests are what `bun run check` compares, so a markup edit committed without a capture and a PNG swapped under unchanged markup each fail. The stamp is tracked and commits alongside the pair. A capture that cannot write it reports that source as failed and exits 1, so an image whose stamp never landed is reported rather than passed over.
|
|
34
34
|
|
package/docs/agents/commands.md
CHANGED
|
@@ -91,12 +91,12 @@ Each domain exposes a consistent shape where applicable: `list`, `install`, `syn
|
|
|
91
91
|
- `wiki`, in `scripting.md`: `init`
|
|
92
92
|
- `indexes`, in `indexes.md`: `regen`, `list`
|
|
93
93
|
- `docs`, in `docs.md`: `list`, `<topic>`
|
|
94
|
-
- `design`, in `install-and-sync.md` for `install` and `
|
|
94
|
+
- `design`, in `install-and-sync.md` for `install`, `sync`, and `fonts`, and below for the rest: `render`, `regen`, `css`, `install`, `sync`, `fonts`
|
|
95
95
|
- `slides`, described below: `render`, `list`
|
|
96
96
|
- `demo`, in `demo.md`: `compile`, `run`, `frames`
|
|
97
97
|
- `inventory`, described above: `run`
|
|
98
98
|
- `teach`, in `teach.md`: `list`, `open`, `resource`, `glossary`, `lesson`, `stylesheet`, `nav`, `render`
|
|
99
|
-
- `canvas`, described below: `serve`, `list`, `page add`, `page rename`, `frame add`, `frame move`, `selection`, `edit`, `capture`
|
|
99
|
+
- `canvas`, described below: `serve`, `list`, `page add`, `page rename`, `frame add`, `frame move`, `frame resize`, `selection`, `edit`, `editing`, `capture`
|
|
100
100
|
- `sandbox`, in `sandbox.md`: `reset`, `clean`, `check`, `coverage`
|
|
101
101
|
- `tasks`, in `tasks.md`: `next-label`, `archive`, `decline`, `plan-citations`, `plan-answers`, `plan-branch`, `plan-reach`, `plan-link`, `pull-request`, `outcome`, `list`, `validate`
|
|
102
102
|
- `intake`, in `intake.md`: `list`, `answer`
|
package/docs/agents/index.md
CHANGED
|
@@ -10,7 +10,7 @@ CLI catalog and invocation rules for agents, split by command domain. Start with
|
|
|
10
10
|
|
|
11
11
|
- [Architecture record](architecture-record.md): The findings canon context audit reads off the architecture record, being the entry cap, revisit sentence, length, decision word, and risk bullet gates the record states for itself, the claim coverage report, and the word counts, plus the requirements record's word cap
|
|
12
12
|
- [Audits](audits.md): Running every health check as one set, what the single verdict means, the exit code each outcome takes, the retained baseline and the delta it reports, and which corpora are kept out of the record
|
|
13
|
-
- [Canvas](canvas.md): The canvas server, its content format, and the verbs that list, arrange, select, edit, and capture frames
|
|
13
|
+
- [Canvas](canvas.md): The canvas server, its content format, and the verbs that list, arrange, select, edit, mark, and capture frames
|
|
14
14
|
- [Capture](capture.md): Rendering HTML sources to PNG, what the command asserts about fonts, and why the selector has no default
|
|
15
15
|
- [Census](census.md): Tracked-plus-untracked file count, a breakdown by extension, and a line total that skips whatever reads as binary
|
|
16
16
|
- [Command catalog](commands.md): Every top-level command with its purpose, each domain's subcommands and the page describing them, the browser commands, and the version skew report
|
|
@@ -37,8 +37,8 @@ CLI catalog and invocation rules for agents, split by command domain. Start with
|
|
|
37
37
|
- [Overview](overview.md): What this folder covers, the invocation rules every command inherits, and where domain behavior is documented instead
|
|
38
38
|
- [The pull request evidence comparison](pr-evidence.md): What canon pr evidence compares, the marker that lets it edit its own comment rather than duplicate it, the refusal reasons it names, what the --check read reports as owed, and why the comparison anchors at the merge base rather than the previous push
|
|
39
39
|
- [The pull request frame store](pr-frames.md): How canon pr frames pushes a UI review frame to a never-merged branch through the GitHub API and returns a branch-path link, which ref it writes, the pass segment that keeps an earlier image fixed, the refusal reasons it names, and how --drop and --prune rewrite the branch so a dropped frame leaves history
|
|
40
|
-
- [The pull request local preview](pr-local.md): How canon pr local finds the server a worktree is running, why a server in another worktree is never reported, the refusal reasons it names, and how a close workflow
|
|
41
|
-
- [The pull request preview deploy](pr-preview.md): How canon pr preview finds a fenced Cloudflare Pages deploy, dispatches it on a pull request's branch, reads the alias the run prints, the refusal reasons it names, and why an unfenced deploy is refused before anything runs
|
|
40
|
+
- [The pull request local preview](pr-local.md): How canon pr local finds the server a worktree is running, why a server in another worktree is never reported, the refusal reasons it names, and how a close workflow drops the address line with --remove
|
|
41
|
+
- [The pull request preview deploy](pr-preview.md): How canon pr preview finds a fenced Cloudflare Pages deploy, refuses a branch its push filter does not serve, dispatches it on a pull request's branch, reads the alias the run prints, the refusal reasons it names, and why an unfenced deploy is refused before anything runs
|
|
42
42
|
- [Head-sensitive pull request reads](pr-reads.md): Resolving a branch tip from the remote rather than from the pull request object, reading what a review pass covered off its own marker rather than off GitHub's submission stamps, why an empty run list is not a pass, the refusal reasons each verb names, and what the remote read costs
|
|
43
43
|
- [Records push](records-push.md): Backing the record folders to a private remote and restoring them, which folders the payload carries, the one-time setup, the refusal reasons, and the hook that runs the push
|
|
44
44
|
- [Records stale](records-stale.md): Reading the memory pen as a review queue, what makes an entry due, how a cited path is read and resolved, the order entries come back in, counting the releases since the requirements and architecture records were last reviewed, and the exit codes and refusals
|
|
@@ -57,6 +57,13 @@ touches, because that subfolder is project-authored by location the way
|
|
|
57
57
|
`.claude/rules/project/` is. An override named exactly like the shipped file is
|
|
58
58
|
still the project's.
|
|
59
59
|
|
|
60
|
+
A project's faces sit in that subfolder too, under `fonts/` with plain
|
|
61
|
+
`@font-face` rules in `fonts.css`. `canon design fonts add <file> --family <name>`
|
|
62
|
+
copies a `woff2`, `woff`, `ttf`, or `otf` face in and appends its rule
|
|
63
|
+
(`--weight`, `--style`, `--json`), refusing bytes that disagree with the
|
|
64
|
+
extension as `invalid-font`. `fonts list --json` emits one row per rule, with a
|
|
65
|
+
`problem` where the file is missing or lies outside the subfolder.
|
|
66
|
+
|
|
60
67
|
The override ships absent rather than empty. An empty file is one the project
|
|
61
68
|
did not ask for and did not write, the reconciliation already handles a missing
|
|
62
69
|
side, and an empty override invites a target to fill it before it has an
|
|
@@ -113,4 +113,4 @@ One class stays open and is named rather than closed. A bullet can cite where so
|
|
|
113
113
|
|
|
114
114
|
## Where it runs
|
|
115
115
|
|
|
116
|
-
`review-pr` Step 3 calls it and files an `unmet` path as a `should-fix` finding under the `**PR body**` block the stale ticked box already takes, since what both corrupt is the merge record rather than a file in the diff. A body is edited between pushes, so a finding names the head the comparison ran at. `unnamed` is read there and raised off no count, since the step's own history is a question sent over bullets that already answered it. `unresolved` and `incidental` are reported nowhere.
|
|
116
|
+
`review-pr` Step 3 calls it through its `references/key-changes.md` and files an `unmet` path as a `should-fix` finding under the `**PR body**` block the stale ticked box already takes, since what both corrupt is the merge record rather than a file in the diff. A body is edited between pushes, so a finding names the head the comparison ran at. `unnamed` is read there and raised off no count, since the step's own history is a question sent over bullets that already answered it. `unresolved` and `incidental` are reported nowhere.
|
|
@@ -70,8 +70,8 @@ shows a reviewer, each field present only when that comment holds it:
|
|
|
70
70
|
|
|
71
71
|
| Field | What it carries |
|
|
72
72
|
| ----------- | ----------------------------------------------------------------- |
|
|
73
|
-
| `preview` | The hosted `**Preview:**` address the comment
|
|
74
|
-
| `local` | The `**Local preview:**` address
|
|
73
|
+
| `preview` | The hosted `**Preview:**` address on the comment's address line. |
|
|
74
|
+
| `local` | The `**Local preview:**` address beside it. |
|
|
75
75
|
| `checklist` | The checklist between its delimiters, with any ticked boxes kept. |
|
|
76
76
|
|
|
77
77
|
These come from the comment already posted, never from the flags the call
|
|
@@ -142,11 +142,34 @@ details wrapper lands once, not twice.
|
|
|
142
142
|
|
|
143
143
|
## The preview line
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
Every body opens with `## Evidence`. Under it sits one address line carrying
|
|
146
|
+
whichever previews apply, joined by a middle dot:
|
|
147
|
+
|
|
148
|
+
```plaintext
|
|
149
|
+
## Evidence
|
|
150
|
+
|
|
151
|
+
**Preview:** <url> · **Local preview:** <url>
|
|
152
|
+
|
|
153
|
+
**Base:** `<base>` · **Head:** `<head>`
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
The Base and Head line follows only when the comment carries screenshots.
|
|
157
|
+
|
|
158
|
+
`--preview <url>` puts the branch's hosted address on that line, and a run
|
|
146
159
|
without it carries forward the address the marked comment already holds. With
|
|
147
|
-
no evidence in the diff and an address in hand, the body is the
|
|
148
|
-
marker alone, reported as `ok`. `canon docs pr-preview`
|
|
149
|
-
address comes from.
|
|
160
|
+
no evidence in the diff and an address in hand, the body is the heading, the
|
|
161
|
+
address line, and the marker alone, reported as `ok`. `canon docs pr-preview`
|
|
162
|
+
covers where the address comes from.
|
|
163
|
+
|
|
164
|
+
A carried hosted address is dropped when a deploy workflow resolves and its
|
|
165
|
+
push path filter matches no path the pull request changed, since the site it
|
|
166
|
+
links shows none of the change. An explicit `--preview` is always kept.
|
|
167
|
+
|
|
168
|
+
The carry-forward reads every line above the commit line, the checklist, and
|
|
169
|
+
the comparison for each prefix, wherever it sits. A comment posted before the
|
|
170
|
+
heading opened the body, with each address on a line of its own at the top,
|
|
171
|
+
reads the same way, so an open pull request keeps its links on its first
|
|
172
|
+
re-render.
|
|
150
173
|
|
|
151
174
|
## The checklist line
|
|
152
175
|
|
|
@@ -173,11 +196,10 @@ gone.
|
|
|
173
196
|
|
|
174
197
|
## The local preview line
|
|
175
198
|
|
|
176
|
-
`--local <url>` adds `**Local preview:** <url>` to the
|
|
177
|
-
hosted
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
the local address the marked comment already holds, the same as the other two.
|
|
199
|
+
`--local <url>` adds `**Local preview:** <url>` to the address line, after the
|
|
200
|
+
hosted segment when there is one and alone when there is not. A run without the
|
|
201
|
+
option carries forward the local address the marked comment already holds, the
|
|
202
|
+
same as the other two.
|
|
181
203
|
|
|
182
204
|
The option does not turn `no-evidence` into `ok` on its own. A branch with a
|
|
183
205
|
dev server running and no rendered change would otherwise get a comment holding
|
|
@@ -206,10 +228,11 @@ canon pr evidence 1341 --check --json
|
|
|
206
228
|
- `evidence` is owed when the changed set carries an evidence image and no
|
|
207
229
|
comment carries the marker.
|
|
208
230
|
- `preview` is owed when the pull request has a marked comment or an evidence
|
|
209
|
-
change, a deploy workflow resolves in the checkout the verb runs from,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
never owed a preview
|
|
231
|
+
change, a deploy workflow resolves in the checkout the verb runs from, its
|
|
232
|
+
push path filter matches a path the pull request changed, and the marked
|
|
233
|
+
comment carries no `**Preview:**` address. A `**Local preview:**` address
|
|
234
|
+
does not satisfy it. A project deploying nothing is never owed a preview,
|
|
235
|
+
and neither is a branch its deploy does not build from.
|
|
213
236
|
|
|
214
237
|
The record carries `owed`, `commentId` when a marked comment exists, and the
|
|
215
238
|
same `preview`, `local`, and `checklist` fields the other reasons carry, so a
|
package/docs/agents/pr-local.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: The pull request local preview
|
|
3
|
-
description: How canon pr local finds the server a worktree is running, why a server in another worktree is never reported, the refusal reasons it names, and how a close workflow
|
|
3
|
+
description: How canon pr local finds the server a worktree is running, why a server in another worktree is never reported, the refusal reasons it names, and how a close workflow drops the address line with --remove
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# The pull request local preview
|
|
@@ -10,7 +10,7 @@ worktree is running. `git-pr` calls it ahead of the evidence comparison and
|
|
|
10
10
|
passes the address through `canon pr evidence --local`, so a reviewer on the
|
|
11
11
|
same machine gets the running branch to click into beside the screenshots and
|
|
12
12
|
the checklist. A workflow on the pull request's `closed` event calls it again
|
|
13
|
-
with `--remove`, which
|
|
13
|
+
with `--remove`, which drops the address line and leaves nothing in its place.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
canon pr local --json
|
|
@@ -62,9 +62,9 @@ to it on this pull request would show a reviewer the wrong code.
|
|
|
62
62
|
| `ok` | A server answered. `url` carries the address and `port` the port. |
|
|
63
63
|
| `no-server` | Nothing inside this worktree served an HTML page. |
|
|
64
64
|
| `no-listener-reader` | Neither `lsof` nor `/proc` is available, so no socket could be read. |
|
|
65
|
-
| `removed` | `--remove`
|
|
65
|
+
| `removed` | `--remove` dropped the address line from the evidence comment. |
|
|
66
66
|
| `no-comment` | `--remove` found no comment carrying the evidence marker. |
|
|
67
|
-
| `no-line` | `--remove` found the comment but no
|
|
67
|
+
| `no-line` | `--remove` found the comment but no address line on it. |
|
|
68
68
|
| `gh-missing` | `--remove` needs `gh` and it is not on the path. |
|
|
69
69
|
| `gh-failed` | `--remove` could not read the comments or could not edit the comment. |
|
|
70
70
|
|
|
@@ -84,12 +84,19 @@ on:
|
|
|
84
84
|
types: [closed]
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
It reads the comment carrying the `pr-evidence` marker,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
It reads the comment carrying the `pr-evidence` marker, drops the address line
|
|
88
|
+
under `## Evidence`, the hosted `**Preview:**` segment and the
|
|
89
|
+
`**Local preview:**` segment together, and edits the comment itself through
|
|
90
|
+
`gh api`. The hosted link goes too because the deploy workflow deletes the
|
|
91
|
+
branch's preview deployments on the same close. No note replaces the line, and
|
|
92
|
+
the blank line it sat on goes with it so no gap doubles under the heading. A
|
|
93
|
+
comment in the older layout, with each address on its own line at the top,
|
|
94
|
+
loses both lines the same way.
|
|
95
|
+
|
|
96
|
+
The verb writes here rather than handing a body back, because its caller is a
|
|
97
|
+
workflow with no session to post one. Every other byte of the comment stays as
|
|
98
|
+
it was, which keeps the marker, the checklist delimiters, and any ticked box
|
|
99
|
+
intact. A second run finds no line and reports `no-line`.
|
|
93
100
|
|
|
94
101
|
A fork pull request gets a read-only token, so the workflow skips the edit with
|
|
95
102
|
a notice rather than failing the close.
|
|
@@ -100,6 +107,5 @@ The link can still go dead while the pull request is open, such as when the
|
|
|
100
107
|
session holding the server retires. Only the close is covered, and a re-render
|
|
101
108
|
after a push carries the line forward whether the server still answers or not.
|
|
102
109
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
pr-preview` covers that path.
|
|
110
|
+
`canon docs pr-preview` covers how the hosted address is minted and when it is
|
|
111
|
+
refused.
|