@erclx/canon 5.24.0 → 5.26.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 -1
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/backlog-triage/REQUIREMENT.md +2 -2
- package/claude/skills/backlog-triage/SKILL.md +19 -6
- package/claude/skills/canvas/REQUIREMENT.md +49 -0
- package/claude/skills/canvas/SKILL.md +106 -0
- package/claude/skills/context-fold/REQUIREMENT.md +6 -2
- package/claude/skills/context-fold/SKILL.md +8 -6
- package/claude/skills/context-fold/references/anchor-sweep.md +2 -2
- package/claude/skills/design-extract/REQUIREMENT.md +1 -1
- package/claude/skills/design-taste/REQUIREMENT.md +1 -1
- package/claude/skills/design-taste/SKILL.md +4 -2
- package/claude/skills/design-taste/references/adopted.md +40 -0
- package/claude/skills/design-taste/references/kinds.md +1 -1
- package/claude/skills/design-taste/references/systems.md +1 -7
- package/claude/skills/design-taste/references/tells.md +2 -24
- package/claude/skills/docs-sync/REQUIREMENT.md +2 -1
- package/claude/skills/document-health/REQUIREMENT.md +2 -0
- package/claude/skills/document-health/SKILL.md +21 -0
- package/claude/skills/document-health/references/axes.md +12 -0
- package/claude/skills/draft-and-pick/SKILL.md +1 -1
- package/claude/skills/draft-doc/REQUIREMENT.md +1 -1
- package/claude/skills/draft-figure/REQUIREMENT.md +14 -3
- package/claude/skills/draft-figure/SKILL.md +24 -51
- package/claude/skills/draft-figure/references/architecture-set.md +35 -0
- package/claude/skills/draft-figure/references/hand-drawn.md +31 -0
- package/claude/skills/draft-figure/references/mermaid.md +55 -0
- package/claude/skills/draft-identity/SKILL.md +1 -1
- package/claude/skills/draft-screencast/SKILL.md +9 -7
- package/claude/skills/draft-slides/REQUIREMENT.md +17 -12
- package/claude/skills/draft-slides/SKILL.md +31 -20
- package/claude/skills/git-followup/SKILL.md +17 -6
- package/claude/skills/git-issue/references/issue.md +10 -0
- package/claude/skills/git-pr/references/evidence.md +12 -2
- package/claude/skills/git-pr/references/labels.md +12 -0
- package/claude/skills/git-split/SKILL.md +19 -8
- package/claude/skills/index-lookup/SKILL.md +2 -2
- package/claude/skills/markdown-propose/references/format.md +9 -0
- package/claude/skills/memory-review/references/later-phases.md +7 -0
- package/claude/skills/review-address/SKILL.md +6 -13
- package/claude/skills/review-address/references/rest-reads.md +43 -0
- package/claude/skills/review-craft/references/ui.md +7 -1
- package/claude/skills/review-pr/REQUIREMENT.md +1 -0
- package/claude/skills/review-pr/SKILL.md +9 -3
- package/claude/skills/review-pr/references/close-out.md +2 -2
- package/claude/skills/review-pr/references/post.md +17 -5
- package/claude/skills/review-pr/references/scope.md +10 -8
- package/claude/skills/review-ui/SKILL.md +12 -4
- package/claude/skills/review-ui/references/post.md +4 -2
- package/claude/skills/role-orchestrator/references/orchestrator-cloud-launch.md +38 -1
- package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +13 -0
- package/claude/skills/role-orchestrator/references/orchestrator-launch.md +4 -0
- package/claude/skills/role-orchestrator/references/orchestrator-poll.md +4 -4
- package/claude/skills/role-orchestrator/references/orchestrator-review-dispatch.md +6 -0
- package/claude/skills/role-orchestrator/scripts/poll.ts +90 -27
- package/claude/skills/role-orchestrator/scripts/repo.ts +3 -5
- package/claude/skills/role-orchestrator/scripts/watch.ts +4 -7
- package/claude/skills/search-craft/REQUIREMENT.md +1 -1
- package/claude/skills/search-craft/SKILL.md +3 -1
- package/claude/skills/search-craft/references/adopted.md +30 -0
- package/claude/skills/target-setup/references/detect.md +8 -0
- package/claude/skills/target-setup/references/indexes.md +13 -0
- package/claude/skills/target-setup/references/verify.md +8 -0
- package/claude/skills/test-first/SKILL.md +2 -0
- package/claude/skills/test-first/references/adopted.md +36 -0
- package/claude/skills/write-human/SKILL.md +1 -1
- package/claude/skills/write-human/references/machine-tells.md +13 -0
- package/docs/agents/canvas.md +4 -2
- package/docs/agents/capture.md +1 -1
- package/docs/agents/commands.md +47 -47
- package/docs/agents/context-audit-checks.md +2 -2
- package/docs/agents/index.md +2 -3
- package/docs/agents/key-changes.md +3 -3
- package/docs/agents/pr-evidence.md +11 -2
- package/docs/agents/pr-reads.md +5 -4
- package/docs/agents/records-stale.md +22 -9
- package/docs/agents/records.md +1 -1
- package/docs/agents/sandbox.md +1 -1
- package/docs/agents/skills-audit.md +10 -3
- package/docs/agents/slides.md +15 -3
- package/docs/target/projects.md +4 -4
- package/docs/workflow/ai-workflow.md +1 -2
- package/docs/workflow/index.md +1 -0
- package/docs/workflow/parallel-features.md +1 -1
- package/docs/workflow/skill-map-on-request.md +42 -0
- package/docs/workflow/skill-map.md +3 -36
- package/docs/workflow/visual-design-workflow.md +1 -0
- package/governance/renames.toml +0 -4
- package/governance/rules/standards/markdown.md +1 -0
- package/package.json +1 -2
- package/scripts/core/install-check.sh +1 -1
- package/scripts/lib/sandbox-dispatch.sh +1 -1
- package/scripts/lib/sandbox-git.sh +1 -9
- package/scripts/lib/sandbox-path.sh +1 -1
- package/scripts/sandbox-hook.sh +99 -0
- package/src/audits/catalog.ts +2 -2
- package/src/canvas/capture.ts +1 -9
- package/src/canvas/client/inspector/color-field.tsx +368 -0
- package/src/canvas/client/inspector/field.tsx +200 -0
- package/src/canvas/client/inspector/fields.css +292 -0
- package/src/canvas/client/inspector/section.tsx +27 -0
- package/src/canvas/client/inspector/values.ts +183 -0
- package/src/canvas/client/inspector.tsx +176 -160
- package/src/canvas/client/shell.css +0 -101
- package/src/capture/render.ts +45 -7
- package/src/capture/sources.ts +43 -0
- package/src/census/count.ts +1 -1
- package/src/claude/cases/misc.ts +5 -0
- package/src/claude/cases/workflow.ts +6 -1
- package/src/claude/seeds.ts +1 -2
- package/src/claude/skills-audit.ts +68 -14
- package/src/client-commands.ts +1 -1
- package/src/commands/claude.ts +27 -2
- package/src/commands/design.ts +2 -64
- package/src/commands/feedback.ts +3 -3
- package/src/commands/pr.ts +219 -202
- package/src/commands/records.ts +88 -6
- package/src/commands/sandbox.ts +50 -10
- package/src/commands/slides.ts +31 -77
- package/src/context/audit.ts +8 -7
- package/src/design/tokens.ts +2 -18
- package/src/docs/read.ts +1 -1
- package/src/{github.ts → feedback/github.ts} +1 -1
- package/src/gate/measures.ts +6 -4
- package/src/gov/citations.ts +1 -1
- package/src/gov/payload.ts +1 -1
- package/src/gov/superseded.ts +2 -2
- package/src/help.ts +2 -2
- package/src/markdown/ceiling.ts +1 -1
- package/src/migrate/skill-names.ts +7 -1
- package/src/pr/evidence.ts +25 -5
- package/src/pr/rest.ts +137 -0
- package/src/record-root.ts +1 -0
- package/src/records/backup.ts +1 -0
- package/src/records/push-guard.ts +1 -1
- package/src/records/stale-canonical.ts +146 -0
- package/src/records/stale.ts +1 -1
- package/src/sandbox/hooks.ts +128 -0
- package/src/sandbox/provision.ts +596 -0
- package/src/sandbox/tree.ts +103 -4
- package/src/secrets/marker.ts +2 -2
- package/src/secrets/scan.ts +1 -1
- package/src/shipped/references.ts +2 -2
- package/src/slides/convert/export.ts +2 -16
- package/src/slides/decks.ts +110 -0
- package/src/standards/read.ts +1 -1
- package/src/sync/seeds-report.ts +1 -1
- package/src/tasks/answers.ts +1 -1
- package/src/tasks/archive.ts +1 -1
- package/src/teach/nav.ts +1 -1
- package/src/tooling/inject.ts +1 -1
- package/src/web/readme-citations.ts +1 -1
- package/standards/architecture.md +1 -0
- package/standards/canvas.md +112 -0
- package/standards/context.md +2 -1
- package/standards/figures.md +0 -1
- package/standards/index.md +1 -1
- package/standards/markdown.md +1 -0
- package/standards/mermaid.md +1 -7
- package/standards/requirements.md +2 -0
- package/standards/skill-practice.md +2 -1
- package/standards/skill.md +1 -0
- package/tooling/claude/reference.md +0 -5
- package/claude/skills/draft-diagram/REQUIREMENT.md +0 -45
- package/claude/skills/draft-diagram/SKILL.md +0 -177
- package/docs/agents/design-board.md +0 -33
- package/governance/rules/standards/diagrams.md +0 -14
- package/governance/rules/standards/mermaid.md +0 -15
- package/scripts/core/check-gallery-exclusion.sh +0 -50
- package/scripts/manage-sandbox.sh +0 -472
- package/src/design/board.ts +0 -576
- package/src/slides/layouts.ts +0 -478
- package/src/slides/parse.ts +0 -84
- package/src/slides/render.ts +0 -110
- package/src/slides/styles.ts +0 -96
- package/standards/diagrams.md +0 -132
- package/tooling/claude/seeds/.claude/diagrams/index.md +0 -8
- /package/claude/skills/write-human/references/{source-material.md → adopted.md} +0 -0
- /package/src/{commands/feedback-format.ts → feedback/body.ts} +0 -0
- /package/src/{github-format.ts → feedback/github-format.ts} +0 -0
- /package/src/{frontmatter.ts → markdown/frontmatter.ts} +0 -0
- /package/src/{binary.ts → sweep/binary.ts} +0 -0
- /package/src/{exempt-marker.ts → sweep/exempt-marker.ts} +0 -0
- /package/src/{paths.ts → tasks/paths.ts} +0 -0
- /package/src/{seed-marker.ts → tooling/seed-marker.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: draft-figure
|
|
3
|
-
description: Why a figure decides between Mermaid and freehand SVG before drawing, and why
|
|
3
|
+
description: Why a figure decides between Mermaid, an architecture view, and freehand SVG before drawing, and why the Mermaid path carries a render-verification loop
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Draft figure requirement
|
|
@@ -11,18 +11,24 @@ Without this skill, a session asked for a figure reaches for whichever path it t
|
|
|
11
11
|
|
|
12
12
|
A teach lesson breaks the Mermaid path outright. The lesson letters its figures in a hand font the renderer cannot load, so the render sizes every label in a narrower fallback face and the lesson clips the text it actually shows. The check then reads the standalone image, rendered in that same fallback, and passes a figure the reader sees clipped. Both happened on one lesson, where every group title clipped mid-word and only a capture taken inside the lesson showed it.
|
|
13
13
|
|
|
14
|
+
An architecture view asked for one at a time fails its own way. A session asked to refresh one view redraws every view beside it, so pictures nobody checked change in the same commit and the reviewer cannot tell which one the pass was about. It reaches for C4, state, or class diagrams that render differently in every viewer. A Mermaid source can satisfy every rule in the standard and still render as a picture asserting something false about the system, so a session that judges the source and calls it verified has spent the only signal a reader has on a picture nobody looked at.
|
|
15
|
+
|
|
14
16
|
The color failure is the quiet one. Mermaid's own theme writes literal hex values, and a figure carrying one stops re-coloring itself the moment the host page switches its palette, which the figure standard's own accessibility bar rules out.
|
|
15
17
|
|
|
16
18
|
## Must
|
|
17
19
|
|
|
18
20
|
- Apply the standard's earn-its-place bar before drawing anything
|
|
19
21
|
- Decide between the Mermaid path and the freehand path by whether the subject reduces to a graph, not by which is faster to produce
|
|
22
|
+
- Draw an architecture view from its named source signal, inside `flowchart` and `sequenceDiagram`, and render it through the Mermaid path
|
|
23
|
+
- Draw only the view the request names, leaving every other figure in the destination untouched
|
|
20
24
|
- Draw a figure bound for a teach lesson freehand whatever its shape, since the lesson's hand font is one the renderer cannot measure
|
|
21
25
|
- Verify a figure bound for a rendered page by capturing it inside that page, and fall back to the standalone render only where the destination has no page to load
|
|
22
26
|
- Keep the scoped overflow style as the documented fallback for a clipped group title wherever the Mermaid path still runs
|
|
23
27
|
- Render the Mermaid path with the hand-drawn look and the figure font stack, never with Mermaid's default look
|
|
24
28
|
- Rewrite every literal color the renderer wrote into the custom property the host stylesheet defines
|
|
25
|
-
- Read the Mermaid render back and judge it against what the figure means to say,
|
|
29
|
+
- Read the Mermaid render back and judge it against what the figure means to say, rather than judging the source
|
|
30
|
+
- Read the node labels by hand, since no hook checks inside a fence
|
|
31
|
+
- Cite only code paths that exist in an architecture view's caption or prose
|
|
26
32
|
- Wrap either path in a `<figure>` and `<figcaption>` and give it an accessible name
|
|
27
33
|
|
|
28
34
|
## Must not
|
|
@@ -33,16 +39,21 @@ The color failure is the quiet one. Mermaid's own theme writes literal hex value
|
|
|
33
39
|
- Report a clean verification when the Mermaid render was skipped or a defect survived
|
|
34
40
|
- Loop past two correction passes on a surviving defect
|
|
35
41
|
- Commit a scratch render. Only the SVG that ships in the destination document survives
|
|
42
|
+
- Redraw a figure the request did not name, or report one as drawn when it was left alone
|
|
43
|
+
- Leave an architecture view as an unrendered fence
|
|
36
44
|
|
|
37
45
|
## Guards
|
|
38
46
|
|
|
39
47
|
- No subject given: stop, since nothing states what the figure has to show
|
|
40
48
|
- No destination document given: stop, since the figure has nowhere to land
|
|
41
49
|
- Subject does not clear the earn-its-place bar: stop rather than drawing decoration
|
|
50
|
+
- An architecture view with no planning file and no folder structure to scan: stop, because nothing anchors it
|
|
51
|
+
- Render fails for any reason: continue to the output and name the skipped check. A missing renderer degrades the loop rather than failing it.
|
|
42
52
|
|
|
43
53
|
## Out of scope
|
|
44
54
|
|
|
45
|
-
- The toolkit's own `.canon/diagrams/` architecture surface, which shares no code, font, or visual language with this convention: `draft-diagram`
|
|
46
55
|
- Mermaid's own layout, budgets, and label rules for the fence itself: the mermaid standard, cited rather than restated here
|
|
47
56
|
- A UI wireframe or screen mockup: `draft-doc`
|
|
57
|
+
- Design tokens and the visual system: `design-extract`
|
|
58
|
+
- Implementation detail behind an architecture view, which belongs in a context entry the caption points at
|
|
48
59
|
- Which lesson needs a figure and where it sits among the lesson's blocks: `teach-workspace`, which calls this skill to draw one
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: draft-figure
|
|
3
|
-
description: Drafts one hand-drawn figure for a document, deciding whether the subject is Mermaid-shaped or needs freehand SVG, then draws it. Renders the Mermaid path through Mermaid's own hand-drawn look, reads the render back, and fixes what it exposes. Wraps
|
|
3
|
+
description: Drafts one hand-drawn figure for a document, deciding whether the subject is Mermaid-shaped, an architecture view, or needs freehand SVG, then draws it. Renders the Mermaid path through Mermaid's own hand-drawn look, reads the render back, and fixes what it exposes. Wraps every path in the figure standard's caption, color, and accessibility rules. Use when asked to "draw a figure", "add a hand-drawn diagram", "draft a figure for this doc", "draw this relationship as a figure", "draw the architecture", "diagram the system", or "show the components". Do NOT use for a UI wireframe, which is `draft-doc`, or for design tokens, which is `design-extract`.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Draft figure
|
|
7
7
|
|
|
8
|
-
Decide whether a requested figure reduces to a graph Mermaid can draw, or needs freehand SVG, then draw it and verify what a reader will actually see.
|
|
8
|
+
Decide whether a requested figure reduces to a graph Mermaid can draw, is one of the architecture views, or needs freehand SVG, then draw it and verify what a reader will actually see.
|
|
9
9
|
|
|
10
10
|
## Guards
|
|
11
11
|
|
|
@@ -17,7 +17,6 @@ Decide whether a requested figure reduces to a graph Mermaid can draw, or needs
|
|
|
17
17
|
Read these in parallel:
|
|
18
18
|
|
|
19
19
|
- `${CLAUDE_SKILL_DIR}/../../standards/figures.md`: when a figure earns its place, the render-first policy, wrapping and captioning, and the color and accessibility rules
|
|
20
|
-
- `${CLAUDE_SKILL_DIR}/../../standards/mermaid.md`: direction and layout, node and edge budgets, the accessibility fields, and how a render is verified, for the Mermaid path
|
|
21
20
|
- `${CLAUDE_SKILL_DIR}/../../standards/markdown.md`: formatting for the caption prose
|
|
22
21
|
- The `write-human` skill: voice and rhythm for the caption prose
|
|
23
22
|
|
|
@@ -25,74 +24,48 @@ Read these in parallel:
|
|
|
25
24
|
|
|
26
25
|
Apply the standard's bar: a relationship, a boundary, a path, or a before-and-after that prose or a list cannot carry as well. Stop when it does not: `❌ <subject> reads fine as prose. A figure adds nothing here.`
|
|
27
26
|
|
|
28
|
-
## Step 3:
|
|
27
|
+
## Step 3: pick the path
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
- **Graph-shaped**, meaning the relationship, boundary, or path is already what a flowchart or sequence diagram expresses: draw it through Step 4.
|
|
32
|
-
- **Not graph-shaped**, meaning the subject is a spatial or physical arrangement no flowchart reduces to: draw it through Step 5.
|
|
29
|
+
Take the first that matches, and state which path was picked and why in one sentence:
|
|
33
30
|
|
|
34
|
-
|
|
31
|
+
1. **A teach lesson**, meaning the destination is a lesson page in a learning workspace's `lessons/` folder: the hand-drawn path, whatever the subject's shape, an architecture view included. The lesson letters its figures in a hand font the renderer cannot load, so a Mermaid render measures its labels in a narrower face and the lesson clips them.
|
|
32
|
+
2. **An architecture view**, meaning the request names system context, components, request flow, data pipeline, or deployment: the architecture set, then the Mermaid path.
|
|
33
|
+
3. **Graph-shaped**, meaning the relationship, boundary, or path is already what a flowchart or sequence diagram expresses: the Mermaid path.
|
|
34
|
+
4. **Anything else**, a spatial or physical arrangement no flowchart reduces to: the hand-drawn path.
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
The standard states this as a render-first policy rather than a ban on any tool-exported drawing, so outside a teach lesson a graph-shaped subject always routes through Mermaid even though that is itself an external renderer.
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
- Render it with the hand-drawn look and the figure font stack, writing scratch files under `.canon/tmp/figures/`:
|
|
38
|
+
## Step 4: draw
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
mkdir -p .canon/tmp/figures
|
|
43
|
-
cat <<'EOF' >.canon/tmp/figures/<slug>.json
|
|
44
|
-
{"look": "handDrawn", "themeVariables": {"fontFamily": "Virgil, Excalifont, cursive"}}
|
|
45
|
-
EOF
|
|
46
|
-
bunx -y @mermaid-js/mermaid-cli -i .canon/tmp/figures/<slug>.mmd -o .canon/tmp/figures/<slug>.svg -c .canon/tmp/figures/<slug>.json
|
|
47
|
-
bunx -y @mermaid-js/mermaid-cli -i .canon/tmp/figures/<slug>.mmd -o .canon/tmp/figures/<slug>.png -c .canon/tmp/figures/<slug>.json
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Render both formats in one pass: the SVG is what ships inside the `<figure>`, and the PNG is what Step 6 reads back, since an SVG's markup carries no recoverable spatial meaning the way `draft-diagram` Step 5 already states for the architecture surface.
|
|
51
|
-
|
|
52
|
-
Use `bunx` when bun is available, falling back to `npx -y @mermaid-js/mermaid-cli ...` otherwise.
|
|
53
|
-
|
|
54
|
-
- Rewrite every stroke, fill, and text color the renderer wrote as a literal hex value into the custom property the host stylesheet defines, per the standard's color rule. Mermaid's own theme has no notion of a custom property, so this is a source edit made to the rendered SVG, not a config option.
|
|
55
|
-
- Expect a group title or a long label to clip once the destination shows it in the hand font, since the renderer sized its box in a fallback face.
|
|
56
|
-
- When the in-page check shows a clipped title, add a `<style>` inside the SVG, scoped to that SVG's own id, that sets `overflow: visible` on the clipped label's `foreignObject` and centers the label within it, so the wider text spills past both edges evenly. The style hides the mismatch for a title and does nothing for a node label crowding its box, which takes a shorter label instead.
|
|
57
|
-
- Check whether the project ran `canon design css --figures`. The figure and figcaption styling ships unconditionally either way, but that flag alone embeds the Virgil and Excalifont font files. Without it, the figure falls back to the browser's own generic `cursive` face rather than the intended hand-drawn font, and Step 7's output names that gap when the flag was not passed.
|
|
58
|
-
|
|
59
|
-
## Step 5: the freehand path
|
|
40
|
+
Read the reference for the path Step 3 picked and follow it:
|
|
60
41
|
|
|
61
|
-
-
|
|
62
|
-
-
|
|
42
|
+
- Architecture set: read `${CLAUDE_SKILL_DIR}/references/architecture-set.md` to shape the view, then `${CLAUDE_SKILL_DIR}/references/mermaid.md` to draw and render it. The architecture branch always renders and reads back. An unrendered fence is not a figure.
|
|
43
|
+
- Mermaid path: read `${CLAUDE_SKILL_DIR}/references/mermaid.md`.
|
|
44
|
+
- Hand-drawn path: read `${CLAUDE_SKILL_DIR}/references/hand-drawn.md`.
|
|
63
45
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
## Step 6: wrap, caption, and verify
|
|
46
|
+
## Step 5: wrap, caption, and verify
|
|
67
47
|
|
|
68
48
|
- Wrap the drawing in a `<figure>` element with a `<figcaption>` naming what to take from the figure, never what it shows. Let it run wider than the surrounding prose column.
|
|
69
|
-
- On the Mermaid path,
|
|
70
|
-
- On
|
|
71
|
-
- When the
|
|
72
|
-
- When the destination is a rendered page, an HTML file a browser loads, the check that counts is the figure inside that page, which Step 7 runs once the figure is written. The standalone PNG is measured in the renderer's own fonts and can read clean while the page clips it. A markdown destination has no page to load, so the standalone check above is the whole check there.
|
|
49
|
+
- On the Mermaid path, run the read-back `mermaid.md` states before confirming.
|
|
50
|
+
- On every path, confirm the figure still reads once every color and font it depends on is stripped to its fallback, per the standard's own working-figure bar.
|
|
51
|
+
- When the destination is a rendered page, an HTML file a browser loads, the check that counts is the figure inside that page, which Step 6 captures once the figure is written, on either path. A markdown destination has no page to load, so the checks above are the whole check there.
|
|
73
52
|
|
|
74
|
-
## Step
|
|
53
|
+
## Step 6: confirm and write
|
|
75
54
|
|
|
76
|
-
Show the destination path, the decided
|
|
55
|
+
Show the destination path, the decided path, and the full `<figure>` markup before writing. Confirm with the user, since the path decision and the render verdict are judgment calls with no diff to preview either against.
|
|
77
56
|
|
|
78
57
|
Write the figure into the destination document at the location the user named.
|
|
79
58
|
|
|
80
|
-
When the destination is a rendered page,
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
canon capture <destination> --selector figure --out .canon/tmp/figures/
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
Narrow the selector to this figure, such as by an id on its `<figure>`, when the page carries more than one. Fix a clipped label, a misaligned shape, or an arrow that misses its target in the destination and capture again, within the same two correction passes Step 6 allows. A clipped group title on the Mermaid path takes the scoped overflow style Step 4 states. When the capture fails, keep the figure and name the skipped check in the output, the same way Step 6 treats a failed render.
|
|
59
|
+
When the destination is a rendered page, read the `## Capture in the page` section of `${CLAUDE_SKILL_DIR}/references/hand-drawn.md` and run it, on the Mermaid path as well as the hand-drawn one, within the same two correction passes the read-back allows.
|
|
87
60
|
|
|
88
|
-
Renders and captures under `.canon/tmp/figures/` are verification artifacts, and the scratch PNGs, the stamps the capture writes beside them, and the JSON config are deleted once the checks confirm, since only the SVG ships.
|
|
61
|
+
Renders and captures under `.canon/tmp/figures/` are verification artifacts, and the scratch PNGs, the stamps the capture writes beside them, and the JSON config are deleted once the checks confirm, since only the SVG ships. Keep the `.mmd` source, which is what a later refresh redraws from.
|
|
89
62
|
|
|
90
63
|
## Output
|
|
91
64
|
|
|
92
65
|
### Preview
|
|
93
66
|
|
|
94
67
|
**Destination:** `<path>`
|
|
95
|
-
**Render path:** `<mermaid | freehand>`, `<one-sentence reason>`
|
|
68
|
+
**Render path:** `<mermaid | architecture | freehand>`, `<one-sentence reason>`
|
|
96
69
|
|
|
97
70
|
```html
|
|
98
71
|
<drafted figure markup></drafted>
|
|
@@ -102,7 +75,7 @@ Renders and captures under `.canon/tmp/figures/` are verification artifacts, and
|
|
|
102
75
|
|
|
103
76
|
```plaintext
|
|
104
77
|
✅ Drafted figure in <path>
|
|
105
|
-
Render path: <mermaid | freehand>
|
|
78
|
+
Render path: <mermaid | architecture | freehand>
|
|
106
79
|
Verified <in page | as a standalone render>. <defect or skipped check, one line, omitted when clean>
|
|
107
80
|
<Font not embedded: run `canon design css --figures` to ship Virgil and Excalifont. Omitted when the project already ran it.>
|
|
108
81
|
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Architecture set
|
|
3
|
+
description: The five architecture views with each one's question, source signal, and diagram type, the code-scan fallback, cited paths, and what moves to canon/context/ instead, read by draft-figure when a request names an architecture view
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Architecture set
|
|
7
|
+
|
|
8
|
+
`draft-figure` reads this file when the request names an architecture view. It shapes the subject, then the figure goes through `${CLAUDE_SKILL_DIR}/references/mermaid.md` like any other graph-shaped figure. The destination stays the one the user named.
|
|
9
|
+
|
|
10
|
+
## The five views
|
|
11
|
+
|
|
12
|
+
Draw the view the request names. Each answers one question and is drawn from one source signal:
|
|
13
|
+
|
|
14
|
+
| View | Question it answers | Source signal | Diagram type |
|
|
15
|
+
| -------------- | ------------------------------------------------------- | ------------------------------------------------- | ------------------------------------ |
|
|
16
|
+
| System context | Who uses the system, what it talks to, where it ends | `canon/REQUIREMENTS.md` | `flowchart TB` |
|
|
17
|
+
| Components | The layered structure inside the boundary | `canon/ARCHITECTURE.md` | `flowchart TB` with `subgraph` lanes |
|
|
18
|
+
| Request flow | A request lifecycle, an agent loop, or an actor handoff | the entry point and its handlers | `sequenceDiagram` |
|
|
19
|
+
| Data pipeline | Retrieval, ranking, queues, or ETL | the pipeline's modules | `flowchart TB` |
|
|
20
|
+
| Deployment | Hosts, services, and infrastructure config | deploy config, compose files, infrastructure code | `flowchart TB` |
|
|
21
|
+
|
|
22
|
+
System context is the only view that draws the world outside the boundary, and the one a reader outside the team opens first, so assume no knowledge of the repository there.
|
|
23
|
+
|
|
24
|
+
Stay inside `flowchart` and `sequenceDiagram`. C4, state, ER, and class diagrams render inconsistently across viewers.
|
|
25
|
+
|
|
26
|
+
## Sources
|
|
27
|
+
|
|
28
|
+
- Read `canon/REQUIREMENTS.md`, `canon/ARCHITECTURE.md`, `CLAUDE.md`, and the language manifest (`package.json`, `pyproject.toml`, `Cargo.toml`) when present, plus the top-level folder layout through `ls`. Do not recurse speculatively.
|
|
29
|
+
- When neither planning file exists and no folder structure names a boundary, stop: `❌ No source signal for <view>. Add canon/ARCHITECTURE.md or run inside a project folder.`
|
|
30
|
+
- When the view came from a code scan rather than planning prose, open the caption with `Source: code.` and add `Fidelity is lower than prose-driven figures. Verify against the project's intent.`
|
|
31
|
+
|
|
32
|
+
## Caption and prose
|
|
33
|
+
|
|
34
|
+
- Name one or two code paths a reader can open, in the caption or the prose beside the figure. Cite only paths that exist and spell each one exactly, since a reader deciding whether the figure still holds starts by opening them.
|
|
35
|
+
- Keep implementation detail out of the figure: function names and call signatures, library versions, config keys and environment variable names, retry counts and timeouts, and workarounds needing more than a sentence. That detail belongs in a `canon/context/` entry, which the caption points at by path when a reader needs the mechanism.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Hand-drawn path
|
|
3
|
+
description: Authoring a freehand SVG, its color and accessibility audit, and the in-page capture loop a rendered destination takes, read by draft-figure once a figure is drawn by hand
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Hand-drawn path
|
|
7
|
+
|
|
8
|
+
`draft-figure` reads this file when Step 3 routes a figure to a freehand drawing: a teach lesson whatever its subject, or a subject no flowchart reduces to.
|
|
9
|
+
|
|
10
|
+
## Draw
|
|
11
|
+
|
|
12
|
+
- Author the SVG by hand: plain shapes and lines authored directly in the markup.
|
|
13
|
+
- Follow the `## Color and accessibility` section of `${CLAUDE_SKILL_DIR}/../../standards/figures.md` for every fill, stroke, and accessible name.
|
|
14
|
+
|
|
15
|
+
There is no external render to verify a freehand drawing against before it is written. The check here is the stroke-and-fill audit above and a read of the markup against what the subject means to show, done once rather than looped. Hand-placed coordinates can drift out of line where a layout engine would not, so a freehand figure bound for a rendered page also takes the in-page capture below.
|
|
16
|
+
|
|
17
|
+
## Capture in the page
|
|
18
|
+
|
|
19
|
+
When the destination is a rendered page, an HTML file a browser loads, capture the figure inside it once it is written and read the capture against what the figure means to say:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
canon capture <destination> --selector figure --out .canon/tmp/figures/
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- Narrow the selector to this figure, such as by an id on its `<figure>`, when the page carries more than one.
|
|
26
|
+
- Fix a clipped label, a misaligned shape, or an arrow that misses its target in the destination and capture again. Stop after two correction passes.
|
|
27
|
+
- When the capture fails, keep the figure and name the skipped check in the output.
|
|
28
|
+
|
|
29
|
+
A Mermaid figure bound for a rendered page takes this same capture, since its standalone PNG is measured in the renderer's own fonts and can read clean while the page clips it. A clipped group title there takes the scoped overflow style `${CLAUDE_SKILL_DIR}/references/mermaid.md` states.
|
|
30
|
+
|
|
31
|
+
A markdown destination has no page to load, so the read of the markup, or of the standalone render on the Mermaid path, is the whole check there.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Mermaid path
|
|
3
|
+
description: The hand-drawn render config, the SVG and PNG pair, the hex rewrite, the scoped overflow fallback, the label check, and the PNG read-back with its two-pass stop, read by draft-figure once a figure routes through Mermaid
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mermaid path
|
|
7
|
+
|
|
8
|
+
`draft-figure` reads this file when Step 3 routes a figure through Mermaid, whether the subject is graph-shaped or an architecture view the architecture set already shaped.
|
|
9
|
+
|
|
10
|
+
## Draft the fence
|
|
11
|
+
|
|
12
|
+
- Draft the fence against `${CLAUDE_SKILL_DIR}/../../standards/mermaid.md` for direction, node and edge budgets, `accTitle` and `accDescr`, and quoted labels. Do not work the layout or the budgets from memory.
|
|
13
|
+
- Read every node and subgraph label against the banned characters `${CLAUDE_SKILL_DIR}/../../standards/markdown.md` lists. The audit hook skips every line inside a fence, so a label carrying a banned character passes silently while the same character in the caption is caught. Reading the labels is the only gate they have. A colon works as a replacement inside a label.
|
|
14
|
+
|
|
15
|
+
## Render
|
|
16
|
+
|
|
17
|
+
Render with the hand-drawn look and the figure font stack, writing scratch files under `.canon/tmp/figures/`:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
mkdir -p .canon/tmp/figures
|
|
21
|
+
cat <<'EOF' >.canon/tmp/figures/<slug>.json
|
|
22
|
+
{"look": "handDrawn", "themeVariables": {"fontFamily": "Virgil, Excalifont, cursive"}}
|
|
23
|
+
EOF
|
|
24
|
+
bunx -y @mermaid-js/mermaid-cli -i .canon/tmp/figures/<slug>.mmd -o .canon/tmp/figures/<slug>.svg -c .canon/tmp/figures/<slug>.json
|
|
25
|
+
bunx -y @mermaid-js/mermaid-cli -i .canon/tmp/figures/<slug>.mmd -o .canon/tmp/figures/<slug>.png -c .canon/tmp/figures/<slug>.json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Render both formats in one pass. The SVG is what ships inside the `<figure>`, and the PNG is what the read-back below judges, since an SVG's markup carries no recoverable spatial meaning.
|
|
29
|
+
|
|
30
|
+
Use `bunx` when bun is available, falling back to `npx -y @mermaid-js/mermaid-cli ...` otherwise.
|
|
31
|
+
|
|
32
|
+
Before the first render in a project, say what is about to block:
|
|
33
|
+
|
|
34
|
+
```plaintext
|
|
35
|
+
Rendering to verify layout. The first run downloads the Mermaid CLI and takes about 15 seconds.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Rewrite the colors
|
|
39
|
+
|
|
40
|
+
Rewrite every stroke, fill, and text color the renderer wrote as a literal hex value into the custom property the host stylesheet defines, per the color rule in `${CLAUDE_SKILL_DIR}/../../standards/figures.md`. Mermaid's own theme has no notion of a custom property, so this is a source edit made to the rendered SVG, not a config option.
|
|
41
|
+
|
|
42
|
+
## Clipped titles
|
|
43
|
+
|
|
44
|
+
- Expect a group title or a long label to clip once the destination shows it in the hand font, since the renderer sized its box in a fallback face.
|
|
45
|
+
- When the in-page check shows a clipped title, add a `<style>` inside the SVG, scoped to that SVG's own id, that sets `overflow: visible` on the clipped label's `foreignObject` and centers the label within it, so the wider text spills past both edges evenly. The style hides the mismatch for a title and does nothing for a node label crowding its box, which takes a shorter label instead.
|
|
46
|
+
|
|
47
|
+
## Fonts
|
|
48
|
+
|
|
49
|
+
Check whether the project ran `canon design css --figures`. The figure and figcaption styling ships unconditionally either way, but that flag alone embeds the Virgil and Excalifont font files. Without it, the figure falls back to the browser's own generic `cursive` face rather than the intended hand-drawn font, and the output names that gap when the flag was not passed.
|
|
50
|
+
|
|
51
|
+
## Read the render back
|
|
52
|
+
|
|
53
|
+
- Read the rendered PNG and judge it against what the figure means to say, applying the verification properties in the mermaid standard. A source satisfying every rule there can still render as a picture asserting something false, so the image is what gets judged.
|
|
54
|
+
- Fix the Mermaid source and re-render on a defect. Stop after two correction passes. When a defect survives, keep the figure and name the defect in the output rather than reporting a false verification.
|
|
55
|
+
- When the render fails for any reason, no browser engine, no network, no package manager, continue to the confirm step and name the skipped check. A missing renderer degrades the loop rather than failing it.
|
|
@@ -72,7 +72,7 @@ Follow `${CLAUDE_SKILL_DIR}/../draft-and-pick/SKILL.md` Steps 2 through 5 agains
|
|
|
72
72
|
This step and Step 7 replace `draft-and-pick`'s own Step 6, since the pick here produces several final files rather than one applied surface.
|
|
73
73
|
|
|
74
74
|
1. Extract the picked arm's `.mark` markup as the final vector source. Write it to `<write-folder>/favicon.svg`.
|
|
75
|
-
2. Under `<dest>/render/`, write one `icon-<w>x<h>.html` page per Step 2 size, carrying the picked `.mark` markup. Give every page's captured element the shared class `.render`, so one capture call renders the whole batch regardless of the size spread. `canon capture` opens every page at a fixed 2x device scale factor and screenshots the element at that scale, so declare each `.render` element at half its target dimension, `<w>/2` by `<h>/2`, to land the captured PNG on the literal target size rather than double it. Declare
|
|
75
|
+
2. Under `<dest>/render/`, write one `icon-<w>x<h>.html` page per Step 2 size, carrying the picked `.mark` markup. Give every page's captured element the shared class `.render`, so one capture call renders the whole batch regardless of the size spread. `canon capture` opens every page at a fixed 2x device scale factor and screenshots the element at that scale, so declare each `.render` element at half its target dimension, `<w>/2` by `<h>/2`, to land the captured PNG on the literal target size rather than double it. Declare no font on them, since each holds the mark alone and `canon capture` skips the font check on an element with no text. A generic family such as `system-ui` would be refused if text ever sat inside one.
|
|
76
76
|
3. Render the batch:
|
|
77
77
|
|
|
78
78
|
```bash
|
|
@@ -45,6 +45,8 @@ Create `demos/<slug>/beats.md` at the project root, creating the folder if it do
|
|
|
45
45
|
|
|
46
46
|
Write all nine sections. Pre-seed every section with concrete content so the draft is shippable as-is. The user edits down rather than fills blanks.
|
|
47
47
|
|
|
48
|
+
Load `canon:video-craft` for every zoom and caption value the draft names, and report it rather than proceeding silently when it does not resolve. The template below states none, since each number there traces to a source that skill records.
|
|
49
|
+
|
|
48
50
|
```markdown
|
|
49
51
|
# Screencast: <short title>
|
|
50
52
|
|
|
@@ -72,7 +74,7 @@ Five beats. Each uses five fields. Add a sixth `Transition out` only when non-de
|
|
|
72
74
|
- On screen: <derived from hero moment>
|
|
73
75
|
- Action: <one verb, derived>
|
|
74
76
|
- Watch for:
|
|
75
|
-
- Emphasis: zoom
|
|
77
|
+
- Emphasis: zoom onto the action, scale and speed per `canon:video-craft`
|
|
76
78
|
- Caption:
|
|
77
79
|
|
|
78
80
|
### Beat 2: Setup
|
|
@@ -104,7 +106,7 @@ Five beats. Each uses five fields. Add a sixth `Transition out` only when non-de
|
|
|
104
106
|
- On screen:
|
|
105
107
|
- Action:
|
|
106
108
|
- Watch for:
|
|
107
|
-
- Emphasis: zoom
|
|
109
|
+
- Emphasis: zoom out to full frame
|
|
108
110
|
- Caption:
|
|
109
111
|
|
|
110
112
|
## 4. Sequencing notes
|
|
@@ -119,14 +121,14 @@ Five beats. Each uses five fields. Add a sixth `Transition out` only when non-de
|
|
|
119
121
|
- Resolution: 1920x1080
|
|
120
122
|
- Frame rate: 30fps
|
|
121
123
|
- Container: mp4 H.264
|
|
122
|
-
- Zoom:
|
|
124
|
+
- Zoom: only on an action too small to read at full frame, scale, speed, and dwell per `canon:video-craft`, zoomed out before every cut
|
|
123
125
|
- Highlight overlay: ~1.5s soft glow
|
|
124
126
|
|
|
125
|
-
## 6.
|
|
127
|
+
## 6. Captions
|
|
126
128
|
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
129
|
+
- Each caption names what its beat's frame shows, at most two lines of 42 characters, per `canon:video-craft`
|
|
130
|
+
- Hold and reading rate per `canon:video-craft`, splitting a caption across beats rather than shortening its hold
|
|
131
|
+
- Placed off the element the beat acts on
|
|
130
132
|
|
|
131
133
|
## 7. Distribution
|
|
132
134
|
|
|
@@ -1,39 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: draft-slides
|
|
3
|
-
description: Why the skill
|
|
3
|
+
description: Why the skill draws a deck as HTML in the project's tokens inside its own folder, why the CLI owns the conversion, and why one render is read back before the deck is called done
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Draft slides requirement
|
|
7
7
|
|
|
8
8
|
## Gap
|
|
9
9
|
|
|
10
|
-
Without this skill, a deck request turns into hand-built
|
|
10
|
+
Without this skill, a deck request turns into hand-built output. The session writes a deck into whatever path occurs to it, so a second deck overwrites the first and nothing lists either. It writes pptxgenjs code or hex colors per deck, so the deck takes neither the project's design nor any other deck's, and it invents attributes the converter does not read, so a section, a chart, or an entrance silently goes missing. Every slide comes out as a title over bullets, which is the shape that needs no decision and reads as a document rather than a deck.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
A first render shipped unread hands the audience the overlap, the overflow, and every element the converter fell back to a picture for, since markup that looks correct says nothing about the file it produces.
|
|
13
13
|
|
|
14
14
|
## Must
|
|
15
15
|
|
|
16
|
-
- Read the
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
16
|
+
- Read the existing decks and the slide format from the CLI before drawing, and pick a deck name no listed deck carries unless the request names one
|
|
17
|
+
- Write each deck into its own folder under the slides record folder, one HTML file per slide in filename order
|
|
18
|
+
- Draw with the project's custom properties so the deck takes the project's design
|
|
19
|
+
- Vary the composition across the deck rather than repeating one shape
|
|
20
|
+
- Size content to fit the slide frame, keeping titles short and lines tight
|
|
20
21
|
- Shell out to the render command for the deck itself
|
|
21
|
-
-
|
|
22
|
+
- Read every fallback and refusal the render reports, run one QA pass over the rendered images, and fix what both report
|
|
22
23
|
|
|
23
24
|
## Must not
|
|
24
25
|
|
|
25
|
-
- Hardcode a
|
|
26
|
-
- Reimplement
|
|
26
|
+
- Hardcode a deck name, an attribute, or a chart type, which goes stale the moment the CLI changes
|
|
27
|
+
- Reimplement the conversion, the master, or the packaging, which the CLI owns
|
|
28
|
+
- Write a deck into the shared layouts folder, which is never listed as a deck
|
|
29
|
+
- Invent token values when the project has no token stylesheet
|
|
27
30
|
- Write centered body text or content that overflows a slide
|
|
28
31
|
- Loop on aesthetics past a single fix pass
|
|
29
32
|
|
|
30
33
|
## Guards
|
|
31
34
|
|
|
35
|
+
- No token stylesheet: draw the deck anyway and say it renders unstyled.
|
|
32
36
|
- Image conversion tools missing: skip the image pass and say so. Do not fail the render over a verification step.
|
|
33
37
|
|
|
34
38
|
## Out of scope
|
|
35
39
|
|
|
36
|
-
-
|
|
37
|
-
- The palette and
|
|
40
|
+
- Converting HTML to PowerPoint, which the CLI owns end to end
|
|
41
|
+
- The project's palette and faces, which live in its token stylesheet rather than in the slides
|
|
38
42
|
- Writing the content the deck is about, which the caller brings
|
|
43
|
+
- Drafting a deck as a canvas page, which waits on a measurement of that authoring surface
|
|
39
44
|
- Recording a demo, which `draft-screencast` owns
|
|
@@ -1,49 +1,59 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: draft-slides
|
|
3
|
-
description:
|
|
3
|
+
description: Draws a deck as HTML slides in the project's own design, one folder under `.canon/slides/` per deck, then renders it to an editable PowerPoint file via `canon slides render`. Use when asked to "draft slides", "make a deck", "build a presentation", "turn this into slides", or "render the deck". Holds the deck design rules. Do NOT reimplement the conversion. The CLI owns layout into PowerPoint shapes, the master, and packaging. Assumes the `canon` CLI is on PATH.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Draft slides
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Draw each slide as an HTML file in a deck folder, then shell out to `canon slides render`. The CLI lays every slide out in a browser and rebuilds it as editable PowerPoint shapes. This skill owns the content, the slide markup, and the design choices the markup encodes.
|
|
9
9
|
|
|
10
|
-
## Read the
|
|
10
|
+
## Read the decks and the format
|
|
11
11
|
|
|
12
|
-
Run
|
|
12
|
+
Run both first. Never hardcode a deck name, an attribute, or a chart type. The CLI is the source of truth for each.
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
15
|
canon slides list --json 2>/dev/null
|
|
16
|
+
canon docs slides
|
|
16
17
|
```
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
The list returns one row per deck, carrying its `name`, `title`, slide count, and `path`. When the request names a deck the list holds, edit that folder. Otherwise pick a new kebab-case name no row carries.
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
The docs page states what `deck.json` holds, what each slide declares on its `<body>`, the motion attributes, speaker notes, charts, and what each refusal reports.
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
- One slide per section, separated by a `---` rule. Each slide opens with a `# Title` and a `layout:` line naming a layout from the catalog, followed by its content.
|
|
23
|
+
## Draw the deck
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
A deck folder sits at `.canon/slides/<deck>/` from the project root, and holds:
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
- One `.html` file per slide, rendered in filename order. Number them with a zero-padded prefix, such as `01-cover.html`, so a slide inserted later sorts where it belongs.
|
|
28
|
+
- `deck.json`, optional, for the title, the header and footer bands, slide numbers, the mark, and embedded faces.
|
|
29
|
+
- `assets/` for images the slides reference by a relative path.
|
|
30
|
+
|
|
31
|
+
Never write a slide into `.canon/slides/layouts/`. That folder holds the project's shared layouts and is never listed as a deck.
|
|
32
|
+
|
|
33
|
+
Each slide is a full HTML document laid out at 1280 by 720 CSS pixels. Position its blocks absolutely or with a flex or grid container sized to that frame, and keep every element inside it.
|
|
28
34
|
|
|
29
35
|
## Design rules
|
|
30
36
|
|
|
31
|
-
The
|
|
37
|
+
The render injects the project's token stylesheet ahead of each slide's own styles, so the deck takes the project's design rather than the toolkit's.
|
|
32
38
|
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
39
|
+
- Use the project's custom properties, such as `var(--color-accent)`, for every color, face, and spacing value the stylesheet defines. Read the names from `.claude/design/base.css` and any overrides under `.claude/design/project/`. When neither exists, say the deck renders unstyled rather than inventing values to cover it.
|
|
40
|
+
- Leave the `--color-*` roles to the stylesheet rather than redefining them in a slide. The master reads its colors off the first slide's `<html>`, and a slide body computing its own `--color-text` is reported, since the bands keep the master's colors.
|
|
41
|
+
- Vary the composition across slides. Never repeat a title over bullets on every slide. Reach for columns, a row of large numbers, a grid of cards, a chart, a pull quote, and section dividers.
|
|
42
|
+
- Keep titles short and lines tight, so text fits its box at the size the design sets rather than overflowing the frame.
|
|
43
|
+
- Never write centered body text.
|
|
44
|
+
- Prefer CSS the converter maps to native shapes. An element computing a property it cannot map is drawn as a picture of itself and reported on stderr, so a slide full of gradients and filters stops being editable.
|
|
37
45
|
|
|
38
46
|
## Render
|
|
39
47
|
|
|
40
48
|
Shell out to the CLI. It writes the deck and reports the path.
|
|
41
49
|
|
|
42
50
|
```bash
|
|
43
|
-
canon slides render
|
|
51
|
+
canon slides render <deck>
|
|
44
52
|
```
|
|
45
53
|
|
|
46
|
-
|
|
54
|
+
With one deck in the project the name can be left out. The render refuses with the deck list when there are several. Pass `--open` to open the deck, and `--mirror <dir>`, or set `CANON_SLIDES_MIRROR`, to copy it into a synced folder.
|
|
55
|
+
|
|
56
|
+
Read every `✗` line the render prints. A picture fallback, a refused link, chart, or effect, and a missing token each leave the deck written with that piece degraded or left out.
|
|
47
57
|
|
|
48
58
|
## QA loop
|
|
49
59
|
|
|
@@ -51,12 +61,13 @@ Run this once after the first render, then stop.
|
|
|
51
61
|
|
|
52
62
|
1. Convert the deck to images: `soffice --headless --convert-to pdf <deck>.pptx` then `pdftoppm -r 90 -png <deck>.pdf slide`. If `soffice` or `pdftoppm` is missing, skip the image pass and say so. Do not fail the render.
|
|
53
63
|
2. Open and inspect every rendered image in this session, checking each slide for overlap, overflow, low contrast, and empty regions.
|
|
54
|
-
3. Fix the reported issues in
|
|
64
|
+
3. Fix the reported issues and the `✗` lines in the slide files once, re-render, and stop. Do not loop indefinitely on aesthetics.
|
|
55
65
|
|
|
56
66
|
## Response
|
|
57
67
|
|
|
58
68
|
After rendering, report:
|
|
59
69
|
|
|
60
|
-
-
|
|
61
|
-
-
|
|
70
|
+
- The deck folder, the slide count, and the written `.pptx` path
|
|
71
|
+
- Whether the project's token stylesheet was found
|
|
72
|
+
- Each `✗` line the final render printed, or that it printed none
|
|
62
73
|
- Any QA issues found and what changed, or that the deck passed clean
|