@erclx/canon 5.51.0 → 5.52.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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.52.0](https://github.com/erclx/canon/compare/v5.51.0...v5.52.0) (2026-10-21)
4
+
5
+
6
+ ### Features
7
+
8
+ * **labels:** fail the scan on pull request body density ([#2585](https://github.com/erclx/canon/issues/2585)) ([121216f](https://github.com/erclx/canon/commit/121216fa258de521ff2b077aa0b897b5f2b9d519))
9
+ * **skills:** add target-update to catch a target up to the toolkit ([#2583](https://github.com/erclx/canon/issues/2583)) ([065b971](https://github.com/erclx/canon/commit/065b9716df290bd87a94b16bed1e54e4ebf29f4e))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **hooks:** anchor the method flag in review-post-scan on whitespace ([#2584](https://github.com/erclx/canon/issues/2584)) ([32c52a2](https://github.com/erclx/canon/commit/32c52a25e4eef6d7d9a88d83aed3d16ab433dcf7))
15
+
3
16
  ## [5.51.0](https://github.com/erclx/canon/compare/v5.50.0...v5.51.0) (2026-10-21)
4
17
 
5
18
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "canon",
3
3
  "description": "Runs your agent's work and keeps its code good, on one setup for every repo.",
4
- "version": "5.51.0",
4
+ "version": "5.52.0",
5
5
  "author": {
6
6
  "name": "Eric Le",
7
7
  "url": "https://github.com/erclx"
@@ -129,7 +129,7 @@ A live agent session is never the human a box waits on.
129
129
 
130
130
  ### Density
131
131
 
132
- `canon labels scan` reports each section's density under `density`, naming the section, the kind, and the line in the whole body. Its help lists every limit.
132
+ `canon labels scan` fails on a density finding, naming the section, the kind, and the line in the whole body under `density`. Its help lists every limit.
133
133
 
134
134
  - Every section but Testing holds bullets to 200 characters and 5 in a row, and paragraphs to 350 characters and 2 in a row
135
135
  - Any section reports a `subheading`, and Technical context reports a `mixed-form`
@@ -124,7 +124,7 @@ canon labels scan --body-file .canon/tmp/pr/reply/reply-<number>.md --json
124
124
  The hook skips `.canon/tmp/`, and the `pull_request` check reads only a pull request's own title and body, so this scan is the only gate on the reply.
125
125
 
126
126
  - Fix any hit, and stop on a `density` entry too, shortening the line it names
127
- - Read the record rather than the exit, since density never sets the exit code
127
+ - Read the record rather than the exit, since a post's density never sets the exit code
128
128
 
129
129
  Then post and keep the `id` the POST answers with, since Step 7 edits this exact comment:
130
130
 
@@ -13,7 +13,7 @@ Write the body the way Step 6 writes a reply.
13
13
 
14
14
  - Load `write-human` for voice and word choice, and follow `${CLAUDE_SKILL_DIR}/../markdown-craft/references/markdown.md` for punctuation
15
15
  - Run the `${CLAUDE_SKILL_DIR}/../git-pr/references/publish.md` scan before posting, with `canon labels scan --body-file .canon/tmp/pr/reply/reply-<number>.md --json`
16
- - Stop on a `density` entry as on any hit, since density never sets the exit code
16
+ - Stop on a `density` entry as on any hit, since a post's density never sets the exit code
17
17
  - Open with `## Post-review findings` rather than `## Review response`, since nothing on the thread is being answered
18
18
  - Close the body with `🤖 Addressed by Claude Code` on its own line, matching the reply's footer
19
19
 
@@ -114,7 +114,7 @@ Run `canon labels scan --title "<title>" --body "<body>" --head <headRefName>` a
114
114
 
115
115
  - Name the token quoted from the title or body for a phase label, a board identifier, or a session link
116
116
  - Name the broken rule, being `structure`, a casing issue, or `length`, for a title-format hit
117
- - A heading in `sections.outside` or `sections.missing`, or a character in `bannedCharacters`, is a hit of the same weight, naming the heading or the character
117
+ - A heading in `sections.outside` or `sections.missing`, an entry in `density`, or a character in `bannedCharacters`, is a hit of the same weight, naming the heading, the line and kind, or the character
118
118
  - This reads the pull request under review, distinct from the comment this pass posts, which the scan later in this step covers
119
119
 
120
120
  ### Why the threshold ignores the grade
@@ -175,7 +175,7 @@ The marker is the read-time record those fields are not.
175
175
  Before posting, run `canon labels scan --body-file .canon/tmp/pr/review/body-<number>-<short-sha>.md`, which applies the rule in `${CLAUDE_SKILL_DIR}/../git-pr/references/publish.md`. Pass `--json` and fix the body and scan again on a finding.
176
176
 
177
177
  - A `density` entry is a finding here, naming a subject or nested bullet past 200 characters, a run past 5 plain bullets, or a paragraph past its limits, by its line in the whole body
178
- - Density never sets the exit code, so the hook below lets the post through on it and this step is the one that stops
178
+ - A post's density never sets the exit code, so the hook below lets the post through on it and this step is the one that stops
179
179
 
180
180
  - A finding phrased against an internal phase label is what the label half of the scan catches here
181
181
  - The call carries no `--title`, so the scan reads the text as a review
@@ -98,3 +98,5 @@ No overall verdict. The harness row is unchecked rather than passing.
98
98
  ```
99
99
 
100
100
  Keep the harness row `unchecked` on every run until a verb reads it. A domain left out of the table reads as a domain that passed, which is the one shape the row exists to prevent.
101
+
102
+ Close on one line naming `/canon:target-update` as the skill that applies the catch-up, when a domain reads behind and `target-update` did not invoke this check.
@@ -59,7 +59,7 @@ Three states reach this skill that the chain does not serve. Name the destinatio
59
59
 
60
60
  ### An existing project
61
61
 
62
- Stop and hand off to `target-check`, which reports what the target already carries before anything is repaired. This chain never reads that, so a per-domain install picked here is a guess against configs nobody read.
62
+ Stop and hand off to `target-check`, which reports what the target already carries before anything is repaired. This chain never reads that, so a per-domain install picked here is a guess against configs nobody read. Name `target-update` when the operator wants the catch-up applied.
63
63
 
64
64
  ### The `.claude/` folder alone
65
65
 
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: target-update
3
+ description: What catching a target up to the toolkit is for, the judgment it holds, and where it hands off to the check and the setup
4
+ ---
5
+
6
+ # Target update requirement
7
+
8
+ ## Gap
9
+
10
+ Without this skill, a session catching a target up after a release improvises the order. It runs a sync before the migrations that move its paths, writes a record-tree rewrite with no backup, and lets a sync replace a rule the project customized without saying what was lost.
11
+
12
+ The verbs report every fact, so the gap is the judgment between them. A session reads a refused migration as a step to force, picks rules and seed merges with nobody asked, and ends with no way to tell a current target from one it stopped partway through.
13
+
14
+ ## Must
15
+
16
+ - Show the changelog summary, the pending migrations, and the drift before the first write to the target, and apply only on the operator's go-ahead
17
+ - Read every fact from a `canon` verb, so a later release changes what the skill reports with no edit to its body
18
+ - Stop and ask on a refused migration, a stranded file, an unattributed folder, and a rule the stack newly ships
19
+ - Keep a customized file and a drifted seed as the project wrote them, naming the toolkit change each one skipped
20
+ - End on a clean `target-check` or on named remainders, with nothing written when nothing is pending
21
+
22
+ ## Must not
23
+
24
+ - Detect pending migrations or parse the changelog inside the body, since `canon migrate status` and `canon changelog` own both
25
+ - Name a toolkit version in an update commit's subject
26
+ - Run from the toolkit's own checkout, or write into a target from another repository's session
27
+ - Rely on being typed by name. It is reached through its description and `target-check`'s close, and a quarter of releases with no migration and no drift is the signal to fold it in there.
28
+
29
+ ## Out of scope
30
+
31
+ - First-time scaffold, which `target-setup` owns
32
+ - Reporting drift without repairing it, which `target-check` owns
33
+ - Opening the target's pull request, which `git-ship` owns
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: target-update
3
+ description: Catches a target project up to the toolkit after a release. Upgrades the binary and plugin, previews the changelog summary, the pending migrations, and the drift, then on the operator's go-ahead migrates, syncs, regenerates the indexes, and ends on a clean `target-check` or named remainders. Use when asked to "update this project to the latest canon", "catch this target up", "apply the new release here", "run the pending migrations", or "bring this project current with the toolkit". Do NOT use on a project without the toolkit, which is `target-setup`, or to report drift without repairing it, which is `target-check`.
4
+ metadata:
5
+ family: upkeep
6
+ ---
7
+
8
+ # Target update
9
+
10
+ Takes a target from behind the toolkit to current. Every fact comes from a `canon` verb, and this body holds the order and the judgment calls the verbs leave open. It names no migration, rule, or stack, so a later release reaches it with no edit here.
11
+
12
+ Read `canon docs migrate` for what each migrate verb moves and refuses, and `canon docs sync` for the drift causes. This body cites them rather than restating them.
13
+
14
+ ## Guards
15
+
16
+ Stop with the line beside each state.
17
+
18
+ | State | Stop |
19
+ | ------------------------------------------- | ------------------------------------------------------------------------------------------------- |
20
+ | `canon` absent from the path | `❌ canon is not on PATH, so nothing can be read.` |
21
+ | No `.claude/` directory at the working root | `❌ No .claude/ here, so the toolkit is not installed. Run /canon:target-setup instead.` |
22
+ | A `claude/skills/` folder, no leading dot | `❌ This is the toolkit itself rather than a target. Run this from the target's own session.` |
23
+ | A dirty working tree | `❌ Uncommitted changes here. Commit or stash them first, since canon sync refuses a dirty tree.` |
24
+
25
+ Then hold two rules for every verb this body runs.
26
+
27
+ - Run it under `CANON_NON_INTERACTIVE=1` from the target root
28
+ - Branch on its record's fields rather than its exit, which a shell function wrapping `canon` can flatten
29
+
30
+ ## Step 1: bring the binary and plugin forward
31
+
32
+ Read `skew` off `canon sync --check . --json`. When `installed` trails `latest`, run `canon upgrade --json`, then `canon claude plugin-update --json` whatever the skew reads.
33
+
34
+ Both write to the machine rather than the target, and the preview needs the verbs and the changelog a newer binary carries, so they run before it. The permission dialog gates each. Report a refusal from either and continue on the installed binary, saying the preview reads against it.
35
+
36
+ ## Step 2: read the pending work
37
+
38
+ Run these in parallel from the target root:
39
+
40
+ ```bash
41
+ CANON_NON_INTERACTIVE=1 canon changelog --json
42
+ CANON_NON_INTERACTIVE=1 canon migrate status --json
43
+ CANON_NON_INTERACTIVE=1 canon sync --check . --json
44
+ ```
45
+
46
+ Then take `<stack>` from the first name in the report's `tooling.chain` and run `canon tooling diff <stack> . --json`. Never run it bare, since the stack prompt resolves to the catalog's first entry under the non-interactive variable. Report tooling unmeasured when `tooling.measured` is false or `chain` names nothing.
47
+
48
+ ### When a read refuses
49
+
50
+ A refusal is a fact for the preview, never a gap to fill by reading files.
51
+
52
+ - `changelog` refusing `no-stamp` or `unknown-version`: say the summary is unread and why. Offer `--since <version>` when the operator names one, and never guess a start.
53
+ - `migrate status` carrying no such subcommand: the binary predates it. Stop, since pending migrations cannot be listed without detecting them here, which this skill never does.
54
+ - A missing report key is an older binary rather than an empty answer. Name the installed version beside it.
55
+
56
+ ## Step 3: preview and wait
57
+
58
+ Write the preview from those records alone, then stop and wait for the operator. Nothing in the target is written before the go-ahead.
59
+
60
+ ```markdown
61
+ Target update: `<path>`, canon `<installed>` to `<running>`.
62
+
63
+ **What changed since `<since>`:** <three to six bullets from the changelog entries, each naming what this project will notice, never the version>
64
+
65
+ **Migrations, in run order:** <each pending or refused entry from migrate status, with its verb>
66
+
67
+ **Drift:** <each non-empty cause from sync --check, with its count and paths>
68
+
69
+ **Calls for you:** <each judgment call below this run meets, with the default this skill takes>
70
+
71
+ **Commands, in order:** <the exact commands Steps 4 to 6 will run>
72
+ ```
73
+
74
+ Summarize the changelog for this project, not for the toolkit. Drop an entry that touches nothing the target holds, and lead with anything a migration or a sync will change.
75
+
76
+ ### Nothing pending
77
+
78
+ When the changelog range is empty, `migrate status` lists nothing pending or refused, and the drift lines hold nothing a step here would take, write nothing. Invoke `canon:target-check` and report the target current with its table.
79
+
80
+ ## Step 4: migrate
81
+
82
+ Run each pending migration in the order `migrate status` gave, one at a time, as the entry's `verb` with `--write --json` appended. The verb carries the flags its dry run used, so a bare `canon migrate <name>` would apply a plan the preview never showed.
83
+
84
+ - Run `canon migrate status --json` again after each write, since an applied move can turn a clean entry pending
85
+ - Stop and ask on a `refused` entry, quoting its reason and the remedy it names. Run the remedy only on the operator's word, since a refusal guards a destination the project may own.
86
+ - Stage each write with `git add -A`, since no migrate verb stages and the tree was clean before it, then commit through `canon:git-commit`, one commit per migration
87
+ - Skip the commit when the write changed no tracked file, as `record-tree` does by touching only gitignored records
88
+
89
+ ### Markers
90
+
91
+ A planned rewrite can reach a line that names an old spelling on purpose, such as a dated note or a quoted history. Propose a marker for each such line in the preview, and add it before the write. `canon docs migrate` names the marker for each spelling.
92
+
93
+ ### The record-tree backup
94
+
95
+ The record tree is untracked, so a `record-tree` rewrite has no undo. Run `canon records push --json` before its write. When that reports no backup repository, copy `.canon/` to a dated folder outside the project and name the path in the report.
96
+
97
+ ## Step 5: sync
98
+
99
+ Run `canon sync .`, then `canon tooling sync <stack> . --write` when the tooling diff named files to change. Treat each drift cause the way the preview stated:
100
+
101
+ | Cause | This skill |
102
+ | --------------------------- | ------------------------------------------------------------------------------------------------ |
103
+ | `stale`, `retired`, renamed | Takes the sync's write |
104
+ | `customized` | Keeps the project's file. Shows `git diff -- <rel>` as the toolkit's change, then `git restore`s |
105
+ | `stranded` | Names where the file sits and where the toolkit now installs, and moves it only on the word |
106
+ | `seeds` drifted | Merges by hand against `canon claude seeds list --json`, keeping the project's edits |
107
+ | `seeds` stale or missing | Takes the toolkit's copy whole |
108
+ | `newRules` | Lists them, and installs only the ones the operator picks, with `canon gov install --add` |
109
+
110
+ A `customized` rule is the file `canon sync` replaces, so read it back after the sync rather than trusting the report from Step 2. Report each kept file with the toolkit's change summarized in a line, so the operator can take it later.
111
+
112
+ ### What the toolkit dropped
113
+
114
+ Read `reverse.unclaimed` by attribution. Delete a `dropped` folder, read an `unattributed` one and ask before deleting it, and leave a `project` one alone.
115
+
116
+ Read the report's top-level `superseded` and `unmigrated` lists apart from it. Each names a move only the operator can make, being a file a newer seed replaced or a domain still at the root layout, so name each and move nothing.
117
+
118
+ ## Step 6: regenerate and verify
119
+
120
+ Run `canon indexes regen`, then the project's own check script when it carries one. Invoke `canon:target-check` last.
121
+
122
+ Stage the sync, the merges, and the regenerated indexes with `git add -A`, since `canon sync` leaves its writes unstaged, then commit through `canon:git-stage`. Name what changed in the project in each subject, such as the rules refreshed or the seeds merged, and never the toolkit version.
123
+
124
+ ## Output
125
+
126
+ ```markdown
127
+ Target update: `<path>`, now on canon `<version>`.
128
+
129
+ <the target-check table>
130
+
131
+ **Kept for you:** <each customized or drifted file left as the project wrote it, with the toolkit change it skipped>
132
+
133
+ **Remaining:** <each refusal, stranded file, or unread domain, with the command or decision it waits on>
134
+ ```
135
+
136
+ Omit a section that holds nothing. End on the commits and the check, and leave the pull request to `canon:git-ship`.
@@ -33,7 +33,8 @@ kind: reference
33
33
  - `record-tree` reports closed groundwork and intake trails, the scratch folder, and backup history as counts and rewrites none
34
34
  - `records` reports skipped record folders as a count on its own line
35
35
  - A `record-tree` rewrite has no undo in version control, so read the report before `--write`
36
- - `status` runs each verb as a dry run and exits 2 while any is pending, with a refusal outranking that. A clean entry can turn pending once an earlier one applies, so run it again after each `--write`.
36
+
37
+ `status` runs each verb as a dry run and exits 2 while any is pending, with a refusal outranking that. Each entry's `verb` carries the flags its dry run used, so append `--write` to it. A clean entry can turn pending once an earlier one applies, so run it again after each `--write`.
37
38
 
38
39
  Three markers keep an old spelling on a line. Each also covers the nearest non-blank line, below it for `canon-keep-record-root` and above it for `canon-keep-surface-root`.
39
40
 
@@ -8,6 +8,8 @@ category: Agent surface
8
8
 
9
9
  Each section is a move a project runs once, when it was scaffolded before the change it names. Run `canon upgrade` first, then `canon migrate status --json` to list the moves a project still needs in the order to run them. The recurring sync that follows is in [target sync](sync.md).
10
10
 
11
+ `canon:target-update` is the guided path through both. It runs the moves in that order once you approve its preview.
12
+
11
13
  ## Move the records first, once
12
14
 
13
15
  Gitignored session records, being the task board, plans, review reports, and scratch, moved from `.claude/` to `.canon/`. Run these from inside the project, and read the `ok` field of the `--json` record rather than the exit code.
@@ -47,7 +47,7 @@ The chain runs these phases:
47
47
  - The `verify` phase runs the installed `package.json` scripts and reports pass or fail
48
48
  - The `indexes` phase bootstraps `index.md` over the project's documentation folders, confirming candidates with you
49
49
 
50
- An existing project goes to `canon:target-check` first. For the Claude layer alone, run `canon claude init` and then `canon:target-setup indexes`. Run `canon:target-setup verify deep` by hand for the heavier smoke and screenshot pass.
50
+ An existing project goes to `canon:target-check` first, then to `canon:target-update` to apply the catch-up. For the Claude layer alone, run `canon claude init` and then `canon:target-setup indexes`. Run `canon:target-setup verify deep` by hand for the heavier smoke and screenshot pass.
51
51
 
52
52
  Keep the `## Scripts` table in `canon/context/development/local-loop.md` current as scripts are added. A split entry keeps it in any entry directly under `development/`, grouping a long set into short tables under lead sentences. <!-- audit-ignore-citations: canon/context/development/local-loop.md -->
53
53
 
@@ -10,7 +10,7 @@ A target pulls toolkit changes per domain, through one catch-all and several tar
10
10
 
11
11
  ## Check first
12
12
 
13
- `canon sync --check <path>` reports drift without writing, split by cause. `canon:target-check` groups the same state by domain and repairs nothing.
13
+ `canon sync --check <path>` reports drift without writing, split by cause. `canon:target-check` groups the same state by domain and repairs nothing. `canon:target-update` is the guided path, previewing the drift and then applying it on your go-ahead.
14
14
 
15
15
  The report opens with the binary version against the newest published one, and a version behind means run `canon upgrade` first.
16
16
 
@@ -103,6 +103,7 @@ Groups run in the order a project meets them. Every name `canon claude skills li
103
103
  | Skill | When to use |
104
104
  | ----------------------------- | ------------------------------------------------------- |
105
105
  | `canon:target-check` | In a target, to compare each domain with the toolkit |
106
+ | `canon:target-update` | After a release, to catch a target up to the toolkit |
106
107
  | `canon:document-repair` | Rewrite a failing docs folder to the limits and gate it |
107
108
  | `canon:canon-feedback` | The toolkit is broken, missing, or off |
108
109
  | `canon:canon-feedback-triage` | In the toolkit repo, to file feedback issues |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@erclx/canon",
3
3
  "type": "module",
4
- "version": "5.51.0",
4
+ "version": "5.52.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": {
@@ -66,6 +66,13 @@ export const SETUP_CASES: readonly SkillCase[] = [
66
66
  'Report what this project has fallen behind the toolkit on, domain by domain, and fix nothing.',
67
67
  expect: 'target-check',
68
68
  },
69
+ // The applying half of the same moment. It previews what the check would
70
+ // report and then writes, which is the line between the two.
71
+ {
72
+ prompt:
73
+ 'A new toolkit release is out, bring this project up to it and run whatever migrations it needs.',
74
+ expect: 'target-update',
75
+ },
69
76
  {
70
77
  prompt:
71
78
  "This project needs its own coding rule that the toolkit doesn't ship.",
@@ -249,8 +249,8 @@ export function register(program: Command): void {
249
249
  '## Summary or ## Key changes, fails. A review, a release-please body,',
250
250
  'and a scan carrying no title skip this check.',
251
251
  '',
252
- 'It reports the density of that same body per section under `density`,',
253
- 'without failing on it: a bullet past 200 characters, more than 5 plain',
252
+ 'It fails the density of that same body, reported per section under',
253
+ '`density`: a bullet past 200 characters, more than 5 plain',
254
254
  'bullets or 2 paragraphs in a row, a paragraph past 350 characters, any',
255
255
  'H3 or deeper heading, and Technical context mixing bullets with',
256
256
  'paragraphs. A bold label alone on a line splits a Key changes run, a',
@@ -279,11 +279,12 @@ export function register(program: Command): void {
279
279
  'not read, as GitHub does not read it.',
280
280
  '',
281
281
  'Exit codes:',
282
- ' 0 none of the eight found',
282
+ ' 0 none of the nine found',
283
283
  ' 1 refused, with the reason on stderr or in the JSON record',
284
284
  ' 2 the title or body carries a phase label, a board identifier, a',
285
285
  ' session link, a banned character, a heading outside the closed',
286
- ' list or a required one missing, a missing or stray closing line',
286
+ ' list or a required one missing, a density finding in the body, a',
287
+ ' missing or stray closing line',
287
288
  ' under --closes, or a title',
288
289
  " breaking claude/skills/git-pr/references/pr.md's format, casing, or length",
289
290
  '',
@@ -718,9 +719,9 @@ async function runScan(opts: ScanOptions): Promise<number> {
718
719
  }
719
720
  }
720
721
 
721
- // Reported and never gated yet. New bodies come back clean under the
722
- // shape in pr.md first, so an older open pull request fails no edit event.
723
- // A post is never gated, since CI reads one only after it is published.
722
+ // A body's density fails the scan. A post's never does, since the review
723
+ // post hook denies on exit 2 and scans with no title, so a post-density
724
+ // fail would block every dense review or reply post.
724
725
  const post = !sectionsChecked && isPost(resolved.body)
725
726
  const density = sectionsChecked
726
727
  ? bodyDensity(resolved.body)
@@ -859,6 +860,7 @@ async function runScan(opts: ScanOptions): Promise<number> {
859
860
  titleFormatIssues.length === 0 &&
860
861
  sections.outside.length === 0 &&
861
862
  sections.missing.length === 0 &&
863
+ !(sectionsChecked && density.length > 0) &&
862
864
  banFindings.length === 0 &&
863
865
  closing.missing.length === 0 &&
864
866
  closing.stray.length === 0
@@ -68,7 +68,11 @@ async function readOne(
68
68
  run: RunCommand,
69
69
  migration: Migration,
70
70
  ): Promise<MigrationStatus> {
71
- const verb = `canon migrate ${migration.name}`
71
+ // The flags ride in the verb, since a caller appending --write to a bare
72
+ // name would apply a different plan than the one this dry run read.
73
+ const verb = ['canon', 'migrate', migration.name, ...migration.flags].join(
74
+ ' ',
75
+ )
72
76
  const result = await run([
73
77
  'migrate',
74
78
  migration.name,
@@ -121,7 +121,7 @@ check() {
121
121
 
122
122
  # gh sends POST when a field flag is present and no method is named, and the
123
123
  # explicit method wins when one is. A call naming neither is a read.
124
- if [[ $call =~ (-X|--method)[[:space:]=]*([A-Za-z]+) ]]; then
124
+ if [[ $call =~ [[:space:]](-X|--method)[[:space:]=]*([A-Za-z]+) ]]; then
125
125
  method=$(printf '%s' "${BASH_REMATCH[2]}" | tr '[:lower:]' '[:upper:]')
126
126
  elif [[ $call =~ [[:space:]](-f|-F|--field|--raw-field|--input)([[:space:]=]|$) ]]; then
127
127
  method=POST