agentvibes 2.1.5 ā 2.2.0-beta.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/.claude/hooks/bmad-tts-injector.sh +11 -6
- package/.claude/hooks/bmad-voice-manager.sh +58 -4
- package/README.md +21 -8
- package/docs/bmad-plugin.md +28 -1
- package/docs/bmad-v6-support.md +228 -0
- package/docs/quick-start.md +17 -0
- package/package.json +2 -1
- package/src/bmad-detector.js +53 -0
- package/src/installer.js +87 -64
|
@@ -48,24 +48,29 @@ CYAN='\033[0;36m'
|
|
|
48
48
|
GRAY='\033[0;90m'
|
|
49
49
|
NC='\033[0m' # No Color
|
|
50
50
|
|
|
51
|
-
# Detect BMAD installation
|
|
51
|
+
# Detect BMAD installation and version
|
|
52
|
+
# Supports both v4 (.bmad-core/) and v6-alpha (bmad/) installations
|
|
52
53
|
detect_bmad() {
|
|
53
54
|
local bmad_core_dir=""
|
|
54
55
|
|
|
55
|
-
# Check
|
|
56
|
-
if [[ -d "
|
|
56
|
+
# Check for v6-alpha first (newer version)
|
|
57
|
+
if [[ -d "bmad" ]]; then
|
|
58
|
+
bmad_core_dir="bmad"
|
|
59
|
+
elif [[ -d "../bmad" ]]; then
|
|
60
|
+
bmad_core_dir="../bmad"
|
|
61
|
+
# Check for v4 (legacy)
|
|
62
|
+
elif [[ -d ".bmad-core" ]]; then
|
|
57
63
|
bmad_core_dir=".bmad-core"
|
|
58
|
-
# Check parent directory
|
|
59
64
|
elif [[ -d "../.bmad-core" ]]; then
|
|
60
65
|
bmad_core_dir="../.bmad-core"
|
|
61
|
-
# Check for bmad-core (without dot prefix)
|
|
66
|
+
# Check for bmad-core (without dot prefix, legacy variant)
|
|
62
67
|
elif [[ -d "bmad-core" ]]; then
|
|
63
68
|
bmad_core_dir="bmad-core"
|
|
64
69
|
elif [[ -d "../bmad-core" ]]; then
|
|
65
70
|
bmad_core_dir="../bmad-core"
|
|
66
71
|
else
|
|
67
72
|
echo -e "${RED}ā BMAD installation not found${NC}" >&2
|
|
68
|
-
echo -e "${GRAY} Looked for .bmad-core or bmad-core directory${NC}" >&2
|
|
73
|
+
echo -e "${GRAY} Looked for bmad/, .bmad-core/, or bmad-core/ directory${NC}" >&2
|
|
69
74
|
return 1
|
|
70
75
|
fi
|
|
71
76
|
|
|
@@ -43,9 +43,61 @@ PLUGIN_DIR=".claude/plugins"
|
|
|
43
43
|
PLUGIN_FILE="$PLUGIN_DIR/bmad-voices.md"
|
|
44
44
|
ENABLED_FLAG="$PLUGIN_DIR/bmad-voices-enabled.flag"
|
|
45
45
|
|
|
46
|
-
# AI NOTE: Auto-enable pattern - When BMAD is detected via
|
|
46
|
+
# AI NOTE: Auto-enable pattern - When BMAD is detected via install-manifest.yaml,
|
|
47
47
|
# automatically enable the voice plugin to provide seamless multi-agent voice support.
|
|
48
48
|
# This avoids requiring manual plugin activation after BMAD installation.
|
|
49
|
+
# Supports both BMAD v4 (.bmad-core/) and v6-alpha (bmad/) directory structures.
|
|
50
|
+
|
|
51
|
+
# @function detect_bmad_version
|
|
52
|
+
# @intent Detect BMAD installation and return version number
|
|
53
|
+
# @why Support both v4 and v6-alpha installations with different directory structures
|
|
54
|
+
# @param None
|
|
55
|
+
# @returns Echoes version number (4, 6, or 0 for not installed) to stdout
|
|
56
|
+
# @exitcode 0=detected, 1=not installed
|
|
57
|
+
# @sideeffects None
|
|
58
|
+
# @edgecases Checks v6 first (newer version), falls back to v4
|
|
59
|
+
# @calledby auto_enable_if_bmad_detected, get_bmad_config_path
|
|
60
|
+
# @calls None
|
|
61
|
+
detect_bmad_version() {
|
|
62
|
+
if [[ -f "bmad/_cfg/manifest.yaml" ]]; then
|
|
63
|
+
# v6 detected
|
|
64
|
+
echo "6"
|
|
65
|
+
return 0
|
|
66
|
+
elif [[ -f ".bmad-core/install-manifest.yaml" ]]; then
|
|
67
|
+
# v4 detected
|
|
68
|
+
echo "4"
|
|
69
|
+
return 0
|
|
70
|
+
else
|
|
71
|
+
# Not installed
|
|
72
|
+
echo "0"
|
|
73
|
+
return 1
|
|
74
|
+
fi
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
# @function get_bmad_config_path
|
|
78
|
+
# @intent Get BMAD configuration file path based on detected version
|
|
79
|
+
# @why v4 and v6 use different directory structures for config files
|
|
80
|
+
# @param None
|
|
81
|
+
# @returns Echoes config path to stdout, empty string if not installed
|
|
82
|
+
# @exitcode 0=path returned, 1=not installed
|
|
83
|
+
# @sideeffects None
|
|
84
|
+
# @edgecases Returns empty string if BMAD not detected
|
|
85
|
+
# @calledby Commands that need to read BMAD config (future use)
|
|
86
|
+
# @calls detect_bmad_version
|
|
87
|
+
get_bmad_config_path() {
|
|
88
|
+
local version=$(detect_bmad_version)
|
|
89
|
+
|
|
90
|
+
if [[ "$version" == "6" ]]; then
|
|
91
|
+
echo "bmad/core/config.yaml"
|
|
92
|
+
return 0
|
|
93
|
+
elif [[ "$version" == "4" ]]; then
|
|
94
|
+
echo ".bmad-core/config.yaml"
|
|
95
|
+
return 0
|
|
96
|
+
else
|
|
97
|
+
echo ""
|
|
98
|
+
return 1
|
|
99
|
+
fi
|
|
100
|
+
}
|
|
49
101
|
|
|
50
102
|
# @function auto_enable_if_bmad_detected
|
|
51
103
|
# @intent Automatically enable BMAD voice plugin when BMAD framework is detected
|
|
@@ -56,10 +108,12 @@ ENABLED_FLAG="$PLUGIN_DIR/bmad-voices-enabled.flag"
|
|
|
56
108
|
# @sideeffects Creates enabled flag file, creates plugin directory
|
|
57
109
|
# @edgecases Only auto-enables if plugin not already enabled, silent operation
|
|
58
110
|
# @calledby get_agent_voice
|
|
59
|
-
# @calls mkdir, touch
|
|
111
|
+
# @calls mkdir, touch, detect_bmad_version
|
|
60
112
|
auto_enable_if_bmad_detected() {
|
|
61
|
-
|
|
62
|
-
|
|
113
|
+
local version=$(detect_bmad_version)
|
|
114
|
+
|
|
115
|
+
# Check if BMAD is installed (any version) and plugin not already enabled
|
|
116
|
+
if [[ "$version" != "0" ]] && [[ ! -f "$ENABLED_FLAG" ]]; then
|
|
63
117
|
# BMAD detected but plugin not enabled - enable it silently
|
|
64
118
|
mkdir -p "$PLUGIN_DIR"
|
|
65
119
|
touch "$ENABLED_FLAG"
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
[](https://github.com/paulpreibisch/AgentVibes/actions/workflows/publish.yml)
|
|
12
12
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
13
13
|
|
|
14
|
-
**Author**: Paul Preibisch ([@997Fire](https://x.com/997Fire)) | **Version**: v2.1.
|
|
14
|
+
**Author**: Paul Preibisch ([@997Fire](https://x.com/997Fire)) | **Version**: v2.1.5
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
@@ -92,16 +92,16 @@ Whether you're coding in Claude Code, chatting in Claude Desktop, or using Warp
|
|
|
92
92
|
|
|
93
93
|
## š° Latest Release
|
|
94
94
|
|
|
95
|
-
**[v2.1.
|
|
95
|
+
**[v2.1.5 - Critical macOS Compatibility Fix + GitHub Actions Testing](https://github.com/paulpreibisch/AgentVibes/releases/tag/v2.1.5)** š
|
|
96
96
|
|
|
97
|
-
**
|
|
97
|
+
**CRITICAL macOS FIX!** All shell scripts now use `#!/usr/bin/env bash` instead of `#!/bin/bash`, enabling AgentVibes to work on macOS. The old shebang forced bash 3.2 (from 2007) which doesn't support associative arrays or modern bash syntax. Plus FREE automated macOS testing on Intel and Apple Silicon Macs!
|
|
98
98
|
|
|
99
99
|
**Key highlights:**
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
- ā
**
|
|
100
|
+
- š **macOS Now Supported** - Fixed all 23 shell scripts to work with Homebrew bash 5.x
|
|
101
|
+
- š§ **Voice Switching Works** - No more syntax errors on Mac
|
|
102
|
+
- š¤ **FREE macOS Testing** - GitHub Actions tests on macOS 13/14/15 (Intel + M1/M2/M3)
|
|
103
|
+
- š **Automated CI** - 13 parallel test jobs on every commit
|
|
104
|
+
- ā
**All Features Work** - Personalities, providers, speed control now functional on Mac
|
|
105
105
|
|
|
106
106
|
[ā View Full Release Notes](RELEASE_NOTES.md) | [ā View All Releases](https://github.com/paulpreibisch/AgentVibes/releases)
|
|
107
107
|
|
|
@@ -137,6 +137,17 @@ Just say "Switch to Aria voice" or "Speak in Spanish" instead of typing commands
|
|
|
137
137
|
|
|
138
138
|
## š Quick Start
|
|
139
139
|
|
|
140
|
+
### š macOS Users - Read This First!
|
|
141
|
+
|
|
142
|
+
**REQUIRED:** Install bash 5.x before using AgentVibes:
|
|
143
|
+
```bash
|
|
144
|
+
brew install bash # One-time setup
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
macOS ships with bash 3.2 (from 2007) which lacks modern bash features AgentVibes needs. After installing bash 5.x via Homebrew, everything works perfectly!
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
140
151
|
Get AgentVibes running in 3 steps: **Install** ā **Choose Provider** (Piper/ElevenLabs) ā **Enable Voice**
|
|
141
152
|
|
|
142
153
|
**[ā View Complete Quick Start Guide](docs/quick-start.md)** - Full installation options, provider setup, and activation steps
|
|
@@ -225,6 +236,8 @@ AgentVibes includes **27 unique ElevenLabs voices** with multilingual support.
|
|
|
225
236
|
|
|
226
237
|
The BMAD plugin detects when you activate a BMAD agent (e.g., `/BMad:agents:pm`) and automatically uses the assigned voice for that role.
|
|
227
238
|
|
|
239
|
+
**Version Support**: AgentVibes supports both BMAD v4 and v6-alpha installations. Version detection is automatic - just install BMAD and AgentVibes will detect and configure itself correctly!
|
|
240
|
+
|
|
228
241
|
**[ā View Complete BMAD Documentation](docs/bmad-plugin.md)** - All agent mappings, language support, plugin management, and customization
|
|
229
242
|
|
|
230
243
|
[ā Back to top](#-table-of-contents)
|
package/docs/bmad-plugin.md
CHANGED
|
@@ -38,9 +38,36 @@ The BMAD plugin detects when you activate a BMAD agent (e.g., `/BMad:agents:pm`)
|
|
|
38
38
|
/agent-vibes-bmad edit
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
## š BMAD Version Support
|
|
42
|
+
|
|
43
|
+
AgentVibes automatically detects and supports both BMAD v4 and v6-alpha:
|
|
44
|
+
|
|
45
|
+
- **v4 (Legacy)**: Uses `.bmad-core/` directory structure
|
|
46
|
+
- **v6-alpha (Current)**: Uses unified `bmad/` directory structure
|
|
47
|
+
|
|
48
|
+
The plugin automatically detects which version you have installed and configures paths accordingly. **No manual configuration needed!**
|
|
49
|
+
|
|
50
|
+
### How Detection Works
|
|
51
|
+
|
|
52
|
+
1. Checks for `bmad/_cfg/manifest.yaml` (v6)
|
|
53
|
+
2. Falls back to `.bmad-core/install-manifest.yaml` (v4)
|
|
54
|
+
3. Resolves configuration paths based on detected version
|
|
55
|
+
|
|
56
|
+
### Upgrading from v4 to v6
|
|
57
|
+
|
|
58
|
+
If you upgrade BMAD from v4 to v6-alpha:
|
|
59
|
+
|
|
60
|
+
1. Reinstall AgentVibes: `npx agentvibes update --yes`
|
|
61
|
+
2. AgentVibes will auto-detect the new v6 structure
|
|
62
|
+
3. All voice mappings will continue working
|
|
63
|
+
|
|
64
|
+
**No manual intervention required!**
|
|
65
|
+
|
|
66
|
+
For detailed version support information, see [BMAD v6 Support Documentation](bmad-v6-support.md).
|
|
67
|
+
|
|
41
68
|
## How It Works
|
|
42
69
|
|
|
43
|
-
1. **Auto-Detection**: Plugin checks for
|
|
70
|
+
1. **Auto-Detection**: Plugin checks for BMAD installation (both v4 and v6)
|
|
44
71
|
2. **Auto-Enable**: Enables automatically when BMAD is detected
|
|
45
72
|
3. **Settings Preservation**: Saves your previous voice/personality when enabling
|
|
46
73
|
4. **Restore on Disable**: Restores previous settings when disabling
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# BMAD-METHOD v6-Alpha Support
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
AgentVibes now supports both **BMAD-METHOD v4** and **v6-alpha** installations, providing seamless backward compatibility while embracing the new architecture.
|
|
6
|
+
|
|
7
|
+
## Version Differences
|
|
8
|
+
|
|
9
|
+
### BMAD v4 (Legacy)
|
|
10
|
+
- **Directory Structure**: Multiple `.bmad-*` directories (`.bmad-core/`, `.bmad-game-dev/`, etc.)
|
|
11
|
+
- **Manifest Location**: `.bmad-core/install-manifest.yaml`
|
|
12
|
+
- **Config Location**: `.bmad-core/config.yaml`
|
|
13
|
+
- **Status**: Fully supported (backward compatible)
|
|
14
|
+
|
|
15
|
+
### BMAD v6-Alpha (Current)
|
|
16
|
+
- **Directory Structure**: Unified `bmad/` directory with central manifest
|
|
17
|
+
- **Manifest Location**: `bmad/_cfg/manifest.yaml`
|
|
18
|
+
- **Config Location**: `bmad/core/config.yaml`
|
|
19
|
+
- **Features**: Central manifest system, improved organization
|
|
20
|
+
- **Status**: Fully supported
|
|
21
|
+
|
|
22
|
+
## Automatic Detection
|
|
23
|
+
|
|
24
|
+
AgentVibes automatically detects which version you have installed:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# During installation
|
|
28
|
+
npx agentvibes install
|
|
29
|
+
|
|
30
|
+
# Output for v6-alpha:
|
|
31
|
+
š BMAD-METHOD v6 (6.0.0-alpha.x) detected!
|
|
32
|
+
Location: /path/to/bmad
|
|
33
|
+
|
|
34
|
+
# Output for v4:
|
|
35
|
+
š BMAD-METHOD v4 detected!
|
|
36
|
+
Location: /path/to/.bmad-core
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Detection Priority
|
|
40
|
+
|
|
41
|
+
1. **v6-alpha** is checked first (newer version)
|
|
42
|
+
2. **v4** is checked as fallback (legacy version)
|
|
43
|
+
3. If neither is found, BMAD plugin is not enabled
|
|
44
|
+
|
|
45
|
+
## How It Works
|
|
46
|
+
|
|
47
|
+
### JavaScript Detection (`src/bmad-detector.js`)
|
|
48
|
+
|
|
49
|
+
The detector module checks for version-specific markers:
|
|
50
|
+
|
|
51
|
+
```javascript
|
|
52
|
+
// v6 check
|
|
53
|
+
const v6Manifest = path.join(targetDir, 'bmad/_cfg/manifest.yaml');
|
|
54
|
+
|
|
55
|
+
// v4 check
|
|
56
|
+
const v4Manifest = path.join(targetDir, '.bmad-core/install-manifest.yaml');
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Bash Detection (`.claude/hooks/bmad-voice-manager.sh`)
|
|
60
|
+
|
|
61
|
+
Shell scripts include version detection functions:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
detect_bmad_version() {
|
|
65
|
+
if [[ -f "bmad/_cfg/manifest.yaml" ]]; then
|
|
66
|
+
echo "6" # v6 detected
|
|
67
|
+
elif [[ -f ".bmad-core/install-manifest.yaml" ]]; then
|
|
68
|
+
echo "4" # v4 detected
|
|
69
|
+
else
|
|
70
|
+
echo "0" # Not installed
|
|
71
|
+
fi
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Configuration Paths
|
|
76
|
+
|
|
77
|
+
The system resolves configuration paths based on detected version:
|
|
78
|
+
|
|
79
|
+
| Version | Config Path | Manifest Path |
|
|
80
|
+
|---------|-------------|---------------|
|
|
81
|
+
| v4 | `.bmad-core/config.yaml` | `.bmad-core/install-manifest.yaml` |
|
|
82
|
+
| v6-alpha | `bmad/core/config.yaml` | `bmad/_cfg/manifest.yaml` |
|
|
83
|
+
|
|
84
|
+
## Upgrading from v4 to v6-Alpha
|
|
85
|
+
|
|
86
|
+
If you upgrade BMAD from v4 to v6-alpha:
|
|
87
|
+
|
|
88
|
+
1. **Upgrade BMAD** following the BMAD-METHOD upgrade instructions
|
|
89
|
+
2. **Reinstall AgentVibes**:
|
|
90
|
+
```bash
|
|
91
|
+
npx agentvibes update --yes
|
|
92
|
+
```
|
|
93
|
+
3. AgentVibes will automatically detect the new v6 structure
|
|
94
|
+
4. All voice mappings will continue working
|
|
95
|
+
|
|
96
|
+
**No manual configuration needed!**
|
|
97
|
+
|
|
98
|
+
## Voice Plugin Compatibility
|
|
99
|
+
|
|
100
|
+
The BMAD voice plugin works identically on both versions:
|
|
101
|
+
|
|
102
|
+
- **Auto-Detection**: Plugin auto-enables when BMAD is detected (any version)
|
|
103
|
+
- **Voice Mappings**: Same voice mapping format for both versions
|
|
104
|
+
- **Agent Context**: Same `.bmad-agent-context` file mechanism
|
|
105
|
+
- **Commands**: Same `/agent-vibes:bmad` commands work on both
|
|
106
|
+
|
|
107
|
+
## Testing Your Installation
|
|
108
|
+
|
|
109
|
+
After installing or updating AgentVibes, verify BMAD detection:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Check which version is detected
|
|
113
|
+
ls -la | grep bmad
|
|
114
|
+
|
|
115
|
+
# You should see either:
|
|
116
|
+
# - bmad/ (v6-alpha)
|
|
117
|
+
# - .bmad-core/ (v4)
|
|
118
|
+
|
|
119
|
+
# Verify plugin is enabled
|
|
120
|
+
ls -la .claude/plugins/bmad-voices-enabled.flag
|
|
121
|
+
|
|
122
|
+
# Check activation instructions
|
|
123
|
+
cat .claude/activation-instructions
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
The activation instructions will show the correct version:
|
|
127
|
+
|
|
128
|
+
```markdown
|
|
129
|
+
# BMAD Agent Activation Instructions (v6) ā or (v4)
|
|
130
|
+
|
|
131
|
+
**Configuration Location**: bmad/core/config.yaml ā or .bmad-core/config.yaml
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Troubleshooting
|
|
135
|
+
|
|
136
|
+
### "BMAD not detected" but I have BMAD installed
|
|
137
|
+
|
|
138
|
+
**Check directory structure**:
|
|
139
|
+
```bash
|
|
140
|
+
# For v6-alpha, verify:
|
|
141
|
+
ls -la bmad/_cfg/manifest.yaml
|
|
142
|
+
|
|
143
|
+
# For v4, verify:
|
|
144
|
+
ls -la .bmad-core/install-manifest.yaml
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Plugin works on v4 but not v6-alpha
|
|
148
|
+
|
|
149
|
+
1. **Verify v6 installation**:
|
|
150
|
+
```bash
|
|
151
|
+
cat bmad/_cfg/manifest.yaml
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
2. **Reinstall AgentVibes**:
|
|
155
|
+
```bash
|
|
156
|
+
npx agentvibes update --yes
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
3. **Check detection**:
|
|
160
|
+
```bash
|
|
161
|
+
node -e "import('./src/bmad-detector.js').then(m => m.detectBMAD(process.cwd()).then(console.log))"
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Wrong version detected
|
|
165
|
+
|
|
166
|
+
AgentVibes prioritizes v6 over v4. If both exist in your directory:
|
|
167
|
+
|
|
168
|
+
- **v6** will be detected (correct behavior)
|
|
169
|
+
- Remove old `.bmad-core/` if you've migrated to v6
|
|
170
|
+
|
|
171
|
+
## Technical Details
|
|
172
|
+
|
|
173
|
+
### Version Detection Algorithm
|
|
174
|
+
|
|
175
|
+
```javascript
|
|
176
|
+
export async function detectBMAD(targetDir) {
|
|
177
|
+
// 1. Check v6 (newest)
|
|
178
|
+
const v6Manifest = path.join(targetDir, 'bmad/_cfg/manifest.yaml');
|
|
179
|
+
if (await fileExists(v6Manifest)) {
|
|
180
|
+
return { version: 6, ... };
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// 2. Check v4 (legacy)
|
|
184
|
+
const v4Manifest = path.join(targetDir, '.bmad-core/install-manifest.yaml');
|
|
185
|
+
if (await fileExists(v4Manifest)) {
|
|
186
|
+
return { version: 4, ... };
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// 3. Not installed
|
|
190
|
+
return { version: null, installed: false };
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Configuration Resolution
|
|
195
|
+
|
|
196
|
+
```javascript
|
|
197
|
+
// Dynamically resolved based on version
|
|
198
|
+
const configPath = detection.version === 6
|
|
199
|
+
? 'bmad/core/config.yaml'
|
|
200
|
+
: '.bmad-core/config.yaml';
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Benefits
|
|
204
|
+
|
|
205
|
+
ā
**Future-Proof**: Ready for BMAD v6 general release
|
|
206
|
+
ā
**Zero Breaking Changes**: Existing v4 users unaffected
|
|
207
|
+
ā
**Clean Architecture**: Centralized version detection
|
|
208
|
+
ā
**User-Friendly**: Auto-detects and configures correctly
|
|
209
|
+
ā
**Easy Maintenance**: Single codebase, version-aware logic
|
|
210
|
+
|
|
211
|
+
## Related Documentation
|
|
212
|
+
|
|
213
|
+
- [BMAD Plugin Guide](bmad-plugin.md)
|
|
214
|
+
- [Installation Guide](../README.md)
|
|
215
|
+
- [BMAD-METHOD Repository](https://github.com/bmad-code-org/BMAD-METHOD)
|
|
216
|
+
|
|
217
|
+
## Support
|
|
218
|
+
|
|
219
|
+
If you encounter issues with version detection:
|
|
220
|
+
|
|
221
|
+
1. Check this documentation
|
|
222
|
+
2. Verify your BMAD installation
|
|
223
|
+
3. Report issues: https://github.com/paulpreibisch/AgentVibes/issues
|
|
224
|
+
|
|
225
|
+
Include in your report:
|
|
226
|
+
- AgentVibes version: `npx agentvibes --version`
|
|
227
|
+
- BMAD version and directory structure
|
|
228
|
+
- Output of `ls -la | grep bmad`
|
package/docs/quick-start.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
Get AgentVibes up and running in 3 simple steps!
|
|
4
4
|
|
|
5
|
+
## š macOS Users - Important Prerequisite
|
|
6
|
+
|
|
7
|
+
**REQUIRED:** macOS ships with bash 3.2 (from 2007) which is incompatible with AgentVibes. Install bash 5.x first:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# One-time setup
|
|
11
|
+
brew install bash
|
|
12
|
+
|
|
13
|
+
# Verify installation
|
|
14
|
+
bash --version
|
|
15
|
+
# Should show: GNU bash, version 5.x
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Why?** AgentVibes uses modern bash features (associative arrays, advanced string manipulation) that aren't available in bash 3.2. The `#!/usr/bin/env bash` shebang in our scripts will automatically use Homebrew's bash 5.x once installed.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
5
22
|
## Step 1: Install AgentVibes
|
|
6
23
|
|
|
7
24
|
Choose your preferred installation method:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "agentvibes",
|
|
4
|
-
"version": "2.1
|
|
4
|
+
"version": "2.2.0-beta.1",
|
|
5
5
|
"description": "Now your AI Agents can finally talk back! Professional TTS voice for Claude Code and Claude Desktop (via MCP) with multi-provider support.",
|
|
6
6
|
"homepage": "https://agentvibes.org",
|
|
7
7
|
"keywords": [
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"commander": "^10.0.0",
|
|
44
44
|
"figlet": "^1.6.0",
|
|
45
45
|
"inquirer": "^12.0.0",
|
|
46
|
+
"js-yaml": "^4.1.0",
|
|
46
47
|
"ora": "^6.0.0"
|
|
47
48
|
},
|
|
48
49
|
"engines": {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import fs from 'node:fs/promises';
|
|
3
|
+
import yaml from 'js-yaml';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Detect BMAD installation and version
|
|
7
|
+
* @param {string} targetDir - Directory to check
|
|
8
|
+
* @returns {Promise<Object>} Detection result with version info
|
|
9
|
+
*/
|
|
10
|
+
export async function detectBMAD(targetDir) {
|
|
11
|
+
// Check v6 first (newer version)
|
|
12
|
+
const v6Manifest = path.join(targetDir, 'bmad/_cfg/manifest.yaml');
|
|
13
|
+
try {
|
|
14
|
+
await fs.access(v6Manifest);
|
|
15
|
+
const manifestContent = await fs.readFile(v6Manifest, 'utf8');
|
|
16
|
+
const manifest = yaml.load(manifestContent);
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
version: 6,
|
|
20
|
+
detailedVersion: manifest.installation?.version || '6.0.0-alpha.x',
|
|
21
|
+
manifestPath: v6Manifest,
|
|
22
|
+
configPath: path.join(targetDir, 'bmad/core/config.yaml'),
|
|
23
|
+
bmadPath: path.join(targetDir, 'bmad'),
|
|
24
|
+
installed: true
|
|
25
|
+
};
|
|
26
|
+
} catch {}
|
|
27
|
+
|
|
28
|
+
// Check v4 (legacy)
|
|
29
|
+
const v4Manifest = path.join(targetDir, '.bmad-core/install-manifest.yaml');
|
|
30
|
+
try {
|
|
31
|
+
await fs.access(v4Manifest);
|
|
32
|
+
return {
|
|
33
|
+
version: 4,
|
|
34
|
+
detailedVersion: '4.x',
|
|
35
|
+
manifestPath: v4Manifest,
|
|
36
|
+
configPath: path.join(targetDir, '.bmad-core/config.yaml'),
|
|
37
|
+
bmadPath: path.join(targetDir, '.bmad-core'),
|
|
38
|
+
installed: true
|
|
39
|
+
};
|
|
40
|
+
} catch {}
|
|
41
|
+
|
|
42
|
+
// Not installed
|
|
43
|
+
return { version: null, installed: false };
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Get BMAD configuration file path for detected version
|
|
48
|
+
* @param {Object} detection - Result from detectBMAD()
|
|
49
|
+
* @returns {string|null} Path to config.yaml or null
|
|
50
|
+
*/
|
|
51
|
+
export function getBMADConfigPath(detection) {
|
|
52
|
+
return detection.installed ? detection.configPath : null;
|
|
53
|
+
}
|
package/src/installer.js
CHANGED
|
@@ -47,6 +47,7 @@ import fs from 'node:fs/promises';
|
|
|
47
47
|
import chalk from 'chalk';
|
|
48
48
|
import inquirer from 'inquirer';
|
|
49
49
|
import figlet from 'figlet';
|
|
50
|
+
import { detectBMAD } from './bmad-detector.js';
|
|
50
51
|
import boxen from 'boxen';
|
|
51
52
|
import ora from 'ora';
|
|
52
53
|
import { fileURLToPath } from 'node:url';
|
|
@@ -103,6 +104,75 @@ function showWelcome() {
|
|
|
103
104
|
);
|
|
104
105
|
}
|
|
105
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Generate BMAD activation instructions based on version
|
|
109
|
+
* @param {number} version - BMAD version (4 or 6)
|
|
110
|
+
* @returns {string} Activation instructions content
|
|
111
|
+
*/
|
|
112
|
+
function generateActivationInstructions(version) {
|
|
113
|
+
const configPathExample = version === 6
|
|
114
|
+
? 'bmad/core/config.yaml'
|
|
115
|
+
: '.bmad-core/config.yaml';
|
|
116
|
+
|
|
117
|
+
return `# BMAD Agent Activation Instructions (v${version})
|
|
118
|
+
|
|
119
|
+
When a BMAD agent activates, follow these steps EXACTLY:
|
|
120
|
+
|
|
121
|
+
## STEP 3.5a: Create BMAD Context File (CRITICAL)
|
|
122
|
+
|
|
123
|
+
**IMMEDIATELY after agent identification, create the context file:**
|
|
124
|
+
|
|
125
|
+
\`\`\`bash
|
|
126
|
+
echo "$AGENT_ID" > .bmad-agent-context
|
|
127
|
+
\`\`\`
|
|
128
|
+
|
|
129
|
+
Where \`$AGENT_ID\` is one of:
|
|
130
|
+
- \`pm\` (Product Manager)
|
|
131
|
+
- \`dev\` (Developer)
|
|
132
|
+
- \`qa\` (QA)
|
|
133
|
+
- \`architect\` (Architect)
|
|
134
|
+
- \`po\` (Product Owner)
|
|
135
|
+
- \`analyst\` (Analyst)
|
|
136
|
+
- \`sm\` (Scrum Master)
|
|
137
|
+
- \`ux-expert\` (UX Expert)
|
|
138
|
+
- \`bmad-master\` (BMAD Master)
|
|
139
|
+
- \`bmad-orchestrator\` (Orchestrator)
|
|
140
|
+
|
|
141
|
+
**Example:**
|
|
142
|
+
\`\`\`bash
|
|
143
|
+
# For Product Manager agent
|
|
144
|
+
echo "pm" > .bmad-agent-context
|
|
145
|
+
\`\`\`
|
|
146
|
+
|
|
147
|
+
**Configuration Location**: ${configPathExample}
|
|
148
|
+
|
|
149
|
+
This file allows AgentVibes to:
|
|
150
|
+
1. Detect which BMAD agent is active
|
|
151
|
+
2. Look up the correct voice mapping
|
|
152
|
+
3. Automatically speak questions using the agent's assigned voice
|
|
153
|
+
|
|
154
|
+
## STEP 10: Clean Up on Exit
|
|
155
|
+
|
|
156
|
+
**Before exiting the agent, remove the context file:**
|
|
157
|
+
|
|
158
|
+
\`\`\`bash
|
|
159
|
+
rm -f .bmad-agent-context
|
|
160
|
+
\`\`\`
|
|
161
|
+
|
|
162
|
+
This ensures voice switching only happens when an agent is active.
|
|
163
|
+
|
|
164
|
+
## Why This Matters
|
|
165
|
+
|
|
166
|
+
Without the \`.bmad-agent-context\` file:
|
|
167
|
+
- AgentVibes cannot detect which agent is active
|
|
168
|
+
- Questions won't be spoken automatically
|
|
169
|
+
- Voice switching won't work
|
|
170
|
+
- The BMAD voice plugin becomes non-functional
|
|
171
|
+
|
|
172
|
+
**This is MANDATORY for BMAD voice integration to work!**
|
|
173
|
+
`;
|
|
174
|
+
}
|
|
175
|
+
|
|
106
176
|
// Installation function
|
|
107
177
|
async function install(options = {}) {
|
|
108
178
|
showWelcome();
|
|
@@ -794,16 +864,19 @@ async function install(options = {}) {
|
|
|
794
864
|
)
|
|
795
865
|
);
|
|
796
866
|
|
|
797
|
-
// Check for BMAD installation
|
|
798
|
-
const
|
|
799
|
-
|
|
800
|
-
try {
|
|
801
|
-
await fs.access(bmadManifestPath);
|
|
802
|
-
bmadDetected = true;
|
|
803
|
-
} catch {}
|
|
867
|
+
// Check for BMAD installation (both v4 and v6)
|
|
868
|
+
const bmadDetection = await detectBMAD(targetDir);
|
|
869
|
+
const bmadDetected = bmadDetection.installed;
|
|
804
870
|
|
|
805
871
|
// Auto-enable BMAD plugin and create activation-instructions if BMAD detected
|
|
806
872
|
if (bmadDetected) {
|
|
873
|
+
const versionLabel = bmadDetection.version === 6
|
|
874
|
+
? `v6 (${bmadDetection.detailedVersion})`
|
|
875
|
+
: 'v4';
|
|
876
|
+
|
|
877
|
+
console.log(chalk.green(`\nš BMAD-METHOD ${versionLabel} detected!`));
|
|
878
|
+
console.log(chalk.gray(` Location: ${bmadDetection.bmadPath}`));
|
|
879
|
+
|
|
807
880
|
const pluginsDir = path.join(claudeDir, 'plugins');
|
|
808
881
|
const enabledFlagPath = path.join(pluginsDir, 'bmad-voices-enabled.flag');
|
|
809
882
|
const activationInstructionsPath = path.join(claudeDir, 'activation-instructions');
|
|
@@ -817,71 +890,21 @@ async function install(options = {}) {
|
|
|
817
890
|
try {
|
|
818
891
|
await fs.access(activationInstructionsPath);
|
|
819
892
|
} catch {
|
|
820
|
-
// File doesn't exist - create it
|
|
821
|
-
const activationContent =
|
|
822
|
-
|
|
823
|
-
When a BMAD agent activates, follow these steps EXACTLY:
|
|
824
|
-
|
|
825
|
-
## STEP 3.5a: Create BMAD Context File (CRITICAL)
|
|
826
|
-
|
|
827
|
-
**IMMEDIATELY after agent identification, create the context file:**
|
|
828
|
-
|
|
829
|
-
\`\`\`bash
|
|
830
|
-
echo "$AGENT_ID" > .bmad-agent-context
|
|
831
|
-
\`\`\`
|
|
832
|
-
|
|
833
|
-
Where \`$AGENT_ID\` is one of:
|
|
834
|
-
- \`pm\` (Product Manager)
|
|
835
|
-
- \`dev\` (Developer)
|
|
836
|
-
- \`qa\` (QA)
|
|
837
|
-
- \`architect\` (Architect)
|
|
838
|
-
- \`po\` (Product Owner)
|
|
839
|
-
- \`analyst\` (Analyst)
|
|
840
|
-
- \`sm\` (Scrum Master)
|
|
841
|
-
- \`ux-expert\` (UX Expert)
|
|
842
|
-
- \`bmad-master\` (BMAD Master)
|
|
843
|
-
- \`bmad-orchestrator\` (Orchestrator)
|
|
844
|
-
|
|
845
|
-
**Example:**
|
|
846
|
-
\`\`\`bash
|
|
847
|
-
# For Product Manager agent
|
|
848
|
-
echo "pm" > .bmad-agent-context
|
|
849
|
-
\`\`\`
|
|
850
|
-
|
|
851
|
-
This file allows AgentVibes to:
|
|
852
|
-
1. Detect which BMAD agent is active
|
|
853
|
-
2. Look up the correct voice mapping
|
|
854
|
-
3. Automatically speak questions using the agent's assigned voice
|
|
855
|
-
|
|
856
|
-
## STEP 10: Clean Up on Exit
|
|
857
|
-
|
|
858
|
-
**Before exiting the agent, remove the context file:**
|
|
859
|
-
|
|
860
|
-
\`\`\`bash
|
|
861
|
-
rm -f .bmad-agent-context
|
|
862
|
-
\`\`\`
|
|
863
|
-
|
|
864
|
-
This ensures voice switching only happens when an agent is active.
|
|
865
|
-
|
|
866
|
-
## Why This Matters
|
|
867
|
-
|
|
868
|
-
Without the \`.bmad-agent-context\` file:
|
|
869
|
-
- AgentVibes cannot detect which agent is active
|
|
870
|
-
- Questions won't be spoken automatically
|
|
871
|
-
- Voice switching won't work
|
|
872
|
-
- The BMAD voice plugin becomes non-functional
|
|
873
|
-
|
|
874
|
-
**This is MANDATORY for BMAD voice integration to work!**
|
|
875
|
-
`;
|
|
893
|
+
// File doesn't exist - create it with version-specific instructions
|
|
894
|
+
const activationContent = generateActivationInstructions(bmadDetection.version);
|
|
876
895
|
await fs.writeFile(activationInstructionsPath, activationContent);
|
|
877
896
|
console.log(chalk.green('š Created BMAD activation instructions'));
|
|
878
897
|
}
|
|
879
898
|
}
|
|
880
899
|
|
|
881
900
|
if (bmadDetected) {
|
|
901
|
+
const versionLabel = bmadDetection.version === 6
|
|
902
|
+
? `v${bmadDetection.detailedVersion}`
|
|
903
|
+
: 'v4';
|
|
904
|
+
|
|
882
905
|
console.log(
|
|
883
906
|
boxen(
|
|
884
|
-
chalk.green.bold(
|
|
907
|
+
chalk.green.bold(`š BMAD-METHOD ${versionLabel} Detected!\n\n`) +
|
|
885
908
|
chalk.white('ā
BMAD Voice Plugin: AUTO-ENABLED\n') +
|
|
886
909
|
chalk.gray('Each BMAD agent will automatically use its assigned voice\n') +
|
|
887
910
|
chalk.gray('and speak when activated!\n\n') +
|