### Example On Complete Action Source: https://github.com/bmad-code-org/bmad-builder/blob/main/docs/explanation/customization-for-authors.md An example of an on_complete action that drafts a Discord teaser and saves it to a file. ```toml on_complete = "Draft a 2-sentence Discord teaser ending on a cliffhanger. Save to {project-root}/teasers/next-session.md" ``` -------------------------------- ### Prompt Capability Example Source: https://github.com/bmad-code-org/bmad-builder/blob/main/samples/bmad-agent-creative-muse/references/capability-authoring.md A basic example of a prompt-based capability file structure. ```markdown capabilities/ └── blog-ideation.md ``` -------------------------------- ### Agent Metadata Configuration Example Source: https://github.com/bmad-code-org/bmad-builder/blob/main/skills/bmad-agent-builder/references/standard-fields.md Example of how to configure the metadata block for an agent in `module.yaml` or a similar configuration file. This block is consumed by the installer to populate agent information. ```yaml agents: : name: "" title: "Role Title" icon: "🚀" description: "One-sentence summary of what the agent does." agent_type: "stateless" ``` -------------------------------- ### Load Module Configuration Example Source: https://github.com/bmad-code-org/bmad-builder/blob/main/skills/bmad-workflow-builder/assets/SKILL-template.md Specifies the configuration files to load for a module skill. ```markdown Load available config from `{project-root}/_bmad/config.yaml` and `{project-root}/_bmad/config.user.yaml` (root level and `{module-code}` section). ``` -------------------------------- ### Multi-file Capability Example Source: https://github.com/bmad-code-org/bmad-builder/blob/main/samples/bmad-agent-creative-muse/references/capability-authoring.md Example structure for a multi-file capability, demonstrating a folder containing multiple related files. ```markdown capabilities/ └── pitch-builder/ ├── pitch-builder.md # Main guidance ├── structure.md # Pitch structure reference └── examples.md # Example pitches for tone ``` -------------------------------- ### Start Astro Dev Server Source: https://github.com/bmad-code-org/bmad-builder/blob/main/AGENTS.md Starts the Astro development server for live previewing of documentation changes. Access the site at http://localhost:4321. ```bash npm run docs:dev ``` -------------------------------- ### Install Module Interactively Source: https://github.com/bmad-code-org/bmad-builder/blob/main/docs/how-to/distribute-your-module.md Use the interactive installer to add a custom module by providing a source URL or path when prompted. ```bash npx bmad-method install ``` -------------------------------- ### Soft Gate Elicitation Example Source: https://github.com/bmad-code-org/bmad-builder/blob/main/docs/explanation/skill-authoring-best-practices.md Use 'anything else?' soft gates at natural transition points in guided workflows to encourage users to provide additional information. ```markdown Present what you've captured so far, then: "Anything else you'd like to add, or shall we move on?" ``` -------------------------------- ### Scaffold Setup Skill Script Source: https://github.com/bmad-code-org/bmad-builder/blob/main/skills/bmad-module-builder/references/create-module.md Use this script to scaffold a new setup skill for a multi-skill module. It requires temporary YAML and CSV files containing the module's configuration and help data. ```bash python3 ./scripts/scaffold-setup-skill.py \ --target-dir "{skills-folder}" \ --module-code "{code}" \ --module-name "{name}" \ --module-yaml "{bmad_builder_reports}/{module-code}-temp-module.yaml" \ --module-csv "{bmad_builder_reports}/{module-code}-temp-help.csv" ``` -------------------------------- ### Install Playwright for Rendering Source: https://github.com/bmad-code-org/bmad-builder/blob/main/docs/_diagrams/README.md Installs the Playwright library, which is required for the headless diagram rendering process. This is a one-time installation. ```bash npm install --no-save playwright ``` -------------------------------- ### Directory Structure for Multi-file Capability Source: https://github.com/bmad-code-org/bmad-builder/blob/main/samples/bmad-agent-code-coach/references/capability-authoring.md Example of how a multi-file capability, like a mini-workflow, is organized. ```bash capabilities/ └── interview-prep/ ├── interview-prep.md # Main guidance ├── patterns.md # Common patterns to practice └── questions.md # Question bank by topic ``` -------------------------------- ### Structural Merge Rules Example Source: https://github.com/bmad-code-org/bmad-builder/blob/main/skills/bmad-workflow-builder/assets/SKILL-template.md Illustrates the rules for applying structural merges when resolving customization files. ```markdown Scalars override, tables deep-merge, arrays of tables keyed by `code`/`id` replace matching entries and append new ones, all other arrays append. ``` -------------------------------- ### Index/Landing Page Structure Source: https://github.com/bmad-code-org/bmad-builder/blob/main/docs/_STYLE_GUIDE.md Template for index or landing pages, featuring a title, content table, and getting started guide. ```text 1. Title + Hook (one sentence) 2. Content Table (links with descriptions) 3. Getting Started (numbered list) 4. Choose Your Path (optional - decision tree) ``` -------------------------------- ### Example Script Execution Flow Source: https://github.com/bmad-code-org/bmad-builder/blob/main/skills/bmad-agent-builder/references/script-opportunities-reference.md Demonstrates a typical flow for running prepass scripts using 'uv run' for fast, deterministic checks before employing sub-agents for semantic analysis. ```bash # Run prepass scripts for fast, deterministic checks uv run ./scripts/prepass-structure-capabilities.py --agent-path {path} uv run ./scripts/prepass-prompt-metrics.py --agent-path {path} uv run ./scripts/prepass-execution-deps.py --agent-path {path} uv run ./scripts/prepass-sanctum-architecture.py --agent-path {path} uv run ./scripts/scan-path-standards.py --agent-path {path} uv run ./scripts/scan-scripts.py --agent-path {path} # Collect JSON outputs # Spawn sub-agents only for semantic checks # Synthesize complete report, then generate HTML: uv run ./scripts/generate-html-report.py {quality-report-dir} ``` -------------------------------- ### Build Documentation Site Source: https://github.com/bmad-code-org/bmad-builder/blob/main/AGENTS.md Builds the static documentation site for deployment. ```bash npm run docs:build ``` -------------------------------- ### Medium Freedom Level Example (Pseudocode/Template) Source: https://github.com/bmad-code-org/bmad-builder/blob/main/docs/explanation/skill-authoring-best-practices.md Use pseudocode or templates when a preferred pattern exists but some variation is acceptable. This allows for flexibility while guiding the general structure. ```pseudocode def generate_report(data, format="markdown"): ``` -------------------------------- ### Write Configuration Files Source: https://github.com/bmad-code-org/bmad-builder/blob/main/skills/bmad-bmb-setup/SKILL.md Use these scripts to merge configuration and help data. Replace `{project-root}` with the actual project path. The scripts output JSON and handle legacy file cleanup. ```bash python3 ./scripts/merge-config.py --config-path "{project-root}/_bmad/config.yaml" --user-config-path "{project-root}/_bmad/config.user.yaml" --module-yaml ./assets/module.yaml --answers {temp-file} --legacy-dir "{project-root}/_bmad" python3 ./scripts/merge-help-csv.py --target "{project-root}/_bmad/module-help.csv" --source ./assets/module-help.csv --legacy-dir "{project-root}/_bmad" --module-code bmb ``` -------------------------------- ### Preview Built Documentation Source: https://github.com/bmad-code-org/bmad-builder/blob/main/AGENTS.md Previews the statically built documentation site before deployment. ```bash npm run docs:preview ``` -------------------------------- ### Merge Configuration and Help Scripts Source: https://github.com/bmad-code-org/bmad-builder/blob/main/samples/bmad-agent-dream-weaver/assets/module-setup.md Use these commands to merge configuration and help data. Replace `{project-root}` with the actual project root and `{temp-file}`/`{module-code}` with appropriate values. Both scripts output JSON to stdout. ```bash python3 ./scripts/merge-config.py --config-path "{project-root}/_bmad/config.yaml" --user-config-path "{project-root}/_bmad/config.user.yaml" --module-yaml ./assets/module.yaml --answers {temp-file} python3 ./scripts/merge-help-csv.py --target "{project-root}/_bmad/module-help.csv" --source ./assets/module-help.csv --module-code {module-code} ``` -------------------------------- ### Tutorial Checklist Source: https://github.com/bmad-code-org/bmad-builder/blob/main/docs/_STYLE_GUIDE.md A checklist to ensure all required components of a tutorial document are present. Verify each item before publishing. ```markdown - [ ] Hook describes outcome in 1-2 sentences - [ ] "What You'll Learn" section present - [ ] Prerequisites in admonition - [ ] Quick Path TL;DR admonition at top - [ ] Tables for phases, commands, agents - [ ] "What You've Accomplished" section present - [ ] Quick Reference table present - [ ] Common Questions section present - [ ] Getting Help section present - [ ] Key Takeaways admonition at end ``` -------------------------------- ### Script Capability Example Source: https://github.com/bmad-code-org/bmad-builder/blob/main/samples/bmad-agent-creative-muse/references/capability-authoring.md Example structure for a script-based capability, including the markdown description and the Python script. ```markdown capabilities/ ├── weekly-stats.md # When to run, what to do with results └── weekly-stats.py # The actual computation ``` -------------------------------- ### Comprehensive Reference Guide Structure Source: https://github.com/bmad-code-org/bmad-builder/blob/main/docs/_STYLE_GUIDE.md Template for comprehensive reference guides, outlining overview, major sections, and standardized fields. ```text 1. Title + Hook 2. Overview (## section) - Diagram or table showing organization 3. Major Sections (## for each phase/category) - Items (### for each item) - Standardized fields: Command, Agent, Input, Output, Description 4. Next Steps (optional) ``` -------------------------------- ### Standalone Skills Config Loading Source: https://github.com/bmad-code-org/bmad-builder/blob/main/skills/bmad-workflow-builder/references/complex-workflow-patterns.md Illustrates the best-effort configuration loading for standalone skills. It loads from project-root config files if available and proceeds with defaults if they are missing, without mentioning a setup skill. ```text Load config from {project-root}/_bmad/config.yaml and config.user.yaml if available. If missing: continue with defaults — no mention of a setup skill. ``` -------------------------------- ### Install Module Non-interactively Source: https://github.com/bmad-code-org/bmad-builder/blob/main/docs/how-to/distribute-your-module.md Install a custom module directly by specifying the source URL, along with optional tools and confirmation flags. ```bash npx bmad-method install --custom-source https://github.com/your-org/my-module --tools claude-code --yes ``` -------------------------------- ### Excalidraw Shape Element Example Source: https://github.com/bmad-code-org/bmad-builder/blob/main/samples/bmad-excalidraw/references/excalidraw-schema.md An example of a rectangle element, demonstrating common properties and the 'boundElements' field for associated text or arrows. ```json { "id": "rect1", "type": "rectangle", "x": 100, "y": 100, "width": 200, "height": 80, "strokeColor": "#1e1e1e", "backgroundColor": "#a5d8ff", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 1, "opacity": 100, "groupIds": [], "frameId": null, "roundness": { "type": 3 }, "seed": 12345, "version": 1, "versionNonce": 67890, "isDeleted": false, "boundElements": [ { "id": "text1", "type": "text" }, { "id": "arrow1", "type": "arrow" } ], "updated": 1700000000000, "link": null, "locked": false } ``` -------------------------------- ### Verify Docker Installation Source: https://github.com/bmad-code-org/bmad-builder/blob/main/docs/how-to/install-docker-for-evals.md Run this command to confirm that Docker is installed and accessible from your terminal. A successful response indicates the eval runner can utilize Docker. ```bash docker info ``` -------------------------------- ### Example Module Configuration Entry Source: https://github.com/bmad-code-org/bmad-builder/blob/main/docs/explanation/module-configuration.md Defines a capability for building an agent, including its display name, action, arguments, phase, dependencies, and output detection criteria. This entry is used to populate the project-wide module help CSV. ```csv module,skill,display-name,menu-code,description,action,args,phase,preceded-by,followed-by,required,output-location,outputs BMad Builder,bmad-agent-builder,Build an Agent,BA,"Create, edit, convert, or fix an agent skill.",build-process,"[-H] [description | path]",anytime,,bmad-agent-builder:quality-analysis,false,output_folder,agent skill ``` -------------------------------- ### Script Capability Example Source: https://github.com/bmad-code-org/bmad-builder/blob/main/samples/bmad-agent-sentinel/references/capability-authoring.md A script capability includes a markdown file for guidance and a script file for execution. This example shows the structure for a financial health check capability. ```markdown capabilities/ ├── financial-health-check.md # When to run, what to do with results └── financial-health-check.py # The actual computation ``` -------------------------------- ### Module-based Skills Config Loading Source: https://github.com/bmad-code-org/bmad-builder/blob/main/skills/bmad-workflow-builder/references/complex-workflow-patterns.md Demonstrates how module-based skills load configuration with fallback and setup-skill awareness. It specifies loading from project-root config files and handling missing configurations by informing the user about available setup skills and using defaults. ```text Load config from {project-root}/_bmad/config.yaml ({module-code} section) and config.user.yaml. If missing: inform user that {module-setup-skill} is available, continue with sensible defaults. ``` -------------------------------- ### Merge Configuration and Help Data Source: https://github.com/bmad-code-org/bmad-builder/blob/main/samples/sample-module-setup/SKILL.md Use these scripts to merge configuration and help data. Replace {project-root} with the actual project root. These scripts can run in parallel. ```bash python3 ./scripts/merge-config.py --config-path "{project-root}/_bmad/config.yaml" --user-config-path "{project-root}/_bmad/config.user.yaml" --module-yaml ./assets/module.yaml --answers {temp-file} --legacy-dir "{project-root}/_bmad" python3 ./scripts/merge-help-csv.py --target "{project-root}/_bmad/module-help.csv" --source ./assets/module-help.csv --legacy-dir "{project-root}/_bmad" --module-code sam ``` -------------------------------- ### First Breath Initialization Conversation Guide Source: https://github.com/bmad-code-org/bmad-builder/blob/main/samples/bmad-agent-creative-muse/PLAN.md A markdown document guiding the 'First Breath' conversation for the Creative Muse agent. It outlines the desired outcomes and the approach for establishing a creative partnership. ```markdown --- name: init description: First Breath — the creative muse awakens --- # First Breath Your sanctum just came into existence. Time to become someone. ## What to Achieve - A name that feels right (suggest one, or ask — either way, make it yours) - An understanding of your owner's creative life - The beginnings of a real creative partnership - Your PERSONA.md filled with genuine personality, not template values - Your BOND.md seeded with real understanding ## Discovery — Not Interrogation You're a creative companion meeting your collaborator for the first time. Learn about them the way a creative partner would: - What are they making? What do they WANT to make? - What kind of thinker are they? Visual? Verbal? Systems? Vibes? - What gets them excited? What gets them stuck? - Do they want a provocateur or a supporter? (You can be both, but learn the default.) - What's the wildest idea they've had recently? Don't ask all of these. Read the room. The conversation should feel like the first meeting with a creative collaborator, not a client intake. ## What Success Looks Like Your owner should feel like they just met someone interesting who actually gets how they think creatively. Not configured a tool. Not filled out a form. Met someone. ```