@erclx/canon 5.43.0 → 5.44.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/references/apply.md +6 -6
- package/claude/skills/canon-cli/SKILL.md +4 -4
- package/claude/skills/canvas-board/REQUIREMENT.md +1 -1
- package/claude/skills/canvas-board/SKILL.md +1 -1
- package/claude/skills/context-fold/references/context.md +1 -1
- package/claude/skills/create-skill/REQUIREMENT.md +1 -1
- package/claude/skills/create-skill/SKILL.md +2 -2
- package/claude/skills/create-skill/references/skill-requirement.md +68 -9
- package/claude/skills/create-skill/references/skill.md +1 -1
- package/claude/skills/design-identity/REQUIREMENT.md +40 -0
- package/claude/skills/design-identity/SKILL.md +138 -0
- package/claude/skills/{draft-identity → design-identity}/references/card-route.md +2 -2
- package/claude/skills/design-taste/REQUIREMENT.md +4 -4
- package/claude/skills/design-taste/SKILL.md +2 -2
- package/claude/skills/design-taste/references/kinds.md +1 -1
- package/claude/skills/design-taste/references/preflight.md +1 -1
- package/claude/skills/draft-and-pick/REQUIREMENT.md +8 -69
- package/claude/skills/draft-and-pick/SKILL.md +3 -153
- package/claude/skills/draft-doc/REQUIREMENT.md +9 -30
- package/claude/skills/draft-doc/SKILL.md +4 -76
- package/claude/skills/draft-figure/REQUIREMENT.md +8 -42
- package/claude/skills/draft-figure/SKILL.md +3 -77
- package/claude/skills/draft-identity/REQUIREMENT.md +8 -23
- package/claude/skills/draft-identity/SKILL.md +3 -130
- package/claude/skills/draft-ready/REQUIREMENT.md +8 -37
- package/claude/skills/draft-ready/SKILL.md +3 -128
- package/claude/skills/draft-screencast/REQUIREMENT.md +8 -23
- package/claude/skills/draft-screencast/SKILL.md +3 -62
- package/claude/skills/draft-slides/REQUIREMENT.md +8 -27
- package/claude/skills/draft-slides/SKILL.md +3 -72
- package/claude/skills/draw-figure/REQUIREMENT.md +59 -0
- package/claude/skills/draw-figure/SKILL.md +85 -0
- package/claude/skills/{draft-figure → draw-figure}/references/architecture-set.md +2 -2
- package/claude/skills/{draft-figure → draw-figure}/references/hand-drawn.md +2 -2
- package/claude/skills/{draft-figure → draw-figure}/references/mermaid-path.md +2 -2
- package/claude/skills/{draft-figure → draw-figure}/references/mermaid.md +1 -1
- package/claude/skills/make-deck/REQUIREMENT.md +44 -0
- package/claude/skills/make-deck/SKILL.md +80 -0
- package/claude/skills/markdown-craft/REQUIREMENT.md +1 -1
- package/claude/skills/markdown-craft/SKILL.md +2 -2
- package/claude/skills/pick-by-eye/REQUIREMENT.md +86 -0
- package/claude/skills/pick-by-eye/SKILL.md +161 -0
- package/claude/skills/plan-feature/SKILL.md +2 -1
- package/claude/skills/plan-feature/references/plan.md +24 -10
- package/claude/skills/plan-groundwork/SKILL.md +1 -1
- package/claude/skills/plan-intake/SKILL.md +1 -1
- package/claude/skills/plan-ready/REQUIREMENT.md +54 -0
- package/claude/skills/plan-ready/SKILL.md +136 -0
- package/claude/skills/{draft-ready → plan-ready}/references/assembly.md +1 -1
- package/claude/skills/{draft-ready → plan-ready}/references/ready.md +1 -1
- package/claude/skills/record-screencast/REQUIREMENT.md +3 -3
- package/claude/skills/record-screencast/SKILL.md +2 -2
- package/claude/skills/role-orchestrator/REQUIREMENT.md +1 -1
- package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +5 -2
- package/claude/skills/role-orchestrator/references/orchestrator-parked.md +2 -2
- package/claude/skills/role-orchestrator/references/orchestrator-refill.md +18 -13
- package/claude/skills/role-planner/SKILL.md +2 -1
- package/claude/skills/role-worker/SKILL.md +9 -0
- package/claude/skills/script-screencast/REQUIREMENT.md +40 -0
- package/claude/skills/script-screencast/SKILL.md +70 -0
- package/claude/skills/{draft-screencast → script-screencast}/references/beats-template.md +2 -2
- package/claude/skills/search-craft/REQUIREMENT.md +4 -4
- package/claude/skills/search-craft/SKILL.md +1 -1
- package/claude/skills/target-setup/SKILL.md +1 -0
- package/claude/skills/task-board/SKILL.md +11 -9
- package/claude/skills/task-board/references/board.md +15 -12
- package/claude/skills/teach-workspace/SKILL.md +1 -1
- package/claude/skills/teach-workspace/references/lesson-craft.md +2 -2
- package/claude/skills/ui-checklist/SKILL.md +2 -0
- package/claude/skills/write-doc/REQUIREMENT.md +46 -0
- package/claude/skills/write-doc/SKILL.md +83 -0
- package/claude/skills/{draft-doc → write-doc}/references/context.md +2 -2
- package/claude/skills/{draft-doc → write-doc}/references/docs.md +2 -2
- package/claude/skills/{draft-doc → write-doc}/references/readme.md +2 -2
- package/claude/skills/{draft-doc → write-doc}/references/wiki-kind.md +3 -3
- package/docs/agents/markdown-audit.md +4 -2
- package/docs/agents/migrate.md +2 -2
- package/docs/target/migrations.md +17 -4
- package/docs/target/projects.md +1 -1
- package/docs/workflow/parallel-features.md +3 -2
- package/docs/workflow/skill-map-on-request.md +18 -12
- package/docs/workflow/skill-map.md +13 -12
- package/docs/workflow/visual-design-workflow.md +2 -2
- package/governance/ledger/framework/astro.md +73 -0
- package/governance/ledger/framework/fastapi.md +76 -0
- package/governance/ledger/framework/nextjs.md +86 -0
- package/governance/ledger/framework/react.md +83 -0
- package/governance/ledger/framework/shadcn.md +60 -0
- package/governance/ledger/framework/tailwind.md +55 -0
- package/governance/rules/framework/astro.md +12 -14
- package/governance/rules/framework/fastapi.md +20 -24
- package/governance/rules/framework/nextjs.md +19 -27
- package/governance/rules/framework/react.md +22 -33
- package/governance/rules/framework/shadcn.md +11 -15
- package/governance/rules/framework/tailwind.md +12 -14
- package/governance/rules/writing/markdown.md +1 -1
- package/package.json +1 -1
- package/src/claude/cases/authoring.ts +15 -3
- package/src/claude/cases/misc.ts +12 -0
- package/src/claude/cases/workflow.ts +19 -1
- package/src/claude/skills-audit.ts +113 -1
- package/src/commands/claude.ts +34 -11
- package/src/commands/demo.ts +1 -1
- package/src/commands/markdown.ts +1 -1
- package/src/commands/migrate.ts +4 -0
- package/src/commands/pr.ts +30 -6
- package/src/commands/tasks.ts +383 -2
- package/src/context/audit.ts +1 -1
- package/src/demo/beats.ts +1 -1
- package/src/gov/audit.ts +3 -2
- package/src/markdown/scope.ts +45 -35
- package/src/migrate/record-layout.ts +1 -1
- package/src/migrate/skill-names.ts +68 -21
- package/src/pr/frames.ts +14 -3
- package/src/records/validate.ts +31 -0
- package/src/tasks/board.ts +854 -0
- package/src/tasks/record.ts +20 -1
- package/src/tasks/validate.ts +206 -9
- package/tooling/astro/configs/card-src/pages/og-card.astro +1 -1
- package/tooling/astro/reference.md +2 -2
- package/tooling/claude/seeds/.claude/hooks/board-validate.sh +65 -0
- package/tooling/claude/seeds/.claude/settings.json +4 -0
- /package/claude/skills/{draft-figure → draw-figure}/references/figures.md +0 -0
- /package/claude/skills/{draft-slides → make-deck}/references/deck.md +0 -0
- /package/claude/skills/{draft-and-pick → pick-by-eye}/references/live-arms.md +0 -0
- /package/claude/skills/{draft-doc → write-doc}/references/readme/agent-facing.md +0 -0
- /package/claude/skills/{draft-doc → write-doc}/references/readme/application.md +0 -0
- /package/claude/skills/{draft-doc → write-doc}/references/readme/cli.md +0 -0
- /package/claude/skills/{draft-doc → write-doc}/references/readme/library.md +0 -0
- /package/claude/skills/{draft-doc → write-doc}/references/readme/plugin.md +0 -0
- /package/claude/skills/{draft-doc → write-doc}/references/requirements.md +0 -0
- /package/claude/skills/{draft-doc → write-doc}/references/wiki.md +0 -0
|
@@ -13,13 +13,12 @@ import { defineRenameRules, type RenameRules } from '@/migrate/rename'
|
|
|
13
13
|
* session roles together.
|
|
14
14
|
*
|
|
15
15
|
* The four `canon-` rows split the same way rather than sharing one
|
|
16
|
-
* replacement prefix. `canon-screencast` and `canon-slides-draft`
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* `
|
|
20
|
-
*
|
|
21
|
-
* reading
|
|
22
|
-
* no prefix forcing that reading.
|
|
16
|
+
* replacement prefix. `canon-screencast` and `canon-slides-draft` each make
|
|
17
|
+
* an artifact, so each takes the verb-first name of what it makes,
|
|
18
|
+
* `script-screencast` and `make-deck`. `canon-record` and `canon-frames-read`
|
|
19
|
+
* take `record-screencast` and `read-frames`, reading in sequence with
|
|
20
|
+
* `script-screencast` as one three-step pipeline with no prefix forcing that
|
|
21
|
+
* reading.
|
|
23
22
|
*
|
|
24
23
|
* Two rows rename a skill rather than retiring a prefix. `ui-test` became
|
|
25
24
|
* `ui-checklist` when the skill stopped writing tests and shrank to the
|
|
@@ -36,15 +35,25 @@ import { defineRenameRules, type RenameRules } from '@/migrate/rename'
|
|
|
36
35
|
* Five rows merge skills rather than rename one. `draft-docs`,
|
|
37
36
|
* `draft-context`, `draft-wireframes`, `draft-readme`, and `draft-wiki` ran
|
|
38
37
|
* one procedure five times over, differing only in the standard each read and
|
|
39
|
-
* the catalog each checked, so they became
|
|
40
|
-
* from where the document lands. Every retired name lands on
|
|
41
|
-
*
|
|
38
|
+
* the catalog each checked, so they became one skill, which picks the kind
|
|
39
|
+
* from where the document lands. Every retired name lands on that skill, so a
|
|
40
|
+
* target citing any of them resolves after a single sweep.
|
|
42
41
|
*
|
|
43
|
-
* `draft-diagram` merged into
|
|
42
|
+
* `draft-diagram` merged into the figure skill the same way, its architecture
|
|
44
43
|
* views becoming one reference the figure skill reads. `claude-diagram` is
|
|
45
|
-
* retargeted onto
|
|
44
|
+
* retargeted onto the figure skill rather than left on a retired name, for the
|
|
46
45
|
* same reason `claude-ui-test` was.
|
|
47
46
|
*
|
|
47
|
+
* The `draft-` family then dissolved. Its seven members shared a verb rather
|
|
48
|
+
* than a phase or a role, so the prefix grouped a deck, a figure, a brand
|
|
49
|
+
* identity, a pick loop, and a thin plan under one word that said nothing
|
|
50
|
+
* about which of them a skill makes. Each took a verb-first name for its
|
|
51
|
+
* output instead: `write-doc`, `draw-figure`, `design-identity`, `make-deck`,
|
|
52
|
+
* `pick-by-eye`, `plan-ready`, and `script-screencast`. Every older key that
|
|
53
|
+
* landed on a `draft-` name is retargeted straight onto its new one, so a
|
|
54
|
+
* target on the oldest spelling lands in one pass rather than two.
|
|
55
|
+
* `draft-ready` alone keys on its namespaced forms below rather than here.
|
|
56
|
+
*
|
|
48
57
|
* Every name takes two words. Ten of these would have landed as a bare single
|
|
49
58
|
* word under a plain strip, and a bare word such as `review` or `docs` is a
|
|
50
59
|
* substring of ordinary prose with no token left for a later sweep to find.
|
|
@@ -63,7 +72,7 @@ export const SKILL_NAME_MAP: Readonly<Record<string, string>> = {
|
|
|
63
72
|
'claude-address-review': 'review-address',
|
|
64
73
|
'claude-autoship': 'auto-ship',
|
|
65
74
|
'claude-design-extract': 'design-extract',
|
|
66
|
-
'claude-diagram': '
|
|
75
|
+
'claude-diagram': 'draw-figure',
|
|
67
76
|
'claude-docs': 'context-fold',
|
|
68
77
|
'docs-fold': 'context-fold',
|
|
69
78
|
'claude-feature': 'plan-feature',
|
|
@@ -87,16 +96,22 @@ export const SKILL_NAME_MAP: Readonly<Record<string, string>> = {
|
|
|
87
96
|
'claude-ux-measure': 'ux-measure',
|
|
88
97
|
'claude-worker': 'role-worker',
|
|
89
98
|
'claude-worktree': 'session-worktree',
|
|
90
|
-
'canon-screencast': '
|
|
91
|
-
'canon-slides-draft': '
|
|
99
|
+
'canon-screencast': 'script-screencast',
|
|
100
|
+
'canon-slides-draft': 'make-deck',
|
|
92
101
|
'canon-record': 'record-screencast',
|
|
93
102
|
'canon-frames-read': 'read-frames',
|
|
94
|
-
'draft-docs': '
|
|
95
|
-
'draft-context': '
|
|
96
|
-
'draft-wireframes': '
|
|
97
|
-
'draft-readme': '
|
|
98
|
-
'draft-wiki': '
|
|
99
|
-
'draft-diagram': '
|
|
103
|
+
'draft-docs': 'write-doc',
|
|
104
|
+
'draft-context': 'write-doc',
|
|
105
|
+
'draft-wireframes': 'write-doc',
|
|
106
|
+
'draft-readme': 'write-doc',
|
|
107
|
+
'draft-wiki': 'write-doc',
|
|
108
|
+
'draft-diagram': 'draw-figure',
|
|
109
|
+
'draft-doc': 'write-doc',
|
|
110
|
+
'draft-figure': 'draw-figure',
|
|
111
|
+
'draft-identity': 'design-identity',
|
|
112
|
+
'draft-slides': 'make-deck',
|
|
113
|
+
'draft-and-pick': 'pick-by-eye',
|
|
114
|
+
'draft-screencast': 'script-screencast',
|
|
100
115
|
}
|
|
101
116
|
|
|
102
117
|
/**
|
|
@@ -110,14 +125,42 @@ export const SKILL_NAME_MAP: Readonly<Record<string, string>> = {
|
|
|
110
125
|
* guard rejects a following `-`, so a rewritten `canon:canvas-board` is not
|
|
111
126
|
* matched again.
|
|
112
127
|
*
|
|
128
|
+
* `draft-ready` became `plan-ready` and takes the same treatment for a
|
|
129
|
+
* different reason. It is two words, but they are ordinary prose for a pull
|
|
130
|
+
* request moving from draft to ready, and the sweep takes no scope in a
|
|
131
|
+
* target, so a bare key would rewrite that sentence in every tracked file a
|
|
132
|
+
* project wrote.
|
|
133
|
+
*
|
|
113
134
|
* What this leaves behind is a prose mention of the skill by its bare name,
|
|
114
135
|
* which has no token for a sweep to find and is fixed by hand.
|
|
115
136
|
*/
|
|
116
137
|
export const SKILL_CITATION_MAP: Readonly<Record<string, string>> = {
|
|
117
138
|
'canon:canvas': 'canon:canvas-board',
|
|
118
139
|
'skills/canvas': 'skills/canvas-board',
|
|
140
|
+
'canon:draft-ready': 'canon:plan-ready',
|
|
141
|
+
'skills/draft-ready': 'skills/plan-ready',
|
|
119
142
|
}
|
|
120
143
|
|
|
144
|
+
/**
|
|
145
|
+
* The old `draft-` names that still answer as a pointer skill, each naming the
|
|
146
|
+
* skill it became.
|
|
147
|
+
*
|
|
148
|
+
* Each pointer's own files spell the old name on purpose, so the sweep must
|
|
149
|
+
* never reach them. A later run would otherwise move the stub onto the real
|
|
150
|
+
* body at the new name. Their paths join the exclusions only once the sweep
|
|
151
|
+
* that moved the real bodies has run, since excluding them first leaves each
|
|
152
|
+
* body unmoved at its old path.
|
|
153
|
+
*/
|
|
154
|
+
export const RENAMED_DRAFT_POINTERS: readonly string[] = [
|
|
155
|
+
'draft-doc',
|
|
156
|
+
'draft-figure',
|
|
157
|
+
'draft-identity',
|
|
158
|
+
'draft-slides',
|
|
159
|
+
'draft-and-pick',
|
|
160
|
+
'draft-ready',
|
|
161
|
+
'draft-screencast',
|
|
162
|
+
]
|
|
163
|
+
|
|
121
164
|
/**
|
|
122
165
|
* The skill rename.
|
|
123
166
|
*
|
|
@@ -159,5 +202,9 @@ export const SKILL_NAME_RULES: RenameRules = defineRenameRules({
|
|
|
159
202
|
'CHANGELOG.md',
|
|
160
203
|
'src/migrate/skill-names.ts',
|
|
161
204
|
'src/migrate/skill-names.test.ts',
|
|
205
|
+
...RENAMED_DRAFT_POINTERS.flatMap((name) => [
|
|
206
|
+
`claude/skills/${name}/SKILL.md`,
|
|
207
|
+
`claude/skills/${name}/REQUIREMENT.md`,
|
|
208
|
+
]),
|
|
162
209
|
],
|
|
163
210
|
})
|
package/src/pr/frames.ts
CHANGED
|
@@ -22,6 +22,9 @@ const ADD_ATTEMPTS = 3
|
|
|
22
22
|
/** One half of a reference address. It opens on a letter or digit and holds no separator, so `..` and `/` cannot survive it. */
|
|
23
23
|
const REFERENCE_PART = /^[A-Za-z0-9][A-Za-z0-9._-]*$/
|
|
24
24
|
|
|
25
|
+
/** A tracked reference, `canon/design/<surface>/<name>`, whose name may carry its `.png`. The halves are validated as a canvas address's are. */
|
|
26
|
+
const DESIGN_REFERENCE = /^canon\/design\/([^/]+)\/([^/]+?)(?:\.png)?$/
|
|
27
|
+
|
|
25
28
|
const FOLDER_PATTERN = /^pr-(\d+)$/
|
|
26
29
|
|
|
27
30
|
const DAY_MS = 86_400_000
|
|
@@ -163,20 +166,28 @@ export function frameLink(repo: string, path: string): string {
|
|
|
163
166
|
}
|
|
164
167
|
|
|
165
168
|
/**
|
|
166
|
-
* The file-name slug of a `<page>/<frame>` address
|
|
169
|
+
* The file-name slug of a `<page>/<frame>` address or a tracked
|
|
170
|
+
* `canon/design/<surface>/<name>` path, or undefined when the
|
|
167
171
|
* address would not round-trip. Each half must open on a letter or digit and
|
|
168
172
|
* hold only letters, digits, dots, underscores, and dashes, and neither may
|
|
169
173
|
* carry `--`, so the joined slug reads back as the same two names and a path
|
|
170
174
|
* never gains a directory or escapes the pass folder.
|
|
171
175
|
*/
|
|
172
176
|
export function referenceSlug(address: string): string | undefined {
|
|
173
|
-
const
|
|
177
|
+
const tracked = DESIGN_REFERENCE.exec(address)
|
|
178
|
+
const parts = tracked ? [tracked[1], tracked[2]] : address.split('/')
|
|
174
179
|
if (parts.length !== 2) return undefined
|
|
175
180
|
const [page, frame] = parts as [string, string]
|
|
176
181
|
const valid = [page, frame].every(
|
|
177
182
|
(part) => REFERENCE_PART.test(part) && !part.includes('--'),
|
|
178
183
|
)
|
|
179
|
-
|
|
184
|
+
if (!valid) return undefined
|
|
185
|
+
return tracked ? `design--${page}--${frame}` : `${page}--${frame}`
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/** Whether a reference names a tracked `canon/design/<surface>/<name>` file rather than a `<page>/<frame>` address. */
|
|
189
|
+
export function isDesignReference(address: string): boolean {
|
|
190
|
+
return DESIGN_REFERENCE.test(address)
|
|
180
191
|
}
|
|
181
192
|
|
|
182
193
|
/**
|
package/src/records/validate.ts
CHANGED
|
@@ -208,6 +208,7 @@ const PLAN_SECTIONS = [
|
|
|
208
208
|
'Summary',
|
|
209
209
|
'Constraints',
|
|
210
210
|
'Files to touch',
|
|
211
|
+
'Design references',
|
|
211
212
|
'Verification',
|
|
212
213
|
'Risks',
|
|
213
214
|
'Review focus',
|
|
@@ -226,6 +227,22 @@ const PLAN_REQUIRED: readonly PlanSection[] = [
|
|
|
226
227
|
'Questions',
|
|
227
228
|
]
|
|
228
229
|
|
|
230
|
+
/**
|
|
231
|
+
* The files whose edit changes what a person sees, the set the `ui/a11y` rule
|
|
232
|
+
* globs plus the other markup and style extensions a plan names. A plan touching
|
|
233
|
+
* one owes a `Design references` section, so a set too wide forces it on every
|
|
234
|
+
* plan and one too narrow lets a UI plan skip it.
|
|
235
|
+
*/
|
|
236
|
+
const RENDERED_SURFACE = /\.(?:tsx|jsx|astro|vue|svelte|html|css|scss)$/
|
|
237
|
+
|
|
238
|
+
export function touchesRenderedSurface(entries: readonly string[]): boolean {
|
|
239
|
+
return entries.some((entry) =>
|
|
240
|
+
[...entry.matchAll(/`([^`]+)`/g)].some((span) =>
|
|
241
|
+
RENDERED_SURFACE.test(span[1]),
|
|
242
|
+
),
|
|
243
|
+
)
|
|
244
|
+
}
|
|
245
|
+
|
|
229
246
|
/**
|
|
230
247
|
* A line standing alone as a bold label or an H2, whatever it names. A plan is
|
|
231
248
|
* free to carry a section of its own, so the split has to see one to close the
|
|
@@ -450,6 +467,20 @@ export function checkPlan(name: string, text: string): Finding[] {
|
|
|
450
467
|
}
|
|
451
468
|
}
|
|
452
469
|
|
|
470
|
+
if (
|
|
471
|
+
!sections.has('Design references') &&
|
|
472
|
+
touchesRenderedSurface(sections.get('Files to touch') ?? [])
|
|
473
|
+
) {
|
|
474
|
+
findings.push(
|
|
475
|
+
finding(
|
|
476
|
+
'section-missing',
|
|
477
|
+
name,
|
|
478
|
+
preferredMarker('Design references'),
|
|
479
|
+
'is required when Files to touch names a rendered-surface file. Write None identified. when no reference folder governs it.',
|
|
480
|
+
),
|
|
481
|
+
)
|
|
482
|
+
}
|
|
483
|
+
|
|
453
484
|
for (const line of sections.get('Files to touch') ?? []) {
|
|
454
485
|
const trimmed = line.trim()
|
|
455
486
|
if (!trimmed.startsWith('- ') || trimmed === `- ${NONE_IDENTIFIED}`)
|