@erclx/canon 4.22.0 → 4.22.1
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.
|
@@ -7,7 +7,7 @@ description: Reviews all changes since main for bugs, edge cases, and logic flaw
|
|
|
7
7
|
|
|
8
8
|
## Guards
|
|
9
9
|
|
|
10
|
-
- Resolve the base ref first, per Diff baseline below. If
|
|
10
|
+
- Resolve the base ref first, per Diff baseline below. If `git diff <base>` and the untracked listing are both empty, stop: `✅ No changes to review.` Those two are the sets Step 2 reads, and the range already carries the staged and the unstaged work the guard used to test on its own. A guard reading bare local `main` stops the skill on `main` before it ever reaches Step 2.
|
|
11
11
|
|
|
12
12
|
## Diff baseline
|
|
13
13
|
|
|
@@ -19,12 +19,9 @@ git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main 2>/dev/n
|
|
|
19
19
|
|
|
20
20
|
Prefer `origin/main` over local `main`. On `main` itself the local ref resolves to HEAD, so every committed change drops out of the set and the skill reports a clean branch rather than admitting it cannot see the work.
|
|
21
21
|
|
|
22
|
-
The baseline is unusable in
|
|
22
|
+
The baseline is unusable in one case: no merge base resolves against either ref. Substitute `HEAD` and lead the report with `⚠ Baseline unusable. Reviewed the uncommitted set only.`, so a clean summary is never read as a clean branch. That substitution costs the committed half, because `git diff HEAD` reaches the staged and the unstaged work and nothing behind it.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
- The base equals HEAD, whichever ref resolved it. Nothing is committed ahead of the base to compare against. This is the ordinary shape on `main`, and on a feature branch before its first commit.
|
|
26
|
-
|
|
27
|
-
An unusable baseline costs only the committed half. `git diff <base> HEAD` is empty by definition once the base equals HEAD, while the staged set and `git diff HEAD` still report work at correct scope. Review those and lead the report with `⚠ Baseline unusable. Reviewed the uncommitted set only.`, so a clean summary is never read as a clean branch.
|
|
24
|
+
The base equalling HEAD is a usable baseline rather than the second case it used to be. It means nothing is committed ahead of the base, which is the ordinary shape on `main` and on a feature branch before its first commit, and `git diff <base>` degenerates there to `git diff HEAD` and reads the branch whole. Warning on it would tell a reader their review was partial when it had covered everything.
|
|
28
25
|
|
|
29
26
|
## Step 1: read context
|
|
30
27
|
|
|
@@ -41,24 +38,20 @@ Coding standards from `.claude/rules/` are auto-loaded by Claude Code. Always-on
|
|
|
41
38
|
Resolve the base ref per Diff baseline above, then run these in parallel from the project root:
|
|
42
39
|
|
|
43
40
|
```bash
|
|
44
|
-
git diff
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
git diff --staged --name-only
|
|
41
|
+
git diff <base>
|
|
49
42
|
```
|
|
50
43
|
|
|
51
44
|
```bash
|
|
52
|
-
git diff <base>
|
|
45
|
+
git diff --name-only <base>
|
|
53
46
|
```
|
|
54
47
|
|
|
55
48
|
```bash
|
|
56
|
-
git
|
|
49
|
+
git ls-files --others --exclude-standard
|
|
57
50
|
```
|
|
58
51
|
|
|
59
|
-
|
|
52
|
+
Use `git diff <base>` as the diff scope. It compares the base against the working tree, so the committed, staged, and unstaged halves arrive in one range and no selection between them is made. Take the file list as the name-only output plus the untracked listing, which covers a file git has never tracked and therefore no diff can reach.
|
|
60
53
|
|
|
61
|
-
When the baseline is unusable, substitute `
|
|
54
|
+
When the baseline is unusable, substitute `HEAD` for `<base>` in both diff commands. Never substitute the whole tree for a missing baseline.
|
|
62
55
|
|
|
63
56
|
## Step 3: read changed files
|
|
64
57
|
|