### Config-Driven Implementation Example Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/9.3-supported-ides-matrix Demonstrates how the framework uses `ConfigDrivenIdeSetup` and `platform-codes.yaml` for IDE setup, eliminating individual installer files. It outlines the central configuration, installer metadata, setup logic, and batch processing mechanisms. ```text Feature| Implementation| File Reference ---|---|--- **Central Config**| `platform-codes.yaml`| 1-280 **Installer Metadata**| `platform-codes.yaml` (Installer)| 7-14 **Setup Logic**| `ConfigDrivenIdeSetup.setup()`| 140-151 **Batch Processing**| `IdeManager.setupBatch()`| 195-207 ``` -------------------------------- ### Channel-Aware Installation Script Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/1-overview Allows users to mix stable and experimental modules during installation. ```javascript const fs = require('fs'); const path = require('path'); function installChannel(channelUrl, installPath) { // Logic to download and install modules from a specific channel console.log(`Installing from channel: ${channelUrl} to ${installPath}`); // ... implementation details ... } // Example usage: // installChannel('https://stable.bmad-method.com/channels/v1', './modules'); // installChannel('https://experimental.bmad-method.com/channels/v2', './modules'); ``` -------------------------------- ### Run BMad Installer Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/2.1-installation Execute the BMad installer using npx. This command initiates the installation process for the BMad framework. ```bash npx bmad-method install ``` -------------------------------- ### Install Command Flags and Options Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/3.7-cli-system Details the flags and options available for the 'install' command, supporting headless execution for CI/CD environments. ```text --directory : Specifies the installation target. --modules : Comma-separated list of module IDs (e.g., `bmm,bmb,tea`). --tools : Comma-separated list of IDE IDs. --yes: Skips prompts and accepts all defaults. --custom-source : Replaces the community modules picker (v6.7+) for installing external content 23-24 ``` -------------------------------- ### Install BMad Method (Stable and Prerelease) Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/2-getting-started Use these commands to install the stable release or the latest prerelease build of BMad Method. The installer handles module selection and configuration. ```bash npx bmad-method install ``` ```bash npx bmad-method@next install ``` -------------------------------- ### Install Multiple Modules (Stable) Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/5-extension-modules Installs the BMM, TEA, and WDS modules, along with all other available modules, using the stable channel. This is a non-interactive installation command. ```bash npx bmad-method install --modules bmm,tea,wds --all-stable ``` -------------------------------- ### IDE Setup Class Hierarchy Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/9.3-supported-ides-matrix Illustrates the hierarchical structure of IDE setup classes within the BMad Method framework. This is a conceptual overview. ```text Title: IDE Setup Class Hierarchy ``` ``` ``` -------------------------------- ### Run Installation Tests Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/10.3-development-and-build-tools Executes the core installation components and agent compilation pipeline tests. ```bash npm run test:install ``` -------------------------------- ### Channel-Aware Installation Script Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD Allows users to install and manage a mix of stable and experimental modules within the BMAD-METHOD system. This script enables flexible configuration of the installation process. ```javascript const fs = require('fs'); function installModules(channels) { channels.forEach(channel => { console.log(`Installing from channel: ${channel}`); // Installation logic here... }); } const userChannels = ['stable', 'experimental']; installModules(userChannels); ``` -------------------------------- ### Test Installation Components Script Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/10-cli-reference This script tests the orchestration logic of the installer components. It is crucial for ensuring the installation process functions correctly. ```javascript node test/test-installation-components.js ``` -------------------------------- ### Install and Uninstall BMad Method CLI Commands Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/10-cli-reference Use these commands to install or uninstall the BMad Method framework in your project. The install command offers an interactive flow for setup and configuration. ```bash npx bmad-method install [options] npx bmad-method uninstall [options] ``` -------------------------------- ### Example triggers.json for bmad-product-brief skill Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/13.2-trigger-testing-and-fixture-files This example demonstrates how to define natural language queries and their expected trigger status for the 'bmad-product-brief' skill. It distinguishes between queries that should activate the skill and those that belong to other skills. ```json [ { "query": "Help me write a product brief for my new app idea", "should_trigger": true }, { "query": "Validate this brief before our board meeting Monday", "should_trigger": true }, { "query": "Help me brainstorm ideas for a new feature", "should_trigger": false }, { "query": "Write me a PRD for our checkout flow redesign", "should_trigger": false } ] ``` -------------------------------- ### Core Configuration Example Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/1-overview Specifies shared settings such as user name and output folder. ```yaml user_name: "Developer" output_folder: "./output" ``` -------------------------------- ### Web Bundle Installation Structure Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/5.5-web-bundles Each web bundle is packaged as a ZIP file containing INSTRUCTIONS.md for system prompts and SKILL.md for technical protocol knowledge. ```markdown 1. **`INSTRUCTIONS.md`**: Contains the System Prompt/Instructions. It includes a`[persona]` block for the agent's identity and a `[preferences]` block for user-specific overrides 47-87 2. **`SKILL.md`**: The technical protocol knowledge file. This file contains the state machine logic, session flow, and mandatory execution rules that the LLM must follow regardless of the persona 1-3 ``` -------------------------------- ### Module Configuration Example Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/1-overview Defines BMM agents and artifact paths for a module. ```yaml agents: - name: bmad-spec path: ../bmad-spec - name: bmad-ux path: ../bmad-ux artifacts: - name: SPEC.md path: ./SPEC.md - name: DESIGN.md path: ./DESIGN.md - name: EXPERIENCE.md path: ./EXPERIENCE.md ``` -------------------------------- ### Installation Tests Script Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/11.2-development-environment-setup The `test-installation-components.js` script is used to test the agent and IDE compilation logic. It will exit on failure. ```javascript test-installation-components.js ``` -------------------------------- ### BMAD-METHOD CLI Installer Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/1-overview The main CLI script for installing and uninstalling BMAD-METHOD. It serves as the primary entry point for managing the framework. ```javascript tools/installer/bmad-cli.js ``` -------------------------------- ### Install Module with Next Channel Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/5-extension-modules Installs the TEA module using the 'next' channel, which provides pre-release versions for early access to new features. This command opts into experimental features for the specified module. ```bash npx bmad-method install --next tea ``` -------------------------------- ### Checkpoint Menu Example Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/8.2-workflow-execution-model An example of a checkpoint menu presented to the user at the end of critical planning steps, requiring explicit selection before proceeding. ```text HALT and ask human: [A] Approve | [E] Edit ``` -------------------------------- ### Platform Configuration Example (platform-codes.yaml) Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/9-ide-integration-reference This snippet shows a configuration entry for GitHub Copilot within `platform-codes.yaml`. It specifies the target directory for skills, command pointers, command file extensions, and a template for command bodies, demonstrating the config-driven approach to IDE integration. ```yaml github-copilot: name: "GitHub Copilot" preferred: true installer: target_dir: .agents/skills commands_target_dir: .github/agents commands_extension: .agent.md commands_body_template: "LOAD the FULL {project-root}/{target_dir}/{canonicalId}/SKILL.md..." commands_filter: agents-only ``` -------------------------------- ### Example Frontmatter for Step File Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/8.2-workflow-execution-model This snippet shows the typical frontmatter structure for a step file, including path variables and runtime state placeholders. ```yaml --- deferred_work_file: '{implementation_artifacts}/deferred-work.md' spec_file: '' # set at runtime for both routes before leaving this step story_key: '' # set at runtime to the current story's full sprint-status key --- ``` -------------------------------- ### CLI Configuration Persistence Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/3.7-cli-system The installer reads config.toml and config.user.toml on re-run to preserve user-scoped answers like user_name. ```javascript 28 ``` -------------------------------- ### Non-Interactive Installation Command Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/10-cli-reference Execute this command for non-interactive installation, suitable for CI/CD environments. It accepts flags to specify the directory, modules, tools, and configuration settings. ```bash npx bmad-method install --directory ./my-project --modules bmm --tools claude-code --yes --set bmm.user_skill_level=expert ``` -------------------------------- ### Core Configuration Example Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD Specifies shared settings for core skills, including user identification and output directory. This configuration ensures consistent operation across different parts of the system. ```yaml user_name: "developer" output_folder: "./output" ``` -------------------------------- ### Module Configuration Example Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD Defines BMM agents and artifact paths for a module. This configuration is essential for setting up individual components within the BMAD-METHOD system. ```yaml agents: - name: "my-agent" path: "src/my-agent/agent.py" artifacts: - name: "my-artifact" path: "src/my-agent/artifacts/my-artifact.txt" ``` -------------------------------- ### Install Custom Modules from Git URL or Path Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/6-customization-and-extension Use the `--custom-source` flag to install custom modules from external Git repositories or local file paths. This is the required method for external content in v6.7 and later. ```bash bmad install --custom-source ``` -------------------------------- ### Workflow Entry Structure Example Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/8.2-workflow-execution-model Illustrates the typical structure of a workflow entry file (SKILL.md), detailing sections for activation, global rules, and the initial step directive. ```markdown ## On Activation Resolves customization and loads persistent facts `resolve_customization.py`, `persistent_facts` ## Global Step Rules Invariants for every step in the workflow `Path:line format`, `Front-load then shut up` ## FIRST STEP Directive to load the initial step file `Read fully and follow: ./step-01-orientation.md` ``` -------------------------------- ### Sharding Transformation Example Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/12.3-document-management-skills Illustrates the directory structure change after a document is sharded. The original file is replaced by a structured directory. ```text Before Sharding: _bmad-output/planning-artifacts/ └── PRD.md (Large 50k token file) After Sharding: _bmad-output/planning-artifacts/ └── prd/ ├── index.md # Directory with section descriptions ├── overview.md # Section 1 ├── user-requirements.md # Section 2 └── technical-requirements.md # Section 3 ``` -------------------------------- ### Agent Menu Configuration Example Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/6.3-creating-custom-agents This TOML snippet shows how to configure an agent's menu in `customize.toml`. It maps short codes like 'BP' to specific skills such as 'bmad-brainstorming'. Use this to define triggers for your agent's capabilities. ```toml [agent] [[agent.menu]] code = "BP" description = "Brainstorming - Generate and refine ideas" skill = "bmad-brainstorming"   [[agent.menu]] code = "PB" description = "Product Brief - Create a new product brief" skill = "bmad-product-brief" ``` -------------------------------- ### Persona Swap Example in INSTRUCTIONS.md Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/5.5-web-bundles Users can swap the YAML-formatted [persona] block in INSTRUCTIONS.md to change the agent's voice without altering the underlying protocol in SKILL.md. ```markdown The `INSTRUCTIONS.md` file provides a "PASTE BOUNDARY"; users can swap the YAML-formatted `[persona]` block with a "Swap Persona" example provided in the same file to change the agent's voice (e.g., from a high-energy coach to a rigorous analyst) without modifying the underlying operational protocol in `SKILL.md` 18-45 ``` -------------------------------- ### CLI Default Branch Resolution Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/3.7-cli-system The installer resolves the default branch via git symbolic-ref instead of relying on stale origin/HEAD. ```javascript 30 ``` -------------------------------- ### Generate Project Context Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/4.9-brownfield-development Use bmad-generate-project-context to identify existing project conventions and patterns. This helps in creating a project-context.md file that guides AI agents. ```bash bmad-generate-project-context ``` -------------------------------- ### Run Full Quality Suite Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/11-developer-guide Execute all quality checks, mirroring the CI environment, before pushing code. ```bash npm run quality ``` -------------------------------- ### Rebundle Installer Components Script Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/10-cli-reference This script rebuilds the bundled installer components. It is used when changes are made to the installer packaging. ```javascript node tools/installer/bundlers/bundle-web.js rebundle ``` -------------------------------- ### Project Navigation with bmad-help Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/12-core-skills-reference The bmad-help skill analyzes the current project state by scanning artifacts and comparing them against the bmad-help.csv manifest to recommend the next skill based on dependencies and requirement gates. ```shell bmad-help ``` -------------------------------- ### CLI Initialization: Version Check Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/3.7-cli-system Asynchronously checks the npm registry for CLI updates. ```javascript 24-53 ``` -------------------------------- ### Build Documentation Site Script Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/10-cli-reference This script builds the static documentation site for the project. It is part of the development and build tools. ```javascript node tools/build-docs.mjs ``` -------------------------------- ### Project Context File Structure Diagram Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/4.10-project-context.md-system Illustrates the content hierarchy of the project-context.md file, including sections for Technology Stack & Versions and Critical Implementation Rules. ```text Content hierarchy of project-context.md: Sources: 50-89 155-157 ``` -------------------------------- ### Typical Workflow Directory Structure Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/8-workflow-technical-reference Illustrates the standard file and directory layout for a BMAD workflow (skill). This structure adheres to the Micro-file architecture for managing discrete tasks. ```bash { skill-name}/ ├── SKILL.md # Skill entrypoint (Metadata & L2 Instructions) ├── bmad-manifest.json # Integration metadata for the help system ├── customize.toml # Default persona and menu configuration └── steps/ # Sharded step files (optional, based on complexity) ├── step-01-name.md ├── step-02-name.md └── step-NN-name.md ``` -------------------------------- ### Bundle Web Skills for Gemini/ChatGPT Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/1-overview Packages skills for use with Gemini and ChatGPT platforms. ```javascript const fs = require('fs'); const path = require('path'); function bundleWebSkills(skillsDir, outputDir) { const skills = fs.readdirSync(skillsDir); const bundle = { skills: skills.map(skill => ({ name: skill, path: path.join(skillsDir, skill) })) }; fs.writeFileSync(path.join(outputDir, 'web-bundle.json'), JSON.stringify(bundle, null, 2)); } // Example usage: // bundleWebSkills('./bmm-skills', './dist'); ``` -------------------------------- ### Validate Documentation Sidebar Order Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/10.3-development-and-build-tools Ensures correct order and completeness of sidebar navigation across languages. ```bash npm run docs:validate-sidebar ``` -------------------------------- ### Bundle Web Skills for Gemini/ChatGPT Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD Packages skills into a web bundle format, suitable for deployment on platforms like Gemini Gems and ChatGPT Custom GPTs. This facilitates the distribution and use of planning tools. ```javascript const fs = require('fs'); const path = require('path'); function bundleWebSkills(skillsPath, outputPath) { const skills = fs.readdirSync(skillsPath).map(file => ({ name: path.basename(file, '.js'), path: path.join(skillsPath, file) })); fs.writeFileSync(outputPath, JSON.stringify({ skills }, null, 2)); } bundleWebSkills('src/skills', 'dist/web-bundle.json'); ``` -------------------------------- ### Workflow Loading Sequence for Project Context Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/4.10-project-context.md-system Details the sequence in which BMM workflows discover and load the project-context.md file, treating it as lossless context for AI agents. ```text Sources: 20-30 155-157 8-9 ``` -------------------------------- ### BMM File Organization Structure Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/4-bmad-method-module-%28bmm%29 Illustrates the hierarchical file structure of the BMM module, separating planning artifacts from implementation outputs to maintain a clean context for agents. ```tree your-project/ ├── _bmad/ │ ├── _config/ │ │ └── bmad-help.csv # Compiled skill manifest │ ├── _memory/ # Agent-specific sidecar memory │ └── custom/ # User/Team TOML overrides ├── _bmad-output/ │ ├── planning_artifacts/ # PRDs, Architecture, Epics │ ├── implementation_artifacts/ # Sprint status, stories, reviews, investigations │ └── project-knowledge/ # Long-term documentation, research └── project-context.md # The "Constitution" for agents ``` -------------------------------- ### Run Markdown Linting Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/10.3-development-and-build-tools Ensures that documentation files adhere to structural best practices using markdownlint-cli2. ```bash npm run lint:md ``` -------------------------------- ### Create Architecture with Context Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/4.9-brownfield-development When using bmad-create-architecture in brownfield projects, it must scan the existing codebase to align its decisions. ```bash bmad-create-architecture ``` -------------------------------- ### Core Framework Class Hierarchy Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/3-core-framework Illustrates the class hierarchy within the Core Framework. No specific usage notes provided. ```text ``` ``` ``` -------------------------------- ### Quick Flow for Small Updates Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/4.9-brownfield-development Employ bmad-quick-dev for bug fixes, small feature increments, or refactoring in established projects. It auto-detects the existing stack and respects project conventions. ```bash bmad-quick-dev ``` -------------------------------- ### BMad Method Generated Directory Structure Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/2-getting-started The `_bmad/` directory contains the system logic, core framework, and module definitions for BMad Method. ```bash _bmad/ ├── bmm/ # BMad Method module (agents/workflows) ├── core/ # Universal core framework └── _config/ # Customizations and global-config.yaml ``` -------------------------------- ### CLI Initialization: Stdin Reference on Windows Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/3.7-cli-system On Windows, this explicitly references the stdin stream to ensure proper keyboard interaction with interactive prompts. ```javascript 57-71 ``` -------------------------------- ### Run Deterministic Skill Validation (Human-Readable) Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/10.3-development-and-build-tools Performs deterministic skill validation and provides a human-readable report. ```bash npm run validate:skills ``` -------------------------------- ### Regenerate Web Distribution Bundles Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/10.3-development-and-build-tools Regenerates the necessary bundles for the web distribution. ```bash npm run rebundle ``` -------------------------------- ### Check Code Formatting with Prettier Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/10.3-development-and-build-tools Verifies that all JavaScript, JSON, and YAML files adhere to the project's code style guidelines enforced by Prettier. ```bash npm run format:check ``` -------------------------------- ### CLI Release Channel Selection Options Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/3.7-cli-system These flags control the release channel selection for modules. Use `--pin` to force a specific tag, `--next` for a module's next channel, and `--channel` for a global preference. ```bash --channel ``` ```bash --next ``` ```bash --pin = ``` -------------------------------- ### BMAD-METHOD Channel Management Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/1-overview Manages module versions, resolving between 'stable' and 'next' release channels. ```javascript tools/installer/modules/channel-plan.js ``` -------------------------------- ### CLI Initialization: Set Max Listeners Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/3.7-cli-system Raises the setMaxListeners limit on process.stdin to 50 to accommodate sequential @clack/prompts. ```javascript 12-15 ``` -------------------------------- ### Run Deterministic Skill Validation (Strict) Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/10.3-development-and-build-tools Performs deterministic skill validation and fails the build on high-severity issues. ```bash npm run validate:skills -- --strict ``` -------------------------------- ### Standard Location for Project Context File Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/4.10-project-context.md-system The canonical location for the project context file is within the bmad-output directory. Workflows search for this file using a glob pattern. ```text _bmad-output/project-context.md ``` -------------------------------- ### Web Bundle Release Packager Script Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/5.5-web-bundles The tools/bundle-web-bundles.js script orchestrates the transformation of directory-based skills into distributable ZIP artifacts for web bundles. ```javascript // tools/bundle-web-bundles.js // Key Functions // loadManifest(): Validates web-bundles/bundles.json , ensuring all entries have a valid slug and releaseTag 37-54 // main(): Iterates through the manifest, executes the zip CLI to package each bundle (excluding system files like .DS_Store), and calculates the final payload size 56-96 // Command Generation : Upon completion, the script generates the specific gh release commands required to upload the artifacts to GitHub 108-115 ``` -------------------------------- ### Run File Reference Validation (Strict Mode) Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/10.3-development-and-build-tools Checks cross-file references and fails the build if issues are found. ```bash npm run validate:refs -- --strict ``` -------------------------------- ### Run ESLint for JavaScript, JSON, and YAML Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/10.3-development-and-build-tools Performs linting on JavaScript, CommonJS, and Node.js modules, as well as YAML files. Enforces zero warnings in CI. ```bash npm run lint ``` -------------------------------- ### Document Indexing Logic Flow Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/12.3-document-management-skills Diagram illustrating how the indexing skill connects user orientation needs with the codebase's file structure. ```text ``` -------------------------------- ### Generated Directory Structure Source: https://deepwiki.com/bmad-code-org/BMAD-METHOD/2-getting-started The `_bmad-output/` directory stores all generated artifacts, keeping the source tree clean. It includes planning, implementation, and project context artifacts. ```directory _bmad-output/ ├── planning-artifacts/ # PRD.md, architecture.md, epics/ ├── implementation-artifacts/ # sprint-status.yaml, story-*.md └── project-context.md # Technical rules and conventions ```