agentvibes 2.17.8 → 3.0.0

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.
@@ -8,12 +8,14 @@ argument-hint: [patch|minor|major]
8
8
  Prepares a new AgentVibes release with AI-generated release notes.
9
9
 
10
10
  This command:
11
- 1. Analyzes all changes since the last release
12
- 2. Generates an intelligent summary using Claude AI
13
- 3. Creates/updates RELEASE_NOTES.md
14
- 4. Bumps the version
15
- 5. Commits everything
16
- 6. Ready for you to push
11
+ 1. **Runs full test suite** - MUST pass before proceeding ✅
12
+ 2. **Validates Sonar quality gates** - MUST pass before proceeding ✅
13
+ 3. Analyzes all changes since the last release
14
+ 4. Generates an intelligent summary using Claude AI
15
+ 5. Creates/updates RELEASE_NOTES.md
16
+ 6. Bumps the version
17
+ 7. Commits everything
18
+ 8. Ready for you to push
17
19
 
18
20
  ## Usage
19
21
 
@@ -62,4 +64,35 @@ all 27 tests pass consistently across different environments.
62
64
 
63
65
  ## Implementation
64
66
 
67
+ When executing this command, Claude MUST follow these steps in order:
68
+
69
+ 1. **Run Test Suite** (MANDATORY FIRST STEP):
70
+ - Execute `npm test` (which runs syntax validation, BATS tests, and coverage tests)
71
+ - If ANY tests fail, STOP immediately and report the failures
72
+ - Do NOT proceed with any release operations if tests fail
73
+ - Example output: "🧪 Running tests... ✅ All 213 BATS tests passed, ✅ All 38 Node tests passed"
74
+
75
+ 2. **Validate Sonar Quality Gates** (MANDATORY SECOND STEP):
76
+ - Check all bash scripts for `set -euo pipefail` (strict mode)
77
+ - Verify no hardcoded credentials in code
78
+ - Validate proper variable quoting in bash scripts
79
+ - Check for input validation and error handling
80
+ - Review any new or modified files for security issues
81
+ - If ANY quality gate fails, STOP immediately and report the issues
82
+ - Example output: "🛡️ Validating quality gates... ✅ All Sonar requirements met"
83
+ - **Note**: Document any known minor issues (like missing strict mode in legacy scripts) if they existed before this release
84
+
85
+ 3. **Analyze Changes**: Git log since last tag, examine diffs
86
+ 4. **Generate RELEASE_NOTES.md**: AI-generated summary with categorized changes
87
+ 5. **Bump package.json**: Use npm version (patch/minor/major)
88
+ 6. **Commit changes**: RELEASE_NOTES.md and package.json
89
+ 7. **Ready for push**: User must manually push to master
90
+
91
+ ### Critical Points
92
+
93
+ - **ALWAYS run tests first** - Never proceed if tests fail
94
+ - **ALWAYS validate Sonar quality gates** - Never proceed if quality checks fail
95
+ - **Extract content from RELEASE_NOTES.md** - Don't make up new content
96
+ - **Document any security exceptions** - If known issues exist from before this release, document them
97
+
65
98
  !bash .claude/hooks/prepare-release.sh $ARGUMENTS
@@ -9,23 +9,50 @@ Semi-automated release process with AI-generated release notes and human approva
9
9
 
10
10
  This command:
11
11
  1. **Runs full test suite** - MUST pass before proceeding ✅
12
- 2. Analyzes all changes since the last release (git log + diffs)
13
- 3. Reads actual code changes to understand context
14
- 4. **Generates AI summary and release notes**
15
- 5. **PAUSES for human review of RELEASE_NOTES.md** ⏸️
16
- 6. **PAUSES for human review of AI summary** ⏸️
17
- 7. Updates installer.js and update scripts with AI summary
18
- 8. **Updates README.md with new version and release info** ⚠️
19
- 9. Bumps the version using npm version
20
- 10. Commits everything together (including updated README)
21
- 11. Pushes to master with --follow-tags
22
- 12. Creates GitHub release
23
- 13. **Publishes to npm** (packages README at this moment!)
12
+ 2. **Validates Sonar quality gates** - MUST pass before proceeding
13
+ 3. Analyzes all changes since the last release (git log + diffs)
14
+ 4. Reads actual code changes to understand context
15
+ 5. **Generates AI summary and release notes**
16
+ 6. **PAUSES for human review of RELEASE_NOTES.md** ⏸️
17
+ 7. **PAUSES for human review of AI summary** ⏸️
18
+ 8. Updates installer.js and update scripts with AI summary
19
+ 9. **Updates README.md with new version and release info** ⚠️
20
+ 10. Bumps the version using npm version
21
+ 11. Commits everything together (including updated README)
22
+ 12. Pushes to master with --follow-tags
23
+ 13. Creates GitHub release
24
+ 14. **Publishes to npm** (packages README at this moment!)
24
25
 
25
26
  **⚠️ CRITICAL ORDER**: README must be updated (step 8) BEFORE npm publish (step 13) because npm packages whatever README exists at publish time. This ensures the npm package page displays current release info.
26
27
 
27
28
  **🧪 TEST REQUIREMENT**: The test suite MUST pass before any release operations begin. If tests fail, the release is aborted immediately. This prevents publishing broken code to npm.
28
29
 
30
+ **🛡️ SONAR QUALITY GATES**: All SonarCloud quality requirements from CLAUDE.md MUST be validated before release:
31
+
32
+ ### Shell Script Security (Bash)
33
+ - ✅ All bash scripts MUST have `set -euo pipefail` at the top (strict mode)
34
+ - ✅ All variables MUST be quoted (e.g., `"$VARIABLE"`, not `$VARIABLE`)
35
+ - ✅ No hardcoded credentials (API keys, passwords, tokens)
36
+ - ✅ Input validation for all external inputs
37
+ - ✅ Secure temp directories (`$XDG_RUNTIME_DIR` with fallback)
38
+ - ✅ Path traversal prevention
39
+ - ✅ File ownership verification before processing
40
+ - ✅ Single quotes in trap statements (deferred expansion)
41
+
42
+ ### JavaScript/Node.js Security
43
+ - ✅ Use `path.resolve()` for path operations
44
+ - ✅ Path safety validation (prevent traversal)
45
+ - ✅ No sensitive data in logs (mask credentials)
46
+ - ✅ Try-finally for resource cleanup
47
+
48
+ ### General Code Quality
49
+ - ✅ Comprehensive error handling
50
+ - ✅ Proper resource cleanup
51
+ - ✅ Meaningful variable names
52
+ - ✅ Security-critical code is commented
53
+
54
+ **If ANY quality gate fails, the release MUST be aborted** until issues are fixed.
55
+
29
56
  ## Usage
30
57
 
31
58
  ```bash
@@ -132,17 +159,29 @@ Updated to show during `npx agentvibes update`:
132
159
  **Step 1: Run Tests**
133
160
  ```
134
161
  🧪 Running test suite...
135
- ✅ All 132 tests passed (bats + node)
162
+ ✅ All 213 BATS tests passed
163
+ ✅ All 38 Node unit tests passed
164
+ ```
165
+
166
+ **Step 2: Validate Quality Gates**
167
+ ```
168
+ 🛡️ Validating Sonar quality gates...
169
+ ✅ All bash scripts have strict mode
170
+ ✅ No hardcoded credentials found
171
+ ✅ Variable quoting validated
172
+ ✅ Input validation present
173
+ ✅ Error handling comprehensive
174
+ ✅ All Sonar requirements met
136
175
  ```
137
176
 
138
- **Step 2: Analysis**
177
+ **Step 3: Analysis**
139
178
  ```
140
179
  🔍 Analyzing changes since v2.0.17...
141
180
  📊 Found 47 commits across 12 files
142
181
  🤖 Generating AI summary...
143
182
  ```
144
183
 
145
- **Step 3: Review RELEASE_NOTES.md**
184
+ **Step 4: Review RELEASE_NOTES.md**
146
185
  ```
147
186
  ✅ Generated RELEASE_NOTES.md
148
187
 
@@ -171,7 +210,7 @@ AI-optimized documentation standards...
171
210
  - Type 'cancel' to abort
172
211
  ```
173
212
 
174
- **Step 4: Review AI Summary**
213
+ **Step 5: Review AI Summary**
175
214
  ```
176
215
  📝 AI Summary for installer/update scripts:
177
216
 
@@ -187,7 +226,7 @@ with intuitive 0.5x-3.0x scaling."
187
226
  - Type 'cancel' to abort
188
227
  ```
189
228
 
190
- **Step 5: Update & Publish**
229
+ **Step 6: Update & Publish**
191
230
  ```
192
231
  ✅ Updating installer.js with release info...
193
232
  ✅ Updating README.md with new version...
@@ -207,25 +246,27 @@ with intuitive 0.5x-3.0x scaling."
207
246
  ## What Happens
208
247
 
209
248
  1. **Test Suite**: Runs `npm test` - MUST pass or release is aborted 🧪
210
- 2. **Git Analysis**: Reviews all commits since last tag
211
- 3. **Code Review**: Examines actual diffs for context
212
- 4. **AI Generation**: Creates intelligent summary and categorized changes
213
- 5. **Human Review**: You review and approve/edit release notes
214
- 6. **Summary Review**: You approve AI summary for installer/update
215
- 7. **Installer Update**: Adds release info to installation flow
216
- 8. **README Update**: Updates version badge and latest release section ⚠️ **CRITICAL: Must happen BEFORE npm publish!**
217
- 9. **Update Script Update**: Adds release info to update flow
218
- 10. **Version Bump**: Updates package.json (npm version)
219
- 11. **Commit**: Single atomic commit with all changes (includes README with correct version)
220
- 12. **Push**: Pushes to **master** branch with tags
221
- 13. **GitHub Release**: Creates public release with notes
222
- 14. **NPM Publish**: Makes new version available globally (packages README at this point)
249
+ 2. **Sonar Quality Gates**: Validates all security and quality requirements - MUST pass or release is aborted 🛡️
250
+ 3. **Git Analysis**: Reviews all commits since last tag
251
+ 4. **Code Review**: Examines actual diffs for context
252
+ 5. **AI Generation**: Creates intelligent summary and categorized changes
253
+ 6. **Human Review**: You review and approve/edit release notes
254
+ 7. **Summary Review**: You approve AI summary for installer/update
255
+ 8. **Installer Update**: Adds release info to installation flow
256
+ 9. **README Update**: Updates version badge and latest release section ⚠️ **CRITICAL: Must happen BEFORE npm publish!**
257
+ 10. **Update Script Update**: Adds release info to update flow
258
+ 11. **Version Bump**: Updates package.json (npm version)
259
+ 12. **Commit**: Single atomic commit with all changes (includes README with correct version)
260
+ 13. **Push**: Pushes to **master** branch with tags
261
+ 14. **GitHub Release**: Creates public release with notes
262
+ 15. **NPM Publish**: Makes new version available globally (packages README at this point)
223
263
 
224
264
  **⚠️ ORDER IS CRITICAL**: README must be updated BEFORE running `npm publish` because npm packages the README from the current working directory. If you publish first, the npm package page will show outdated README content.
225
265
 
226
266
  ## Safety Features
227
267
 
228
268
  - **Test suite must pass** before proceeding - prevents broken releases
269
+ - **Sonar quality gates must pass** - prevents security issues and poor code quality
229
270
  - **Human approval required** before any git operations
230
271
  - **Dry-run preview** of all changes
231
272
  - **Rollback support** via git tags
@@ -250,38 +291,51 @@ This command tells Claude AI to prepare and push a new release with AI-generated
250
291
  When executing this command, Claude MUST follow these steps in order:
251
292
 
252
293
  1. **Run Test Suite** (MANDATORY FIRST STEP):
253
- - Execute `AGENTVIBES_TEST_MODE=true npm test`
294
+ - Execute `npm test` (which runs syntax validation, BATS tests, and coverage tests)
254
295
  - If ANY tests fail, STOP immediately and report the failures
255
296
  - Do NOT proceed with any release operations if tests fail
256
- - Example output: "🧪 Running tests... ✅ All 132 tests passed"
257
- 2. **Analyze Changes**: Git log since last tag, examine diffs
258
- 3. **Generate RELEASE_NOTES.md**: AI-generated summary with categorized changes
259
- 4. **Human Review Checkpoint 1**: Wait for approval of RELEASE_NOTES.md
260
- 5. **Update src/installer.js**:
297
+ - Example output: "🧪 Running tests... ✅ All 213 BATS tests passed, ✅ All 38 Node tests passed"
298
+
299
+ 2. **Validate Sonar Quality Gates** (MANDATORY SECOND STEP):
300
+ - Check all bash scripts for `set -euo pipefail` (strict mode)
301
+ - Verify no hardcoded credentials in code
302
+ - Validate proper variable quoting in bash scripts
303
+ - Check for input validation and error handling
304
+ - Review any new or modified files for security issues
305
+ - If ANY quality gate fails, STOP immediately and report the issues
306
+ - Example output: "🛡️ Validating quality gates... ✅ All Sonar requirements met"
307
+ - **Note**: Document any known minor issues (like missing strict mode in legacy scripts) if they existed before this release
308
+
309
+ 3. **Analyze Changes**: Git log since last tag, examine diffs
310
+ 4. **Generate RELEASE_NOTES.md**: AI-generated summary with categorized changes
311
+ 5. **Human Review Checkpoint 1**: Wait for approval of RELEASE_NOTES.md
312
+ 6. **Update src/installer.js**:
261
313
  - Find the `showReleaseInfo()` function (line ~126)
262
314
  - Replace the version number in title (e.g., `v2.6.0` → `v2.7.0`)
263
315
  - Replace the release title (e.g., `BMAD Integration` → `Party Mode Voice Improvements`)
264
316
  - Replace the "WHAT'S NEW" summary (2-4 sentences from RELEASE_NOTES.md AI Summary)
265
317
  - Replace all "KEY HIGHLIGHTS" bullets (extract from RELEASE_NOTES.md)
266
318
  - Keep the same format/structure, just update content
267
- 6. **Update README.md** ⚠️ **CRITICAL - Must complete BEFORE npm publish**:
319
+ 7. **Update README.md** ⚠️ **CRITICAL - Must complete BEFORE npm publish**:
268
320
  - Update version badge in header (line ~14): `**Version**: v2.X.X`
269
321
  - Update "Latest Release" section (line ~112+):
270
322
  - Replace the title and URL: `**[vX.X.X - Release Title](github.com/...)**`
271
323
  - Replace the AI summary paragraph (first paragraph after title)
272
324
  - Replace all "Key Highlights" bullet points (extract from RELEASE_NOTES.md)
273
325
  - This ensures GitHub README and npm package page show correct version
274
- 7. **Human Review Checkpoint 2**: Show what will be updated, wait for approval
275
- 8. **Bump package.json**: Use npm version (patch/minor/major)
276
- 9. **Commit all changes**: Single commit with RELEASE_NOTES.md, installer.js, README.md, package.json
277
- 10. **Push to master with tags**
278
- 11. **Create GitHub release**
279
- 12. **Publish to npm**: This packages the already-updated README.md
326
+ 8. **Human Review Checkpoint 2**: Show what will be updated, wait for approval
327
+ 9. **Bump package.json**: Use npm version (patch/minor/major)
328
+ 10. **Commit all changes**: Single commit with RELEASE_NOTES.md, installer.js, README.md, package.json
329
+ 11. **Push to master with tags**
330
+ 12. **Create GitHub release**
331
+ 13. **Publish to npm**: This packages the already-updated README.md
280
332
 
281
333
  ### Critical Points
282
334
 
283
335
  - **ALWAYS run tests first** - Never proceed with release if tests fail
336
+ - **ALWAYS validate Sonar quality gates** - Never proceed with release if quality checks fail
284
337
  - **NEVER skip updating installer.js** - This is what users see during install
285
338
  - **Update installer BEFORE npm publish** - npm packages whatever installer.js exists at publish time
286
339
  - **Extract content from RELEASE_NOTES.md** - Don't make up new content, use what's in the release notes
287
340
  - **Keep the installer format consistent** - Same boxen structure, just update text content
341
+ - **Document any security exceptions** - If known issues exist from before this release, document them
@@ -48,5 +48,5 @@ BMad Master|reverb 50 60 100 pitch -100|agentvibes_soft_flamenco_loop.mp3|0.30
48
48
  # Party mode room ambiance - used when multiple agents are talking
49
49
  _party_mode|compand 0.3,1 6:-70,-60,-20|agent_vibes_dark_chill_step_loop.mp3|0.40
50
50
 
51
- # Default (no agent specified) - clean with subtle enhancement and chillwave background
52
- default||agentvibes_soft_flamenco_loop.mp3|0.30
51
+ # Default (no agent specified) - clean with Bachata background
52
+ default||agent_vibes_bachata_v1_loop.mp3|0.30
@@ -19,8 +19,8 @@ Agent Vibes Harpsichord v2-loop.mp3:.00000000000000000013140818
19
19
  agent_vibes_japanese_city_pop_v1_loop.mp3:6.054512
20
20
  agent_vibes_bossa_nova_v2_loop.mp3:5.369524
21
21
  agent_vibes_salsa_v2_loop.mp3:9.972790
22
- agent_vibes_bachata_v1_loop.mp3:5.590113
23
22
  agent_vibes_cumbia_v1_loop.mp3:5.717823
24
23
  agentvibes_soft_flamenco_loop.mp3:4.998005
25
24
  agent_vibes_arabic_v2_loop.mp3:.00000000000000000006132724
26
25
  agent_vibes_chillwave_v2_loop.mp3:14.628390
26
+ agent_vibes_bachata_v1_loop.mp3:.00000000000000000005344000
@@ -1 +1 @@
1
- 0.10
1
+ 0.30
@@ -0,0 +1 @@
1
+ enabled