claude-git-hooks 2.66.1 → 2.67.3
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 +96 -8
- package/README.md +34 -0
- package/lib/commands/analyze-diff.js +26 -23
- package/lib/commands/analyze.js +3 -1
- package/lib/commands/back-merge.js +39 -33
- package/lib/commands/bump-version.js +20 -15
- package/lib/commands/close-release.js +25 -19
- package/lib/commands/create-pr.js +30 -1
- package/lib/commands/create-release.js +19 -13
- package/lib/defaults.json +5 -0
- package/lib/hooks/pre-commit.js +112 -32
- package/lib/utils/analysis-engine.js +7 -3
- package/lib/utils/config-registry.js +1 -0
- package/lib/utils/library-resolver.js +50 -0
- package/lib/utils/prompt-builder.js +15 -0
- package/lib/utils/skill-registry/catalogue.js +74 -0
- package/lib/utils/skill-registry/feedback-writer.js +196 -0
- package/lib/utils/skill-registry/index.js +254 -0
- package/lib/utils/skill-registry/parser.js +311 -0
- package/lib/utils/skill-registry/resume.js +81 -0
- package/lib/utils/skill-registry/runner.js +265 -0
- package/lib/utils/version-manager.js +9 -3
- package/package.json +1 -2
- package/templates/CLAUDE_ANALYSIS_PROMPT.md +2 -1
- package/templates/config.advanced.example.json +25 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-git-hooks",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.67.3",
|
|
4
4
|
"description": "Git hooks with Claude CLI for code analysis and automatic commit messages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"test:watch": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watch",
|
|
18
18
|
"test:coverage": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage",
|
|
19
19
|
"test:e2e": "bash test/manual/sdlc-stability-check.sh",
|
|
20
|
-
"test:full": "npm run test:all && npm run test:e2e",
|
|
21
20
|
"lint": "eslint lib/ bin/claude-hooks .library/librarian/",
|
|
22
21
|
"lint:fix": "eslint lib/ bin/claude-hooks .library/librarian/ --fix",
|
|
23
22
|
"format": "prettier --write \"lib/**/*.js\" \"bin/**\" \"test/**/*.js\"",
|
|
@@ -30,7 +30,7 @@ OUTPUT_SCHEMA:
|
|
|
30
30
|
"line":int,
|
|
31
31
|
"method":"name",
|
|
32
32
|
"message":"desc",
|
|
33
|
-
"rule":"
|
|
33
|
+
"rule":"JBE-NNN|UIK-NNN|STR-NNN|...|empty"
|
|
34
34
|
}],
|
|
35
35
|
"blockingIssues":[{
|
|
36
36
|
"description":"text",
|
|
@@ -53,5 +53,6 @@ RULES:
|
|
|
53
53
|
- ratings:A(0issues),B(1-2minor),C(1major|3-5minor),D(2+major|1critical),E(1+blocker|2+critical)
|
|
54
54
|
- IMPORTANT: @Autowired usage in Spring is NOT a BLOCKER/CRITICAL issue (max severity: MAJOR)
|
|
55
55
|
- Spring dependency injection patterns (@Autowired) should NOT block commits
|
|
56
|
+
- RULE CATALOGUE: if a `=== PLATFORM ANTIPATTERN CATALOGUE ===` section is present in this prompt, classify each finding against it. When a finding matches a catalogue entry, populate `details[].rule` with the rule ID exactly (e.g. "JBE-001", "UIK-002"). The catalogue's severity is the MINIMUM to assign — don't downgrade. Findings that don't match any catalogue entry leave `rule` empty (those become candidate skill-gaps for the team to review separately).
|
|
56
57
|
|
|
57
58
|
ANALYZE_BELOW:
|
|
@@ -33,6 +33,12 @@
|
|
|
33
33
|
"model": "opus"
|
|
34
34
|
},
|
|
35
35
|
|
|
36
|
+
"skillRegistry": {
|
|
37
|
+
"enabled": true,
|
|
38
|
+
"blockOn": "never",
|
|
39
|
+
"resumeOnCreatePr": true
|
|
40
|
+
},
|
|
41
|
+
|
|
36
42
|
"prAnalysis": {
|
|
37
43
|
"model": "sonnet",
|
|
38
44
|
"timeout": 300000,
|
|
@@ -90,6 +96,25 @@
|
|
|
90
96
|
"use_case": "Override the default sonnet model for judge passes"
|
|
91
97
|
},
|
|
92
98
|
|
|
99
|
+
"skillRegistry.enabled": {
|
|
100
|
+
"description": "Enable/disable the mscope automation-skills integration: deterministic rule checks in pre-commit, antipattern catalogue injection into the analysis prompt, and the skill-gap writer. NOTE the cross-repo side effect: when the sibling automation-skills repo is found, unclassified AI findings are appended as [skill-gap] candidates to that repo's skill-feedback.md (reviewed via `automation-skills retro`; never auto-merged into the registry).",
|
|
101
|
+
"default": "true",
|
|
102
|
+
"use_case": "Set to false to fully disable the skill-registry integration (it auto-skips anyway when the skill repo isn't found)"
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
"skillRegistry.blockOn": {
|
|
106
|
+
"description": "Severity threshold at which deterministic skill-registry findings block the commit",
|
|
107
|
+
"default": "never",
|
|
108
|
+
"examples": ["never", "critical", "high", "medium", "low"],
|
|
109
|
+
"use_case": "Set to 'critical' or 'high' once the team is ready to enforce the mscope rule catalogue"
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
"skillRegistry.resumeOnCreatePr": {
|
|
113
|
+
"description": "Run `automation-skills resume` (interactive lessons-learned capture to the skill repo's implementation-history.md) during create-pr, before tags are pushed. Skipped automatically in headless mode or when the automation-skills CLI is not installed.",
|
|
114
|
+
"default": "true",
|
|
115
|
+
"use_case": "Set to false if your team captures lessons through another channel"
|
|
116
|
+
},
|
|
117
|
+
|
|
93
118
|
"prAnalysis.model": {
|
|
94
119
|
"description": "Claude model for PR analysis",
|
|
95
120
|
"default": "sonnet",
|