Commit 8cd7d9d
fix: actionable diagnostics, PR review comments, and SKILL.md size check (#88)
* fix: actionable diagnostics, regex-explanation separation, PR review comments, SKILL.md size check
- Add per-code fix hints to validate-scripts diagnostics
- Separate regex-explanation issues from intent-comment heading
- Add --json-output flag for structured CI diagnostics
- Post inline PR review comments via actions/github-script
- Dismiss stale bot reviews on subsequent pushes
- Add SKILL.md line-count validation (warn 300+, error 500+)
- Document regex-explanation rule in README and contributor guide
- Fix pre-existing intent-comment issues in release-prepare
Resolves #84
* docs: add cross-platform SKILL.md size limits table and enforce in authoring workflow
- Add runtime size comparison table to contribute/02-skill-structure-and-content.md
- Add SKILL.md size limits section to copilot-instructions.md
- Add size awareness to fusion-skill-authoring Step 4 and validation failure signals
- Warning at 300 lines, error at 500 lines
* fix: skill-sizes check uses diff-only mode in CI
- Add --only-diff and --base-ref flags to validate:skill-sizes
- CI only checks SKILL.md files changed in the PR, not the entire catalog
- Full scan still available locally without flags
* fix: export SKILL.md size thresholds to prevent drift in CLI output
Export WARN_THRESHOLD and ERROR_THRESHOLD constants from check-skill-sizes.ts
so the CLI uses these values rather than hard-coding them. This ensures the
output stays in sync if thresholds are updated in the future.
- Export thresholds from check-skill-sizes.ts
- Update CLI to import and use thresholds in error messages
- Tests verified and code formatting checked
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* fix(validate-scripts): restrict PR diagnostics to changed diff lines
Filter JSON diagnostics to changed hunks in --only-diff mode to avoid invalid inline review positions.\n\nHandle both b/path and --no-prefix diff header formats in diff-line parsing.\n\nAdd regression tests for diff-line map extraction and fallback behavior.
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* fix(validate-scripts): filter review diagnostics to diff hunks
Limit JSON diagnostics in --only-diff mode to changed lines so PR inline review comments don't target non-diff lines.
Improve diff parsing for --no-prefix headers and keep validate-scripts rule compliance in parser/test updates.
* fix: normalize SKILL.md line counting and harden PR review comment posting
- Fix off-by-one line count caused by trailing newlines via getNormalizedLineCount()
- Support both Unix (LF) and Windows (CRLF) line endings in SKILL.md size validation
- Add boundary-value tests for 300-line warn and 500-line error thresholds
- Chunk PR review comments into 50-per-review batches to avoid GitHub API limits
- Add error handling and fallback for createReview() failures
- Clarify inline comments scope (intent/regex/disallowed diagnostics only)
- Fix validate-skills-catalog.yml checkout fetch-depth for diff-only size checks
- All validation checks pass: validate:scripts, biome:check, test suite
* fix: clarify success message includes regex-explanation checks
Update the success log message to explicitly list regex-explanation as one of the
checks performed, since it's now a distinct validation category (separate from
general intent-comment checks).
* chore: add changeset for skill-authoring documentation updates
Document the new SKILL.md size limits (300 warn, 500 error) in the skill-authoring
guide, including expectations for moving overflow to references/.
* fix: format success message for better readability
* chore: update devDependencies in package.json
- Added "@biomejs/biome" version "^2.4.5" to devDependencies.
- Removed duplicate entry for "@biomejs/biome".
- Added "biome" version "^0.3.3" to devDependencies.
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>1 parent 8a47b8b commit 8cd7d9d
File tree
20 files changed
+1099
-20
lines changed- .changeset
- .github
- workflows
- contribute
- scripts
- __tests__
- release-prepare
- validate-scripts
- validate-skills
- skills/fusion-skill-authoring
20 files changed
+1099
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| 62 | + | |
61 | 63 | | |
62 | | - | |
| 64 | + | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| 62 | + | |
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
| 67 | + | |
62 | 68 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments