@erclx/canon 5.37.0 → 5.39.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 +1 -1
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/api-design/SKILL.md +12 -9
- package/claude/skills/auto-ship/SKILL.md +43 -23
- package/claude/skills/backlog-triage/SKILL.md +62 -53
- package/claude/skills/backlog-triage/references/apply.md +69 -0
- package/claude/skills/build-in-slices/SKILL.md +8 -4
- package/claude/skills/canon-cli/SKILL.md +5 -1
- package/claude/skills/canon-feedback/SKILL.md +18 -8
- package/claude/skills/canon-feedback-triage/SKILL.md +10 -3
- package/claude/skills/canvas-board/SKILL.md +36 -17
- package/claude/skills/ci-workflow/SKILL.md +5 -4
- package/claude/skills/code-craft/SKILL.md +10 -6
- package/claude/skills/codebase-layout/SKILL.md +3 -5
- package/claude/skills/context-fold/REQUIREMENT.md +4 -4
- package/claude/skills/context-fold/SKILL.md +42 -23
- package/claude/skills/context-fold/references/context-refresh.md +4 -3
- package/claude/skills/context-fold/references/context.md +79 -64
- package/claude/skills/create-rule/SKILL.md +7 -3
- package/claude/skills/create-skill/SKILL.md +27 -7
- package/claude/skills/create-skill/references/skill-reference.md +41 -17
- package/claude/skills/decision-escalate/SKILL.md +8 -5
- package/claude/skills/deploy-app/SKILL.md +1 -1
- package/claude/skills/deprecation-migration/SKILL.md +12 -4
- package/claude/skills/design-taste/SKILL.md +17 -11
- package/claude/skills/docs-sync/REQUIREMENT.md +1 -0
- package/claude/skills/docs-sync/SKILL.md +17 -6
- package/claude/skills/docs-sync/references/docs.md +54 -21
- package/claude/skills/docs-sync/references/readme.md +32 -8
- package/claude/skills/document-health/SKILL.md +3 -4
- package/claude/skills/draft-and-pick/SKILL.md +73 -47
- package/claude/skills/draft-doc/SKILL.md +9 -4
- package/claude/skills/draft-doc/references/context.md +4 -4
- package/claude/skills/draft-doc/references/docs.md +1 -0
- package/claude/skills/draft-doc/references/wiki.md +3 -2
- package/claude/skills/draft-figure/SKILL.md +9 -7
- package/claude/skills/draft-identity/SKILL.md +24 -52
- package/claude/skills/draft-identity/references/card-route.md +46 -0
- package/claude/skills/draft-ready/SKILL.md +19 -7
- package/claude/skills/draft-screencast/SKILL.md +6 -112
- package/claude/skills/draft-screencast/references/beats-template.md +119 -0
- package/claude/skills/draft-slides/SKILL.md +7 -4
- package/claude/skills/git-branch/SKILL.md +3 -3
- package/claude/skills/git-commit/SKILL.md +5 -3
- package/claude/skills/git-followup/SKILL.md +16 -9
- package/claude/skills/git-issue/SKILL.md +6 -5
- package/claude/skills/git-issue/references/issue.md +11 -10
- package/claude/skills/git-pr/SKILL.md +56 -44
- package/claude/skills/git-ship/SKILL.md +43 -34
- package/claude/skills/git-ship/references/ci-watch.md +31 -0
- package/claude/skills/git-split/SKILL.md +28 -100
- package/claude/skills/git-split/references/independent.md +40 -0
- package/claude/skills/git-split/references/stacked.md +73 -0
- package/claude/skills/git-stage/SKILL.md +9 -7
- package/claude/skills/git-worktree/SKILL.md +27 -49
- package/claude/skills/git-worktree/references/cleanup.md +55 -0
- package/claude/skills/markdown-craft/SKILL.md +2 -2
- package/claude/skills/markdown-craft/references/markdown.md +82 -52
- package/claude/skills/plan-feature/SKILL.md +52 -46
- package/claude/skills/plan-feature/references/batches.md +46 -0
- package/claude/skills/plan-groundwork/SKILL.md +60 -74
- package/claude/skills/plan-groundwork/references/groundwork.md +53 -24
- package/claude/skills/plan-groundwork/references/output.md +48 -0
- package/claude/skills/plan-intake/SKILL.md +28 -21
- package/claude/skills/plan-intake-answer/SKILL.md +14 -13
- package/claude/skills/read-frames/SKILL.md +2 -0
- package/claude/skills/record-screencast/SKILL.md +31 -11
- package/claude/skills/review-address/SKILL.md +76 -158
- package/claude/skills/review-address/references/rebase-only.md +34 -0
- package/claude/skills/review-craft/SKILL.md +27 -11
- package/claude/skills/review-pr/SKILL.md +91 -40
- package/claude/skills/review-pr/references/post.md +1 -1
- package/claude/skills/review-ui/SKILL.md +62 -37
- package/claude/skills/review-ui/references/hosted-preview.md +30 -0
- package/claude/skills/role-orchestrator/SKILL.md +105 -74
- package/claude/skills/role-orchestrator/references/orchestrator-filing.md +26 -0
- package/claude/skills/role-orchestrator/references/orchestrator-parked.md +1 -1
- package/claude/skills/role-planner/SKILL.md +66 -64
- package/claude/skills/role-reviewer/SKILL.md +57 -46
- package/claude/skills/role-worker/SKILL.md +68 -63
- package/claude/skills/search-craft/SKILL.md +7 -5
- package/claude/skills/session-compact/SKILL.md +16 -11
- package/claude/skills/session-map/SKILL.md +31 -10
- package/claude/skills/session-relay/SKILL.md +32 -65
- package/claude/skills/session-resume/SKILL.md +18 -13
- package/claude/skills/session-worktree/SKILL.md +70 -42
- package/claude/skills/systematic-debugging/SKILL.md +6 -1
- package/claude/skills/target-check/SKILL.md +13 -6
- package/claude/skills/target-setup/SKILL.md +41 -30
- package/claude/skills/target-setup/references/verify.md +6 -5
- package/claude/skills/task-board/SKILL.md +68 -60
- package/claude/skills/task-board/references/create-report.md +36 -0
- package/claude/skills/task-board/references/tasks.md +3 -1
- package/claude/skills/task-complete/SKILL.md +20 -18
- package/claude/skills/teach-workspace/SKILL.md +61 -33
- package/claude/skills/test-craft/SKILL.md +2 -1
- package/claude/skills/test-first/SKILL.md +15 -9
- package/claude/skills/ui-checklist/SKILL.md +18 -16
- package/claude/skills/ux-audit/SKILL.md +9 -10
- package/claude/skills/ux-measure/SKILL.md +22 -18
- package/claude/skills/video-craft/SKILL.md +15 -7
- package/claude/skills/write-human/SKILL.md +9 -1
- package/claude/skills/youtube-transcripts/SKILL.md +2 -1
- package/docs/agents/context-audit-checks.md +19 -1
- package/docs/agents/context-audit.md +2 -2
- package/docs/agents/driver.md +1 -1
- package/docs/agents/hooks.md +21 -1
- package/docs/agents/index.md +10 -14
- package/docs/agents/indexes.md +25 -29
- package/docs/agents/install-and-sync.md +124 -235
- package/docs/agents/markdown-audit-density.md +39 -0
- package/docs/agents/markdown-audit-weight.md +9 -7
- package/docs/agents/markdown-audit.md +18 -14
- package/docs/agents/migrate.md +41 -16
- package/docs/agents/output-shape.md +60 -45
- package/docs/agents/overview.md +36 -12
- package/docs/agents/routing.md +1 -1
- package/docs/agents/rule-citations.md +1 -1
- package/docs/agents/skills-reach.md +1 -1
- package/docs/agents/targets.md +25 -77
- package/docs/target/migrations.md +1 -1
- package/docs/target/projects.md +3 -3
- package/docs/target/scenarios.md +1 -1
- package/docs/workflow/ai-workflow.md +2 -2
- package/docs/workflow/parallel-features.md +2 -2
- package/docs/workflow/skill-map.md +1 -1
- package/docs/workflow/visual-design-workflow.md +1 -1
- package/governance/detect.toml +6 -1
- package/package.json +6 -3
- package/scripts/core/install-check.sh +1 -1
- package/src/commands/claude.ts +1 -2
- package/src/commands/context.ts +106 -7
- package/src/commands/hooks.ts +63 -0
- package/src/commands/markdown.ts +169 -32
- package/src/commands/pr.ts +1 -1
- package/src/commands/records.ts +0 -1
- package/src/context/audit.ts +256 -5
- package/src/context/classify/prompts.ts +1 -1
- package/src/context/gate.ts +23 -7
- package/src/context/shape-gated.ts +28 -0
- package/src/design/document.ts +1 -1
- package/src/design/tokens.ts +1 -1
- package/src/docs/read.ts +15 -21
- package/src/gate/measures.ts +15 -190
- package/src/gate/stages.ts +21 -23
- package/src/hooks/reply-links.ts +110 -0
- package/src/markdown/density.ts +258 -0
- package/src/markdown/gate.ts +57 -18
- package/src/markdown/reference-shape.ts +103 -0
- package/src/markdown/scope.ts +174 -0
- package/src/markdown/structure.ts +10 -60
- package/src/sandbox/equivalence.ts +7 -9
- package/src/shipped/references.ts +1 -1
- package/src/teach/browser/head.ts +2 -2
- package/src/teach/browser/sidebar.ts +3 -3
- package/src/teach/browser/theme.ts +2 -2
- package/src/tooling/inject.ts +2 -2
- package/src/tooling/package.ts +15 -18
- package/src/tooling/verify-stack.ts +6 -3
- package/tooling/astro/configs/.oxfmtrc.json +8 -0
- package/tooling/astro/configs/.prettierrc +13 -0
- package/tooling/astro/manifest.toml +13 -0
- package/tooling/astro/reference.md +15 -5
- package/tooling/base/configs/.oxfmtrc.json +7 -0
- package/tooling/base/configs/scripts/verify.ts +1 -1
- package/tooling/base/manifest.toml +6 -6
- package/tooling/base/reference.md +12 -9
- package/tooling/base/seeds/.lintstagedrc +1 -3
- package/tooling/base/seeds/canon/context/ci.md +3 -3
- package/tooling/base/seeds/canon/context/development.md +2 -2
- package/tooling/claude/manifest.toml +5 -1
- package/tooling/claude/seeds/.claude/hooks/reply-links.sh +72 -0
- package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +22 -1
- package/tooling/claude/seeds/.claude/settings.json +4 -0
- package/tooling/go/reference.md +2 -2
- package/tooling/nextjs/configs/.oxlintrc.json +223 -0
- package/tooling/nextjs/manifest.toml +2 -5
- package/tooling/nextjs/reference.md +4 -4
- package/tooling/php/manifest.toml +6 -1
- package/tooling/php/reference.md +2 -2
- package/tooling/python/manifest.toml +6 -1
- package/tooling/python/reference.md +4 -4
- package/tooling/vite-react/manifest.toml +1 -4
- package/tooling/vite-react/reference.md +3 -3
- package/tooling/web/configs/.oxlintrc.json +213 -0
- package/tooling/web/manifest.toml +9 -13
- package/tooling/web/reference.md +14 -14
- package/docs/agents/commands.md +0 -154
- package/docs/agents/docs.md +0 -27
- package/docs/agents/drift-surfaces.md +0 -201
- package/docs/agents/gov-detect.md +0 -47
- package/docs/agents/scripting.md +0 -142
- package/src/markdown/growth.ts +0 -43
- package/tooling/base/configs/.prettierrc +0 -12
- package/tooling/base/seeds/.prettierignore +0 -0
- package/tooling/nextjs/configs/eslint.config.js +0 -91
- package/tooling/web/configs/eslint.config.js +0 -82
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": ["typescript", "unicorn"],
|
|
4
|
+
"categories": {
|
|
5
|
+
"correctness": "off"
|
|
6
|
+
},
|
|
7
|
+
"env": {
|
|
8
|
+
"builtin": true
|
|
9
|
+
},
|
|
10
|
+
"ignorePatterns": [
|
|
11
|
+
"dist",
|
|
12
|
+
"dist-ssr",
|
|
13
|
+
"coverage",
|
|
14
|
+
"release",
|
|
15
|
+
".claude",
|
|
16
|
+
".vscode",
|
|
17
|
+
".husky",
|
|
18
|
+
"test-results",
|
|
19
|
+
"playwright-report",
|
|
20
|
+
"blob-report",
|
|
21
|
+
"playwright/.cache"
|
|
22
|
+
],
|
|
23
|
+
"rules": {
|
|
24
|
+
"constructor-super": "error",
|
|
25
|
+
"for-direction": "error",
|
|
26
|
+
"getter-return": "error",
|
|
27
|
+
"no-async-promise-executor": "error",
|
|
28
|
+
"no-case-declarations": "error",
|
|
29
|
+
"no-class-assign": "error",
|
|
30
|
+
"no-compare-neg-zero": "error",
|
|
31
|
+
"no-cond-assign": "error",
|
|
32
|
+
"no-const-assign": "error",
|
|
33
|
+
"no-constant-binary-expression": "error",
|
|
34
|
+
"no-constant-condition": "error",
|
|
35
|
+
"no-control-regex": "error",
|
|
36
|
+
"no-debugger": "error",
|
|
37
|
+
"no-delete-var": "error",
|
|
38
|
+
"no-dupe-class-members": "error",
|
|
39
|
+
"no-dupe-else-if": "error",
|
|
40
|
+
"no-dupe-keys": "error",
|
|
41
|
+
"no-duplicate-case": "error",
|
|
42
|
+
"no-empty": "error",
|
|
43
|
+
"no-empty-character-class": "error",
|
|
44
|
+
"no-empty-pattern": "error",
|
|
45
|
+
"no-empty-static-block": "error",
|
|
46
|
+
"no-ex-assign": "error",
|
|
47
|
+
"no-extra-boolean-cast": "error",
|
|
48
|
+
"no-fallthrough": "error",
|
|
49
|
+
"no-func-assign": "error",
|
|
50
|
+
"no-global-assign": "error",
|
|
51
|
+
"no-import-assign": "error",
|
|
52
|
+
"no-invalid-regexp": "error",
|
|
53
|
+
"no-irregular-whitespace": "error",
|
|
54
|
+
"no-loss-of-precision": "error",
|
|
55
|
+
"no-misleading-character-class": "error",
|
|
56
|
+
"no-new-native-nonconstructor": "error",
|
|
57
|
+
"no-nonoctal-decimal-escape": "error",
|
|
58
|
+
"no-obj-calls": "error",
|
|
59
|
+
"no-prototype-builtins": "error",
|
|
60
|
+
"no-redeclare": "error",
|
|
61
|
+
"no-regex-spaces": "error",
|
|
62
|
+
"no-self-assign": "error",
|
|
63
|
+
"no-setter-return": "error",
|
|
64
|
+
"no-shadow-restricted-names": "error",
|
|
65
|
+
"no-sparse-arrays": "error",
|
|
66
|
+
"no-this-before-super": "error",
|
|
67
|
+
"no-unassigned-vars": "error",
|
|
68
|
+
"no-unreachable": "error",
|
|
69
|
+
"no-unsafe-finally": "error",
|
|
70
|
+
"no-unsafe-negation": "error",
|
|
71
|
+
"no-unsafe-optional-chaining": "error",
|
|
72
|
+
"no-unused-labels": "error",
|
|
73
|
+
"no-unused-private-class-members": "error",
|
|
74
|
+
"no-unused-vars": "error",
|
|
75
|
+
"no-useless-backreference": "error",
|
|
76
|
+
"no-useless-catch": "error",
|
|
77
|
+
"no-useless-escape": "error",
|
|
78
|
+
"no-with": "error",
|
|
79
|
+
"preserve-caught-error": "error",
|
|
80
|
+
"require-yield": "error",
|
|
81
|
+
"use-isnan": "error",
|
|
82
|
+
"valid-typeof": "error",
|
|
83
|
+
"no-array-constructor": "error",
|
|
84
|
+
"no-unused-expressions": "error",
|
|
85
|
+
"typescript/ban-ts-comment": "error",
|
|
86
|
+
"typescript/no-duplicate-enum-values": "error",
|
|
87
|
+
"typescript/no-empty-object-type": "error",
|
|
88
|
+
"typescript/no-explicit-any": "error",
|
|
89
|
+
"typescript/no-extra-non-null-assertion": "error",
|
|
90
|
+
"typescript/no-misused-new": "error",
|
|
91
|
+
"typescript/no-namespace": "error",
|
|
92
|
+
"typescript/no-non-null-asserted-optional-chain": "error",
|
|
93
|
+
"typescript/no-require-imports": "error",
|
|
94
|
+
"typescript/no-this-alias": "error",
|
|
95
|
+
"typescript/no-unnecessary-type-constraint": "error",
|
|
96
|
+
"typescript/no-unsafe-declaration-merging": "error",
|
|
97
|
+
"typescript/no-unsafe-function-type": "error",
|
|
98
|
+
"typescript/no-wrapper-object-types": "error",
|
|
99
|
+
"typescript/prefer-as-const": "error",
|
|
100
|
+
"typescript/prefer-namespace-keyword": "error",
|
|
101
|
+
"typescript/triple-slash-reference": "error"
|
|
102
|
+
},
|
|
103
|
+
"overrides": [
|
|
104
|
+
{
|
|
105
|
+
"files": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
|
|
106
|
+
"rules": {
|
|
107
|
+
"constructor-super": "off",
|
|
108
|
+
"getter-return": "off",
|
|
109
|
+
"no-class-assign": "off",
|
|
110
|
+
"no-const-assign": "off",
|
|
111
|
+
"no-dupe-class-members": "off",
|
|
112
|
+
"no-dupe-keys": "off",
|
|
113
|
+
"no-func-assign": "off",
|
|
114
|
+
"no-import-assign": "off",
|
|
115
|
+
"no-new-native-nonconstructor": "off",
|
|
116
|
+
"no-obj-calls": "off",
|
|
117
|
+
"no-redeclare": "off",
|
|
118
|
+
"no-setter-return": "off",
|
|
119
|
+
"no-this-before-super": "off",
|
|
120
|
+
"no-unreachable": "off",
|
|
121
|
+
"no-unsafe-negation": "off",
|
|
122
|
+
"no-var": "error",
|
|
123
|
+
"no-with": "off",
|
|
124
|
+
"prefer-const": "error",
|
|
125
|
+
"prefer-rest-params": "error",
|
|
126
|
+
"prefer-spread": "error"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"files": ["**/*.{ts,tsx,js,jsx}"],
|
|
131
|
+
"rules": {
|
|
132
|
+
"simple-import-sort/imports": "error",
|
|
133
|
+
"simple-import-sort/exports": "error",
|
|
134
|
+
"check-file/filename-naming-convention": [
|
|
135
|
+
"error",
|
|
136
|
+
{
|
|
137
|
+
"**/!(App).{ts,tsx}": "KEBAB_CASE"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"ignoreMiddleExtensions": true
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"check-file/folder-naming-convention": [
|
|
144
|
+
"error",
|
|
145
|
+
{
|
|
146
|
+
"src/**/!(__tests__)/": "KEBAB_CASE"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"no-unused-vars": [
|
|
150
|
+
"error",
|
|
151
|
+
{
|
|
152
|
+
"varsIgnorePattern": "^_",
|
|
153
|
+
"argsIgnorePattern": "^_"
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"react/rules-of-hooks": "error",
|
|
157
|
+
"react/exhaustive-deps": "warn",
|
|
158
|
+
"react/static-components": "error",
|
|
159
|
+
"react/use-memo": "error",
|
|
160
|
+
"react/preserve-manual-memoization": "error",
|
|
161
|
+
"react/incompatible-library": "warn",
|
|
162
|
+
"react/immutability": "error",
|
|
163
|
+
"react/globals": "error",
|
|
164
|
+
"react/refs": "error",
|
|
165
|
+
"react/set-state-in-effect": "error",
|
|
166
|
+
"react/error-boundaries": "error",
|
|
167
|
+
"react/purity": "error",
|
|
168
|
+
"react/set-state-in-render": "error",
|
|
169
|
+
"react/unsupported-syntax": "warn",
|
|
170
|
+
"react/only-export-components": [
|
|
171
|
+
"warn",
|
|
172
|
+
{
|
|
173
|
+
"allowConstantExport": true
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
"jsPlugins": [
|
|
178
|
+
"eslint-plugin-simple-import-sort",
|
|
179
|
+
"eslint-plugin-check-file"
|
|
180
|
+
],
|
|
181
|
+
"plugins": ["react"],
|
|
182
|
+
"env": {
|
|
183
|
+
"browser": true
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"files": ["**/*.test.{ts,tsx}", "**/*.spec.{ts,tsx}"],
|
|
188
|
+
"rules": {
|
|
189
|
+
"vitest/expect-expect": "error",
|
|
190
|
+
"vitest/no-identical-title": "error",
|
|
191
|
+
"vitest/no-commented-out-tests": "error",
|
|
192
|
+
"vitest/valid-title": "error",
|
|
193
|
+
"vitest/valid-expect": "error",
|
|
194
|
+
"vitest/valid-describe-callback": "error",
|
|
195
|
+
"vitest/require-local-test-context-for-concurrent-snapshots": "error",
|
|
196
|
+
"vitest/no-import-node-test": "error",
|
|
197
|
+
"vitest/no-focused-tests": "error"
|
|
198
|
+
},
|
|
199
|
+
"plugins": ["vitest"]
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"files": [
|
|
203
|
+
"*.config.{js,mjs,cjs,ts}",
|
|
204
|
+
"vite.config.ts",
|
|
205
|
+
"vitest.config.ts",
|
|
206
|
+
"playwright.config.ts"
|
|
207
|
+
],
|
|
208
|
+
"env": {
|
|
209
|
+
"node": true
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
}
|
|
@@ -6,16 +6,9 @@ scaffold = ""
|
|
|
6
6
|
|
|
7
7
|
[dependencies.dev]
|
|
8
8
|
packages = [
|
|
9
|
-
"
|
|
10
|
-
"eslint-config-prettier",
|
|
9
|
+
"oxlint@1.87.0",
|
|
11
10
|
"eslint-plugin-check-file",
|
|
12
|
-
"eslint-plugin-react-hooks",
|
|
13
|
-
"eslint-plugin-react-refresh",
|
|
14
11
|
"eslint-plugin-simple-import-sort",
|
|
15
|
-
"eslint-plugin-vitest",
|
|
16
|
-
"globals",
|
|
17
|
-
"typescript-eslint",
|
|
18
|
-
"@eslint/js",
|
|
19
12
|
"typescript@^6",
|
|
20
13
|
"react",
|
|
21
14
|
"react-dom",
|
|
@@ -32,12 +25,9 @@ packages = [
|
|
|
32
25
|
"@playwright/test",
|
|
33
26
|
"tailwindcss",
|
|
34
27
|
"@tailwindcss/vite",
|
|
35
|
-
"prettier-plugin-tailwindcss",
|
|
36
28
|
]
|
|
37
29
|
|
|
38
30
|
[scripts]
|
|
39
|
-
"lint" = "eslint . --max-warnings 0"
|
|
40
|
-
"lint:fix" = "eslint . --fix --max-warnings 0"
|
|
41
31
|
"test" = "vitest"
|
|
42
32
|
"test:run" = "vitest run --reporter=verbose"
|
|
43
33
|
"test:ui" = "vitest --ui"
|
|
@@ -50,12 +40,18 @@ packages = [
|
|
|
50
40
|
"smoke:prod" = "bun e2e/screenshot.ts --check-console-clean --require-base-url"
|
|
51
41
|
|
|
52
42
|
[scripts.override]
|
|
53
|
-
"lint" = "
|
|
43
|
+
"lint" = "oxlint --max-warnings 0"
|
|
44
|
+
"lint:fix" = "oxlint --fix --max-warnings 0"
|
|
54
45
|
"screenshot" = "PREVIEW_PORT=$(bash scripts/worktree-port.sh 4173) && export PREVIEW_PORT && bash scripts/screenshot.sh"
|
|
55
46
|
"readme-screenshot" = "PREVIEW_PORT=$(bash scripts/worktree-port.sh 4173) && export PREVIEW_PORT && bash scripts/readme-screenshot.sh"
|
|
56
47
|
|
|
57
48
|
[gitignore]
|
|
58
49
|
"# Build" = ["dist/"]
|
|
59
50
|
"# Coverage" = ["coverage/"]
|
|
60
|
-
"# Playwright" = [
|
|
51
|
+
"# Playwright" = [
|
|
52
|
+
"test-results/",
|
|
53
|
+
"playwright-report/",
|
|
54
|
+
"blob-report/",
|
|
55
|
+
"playwright/.cache/",
|
|
56
|
+
]
|
|
61
57
|
"# Screenshots" = ["screenshots/"]
|
package/tooling/web/reference.md
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
The web layer covers web-universal tooling shared across Vite + React, Astro, and any future web stack. It ships golden configs for
|
|
7
|
+
The web layer covers web-universal tooling shared across Vite + React, Astro, and any future web stack. It ships golden configs for oxlint, Vitest, Playwright, Tailwind v4, screenshots, VS Code integration, and CI. Framework-specific wiring (Vite plugins, Astro islands, Next.js config) lives in per-stack adapter folders that extend this layer.
|
|
8
8
|
|
|
9
9
|
## What ships as golden configs
|
|
10
10
|
|
|
11
11
|
Golden config files live in `tooling/web/configs/` and are copied into the target on `canon tooling sync web . --write`, replacing whatever sits at those paths. They are the source of truth. The reference covers rationale and tradeoffs. Configs show the concrete setup.
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- `.oxlintrc.json`: migrated from the ESLint config it replaced. Runs the recommended JS and TypeScript rules, the React hooks and refresh rules, test-scoped vitest rules plus `no-focused-tests`, and `check-file` and `simple-import-sort` as JS plugins.
|
|
14
14
|
- `src/test/setup.ts`: `@testing-library/jest-dom/vitest` import, `cleanup` after each test.
|
|
15
15
|
- `e2e/screenshot.ts`: capture template. A single `CASES` record at the top carries one entry per output file, each naming a section, a theme, and a route, and the loop below crosses every case with the `VIEWPORTS` array and writes `screenshots/<hostname>/<section>/<width>--<theme>.png`, keyed on `SCREENSHOT_BASE_URL`'s hostname so a local and a deployed run land in different folders. `VIEWPORTS` holds four breakpoint buckets named by width, 320, 768, 1280 and 1536, with 320 as the base a page has to hold without wrapping or clipping. A case flagged `evidence: true` additionally writes `evidence/<section>/<width>--<theme>.png`, with no hostname segment, at the viewports flagged `evidence` alone, which are 320 and 1280. Committing all four multiplies the tracked frames by the width count, so the flag is what keeps the tracked set at twice the sections rather than four times. A case may name `excludeViewports` to skip a width, for a route whose long-form prose reflows at 320 instead of breaking. `SCREENSHOT_FILTER` narrows a run to the cases whose label, `<section>/<width>--<theme>`, contains any comma-separated term, exits 1 when nothing matches and lists the labels that exist, and leaves the rest of the sweep alone. `--require-base-url` skips a flagged case entirely, so a production smoke run neither writes to the committed path nor counts an evidence route in its console-clean check, and exits 1 when that leaves zero cases run, so flagging every case cannot silence the production check without saying so. Per-project cases extend the one record. A route's widths and themes sit together under its section folder, so the filename carries both. A case may also name `sections`, one `{ name, selector }` per addressable part of the route, and each writes its own frame at `screenshots/<hostname>/<section>/<name>/<width>--<theme>.png` beside the whole-page one, plus `evidence/<section>/<name>/<width>--<theme>.png` where the case is flagged and the width carries `evidence`. The field is optional, so a case that names none captures the page alone as before, and a selector matching nothing is reported and skipped rather than raised, since `CASES` is a template a project rewrites and a target that syncs this file before editing its own list would otherwise capture nothing at all. Testing that every named section resolves belongs to the project that owns the selectors, beside its own page. A case may also name `mask`, a list of selectors whose boxes are painted over in every frame the case writes, whole-page and section alike, for a value that moves between runs with no code change, so a double capture still compares everything else. A mask selector matching nothing is reported and skipped the same way. Every case settles before anything is shot: the context is created with `reducedMotion: 'reduce'`, each named section is scrolled into view so an `IntersectionObserver` fires and a frame marked `loading="lazy"` loads, the page returns to the top, and fonts, images and same-origin frames are waited out on a bounded condition rather than on a second `networkidle`, which is a lifecycle event of the navigation and does not re-arm for a load a scroll started. A section frame drops the page's floating chrome, being whatever computes to `position: sticky` or `fixed`, because a section taller than the viewport is scrolled into view to be cut and a sticky bar otherwise rides that scroll into the middle of the frame. The whole-page frame is shot first and keeps its chrome. `--check-console-clean` collects `console`-level error messages per case and exits 1 with the list if any fired, turning the capture into a smoke check. `--require-base-url` exits 1 before launching a browser when `SCREENSHOT_BASE_URL` is unset, guarding a script meant to run against a real deployment from silently capturing `localhost`.
|
|
16
16
|
- `scripts/screenshot.sh`: sources `scripts/lib/preview-server.sh`, then runs the capture against the served preview.
|
|
@@ -54,9 +54,8 @@ Two worktrees of one repository run the same stack, so a fixed port makes the se
|
|
|
54
54
|
|
|
55
55
|
Sticky negative knowledge. Do not relearn.
|
|
56
56
|
|
|
57
|
-
- Do NOT use `tsc -b` in a Vite project. Composite mode emits `.js` next to `.ts` and
|
|
58
|
-
- Do NOT
|
|
59
|
-
- Do NOT trust `vite-react`'s scaffolded `lint` script. It ships its own `"lint": "oxlint"` under a bare `.oxlintrc.json`, which runs a different rule set from the stack's ESLint config and never gates on it. `[scripts.override]` forces the stack's own eslint invocation back over it.
|
|
57
|
+
- Do NOT use `tsc -b` in a Vite project. Composite mode emits `.js` next to `.ts` and the linter lints the emitted files. Use `tsc --noEmit`.
|
|
58
|
+
- Do NOT trust `vite-react`'s scaffolded `lint` script. It ships a bare `"lint": "oxlint"`, which exits 0 on warnings. `[scripts.override]` forces `--max-warnings 0` over it, and the golden `.oxlintrc.json` overwrites the scaffold's bare one.
|
|
60
59
|
- Do NOT rely on bare-folder exclude globs like `exclude: ["e2e"]`. Use `"e2e/**/*"`.
|
|
61
60
|
- Do NOT ship Vitest with no-tests-fail. Fresh scaffolds have zero tests. Use `passWithNoTests: true` or equivalent until the project has at least one test.
|
|
62
61
|
- Do NOT put Playwright `trace` at the top level of `defineConfig`. It lives under `use`.
|
|
@@ -68,17 +67,18 @@ Sticky negative knowledge. Do not relearn.
|
|
|
68
67
|
- Unit tests: Vitest with jsdom, globals on, setup file at `src/test/setup.ts`, `@testing-library/react`, `@testing-library/user-event`.
|
|
69
68
|
- E2E: Playwright in `e2e/`. Chromium-only for Chrome extensions, all browsers for web apps.
|
|
70
69
|
- Tailwind: v4 via `@tailwindcss/vite`. Never the v3 integration.
|
|
71
|
-
-
|
|
70
|
+
- Lint: oxlint at an exact pin, since its JS plugin host is alpha and a minor release could break `check-file` or `simple-import-sort`. Astro keeps ESLint, which its own reference covers.
|
|
72
71
|
|
|
73
|
-
##
|
|
72
|
+
## oxlint
|
|
74
73
|
|
|
75
|
-
-
|
|
76
|
-
-
|
|
74
|
+
- Set `lint` and `lint:fix` through `[scripts.override]`, so an already-synced target stops running ESLint on its next sync.
|
|
75
|
+
- Delete a leftover `eslint.config.js` or `eslint.config.mjs`, and `bun remove` the ESLint packages this stack stopped shipping, by hand after that sync. Sync deletes nothing a stack stopped shipping.
|
|
76
|
+
- Keep import sorting on `simple-import-sort` rather than oxfmt's built-in sort, which orders imports differently and would rewrite every import block.
|
|
77
77
|
|
|
78
78
|
## lint-staged (extend)
|
|
79
79
|
|
|
80
|
-
- Add `**/*.{js,jsx,ts,tsx}` glob running `
|
|
81
|
-
- Extend the
|
|
80
|
+
- Add `**/*.{js,jsx,ts,tsx}` glob running `oxlint --fix --max-warnings 0`, and `oxfmt --no-error-on-unmatched-pattern`.
|
|
81
|
+
- Extend the oxfmt glob to include `css`: `**/*.{json,css,md}`.
|
|
82
82
|
|
|
83
83
|
## CI docs (extend)
|
|
84
84
|
|
|
@@ -87,7 +87,7 @@ Extend `canon/context/ci.md` so the `## Checks` table reflects the web jobs. <!-
|
|
|
87
87
|
Append rows:
|
|
88
88
|
|
|
89
89
|
| Typecheck | `bun run typecheck` | framework-specific typecheck passes |
|
|
90
|
-
| Lint | `bun run lint` |
|
|
90
|
+
| Lint | `bun run lint` | oxlint passes with zero warnings |
|
|
91
91
|
| Tests | `bun run test:coverage` | Vitest passes with coverage thresholds |
|
|
92
92
|
| Build | `bun run build` | Production build succeeds |
|
|
93
93
|
| E2E | `bun run test:e2e` | Playwright passes against the built preview |
|
|
@@ -100,8 +100,8 @@ Extend the `development` context entry under `canon/context/` so the `## Scripts
|
|
|
100
100
|
|
|
101
101
|
Append rows:
|
|
102
102
|
|
|
103
|
-
| `bun run lint` | Run
|
|
104
|
-
| `bun run lint:fix` | Auto-fix
|
|
103
|
+
| `bun run lint` | Run oxlint with zero warnings allowed. |
|
|
104
|
+
| `bun run lint:fix` | Auto-fix oxlint issues. |
|
|
105
105
|
| `bun run test` | Run Vitest in watch mode. |
|
|
106
106
|
| `bun run test:run` | Run Vitest once with verbose reporter. |
|
|
107
107
|
| `bun run test:coverage` | Run Vitest with coverage. |
|
package/docs/agents/commands.md
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Command catalog
|
|
3
|
-
description: Every top-level command with its purpose, each domain's subcommands and the page describing them, the browser commands, and the version skew report
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Command catalog
|
|
7
|
-
|
|
8
|
-
Bare `canon --help` lists every top-level command under five headings, Project, Domains, Author and render, Session and ship, and Repo reports, with descriptions cut at 80 columns. A pipe gets the same text without the frame glyphs. Behavior notes for the install and sync verbs live in `install-and-sync.md`.
|
|
9
|
-
|
|
10
|
-
`canon <command> --help` lists subcommands, and `canon <command> <subcommand> --help` a leaf's flags, exit codes, and examples. `canon <command> --help --all` prints both. An unknown subcommand exits 1 under a group taking no operand.
|
|
11
|
-
|
|
12
|
-
## Project-level
|
|
13
|
-
|
|
14
|
-
One row per top-level command, in the order `canon --help` prints them. A domain's subcommands are in `## Domain commands` below.
|
|
15
|
-
|
|
16
|
-
| Command | Purpose |
|
|
17
|
-
| --------------------------- | ------------------------------------------------------------------------------------------ |
|
|
18
|
-
| `canon init [path]` | Bootstrap a project with selected toolkit domains |
|
|
19
|
-
| `canon sync [path]` | Sync every installed domain, or report drift and version skew with `--check` |
|
|
20
|
-
| `canon upgrade` | Reinstall the CLI globally with the package manager the install path names |
|
|
21
|
-
| `canon migrate <verb>` | Move a project off a retired name or layout, reporting the plan until `--write` |
|
|
22
|
-
| `canon targets <verb>` | Report the projects this toolkit installed into |
|
|
23
|
-
| `canon gov <verb>` | Install and sync governance rules, and audit the tree against them |
|
|
24
|
-
| `canon tooling <verb>` | Sync, diff, and verify tooling stacks |
|
|
25
|
-
| `canon claude <verb>` | Install the Claude workflow and audit both skill corpora |
|
|
26
|
-
| `canon wiki <verb>` | Scaffold the wiki pages |
|
|
27
|
-
| `canon indexes <verb>` | Regenerate `index.md` files from sibling frontmatter, or flatten them |
|
|
28
|
-
| `canon docs [topic]` | Emit toolkit reference docs (`list`, or a topic by name) |
|
|
29
|
-
| `canon design <verb>` | Render or regenerate `canon/DESIGN.md` tokens, emit their CSS, install the base stylesheet |
|
|
30
|
-
| `canon slides <verb>` | Render a deck folder of HTML slides, or list the decks |
|
|
31
|
-
| `canon capture [source]` | Render HTML or a URL to PNG and prove each declared font resolved |
|
|
32
|
-
| `canon serve [dir]` | Serve a directory on loopback and print the link that opens it |
|
|
33
|
-
| `canon demo <verb>` | Compile and record a running app |
|
|
34
|
-
| `canon inventory [subject]` | Group every route's elements by one computed property, never gating |
|
|
35
|
-
| `canon drive <url> <run>` | Walk a page through named interactions and measure each state |
|
|
36
|
-
| `canon transcripts <url>` | Fetch a YouTube transcript with metadata frontmatter (needs `yt-dlp`) |
|
|
37
|
-
| `canon teach <verb>` | Open and author learning workspaces |
|
|
38
|
-
| `canon canvas <verb>` | Serve a local canvas of pages and HTML frames, arrange, edit, and capture them |
|
|
39
|
-
| `canon sandbox [cat:cmd]` | Run sandbox scenarios, toolkit-only like the tree it reads |
|
|
40
|
-
| `canon tasks <verb>` | Read and write the task board, the plans it cites, and its archive |
|
|
41
|
-
| `canon intake <verb>` | Report intake folders and write answers into them |
|
|
42
|
-
| `canon records <verb>` | Validate, size, prune, and back up the session records |
|
|
43
|
-
| `canon sessions <verb>` | Resolve live sessions to worktree and branch, and move one between machines |
|
|
44
|
-
| `canon worktrees <verb>` | Report and remove worktrees whose pull request merged |
|
|
45
|
-
| `canon hooks <verb>` | Run the steps a git hook drives |
|
|
46
|
-
| `canon pr <verb>` | Read a pull request's diff, head, checks, and review, and post its evidence |
|
|
47
|
-
| `canon feedback` | Open a GitHub issue from toolkit feedback on stdin, or print the block on failure |
|
|
48
|
-
| `canon audits <verb>` | Run every audit as one set under one verdict against the recorded baseline |
|
|
49
|
-
| `canon gate <verb>` | Run every stage that guards a branch here |
|
|
50
|
-
| `canon secrets <verb>` | Report credential-shaped values in the tree the package ships |
|
|
51
|
-
| `canon deps <verb>` | Report published advisories against the resolved dependency set |
|
|
52
|
-
| `canon labels <verb>` | Read a changed set against the label map, and scan pull request text |
|
|
53
|
-
| `canon comments <verb>` | Measure comment density by language and kind, with a trend from git |
|
|
54
|
-
| `canon context <verb>` | Report context folder health, and classify changed or stale sections |
|
|
55
|
-
| `canon markdown <verb>` | Fail markdown on a banned character or a dead link, and report its structure |
|
|
56
|
-
| `canon census [path]` | Report tracked file count, extensions, and a line total skipping binaries |
|
|
57
|
-
| `canon upstream <verb>` | Read Claude Code releases from a cursor, and list the toolkit's own mechanisms |
|
|
58
|
-
|
|
59
|
-
`canon serve` drives no browser, which is what separates it from the four that do. All four ship now that `capture` does, so the line between them is the engine rather than the package. A generated page loses its script to an editor preview and to a `file://` open, so the link is the delivery rather than a convenience, and every generated surface here reaches a reader through one. A teach lesson's stylesheet is embedded rather than linked, so only its script still needs a server. It binds `127.0.0.1` and never a wildcard, because what it is pointed at is routinely a gitignored record tree. It sends `cache-control: no-store`, since a preview exists to be edited and reloaded and a cached stylesheet reads as a fix that did not work.
|
|
60
|
-
|
|
61
|
-
A port already in use is the ordinary case rather than a refusal, so it walks forward to the next free one and reports which it took. That is why a caller reads `url` off the `--json` record instead of composing one from the port it asked for. Only contention is walked past. Any other bind failure refuses as `bind-failed` carrying the error's code, rather than being retried twenty times and reported as a range being full, which names a cause nothing checked.
|
|
62
|
-
|
|
63
|
-
A request naming a directory is redirected to its trailing-slash form rather than answered in place. A browser resolves a relative asset against the last slash of the URL it is on, so answering `/lesson` directly leaves the page asking for `/course.css` instead of `/lesson/course.css`, and it renders unstyled through the server that exists to prevent exactly that.
|
|
64
|
-
|
|
65
|
-
Containment is tested after symlinks are followed rather than on the path as written, and the test sits immediately before the read rather than beside the request that produced it. Resolving a request lexically clears a link pointing outside the served root, and a link out of the served root is the shape it guards against. Position is what makes the property hold: a directory request appends its index after the request path has been checked, so a check placed earlier leaves that index untested. `--index` answers a directory holding no `index.html` with a listing read per request, where the default stays a 404. Every entry the listing names takes the same containment test a request for it would, so a link out of the root is absent rather than greyed, and dotfiles are hidden. With no `--entry` and no root `index.html`, the printed link is `/` and `entryExists` reads true. An `--entry` that escapes the root refuses with `no-entry` before a port is taken, because `url` is the field a caller hands to a reader.
|
|
66
|
-
|
|
67
|
-
`canon demo` is the second browser command and the one that ships, since its purpose is running in a target rather than regenerating what this repository commits. It needs a browser binary the package does not carry, installed once with `bunx playwright install chromium`.
|
|
68
|
-
|
|
69
|
-
`canon inventory` is the third and takes the same answer for the same reason. It reads `inventory.toml` at the project root for its base URL, its routes, and the element query each subject runs over, so what it walks comes from the project rather than from the toolkit. It reports how many different answers a site gives for one property and never gates, because whether five focus rings across four routes is a defect is a judgment. A missing server and an unmatched query are both refusals rather than empty listings, since a listing with no rows reads as one consistent answer.
|
|
70
|
-
|
|
71
|
-
```toml
|
|
72
|
-
base-url = "http://localhost:4173"
|
|
73
|
-
routes = ["/", "/pricing", "/docs"]
|
|
74
|
-
|
|
75
|
-
[subjects.focus]
|
|
76
|
-
query = "button, a[href], input, select, textarea, [tabindex]"
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
`canon drive` is the fourth and ships for the same reason the three before it do. What separates it from all three is the axis rather than the destination: `capture` and `inventory` each answer about a page as it loads, and every defect that exists only after a menu opens or the page scrolls is invisible to both. It takes a JSON run file naming the viewport, the probes, and the interaction sequence, since a route catalog is state a project holds and an interaction sequence is a script written for one question. Viewport heights are never defaulted, because the heights a defect hides at belong to the layout rather than to this command. It reports findings and never gates, since every probe it ships carries a class of false finding a throwaway version already produced. See `driver.md`.
|
|
80
|
-
|
|
81
|
-
## Domain commands
|
|
82
|
-
|
|
83
|
-
Each domain exposes a consistent shape where applicable: `list`, `install`, `sync`, `create`. The page named beside a domain carries its flags, records, and refusals, and `canon <domain> --help --all` prints every subcommand's flags.
|
|
84
|
-
|
|
85
|
-
- **`migrate`**, in `migrate.md`: `rename`, `skill-names`, `records`, `surface-roots`, `record-tree`, `rule-layout`, `scratch-evidence`, `record-layout`
|
|
86
|
-
- **`targets`**, in `targets.md`: `list`, `pulls`
|
|
87
|
-
- **`gov`**, in `install-and-sync.md`: `list`, `install`, `sync`, `build`, `regen`, `detect` (in `gov-detect.md`), `test-order`, `counts`, `superseded`, `citations`, `restated`
|
|
88
|
-
- **`tooling`**, in `install-and-sync.md`: `list`, `sync`, `diff`, `reference`, `verify`, `inject`, `prune-gitignore`
|
|
89
|
-
- **`claude`**, in `skills-audit.md`: `init`, `sync`, `setup`, `routing`, `plugin-update`, `seeds list`, `skills list`, `skills audit`, `skills drift`, `skills reach`, `skills rank`
|
|
90
|
-
- **`wiki`**, in `scripting.md`: `init`
|
|
91
|
-
- **`indexes`**, in `indexes.md`: `regen`, `list`
|
|
92
|
-
- **`docs`**, in `docs.md`: `list`, `<topic>`
|
|
93
|
-
- **`design`**, in `install-and-sync.md` for `install`, `sync`, and `fonts`, and below for the rest: `render`, `regen`, `css`, `install`, `sync`, `fonts`
|
|
94
|
-
- **`slides`**, described below: `render`, `list`
|
|
95
|
-
- **`demo`**, in `demo.md`: `compile`, `run`, `frames`
|
|
96
|
-
- **`inventory`**, described above: `run`
|
|
97
|
-
- **`teach`**, in `teach.md`: `list`, `up`, `open`, `resource`, `glossary`, `lesson`, `stylesheet`, `nav`, `render`
|
|
98
|
-
- **`canvas`**, described below: `serve`, `list`, `page add`, `page rename`, `frame add`, `frame move`, `frame resize`, `fit`, `arrange`, `selection`, `edit`, `editing`, `capture`
|
|
99
|
-
- **`sandbox`**, in `sandbox.md`: `run`, `equivalence`, `reset`, `clean`, `check`, `coverage`
|
|
100
|
-
- **`tasks`**, in `tasks.md`: `next-label`, `archive`, `decline`, `plan-citations`, `plan-answers`, `plan-branch`, `plan-reach`, `plan-link`, `pull-request`, `outcome`, `list`, `validate`
|
|
101
|
-
- **`intake`**, in `intake.md`: `list`, `answer`
|
|
102
|
-
- **`records`**, in `records.md`: `validate`, `ordinal`, `size`, `stale`, `prune-tmp`, `push`, `pull`
|
|
103
|
-
- **`sessions`**, in `sessions.md`: `list`, `export`, `import`
|
|
104
|
-
- **`worktrees`**, in `worktrees.md`: `list`, `reclaim`, `repair-bare-flag` (hidden)
|
|
105
|
-
- **`hooks`**, in `hooks.md`: `post-merge`
|
|
106
|
-
- **`pr`**, in `pr-reads.md`: `key-changes`, `head`, `checks`, `review-state`, `evidence`, `preview`, `local`, `frames`, `lift` (in `pr-lift.md`), `tick` (in `pr-tick.md`)
|
|
107
|
-
- **`upstream`**, in `upstream.md`: `fetch`, `catalog`, `due`, `advance`
|
|
108
|
-
- **`audits`**, in `audits.md`: `run`, `list`
|
|
109
|
-
- **`gate`**, in `gate.md`: `run`
|
|
110
|
-
- **`secrets`**, in `state-scoped-risk.md`: `scan`
|
|
111
|
-
- **`deps`**, in `state-scoped-risk.md`: `audit`
|
|
112
|
-
- **`labels`**, in `label-coverage.md`: `audit`, `apply`, `scan`
|
|
113
|
-
- **`comments`**, in `comments.md`: `scan`
|
|
114
|
-
- **`context`**, in `context-audit.md`: `audit`, `classify diff`, `classify sweep`, `classifier show`, `classifier set`
|
|
115
|
-
- **`markdown`**, in `markdown-audit.md`: `audit`
|
|
116
|
-
|
|
117
|
-
Common patterns:
|
|
118
|
-
|
|
119
|
-
- **`list --json`** → machine-readable catalog on stdout.
|
|
120
|
-
- **`install <name> <path>`** → install a specific entry into a target project.
|
|
121
|
-
- **`sync <path>`** → reapply all installed entries in a target project.
|
|
122
|
-
- **`create [name]`** → scaffold a new authoring entry in this repo.
|
|
123
|
-
|
|
124
|
-
Subcommands no other page describes:
|
|
125
|
-
|
|
126
|
-
- **`claude plugin-update`** matches the installed marketplace plugin against `claude/.claude-plugin/plugin.json`'s own name and runs `claude plugin update` on it, reading the version back off `claude plugin list --json`, since the update call reports none of its own (`--json`).
|
|
127
|
-
- **`claude skills rank`** scores either skill corpus's descriptions against a case corpus by TF-IDF cosine similarity, reporting rank-one and top-three (`--cases <path>`).
|
|
128
|
-
- **`design regen`** rewrites this repository's `canon/DESIGN.md` from `src/design/tokens.ts` and `src/design/base.css` from `src/design/neutral.ts`. `design css` emits the tokens and components as CSS on stdout, with `--no-components` for properties alone, and `design render` declares each vendored face the typography table names under `--embed-fonts`.
|
|
129
|
-
- **`slides list --json`** emits one row per deck under `.canon/slides/`, carrying `name`, `title`, `slides`, and `path`.
|
|
130
|
-
- **`slides render [deck]`** takes a deck name or a folder, defaulting to the only deck, and lays out each `.html` file in filename order in Chromium at 1280 by 720 and rebuilds it as editable shapes. Each element drawn as a picture prints one `✗` line on stderr naming the slide, the selector, and the properties that forced it. A link left out, being a `#slide-N` past the deck's end or any target that is neither that nor an absolute URL, prints one too, and the exit stays 0.
|
|
131
|
-
- **`slides.md`** describes a deck folder's `deck.json` and the faces it embeds, its per-slide `<body>` attributes, transitions and entrances, speaker notes, and charts.
|
|
132
|
-
- **`canvas`**, with its verbs, content format, and write routes, is described in `canvas.md`.
|
|
133
|
-
- **`labels apply <number>`** adds the labels this branch earns to its open pull request, refusing a pull request whose head is not the current branch or that is not open, and never creating a label the remote lacks or removing one a person added (`--check` writes nothing and exits 2 when labels are owed, `--base`, `--json`).
|
|
134
|
-
- **`labels scan`** fails a pull request or a posted review whose title, body, or review comment carries a phase label, a label a code span quotes, a gitignored record path, a session link, a banned character, a body heading outside the closed section list or a missing `## Summary` or `## Key changes`, or a title breaking `claude/skills/git-pr/references/pr.md`'s format, casing, or length rule (`--event`, `--body-file`, `--json`).
|
|
135
|
-
|
|
136
|
-
## Version skew
|
|
137
|
-
|
|
138
|
-
`canon sync --check` and `canon claude skills drift` are the two moments a
|
|
139
|
-
target already stops to reconcile with the toolkit, so each reports the
|
|
140
|
-
installed version against the newest published one. No other command performs
|
|
141
|
-
the lookup, which keeps a registry round trip out of the catalog reads an agent
|
|
142
|
-
runs in a loop.
|
|
143
|
-
|
|
144
|
-
The report carries three states and never changes an exit code. `behind` names
|
|
145
|
-
`canon upgrade` as the remedy, `current` says so, and `unknown` carries the
|
|
146
|
-
reason the registry could not be reached. Branch on the `skew.state` field in
|
|
147
|
-
the JSON record rather than on the exit, since an offline machine has to read as
|
|
148
|
-
unmeasured rather than as a failing check.
|
|
149
|
-
|
|
150
|
-
`canon upgrade --json` carries one further state, `pending`, that the skew
|
|
151
|
-
report does not: the working directory's checkout holds a release npm does not
|
|
152
|
-
serve yet, so there is nothing to install. The record names it in `checkout`
|
|
153
|
-
beside `latest`, exits 0, and its `message` starts `CLI stays at`. Outside a
|
|
154
|
-
canon checkout it never reads `pending`.
|
package/docs/agents/docs.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Docs
|
|
3
|
-
description: How canon docs resolves the toolkit's own reference surface from an install root, and how a split domain is named
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Docs
|
|
7
|
-
|
|
8
|
-
`canon docs` emits the toolkit's own reference docs so an agent in a target project can orient without the toolkit source checked out. The CLI resolves `docs/` and `canon/context/` from its install root, and which of the two it finds depends on how the CLI was installed. A registry install carries `docs/` alone, since `.claude/` is not published. A clone or a linked worktree carries both.
|
|
9
|
-
|
|
10
|
-
- `canon docs list [--json]` lists the downstream catalog: the consumer-facing `docs/` surface plus per-domain narrative from `canon/context/` when that root is present. Toolkit-internal context entries (`ci`, `development`, `sandbox`) are dropped. From a registry install the context section is absent rather than empty.
|
|
11
|
-
- `canon docs <topic>` prints one doc to stdout, resolved by exact name from `docs/` first, then `canon/context/`. Any doc the install carries is reachable by name, including the toolkit-internal topics the list omits.
|
|
12
|
-
|
|
13
|
-
## How a name resolves
|
|
14
|
-
|
|
15
|
-
A domain too large for one file splits into `<domain>/` with a generated `index.md`, and both verbs name it by the folder. `canon docs <domain>` prints that index, which is the catalog routing to the sub-area files, and the listing describes it from the index's `subtitle` where a sibling file supplies `description`. A folder carrying no `index.md` is absent from both, since a catalog is what makes the sub-areas reachable, and so are the files inside it.
|
|
16
|
-
|
|
17
|
-
A sub-area file resolves by its bare name too, so `canon docs operating-model` reaches `docs/workflow/operating-model.md`. Three spellings are tried in order, being a sibling file, a folder of that name, then a sub-area file one level down, and each spelling is tried across both roots before the next one runs. A sibling file therefore wins over a folder of the same name, and both win over a sub-area file. Reading the folder last is what keeps the sub-area spelling from changing any name that resolved before it existed.
|
|
18
|
-
|
|
19
|
-
The sub-area spelling keeps the root order too. The first root whose folders carry the name answers, so `canon docs indexes` reaches `docs/agents/indexes.md` even though a context folder holds an entry of the same name. A bare name carried by two folders of that one root resolves to neither, which names the available topics and exits 1 rather than answering with whichever folder sorts first.
|
|
20
|
-
|
|
21
|
-
`canon docs list` stops at the folder where `canon docs <topic>` goes on to name each file inside it. The listing is the downstream catalog rather than the index of what a name reaches, so a sub-area file appears there only where it declares a target-facing `category` of its own, and no sub-area file of the context root appears at all. A name that resolves and does not list is the divergence the toolkit-internal topics already carry.
|
|
22
|
-
|
|
23
|
-
## Output
|
|
24
|
-
|
|
25
|
-
Data prints to stdout and the frame to stderr, so `canon docs <topic> > out.md` captures clean markdown. With no topic and no verb, `canon docs` runs `list`. An unknown topic names the available topics on stderr and exits 1.
|
|
26
|
-
|
|
27
|
-
Only a `---` block opening on the first line counts as frontmatter, so a document body carrying horizontal rules emits whole.
|