@erclx/canon 5.45.0 → 5.47.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/api-design/REQUIREMENT.md +15 -31
- package/claude/skills/auto-ship/REQUIREMENT.md +14 -25
- package/claude/skills/backlog-triage/REQUIREMENT.md +12 -23
- package/claude/skills/build-in-slices/REQUIREMENT.md +15 -25
- package/claude/skills/canon-cli/REQUIREMENT.md +15 -27
- package/claude/skills/canon-feedback/REQUIREMENT.md +10 -18
- package/claude/skills/canon-feedback-triage/REQUIREMENT.md +10 -15
- package/claude/skills/canvas-board/REQUIREMENT.md +14 -28
- package/claude/skills/ci-workflow/REQUIREMENT.md +12 -21
- package/claude/skills/code-craft/REQUIREMENT.md +14 -28
- package/claude/skills/codebase-layout/REQUIREMENT.md +14 -31
- package/claude/skills/context-fold/REQUIREMENT.md +15 -39
- package/claude/skills/context-fold/references/context.md +3 -3
- package/claude/skills/create-rule/REQUIREMENT.md +10 -24
- package/claude/skills/create-rule/SKILL.md +3 -0
- package/claude/skills/create-skill/REQUIREMENT.md +10 -21
- package/claude/skills/decision-escalate/REQUIREMENT.md +12 -24
- package/claude/skills/deploy-app/REQUIREMENT.md +12 -22
- package/claude/skills/deprecation-migration/REQUIREMENT.md +14 -42
- package/claude/skills/design-identity/REQUIREMENT.md +14 -20
- package/claude/skills/design-taste/REQUIREMENT.md +16 -57
- package/claude/skills/docs-sync/REQUIREMENT.md +14 -23
- package/claude/skills/document-health/REQUIREMENT.md +15 -29
- package/claude/skills/document-health/SKILL.md +2 -2
- package/claude/skills/document-repair/REQUIREMENT.md +32 -0
- package/claude/skills/document-repair/SKILL.md +76 -0
- package/claude/skills/document-repair/references/batches.md +44 -0
- package/claude/skills/draft-and-pick/REQUIREMENT.md +4 -3
- package/claude/skills/draft-doc/REQUIREMENT.md +4 -3
- package/claude/skills/draft-figure/REQUIREMENT.md +4 -3
- package/claude/skills/draft-identity/REQUIREMENT.md +4 -3
- package/claude/skills/draft-ready/REQUIREMENT.md +4 -3
- package/claude/skills/draft-screencast/REQUIREMENT.md +4 -3
- package/claude/skills/draft-slides/REQUIREMENT.md +4 -3
- package/claude/skills/draw-figure/REQUIREMENT.md +15 -39
- package/claude/skills/git-branch/REQUIREMENT.md +12 -26
- package/claude/skills/git-commit/REQUIREMENT.md +11 -15
- package/claude/skills/git-followup/REQUIREMENT.md +11 -22
- package/claude/skills/git-followup/SKILL.md +1 -0
- package/claude/skills/git-issue/REQUIREMENT.md +9 -15
- package/claude/skills/git-pr/REQUIREMENT.md +13 -32
- package/claude/skills/git-pr/SKILL.md +11 -2
- package/claude/skills/git-pr/references/closing-issues.md +47 -0
- package/claude/skills/git-pr/references/pr.md +62 -7
- package/claude/skills/git-ship/REQUIREMENT.md +13 -26
- package/claude/skills/git-split/REQUIREMENT.md +10 -17
- package/claude/skills/git-stage/REQUIREMENT.md +12 -18
- package/claude/skills/git-worktree/REQUIREMENT.md +15 -19
- package/claude/skills/make-deck/REQUIREMENT.md +13 -21
- package/claude/skills/markdown-craft/REQUIREMENT.md +9 -3
- package/claude/skills/plan-feature/REQUIREMENT.md +15 -24
- package/claude/skills/plan-groundwork/REQUIREMENT.md +12 -28
- package/claude/skills/plan-groundwork/SKILL.md +5 -2
- package/claude/skills/plan-groundwork/references/output.md +47 -1
- package/claude/skills/plan-intake/REQUIREMENT.md +11 -26
- package/claude/skills/plan-intake/references/intake.md +2 -2
- package/claude/skills/plan-intake-answer/REQUIREMENT.md +14 -29
- package/claude/skills/plan-intake-answer/SKILL.md +7 -1
- package/claude/skills/plan-ready/REQUIREMENT.md +17 -36
- package/claude/skills/pr-evidence/REQUIREMENT.md +11 -17
- package/claude/skills/read-frames/REQUIREMENT.md +3 -8
- package/claude/skills/record-screencast/REQUIREMENT.md +14 -17
- package/claude/skills/review-address/REQUIREMENT.md +14 -38
- package/claude/skills/review-address/SKILL.md +18 -6
- package/claude/skills/review-address/references/post-review-findings.md +4 -1
- package/claude/skills/review-address/references/rebase-only.md +14 -2
- package/claude/skills/review-craft/REQUIREMENT.md +14 -32
- package/claude/skills/review-pr/REQUIREMENT.md +15 -34
- package/claude/skills/review-pr/SKILL.md +9 -2
- package/claude/skills/review-pr/references/body-variants.md +29 -8
- package/claude/skills/review-pr/references/post.md +29 -10
- package/claude/skills/review-ui/REQUIREMENT.md +14 -39
- package/claude/skills/review-ui/SKILL.md +1 -0
- package/claude/skills/review-ui/references/post.md +2 -0
- package/claude/skills/review-ui/references/tick.md +3 -0
- package/claude/skills/role-orchestrator/REQUIREMENT.md +2 -2
- package/claude/skills/role-orchestrator/references/orchestrator-refill.md +5 -0
- package/claude/skills/role-orchestrator/references/orchestrator-review-dispatch.md +9 -0
- package/claude/skills/role-reviewer/REQUIREMENT.md +15 -65
- package/claude/skills/role-reviewer/SKILL.md +8 -1
- package/claude/skills/role-worker/REQUIREMENT.md +2 -2
- package/claude/skills/role-worker/SKILL.md +3 -0
- package/claude/skills/script-screencast/REQUIREMENT.md +10 -16
- package/claude/skills/search-craft/REQUIREMENT.md +12 -36
- package/claude/skills/search-craft/SKILL.md +1 -1
- package/claude/skills/search-craft/references/adopted.md +2 -2
- package/claude/skills/session-compact/REQUIREMENT.md +13 -23
- package/claude/skills/session-map/REQUIREMENT.md +13 -29
- package/claude/skills/session-relay/REQUIREMENT.md +14 -58
- package/claude/skills/session-relay/SKILL.md +6 -0
- package/claude/skills/session-resume/REQUIREMENT.md +13 -27
- package/claude/skills/session-worktree/REQUIREMENT.md +14 -43
- package/claude/skills/systematic-debugging/REQUIREMENT.md +13 -34
- package/claude/skills/target-check/REQUIREMENT.md +16 -23
- package/claude/skills/target-setup/REQUIREMENT.md +11 -34
- package/claude/skills/task-board/REQUIREMENT.md +13 -22
- package/claude/skills/task-board/SKILL.md +7 -0
- package/claude/skills/task-board/references/decline.md +2 -2
- package/claude/skills/task-board/references/tasks.md +1 -1
- package/claude/skills/task-complete/REQUIREMENT.md +11 -24
- package/claude/skills/task-complete/references/archive.md +4 -2
- package/claude/skills/teach-workspace/REQUIREMENT.md +14 -45
- package/claude/skills/test-craft/REQUIREMENT.md +15 -46
- package/claude/skills/test-first/REQUIREMENT.md +14 -20
- package/claude/skills/ui-checklist/REQUIREMENT.md +14 -29
- package/claude/skills/ui-checklist/SKILL.md +3 -3
- package/claude/skills/ux-audit/REQUIREMENT.md +3 -7
- package/claude/skills/ux-measure/REQUIREMENT.md +14 -28
- package/claude/skills/video-craft/REQUIREMENT.md +14 -27
- package/claude/skills/write-doc/REQUIREMENT.md +14 -24
- package/claude/skills/write-human/REQUIREMENT.md +15 -27
- package/claude/skills/youtube-transcripts/REQUIREMENT.md +9 -15
- package/docs/agents/context-audit.md +19 -12
- package/docs/agents/markdown-audit.md +15 -10
- package/docs/target/projects.md +2 -0
- package/docs/workflow/skill-map.md +6 -5
- package/docs/workflow/zshrc-aliases.md +3 -0
- package/governance/renames.toml +0 -2
- package/governance/rules/claude/output.md +5 -1
- package/governance/rules/code/routing.md +5 -1
- package/governance/stacks/base.toml +0 -1
- package/package.json +1 -1
- package/scripts/core/bootstrap.sh +1 -0
- package/src/claude/cases/workflow.ts +12 -0
- package/src/commands/context.ts +57 -3
- package/src/commands/labels.ts +149 -4
- package/src/commands/markdown.ts +188 -21
- package/src/commands/pr.ts +113 -4
- package/src/commands/sessions.ts +58 -11
- package/src/commands/tasks.ts +182 -0
- package/src/commands/worktrees.ts +2 -0
- package/src/context/coverage.ts +210 -0
- package/src/context/gate.ts +12 -3
- package/src/gate/stages.ts +1 -1
- package/src/init/steps.ts +45 -0
- package/src/intake/items.ts +14 -0
- package/src/labels/closing.ts +46 -0
- package/src/labels/density.ts +363 -0
- package/src/markdown/gated.ts +250 -0
- package/src/markdown/scope.ts +115 -2
- package/src/migrate/rename.ts +6 -0
- package/src/pr/evidence.ts +1 -1
- package/src/pr/rest.ts +2 -0
- package/src/pr/tick.ts +89 -0
- package/src/sessions/claim.ts +7 -0
- package/src/sessions/live.ts +79 -6
- package/src/sessions/registry.ts +11 -0
- package/src/sessions/resolve.ts +85 -7
- package/src/tasks/archive.ts +15 -4
- package/src/tasks/closes.ts +136 -0
- package/src/tasks/record.ts +1 -1
- package/src/worktrees/reclaim.ts +16 -1
- package/tooling/base/configs/scripts/verify.ts +1 -1
- package/tooling/base/seeds/.github/pull_request_template.md +1 -1
- package/tooling/claude/seeds/.claude/hooks/board-validate.sh +1 -1
- package/tooling/claude/seeds/CLAUDE.md +2 -2
- package/governance/rules/canon/task-scope.md +0 -12
|
@@ -7,42 +7,30 @@ description: Scope boundary between the writing rules a scan enforces and the on
|
|
|
7
7
|
|
|
8
8
|
## Gap
|
|
9
9
|
|
|
10
|
-
Without this skill, a session is graded on the words it avoids and never on how the prose reads. The banned characters ship as data
|
|
10
|
+
Without this skill, a session is graded on the words it avoids and never on how the prose reads. The banned characters ship as data a command reads. The voice half sits in a standard nothing opens, so a clean audit passes prose that reads machine-written.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
A session also has no name for the patterns no closed word set can match. Rule-of-three, synonym cycling, false ranges, inline-header lists, and adverb propping each survive a clean scan, so a passage carrying all five reports zero findings and still reads wrong. Nothing tells the session those patterns exist, and a ban list cannot be extended to reach them, because each is a shape rather than a token.
|
|
15
|
-
|
|
16
|
-
Importing that catalog wholesale fails on a different measurement. External material of this kind bans abstract metaphor nouns and names `surface` among them, which this corpus uses 593 times in tracked markdown. A session handed the catalog with no stated position either rewrites established vocabulary or silently ignores the item, and neither outcome is recoverable by a later reader who cannot tell which happened.
|
|
12
|
+
Terse sessions return uniform fragments, each sentence near the same length and opening alike. Rule-of-three and synonym cycling survive any scan because each is a shape, not a token. External catalogs also ban terms this corpus uses heavily, and a session without a stated position rewrites them or ignores the item.
|
|
17
13
|
|
|
18
14
|
## Must
|
|
19
15
|
|
|
20
|
-
- Arrive attached to the writing
|
|
21
|
-
- State cadence as something to measure,
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- Point at the banned characters rather than restating them, since they ship as package data a command reads and a second copy drifts with nothing comparing the two
|
|
26
|
-
- Record which external patterns were adopted, which were declined, and the measurement behind each, so a later session extends the position instead of re-deriving it
|
|
27
|
-
- Yield voice to a surface that states its own, and hold rhythm, density, and the tells on every surface
|
|
16
|
+
- Arrive attached to the writing through the path-scoped markdown rule, rather than waiting to be consulted
|
|
17
|
+
- State cadence as something to measure, with a sentence-length spread and a repeated-opening count, and ban the fragment trade by name
|
|
18
|
+
- Name the machine tells a scan cannot reach behind a stated trigger, and carry marketing words and vague qualifiers as word-choice guidance
|
|
19
|
+
- Point at the banned characters rather than restating them, since they ship as package data and a second copy drifts
|
|
20
|
+
- Record which external patterns were adopted or declined with the measurement behind each, and yield voice to a surface that states its own
|
|
28
21
|
|
|
29
22
|
## Must not
|
|
30
23
|
|
|
31
24
|
- Restate the banned characters, at any length or as an example set
|
|
32
|
-
- Present the word guidance as a gate, or restate it on a second surface
|
|
33
|
-
- Claim the
|
|
25
|
+
- Present the word guidance as a gate, or restate it on a second surface
|
|
26
|
+
- Claim the cadence failure is closed, since nothing measures finished output against these rules yet
|
|
34
27
|
- Rewrite a term the corpus already uses because an external source bans it, without the count and a recorded position
|
|
35
|
-
- Grow a second voice register inside this body
|
|
36
|
-
|
|
37
|
-
## Guards
|
|
38
|
-
|
|
39
|
-
- A passage on a surface stating its own voice keeps that voice, so the yield is read before the voice rules are applied rather than after the rewrite
|
|
40
|
-
- Text a model drafted goes through the tells catalog, and a short original draft with nothing reading off skips it
|
|
28
|
+
- Grow a second voice register inside this body
|
|
41
29
|
|
|
42
30
|
## Out of scope
|
|
43
31
|
|
|
44
|
-
- The banned characters, which `markdown
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
- Measuring whether finished output followed these rules, which
|
|
32
|
+
- The banned characters, which `markdown-craft` points at and `canon markdown audit` gates
|
|
33
|
+
- Markdown mechanics, being headings, lists, code spans, punctuation, and file references, which `markdown-craft` owns
|
|
34
|
+
- What voice a given surface declares, which the standard governing that surface owns
|
|
35
|
+
- Spelling, which a project's spell checker owns
|
|
36
|
+
- Measuring whether finished output followed these rules, which no check owns yet
|
|
@@ -7,32 +7,26 @@ description: Why the transcript fetch stays in the CLI, and why fetching stops s
|
|
|
7
7
|
|
|
8
8
|
## Gap
|
|
9
9
|
|
|
10
|
-
Without this skill, a pasted video link
|
|
10
|
+
Without this skill, a pasted video link becomes captions printed in chat, which persist nowhere and cannot be cited later. A saved transcript with its metadata is context the repository holds.
|
|
11
11
|
|
|
12
|
-
A session
|
|
13
|
-
|
|
14
|
-
Two smaller failures follow the fetch. A video with no captions produces a file that looks empty rather than one reported as having none, so the user reads it as a failed fetch. And a session that summarizes what it fetched answers a question nobody asked, spending context on a reading the user may not want yet.
|
|
12
|
+
A session fetching on its own gets the shape wrong. Raw captions carry timing cues and duplicates, a file without frontmatter loses its source, and reimplemented cleanup drifts from the CLI. A video with no captions looks like a failed fetch, and a summary answers a question nobody asked.
|
|
15
13
|
|
|
16
14
|
## Must
|
|
17
15
|
|
|
18
16
|
- Run the CLI, which owns the fetch, the caption cleanup, and the frontmatter
|
|
19
|
-
- Surface the written path
|
|
17
|
+
- Surface the written path in full, in the form the project's instruction file sets under `## Output`
|
|
20
18
|
- Report a video with no captions as a fact about the video, since the file still exists and carries its metadata
|
|
21
|
-
- Name
|
|
19
|
+
- Name a missing external binary and stop, leaving the install to the user
|
|
20
|
+
- Stop on a missing URL or a link that is not a YouTube URL, since the command cannot fetch either
|
|
22
21
|
|
|
23
22
|
## Must not
|
|
24
23
|
|
|
25
24
|
- Reimplement the fetch or the cleanup
|
|
26
|
-
- Summarize or annotate the transcript unasked
|
|
25
|
+
- Summarize or annotate the transcript unasked
|
|
27
26
|
- Install the external binary the command shells out to
|
|
28
27
|
|
|
29
|
-
## Guards
|
|
30
|
-
|
|
31
|
-
- No URL stops, since there is nothing to fetch
|
|
32
|
-
- A link that is not a YouTube URL stops rather than attempting a generic fetch the command cannot do
|
|
33
|
-
|
|
34
28
|
## Out of scope
|
|
35
29
|
|
|
36
|
-
- Downloading the video or its audio
|
|
37
|
-
- Summarizing a transcript already on disk, which is a read of that file
|
|
38
|
-
- Choosing where transcripts live, which the command
|
|
30
|
+
- Downloading the video or its audio, which no skill here owns
|
|
31
|
+
- Summarizing a transcript already on disk, which is a plain read of that file
|
|
32
|
+
- Choosing where transcripts live, which the command's default and its flag own
|
|
@@ -22,18 +22,25 @@ canon context audit tooling/base/seeds --gate
|
|
|
22
22
|
|
|
23
23
|
## Output
|
|
24
24
|
|
|
25
|
-
| Check | Reports
|
|
26
|
-
| ------------------- |
|
|
27
|
-
| Citations | A path into an audited folder that resolves nowhere
|
|
28
|
-
| Requirements record | Words past the cap the record states as `This record holds at most 600 words.`
|
|
29
|
-
| Required sections | An entry missing `Overview` or `Layout`. A split folder answers by any sibling
|
|
30
|
-
| Closed set | An H2 outside `Overview`, `Layout`, and `Gotchas`, under `extraSections`
|
|
31
|
-
| Shape | `retired-section`, `gotcha-count`, `gotcha-heading`, `gotcha-paragraph`, `layout-heading`, `layout-bullets`, `layout-paragraphs`, `layout-depth`
|
|
32
|
-
| Index drift | An entry its index does not link, or a link resolving to nothing
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
25
|
+
| Check | Reports | Reaches | Finding |
|
|
26
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ----------------------------------------------------------- |
|
|
27
|
+
| Citations | A path into an audited folder that resolves nowhere | Every audited folder | Gates always |
|
|
28
|
+
| Requirements record | Words past the cap the record states as `This record holds at most 600 words.` | `canon/REQUIREMENTS.md` | Gates past a stated cap, never under `--citations-only` |
|
|
29
|
+
| Required sections | An entry missing `Overview` or `Layout`. A split folder answers by any sibling | `canon/context/` | Gates under `--gate` |
|
|
30
|
+
| Closed set | An H2 outside `Overview`, `Layout`, and `Gotchas`, under `extraSections` | `canon/context/` | Gates under `--gate` |
|
|
31
|
+
| Shape | `retired-section`, `gotcha-count`, `gotcha-heading`, `gotcha-paragraph`, `layout-heading`, `layout-bullets`, `layout-paragraphs`, `layout-depth` | `canon/context/` | Gates under `--gate` in a `SHAPE_GATED_FOLDERS` folder only |
|
|
32
|
+
| Index drift | An entry its index does not link, or a link resolving to nothing | Every audited folder | Gates under `--gate` |
|
|
33
|
+
| Coverage | A folder directly under a code root that no Layout names, one with a Layout H3 in two entries, and a declared root matching nothing, under `coverage` | `canon/context/` | Gates under `--gate`, never under `--citations-only` |
|
|
34
|
+
| Reference form | A backticked bare filename matching a sibling entry, under `bareReferences` | Split folders | Reports |
|
|
35
|
+
| Length | An entry past about 150 rendered lines at 80 columns, with its `causes` | Every audited folder | Reports |
|
|
36
|
+
| Tables | Six or more body rows whose first column mostly carries a path, command, or link | Every audited folder | Reports |
|
|
37
|
+
| Provenance | A date, change number, or release label. A date after measured, verified, driven, passed, or fired is excluded | `canon/context/` | Reports |
|
|
38
|
+
|
|
39
|
+
The coverage roots come from `roots` in `canon/config/context.toml`, a list of folders or globs such as `packages/*/src`.
|
|
40
|
+
|
|
41
|
+
- Without the file the root defaults to `src` when that folder exists, and `roots = []` opts out
|
|
42
|
+
- A file that is not valid TOML, or holds no list of strings under `roots`, gates under `--gate`
|
|
43
|
+
- With no declaration and no `src/`, the audit reports no code root and never gates
|
|
37
44
|
|
|
38
45
|
A shape break is any of these:
|
|
39
46
|
|
|
@@ -22,14 +22,14 @@ An argument is a file, a directory, or a glob, taken against the corpus git list
|
|
|
22
22
|
|
|
23
23
|
The ban set and checkpoints ship in `src/markdown/bans.ts` and `src/markdown/structure.ts`. `markdown.md` states each rule and the `write-human` skill states the cadence numbers, so move a number in both places in one change.
|
|
24
24
|
|
|
25
|
-
| Finding | Reports | Gates
|
|
26
|
-
| --------------- | ------------------------------------------------------------------------------------ |
|
|
27
|
-
| Bans | The two characters `markdown.md` bans, outside frontmatter, fences, spans, and links | Always
|
|
28
|
-
| Links | A relative link resolving to nothing on disk | Always
|
|
29
|
-
| Density | The six limits below, under `density` | On a
|
|
30
|
-
| Reference shape | A `kind: reference` page breaking its shape, under `referenceShape` | On a
|
|
31
|
-
| Colons | A colon followed by more text in a prose line, under `colons` | Never
|
|
32
|
-
| Heading case | A capital after the first word of a heading or `title`, under `headingCase` | Never
|
|
25
|
+
| Finding | Reports | Gates |
|
|
26
|
+
| --------------- | ------------------------------------------------------------------------------------ | ----------------- |
|
|
27
|
+
| Bans | The two characters `markdown.md` bans, outside frontmatter, fences, spans, and links | Always |
|
|
28
|
+
| Links | A relative link resolving to nothing on disk | Always |
|
|
29
|
+
| Density | The six limits below, under `density` | On a gated prefix |
|
|
30
|
+
| Reference shape | A `kind: reference` page breaking its shape, under `referenceShape` | On a gated prefix |
|
|
31
|
+
| Colons | A colon followed by more text in a prose line, under `colons` | Never |
|
|
32
|
+
| Heading case | A capital after the first word of a heading or `title`, under `headingCase` | Never |
|
|
33
33
|
|
|
34
34
|
A page marked `kind: reference` holds its opening, then `Output`, `Refusals`, and `See also` as H2s, each at most once and in that order. It takes no H3 and no table headed `Flag` or `Option`. An unmarked page is never measured.
|
|
35
35
|
|
|
@@ -46,9 +46,14 @@ A page marked `kind: reference` holds its opening, then `Output`, `Refusals`, an
|
|
|
46
46
|
- A table, fence, list, heading, or bold section marker ends a run of paragraphs
|
|
47
47
|
- A run whose every item opens with a bold label or a link is exempt, and numbered items never count
|
|
48
48
|
- Only context entries, docs, skill bodies, references, and requirements, tooling seeds and stack references, the wiki, `README.md`, and `CONTRIBUTING.md` take a finding
|
|
49
|
-
- A
|
|
49
|
+
- A requirement gates only once the gated list below names its own file, never through its skill's prefix and never on a bullet run alone
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
| Root | A density or reference shape finding gates |
|
|
52
|
+
| ----------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
53
|
+
| Canon's checkout | Under a `GATED_PATHS` prefix in `src/markdown/scope.ts`, and a bullet run on every density path above |
|
|
54
|
+
| Any other project | Under a prefix `canon/config/markdown.toml` lists, a bullet run included. With no such file nothing gates. |
|
|
55
|
+
|
|
56
|
+
A project's list grows through `canon markdown gated add <prefix>`, which appends a folder only once it carries no finding, and `canon init` starts a new project with every root that passes already listed. A config that does not parse refuses the audit with its path named.
|
|
52
57
|
|
|
53
58
|
Five measures report and never set the exit code on their own.
|
|
54
59
|
|
package/docs/target/projects.md
CHANGED
|
@@ -72,6 +72,8 @@ The default is `base`. Escalate only for a project writing code, and `target-set
|
|
|
72
72
|
|
|
73
73
|
`canon init` installs base tooling, the Claude workflow, and governance. Pass `--stack <name>` for a language stack.
|
|
74
74
|
|
|
75
|
+
Init then lists each markdown root that already passes the density limits in `canon/config/markdown.toml`, so those folders fail a push from the start. A root carrying a finding is named and left out, and `canon:document-repair` brings it to zero later. An existing config is kept as it is.
|
|
76
|
+
|
|
75
77
|
- `--skip governance` leaves `.claude/rules/` empty. The run prints the `canon gov install <stack> <path>` command that restores the rules it dropped.
|
|
76
78
|
|
|
77
79
|
## Add a domain later
|
|
@@ -99,8 +99,9 @@ Groups run in the order a project meets them. Every name `canon claude skills li
|
|
|
99
99
|
|
|
100
100
|
## Keep the project current with the toolkit
|
|
101
101
|
|
|
102
|
-
| Skill | When to use
|
|
103
|
-
| ----------------------------- |
|
|
104
|
-
| `canon:target-check` | In a target, to compare each domain with the toolkit
|
|
105
|
-
| `canon:
|
|
106
|
-
| `canon:canon-feedback
|
|
102
|
+
| Skill | When to use |
|
|
103
|
+
| ----------------------------- | ------------------------------------------------------- |
|
|
104
|
+
| `canon:target-check` | In a target, to compare each domain with the toolkit |
|
|
105
|
+
| `canon:document-repair` | Rewrite a failing docs folder to the limits and gate it |
|
|
106
|
+
| `canon:canon-feedback` | The toolkit is broken, missing, or off |
|
|
107
|
+
| `canon:canon-feedback-triage` | In the toolkit repo, to file feedback issues |
|
|
@@ -17,6 +17,7 @@ A hand-written block without markers is detected through its `alias clp=` line,
|
|
|
17
17
|
```zsh
|
|
18
18
|
# >>> canon aliases >>>
|
|
19
19
|
TOOLKIT="/path/to/toolkit"
|
|
20
|
+
export CLAUDE_CODE_ENABLE_TODO_TOOLS=1
|
|
20
21
|
|
|
21
22
|
alias cl='claude'
|
|
22
23
|
alias clr='cl -r'
|
|
@@ -32,6 +33,8 @@ alias clpac='clpa --cwd .'
|
|
|
32
33
|
# <<< canon aliases <<<
|
|
33
34
|
```
|
|
34
35
|
|
|
36
|
+
The export gives a session started from your terminal the task tools, which Claude Code reads before it starts, so workers and reviewers can show their checklist on `Ctrl+T`. A background session has them without it.
|
|
37
|
+
|
|
35
38
|
To opt out, delete the block and run `bun install` and `bun link` yourself. Bash takes the block unchanged in `~/.bashrc`, pasted by hand. Bootstrap writes `~/.zshrc` alone.
|
|
36
39
|
|
|
37
40
|
## What each one does
|
package/governance/renames.toml
CHANGED
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
# file.
|
|
16
16
|
[renamed]
|
|
17
17
|
"015-output" = "566-output"
|
|
18
|
-
"035-tasks" = "602-tasks"
|
|
19
18
|
"055-scratch" = "604-scratch"
|
|
20
19
|
"085-worktrees" = "605-worktrees"
|
|
21
20
|
"087-git" = "606-git"
|
|
@@ -32,7 +31,6 @@
|
|
|
32
31
|
"655-tasks" = "tasks"
|
|
33
32
|
"570-skill" = "skill"
|
|
34
33
|
"801-markdown" = "markdown"
|
|
35
|
-
"602-tasks" = "task-scope"
|
|
36
34
|
"604-scratch" = "scratch"
|
|
37
35
|
"605-worktrees" = "worktrees"
|
|
38
36
|
"606-git" = "git"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Report file paths correctly for the reading surface
|
|
2
|
+
description: Report file paths correctly for the reading surface, group them when the response covers many, and name sessions to a person
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# Output standards
|
|
@@ -17,3 +17,7 @@ description: Report file paths correctly for the reading surface and group them
|
|
|
17
17
|
|
|
18
18
|
- Group paths under `**Created:**`, `**Modified:**`, and `**Deleted:**` headers when the response covers multiple files, with every path under them in that form.
|
|
19
19
|
- Put a single-file change's path on its own line, with no header.
|
|
20
|
+
|
|
21
|
+
## Naming sessions
|
|
22
|
+
|
|
23
|
+
- Name a session to a person by its roster name from `canon sessions list`, and give its id only beside the name, never alone.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Routes code placement and shape decisions to the skills that carry them
|
|
2
|
+
description: Routes code placement and shape decisions to the skills that carry them, and library calls to the official docs
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# Code standards
|
|
@@ -11,3 +11,7 @@ description: Routes code placement and shape decisions to the skills that carry
|
|
|
11
11
|
## Shape
|
|
12
12
|
|
|
13
13
|
- Load the `canon:code-craft` skill before deciding the shape of a new function, class, or module, and report it rather than proceeding silently when it does not resolve.
|
|
14
|
+
|
|
15
|
+
## Libraries
|
|
16
|
+
|
|
17
|
+
- Before calling a library API the codebase does not already use, fetch the official docs for the installed version and match the call to them, since recall of an API goes stale.
|
package/package.json
CHANGED
|
@@ -146,6 +146,18 @@ export const WORKFLOW_CASES: readonly SkillCase[] = [
|
|
|
146
146
|
'Are our requirements and architecture docs still true, and when were they last reviewed?',
|
|
147
147
|
expect: 'document-health',
|
|
148
148
|
},
|
|
149
|
+
// A repair rather than a report, and folder by folder until each gates,
|
|
150
|
+
// which is what separates it from `document-health` above.
|
|
151
|
+
{
|
|
152
|
+
prompt:
|
|
153
|
+
'Our docs folder fails the paragraph and bullet limits everywhere, so rewrite it until it passes and lock it in.',
|
|
154
|
+
expect: 'document-repair',
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
prompt:
|
|
158
|
+
'Bring the context entries under the density limits one folder at a time and gate each once it is clean.',
|
|
159
|
+
expect: 'document-repair',
|
|
160
|
+
},
|
|
149
161
|
{
|
|
150
162
|
prompt: 'Open a new entry on the task board for this piece of work.',
|
|
151
163
|
expect: 'task-board',
|
package/src/commands/context.ts
CHANGED
|
@@ -56,6 +56,11 @@ import {
|
|
|
56
56
|
presentNames,
|
|
57
57
|
resolveFolders,
|
|
58
58
|
} from '@/context/folders'
|
|
59
|
+
import {
|
|
60
|
+
type CoverageReport,
|
|
61
|
+
measureCoverage,
|
|
62
|
+
readRoots,
|
|
63
|
+
} from '@/context/coverage'
|
|
59
64
|
import { isGating } from '@/context/gate'
|
|
60
65
|
import { isShapeGated, SHAPE_GATED_FOLDERS } from '@/context/shape-gated'
|
|
61
66
|
import { currentWorktreeRoot } from '@/git/worktree'
|
|
@@ -101,7 +106,7 @@ export function register(program: Command): void {
|
|
|
101
106
|
context
|
|
102
107
|
.command('audit')
|
|
103
108
|
.description(
|
|
104
|
-
'Report required sections, entry length, citations, reference form, catalog tables, provenance, index drift, and the requirements record against its own word cap',
|
|
109
|
+
'Report required sections, entry length, citations, reference form, catalog tables, provenance, index drift, code folders no entry names, and the requirements record against its own word cap',
|
|
105
110
|
)
|
|
106
111
|
.argument('[path]', 'Project root, defaulting to the current directory')
|
|
107
112
|
.helpOption('-h, --help', 'Show this help message')
|
|
@@ -113,7 +118,7 @@ export function register(program: Command): void {
|
|
|
113
118
|
.option('--citations-only', 'Run the gating citation check alone')
|
|
114
119
|
.option(
|
|
115
120
|
'--gate',
|
|
116
|
-
'Also fail on a missing required section, an H2 outside the set, a shape break in a gated folder,
|
|
121
|
+
'Also fail on a missing required section, an H2 outside the set, a shape break in a gated folder, index drift, or a code folder no entry names, the findings that are facts',
|
|
117
122
|
)
|
|
118
123
|
.addHelpText(
|
|
119
124
|
'after',
|
|
@@ -129,7 +134,9 @@ export function register(program: Command): void {
|
|
|
129
134
|
'--citations-only, which never measures it. A record stating no',
|
|
130
135
|
'cap is reported and never gated. --gate widens the gate to the',
|
|
131
136
|
'findings that are facts rather than judgments: a missing',
|
|
132
|
-
'required section, an H2 outside the closed set,
|
|
137
|
+
'required section, an H2 outside the closed set, index drift, and',
|
|
138
|
+
'a code folder no Layout names or two entries claim. The roots come',
|
|
139
|
+
'from canon/config/context.toml and default to src when present.',
|
|
133
140
|
'A context entry requires Overview and Layout and allows Gotchas.',
|
|
134
141
|
'A shape break, such as a Decisions section or a sixth gotcha, is',
|
|
135
142
|
'reported everywhere and gated only under a shape-gated folder.',
|
|
@@ -667,6 +674,9 @@ async function runAudit(
|
|
|
667
674
|
isShapeGated(relative(top, join(root, rel))),
|
|
668
675
|
)
|
|
669
676
|
const length = gateOnly ? undefined : lengthFindings(entries)
|
|
677
|
+
const coverage: CoverageReport | undefined = gateOnly
|
|
678
|
+
? undefined
|
|
679
|
+
: measureCoverage(root, readRoots(root), folders)
|
|
670
680
|
// Absent under `--citations-only` and null when the project carries no
|
|
671
681
|
// record. A run that never looked and a project with nothing to look at are
|
|
672
682
|
// different answers, and one value for both reports the second as the first.
|
|
@@ -685,6 +695,7 @@ async function runAudit(
|
|
|
685
695
|
reportTables(entries)
|
|
686
696
|
reportProvenance(entries, folders)
|
|
687
697
|
reportDrift(drift)
|
|
698
|
+
reportCoverage(coverage ?? { kind: 'no-root' })
|
|
688
699
|
reportRequirements(requirements, root)
|
|
689
700
|
outro()
|
|
690
701
|
}
|
|
@@ -721,6 +732,8 @@ async function runAudit(
|
|
|
721
732
|
extraSections: extras,
|
|
722
733
|
shapeFindings: shape,
|
|
723
734
|
indexDrift: drift,
|
|
735
|
+
// Absent under `--citations-only`, which never measures it.
|
|
736
|
+
coverage,
|
|
724
737
|
// Null says the run opened the project and found no record, which a
|
|
725
738
|
// target that never wrote one is entitled to. Absent says the run
|
|
726
739
|
// never looked, which is `--citations-only`.
|
|
@@ -753,6 +766,7 @@ async function runAudit(
|
|
|
753
766
|
extraSections: extras,
|
|
754
767
|
shape,
|
|
755
768
|
drift,
|
|
769
|
+
coverage: coverage ?? { kind: 'no-root' },
|
|
756
770
|
widened,
|
|
757
771
|
})
|
|
758
772
|
|
|
@@ -1210,6 +1224,46 @@ function reportProvenance(
|
|
|
1210
1224
|
)
|
|
1211
1225
|
}
|
|
1212
1226
|
|
|
1227
|
+
function reportCoverage(report: CoverageReport): void {
|
|
1228
|
+
logStep('Coverage')
|
|
1229
|
+
|
|
1230
|
+
if (report.kind === 'no-root') {
|
|
1231
|
+
logInfo(
|
|
1232
|
+
'No code root found, since no canon/config/context.toml declares one and there is no src/, so nothing was measured.',
|
|
1233
|
+
)
|
|
1234
|
+
return
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
if (report.kind === 'invalid') {
|
|
1238
|
+
logWarn(report.reason)
|
|
1239
|
+
return
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
if (report.kind === 'opted-out') {
|
|
1243
|
+
logInfo(
|
|
1244
|
+
'canon/config/context.toml declares roots = [], so coverage was not measured.',
|
|
1245
|
+
)
|
|
1246
|
+
return
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
const { unnamed, doubled, missingRoots } = report.findings
|
|
1250
|
+
const lines = [
|
|
1251
|
+
...missingRoots.map((root) => `${root} matches no folder`),
|
|
1252
|
+
...unnamed.map((folder) => `${folder} named in no Layout`),
|
|
1253
|
+
...doubled.map(
|
|
1254
|
+
({ folder, rels }) => `${folder} Layout H3 in ${rels.join(', ')}`,
|
|
1255
|
+
),
|
|
1256
|
+
]
|
|
1257
|
+
|
|
1258
|
+
if (lines.length === 0) {
|
|
1259
|
+
logInfo(`Every folder under ${report.roots.join(', ')} is named once.`)
|
|
1260
|
+
return
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
logWarn(plural(lines.length, 'coverage finding'))
|
|
1264
|
+
pipeOutput(lines.join('\n'))
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1213
1267
|
/** Reports the requirements record against the word cap it states, if any. */
|
|
1214
1268
|
function reportRequirements(
|
|
1215
1269
|
report: RequirementsReport | undefined,
|