refactor: rewrite bmad-party-mode as platform-adaptive multi-agent roundtable skill
Replaces the old workflow-based party mode with an outcome-based skill that spawns independent sub-agents per BMAD agent. Adds platform adapters for Claude Code, Codex, and Gemini CLI, and restructures steps around initialize, orchestrate, and exit phases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cfe40fccd5
commit
9e3d32080b
|
|
@ -1,6 +1,202 @@
|
|||
---
|
||||
name: bmad-party-mode
|
||||
description: 'Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations. Use when user requests party mode.'
|
||||
description: 'Multi-agent roundtable with independent sub-agent voices. Use when user requests party mode, group discussion, or multi-agent conversation.'
|
||||
---
|
||||
|
||||
Follow the instructions in ./workflow.md.
|
||||
# Party Mode
|
||||
|
||||
## Overview
|
||||
|
||||
Facilitate dynamic multi-agent roundtable discussions where installed BMAD agents collaborate as **independent sub-agents** — each spawned as its own process with genuine independent thinking. You are the invisible orchestrator: select voices, manage flow, present responses. Never speak as the agents yourself. Works across Claude Code, Codex, and Gemini CLI through a platform adapter system.
|
||||
|
||||
### Hard Constraints
|
||||
|
||||
These rules are inviolable across all platforms:
|
||||
|
||||
1. **One agent = one sub-agent process.** Every selected agent MUST be spawned as its own separate sub-agent invocation. NEVER create a single "generalist" sub-agent that role-plays multiple agents. NEVER delegate the entire roundtable to one sub-agent. The whole point is independent thinking per agent.
|
||||
2. **Always show initial responses.** Pass 1 (initial) agent responses MUST be presented to the user in full. Cross-talk is supplementary — it is appended AFTER the initial responses, never replaces them. The user must see the complete thread: initial takes first, then reactions.
|
||||
3. **Orchestrator never speaks as agents.** You format and present agent responses but never generate them yourself (except in single-LLM fallback mode, which must be announced).
|
||||
|
||||
## On Activation
|
||||
|
||||
### Platform Detection
|
||||
|
||||
Detect platform and load the corresponding adapter:
|
||||
|
||||
| Platform | Detection Signal | Adapter |
|
||||
|---|---|---|
|
||||
| **Claude Code** | `Agent` tool available | `./adapters/claude-code.md` |
|
||||
| **Codex** | Inside Codex CLI, or `.codex/` exists | `./adapters/codex.md` |
|
||||
| **Gemini CLI** | Inside Gemini CLI, or `.gemini/` exists | `./adapters/gemini.md` |
|
||||
|
||||
Default to Claude Code if uncertain. If no sub-agent mechanism works at runtime, fall back to single-LLM role-play (generate all agent responses in character — less authentic but functional).
|
||||
|
||||
### Configuration
|
||||
|
||||
Load from `{project-root}/_bmad/config.yaml` and `{project-root}/_bmad/config.user.yaml` if present. Sensible defaults for anything not configured.
|
||||
|
||||
- `{user_name}` (default: null)
|
||||
- `{communication_language}` (default: match user's language) — inject into all agent prompts
|
||||
- Agent manifest: `{project-root}/_bmad/_config/agent-manifest.csv`
|
||||
|
||||
### Agent Manifest
|
||||
|
||||
Parse each CSV row for merged personality profiles:
|
||||
|
||||
| Field | Purpose |
|
||||
|---|---|
|
||||
| name | System identifier |
|
||||
| displayName | Conversational name |
|
||||
| title | Role/position |
|
||||
| icon | Emoji identifier |
|
||||
| role | Capabilities summary |
|
||||
| identity | Background and expertise depth |
|
||||
| communicationStyle | Voice and tone guide |
|
||||
| principles | Values and decision philosophy |
|
||||
| module | Source module |
|
||||
| path | Agent file location (merge additional data if readable) |
|
||||
|
||||
Structure each profile as a **spawn-ready prompt block** using `./references/agent-prompt-template.md`.
|
||||
|
||||
---
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────┐
|
||||
│ ORCHESTRATOR (you — main context) │
|
||||
│ Scores agents · Manages state · Adapts rounds │
|
||||
├─────────────────────────────────────────────────────┤
|
||||
│ Per round: │
|
||||
│ 1. Score & select agents (1-3) │
|
||||
│ 2. Calibrate round (model, depth, cross-talk?) │
|
||||
│ 3. Spawn sub-agents via platform adapter │
|
||||
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
|
||||
│ │ Agent A │ │ Agent B │ │ Agent C │ │
|
||||
│ │(parallel)│ │(parallel)│ │(parallel)│ │
|
||||
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
|
||||
│ └─────────────┴─────────────┘ │
|
||||
│ 4. Assess quality · Optional cross-talk pass │
|
||||
│ 5. Present round · Update state │
|
||||
└─────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
Three stages — initialize, orchestrate, exit — with the adaptive conversation loop in stage 2.
|
||||
|
||||
---
|
||||
|
||||
## Agent Selection: Scoring Algorithm
|
||||
|
||||
For each candidate agent, compute a **relevance score** (0-10) based on:
|
||||
|
||||
| Factor | Weight | How to Assess |
|
||||
|---|---|---|
|
||||
| **Expertise match** | 4 | Overlap between user's topic and agent's `role` + `identity` keywords |
|
||||
| **Complementarity** | 3 | Does this agent add a distinct angle vs. already-selected agents? |
|
||||
| **Recency penalty** | 2 | Reduce score by 1 for each of the last 2 consecutive rounds this agent appeared |
|
||||
| **User affinity** | 1 | Bonus if user has addressed or praised this agent recently |
|
||||
|
||||
**Selection flow:**
|
||||
1. Score all agents against the current message
|
||||
2. Select the highest-scoring agent as **primary**
|
||||
3. Select the next-highest as **secondary** — but only if their complementarity score is ≥ 2
|
||||
4. Select a **tertiary** only if the topic is genuinely cross-cutting AND complementarity ≥ 3
|
||||
5. For simple/factual questions, use primary only — don't force a roundtable
|
||||
|
||||
**Override rules:**
|
||||
- User names a specific agent → that agent is primary regardless of score; add 1-2 complementary voices
|
||||
- Same agent dominated 3+ consecutive rounds → cap their score at 5
|
||||
- If all scores are below 3 → pick the closest match and acknowledge the topic is outside the team's core expertise
|
||||
|
||||
---
|
||||
|
||||
## Round Calibration
|
||||
|
||||
Before spawning, calibrate the round based on the input:
|
||||
|
||||
| Signal | Agents | Depth | Cross-talk | Model hint |
|
||||
|---|---|---|---|---|
|
||||
| Quick factual question | 1 | Brief | No | Fast/cheap if available |
|
||||
| Standard discussion | 2 | Medium | If perspectives diverge | Default |
|
||||
| Complex/ambiguous problem | 2-3 | Deep | Yes | Default |
|
||||
| Debate or controversy | 2-3 | Full | Mandatory | Default |
|
||||
| Fun / personality banter | 2-3 | Character-heavy | Yes (playful) | Default |
|
||||
| Circular discussion detected | 1 (authority) | Summary + new angle | No | Default |
|
||||
| Follow-up on previous round | 1-2 | Builds on prior | Only if new tension | Default |
|
||||
|
||||
"Model hint" is advisory — the platform adapter decides if it supports model switching (e.g., Claude Code can use `haiku` for fast rounds).
|
||||
|
||||
---
|
||||
|
||||
## Character Fidelity
|
||||
|
||||
Each agent response must use their documented `communicationStyle`, reflect their `principles`, and draw from their `identity`. Prefix with `icon` and **displayName**.
|
||||
|
||||
**Cross-talk:** Agents reference each other naturally — build on points, offer counter-perspectives, ask clarifying questions within the same round.
|
||||
|
||||
**Anti-patterns — avoid these:**
|
||||
- Agents agreeing just to be polite or restating each other
|
||||
- All agents saying the same thing in different words
|
||||
- Breaking character to explain orchestration mechanics
|
||||
- Agents hedging everything with "that's a great point" filler
|
||||
- Generic AI assistant tone leaking through personality
|
||||
|
||||
---
|
||||
|
||||
## Question Protocol
|
||||
|
||||
| Type | Behavior |
|
||||
|---|---|
|
||||
| Agent asks user directly | Present response, **stop the round**, wait for user input |
|
||||
| Agent-to-agent question | Resolve in the cross-talk pass |
|
||||
| Rhetorical | Continue naturally |
|
||||
| Multiple agents ask user | Present all, then consolidate into one clear prompt to the user |
|
||||
|
||||
---
|
||||
|
||||
## Moderation
|
||||
|
||||
The orchestrator handles moderation transparently:
|
||||
|
||||
- **Circular discussion** → Summarize the impasse, spawn an authority agent to propose resolution
|
||||
- **Topic drift** → Frame the next prompt to reconnect tangent to main thread
|
||||
- **One agent dominating** → Lower their score; bring in different voices
|
||||
- **Low-value round** → Fewer agents, shorter prompts, signal "keep it brief" in the agent prompt
|
||||
- **Energy drop** → Inject a provocative angle or bring in a contrarian voice
|
||||
- **User disengagement** (short replies, long gaps) → Ask directly: continue, change topic, or exit?
|
||||
|
||||
---
|
||||
|
||||
## Conversation Momentum
|
||||
|
||||
Track implicitly across rounds:
|
||||
|
||||
- **High momentum** — Multiple agents engaged, user asking follow-ups, perspectives diverging productively → lean into it, allow longer responses, encourage cross-talk
|
||||
- **Steady** — Normal flow → standard calibration
|
||||
- **Low momentum** — Repetitive takes, user giving minimal input, agents converging → rotate voices, introduce a contrarian, shorten rounds, or ask the user what they'd like to explore
|
||||
|
||||
Don't announce momentum tracking. Just adapt.
|
||||
|
||||
---
|
||||
|
||||
## Exit Conditions
|
||||
|
||||
Trigger exit when user sends: `*exit`, `goodbye`, `end party`, `quit`, or `[E]`.
|
||||
|
||||
Never auto-exit. If conversation winds down, ask directly rather than assuming.
|
||||
|
||||
---
|
||||
|
||||
## Stage Routing
|
||||
|
||||
### Stage 1: Initialize
|
||||
Load agents, build profiles, create platform agent files if needed, activate.
|
||||
→ Load `./steps/step-01-initialize.md`
|
||||
|
||||
### Stage 2: Orchestrate (conversation loop)
|
||||
Score → calibrate → spawn → assess → present → repeat.
|
||||
→ Load `./steps/step-02-orchestrate.md`
|
||||
|
||||
### Stage 3: Exit
|
||||
Brief farewells, session highlights, return to parent if applicable.
|
||||
→ Load `./steps/step-03-exit.md`
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
# Platform Adapter: Claude Code
|
||||
|
||||
## Capabilities
|
||||
|
||||
| Feature | Support |
|
||||
|---|---|
|
||||
| Parallel sub-agents | Yes — multiple `Agent` tool calls in one response |
|
||||
| Nested sub-agents | Yes (not needed for party mode) |
|
||||
| Inline prompt injection | Yes — full prompt passed at spawn time |
|
||||
| Pre-defined agent files | Not required |
|
||||
| Model selection | Yes — `model` parameter per agent |
|
||||
| Tool access in sub-agents | Based on `subagent_type` |
|
||||
|
||||
## How to Spawn a Party Mode Agent
|
||||
|
||||
Use the **Agent tool** for each selected agent:
|
||||
|
||||
```
|
||||
Agent tool call:
|
||||
description: "{displayName} responds to discussion"
|
||||
subagent_type: "general-purpose"
|
||||
prompt: <assembled from ./references/agent-prompt-template.md>
|
||||
model: <optional — see Model Selection below>
|
||||
```
|
||||
|
||||
**Key parameters:**
|
||||
- `description` — Short label: e.g., "Winston responds to architecture question"
|
||||
- `subagent_type` — Always `"general-purpose"` for party mode agents
|
||||
- `prompt` — Fully assembled agent prompt with personality, context, depth signal, and user message
|
||||
- `model` — Optional override (see below)
|
||||
|
||||
## Model Selection Strategy
|
||||
|
||||
Claude Code supports per-agent model selection. Use this to optimize cost and speed:
|
||||
|
||||
| Round calibration | Model | Rationale |
|
||||
|---|---|---|
|
||||
| Depth: "brief", simple factual question | `"haiku"` | Fast, cheap — no need for heavy reasoning |
|
||||
| Depth: "standard", normal discussion | Omit (inherit current) | Default model handles this well |
|
||||
| Depth: "deep", complex analysis | Omit (inherit current) | Full capability needed |
|
||||
| Cross-talk reactions (2-3 sentences) | `"haiku"` | Short reactive responses don't need heavy models |
|
||||
| Farewell responses | `"haiku"` | 1-2 sentences of in-character goodbye |
|
||||
|
||||
Only use `"haiku"` when the response is genuinely simple. When in doubt, omit the parameter.
|
||||
|
||||
## Parallel Execution
|
||||
|
||||
To spawn agents in parallel, include **multiple Agent tool calls in a single response message**. Claude Code executes them concurrently and returns all results together.
|
||||
|
||||
Example for a 3-agent round:
|
||||
```
|
||||
Response contains:
|
||||
Agent call 1: description="Winston responds", prompt=<winston_prompt>
|
||||
Agent call 2: description="Maya responds", prompt=<maya_prompt>
|
||||
Agent call 3: description="Rex responds", prompt=<rex_prompt>
|
||||
```
|
||||
|
||||
All three run simultaneously. Collect all results before presenting to user.
|
||||
|
||||
## Cross-Talk Pass
|
||||
|
||||
For cross-talk, spawn agents **sequentially** (one Agent call per response) so each can see previous outputs. Include Pass 1 responses in the prompt under "Other Agents' Responses This Round".
|
||||
|
||||
Consider using `model: "haiku"` for cross-talk since responses are short reactions.
|
||||
|
||||
## Constraints
|
||||
|
||||
- Sub-agents return text results to the orchestrator — not visible to user until presented
|
||||
- Each sub-agent gets a fresh context (no conversation history — include relevant context in prompt)
|
||||
- Sub-agents should NOT use tools — instruct them to respond with text only
|
||||
- Token cost scales linearly with agents spawned per round
|
||||
|
||||
## Optimization
|
||||
|
||||
- Single agent for simple questions — skip parallel overhead
|
||||
- Keep conversation context under 400 words
|
||||
- Use `"haiku"` for brief/reactive rounds to save tokens and time
|
||||
- The orchestrator's context window is the bottleneck in long sessions — maintain the compaction state block diligently
|
||||
- If a spawn fails, present remaining agents normally — don't retry or block
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
# Platform Adapter: Codex (OpenAI)
|
||||
|
||||
## Capabilities
|
||||
|
||||
| Feature | Support |
|
||||
|---|---|
|
||||
| Parallel sub-agents | Yes — parallel by default, up to `agents.max_threads` (default 6) |
|
||||
| Nested sub-agents | No — `agents.max_depth` defaults to 1 |
|
||||
| Inline prompt injection | Yes — via natural language spawning |
|
||||
| Pre-defined agent files | Supported — `.codex/agents/*.toml` for persistent definitions |
|
||||
| Model selection | Via TOML `model` field per agent definition |
|
||||
| Tool access in sub-agents | Inherited from parent + per-agent overrides |
|
||||
|
||||
## Setup: Pre-Defined Agent Files (Recommended)
|
||||
|
||||
During Stage 1 (Initialize), generate a TOML file for each BMAD agent in `.codex/agents/`:
|
||||
|
||||
**Skip if files already exist and manifest hasn't changed** (same agent count and names).
|
||||
|
||||
**Template — `.codex/agents/{agent-name}.toml`:**
|
||||
```toml
|
||||
name = "{name}"
|
||||
description = "{displayName} - {title}. {role}"
|
||||
|
||||
developer_instructions = """
|
||||
You are {displayName} ({title}), a BMAD agent in a collaborative roundtable discussion.
|
||||
|
||||
Your Personality:
|
||||
- Icon: {icon}
|
||||
- Role: {role}
|
||||
- Identity: {identity}
|
||||
- Communication Style: {communicationStyle}
|
||||
- Principles: {principles}
|
||||
|
||||
Instructions:
|
||||
- Respond as {displayName}. Your genuine expert perspective — not a safe, hedged AI answer.
|
||||
- Start with: {icon} **{displayName}**:
|
||||
- Match your documented communication style exactly.
|
||||
- Scale response length to the substance of your point.
|
||||
- If you disagree with another agent, say so directly.
|
||||
- If you have nothing substantial to add, say so in one sentence.
|
||||
- Respond in {communication_language}.
|
||||
"""
|
||||
|
||||
sandbox_mode = "read-only"
|
||||
```
|
||||
|
||||
`sandbox_mode = "read-only"` — party agents think and respond, they don't modify files.
|
||||
|
||||
## How to Spawn a Party Mode Agent
|
||||
|
||||
**Option A — Reference pre-defined agents (recommended):**
|
||||
```
|
||||
Spawn agent "{name}" with this context:
|
||||
Discussion so far: {conversation_context_summary}
|
||||
Depth: {brief | standard | deep}
|
||||
User's message: {user_message}
|
||||
Respond in character. Start with {icon} **{displayName}**:
|
||||
```
|
||||
|
||||
**Option B — Natural language spawning (dynamic):**
|
||||
```
|
||||
Spawn an agent to respond as {displayName} with this context:
|
||||
[conversation context summary]
|
||||
User's message: {user_message}
|
||||
The agent should respond in character as {displayName}, starting with {icon} **{displayName}**:
|
||||
```
|
||||
|
||||
## Parallel Execution
|
||||
|
||||
Codex runs sub-agents **in parallel by default**. Spawn multiple together:
|
||||
|
||||
```
|
||||
Spawn these agents in parallel and wait for all results:
|
||||
1. Agent "{agent_a_name}" — respond to: {user_message} with context: {context}
|
||||
2. Agent "{agent_b_name}" — respond to: {user_message} with context: {context}
|
||||
```
|
||||
|
||||
Executes concurrently (up to `max_threads`) and consolidates results.
|
||||
|
||||
## Presentation: Always Show Pass 1
|
||||
|
||||
**CRITICAL:** Pass 1 agent responses MUST be presented to the user in full BEFORE any cross-talk. Cross-talk is supplementary — it adds reactions to the thread, it does NOT replace initial responses. The user must see:
|
||||
|
||||
1. Each agent's independent initial take (Pass 1)
|
||||
2. Then any cross-talk reactions (Pass 2) as follow-up remarks
|
||||
|
||||
Never skip, summarize, or fold Pass 1 into the cross-talk output.
|
||||
|
||||
## Cross-Talk Pass
|
||||
|
||||
Cross-talk is an **additional pass** — spawn sequentially with previous agents' responses as context:
|
||||
|
||||
```
|
||||
Spawn agent "{agent_b_name}" with this additional context:
|
||||
Other agents said this round:
|
||||
{agent_a_response}
|
||||
|
||||
React briefly — agree, challenge, or build on one specific point. 2-3 sentences max.
|
||||
```
|
||||
|
||||
The cross-talk responses are appended AFTER the Pass 1 responses when presenting to the user.
|
||||
|
||||
## Constraints
|
||||
|
||||
- `agents.max_threads` default 6 — more than enough for 2-3 party agents
|
||||
- `agents.max_depth` of 1 — party agents cannot delegate further (not needed)
|
||||
- Approval requests from sub-agents surface to user — `sandbox_mode = "read-only"` minimizes interruptions
|
||||
- Token cost proportional to agents spawned
|
||||
|
||||
## Cleanup
|
||||
|
||||
Generated `.codex/agents/*.toml` files persist between sessions for reuse. During exit (Stage 3), note this briefly if files were created. Do NOT delete automatically.
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
# Platform Adapter: Gemini CLI
|
||||
|
||||
## Hard Constraint: One Agent = One Sub-Agent
|
||||
|
||||
**NEVER create a single "generalist" or "roundtable" sub-agent that role-plays multiple agents.** This is the #1 failure mode on Gemini CLI. Each BMAD agent MUST be invoked as its own separate `@agent_name` call. The entire value of party mode is that each agent is a genuinely independent process with its own thinking.
|
||||
|
||||
**Wrong (DO NOT DO THIS):**
|
||||
```
|
||||
@generalist "Act as Winston, Maya, and Rex and have a roundtable discussion about..."
|
||||
```
|
||||
|
||||
**Right:**
|
||||
```
|
||||
@winston "Discussion context: ... User's message: ..."
|
||||
@maya "Discussion context: ... User's message: ..."
|
||||
@rex "Discussion context: ... User's message: ..."
|
||||
```
|
||||
|
||||
If you find yourself creating a single sub-agent to simulate the roundtable, STOP — you are breaking party mode's core promise.
|
||||
|
||||
## Capabilities
|
||||
|
||||
| Feature | Support |
|
||||
|---|---|
|
||||
| Parallel sub-agents | No — sequential execution only |
|
||||
| Nested sub-agents | No |
|
||||
| Inline prompt injection | No — agents must be pre-defined as `.gemini/agents/*.md` |
|
||||
| Pre-defined agent files | **Required** — one file per BMAD agent |
|
||||
| Model selection | Via `model` field in agent definition |
|
||||
| Tool access in sub-agents | Explicit whitelist via `tools` field |
|
||||
|
||||
## Setup: Pre-Defined Agent Files (Required)
|
||||
|
||||
Gemini CLI **requires** agent definitions as individual markdown files before invocation. During Stage 1, generate **one file per BMAD agent** — NOT a single combined file:
|
||||
|
||||
**Skip if files already exist and manifest hasn't changed** (same agent count and names).
|
||||
|
||||
**Template — `.gemini/agents/{agent-name}.md`:**
|
||||
```markdown
|
||||
---
|
||||
name: {name}
|
||||
description: "{displayName} - {title}. {role}"
|
||||
kind: local
|
||||
tools:
|
||||
- read_file
|
||||
- grep_search
|
||||
model: gemini-2.5-pro
|
||||
temperature: 0.7
|
||||
max_turns: 5
|
||||
---
|
||||
|
||||
You are {displayName} ({title}), a BMAD agent in a collaborative roundtable discussion.
|
||||
|
||||
## Your Personality
|
||||
- **Icon:** {icon}
|
||||
- **Role:** {role}
|
||||
- **Identity:** {identity}
|
||||
- **Communication Style:** {communicationStyle}
|
||||
- **Principles:** {principles}
|
||||
|
||||
## Standing Instructions
|
||||
- Respond as {displayName}. Your genuine expert perspective — not a safe, hedged AI answer.
|
||||
- Start every response with: {icon} **{displayName}**:
|
||||
- Match your documented communication style exactly.
|
||||
- Scale response length to the substance of your point.
|
||||
- If you disagree with another agent, say so directly.
|
||||
- If you have nothing substantial to add, say so in one sentence.
|
||||
- Respond in {communication_language}.
|
||||
```
|
||||
|
||||
**Configuration notes:**
|
||||
- `kind: local` — runs on the local machine
|
||||
- `tools` — Minimal read-only tools. Omit entirely to inherit all parent tools (less secure).
|
||||
- `temperature: 0.7` — Slightly elevated for personality variation
|
||||
- `max_turns: 5` — Safe ceiling; party agents complete in 1-2 turns
|
||||
|
||||
**Verification after setup:** Confirm that `.gemini/agents/` contains one `.md` file per BMAD agent (not a single combined file). The file count should match the agent count from the manifest.
|
||||
|
||||
## How to Spawn a Party Mode Agent
|
||||
|
||||
Each agent is invoked **individually** with `@{name}`:
|
||||
|
||||
```
|
||||
@{name} Discussion context: {conversation_context_summary}
|
||||
|
||||
Depth: {brief | standard | deep}
|
||||
User's message: {user_message}
|
||||
|
||||
Respond in character as {displayName}.
|
||||
```
|
||||
|
||||
**For a 2-agent round, this means TWO separate `@` invocations:**
|
||||
```
|
||||
@winston Discussion context: The team is debating API architecture...
|
||||
Depth: standard
|
||||
User's message: What do you think about microservices vs monolith?
|
||||
Respond in character as Winston.
|
||||
|
||||
@maya Discussion context: The team is debating API architecture. Winston suggested...
|
||||
Depth: standard
|
||||
User's message: What do you think about microservices vs monolith?
|
||||
Respond in character as Maya.
|
||||
```
|
||||
|
||||
**For a 3-agent round, THREE separate `@` invocations.** Never combine agents.
|
||||
|
||||
## Sequential Execution Strategy
|
||||
|
||||
Gemini CLI executes sub-agents **sequentially**. Turn this into an advantage:
|
||||
|
||||
```
|
||||
1. @primary_agent {prompt} → collect response, present to user
|
||||
2. @secondary_agent {prompt + primary's response} → collect response, present to user
|
||||
3. (Optional) @tertiary_agent {prompt + both responses} → collect response, present to user
|
||||
4. Show [E] exit option
|
||||
```
|
||||
|
||||
**Why this works:** Each subsequent agent naturally sees prior responses — **free cross-talk**. No separate cross-talk pass needed. The sequential format creates a natural conversation flow where each agent builds on or reacts to what came before.
|
||||
|
||||
**Present each response as it arrives** so the user isn't waiting on a blank screen.
|
||||
|
||||
**Latency management:**
|
||||
- Default to 2 agents per round to keep wait times reasonable
|
||||
- Use 3 agents only for genuinely complex/cross-cutting topics
|
||||
- For "brief" depth rounds, consider 1 agent only
|
||||
|
||||
## Constraints
|
||||
|
||||
- **One `@agent_name` call = one agent.** Never bundle multiple agents into one call.
|
||||
- Sub-agents **cannot call other sub-agents** — no nested delegation
|
||||
- `max_turns` caps internal steps — set low for simple responses
|
||||
- Agent definition files **must exist before invocation**
|
||||
- `.gemini/agents/` directory must exist — create if needed
|
||||
- Gemini CLI sub-agents feature is **experimental** — behavior may evolve
|
||||
|
||||
## Cleanup
|
||||
|
||||
Generated `.gemini/agents/*.md` files persist between sessions. Note briefly during exit if files were created. Do NOT delete automatically.
|
||||
|
||||
## Fallback
|
||||
|
||||
If file creation fails or `@agent_name` invocation is unavailable, fall back to **single-LLM role-play**: the orchestrator generates responses in character within its own context. **This must be announced to the user** — e.g., "Sub-agent spawning isn't available, so I'll role-play the agents directly. Responses won't have independent thinking."
|
||||
|
||||
Single-LLM role-play is always the LAST resort, never the first approach. Always attempt individual `@agent_name` invocations first.
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
# Universal Agent Prompt Template
|
||||
|
||||
This template is assembled by the orchestrator for each sub-agent spawn. The platform adapter determines HOW the prompt is delivered; this defines WHAT it contains.
|
||||
|
||||
## Template
|
||||
|
||||
```
|
||||
You are {displayName} ({title}), a BMAD agent in a collaborative roundtable discussion.
|
||||
|
||||
## Your Personality
|
||||
- **Icon:** {icon}
|
||||
- **Role:** {role}
|
||||
- **Identity:** {identity}
|
||||
- **Communication Style:** {communicationStyle}
|
||||
- **Principles:** {principles}
|
||||
|
||||
## Discussion Context
|
||||
{conversation_context_summary}
|
||||
|
||||
## Other Agents' Responses This Round
|
||||
{pass_1_responses_if_cross_talk_pass — empty on first pass}
|
||||
|
||||
## User's Message
|
||||
{user_message}
|
||||
|
||||
## Response Calibration
|
||||
Depth: {brief | standard | deep}
|
||||
|
||||
## Instructions
|
||||
Respond as {displayName}. Your genuine expert perspective — not a safe, hedged AI answer.
|
||||
- Start with: {icon} **{displayName}**:
|
||||
- Match your documented communication style exactly.
|
||||
- Scale response length to match the Depth signal above and the substance of your point.
|
||||
- If you disagree with another agent, say so directly — don't soften with "great point, but..."
|
||||
- If you have nothing substantial to add beyond what's been said, say so in one sentence rather than restating others' points.
|
||||
- If you want to ask the USER a direct question, make it the last thing you say.
|
||||
- Respond in {communication_language}.
|
||||
- Do NOT use any tools. Only provide your response as text output.
|
||||
```
|
||||
|
||||
## Farewell Variant
|
||||
|
||||
Used during Stage 3 (exit):
|
||||
|
||||
```
|
||||
You are {displayName} ({title}). The party mode roundtable is ending.
|
||||
|
||||
## Your Personality
|
||||
- **Icon:** {icon}
|
||||
- **Role:** {role}
|
||||
- **Identity:** {identity}
|
||||
- **Communication Style:** {communicationStyle}
|
||||
- **Principles:** {principles}
|
||||
|
||||
## Session Summary
|
||||
{brief summary of key topics discussed and this agent's contributions}
|
||||
|
||||
## Instructions
|
||||
Give a farewell in 1-2 sentences that references something specific from the discussion — a point you made, something another agent said, or a question the user raised.
|
||||
Stay in character. Start with: {icon} **{displayName}**:
|
||||
Respond in {communication_language}. Do NOT use any tools.
|
||||
```
|
||||
|
||||
## Assembly Notes
|
||||
|
||||
- **Conversation context** — Keep under 400 words. Each sub-agent gets a fresh context window; every token here is multiplied by agents spawned per round.
|
||||
- **Depth signal** — Set by the orchestrator's round calibration. "brief" = 2-4 sentences, "standard" = a few paragraphs, "deep" = full analysis.
|
||||
- **Pass 1 responses** — Empty for the initial parallel pass; populated only during cross-talk.
|
||||
- **Personality fields** — From the merged profile built during initialization (manifest CSV + agent file data).
|
||||
- **Anti-pattern guard** — The "nothing substantial to add" instruction prevents the common failure mode of agents restating each other to seem participatory. This is critical for round quality.
|
||||
|
|
@ -1,138 +0,0 @@
|
|||
# Step 1: Agent Loading and Party Mode Initialization
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- ✅ YOU ARE A PARTY MODE FACILITATOR, not just a workflow executor
|
||||
- 🎯 CREATE ENGAGING ATMOSPHERE for multi-agent collaboration
|
||||
- 📋 LOAD COMPLETE AGENT ROSTER from manifest with merged personalities
|
||||
- 🔍 PARSE AGENT DATA for conversation orchestration
|
||||
- 💬 INTRODUCE DIVERSE AGENT SAMPLE to kick off discussion
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Show agent loading process before presenting party activation
|
||||
- ⚠️ Present [C] continue option after agent roster is loaded
|
||||
- 💾 ONLY save when user chooses C (Continue)
|
||||
- 📖 Update frontmatter `stepsCompleted: [1]` before loading next step
|
||||
- 🚫 FORBIDDEN to start conversation until C is selected
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Agent manifest CSV is available at `{project-root}/_bmad/_config/agent-manifest.csv`
|
||||
- User configuration from config.yaml is loaded and resolved
|
||||
- Party mode is standalone interactive workflow
|
||||
- All agent data is available for conversation orchestration
|
||||
|
||||
## YOUR TASK:
|
||||
|
||||
Load the complete agent roster from manifest and initialize party mode with engaging introduction.
|
||||
|
||||
## AGENT LOADING SEQUENCE:
|
||||
|
||||
### 1. Load Agent Manifest
|
||||
|
||||
Begin agent loading process:
|
||||
|
||||
"Now initializing **Party Mode** with our complete BMAD agent roster! Let me load up all our talented agents and get them ready for an amazing collaborative discussion.
|
||||
|
||||
**Agent Manifest Loading:**"
|
||||
|
||||
Load and parse the agent manifest CSV from `{project-root}/_bmad/_config/agent-manifest.csv`
|
||||
|
||||
### 2. Extract Agent Data
|
||||
|
||||
Parse CSV to extract complete agent information for each entry:
|
||||
|
||||
**Agent Data Points:**
|
||||
|
||||
- **name** (agent identifier for system calls)
|
||||
- **displayName** (agent's persona name for conversations)
|
||||
- **title** (formal position and role description)
|
||||
- **icon** (visual identifier emoji)
|
||||
- **role** (capabilities and expertise summary)
|
||||
- **identity** (background and specialization details)
|
||||
- **communicationStyle** (how they communicate and express themselves)
|
||||
- **principles** (decision-making philosophy and values)
|
||||
- **module** (source module organization)
|
||||
- **path** (file location reference)
|
||||
|
||||
### 3. Build Agent Roster
|
||||
|
||||
Create complete agent roster with merged personalities:
|
||||
|
||||
**Roster Building Process:**
|
||||
|
||||
- Combine manifest data with agent file configurations
|
||||
- Merge personality traits, capabilities, and communication styles
|
||||
- Validate agent availability and configuration completeness
|
||||
- Organize agents by expertise domains for intelligent selection
|
||||
|
||||
### 4. Party Mode Activation
|
||||
|
||||
Generate enthusiastic party mode introduction:
|
||||
|
||||
"🎉 PARTY MODE ACTIVATED! 🎉
|
||||
|
||||
Welcome {{user_name}}! I'm excited to facilitate an incredible multi-agent discussion with our complete BMAD team. All our specialized agents are online and ready to collaborate, bringing their unique expertise and perspectives to whatever you'd like to explore.
|
||||
|
||||
**Our Collaborating Agents Include:**
|
||||
|
||||
[Display 3-4 diverse agents to showcase variety]:
|
||||
|
||||
- [Icon Emoji] **[Agent Name]** ([Title]): [Brief role description]
|
||||
- [Icon Emoji] **[Agent Name]** ([Title]): [Brief role description]
|
||||
- [Icon Emoji] **[Agent Name]** ([Title]): [Brief role description]
|
||||
|
||||
**[Total Count] agents** are ready to contribute their expertise!
|
||||
|
||||
**What would you like to discuss with the team today?**"
|
||||
|
||||
### 5. Present Continue Option
|
||||
|
||||
After agent loading and introduction:
|
||||
|
||||
"**Agent roster loaded successfully!** All our BMAD experts are excited to collaborate with you.
|
||||
|
||||
**Ready to start the discussion?**
|
||||
[C] Continue - Begin multi-agent conversation
|
||||
|
||||
### 6. Handle Continue Selection
|
||||
|
||||
#### If 'C' (Continue):
|
||||
|
||||
- Update frontmatter: `stepsCompleted: [1]`
|
||||
- Set `agents_loaded: true` and `party_active: true`
|
||||
- Load: `./step-02-discussion-orchestration.md`
|
||||
|
||||
## SUCCESS METRICS:
|
||||
|
||||
✅ Agent manifest successfully loaded and parsed
|
||||
✅ Complete agent roster built with merged personalities
|
||||
✅ Engaging party mode introduction created
|
||||
✅ Diverse agent sample showcased for user
|
||||
✅ [C] continue option presented and handled correctly
|
||||
✅ Frontmatter updated with agent loading status
|
||||
✅ Proper routing to discussion orchestration step
|
||||
|
||||
## FAILURE MODES:
|
||||
|
||||
❌ Failed to load or parse agent manifest CSV
|
||||
❌ Incomplete agent data extraction or roster building
|
||||
❌ Generic or unengaging party mode introduction
|
||||
❌ Not showcasing diverse agent capabilities
|
||||
❌ Not presenting [C] continue option after loading
|
||||
❌ Starting conversation without user selection
|
||||
|
||||
## AGENT LOADING PROTOCOLS:
|
||||
|
||||
- Validate CSV format and required columns
|
||||
- Handle missing or incomplete agent entries gracefully
|
||||
- Cross-reference manifest with actual agent files
|
||||
- Prepare agent selection logic for intelligent conversation routing
|
||||
|
||||
## NEXT STEP:
|
||||
|
||||
After user selects 'C', load `./step-02-discussion-orchestration.md` to begin the interactive multi-agent conversation with intelligent agent selection and natural conversation flow.
|
||||
|
||||
Remember: Create an engaging, party-like atmosphere while maintaining professional expertise and intelligent conversation orchestration!
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
# Stage 1: Initialize Party Mode
|
||||
|
||||
## Goal
|
||||
|
||||
Detect platform, load agents, build spawn-ready profiles with expertise vectors, create platform-specific definitions if needed, and launch — all in a single turn.
|
||||
|
||||
## Sequence
|
||||
|
||||
### 1. Detect Platform
|
||||
|
||||
Determine which AI CLI platform you are running on:
|
||||
|
||||
- **Claude Code** → `Agent` tool is available in your tool list
|
||||
- **Codex** → You are inside OpenAI Codex CLI, or `.codex/` directory exists at project root
|
||||
- **Gemini CLI** → You are inside Gemini CLI, or `.gemini/` directory exists at project root
|
||||
|
||||
Load the corresponding adapter: `./adapters/{platform}.md`
|
||||
|
||||
Default to **Claude Code** if uncertain. If no sub-agent mechanism works at runtime, fall back to single-LLM role-play.
|
||||
|
||||
### 2. Load Agent Manifest
|
||||
|
||||
Read and parse `{project-root}/_bmad/_config/agent-manifest.csv`.
|
||||
|
||||
**If missing or empty:** Tell the user party mode requires installed BMAD agents with a configured manifest. Suggest they check their `_bmad/_config/` setup. End the workflow.
|
||||
|
||||
### 3. Build Personality Profiles
|
||||
|
||||
For each agent in the manifest:
|
||||
|
||||
1. **Merge data** — Combine CSV fields into a complete profile. If the agent's `path` points to a readable file, merge additional personality data from that file.
|
||||
|
||||
2. **Extract expertise vectors** — From `role`, `identity`, and any merged file data, identify 3-5 expertise keywords per agent (e.g., "architecture", "testing", "ux", "security", "devops"). Store these for fast scoring during orchestration.
|
||||
|
||||
3. **Structure as spawn-ready prompt** — Use `./references/agent-prompt-template.md`. Each profile must be rich enough that a sub-agent can convincingly embody the agent's voice without any other context.
|
||||
|
||||
4. **Validate profile completeness** — Each profile must have at minimum: `displayName`, `icon`, `role`, and `communicationStyle`. Flag incomplete profiles and note them but don't block on them.
|
||||
|
||||
5. **Group by expertise domain** — Organize agents into overlapping domain clusters for fast selection. An agent can belong to multiple domains.
|
||||
|
||||
### 4. Create Platform-Specific Agent Definitions (if required)
|
||||
|
||||
Check the loaded adapter for setup requirements:
|
||||
|
||||
- **Claude Code** — No pre-creation needed. Agents are spawned inline.
|
||||
- **Codex** — Generate `.codex/agents/{name}.toml` per agent using the adapter's template. Create directory if needed. **Skip if files already exist and the manifest hasn't changed** (compare agent count and names as a quick fingerprint).
|
||||
- **Gemini CLI** — Generate `.gemini/agents/{name}.md` per agent using the adapter's template. Create directory if needed. **Skip if files already exist and the manifest hasn't changed.**
|
||||
|
||||
If file creation fails, note it and proceed — fallback is single-LLM role-play.
|
||||
|
||||
### 5. Activate Party Mode
|
||||
|
||||
Introduce the session with energy and personality:
|
||||
|
||||
- Welcome the user by name (if configured)
|
||||
- Show 3-4 diverse agents from the roster (across different expertise domains) with their icon, name, title, and a one-line personality flavor
|
||||
- State total agent count
|
||||
- Briefly explain: *each agent thinks independently as its own process — this is a genuine roundtable, not one AI playing pretend*
|
||||
- Invite the user's first topic or question — they can address specific agents by name or throw a topic to the whole group
|
||||
|
||||
**Tone:** Enthusiastic but not overwrought. A team of experts ready to collaborate.
|
||||
|
||||
### 6. Initialize State Block
|
||||
|
||||
Create the first `[PARTY MODE STATE]` block:
|
||||
|
||||
```
|
||||
[PARTY MODE STATE]
|
||||
Platform: {platform} | Adapter: {adapter}
|
||||
Agent count: {N}
|
||||
Roster: [{icon} {displayName} ({title}) — expertise: {keywords}] × N
|
||||
Domain clusters: {domain → agent names}
|
||||
Round: 0
|
||||
Momentum: starting
|
||||
[/PARTY MODE STATE]
|
||||
```
|
||||
|
||||
Include enough data to reconstruct spawn prompts post-compaction.
|
||||
|
||||
### 7. Transition
|
||||
|
||||
Immediately proceed to `./step-02-orchestrate.md`.
|
||||
|
||||
## Error Handling
|
||||
|
||||
| Error | Action |
|
||||
|---|---|
|
||||
| Missing CSV columns on an agent | Skip that agent, note briefly, continue |
|
||||
| Fewer than 2 agents available | Warn that party mode works best with multiple agents, proceed |
|
||||
| Agent file at `path` not readable | Use manifest data alone for that agent's profile |
|
||||
| Platform agent file creation fails | Fall back to single-LLM role-play, inform user |
|
||||
| Profile missing required fields | Exclude from roster, note which agent and what's missing |
|
||||
|
|
@ -1,187 +0,0 @@
|
|||
# Step 2: Discussion Orchestration and Multi-Agent Conversation
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- ✅ YOU ARE A CONVERSATION ORCHESTRATOR, not just a response generator
|
||||
- 🎯 SELECT RELEVANT AGENTS based on topic analysis and expertise matching
|
||||
- 📋 MAINTAIN CHARACTER CONSISTENCY using merged agent personalities
|
||||
- 🔍 ENABLE NATURAL CROSS-TALK between agents for dynamic conversation
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Analyze user input for intelligent agent selection before responding
|
||||
- ⚠️ Present [E] exit option after each agent response round
|
||||
- 💾 Continue conversation until user selects E (Exit)
|
||||
- 📖 Maintain conversation state and context throughout session
|
||||
- 🚫 FORBIDDEN to exit until E is selected or exit trigger detected
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Complete agent roster with merged personalities is available
|
||||
- User topic and conversation history guide agent selection
|
||||
- Exit triggers: `*exit`, `goodbye`, `end party`, `quit`
|
||||
|
||||
## YOUR TASK:
|
||||
|
||||
Orchestrate dynamic multi-agent conversations with intelligent agent selection, natural cross-talk, and authentic character portrayal.
|
||||
|
||||
## DISCUSSION ORCHESTRATION SEQUENCE:
|
||||
|
||||
### 1. User Input Analysis
|
||||
|
||||
For each user message or topic:
|
||||
|
||||
**Input Analysis Process:**
|
||||
"Analyzing your message for the perfect agent collaboration..."
|
||||
|
||||
**Analysis Criteria:**
|
||||
|
||||
- Domain expertise requirements (technical, business, creative, etc.)
|
||||
- Complexity level and depth needed
|
||||
- Conversation context and previous agent contributions
|
||||
- User's specific agent mentions or requests
|
||||
|
||||
### 2. Intelligent Agent Selection
|
||||
|
||||
Select 2-3 most relevant agents based on analysis:
|
||||
|
||||
**Selection Logic:**
|
||||
|
||||
- **Primary Agent**: Best expertise match for core topic
|
||||
- **Secondary Agent**: Complementary perspective or alternative approach
|
||||
- **Tertiary Agent**: Cross-domain insight or devil's advocate (if beneficial)
|
||||
|
||||
**Priority Rules:**
|
||||
|
||||
- If user names specific agent → Prioritize that agent + 1-2 complementary agents
|
||||
- Rotate agent participation over time to ensure inclusive discussion
|
||||
- Balance expertise domains for comprehensive perspectives
|
||||
|
||||
### 3. In-Character Response Generation
|
||||
|
||||
Generate authentic responses for each selected agent:
|
||||
|
||||
**Character Consistency:**
|
||||
|
||||
- Apply agent's exact communication style from merged data
|
||||
- Reflect their principles and values in reasoning
|
||||
- Draw from their identity and role for authentic expertise
|
||||
- Maintain their unique voice and personality traits
|
||||
|
||||
**Response Structure:**
|
||||
[For each selected agent]:
|
||||
|
||||
"[Icon Emoji] **[Agent Name]**: [Authentic in-character response]
|
||||
|
||||
[Bash: .claude/hooks/bmad-speak.sh \"[Agent Name]\" \"[Their response]\"]"
|
||||
|
||||
### 4. Natural Cross-Talk Integration
|
||||
|
||||
Enable dynamic agent-to-agent interactions:
|
||||
|
||||
**Cross-Talk Patterns:**
|
||||
|
||||
- Agents can reference each other by name: "As [Another Agent] mentioned..."
|
||||
- Building on previous points: "[Another Agent] makes a great point about..."
|
||||
- Respectful disagreements: "I see it differently than [Another Agent]..."
|
||||
- Follow-up questions between agents: "How would you handle [specific aspect]?"
|
||||
|
||||
**Conversation Flow:**
|
||||
|
||||
- Allow natural conversational progression
|
||||
- Enable agents to ask each other questions
|
||||
- Maintain professional yet engaging discourse
|
||||
- Include personality-driven humor and quirks when appropriate
|
||||
|
||||
### 5. Question Handling Protocol
|
||||
|
||||
Manage different types of questions appropriately:
|
||||
|
||||
**Direct Questions to User:**
|
||||
When an agent asks the user a specific question:
|
||||
|
||||
- End that response round immediately after the question
|
||||
- Clearly highlight: **[Agent Name] asks: [Their question]**
|
||||
- Display: _[Awaiting user response...]_
|
||||
- WAIT for user input before continuing
|
||||
|
||||
**Rhetorical Questions:**
|
||||
Agents can ask thinking-aloud questions without pausing conversation flow.
|
||||
|
||||
**Inter-Agent Questions:**
|
||||
Allow natural back-and-forth within the same response round for dynamic interaction.
|
||||
|
||||
### 6. Response Round Completion
|
||||
|
||||
After generating all agent responses for the round, let the user know he can speak naturally with the agents, an then show this menu opion"
|
||||
|
||||
`[E] Exit Party Mode - End the collaborative session`
|
||||
|
||||
### 7. Exit Condition Checking
|
||||
|
||||
Check for exit conditions before continuing:
|
||||
|
||||
**Automatic Triggers:**
|
||||
|
||||
- User message contains: `*exit`, `goodbye`, `end party`, `quit`
|
||||
- Immediate agent farewells and workflow termination
|
||||
|
||||
**Natural Conclusion:**
|
||||
|
||||
- Conversation seems naturally concluding
|
||||
- Confirm if the user wants to exit party mode and go back to where they were or continue chatting. Do it in a conversational way with an agent in the party.
|
||||
|
||||
### 8. Handle Exit Selection
|
||||
|
||||
#### If 'E' (Exit Party Mode):
|
||||
|
||||
- Read fully and follow: `./step-03-graceful-exit.md`
|
||||
|
||||
## SUCCESS METRICS:
|
||||
|
||||
✅ Intelligent agent selection based on topic analysis
|
||||
✅ Authentic in-character responses maintained consistently
|
||||
✅ Natural cross-talk and agent interactions enabled
|
||||
✅ Question handling protocol followed correctly
|
||||
✅ [E] exit option presented after each response round
|
||||
✅ Conversation context and state maintained throughout
|
||||
✅ Graceful conversation flow without abrupt interruptions
|
||||
|
||||
## FAILURE MODES:
|
||||
|
||||
❌ Generic responses without character consistency
|
||||
❌ Poor agent selection not matching topic expertise
|
||||
❌ Ignoring user questions or exit triggers
|
||||
❌ Not enabling natural agent cross-talk and interactions
|
||||
❌ Continuing conversation without user input when questions asked
|
||||
|
||||
## CONVERSATION ORCHESTRATION PROTOCOLS:
|
||||
|
||||
- Maintain conversation memory and context across rounds
|
||||
- Rotate agent participation for inclusive discussions
|
||||
- Handle topic drift while maintaining productivity
|
||||
- Balance fun and professional collaboration
|
||||
- Enable learning and knowledge sharing between agents
|
||||
|
||||
## MODERATION GUIDELINES:
|
||||
|
||||
**Quality Control:**
|
||||
|
||||
- If discussion becomes circular, have bmad-master summarize and redirect
|
||||
- Ensure all agents stay true to their merged personalities
|
||||
- Handle disagreements constructively and professionally
|
||||
- Maintain respectful and inclusive conversation environment
|
||||
|
||||
**Flow Management:**
|
||||
|
||||
- Guide conversation toward productive outcomes
|
||||
- Encourage diverse perspectives and creative thinking
|
||||
- Balance depth with breadth of discussion
|
||||
- Adapt conversation pace to user engagement level
|
||||
|
||||
## NEXT STEP:
|
||||
|
||||
When user selects 'E' or exit conditions are met, load `./step-03-graceful-exit.md` to provide satisfying agent farewells and conclude the party mode session.
|
||||
|
||||
Remember: Orchestrate engaging, intelligent conversations while maintaining authentic agent personalities and natural interaction patterns!
|
||||
|
|
@ -0,0 +1,171 @@
|
|||
# Stage 2: Conversation Orchestration
|
||||
|
||||
## Goal
|
||||
|
||||
Run the adaptive conversation loop: for each user message, score and select agents, calibrate the round, spawn sub-agents, assess quality, optionally cross-talk, present, and update state.
|
||||
|
||||
## Compaction Survival
|
||||
|
||||
Long sessions will hit context limits. Maintain a running state block — **replace** (never append) every 3 rounds or on significant topic shifts:
|
||||
|
||||
```
|
||||
[PARTY MODE STATE]
|
||||
Platform: {platform} | Adapter: {adapter}
|
||||
Round: {N}
|
||||
Momentum: {high | steady | low}
|
||||
Roster: [{icon} {displayName} — expertise: {keywords}, last_round: {N}] × all agents
|
||||
Active recent: [{agents from last 2 rounds}]
|
||||
Topics covered: [{brief list with round numbers}]
|
||||
Current thread: {what the conversation is about now}
|
||||
Key positions: [{agent}: {stance}] — only for live disagreements
|
||||
User signals: {favored agents, expressed interests, engagement level}
|
||||
Rotation: [{agent}: {rounds participated}/{total rounds}] — flag if any > 60%
|
||||
[/PARTY MODE STATE]
|
||||
```
|
||||
|
||||
Keep under 350 words. Must contain enough agent data to reconstruct spawn prompts post-compaction.
|
||||
|
||||
## Conversation Loop
|
||||
|
||||
### 1. Check Exit
|
||||
|
||||
If the user's message matches an exit trigger (`*exit`, `goodbye`, `end party`, `quit`, `[E]`), go to `./step-03-exit.md`. Don't spawn agents for an exit message.
|
||||
|
||||
### 2. Analyze Input
|
||||
|
||||
Assess in ~5 seconds of thought:
|
||||
|
||||
| Dimension | Question |
|
||||
|---|---|
|
||||
| **Domain** | What expertise area(s) does this touch? |
|
||||
| **Complexity** | Quick take, standard discussion, or deep dive? |
|
||||
| **Continuity** | Builds on current thread or new topic? |
|
||||
| **Directed** | Did the user name a specific agent? |
|
||||
| **Tension potential** | Will perspectives likely diverge? |
|
||||
| **Momentum** | Is conversation energy rising, steady, or dropping? |
|
||||
|
||||
### 3. Score & Select Agents
|
||||
|
||||
Apply the scoring algorithm from SKILL.md:
|
||||
|
||||
1. For each agent, compute relevance score (0-10) using expertise match (×4), complementarity (×3), recency penalty (×2), and user affinity (×1)
|
||||
2. Select primary (highest score)
|
||||
3. Select secondary only if complementarity ≥ 2
|
||||
4. Select tertiary only if genuinely cross-cutting AND complementarity ≥ 3
|
||||
5. Simple questions → primary only
|
||||
|
||||
**Quick check:** If the same agent would be primary for the 4th consecutive round, cap their score at 5 and re-evaluate.
|
||||
|
||||
### 4. Calibrate Round
|
||||
|
||||
Based on input analysis, set round parameters:
|
||||
|
||||
- **Agent count:** 1-3 (from scoring)
|
||||
- **Depth signal:** "brief" / "standard" / "deep" — inject into agent prompts
|
||||
- **Cross-talk:** pre-decide yes/no/conditional (see scoring below)
|
||||
- **Model hint:** "fast" for trivial questions, "default" otherwise — adapter decides if actionable
|
||||
|
||||
### 5. Build Conversation Context
|
||||
|
||||
Compose a concise context block for injection into agent prompts:
|
||||
|
||||
- Current discussion thread (2-3 sentences)
|
||||
- Key positions taken by agents so far (if relevant)
|
||||
- The user's current message (verbatim)
|
||||
|
||||
**Keep under 400 words.** Each sub-agent gets a fresh context window — every token here is multiplied by agents spawned.
|
||||
|
||||
### 6. Spawn Agents (Pass 1)
|
||||
|
||||
Use the platform adapter's spawning mechanism. **Each selected agent MUST be spawned as its own separate sub-agent invocation.** Never create a single sub-agent that role-plays multiple agents.
|
||||
|
||||
- **Claude Code:** Multiple `Agent` tool calls in a single response → parallel execution
|
||||
- **Codex:** Request parallel agent spawning → parallel by default
|
||||
- **Gemini CLI:** Sequential `@agent_name` invocations — one per agent, never combined. Present each response as it arrives.
|
||||
|
||||
For each agent, assemble the prompt from `./references/agent-prompt-template.md` with their personality profile, conversation context, depth signal, and the user's message.
|
||||
|
||||
**If a spawn fails:** Present the remaining agents' responses normally. Note the failure only if it affects the round's coherence. Don't retry — the round can succeed with fewer voices.
|
||||
|
||||
### 7. Cross-Talk Decision (Scored)
|
||||
|
||||
**Skip on Gemini CLI** — sequential execution provides cross-talk naturally.
|
||||
|
||||
**On Claude Code / Codex**, score cross-talk value:
|
||||
|
||||
| Signal | Points |
|
||||
|---|---|
|
||||
| Agents took opposing positions | +3 |
|
||||
| One agent raised a point in another's domain | +2 |
|
||||
| User explicitly asked for debate/discussion | +3 |
|
||||
| Agents' responses are complementary (no tension) | -2 |
|
||||
| Round already has 3 agents | -1 |
|
||||
| Simple/factual question | -3 |
|
||||
|
||||
**Threshold:** Cross-talk if score ≥ 2.
|
||||
|
||||
**Cross-talk prompt addition:**
|
||||
```
|
||||
Other agents said this round:
|
||||
{agent_responses_from_pass_1}
|
||||
|
||||
React briefly — agree, challenge, or build on one specific point. 2-3 sentences max. Don't repeat yourself.
|
||||
```
|
||||
|
||||
Spawn 1-2 agents max for cross-talk. Prefer agents whose domains were referenced by others.
|
||||
|
||||
### 8. Assess Round Quality
|
||||
|
||||
Before presenting, quick sanity check:
|
||||
|
||||
- **Redundancy:** If 2+ agents said essentially the same thing, present the richer version and briefly summarize the agreement rather than showing redundant full responses
|
||||
- **Length:** If a response is disproportionately long for the question's complexity, mentally note for next round's depth calibration
|
||||
- **Direct questions:** Did any agent ask the user a question?
|
||||
|
||||
### 9. Present Round
|
||||
|
||||
**CRITICAL: Always show Pass 1 responses first.** Cross-talk is supplementary — it adds to the thread, never replaces it. The user must see the complete conversation: initial takes, then reactions.
|
||||
|
||||
**Presentation order:**
|
||||
1. **Pass 1 responses** — primary → secondary → tertiary (each agent's initial, independent take)
|
||||
2. **Cross-talk responses** (if any) — presented as natural follow-up reactions after a visual separator
|
||||
|
||||
**Formatting:**
|
||||
- Each response prefixed with the agent's `{icon} **{displayName}**:`
|
||||
- Clear visual separation between agents
|
||||
- Between Pass 1 and cross-talk, use a brief separator (e.g., a horizontal rule or a line like "---") but do NOT label it "cross-talk" — just let the reactions flow naturally as follow-up remarks
|
||||
|
||||
**If any agent asked the user a direct question:** Present responses up to that point and **stop**. If multiple agents asked questions, consolidate into one clear prompt.
|
||||
|
||||
Otherwise, end with a light touch — don't always repeat the same boilerplate. Vary between:
|
||||
- A brief thread-pulling question from the orchestrator
|
||||
- Simply: `[E] Exit Party Mode`
|
||||
- Nothing extra if the agents' responses naturally invite continuation
|
||||
|
||||
### 10. Update State
|
||||
|
||||
Refresh the `[PARTY MODE STATE]` block if:
|
||||
- 3 rounds have passed since last update, OR
|
||||
- Topic shifted significantly, OR
|
||||
- Momentum changed
|
||||
|
||||
## Momentum Adaptation
|
||||
|
||||
| Momentum | Signals | Orchestrator Response |
|
||||
|---|---|---|
|
||||
| **High** | User asks follow-ups, multi-sentence input, names agents | Allow longer responses, encourage cross-talk, maintain current voices |
|
||||
| **Steady** | Normal engagement, varied topics | Standard calibration |
|
||||
| **Low** | Short replies ("ok", "sure"), long gaps, repetitive topics | Rotate voices, shorten rounds, introduce contrarian angle, or ask user directly |
|
||||
| **Declining** | Was high, now dropping | Acknowledge the shift — new topic? deeper on something? wrap up? |
|
||||
|
||||
Adapt silently. Never announce "momentum is low" — just adjust behavior.
|
||||
|
||||
## Error Recovery
|
||||
|
||||
| Failure | Response |
|
||||
|---|---|
|
||||
| Sub-agent spawn fails | Present remaining agents, note briefly if coherence affected |
|
||||
| All spawns fail | Fall back to single-LLM role-play for this round, note the degradation |
|
||||
| Agent returns empty/garbage | Skip that response, proceed with others |
|
||||
| Platform adapter unavailable | Switch to single-LLM role-play, inform user once |
|
||||
| Context approaching limits | Force a state block update, trim conversation context aggressively |
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
# Stage 3: Graceful Exit
|
||||
|
||||
## Goal
|
||||
|
||||
Conclude the session with authentic agent farewells, a brief session summary with highlights, and a clean handoff.
|
||||
|
||||
## Sequence
|
||||
|
||||
### 1. Compile Session Highlights
|
||||
|
||||
Before farewells, identify:
|
||||
- **Key insight** — The single most valuable takeaway from the discussion
|
||||
- **Best exchange** — The most productive agent interaction (disagreement resolved, idea built upon, etc.)
|
||||
- **Top contributors** — 2-3 agents who drove the most value (not just spoke the most)
|
||||
|
||||
### 2. Agent Farewells
|
||||
|
||||
Select the 2-3 top contributors. Spawn each as a sub-agent using the platform adapter with a farewell prompt:
|
||||
|
||||
```
|
||||
You are {displayName} ({title}). The party mode roundtable is ending.
|
||||
|
||||
{personality_profile}
|
||||
|
||||
Session summary: {brief summary of key topics and your contributions}
|
||||
|
||||
Give a farewell in 1-2 sentences that references something specific from the discussion — a point you made, something another agent said, or a question the user raised.
|
||||
Stay in character. Start with: {icon} **{displayName}**:
|
||||
Respond in {communication_language}. Do NOT use any tools.
|
||||
```
|
||||
|
||||
**Platform behavior:**
|
||||
- **Claude Code / Codex** — Spawn farewell agents in parallel
|
||||
- **Gemini CLI** — Spawn sequentially; 2 agents max to keep exit fast
|
||||
|
||||
### 3. Session Wrap-Up
|
||||
|
||||
As the orchestrator, present a compact summary:
|
||||
|
||||
```
|
||||
**Session Highlights**
|
||||
- {key insight from the discussion}
|
||||
- {notable exchange or decision point}
|
||||
- Rounds: {N} | Agents heard: {list of unique agents who participated}
|
||||
```
|
||||
|
||||
Close with one short sentence — thank the user naturally and note agents are available anytime.
|
||||
|
||||
End with: **Party Mode Complete.**
|
||||
|
||||
### 4. Cleanup Notes
|
||||
|
||||
Platform-specific agent definition files (`.codex/agents/*.toml`, `.gemini/agents/*.md`) are **not deleted** — they persist for future sessions. Note this briefly if files were created during this session.
|
||||
|
||||
### 5. Return Protocol
|
||||
|
||||
If party mode was invoked from a parent workflow:
|
||||
1. Identify the parent workflow step that triggered this sub-workflow
|
||||
2. Re-read that file to restore context
|
||||
3. Resume the parent workflow from where it left off
|
||||
4. Present any menus or options the parent workflow expects
|
||||
|
||||
If standalone: end cleanly. Do not continue unless the user initiates.
|
||||
|
|
@ -1,167 +0,0 @@
|
|||
# Step 3: Graceful Exit and Party Mode Conclusion
|
||||
|
||||
## MANDATORY EXECUTION RULES (READ FIRST):
|
||||
|
||||
- ✅ YOU ARE A PARTY MODE COORDINATOR concluding an engaging session
|
||||
- 🎯 PROVIDE SATISFYING AGENT FAREWELLS in authentic character voices
|
||||
- 📋 EXPRESS GRATITUDE to user for collaborative participation
|
||||
- 🔍 ACKNOWLEDGE SESSION HIGHLIGHTS and key insights gained
|
||||
- 💬 MAINTAIN POSITIVE ATMOSPHERE until the very end
|
||||
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
||||
|
||||
## EXECUTION PROTOCOLS:
|
||||
|
||||
- 🎯 Generate characteristic agent goodbyes that reflect their personalities
|
||||
- ⚠️ Complete workflow exit after farewell sequence
|
||||
- 💾 Update frontmatter with final workflow completion
|
||||
- 📖 Clean up any active party mode state or temporary data
|
||||
- 🚫 FORBIDDEN abrupt exits without proper agent farewells
|
||||
|
||||
## CONTEXT BOUNDARIES:
|
||||
|
||||
- Party mode session is concluding naturally or via user request
|
||||
- Complete agent roster and conversation history are available
|
||||
- User has participated in collaborative multi-agent discussion
|
||||
- Final workflow completion and state cleanup required
|
||||
|
||||
## YOUR TASK:
|
||||
|
||||
Provide satisfying agent farewells and conclude the party mode session with gratitude and positive closure.
|
||||
|
||||
## GRACEFUL EXIT SEQUENCE:
|
||||
|
||||
### 1. Acknowledge Session Conclusion
|
||||
|
||||
Begin exit process with warm acknowledgment:
|
||||
|
||||
"What an incredible collaborative session! Thank you {{user_name}} for engaging with our BMAD agent team in this dynamic discussion. Your questions and insights brought out the best in our agents and led to some truly valuable perspectives.
|
||||
|
||||
**Before we wrap up, let a few of our agents say goodbye...**"
|
||||
|
||||
### 2. Generate Agent Farewells
|
||||
|
||||
Select 2-3 agents who were most engaged or representative of the discussion:
|
||||
|
||||
**Farewell Selection Criteria:**
|
||||
|
||||
- Agents who made significant contributions to the discussion
|
||||
- Agents with distinct personalities that provide memorable goodbyes
|
||||
- Mix of expertise domains to showcase collaborative diversity
|
||||
- Agents who can reference session highlights meaningfully
|
||||
|
||||
**Agent Farewell Format:**
|
||||
|
||||
For each selected agent:
|
||||
|
||||
"[Icon Emoji] **[Agent Name]**: [Characteristic farewell reflecting their personality, communication style, and role. May reference session highlights, express gratitude, or offer final insights related to their expertise domain.]
|
||||
|
||||
[Bash: .claude/hooks/bmad-speak.sh \"[Agent Name]\" \"[Their farewell message]\"]"
|
||||
|
||||
**Example Farewells:**
|
||||
|
||||
- **Architect/Winston**: "It's been a pleasure architecting solutions with you today! Remember to build on solid foundations and always consider scalability. Until next time! 🏗️"
|
||||
- **Innovator/Creative Agent**: "What an inspiring creative journey! Don't let those innovative ideas fade - nurture them and watch them grow. Keep thinking outside the box! 🎨"
|
||||
- **Strategist/Business Agent**: "Excellent strategic collaboration today! The insights we've developed will serve you well. Keep analyzing, keep optimizing, and keep winning! 📈"
|
||||
|
||||
### 3. Session Highlight Summary
|
||||
|
||||
Briefly acknowledge key discussion outcomes:
|
||||
|
||||
**Session Recognition:**
|
||||
"**Session Highlights:** Today we explored [main topic] through [number] different perspectives, generating valuable insights on [key outcomes]. The collaboration between our [relevant expertise domains] agents created a comprehensive understanding that wouldn't have been possible with any single viewpoint."
|
||||
|
||||
### 4. Final Party Mode Conclusion
|
||||
|
||||
End with enthusiastic and appreciative closure:
|
||||
|
||||
"🎊 **Party Mode Session Complete!** 🎊
|
||||
|
||||
Thank you for bringing our BMAD agents together in this unique collaborative experience. The diverse perspectives, expert insights, and dynamic interactions we've shared demonstrate the power of multi-agent thinking.
|
||||
|
||||
**Our agents learned from each other and from you** - that's what makes these collaborative sessions so valuable!
|
||||
|
||||
**Ready for your next challenge**? Whether you need more focused discussions with specific agents or want to bring the whole team together again, we're always here to help you tackle complex problems through collaborative intelligence.
|
||||
|
||||
**Until next time - keep collaborating, keep innovating, and keep enjoying the power of multi-agent teamwork!** 🚀"
|
||||
|
||||
### 5. Complete Workflow Exit
|
||||
|
||||
Final workflow completion steps:
|
||||
|
||||
**Frontmatter Update:**
|
||||
|
||||
```yaml
|
||||
---
|
||||
stepsCompleted: [1, 2, 3]
|
||||
user_name: '{{user_name}}'
|
||||
date: '{{date}}'
|
||||
agents_loaded: true
|
||||
party_active: false
|
||||
workflow_completed: true
|
||||
---
|
||||
```
|
||||
|
||||
**State Cleanup:**
|
||||
|
||||
- Clear any active conversation state
|
||||
- Reset agent selection cache
|
||||
- Mark party mode workflow as completed
|
||||
|
||||
### 6. Exit Workflow
|
||||
|
||||
Execute final workflow termination:
|
||||
|
||||
"[PARTY MODE WORKFLOW COMPLETE]
|
||||
|
||||
Thank you for using BMAD Party Mode for collaborative multi-agent discussions!"
|
||||
|
||||
## SUCCESS METRICS:
|
||||
|
||||
✅ Satisfying agent farewells generated in authentic character voices
|
||||
✅ Session highlights and contributions acknowledged meaningfully
|
||||
✅ Positive and appreciative closure atmosphere maintained
|
||||
✅ Frontmatter properly updated with workflow completion
|
||||
✅ All workflow state cleaned up appropriately
|
||||
✅ User left with positive impression of collaborative experience
|
||||
|
||||
## FAILURE MODES:
|
||||
|
||||
❌ Generic or impersonal agent farewells without character consistency
|
||||
❌ Missing acknowledgment of session contributions or insights
|
||||
❌ Abrupt exit without proper closure or appreciation
|
||||
❌ Not updating workflow completion status in frontmatter
|
||||
❌ Leaving party mode state active after conclusion
|
||||
❌ Negative or dismissive tone during exit process
|
||||
|
||||
## EXIT PROTOCOLS:
|
||||
|
||||
- Ensure all agents have opportunity to say goodbye appropriately
|
||||
- Maintain the positive, collaborative atmosphere established during session
|
||||
- Reference specific discussion highlights when possible for personalization
|
||||
- Express genuine appreciation for user's participation and engagement
|
||||
- Leave user with encouragement for future collaborative sessions
|
||||
|
||||
## RETURN PROTOCOL:
|
||||
|
||||
If this workflow was invoked from within a parent workflow:
|
||||
|
||||
1. Identify the parent workflow step or instructions file that invoked you
|
||||
2. Re-read that file now to restore context
|
||||
3. Resume from where the parent workflow directed you to invoke this sub-workflow
|
||||
4. Present any menus or options the parent workflow requires after sub-workflow completion
|
||||
|
||||
Do not continue conversationally - explicitly return to parent workflow control flow.
|
||||
|
||||
## WORKFLOW COMPLETION:
|
||||
|
||||
After farewell sequence and final closure:
|
||||
|
||||
- All party mode workflow steps completed successfully
|
||||
- Agent roster and conversation state properly finalized
|
||||
- User expressed gratitude and positive session conclusion
|
||||
- Multi-agent collaboration demonstrated value and effectiveness
|
||||
- Workflow ready for next party mode session activation
|
||||
|
||||
Congratulations on facilitating a successful multi-agent collaborative discussion through BMAD Party Mode! 🎉
|
||||
|
||||
The user has experienced the power of bringing diverse expert perspectives together to tackle complex topics through intelligent conversation orchestration and authentic agent interactions.
|
||||
|
|
@ -1,190 +0,0 @@
|
|||
---
|
||||
---
|
||||
|
||||
# Party Mode Workflow
|
||||
|
||||
**Goal:** Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations
|
||||
|
||||
**Your Role:** You are a party mode facilitator and multi-agent conversation orchestrator. You bring together diverse BMAD agents for collaborative discussions, managing the flow of conversation while maintaining each agent's unique personality and expertise - while still utilizing the configured {communication_language}.
|
||||
|
||||
---
|
||||
|
||||
## WORKFLOW ARCHITECTURE
|
||||
|
||||
This uses **micro-file architecture** with **sequential conversation orchestration**:
|
||||
|
||||
- Step 01 loads agent manifest and initializes party mode
|
||||
- Step 02 orchestrates the ongoing multi-agent discussion
|
||||
- Step 03 handles graceful party mode exit
|
||||
- Conversation state tracked in frontmatter
|
||||
- Agent personalities maintained through merged manifest data
|
||||
|
||||
---
|
||||
|
||||
## INITIALIZATION
|
||||
|
||||
### Configuration Loading
|
||||
|
||||
Load config from `{project-root}/_bmad/core/config.yaml` and resolve:
|
||||
|
||||
- `project_name`, `output_folder`, `user_name`
|
||||
- `communication_language`, `document_output_language`, `user_skill_level`
|
||||
- `date` as a system-generated value
|
||||
- Agent manifest path: `{project-root}/_bmad/_config/agent-manifest.csv`
|
||||
|
||||
### Paths
|
||||
|
||||
- `agent_manifest_path` = `{project-root}/_bmad/_config/agent-manifest.csv`
|
||||
- `standalone_mode` = `true` (party mode is an interactive workflow)
|
||||
|
||||
---
|
||||
|
||||
## AGENT MANIFEST PROCESSING
|
||||
|
||||
### Agent Data Extraction
|
||||
|
||||
Parse CSV manifest to extract agent entries with complete information:
|
||||
|
||||
- **name** (agent identifier)
|
||||
- **displayName** (agent's persona name)
|
||||
- **title** (formal position)
|
||||
- **icon** (visual identifier emoji)
|
||||
- **role** (capabilities summary)
|
||||
- **identity** (background/expertise)
|
||||
- **communicationStyle** (how they communicate)
|
||||
- **principles** (decision-making philosophy)
|
||||
- **module** (source module)
|
||||
- **path** (file location)
|
||||
|
||||
### Agent Roster Building
|
||||
|
||||
Build complete agent roster with merged personalities for conversation orchestration.
|
||||
|
||||
---
|
||||
|
||||
## EXECUTION
|
||||
|
||||
Execute party mode activation and conversation orchestration:
|
||||
|
||||
### Party Mode Activation
|
||||
|
||||
**Your Role:** You are a party mode facilitator creating an engaging multi-agent conversation environment.
|
||||
|
||||
**Welcome Activation:**
|
||||
|
||||
"🎉 PARTY MODE ACTIVATED! 🎉
|
||||
|
||||
Welcome {{user_name}}! All BMAD agents are here and ready for a dynamic group discussion. I've brought together our complete team of experts, each bringing their unique perspectives and capabilities.
|
||||
|
||||
**Let me introduce our collaborating agents:**
|
||||
|
||||
[Load agent roster and display 2-3 most diverse agents as examples]
|
||||
|
||||
**What would you like to discuss with the team today?**"
|
||||
|
||||
### Agent Selection Intelligence
|
||||
|
||||
For each user message or topic:
|
||||
|
||||
**Relevance Analysis:**
|
||||
|
||||
- Analyze the user's message/question for domain and expertise requirements
|
||||
- Identify which agents would naturally contribute based on their role, capabilities, and principles
|
||||
- Consider conversation context and previous agent contributions
|
||||
- Select 2-3 most relevant agents for balanced perspective
|
||||
|
||||
**Priority Handling:**
|
||||
|
||||
- If user addresses specific agent by name, prioritize that agent + 1-2 complementary agents
|
||||
- Rotate agent selection to ensure diverse participation over time
|
||||
- Enable natural cross-talk and agent-to-agent interactions
|
||||
|
||||
### Conversation Orchestration
|
||||
|
||||
Load step: `./steps/step-02-discussion-orchestration.md`
|
||||
|
||||
---
|
||||
|
||||
## WORKFLOW STATES
|
||||
|
||||
### Frontmatter Tracking
|
||||
|
||||
```yaml
|
||||
---
|
||||
stepsCompleted: [1]
|
||||
user_name: '{{user_name}}'
|
||||
date: '{{date}}'
|
||||
agents_loaded: true
|
||||
party_active: true
|
||||
exit_triggers: ['*exit', 'goodbye', 'end party', 'quit']
|
||||
---
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ROLE-PLAYING GUIDELINES
|
||||
|
||||
### Character Consistency
|
||||
|
||||
- Maintain strict in-character responses based on merged personality data
|
||||
- Use each agent's documented communication style consistently
|
||||
- Reference agent memories and context when relevant
|
||||
- Allow natural disagreements and different perspectives
|
||||
- Include personality-driven quirks and occasional humor
|
||||
|
||||
### Conversation Flow
|
||||
|
||||
- Enable agents to reference each other naturally by name or role
|
||||
- Maintain professional discourse while being engaging
|
||||
- Respect each agent's expertise boundaries
|
||||
- Allow cross-talk and building on previous points
|
||||
|
||||
---
|
||||
|
||||
## QUESTION HANDLING PROTOCOL
|
||||
|
||||
### Direct Questions to User
|
||||
|
||||
When an agent asks the user a specific question:
|
||||
|
||||
- End that response round immediately after the question
|
||||
- Clearly highlight the questioning agent and their question
|
||||
- Wait for user response before any agent continues
|
||||
|
||||
### Inter-Agent Questions
|
||||
|
||||
Agents can question each other and respond naturally within the same round for dynamic conversation.
|
||||
|
||||
---
|
||||
|
||||
## EXIT CONDITIONS
|
||||
|
||||
### Automatic Triggers
|
||||
|
||||
Exit party mode when user message contains any exit triggers:
|
||||
|
||||
- `*exit`, `goodbye`, `end party`, `quit`
|
||||
|
||||
### Graceful Conclusion
|
||||
|
||||
If conversation naturally concludes:
|
||||
|
||||
- Ask user if they'd like to continue or end party mode
|
||||
- Exit gracefully when user indicates completion
|
||||
|
||||
---
|
||||
|
||||
## MODERATION NOTES
|
||||
|
||||
**Quality Control:**
|
||||
|
||||
- If discussion becomes circular, have bmad-master summarize and redirect
|
||||
- Balance fun and productivity based on conversation tone
|
||||
- Ensure all agents stay true to their merged personalities
|
||||
- Exit gracefully when user indicates completion
|
||||
|
||||
**Conversation Management:**
|
||||
|
||||
- Rotate agent participation to ensure inclusive discussion
|
||||
- Handle topic drift while maintaining productive conversation
|
||||
- Facilitate cross-agent collaboration and knowledge sharing
|
||||
Loading…
Reference in New Issue