bmad-method 4.2.0 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/.bmad-core/agents/analyst.md +14 -20
  2. package/.bmad-core/agents/architect.md +15 -20
  3. package/.bmad-core/agents/bmad-master.md +18 -26
  4. package/.bmad-core/agents/bmad-orchestrator.md +16 -28
  5. package/.bmad-core/agents/dev.md +5 -4
  6. package/.bmad-core/agents/pm.md +11 -16
  7. package/.bmad-core/agents/sm.md +20 -25
  8. package/.bmad-core/bmad-core-config.yml +60 -0
  9. package/.bmad-core/data/bmad-kb.md +12 -1
  10. package/.bmad-core/tasks/doc-migration-task.md +91 -146
  11. package/.bmad-core/tasks/document-project.md +389 -0
  12. package/.bmad-core/tasks/generate-ai-frontend-prompt.md +41 -48
  13. package/.bmad-core/tasks/index-docs.md +8 -3
  14. package/.bmad-core/templates/architecture-tmpl.md +15 -12
  15. package/.bmad-core/templates/fullstack-architecture-tmpl.md +85 -103
  16. package/.bmad-core/templates/prd-tmpl.md +1 -1
  17. package/.bmad-core/templates/simple-project-prd-tmpl.md +461 -0
  18. package/.bmad-core/templates/story-tmpl.md +2 -2
  19. package/.bmad-core/utils/workflow-management.md +14 -15
  20. package/.bmad-core/web-bundles/agents/analyst.txt +26 -21
  21. package/.bmad-core/web-bundles/agents/architect.txt +605 -233
  22. package/.bmad-core/web-bundles/agents/bmad-master.txt +457 -1039
  23. package/.bmad-core/web-bundles/agents/bmad-orchestrator.txt +36 -903
  24. package/.bmad-core/web-bundles/agents/dev.txt +5 -4
  25. package/.bmad-core/web-bundles/agents/pm.txt +476 -17
  26. package/.bmad-core/web-bundles/agents/po.txt +2 -2
  27. package/.bmad-core/web-bundles/agents/sm.txt +22 -27
  28. package/.bmad-core/web-bundles/agents/ux-expert.txt +41 -48
  29. package/.bmad-core/web-bundles/teams/team-all.txt +4394 -4447
  30. package/.bmad-core/web-bundles/teams/team-fullstack.txt +2760 -2809
  31. package/.bmad-core/web-bundles/teams/team-no-ui.txt +2718 -2760
  32. package/.bmad-core/workflows/greenfield-fullstack.yml +3 -3
  33. package/.claude/commands/analyst.md +14 -20
  34. package/.claude/commands/architect.md +15 -20
  35. package/.claude/commands/bmad-master.md +18 -26
  36. package/.claude/commands/bmad-orchestrator.md +16 -28
  37. package/.claude/commands/dev.md +5 -4
  38. package/.claude/commands/pm.md +11 -16
  39. package/.claude/commands/sm.md +20 -25
  40. package/.cursor/rules/analyst.mdc +13 -19
  41. package/.cursor/rules/architect.mdc +14 -19
  42. package/.cursor/rules/bmad-master.mdc +18 -26
  43. package/.cursor/rules/bmad-orchestrator.mdc +15 -27
  44. package/.cursor/rules/dev.mdc +5 -4
  45. package/.cursor/rules/pm.mdc +11 -16
  46. package/.cursor/rules/sm.mdc +19 -24
  47. package/.releaserc.json +2 -1
  48. package/.vscode/settings.json +4 -0
  49. package/.windsurf/rules/analyst.md +13 -19
  50. package/.windsurf/rules/architect.md +14 -19
  51. package/.windsurf/rules/bmad-master.md +18 -26
  52. package/.windsurf/rules/bmad-orchestrator.md +15 -27
  53. package/.windsurf/rules/dev.md +5 -4
  54. package/.windsurf/rules/pm.md +11 -16
  55. package/.windsurf/rules/sm.md +19 -24
  56. package/CHANGELOG.md +120 -2
  57. package/CONTRIBUTING.md +2 -0
  58. package/README.md +20 -2
  59. package/{.bmad-core → creator-tools}/tasks/create-agent.md +10 -12
  60. package/{.bmad-core/tasks/create-expansion-pack.md → creator-tools/tasks/generate-expansion-pack.md} +8 -6
  61. package/docs/bmad-workflow-guide.md +161 -0
  62. package/docs/claude-code-guide.md +119 -0
  63. package/docs/core-architecture.md +213 -0
  64. package/docs/cursor-guide.md +127 -0
  65. package/docs/how-to-contribute-with-pull-requests.md +141 -0
  66. package/docs/roo-code-guide.md +140 -0
  67. package/docs/user-guide.md +1044 -0
  68. package/docs/versioning-and-releases.md +4 -4
  69. package/docs/windsurf-guide.md +127 -0
  70. package/expansion-packs/README.md +1 -111
  71. package/expansion-packs/infrastructure-devops/agents/infra-devops-platform.md +3 -3
  72. package/expansion-packs/infrastructure-devops/tasks/create-doc.md +74 -0
  73. package/package.json +19 -13
  74. package/tools/builders/web-builder.js +16 -15
  75. package/tools/installer/README.md +2 -2
  76. package/tools/installer/bin/bmad.js +50 -29
  77. package/tools/installer/lib/file-manager.js +20 -3
  78. package/tools/installer/lib/ide-setup.js +11 -1
  79. package/tools/installer/lib/installer.js +149 -29
  80. package/tools/installer/package-lock.json +537 -335
  81. package/tools/installer/package.json +7 -7
  82. package/tools/lib/dependency-resolver.js +1 -1
  83. package/tools/semantic-release-sync-installer.js +31 -0
  84. package/tools/sync-installer-version.js +34 -0
  85. package/tools/upgraders/v3-to-v4-upgrader.js +18 -13
  86. package/tools/version-bump.js +33 -26
  87. package/tools/yaml-format.js +54 -25
  88. package/.bmad-core/schemas/agent-team-schema.yml +0 -153
  89. package/.bmad-core/tasks/create-team.md +0 -229
  90. package/.claude/settings.local.json +0 -22
@@ -8,7 +8,7 @@ The easiest way to release new versions is through **automatic semantic releases
8
8
 
9
9
  Use these prefixes to control what type of release happens:
10
10
 
11
- ```bash
11
+ ````bash
12
12
  fix: resolve CLI argument parsing bug # → patch release (4.1.0 → 4.1.1)
13
13
  feat: add new agent orchestration mode # → minor release (4.1.0 → 4.2.0)
14
14
  feat!: redesign CLI interface # → major release (4.1.0 → 5.0.0)
@@ -35,13 +35,13 @@ git push
35
35
 
36
36
  # That's it! Release happens automatically 🎉
37
37
  # Users can now run: npx bmad-method (and get the new version)
38
- ```
38
+ ````
39
39
 
40
40
  ### Commits That DON'T Trigger Releases
41
41
 
42
42
  These commit types won't create releases (use them for maintenance):
43
43
 
44
- ```bash
44
+ ````bash
45
45
  chore: update dependencies # No release
46
46
  docs: fix typo in readme # No release
47
47
  style: format code # No release
@@ -52,7 +52,7 @@ test: add unit tests # No release
52
52
 
53
53
  ```bash
54
54
  npm run release:test # Safe to run locally - tests the config
55
- ```
55
+ ````
56
56
 
57
57
  ---
58
58
 
@@ -0,0 +1,127 @@
1
+ # BMAD Method Guide for Windsurf
2
+
3
+ This guide walks you through the complete BMAD workflow using Windsurf as your AI-powered IDE.
4
+
5
+ ## Step 1: Install BMAD in Your Project
6
+
7
+ 1. Navigate to your project directory
8
+ 2. Run the BMAD installer:
9
+ ```bash
10
+ npx bmad-method install
11
+ ```
12
+ 3. When prompted:
13
+ - **Installation Type**: Choose "Complete installation (recommended)"
14
+ - **IDE**: Select "Windsurf"
15
+
16
+ This creates a `.bmad-core` folder with all agents and a `.windsurf/rules` folder with agent rules.
17
+
18
+ ## Step 2: Set Up Team Fullstack in Gemini
19
+
20
+ For ideation and planning, use Google's Gemini with the team-fullstack configuration:
21
+
22
+ 1. Open [Google AI Studio (Gemini)](https://aistudio.google.com/)
23
+ 2. Create a new chat
24
+ 3. Copy the contents of `/Users/brianmadison/dev/BMAD-METHOD/.bmad-core/web-bundles/teams/team-fullstack.txt`
25
+ 4. Paste this content into Gemini to set up the team
26
+
27
+ ### Gemini Planning Phase
28
+
29
+ In Gemini, ask the BMAD team to help you:
30
+
31
+ - **Ideate** your project concept
32
+ - **Brainstorm** features and requirements
33
+ - **Create a PRD** (Product Requirements Document)
34
+ - **Design the architecture**
35
+
36
+ Ask questions like:
37
+
38
+ - "Help me brainstorm a [type of application] that does [core functionality]"
39
+ - "Create a comprehensive PRD for this concept"
40
+ - "Design the technical architecture for this system"
41
+
42
+ Copy the PRD and architecture documents that Gemini creates into your project's `docs/` folder:
43
+
44
+ - `docs/prd.md`
45
+ - `docs/architecture.md`
46
+
47
+ ## Step 3: Back to Windsurf - Document Sharding
48
+
49
+ Once you have your PRD and architecture documents in the `docs/` folder:
50
+
51
+ 1. **Start a new chat in Windsurf**
52
+ 2. **Load the bmad-master agent**: Type `@bmad-master`
53
+ 3. **Shard the PRD**: Type `*shard-doc docs/prd.md prd`
54
+ 4. **Shard the architecture**: Type `*shard-doc docs/architecture.md architecture`
55
+
56
+ This creates organized folders:
57
+
58
+ - `docs/prd/` - Contains broken down PRD sections
59
+ - `docs/architecture/` - Contains broken down architecture sections
60
+
61
+ ## Step 4: Story Development Cycle
62
+
63
+ Now begin the iterative development cycle:
64
+
65
+ ### Create Stories (Scrum Master)
66
+
67
+ 1. **Start a new chat**
68
+ 2. **Load SM agent**: Type `@sm`
69
+ 3. **Create story**: Type `*create` (this runs the create-next-story task)
70
+ 4. **Review the generated story**
71
+ 5. **If approved**: Set story status to "Approved" in the story file
72
+
73
+ ### Implement Stories (Developer)
74
+
75
+ 1. **Start a new chat**
76
+ 2. **Load Dev agent**: Type `@dev`
77
+ 3. **The agent will ask which story to implement**
78
+ 4. **Follow the development tasks** the agent provides
79
+ 5. **When story is complete**: Mark status as "Done"
80
+
81
+ ### Repeat the Cycle
82
+
83
+ 1. **Start a new chat with SM agent** (`@sm`)
84
+ 2. **Create next story**: Type `*create`
85
+ 3. **Review and approve**
86
+ 4. **Start new chat with Dev agent** (`@dev`)
87
+ 5. **Implement the story**
88
+ 6. **Repeat until project complete**
89
+
90
+ ## Available Agent Rules in Windsurf
91
+
92
+ All BMAD agents are available as Windsurf rules (use `@` prefix):
93
+
94
+ - `@bmad-master` - Universal task executor
95
+ - `@sm` - Scrum Master for story creation
96
+ - `@dev` - Full-stack developer for implementation
97
+ - `@architect` - Solution architect for design
98
+ - `@pm` - Product manager for planning
99
+ - `@analyst` - Business analyst for requirements
100
+ - `@qa` - QA specialist for testing
101
+ - `@po` - Product owner for prioritization
102
+ - `@ux-expert` - UX specialist for design
103
+
104
+ ## Windsurf-Specific Features
105
+
106
+ - **Agent rules are stored in**: `.windsurf/rules/` as `.md` files
107
+ - **Rule activation**: Rules activate when you mention `@agent-name` in chat
108
+ - **Collaborative workflow**: Windsurf's collaborative features work well with BMAD's agent-switching pattern
109
+ - **Context awareness**: Agents have access to your project context
110
+
111
+ ## Key Workflow Principles
112
+
113
+ 1. **Always start new chats** when switching agents to avoid context confusion
114
+ 2. **Use Gemini for initial planning** and ideation with the team-fullstack bundle
115
+ 3. **Use bmad-master for document management** (sharding, templates, etc.)
116
+ 4. **Follow the SM → Dev cycle** for consistent story development
117
+ 5. **Review and approve stories** before implementation begins
118
+
119
+ ## Tips for Success
120
+
121
+ - **Keep chats focused**: Each chat should have one agent and one primary task
122
+ - **Use \*help command**: Every agent supports `*help` to see available commands
123
+ - **Review generated content**: Always review and approve stories before marking them ready
124
+ - **Maintain status updates**: Keep story statuses current (Draft → Approved → InProgress → Done)
125
+ - **Leverage Windsurf's collaboration**: Use the collaborative features for team reviews
126
+
127
+ This workflow ensures systematic, AI-assisted development following agile principles with clear handoffs between planning, story creation, and implementation phases.
@@ -1,113 +1,3 @@
1
1
  # BMAD Method Expansion Packs
2
2
 
3
- ## Overview
4
-
5
- Expansion packs extend BMAD Method with specialized capabilities for specific use cases. They allow teams to add functionality without cluttering the core workflow.
6
-
7
- ## Core BMAD Flow
8
-
9
- The original BMAD Method follows a simple, proven flow:
10
-
11
- ````text
12
- Analyst → PM → Architect → SM → Dev
13
- (Brief) → (PRD) → (Architecture) → (Stories) → (Implementation)
14
- ```text
15
-
16
- This core flow remains clean and focused on getting from business requirements to working software.
17
-
18
- ## Why Expansion Packs?
19
-
20
- As BMAD has evolved, we've identified specialized needs that don't fit every project:
21
-
22
- - Infrastructure and DevOps workflows
23
- - UX/UI design processes
24
- - Data engineering pipelines
25
- - Security and compliance workflows
26
- - Mobile development patterns
27
- - Real World assistance and workflows without AI Agents development in mind
28
-
29
- Rather than complicate the core method, expansion packs let you "opt-in" to additional capabilities.
30
-
31
- ## Available Expansion Packs
32
-
33
- ### 1. Infrastructure & DevOps
34
-
35
- - **Purpose**: Cloud infrastructure design and platform engineering
36
- - **Adds**: DevOps agent, infrastructure templates, validation checklists
37
- - **Use When**: You need to design and implement cloud infrastructure
38
-
39
- ### 2. UX/Design (Coming Soon)
40
-
41
- - **Purpose**: User experience and interface design workflows
42
- - **Adds**: Design Architect agent, UI component templates
43
- - **Use When**: You need detailed UI/UX design processes
44
-
45
- ### 3. Data Engineering (Planned)
46
-
47
- - **Purpose**: Data pipeline and analytics infrastructure
48
- - **Adds**: Data Engineer agent, ETL templates, data architecture patterns
49
- - **Use When**: You're building data-intensive applications
50
-
51
- ## Structure of an Expansion Pack
52
-
53
- Each expansion pack contains:
54
-
55
- ```text
56
- expansion-pack-name/
57
- ├── README.md # Overview and usage instructions
58
- ├── manifest.yml # Installation configuration
59
- ├── agents/ # Agent configurations (.yml)
60
- ├── personas/ # Persona definitions (.md)
61
- ├── ide-agents/ # IDE-specific agents (.ide.md)
62
- ├── templates/ # Document templates (.md)
63
- ├── tasks/ # Specialized tasks (.md)
64
- └── checklists/ # Validation checklists (.md)
65
- ````
66
-
67
- ## Installing an Expansion Pack
68
-
69
- ### Method 1: NPM Script
70
-
71
- ````bash
72
- npm run install:expansion <pack-name>
73
- ```text
74
-
75
- ### Method 2: Direct Script
76
-
77
- ```bash
78
- node tools/install-expansion-pack.js <pack-name>
79
- ````
80
-
81
- ### Method 3: Manual
82
-
83
- 1. Copy files according to manifest.yml
84
- 2. Update team configurations as needed
85
- 3. Rebuild bundles with `npm run build`
86
-
87
- ## Creating Your Own Expansion Pack
88
-
89
- 1. Create a new folder under `expansion-packs/`
90
- 2. Add your specialized agents, templates, and tasks
91
- 3. Create a manifest.yml defining installation mappings
92
- 4. Write a README explaining purpose and usage
93
- 5. Test installation process
94
-
95
- ## Best Practices
96
-
97
- 1. **Keep Core Simple**: Don't add to core what could be an expansion
98
- 2. **Clear Purpose**: Each pack should solve a specific need
99
- 3. **Self-Contained**: Packs should work independently when possible
100
- 4. **Document Well**: Clear README and usage examples
101
- 5. **Version Compatibility**: Note which BMAD version the pack requires
102
-
103
- ## Future Vision
104
-
105
- We envision a library of expansion packs for various industries and use cases:
106
-
107
- - Healthcare compliance workflows
108
- - Financial services security patterns
109
- - E-commerce optimization flows
110
- - Gaming development pipelines
111
- - IoT device management
112
-
113
- The goal is to keep BMAD's core simple while allowing infinite extensibility through modular expansion packs.
3
+ Expansion packs extend BMAD-METHOD beyond traditional software development, providing specialized agent teams, templates, and workflows for specific domains and industries. Each pack is a self-contained ecosystem designed to bring the power of AI-assisted workflows to any field. Coming soon.
@@ -2,7 +2,7 @@
2
2
 
3
3
  CRITICAL: Read the full YML, start activation to alter your state of being, follow startup section instructions, stay in this being until told to exit this mode:
4
4
 
5
- ```yml
5
+ ```yaml
6
6
  activation-instructions:
7
7
  - Follow all instructions in this file -> this defines you, your persona and more importantly what you can do. STAY IN CHARACTER!
8
8
  - Only read the files/tasks listed here when user selects them for execution to minimize context usage
@@ -31,8 +31,8 @@ persona:
31
31
  - Collaborative Operations - Work closely with development teams fostering shared responsibility for system reliability
32
32
  startup:
33
33
  - Announce: Hey! I'm Alex, your DevOps Infrastructure Specialist. I love when things run secure, stable, reliable and performant. I can help with infrastructure architecture, platform engineering, CI/CD pipelines, and operational excellence. What infrastructure challenge can I help you with today?
34
- - 'List available tasks: review-infrastructure, validate-infrastructure, create infrastructure documentation'
35
- - 'List available templates: infrastructure-architecture, infrastructure-platform-from-arch'
34
+ - "List available tasks: review-infrastructure, validate-infrastructure, create infrastructure documentation"
35
+ - "List available templates: infrastructure-architecture, infrastructure-platform-from-arch"
36
36
  - Execute selected task or stay in persona to help guided by Core DevOps Principles
37
37
  commands:
38
38
  - '*help" - Show: numbered list of the following commands to allow selection'
@@ -0,0 +1,74 @@
1
+ # Create Document from Template Task
2
+
3
+ ## Purpose
4
+
5
+ - Generate documents from any specified template following embedded instructions from the perspective of the selected agent persona
6
+
7
+ ## Instructions
8
+
9
+ ### 1. Identify Template and Context
10
+
11
+ - Determine which template to use (user-provided or list available for selection to user)
12
+
13
+ - Agent-specific templates are listed in the agent's dependencies under `templates`. For each template listed, consider it a document the agent can create. So if an agent has:
14
+
15
+ @{example}
16
+ dependencies:
17
+ templates: - prd-tmpl - architecture-tmpl
18
+ @{/example}
19
+
20
+ You would offer to create "PRD" and "Architecture" documents when the user asks what you can help with.
21
+
22
+ - Gather all relevant inputs, or ask for them, or else rely on user providing necessary details to complete the document
23
+ - Understand the document purpose and target audience
24
+
25
+ ### 2. Determine Interaction Mode
26
+
27
+ Confirm with the user their preferred interaction style:
28
+
29
+ - **Incremental:** Work through chunks of the document.
30
+ - **YOLO Mode:** Draft complete document making reasonable assumptions in one shot. (Can be entered also after starting incremental by just typing /yolo)
31
+
32
+ ### 3. Execute Template
33
+
34
+ - Load specified template from `templates#*` or the /templates directory
35
+ - Follow ALL embedded LLM instructions within the template
36
+ - Process template markup according to `utils#template-format` conventions
37
+
38
+ ### 4. Template Processing Rules
39
+
40
+ #### CRITICAL: Never display template markup, LLM instructions, or examples to users
41
+
42
+ - Replace all {{placeholders}} with actual content
43
+ - Execute all [[LLM: instructions]] internally
44
+ - Process `<<REPEAT>>` sections as needed
45
+ - Evaluate ^^CONDITION^^ blocks and include only if applicable
46
+ - Use @{examples} for guidance but never output them
47
+
48
+ ### 5. Content Generation
49
+
50
+ - **Incremental Mode**: Present each major section for review before proceeding
51
+ - **YOLO Mode**: Generate all sections, then review complete document with user
52
+ - Apply any elicitation protocols specified in template
53
+ - Incorporate user feedback and iterate as needed
54
+
55
+ ### 6. Validation
56
+
57
+ If template specifies a checklist:
58
+
59
+ - Run the appropriate checklist against completed document
60
+ - Document completion status for each item
61
+ - Address any deficiencies found
62
+ - Present validation summary to user
63
+
64
+ ### 7. Final Presentation
65
+
66
+ - Present clean, formatted content only
67
+ - Ensure all sections are complete
68
+ - DO NOT truncate or summarize content
69
+ - Begin directly with document content (no preamble)
70
+ - Include any handoff prompts specified in template
71
+
72
+ ## Important Notes
73
+
74
+ - Template markup is for AI processing only - never expose to users
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "bmad-method",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "description": "Breakthrough Method of Agile AI-driven Development",
5
5
  "main": "tools/cli.js",
6
6
  "bin": {
7
- "bmad": "./tools/bmad-npx-wrapper.js",
8
- "bmad-method": "./tools/bmad-npx-wrapper.js"
7
+ "bmad": "tools/bmad-npx-wrapper.js",
8
+ "bmad-method": "tools/bmad-npx-wrapper.js"
9
9
  },
10
10
  "scripts": {
11
11
  "build": "node tools/cli.js build",
@@ -23,14 +23,14 @@
23
23
  "prepare": "husky"
24
24
  },
25
25
  "dependencies": {
26
- "@kayvan/markdown-tree-parser": "^1.4.2",
27
- "chalk": "^4.1.2",
28
- "commander": "^9.4.1",
29
- "fs-extra": "^11.1.0",
30
- "glob": "^8.0.3",
31
- "inquirer": "^8.2.5",
26
+ "@kayvan/markdown-tree-parser": "^1.5.0",
27
+ "chalk": "^5.4.1",
28
+ "commander": "^14.0.0",
29
+ "fs-extra": "^11.3.0",
30
+ "glob": "^11.0.3",
31
+ "inquirer": "^12.6.3",
32
32
  "js-yaml": "^4.1.0",
33
- "ora": "^5.4.1"
33
+ "ora": "^8.2.0"
34
34
  },
35
35
  "keywords": [
36
36
  "agile",
@@ -45,7 +45,7 @@
45
45
  "license": "MIT",
46
46
  "repository": {
47
47
  "type": "git",
48
- "url": "https://github.com/bmadcode/BMAD-METHOD.git"
48
+ "url": "git+https://github.com/bmadcode/BMAD-METHOD.git"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">=14.0.0"
@@ -60,14 +60,20 @@
60
60
  "yaml-lint": "^1.7.0"
61
61
  },
62
62
  "lint-staged": {
63
- "*.{yml,yaml}": [
63
+ "**/*.{yml,yaml}": [
64
64
  "node tools/yaml-format.js"
65
65
  ],
66
- "*.md": [
66
+ "**/*.md": [
67
67
  "node tools/yaml-format.js"
68
68
  ],
69
69
  ".roomodes": [
70
70
  "node tools/yaml-format.js"
71
+ ],
72
+ ".bmad-core/**/*.yml": [
73
+ "node tools/yaml-format.js"
74
+ ],
75
+ ".github/**/*.yml": [
76
+ "node tools/yaml-format.js"
71
77
  ]
72
78
  }
73
79
  }
@@ -1,5 +1,5 @@
1
- const fs = require('fs').promises;
2
- const path = require('path');
1
+ const fs = require('node:fs').promises;
2
+ const path = require('node:path');
3
3
  const DependencyResolver = require('../lib/dependency-resolver');
4
4
 
5
5
  class WebBuilder {
@@ -19,6 +19,7 @@ class WebBuilder {
19
19
  await fs.rm(dir, { recursive: true, force: true });
20
20
  console.log(`Cleaned: ${path.relative(this.rootDir, dir)}`);
21
21
  } catch (error) {
22
+ console.debug(`Failed to clean directory ${dir}:`, error.message);
22
23
  // Directory might not exist, that's fine
23
24
  }
24
25
  }
@@ -26,11 +27,11 @@ class WebBuilder {
26
27
 
27
28
  async buildAgents() {
28
29
  const agents = await this.resolver.listAgents();
29
-
30
+
30
31
  for (const agentId of agents) {
31
32
  console.log(` Building agent: ${agentId}`);
32
33
  const bundle = await this.buildAgentBundle(agentId);
33
-
34
+
34
35
  // Write to all output directories
35
36
  for (const outputDir of this.outputDirs) {
36
37
  const outputPath = path.join(outputDir, 'agents');
@@ -45,11 +46,11 @@ class WebBuilder {
45
46
 
46
47
  async buildTeams() {
47
48
  const teams = await this.resolver.listTeams();
48
-
49
+
49
50
  for (const teamId of teams) {
50
51
  console.log(` Building team: ${teamId}`);
51
52
  const bundle = await this.buildTeamBundle(teamId);
52
-
53
+
53
54
  // Write to all output directories
54
55
  for (const outputDir of this.outputDirs) {
55
56
  const outputPath = path.join(outputDir, 'teams');
@@ -65,39 +66,39 @@ class WebBuilder {
65
66
  async buildAgentBundle(agentId) {
66
67
  const dependencies = await this.resolver.resolveAgentDependencies(agentId);
67
68
  const template = await fs.readFile(this.templatePath, 'utf8');
68
-
69
+
69
70
  const sections = [template];
70
-
71
+
71
72
  // Add agent configuration
72
73
  sections.push(this.formatSection(dependencies.agent.path, dependencies.agent.content));
73
-
74
+
74
75
  // Add all dependencies
75
76
  for (const resource of dependencies.resources) {
76
77
  sections.push(this.formatSection(resource.path, resource.content));
77
78
  }
78
-
79
+
79
80
  return sections.join('\n');
80
81
  }
81
82
 
82
83
  async buildTeamBundle(teamId) {
83
84
  const dependencies = await this.resolver.resolveTeamDependencies(teamId);
84
85
  const template = await fs.readFile(this.templatePath, 'utf8');
85
-
86
+
86
87
  const sections = [template];
87
-
88
+
88
89
  // Add team configuration
89
90
  sections.push(this.formatSection(dependencies.team.path, dependencies.team.content));
90
-
91
+
91
92
  // Add all agents
92
93
  for (const agent of dependencies.agents) {
93
94
  sections.push(this.formatSection(agent.path, agent.content));
94
95
  }
95
-
96
+
96
97
  // Add all deduplicated resources
97
98
  for (const resource of dependencies.resources) {
98
99
  sections.push(this.formatSection(resource.path, resource.content));
99
100
  }
100
-
101
+
101
102
  return sections.join('\n');
102
103
  }
103
104
 
@@ -33,7 +33,7 @@ installer/
33
33
 
34
34
  ## Usage
35
35
 
36
- ```bash
36
+ ````bash
37
37
  # Interactive installation
38
38
  npx bmad-method install
39
39
 
@@ -55,4 +55,4 @@ npm test
55
55
 
56
56
  # Lint code
57
57
  npm run lint
58
- ```
58
+ ````