claude-git-hooks 2.21.0 → 2.30.2

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
@@ -5,9 +5,144 @@ Todos los cambios notables en este proyecto se documentarán en este archivo.
5
5
  El formato está basado en [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  y este proyecto adhiere a [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.30.2] - 2026-03-18
9
+
10
+ ### 🔧 Changed
11
+ - Authorization now uses GitHub's `role_name` field instead of legacy `permission` field for more accurate role mapping
12
+ - Improved authorization error messages to show the actual GitHub permission that failed to map
13
+
14
+ ### 🐛 Fixed
15
+ - Fixed role mapping to use `write` instead of `push` to match GitHub's current API role names
16
+
17
+
18
+ ## [2.30.1] - 2026-03-17
19
+
20
+ ### ✨ Added
21
+ - Comprehensive Release Workflow Guide in CLAUDE.md documenting all workflow automation commands (check-coupling, create-release, shadow, revert-feature, close-release, back-merge) with step-by-step lifecycle, command details, and authorization model
22
+
23
+ ### 🔧 Changed
24
+ - Increased timeout for AI help commands from 30s to 60s to improve reliability of claude-hooks help queries and issue reporting
25
+
26
+
27
+ ## [2.30.0] - 2026-03-17
28
+
29
+ ### ✨ Added
30
+ - New `close-release` command for release-candidate finalization (#ISSUE-97) — soft-resets RC onto main, creates a single clean commit with feature list, force-pushes with lease, and creates PR to main with merge-commit strategy label
31
+ - Support for `--auto-describe` flag to generate release description using Claude AI
32
+ - Support for `--dry-run` flag to preview close-release actions without executing
33
+ - Support for `--no-pr` flag to skip PR creation during release closure
34
+ - New `back-merge` command for post-deploy branch synchronization (#105)
35
+
36
+
37
+ ## [2.29.0] - 2026-03-17
38
+
39
+ ### ✨ Added
40
+ - Added `back-merge` command for post-deploy branch synchronization (#96) - automates the release close workflow: tags release, resets shadow to main, merges main into develop, deletes RC branches, and offers to restore reverted features for the next sprint
41
+ - Added automatic conflict resolution for version files during back-merge (accepts source/main version)
42
+ - Added CHANGELOG conflict handling during back-merge - stages with conflict markers and prompts user to continue or abort
43
+ - Added revert follow-up feature that reads revert-log.json and offers to apply revert-the-revert for features removed from the closed RC
44
+ - Added branch protection detection during back-merge push with helpful PR creation advice
45
+
46
+
47
+ ## [2.28.0] - 2026-03-17
48
+
49
+ ### ✨ Added
50
+ - New `revert-feature` command to revert squash-merged features by task ID in release-candidate branches (#95)
51
+ - Coupling detection when reverting features - warns if other RC commits share modified files
52
+ - Revert log tracking at `.claude/revert-log.json` for back-merge workflows
53
+ - Optional shadow branch sync after revert with `--update-shadow` flag
54
+ - Dry-run mode for `revert-feature` to preview revert actions without executing
55
+ - New `getCommitFiles()` utility in git-operations for retrieving files changed in a specific commit
56
+
57
+ ### 🐛 Fixed
58
+ - Added debug logging for git log failures in revert-feature command to aid troubleshooting
59
+
60
+
61
+ ## [2.27.0] - 2026-03-17
62
+
63
+ ### ✨ Added
64
+ - New `create-release` command to automate release-candidate branch creation from develop (#94)
65
+ - Automatic version file discovery and bump during release creation
66
+ - Git tag creation with skip logic if tag already exists
67
+ - Shadow branch deployment integration after RC push
68
+ - Support for `--dry-run` flag to preview release changes without executing
69
+ - Support for `--no-shadow` flag to skip shadow deployment
70
+ - Support for `--skip-push` flag for local-only branch creation
71
+ - Support for `--update-changelog` flag to generate CHANGELOG entry during release
72
+ - Comprehensive precondition validation: clean working directory, develop branch check, remote sync verification, existing RC detection
73
+
74
+
75
+ ## [2.26.0] - 2026-03-16
76
+
77
+ ### ✨ Added
78
+ - Merge strategy auto-detection in `create-pr` command - automatically detects required merge strategy (squash vs merge commit) from branch naming conventions (feature/* → squash, release-candidate/* → merge-commit, hotfix/* → merge-commit, any → main → merge-commit)
79
+ - Merge strategy labels (`merge-strategy:squash` or `merge-strategy:merge-commit`) automatically added to created PRs
80
+ - Merge strategy display in PR preview showing detected strategy before creation
81
+ - Body reminder prepended to PR description for merge-commit PRs warning about required merge method
82
+ - Interactive merge strategy selection prompt when branch pattern is unknown or ambiguous
83
+ - Shadow branch lifecycle management command (`claude-hooks shadow <analyze|reset|sync>`) for managing shadow branches - analyze divergence vs main and active RC, reset shadow to clean copy of main, or sync shadow with source branch (#101)
84
+
85
+
86
+ ## [2.25.0] - 2026-03-16
87
+
88
+ ### ✨ Added
89
+ - New `shadow` command to manage the shadow branch lifecycle — analyze divergence vs main and active RC, reset shadow to a clean copy of main, or sync shadow with a source branch (RC, develop, feature)
90
+
91
+
92
+ ## [2.24.0] - 2026-03-16
93
+
94
+ ### ✨ Added
95
+
96
+ - New `check-coupling` command to detect overlapping file changes across open PRs targeting a base branch
97
+ - Role-based authorization system for workflow commands with fail-closed security model
98
+ - Detailed error messages for authorization failures with clear guidance
99
+
100
+ ### 🔧 Changed
101
+
102
+ - Extracted permissions repository path to constant for improved maintainability
103
+ - Separated permissions repository owner validation from organization membership checks
104
+
105
+ ### 🐛 Fixed
106
+
107
+ - Updated test constant values to ensure test suite passes
108
+
109
+ ## [2.23.0] - 2026-03-16
110
+
111
+ ### ✨ Added
112
+
113
+ - Added role-based authorization system for protected workflow commands (create-release, close-release, back-merge, shadow, revert-feature, bump-version)
114
+ - Added fail-closed authorization guard in CLI router that blocks commands when authorization cannot be verified
115
+ - Added centralized permissions sourced from external GitHub repository (claude-hooks-permissions/permissions.json)
116
+ - Added GitHub API functions for authorization: getAuthenticatedUser(), checkOrgMembership(), getCollaboratorPermission()
117
+ - Added detailed error messages for all authorization failure scenarios (token issues, org membership, permission levels, repo governance)
118
+
119
+ ### 🔧 Changed
120
+
121
+ - Extracted permissions source path to a constant (PERMISSIONS_SOURCE) for consistent error messaging
122
+ - Separated permissions repository owner from organization membership check to support different hosting locations
123
+
124
+ ### 🔒 Security
125
+
126
+ - Implemented fail-closed authorization design that blocks all commands on any authorization system error
127
+
128
+ ## [2.22.0] - 2026-03-12
129
+
130
+ ### ✨ Added
131
+
132
+ - Branch lifecycle management functions in git-operations: checkoutBranch, mergeBranch, resetBranch, forcePush, deleteRemoteBranch, getDivergence
133
+ - Utility functions for branch workflows: readFileFromRef, getLatestTag, isWorkingDirectoryClean, getActiveBranch
134
+ - Debug diagnostics for judge fix application failures - diagnoses CRLF mismatches and search string issues
135
+ - Debug dump output for judge decisions (written to .claude/out/judge-debug.json when debug mode enabled)
136
+
137
+ ### 🔧 Changed
138
+
139
+ - Enhanced judge module with detailed failure diagnostics including line ending detection and hex dumps
140
+ - Updated CLAUDE.md documentation to reflect expanded git-operations API
141
+
8
142
  ## [2.21.0] - 2026-03-10
9
143
 
10
144
  ### ✨ Added
145
+
11
146
  - New `analyze-pr` command to analyze GitHub PRs with team guidelines and post review comments (#86)
12
147
  - Linear ticket enrichment for PR analysis - automatically fetches ticket context when `[AUT-1234]` pattern found in PR title
13
148
  - New `setup-linear` command for interactive Linear token configuration
@@ -19,13 +154,14 @@ y este proyecto adhiere a [Semantic Versioning](https://semver.org/spec/v2.0.0.h
19
154
  - Category normalization with fuzzy alias mapping for analysis results
20
155
 
21
156
  ### 🔧 Changed
157
+
22
158
  - Extended `github-api.js` with PR fetch, review creation, and URL parsing capabilities
23
159
  - Updated documentation (README, README-NPM, CLAUDE.md) with analyze-pr usage and architecture
24
160
 
25
-
26
161
  ## [2.20.0] - 2026-03-09
27
162
 
28
163
  ### ✨ Added
164
+
29
165
  - Intelligent batch orchestration for commits with 3+ files using Opus to semantically group files, assign per-batch models, and inject shared commit context
30
166
  - Auto-fix judge that evaluates all issues at any severity level, auto-applies search/replace fixes, and dismisses false positives - any unresolved issue blocks the commit (#85)
31
167
  - New `batch-info` command to display orchestration configuration and per-model average analysis speed from telemetry
@@ -36,6 +172,7 @@ y este proyecto adhiere a [Semantic Versioning](https://semver.org/spec/v2.0.0.h
36
172
  - DIFF_ANALYSIS_ORCHESTRATION_PROMPT.md template for Opus batch grouping
37
173
 
38
174
  ### 🔧 Changed
175
+
39
176
  - Analysis routing now uses three-tier strategy: 1-2 files use sequential single call, 3+ files trigger intelligent orchestration
40
177
  - Judge now runs on all issues regardless of severity (previously only CRITICAL/BLOCKER blocked commits)
41
178
  - Resolution prompt file is only generated if issues remain after judge evaluation
@@ -47,13 +184,14 @@ y este proyecto adhiere a [Semantic Versioning](https://semver.org/spec/v2.0.0.h
47
184
  - Judge can be disabled via `config.judge.enabled: false` to fall back to original quality gate
48
185
 
49
186
  ### 🗑️ Removed
187
+
50
188
  - Removed `subagents.batchSize` configuration option (orchestration now handled by Opus intelligence)
51
189
  - Removed `analyzeCodeParallel()` function from `claude-client.js` (replaced by orchestration-driven parallel execution)
52
190
 
53
-
54
191
  ## [2.19.0] - 2026-03-06
55
192
 
56
193
  ### ✨ Added
194
+
57
195
  - Shell autocompletion for all CLI commands, flags, and arguments — Bash, Zsh, Fish, and PowerShell (#78)
58
196
  - Command registry (`lib/cli-metadata.js`) — single source of truth for commands, flags, descriptions, and completion metadata
59
197
  - Four shell completion generators with per-command flag/arg awareness and dynamic branch completion for `analyze-diff` and `create-pr`
@@ -61,6 +199,7 @@ y este proyecto adhiere a [Semantic Versioning](https://semver.org/spec/v2.0.0.h
61
199
  - Self-healing RC file updates — reinstall detects and replaces stale source lines (e.g., Windows backslash paths) automatically
62
200
 
63
201
  ### 🔧 Changed
202
+
64
203
  - Refactored `bin/claude-hooks` — replaced 130-line switch/case with declarative command registry lookup via `buildCommandMap()`
65
204
  - Shell source lines now use `$HOME`-relative paths for cross-platform compatibility (MINGW64, WSL, native Linux/macOS)
66
205
  - Completion source lines written to both `~/.bashrc` and `~/.bash_profile` (MINGW64 reads `.bash_profile` first)
@@ -69,46 +208,49 @@ y este proyecto adhiere a [Semantic Versioning](https://semver.org/spec/v2.0.0.h
69
208
  - Updated CLAUDE.md with cli-metadata.js documentation, exports table, and Command Registry design pattern
70
209
 
71
210
  ### 🐛 Fixed
211
+
72
212
  - Bash completions failing on MINGW64/Git Bash due to Windows backslash paths in source lines
73
213
  - PowerShell completions failing due to hardcoded Unix profile paths on Windows
74
214
  - PowerShell 5.1 `-Native` completers not firing for npm `.ps1` shims — added proxy function wrapper that re-exposes the command as `Function` type
75
215
  - PowerShell `[CompletionResult]` type accelerator not resolving in dot-sourced profile scripts
76
216
 
77
-
78
217
  ## [2.18.1] - 2026-03-04
79
218
 
80
219
  ### ✨ Added
220
+
81
221
  - Monorepo support for CHANGELOG discovery - discovers all CHANGELOG.md files and prompts to select when multiple are found (#77)
82
222
  - AI-powered help and issue creation system (#79)
83
223
 
84
224
  ### 🔧 Changed
225
+
85
226
  - Enhanced `walkDirectoryTree` utility function in file-utils.js for reusable directory traversal
86
227
  - Updated documentation to reflect monorepo CHANGELOG discovery capabilities
87
228
 
88
229
  ### 🐛 Fixed
89
- - Cross-platform path handling in git hooks directory resolution (normalized path separators)
90
230
 
231
+ - Cross-platform path handling in git hooks directory resolution (normalized path separators)
91
232
 
92
233
  ## [2.18.0] - 2026-03-03
93
234
 
94
235
  ### ✨ Added
236
+
95
237
  - AI-powered help command - ask natural language questions about claude-hooks and get answers from documentation (`claude-hooks help "how do presets work?"`) (#79)
96
238
  - Interactive issue creation - guided GitHub issue creation using repository templates (`claude-hooks help --report-issue`) (#79)
97
239
  - New GitHub API functions for fetching file content, directory listings, and creating issues (`fetchFileContent`, `fetchDirectoryListing`, `createIssue`)
98
240
  - New prompt templates for AI help system: HELP_QUERY.md, HELP_REPORT_ISSUE.md, HELP_COMPOSE_ISSUE.md
99
241
 
100
242
  ### 🔧 Changed
243
+
101
244
  - Help command now supports three modes: static help (no args), AI-powered help (with question), and issue reporting (--report-issue)
102
245
  - Updated documentation (README.md, README-NPM.md, CLAUDE.md) to reflect new help and issue reporting features
103
246
 
104
-
105
247
  ## [2.17.2] - 2026-03-02
106
248
 
107
249
  ### 🐛 Fixed
250
+
108
251
  - Improved pom.xml version detection to correctly distinguish project version from dependency/property versions (#76)
109
252
  - Fixed false version mismatch errors for Maven submodules with inherited parent versions
110
253
 
111
-
112
254
  ## [2.17.1] - 2026-03-02
113
255
 
114
256
  ### 🐛 Fixed