feat: Add voice map generation with agent intros for party mode
- Generate _cfg/agent-voice-map.csv during BMAD install with voice and intro columns - Update party mode instructions to have 3-4 agents introduce themselves on activation - Each agent speaks their personalized intro message via TTS 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
fe79f77768
commit
6e0b36f0e0
|
|
@ -38,6 +38,7 @@ Load config from `{project-root}/{bmad_folder}/bmm/config.yaml` and resolve:
|
|||
|
||||
- `installed_path` = `{project-root}/{bmad_folder}/core/workflows/party-mode`
|
||||
- `agent_manifest_path` = `{project-root}/{bmad_folder}/_cfg/agent-manifest.csv`
|
||||
- `agent_voice_map_path` = `{project-root}/{bmad_folder}/_cfg/agent-voice-map.csv`
|
||||
- `standalone_mode` = `true` (party mode is an interactive workflow)
|
||||
|
||||
---
|
||||
|
|
@ -63,6 +64,16 @@ Parse CSV manifest to extract agent entries with complete information:
|
|||
|
||||
Build complete agent roster with merged personalities for conversation orchestration.
|
||||
|
||||
### Voice Map Loading (Optional)
|
||||
|
||||
If `agent_voice_map_path` exists, load agent voice configuration:
|
||||
|
||||
- **agent** (agent identifier matching manifest name)
|
||||
- **voice** (TTS voice name for the agent)
|
||||
- **intro** (introduction message the agent uses when joining party mode)
|
||||
|
||||
Merge voice map data with agent roster for TTS integration and personalized introductions.
|
||||
|
||||
---
|
||||
|
||||
## EXECUTION
|
||||
|
|
@ -81,7 +92,14 @@ Welcome {{user_name}}! All BMAD agents are here and ready for a dynamic group di
|
|||
|
||||
**Let me introduce our collaborating agents:**
|
||||
|
||||
[Load agent roster and display 2-3 most diverse agents as examples]
|
||||
[Load agent roster and display all agents with their icons and titles]
|
||||
|
||||
**Agent Introductions (if voice map with intros is available):**
|
||||
|
||||
For each agent in the roster, if they have an intro message from the voice map:
|
||||
- Have the agent speak their intro message in-character
|
||||
- Use TTS to voice the introduction with their assigned voice
|
||||
- Format: `Bash: .claude/hooks/bmad-speak.sh "[Agent Name]" "[Their intro message]"`
|
||||
|
||||
**What would you like to discuss with the team today?**"
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ class ManifestGenerator {
|
|||
await this.writeMainManifest(cfgDir),
|
||||
await this.writeWorkflowManifest(cfgDir),
|
||||
await this.writeAgentManifest(cfgDir),
|
||||
await this.writeVoiceMap(cfgDir),
|
||||
await this.writeTaskManifest(cfgDir),
|
||||
await this.writeToolManifest(cfgDir),
|
||||
await this.writeFilesManifest(cfgDir),
|
||||
|
|
@ -585,6 +586,80 @@ class ManifestGenerator {
|
|||
return csvPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write agent voice map CSV for AgentVibes TTS integration
|
||||
* Maps agent IDs to default Piper TTS voices and intro messages
|
||||
* AgentVibes will use this if present, otherwise falls back to its own defaults
|
||||
* @returns {string} Path to the voice map file
|
||||
*/
|
||||
async writeVoiceMap(cfgDir) {
|
||||
const csvPath = path.join(cfgDir, 'agent-voice-map.csv');
|
||||
|
||||
// Default voice assignments and intros for BMAD agents
|
||||
// These can be customized by editing the generated CSV
|
||||
const agentDefaults = {
|
||||
'bmad-master': {
|
||||
voice: 'en_US-lessac-medium',
|
||||
intro: 'Greetings! The BMad Master is here to orchestrate and guide you through any workflow.',
|
||||
},
|
||||
analyst: {
|
||||
voice: 'en_US-kristin-medium',
|
||||
intro: "Hi there! I'm Mary, your Business Analyst. I'll help uncover the real requirements.",
|
||||
},
|
||||
architect: {
|
||||
voice: 'en_GB-alan-medium',
|
||||
intro: "Hello! Winston here, your Architect. I'll ensure we build something scalable and pragmatic.",
|
||||
},
|
||||
dev: {
|
||||
voice: 'en_US-joe-medium',
|
||||
intro: 'Hey! Amelia here, your Developer. Ready to turn specs into working code.',
|
||||
},
|
||||
pm: {
|
||||
voice: 'en_US-ryan-high',
|
||||
intro: "Hey team! John here, your Product Manager. Let's make sure we're building the right thing.",
|
||||
},
|
||||
sm: {
|
||||
voice: 'en_US-amy-medium',
|
||||
intro: "Hi everyone! Bob here, your Scrum Master. I'll keep us focused and moving forward.",
|
||||
},
|
||||
tea: {
|
||||
voice: 'en_US-kusal-medium',
|
||||
intro: 'Hello! Murat here, your Test Architect. Quality is my obsession.',
|
||||
},
|
||||
'tech-writer': {
|
||||
voice: 'jenny',
|
||||
intro: "Hi! I'm Paige, your Technical Writer. I'll make sure everything is documented clearly.",
|
||||
},
|
||||
'ux-designer': {
|
||||
voice: 'kristin',
|
||||
intro: 'Hey! Sally here, your UX Designer. The user experience is my top priority.',
|
||||
},
|
||||
'frame-expert': {
|
||||
voice: 'en_GB-alan-medium',
|
||||
intro: "Hello! Saif here, your Visual Design Expert. I'll help visualize your ideas.",
|
||||
},
|
||||
};
|
||||
|
||||
// Fallback values for agents not in the default map
|
||||
const fallbackVoice = 'en_US-lessac-medium';
|
||||
const fallbackIntro = 'Hello! Ready to help with the discussion.';
|
||||
|
||||
let csv = 'agent,voice,intro\n';
|
||||
|
||||
// Add voice mapping and intro for each discovered agent
|
||||
for (const agent of this.agents) {
|
||||
const defaults = agentDefaults[agent.name] || {};
|
||||
const voice = defaults.voice || fallbackVoice;
|
||||
const intro = defaults.intro || fallbackIntro;
|
||||
// Escape quotes in intro for CSV
|
||||
const escapedIntro = intro.replaceAll('"', '""');
|
||||
csv += `${agent.name},${voice},"${escapedIntro}"\n`;
|
||||
}
|
||||
|
||||
await fs.writeFile(csvPath, csv);
|
||||
return csvPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write task manifest CSV
|
||||
* @returns {string} Path to the manifest file
|
||||
|
|
|
|||
Loading…
Reference in New Issue