@erclx/canon 5.36.0 → 5.38.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/SKILL.md +6 -0
- package/claude/skills/auto-ship/SKILL.md +1 -1
- package/claude/skills/backlog-triage/SKILL.md +8 -8
- package/claude/skills/build-in-slices/SKILL.md +7 -1
- package/claude/skills/build-in-slices/references/adopted.md +3 -0
- package/claude/skills/canon-cli/SKILL.md +3 -0
- package/claude/skills/canon-feedback/SKILL.md +5 -0
- package/claude/skills/canon-feedback-triage/SKILL.md +3 -0
- package/claude/skills/canvas-board/SKILL.md +3 -0
- package/claude/skills/canvas-board/references/canvas.md +12 -0
- package/claude/skills/ci-workflow/SKILL.md +5 -0
- package/claude/skills/code-craft/SKILL.md +6 -0
- package/claude/skills/context-fold/references/context.md +48 -34
- package/claude/skills/create-rule/SKILL.md +11 -9
- package/claude/skills/create-rule/references/rule.md +6 -0
- package/claude/skills/create-skill/SKILL.md +11 -2
- package/claude/skills/create-skill/references/skill-disclosure.md +26 -0
- package/claude/skills/create-skill/references/skill-paths.md +3 -0
- package/claude/skills/create-skill/references/skill-reference.md +12 -0
- package/claude/skills/create-skill/references/skill.md +25 -24
- package/claude/skills/deprecation-migration/SKILL.md +6 -0
- package/claude/skills/deprecation-migration/references/adopted.md +3 -0
- package/claude/skills/design-taste/SKILL.md +6 -0
- package/claude/skills/design-taste/references/craft.md +3 -0
- package/claude/skills/design-taste/references/preflight.md +16 -0
- package/claude/skills/docs-sync/references/docs.md +6 -0
- package/claude/skills/docs-sync/references/readme.md +15 -0
- package/claude/skills/draft-and-pick/SKILL.md +12 -0
- package/claude/skills/draft-doc/references/context.md +1 -1
- package/claude/skills/draft-doc/references/readme.md +3 -0
- package/claude/skills/draft-figure/references/mermaid.md +6 -0
- package/claude/skills/draft-slides/SKILL.md +3 -0
- package/claude/skills/git-branch/references/branch.md +16 -11
- package/claude/skills/git-commit/references/commit.md +19 -11
- package/claude/skills/git-commit/references/versioning.md +9 -0
- package/claude/skills/git-issue/references/issue.md +13 -9
- package/claude/skills/git-pr/SKILL.md +5 -0
- package/claude/skills/git-pr/references/pr.md +24 -6
- package/claude/skills/git-ship/SKILL.md +3 -0
- package/claude/skills/git-split/SKILL.md +6 -0
- package/claude/skills/git-stage/SKILL.md +3 -0
- package/claude/skills/git-worktree/SKILL.md +6 -6
- package/claude/skills/markdown-craft/references/markdown.md +25 -6
- package/claude/skills/plan-feature/SKILL.md +9 -0
- package/claude/skills/plan-feature/references/plan.md +20 -8
- package/claude/skills/plan-groundwork/SKILL.md +6 -0
- package/claude/skills/plan-groundwork/references/groundwork.md +61 -29
- package/claude/skills/plan-intake/references/intake.md +6 -6
- package/claude/skills/read-frames/SKILL.md +3 -0
- package/claude/skills/review-craft/SKILL.md +3 -0
- package/claude/skills/review-pr/references/post.md +1 -1
- package/claude/skills/review-ui/SKILL.md +6 -3
- package/claude/skills/role-orchestrator/SKILL.md +4 -1
- package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +7 -4
- package/claude/skills/role-orchestrator/references/orchestrator-parked.md +1 -1
- package/claude/skills/role-orchestrator/references/orchestrator-refill.md +3 -0
- package/claude/skills/role-planner/SKILL.md +4 -1
- package/claude/skills/role-worker/SKILL.md +13 -1
- package/claude/skills/search-craft/SKILL.md +3 -0
- package/claude/skills/systematic-debugging/SKILL.md +6 -0
- package/claude/skills/target-check/references/domains.md +5 -0
- package/claude/skills/target-setup/SKILL.md +8 -4
- package/claude/skills/target-setup/references/verify.md +6 -5
- package/claude/skills/task-board/references/tasks.md +12 -7
- package/claude/skills/task-complete/references/archive.md +3 -0
- package/claude/skills/teach-workspace/SKILL.md +3 -0
- package/claude/skills/teach-workspace/references/glossary.md +3 -0
- package/claude/skills/teach-workspace/references/lesson-build.md +3 -0
- package/claude/skills/teach-workspace/references/lesson-craft.md +3 -0
- package/claude/skills/teach-workspace/references/teach.md +8 -8
- package/claude/skills/test-craft/SKILL.md +5 -0
- package/claude/skills/video-craft/SKILL.md +6 -0
- package/claude/skills/write-human/SKILL.md +9 -0
- package/docs/agents/capture.md +2 -0
- package/docs/agents/commands.md +54 -54
- package/docs/agents/context-audit-checks.md +6 -0
- package/docs/agents/context-audit.md +8 -8
- package/docs/agents/context-classify.md +2 -0
- package/docs/agents/drift-surfaces.md +5 -5
- package/docs/agents/gate.md +6 -7
- package/docs/agents/index.md +1 -1
- package/docs/agents/install-and-sync.md +2 -2
- package/docs/agents/markdown-audit-weight.md +11 -3
- package/docs/agents/markdown-audit.md +2 -2
- package/docs/agents/pr-frames.md +17 -3
- package/docs/agents/sessions-transfer.md +8 -6
- package/docs/agents/skills-audit.md +9 -1
- package/docs/target/projects.md +1 -1
- package/docs/target/scenarios.md +2 -2
- package/docs/target/standards-moved.md +20 -18
- package/docs/workflow/ai-workflow.md +3 -0
- package/docs/workflow/visual-design-workflow.md +5 -0
- package/governance/detect.toml +6 -1
- package/package.json +7 -4
- package/scripts/core/install-check.sh +1 -1
- package/src/cli/help.ts +1 -1
- package/src/commands/claude.ts +0 -1
- package/src/commands/context.ts +29 -4
- package/src/commands/gate.ts +1 -8
- package/src/commands/markdown.ts +52 -0
- package/src/commands/pr.ts +18 -11
- package/src/commands/records.ts +0 -1
- package/src/context/audit.ts +83 -0
- package/src/context/classify/prompts.ts +6 -1
- package/src/context/gate.ts +6 -3
- package/src/docs/read.ts +15 -21
- package/src/gate/measures.ts +186 -1
- package/src/gate/sequencer.ts +0 -4
- package/src/gate/stages.ts +46 -27
- package/src/git/files.ts +30 -0
- package/src/gov/adapter.ts +2 -2
- package/src/gov/install.ts +2 -2
- package/src/gov/list.ts +1 -1
- package/src/gov/payload.ts +1 -1
- package/src/gov/stacks.ts +1 -1
- package/src/markdown/gate.ts +10 -0
- package/src/markdown/growth.ts +43 -0
- package/src/markdown/stacks.ts +74 -0
- package/src/markdown/structure.ts +73 -5
- package/src/migrate/rule-layout.ts +12 -12
- package/src/pr/frames.ts +66 -1
- package/src/sandbox/equivalence.ts +7 -9
- package/src/sync/check.ts +23 -23
- 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/configs/tsconfig.json +1 -1
- package/tooling/astro/manifest.toml +13 -0
- package/tooling/astro/reference.md +17 -7
- package/tooling/base/configs/.oxfmtrc.json +7 -0
- package/tooling/base/configs/scripts/verify.json +1 -1
- package/tooling/base/configs/scripts/verify.ts +3 -9
- package/tooling/base/manifest.toml +6 -6
- package/tooling/base/reference.md +20 -17
- package/tooling/base/seeds/.lintstagedrc +1 -3
- package/tooling/base/seeds/canon/context/ci.md +7 -7
- package/tooling/base/seeds/canon/context/development.md +10 -10
- package/tooling/claude/manifest.toml +5 -1
- package/tooling/claude/seeds/.claude/hooks/scratch-guard.sh +8 -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/configs/tsconfig.json +1 -1
- package/tooling/vite-react/configs/vitest.config.ts +1 -1
- package/tooling/vite-react/manifest.toml +1 -4
- package/tooling/vite-react/reference.md +5 -5
- package/tooling/web/configs/.oxlintrc.json +213 -0
- package/tooling/web/configs/src/test/setup.ts +1 -1
- package/tooling/web/manifest.toml +12 -16
- package/tooling/web/reference.md +15 -15
- 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
|
@@ -101,7 +101,7 @@ rule on the far side of a window a later sync moved past it. The per-file
|
|
|
101
101
|
rule the chain lists reaches both surfaces the same way.
|
|
102
102
|
|
|
103
103
|
A target stamped before governance recorded a chain falls back to the older
|
|
104
|
-
|
|
104
|
+
rule-folder-inference read below. The measurement there anchors on governance's own
|
|
105
105
|
stamp rather than on the oldest anchor across domains, since rules are
|
|
106
106
|
domain-scoped and a shared anchor would let another domain's sync move the
|
|
107
107
|
revision rules are measured from. A target carrying no chain and no governance anchor
|
|
@@ -124,16 +124,16 @@ their own language and testing rules, and every other rule is opt-in, so an
|
|
|
124
124
|
unfiltered list would tell a base consumer about rules it can never receive and
|
|
125
125
|
train the reader to skip the section.
|
|
126
126
|
|
|
127
|
-
The filter accepts a
|
|
127
|
+
The filter accepts a rule folder on either of two grounds. A folder holding a rule the
|
|
128
128
|
base stack resolves to is entitled to every target, read through the stack file so
|
|
129
|
-
a rule added to base later needs no code change. Every other
|
|
129
|
+
a rule added to base later needs no code change. Every other rule folder is read off the folders the
|
|
130
130
|
target already carries, which is the fallback's only evidence of what a target
|
|
131
|
-
was entitled to before it recorded a chain. One
|
|
131
|
+
was entitled to before it recorded a chain. One rule folder can be reached by more than
|
|
132
132
|
one stack, so the test over-reports inside a folder the target holds, which
|
|
133
133
|
costs a line where under-reporting would cost the section its point.
|
|
134
134
|
|
|
135
135
|
A rule the target already holds is dropped by name. That is what keeps a rule the
|
|
136
|
-
toolkit moved between
|
|
136
|
+
toolkit moved between rule folders out of the list, since a rename reaches this
|
|
137
137
|
read as an addition and only the name tells the two apart.
|
|
138
138
|
|
|
139
139
|
This closes the dangling-citation case as a side effect rather than checking for
|
package/docs/agents/gate.md
CHANGED
|
@@ -9,16 +9,15 @@ description: Running the gate this repository verifies a branch with, what the s
|
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
11
|
canon gate run
|
|
12
|
-
canon gate run --all
|
|
12
|
+
canon gate run --all
|
|
13
13
|
canon gate run --json
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
| Option
|
|
17
|
-
|
|
|
18
|
-
| `--all`
|
|
19
|
-
| `--
|
|
20
|
-
| `--
|
|
21
|
-
| `--json` | Add a machine-readable record on stdout |
|
|
16
|
+
| Option | Behavior |
|
|
17
|
+
| ---------- | ----------------------------------------------------------------------------- |
|
|
18
|
+
| `--all` | Run every stage instead of scoping shell, types, and tests to the changed set |
|
|
19
|
+
| `--nested` | Suppress the outer frame when a calling script has already opened one |
|
|
20
|
+
| `--json` | Add a machine-readable record on stdout |
|
|
22
21
|
|
|
23
22
|
## What the command owns and what it runs
|
|
24
23
|
|
package/docs/agents/index.md
CHANGED
|
@@ -30,7 +30,7 @@ CLI catalog and invocation rules for agents, split by command domain. Start with
|
|
|
30
30
|
- [Intake](intake.md): Reading intake folder counts and items, the three read states an item can be in, landing a batch of selections in one cluster, the refusal reasons, and why a call is scoped to one file
|
|
31
31
|
- [Key changes bijection](key-changes.md): Comparing the files a pull request body's Key changes names against its own diff, the two directions and the split inside each that decides what is worth raising, the span rules the extractor was measured into, and the three refusals that separate a clean pass from a read that produced nothing
|
|
32
32
|
- [Label coverage](label-coverage.md): Reading a changed set against the pull request label map, the two tables it matches, how a gap is separated from a decision, and why an absent map is an answer
|
|
33
|
-
- [Markdown audit weight](markdown-audit-weight.md): The structural half of the markdown audit, being bullet and paragraph weight, run depth, the two cadence numbers, and the length ceiling, with the samples behind each checkpoint and why none of them gates
|
|
33
|
+
- [Markdown audit weight](markdown-audit-weight.md): The structural half of the markdown audit, being bullet and paragraph weight, bullet stacks, run depth, the two cadence numbers, and the length ceiling, with the samples behind each checkpoint and why none of them gates
|
|
34
34
|
- [Markdown audit](markdown-audit.md): Running the audit over any markdown path, where its bans and checkpoints are read from, what each check reports, and why the ban half gates while the structural half reports
|
|
35
35
|
- [Migrate](migrate.md): What each canon migrate verb moves and rewrites, what it refuses, the markers that keep an old spelling, and the idempotence check a second run gives
|
|
36
36
|
- [Output shape](output-shape.md): Two framed shapes every command renders into, how JSON and --names modes keep stdout clean, and the exit discipline that lets piped output drain
|
|
@@ -84,7 +84,7 @@ postdates a rule joining its stack still see that rule: the report reads the
|
|
|
84
84
|
target's current entitlement against its current tree rather than diffing
|
|
85
85
|
from an anchor a later sync could advance past the rule's own commit. A
|
|
86
86
|
target whose install predates the recorded chain falls back to the same
|
|
87
|
-
|
|
87
|
+
rule-folder-inference `newRules` uses in `canon sync --check`.
|
|
88
88
|
|
|
89
89
|
## Tooling diff and sync
|
|
90
90
|
|
|
@@ -137,7 +137,7 @@ since a target has no rule source of its own that ships nowhere.
|
|
|
137
137
|
It takes `--root <path>` and defaults to the toolkit root, prints nothing on success, and
|
|
138
138
|
reports the reason on stderr with exit 1 when the record names a stack or rule
|
|
139
139
|
that does not resolve. The Consumed copies stage of `bun run check` calls it and
|
|
140
|
-
asserts both the generated
|
|
140
|
+
asserts both the generated rule folders and the consumed copy are committed.
|
|
141
141
|
|
|
142
142
|
## Whole-project sync
|
|
143
143
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Markdown audit weight
|
|
3
|
-
description: The structural half of the markdown audit, being bullet and paragraph weight, run depth, the two cadence numbers, and the length ceiling, with the samples behind each checkpoint and why none of them gates
|
|
3
|
+
description: The structural half of the markdown audit, being bullet and paragraph weight, bullet stacks, run depth, the two cadence numbers, and the length ceiling, with the samples behind each checkpoint and why none of them gates
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Markdown audit weight
|
|
7
7
|
|
|
8
8
|
## Bullets, paragraphs, and depth
|
|
9
9
|
|
|
10
|
-
Bullet weight and depth are the checks that moved off `canon context audit`, carrying what they measured at the time. A top-level bullet reports past roughly
|
|
10
|
+
Bullet weight and depth are the checks that moved off `canon context audit`, carrying what they measured at the time. A top-level bullet reports past roughly 250 characters with continuation lines folded in and nested items left out. A run reports past roughly 40 rendered lines, measured at 80 columns, where a heading breaks one and so does a bold section marker taking the whole line at column zero, either ending in a colon, or holding one whole code span at any width, or running to 20 characters or fewer, skipping fenced blocks and exempting a flat peer list averaging under 130 characters a bullet and a run that is entirely table rows. Each file reports its longest run alone, so a second run past the checkpoint in the same file is never named.
|
|
11
11
|
|
|
12
12
|
Every weight and depth measure counts the text a reader is shown. A link reduces to its anchor text and an autolink drops whole, since no reader is shown either destination. A backticked path stays counted, which is where these measures part from the ban scan `markdown-audit.md` describes: that one blanks a code span so a standard quoting its own banned character does not report itself, and discounting the same span here would under-report a paragraph carrying several. One file holds both span sets and each answers its own question.
|
|
13
13
|
|
|
@@ -17,7 +17,7 @@ The paragraph check measures both halves of one rule. `markdown.md` caps a parag
|
|
|
17
17
|
|
|
18
18
|
A sentence boundary closes on terminal punctuation ahead of a capital or a code span. The capital is what keeps a version pin and a decimal from each reading as two sentences, and the code span is admitted beside it because a command name opening a sentence carries no capital to find.
|
|
19
19
|
|
|
20
|
-
The paragraph weight sits at 700 and the bullet weight at
|
|
20
|
+
The paragraph weight sits at 700 and the bullet weight at 250. Both shipped at 400, and the bullet number moved to 250 so the audit's warning and the `paragraph-growth` gate stage, which fails a bullet a branch adds or grows past it in a context entry, read one number. The paragraph number was borrowed from the bullet rule when the two checks landed together, and each has since been read against a sample of its own. They are separate checkpoints in the standard and separate patterns in the parser, so a read that moves one leaves the other where it is.
|
|
21
21
|
|
|
22
22
|
### The sample behind the paragraph number
|
|
23
23
|
|
|
@@ -46,6 +46,14 @@ That re-sample ran once the scan stopped counting link syntax as prose. Findings
|
|
|
46
46
|
|
|
47
47
|
A bullet, a heading, a table row, a blockquote, a blank line, and a fence each end a paragraph, so a heavy bullet is reported by the bullet check alone and never counted twice.
|
|
48
48
|
|
|
49
|
+
## Bullet stacks
|
|
50
|
+
|
|
51
|
+
A run of consecutive top-level bullets reports past 5. A blank line, an indented continuation, and a nested item do not break the run, and a paragraph, a heading, or any other column-zero line does. A fenced line is skipped without breaking it. The count is of items rather than weight, so it catches a catalog of short bullets the 250-character checkpoint above passes.
|
|
52
|
+
|
|
53
|
+
Two shapes are exempt. A run whose every item opens with a bold label or a link names its own subject per item and reads as a table of entries, and a numbered list states an order, so numbered items never count. `CHANGELOG.md` is exempt by name. Governance rules and `REQUIREMENT.md` sit outside the gate stage's scope rather than being exempted here, since a rule is one imperative per bullet.
|
|
54
|
+
|
|
55
|
+
The audit reports a stack and never fails on one. The `bullet-stacks` stage in `canon gate run` fails the push, for the reason the length ceiling does: the audit also runs on plans and groundwork records kept out of version control.
|
|
56
|
+
|
|
49
57
|
## Cadence
|
|
50
58
|
|
|
51
59
|
Uniform cadence is the failure a ban list cannot express. A ban set states negatives, and fragments, verbless clauses, and sentences that all run one length are each the absence of something, so no word added to a ban list reaches any of them. The shape layer already measured a bullet, a paragraph, and a run, and stopped one level above where that failure lives.
|
|
@@ -67,11 +67,11 @@ The heading-case measure reports a heading or a frontmatter `title` with a capit
|
|
|
67
67
|
|
|
68
68
|
### Weight, cadence, and length
|
|
69
69
|
|
|
70
|
-
Bullet and paragraph weight, run depth, the two cadence numbers, and the document length ceiling are each a judgment a reader settles rather than a fact a scan settles. What each measures, the samples behind its checkpoint, and why none of them gates are in `markdown-audit-weight.md`.
|
|
70
|
+
Bullet and paragraph weight, bullet stacks, run depth, the two cadence numbers, and the document length ceiling are each a judgment a reader settles rather than a fact a scan settles. What each measures, the samples behind its checkpoint, and why none of them gates are in `markdown-audit-weight.md`.
|
|
71
71
|
|
|
72
72
|
## Exit codes
|
|
73
73
|
|
|
74
|
-
Exit codes are `0` for a completed run with no gating finding, `1` for a refusal, `2` for a ban hit or a dead relative link, and `3` for a shipped ban set that arrived empty. A banned character and a relative link resolving to nothing on disk each fail the run, both facts a scan settles rather than a reader judging. Bullet, paragraph, and depth weight are judgments a reader settles, and cadence is a distribution whose healthy range moves with the surface, so all four report under every code. Length reports the same way, since the audit also runs on a plan kept out of version control, and the Document ceiling stage in `canon gate run` owns that verdict instead.
|
|
74
|
+
Exit codes are `0` for a completed run with no gating finding, `1` for a refusal, `2` for a ban hit or a dead relative link, and `3` for a shipped ban set that arrived empty. A banned character and a relative link resolving to nothing on disk each fail the run, both facts a scan settles rather than a reader judging. Bullet, paragraph, and depth weight are judgments a reader settles, and cadence is a distribution whose healthy range moves with the surface, so all four report under every code. A bullet stack, a run of more than 5 plain bullets, reports the same way, and the `bullet-stacks` stage in `canon gate run` owns its verdict. Length reports the same way, since the audit also runs on a plan kept out of version control, and the Document ceiling stage in `canon gate run` owns that verdict instead.
|
|
75
75
|
|
|
76
76
|
`3` is separate from `1` because the two want different responses from a caller. A refusal means no corpus was built, and the `Markdown bans` stage in `canon gate run` is right to report it as unmeasured rather than as a pass. An empty set means the corpus was walked and nothing was looked for, so that stage fails the push on `3` rather than skipping.
|
|
77
77
|
|
package/docs/agents/pr-frames.md
CHANGED
|
@@ -8,7 +8,7 @@ description: How canon pr frames pushes a UI review frame to a never-merged bran
|
|
|
8
8
|
`canon pr frames` gives a review comment an image it can embed. `review-ui`
|
|
9
9
|
drives a pull request's checklist and captures a frame per box, and a frame
|
|
10
10
|
on the reviewer's disk resolves for nobody else. The verb pushes one frame to
|
|
11
|
-
the `canon
|
|
11
|
+
the `canon/frames` branch and returns a link to its path there.
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
canon pr frames 1341 --add frames/3.png --box 3 --head <sha> --pass 20261002T154450Z --json
|
|
@@ -19,7 +19,7 @@ canon pr frames --prune 30 --json
|
|
|
19
19
|
|
|
20
20
|
## What it writes
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
An add writes `refs/heads/canon/frames` and no other ref. Every call goes
|
|
23
23
|
through the GitHub git data API, being blobs, trees, commits, and that one ref,
|
|
24
24
|
so nothing is checked out, no worktree is entered, and neither `main` nor any
|
|
25
25
|
branch a pull request holds is touched. The branch never merges.
|
|
@@ -36,7 +36,7 @@ box therefore writes a new file rather than replacing the image an earlier
|
|
|
36
36
|
comment shows, which matters when a preview is minted again at one head.
|
|
37
37
|
|
|
38
38
|
`link` uses the same `blob/<ref>/<path>?raw=true` form as the evidence comment,
|
|
39
|
-
naming the `canon
|
|
39
|
+
naming the `canon/frames` branch rather than a commit. Every drop rewrites the
|
|
40
40
|
branch, and a link pinned to a commit would stop resolving for every other pull
|
|
41
41
|
request's frames once GitHub collects the commit it names. A path link lives
|
|
42
42
|
exactly as long as its file, so it survives every rewrite that drops another
|
|
@@ -97,6 +97,20 @@ than that many days ago, in a single rewrite. It keeps one still open, one
|
|
|
97
97
|
reopened after closing, one closed exactly the given days ago, and one whose
|
|
98
98
|
state could not be read, listing that last kind under `unread`.
|
|
99
99
|
|
|
100
|
+
## The legacy branch
|
|
101
|
+
|
|
102
|
+
Frames lived on `canon-frames` before the rename to `canon/frames`. An add
|
|
103
|
+
never writes it. `--drop` and `--prune` also run against it after the
|
|
104
|
+
current branch, remove only, and delete it once empty. `--prune` drains it
|
|
105
|
+
as its pull requests expire, and `--drop` clears one pull request at once.
|
|
106
|
+
The record carries `legacy: true` when that
|
|
107
|
+
pass changed the ref, and its `removed` list folds both branches in, naming
|
|
108
|
+
a pull request once. A missing or unreadable legacy ref never fails a run
|
|
109
|
+
the current branch finished.
|
|
110
|
+
|
|
111
|
+
A link minted before the rename points at `blob/canon-frames/...` and keeps
|
|
112
|
+
resolving until its pull request has been closed 30 days or `--drop` runs.
|
|
113
|
+
|
|
100
114
|
This repository runs `--prune 30` daily from
|
|
101
115
|
`.github/workflows/pr-frames-cleanup.yml`. A frame's file stays on the branch
|
|
102
116
|
until its own pull request has been closed for 30 days, so a link in a review
|
|
@@ -67,12 +67,14 @@ The transcript and side folder land under `projects/<encoding>/`, where the enco
|
|
|
67
67
|
|
|
68
68
|
Exit codes: `0` the session was placed, `1` refused. The refusal carries one of these reasons:
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
| Reason | Meaning |
|
|
71
|
+
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
72
|
+
| `not-a-bundle` | the file is no gzip tarball, carries no manifest at format `1`, or names a path outside its own session, such as one climbing out with `..` or an absolute one |
|
|
73
|
+
| `other-repository` | the local `origin` differs from the one the bundle recorded |
|
|
74
|
+
| `exists` | the target transcript or side folder is already there, or any other project folder already holds a transcript for the id, which `--resume <id>` could reach first |
|
|
75
|
+
| `live-here` | the id is live in the local roster, so a second copy would fork it |
|
|
76
|
+
| `write-failed` | a write failed partway for a reason other than a copy appearing, such as a bundle carrying a file where it also needs a folder |
|
|
77
|
+
| `no-archive` | the running Bun predates `Bun.Archive` |
|
|
76
78
|
|
|
77
79
|
A write that fails partway removes every file this run placed and every folder it created before refusing, so a retry of the same bundle does not refuse on its own leftovers. Any path it could not remove is named in the message. A copy that appears between the existence check and the write refuses as `exists` on the same terms.
|
|
78
80
|
|
|
@@ -28,14 +28,22 @@ The audit reads the directory it is pointed at, defaulting to the cwd. `canon cl
|
|
|
28
28
|
|
|
29
29
|
Each check traces to a line in the standard.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
### Folder and frontmatter
|
|
32
|
+
|
|
32
33
|
- Frontmatter `name` matching the folder name
|
|
33
34
|
- Frontmatter `description` present
|
|
34
35
|
- `description` under 1024 characters
|
|
35
36
|
- No `README.md` inside a skill folder
|
|
36
37
|
- Folder name in kebab-case
|
|
38
|
+
|
|
39
|
+
### Requirement and content
|
|
40
|
+
|
|
41
|
+
- `REQUIREMENT.md` present in every skill folder
|
|
37
42
|
- Each `REQUIREMENT.md` declaring `Gap` and `Must`, matched at any heading level
|
|
38
43
|
- No ISO date in `SKILL.md` or any file under `references/`, reported as `datedProvenance` in the JSON record's `findings`
|
|
44
|
+
|
|
45
|
+
### Practice, references, and family
|
|
46
|
+
|
|
39
47
|
- Each listed practice skill closing with `## Excuses and rebuttals`, `## Red flags`, and `## Before handing over`, and each skill on the wider ledger list carrying `references/adopted.md`, reported together as `practiceShape`
|
|
40
48
|
- Each file under `references/` running over 100 lines opening with a `## Contents` H2, reported as `referenceContents`
|
|
41
49
|
- Each skill under `claude/skills/` declaring a `metadata.family` that names a key in `checkpoints.families`, reported as `family`
|
package/docs/target/projects.md
CHANGED
|
@@ -57,7 +57,7 @@ The chain is:
|
|
|
57
57
|
|
|
58
58
|
- `canon init` installs base tooling, Claude seeds, and governance rules into `.claude/rules/` in the same pass
|
|
59
59
|
- `canon tooling sync <stack> --write` adds stack-specific deps, scripts, and gitignore entries
|
|
60
|
-
- The agent reads `canon tooling reference <stack>` (plus parents) as its audit context, follows it to generate
|
|
60
|
+
- The agent reads `canon tooling reference <stack>` (plus parents) as its audit context, follows it to generate oxlint, vitest, playwright configs and the stack's setup script, and extends `canon/context/ci.md` and `canon/context/development.md` per the reference's extend sections <!-- audit-ignore-citations: canon/context/ci.md, canon/context/development.md -->
|
|
61
61
|
- The `verify` phase runs the installed `package.json` scripts (lint, typecheck, check, test, build) and reports pass or fail
|
|
62
62
|
- The `indexes` phase bootstraps the `index.md` system over the project's own documentation folders, confirming candidate folders with the operator rather than running unattended
|
|
63
63
|
|
package/docs/target/scenarios.md
CHANGED
|
@@ -46,10 +46,10 @@ canon tooling sync vite-react ./frontend --skip base --write
|
|
|
46
46
|
canon tooling sync python ./backend --skip base --write
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
`--skip base` drops the `base` layer from each subtree sync, so husky,
|
|
49
|
+
`--skip base` drops the `base` layer from each subtree sync, so husky, oxfmt, commitlint, and CI stay single at the repo root. The one exception is base's verify runner, `scripts/verify.ts` and `scripts/verify.json`, which every subtree still receives so it can verify on its own. Without it, every subtree re-drops husky, and since git honors only one `core.hooksPath` the extra hook dirs silently break. Each subtree still gets its own framework configs (oxlint, vitest, tsconfig, vite), and its own stack reference reads through `canon tooling reference <stack>`.
|
|
50
50
|
|
|
51
51
|
A sync whose target sits below the git root knows it is writing into a subfolder:
|
|
52
52
|
|
|
53
53
|
- It withholds `.github/`, since GitHub reads workflows only at the repository root, and names each withheld file. Run the subtree from a job in the root workflow instead, with `working-directory` set to the subtree path the sync prints, such as `working-directory: frontend`.
|
|
54
54
|
- It installs no dependencies and adds no scripts to a subtree without a `package.json`. It names what it skipped and ends on `run 'bun init' in <path>, then sync again`.
|
|
55
|
-
- The subtree carries no `check` script, since that lives in the root's base layer, so run `bun scripts/verify.ts` there. It skips the format
|
|
55
|
+
- The subtree carries no `check` script, since that lives in the root's base layer, so run `bun scripts/verify.ts` there. It skips the format phase a subtree does not declare, since the root runs them, and still fails on a missing lint, typecheck, or test script, the phases its stack's `scripts/verify.json` requires.
|
|
@@ -10,23 +10,25 @@ category: Agent surface
|
|
|
10
10
|
|
|
11
11
|
Each standard now lives at `references/<name>.md` in the skill that owns it. Load that skill and read the reference it names:
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- `
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
| Skill | Standards |
|
|
14
|
+
| ----------------- | ------------------------------------------------------------- |
|
|
15
|
+
| `task-board` | `board`, `tasks`, `tasks-decline` |
|
|
16
|
+
| `context-fold` | `context` |
|
|
17
|
+
| `canvas-board` | `canvas`, `design` |
|
|
18
|
+
| `docs-sync` | `docs`, `readme` |
|
|
19
|
+
| `draft-figure` | `figures`, `mermaid` |
|
|
20
|
+
| `create-rule` | `rule` |
|
|
21
|
+
| `create-skill` | `skill`, `skill-paths`, `skill-practice`, `skill-requirement` |
|
|
22
|
+
| `git-branch` | `branch`, `slug` |
|
|
23
|
+
| `git-commit` | `commit`, `versioning` |
|
|
24
|
+
| `git-pr` | `pr`, `publish` |
|
|
25
|
+
| `markdown-craft` | `markdown` |
|
|
26
|
+
| `teach-workspace` | `glossary`, `teach` |
|
|
27
|
+
| `plan-groundwork` | `groundwork`, `groundwork-spikes` |
|
|
28
|
+
| `plan-intake` | `intake` |
|
|
29
|
+
| `plan-feature` | `plan`, `plan-lifecycle` |
|
|
30
|
+
| `draft-ready` | `ready` |
|
|
31
|
+
| `draft-doc` | `requirements`, `wiki` |
|
|
32
|
+
| `session-map` | `session` |
|
|
31
33
|
|
|
32
34
|
One name moved under a new filename. `standard`, the shape of a standard itself, became `skill-reference.md` in `create-skill`, since the toolkit no longer ships a standards folder to hold one.
|
|
@@ -52,6 +52,9 @@ Work in Claude Code directly. It reads `CLAUDE.md` automatically and has full fi
|
|
|
52
52
|
- When the input is a pile of findings rather than one feature, invoke `canon:plan-intake` first. It files the dump into `.canon/intake/<nn>-<slug>/`, one item per finding carrying a problem measured against the tree, a proposed fix, and a verdict, then names which items are plan-ready, which need measuring, and which are already settled.
|
|
53
53
|
- When the backlog has grown past what anyone rereads, invoke `canon:backlog-triage`. It files one item per backlog row into an intake folder, suggesting decline, archive, keep, or promote and leaning toward decline, and once `canon:plan-intake-answer` has taken your answers, a second run applies the approved verdicts through the task verbs.
|
|
54
54
|
- When the current state is unmeasured and more than one approach is live, invoke `canon:plan-groundwork` first. It opens a track folder under `.canon/groundwork/<nn>-<slug>/` and ends in a decision, which may be to do nothing. Skip it when the approach is already settled.
|
|
55
|
+
|
|
56
|
+
Then plan and build:
|
|
57
|
+
|
|
55
58
|
- Invoke `canon:plan-feature` to scan for code-level conflicts and ambiguities, confirm approach before proceeding
|
|
56
59
|
- Implement the feature, then Claude Code runs the commands defined in `CLAUDE.md`, fixes failures, and iterates until all pass
|
|
57
60
|
- For UI changes, invoke `canon:ui-checklist` to write what a reviewer has to look at and name any behavior shipping without a test
|
|
@@ -35,9 +35,14 @@ A record generated from a token source carries the values in tables instead, whi
|
|
|
35
35
|
|
|
36
36
|
### Skills
|
|
37
37
|
|
|
38
|
+
#### Reviewing and measuring
|
|
39
|
+
|
|
38
40
|
- `canon:ui-checklist` for what a reviewer has to look at after UI changes, and what ships without a test
|
|
39
41
|
- `canon:ux-audit` for UX gap detection on existing surfaces
|
|
40
42
|
- `canon:ux-measure` for what a running surface costs to paint, read against published thresholds
|
|
43
|
+
|
|
44
|
+
#### Drafting
|
|
45
|
+
|
|
41
46
|
- `canon:draft-and-pick` for a call settled by looking, drafting several candidates as frames on the canvas and taking your pick
|
|
42
47
|
- `canon:canvas-board` for a direction worked out over several turns, drawn as HTML frames you drag, select, and restyle in the browser while the session reads your changes back. Only the pick moves into `canon/DESIGN.md`, since the canvas folder is gitignored
|
|
43
48
|
- `canon:draft-identity` to draft a project's logo mark and compose it into an icon sequence and a social card, through `draft-and-pick`'s own render-and-pick loop. On an Astro project holding the card route scaffold, the card lands as a route the project keeps and is captured through a running server, so it reads the project's real stylesheet rather than typed copies of every color. Everywhere else it ships as a PNG and the run says so.
|
package/governance/detect.toml
CHANGED
|
@@ -27,7 +27,12 @@ files = [".github/workflows"]
|
|
|
27
27
|
|
|
28
28
|
["dependencies"]
|
|
29
29
|
deps = []
|
|
30
|
-
files = [
|
|
30
|
+
files = [
|
|
31
|
+
"**/package.json",
|
|
32
|
+
"**/pyproject.toml",
|
|
33
|
+
"**/go.mod",
|
|
34
|
+
"**/composer.json",
|
|
35
|
+
]
|
|
31
36
|
|
|
32
37
|
["config-comments"]
|
|
33
38
|
deps = []
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@erclx/canon",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.38.0",
|
|
5
5
|
"description": "Runs your agent's work and keeps its code good, on one setup for every repo.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -24,15 +24,16 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
|
-
"format": "prettier --write --log-level warn
|
|
28
|
-
"check:format": "prettier --check --log-level warn
|
|
27
|
+
"format": "oxfmt . && prettier --write --log-level warn 'web/**/*.astro' && shfmt --write --indent 2 scripts/ tooling/ claude/",
|
|
28
|
+
"check:format": "oxfmt --check . && prettier --check --log-level warn 'web/**/*.astro' && shfmt --diff --indent 2 scripts/ tooling/ claude/",
|
|
29
29
|
"check:shell": "find scripts tooling claude .claude/hooks -name '*.sh' -exec shellcheck --severity=warning {} + && find .husky -maxdepth 1 -type f -exec shellcheck --severity=warning --shell=sh {} +",
|
|
30
|
+
"check:lint": "oxlint --disable-nested-config --max-warnings 0",
|
|
30
31
|
"check:types": "tsc --noEmit",
|
|
31
32
|
"check:install": "./scripts/core/install-check.sh",
|
|
32
33
|
"test": "bun --bun vitest run",
|
|
33
34
|
"prepare": "husky",
|
|
34
35
|
"check": "bun src/cli.ts gate run",
|
|
35
|
-
"check:ci": "bun src/cli.ts gate run --all
|
|
36
|
+
"check:ci": "bun src/cli.ts gate run --all",
|
|
36
37
|
"update": "bun update --interactive && bun run check",
|
|
37
38
|
"clean": "rm -rf node_modules && bun pm cache rm && bun install",
|
|
38
39
|
"bootstrap": "./scripts/core/bootstrap.sh",
|
|
@@ -72,6 +73,8 @@
|
|
|
72
73
|
"happy-dom": "^20.14.5",
|
|
73
74
|
"husky": "^9.1.7",
|
|
74
75
|
"micromatch": "^4.0.8",
|
|
76
|
+
"oxfmt": "0.72.0",
|
|
77
|
+
"oxlint": "1.87.0",
|
|
75
78
|
"prettier": "^3.8.1",
|
|
76
79
|
"prettier-plugin-astro": "^0.14.1",
|
|
77
80
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
@@ -101,7 +101,7 @@ log_step "Assert scaffold"
|
|
|
101
101
|
# skills rather than installing into a target. The two
|
|
102
102
|
# rule paths stand for the `claude` and `canon` groups `base` takes whole.
|
|
103
103
|
for path in "CLAUDE.md" ".claude/wiki/index.md" ".claude" "canon/context/index.md" \
|
|
104
|
-
".
|
|
104
|
+
".oxfmtrc.json" ".lintstagedrc" ".husky/pre-commit" ".github/workflows/verify.yml" "scripts/verify.ts" \
|
|
105
105
|
".claude/rules/canon/claude/output.md" ".claude/rules/canon/canon/scratch.md"; do
|
|
106
106
|
if [ ! -e "$TARGET_DIR/$path" ]; then
|
|
107
107
|
log_error "Missing after canon init: $path"
|
package/src/cli/help.ts
CHANGED
|
@@ -130,7 +130,7 @@ const EXAMPLES = [
|
|
|
130
130
|
'canon labels audit --json',
|
|
131
131
|
'canon census --json',
|
|
132
132
|
'canon audits run --json',
|
|
133
|
-
'canon gate run --all
|
|
133
|
+
'canon gate run --all',
|
|
134
134
|
'canon upgrade --json',
|
|
135
135
|
'canon upstream fetch --since 2.1.256 --json',
|
|
136
136
|
]
|
package/src/commands/claude.ts
CHANGED
|
@@ -70,7 +70,6 @@ import {
|
|
|
70
70
|
writeSettings,
|
|
71
71
|
} from '@/claude/settings'
|
|
72
72
|
import { copyPreservingMode } from '@/sync/copy'
|
|
73
|
-
import { execScript } from '@/cli/exec'
|
|
74
73
|
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/roots/project'
|
|
75
74
|
import { recordDir } from '@/roots/record'
|
|
76
75
|
import { SURFACE_ENTRIES, surfaceDir } from '@/roots/surface'
|
package/src/commands/context.ts
CHANGED
|
@@ -11,11 +11,14 @@ import {
|
|
|
11
11
|
LENGTH_CHECKPOINT,
|
|
12
12
|
matchesSiblings,
|
|
13
13
|
measureFolders,
|
|
14
|
+
extraSections,
|
|
14
15
|
missingSections,
|
|
15
16
|
PROVENANCE_FOLDER,
|
|
17
|
+
ALLOWED_SECTIONS_BY_FOLDER,
|
|
16
18
|
REQUIRED_SECTIONS,
|
|
17
19
|
REQUIRED_SECTIONS_BY_FOLDER,
|
|
18
20
|
requiredSections,
|
|
21
|
+
type ExtraSectionFinding,
|
|
19
22
|
type SectionFinding,
|
|
20
23
|
} from '@/context/audit'
|
|
21
24
|
import { auditCitations, type CitationReport } from '@/context/citations'
|
|
@@ -640,6 +643,7 @@ async function runAudit(
|
|
|
640
643
|
const entries = gateOnly ? [] : await measureFolders(root, folders)
|
|
641
644
|
const drift = gateOnly ? [] : await auditIndexes(folders)
|
|
642
645
|
const sections = gateOnly ? [] : missingSections(root, folders, entries)
|
|
646
|
+
const extras = gateOnly ? [] : extraSections(entries)
|
|
643
647
|
const length = gateOnly ? undefined : lengthFindings(entries)
|
|
644
648
|
// Absent under `--citations-only` and null when the project carries no
|
|
645
649
|
// record. A run that never looked and a project with nothing to look at are
|
|
@@ -653,7 +657,7 @@ async function runAudit(
|
|
|
653
657
|
reportScope(folders, unresolved)
|
|
654
658
|
reportCitations(citations, cited)
|
|
655
659
|
reportReferenceForm(entries, folders)
|
|
656
|
-
reportSections(sections, folders)
|
|
660
|
+
reportSections(sections, extras, folders)
|
|
657
661
|
reportLength(length ?? [])
|
|
658
662
|
reportTables(entries)
|
|
659
663
|
reportProvenance(entries, folders)
|
|
@@ -691,6 +695,7 @@ async function runAudit(
|
|
|
691
695
|
// never opened an entry.
|
|
692
696
|
length,
|
|
693
697
|
missingSections: sections,
|
|
698
|
+
extraSections: extras,
|
|
694
699
|
indexDrift: drift,
|
|
695
700
|
// Null says the run opened the project and found no record, which a
|
|
696
701
|
// target that never wrote one is entitled to. Absent says the run
|
|
@@ -705,6 +710,7 @@ async function runAudit(
|
|
|
705
710
|
// caller that read it first, since removing it would break that
|
|
706
711
|
// caller without an error.
|
|
707
712
|
requiredSectionsByFolder: REQUIRED_SECTIONS_BY_FOLDER,
|
|
713
|
+
allowedSectionsByFolder: ALLOWED_SECTIONS_BY_FOLDER,
|
|
708
714
|
},
|
|
709
715
|
})}\n`,
|
|
710
716
|
)
|
|
@@ -715,6 +721,7 @@ async function runAudit(
|
|
|
715
721
|
requirementsOverWords:
|
|
716
722
|
requirements !== undefined && isOverWordCap(requirements),
|
|
717
723
|
sections,
|
|
724
|
+
extraSections: extras,
|
|
718
725
|
drift,
|
|
719
726
|
widened,
|
|
720
727
|
})
|
|
@@ -905,6 +912,7 @@ function reportReferenceForm(
|
|
|
905
912
|
*/
|
|
906
913
|
function reportSections(
|
|
907
914
|
missing: readonly SectionFinding[],
|
|
915
|
+
extras: readonly ExtraSectionFinding[],
|
|
908
916
|
folders: readonly AuditedFolder[],
|
|
909
917
|
): void {
|
|
910
918
|
logStep('Sections')
|
|
@@ -938,13 +946,30 @@ function reportSections(
|
|
|
938
946
|
|
|
939
947
|
if (missing.length === 0) {
|
|
940
948
|
logInfo('Every entry declares each required section.')
|
|
949
|
+
} else {
|
|
950
|
+
logWarn(`${plural(missing.length, 'path')} short a required section`)
|
|
951
|
+
pipeOutput(
|
|
952
|
+
missing
|
|
953
|
+
.map((found) => `${found.rel} missing: ${found.missing.join(', ')}`)
|
|
954
|
+
.join('\n'),
|
|
955
|
+
)
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
logInfo(
|
|
959
|
+
`The set is closed: ${Object.entries(ALLOWED_SECTIONS_BY_FOLDER)
|
|
960
|
+
.map(([name, set]) => `canon/${name}/ allows ${set.join(', ')}`)
|
|
961
|
+
.join('. ')} as H2. Any other topic is an H3 under one of them.`,
|
|
962
|
+
)
|
|
963
|
+
|
|
964
|
+
if (extras.length === 0) {
|
|
965
|
+
logInfo('No entry carries an H2 outside the set.')
|
|
941
966
|
return
|
|
942
967
|
}
|
|
943
968
|
|
|
944
|
-
logWarn(`${plural(
|
|
969
|
+
logWarn(`${plural(extras.length, 'path')} carrying an H2 outside the set`)
|
|
945
970
|
pipeOutput(
|
|
946
|
-
|
|
947
|
-
.map((found) => `${found.rel}
|
|
971
|
+
extras
|
|
972
|
+
.map((found) => `${found.rel} extra: ${found.headings.join(', ')}`)
|
|
948
973
|
.join('\n'),
|
|
949
974
|
)
|
|
950
975
|
}
|
package/src/commands/gate.ts
CHANGED
|
@@ -27,7 +27,6 @@ import { repairBareFlag } from '@/worktrees/bare-flag'
|
|
|
27
27
|
|
|
28
28
|
interface RunCommandOptions {
|
|
29
29
|
readonly all?: boolean
|
|
30
|
-
readonly write?: boolean
|
|
31
30
|
readonly nested?: boolean
|
|
32
31
|
readonly json?: boolean
|
|
33
32
|
}
|
|
@@ -48,10 +47,6 @@ export function register(program: Command): void {
|
|
|
48
47
|
'--all',
|
|
49
48
|
'Run every stage instead of scoping shell, types, and tests to changed files',
|
|
50
49
|
)
|
|
51
|
-
.option(
|
|
52
|
-
'--no-write',
|
|
53
|
-
'Check formatting instead of applying it, which is what a merge gate wants',
|
|
54
|
-
)
|
|
55
50
|
.option(
|
|
56
51
|
'--nested',
|
|
57
52
|
'Suppress the outer frame when another script opened one',
|
|
@@ -77,7 +72,7 @@ export function register(program: Command): void {
|
|
|
77
72
|
'',
|
|
78
73
|
'Examples:',
|
|
79
74
|
' canon gate run',
|
|
80
|
-
' canon gate run --all
|
|
75
|
+
' canon gate run --all',
|
|
81
76
|
' canon gate run --json',
|
|
82
77
|
'',
|
|
83
78
|
].join('\n'),
|
|
@@ -92,7 +87,6 @@ async function runGate(opts: RunCommandOptions): Promise<number> {
|
|
|
92
87
|
const mismatch = checkoutMismatchWarning(process.cwd())
|
|
93
88
|
const emitJson = opts.json ?? false
|
|
94
89
|
const nested = opts.nested ?? false
|
|
95
|
-
const write = opts.write ?? true
|
|
96
90
|
const run = commandRunner(root)
|
|
97
91
|
|
|
98
92
|
if (!emitJson && !nested) intro('canon gate run')
|
|
@@ -111,7 +105,6 @@ async function runGate(opts: RunCommandOptions): Promise<number> {
|
|
|
111
105
|
ci: process.env.CI === 'true',
|
|
112
106
|
run,
|
|
113
107
|
cli: cliRunner(root),
|
|
114
|
-
write,
|
|
115
108
|
changed: changed.scoped ? changed.files : undefined,
|
|
116
109
|
onQueue: (label, holder) => {
|
|
117
110
|
const text = `${label} is waiting for the suite pid ${holder.pid} runs at ${holder.root}`
|