@erclx/canon 5.24.0 → 5.25.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/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/design-extract/REQUIREMENT.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/git-followup/SKILL.md +17 -6
- package/claude/skills/git-pr/references/evidence.md +4 -2
- package/claude/skills/git-split/SKILL.md +1 -1
- package/claude/skills/index-lookup/SKILL.md +2 -2
- 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/role-orchestrator/references/orchestrator-cloud-launch.md +30 -1
- 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/docs/agents/canvas.md +1 -1
- package/docs/agents/commands.md +45 -45
- package/docs/agents/context-audit-checks.md +2 -2
- package/docs/agents/index.md +0 -1
- 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/target/projects.md +4 -4
- package/docs/workflow/ai-workflow.md +0 -1
- package/docs/workflow/skill-map.md +3 -3
- 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/src/audits/catalog.ts +2 -2
- package/src/canvas/client/inspector/field.tsx +200 -0
- package/src/canvas/client/inspector/fields.css +151 -0
- package/src/canvas/client/inspector/section.tsx +27 -0
- package/src/canvas/client/inspector/values.ts +60 -0
- package/src/canvas/client/inspector.tsx +154 -115
- package/src/canvas/client/shell.css +0 -101
- package/src/claude/cases/misc.ts +5 -0
- package/src/claude/cases/workflow.ts +1 -1
- package/src/claude/seeds.ts +0 -1
- package/src/commands/design.ts +2 -64
- package/src/commands/pr.ts +219 -202
- package/src/context/audit.ts +7 -6
- package/src/help.ts +2 -2
- package/src/migrate/skill-names.ts +7 -1
- package/src/pr/evidence.ts +25 -5
- package/src/pr/rest.ts +137 -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/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/src/design/board.ts +0 -576
- package/standards/diagrams.md +0 -132
- package/tooling/claude/seeds/.claude/diagrams/index.md +0 -8
package/standards/diagrams.md
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Diagram reference
|
|
3
|
-
description: Shape and content rules for .canon/diagrams/<kind>.md files
|
|
4
|
-
paths:
|
|
5
|
-
- '.canon/diagrams/**'
|
|
6
|
-
rule:
|
|
7
|
-
- 'Layout, budgets, accessibility, labels, and render verification inside the fence are a separate topic. The mermaid standard routes them.'
|
|
8
|
-
- 'A diagram entry carries structure and flow, not implementation. Read the standard before adding or revising a kind.'
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Diagram reference
|
|
12
|
-
|
|
13
|
-
Applies to per-kind entries under `.canon/diagrams/`. Skip for `index.md`, which is regenerated by `canon indexes regen`.
|
|
14
|
-
|
|
15
|
-
A diagram entry answers one question about the system with one or more Mermaid diagrams and the prose that makes them readable. It is not a rendering of the file tree. The check for any single line: does it tell a reader something the code layout would not have told them? If not, it belongs in `canon/context/`.
|
|
16
|
-
|
|
17
|
-
## Scope
|
|
18
|
-
|
|
19
|
-
Governs per-kind diagram entries under `.canon/diagrams/`: which question each answers, which kinds exist and what each is drawn from, the frontmatter, and the explanation prose beneath the fence. It states the voice for that prose, which is the yield the `write-human` skill grants a surface whose own standard sets one.
|
|
20
|
-
|
|
21
|
-
Does not govern:
|
|
22
|
-
|
|
23
|
-
- How the drawing inside the fence is laid out, budgeted, made accessible, and verified against its render: `mermaid.md`
|
|
24
|
-
- Rhythm and sentence construction in explanation prose: the `write-human` skill, whose rules the yield does not lift beyond voice
|
|
25
|
-
- Language, word choice, punctuation, and formatting in explanation prose and node labels: `markdown.md`, which the yield does not reach
|
|
26
|
-
- The mechanism behind any component a diagram draws: `context.md`
|
|
27
|
-
- UI layout, on-screen copy, and interaction intent: `wireframes.md`
|
|
28
|
-
- The decision record a components diagram is drawn from: `architecture.md`
|
|
29
|
-
|
|
30
|
-
## What a working entry looks like
|
|
31
|
-
|
|
32
|
-
An entry works when a reader who has not opened the repository can answer its question:
|
|
33
|
-
|
|
34
|
-
- What are the parts, and which ones talk to each other?
|
|
35
|
-
- Which direction does the work flow, and where does it start?
|
|
36
|
-
- What would break if one box were removed?
|
|
37
|
-
|
|
38
|
-
An entry that fails these is non-conforming regardless of whether it satisfies every section rule below. The fences are the means. These three questions are the test.
|
|
39
|
-
|
|
40
|
-
## Frontmatter
|
|
41
|
-
|
|
42
|
-
- `title` (required): sentence case, names what the entry answers (`System context`, `Request flow`), not what it draws.
|
|
43
|
-
- `description` (required): one line on which question the entry settles and which source signal drives it.
|
|
44
|
-
- `category` (required): the diagram kind, one of the five in Entry kinds. It is the grouping field `canon indexes regen` renders headings from.
|
|
45
|
-
- `verified` (required): the short commit SHA an entry was last checked against and the ISO date of that check, separated by a space (`73e9a3f8 2026-08-02`). A stub nobody has drawn yet carries the literal `TODO: never verified` instead, which is the one other accepted value. <!-- canon-allow-reference: illustrates the field's two-token format, which a qualified sha would misstate -->
|
|
46
|
-
- `stale` (optional): one line naming what changed under the entry since that check. Nothing writes it on its own, so it sits on an entry because a reader put it there and is absent everywhere else.
|
|
47
|
-
|
|
48
|
-
The first three feed `.canon/diagrams/index.md` when regenerated. The catalog sorts categories alphabetically rather than in narrative order, so an entry cannot rely on its position to introduce another. Each entry names its own starting point, and the catalog's subtitle routes a first-time reader to the system context entry.
|
|
49
|
-
|
|
50
|
-
The marker fields reach the catalog through neither route. `canon indexes regen` reads `title`, `description`, and `category` and ignores every other key, so a marker changes no generated file. A reader picks it up by opening the entry, which is where it sits above the diagram and where anyone deciding whether to trust the picture is already standing.
|
|
51
|
-
|
|
52
|
-
One writer touches `verified`, which is the pass that renders an entry and reads the picture back, and it clears `stale` at the same time. A reader who notices the picture has drifted writes `stale` by hand. Keeping the two fields apart is what lets a reader tell a diagram nobody has checked since the code moved from one that was checked and found correct.
|
|
53
|
-
|
|
54
|
-
## Entry kinds
|
|
55
|
-
|
|
56
|
-
Five kinds, each with a fixed filename and a fixed `category` value. Write a kind only when its source signal exists, and leave the rest absent rather than padding the folder.
|
|
57
|
-
|
|
58
|
-
- `system-context.md`, category `System context` (`flowchart TB`): who uses the system, what it talks to, and where its boundary sits. Drawn from `canon/REQUIREMENTS.md`. This is the entry a reader outside the team opens first, and the only kind that draws the world outside the boundary.
|
|
59
|
-
- `components.md`, category `Components` (`flowchart TB` with `subgraph` boundaries): the layered structure inside the boundary. Drawn from `canon/ARCHITECTURE.md`.
|
|
60
|
-
- `request-flow.md`, category `Request flow` (`sequenceDiagram`): a request lifecycle, an agent loop, or an interaction between actors.
|
|
61
|
-
- `data-pipeline.md`, category `Data pipeline` (`flowchart TB`): retrieval, ranking, queues, or ETL.
|
|
62
|
-
- `deployment.md`, category `Deployment` (`flowchart TB`): hosts, services, and infrastructure config.
|
|
63
|
-
|
|
64
|
-
The filenames are fixed rather than free, so a session refreshing one kind finds the file it is meant to overwrite instead of writing a second entry beside it under a name of its own.
|
|
65
|
-
|
|
66
|
-
Stay inside `flowchart` and `sequenceDiagram`. C4, state, ER, and class diagrams render inconsistently across viewers.
|
|
67
|
-
|
|
68
|
-
The kinds drift at rates spanning roughly an order of magnitude, which is why they are separate files. A deploy change rewrites one entry and leaves the other four untouched.
|
|
69
|
-
|
|
70
|
-
A second entry for one kind takes a suffixed name (`request-flow-admin.md`) and repeats the kind's `category` verbatim, which is what the grouping field is for. One entry per kind is the ordinary case, so most catalogs show one entry under each heading.
|
|
71
|
-
|
|
72
|
-
## Budgets
|
|
73
|
-
|
|
74
|
-
- Keep an entry to one diagram by default. A second fence in the same file needs its own H2 naming what it adds, and a third is a sign the entry covers two kinds.
|
|
75
|
-
|
|
76
|
-
## Explanation
|
|
77
|
-
|
|
78
|
-
- One to three short paragraphs below each diagram. Plain English and pedagogical.
|
|
79
|
-
- Lead with what the diagram shows. Follow with why this shape was chosen and what alternative was rejected, when the choice was non-obvious.
|
|
80
|
-
- Reference one or two specific code paths the reader can open. Do not enumerate every file. Spell each one exactly, since a reader deciding whether the entry still holds starts by opening the paths it names and a path that resolves to nothing costs them that read.
|
|
81
|
-
- Do not duplicate prose across entries. An entry that restates its neighbor has taken the neighbor's job.
|
|
82
|
-
- The audience is mixed, so vocabulary runs as a gradient across the set. `System context` assumes no knowledge of the repository. `Deployment` may assume the reader has read the others.
|
|
83
|
-
|
|
84
|
-
This section states the voice for the surface, which is what claims the yield the `write-human` skill grants to a surface whose own standard sets it. Explanation prose is pedagogical here and the default developer-facing voice does not apply. The yield covers voice alone. The rhythm and density rules that skill carries stay in force, as do the language bans, punctuation, and formatting in `markdown.md`, which grants no yield at all.
|
|
85
|
-
|
|
86
|
-
## What moves to canon/context/
|
|
87
|
-
|
|
88
|
-
Implementation detail that answers how a component is built belongs in a `canon/context/` entry, not a diagram:
|
|
89
|
-
|
|
90
|
-
- Function names, call signatures, and lifecycle ordering
|
|
91
|
-
- Library versions, config keys, and environment variable names
|
|
92
|
-
- Retry counts, timeouts, and batch sizes
|
|
93
|
-
- Workarounds and rejected approaches that need more than one sentence
|
|
94
|
-
|
|
95
|
-
Reference the context entry by path when a reader needs the mechanism. The diagram stays answerable on its own for structure and flow.
|
|
96
|
-
|
|
97
|
-
## Maintenance
|
|
98
|
-
|
|
99
|
-
- When the system changes, update the entries whose source signal changed and leave the rest alone. Rewriting the folder wholesale reproduces the defect the per-kind split exists to end.
|
|
100
|
-
- A diagram showing a defunct host or library is worse than no diagram. Audit the affected entry in the same PR.
|
|
101
|
-
- `System context` has no named source signal beyond `canon/REQUIREMENTS.md`, so nothing tells a session it went stale. Re-read it when the boundary or the set of external dependencies moves.
|
|
102
|
-
- Nothing watches the folder for you. The entries are redrawn on demand rather than swept on every ship, so `verified` carries the whole signal: an entry whose date sits far behind the branch is due a read, and no pass is going to name which one.
|
|
103
|
-
|
|
104
|
-
## Template
|
|
105
|
-
|
|
106
|
-
The filename and the `category` value both come from Entry kinds and are fixed per kind. A stub nobody has drawn yet carries `TODO: never verified` in place of the SHA and date. The node names and labels inside the fence are placeholders, written bare because Mermaid reads an angle bracket as markup.
|
|
107
|
-
|
|
108
|
-
What goes inside the fence, and how the render is checked once it is drawn, is `mermaid.md`. This template fixes the frame around it.
|
|
109
|
-
|
|
110
|
-
````markdown
|
|
111
|
-
---
|
|
112
|
-
title: <what the entry answers>
|
|
113
|
-
description: <which question it settles and which source signal drives it>
|
|
114
|
-
category: <the kind, verbatim from Entry kinds>
|
|
115
|
-
verified: <short-sha> <YYYY-MM-DD>
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
# <what the entry answers>
|
|
119
|
-
|
|
120
|
-
```mermaid
|
|
121
|
-
flowchart TB
|
|
122
|
-
accTitle: what the diagram answers
|
|
123
|
-
accDescr: the structure in one sentence for a reader who cannot see the render
|
|
124
|
-
|
|
125
|
-
a[first part] --> b[second part]
|
|
126
|
-
b --> c[third part]
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
<One paragraph leading with what the diagram shows.>
|
|
130
|
-
|
|
131
|
-
<One paragraph on why this shape was chosen and what was rejected, where the choice was non-obvious. Name one or two code paths the reader can open.>
|
|
132
|
-
````
|