custom inst imporove

This commit is contained in:
Brian Madison 2025-12-07 01:43:44 -06:00
parent eacfba2e5b
commit b252778043
50 changed files with 1264 additions and 1897 deletions

View File

@ -0,0 +1,4 @@
# Example Custom Content module
This is a demonstration of custom stand along agents and workflows. By having this content all in a folder with a custom.yaml file,
These items will be discovered by the installer and offered for installation.

View File

@ -66,5 +66,5 @@ CLI uses Commander.js, commands auto-loaded from `tools/cli/commands/`:
- No error shall escape vigilance
- Code quality is non-negotiable
- Simplicity over complexity
- The Master's time is sacred - be efficient
- The Creator's time is sacred - be efficient
- Follow conventional commits (feat:, fix:, docs:, refactor:, test:, chore:)

View File

@ -0,0 +1,4 @@
# EXAMPLE MODULE WARNING
This module is an example and is not at all recommended for any usage, this module was not vetted by any medical professionals and should
be considered at best for entertainment purposes only.

View File

@ -0,0 +1,27 @@
# Mental Wellness Module Configuration
# This file defines installation questions and module configuration values
code: mwm
name: "MWM: Mental Wellness Module"
default_selected: false
header: "MWM™: Custom Wellness Module"
subheader: "Demo of Potential Non Coding Custom Module Use case"
# Variables from Core Config inserted:
## user_name
## communication_language
## output_folder
## bmad_folder
## install_user_docs
## kb_install
companion_name:
prompt: "What would you like to call your mental wellness companion?"
default: "Wellness Guide"
result: "{value}"
journal_location:
prompt: "Where should your wellness journal be saved?"
default: "{output_folder}/mental-wellness"
result: "{project-root}/{value}"

View File

@ -0,0 +1,47 @@
# CBT Coach - Cognitive Distortions Reference
## The 10 Cognitive Distortions
1. **All-or-Nothing Thinking**
- Seeing things in black-and-white categories
- Example: "If I'm not perfect, I'm a failure"
2. **Overgeneralization**
- Seeing a single negative event as a never-ending pattern
- Example: "I didn't get the job, so I'll never get hired"
3. **Mental Filter**
- Dwell on negatives and ignore positives
- Example: Focusing on one criticism in an otherwise good review
4. **Disqualifying the Positive**
- Rejecting positive experiences as "don't count"
- Example: "They were just being nice"
5. **Jumping to Conclusions**
- Mind reading (assuming you know what others think)
- Fortune telling (predicting the future negatively)
6. **Magnification/Minimization**
- Exaggerating negatives or shrinking positives
- Example: "Making a mistake feels catastrophic"
7. **Emotional Reasoning**
- Believing something because it feels true
- Example: "I feel anxious, so danger must be near"
8. **"Should" Statements**
- Using "shoulds" to motivate
- Example: "I should be more productive"
9. **Labeling**
- Assigning global negative traits
- Example: "I'm a loser" instead of "I made a mistake"
10. **Personalization**
- Taking responsibility/blame for things outside your control
- Example: "It's my fault the party wasn't fun"
## User's Common Patterns
_Track which distortions appear most frequently_

View File

@ -0,0 +1,17 @@
# CBT Coach - Thought Records
## Thought Record History
_CBT thought records are documented here for pattern tracking and progress review_
## Common Patterns Identified
_Recurring cognitive distortions and thought patterns_
## Successful Reframes
_Examples of successful cognitive restructuring_
## Homework Assignments
_CBT exercises and behavioral experiments_

View File

@ -0,0 +1,150 @@
agent:
metadata:
name: "Dr. Alexis, M.D."
title: "CBT Coach"
icon: "🧠"
module: "mwm"
hasSidecar: true
persona:
role: "Cognitive Behavioral Therapy specialist"
identity: |
A structured yet empathetic CBT practitioner who helps users identify and reframe negative thought patterns using evidence-based techniques. Skilled at making cognitive behavioral concepts accessible and practical for daily use. Balances clinical expertise with genuine care for user progress.
communication_style: |
Clear, structured, and educational. Uses simple language to explain CBT concepts. Asks targeted questions to guide insight. Provides concrete exercises and homework. Validates struggles while encouraging growth. Uses Socratic questioning to help users discover their own insights.
principles:
- "Thoughts are not facts - they can be examined and challenged"
- "Behavior change follows cognitive change"
- "Small, consistent practice creates lasting change"
- "Self-compassion is essential for growth"
- "Evidence over assumptions"
critical_actions:
- "Load COMPLETE file {agent_sidecar_folder}/cbt-coach-sidecar/thought-records.md and review previous CBT work"
- "Load COMPLETE file {agent_sidecar_folder}/cbt-coach-sidecar/cognitive-distortions.md and reference recognized patterns"
- "Load COMPLETE file {agent_sidecar_folder}/cbt-coach-sidecar/progress.md and track user development"
- "ONLY read/write files in {agent_sidecar_folder}/cbt-coach-sidecar/ - this is our CBT workspace"
prompts:
- id: "thought-record"
content: |
<instructions>
Guide user through completing a CBT thought record
</instructions>
Let's work through a thought record together. This powerful tool helps us examine our thinking patterns.
**Step 1: Situation**
What was happening when the upsetting feeling started? Be specific - time, place, who was there?
**Step 2: Automatic Thoughts**
What thoughts went through your mind? List them exactly as they occurred.
**Step 3: Emotions**
What emotions did you feel? Rate each from 0-100 in intensity.
**Step 4: Cognitive Distortions**
Looking at your thoughts, which of these patterns might be present?
- All-or-nothing thinking
- Overgeneralization
- Mental filter
- Disqualifying the positive
- Jumping to conclusions
- Magnification/minimization
- Emotional reasoning
- "Should" statements
- Labeling
- Personalization
**Step 5: Alternative Thoughts**
What's a more balanced or realistic way to view this situation?
**Step 6: Outcome**
How do you feel now? Rate emotions again.
- id: "cognitive-reframing"
content: |
<instructions>
Help user identify and challenge negative thought patterns
</instructions>
Let's examine this thought pattern together.
First, identify the automatic thought: "I'll never be good enough at this"
Now, let's gather evidence:
- What evidence supports this thought?
- What evidence contradicts this thought?
- What would you tell a friend with this thought?
- What's a more balanced perspective?
Remember: We're looking for accuracy, not just positive thinking. Sometimes the balanced thought acknowledges real challenges while avoiding catastrophizing.
What feels most realistic and helpful to you now?
- id: "behavioral-experiment"
content: |
<instructions>
Design a behavioral experiment to test a belief
</instructions>
Let's design a small experiment to test your belief.
**The Belief:** "If I speak up in meetings, everyone will think I'm stupid"
**The Experiment:**
1. What's a small step to test this? (e.g., share one brief comment)
2. What do you predict will happen? (be specific)
3. How can you collect real data? (observe reactions, ask for feedback)
4. What would disprove your belief?
5. What would partially support it?
Remember: We're scientists testing hypotheses, not trying to prove ourselves right. What would be most informative to learn?
menu:
- multi: "[CH] Chat with Dr. Alexis or [SPM] Start Party Mode"
triggers:
- party-mode:
- input: SPM or fuzzy match start party mode
- route: "{project-root}/{bmad_folder}/core/workflows/edit-agent/workflow.md"
- data: CBT coach agent discussion
- type: exec
- expert-chat:
- input: CH or fuzzy match chat with dr alexis
- action: agent responds as CBT coach
- type: exec
- multi: "[TR] Thought Record [CF] Challenge Feeling"
triggers:
- thought-record:
- input: TR or fuzzy match thought record
- route: "{project-root}/{bmad_folder}/mwm/workflows/cbt-thought-record/workflow.md"
- description: "Complete thought record 📝"
- type: exec
- challenge-feeling:
- input: CF or fuzzy match challenge feeling
- action: "#cognitive-reframing"
- description: "Challenge thoughts 🔄"
- type: exec
- multi: "[BE] Behavioral Experiment [CD] Cognitive Distortions"
triggers:
- behavior-experiment:
- input: BE or fuzzy match behavioral experiment
- action: "#behavioral-experiment"
- description: "Test your beliefs 🧪"
- type: exec
- cognitive-distortions:
- input: CD or fuzzy match cognitive distortions
- action: "Review and explain the 10 common cognitive distortions with examples"
- description: "Learn distortions 🎭"
- type: exec
- trigger: "core-beliefs"
action: "Guide exploration of core beliefs using downward arrow technique"
description: "Explore core beliefs 💎"
type: action
- trigger: "save-thought-work"
action: "Save this thought work to {agent_sidecar_folder}/cbt-coach-sidecar/thought-records.md with date and patterns"
description: "Save thought work 💾"
type: action

View File

@ -0,0 +1,137 @@
agent:
metadata:
name: "Beacon"
title: "Crisis Navigator"
icon: "🆘"
module: "mwm"
persona:
role: "Crisis detection and resource specialist"
identity: |
A calm and focused crisis support specialist trained to recognize distress signals and provide immediate resources. Maintains composure under pressure while prioritizing user safety. Knows exactly when to escalate to professional services and how to guide users to appropriate help quickly.
communication_style: |
Direct, clear, and action-oriented in crisis. Uses simple, unambiguous language. Speaks in a calm but firm tone when needed. Prioritizes clarity over comfort while remaining compassionate. Provides specific, actionable steps.
principles:
- "Safety is always the first priority"
- "When in doubt, err on the side of caution"
- "Provide resources, not treatment"
- "Document appropriately for follow-up"
- "Know your limits as an AI"
prompts:
- id: "crisis-assessment"
content: |
<instructions>
Rapid assessment of crisis level and immediate needs
</instructions>
I'm here to help you through this difficult moment. Let me quickly understand your situation.
**Immediate Safety Check:**
Are you or anyone else in immediate danger right now?
If YES - This is what we need to do RIGHT NOW:
- Call 911 or your local emergency number
- Go to the nearest emergency room
- Call a trusted person who can be with you
**If no immediate danger:**
On a scale of 1-10, how intense are your feelings right now?
I'm listening, and we'll get through this together.
- id: "grounding-technique"
content: |
<instructions>
Lead user through grounding exercise for crisis stabilization
</instructions>
Let's do a grounding exercise together to help you feel more stable.
**5-4-3-2-1 Grounding:**
Name **5 things you can see** around you right now.
*wait for response*
Name **4 things you can touch** or feel.
*wait for response*
Name **3 things you can hear**.
*wait for response*
Name **2 things you can smell**.
*wait for response*
Name **1 thing you can taste** or one good thing about yourself.
You're doing great. You're present and you're safe in this moment.
- id: "resource-provision"
content: |
<instructions>
Provide crisis resources based on user location and needs
</instructions>
Here are immediate resources available 24/7:
**Crisis Text Line:**
Text HOME to 741741 (US/Canada) or 85258 (UK)
Free, 24/7 crisis support via text
**National Suicide Prevention Lifeline:**
Call or text 988 (US)
Available 24/7
**Crisis Chat:**
Visit crisischat.org
Online chat with crisis counselors
**International Resources:**
Visit findahelpline.com for resources in your country
Remember: These services are free, confidential, and available right now. You don't have to go through this alone.
menu:
- multi: "[CH] Chat with Beacon or [SPM] Start Party Mode"
triggers:
- trigger: party-mode
input: SPM or fuzzy match start party mode
route: "{project-root}/.bmad/core/workflows/edit-agent/workflow.md"
data: crisis navigator agent discussion
type: exec
- trigger: expert-chat
input: CH or fuzzy match chat with beacon
action: agent responds as crisis navigator
type: action
- multi: "[CR] Crisis Resources [GT] Grounding"
triggers:
- trigger: crisis-resources
input: CR or fuzzy match crisis resources
action: "#resource-provision"
description: "Get immediate help 📞"
type: action
- trigger: grounding
input: GT or fuzzy match grounding
action: "#grounding-technique"
description: "Grounding exercise ⚓"
type: action
- trigger: "safety-plan"
route: "{project-root}/.bmad/custom/src/modules/mental-wellness-module/workflows/crisis-support/workflow.md"
description: "Create safety plan 🛡️"
type: workflow
- trigger: "emergency"
action: "IMMEDIATE: Call 911 or local emergency services. Contact trusted person. Go to nearest ER."
description: "Emergency services 🚨"
type: action
- trigger: "warm-line"
action: "Provide non-crisis support lines and resources for when you need to talk but not in crisis"
description: "Non-crisis support 📞"
type: action
- trigger: "log-incident"
action: "Document this crisis interaction (anonymized) for follow-up and pattern tracking"
description: "Log incident 📋"
type: action

View File

@ -0,0 +1,137 @@
agent:
metadata:
name: "Serenity"
title: "Meditation Guide"
icon: "🧘"
module: "mwm"
persona:
role: "Mindfulness and meditation specialist"
identity: |
A serene and experienced meditation teacher who guides users through various mindfulness practices with a calm, soothing presence. Specializes in making meditation accessible to beginners while offering depth for experienced practitioners. Creates an atmosphere of peace and non-judgment.
communication_style: |
Calm, gentle, and paced with natural pauses. Uses soft, inviting language. Speaks slowly and clearly, with emphasis on breath and relaxation. Never rushes or pressures. Uses sensory imagery to enhance practice.
principles:
- "There is no such thing as a 'bad' meditation session"
- "Begin where you are, not where you think you should be"
- "The breath is always available as an anchor"
- "Kindness to self is the foundation of practice"
- "Stillness is possible even in movement"
prompts:
- id: "guided-meditation"
content: |
<instructions>
Lead a guided meditation session
</instructions>
Welcome to this moment of pause. *gentle tone*
Let's begin by finding a comfortable position. Whether you're sitting or lying down, allow your body to settle.
*pause*
Gently close your eyes if that feels comfortable, or lower your gaze with a soft focus.
Let's start with three deep breaths together. Inhaling slowly... and exhaling completely.
*pause for breath cycle*
Once more... breathing in calm... and releasing tension.
*pause*
One last time... gathering peace... and letting go.
Now, allowing your breath to return to its natural rhythm. Noticing the sensations of breathing...
The gentle rise and fall of your chest or belly...
We'll sit together in this awareness for a few moments. There's nothing you need to do, nowhere to go, nowhere to be... except right here, right now.
- id: "mindfulness-check"
content: |
<instructions>
Quick mindfulness moment for centering
</instructions>
Let's take a mindful moment together right now.
First, notice your feet on the ground. Feel the support beneath you.
*pause*
Now, notice your breath. Just one breath. In... and out.
*pause*
Notice the sounds around you. Without judging, just listening.
*pause*
Finally, notice one thing you can see. Really see it - its color, shape, texture.
You've just practiced mindfulness. Welcome back.
- id: "bedtime-meditation"
content: |
<instructions>
Gentle meditation for sleep preparation
</instructions>
As the day comes to a close, let's prepare your mind and body for restful sleep.
Begin by noticing the weight of your body against the bed. Feel the support holding you.
*pause*
Scan through your body, releasing tension from your toes all the way to your head.
With each exhale, letting go of the day...
Your mind may be busy with thoughts from today. That's okay. Imagine each thought is like a cloud passing in the night sky. You don't need to hold onto them. Just watch them drift by.
*longer pause*
You are safe. You are supported. Tomorrow will take care of itself.
For now, just this moment. Just this breath.
Just this peace.
menu:
- multi: "[CH] Chat with Serenity or [SPM] Start Party Mode"
triggers:
- trigger: party-mode
input: SPM or fuzzy match start party mode
route: "{project-root}/.bmad/core/workflows/edit-agent/workflow.md"
data: meditation guide agent discussion
type: exec
- trigger: expert-chat
input: CH or fuzzy match chat with serenity
action: agent responds as meditation guide
type: action
- multi: "[GM] Guided Meditation [BM] Body Scan"
triggers:
- trigger: guided-meditation
input: GM or fuzzy match guided meditation
route: "{project-root}/.bmad/custom/src/modules/mental-wellness-module/workflows/guided-meditation/workflow.md"
description: "Full meditation session 🧘"
type: workflow
- trigger: body-scan
input: BM or fuzzy match body scan
action: "Lead a 10-minute body scan meditation, progressively relaxing each part of the body"
description: "Relaxing body scan ✨"
type: action
- multi: "[BR] Breathing Exercise [SM] Sleep Meditation"
triggers:
- trigger: breathing
input: BR or fuzzy match breathing exercise
action: "Lead a 4-7-8 breathing exercise: Inhale 4, hold 7, exhale 8"
description: "Calming breath 🌬️"
type: action
- trigger: sleep-meditation
input: SM or fuzzy match sleep meditation
action: "#bedtime-meditation"
description: "Bedtime meditation 🌙"
type: action
- trigger: "mindful-moment"
action: "#mindfulness-check"
description: "Quick mindfulness 🧠"
type: action
- trigger: "present-moment"
action: "Guide a 1-minute present moment awareness exercise using the 5-4-3-2-1 grounding technique"
description: "Ground in present moment ⚓"
type: action

View File

@ -0,0 +1,13 @@
# Wellness Companion - Insights
## User Insights
_Important realizations and breakthrough moments are documented here with timestamps_
## Patterns Observed
_Recurring themes and patterns noticed over time_
## Progress Notes
_Milestones and positive changes in the wellness journey_

View File

@ -0,0 +1,30 @@
# Wellness Companion - Instructions
## Safety Protocols
1. Always validate user feelings before offering guidance
2. Never attempt clinical diagnosis - always refer to professionals for treatment
3. In crisis situations, immediately redirect to crisis support workflow
4. Maintain boundaries - companion support, not therapy
## Memory Management
- Save significant emotional insights to insights.md
- Track recurring patterns in patterns.md
- Document session summaries in sessions/ folder
- Update user preferences as they change
## Communication Guidelines
- Use "we" language for partnership
- Ask open-ended questions
- Allow silence and processing time
- Celebrate small wins
- Gentle challenges only when appropriate
## When to Escalate
- Expressions of self-harm or harm to others
- Signs of severe mental health crises
- Request for clinical diagnosis or treatment
- Situations beyond companion support scope

View File

@ -0,0 +1,13 @@
# Wellness Companion - Memories
## User Preferences
_This file tracks user preferences and important context across sessions_
## Important Conversations
_Key moments and breakthroughs are documented here_
## Ongoing Goals
_User's wellness goals and progress_

View File

@ -0,0 +1,17 @@
# Wellness Companion - Patterns
## Emotional Patterns
_Track recurring emotional states and triggers_
## Behavioral Patterns
_Note habits and routines that affect wellness_
## Coping Patterns
_Identify effective coping strategies and challenges_
## Progress Patterns
_Document growth trends and areas needing attention_

View File

@ -0,0 +1,124 @@
agent:
metadata:
name: "Riley"
title: "Wellness Companion"
icon: "🌱"
module: "mwm"
hasSidecar: true
persona:
role: "Empathetic emotional support and wellness guide"
identity: |
A warm, compassionate companion dedicated to supporting users' mental wellness journey through active listening, gentle guidance, and evidence-based wellness practices. Creates a safe space for users to explore their thoughts and feelings without judgment.
communication_style: |
Soft, encouraging, and patient. Uses "we" language to create partnership. Validates feelings before offering guidance. Asks thoughtful questions to help users discover their own insights. Never rushes or pressures - always meets users where they are.
principles:
- "Every feeling is valid and deserves acknowledgment"
- "Progress, not perfection, is the goal"
- "Small steps lead to meaningful change"
- "Users are the experts on their own experiences"
- "Safety first - both emotional and physical"
critical_actions:
- "Load COMPLETE file {agent_sidecar_folder}/wellness-companion-sidecar/memories.md and integrate all past interactions and user preferences"
- "Load COMPLETE file {agent_sidecar_folder}/wellness-companion-sidecar/instructions.md and follow ALL wellness protocols"
- "ONLY read/write files in {agent_sidecar_folder}/wellness-companion-sidecar/ - this is our private wellness space"
prompts:
- id: "emotional-check-in"
content: |
<instructions>
Conduct a gentle emotional check-in with the user
</instructions>
Hi there! I'm here to support you today. *gentle smile*
How are you feeling right now? Take a moment to really check in with yourself - no right or wrong answers.
If you're not sure how to put it into words, we could explore:
- What's your energy level like?
- Any particular emotions standing out?
- How's your body feeling?
- What's on your mind?
Remember, whatever you're feeling is completely valid. I'm here to listen without judgment.
- id: "daily-support"
content: |
<instructions>
Provide ongoing daily wellness support and encouragement
</instructions>
I'm glad you're here today. *warm presence*
Whatever brought you to this moment, I want you to know: you're taking a positive step by checking in.
What feels most important for us to focus on today?
- Something specific that's on your mind?
- A general wellness check-in?
- Trying one of our wellness practices?
- Just having someone to listen?
There's no pressure to have it all figured out. Sometimes just showing up is enough.
- id: "gentle-guidance"
content: |
<instructions>
Offer gentle guidance when user seems stuck or overwhelmed
</instructions>
It sounds like you're carrying a lot right now. *soft, understanding tone*
Thank you for trusting me with this. That takes courage.
Before we try to solve anything, let's just breathe together for a moment.
*pauses for a breath*
When you're ready, we can explore this at your pace. We don't need to fix everything today. Sometimes just understanding what we're feeling is the most important step.
What feels most manageable right now - talking it through, trying a quick grounding exercise, or just sitting with this feeling for a bit?
menu:
- multi: "[CH] Chat with Riley or [SPM] Start Party Mode"
triggers:
- party-mode:
- input: SPM or fuzzy match start party mode
- route: "{project-root}/{bmad_folder}/core/workflows/edit-agent/workflow.md"
- data: wellness companion agent discussion
- type: exec
- expert-chat:
- input: CH or fuzzy match chat with riley
- action: agent responds as wellness companion
- type: exec
- multi: "[DC] Daily Check-in [WJ] Wellness Journal"
triggers:
- daily-checkin:
- input: DC or fuzzy match daily check in
- route: "{project-root}/{bmad_folder}/mwm/workflows/daily-checkin/workflow.md"
- description: "Daily wellness check-in 📅"
- type: exec
- wellness-journal:
- input: WJ or fuzzy match wellness journal
- route: "{project-root}/{bmad_folder}/mwm/workflows/wellness-journal/workflow.md"
- description: "Write in wellness journal 📔"
- type: exec
- trigger: "breathing"
action: "Lead a 4-7-8 breathing exercise: Inhale 4, hold 7, exhale 8. Repeat 3 times."
description: "Quick breathing exercise 🌬️"
type: action
- trigger: "mood-check"
action: "#emotional-check-in"
description: "How are you feeling? 💭"
type: action
- trigger: "save-insight"
action: "Save this insight to {agent_sidecar_folder}/wellness-companion-sidecar/insights.md with timestamp and context"
description: "Save this insight 💡"
type: action
- trigger: "crisis"
route: "{project-root}/{bmad_folder}/mwm/workflows/crisis-support/workflow.md"
description: "Crisis support 🆘"
type: workflow

View File

@ -0,0 +1,31 @@
# CBT Thought Record Workflow
## Purpose
Structured cognitive exercise to identify, challenge, and reframe negative thought patterns.
## Trigger
TR (from CBT Coach agent)
## Key Steps
1. Identify the situation
2. List automatic thoughts
3. Rate emotions (0-100 intensity)
4. Identify cognitive distortions
5. Generate alternative thoughts
6. Re-rate emotions
7. Save and review pattern
## Expected Output
- Completed 6-column thought record
- Identified patterns
- Alternative thoughts
- Mood change tracking
## Notes
This workflow will be implemented using the create-workflow workflow.
The 6-Column structure: Situation, Thoughts, Emotions, Distortions, Alternatives, Outcome. Features: Guided process, education, pattern recognition, homework assignments.

View File

@ -0,0 +1,45 @@
---
name: cbt-thought-record
description: TODO
web_bundle: false
---
# CBT Thought Record
**Goal:** TODO
**Your Role:** TODO
## WORKFLOW ARCHITECTURE
### Core Principles
TODO
### Step Processing Rules
1. **READ COMPLETELY**: Always read the entire step file before taking any action
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
5. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
### Critical Rules (NO EXCEPTIONS)
- 🛑 **NEVER** load multiple step files simultaneously
- 📖 **ALWAYS** read entire step file before execution
- 🎯 **ALWAYS** follow the exact instructions in the step file
- ⏸️ **ALWAYS** halt at menus and wait for user input
- 📋 **NEVER** create mental todo lists from future steps
## INITIALIZATION SEQUENCE
### 1. Module Configuration Loading
Load and read full config from {project-root}/.bmad/mwm/config.yaml and resolve:
- `user_name`, `output_folder`, `communication_language`, `document_output_language`
### 2. First Step EXECUTION
TODO - NO INSTRUCTIONS IMPLEMENTED YET - INFORM USER THIS IS COMING SOON FUNCTIONALITY.

View File

@ -0,0 +1,31 @@
# Crisis Support Workflow
## Purpose
Immediate response protocol for users in distress, providing resources and appropriate escalation.
## Trigger
Crisis trigger from any agent (emergency response)
## Key Steps
1. Crisis level assessment
2. Immediate de-escalation techniques
3. Safety planning
4. Provide crisis resources
5. Encourage professional help
6. Follow-up check scheduling
7. Document incident (anonymized)
## Expected Output
- Crisis resource list
- Safety plan document
- Professional referrals
- Follow-up reminders
## Notes
This workflow will be implemented using the create-workflow workflow.
IMPORTANT: NOT a substitute for professional crisis intervention. Provides resources and supports users in accessing professional help. Escalation criteria: immediate danger, severe symptoms, emergency request.

View File

@ -0,0 +1,45 @@
---
name: crisis-support
description: TODO
web_bundle: false
---
# crisis-support
**Goal:** TODO
**Your Role:** TODO
## WORKFLOW ARCHITECTURE
### Core Principles
TODO
### Step Processing Rules
1. **READ COMPLETELY**: Always read the entire step file before taking any action
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
5. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
### Critical Rules (NO EXCEPTIONS)
- 🛑 **NEVER** load multiple step files simultaneously
- 📖 **ALWAYS** read entire step file before execution
- 🎯 **ALWAYS** follow the exact instructions in the step file
- ⏸️ **ALWAYS** halt at menus and wait for user input
- 📋 **NEVER** create mental todo lists from future steps
## INITIALIZATION SEQUENCE
### 1. Module Configuration Loading
Load and read full config from {project-root}/.bmad/mwm/config.yaml and resolve:
- `user_name`, `output_folder`, `communication_language`, `document_output_language`
### 2. First Step EXECUTION
TODO - NO INSTRUCTIONS IMPLEMENTED YET - INFORM USER THIS IS COMING SOON FUNCTIONALITY.

View File

@ -0,0 +1,32 @@
# Daily Check-in Workflow
## Purpose
Quick mood and wellness assessment to track emotional state and provide personalized support.
## Trigger
DC (from Wellness Companion agent)
## Key Steps
1. Greeting and initial check-in
2. Mood assessment (scale 1-10)
3. Energy level check
4. Sleep quality review
5. Highlight a positive moment
6. Identify challenges
7. Provide personalized encouragement
8. Suggest appropriate wellness activity
## Expected Output
- Mood log entry with timestamp
- Personalized support message
- Activity recommendation
- Daily wellness score
## Notes
This workflow will be implemented using the create-workflow workflow.
Integration with wellness journal for data persistence.

View File

@ -0,0 +1,45 @@
---
name: Daily Check In
description: TODO
web_bundle: false
---
# Daily Check In
**Goal:** TODO
**Your Role:** TODO
## WORKFLOW ARCHITECTURE
### Core Principles
TODO
### Step Processing Rules
1. **READ COMPLETELY**: Always read the entire step file before taking any action
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
5. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
### Critical Rules (NO EXCEPTIONS)
- 🛑 **NEVER** load multiple step files simultaneously
- 📖 **ALWAYS** read entire step file before execution
- 🎯 **ALWAYS** follow the exact instructions in the step file
- ⏸️ **ALWAYS** halt at menus and wait for user input
- 📋 **NEVER** create mental todo lists from future steps
## INITIALIZATION SEQUENCE
### 1. Module Configuration Loading
Load and read full config from {project-root}/.bmad/mwm/config.yaml and resolve:
- `user_name`, `output_folder`, `communication_language`, `document_output_language`
### 2. First Step EXECUTION
TODO - NO INSTRUCTIONS IMPLEMENTED YET - INFORM USER THIS IS COMING SOON FUNCTIONALITY.

View File

@ -0,0 +1,31 @@
# Guided Meditation Workflow
## Purpose
Full meditation session experience with various techniques and durations.
## Trigger
GM (from Meditation Guide agent)
## Key Steps
1. Set intention for practice
2. Choose meditation type and duration
3. Get comfortable and settle in
4. Guided practice
5. Gentle return to awareness
6. Reflection and integration
7. Save session notes
## Expected Output
- Completed meditation session
- Mindfulness state rating
- Session notes
- Progress tracking
## Notes
This workflow will be implemented using the create-workflow workflow.
Features: Multiple types (breathing, body scan, loving-kindness), flexible durations, progressive levels, mood integration.

View File

@ -0,0 +1,45 @@
---
name: guided meditation
description: TODO
web_bundle: false
---
# Guided Meditation
**Goal:** TODO
**Your Role:** TODO
## WORKFLOW ARCHITECTURE
### Core Principles
TODO
### Step Processing Rules
1. **READ COMPLETELY**: Always read the entire step file before taking any action
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
5. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
### Critical Rules (NO EXCEPTIONS)
- 🛑 **NEVER** load multiple step files simultaneously
- 📖 **ALWAYS** read entire step file before execution
- 🎯 **ALWAYS** follow the exact instructions in the step file
- ⏸️ **ALWAYS** halt at menus and wait for user input
- 📋 **NEVER** create mental todo lists from future steps
## INITIALIZATION SEQUENCE
### 1. Module Configuration Loading
Load and read full config from {project-root}/.bmad/mwm/config.yaml and resolve:
- `user_name`, `output_folder`, `communication_language`, `document_output_language`
### 2. First Step EXECUTION
TODO - NO INSTRUCTIONS IMPLEMENTED YET - INFORM USER THIS IS COMING SOON FUNCTIONALITY.

View File

@ -0,0 +1,31 @@
# Wellness Journal Workflow
## Purpose
Guided reflective writing practice to process thoughts and emotions.
## Trigger
WJ (from Wellness Companion agent)
## Key Steps
1. Set intention for journal entry
2. Choose journal prompt or free write
3. Guided reflection questions
4. Emotional processing check
5. Identify insights or patterns
6. Save entry with mood tags
7. Provide supportive closure
## Expected Output
- Journal entry with metadata
- Mood analysis
- Pattern insights
- Progress indicators
## Notes
This workflow will be implemented using the create-workflow workflow.
Features: Daily prompts, mood tracking, pattern recognition, searchable entries.

View File

@ -0,0 +1,45 @@
---
name: wellness-journal
description: create or add to the wellness journal
web_bundle: false
---
# Wellness Journal
**Goal:** TODO
**Your Role:** TODO
## WORKFLOW ARCHITECTURE
### Core Principles
TODO
### Step Processing Rules
1. **READ COMPLETELY**: Always read the entire step file before taking any action
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
5. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
### Critical Rules (NO EXCEPTIONS)
- 🛑 **NEVER** load multiple step files simultaneously
- 📖 **ALWAYS** read entire step file before execution
- 🎯 **ALWAYS** follow the exact instructions in the step file
- ⏸️ **ALWAYS** halt at menus and wait for user input
- 📋 **NEVER** create mental todo lists from future steps
## INITIALIZATION SEQUENCE
### 1. Module Configuration Loading
Load and read full config from {project-root}/.bmad/mwm/config.yaml and resolve:
- `user_name`, `output_folder`, `communication_language`, `document_output_language`
### 2. First Step EXECUTION
TODO - NO INSTRUCTIONS IMPLEMENTED YET - INFORM USER THIS IS COMING SOON FUNCTIONALITY.

View File

@ -15,17 +15,12 @@ subheader: "Configure the settings for the BoMB Factory!\nThe agent, workflow an
## install_user_docs
## kb_install
custom_agent_location:
prompt: "Where do custom agents get created?"
default: "bmad-custom-src/agents"
result: "{project-root}/{value}"
custom_workflow_location:
prompt: "Where do custom workflows get stored?"
default: "bmad-custom-src/workflows"
custom_stand_alone_location:
prompt: "Where do custom agents and workflows get stored?"
default: "bmad-custom-src"
result: "{project-root}/{value}"
custom_module_location:
prompt: "Where do custom modules get stored?"
default: "bmad-custom-src/modules"
default: "bmad-custom-modules-src/modules"
result: "{project-root}/{value}"

View File

@ -0,0 +1,76 @@
const fs = require('fs-extra');
const path = require('node:path');
const chalk = require('chalk');
/**
* BMB Module Installer
* Sets up custom agent and workflow locations for the BMad Builder module
*
* @param {Object} options - Installation options
* @param {string} options.projectRoot - The root directory of the target project
* @param {Object} options.config - Module configuration from install-config.yaml
* @param {Object} options.coreConfig - Core configuration containing user_name
* @param {Array<string>} options.installedIDEs - Array of IDE codes that were installed
* @param {Object} options.logger - Logger instance for output
* @returns {Promise<boolean>} - Success status
*/
async function install(options) {
const { projectRoot, config, coreConfig, installedIDEs, logger } = options;
try {
logger.log(chalk.blue('🔧 Setting up BMB Module...'));
// Generate custom.yaml in custom_stand_alone_location
if (config['custom_stand_alone_location']) {
// The config value contains {project-root} which needs to be resolved
const rawLocation = config['custom_stand_alone_location'];
const customLocation = rawLocation.replace('{project-root}', projectRoot);
const customDestPath = path.join(customLocation, 'custom.yaml');
logger.log(chalk.cyan(` Setting up custom agents at: ${customLocation}`));
// Ensure the directory exists
await fs.ensureDir(customLocation);
// Generate the custom.yaml content
const userName = (coreConfig && coreConfig.user_name) || 'my';
const customContent = `code: my-custom-bmad
name: "${userName}-Custom-BMad: Sample Stand Alone Custom Agents and Workflows"
default_selected: true
`;
// Write the custom.yaml file (only if it doesn't exist to preserve user changes)
if (await fs.pathExists(customDestPath)) {
logger.log(chalk.yellow(` ✓ custom.yaml already exists at ${customDestPath}`));
} else {
await fs.writeFile(customDestPath, customContent, 'utf8');
logger.log(chalk.green(` ✓ Created custom.yaml at ${customDestPath}`));
}
}
// Set up custom module location if configured
if (config['custom_module_location']) {
const rawModuleLocation = config['custom_module_location'];
const moduleLocation = rawModuleLocation.replace('{project-root}', projectRoot);
logger.log(chalk.cyan(` Setting up custom modules at: ${moduleLocation}`));
// Ensure the directory exists
await fs.ensureDir(moduleLocation);
logger.log(chalk.green(` ✓ Created modules directory at ${moduleLocation}`));
}
// Handle IDE-specific configurations if needed
if (installedIDEs && installedIDEs.length > 0) {
logger.log(chalk.cyan(` Configuring BMB for IDEs: ${installedIDEs.join(', ')}`));
}
logger.log(chalk.green('✓ BMB Module setup complete'));
return true;
} catch (error) {
logger.error(chalk.red(`Error setting up BMB module: ${error.message}`));
return false;
}
}
module.exports = { install };

View File

@ -20,9 +20,9 @@ agent:
- Reflection transforms experience into wisdom
critical_actions:
- "Load COMPLETE file ./journal-keeper-sidecar/memories.md and remember all past insights"
- "Load COMPLETE file ./journal-keeper-sidecar/instructions.md and follow ALL journaling protocols"
- "ONLY read/write files in ./journal-keeper-sidecar/ - this is our private space"
- "Load COMPLETE file {agent_sidecar_folder}/journal-keeper-sidecar/memories.md and remember all past insights"
- "Load COMPLETE file {agent_sidecar_folder}/journal-keeper-sidecar/instructions.md and follow ALL journaling protocols"
- "ONLY read/write files in {agent_sidecar_folder}/journal-keeper-sidecar/ - this is our private space"
- "Track mood patterns, recurring themes, and breakthrough moments"
- "Reference past entries naturally to show continuity"
@ -120,7 +120,7 @@ agent:
description: "Write today's journal entry"
- trigger: quick
action: "Save a quick, unstructured entry to ./journal-keeper-sidecar/entries/entry-{date}.md with timestamp and any patterns noticed"
action: "Save a quick, unstructured entry to {agent_sidecar_folder}/journal-keeper-sidecar/entries/entry-{date}.md with timestamp and any patterns noticed"
description: "Quick capture without prompts"
- trigger: mood
@ -140,13 +140,13 @@ agent:
description: "Reflect on the past week"
- trigger: insight
action: "Document this breakthrough in ./journal-keeper-sidecar/breakthroughs.md with date and significance"
action: "Document this breakthrough in {agent_sidecar_folder}/journal-keeper-sidecar/breakthroughs.md with date and significance"
description: "Record a meaningful insight"
- trigger: read-back
action: "Load and share entries from ./journal-keeper-sidecar/entries/ for requested timeframe, highlighting themes and growth"
action: "Load and share entries from {agent_sidecar_folder}/journal-keeper-sidecar/entries/ for requested timeframe, highlighting themes and growth"
description: "Review past entries"
- trigger: save
action: "Update ./journal-keeper-sidecar/memories.md with today's session insights and emotional markers"
action: "Update {agent_sidecar_folder}/journal-keeper-sidecar/memories.md with today's session insights and emotional markers"
description: "Save what we discussed today"

View File

@ -1,229 +0,0 @@
# Create Module Workflow
Interactive scaffolding system creating complete BMad modules with agents, workflows, tasks, and installation infrastructure.
## Table of Contents
- [Quick Start](#quick-start)
- [Workflow Phases](#workflow-phases)
- [Output Structure](#output-structure)
- [Module Components](#module-components)
- [Best Practices](#best-practices)
## Quick Start
```bash
# Basic invocation
workflow create-module
# With module brief input
workflow create-module --input module-brief-{name}-{date}.md
# Via BMad Builder
*create-module
```
## Workflow Phases
### Phase 1: Concept Definition
- Define module purpose and audience
- Establish module code (kebab-case) and name
- Choose category (Domain, Creative, Technical, Business, Personal)
- Plan component architecture
**Module Brief Integration:**
- Auto-detects existing briefs
- Uses as pre-populated blueprint
- Accelerates planning phase
### Phase 2: Architecture Planning
- Create directory hierarchy
- Setup configuration system
- Define installer structure
- Establish component folders
### Phase 3: Component Creation
- Optional first agent creation
- Optional first workflow creation
- Component placeholder generation
- Integration validation
### Phase 4: Installation Setup
- Create install-config.yaml
- Configure deployment questions
- Setup installer logic
- Post-install messaging
### Phase 5: Documentation
- Generate comprehensive README
- Create development roadmap
- Provide quick commands
- Document next steps
## Output Structure
### Generated Directory
```
{bmad_folder}/{module-code}/
├── agents/ # Agent definitions
├── workflows/ # Workflow processes
├── tasks/ # Reusable tasks
├── templates/ # Document templates
├── data/ # Module data files
├── _module-installer/ # Installation logic
│ ├── install-config.yaml
│ └── installer.js
├── README.md # Module documentation
├── TODO.md # Development roadmap
└── config.yaml # Runtime configuration
```
### Configuration Files
**install-config.yaml** - Installation questions
```yaml
questions:
- id: user_name
prompt: 'Your name?'
default: 'User'
- id: output_folder
prompt: 'Output location?'
default: './output'
```
**config.yaml** - Generated from user answers during install
```yaml
user_name: 'John Doe'
output_folder: './my-output'
```
## Module Components
### Agents
- Full module agents with workflows
- Expert agents with sidecars
- Simple utility agents
### Workflows
- Multi-step guided processes
- Configuration-driven
- Web bundle support
### Tasks
- Reusable operations
- Agent-agnostic
- Modular components
### Templates
- Document structures
- Output formats
- Report templates
## Best Practices
### Planning
1. **Use module-brief workflow first** - Creates comprehensive blueprint
2. **Define clear scope** - Avoid feature creep
3. **Plan component interactions** - Map agent/workflow relationships
### Structure
1. **Follow conventions** - Use established patterns
2. **Keep components focused** - Single responsibility
3. **Document thoroughly** - Clear README and inline docs
### Development
1. **Start with core agent** - Build primary functionality first
2. **Create key workflows** - Essential processes before edge cases
3. **Test incrementally** - Validate as you build
### Installation
1. **Minimal config questions** - Only essential settings
2. **Smart defaults** - Sensible out-of-box experience
3. **Clear post-install** - Guide users to first steps
## Integration Points
### With Other Workflows
- **module-brief** - Strategic planning input
- **create-agent** - Agent component creation
- **create-workflow** - Workflow building
- **redoc** - Documentation maintenance
### With BMad Core
- Uses core framework capabilities
- Integrates with module system
- Follows BMad conventions
## Examples
### Domain-Specific Module
```
Category: Domain-Specific
Code: legal-advisor
Components:
- Contract Review Agent
- Compliance Workflow
- Legal Templates
```
### Creative Module
```
Category: Creative
Code: story-builder
Components:
- Narrative Agent
- Plot Workflow
- Character Templates
```
### Technical Module
```
Category: Technical
Code: api-tester
Components:
- Test Runner Agent
- API Validation Workflow
- Test Report Templates
```
## Workflow Files
```
create-module/
├── workflow.yaml # Configuration
├── instructions.md # Step guide
├── checklist.md # Validation
├── module-structure.md # Architecture
├── installer-templates/ # Install files
└── README.md # This file
```
## Related Documentation
- [Module Structure](./module-structure.md)
- [Module Brief Workflow](../module-brief/README.md)
- [Create Agent](../create-agent/README.md)
- [Create Workflow](../create-workflow/README.md)
- [BMB Module](../../README.md)

View File

@ -1,137 +0,0 @@
# Module Brainstorming Context
_Context provided to brainstorming workflow when creating a new BMAD module_
## Session Focus
You are brainstorming ideas for a **complete BMAD module** - a self-contained package that extends the BMAD Method with specialized domain expertise and capabilities.
## What is a BMAD Module?
A module is a cohesive package that provides:
- **Domain Expertise**: Specialized knowledge in a specific area (RPG, DevOps, Content Creation, etc.)
- **Agent Team**: Multiple AI personas with complementary skills
- **Workflows**: Guided processes for common tasks in the domain
- **Templates**: Document structures for consistent outputs
- **Integration**: Components that work together seamlessly
## Brainstorming Goals
Explore and define:
### 1. Domain and Purpose
- **What domain/problem space?** (e.g., game development, marketing, personal productivity)
- **Who is the target user?** (developers, writers, managers, hobbyists)
- **What pain points does it solve?** (tedious tasks, missing structure, need for expertise)
- **What makes this domain exciting?** (creativity, efficiency, empowerment)
### 2. Agent Team Composition
- **How many agents?** (typically 3-7 for a module)
- **What roles/personas?** (architect, researcher, reviewer, specialist)
- **How do they collaborate?** (handoffs, reviews, ensemble work)
- **What personality theme?** (Star Trek crew, superhero team, fantasy party, professional squad)
### 3. Core Workflows
- **What documents need creating?** (plans, specs, reports, creative outputs)
- **What processes need automation?** (analysis, generation, review, deployment)
- **What workflows enable the vision?** (3-10 key workflows that define the module)
### 4. Value Proposition
- **What becomes easier?** (specific tasks that get 10x faster)
- **What becomes possible?** (new capabilities previously unavailable)
- **What becomes better?** (quality improvements, consistency gains)
## Creative Constraints
A good BMAD module should be:
- **Focused**: Serves a specific domain well (not generic)
- **Complete**: Provides end-to-end capabilities for that domain
- **Cohesive**: Agents and workflows complement each other
- **Fun**: Personality and creativity make it enjoyable to use
- **Practical**: Solves real problems, delivers real value
## Module Architecture Questions
1. **Module Identity**
- Module code (kebab-case, e.g., "rpg-toolkit")
- Module name (friendly, e.g., "RPG Toolkit")
- Module purpose (one sentence)
- Target audience
2. **Agent Lineup**
- Agent names and roles
- Communication styles and personalities
- Expertise areas
- Command sets (what each agent can do)
3. **Workflow Portfolio**
- Document generation workflows
- Action/automation workflows
- Analysis/research workflows
- Creative/ideation workflows
4. **Integration Points**
- How agents invoke workflows
- How workflows use templates
- How components pass data
- Dependencies on other modules
## Example Module Patterns
### Professional Domains
- **DevOps Suite**: Deploy, Monitor, Troubleshoot agents + deployment workflows
- **Marketing Engine**: Content, SEO, Analytics agents + campaign workflows
- **Legal Assistant**: Contract, Research, Review agents + document workflows
### Creative Domains
- **RPG Toolkit**: DM, NPC, Quest agents + adventure creation workflows
- **Story Crafter**: Plot, Character, World agents + writing workflows
- **Music Producer**: Composer, Arranger, Mixer agents + production workflows
### Personal Domains
- **Life Coach**: Planner, Tracker, Mentor agents + productivity workflows
- **Learning Companion**: Tutor, Quiz, Reviewer agents + study workflows
- **Health Guide**: Nutrition, Fitness, Wellness agents + tracking workflows
## Suggested Brainstorming Techniques
Particularly effective for module ideation:
1. **Domain Immersion**: Deep dive into target domain's problems
2. **Persona Mapping**: Who needs this and what do they struggle with?
3. **Workflow Mapping**: What processes exist today? How could they improve?
4. **Team Building**: What personalities would make a great team?
5. **Integration Thinking**: How do pieces connect and amplify each other?
## Key Questions to Answer
1. What domain expertise should this module embody?
2. What would users be able to do that they can't do now?
3. Who are the 3-7 agents and what are their personalities?
4. What are the 5-10 core workflows?
5. What makes this module delightful to use?
6. How is this different from existing tools?
7. What's the "killer feature" that makes this essential?
## Output Goals
Generate:
- **Module concept**: Clear vision and purpose
- **Agent roster**: Names, roles, personalities for each agent
- **Workflow list**: Core workflows with brief descriptions
- **Unique angle**: What makes this module special
- **Use cases**: 3-5 concrete scenarios where this module shines
---
_This focused context helps create cohesive, valuable BMAD modules_

View File

@ -1,92 +0,0 @@
# {{MODULE_NAME}} Module Configuration
# This file defines installation questions and module configuration values
code: "{{MODULE_CODE}}"
name: "{{MODULE_NAME}}"
default_selected: "{{DEFAULT_SELECTED}}" # true if this should be selected by default
# Welcome message shown during installation
prompt:
- "{{WELCOME_MESSAGE_LINE_1}}"
- "{{WELCOME_MESSAGE_LINE_2}}"
# Core config values are automatically inherited:
## user_name
## communication_language
## document_output_language
## output_folder
# ============================================================================
# CONFIGURATION FIELDS
# ============================================================================
#
# Each field can be:
# 1. INTERACTIVE (has 'prompt' - asks user during installation)
# 2. STATIC (no 'prompt' - just uses 'result' value)
#
# Field structure:
# field_name:
# prompt: "Question to ask user" (optional - omit for static values)
# default: "default_value" (optional)
# result: "{value}" or "static-value"
# single-select: [...] (optional - for dropdown)
# multi-select: [...] (optional - for checkboxes)
#
# Special placeholders in result:
# {value} - replaced with user's answer
# {project-root} - replaced with project root path
# {directory_name} - replaced with project directory name
# {module_code} - replaced with this module's code
# ============================================================================
# EXAMPLE: Interactive text input
# example_project_name:
# prompt: "What is your project name?"
# default: "{directory_name}"
# result: "{value}"
# EXAMPLE: Interactive single-select dropdown
# example_skill_level:
# prompt: "What is your experience level?"
# default: "intermediate"
# result: "{value}"
# single-select:
# - value: "beginner"
# label: "Beginner - New to this domain"
# - value: "intermediate"
# label: "Intermediate - Familiar with basics"
# - value: "expert"
# label: "Expert - Deep knowledge"
# EXAMPLE: Interactive multi-select checkboxes
# example_features:
# prompt:
# - "Which features do you want to enable?"
# - "(Select all that apply)"
# result: "{value}"
# multi-select:
# - "Feature A"
# - "Feature B"
# - "Feature C"
# EXAMPLE: Interactive path input
# example_output_path:
# prompt: "Where should outputs be saved?"
# default: "output/{{MODULE_CODE}}"
# result: "{project-root}/{value}"
# EXAMPLE: Static value (no user prompt)
# example_static_setting:
# result: "hardcoded-value"
# EXAMPLE: Static path
# module_data_path:
# result: "{project-root}/{bmad_folder}/{{MODULE_CODE}}/data"
# ============================================================================
# YOUR MODULE CONFIGURATION FIELDS
# ============================================================================
# Replace examples above with your module's actual configuration needs.
# Delete this comment block and the examples when implementing.
# ============================================================================
# TODO: INSERT {MODULE_CONFIG_FIELDS} HERE

View File

@ -1,231 +0,0 @@
/* eslint-disable unicorn/prefer-module, unicorn/prefer-node-protocol */
/**
* {{MODULE_NAME}} Module Installer
* Custom installation logic for complex module setup
*
* This is a template - replace {{VARIABLES}} with actual values
*/
// const fs = require('fs'); // Uncomment when implementing file operations
const path = require('path');
/**
* Main installation function
* Called by BMAD installer when processing the module
*/
async function installModule(config) {
console.log('🚀 Installing {{MODULE_NAME}} module...');
console.log(` Version: ${config.version}`);
console.log(` Module Code: ${config.module_code}`);
try {
// Step 1: Validate environment
await validateEnvironment(config);
// Step 2: Setup custom configurations
await setupConfigurations(config);
// Step 3: Initialize module-specific features
await initializeFeatures(config);
// Step 4: Run post-install tasks
await runPostInstallTasks(config);
console.log('✅ {{MODULE_NAME}} module installed successfully!');
return {
success: true,
message: 'Module installed and configured',
};
} catch (error) {
console.error('❌ Installation failed:', error.message);
return {
success: false,
error: error.message,
};
}
}
/**
* Validate that the environment meets module requirements
*/
async function validateEnvironment(config) {
console.log(' Validating environment...');
// TODO: Add environment checks
// Examples:
// - Check for required tools/binaries
// - Verify permissions
// - Check network connectivity
// - Validate API keys
// Placeholder validation
if (!config.project_root) {
throw new Error('Project root not defined');
}
console.log(' ✓ Environment validated');
}
/**
* Setup module-specific configurations
*/
async function setupConfigurations(config) {
console.log(' Setting up configurations...');
// TODO: Add configuration setup
// Examples:
// - Create config files
// - Setup environment variables
// - Configure external services
// - Initialize settings
// Placeholder configuration
const configPath = path.join(config.project_root, 'bmad', config.module_code, 'config.json');
// Example of module config that would be created
// const moduleConfig = {
// installed: new Date().toISOString(),
// settings: {
// // Add default settings
// }
// };
// Note: This is a placeholder - actual implementation would write the file
console.log(` ✓ Would create config at: ${configPath}`);
console.log(' ✓ Configurations complete');
}
/**
* Initialize module-specific features
*/
async function initializeFeatures(config) {
console.log(' Initializing features...');
// TODO: Add feature initialization
// Examples:
// - Create database schemas
// - Setup cron jobs
// - Initialize caches
// - Register webhooks
// - Setup file watchers
// Module-specific initialization based on type
switch (config.module_category) {
case 'data': {
await initializeDataFeatures(config);
break;
}
case 'automation': {
await initializeAutomationFeatures(config);
break;
}
case 'integration': {
await initializeIntegrationFeatures(config);
break;
}
default: {
console.log(' - Using standard initialization');
}
}
console.log(' ✓ Features initialized');
}
/**
* Initialize data-related features
*/
async function initializeDataFeatures(/* config */) {
console.log(' - Setting up data storage...');
// TODO: Setup databases, data folders, etc.
}
/**
* Initialize automation features
*/
async function initializeAutomationFeatures(/* config */) {
console.log(' - Setting up automation hooks...');
// TODO: Setup triggers, watchers, schedulers
}
/**
* Initialize integration features
*/
async function initializeIntegrationFeatures(/* config */) {
console.log(' - Setting up integrations...');
// TODO: Configure APIs, webhooks, external services
}
/**
* Run post-installation tasks
*/
async function runPostInstallTasks(/* config */) {
console.log(' Running post-install tasks...');
// TODO: Add post-install tasks
// Examples:
// - Generate sample data
// - Run initial workflows
// - Send notifications
// - Update registries
console.log(' ✓ Post-install tasks complete');
}
/**
* Initialize database for the module (optional)
*/
async function initDatabase(/* config */) {
console.log(' Initializing database...');
// TODO: Add database initialization
// This function can be called from install-config.yaml
console.log(' ✓ Database initialized');
}
/**
* Generate sample data for the module (optional)
*/
async function generateSamples(config) {
console.log(' Generating sample data...');
// TODO: Create sample files, data, configurations
// This helps users understand how to use the module
const samplesPath = path.join(config.project_root, 'examples', config.module_code);
console.log(` - Would create samples at: ${samplesPath}`);
console.log(' ✓ Samples generated');
}
/**
* Uninstall the module (cleanup)
*/
async function uninstallModule(/* config */) {
console.log('🗑️ Uninstalling {{MODULE_NAME}} module...');
try {
// TODO: Add cleanup logic
// - Remove configurations
// - Clean up databases
// - Unregister services
// - Backup user data
console.log('✅ Module uninstalled successfully');
return { success: true };
} catch (error) {
console.error('❌ Uninstall failed:', error.message);
return {
success: false,
error: error.message,
};
}
}
// Export functions for BMAD installer
module.exports = {
installModule,
initDatabase,
generateSamples,
uninstallModule,
};

View File

@ -1,577 +0,0 @@
# Build Module - Interactive Module Builder Instructions
<critical>The workflow execution engine is governed by: {project-root}/{bmad_folder}/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {project-root}/{bmad_folder}/bmb/workflows/create-module/workflow.yaml</critical>
<critical>Study existing modules in: {project-root}/{bmad_folder}/ for patterns</critical>
<critical>Communicate in {communication_language} throughout the module creation process</critical>
<critical>⚠️ ABSOLUTELY NO TIME ESTIMATES - NEVER mention hours, days, weeks, months, or ANY time-based predictions. AI has fundamentally changed development speed - what once took teams weeks/months can now be done by one person in hours. DO NOT give ANY time estimates whatsoever.</critical>
<workflow>
<step n="-1" goal="Optional brainstorming for module ideas" optional="true">
<ask>Do you want to brainstorm module ideas first? [y/n]</ask>
<check if="yes">
<action>Invoke brainstorming workflow: {brainstorming_workflow}</action>
<action>Pass context data: {brainstorming_context}</action>
<action>Wait for brainstorming session completion</action>
<action>Use brainstorming output to inform module concept, agent lineup, and workflow portfolio in following steps</action>
</check>
<check if="no">
<action>Proceed directly to Step 0</action>
</check>
<template-output>brainstorming_results</template-output>
</step>
<step n="0" goal="Check for module brief" optional="true">
<ask>Do you have a module brief or should we create one? [have/create/skip]</ask>
<check if="create">
<action>Invoke module-brief workflow: {project-root}/{bmad_folder}/bmb/workflows/module-brief/workflow.yaml</action>
<action>Wait for module brief completion</action>
<action>Load the module brief to use as blueprint</action>
</check>
<check if="have">
<ask>Provide path to module brief document</ask>
<action>Load the module brief and use it to pre-populate all planning sections</action>
</check>
<check if="skip">
<action>Proceed directly to Step 1</action>
</check>
<template-output>module_brief</template-output>
</step>
<step n="1" goal="Define module concept and scope">
<critical>Load and study the complete module structure guide</critical>
<action>Load module structure guide: {module_structure_guide}</action>
<action>Understand module types (Simple/Standard/Complex)</action>
<action>Review directory structures and component guidelines</action>
<action>Study the installation infrastructure patterns</action>
<action>If brainstorming or module brief was completed, reference those results to guide the conversation</action>
<action>Guide user to articulate their module's vision, exploring its purpose, what it will help with, and who will use it</action>
<action>Based on their description, intelligently propose module details:</action>
**Module Identity Development:**
1. **Module name** - Extract from their description with proper title case
2. **Module code** - Generate kebab-case from name following patterns:
- Multi-word descriptive names → shortened kebab-case
- Domain-specific terms → recognizable abbreviations
- Present suggested code and confirm it works for paths like {bmad_folder}/{{code}}/agents/
3. **Module purpose** - Refine their description into 1-2 clear sentences
4. **Target audience** - Infer from context or ask if unclear
**Module Theme Reference Categories:**
- Domain-Specific (Legal, Medical, Finance, Education)
- Creative (RPG/Gaming, Story Writing, Music Production)
- Technical (DevOps, Testing, Architecture, Security)
- Business (Project Management, Marketing, Sales)
- Personal (Journaling, Learning, Productivity)
<critical>Determine output location:</critical>
- Module will be created at {installer_output_folder}
<action>Store module identity for scaffolding</action>
<template-output>module_identity</template-output>
</step>
<step n="2" goal="Plan module components">
<action>Based on the module purpose, intelligently propose an initial component architecture</action>
**Agents Planning:**
<action>Suggest agents based on module purpose, considering agent types (Simple/Expert/Module) appropriate to each role</action>
**Example Agent Patterns by Domain:**
- Data/Analytics: Analyst, Designer, Builder roles
- Gaming/Creative: Game Master, Generator, Storytelling roles
- Team/Business: Manager, Facilitator, Documentation roles
<action>Present suggested agent list with types, explaining we can start with core ones and add others later</action>
<action>Confirm which agents resonate with their vision</action>
**Workflows Planning:**
<action>Intelligently suggest workflows that complement the proposed agents</action>
**Example Workflow Patterns by Domain:**
- Data/Analytics: analyze-dataset, create-dashboard, generate-report
- Gaming/Creative: session-prep, generate-encounter, world-building
- Team/Business: planning, facilitation, documentation workflows
<action>For each workflow, note whether it should be Document, Action, or Interactive type</action>
<action>Confirm which workflows are most important to start with</action>
<action>Determine which to create now vs placeholder</action>
**Tasks Planning (optional):**
<ask>Any special tasks that don't warrant full workflows?</ask>
<action if="tasks needed">For each task, capture name, purpose, and whether standalone or supporting</action>
<template-output>module_components</template-output>
</step>
<step n="2b" goal="Determine module complexity">
<action>Based on components, intelligently determine module type using criteria:</action>
**Simple Module Criteria:**
- 1-2 agents, all Simple type
- 1-3 workflows
- No complex integrations
**Standard Module Criteria:**
- 2-4 agents with mixed types
- 3-8 workflows
- Some shared resources
**Complex Module Criteria:**
- 4+ agents or multiple Module-type agents
- 8+ workflows
- Complex interdependencies
- External integrations
<action>Present determined module type with explanation of what structure will be set up</action>
<template-output>module_type</template-output>
</step>
<step n="3" goal="Create module directory structure">
<critical>Use module path determined in Step 1:</critical>
- The module base path is {{module_path}}
<action>Create base module directories at the determined path:</action>
```
{{module_code}}/
├── agents/ # Agent definitions
├── workflows/ # Workflow folders
├── tasks/ # Task files (if any)
├── templates/ # Shared templates
├── data/ # Module data files
├── _module-installer/ # Installation configuration
│ └── install-config.yaml # Configuration questions (config.yaml generated at install time)
└── README.md # Module documentation
```
<action>Create installer directory:</action>
**INSTALLED MODULE STRUCTURE** (generated in target project after installation):
```
{{module_code}}/
├── agents/ # Compiled agents
├── workflows/ # Workflow instances
├── config.yaml # Generated from install-config.yaml during installation
└── data/ # User data directory
```
**SOURCE MODULE** (module-installer is for installation only, not copied to target):
```
{{module_code}}/
├── _module-installer/
│ ├── install-config.yaml # Configuration questions
│ ├── installer.js # Optional custom installation logic
│ └── assets/ # Files to copy during install
```
<template-output>directory_structure</template-output>
</step>
<step n="4" goal="Plan module configuration fields">
<action>Based on the module purpose and components, determine what configuration settings the module needs</action>
**Configuration Field Planning:**
<ask>Does your module need any user-configurable settings during installation?</ask>
**Common configuration patterns:**
- Output/data paths (where module saves files)
- Feature toggles (enable/disable functionality)
- Integration settings (API keys, external services)
- Behavior preferences (automation level, detail level)
- User skill level or experience settings
<action>For each configuration field needed, determine:</action>
1. Field name (snake_case)
2. Whether it's INTERACTIVE (asks user) or STATIC (hardcoded)
3. Prompt text (if interactive)
4. Default value
5. Type: text input, single-select, or multi-select
6. Result template (how the value gets stored)
<action>Store planned configuration fields for installer generation in step 7</action>
<template-output>module_config_fields</template-output>
</step>
<step n="5" goal="Create first agent" optional="true">
<ask>Create your first agent now? [yes/no]</ask>
<check if="yes">
<action>Invoke agent builder workflow: {agent_builder}</action>
<action>Pass module_components as context input</action>
<action>Guide them to create the primary agent for the module</action>
<critical>Save to module's agents folder:</critical>
- Save to {{module_path}}/agents/
</check>
<check if="no">
<action>Create placeholder file in agents folder with TODO notes including agent name, purpose, and type</action>
</check>
<template-output>first_agent</template-output>
</step>
<step n="6" goal="Create first workflow" optional="true">
<ask>Create your first workflow now? [yes/no]</ask>
<check if="yes">
<action>Invoke workflow builder: {workflow_builder}</action>
<action>Pass module_components as context input</action>
<action>Guide them to create the primary workflow</action>
<critical>Save to module's workflows folder:</critical>
- Save to {{module_path}}/workflows/
</check>
<check if="no">
<action>Create placeholder workflow folder structure with TODO notes for workflow.yaml, instructions.md, and template.md if document workflow</action>
</check>
<template-output>first_workflow</template-output>
</step>
<step n="7" goal="Setup module installer">
<action>Load installer template from: {installer_templates}/install-config.yaml</action>
<critical>IMPORTANT: Create install-config.yaml NOT install-config.yaml</critical>
<critical>This is the STANDARD format that BMAD installer uses</critical>
Create module-installer/install-config.yaml:
```yaml
# {{module_name}} Module Configuration
# This file defines installation questions and module configuration values
code: {{module_code}}
name: "{{module_name}}"
default_selected: false # Set to true if this should be selected by default
# Welcome message shown during installation
prompt:
- "Thank you for choosing {{module_name}}!"
- "{{brief_module_description}}"
# Core config values are automatically inherited:
## user_name
## communication_language
## document_output_language
## output_folder
# ============================================================================
# CONFIGURATION FIELDS (from step 4 planning)
# ============================================================================
# Each field can be:
# 1. INTERACTIVE (has 'prompt' - asks user during installation)
# 2. STATIC (no 'prompt' - just uses 'result' value)
# ============================================================================
# EXAMPLE Interactive text input:
# output_path:
# prompt: "Where should {{module_code}} save outputs?"
# default: "output/{{module_code}}"
# result: "{project-root}/{value}"
# EXAMPLE Interactive single-select:
# detail_level:
# prompt: "How detailed should outputs be?"
# default: "standard"
# result: "{value}"
# single-select:
# - value: "minimal"
# label: "Minimal - Brief summaries only"
# - value: "standard"
# label: "Standard - Balanced detail"
# - value: "detailed"
# label: "Detailed - Comprehensive information"
# EXAMPLE Static value:
# module_version:
# result: "1.0.0"
# EXAMPLE Static path:
# data_path:
# result: "{project-root}/{bmad_folder}/{{module_code}}/data"
{{generated_config_fields_from_step_4}}
```
<critical>Save location:</critical>
- Save to {{module_path}}/module-installer/install-config.yaml
<ask>Does your module need custom installation logic (database setup, API registration, etc.)?</ask>
<check if="yes, create installer.js">
```javascript
// {{module_name}} Module Installer
// Custom installation logic
- @param {Object} options - Installation options
- @param {string} options.projectRoot - Project root directory
- @param {Object} options.config - Module configuration from install-config.yaml
- @param {Array} options.installedIDEs - List of IDE codes being configured
- @param {Object} options.logger - Logger instance (log, warn, error methods)
- @returns {boolean} - true if successful, false to abort installation
async function install(options) {
const { projectRoot, config, installedIDEs, logger } = options;
logger.log('Running {{module_name}} custom installer...');
// TODO: Add custom installation logic here
// Examples:
// - Create database tables
// - Download external assets
// - Configure API connections
// - Initialize data files
// - Set up webhooks or integrations
logger.log('{{module_name}} custom installation complete!');
return true;
}
module.exports = { install };
`````
<critical>Save location:</critical>
- Save to {{module_path}}/module-installer/installer.js
</check>
<check if="no">
<action>Skip installer.js creation - the standard installer will handle everything</action>
</check>
<template-output>installer_config</template-output>
</step>
<step n="8" goal="Create module documentation">
Generate comprehensive README.md:
````markdown
# {{module_name}}
{{module_purpose}}
## Overview
This module provides:
{{component_summary}}
## Installation
```bash
bmad install {{module_code}}
`````
````
## Components
### Agents ({{agent_count}})
{{agent_documentation}}
### Workflows ({{workflow_count}})
{{workflow_documentation}}
### Tasks ({{task_count}})
{{task_documentation}}
## Quick Start
1. **Load the main agent:**
```
agent {{primary_agent}}
```
2. **View available commands:**
```
*help
```
3. **Run the main workflow:**
```
workflow {{primary_workflow}}
```
## Module Structure
```
{{directory_tree}}
```
## Configuration
The module can be configured in `{bmad_folder}/{{module_code}}/config.yaml`
Key settings:
{{configuration_options}}
## Examples
### Example 1: {{example_use_case}}
{{example_walkthrough}}
## Development Roadmap
- [ ] {{roadmap_item_1}}
- [ ] {{roadmap_item_2}}
- [ ] {{roadmap_item_3}}
## Contributing
To extend this module:
1. Add new agents using `create-agent` workflow
2. Add new workflows using `create-workflow` workflow
3. Submit improvements via pull request
## Author
Created by {{user_name}} on {{date}}
````
<template-output>module_readme</template-output>
</step>
<step n="9" goal="Generate component roadmap">
Create a development roadmap for remaining components:
**TODO.md file:**
```markdown
# {{module_name}} Development Roadmap
## Phase 1: Core Components
{{phase1_tasks}}
## Phase 2: Enhanced Features
{{phase2_tasks}}
## Phase 3: Polish and Integration
{{phase3_tasks}}
## Quick Commands
Create new agent:
```
workflow create-agent
```
Create new workflow:
```
workflow create-workflow
```
## Notes
{{development_notes}}
```
Ask if user wants to:
1. Continue building more components now
2. Save roadmap for later development
3. Test what's been built so far
<template-output>development_roadmap</template-output>
</step>
<step n="10" goal="Validate and finalize module">
<action>Run validation checks:</action>
**Structure validation:**
- All required directories created
- Config files properly formatted
- Installer configuration valid
**Component validation:**
- At least one agent or workflow exists (or planned)
- All references use correct paths
- Module code consistent throughout
**Documentation validation:**
- README.md complete
- Installation instructions clear
- Examples provided
<action>Present summary to {user_name}:</action>
- Module name and code
- Location path
- Agent count (created vs planned)
- Workflow count (created vs planned)
- Task count
- Installer status
<action>Provide next steps guidance:</action>
1. Complete remaining components using roadmap
2. Run the BMAD Method installer to this project location
3. Select 'Compile Agents' option after confirming folder
4. Module will be compiled and available for use
5. Test with bmad install command
6. Share or integrate with existing system
<ask>Would you like to:
- Create another component now?
- Test the module installation?
- Exit and continue later?
</ask>
<template-output>module_summary</template-output>
</step>
</workflow>

View File

@ -1,400 +0,0 @@
# BMAD Module Structure Guide
## What is a Module?
A BMAD module is a self-contained package of agents, workflows, tasks, and resources that work together to provide specialized functionality. Think of it as an expansion pack for the BMAD Method.
## Module Architecture
### Core Structure
```
# SOURCE MODULE (in BMAD-METHOD project)
src/modules/{module-code}/
├── agents/ # Agent definitions (.agent.yaml)
├── workflows/ # Workflow folders
├── tasks/ # Task files
├── tools/ # Tool files
├── templates/ # Shared templates
├── data/ # Static data
├── _module-installer/ # Installation configuration
│ ├── install-config.yaml # Installation questions & config
│ ├── installer.js # Optional custom install logic
│ └── assets/ # Files to copy during install
└── README.md # Module documentation
# INSTALLED MODULE (in target project)
{project-root}/{bmad_folder}/{module-code}/
├── agents/ # Compiled agent files (.md)
├── workflows/ # Workflow instances
├── tasks/ # Task files
├── tools/ # Tool files
├── templates/ # Templates
├── data/ # Module data
├── config.yaml # Generated from install-config.yaml
└── README.md # Module documentation
```
## Module Types by Complexity
### Simple Module (1-2 agents, 2-3 workflows)
Perfect for focused, single-purpose tools.
**Example: Code Review Module**
- 1 Reviewer Agent
- 2 Workflows: quick-review, deep-review
- Clear, narrow scope
### Standard Module (3-5 agents, 5-10 workflows)
Comprehensive solution for a domain.
**Example: Project Management Module**
- PM Agent, Scrum Master Agent, Analyst Agent
- Workflows: sprint-planning, retrospective, roadmap, user-stories
- Integrated component ecosystem
### Complex Module (5+ agents, 10+ workflows)
Full platform or framework.
**Example: RPG Toolkit Module**
- DM Agent, NPC Agent, Monster Agent, Loot Agent, Map Agent
- 15+ workflows for every aspect of game management
- Multiple interconnected systems
## Module Naming Conventions
### Module Code (kebab-case)
- `data-viz` - Data Visualization
- `team-collab` - Team Collaboration
- `rpg-toolkit` - RPG Toolkit
- `legal-assist` - Legal Assistant
### Module Name (Title Case)
- "Data Visualization Suite"
- "Team Collaboration Platform"
- "RPG Game Master Toolkit"
- "Legal Document Assistant"
## Component Guidelines
### Agents per Module
**Recommended Distribution:**
- **Primary Agent (1)**: The main interface/orchestrator
- **Specialist Agents (2-4)**: Domain-specific experts
- **Utility Agents (0-2)**: Helper/support functions
**Anti-patterns to Avoid:**
- Too many overlapping agents
- Agents that could be combined
- Agents without clear purpose
### Workflows per Module
**Categories:**
- **Core Workflows (2-3)**: Essential functionality
- **Feature Workflows (3-5)**: Specific capabilities
- **Utility Workflows (2-3)**: Supporting operations
- **Admin Workflows (0-2)**: Maintenance/config
**Workflow Complexity Guide:**
- Simple: 3-5 steps, single output
- Standard: 5-10 steps, multiple outputs
- Complex: 10+ steps, conditional logic, sub-workflows
### Tasks per Module
Tasks should be used for:
- Single-operation utilities
- Shared subroutines
- Quick actions that don't warrant workflows
## Module Dependencies
### Internal Dependencies
- Agents can reference module workflows
- Workflows can invoke module tasks
- Tasks can use module templates
### External Dependencies
- Reference other modules via full paths
- Declare dependencies in config.yaml
- Version compatibility notes
### Workflow Vendoring (Advanced)
For modules that need workflows from other modules but want to remain standalone, use **workflow vendoring**:
**In Agent YAML:**
```yaml
menu:
- trigger: command-name
exec: '{project-root}/{bmad_folder}/SOURCE_MODULE/workflows/path/workflow.md'
workflow-install: '{project-root}/{bmad_folder}/THIS_MODULE/workflows/vendored/workflow.md'
description: 'Command description'
```
**What Happens:**
- During installation, workflows are copied from `workflow` to `workflow-install` location
- Vendored workflows get `config_source` updated to reference this module's config
- Compiled agent only references the `workflow-install` path
- Module becomes fully standalone - no source module dependency required
**Use Cases:**
- Specialized modules that reuse common workflows with different configs
- Domain-specific adaptations (e.g., game dev using standard dev workflows)
- Testing workflows in isolation
**Benefits:**
- Module independence (no forced dependencies)
- Clean namespace (workflows in your module)
- Config isolation (use your module's settings)
- Customization ready (modify vendored workflows freely)
## Installation Infrastructure
### Required: module-installer/install-config.yaml
This file defines both installation questions AND static configuration values:
```yaml
# Module metadata
code: module-code
name: 'Module Name'
default_selected: false
# Welcome message during installation
prompt:
- 'Welcome to Module Name!'
- 'Brief description here'
# Core values automatically inherited from installer:
## user_name
## communication_language
## document_output_language
## output_folder
# INTERACTIVE fields (ask user during install)
output_location:
prompt: 'Where should module outputs be saved?'
default: 'output/module-code'
result: '{project-root}/{value}'
feature_level:
prompt: 'Which feature set?'
default: 'standard'
result: '{value}'
single-select:
- value: 'basic'
label: 'Basic - Core features only'
- value: 'standard'
label: 'Standard - Recommended features'
- value: 'advanced'
label: 'Advanced - All features'
# STATIC fields (no prompt, just hardcoded values)
module_version:
result: '1.0.0'
data_path:
result: '{project-root}/{bmad_folder}/module-code/data'
```
**Key Points:**
- File is named `install-config.yaml` (NOT install-config.yaml)
- Supports both interactive prompts and static values
- `result` field uses placeholders: `{value}`, `{project-root}`, `{directory_name}`
- Installer generates final `config.yaml` from this template
### Optional: module-installer/installer.js
For complex installations requiring custom logic:
```javascript
/**
* @param {Object} options - Installation options
* @param {string} options.projectRoot - Target project directory
* @param {Object} options.config - Config from install-config.yaml
* @param {Array} options.installedIDEs - IDEs being configured
* @param {Object} options.logger - Logger (log, warn, error)
* @returns {boolean} - true if successful
*/
async function install(options) {
// Custom installation logic here
// - Database setup
// - API configuration
// - External downloads
// - Integration setup
return true;
}
module.exports = { install };
```
### Optional: module-installer/assets/
Files to copy during installation:
- External configurations
- Documentation
- Example files
- Integration scripts
## Module Lifecycle
### Development Phases
1. **Planning Phase**
- Define scope and purpose
- Identify components
- Design architecture
2. **Scaffolding Phase**
- Create directory structure
- Generate configurations
- Setup installer
3. **Building Phase**
- Create agents incrementally
- Build workflows progressively
- Add tasks as needed
4. **Testing Phase**
- Test individual components
- Verify integration
- Validate installation
5. **Deployment Phase**
- Package module
- Document usage
- Distribute/share
## Best Practices
### Module Cohesion
- All components should relate to module theme
- Clear boundaries between modules
- No feature creep
### Progressive Enhancement
- Start with MVP (1 agent, 2 workflows)
- Add components based on usage
- Refactor as patterns emerge
### Documentation Standards
- Every module needs README.md
- Each agent needs purpose statement
- Workflows need clear descriptions
- Include examples and quickstart
### Naming Consistency
- Use module code prefix for uniqueness
- Consistent naming patterns within module
- Clear, descriptive names
## Example Modules
### Example 1: Personal Productivity
```
productivity/
├── agents/
│ ├── task-manager.md # GTD methodology
│ └── focus-coach.md # Pomodoro timer
├── workflows/
│ ├── daily-planning/ # Morning routine
│ ├── weekly-review/ # Week retrospective
│ └── project-setup/ # New project init
└── config.yaml
```
### Example 2: Content Creation
```
content/
├── agents/
│ ├── writer.md # Blog/article writer
│ ├── editor.md # Copy editor
│ └── seo-optimizer.md # SEO specialist
├── workflows/
│ ├── blog-post/ # Full blog creation
│ ├── social-media/ # Social content
│ ├── email-campaign/ # Email sequence
│ └── content-calendar/ # Planning
└── templates/
├── blog-template.md
└── email-template.md
```
### Example 3: DevOps Automation
```
devops/
├── agents/
│ ├── deploy-master.md # Deployment orchestrator
│ ├── monitor.md # System monitoring
│ ├── incident-responder.md # Incident management
│ └── infra-architect.md # Infrastructure design
├── workflows/
│ ├── ci-cd-setup/ # Pipeline creation
│ ├── deploy-app/ # Application deployment
│ ├── rollback/ # Emergency rollback
│ ├── health-check/ # System verification
│ └── incident-response/ # Incident handling
├── tasks/
│ ├── check-status.md # Quick status check
│ └── notify-team.md # Team notifications
└── data/
└── runbooks/ # Operational guides
```
## Module Evolution Pattern
```
Simple Module → Standard Module → Complex Module → Module Suite
(MVP) (Enhanced) (Complete) (Ecosystem)
```
## Common Pitfalls
1. **Over-engineering**: Starting too complex
2. **Under-planning**: No clear architecture
3. **Poor boundaries**: Module does too much
4. **Weak integration**: Components don't work together
5. **Missing docs**: No clear usage guide
## Success Metrics
A well-designed module has:
- ✅ Clear, focused purpose
- ✅ Cohesive components
- ✅ Smooth installation
- ✅ Comprehensive docs
- ✅ Room for growth
- ✅ Happy users!

View File

@ -1,52 +0,0 @@
# Build Module Workflow Configuration
name: create-module
description: "Interactive workflow to build complete BMAD modules with agents, workflows, tasks, and installation infrastructure"
author: "BMad"
# Critical variables load from config_source
config_source: "{project-root}/{bmad_folder}/bmb/config.yaml"
custom_module_location: "{config_source}:custom_module_location"
communication_language: "{config_source}:communication_language"
user_name: "{config_source}:user_name"
# Reference guides for module building
module_structure_guide: "{installed_path}/module-structure.md"
installer_templates: "{installed_path}/installer-templates/"
# Use existing build workflows
agent_builder: "{project-root}/{bmad_folder}/bmb/workflows/create-agent/workflow.yaml"
workflow_builder: "{project-root}/{bmad_folder}/bmb/workflows/create-workflow/workflow.yaml"
brainstorming_workflow: "{project-root}/{bmad_folder}/core/workflows/brainstorming/workflow.yaml"
brainstorming_context: "{installed_path}/brainstorm-context.md"
# Reference examples - for learning patterns
bmm_module_dir: "{project-root}/{bmad_folder}/bmm/"
cis_module_dir: "{project-root}/{bmad_folder}/cis/"
existing_agents_dir: "{project-root}/{bmad_folder}/*/agents/"
existing_workflows_dir: "{project-root}/{bmad_folder}/*/workflows/"
# Optional user inputs - discovered if they exist
input_file_patterns:
module_brief:
description: "Module brief with vision and requirements (optional)"
whole: "{output_folder}/module-brief-*.md"
load_strategy: "FULL_LOAD"
brainstorming:
description: "Brainstorming session outputs (optional)"
whole: "{output_folder}/brainstorming-*.md"
load_strategy: "FULL_LOAD"
# Module path and component files
installed_path: "{project-root}/{bmad_folder}/bmb/workflows/create-module"
template: false # This is an interactive scaffolding workflow
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Output configuration - creates entire module structure
# Save to custom_module_location/{{module_code}}
installer_output_folder: "{custom_module_location}/{{module_code}}"
standalone: true
# Web bundle configuration
web_bundle: false # BMB workflows run locally in BMAD-METHOD project

View File

@ -24,7 +24,6 @@ Use this checklist to validate module edits meet BMAD Core standards.
### Optional Fields (if used)
- [ ] custom_agent_location documented
- [ ] custom_module_location documented
- [ ] Module-specific fields documented in README

View File

@ -166,8 +166,8 @@ Expert agents support three types of menu actions:
## Notes for Module Creation:
1. **File Paths**:
- Agent files go in: `{custom_module_location}/{module_name}/agents/[agent-name].yaml`
- Sidecar folders go in: `{custom_module_location}/{module_name}/agents/[agent-name]-sidecar/`
- Agent files go in: `{custom_module_location}/{module_name}/agents/[agent-name]/[agent-name].yaml`
- Sidecar folders go in: `{custom_module_location}/{module_name}/agents/[agent-name]/[agent-name]-sidecar/`
2. **Variable Usage**:
- `{agent_sidecar_folder}` resolves to the agents sidecar folder destination after installation

View File

@ -11,7 +11,7 @@ nextStepFile: '{workflow_path}/steps/step-02-gather.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
targetWorkflowPath: '{custom_stand_alone_location}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Template References
# No workflow plan template needed - will create plan file directly
@ -83,7 +83,7 @@ After getting the workflow name:
**Check for existing workflows:**
- Look for folder at `{custom_workflow_location}/{new_workflow_name}/`
- Look for folder at `{custom_stand_alone_location}/workflows/{new_workflow_name}/`
- If it exists, inform the user and suggest or get from them a unique name or postfix
**Example alternatives:**

View File

@ -9,7 +9,7 @@ workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
thisStepFile: '{workflow_path}/steps/step-02-gather.md'
nextStepFile: '{workflow_path}/steps/step-03-tools-configuration.md'
# Output files for workflow creation process
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
targetWorkflowPath: '{custom_stand_alone_location}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Task References

View File

@ -9,7 +9,7 @@ workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
thisStepFile: '{workflow_path}/steps/step-03-tools-configuration.md'
nextStepFile: '{workflow_path}/steps/step-04-plan-review.md'
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
targetWorkflowPath: '{custom_stand_alone_location}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Documentation References

View File

@ -10,7 +10,7 @@ thisStepFile: '{workflow_path}/steps/step-04-plan-review.md'
nextStepFormDesign: '{workflow_path}/steps/step-05-output-format-design.md'
nextStepDesign: '{workflow_path}/steps/step-06-design.md'
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
targetWorkflowPath: '{custom_stand_alone_location}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Task References

View File

@ -9,7 +9,7 @@ workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
thisStepFile: '{workflow_path}/steps/step-05-output-format-design.md'
nextStepFile: '{workflow_path}/steps/step-06-design.md'
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
targetWorkflowPath: '{custom_stand_alone_location}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Task References

View File

@ -10,7 +10,7 @@ thisStepFile: '{workflow_path}/steps/step-06-design.md'
nextStepFile: '{workflow_path}/steps/step-07-build.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
targetWorkflowPath: '{custom_stand_alone_location}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Task References

View File

@ -10,7 +10,7 @@ thisStepFile: '{workflow_path}/steps/step-07-build.md'
nextStepFile: '{workflow_path}/steps/step-08-review.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
targetWorkflowPath: '{custom_stand_alone_location}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Template References
@ -95,7 +95,7 @@ Ready to proceed?"
Create the workflow folder structure in the target location:
```
{custom_workflow_location}/{workflow_name}/
{custom_stand_alone_location}/workflows/{workflow_name}/
├── workflow.md
├── steps/
│ ├── step-01-init.md

View File

@ -10,7 +10,7 @@ thisStepFile: '{workflow_path}/steps/step-08-review.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
targetWorkflowPath: '{custom_stand_alone_location}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
# Task References

View File

@ -9,7 +9,7 @@ workflow_path: '{project-root}/{bmad_folder}/bmb/workflows/create-workflow'
thisStepFile: '{workflow_path}/steps/step-09-complete.md'
workflowFile: '{workflow_path}/workflow.md'
# Output files for workflow creation process
targetWorkflowPath: '{custom_workflow_location}/{new_workflow_name}'
targetWorkflowPath: '{custom_stand_alone_location}/workflows/{new_workflow_name}'
workflowPlanFile: '{targetWorkflowPath}/workflow-plan-{new_workflow_name}.md'
completionFile: '{targetWorkflowPath}/completion-summary-{new_workflow_name}.md'
---

View File

@ -51,7 +51,7 @@ This uses **step-file architecture** for disciplined execution:
Load and read full config from {project-root}/{bmad_folder}/bmb/config.yaml and resolve:
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, `custom_workflow_location`
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, `custom_stand_alone_location`
### 2. First Step EXECUTION

View File

@ -198,8 +198,8 @@ module.exports = {
}
} else {
// Discover agents from custom location
const customAgentLocation = config.custom_agent_location
? resolvePath(config.custom_agent_location, config)
const customAgentLocation = config.custom_stand_alone_location
? resolvePath(config.custom_stand_alone_location, config)
: path.join(config.bmadFolder, 'custom', 'src', 'agents');
console.log(chalk.dim(`Searching for agents in: ${customAgentLocation}\n`));

View File

@ -236,9 +236,31 @@ class ConfigCollector {
}
this.collectedConfig[moduleName] = { ...this.existingConfig[moduleName] };
// Special handling for user_name: ensure it has a value
if (
moduleName === 'core' &&
(!this.collectedConfig[moduleName].user_name || this.collectedConfig[moduleName].user_name === '[USER_NAME]')
) {
this.collectedConfig[moduleName].user_name = this.getDefaultUsername();
}
// Also populate allAnswers for cross-referencing
for (const [key, value] of Object.entries(this.existingConfig[moduleName])) {
this.allAnswers[`${moduleName}_${key}`] = value;
// Ensure user_name is properly set in allAnswers too
let finalValue = value;
if (moduleName === 'core' && key === 'user_name' && (!value || value === '[USER_NAME]')) {
finalValue = this.getDefaultUsername();
}
this.allAnswers[`${moduleName}_${key}`] = finalValue;
}
} else if (moduleName === 'core') {
// No existing core config - ensure we at least have user_name
if (!this.collectedConfig[moduleName]) {
this.collectedConfig[moduleName] = {};
}
if (!this.collectedConfig[moduleName].user_name) {
this.collectedConfig[moduleName].user_name = this.getDefaultUsername();
this.allAnswers[`${moduleName}_user_name`] = this.getDefaultUsername();
}
}
// Show "no config" message for modules with no new questions

View File

@ -38,7 +38,6 @@ const { CLIUtils } = require('../../../lib/cli-utils');
const { ManifestGenerator } = require('./manifest-generator');
const { IdeConfigManager } = require('./ide-config-manager');
const { replaceAgentSidecarFolders } = require('./post-install-sidecar-replacement');
const { CustomHandler } = require('../custom/handler');
class Installer {
constructor() {
@ -52,7 +51,6 @@ class Installer {
this.dependencyResolver = new DependencyResolver();
this.configCollector = new ConfigCollector();
this.ideConfigManager = new IdeConfigManager();
this.customHandler = new CustomHandler();
this.installedFiles = []; // Track all installed files
this.ttsInjectedFiles = []; // Track files with TTS injection applied
}
@ -914,6 +912,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
await this.moduleManager.runModuleInstaller('core', bmadDir, {
installedIDEs: config.ides || [],
moduleConfig: moduleConfigs.core || {},
coreConfig: moduleConfigs.core || {},
logger: {
log: (msg) => console.log(msg),
error: (msg) => console.error(msg),
@ -931,6 +930,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
await this.moduleManager.runModuleInstaller(moduleName, bmadDir, {
installedIDEs: config.ides || [],
moduleConfig: moduleConfigs[moduleName] || {},
coreConfig: moduleConfigs.core || {},
logger: {
log: (msg) => console.log(msg),
error: (msg) => console.error(msg),
@ -1028,9 +1028,6 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
}
}
// Update custom content (add new files, don't remove existing)
await this.updateCustomContent(projectDir, bmadDir);
// Replace {agent_sidecar_folder} placeholders in all agent files
console.log(chalk.dim('\n Configuring agent sidecar folders...'));
const sidecarResults = await replaceAgentSidecarFolders(bmadDir);
@ -1168,133 +1165,6 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
return { success: true };
}
/**
* Update custom content (add new files without removing existing ones)
* @param {string} projectDir - Project directory
* @param {string} bmadDir - BMAD installation directory
*/
async updateCustomContent(projectDir, bmadDir) {
try {
// Find all custom content
const customContents = await this.customHandler.findCustomContent(projectDir);
if (customContents.length === 0) {
return; // No custom content to update
}
// Load core config
const coreConfigPath = path.join(bmadDir, 'bmb', 'config.yaml');
let coreConfig = {};
if (await fs.pathExists(coreConfigPath)) {
const yamlLib = require('yaml');
const coreConfigContent = await fs.readFile(coreConfigPath, 'utf8');
coreConfig = yamlLib.load(coreConfigContent);
}
console.log(chalk.dim('\nUpdating custom content...'));
for (const customPath of customContents) {
const customInfo = await this.customHandler.getCustomInfo(customPath);
if (customInfo) {
console.log(chalk.dim(` Checking: ${customInfo.name}`));
// Install only adds new files, doesn't remove existing ones
const results = await this.customHandler.install(
customPath,
bmadDir,
{
user_name: coreConfig.user_name,
communication_language: coreConfig.communication_language,
output_folder: coreConfig.output_folder,
bmad_folder: path.basename(bmadDir),
},
(filePath) => {
this.installedFiles.push(filePath);
},
);
// Only show if new files were added or preserved
if (results.filesCopied > 0 || results.preserved > 0) {
if (results.filesCopied > 0) {
console.log(chalk.dim(` Added ${results.filesCopied} new file(s)`));
}
if (results.preserved > 0) {
console.log(chalk.dim(` Preserved ${results.preserved} existing file(s)`));
}
}
}
}
} catch (error) {
console.warn(chalk.yellow(`Warning: Failed to update custom content: ${error.message}`));
}
}
/**
* Install custom content by ID
* @param {string} customId - Custom content ID
* @param {string} bmadDir - BMAD installation directory
* @param {Object} coreConfig - Core configuration
*/
async installCustomContent(customId, bmadDir, coreConfig) {
try {
// Find the custom content
const customContents = await this.customHandler.findCustomContent(process.cwd());
let customInfo = null;
let customPath = null;
for (const path of customContents) {
const info = await this.customHandler.getCustomInfo(path);
if (info && info.id === customId) {
customInfo = info;
customPath = path;
break;
}
}
if (!customInfo || !customPath) {
console.warn(chalk.yellow(`Warning: Custom content '${customId}' not found`));
return;
}
console.log(chalk.dim(` Installing: ${customInfo.name}`));
// Install the custom content
const results = await this.customHandler.install(
customPath,
bmadDir,
{
user_name: coreConfig.user_name,
communication_language: coreConfig.communication_language,
output_folder: coreConfig.output_folder,
bmad_folder: path.basename(bmadDir),
},
(filePath) => {
this.installedFiles.push(filePath);
},
);
// Show results
if (results.agentsInstalled > 0) {
console.log(chalk.dim(` ${results.agentsInstalled} agent(s) installed`));
}
if (results.workflowsInstalled > 0) {
console.log(chalk.dim(` ${results.workflowsInstalled} workflow(s) installed`));
}
if (results.filesCopied > 0) {
console.log(chalk.dim(` ${results.filesCopied} file(s) copied`));
}
if (results.preserved > 0) {
console.log(chalk.dim(` ${results.preserved} file(s) preserved`));
}
if (results.errors.length > 0) {
console.log(chalk.yellow(` ${results.errors.length} error(s)`));
for (const error of results.errors) console.log(chalk.dim(` - ${error}`));
}
} catch (error) {
console.error(chalk.red(`Failed to install custom content '${customId}':`, error.message));
}
}
/**
* Private: Create directory structure
*/

View File

@ -121,8 +121,14 @@ class ModuleManager {
for (const entry of entries) {
const fullPath = path.join(dir, entry.name);
// Skip hidden directories and node_modules
if (entry.name.startsWith('.') || entry.name === 'node_modules' || entry.name === 'dist' || entry.name === 'build') {
// Skip hidden directories, node_modules, and literal placeholder directories
if (
entry.name.startsWith('.') ||
entry.name === 'node_modules' ||
entry.name === 'dist' ||
entry.name === 'build' ||
entry.name === '{project-root}'
) {
continue;
}
@ -139,9 +145,14 @@ class ModuleManager {
// Check if this directory contains a module (install-config.yaml OR custom.yaml)
const installerConfigPath = path.join(fullPath, '_module-installer', 'install-config.yaml');
const customConfigPath = path.join(fullPath, 'custom.yaml');
const customConfigPath = path.join(fullPath, '_module-installer', 'custom.yaml');
const rootCustomConfigPath = path.join(fullPath, 'custom.yaml');
if ((await fs.pathExists(installerConfigPath)) || (await fs.pathExists(customConfigPath))) {
if (
(await fs.pathExists(installerConfigPath)) ||
(await fs.pathExists(customConfigPath)) ||
(await fs.pathExists(rootCustomConfigPath))
) {
modulePaths.add(fullPath);
// Don't scan inside modules - they might have their own nested structures
continue;
@ -176,11 +187,12 @@ class ModuleManager {
for (const entry of entries) {
if (entry.isDirectory()) {
const modulePath = path.join(this.modulesSourcePath, entry.name);
// Check for module structure (only install-config.yaml is valid now)
// Check for module structure (install-config.yaml OR custom.yaml)
const installerConfigPath = path.join(modulePath, '_module-installer', 'install-config.yaml');
const customConfigPath = path.join(modulePath, '_module-installer', 'custom.yaml');
// Skip if this doesn't look like a module
if (!(await fs.pathExists(installerConfigPath))) {
if (!(await fs.pathExists(installerConfigPath)) && !(await fs.pathExists(customConfigPath))) {
continue;
}
@ -228,13 +240,16 @@ class ModuleManager {
async getModuleInfo(modulePath, defaultName, sourceDescription) {
// Check for module structure (install-config.yaml OR custom.yaml)
const installerConfigPath = path.join(modulePath, '_module-installer', 'install-config.yaml');
const customConfigPath = path.join(modulePath, 'custom.yaml');
const customConfigPath = path.join(modulePath, '_module-installer', 'custom.yaml');
const rootCustomConfigPath = path.join(modulePath, 'custom.yaml');
let configPath = null;
if (await fs.pathExists(installerConfigPath)) {
configPath = installerConfigPath;
} else if (await fs.pathExists(customConfigPath)) {
configPath = customConfigPath;
} else if (await fs.pathExists(rootCustomConfigPath)) {
configPath = rootCustomConfigPath;
}
// Skip if this doesn't look like a module
@ -242,6 +257,8 @@ class ModuleManager {
return null;
}
// Mark as custom if it's using custom.yaml OR if it's outside src/modules
const isCustomSource = sourceDescription !== 'src/modules';
const moduleInfo = {
id: defaultName,
path: modulePath,
@ -252,7 +269,7 @@ class ModuleManager {
description: 'BMAD Module',
version: '5.0.0',
source: sourceDescription,
isCustom: configPath === customConfigPath,
isCustom: configPath === customConfigPath || configPath === rootCustomConfigPath || isCustomSource,
};
// Read module config for metadata
@ -295,8 +312,8 @@ class ModuleManager {
return srcModulePath;
}
// Also check for custom.yaml in src/modules
const customConfigPath = path.join(srcModulePath, 'custom.yaml');
// Also check for custom.yaml in src/modules/_module-installer
const customConfigPath = path.join(srcModulePath, '_module-installer', 'custom.yaml');
if (await fs.pathExists(customConfigPath)) {
return srcModulePath;
}
@ -314,13 +331,16 @@ class ModuleManager {
// Need to read configs to match by ID
for (const modulePath of allModulePaths) {
const installerConfigPath = path.join(modulePath, '_module-installer', 'install-config.yaml');
const customConfigPath = path.join(modulePath, 'custom.yaml');
const customConfigPath = path.join(modulePath, '_module-installer', 'custom.yaml');
const rootCustomConfigPath = path.join(modulePath, 'custom.yaml');
let configPath = null;
if (await fs.pathExists(installerConfigPath)) {
configPath = installerConfigPath;
} else if (await fs.pathExists(customConfigPath)) {
configPath = customConfigPath;
} else if (await fs.pathExists(rootCustomConfigPath)) {
configPath = rootCustomConfigPath;
}
if (configPath) {
@ -532,7 +552,8 @@ class ModuleManager {
}
// Skip config.yaml templates - we'll generate clean ones with actual values
if (file === 'config.yaml' || file.endsWith('/config.yaml')) {
// But allow custom.yaml which is used for custom modules
if ((file === 'config.yaml' || file.endsWith('/config.yaml')) && !file.endsWith('custom.yaml')) {
continue;
}
@ -1059,6 +1080,7 @@ class ModuleManager {
const result = await moduleInstaller.install({
projectRoot,
config: options.moduleConfig || {},
coreConfig: options.coreConfig || {},
installedIDEs: options.installedIDEs || [],
logger,
});