feat: Core Config and doc sharding is now optional in v4

This commit is contained in:
Brian Madison
2025-06-19 18:57:19 -05:00
parent 42a41969b0
commit ff6112d6c2
5 changed files with 406 additions and 4 deletions

View File

@@ -172,11 +172,37 @@ The upgrade process will:
After upgrading:
1. Review your documents in the `docs/` folder
2. Use `@bmad-master` agent to run the `doc-migration-task` to align your documents with V4 templates
3. If you have separate front-end and backend architecture docs, the migration task will help merge them into a unified `full-stack-architecture.md`
1. Review your documents in the `docs/` folder - if you had a PRD or architecture in your old project, copy it from the backup to the docs folder if they are not there.
2. Optionally run the `doc-migration-task` to align your documents with V4 templates - you can do this with your agent my saying something like: 'run {drag in task} against {drag prd or arch file from docs} to align with {drag the template from .bmad-core/templates/full-stack-architecture.md}
3. If you have separate front-end and backend architecture docs you can modify step 2 to merge both into a single full stack architecture or separate Front and Back end.
**Note**: The agents in `.bmad-core/` fully replace the items in `bmad-agent/`.
The reason #2 and 3 are optional is because now BMad V4 makes sharding optional for the SM. See [Core Configuration](#-core-configuration-new-in-v4)
**Note**: The agents in `.bmad-core/` fully replace the items in `bmad-agent/` - you can remove the backup folder versions.
### 🔧 Core Configuration (NEW in V4)
**Critical**: V4 introduces `bmad-core/core-config.yml` - a powerful configuration file that enables BMAD to work seamlessly with any project structure, whether it's V4-optimized or legacy. You can even now use non-standard PRDs and architectures!
#### What is core-config.yml?
This configuration file tells BMAD agents exactly where to find your project documents and how they're structured. It's the key to V4's flexibility and backwards compatibility.
#### Key Features:
- **Version Awareness**: Agents understand if your PRD/Architecture follows V4 conventions or earlier versions
- **Flexible Document Locations**: Works whether your epics are embedded in PRD or properly sharded
- **Developer Context**: Define which files the dev agent should always load
- **Debug Support**: Built-in logging for troubleshooting story implementation
#### Why It Matters:
- **Use BMAD with ANY project structure** - V3, V4, or custom layouts
- **No forced migrations** - Keep your existing document organization
- **Customize developer workflow** - Specify exactly which files provide context
- **Seamless upgrades** - Start with V3 docs and gradually adopt V4 patterns
See the [detailed core-config.yml guide](docs/user-guide.md#core-configuration-coreconfigyml) for configuration examples and best practices.
## Teams & Workflows

View File

@@ -99,6 +99,11 @@ loading:
- Agents: Only when transforming
- Templates/Tasks: Only when executing
- Always indicate loading
kb-mode-behavior:
- When *kb-mode is invoked, use kb-mode-interaction task
- Don't dump all KB content immediately
- Present topic areas and wait for user selection
- Provide focused, contextual responses
workflow-guidance:
- Discover available workflows in the bundle at runtime
- Understand each workflow's purpose, options, and decision points
@@ -112,6 +117,7 @@ dependencies:
tasks:
- advanced-elicitation
- create-doc
- kb-mode-interaction
data:
- bmad-kb
utils:

View File

@@ -66,6 +66,64 @@ npx bmad-method install
**Cost-Saving Tip**: Create large documents (PRDs, architecture) in web UI, then copy to `docs/prd.md` and `docs/architecture.md` in your project before switching to IDE for development.
## Core Configuration (core-config.yml)
**New in V4**: The `bmad-core/core-config.yml` file is a critical innovation that enables BMAD to work seamlessly with any project structure, providing maximum flexibility and backwards compatibility.
### What is core-config.yml?
This configuration file acts as a map for BMAD agents, telling them exactly where to find your project documents and how they're structured. It enables:
- **Version Flexibility**: Work with V3, V4, or custom document structures
- **Custom Locations**: Define where your documents and shards live
- **Developer Context**: Specify which files the dev agent should always load
- **Debug Support**: Built-in logging for troubleshooting
### Key Configuration Areas
#### PRD Configuration
- **prdVersion**: Tells agents if PRD follows v3 or v4 conventions
- **prdSharded**: Whether epics are embedded (false) or in separate files (true)
- **prdShardedLocation**: Where to find sharded epic files
- **epicFilePattern**: Pattern for epic filenames (e.g., `epic-{n}*.md`)
#### Architecture Configuration
- **architectureVersion**: v3 (monolithic) or v4 (sharded)
- **architectureSharded**: Whether architecture is split into components
- **architectureShardedLocation**: Where sharded architecture files live
#### Developer Files
- **devLoadAlwaysFiles**: List of files the dev agent loads for every task
- **devDebugLog**: Where dev agent logs repeated failures
- **agentCoreDump**: Export location for chat conversations
### Why It Matters
1. **No Forced Migrations**: Keep your existing document structure
2. **Gradual Adoption**: Start with V3 and migrate to V4 at your pace
3. **Custom Workflows**: Configure BMAD to match your team's process
4. **Intelligent Agents**: Agents automatically adapt to your configuration
### Common Configurations
**Legacy V3 Project**:
```yaml
prdVersion: v3
prdSharded: false
architectureVersion: v3
architectureSharded: false
```
**V4 Optimized Project**:
```yaml
prdVersion: v4
prdSharded: true
prdShardedLocation: docs/prd
architectureVersion: v4
architectureSharded: true
architectureShardedLocation: docs/architecture
```
## Core Philosophy
### Vibe CEO'ing

View File

@@ -0,0 +1,70 @@
# KB Mode Interaction Task
## Purpose
Provide a user-friendly interface to the BMAD knowledge base without overwhelming users with information upfront.
## Instructions
When entering KB mode (*kb-mode), follow these steps:
### 1. Welcome and Guide
Announce entering KB mode with a brief, friendly introduction:
"I've entered KB mode and have access to the full BMAD knowledge base. I can help you with detailed information about any aspect of BMAD-METHOD."
### 2. Present Topic Areas
Offer a concise list of main topic areas the user might want to explore:
**What would you like to know more about?**
1. **Setup & Installation** - Getting started with BMAD
2. **Workflows** - Choosing the right workflow for your project
3. **Web vs IDE** - When to use each environment
4. **Agents** - Understanding specialized agents and their roles
5. **Documents** - PRDs, Architecture, Stories, and more
6. **Agile Process** - How BMAD implements Agile methodologies
7. **Configuration** - Customizing BMAD for your needs
8. **Best Practices** - Tips for effective BMAD usage
Or ask me about anything else related to BMAD-METHOD!
### 3. Respond Contextually
- Wait for user's specific question or topic selection
- Provide focused, relevant information from the knowledge base
- Offer to dive deeper or explore related topics
- Keep responses concise unless user asks for detailed explanations
### 4. Interactive Exploration
- After answering, suggest related topics they might find helpful
- Maintain conversational flow rather than data dumping
- Use examples when appropriate
- Reference specific documentation sections when relevant
### 5. Exit Gracefully
When user is done or wants to exit KB mode:
- Summarize key points discussed if helpful
- Remind them they can return to KB mode anytime with *kb-mode
- Suggest next steps based on what was discussed
## Example Interaction
**User**: *kb-mode
**Assistant**: I've entered KB mode and have access to the full BMAD knowledge base. I can help you with detailed information about any aspect of BMAD-METHOD.
**What would you like to know more about?**
1. **Setup & Installation** - Getting started with BMAD
2. **Workflows** - Choosing the right workflow for your project
3. **Web vs IDE** - When to use each environment
4. **Agents** - Understanding specialized agents and their roles
5. **Documents** - PRDs, Architecture, Stories, and more
6. **Agile Process** - How BMAD implements Agile methodologies
7. **Configuration** - Customizing BMAD for your needs
8. **Best Practices** - Tips for effective BMAD usage
Or ask me about anything else related to BMAD-METHOD!
**User**: Tell me about workflows
**Assistant**: [Provides focused information about workflows from the KB, then offers to explore specific workflow types or related topics]

View File

@@ -884,6 +884,248 @@ This file allows you to define your preferred technologies, patterns, and standa
When creating custom web bundles or uploading to AI platforms, include your `technical-preferences.md` content to ensure agents have your preferences from the start of any conversation.
### Core Configuration (core-config.yml)
The `bmad-core/core-config.yml` file is a critical V4 innovation that enables BMAD to work seamlessly with any project structure, providing maximum flexibility and backwards compatibility.
#### Understanding core-config.yml
This configuration file acts as a map for BMAD agents, telling them exactly where to find your project documents and how they're structured. It's what makes V4 agents intelligent enough to work with V3 projects, custom layouts, or any document organization you prefer.
#### Configuration Structure
```yaml
core-project-information:
dev-story-location: docs/stories # Where completed stories are saved
prd:
prd-file: docs/prd.md
prdVersion: v4 # v3 or v4
prdSharded: true # false if epics are embedded in PRD
prdShardedLocation: docs/prd # Where sharded epics live
epicFilePattern: epic-{n}*.md # Pattern for epic files
architecture:
architecture-file: docs/architecture.md
architectureVersion: v4 # v3 or v4
architectureSharded: true # false if monolithic
architectureShardedLocation: docs/architecture
customTechnicalDocuments: null # Additional docs for SM
devLoadAlwaysFiles: # Files dev agent always loads
- docs/architecture/coding-standards.md
- docs/architecture/tech-stack.md
- docs/architecture/project-structure.md
devDebugLog: .ai/debug-log.md # Dev agent debug tracking
agentCoreDump: .ai/core-dump{n}.md # Export chat contents
```
#### Key Configuration Options
##### PRD Configuration
The Scrum Master agent uses these settings to locate epics:
**V4 Sharded Structure:**
```yaml
prd:
prd-file: docs/prd.md
prdVersion: v4
prdSharded: true
prdShardedLocation: docs/prd
epicFilePattern: epic-{n}*.md
```
**V3 Embedded Epics:**
```yaml
prd:
prd-file: docs/prd.md
prdVersion: v3
prdSharded: false # Epics are inside PRD
```
**Custom Sharded Location:**
```yaml
prd:
prd-file: docs/product-requirements.md
prdVersion: v4
prdSharded: true
prdShardedLocation: docs # Epics in docs/ not docs/prd/
epicFilePattern: epic-*.md
```
##### Architecture Configuration
Similar flexibility for architecture documents:
**V4 Sharded Architecture:**
```yaml
architecture:
architecture-file: docs/architecture.md
architectureVersion: v4
architectureSharded: true
architectureShardedLocation: docs/architecture
```
**V3 Monolithic Architecture:**
```yaml
architecture:
architecture-file: docs/technical-architecture.md
architectureVersion: v3
architectureSharded: false # All in one file
```
##### Developer Context Files
Define which files the dev agent should always load:
```yaml
devLoadAlwaysFiles:
- docs/architecture/coding-standards.md
- docs/architecture/tech-stack.md
- docs/architecture/project-structure.md
- docs/api-contracts.yaml
- docs/database-schema.md
- .env.example
```
This ensures the dev agent always has critical context without needing to search for it.
##### Debug and Export Options
**Debug Log:**
```yaml
devDebugLog: .ai/debug-log.md
```
When the dev agent encounters repeated failures implementing a story, it logs issues here to avoid repeating the same mistakes.
**Core Dump:**
```yaml
agentCoreDump: .ai/core-dump{n}.md
```
Export entire chat conversations for preservation or analysis. The `{n}` is replaced with a number.
#### Common Configurations
##### Legacy V3 Project
```yaml
core-project-information:
dev-story-location: docs/stories
prd:
prd-file: docs/prd.md
prdVersion: v3
prdSharded: false
architecture:
architecture-file: docs/architecture.md
architectureVersion: v3
architectureSharded: false
devLoadAlwaysFiles: []
```
##### Hybrid Project (V3 PRD, V4 Architecture)
```yaml
core-project-information:
dev-story-location: .ai/stories
prd:
prd-file: docs/product-requirements.md
prdVersion: v3
prdSharded: false
architecture:
architecture-file: docs/architecture.md
architectureVersion: v4
architectureSharded: true
architectureShardedLocation: docs/architecture
devLoadAlwaysFiles:
- docs/architecture/tech-stack.md
```
##### Custom Organization
```yaml
core-project-information:
dev-story-location: development/completed-stories
prd:
prd-file: planning/requirements.md
prdVersion: v4
prdSharded: true
prdShardedLocation: planning/epics
epicFilePattern: requirement-{n}.md
architecture:
architecture-file: technical/system-design.md
architectureVersion: v4
architectureSharded: true
architectureShardedLocation: technical/components
customTechnicalDocuments:
- technical/api-guide.md
- technical/deployment.md
devLoadAlwaysFiles:
- technical/coding-guidelines.md
- technical/git-workflow.md
```
#### Migration Strategies
##### Gradual V3 to V4 Migration
Start with V3 documents and gradually adopt V4 patterns:
1. **Initial State**: Set `prdVersion: v3` and `prdSharded: false`
2. **Shard PRD**: Use PO agent to shard, then update to `prdSharded: true`
3. **Update Version**: Change to `prdVersion: v4` after using V4 templates
4. **Repeat for Architecture**: Same process for architecture documents
##### Working with Mixed Teams
If some team members use V3 and others use V4:
```yaml
# Support both patterns
customTechnicalDocuments:
- docs/legacy-requirements.md # V3 format
- docs/prd.md # V4 format
```
#### Best Practices
1. **Always Configure for Your Structure**: Don't force your project to match BMAD defaults
2. **Keep devLoadAlwaysFiles Focused**: Only include files needed for every dev task
3. **Use Debug Log**: Enable when troubleshooting story implementation issues
4. **Version Control core-config.yml**: Track changes to understand project evolution
5. **Document Custom Patterns**: If using custom epicFilePattern, document it
#### Troubleshooting
**Scrum Master Can't Find Epics:**
- Check `prdSharded` matches your structure
- Verify `prdShardedLocation` path exists
- Confirm `epicFilePattern` matches your files
**Dev Agent Missing Context:**
- Add critical files to `devLoadAlwaysFiles`
- Ensure file paths are correct
- Check files exist and are readable
**Architecture Not Loading:**
- Verify `architecture-file` path
- Check `architectureVersion` setting
- Confirm sharding configuration matches reality
### Extension Packs
Add specialized capabilities: