@erclx/canon 4.92.0 → 4.94.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 +5 -5
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/teach-workspace/references/lesson-craft.md +1 -1
- package/claude/skills/test-craft/REQUIREMENT.md +54 -0
- package/claude/skills/test-craft/SKILL.md +77 -0
- package/claude/skills/test-craft/references/adopted.md +44 -0
- package/claude/skills/test-craft/references/component.md +42 -0
- package/claude/skills/test-craft/references/e2e.md +44 -0
- package/claude/skills/test-craft/references/unit.md +49 -0
- package/claude/skills/test-first/REQUIREMENT.md +2 -0
- package/claude/skills/test-first/SKILL.md +4 -2
- package/docs/agents/capture.md +12 -5
- package/docs/agents/commands.md +3 -3
- package/docs/agents/rule-citations.md +1 -1
- package/docs/agents/teach.md +1 -1
- package/docs/workflow/ai-workflow.md +9 -8
- package/governance/rules/core/010-testing.md +4 -2
- package/governance/rules/lib/300-testing-ts.md +4 -0
- package/governance/rules/lib/305-e2e-reliability.md +3 -2
- package/governance/rules/lib/306-test-scope.md +1 -2
- package/governance/rules/lib/330-testing-py.md +4 -0
- package/governance/stacks/astro.toml +1 -1
- package/package.json +3 -2
- package/scripts/core/regen-hero.sh +4 -3
- package/src/capture/render.ts +15 -1
- package/src/claude/cases/misc.ts +5 -0
- package/src/cli.ts +1 -1
- package/src/commands/capture.ts +25 -1
- package/src/commands/serve.ts +11 -1
- package/src/design/components.ts +40 -26
- package/src/gate/measures.ts +5 -4
- package/src/gate/stages.ts +1 -1
- package/src/serve/static.ts +90 -6
- package/src/teach/fonts.ts +9 -19
- package/src/teach/render.ts +2 -2
- package/tooling/astro/configs/playwright.config.ts +2 -0
- package/tooling/nextjs/configs/playwright.config.ts +2 -0
- package/tooling/vite-react/configs/playwright.config.ts +2 -0
- package/src/teach/render-fixture.tsx +0 -95
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/** @jsxImportSource ./html */
|
|
2
|
-
import { mkdir, writeFile } from 'node:fs/promises'
|
|
3
|
-
import { join } from 'node:path'
|
|
4
|
-
import { TEACH_STYLESHEET_COMPONENTS } from '@/design/components'
|
|
5
|
-
import { buildDesignCss } from '@/design/css'
|
|
6
|
-
import { TEACH_FONT_FACES } from '@/teach/fonts'
|
|
7
|
-
import { Heading } from '@/teach/components/heading'
|
|
8
|
-
import { List } from '@/teach/components/list'
|
|
9
|
-
import { Paragraph } from '@/teach/components/paragraph'
|
|
10
|
-
import { render } from '@/teach/html/jsx-runtime'
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Regenerates the committed fixture lesson under
|
|
14
|
-
* `examples/teach/00-fixture/`, the same shape `examples/slides/showcase.md`
|
|
15
|
-
* takes against its own hand-rendered snapshot. Run with
|
|
16
|
-
* `bun src/teach/render-fixture.tsx` after a component changes shape.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
const FIXTURE_ROOT = join(
|
|
20
|
-
import.meta.dir,
|
|
21
|
-
'..',
|
|
22
|
-
'..',
|
|
23
|
-
'examples',
|
|
24
|
-
'teach',
|
|
25
|
-
'00-fixture',
|
|
26
|
-
)
|
|
27
|
-
const LESSON_TITLE = 'Compass bearings'
|
|
28
|
-
const LESSON_FILE = '0001-compass-bearings.html'
|
|
29
|
-
|
|
30
|
-
const STEPS = [
|
|
31
|
-
'Point the direction-of-travel arrow at the landmark.',
|
|
32
|
-
'Rotate the bezel until the orienting arrow lines up with the needle.',
|
|
33
|
-
'Read the bearing where the direction-of-travel arrow meets the bezel.',
|
|
34
|
-
]
|
|
35
|
-
|
|
36
|
-
const body = (
|
|
37
|
-
<>
|
|
38
|
-
<Heading level={1}>{LESSON_TITLE}</Heading>
|
|
39
|
-
<Paragraph lede>
|
|
40
|
-
A bearing is the compass direction from where you stand to whatever you
|
|
41
|
-
are aiming at, measured clockwise from north.
|
|
42
|
-
</Paragraph>
|
|
43
|
-
<Paragraph>
|
|
44
|
-
Hold the compass level and let the needle settle before reading anything
|
|
45
|
-
off it. A bearing taken while walking or tilted reads confidently and
|
|
46
|
-
wrong.
|
|
47
|
-
</Paragraph>
|
|
48
|
-
<Paragraph>
|
|
49
|
-
Three steps turn a sighted landmark into a number you can act on:
|
|
50
|
-
</Paragraph>
|
|
51
|
-
<List ordered items={STEPS} />
|
|
52
|
-
<Paragraph>
|
|
53
|
-
The same three steps run in reverse turn a bearing on a map into a
|
|
54
|
-
direction to walk, which is the only reason to learn them in this order.
|
|
55
|
-
</Paragraph>
|
|
56
|
-
</>
|
|
57
|
-
)
|
|
58
|
-
|
|
59
|
-
function page(title: string, main: string): string {
|
|
60
|
-
return `<!doctype html>
|
|
61
|
-
<html lang="en">
|
|
62
|
-
<head>
|
|
63
|
-
<meta charset="utf-8">
|
|
64
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
65
|
-
<title>${title}</title>
|
|
66
|
-
<link rel="stylesheet" href="../assets/course.css">
|
|
67
|
-
</head>
|
|
68
|
-
<body>
|
|
69
|
-
<main class="wide-body">
|
|
70
|
-
${main}
|
|
71
|
-
</main>
|
|
72
|
-
</body>
|
|
73
|
-
</html>
|
|
74
|
-
`
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
async function main(): Promise<void> {
|
|
78
|
-
await mkdir(join(FIXTURE_ROOT, 'lessons'), { recursive: true })
|
|
79
|
-
await mkdir(join(FIXTURE_ROOT, 'assets'), { recursive: true })
|
|
80
|
-
|
|
81
|
-
await writeFile(
|
|
82
|
-
join(FIXTURE_ROOT, 'assets', 'course.css'),
|
|
83
|
-
buildDesignCss(undefined, {
|
|
84
|
-
embedFonts: TEACH_FONT_FACES,
|
|
85
|
-
components: TEACH_STYLESHEET_COMPONENTS,
|
|
86
|
-
}),
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
await writeFile(
|
|
90
|
-
join(FIXTURE_ROOT, 'lessons', LESSON_FILE),
|
|
91
|
-
page(LESSON_TITLE, render(body)),
|
|
92
|
-
)
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
await main()
|