clud-bug 0.5.15 β 0.6.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.
- package/README.md +2 -2
- package/bin/clud-bug.js +1 -1
- package/lib/agents-md.js +1 -1
- package/lib/skills.js +44 -10
- package/lib/update.js +16 -2
- package/package.json +3 -3
- package/templates/skills/baseline/clud-bug-collaboration.md +2 -2
- package/templates/workflow-py.yml.tmpl +2 -2
- package/templates/workflow-ts.yml.tmpl +2 -2
- package/templates/workflow.yml.tmpl +2 -2
package/README.md
CHANGED
|
@@ -202,7 +202,7 @@ clud-bug uses [`anthropics/claude-code-action`](https://github.com/anthropics/cl
|
|
|
202
202
|
When you push a PR that touches `.github/workflows/clud-bug-review.yml` (or any other clud-bug workflow):
|
|
203
203
|
|
|
204
204
|
- The `clud-bug-review` check fails with `App token exchange failed: 401 Unauthorized β Workflow validation failed. The workflow file must exist and have identical content to the version on the repository's default branch.`
|
|
205
|
-
- You'll get a GitHub email titled something like **"[
|
|
205
|
+
- You'll get a GitHub email titled something like **"[thrillmade/your-repo] Run failed: Clud Bug π Crawls Your Code β `<branch-name>`"** β same wording for every workflow failure, so it doesn't visually distinguish "this is the expected self-mod guard" from "real failure."
|
|
206
206
|
|
|
207
207
|
### How to merge
|
|
208
208
|
|
|
@@ -261,7 +261,7 @@ If you don't want to use the CLI, you can install a generic workflow by hand:
|
|
|
261
261
|
```bash
|
|
262
262
|
mkdir -p .github/workflows
|
|
263
263
|
curl -o .github/workflows/clud-bug-review.yml \
|
|
264
|
-
https://raw.githubusercontent.com/
|
|
264
|
+
https://raw.githubusercontent.com/thrillmade/clud-bug/main/templates/workflow.yml.tmpl
|
|
265
265
|
# Edit {{PROJECT_DESCRIPTION}} and {{LANGUAGE_HINTS}} placeholders by hand.
|
|
266
266
|
```
|
|
267
267
|
|
package/bin/clud-bug.js
CHANGED
|
@@ -118,7 +118,7 @@ async function runInit(args) {
|
|
|
118
118
|
const fromAgentSkills = baseline.filter((s) => s._source === 'agent-skills').length;
|
|
119
119
|
const sourceLabel = baseline.length === 0
|
|
120
120
|
? ''
|
|
121
|
-
: fromAgentSkills === baseline.length ? ' (from
|
|
121
|
+
: fromAgentSkills === baseline.length ? ' (from thrillmade/agent-skills)'
|
|
122
122
|
: fromAgentSkills === 0 ? ' (bundled fallback)'
|
|
123
123
|
: ` (${fromAgentSkills} from agent-skills, ${baseline.length - fromAgentSkills} bundled)`;
|
|
124
124
|
log(` baseline kit: ${baseline.length} specimens${sourceLabel}`);
|
package/lib/agents-md.js
CHANGED
|
@@ -85,7 +85,7 @@ small baseline kit ships with every install β see
|
|
|
85
85
|
|
|
86
86
|
Anthropic's \`claude-code-action\` refuses to run on PRs that modify its own
|
|
87
87
|
workflow file. Use \`clud-bug edit-workflow\` to bundle workflow tweaks into
|
|
88
|
-
their own isolated PR β see [README](https://github.com/
|
|
88
|
+
their own isolated PR β see [README](https://github.com/thrillmade/clud-bug#when-you-edit-the-workflow).
|
|
89
89
|
|
|
90
90
|
${versionLine}
|
|
91
91
|
${END_MARKER}`;
|
package/lib/skills.js
CHANGED
|
@@ -14,10 +14,10 @@ const MANIFEST_VERSION = 1;
|
|
|
14
14
|
// silently land in users' Claude review skills mid-cycle. To roll new
|
|
15
15
|
// skill content, bump BASELINE_SKILLS_REF below in the same clud-bug PR
|
|
16
16
|
// that ships the corresponding bundled fallback update.
|
|
17
|
-
// See
|
|
18
|
-
const BASELINE_SKILLS_REF = '
|
|
17
|
+
// See thrillmade/agent-skills β skills.sh `skills/<name>/SKILL.md` layout.
|
|
18
|
+
const BASELINE_SKILLS_REF = '436963ed37cbd9c6a9b7a07e907d5a0a432fab59';
|
|
19
19
|
const AGENT_SKILLS_BASE = process.env.CLUD_BUG_AGENT_SKILLS_BASE
|
|
20
|
-
?? `https://raw.githubusercontent.com/
|
|
20
|
+
?? `https://raw.githubusercontent.com/thrillmade/agent-skills/${BASELINE_SKILLS_REF}/skills`;
|
|
21
21
|
const SKILL_FETCH_TIMEOUT_MS = 5000;
|
|
22
22
|
const SKILL_CACHE_TTL_MS = 24 * 60 * 60 * 1000; // 24h
|
|
23
23
|
|
|
@@ -93,7 +93,7 @@ export function rankAndCap(curated, searched, baseline, cap = MAX_SKILLS) {
|
|
|
93
93
|
return out;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
// Loads the baseline skills, preferring the pinned
|
|
96
|
+
// Loads the baseline skills, preferring the pinned thrillmade/agent-skills
|
|
97
97
|
// commit and falling back to the bundled npm-package copy on any fetch failure.
|
|
98
98
|
// Returns the same shape as before, plus a `_source` of either 'agent-skills'
|
|
99
99
|
// or 'bundled' so the CLI can report which path was used.
|
|
@@ -572,13 +572,47 @@ export function isCriticalReviewHeader(headerLine) {
|
|
|
572
572
|
export function classifyPerSkillOutcome(outcomeLine) {
|
|
573
573
|
if (outcomeLine == null) return 'failure';
|
|
574
574
|
const text = String(outcomeLine);
|
|
575
|
-
|
|
576
|
-
//
|
|
577
|
-
//
|
|
578
|
-
|
|
579
|
-
//
|
|
580
|
-
//
|
|
575
|
+
|
|
576
|
+
// HARD-FAILURE OVERRIDE: any positive finding count β failure.
|
|
577
|
+
// `\b[1-9]\d*\s+(?:\w+\s+){0,3}finding` matches "1 finding",
|
|
578
|
+
// "2 critical findings", "10 findings", "100 minor findings below".
|
|
579
|
+
// Up to 3 intermediate words allow modifiers like "critical"/"minor".
|
|
580
|
+
// The `\b[1-9]` anchor (vs `[0-9]`) excludes `0` β so this never
|
|
581
|
+
// shadows the "0 findings" success case below. Also: "10 findings"
|
|
582
|
+
// is correctly classified failure because `\b1` matches at the
|
|
583
|
+
// word boundary before `1`, then `\d*` consumes `0`.
|
|
584
|
+
if (/\b[1-9]\d*\s+(?:\w+\s+){0,3}finding/i.test(text)) return 'failure';
|
|
585
|
+
|
|
586
|
+
// SUCCESS PATTERNS β broadened in v0.5.16 to handle natural bot
|
|
587
|
+
// phrasings without enumerating every synonym. The bot's review
|
|
588
|
+
// prompt encourages canonical "0 findings" wording but variance
|
|
589
|
+
// is real (e.g. "no findings to anchor", "0 critical findings").
|
|
590
|
+
|
|
591
|
+
// (1) Zero-finding count, optionally with up to 3 modifier words.
|
|
592
|
+
// Matches: "0 findings", "0 critical findings", "no findings",
|
|
593
|
+
// "zero performance findings", "no findings to anchor".
|
|
594
|
+
// Does NOT match: "10 findings" (handled above), "all findings",
|
|
595
|
+
// "applied to all findings".
|
|
596
|
+
if (/\b(?:0|no|zero)\s+(?:\S+\s+){0,3}finding/i.test(text)) return 'success';
|
|
597
|
+
|
|
598
|
+
// (2) n/a β word-bounded. Matches "n/a.", "n/a β no surface here",
|
|
599
|
+
// " n/a " surrounded by anything. Excludes "diagnostics" etc.
|
|
581
600
|
if (/\bn\/a\b/i.test(text)) return 'success';
|
|
601
|
+
|
|
602
|
+
// (3) "not applicable" β explicit phrase.
|
|
603
|
+
if (/\bnot\s+applicable\b/i.test(text)) return 'success';
|
|
604
|
+
|
|
605
|
+
// (4) Checkmark (β) as the bot's universal clean signal. Anchored on
|
|
606
|
+
// whitespace/punctuation on both sides so accidental β inside
|
|
607
|
+
// other content (e.g. quoting a checkbox list) doesn't trip it.
|
|
608
|
+
// Matches "applied to all findings. β all anchored." but not
|
|
609
|
+
// "see βitem-marker in unicode" or similar.
|
|
610
|
+
if (/(?:^|\s)β(?:\s|$|[.,;:])/.test(text)) return 'success';
|
|
611
|
+
|
|
612
|
+
// Skill-specific vocabulary like "0 pattern fights" (no `finding` word)
|
|
613
|
+
// falls through to failure here. Skill authors should prefer the
|
|
614
|
+
// canonical "0 findings" wording in their per-skill scan lines so
|
|
615
|
+
// this classifier doesn't need per-skill vocabulary knowledge.
|
|
582
616
|
return 'failure';
|
|
583
617
|
}
|
|
584
618
|
|
package/lib/update.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readFile, writeFile, mkdir, stat } from 'node:fs/promises';
|
|
1
|
+
import { readFile, writeFile, mkdir, stat, rm } from 'node:fs/promises';
|
|
2
2
|
import { join, dirname } from 'node:path';
|
|
3
3
|
import { renderFile, pickTemplate } from './render.js';
|
|
4
4
|
import { detect, buildDescriptionLine } from './detect.js';
|
|
@@ -69,9 +69,23 @@ export async function runUpdate({
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
// 3. Refresh baseline skills (always controlled by clud-bug).
|
|
72
|
+
// Slugs listed in manifest.excludedBaselines are skipped AND their
|
|
73
|
+
// existing .claude/skills/<slug>/ dir is removed if present, so a repo
|
|
74
|
+
// that opts out of a baseline doesn't end up regenerating it on every
|
|
75
|
+
// update (the original symptom this field exists to fix).
|
|
76
|
+
const excluded = new Set(Array.isArray(manifest.excludedBaselines) ? manifest.excludedBaselines : []);
|
|
72
77
|
const baseline = await loadBaseline(baselineDir, loadBaselineOpts);
|
|
73
78
|
for (const skill of baseline) {
|
|
74
|
-
const
|
|
79
|
+
const slug = sanitize(skill.name);
|
|
80
|
+
if (excluded.has(skill.name) || excluded.has(slug)) {
|
|
81
|
+
const skillDir = join(skillsDir, slug);
|
|
82
|
+
if (await pathExists(skillDir)) {
|
|
83
|
+
await rm(skillDir, { recursive: true, force: true });
|
|
84
|
+
changed.push({ path: skillDir, label: `excluded baseline ${skill.name}: removed` });
|
|
85
|
+
}
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
const skillPath = join(skillsDir, slug, 'SKILL.md');
|
|
75
89
|
await maybeWrite(skillPath, skill.content, changed, unchanged, `baseline ${skill.name}`);
|
|
76
90
|
}
|
|
77
91
|
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clud-bug",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Skill-driven Claude PR review. Ship a brand-voice skill, get brand reviews. Each finding cites the skill that motivated it. CLI installs the workflow + a baseline kit; add more from skills.sh.",
|
|
5
5
|
"homepage": "https://cludbug.dev",
|
|
6
|
-
"bugs": "https://github.com/
|
|
6
|
+
"bugs": "https://github.com/thrillmade/clud-bug/issues",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"author": "thrillmot",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/
|
|
12
|
+
"url": "git+https://github.com/thrillmade/clud-bug.git"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
15
15
|
"claude",
|
|
@@ -170,5 +170,5 @@ skills are left untouched.
|
|
|
170
170
|
## Where to find more
|
|
171
171
|
|
|
172
172
|
- Site: https://cludbug.dev
|
|
173
|
-
- Repo: https://github.com/
|
|
174
|
-
- Skill catalog: https://github.com/
|
|
173
|
+
- Repo: https://github.com/thrillmade/clud-bug
|
|
174
|
+
- Skill catalog: https://github.com/thrillmade/agent-skills
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# clud-bug-template-version:
|
|
1
|
+
# clud-bug-template-version: v10
|
|
2
2
|
name: Clud Bug π Crawls Your Code
|
|
3
3
|
|
|
4
4
|
on:
|
|
@@ -281,6 +281,6 @@ jobs:
|
|
|
281
281
|
# Strict-mode gate β composite action; see workflow.yml.tmpl for design notes.
|
|
282
282
|
- name: Strict mode β fail check on critical findings
|
|
283
283
|
if: success()
|
|
284
|
-
uses:
|
|
284
|
+
uses: thrillmade/clud-bug/.github/actions/strict-mode-gate@v0.6.1
|
|
285
285
|
with:
|
|
286
286
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# clud-bug-template-version:
|
|
1
|
+
# clud-bug-template-version: v10
|
|
2
2
|
name: Clud Bug π Crawls Your Code
|
|
3
3
|
|
|
4
4
|
on:
|
|
@@ -282,6 +282,6 @@ jobs:
|
|
|
282
282
|
# Strict-mode gate β composite action; see workflow.yml.tmpl for design notes.
|
|
283
283
|
- name: Strict mode β fail check on critical findings
|
|
284
284
|
if: success()
|
|
285
|
-
uses:
|
|
285
|
+
uses: thrillmade/clud-bug/.github/actions/strict-mode-gate@v0.6.1
|
|
286
286
|
with:
|
|
287
287
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# clud-bug-template-version:
|
|
1
|
+
# clud-bug-template-version: v10
|
|
2
2
|
name: Clud Bug π Crawls Your Code
|
|
3
3
|
|
|
4
4
|
on:
|
|
@@ -316,6 +316,6 @@ jobs:
|
|
|
316
316
|
# Letting the action's own failure fail the check is louder and right.
|
|
317
317
|
- name: Strict mode β fail check on critical findings
|
|
318
318
|
if: success()
|
|
319
|
-
uses:
|
|
319
|
+
uses: thrillmade/clud-bug/.github/actions/strict-mode-gate@v0.6.1
|
|
320
320
|
with:
|
|
321
321
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|