@erclx/canon 5.52.0 → 5.54.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/CHANGELOG.md +17 -0
- package/README.md +11 -13
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/canon-cli/SKILL.md +5 -8
- package/claude/skills/context-fold/REQUIREMENT.md +0 -1
- package/claude/skills/design-identity/REQUIREMENT.md +2 -2
- package/claude/skills/design-identity/SKILL.md +6 -6
- package/claude/skills/design-record/REQUIREMENT.md +2 -2
- package/claude/skills/design-record/SKILL.md +4 -4
- package/claude/skills/design-record/references/folder.md +1 -1
- package/claude/skills/design-taste/REQUIREMENT.md +1 -1
- package/claude/skills/design-taste/references/kinds.md +0 -1
- package/claude/skills/draw-figure/REQUIREMENT.md +3 -4
- package/claude/skills/draw-figure/SKILL.md +5 -6
- package/claude/skills/draw-figure/references/figures.md +0 -1
- package/claude/skills/draw-figure/references/hand-drawn.md +1 -1
- package/claude/skills/pick-by-eye/REQUIREMENT.md +4 -5
- package/claude/skills/pick-by-eye/SKILL.md +34 -41
- package/claude/skills/pick-by-eye/references/board.md +42 -0
- package/claude/skills/pick-by-eye/references/live-arms.md +3 -3
- package/claude/skills/plan-groundwork/SKILL.md +1 -1
- package/claude/skills/teach-craft/REQUIREMENT.md +30 -0
- package/claude/skills/teach-craft/SKILL.md +70 -0
- package/claude/skills/teach-craft/references/adopted.md +113 -0
- package/claude/skills/teach-craft/references/lesson-craft.md +60 -0
- package/claude/skills/{teach-workspace → teach-craft}/references/pedagogy.md +41 -6
- package/docs/agents/audits.md +0 -1
- package/docs/agents/install-and-sync.md +0 -8
- package/docs/target/migrations.md +16 -2
- package/docs/target/projects.md +1 -1
- package/docs/workflow/parallel-features.md +1 -1
- package/docs/workflow/skill-map-on-request.md +10 -22
- package/docs/workflow/skill-map.md +11 -14
- package/docs/workflow/visual-design-workflow.md +1 -4
- package/governance/detect.toml +1 -6
- package/governance/renames.toml +0 -1
- package/package.json +2 -8
- package/scripts/core/regen-web-previews.ts +2 -67
- package/src/audits/catalog.ts +0 -1
- package/src/browser/engine.ts +3 -6
- package/src/capture/render.ts +1 -1
- package/src/claude/cases/authoring.ts +0 -12
- package/src/claude/cases/misc.ts +0 -22
- package/src/claude/cases/workflow.ts +2 -38
- package/src/claude/skills-audit.ts +1 -1
- package/src/cli/help.ts +0 -10
- package/src/cli.ts +0 -8
- package/src/commands/design.ts +16 -315
- package/src/commands/records.ts +0 -1
- package/src/commands/serve.ts +2 -2
- package/src/commands/sync.ts +4 -5
- package/src/design/components.ts +8 -1514
- package/src/design/css.ts +5 -6
- package/src/design/fonts.ts +3 -5
- package/src/design/regen.ts +5 -32
- package/src/design/render.ts +1 -1
- package/src/design/tokens.ts +3 -2
- package/src/driver/drive.ts +3 -4
- package/src/driver/steps.ts +2 -5
- package/src/gate/stages.ts +4 -10
- package/src/gov/audit.ts +1 -6
- package/src/inventory/walk.ts +1 -1
- package/src/markdown/scope.ts +6 -35
- package/src/records/validate.ts +4 -176
- package/src/sandbox/equivalence.ts +0 -5
- package/src/shipped/references.ts +1 -2
- package/src/sync/check.ts +4 -29
- package/src/sync/stamp.ts +6 -6
- package/src/sync/target.ts +1 -4
- package/tooling/claude/reference.md +1 -1
- package/tooling/claude/seeds/canon/DESIGN.md +1 -1
- package/claude/skills/canvas-board/REQUIREMENT.md +0 -35
- package/claude/skills/canvas-board/SKILL.md +0 -143
- package/claude/skills/canvas-board/references/canvas.md +0 -170
- package/claude/skills/draft-and-pick/REQUIREMENT.md +0 -26
- package/claude/skills/draft-and-pick/SKILL.md +0 -11
- package/claude/skills/draft-doc/REQUIREMENT.md +0 -26
- package/claude/skills/draft-doc/SKILL.md +0 -11
- package/claude/skills/draft-figure/REQUIREMENT.md +0 -26
- package/claude/skills/draft-figure/SKILL.md +0 -11
- package/claude/skills/draft-identity/REQUIREMENT.md +0 -26
- package/claude/skills/draft-identity/SKILL.md +0 -11
- package/claude/skills/draft-ready/REQUIREMENT.md +0 -26
- package/claude/skills/draft-ready/SKILL.md +0 -11
- package/claude/skills/draft-screencast/REQUIREMENT.md +0 -26
- package/claude/skills/draft-screencast/SKILL.md +0 -11
- package/claude/skills/draft-slides/REQUIREMENT.md +0 -26
- package/claude/skills/draft-slides/SKILL.md +0 -11
- package/claude/skills/make-deck/REQUIREMENT.md +0 -36
- package/claude/skills/make-deck/SKILL.md +0 -80
- package/claude/skills/make-deck/references/deck.md +0 -183
- package/claude/skills/read-frames/REQUIREMENT.md +0 -30
- package/claude/skills/read-frames/SKILL.md +0 -55
- package/claude/skills/record-screencast/REQUIREMENT.md +0 -35
- package/claude/skills/record-screencast/SKILL.md +0 -99
- package/claude/skills/script-screencast/REQUIREMENT.md +0 -34
- package/claude/skills/script-screencast/SKILL.md +0 -70
- package/claude/skills/script-screencast/references/beats-template.md +0 -119
- package/claude/skills/teach-workspace/REQUIREMENT.md +0 -34
- package/claude/skills/teach-workspace/SKILL.md +0 -196
- package/claude/skills/teach-workspace/references/glossary.md +0 -90
- package/claude/skills/teach-workspace/references/lesson-build.md +0 -106
- package/claude/skills/teach-workspace/references/lesson-craft.md +0 -135
- package/claude/skills/teach-workspace/references/promotion-fold.md +0 -35
- package/claude/skills/teach-workspace/references/promotion.md +0 -116
- package/claude/skills/teach-workspace/references/revisit.md +0 -28
- package/claude/skills/teach-workspace/references/teach.md +0 -211
- package/claude/skills/video-craft/REQUIREMENT.md +0 -35
- package/claude/skills/video-craft/SKILL.md +0 -96
- package/claude/skills/video-craft/references/adopted.md +0 -110
- package/governance/rules/ui/canvas.md +0 -13
- package/src/canvas/address.ts +0 -227
- package/src/canvas/arrange.ts +0 -66
- package/src/canvas/capture.ts +0 -391
- package/src/canvas/client/app.tsx +0 -188
- package/src/canvas/client/inspector/align-grid.tsx +0 -162
- package/src/canvas/client/inspector/color-field.tsx +0 -398
- package/src/canvas/client/inspector/color-inputs.tsx +0 -139
- package/src/canvas/client/inspector/color-picker.tsx +0 -668
- package/src/canvas/client/inspector/color-space.ts +0 -240
- package/src/canvas/client/inspector/field.tsx +0 -263
- package/src/canvas/client/inspector/fields.css +0 -763
- package/src/canvas/client/inspector/section.tsx +0 -27
- package/src/canvas/client/inspector/size-field.tsx +0 -69
- package/src/canvas/client/inspector/token-select.tsx +0 -109
- package/src/canvas/client/inspector/values.ts +0 -297
- package/src/canvas/client/inspector.tsx +0 -692
- package/src/canvas/client/keys.ts +0 -71
- package/src/canvas/client/layers.tsx +0 -118
- package/src/canvas/client/main.tsx +0 -71
- package/src/canvas/client/pages-panel.tsx +0 -212
- package/src/canvas/client/panel-handle.tsx +0 -90
- package/src/canvas/client/selection.tsx +0 -199
- package/src/canvas/client/shell.css +0 -762
- package/src/canvas/client/state.ts +0 -792
- package/src/canvas/client/surface.tsx +0 -803
- package/src/canvas/client/theme-panel.tsx +0 -55
- package/src/canvas/client/tools.tsx +0 -153
- package/src/canvas/content.ts +0 -781
- package/src/canvas/edit.ts +0 -575
- package/src/canvas/editing.ts +0 -203
- package/src/canvas/fit.ts +0 -238
- package/src/canvas/global.d.ts +0 -15
- package/src/canvas/history.ts +0 -116
- package/src/canvas/index.html +0 -20
- package/src/canvas/server.ts +0 -766
- package/src/canvas/tokens.ts +0 -221
- package/src/commands/canvas.ts +0 -1097
- package/src/commands/demo.ts +0 -542
- package/src/commands/slides.ts +0 -184
- package/src/commands/teach.ts +0 -1401
- package/src/demo/beats.ts +0 -135
- package/src/demo/compile.ts +0 -350
- package/src/demo/container.ts +0 -219
- package/src/demo/cursors.ts +0 -55
- package/src/demo/drive.ts +0 -442
- package/src/demo/pointer.ts +0 -178
- package/src/demo/theme.ts +0 -112
- package/src/demo/timeline.ts +0 -64
- package/src/design/adapter.ts +0 -59
- package/src/design/base.css +0 -203
- package/src/design/brand-favicon.ts +0 -18
- package/src/design/neutral.ts +0 -127
- package/src/design/project-fonts.ts +0 -392
- package/src/slides/convert/chart.ts +0 -165
- package/src/slides/convert/deck.ts +0 -244
- package/src/slides/convert/export.ts +0 -567
- package/src/slides/convert/master.ts +0 -198
- package/src/slides/convert/shapes.ts +0 -804
- package/src/slides/convert/svg.ts +0 -38
- package/src/slides/convert/walk.ts +0 -671
- package/src/slides/decks.ts +0 -110
- package/src/slides/open.ts +0 -18
- package/src/slides/package/fonts.ts +0 -301
- package/src/slides/package/motion.ts +0 -316
- package/src/slides/package/test-face.ts +0 -113
- package/src/teach/browser/compile.ts +0 -44
- package/src/teach/browser/dismiss.ts +0 -76
- package/src/teach/browser/focus-line.ts +0 -19
- package/src/teach/browser/glossary-filter.ts +0 -44
- package/src/teach/browser/head.ts +0 -30
- package/src/teach/browser/quiz.ts +0 -19
- package/src/teach/browser/reload.ts +0 -9
- package/src/teach/browser/sidebar.ts +0 -233
- package/src/teach/browser/theme.ts +0 -18
- package/src/teach/components/code.tsx +0 -24
- package/src/teach/components/heading.tsx +0 -11
- package/src/teach/components/list.tsx +0 -17
- package/src/teach/components/paragraph.tsx +0 -29
- package/src/teach/components/refs.tsx +0 -28
- package/src/teach/cross-references.ts +0 -78
- package/src/teach/fonts.ts +0 -16
- package/src/teach/highlight.ts +0 -71
- package/src/teach/html/jsx-dev-runtime.ts +0 -13
- package/src/teach/html/jsx-runtime.ts +0 -113
- package/src/teach/html/raw.ts +0 -28
- package/src/teach/lesson.ts +0 -178
- package/src/teach/nav.ts +0 -1337
- package/src/teach/render.ts +0 -240
- package/src/teach/workspace.ts +0 -1164
- package/src/teach/write-if-changed.ts +0 -17
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: teach-workspace
|
|
3
|
-
description: Scope boundary for learning a subject across sessions, and the split between the disposable lesson and the durable reference page
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Teach workspace requirement
|
|
7
|
-
|
|
8
|
-
## Gap
|
|
9
|
-
|
|
10
|
-
Without this skill, a session asked to teach answers in the conversation, so everything dies with it. It teaches from recall, picks topics from the subject's order rather than the learner's errors, and asks nothing about what they know. A structure lesson points at a diagram and ships none.
|
|
11
|
-
|
|
12
|
-
A worked-through page and a looked-up page have different lifetimes, and merging them yields disposable material kept or durable material carrying a quiz. Opened by bare path, a lesson renders unstyled. A workspace resolved against the current directory forks per worktree, and the editing tools refuse a main-root write from one.
|
|
13
|
-
|
|
14
|
-
## Must
|
|
15
|
-
|
|
16
|
-
- Hold the workspace at the main worktree root, name the write route from a linked worktree, and route edits to an existing workspace file through a verb that resolves the root
|
|
17
|
-
- Ask the learner's starting point, research from sources chosen by the teach standard's ladder, and place each lesson from the learning records
|
|
18
|
-
- Split the output by lifetime into lessons and reference pages, record the wrong answer itself rather than a count, and decide each lesson's figure before its body
|
|
19
|
-
- Hand the learner a link to the workspace in a real browser on every run, read back from the verb that served it
|
|
20
|
-
- Propose each durable page's destination by who owns its subject, wait for the operator, and hand the page off through a named file a branch lands and deletes
|
|
21
|
-
|
|
22
|
-
## Must not
|
|
23
|
-
|
|
24
|
-
- Teach from recall without saying which claims rest on it
|
|
25
|
-
- Write to a destination surface outside the fold mode, or overwrite a file a promotion block routes to
|
|
26
|
-
- Promote a lesson at any age, since it is generated markup carrying a quiz
|
|
27
|
-
- Open a second workspace on a covered subject, or renumber anything
|
|
28
|
-
- Scaffold a wiki folder the project never chose
|
|
29
|
-
|
|
30
|
-
## Out of scope
|
|
31
|
-
|
|
32
|
-
- What the verbs do internally, which the `canon teach` CLI domain owns
|
|
33
|
-
- What a lesson renders as and how its quiz behaves, which the lesson-craft reference and the rendering layer own
|
|
34
|
-
- Firing on a description match, since opening a workspace is the learner's call
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: teach-workspace
|
|
3
|
-
description: Opens and runs a learning workspace on one subject, holding a mission, resources, numbered lessons, reference pages, a glossary, and learning records that survive across sessions, proposes where a durable page from one belongs once it outgrows the workspace, and lands the confirmed pages from a branch. Use when asked to "teach me X", "open a learning workspace", "I want to learn X", "quiz me on this", "continue the lesson", "resume my workspace on X", "promote this reference page", or "fold the promoted pages in". Do NOT use to write project documentation, which belongs to the surface owning that document, and do NOT use to answer one question, which is an ordinary reply. Do NOT auto-trigger.
|
|
4
|
-
argument-hint: <subject to learn, the topic of a workspace to resume or promote, or fold>
|
|
5
|
-
metadata:
|
|
6
|
-
family: answer
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Teach workspace
|
|
10
|
-
|
|
11
|
-
Run a learning workspace on one subject across sessions. The workspace holds what the learner has been through, so a session weeks later resumes from the folder rather than from the conversation.
|
|
12
|
-
|
|
13
|
-
## References
|
|
14
|
-
|
|
15
|
-
Read `${CLAUDE_SKILL_DIR}/references/teach.md` before writing anything into the folder, since it fixes the workspace's shape. The glossary answers to `${CLAUDE_SKILL_DIR}/references/glossary.md` wherever it lands.
|
|
16
|
-
|
|
17
|
-
The pedagogy sits in `${CLAUDE_SKILL_DIR}/references/pedagogy.md`, the lesson craft and its build in `${CLAUDE_SKILL_DIR}/references/lesson-craft.md` and `lesson-build.md`, the revisit schedule in `revisit.md`, and the promotion routing in `${CLAUDE_SKILL_DIR}/references/promotion.md`.
|
|
18
|
-
|
|
19
|
-
## Guards
|
|
20
|
-
|
|
21
|
-
- If the invocation names no subject and no existing workspace matches, stop: `❌ No subject. Invoke with the subject to learn, or the topic of a workspace to resume.`
|
|
22
|
-
- Never trust recall for what the subject says. Research first, cite what was read, and say what was not.
|
|
23
|
-
- Write nothing outside the workspace folder, apart from the one handoff file Step 6 names and the destinations the fold mode lands from that file
|
|
24
|
-
- A durable page stays in `reference/` until the operator confirms a destination, and only the fold mode copies it out, from a branch
|
|
25
|
-
|
|
26
|
-
### Workspaces and promotion
|
|
27
|
-
|
|
28
|
-
One subject takes one workspace, and only its reference pages ever leave it.
|
|
29
|
-
|
|
30
|
-
- Do not open a second workspace on a subject one already covers. Resume that one.
|
|
31
|
-
- Never promote a lesson. It is generated markup carrying a quiz and a learner, and no request makes it promotable.
|
|
32
|
-
- Never write a favicon link by hand. `canon teach nav` puts the toolkit's icon on every page and in a lesson's `style` region, so a hand-written one gives the page two.
|
|
33
|
-
|
|
34
|
-
## Step 0: let the CLI resolve the workspace root
|
|
35
|
-
|
|
36
|
-
Workspaces live at the main worktree root, never inside a linked worktree. A copy per worktree forks the learning records, and the learner is one person.
|
|
37
|
-
|
|
38
|
-
Every `canon teach` verb resolves that root in-process, so no step below composes a path to a workspace file. Read the folder through the CLI:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
canon teach list --json
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
It reports every workspace with its path, its counts, and the ordinal a new one would take. A `no-teach` refusal means the project has opened none yet, which is Step 1's new-workspace path, and the open verb creates the folder.
|
|
45
|
-
|
|
46
|
-
Every path under the main root is a main-root write, routed the way `session-worktree` states. The route splits by what the write does to the file:
|
|
47
|
-
|
|
48
|
-
- Creating a whole file that does not exist yet, which is a lesson, a reference page, and a learning record, goes out as a heredoc
|
|
49
|
-
- Changing a line inside a file that already exists goes through the verb that owns it
|
|
50
|
-
|
|
51
|
-
## Step 1: open or resume
|
|
52
|
-
|
|
53
|
-
A topic the listing already carries is a resume, and anything else is a new workspace. Two invocations are neither.
|
|
54
|
-
|
|
55
|
-
- One asking to promote reads the named workspace through the listing and goes to Step 6, which teaches nothing and writes no lesson
|
|
56
|
-
- One asking to fold confirmed promotions in goes to `## Fold mode`
|
|
57
|
-
|
|
58
|
-
### On a resume
|
|
59
|
-
|
|
60
|
-
Run `canon teach list <topic> --json` for the files behind each count, then read the highest-numbered learning record and `GLOSSARY.md`, which carry where the learner stopped and what they got wrong.
|
|
61
|
-
|
|
62
|
-
- The record's `success` holds the mission's success lines, the exit criteria. Report them with what is already met before teaching anything.
|
|
63
|
-
- `due` lists what the learning records schedule, soonest first, each with its item, date, rung, `overdue` flag, and the two dates the next record could write
|
|
64
|
-
- Read `due` here, since `canon teach lesson` takes a `--slug` naming a choice already made. Report what is overdue before proposing a lesson.
|
|
65
|
-
- An empty `due` on a workspace holding records means no record scheduled anything, which is a gap in the records rather than a clear schedule
|
|
66
|
-
|
|
67
|
-
### On a new workspace
|
|
68
|
-
|
|
69
|
-
Settle the starting point first, by asking rather than by assuming. Difficulty with no floor under it teaches nobody, and the mission cannot be written without it. Then open the workspace, which derives the ordinal and writes all three required files:
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
canon teach open <topic> --json \
|
|
73
|
-
--subject "<one line stating the subject>" \
|
|
74
|
-
--starting-point "<what the learner already knows>" \
|
|
75
|
-
--success "<an observable thing the learner will be able to do>" \
|
|
76
|
-
--out-of-scope "<what this workspace does not cover>"
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Repeat `--success` and `--out-of-scope` per line. The verb refuses a topic another workspace already covers, which is the guard against opening a second one on the same subject.
|
|
80
|
-
|
|
81
|
-
## Step 2: research before teaching
|
|
82
|
-
|
|
83
|
-
Read the subject from sources rather than from recall, chosen by the standard's `### Choosing sources` ladder, with a third-rung source's reason in its title. Record what was read and what was only found through the verb that owns the file:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
canon teach resource <topic> --json \
|
|
87
|
-
--read "<title, naming which claims rest on it>=<url>" \
|
|
88
|
-
--lead "<title>=<url>"
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Each flag repeats, and the pair splits on the first `=` so a URL carrying one survives. A listed URL is refused, but `--read` moves an opened lead.
|
|
92
|
-
|
|
93
|
-
A claim nothing was read for is the failure this step exists against. Where no source is reachable, say so in the lesson and mark what rests on recall.
|
|
94
|
-
|
|
95
|
-
## Step 3: place the learner
|
|
96
|
-
|
|
97
|
-
Pick the next lesson from the learning records rather than from the subject's own order. The target is the band immediately past what the learner can already do unaided, which `${CLAUDE_SKILL_DIR}/references/pedagogy.md` states in full.
|
|
98
|
-
|
|
99
|
-
- Open on what `due` reports as overdue, oldest date first, before anything new
|
|
100
|
-
- Where nothing is overdue, open on retrieval of what the last session got wrong. A learner who cannot retrieve the previous lesson is not ready for the next one.
|
|
101
|
-
- Never place from the last record alone, since a topic missed three sessions ago is invisible to that read and sits in `due` with a date already past
|
|
102
|
-
|
|
103
|
-
## Step 4: write the lesson and the reference
|
|
104
|
-
|
|
105
|
-
Two outputs with two lifetimes, and the split decides the format.
|
|
106
|
-
|
|
107
|
-
- A lesson is a self-contained page carrying its own quiz, a teach-back block, and feedback per question, embedding one shared stylesheet. It is disposable and never promoted.
|
|
108
|
-
- A reference page goes to `reference/<slug>.md`, written for a reader with no learner in it. It is the half that survives, so it passes the authoring gates a promotion applies.
|
|
109
|
-
- A lesson's `refs` pass the source ladder, and a learner's or organization's file goes in the body, labeled
|
|
110
|
-
- `canon teach nav` renders a reference to a `reference/<slug>.html` sibling, and a lesson links that sibling, since a served `.md` opens as plain text
|
|
111
|
-
|
|
112
|
-
### Resolve the lesson
|
|
113
|
-
|
|
114
|
-
Resolve the lesson before writing it, rather than composing its name or its quiz order by hand:
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
canon teach lesson <topic> --json \
|
|
118
|
-
--slug <kebab slug for what this lesson covers> \
|
|
119
|
-
--questions <how many questions the quiz carries> \
|
|
120
|
-
--options <how many options each question carries>
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
It writes nothing and reports three things:
|
|
124
|
-
|
|
125
|
-
- `lesson`, the numbered path the lesson takes. Write it there.
|
|
126
|
-
- `success`, the mission's success lines, carried here so Step 5 needs no second read.
|
|
127
|
-
- `quiz`, one entry per question, carrying `order` and `answer`.
|
|
128
|
-
|
|
129
|
-
Write the correct option first, then present the options in the order `order` reports, as authored indices where `0` is the correct one. Take the order as given, since a lesson that reorders by judgment puts the answer back in the first slot.
|
|
130
|
-
|
|
131
|
-
### The quiz, the teach-back block, and the lesson body
|
|
132
|
-
|
|
133
|
-
Read `${CLAUDE_SKILL_DIR}/references/lesson-craft.md` before writing the lesson. Its `## Quiz construction` and `## Teach back` fix the markup `canon teach nav`'s stepper gates on, and a quiz in any other shape shows every question at once with nothing reporting it.
|
|
134
|
-
|
|
135
|
-
- Then read `${CLAUDE_SKILL_DIR}/references/lesson-build.md` for the block list, the four marker pairs, the render, nav, stylesheet, and glossary verbs, and the rule against hand-composing any of them
|
|
136
|
-
- Keep every quiz answer the same length, so formatting leaks no clue about which one is correct
|
|
137
|
-
- Decide the figure first, by `## Diagrams` in `lesson-craft.md`
|
|
138
|
-
|
|
139
|
-
### Hand over a link, never a path
|
|
140
|
-
|
|
141
|
-
A lesson is a page carrying a script, and an editor preview cannot run it, so a path alone opens markup with no working quiz. Serve the teach root and give the learner a link. One verb refreshes every page's chrome and serves the folder from the main worktree root:
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
canon teach up <topic> --json
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
- Where the installed CLI predates `up`, run the line the `Open` step of `canon teach list <topic>` prints, with `--json` appended
|
|
148
|
-
- Never hand-write `canon serve .canon/teach`, which serves an absent folder from a linked worktree
|
|
149
|
-
- Start it in the background and read `url` off the record, since the verb walks past a port already in use and a guessed URL gets that port wrong
|
|
150
|
-
- Report the refusal and its `reason` when `ok` is false, and report it rather than proceeding silently when the verb does not resolve at all
|
|
151
|
-
- Do this on every run that opens or resumes a workspace, including one that writes no lesson, since the learner's route in is the same link
|
|
152
|
-
|
|
153
|
-
## Step 5: record what happened
|
|
154
|
-
|
|
155
|
-
Write `learning-records/<nnnn>-<slug>.md` before the session ends, carrying the lessons covered, what the learner retrieved unaided, what they got wrong with the wrong answer itself, and a `## Revisit` section.
|
|
156
|
-
|
|
157
|
-
- Record the wrong answer rather than the count. The next session places the learner from this file, and a tally carries no misconception to work against.
|
|
158
|
-
- Record what the teach-back left out under what the learner got wrong, naming the concept and where the explanation broke, since both are retrieval failures one section holds
|
|
159
|
-
- Read `${CLAUDE_SKILL_DIR}/references/revisit.md` before writing `## Revisit`, for the bullet shape, where each date and rung comes from, and an unscheduled item's first schedule
|
|
160
|
-
|
|
161
|
-
### Restate the mission
|
|
162
|
-
|
|
163
|
-
Restate the mission's success lines from the `success` the lesson verb reported, rather than from `MISSION.md` by eye. Report each line as met or not met, and name what the learner did that meets it.
|
|
164
|
-
|
|
165
|
-
A mission whose lines are all met is finished, and saying so is what closes a workspace.
|
|
166
|
-
|
|
167
|
-
## Step 6: propose where the durable half belongs
|
|
168
|
-
|
|
169
|
-
Run this when the invocation asks for it, or offer it in one line when a mission finishes, since its reference pages then stop changing. Never run it unasked mid-course.
|
|
170
|
-
|
|
171
|
-
Read `${CLAUDE_SKILL_DIR}/references/promotion.md` first. It carries what may be promoted, the routing test, the wiki folder and its refusal, each destination's expectations, and under `## Proposing and handing off` the proposal, the handoff file, and the fold instruction. Propose and wait, and write nothing to a destination here.
|
|
172
|
-
|
|
173
|
-
## Fold mode
|
|
174
|
-
|
|
175
|
-
Run this only when the invocation asks to fold, and only from a branch in a linked worktree, since every destination is a tracked file committing with the branch while the handoff sits in gitignored scratch at the main root.
|
|
176
|
-
|
|
177
|
-
Read `${CLAUDE_SKILL_DIR}/references/promotion-fold.md` for how each block lands, the overwrite refusal, the handoff delete, and the output lines, which replace the Output block below.
|
|
178
|
-
|
|
179
|
-
## Output
|
|
180
|
-
|
|
181
|
-
```plaintext
|
|
182
|
-
✅ <opened|resumed> .canon/teach/<nn>-<topic>/
|
|
183
|
-
Lesson: .canon/teach/<nn>-<topic>/lessons/<nnnn>-<slug>.html
|
|
184
|
-
Reference: .canon/teach/<nn>-<topic>/reference/<slug>.md
|
|
185
|
-
Record: .canon/teach/<nn>-<topic>/learning-records/<nnnn>-<slug>.md
|
|
186
|
-
Figure: <drawn through draw-figure, or the one-line reason prose carries it>
|
|
187
|
-
Progress: <n> of <m> success lines met
|
|
188
|
-
Open: [<the url the serve verb reported>](<the same url>)
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
- Omit the reference line where the lesson produced no durable page
|
|
192
|
-
- Never omit the open line, the learner's only route into the page. It carries what the serving verb reported, or names the refusal where the verb refused.
|
|
193
|
-
- Write that line as a markdown link with the URL as both text and target, never a bare URL or a code span the reader has to copy
|
|
194
|
-
- Emit every path from the project root, in the form the project's instruction file sets
|
|
195
|
-
|
|
196
|
-
A promotion pass reports the shape `${CLAUDE_SKILL_DIR}/references/promotion.md` gives at the end of `## Proposing and handing off` instead.
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Glossary reference
|
|
3
|
-
description: Frontmatter, entry shape, ordering, and the rules deciding which terms a glossary carries
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Glossary reference
|
|
7
|
-
|
|
8
|
-
Applies to a glossary, the file holding one entry per term a body of material defines. It changes whenever the material names a concept a reader cannot look up yet, and it is revised in place rather than appended to.
|
|
9
|
-
|
|
10
|
-
## Scope
|
|
11
|
-
|
|
12
|
-
Governs a glossary at `.canon/teach/<nn>-<topic>/GLOSSARY.md` and at whatever path a surface fixes for one it holds: its frontmatter, entry shape, ordering, grouping, and the rules deciding which terms it carries.
|
|
13
|
-
|
|
14
|
-
Does not govern:
|
|
15
|
-
|
|
16
|
-
- The folder a learning workspace lays out around its glossary, and the other files in it: `teach.md`
|
|
17
|
-
- Which surface a glossary moves to once it leaves the material that produced it, which belongs to the surface driving that move
|
|
18
|
-
- Voice, rhythm, and sentence construction: the `write-human` skill
|
|
19
|
-
- Headings, punctuation, word choice, and file references: `markdown.md`
|
|
20
|
-
|
|
21
|
-
## What a working glossary looks like
|
|
22
|
-
|
|
23
|
-
A glossary works when a reader who meets a term in the material settles it here without opening the page that introduced it:
|
|
24
|
-
|
|
25
|
-
- Which word does this material use for the concept, and which words does it deliberately not use?
|
|
26
|
-
- What does the term mean, stated without leaning on the term itself?
|
|
27
|
-
- Where does the term appear, so a reader can see it used rather than only defined?
|
|
28
|
-
- Does every entry carry a term the material actually uses?
|
|
29
|
-
|
|
30
|
-
A glossary failing these is non-conforming even when it satisfies every shape rule below.
|
|
31
|
-
|
|
32
|
-
## Frontmatter
|
|
33
|
-
|
|
34
|
-
- `title` (required): names the material the terms come from, in sentence case
|
|
35
|
-
- `description` (required): one line naming what a reader gets from the entries
|
|
36
|
-
|
|
37
|
-
## Entries
|
|
38
|
-
|
|
39
|
-
- Write one entry per term, as a single bullet.
|
|
40
|
-
- Lead the bullet with the term as a bolded span, then the definition in one or two sentences.
|
|
41
|
-
- Define the term without using it. A definition that spends the term explains nothing to the reader who arrived not knowing it.
|
|
42
|
-
|
|
43
|
-
### Placement and order
|
|
44
|
-
|
|
45
|
-
Each entry points at its first use and sits where a reader would look for it.
|
|
46
|
-
|
|
47
|
-
- Name where the term first appears, so a reader can reach one use of it in context.
|
|
48
|
-
- Keep an entry to the meaning. Worked detail belongs on the page that teaches the term.
|
|
49
|
-
- Sort entries alphabetically, so a reader who knows only the word finds it without reading the file.
|
|
50
|
-
|
|
51
|
-
## Which terms it carries
|
|
52
|
-
|
|
53
|
-
- Add a term once the material has used it, never ahead of that. A glossary front-loaded with terms nothing has introduced is a syllabus rather than a reference.
|
|
54
|
-
- Pick one word per concept and use that word everywhere. A glossary carrying two words for one thing hands the reader a choice it exists to remove.
|
|
55
|
-
- List each rejected synonym as an alias to avoid inside the entry that won, so a reader arriving with the wrong word lands on the right one.
|
|
56
|
-
- Use the glossary's own terms inside other definitions. A definition reaching for a synonym of a term defined two entries down teaches the reader a word the material does not use.
|
|
57
|
-
- Revise an entry the material has moved under rather than adding a second one narrating the change.
|
|
58
|
-
|
|
59
|
-
## Grouping
|
|
60
|
-
|
|
61
|
-
- Keep a short glossary as one alphabetical list under the title. Grouping a handful of entries costs a heading per category and saves no lookup.
|
|
62
|
-
- Group a glossary long enough that one list stops helping under `##` headings by category, sorted alphabetically within each. Roughly two screens of entries is the signal.
|
|
63
|
-
- Name each category so a reader picks it from the term alone. A category a reader cannot predict makes the grouping a second thing to search.
|
|
64
|
-
- State a departure from any rule above in the file itself, naming what it departs from and why
|
|
65
|
-
- A glossary serving no single body of material is the case that produces one, since a term drawn from everywhere has no first appearance to name
|
|
66
|
-
|
|
67
|
-
## Rendered grouping
|
|
68
|
-
|
|
69
|
-
Applies to a rendered glossary page, never to the source file above, which stays the flat alphabetical list the `## Grouping` rules above govern.
|
|
70
|
-
|
|
71
|
-
- Group a rendered glossary by the lesson its own "First seen in" citation names, ordered by lesson order, under a sub-heading naming the lesson's title rather than its filename.
|
|
72
|
-
- Trail with an "Other terms" group holding any entry the citation cannot attribute to a lesson, whether it names a reference page or carries no citation
|
|
73
|
-
- Keep "Other terms" in the alphabetical order the source file already carries
|
|
74
|
-
- Keep the workspace-wide term filter matching against every group, and drop a group's own heading once filtering leaves nothing under it.
|
|
75
|
-
|
|
76
|
-
## Template
|
|
77
|
-
|
|
78
|
-
```markdown
|
|
79
|
-
---
|
|
80
|
-
title: <Material the terms come from>
|
|
81
|
-
description: <one line naming what a reader gets from these entries>
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
# <Material the terms come from>
|
|
85
|
-
|
|
86
|
-
<One line on which material these terms come from and when the file changes.>
|
|
87
|
-
|
|
88
|
-
- **<Term>**: <the meaning in one or two sentences, written without using the term>. Avoid <rejected synonym>. First appears in `<page or lesson>`.
|
|
89
|
-
- **<Term>**: <the meaning in one or two sentences, written without using the term>. First appears in `<page or lesson>`.
|
|
90
|
-
```
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Lesson build reference
|
|
3
|
-
description: The block list canon teach render takes and the verbs that build the lesson body, being render, nav, stylesheet, and glossary
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Lesson build reference
|
|
7
|
-
|
|
8
|
-
Mechanics rather than judgment. `lesson-craft.md` covers what a lesson should be, and this file covers how its body reaches the page through the verbs.
|
|
9
|
-
|
|
10
|
-
## The block list
|
|
11
|
-
|
|
12
|
-
`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:
|
|
13
|
-
|
|
14
|
-
- `{"type":"heading","level":1|2,"text":"<text>"}`: an `<h1>` or `<h2>`.
|
|
15
|
-
- `{"type":"paragraph","text":"<text>","lede":true,"cites":[1]}`: a `<p>`, marked `lede` for the opening dek. `cites` adds a footnote marker per reference number, and a lede takes none.
|
|
16
|
-
- `{"type":"list","items":["<text>", ...],"ordered":true}`: a `<ul>` or, with `ordered`, an `<ol>`.
|
|
17
|
-
|
|
18
|
-
### Reference, code, and raw blocks
|
|
19
|
-
|
|
20
|
-
The other three carry sources, code, and markup the components cannot.
|
|
21
|
-
|
|
22
|
-
- `{"type":"refs","items":[{"title":"<name>","url":"<https URL>","note":"<text>"}, ...]}`: the one reference list, numbered from 1. `url` and `note` are optional, and a `url` must be http or https.
|
|
23
|
-
- `{"type":"code","lang":"ts","text":"<source>"}`: a sample highlighted at render time with no script. `lang` is optional and takes a highlight.js name or alias, and an unregistered one renders plain.
|
|
24
|
-
- `{"type":"raw","html":"<markup>"}`: the escape hatch, passed through unescaped.
|
|
25
|
-
|
|
26
|
-
### Where code and raw go
|
|
27
|
-
|
|
28
|
-
Code never travels through `raw`. A hand-written `<pre><code>` renders with no color, and `nav` never highlights markup already in a body, so it stays plain for good. A fenced block in a reference page's markdown is highlighted by `nav` on its own.
|
|
29
|
-
|
|
30
|
-
The quiz and teach-back block in `lesson-craft.md` always need `raw`, since their fixed contract is not a components concern. Give them the array's last `raw` entry, followed only by `refs`, and use `raw` nowhere the other types could carry the content.
|
|
31
|
-
|
|
32
|
-
### Citing
|
|
33
|
-
|
|
34
|
-
A claim resting on a source carries a `cites` number, and the source goes in the lesson's one `refs` block rather than the sentence.
|
|
35
|
-
|
|
36
|
-
- Draw every reference from what `canon teach resource --read` recorded, never from a lead, since a lead is a source nobody opened
|
|
37
|
-
- Render refuses a cite no reference resolves, so number the list before citing into it
|
|
38
|
-
|
|
39
|
-
## Building the lesson body
|
|
40
|
-
|
|
41
|
-
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.
|
|
42
|
-
|
|
43
|
-
- `<!-- canon:teach:style -->` and `<!-- /canon:teach:style -->` inside `<head>`
|
|
44
|
-
- `<!-- canon:teach:header -->`, `<!-- canon:teach:footnav -->`, and `<!-- canon:teach:scripts -->`, each with its own close marker, in that order in `<body>`
|
|
45
|
-
|
|
46
|
-
### Render the body
|
|
47
|
-
|
|
48
|
-
Build the authored `<h1>`, lede, body, and quiz as a JSON array of blocks, and render it through the verb rather than a component import:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
echo '[
|
|
52
|
-
{"type":"heading","level":1,"text":"<title>"},
|
|
53
|
-
{"type":"paragraph","lede":true,"text":"<the dek>"},
|
|
54
|
-
{"type":"paragraph","text":"<a body paragraph>"},
|
|
55
|
-
{"type":"paragraph","text":"<a claim resting on a source>","cites":[1]},
|
|
56
|
-
{"type":"list","ordered":true,"items":["<step one>","<step two>"]},
|
|
57
|
-
{"type":"raw","html":"<the quiz and teach-back block composed per lesson-craft.md>"},
|
|
58
|
-
{"type":"refs","items":[{"title":"<source name>","url":"<https URL>"}]}
|
|
59
|
-
]' | canon teach render --json
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
`## The block list` above states each type and where `raw` belongs. Write the call's `html` field between the header's close marker and the footnav's open marker, and nothing else anywhere in the file.
|
|
63
|
-
|
|
64
|
-
### When a verb does not resolve
|
|
65
|
-
|
|
66
|
-
Every verb in this section can be missing from an installed CLI that predates it. Report that rather than proceeding silently, and never hand-compose the body, the chrome, or a palette as a fallback.
|
|
67
|
-
|
|
68
|
-
A hand-composed body is the state this section exists to end. A target holds this skill body before the verb, since a plugin skill reaches a target on merge while the CLI arrives only when a release publishes.
|
|
69
|
-
|
|
70
|
-
### Fill the chrome
|
|
71
|
-
|
|
72
|
-
Then run:
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
canon teach nav <topic> --json
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
It fills every marker pair from what the workspace holds on disk, and rewrites the workspace's contents page and the teach-root listing in the same run.
|
|
79
|
-
|
|
80
|
-
- The markers take the embedded stylesheet, the header with its breadcrumb and jump menus, the prev and next footer nav, and the behavior scripts
|
|
81
|
-
- It refuses a lesson missing a marker pair by name rather than guessing the boundary, so a dropped marker is caught here rather than read back as a lesson nothing links to
|
|
82
|
-
|
|
83
|
-
### Seed the stylesheet
|
|
84
|
-
|
|
85
|
-
On the first lesson in a workspace, seed the stylesheet through the verb rather than authoring a palette:
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
canon teach stylesheet <topic> --json
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
It writes the design tokens as custom properties and the components built on them, from the one source every rendered surface reads.
|
|
92
|
-
|
|
93
|
-
- Add lesson rules under the seed, and reach a value through its property rather than restating the hex, which is how each workspace forked the palette
|
|
94
|
-
- It refuses to overwrite, so a rerun on a workspace with its own rules is safe and reports `written` as false
|
|
95
|
-
|
|
96
|
-
### Add glossary terms
|
|
97
|
-
|
|
98
|
-
Add every term the lesson defines to `GLOSSARY.md` through the verb, which places entries alphabetically in the shape the standard fixes:
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
canon teach glossary <topic> --json \
|
|
102
|
-
--term "<term>=<definition, written without using the term>" \
|
|
103
|
-
--first-seen <the lesson or reference page this batch comes from>
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
`--term` repeats and one call writes the file once, which 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.
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Lesson craft reference
|
|
3
|
-
description: Typography, restraint, quiz construction, and what makes a lesson worth returning to
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Lesson craft reference
|
|
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. 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)
|
|
20
|
-
|
|
21
|
-
## One course, not a pile of pages
|
|
22
|
-
|
|
23
|
-
A workspace accumulates lessons over weeks. The learner reads them as one body of material, so a lesson that invents its own look reads as someone else's work.
|
|
24
|
-
|
|
25
|
-
- `canon teach nav` embeds and re-embeds the shared stylesheet into every lesson on each run, so growing that stylesheet, by promoting anything used a second time into it, is the only step left by hand.
|
|
26
|
-
- Keep the structural furniture identical across lessons: where the title sits, where the quiz sits, what a correct answer looks like
|
|
27
|
-
- Do not restate styles inside a lesson. A local override is a decision the next lesson has to either copy or contradict.
|
|
28
|
-
- Refer to another lesson in the workspace as "lesson" plus its four-digit number, such as "lesson 0003". `canon teach nav` links the mention and reports a number naming no lesson.
|
|
29
|
-
- Never hand-write a link to another lesson, the one form nav never checks
|
|
30
|
-
|
|
31
|
-
## Typography
|
|
32
|
-
|
|
33
|
-
The learner is reading, so the reading surface is the product.
|
|
34
|
-
|
|
35
|
-
- Set body text at a comfortable reading size with generous line height, and hold the measure to roughly 65 to 75 characters
|
|
36
|
-
- Use one typeface for prose and one for code, and no others
|
|
37
|
-
- Build hierarchy from size and weight rather than from color. Color that carries meaning fails for a reader who cannot see it.
|
|
38
|
-
- Give code blocks room. Cramped code is the part of a lesson a learner skips.
|
|
39
|
-
|
|
40
|
-
## Restraint
|
|
41
|
-
|
|
42
|
-
Every element competes with the material for attention.
|
|
43
|
-
|
|
44
|
-
- Cut any decoration that carries no information
|
|
45
|
-
- Use at most one accent color, reserved for the thing the learner acts on
|
|
46
|
-
- Do not animate anything the learner did not trigger
|
|
47
|
-
- Prefer whitespace over rules and boxes to separate sections
|
|
48
|
-
|
|
49
|
-
## Diagrams
|
|
50
|
-
|
|
51
|
-
Decide the figure once per lesson, before writing the body.
|
|
52
|
-
|
|
53
|
-
1. Name the one relationship, boundary, path, or before-and-after the lesson is about. A lesson about none ends here, with `Figure: none, <why it names no structure>` on the reply.
|
|
54
|
-
2. Hold it against the bar in `${CLAUDE_SKILL_DIR}/../draw-figure/references/figures.md`, which also carries the drawing rules.
|
|
55
|
-
3. Draw it through `canon:draw-figure` into a `raw` block before the quiz, never inside it or after its feedback, which breaks the stepper's gating. Report an unresolved skill rather than drawing.
|
|
56
|
-
4. Or write one line on why prose carries it better, such as a structure an earlier lesson gave.
|
|
57
|
-
|
|
58
|
-
A structure lesson takes step 3 or 4, never neither. Put the outcome on the reply's `Figure:` line, off the lesson page. Never draw to satisfy the step, or on every section (`## Restraint`).
|
|
59
|
-
|
|
60
|
-
## Quiz construction
|
|
61
|
-
|
|
62
|
-
The quiz is the retrieval, so a leak in its construction turns it into a reading test.
|
|
63
|
-
|
|
64
|
-
- Write every option to the same length, in words and in characters. A longer option reads as the considered one.
|
|
65
|
-
- Write the correct option first and let the ordering verb place it. An author varying position by hand varies it by judgment, which settles on the first slot.
|
|
66
|
-
- Make each wrong option a misconception someone actually holds. An obviously wrong option removes itself and shrinks the question.
|
|
67
|
-
- Write one feedback block per question, covering the correct option and why each distractor fails, saying why rather than whether
|
|
68
|
-
- Give feedback after the attempt, never alongside the question
|
|
69
|
-
|
|
70
|
-
One feedback block reads as an explanation where a block per option reads as four verdicts, and only the explanation names what separates a wrong option from the answer.
|
|
71
|
-
|
|
72
|
-
### The markup
|
|
73
|
-
|
|
74
|
-
The quiz shape is a contract rather than a convention. `canon teach nav` splices a stepper into the lesson that gates on exactly these class names and this nesting, so a quiz written in any other shape renders with every question on screen at once and nothing reports it.
|
|
75
|
-
|
|
76
|
-
```html
|
|
77
|
-
<div class="quiz">
|
|
78
|
-
<h2>Retrieval check</h2>
|
|
79
|
-
|
|
80
|
-
<div class="q"><p class="q-stem">1. <stem></p>
|
|
81
|
-
<label class="opt" data-k="A"><input type="radio" name="q1"><span><the option text></span></label>
|
|
82
|
-
<label class="opt" data-k="B"><input type="radio" name="q1" data-a="1"><span><the option text></span></label>
|
|
83
|
-
<div class="fb"><b>Correct: <the answer in a few words>.</b> <why each distractor fails.></div></div>
|
|
84
|
-
</div>
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
- Give every option in one question the same `name`, and a different `name` per question. Options sharing a name across two questions let one answer clear another.
|
|
88
|
-
- Mark the correct option with `data-a="1"` and leave the others without the attribute
|
|
89
|
-
- Carry `data-k` on the `label`, since the workspace stylesheet renders the key letter from it
|
|
90
|
-
|
|
91
|
-
### Structure and the legacy button
|
|
92
|
-
|
|
93
|
-
The nesting matters as much as the class names.
|
|
94
|
-
|
|
95
|
-
- Keep `.fb` the last child of its `.q`. The stepper reveals it as a direct child, and a feedback block nested deeper stays hidden.
|
|
96
|
-
- Put the option text in a `<span>` inside the label rather than bare beside the input, so the workspace can lay the two out
|
|
97
|
-
- Never write a `<button class="opt">` in a new lesson. That is the shape written before the stepper, and it is kept working by an injected script the presence of a button is what still triggers.
|
|
98
|
-
|
|
99
|
-
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.
|
|
100
|
-
|
|
101
|
-
## Teach back
|
|
102
|
-
|
|
103
|
-
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.
|
|
104
|
-
|
|
105
|
-
- Ask for an explanation to a named audience rather than for an answer. Telling a non-programmer why a lazy quantifier is not an optional one has a floor, and "explain lazy quantifiers" has none.
|
|
106
|
-
- Ask about the thing the lesson was for, not a detail beside it. A teach-back on a footnote tests attention rather than the material.
|
|
107
|
-
- Carry a self-check as a closed `<details>` listing what a complete explanation covers. A learner with no session in the room otherwise cannot grade the ask, and closed leaks nothing.
|
|
108
|
-
- Write the self-check as what the explanation has to cover rather than as the explanation itself. A model answer is read instead of produced, which turns the block back into reading.
|
|
109
|
-
|
|
110
|
-
```html
|
|
111
|
-
<div class="teach-back">
|
|
112
|
-
<h2>Explain it back</h2>
|
|
113
|
-
<p>Without looking above: <the ask, naming who it is for.></p>
|
|
114
|
-
<details><summary>What a complete explanation covers</summary>
|
|
115
|
-
<ul>
|
|
116
|
-
<li><a point the explanation has to reach></li>
|
|
117
|
-
</ul>
|
|
118
|
-
</details>
|
|
119
|
-
</div>
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
It needs no styles of its own beyond what the workspace already gives a section and a `<details>`.
|
|
123
|
-
|
|
124
|
-
## Tokens travel with the course
|
|
125
|
-
|
|
126
|
-
A lesson carries its own values in the shared stylesheet rather than reading a host project's. A workspace runs in any project and most carry no token record at all, so a lesson inheriting one is a lesson that renders unstyled wherever the record is absent, with nothing reporting it.
|
|
127
|
-
|
|
128
|
-
Pick values the material needs rather than values the project happens to hold. Inheriting is worth offering as something a learner asks for once, and it is the wrong default in every project that cannot answer.
|
|
129
|
-
|
|
130
|
-
## What makes a lesson worth returning to
|
|
131
|
-
|
|
132
|
-
- The worked example is complete. A learner returning for the example finds the whole thing rather than a fragment they have to reconstruct.
|
|
133
|
-
- The lesson states what it assumes. A returning reader can tell in one line whether they are in the right place.
|
|
134
|
-
- The hard part is named as the hard part. Material that flattens everything to one difficulty gives a returning reader nothing to navigate by.
|
|
135
|
-
- Nothing depends on the session it was written in. A lesson referring to what was discussed is unreadable a week later.
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Fold promoted pages
|
|
3
|
-
description: How teach-workspace's fold mode lands each page a teach promotion handoff carries from a branch, deletes the handoff, and reports what it landed or left unfolded
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Fold promoted pages
|
|
7
|
-
|
|
8
|
-
The fold mode of `teach-workspace`, run from a branch in a worktree. The session reads this file when the invocation asks to fold confirmed promotions in.
|
|
9
|
-
|
|
10
|
-
## Read the handoff
|
|
11
|
-
|
|
12
|
-
Derive `<slug>` per `${CLAUDE_SKILL_DIR}/../git-branch/references/slug.md`, falling back to `latest` on an empty result, and read `.canon/tmp/handoff/teach-promotion/<slug>.md` at the main worktree root.
|
|
13
|
-
|
|
14
|
-
- `teach-workspace` writes it, one H2 per destination naming the path, a source line under the heading, and the page body fenced below that
|
|
15
|
-
- Read the body out of the fence rather than off the heading level, since a reference page carries headings of its own and only the fence separates them from the next destination
|
|
16
|
-
- Stop when the file is absent, reporting `❌ No promotion handoff at .canon/tmp/handoff/teach-promotion/<slug>.md. Run the promotion step from the workspace first.`
|
|
17
|
-
|
|
18
|
-
## Land each block
|
|
19
|
-
|
|
20
|
-
Each block is a page an operator already confirmed a destination for, so this step lands it rather than judging it again. Write to the destination the heading names at `pwd` rather than the main root, since every destination is a tracked file that commits with the branch.
|
|
21
|
-
|
|
22
|
-
- A wiki page and a public doc arrive as a whole file. Write it as the block gives it, and leave the block unfolded when the destination holds a file, since overwriting another's page is not a fold.
|
|
23
|
-
- A context entry is merged into rather than created. Fold the body into the sections it belongs under, and never add an entry the catalog does not already carry.
|
|
24
|
-
|
|
25
|
-
Then delete the handoff file so a later run does not fold it twice, and regenerate the index of any folder that carries one.
|
|
26
|
-
|
|
27
|
-
## Output
|
|
28
|
-
|
|
29
|
-
One line per page landed, one naming the handoff when one was consumed, and one per block left unfolded rather than dropped.
|
|
30
|
-
|
|
31
|
-
```plaintext
|
|
32
|
-
✅ Promoted: <destination path>
|
|
33
|
-
🧹 Folded: .canon/tmp/handoff/teach-promotion/<slug>.md
|
|
34
|
-
⚠ Skipped: <destination path> already exists. Merge by hand.
|
|
35
|
-
```
|