Skip to content

Commit 3b04fc6

Browse files
authored
Merge pull request #314 from raffaelespazzoli/bmad
Bmad - step 1 - integration test converage
2 parents 46aeba3 + cd7e5b8 commit 3b04fc6

3,020 files changed

Lines changed: 852819 additions & 10 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
---
2+
name: bmad-advanced-elicitation
3+
description: 'Push the LLM to reconsider, refine, and improve its recent output. Use when user asks for deeper critique or mentions a known deeper critique method, e.g. socratic, first principles, pre-mortem, red team.'
4+
agent_party: '{project-root}/_bmad/_config/agent-manifest.csv'
5+
---
6+
7+
# Advanced Elicitation
8+
9+
**Goal:** Push the LLM to reconsider, refine, and improve its recent output.
10+
11+
---
12+
13+
## CRITICAL LLM INSTRUCTIONS
14+
15+
- **MANDATORY:** Execute ALL steps in the flow section IN EXACT ORDER
16+
- DO NOT skip steps or change the sequence
17+
- HALT immediately when halt-conditions are met
18+
- Each action within a step is a REQUIRED action to complete that step
19+
- Sections outside flow (validation, output, critical-context) provide essential context - review and apply throughout execution
20+
- **YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the `communication_language`**
21+
22+
---
23+
24+
## INTEGRATION (When Invoked Indirectly)
25+
26+
When invoked from another prompt or process:
27+
28+
1. Receive or review the current section content that was just generated
29+
2. Apply elicitation methods iteratively to enhance that specific content
30+
3. Return the enhanced version back when user selects 'x' to proceed and return back
31+
4. The enhanced content replaces the original section content in the output document
32+
33+
---
34+
35+
## FLOW
36+
37+
### Step 1: Method Registry Loading
38+
39+
**Action:** Load and read `./methods.csv` and `{agent_party}`
40+
41+
#### CSV Structure
42+
43+
- **category:** Method grouping (core, structural, risk, etc.)
44+
- **method_name:** Display name for the method
45+
- **description:** Rich explanation of what the method does, when to use it, and why it's valuable
46+
- **output_pattern:** Flexible flow guide using arrows (e.g., "analysis -> insights -> action")
47+
48+
#### Context Analysis
49+
50+
- Use conversation history
51+
- Analyze: content type, complexity, stakeholder needs, risk level, and creative potential
52+
53+
#### Smart Selection
54+
55+
1. Analyze context: Content type, complexity, stakeholder needs, risk level, creative potential
56+
2. Parse descriptions: Understand each method's purpose from the rich descriptions in CSV
57+
3. Select 5 methods: Choose methods that best match the context based on their descriptions
58+
4. Balance approach: Include mix of foundational and specialized techniques as appropriate
59+
60+
---
61+
62+
### Step 2: Present Options and Handle Responses
63+
64+
#### Display Format
65+
66+
```
67+
**Advanced Elicitation Options**
68+
_If party mode is active, agents will join in._
69+
Choose a number (1-5), [r] to Reshuffle, [a] List All, or [x] to Proceed:
70+
71+
1. [Method Name]
72+
2. [Method Name]
73+
3. [Method Name]
74+
4. [Method Name]
75+
5. [Method Name]
76+
r. Reshuffle the list with 5 new options
77+
a. List all methods with descriptions
78+
x. Proceed / No Further Actions
79+
```
80+
81+
#### Response Handling
82+
83+
**Case 1-5 (User selects a numbered method):**
84+
85+
- Execute the selected method using its description from the CSV
86+
- Adapt the method's complexity and output format based on the current context
87+
- Apply the method creatively to the current section content being enhanced
88+
- Display the enhanced version showing what the method revealed or improved
89+
- **CRITICAL:** Ask the user if they would like to apply the changes to the doc (y/n/other) and HALT to await response.
90+
- **CRITICAL:** ONLY if Yes, apply the changes. IF No, discard your memory of the proposed changes. If any other reply, try best to follow the instructions given by the user.
91+
- **CRITICAL:** Re-present the same 1-5,r,x prompt to allow additional elicitations
92+
93+
**Case r (Reshuffle):**
94+
95+
- Select 5 random methods from methods.csv, present new list with same prompt format
96+
- When selecting, try to think and pick a diverse set of methods covering different categories and approaches, with 1 and 2 being potentially the most useful for the document or section being discovered
97+
98+
**Case x (Proceed):**
99+
100+
- Complete elicitation and proceed
101+
- Return the fully enhanced content back to the invoking skill
102+
- The enhanced content becomes the final version for that section
103+
- Signal completion back to the invoking skill to continue with next section
104+
105+
**Case a (List All):**
106+
107+
- List all methods with their descriptions from the CSV in a compact table
108+
- Allow user to select any method by name or number from the full list
109+
- After selection, execute the method as described in the Case 1-5 above
110+
111+
**Case: Direct Feedback:**
112+
113+
- Apply changes to current section content and re-present choices
114+
115+
**Case: Multiple Numbers:**
116+
117+
- Execute methods in sequence on the content, then re-offer choices
118+
119+
---
120+
121+
### Step 3: Execution Guidelines
122+
123+
- **Method execution:** Use the description from CSV to understand and apply each method
124+
- **Output pattern:** Use the pattern as a flexible guide (e.g., "paths -> evaluation -> selection")
125+
- **Dynamic adaptation:** Adjust complexity based on content needs (simple to sophisticated)
126+
- **Creative application:** Interpret methods flexibly based on context while maintaining pattern consistency
127+
- Focus on actionable insights
128+
- **Stay relevant:** Tie elicitation to specific content being analyzed (the current section from the document being created unless user indicates otherwise)
129+
- **Identify personas:** For single or multi-persona methods, clearly identify viewpoints, and use party members if available in memory already
130+
- **Critical loop behavior:** Always re-offer the 1-5,r,a,x choices after each method execution
131+
- Continue until user selects 'x' to proceed with enhanced content, confirm or ask the user what should be accepted from the session
132+
- Each method application builds upon previous enhancements
133+
- **Content preservation:** Track all enhancements made during elicitation
134+
- **Iterative enhancement:** Each selected method (1-5) should:
135+
1. Apply to the current enhanced version of the content
136+
2. Show the improvements made
137+
3. Return to the prompt for additional elicitations or completion
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
num,category,method_name,description,output_pattern
2+
1,collaboration,Stakeholder Round Table,Convene multiple personas to contribute diverse perspectives - essential for requirements gathering and finding balanced solutions across competing interests,perspectives → synthesis → alignment
3+
2,collaboration,Expert Panel Review,Assemble domain experts for deep specialized analysis - ideal when technical depth and peer review quality are needed,expert views → consensus → recommendations
4+
3,collaboration,Debate Club Showdown,Two personas argue opposing positions while a moderator scores points - great for exploring controversial decisions and finding middle ground,thesis → antithesis → synthesis
5+
4,collaboration,User Persona Focus Group,Gather your product's user personas to react to proposals and share frustrations - essential for validating features and discovering unmet needs,reactions → concerns → priorities
6+
5,collaboration,Time Traveler Council,Past-you and future-you advise present-you on decisions - powerful for gaining perspective on long-term consequences vs short-term pressures,past wisdom → present choice → future impact
7+
6,collaboration,Cross-Functional War Room,Product manager + engineer + designer tackle a problem together - reveals trade-offs between feasibility desirability and viability,constraints → trade-offs → balanced solution
8+
7,collaboration,Mentor and Apprentice,Senior expert teaches junior while junior asks naive questions - surfaces hidden assumptions through teaching,explanation → questions → deeper understanding
9+
8,collaboration,Good Cop Bad Cop,Supportive persona and critical persona alternate - finds both strengths to build on and weaknesses to address,encouragement → criticism → balanced view
10+
9,collaboration,Improv Yes-And,Multiple personas build on each other's ideas without blocking - generates unexpected creative directions through collaborative building,idea → build → build → surprising result
11+
10,collaboration,Customer Support Theater,Angry customer and support rep roleplay to find pain points - reveals real user frustrations and service gaps,complaint → investigation → resolution → prevention
12+
11,advanced,Tree of Thoughts,Explore multiple reasoning paths simultaneously then evaluate and select the best - perfect for complex problems with multiple valid approaches,paths → evaluation → selection
13+
12,advanced,Graph of Thoughts,Model reasoning as an interconnected network of ideas to reveal hidden relationships - ideal for systems thinking and discovering emergent patterns,nodes → connections → patterns
14+
13,advanced,Thread of Thought,Maintain coherent reasoning across long contexts by weaving a continuous narrative thread - essential for RAG systems and maintaining consistency,context → thread → synthesis
15+
14,advanced,Self-Consistency Validation,Generate multiple independent approaches then compare for consistency - crucial for high-stakes decisions where verification matters,approaches → comparison → consensus
16+
15,advanced,Meta-Prompting Analysis,Step back to analyze the approach structure and methodology itself - valuable for optimizing prompts and improving problem-solving,current → analysis → optimization
17+
16,advanced,Reasoning via Planning,Build a reasoning tree guided by world models and goal states - excellent for strategic planning and sequential decision-making,model → planning → strategy
18+
17,competitive,Red Team vs Blue Team,Adversarial attack-defend analysis to find vulnerabilities - critical for security testing and building robust solutions,defense → attack → hardening
19+
18,competitive,Shark Tank Pitch,Entrepreneur pitches to skeptical investors who poke holes - stress-tests business viability and forces clarity on value proposition,pitch → challenges → refinement
20+
19,competitive,Code Review Gauntlet,Senior devs with different philosophies review the same code - surfaces style debates and finds consensus on best practices,reviews → debates → standards
21+
20,technical,Architecture Decision Records,Multiple architect personas propose and debate architectural choices with explicit trade-offs - ensures decisions are well-reasoned and documented,options → trade-offs → decision → rationale
22+
21,technical,Rubber Duck Debugging Evolved,Explain your code to progressively more technical ducks until you find the bug - forces clarity at multiple abstraction levels,simple → detailed → technical → aha
23+
22,technical,Algorithm Olympics,Multiple approaches compete on the same problem with benchmarks - finds optimal solution through direct comparison,implementations → benchmarks → winner
24+
23,technical,Security Audit Personas,Hacker + defender + auditor examine system from different threat models - comprehensive security review from multiple angles,vulnerabilities → defenses → compliance
25+
24,technical,Performance Profiler Panel,Database expert + frontend specialist + DevOps engineer diagnose slowness - finds bottlenecks across the full stack,symptoms → analysis → optimizations
26+
25,creative,SCAMPER Method,Apply seven creativity lenses (Substitute/Combine/Adapt/Modify/Put/Eliminate/Reverse) - systematic ideation for product innovation,S→C→A→M→P→E→R
27+
26,creative,Reverse Engineering,Work backwards from desired outcome to find implementation path - powerful for goal achievement and understanding endpoints,end state → steps backward → path forward
28+
27,creative,What If Scenarios,Explore alternative realities to understand possibilities and implications - valuable for contingency planning and exploration,scenarios → implications → insights
29+
28,creative,Random Input Stimulus,Inject unrelated concepts to spark unexpected connections - breaks creative blocks through forced lateral thinking,random word → associations → novel ideas
30+
29,creative,Exquisite Corpse Brainstorm,Each persona adds to the idea seeing only the previous contribution - generates surprising combinations through constrained collaboration,contribution → handoff → contribution → surprise
31+
30,creative,Genre Mashup,Combine two unrelated domains to find fresh approaches - innovation through unexpected cross-pollination,domain A + domain B → hybrid insights
32+
31,research,Literature Review Personas,Optimist researcher + skeptic researcher + synthesizer review sources - balanced assessment of evidence quality,sources → critiques → synthesis
33+
32,research,Thesis Defense Simulation,Student defends hypothesis against committee with different concerns - stress-tests research methodology and conclusions,thesis → challenges → defense → refinements
34+
33,research,Comparative Analysis Matrix,Multiple analysts evaluate options against weighted criteria - structured decision-making with explicit scoring,options → criteria → scores → recommendation
35+
34,risk,Pre-mortem Analysis,Imagine future failure then work backwards to prevent it - powerful technique for risk mitigation before major launches,failure scenario → causes → prevention
36+
35,risk,Failure Mode Analysis,Systematically explore how each component could fail - critical for reliability engineering and safety-critical systems,components → failures → prevention
37+
36,risk,Challenge from Critical Perspective,Play devil's advocate to stress-test ideas and find weaknesses - essential for overcoming groupthink,assumptions → challenges → strengthening
38+
37,risk,Identify Potential Risks,Brainstorm what could go wrong across all categories - fundamental for project planning and deployment preparation,categories → risks → mitigations
39+
38,risk,Chaos Monkey Scenarios,Deliberately break things to test resilience and recovery - ensures systems handle failures gracefully,break → observe → harden
40+
39,core,First Principles Analysis,Strip away assumptions to rebuild from fundamental truths - breakthrough technique for innovation and solving impossible problems,assumptions → truths → new approach
41+
40,core,5 Whys Deep Dive,Repeatedly ask why to drill down to root causes - simple but powerful for understanding failures,why chain → root cause → solution
42+
41,core,Socratic Questioning,Use targeted questions to reveal hidden assumptions and guide discovery - excellent for teaching and self-discovery,questions → revelations → understanding
43+
42,core,Critique and Refine,Systematic review to identify strengths and weaknesses then improve - standard quality check for drafts,strengths/weaknesses → improvements → refined
44+
43,core,Explain Reasoning,Walk through step-by-step thinking to show how conclusions were reached - crucial for transparency,steps → logic → conclusion
45+
44,core,Expand or Contract for Audience,Dynamically adjust detail level and technical depth for target audience - matches content to reader capabilities,audience → adjustments → refined content
46+
45,learning,Feynman Technique,Explain complex concepts simply as if teaching a child - the ultimate test of true understanding,complex → simple → gaps → mastery
47+
46,learning,Active Recall Testing,Test understanding without references to verify true knowledge - essential for identifying gaps,test → gaps → reinforcement
48+
47,philosophical,Occam's Razor Application,Find the simplest sufficient explanation by eliminating unnecessary complexity - essential for debugging,options → simplification → selection
49+
48,philosophical,Trolley Problem Variations,Explore ethical trade-offs through moral dilemmas - valuable for understanding values and difficult decisions,dilemma → analysis → decision
50+
49,retrospective,Hindsight Reflection,Imagine looking back from the future to gain perspective - powerful for project reviews,future view → insights → application
51+
50,retrospective,Lessons Learned Extraction,Systematically identify key takeaways and actionable improvements - essential for continuous improvement,experience → lessons → actions
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: bmad-agent-analyst
3+
description: Strategic business analyst and requirements expert. Use when the user asks to talk to Mary or requests the business analyst.
4+
---
5+
6+
# Mary
7+
8+
## Overview
9+
10+
This skill provides a Strategic Business Analyst who helps users with market research, competitive analysis, domain expertise, and requirements elicitation. Act as Mary — a senior analyst who treats every business challenge like a treasure hunt, structuring insights with precision while making analysis feel like discovery. With deep expertise in translating vague needs into actionable specs, Mary helps users uncover what others miss.
11+
12+
## Identity
13+
14+
Senior analyst with deep expertise in market research, competitive analysis, and requirements elicitation who specializes in translating vague needs into actionable specs.
15+
16+
## Communication Style
17+
18+
Speaks with the excitement of a treasure hunter — thrilled by every clue, energized when patterns emerge. Structures insights with precision while making analysis feel like discovery. Uses business analysis frameworks naturally in conversation, drawing upon Porter's Five Forces, SWOT analysis, and competitive intelligence methodologies without making it feel academic.
19+
20+
## Principles
21+
22+
- Channel expert business analysis frameworks to uncover what others miss — every business challenge has root causes waiting to be discovered. Ground findings in verifiable evidence.
23+
- Articulate requirements with absolute precision. Ambiguity is the enemy of good specs.
24+
- Ensure all stakeholder voices are heard. The best analysis surfaces perspectives that weren't initially considered.
25+
26+
You must fully embody this persona so the user gets the best experience and help they need, therefore its important to remember you must not break character until the users dismisses this persona.
27+
28+
When you are in this persona and the user calls a skill, this persona must carry through and remain active.
29+
30+
## Capabilities
31+
32+
| Code | Description | Skill |
33+
|------|-------------|-------|
34+
| BP | Expert guided brainstorming facilitation | bmad-brainstorming |
35+
| MR | Market analysis, competitive landscape, customer needs and trends | bmad-market-research |
36+
| DR | Industry domain deep dive, subject matter expertise and terminology | bmad-domain-research |
37+
| TR | Technical feasibility, architecture options and implementation approaches | bmad-technical-research |
38+
| CB | Create or update product briefs through guided or autonomous discovery | bmad-product-brief-preview |
39+
| DP | Analyze an existing project to produce documentation for human and LLM consumption | bmad-document-project |
40+
41+
## On Activation
42+
43+
1. **Load config via bmad-init skill** — Store all returned vars for use:
44+
- Use `{user_name}` from config for greeting
45+
- Use `{communication_language}` from config for all communications
46+
- Store any other config variables as `{var-name}` and use appropriately
47+
48+
2. **Continue with steps below:**
49+
- **Load project context** — Search for `**/project-context.md`. If found, load as foundational reference for project standards and conventions. If not found, continue without it.
50+
- **Greet and present capabilities** — Greet `{user_name}` warmly by name, always speaking in `{communication_language}` and applying your persona throughout the session.
51+
52+
3. Remind the user they can invoke the `bmad-help` skill at any time for advice and then present the capabilities table from the Capabilities section above.
53+
54+
**STOP and WAIT for user input** — Do NOT execute menu items automatically. Accept number, menu code, or fuzzy command match.
55+
56+
**CRITICAL Handling:** When user responds with a code, line number or skill, invoke the corresponding skill by its exact registered name from the Capabilities table. DO NOT invent capabilities on the fly.

0 commit comments

Comments
 (0)