@erclx/canon 4.117.0 → 4.119.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.
Files changed (84) hide show
  1. package/claude/.claude-plugin/plugin.json +1 -1
  2. package/claude/skills/canon-operator/SKILL.md +1 -1
  3. package/claude/skills/canon-rollout/SKILL.md +2 -2
  4. package/claude/skills/design-extract/SKILL.md +1 -1
  5. package/claude/skills/docs-fold/SKILL.md +2 -2
  6. package/claude/skills/draft-ready/REQUIREMENT.md +1 -1
  7. package/claude/skills/draft-ready/SKILL.md +1 -1
  8. package/claude/skills/draft-ready/references/assembly.md +8 -0
  9. package/claude/skills/draft-screencast/SKILL.md +1 -1
  10. package/claude/skills/git-pr/SKILL.md +5 -3
  11. package/claude/skills/memory-capture/SKILL.md +3 -3
  12. package/claude/skills/memory-review/SKILL.md +3 -3
  13. package/claude/skills/plan-feature/REQUIREMENT.md +1 -0
  14. package/claude/skills/plan-feature/SKILL.md +8 -1
  15. package/claude/skills/review-branch/SKILL.md +1 -1
  16. package/claude/skills/review-pr/REQUIREMENT.md +1 -0
  17. package/claude/skills/review-pr/SKILL.md +4 -2
  18. package/claude/skills/role-planner/SKILL.md +1 -1
  19. package/claude/skills/role-worker/REQUIREMENT.md +1 -1
  20. package/claude/skills/role-worker/SKILL.md +10 -41
  21. package/claude/skills/seed-sync/SKILL.md +1 -1
  22. package/claude/skills/session-compact/SKILL.md +1 -1
  23. package/claude/skills/session-map/SKILL.md +1 -1
  24. package/claude/skills/session-relay/REQUIREMENT.md +7 -1
  25. package/claude/skills/session-relay/SKILL.md +4 -7
  26. package/claude/skills/session-worktree/REQUIREMENT.md +5 -1
  27. package/claude/skills/session-worktree/SKILL.md +7 -1
  28. package/claude/skills/session-worktree/references/main-root-writes.md +24 -0
  29. package/claude/skills/target-check/references/domains.md +1 -1
  30. package/claude/skills/task-board/SKILL.md +4 -3
  31. package/claude/skills/teach-workspace/SKILL.md +4 -4
  32. package/claude/skills/ui-checklist/SKILL.md +1 -1
  33. package/claude/skills/ux-audit/SKILL.md +1 -1
  34. package/claude/skills/ux-measure/SKILL.md +1 -1
  35. package/claude/skills/ux-walkthrough/references/relay.md +1 -1
  36. package/docs/agents/commands.md +3 -3
  37. package/docs/agents/context-audit-checks.md +2 -28
  38. package/docs/agents/context-audit.md +1 -1
  39. package/docs/agents/install-and-sync.md +28 -17
  40. package/docs/agents/tasks.md +4 -4
  41. package/docs/target-projects.md +2 -2
  42. package/docs/workflow/ai-workflow.md +9 -9
  43. package/docs/workflow/operating-model.md +1 -1
  44. package/docs/workflow/visual-design-workflow.md +2 -2
  45. package/governance/renames.toml +13 -0
  46. package/governance/rules/claude/510-context.md +0 -12
  47. package/governance/rules/core/005-behavior.md +1 -2
  48. package/governance/rules/core/015-output.md +1 -3
  49. package/governance/rules/core/035-tasks.md +1 -3
  50. package/governance/rules/core/045-memory.md +0 -1
  51. package/governance/rules/core/055-scratch.md +2 -4
  52. package/governance/rules/core/070-planning.md +1 -4
  53. package/governance/rules/core/085-worktrees.md +2 -8
  54. package/governance/rules/core/087-git.md +2 -2
  55. package/governance/rules/core/090-code-comments.md +1 -1
  56. package/governance/rules/ui/460-design-taste.md +0 -15
  57. package/package.json +1 -1
  58. package/src/claude/cases/workflow.ts +10 -0
  59. package/src/commands/context.ts +11 -111
  60. package/src/commands/sync.ts +11 -3
  61. package/src/commands/tasks.ts +9 -8
  62. package/src/context/audit.ts +3 -145
  63. package/src/design/base.css +19 -19
  64. package/src/design/board.ts +18 -7
  65. package/src/design/neutral.ts +127 -0
  66. package/src/design/regen.ts +6 -4
  67. package/src/design/tokens.ts +5 -2
  68. package/src/gate/measures.ts +37 -0
  69. package/src/gate/stages.ts +13 -4
  70. package/src/gov/adapter.ts +59 -7
  71. package/src/gov/install.ts +13 -3
  72. package/src/gov/renames.ts +76 -0
  73. package/src/gov/stacks.ts +5 -1
  74. package/src/records/validate.ts +5 -1
  75. package/src/sync/check.ts +25 -4
  76. package/src/sync/engine.ts +154 -10
  77. package/src/sync/stamp.ts +44 -0
  78. package/src/tasks/archive.ts +28 -7
  79. package/src/tasks/record.ts +16 -9
  80. package/src/tasks/validate.ts +3 -1
  81. package/standards/plan.md +24 -1
  82. package/standards/tasks.md +5 -3
  83. package/governance/rules/core/091-channel.md +0 -13
  84. package/src/context/narration.ts +0 -99
@@ -1,99 +0,0 @@
1
- import { existsSync } from 'node:fs'
2
- import { readFile } from 'node:fs/promises'
3
- import { resolve } from 'node:path'
4
-
5
- /**
6
- * The headings a rule carries to publish the two sets.
7
- *
8
- * Discovery is anchored on these rather than on a filename for the reason
9
- * `src/comments/vocabulary.ts` anchors its own: governance rules are numbered,
10
- * and a renumber would empty the sets while the check kept reporting clean.
11
- * Both open with `Narration` so neither loader can read the other's list.
12
- */
13
- export const PRONOUN_HEADING = '## Narration pronouns'
14
- export const VERB_HEADING = '## Narration verbs'
15
-
16
- /**
17
- * Roots searched in order. The installed copy wins over the toolkit source, so
18
- * a target project measures against the rule it actually has rather than one
19
- * only the toolkit carries.
20
- */
21
- const RULE_ROOTS = ['.claude/rules', 'governance/rules']
22
-
23
- export interface NarrationTerms {
24
- /** Back-reference openings, matched at the start of a bullet and cased. */
25
- readonly pronouns: readonly string[]
26
- /** Past-tense verbs, matched anywhere in the bullet and uncased. */
27
- readonly verbs: readonly string[]
28
- }
29
-
30
- /**
31
- * Absent is a distinct state from empty, the split the comment vocabulary
32
- * draws for the same reason: a scan with no terms finds nothing, and reporting
33
- * that as zero findings claims the corpus is clean when nothing was looked for.
34
- */
35
- export type Narration =
36
- | ({ readonly kind: 'loaded'; readonly source: string } & NarrationTerms)
37
- | { readonly kind: 'absent' }
38
-
39
- /** Pulls the backticked terms out of the bullets under one heading. */
40
- export function parseTerms(
41
- markdown: string,
42
- heading: string,
43
- ): string[] | undefined {
44
- const lines = markdown.split('\n')
45
- const start = lines.findIndex((line) => line.trim() === heading)
46
- if (start === -1) return undefined
47
-
48
- const terms: string[] = []
49
-
50
- for (const line of lines.slice(start + 1)) {
51
- if (line.startsWith('## ')) break
52
- for (const match of line.matchAll(/`([^`]+)`/g)) {
53
- const term = match[1].trim()
54
- if (term && !terms.includes(term)) terms.push(term)
55
- }
56
- }
57
-
58
- return terms
59
- }
60
-
61
- /**
62
- * Finds the rule publishing both sets under `root`.
63
- *
64
- * Both come from one file rather than from whichever rule carries each. A
65
- * pronoun set and a verb set are halves of one signal, and pairing them across
66
- * files would let a renumber recombine them into a signal nobody wrote.
67
- */
68
- export async function loadNarration(root: string): Promise<Narration> {
69
- for (const ruleRoot of RULE_ROOTS) {
70
- const dir = resolve(root, ruleRoot)
71
- if (!existsSync(dir)) continue
72
-
73
- const paths: string[] = []
74
- for await (const rel of new Bun.Glob('**/*.md').scan({
75
- cwd: dir,
76
- onlyFiles: true,
77
- })) {
78
- paths.push(rel)
79
- }
80
- paths.sort()
81
-
82
- for (const rel of paths) {
83
- const source = await readFile(resolve(dir, rel), 'utf8')
84
- const pronouns = parseTerms(source, PRONOUN_HEADING)
85
- const verbs = parseTerms(source, VERB_HEADING)
86
-
87
- if (pronouns && verbs && pronouns.length > 0 && verbs.length > 0) {
88
- return {
89
- kind: 'loaded',
90
- source: `${ruleRoot}/${rel}`,
91
- pronouns,
92
- verbs,
93
- }
94
- }
95
- }
96
- }
97
-
98
- return { kind: 'absent' }
99
- }