diff --git a/.github/workflows/bundle-latest.yaml b/.github/workflows/bundle-latest.yaml deleted file mode 100644 index 7c49cb24..00000000 --- a/.github/workflows/bundle-latest.yaml +++ /dev/null @@ -1,330 +0,0 @@ -name: Publish Latest Bundles - -on: - push: - branches: [main] - workflow_dispatch: {} - -permissions: - contents: write - -jobs: - bundle-and-publish: - if: ${{ false }} # Temporarily disabled while web bundles are paused. - runs-on: ubuntu-latest - steps: - - name: Checkout BMAD-METHOD - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - cache: npm - - - name: Install dependencies - run: npm ci - - - name: Generate bundles - run: npm run bundle - - - name: Create bundle distribution structure - run: | - mkdir -p dist/bundles - - # Copy web bundles (XML files from npm run bundle output) - cp -r web-bundles/* dist/bundles/ 2>/dev/null || true - - # Verify bundles were copied (fail if completely empty) - if [ ! "$(ls -A dist/bundles)" ]; then - echo "❌ ERROR: No bundles found in dist/bundles/" - echo "This likely means 'npm run bundle' failed or bundles weren't generated" - exit 1 - fi - - # Count bundles per module - for module in bmm bmb cis bmgd; do - if [ -d "dist/bundles/$module/agents" ]; then - COUNT=$(find dist/bundles/$module/agents -name '*.xml' 2>/dev/null | wc -l) - echo "✅ $module: $COUNT agent bundles" - fi - done - - # Generate index.html for each agents directory (fixes directory browsing) - for module in bmm bmb cis bmgd; do - if [ -d "dist/bundles/$module/agents" ]; then - cat > "dist/bundles/$module/agents/index.html" << 'DIREOF' - - - - MODULE_NAME Agents - - - -

MODULE_NAME Agents

- -

← Back to all modules

- - - DIREOF - - # Replace MODULE_NAME - sed -i "s/MODULE_NAME/${module^^}/g" "dist/bundles/$module/agents/index.html" - - # Generate agent links - LINKS="" - for file in dist/bundles/$module/agents/*.xml; do - if [ -f "$file" ]; then - name=$(basename "$file" .xml) - LINKS="$LINKS
  • $name
  • \n" - fi - done - sed -i "s|AGENT_LINKS|$LINKS|" "dist/bundles/$module/agents/index.html" - fi - done - - # Create zip archives per module - mkdir -p dist/bundles/downloads - for module in bmm bmb cis bmgd; do - if [ -d "dist/bundles/$module" ]; then - (cd dist/bundles && zip -r downloads/$module-agents.zip $module/) - echo "✅ Created $module-agents.zip" - fi - done - - # Generate index.html dynamically based on actual bundles - TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M UTC") - COMMIT_SHA=$(git rev-parse --short HEAD) - - # Function to generate agent links for a module - generate_agent_links() { - local module=$1 - local agent_dir="dist/bundles/$module/agents" - - if [ ! -d "$agent_dir" ]; then - echo "" - return - fi - - local links="" - local count=0 - - # Find all XML files and generate links - for xml_file in "$agent_dir"/*.xml; do - if [ -f "$xml_file" ]; then - local agent_name=$(basename "$xml_file" .xml) - # Convert filename to display name (pm -> PM, tech-writer -> Tech Writer) - local display_name=$(echo "$agent_name" | sed 's/-/ /g' | awk '{for(i=1;i<=NF;i++) {if(length($i)==2) $i=toupper($i); else $i=toupper(substr($i,1,1)) tolower(substr($i,2));}}1') - - if [ $count -gt 0 ]; then - links="$links | " - fi - links="$links$display_name" - count=$((count + 1)) - fi - done - - echo "$links" - } - - # Generate agent links for each module - BMM_LINKS=$(generate_agent_links "bmm") - CIS_LINKS=$(generate_agent_links "cis") - BMGD_LINKS=$(generate_agent_links "bmgd") - - # Count agents for bulk downloads - BMM_COUNT=$(find dist/bundles/bmm/agents -name '*.xml' 2>/dev/null | wc -l | tr -d ' ') - CIS_COUNT=$(find dist/bundles/cis/agents -name '*.xml' 2>/dev/null | wc -l | tr -d ' ') - BMGD_COUNT=$(find dist/bundles/bmgd/agents -name '*.xml' 2>/dev/null | wc -l | tr -d ' ') - - # Create index.html - cat > dist/bundles/index.html << EOF - - - - BMAD Bundles - Latest - - - - -

    BMAD Web Bundles - Latest (Main Branch)

    - -
    - ⚠️ Latest Build (Unstable)
    - These bundles are built from the latest main branch commit. For stable releases, visit - GitHub Releases. -
    - -

    Last Updated: $TIMESTAMP

    -

    Commit: $COMMIT_SHA

    - -

    Available Modules

    - - EOF - - # Add BMM section if agents exist - if [ -n "$BMM_LINKS" ]; then - cat >> dist/bundles/index.html << EOF -
    -

    BMM (BMad Method)

    -
    - $BMM_LINKS
    - 📁 Browse All | 📦 Download Zip -
    -
    - - EOF - fi - - # Add CIS section if agents exist - if [ -n "$CIS_LINKS" ]; then - cat >> dist/bundles/index.html << EOF -
    -

    CIS (Creative Intelligence Suite)

    -
    - $CIS_LINKS
    - 📁 Browse Agents | 📦 Download Zip -
    -
    - - EOF - fi - - # Add BMGD section if agents exist - if [ -n "$BMGD_LINKS" ]; then - cat >> dist/bundles/index.html << EOF -
    -

    BMGD (Game Development)

    -
    - $BMGD_LINKS
    - 📁 Browse Agents | 📦 Download Zip -
    -
    - - EOF - fi - - # Add bulk downloads section - cat >> dist/bundles/index.html << EOF -

    Bulk Downloads

    -

    Download all agents for a module as a zip archive:

    - - -

    Usage

    -

    Copy the raw XML URL and paste into your AI platform's custom instructions or project knowledge.

    -

    Example: https://raw.githubusercontent.com/bmad-code-org/bmad-bundles/main/bmm/agents/pm.xml

    - -

    Installation (Recommended)

    -

    For full IDE integration with slash commands, use the installer:

    -
    npx bmad-method@alpha install
    - - - - - EOF - - - name: Checkout bmad-bundles repo - uses: actions/checkout@v4 - with: - repository: bmad-code-org/bmad-bundles - path: bmad-bundles - token: ${{ secrets.BUNDLES_PAT }} - - - name: Update bundles - run: | - # Clear old bundles - rm -rf bmad-bundles/* - - # Copy new bundles - cp -r dist/bundles/* bmad-bundles/ - - # Create .nojekyll for GitHub Pages - touch bmad-bundles/.nojekyll - - # Create README - cat > bmad-bundles/README.md << 'EOF' - # BMAD Web Bundles (Latest) - - **⚠️ Unstable Build**: These bundles are auto-generated from the latest `main` branch. - - For stable releases, visit [GitHub Releases](https://github.com/bmad-code-org/BMAD-METHOD/releases/latest). - - ## Usage - - Copy raw markdown URLs for use in AI platforms: - - - Claude Code: `https://raw.githubusercontent.com/bmad-code-org/bmad-bundles/main/claude-code/sub-agents/{agent}.md` - - ChatGPT: `https://raw.githubusercontent.com/bmad-code-org/bmad-bundles/main/chatgpt/sub-agents/{agent}.md` - - Gemini: `https://raw.githubusercontent.com/bmad-code-org/bmad-bundles/main/gemini/sub-agents/{agent}.md` - - ## Browse - - Visit [https://bmad-code-org.github.io/bmad-bundles/](https://bmad-code-org.github.io/bmad-bundles/) to browse bundles. - - ## Installation (Recommended) - - For full IDE integration: - ```bash - npx bmad-method@alpha install - ``` - - --- - - Auto-updated by [BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD) on every main branch merge. - EOF - - - name: Commit and push to bmad-bundles - run: | - cd bmad-bundles - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - - git add . - - if git diff --staged --quiet; then - echo "No changes to bundles, skipping commit" - else - COMMIT_SHA=$(cd .. && git rev-parse --short HEAD) - git commit -m "Update bundles from BMAD-METHOD@${COMMIT_SHA}" - git push - echo "✅ Bundles published to GitHub Pages" - fi - - - name: Summary - run: | - echo "## 🎉 Bundles Published!" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Latest bundles** available at:" >> $GITHUB_STEP_SUMMARY - echo "- 🌐 Browse: https://bmad-code-org.github.io/bmad-bundles/" >> $GITHUB_STEP_SUMMARY - echo "- 📦 Raw files: https://github.com/bmad-code-org/bmad-bundles" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Commit**: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/manual-release.yaml b/.github/workflows/manual-release.yaml index 4f9808fa..03f6695f 100644 --- a/.github/workflows/manual-release.yaml +++ b/.github/workflows/manual-release.yaml @@ -6,11 +6,11 @@ on: version_bump: description: Version bump type required: true - default: alpha + default: beta type: choice options: - - alpha - beta + - alpha - patch - minor - major @@ -158,9 +158,12 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | VERSION="${{ steps.version.outputs.new_version }}" - if [[ "$VERSION" == *"alpha"* ]] || [[ "$VERSION" == *"beta"* ]]; then - echo "Publishing prerelease version with --tag alpha" + if [[ "$VERSION" == *"alpha"* ]]; then + echo "Publishing alpha prerelease version with --tag alpha" npm publish --tag alpha + elif [[ "$VERSION" == *"beta"* ]]; then + echo "Publishing beta prerelease version with --tag latest" + npm publish --tag latest else echo "Publishing stable version with --tag latest" npm publish --tag latest diff --git a/.gitignore b/.gitignore index 75becca1..885cb245 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Dependencies -node_modules/ +**/node_modules/ pnpm-lock.yaml bun.lock deno.lock diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml index 12a3c943..c22ff4c5 100644 --- a/.markdownlint-cli2.yaml +++ b/.markdownlint-cli2.yaml @@ -2,7 +2,7 @@ # https://github.com/DavidAnson/markdownlint-cli2 ignores: - - node_modules/** + - "**/node_modules/**" - test/fixtures/** - CODE_OF_CONDUCT.md - _bmad/** diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f266887..ef064ebd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,99 @@ # Changelog +## [6.0.0-Beta.2] + +- Fix installer so commands match what is installed, centralize most ide into a central file instead of separate files for each ide. +- Specific IDEs may still need udpates, but all is config driven now and should be easier to maintain +- Kiro still needs updates, but its been in this state since contributed, will investigate soon +- Any version older than Beta.0 will recommend removal and reinstall to project. From later alphas though its sufficient to quick update if still desired, but best is just start fresh with Beta. + +## [6.0.0-Beta.1] + +**Release: January 2026 - Alpha to Beta Transition** + +### 🎉 Beta Release + +- **Transition from Alpha to Beta**: BMad Method is now in Beta! This marks a significant milestone in the framework's development +- **NPM Default Tag**: Beta versions are now published with the `latest` tag, making `npx bmad-method` serve the beta version by default + +### 🌟 Key Highlights + +1. **bmad-help**: Revolutionary AI-powered guidance system replaces the alpha workflow-init and workflow tracking — introduces full AI intelligence to guide users through workflows, commands, and project context +2. **Module Ecosystem Expansion**: bmad-builder, CIS (Creative Intelligence Suite), and Game Dev Studio moved to separate repositories for focused development +3. **Installer Consolidation**: Unified installer architecture with standardized command naming (`bmad-dash-case.md` or `bmad-*-agent-*.md`) +4. **Windows Compatibility**: Complete migration from Inquirer.js to @clack/prompts for reliable cross-platform support + +### 🚀 Major Features + +**bmad-help - Intelligent Guidance System:** + +- **Replaces**: workflow-init and legacy workflow tracking +- **AI-Powered**: Full context awareness of installed modules, workflows, agents, and commands +- **Dynamic Discovery**: Automatically catalogs all available workflows from installed modules +- **Intelligent Routing**: Guides users to the right workflow or agent based on their goal +- **IDE Integration**: Generates proper IDE command files for all discovered workflows + +**Module Restructuring:** + +| Module | Status | New Location | +| ------------------------------------- | ------------------------------------------------- | ------------------------------------------------------- | +| **bmad-builder** | Near beta, with docs and walkthroughs coming soon | `bmad-code-org/bmad-builder` | +| **CIS** (Creative Intelligence Suite) | Published as npm package | `bmad-code-org/bmad-module-creative-intelligence-suite` | +| **Game Dev Studio** | Published as npm package | `bmad-code-org/bmad-module-game-dev-studio` | + +### 🔧 Installer & CLI Improvements + +**UnifiedInstaller Architecture:** + +- All IDE installers now use a common `UnifiedInstaller` class +- Standardized command naming conventions: + - Workflows: `bmad-module-workflow-name.md` + - Agents: `bmad-module-agent-name.md` + - Tasks: `bmad-task-name.md` + - Tools: `bmad-tool-name.md` +- External module installation from npm with progress indicators +- Module removal on unselect with confirmation + +**Windows Compatibility Fix:** + +- Replaced Inquirer.js with @clack/prompts to fix arrow key navigation issues on Windows +- All 91 installer workflows migrated to new prompt system + +### 📚 Documentation Updates + +**Significant docsite improvements:** + +- Interactive workflow guide page (`/workflow-guide`) with track selector +- TEA documentation restructured using Diátaxis framework (25 docs) +- Style guide optimized for LLM readers (367 lines, down from 767) +- Glossary rewritten using table format (123 lines, down from 373) +- README overhaul with numbered command flows and prominent `/bmad-help` callout +- New workflow map diagram with interactive HTML +- New editorial review tasks for document quality +- E2E testing methodology for Game Dev Studio + +More documentation updates coming soon. + +### 🐛 Bug Fixes + +- Fixed TodoMVC URL references to include `/dist/` path +- Fixed glob pattern normalization for Windows compatibility +- Fixed YAML indentation in kilo.js customInstructions field +- Fixed stale path references in check-implementation-readiness workflow +- Fixed sprint-status.yaml sync in correct-course workflow +- Fixed web bundler entry point reference +- Fixed mergeModuleHelpCatalogs ordering after generateManifests + +### 📊 Statistics + +- **91 commits** since alpha.23 +- **969 files changed** (+23,716 / -91,509 lines) +- **Net reduction of ~67,793 lines** through cleanup and consolidation +- **3 major modules** moved to separate repositories +- **Complete installer refactor** for standardization + +--- + ## [6.0.0-alpha.23] **Release: January 11, 2026** diff --git a/README.md b/README.md index 3aed42a2..2842bee6 100644 --- a/README.md +++ b/README.md @@ -5,55 +5,81 @@ [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen)](https://nodejs.org) [![Discord](https://img.shields.io/badge/Discord-Join%20Community-7289da?logo=discord&logoColor=white)](https://discord.gg/gk8jAdXWmj) -**Build More, Architect Dreams** — An AI-driven agile development framework with 21 specialized agents, 50+ guided workflows, and scale-adaptive intelligence that adjusts from bug fixes to enterprise systems. +**Breakthrough Method of Agile AI Driven Development** — An AI-driven agile development framework with 21 specialized agents, 50+ guided workflows, and scale-adaptive intelligence that adjusts from bug fixes to enterprise systems. **100% free and open source.** No paywalls. No gated content. No gated Discord. We believe in empowering everyone, not just those who can pay. ## Why BMad? -Traditional AI tools do the thinking for you, producing average results. BMad agents act as expert collaborators who guide you through structured workflows to bring out your best thinking. +Traditional AI tools do the thinking for you, producing average results. BMad agents and facilitated workflow act as expert collaborators who guide you through a structured process to bring out your best thinking in partnership with the AI. -- **Scale-Adaptive**: Automatically adjusts planning depth based on project complexity (Level 0-4) +- **AI Intelligent Help**: Brand new for beta - AI assisted help will guide you from the beginning to the end - just ask for `/bmad-help` after you have installed BMad to your project +- **Scale-Domain-Adaptive**: Automatically adjusts planning depth and needs based on project complexity, domain and type - a SaaS Mobile Dating App has different planning needs from a diagnostic medical system, BMad adapts and helps you along the way - **Structured Workflows**: Grounded in agile best practices across analysis, planning, architecture, and implementation - **Specialized Agents**: 12+ domain experts (PM, Architect, Developer, UX, Scrum Master, and more) -- **Complete Lifecycle**: From brainstorming to deployment, with just-in-time documentation +- **Party Mode**: Bring multiple agent personas into one session to plan, troubleshoot, or discuss your project collaboratively, multiple perspectives with maximum fun +- **Complete Lifecycle**: From brainstorming to deployment, BMad is there with you every step of the way ## Quick Start **Prerequisites**: [Node.js](https://nodejs.org) v20+ ```bash -npx bmad-method@alpha install +npx bmad-method install ``` -Follow the installer prompts to configure your project. Then run: +Follow the installer prompts, then open your AI IDE (Claude Code, Cursor, Windsurf, etc.) in the project folder. -```bash -*workflow-init -``` +> **Not sure what to do?** Run `/bmad-help` — it tells you exactly what's next and what's optional. You can also ask it questions like: -This analyzes your project and recommends a track: + - `/bmad-help How should I build a web app for for my TShirt Business that can scale to millions?` + - `/bmad-help I just finished the architecture, I am not sure what to do next` -| Track | Best For | Time to First Story | -| --------------- | ------------------------- | ------------------- | -| **Quick Flow** | Bug fixes, small features | ~5 minutes | -| **BMad Method** | Products and platforms | ~15 minutes | -| **Enterprise** | Compliance-heavy systems | ~30 minutes | +And the amazing this is BMad Help evolves depending on what modules you install also! + - `/bmad-help Im interested in really exploring creative ways to demo BMad at work, what do you recommend to help plan a great slide deck and compelling narrative?`, and if you have the Creative Intelligence Suite installed, it will offer you different or complimentary advice than if you just have BMad Method Module installed! + +The workflows below show the fastest path to working code. You can also load agents directly for a more structured process, extensive planning, or to learn about agile development practices — the agents guide you with menus, explanations, and elicitation at each step. + +### Simple Path (Quick Flow) + +Bug fixes, small features, clear scope — 3 commands - 1 Optional Agent: + +1. `/quick-spec` — analyzes your codebase and produces a tech-spec with stories +2. `/dev-story` — implements each story +3. `/code-review` — validates quality + +### Full Planning Path (BMad Method) + +Products, platforms, complex features — structured planning then build: + +1. `/product-brief` — define problem, users, and MVP scope +2. `/create-prd` — full requirements with personas, metrics, and risks +3. `/create-architecture` — technical decisions and system design +4. `/create-epics-and-stories` — break work into prioritized stories +5. `/sprint-planning` — initialize sprint tracking +6. **Repeat per story:** `/create-story` → `/dev-story` → `/code-review` + +Every step tells you what's next. Optional phases (brainstorming, research, UX design) are available when you need them — ask `/bmad-help` anytime. For a detailed walkthrough, see the [Getting Started Tutorial](http://docs.bmad-method.org/tutorials/getting-started/). ## Modules -| Module | Purpose | -| ------------------------------------- | -------------------------------------------------------- | -| **BMad Method (BMM)** | Core agile development with 34 workflows across 4 phases | -| **BMad Builder (BMB)** | Create custom agents and domain-specific modules | -| **Creative Intelligence Suite (CIS)** | Innovation, brainstorming, and problem-solving | +BMad Method extends with official modules for specialized domains. Modules are available during installation and can be added to your project at any time. After the V6 beta period these will also be available as Plugins and Granular Skills. + +| Module | GitHub | NPM | Purpose | +| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | +| **BMad Method (BMM)** | [bmad-code-org/BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD) | [bmad-method](https://www.npmjs.com/package/bmad-method) | Core framework with 34+ workflows across 4 development phases | +| **BMad Builder (BMB)** | [bmad-code-org/bmad-builder](https://github.com/bmad-code-org/bmad-builder) | [bmad-builder](https://www.npmjs.com/package/bmad-builder) | Create custom BMad agents, workflows, and domain-specific modules | +| **Game Dev Studio (BMGD)** | [bmad-code-org/bmad-module-game-dev-studio](https://github.com/bmad-code-org/bmad-module-game-dev-studio) | [bmad-game-dev-studio](https://www.npmjs.com/package/bmad-game-dev-studio) | Game development workflows for Unity, Unreal, and Godot | +| **Creative Intelligence Suite (CIS)** | [bmad-code-org/bmad-module-creative-intelligence-suite](https://github.com/bmad-code-org/bmad-module-creative-intelligence-suite) | [bmad-creative-intelligence-suite](https://www.npmjs.com/package/bmad-creative-intelligence-suite) | Innovation, brainstorming, design thinking, and problem-solving | + +* More modules are coming in the next 2 weeks from BMad Official, and a community marketplace for the installer also will be coming with the final V6 release! ## Documentation **[Full Documentation](http://docs.bmad-method.org)** — Tutorials, how-to guides, concepts, and reference -- [Getting Started Tutorial](http://docs.bmad-method.org/tutorials/getting-started/getting-started-bmadv6/) -- [Upgrading from Previous Versions](http://docs.bmad-method.org/how-to/installation/upgrade-to-v6/) +- [Getting Started Tutorial](http://docs.bmad-method.org/tutorials/getting-started/) +- [Upgrading from Previous Versions](http://docs.bmad-method.org/how-to/upgrade-to-v6/) ### For v4 Users @@ -62,7 +88,7 @@ This analyzes your project and recommends a track: ## Community - [Discord](https://discord.gg/gk8jAdXWmj) — Get help, share ideas, collaborate -- [YouTube](https://www.youtube.com/@BMadCode) — Tutorials, master class, and podcast (launching Feb 2025) +- [Subscribe on YouTube](https://www.youtube.com/@BMadCode) — Tutorials, master class, and podcast (launching Feb 2025) - [GitHub Issues](https://github.com/bmad-code-org/BMAD-METHOD/issues) — Bug reports and feature requests - [Discussions](https://github.com/bmad-code-org/BMAD-METHOD/discussions) — Community conversations @@ -70,11 +96,10 @@ This analyzes your project and recommends a track: BMad is free for everyone — and always will be. If you'd like to support development: -- ⭐ [Star us on GitHub](https://github.com/bmad-code-org/BMAD-METHOD/) — Helps others discover BMad -- 📺 [Subscribe on YouTube](https://www.youtube.com/@BMadCode) — Master class launching Feb 2026 +- ⭐ Please click the star project icon at near the top right of this page - ☕ [Buy Me a Coffee](https://buymeacoffee.com/bmad) — Fuel the development - 🏢 Corporate sponsorship — DM on Discord -- 🎤 Speaking & Media — Available for conferences, podcasts, interviews (Discord) +- 🎤 Speaking & Media — Available for conferences, podcasts, interviews (BM on Discord) ## Contributing diff --git a/docs/_README_WORKFLOW_DIAGRAMS.md b/docs/_README_WORKFLOW_DIAGRAMS.md deleted file mode 100644 index 8e61bc94..00000000 --- a/docs/_README_WORKFLOW_DIAGRAMS.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "Workflow Diagram Maintenance" ---- - - -## Regenerating SVG from Excalidraw - -When you edit `workflow-method-greenfield.excalidraw`, regenerate the SVG: - -1. Open -2. Load the `.excalidraw` file -3. Click menu (☰) → Export image → SVG -4. **Set "Scale" to 1x** (default is 2x) -5. Click "Export" -6. Save as `workflow-method-greenfield.svg` -7. **Validate the changes** (see below) -8. Commit both files together - -**Important:** - -- Always use **1x scale** to maintain consistent dimensions -- Automated export tools (`excalidraw-to-svg`) are broken - use manual export only - -## Visual Validation - -After regenerating the SVG, validate that it renders correctly: - -```bash -./tools/validate-svg-changes.sh path/to/workflow-method-greenfield.svg -``` - -This script: - -- Checks for required dependencies (Playwright, ImageMagick) -- Installs Playwright locally if needed (no package.json pollution) -- Renders old vs new SVG using browser-accurate rendering -- Compares pixel-by-pixel and generates a diff image -- Outputs a prompt for AI visual analysis (paste into Gemini/Claude) - -**Threshold**: <0.01% difference is acceptable (anti-aliasing variations) diff --git a/docs/_STYLE_GUIDE.md b/docs/_STYLE_GUIDE.md index 4966ec3a..e5fb51ff 100644 --- a/docs/_STYLE_GUIDE.md +++ b/docs/_STYLE_GUIDE.md @@ -6,17 +6,17 @@ This project adheres to the [Google Developer Documentation Style Guide](https:/ ## Project-Specific Rules -| Rule | Specification | -|------|---------------| -| No horizontal rules (`---`) | Fragments reading flow | -| No `####` headers | Use bold text or admonitions instead | -| No "Related" or "Next:" sections | Sidebar handles navigation | -| No deeply nested lists | Break into sections instead | -| No code blocks for non-code | Use admonitions for dialogue examples | -| No bold paragraphs for callouts | Use admonitions instead | -| 1-2 admonitions per section max | Tutorials allow 3-4 per major section | -| Table cells / list items | 1-2 sentences max | -| Header budget | 8-12 `##` per doc; 2-3 `###` per section | +| Rule | Specification | +| -------------------------------- | ---------------------------------------- | +| No horizontal rules (`---`) | Fragments reading flow | +| No `####` headers | Use bold text or admonitions instead | +| No "Related" or "Next:" sections | Sidebar handles navigation | +| No deeply nested lists | Break into sections instead | +| No code blocks for non-code | Use admonitions for dialogue examples | +| No bold paragraphs for callouts | Use admonitions instead | +| 1-2 admonitions per section max | Tutorials allow 3-4 per major section | +| Table cells / list items | 1-2 sentences max | +| Header budget | 8-12 `##` per doc; 2-3 `###` per section | ## Admonitions (Starlight Syntax) @@ -40,31 +40,31 @@ Critical warnings only — data loss, security issues ### Standard Uses -| Admonition | Use For | -|------------|---------| -| `:::note[Prerequisites]` | Dependencies before starting | -| `:::tip[Quick Path]` | TL;DR summary at document top | -| `:::caution[Important]` | Critical caveats | -| `:::note[Example]` | Command/response examples | +| Admonition | Use For | +| ------------------------ | ----------------------------- | +| `:::note[Prerequisites]` | Dependencies before starting | +| `:::tip[Quick Path]` | TL;DR summary at document top | +| `:::caution[Important]` | Critical caveats | +| `:::note[Example]` | Command/response examples | ## Standard Table Formats **Phases:** ```md -| Phase | Name | What Happens | -|-------|------|--------------| -| 1 | Analysis | Brainstorm, research *(optional)* | -| 2 | Planning | Requirements — PRD or tech-spec *(required)* | +| Phase | Name | What Happens | +| ----- | -------- | -------------------------------------------- | +| 1 | Analysis | Brainstorm, research *(optional)* | +| 2 | Planning | Requirements — PRD or tech-spec *(required)* | ``` **Commands:** ```md -| Command | Agent | Purpose | -|---------|-------|---------| -| `*workflow-init` | Analyst | Initialize a new project | -| `*prd` | PM | Create Product Requirements Document | +| Command | Agent | Purpose | +| ------------ | ------- | ------------------------------------ | +| `brainstorm` | Analyst | Brainstorm a new project | +| `prd` | PM | Create Product Requirements Document | ``` ## Folder Structure Blocks @@ -141,13 +141,13 @@ your-project/ ### Types -| Type | Example | -|------|---------| -| **Index/Landing** | `core-concepts/index.md` | -| **Concept** | `what-are-agents.md` | -| **Feature** | `quick-flow.md` | -| **Philosophy** | `why-solutioning-matters.md` | -| **FAQ** | `brownfield-faq.md` | +| Type | Example | +| ----------------- | ---------------------------- | +| **Index/Landing** | `core-concepts/index.md` | +| **Concept** | `what-are-agents.md` | +| **Feature** | `quick-flow.md` | +| **Philosophy** | `why-solutioning-matters.md` | +| **FAQ** | `brownfield-faq.md` | ### General Template @@ -217,14 +217,14 @@ your-project/ ### Types -| Type | Example | -|------|---------| -| **Index/Landing** | `workflows/index.md` | -| **Catalog** | `agents/index.md` | -| **Deep-Dive** | `document-project.md` | -| **Configuration** | `core-tasks.md` | -| **Glossary** | `glossary/index.md` | -| **Comprehensive** | `bmgd-workflows.md` | +| Type | Example | +| ----------------- | --------------------- | +| **Index/Landing** | `workflows/index.md` | +| **Catalog** | `agents/index.md` | +| **Deep-Dive** | `document-project.md` | +| **Configuration** | `core-tasks.md` | +| **Glossary** | `glossary/index.md` | +| **Comprehensive** | `bmgd-workflows.md` | ### Reference Index Pages @@ -303,19 +303,19 @@ Starlight generates right-side "On this page" navigation from headers: ```md ## Category Name -| Term | Definition | -|------|------------| -| **Agent** | Specialized AI persona with specific expertise that guides users through workflows. | +| Term | Definition | +| ------------ | ---------------------------------------------------------------------------------------- | +| **Agent** | Specialized AI persona with specific expertise that guides users through workflows. | | **Workflow** | Multi-step guided process that orchestrates AI agent activities to produce deliverables. | ``` ### Definition Rules -| Do | Don't | -|----|-------| +| Do | Don't | +| ----------------------------- | ------------------------------------------- | | Start with what it IS or DOES | Start with "This is..." or "A [term] is..." | -| Keep to 1-2 sentences | Write multi-paragraph explanations | -| Bold term name in cell | Use plain text for terms | +| Keep to 1-2 sentences | Write multi-paragraph explanations | +| Bold term name in cell | Use plain text for terms | ### Context Markers diff --git a/docs/_archive/customize-workflows.md b/docs/_archive/customize-workflows.md deleted file mode 100644 index 3a80e471..00000000 --- a/docs/_archive/customize-workflows.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "Workflow Customization Guide" ---- - -Customize and optimize workflows with step replacement and hooks. - -## Status - -:::note[Coming Soon] -Workflow customization is an upcoming capability. This guide will be updated when the feature is available. -::: - -## What to Expect - -Workflow customization will allow you to: - -- **Replace Steps** - Swap out specific workflow steps with custom implementations -- **Add Hooks** - Inject custom behavior before/after workflow steps -- **Extend Workflows** - Create new workflows based on existing ones -- **Override Behavior** - Customize workflow logic for your project's needs - -## For Now - -While workflow customization is in development, you can: - -- **Create Custom Workflows** - Use the BMad Builder to create entirely new workflows -- **Customize Agents** - Modify agent behavior using [Agent Customization](/docs/how-to/customization/customize-agents.md) -- **Provide Feedback** - Share your workflow customization needs with the community - -**In the meantime:** Learn how to [create custom workflows](/docs/explanation/bmad-builder/index.md) from scratch. diff --git a/docs/_archive/getting-started-bmadv4.md b/docs/_archive/getting-started-bmadv4.md deleted file mode 100644 index 53ca1c6c..00000000 --- a/docs/_archive/getting-started-bmadv4.md +++ /dev/null @@ -1,247 +0,0 @@ ---- -title: "Getting Started with BMad v4" -description: Install BMad and create your first planning document ---- - - -Build software faster using AI-powered workflows with specialized agents that guide you through planning, architecture, and implementation. - -:::note[Stable Release] -This tutorial covers BMad v4, the current stable release. For the latest features (with potential breaking changes), see the [BMad v6 Alpha tutorial](./getting-started-bmadv6.md). -::: - -## What You'll Learn - -- Install and configure BMad for your IDE -- Understand how BMad organizes work into phases and agents -- Initialize a project and choose a planning track -- Create your first requirements document - -:::note[Prerequisites] -- **Node.js 20+** — Required for the installer -- **Git** — Recommended for version control -- **AI-powered IDE** — Claude Code, Cursor, Windsurf, or similar -- **A project idea** — Even a simple one works for learning -::: - -:::tip[Quick Path] -**Install** → `npx bmad-method install` -**Initialize** → Load Analyst agent, run `workflow-init` -**Plan** → PM creates PRD, Architect creates architecture -**Build** → SM manages sprints, DEV implements stories -**Always use fresh chats** for each workflow to avoid context issues. -::: - -## Understanding BMad - -BMad helps you build software through guided workflows with specialized AI agents. The process follows four phases: - -| Phase | Name | What Happens | -|-------|------|--------------| -| 1 | Analysis | Brainstorm, research *(optional)* | -| 2 | Planning | Requirements — PRD or tech-spec *(required)* | -| 3 | Solutioning | Architecture, design decisions *(varies by track)* | -| 4 | Implementation | Build code story by story *(required)* | - -Based on your project's complexity, BMad offers three planning tracks: - -| Track | Best For | Documents Created | -|-------|----------|-------------------| -| **Quick Flow** | Bug fixes, simple features, clear scope | Tech-spec only | -| **BMad Method** | Products, platforms, complex features | PRD + Architecture + UX | -| **Enterprise** | Compliance, multi-tenant, enterprise needs | PRD + Architecture + Security + DevOps | - -## Installation - -Open a terminal in your project directory and run: - -```bash -npx bmad-method install -``` - -The interactive installer guides you through setup: - -- **Choose Installation Location** — Select current directory (recommended), subdirectory, or custom path -- **Select Your AI Tool** — Claude Code, Cursor, Windsurf, or other -- **Choose Modules** — Select **BMM** (BMad Method) for this tutorial -- **Accept Defaults** — Customize later in `_bmad/[module]/config.yaml` - -Verify your installation: - -``` -your-project/ -├── _bmad/ -│ ├── bmm/ # Method module -│ │ ├── agents/ # Agent files -│ │ ├── workflows/ # Workflow files -│ │ └── config.yaml # Module config -│ └── core/ # Core utilities -├── _bmad-output/ # Generated artifacts (created later) -└── .claude/ # IDE configuration (if using Claude Code) -``` - -:::tip[Troubleshooting] -Having issues? See [Install BMad](../../how-to/installation/install-bmad.md) for common solutions. -::: - -## Step 1: Initialize Your Project - -Load the **Analyst agent** in your IDE: -- **Claude Code**: Type `/analyst` or load the agent file directly -- **Cursor/Windsurf**: Open the agent file from `_bmad/bmm/agents/` - -Wait for the agent's menu to appear, then run: - -``` -Run workflow-init -``` - -Or use the shorthand: `*workflow-init` - -The workflow asks you to describe: -- **Your project and goals** — What are you building? What problem does it solve? -- **Existing codebase** — Is this new (greenfield) or existing code (brownfield)? -- **Size and complexity** — Roughly how big is this? (adjustable later) - -Based on your description, the workflow suggests a planning track. For this tutorial, choose **BMad Method**. - -Once you confirm, the workflow creates `bmm-workflow-status.yaml` to track your progress. - -:::caution[Fresh Chats] -Always start a fresh chat for each workflow. This prevents context limitations from causing issues. -::: - -## Step 2: Create Your Plan - -With your project initialized, work through the planning phases. - -### Phase 1: Analysis (Optional) - -If you want to brainstorm or research first: -- **brainstorm-project** — Guided ideation with the Analyst -- **research** — Market and technical research -- **product-brief** — Recommended foundation document - -### Phase 2: Planning (Required) - -**Start a fresh chat** and load the **PM agent**. - -``` -Run prd -``` - -Or use shortcuts: `*prd`, select "create-prd" from the menu, or say "Let's create a PRD". - -The PM agent guides you through: -1. **Project overview** — Refine your project description -2. **Goals and success metrics** — What does success look like? -3. **User personas** — Who uses this product? -4. **Functional requirements** — What must the system do? -5. **Non-functional requirements** — Performance, security, scalability needs - -When complete, you'll have `PRD.md` in your `_bmad-output/` folder. - -:::note[UX Design (Optional)] -If your project has a user interface, load the **UX-Designer agent** and run the UX design workflow after creating your PRD. -::: - -### Phase 3: Solutioning (Required for BMad Method) - -**Start a fresh chat** and load the **Architect agent**. - -``` -Run create-architecture -``` - -The architect guides you through technical decisions: tech stack, database design, API patterns, and system structure. - -:::tip[Check Your Status] -Unsure what's next? Load any agent and run `workflow-status`. It tells you the next recommended or required workflow. -::: - -## Step 3: Build Your Project - -Once planning is complete, move to implementation. - -### Initialize Sprint Planning - -Load the **SM agent** and run `sprint-planning`. This creates `sprint-status.yaml` to track all epics and stories. - -### The Build Cycle - -For each story, repeat this cycle with fresh chats: - -| Step | Agent | Workflow | Purpose | -|------|-------|----------|---------| -| 1 | SM | `create-story` | Create story file from epic | -| 2 | DEV | `dev-story` | Implement the story | -| 3 | DEV | `code-review` | Quality validation *(recommended)* | - -After completing all stories in an epic, load the **SM agent** and run `retrospective`. - -## What You've Accomplished - -You've learned the foundation of building with BMad: - -- Installed BMad and configured it for your IDE -- Initialized a project with your chosen planning track -- Created planning documents (PRD, Architecture) -- Understood the build cycle for implementation - -Your project now has: - -``` -your-project/ -├── _bmad/ # BMad configuration -├── _bmad-output/ -│ ├── PRD.md # Your requirements document -│ ├── architecture.md # Technical decisions -│ └── bmm-workflow-status.yaml # Progress tracking -└── ... -``` - -## Quick Reference - -| Command | Agent | Purpose | -|---------|-------|---------| -| `*workflow-init` | Analyst | Initialize a new project | -| `*workflow-status` | Any | Check progress and next steps | -| `*prd` | PM | Create Product Requirements Document | -| `*create-architecture` | Architect | Create architecture document | -| `*sprint-planning` | SM | Initialize sprint tracking | -| `*create-story` | SM | Create a story file | -| `*dev-story` | DEV | Implement a story | -| `*code-review` | DEV | Review implemented code | - -## Common Questions - -**Do I need to create a PRD for every project?** -Only for BMad Method and Enterprise tracks. Quick Flow projects use a simpler tech-spec instead. - -**Can I skip Phase 1 (Analysis)?** -Yes, Phase 1 is optional. If you already know what you're building, start with Phase 2 (Planning). - -**What if I want to brainstorm first?** -Load the Analyst agent and run `*brainstorm-project` before `workflow-init`. - -**Why start fresh chats for each workflow?** -Workflows are context-intensive. Reusing chats can cause the AI to hallucinate or lose track of details. Fresh chats ensure maximum context capacity. - -## Getting Help - -- **During workflows** — Agents guide you with questions and explanations -- **Check status** — Run `workflow-status` with any agent -- **Community** — [Discord](https://discord.gg/gk8jAdXWmj) (#bmad-method-help, #report-bugs-and-issues) -- **Video tutorials** — [BMad Code YouTube](https://www.youtube.com/@BMadCode) - -## Key Takeaways - -:::tip[Remember These] -- **Always use fresh chats** — Load agents in new chats for each workflow -- **Let workflow-status guide you** — Ask any agent for status when unsure -- **Track matters** — Quick Flow uses tech-spec; Method/Enterprise need PRD and architecture -- **Tracking is automatic** — Status files update themselves -- **Agents are flexible** — Use menu numbers, shortcuts (`*prd`), or natural language -::: - -Ready to start? Install BMad, load the Analyst, run `workflow-init`, and let the agents guide you. diff --git a/docs/_archive/vendor-workflows.md b/docs/_archive/vendor-workflows.md deleted file mode 100644 index 4ad4f840..00000000 --- a/docs/_archive/vendor-workflows.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "Workflow Vendoring, Customization, and Inheritance" ---- - -Use workflow vendoring and inheritance to share or reutilize workflows across modules. - -## Workflow Vendoring - -Workflow Vendoring allows an agent to have access to a workflow from another module, without having to install said module. At install time, the module workflow being vendored will be cloned and installed into the module that is receiving the vendored workflow the agent needs. - -### How to Vendor - -Lets assume you are building a module, and you do not want to recreate a workflow from the BMad Method, such as workflows/4-implementation/dev-story/workflow.md. Instead of copying all the context to your module, and having to maintain it over time as updates are made, you can instead use the exec-vendor menu item in your agent. - -From your modules agent definition, you would implement the menu item as follows in the agent: - -```yaml - - trigger: develop-story - exec-vendor: "{project-root}/_bmad//workflows/4-production/dev-story/workflow.md" - exec: "{project-root}/_bmad//workflows/dev-story/workflow.md" - description: "Execute Dev Story workflow, implementing tasks and tests, or performing updates to the story" -``` - -At install time, it will clone the workflow and all of its required assets, and the agent that gets built will have an exec to a path installed in its own module. The content gets added to the folder you specify in exec. While it does not have to exactly match the source path, you will want to ensure you are specifying the workflow.md to be in a new location (in other words in this example, dev-story would not already be the path of another custom module workflow that already exists.) - -## Workflow Inheritance - -:::note[Coming Soon] -Official support for workflow inheritance is coming post beta. -::: - -Workflow Inheritance is a different concept, that allows you to modify or extend existing workflow. - -Party Mode from the core is an example of a workflow that is designed with inheritance in mind - customization for specific party needs. While party mode itself is generic - there might be specific agent collaborations you want to create. Without having to reinvent the whole party mode concept, or copy and paste all of its content - you could inherit from party mode to extend it to be specific. - -Some possible examples could be: - -- Retrospective -- Sprint Planning -- Collaborative Brainstorming Sessions - -## Workflow Customization - -:::note[Coming Soon] -Official support for workflow customization is coming post beta. -::: - -Similar to Workflow Inheritance, Workflow Customization will soon be allowed for certain workflows that are meant to be user customized - similar in process to how agents are customized now. - -This will take the shape of workflows with optional hooks, configurable inputs, and the ability to replace whole at install time. - -For example, assume you are using the Create PRD workflow, which is comprised of 11 steps, and you want to always include specifics about your companies domain, technical landscape or something else. While project-context can be helpful with that, you can also through hooks and step overrides, have full replace steps, the key requirement being to ensure your step replace file is an exact file name match of an existing step, follows all conventions, and ends in a similar fashion to either hook back in to call the next existing step, or more custom steps that eventually hook back into the flow. diff --git a/docs/downloads.md b/docs/downloads.md index 0db386cf..d063c8e1 100644 --- a/docs/downloads.md +++ b/docs/downloads.md @@ -6,19 +6,21 @@ Download BMad Method resources for offline use, AI training, or integration. ## Source Bundles -| File | Description | -|------|-------------| -| **[bmad-sources.zip](/downloads/bmad-sources.zip)** | Complete BMad source files | -| **[bmad-prompts.zip](/downloads/bmad-prompts.zip)** | Agent and workflow prompts only | +Download these from the `downloads/` folder on the documentation site. + +| File | Description | +| ------------------ | ------------------------------- | +| `bmad-sources.zip` | Complete BMad source files | +| `bmad-prompts.zip` | Agent and workflow prompts only | ## LLM-Optimized Files -These files are designed for AI consumption - perfect for loading into Claude, ChatGPT, or any LLM context window. +These files are designed for AI consumption - perfect for loading into Claude, ChatGPT, or any LLM context window. See [API Access](#api-access) below for URLs. -| File | Description | Use Case | -|------|-------------|----------| -| **[llms.txt](/llms.txt)** | Documentation index with summaries | Quick overview, navigation | -| **[llms-full.txt](/llms-full.txt)** | Complete documentation concatenated | Full context loading | +| File | Description | Use Case | +| --------------- | ----------------------------------- | -------------------------- | +| `llms.txt` | Documentation index with summaries | Quick overview, navigation | +| `llms-full.txt` | Complete documentation concatenated | Full context loading | ### Using with LLMs @@ -41,12 +43,12 @@ docs = requests.get("https://bmad-code-org.github.io/BMAD-METHOD/llms-full.txt") ## Installation Options -### NPM (Recommended) - ```bash -npx bmad-method@alpha install +npx bmad-method install ``` +[More details](/docs/how-to/install-bmad.md) + ## Version Information - **Current Version:** See [CHANGELOG](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/CHANGELOG.md) diff --git a/docs/explanation/advanced-elicitation.md b/docs/explanation/advanced-elicitation.md new file mode 100644 index 00000000..c7ca5bcf --- /dev/null +++ b/docs/explanation/advanced-elicitation.md @@ -0,0 +1,24 @@ +--- +title: "Advanced Elicitation" +description: Push the LLM to rethink its work using structured reasoning methods +--- + +Make the LLM reconsider what it just generated. You pick a reasoning method, it applies that method to its own output, you decide whether to keep the improvements. + +Dozens of methods are built in - things like First Principles, Red Team vs Blue Team, Pre-mortem Analysis, Socratic Questioning, and more. + +## When to Use It + +- After a workflow generates content and you want alternatives +- When output seems okay but you suspect there's more depth +- To stress-test assumptions or find weaknesses +- For high-stakes content where rethinking helps + +Workflows offer advanced elicitation at decision points - after the LLM has generated something, you'll be asked if you want to run it. + +## How It Works + +1. LLM suggests 5 relevant methods for your content +2. You pick one (or reshuffle for different options) +3. Method is applied, improvements shown +4. Accept or discard, repeat or continue diff --git a/docs/explanation/adversarial-review.md b/docs/explanation/adversarial-review.md new file mode 100644 index 00000000..4543616e --- /dev/null +++ b/docs/explanation/adversarial-review.md @@ -0,0 +1,57 @@ +--- +title: "Adversarial Review" +description: Forced reasoning technique that prevents lazy "looks good" reviews +--- + +Force deeper analysis by requiring problems to be found. + +## What is Adversarial Review? + +A review technique where the reviewer *must* find issues. No "looks good" allowed. The reviewer adopts a cynical stance - assume problems exist and find them. + +This isn't about being negative. It's about forcing genuine analysis instead of a cursory glance that rubber-stamps whatever was submitted. + +**The core rule:** You must find issues. Zero findings triggers a halt - re-analyze or explain why. + +## Why It Works + +Normal reviews suffer from confirmation bias. You skim the work, nothing jumps out, you approve it. The "find problems" mandate breaks this pattern: + +- **Forces thoroughness** - Can't approve until you've looked hard enough to find issues +- **Catches missing things** - "What's not here?" becomes a natural question +- **Improves signal quality** - Findings are specific and actionable, not vague concerns +- **Information asymmetry** - Run reviews with fresh context (no access to original reasoning) so you evaluate the artifact, not the intent + +## Where It's Used + +Adversarial review appears throughout BMAD workflows - code review, implementation readiness checks, spec validation, and others. Sometimes it's a required step, sometimes optional (like advanced elicitation or party mode). The pattern adapts to whatever artifact needs scrutiny. + +## Human Filtering Required + +Because the AI is *instructed* to find problems, it will find problems - even when they don't exist. Expect false positives: nitpicks dressed as issues, misunderstandings of intent, or outright hallucinated concerns. + +**You decide what's real.** Review each finding, dismiss the noise, fix what matters. + +## Example + +Instead of: + +> "The authentication implementation looks reasonable. Approved." + +An adversarial review produces: + +> 1. **HIGH** - `login.ts:47` - No rate limiting on failed attempts +> 2. **HIGH** - Session token stored in localStorage (XSS vulnerable) +> 3. **MEDIUM** - Password validation happens client-side only +> 4. **MEDIUM** - No audit logging for failed login attempts +> 5. **LOW** - Magic number `3600` should be `SESSION_TIMEOUT_SECONDS` + +The first review might miss a security vulnerability. The second caught four. + +## Iteration and Diminishing Returns + +After addressing findings, consider running it again. A second pass usually catches more. A third isn't always useless either. But each pass takes time, and eventually you hit diminishing returns - just nitpicks and false findings. + +:::tip[Better Reviews] +Assume problems exist. Look for what's missing, not just what's wrong. +::: diff --git a/docs/explanation/agents/barry-quick-flow.md b/docs/explanation/agents/barry-quick-flow.md deleted file mode 100644 index 62d454ff..00000000 --- a/docs/explanation/agents/barry-quick-flow.md +++ /dev/null @@ -1,328 +0,0 @@ ---- -title: "Quick Flow Solo Dev Agent (Barry)" ---- - -Barry is the elite solo developer who takes projects from concept to deployment with ruthless efficiency — no handoffs, no delays, just pure focused development. - -:::note[Agent Info] -- **Agent ID:** `_bmad/bmm/agents/quick-flow-solo-dev.md` -- **Icon:** 🚀 -- **Module:** BMM -::: - -## Overview - -Barry is the elite solo developer who lives and breathes the BMad Quick Flow workflow. He takes projects from concept to deployment with ruthless efficiency - no handoffs, no delays, just pure focused development. Barry architects specs, writes the code, and ships features faster than entire teams. When you need it done right and done now, Barry's your dev. - -### Agent Persona - -**Name:** Barry -**Title:** Quick Flow Solo Dev - -**Identity:** Barry is an elite developer who thrives on autonomous execution. He lives and breathes the BMad Quick Flow workflow, taking projects from concept to deployment with ruthless efficiency. No handoffs, no delays - just pure, focused development. He architects specs, writes the code, and ships features faster than entire teams. - -**Communication Style:** Direct, confident, and implementation-focused. Uses tech slang and gets straight to the point. No fluff, just results. Every response moves the project forward. - -**Core Principles:** - -- Planning and execution are two sides of the same coin -- Quick Flow is my religion -- Specs are for building, not bureaucracy -- Code that ships is better than perfect code that doesn't -- Documentation happens alongside development, not after -- Ship early, ship often - -## Menu Commands - -Barry owns the entire BMad Quick Flow path, providing a streamlined 3-step development process that eliminates handoffs and maximizes velocity. - -### 1. **quick-spec** - -- **Workflow:** `_bmad/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md` -- **Description:** Architect a technical spec with implementation-ready stories -- **Use when:** You need to transform requirements into a buildable spec - -### 2. **quick-dev** - -- **Workflow:** `_bmad/bmm/workflows/bmad-quick-flow/quick-dev/workflow.yaml` -- **Description:** Ship features from spec or direct instructions - no handoffs -- **Use when:** You're ready to ship code based on a spec or clear instructions - -### 3. **code-review** - -- **Workflow:** `_bmad/bmm/workflows/4-implementation/code-review/workflow.yaml` -- **Description:** Review code for quality, patterns, and acceptance criteria -- **Use when:** You need to validate implementation quality - -### 4. **party-mode** - -- **Workflow:** `_bmad/core/workflows/party-mode/workflow.yaml` -- **Description:** Bring in other experts when I need specialized backup -- **Use when:** You need collaborative problem-solving or specialized expertise - -## When to Use Barry - -### Ideal Scenarios - -1. **Quick Flow Development** - Small to medium features that need rapid delivery -2. **Technical Specification Creation** - When you need detailed implementation plans -3. **Direct Development** - When requirements are clear and you want to skip extensive planning -4. **Code Reviews** - When you need senior-level technical validation -5. **Performance-Critical Features** - When optimization and scalability are paramount - -### Project Types - -- **Greenfield Projects** - New features or components -- **Brownfield Modifications** - Enhancements to existing codebases -- **Bug Fixes** - Complex issues requiring deep technical understanding -- **Proof of Concepts** - Rapid prototyping with production-quality code -- **Performance Optimizations** - System improvements and scalability work - -## The BMad Quick Flow Process - -Barry orchestrates a simple, efficient 3-step process: - -```mermaid -flowchart LR - A[Requirements] --> B[quick-spec] - B --> C[Tech Spec] - C --> D[quick-dev] - D --> E[Implementation] - E --> F{Code Review?} - F -->|Yes| G[code-review] - F -->|No| H[Complete] - G --> H[Complete] - - style A fill:#e1f5fe - style B fill:#f3e5f5 - style C fill:#e8f5e9 - style D fill:#fff3e0 - style E fill:#fce4ec - style G fill:#f1f8e9 - style H fill:#e0f2f1 -``` - -### Step 1: Technical Specification (`quick-spec`) - -**Goal:** Transform user requirements into implementation-ready technical specifications - -**Process:** - -1. **Problem Understanding** - Clarify requirements, scope, and constraints -2. **Code Investigation** - Analyze existing patterns and dependencies (if applicable) -3. **Specification Generation** - Create comprehensive tech spec with: - - Problem statement and solution overview - - Development context and patterns - - Implementation tasks with acceptance criteria - - Technical decisions and dependencies -4. **Review and Finalize** - Validate spec captures user intent - -**Output:** `tech-spec-{slug}.md` saved to sprint artifacts - -**Best Practices:** - -- Include ALL context a fresh dev agent needs -- Be specific about files, patterns, and conventions -- Define clear acceptance criteria using Given/When/Then format -- Document technical decisions and trade-offs - -### Step 2: Development (`quick-dev`) - -**Goal:** Execute implementation based on tech spec or direct instructions - -**Two Modes:** - -**Mode A: Tech-Spec Driven** - -- Load existing tech spec -- Extract tasks, context, and acceptance criteria -- Execute all tasks continuously without stopping -- Respect project context and existing patterns - -**Mode B: Direct Instructions** - -- Accept direct development commands -- Offer optional planning step -- Execute with minimal friction - -**Process:** - -1. **Load Project Context** - Understand patterns and conventions -2. **Execute Implementation** - Work through all tasks: - - Load relevant files and context - - Implement following established patterns - - Write and run tests - - Handle errors appropriately -3. **Verify Completion** - Ensure all tasks complete, tests passing, AC satisfied - -### Step 3: Code Review (`code-review`) - Optional - -**Goal:** Senior developer review of implemented code - -**When to Use:** - -- Critical production features -- Complex architectural changes -- Performance-sensitive implementations -- Team development scenarios -- Learning and knowledge transfer - -**Review Focus:** - -- Code quality and patterns -- Acceptance criteria compliance -- Performance and scalability -- Security considerations -- Maintainability and documentation - -## Collaboration with Other Agents - -### Natural Partnerships - -- **Tech Writer** - For documentation and API specs when I need it -- **Architect** - For complex system design decisions beyond Quick Flow scope -- **Dev** - For implementation pair programming (rarely needed) -- **QA** - For test strategy and quality gates on critical features -- **UX Designer** - For user experience considerations - -### Party Mode Composition - -In party mode, Barry often acts as: - -- **Solo Tech Lead** - Guiding architectural decisions -- **Implementation Expert** - Providing coding insights -- **Performance Optimizer** - Ensuring scalable solutions -- **Code Review Authority** - Validating technical approaches - -## Tips for Working with Barry - -### For Best Results - -1. **Be Specific** - Provide clear requirements and constraints -2. **Share Context** - Include relevant files and patterns -3. **Define Success** - Clear acceptance criteria lead to better outcomes -4. **Trust the Process** - The 3-step flow is optimized for speed and quality -5. **Leverage Expertise** - I'll give you optimization and architectural insights automatically - -### Communication Patterns - -- **Git Commit Style** - "feat: Add user authentication with OAuth 2.0" -- **RFC Style** - "Proposing microservice architecture for scalability" -- **Direct Questions** - "Actually, have you considered the race condition?" -- **Technical Trade-offs** - "We could optimize for speed over memory here" - -### Avoid These Common Mistakes - -1. **Vague Requirements** - Leads to unnecessary back-and-forth -2. **Ignoring Patterns** - Causes technical debt and inconsistencies -3. **Skipping Code Review** - Missed opportunities for quality improvement -4. **Over-planning** - I excel at rapid, pragmatic development -5. **Not Using Party Mode** - Missing collaborative insights for complex problems - -## Example Workflow - -```bash -# Start with Barry -/bmad:bmm:agents:quick-flow-solo-dev - -# Create a tech spec -> quick-spec - -# Quick implementation -> quick-dev tech-spec-auth.md - -# Optional code review -> code-review -``` - -### Sample Tech Spec Structure - -```markdown -# Tech-Spec: User Authentication System - -**Created:** 2025-01-15 -**Status:** Ready for Development - -## Overview - -### Problem Statement - -Users cannot securely access the application, and we need role-based permissions for enterprise features. - -### Solution - -Implement OAuth 2.0 authentication with JWT tokens and role-based access control (RBAC). - -### Scope (In/Out) - -**In:** Login, logout, password reset, role management -**Out:** Social login, SSO, multi-factor authentication (Phase 2) - -## Context for Development - -### Codebase Patterns - -- Use existing auth middleware pattern in `src/middleware/auth.js` -- Follow service layer pattern from `src/services/` -- JWT secrets managed via environment variables - -### Files to Reference - -- `src/middleware/auth.js` - Authentication middleware -- `src/models/User.js` - User data model -- `config/database.js` - Database connection - -### Technical Decisions - -- JWT tokens over sessions for API scalability -- bcrypt for password hashing -- Role-based permissions stored in database - -## Implementation Plan - -### Tasks - -- [ ] Create authentication service -- [ ] Implement login/logout endpoints -- [ ] Add JWT middleware -- [ ] Create role-based permissions -- [ ] Write comprehensive tests - -### Acceptance Criteria - -- [ ] Given valid credentials, when user logs in, then receive JWT token -- [ ] Given invalid token, when accessing protected route, then return 401 -- [ ] Given admin role, when accessing admin endpoint, then allow access -``` - -## Common Questions - -- [When should I use Barry vs other agents?](#when-should-i-use-barry-vs-other-agents) -- [Is the code review step mandatory?](#is-the-code-review-step-mandatory) -- [Can I skip the tech spec step?](#can-i-skip-the-tech-spec-step) -- [How does Barry differ from the Dev agent?](#how-does-barry-differ-from-the-dev-agent) -- [Can Barry handle enterprise-scale projects?](#can-barry-handle-enterprise-scale-projects) - -### When should I use Barry vs other agents? - -Use Barry for Quick Flow development (small to medium features), rapid prototyping, or when you need elite solo development. For large, complex projects requiring full team collaboration, consider the full BMad Method with specialized agents. - -### Is the code review step mandatory? - -No, it's optional but highly recommended for critical features, team projects, or when learning best practices. - -### Can I skip the tech spec step? - -Yes, the quick-dev workflow accepts direct instructions. However, tech specs are recommended for complex features or team collaboration. - -### How does Barry differ from the Dev agent? - -Barry handles the complete Quick Flow process (spec → dev → review) with elite architectural expertise, while the Dev agent specializes in pure implementation tasks. Barry is your autonomous end-to-end solution. - -### Can Barry handle enterprise-scale projects? - -For enterprise-scale projects requiring full team collaboration, consider using the Enterprise Method track. Barry is optimized for rapid delivery in the Quick Flow track where solo execution wins. - -:::tip[Ready to Ship?] -Start with `/bmad:bmm:agents:quick-flow-solo-dev` -::: diff --git a/docs/explanation/agents/index.md b/docs/explanation/agents/index.md deleted file mode 100644 index d8ebc323..00000000 --- a/docs/explanation/agents/index.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "Understanding Agents" -description: Understanding BMad agents and their roles ---- - -Comprehensive guides to BMad's AI agents — their roles, capabilities, and how to work with them effectively. - -## Agent Guides - -| Agent | Description | -| ------------------------------------------------------------------------------- | ---------------------------------------------------- | -| **[Agent Roles](/docs/explanation/core-concepts/agent-roles.md)** | Overview of all BMM agent roles and responsibilities | -| **[Quick Flow Solo Dev (Barry)](/docs/explanation/agents/barry-quick-flow.md)** | The dedicated agent for rapid development | - -## Getting Started - -1. Read **[What Are Agents?](/docs/explanation/core-concepts/what-are-agents.md)** for the core concept explanation -2. Review **[Agent Roles](/docs/explanation/core-concepts/agent-roles.md)** to understand available agents -3. Choose an agent that fits your workflow needs diff --git a/docs/explanation/architecture/four-phases.md b/docs/explanation/architecture/four-phases.md deleted file mode 100644 index 59c350f0..00000000 --- a/docs/explanation/architecture/four-phases.md +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: "The Four Phases of BMad Method" -description: Understanding the four phases of the BMad Method ---- - - -BMad Method uses a four-phase approach that adapts to project complexity while ensuring consistent quality. - -## Phase Overview - -| Phase | Name | Purpose | Required? | -|-------|------|---------|-----------| -| **Phase 1** | Analysis | Exploration and discovery | Optional | -| **Phase 2** | Planning | Requirements definition | Required | -| **Phase 3** | Solutioning | Technical design | Track-dependent | -| **Phase 4** | Implementation | Building the software | Required | - -## Phase 1: Analysis (Optional) - -Exploration and discovery workflows that help validate ideas and understand markets before planning. - -**Workflows:** -- `brainstorm-project` - Solution exploration -- `research` - Market/technical/competitive research -- `product-brief` - Strategic vision capture - -**When to use:** -- Starting new projects -- Exploring opportunities -- Validating market fit - -**When to skip:** -- Clear requirements -- Well-defined features -- Continuing existing work - -## Phase 2: Planning (Required) - -Requirements definition using the scale-adaptive system to match planning depth to project complexity. - -**Workflows:** -- `prd` - Product Requirements Document (BMad Method/Enterprise) -- `tech-spec` - Technical specification (Quick Flow) -- `create-ux-design` - Optional UX specification - -**Key principle:** -Define **what** to build and **why**. Leave **how** to Phase 3. - -## Phase 3: Solutioning (Track-Dependent) - -Technical architecture and design decisions that prevent agent conflicts during implementation. - -**Workflows:** -- `architecture` - System design with ADRs -- `create-epics-and-stories` - Work breakdown (after architecture) -- `implementation-readiness` - Gate check - -**Required for:** -- BMad Method (complex projects) -- Enterprise Method - -**Skip for:** -- Quick Flow (simple changes) - -**Key principle:** -Make technical decisions explicit so all agents implement consistently. - -## Phase 4: Implementation (Required) - -Iterative sprint-based development with story-centric workflow. - -**Workflows:** -- `sprint-planning` - Initialize tracking -- `create-story` - Prepare stories -- `dev-story` - Implement with tests -- `code-review` - Quality assurance -- `retrospective` - Continuous improvement - -:::tip[Key Principle] -One story at a time — complete each story's full lifecycle before starting the next. -::: - -## Phase Flow by Track - -### Quick Flow - -``` -Phase 2 (tech-spec) → Phase 4 (implement) -``` - -Skip Phases 1 and 3 for simple changes. - -### BMad Method - -``` -Phase 1 (optional) → Phase 2 (PRD) → Phase 3 (architecture) → Phase 4 (implement) -``` - -Full methodology for complex projects. - -### Enterprise - -``` -Phase 1 → Phase 2 (PRD) → Phase 3 (architecture + extended) → Phase 4 (implement) -``` - -Same as BMad Method with optional extended workflows. diff --git a/docs/explanation/bmm/index.md b/docs/explanation/bmm/index.md deleted file mode 100644 index 2631a43e..00000000 --- a/docs/explanation/bmm/index.md +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: "BMM Documentation" ---- - -Complete guides for the BMad Method Module (BMM) — AI-powered agile development workflows that adapt to your project's complexity. - -## Getting Started - -:::tip[Quick Path] -Install → workflow-init → Follow agent guidance -::: - -**New to BMM?** Start here: - -| Resource | Description | -|----------|-------------| -| **[Quick Start Guide](/docs/tutorials/getting-started/getting-started-bmadv6.md)** | Step-by-step guide to building your first project | -| **[Complete Workflow Diagram](../../tutorials/getting-started/images/workflow-method-greenfield.svg)** | Visual flowchart showing all phases, agents, and decision points | - -## Core Concepts - -The BMad Method is meant to be adapted and customized to your specific needs. In this realm there is no one size fits all - your needs are unique, and BMad Method is meant to support this (and if it does not, can be further customized or extended with new modules). - -First know there is the full BMad Method Process and then there is a Quick Flow for those quicker smaller efforts. - -- **[Full Adaptive BMad Method](#workflow-guides)** - Full planning and scope support through extensive development and testing. - - Broken down into 4 phases, all of which are comprised of both required and optional phases - - Phases 1-3 are all about progressive idea development through planning and preparations to build your project. - - Phase 4 is the implementation cycle where you will Just In Time (JIT) produce the contextual stories needed for the dev agent based on the extensive planning completed - - All 4 phases have optional steps in them, depending on how rigorous you want to go with planning, research ideation, validation, testing and traceability. - - While there is a lot here, know that even this can be distilled down to a simple PRD, Epic and Story list and then jump into the dev cycle. But if that is all you want, you might be better off with the BMad Quick Flow described next - -- **[BMad Quick Flow](/docs/explanation/features/quick-flow.md)** - Fast-track development workflow - - 3-step process: spec → dev → optional review - - Perfect for bug fixes and small features - - Rapid prototyping with production quality - - Implementation in minutes, not days - - Has a specialized single agent that does all of this: **[Quick Flow Solo Dev Agent](/docs/explanation/agents/barry-quick-flow.md)** - -- **TEA engagement (optional)** - Choose TEA engagement: none, TEA-only (standalone), or integrated by track. See **[Test Architect Guide](/docs/explanation/features/tea-overview.md)**. - -## Agents and Collaboration - -Complete guide to BMM's AI agent team: - -- **[Agents Guide](/docs/explanation/core-concepts/agent-roles.md)** - Comprehensive agent reference - - 12 specialized BMM agents + BMad Master - - Agent roles, workflows, and when to use them - - Agent customization system - - Best practices and common patterns - -- **[Party Mode Guide](/docs/explanation/features/party-mode.md)** - Multi-agent collaboration - - How party mode works (19+ agents collaborate in real-time) - - When to use it (strategic, creative, cross-functional, complex) - - Example party compositions - - Multi-module integration (BMM + CIS + BMB + custom) - - Agent customization in party mode - - Best practices - -## Working with Existing Code - -Comprehensive guide for brownfield development: - -- **[Brownfield Development Guide](/docs/how-to/brownfield/index.md)** - Complete guide for existing codebases - - Documentation phase strategies - - Track selection for brownfield - - Integration with existing patterns - - Phase-by-phase workflow guidance - - Common scenarios - -## Quick References - -Essential reference materials: - -- **[Glossary](/docs/reference/glossary/index.md)** - Key terminology and concepts -- **[FAQ](/docs/explanation/faq/index.md)** - Frequently asked questions across all topics - -## Choose Your Path - -### I need to... - -**Build something new (greenfield)** -→ Start with [Quick Start Guide](/docs/tutorials/getting-started/getting-started-bmadv6.md) - -**Fix a bug or add small feature** -→ Use the [Quick Flow Solo Dev](/docs/explanation/agents/barry-quick-flow.md) directly with its dedicated stand alone [Quick Bmad Spec Flow](/docs/explanation/features/quick-flow.md) process - -**Work with existing codebase (brownfield)** -→ Read [Brownfield Development Guide](/docs/how-to/brownfield/index.md) -→ Pay special attention to documentation requirements for brownfield projects - -## Workflow Guides - -Comprehensive documentation for all BMM workflows organized by phase: - -- **[Phase 1: Analysis Workflows](/docs/how-to/workflows/run-brainstorming-session.md)** - Optional exploration and research workflows (595 lines) - - brainstorm-project, product-brief, research, and more - - When to use analysis workflows - - Creative and strategic tools - -- **[Phase 2: Planning Workflows](/docs/how-to/workflows/create-prd.md)** - Scale-adaptive planning (967 lines) - - prd, tech-spec, gdd, narrative, ux - - Track-based planning approach (Quick Flow, BMad Method, Enterprise Method) - - Which planning workflow to use - -- **[Phase 3: Solutioning Workflows](/docs/how-to/workflows/create-architecture.md)** - Architecture and validation (638 lines) - - architecture, create-epics-and-stories, implementation-readiness - - V6: Epics created AFTER architecture for better quality - - Required for BMad Method and Enterprise Method tracks - - Preventing agent conflicts - -- **[Phase 4: Implementation Workflows](/docs/how-to/workflows/run-sprint-planning.md)** - Sprint-based development (1,634 lines) - - sprint-planning, create-story, dev-story, code-review - - Complete story lifecycle - - One-story-at-a-time discipline - -- **[Testing & QA Workflows](/docs/explanation/features/tea-overview.md)** - Comprehensive quality assurance (1,420 lines) - - Test strategy, automation, quality gates - - TEA agent and test healing - -## External Resources - -### Community and Support - -- **[Discord Community](https://discord.gg/gk8jAdXWmj)** - Get help from the community (#bmad-method-help, #report-bugs-and-issues) -- **[GitHub Issues](https://github.com/bmad-code-org/BMAD-METHOD/issues)** - Report bugs or request features -- **[YouTube Channel](https://www.youtube.com/@BMadCode)** - Video tutorials and walkthroughs - -:::tip[Ready to Begin?] -[Start with the Quick Start Guide](/docs/tutorials/getting-started/getting-started-bmadv6.md) -::: diff --git a/docs/explanation/brainstorming.md b/docs/explanation/brainstorming.md new file mode 100644 index 00000000..f4301b2f --- /dev/null +++ b/docs/explanation/brainstorming.md @@ -0,0 +1,31 @@ +--- +title: "Brainstorming" +description: Interactive creative sessions using 60+ proven ideation techniques +--- + +Unlock your creativity through guided exploration. + +## What is Brainstorming? + +Run `brainstorming` and you've got a creative facilitator pulling ideas out of you - not generating them for you. The AI acts as coach and guide, using proven techniques to create conditions where your best thinking emerges. + +**Good for:** + +- Breaking through creative blocks +- Generating product or feature ideas +- Exploring problems from new angles +- Developing raw concepts into action plans + +## How It Works + +1. **Setup** - Define topic, goals, constraints +2. **Choose approach** - Pick techniques yourself, get AI recommendations, go random, or follow a progressive flow +3. **Facilitation** - Work through techniques with probing questions and collaborative coaching +4. **Organize** - Ideas grouped into themes and prioritized +5. **Action** - Top ideas get next steps and success metrics + +Everything gets captured in a session document you can reference later or share with stakeholders. + +:::note[Your Ideas] +Every idea comes from you. The workflow creates conditions for insight - you're the source. +::: diff --git a/docs/explanation/faq/brownfield-faq.md b/docs/explanation/brownfield-faq.md similarity index 54% rename from docs/explanation/faq/brownfield-faq.md rename to docs/explanation/brownfield-faq.md index 79e192b2..1c9b3b82 100644 --- a/docs/explanation/faq/brownfield-faq.md +++ b/docs/explanation/brownfield-faq.md @@ -6,12 +6,12 @@ Quick answers to common questions about brownfield (existing codebase) developme ## Questions -- [What is brownfield vs greenfield?](#what-is-brownfield-vs-greenfield) -- [Do I have to run document-project for brownfield?](#do-i-have-to-run-document-project-for-brownfield) -- [What if I forget to run document-project?](#what-if-i-forget-to-run-document-project) -- [Can I use Quick Spec Flow for brownfield projects?](#can-i-use-quick-spec-flow-for-brownfield-projects) -- [How does workflow-init handle old planning docs?](#how-does-workflow-init-handle-old-planning-docs) -- [What if my existing code doesn't follow best practices?](#what-if-my-existing-code-doesnt-follow-best-practices) +- [Questions](#questions) + - [What is brownfield vs greenfield?](#what-is-brownfield-vs-greenfield) + - [Do I have to run document-project for brownfield?](#do-i-have-to-run-document-project-for-brownfield) + - [What if I forget to run document-project?](#what-if-i-forget-to-run-document-project) + - [Can I use Quick Spec Flow for brownfield projects?](#can-i-use-quick-spec-flow-for-brownfield-projects) + - [What if my existing code doesn't follow best practices?](#what-if-my-existing-code-doesnt-follow-best-practices) ### What is brownfield vs greenfield? @@ -25,19 +25,12 @@ Highly recommended, especially if: - No existing documentation - Documentation is outdated - AI agents need context about existing code -- Level 2-4 complexity -You can skip it if you have comprehensive, up-to-date documentation including `docs/index.md`. +You can skip it if you have comprehensive, up-to-date documentation including `docs/index.md` or will use other tools or techniques to aid in discovery for the agent to build on an existing system. ### What if I forget to run document-project? -Workflows will lack context about existing code. You may get: - -- Suggestions that don't match existing patterns -- Integration approaches that miss existing APIs -- Architecture that conflicts with current structure - -Run document-project and restart planning with proper context. +Don't worry about it - you can do it at any time. You can even do it during or after a project to help keep docs up to date. ### Can I use Quick Spec Flow for brownfield projects? @@ -50,17 +43,6 @@ Yes! Quick Spec Flow works great for brownfield. It will: Perfect for bug fixes and small features in existing codebases. -### How does workflow-init handle old planning docs? - -workflow-init asks about YOUR current work first, then uses old artifacts as context: - -1. Shows what it found (old PRD, epics, etc.) -2. Asks: "Is this work in progress, previous effort, or proposed work?" -3. If previous effort: Asks you to describe your NEW work -4. Determines level based on YOUR work, not old artifacts - -This prevents old Level 3 PRDs from forcing Level 3 workflow for a new Level 0 bug fix. - ### What if my existing code doesn't follow best practices? Quick Spec Flow detects your conventions and asks: "Should I follow these existing conventions?" You decide: diff --git a/docs/explanation/core-concepts/agent-roles.md b/docs/explanation/core-concepts/agent-roles.md deleted file mode 100644 index 31e0d76c..00000000 --- a/docs/explanation/core-concepts/agent-roles.md +++ /dev/null @@ -1,179 +0,0 @@ ---- -title: "Agent Roles in BMad Method" -description: Understanding the different agent roles in BMad Method ---- - -BMad Method uses specialized AI agents, each with a distinct role, expertise, and personality. Understanding these roles helps you know which agent to use for each task. - -## Core Agents Overview - -| Agent | Role | Primary Phase | -|-------|------|---------------| -| **Analyst** | Research and discovery | Phase 1 (Analysis) | -| **PM** | Requirements and planning | Phase 2 (Planning) | -| **Architect** | Technical design | Phase 3 (Solutioning) | -| **SM** | Sprint orchestration | Phase 4 (Implementation) | -| **DEV** | Code implementation | Phase 4 (Implementation) | -| **TEA** | Test architecture | Phases 3-4 (Cross-phase) | -| **UX Designer** | User experience | Phase 2-3 | -| **Quick Flow Solo Dev** | Fast solo development | All phases (Quick Flow) | - -## Phase 1: Analysis - -### Analyst (Mary) - -Business analysis and research specialist. - -**Responsibilities:** -- Brainstorming and ideation -- Market, domain, and competitive research -- Product brief creation -- Brownfield project documentation - -**Key Workflows:** -- `*brainstorm-project` -- `*research` -- `*product-brief` -- `*document-project` - -**When to use:** Starting new projects, exploring ideas, validating market fit, documenting existing codebases. - -## Phase 2: Planning - -### PM (John) - -Product requirements and planning expert. - -**Responsibilities:** -- Creating Product Requirements Documents -- Defining functional and non-functional requirements -- Breaking requirements into epics and stories -- Validating implementation readiness - -**Key Workflows:** -- `*create-prd` -- `*create-epics-and-stories` -- `*implementation-readiness` - -**When to use:** Defining what to build, creating PRDs, organizing work into stories. - -### UX Designer (Sally) - -User experience and UI design specialist. - -**Responsibilities:** -- UX specification creation -- User journey mapping -- Wireframe and mockup design -- Design system documentation - -**Key Workflows:** -- `*create-ux-design` -- `*validate-design` - -**When to use:** When UX is a primary differentiator, complex user workflows, design system creation. - -## Phase 3: Solutioning - -### Architect (Winston) - -System architecture and technical design expert. - -**Responsibilities:** -- System architecture design -- Architecture Decision Records (ADRs) -- Technical standards definition -- Implementation readiness validation - -**Key Workflows:** -- `*create-architecture` -- `*implementation-readiness` - -**When to use:** Multi-epic projects, cross-cutting technical decisions, preventing agent conflicts. - -## Phase 4: Implementation - -### SM (Bob) - -Sprint planning and story preparation orchestrator. - -**Responsibilities:** -- Sprint planning and tracking -- Story preparation for development -- Course correction handling -- Epic retrospectives - -**Key Workflows:** -- `*sprint-planning` -- `*create-story` -- `*correct-course` -- `*epic-retrospective` - -**When to use:** Organizing work, preparing stories, tracking progress. - -### DEV (Amelia) - -Story implementation and code review specialist. - -**Responsibilities:** -- Story implementation with tests -- Code review -- Following architecture patterns -- Quality assurance - -**Key Workflows:** -- `*dev-story` -- `*code-review` - -**When to use:** Writing code, implementing stories, reviewing quality. - -## Cross-Phase Agents - -### TEA (Murat) - -Test architecture and quality strategy expert. - -**Responsibilities:** -- Test framework setup -- Test design and planning -- ATDD and automation -- Quality gate decisions - -**Key Workflows:** -- `*framework`, `*ci` -- `*test-design`, `*atdd`, `*automate` -- `*test-review`, `*trace`, `*nfr-assess` - -**When to use:** Setting up testing, creating test plans, quality gates. - -## Quick Flow - -### Quick Flow Solo Dev (Barry) - -Fast solo development without handoffs. - -**Responsibilities:** -- Technical specification -- End-to-end implementation -- Code review - -**Key Workflows:** -- `*quick-spec` -- `*quick-dev` -- `*code-review` - -**When to use:** Bug fixes, small features, rapid prototyping. - -## Choosing the Right Agent - -| Task | Agent | -|------|-------| -| Brainstorming ideas | Analyst | -| Market research | Analyst | -| Creating PRD | PM | -| Designing UX | UX Designer | -| System architecture | Architect | -| Preparing stories | SM | -| Writing code | DEV | -| Setting up tests | TEA | -| Quick bug fix | Quick Flow Solo Dev | diff --git a/docs/explanation/core-concepts/index.md b/docs/explanation/core-concepts/index.md deleted file mode 100644 index 076c3820..00000000 --- a/docs/explanation/core-concepts/index.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: "BMad Core Concepts" ---- - -Understanding the fundamental building blocks of the BMad Method. - -## The Essentials - -| Concept | Description | Guide | -|---------|-------------|-------| -| **Agents** | AI assistants with personas, capabilities, and menus | [Agents Guide](/docs/explanation/core-concepts/what-are-agents.md) | -| **Workflows** | Structured processes for achieving specific outcomes | [Workflows Guide](/docs/explanation/core-concepts/what-are-workflows.md) | -| **Modules** | Packaged collections of agents and workflows | [Modules Guide](/docs/explanation/core-concepts/what-are-modules.md) | - -## Getting Started - -### New to BMad? -Start here to understand what BMad is and how it works: - -1. **[Agents Guide](/docs/explanation/core-concepts/what-are-agents.md)** - Learn about Simple and Expert agents -2. **[Workflows Guide](/docs/explanation/core-concepts/what-are-workflows.md)** - Understand how workflows orchestrate tasks -3. **[Modules Guide](/docs/explanation/core-concepts/what-are-modules.md)** - See how modules organize functionality - -### Installing BMad - -- **[Installation Guide](/docs/how-to/installation/index.md)** - Set up BMad in your project -- **[Upgrading from v4](/docs/how-to/installation/upgrade-to-v6.md)** - Migrate from earlier versions - -### Configuration - -- **[BMad Customization](/docs/how-to/customization/index.md)** - Personalize agents and workflows - -### Advanced - -- **[Web Bundles](/docs/explanation/features/web-bundles.md)** - Use BMad in Gemini Gems and Custom GPTs diff --git a/docs/explanation/core-concepts/what-are-agents.md b/docs/explanation/core-concepts/what-are-agents.md deleted file mode 100644 index b08d9bc1..00000000 --- a/docs/explanation/core-concepts/what-are-agents.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: "Agents" ---- - -Agents are AI assistants that help you accomplish tasks. Each agent has a unique personality, specialized capabilities, and an interactive menu. - -## Agent Types - -BMad has two primary agent types, designed for different use cases: - -### Simple Agents - -**Self-contained, focused, ready to use.** - -Simple agents are complete in a single file. They excel at well-defined tasks and require minimal setup. - -**Best for:** -- Single-purpose assistants (code review, documentation, commit messages) -- Quick deployment -- Projects that don't require persistent memory -- Getting started fast - -**Example:** A commit message agent that reads your git diff and generates conventional commits. - -### Expert Agents - -**Powerful, memory-equipped, domain specialists.** - -Expert agents have a **sidecar** - a companion folder containing additional instructions, workflows, and memory files. They remember context across sessions and handle complex, multi-step tasks. - -**Best for:** -- Domain specialists (security architect, game designer, product manager) -- Tasks requiring persistent memory -- Complex workflows with multiple stages -- Projects that grow over time - -**Example:** A game architect that remembers your design decisions, maintains consistency across sprints, and coordinates with other specialists. - -## Key Differences - -| Feature | Simple | Expert | -| ---------------- | -------------- | -------------------------- | -| **Files** | Single file | Agent + sidecar folder | -| **Memory** | Session only | Persistent across sessions | -| **Capabilities** | Focused scope | Multi-domain, extensible | -| **Setup** | Zero config | Sidecar initialization | -| **Best Use** | Specific tasks | Ongoing projects | - -## Agent Components - -All agents share these building blocks: - -### Persona -- **Role** - What the agent does (expertise domain) -- **Identity** - Who the agent is (personality, character) -- **Communication Style** - How the agent speaks (tone, voice) -- **Principles** - Why the agent acts (values, decision framework) - -### Capabilities -- Skills, tools, and knowledge the agent can apply -- Mapped to specific menu commands - -### Menu -- Interactive command list -- Triggers, descriptions, and handlers -- Auto-includes help and exit options - -### Critical Actions (optional) -- Instructions that execute before the agent starts -- Enable autonomous behaviors (e.g., "check git status before changes") - -## Which Should You Use? - -:::tip[Quick Decision] -Choose **Simple** for focused, one-off tasks with no memory needs. Choose **Expert** when you need persistent context and complex workflows. -::: - -**Choose Simple when:** -- You need a task done quickly and reliably -- The scope is well-defined and won't change much -- You don't need the agent to remember things between sessions - -**Choose Expert when:** -- You're building something complex over time -- The agent needs to maintain context (project history, decisions) -- You want the agent to coordinate workflows or other agents -- Domain expertise requires specialized knowledge bases - -## Creating Custom Agents - -BMad provides the **BMad Builder (BMB)** module for creating your own agents. See the [Agent Creation Guide](https://github.com/bmad-code-org/bmad-builder/blob/main/docs/tutorials/create-custom-agent.md) for step-by-step instructions. - - - -## Customizing Existing Agents - -You can modify any agent's behavior without editing core files. See [BMad Customization](/docs/how-to/customization/index.md) for details. It is critical to never modify an installed agents .md file directly and follow the customization process, this way future updates to the agent or module its part of will continue to be updated and recompiled with the installer tool, and your customizations will still be retained. diff --git a/docs/explanation/core-concepts/what-are-modules.md b/docs/explanation/core-concepts/what-are-modules.md deleted file mode 100644 index 0c4eaae0..00000000 --- a/docs/explanation/core-concepts/what-are-modules.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: "Modules" ---- - -Modules are organized collections of agents and workflows that solve specific problems or address particular domains. - -## What is a Module? - -A module is a self-contained package that includes: - -- **Agents** - Specialized AI assistants -- **Workflows** - Step-by-step processes -- **Configuration** - Module-specific settings -- **Documentation** - Usage guides and reference - -## Official BMad Method and Builder Modules - -:::note[Core is Always Installed] -The Core module is automatically included with every BMad installation. It provides the foundation that other modules build upon. -::: - -### Core Module -Always installed, provides shared functionality: -- Global configuration -- Core workflows (Party Mode, Advanced Elicitation, Brainstorming) -- Common tasks (document indexing, sharding, review) - -### BMad Method (BMM) -Software and game development: -- Project planning workflows -- Implementation agents (Dev, PM, QA, Scrum Master) -- Testing and architecture guidance - -### BMad Builder (BMB) -Create custom solutions: -- Agent creation workflows -- Workflow authoring tools -- Module scaffolding - -## Additional Official BMad Modules - -These are officially maintained modules by BMad but have their own repo's and docs. -These give a good idea also of what can be done with the BMad builder and creating your own custom modules. - -### Creative Intelligence Suite (CIS) -Innovation and creativity: -- Creative thinking techniques -- Innovation strategy workflows -- Storytelling and ideation -- [Available Here](https://github.com/bmad-code-org/bmad-module-creative-intelligence-suite) - -### BMad Game Dev (BMGD) -Game development specialization: -- Game design workflows -- Narrative development -- Performance testing frameworks -- [Available Here](https://github.com/bmad-code-org/bmad-module-game-dev-studio) - -## Module Structure - -Installed modules follow this structure: - -``` -_bmad/ -├── core/ # Always present -├── bmm/ # BMad Method (if installed) -├── bmb/ # BMad Builder (if installed) -├── cis/ # Creative Intelligence (if installed) -└── bmgd/ # Game Dev (if installed) -``` - -## Custom Modules - -You can create your own modules containing: -- Custom agents for your domain -- Organizational workflows -- Team-specific configurations - -Custom modules are installed the same way as official modules. - -## Installing Modules - -During BMad installation, you choose which modules to install. You can also add or remove modules later by re-running the installer. - -See [Installation Guide](/docs/how-to/installation/index.md) for details. diff --git a/docs/explanation/core-concepts/what-are-workflows.md b/docs/explanation/core-concepts/what-are-workflows.md deleted file mode 100644 index e8721da9..00000000 --- a/docs/explanation/core-concepts/what-are-workflows.md +++ /dev/null @@ -1,204 +0,0 @@ ---- -title: "Workflows" ---- - -Workflows are like prompts on steroids. They harness the untapped power and control of LLMs through progressive disclosure—breaking complex tasks into focused steps that execute sequentially. Instead of random AI slop where you hope for the best, workflows give you repeatable, reliable, high-quality outputs. - -This guide explains what workflows are, why they're powerful, and how to think about designing them. - -## What Is a Workflow? - -A workflow is a structured process where the AI executes steps sequentially to accomplish a task. Each step has a specific purpose, and the AI moves through them methodically—whether that involves extensive collaboration or minimal user interaction. - -Think of it this way: instead of asking "help me build a nutrition plan" and getting a generic response, a workflow guides you (or runs automatically) through discovery, assessment, strategy, shopping lists, and prep schedules—each step building on the last, nothing missed, no shortcuts taken. - -## How do workflows differ from skills? - -Actually they really do not - a workflow can be a skill, and a skill can be a workflow. The main thing with a BMad workflow is the suggestion to follow certain conventions, which actually are also skill best practices. A skill has a few optional and required fields to add as the main file workflow and get stored in a specific location depending on your tool choice for automatic invocation by the llm - whereas workflows are generally intentionally launched, with from another process calling them, or a user invoking via a slash command. In the near future, workflows will optionally be installable as skills also - but if you like, you can add front matter to your custom workflows based on the skill spec from Anthropic, and put them in the proper location your tool dictates. - -### The Power of Progressive Disclosure - -Here's why workflows work so well: the AI only sees the current step. It doesn't know about step 5 when it's on step 2. It can't get ahead of itself, skip steps, or lose focus. Each step gets the AI's full attention, completing fully before the next step loads. - -This is the opposite of a giant prompt that tries to handle everything at once and inevitably misses details or loses coherence. - -Workflows exist on a spectrum: - -- **Interactive workflows** guide users through complex decisions via collaboration and facilitation -- **Automated workflows** run with minimal user input, processing documents or executing tasks -- **Hybrid workflows** combine both—some steps need user input, others run automatically - -### Real-World Workflow Examples - -**Tax Organizer Workflow** - -A tax preparation workflow that helps users organize financial documents for tax filing. Runs in a single session, follows prescriptive IRS categories, produces a checklist of required documents with missing-item alerts. Sequential and compliance-focused. - -**Meal Planning Workflow** - -Creates personalized weekly meal plans through collaborative nutrition planning. Users can stop mid-session and return later because the workflow tracks progress. Intent-based conversation helps discover preferences rather than following a script. Multi-session, creative, and highly interactive. - -**Course Creator Workflow** - -Helps instructors design course syllabi. Branches based on course type—academic courses need accreditation sections, vocational courses need certification prep, self-paced courses need different structures entirely. - -**Therapy Intake Workflow** - -Guides mental health professionals through structured client intake sessions. Highly sensitive and confidential, uses intent-based questioning to build rapport while ensuring all required clinical information is collected. Continuable across multiple sessions. - -**Software Architecture Workflow** (BMM Module) - -Part of a larger software development pipeline. Runs after product requirements and UX design are complete, takes those documents as input, then collaboratively walks through technical decisions: system components, data flows, technology choices, architectural patterns. Produces an architecture document that implementation teams use to build consistently. - -**Shard Document Workflow** - -Nearly hands-off automated workflow. Takes a large document as input, uses a custom npx tool to split it into smaller files, deletes the original, then augments an index with content details so the LLM can efficiently find and reference specific sections later. Minimal user interaction—just specify the input document. - -These examples show the range: from collaborative creative processes to automated batch jobs, workflows ensure completeness and consistency whether the work involves deep collaboration or minimal human oversight. - -### The Facilitative Philosophy - -When workflows involve users, they should be **facilitative, not directive**. The AI treats users as partners and domain experts, not as passive recipients of generated content. - -**Collaborative dialogue, not command-response**: The AI and user work together throughout. The AI brings structured thinking, methodology, and technical knowledge. The user brings domain expertise, context, and judgment. Together they produce something better than either could alone. - -**The user is the expert in their domain**: A nutrition planning workflow doesn't dictate meal plans—it guides users through discovering what works for their lifestyle. An architecture workflow doesn't tell architects what to build—it facilitates systematic decision-making so choices are explicit and consistent. - -**Intent-based facilitation**: Workflows should describe goals and approaches, not scripts. Instead of "Ask: What is your age? Then ask: What is your goal weight?" use "Guide the user through understanding their health profile. Ask 1-2 questions at a time. Think about their responses before asking follow-ups. Probe to understand their actual needs." - -The AI figures out exact wording and question order based on conversation context. This makes interactions feel natural and responsive rather than robotic and interrogative. - -:::caution[When to Be Prescriptive] -Some workflows require exact scripts—medical intake, legal compliance, safety-critical procedures. But these are the exception. Default to facilitative intent-based approaches unless compliance or regulation demands otherwise. -::: - -## Why Workflows Matter - -Workflows solve three fundamental problems with AI interactions: - -**Focus**: Each step contains only instructions for that phase. The AI sees one step at a time, preventing it from getting ahead of itself or losing focus. - -**Continuity**: Workflows can span multiple sessions. Stop mid-workflow and return later without losing progress—something free-form prompts can't do. - -**Quality**: Sequential enforcement prevents shortcuts. The AI must complete each step fully before moving on, ensuring thorough, complete outputs instead of rushed, half-baked results. - -## How Workflows Work - -### The Basic Structure - -Workflows consist of multiple markdown files, each representing one step: - -``` -my-workflow/ -├── workflow.md # Entry point and configuration -├── steps/ # Step files (steps-c/ for create, steps-e/ for edit, steps-v/ for validate) -│ ├── step-01-init.md -│ ├── step-02-profile.md -│ └── step-N-final.md -├── data/ # Reference materials, CSVs, examples -└── templates/ # Output document templates -``` - -The `workflow.md` file is minimal—it contains the workflow name, description, goal, the AI's role, and how to start. Importantly, it does not list all steps or detail what each does. This is progressive disclosure in action. - -### Sequential Execution - -Workflows execute in strict sequence: `step-01 → step-02 → step-03 → ... → step-N` - -The AI cannot skip steps or optimize the sequence. It must complete each step fully before loading the next. This ensures thoroughness and prevents shortcuts that compromise quality. - -### Continuable Workflows - -Some workflows are complex enough that users might need multiple sessions. These "continuable workflows" track which steps are complete in the output document's frontmatter, so users can stop and resume later without losing progress. - -Use continuable workflows when: -- The workflow produces large documents -- Multiple sessions are likely -- Complex decisions benefit from reflection -- The workflow has many steps (8+) - -Keep it simple (single-session) when tasks are quick, focused, and can be completed in one sitting. - -### Workflow Chaining - -Workflows can be chained together where outputs become inputs. The BMM module pipeline is a perfect example: - -``` -brainstorming → research → brief → PRD → UX → architecture → epics → sprint-planning - ↓ - implement-story → review → repeat -``` - -Each workflow checks for required inputs from prior workflows, validates they're complete, and produces output for the next workflow. This creates powerful end-to-end pipelines for complex processes. - -### The Tri-Modal Pattern - -For critical workflows that produce important artifacts, BMad uses a tri-modal structure: Create, Validate, and Edit. Each mode is a separate workflow path that can run independently or flow into the others. - -**Create mode** builds new artifacts from scratch. But here's where it gets interesting: create mode can also function as a conversion tool. Feed it a non-compliant document—something that doesn't follow BMad standards—and it will extract the essential content and rebuild it as a compliant artifact. This means you can bring in existing work and automatically upgrade it to follow proper patterns. - -**Validate mode** runs standalone and checks artifacts against standards. Because it's separate, you can run validation whenever you want—immediately after creation, weeks later when things have changed, or even using a different LLM entirely. It's like having a quality assurance checkpoint that's always available but never forced. - -**Edit mode** modifies existing artifacts while enforcing standards. As you update documents to reflect changing requirements or new understanding, edit mode ensures you don't accidentally drift away from the patterns that make the artifacts useful. It checks compliance as you work and can route back to create mode if it detects something that needs full conversion. - -All BMad planning workflows and the BMB module (will) use this tri-modal pattern. The pristine example is the workflow workflow in BMB—it creates workflow specifications, validates them against standards, and lets you edit them while maintaining compliance. You can study that workflow to see the pattern in action. - -This tri-modal approach gives you the best of both worlds: the creativity and flexibility to build what you need, the quality assurance of validation that can run anytime, and the ability to iterate while staying true to standards that make the artifacts valuable across sessions and team members. - -## Design Decisions - -Before building a workflow, answer these questions: - -**Module affiliation**: Is this standalone or part of a module? Module-based workflows can access module-specific variables and reference other workflow outputs. Also when part of a module, generally they will be associated to an agent. - -**Continuable or single-session?**: Will users need multiple sessions, or can this be completed in one sitting? - -**Edit/Validate support?**: Do you need Create/Edit/Validate modes (tri-modal structure)? Use tri-modal for complex, critical workflows requiring quality assurance. Use create-only for simple, one-off workflows. - -**Document output?**: Does this produce a persistent file, or perform actions without output? - -**Intent or prescriptive?**: Is this intent-based facilitation (most workflows) or prescriptive compliance (medical, legal, regulated)? - -## Learning from Examples - -The best way to understand workflows is to study real examples. Look at the official BMad modules: - -- **BMB (Module Builder)**: Module, Workflow and Agent creation workflows -- **BMM (Business Method Module)**: Complete software development pipeline from brainstorming through sprint planning -- **BMGD (Game Development Module)**: Game design briefs, narratives, architecture -- **CIS (Creativity, Innovation, Strategy)**: Brainstorming, design thinking, storytelling, innovation strategy - -Study the workflow.md files to understand how each workflow starts. Examine step files to see how instructions are structured. Notice the frontmatter variables, menu handling, and how steps chain together. - -Copy patterns that work. Adapt them to your domain. The structure is consistent across all workflows—the content and steps change, but the architecture stays the same. - -## When to Use Workflows - -Use workflows when: - -- **Tasks are multi-step and complex**: Break down complexity into manageable pieces -- **Quality and completeness matter**: Sequential enforcement ensures nothing gets missed -- **Repeatability is important**: Get consistent results every time -- **Tasks span multiple sessions**: Continuable workflows preserve progress -- **You need to chain processes**: Output of one workflow becomes input of another -- **Compliance or standards matter**: Enforce required steps and documentation - -Don't use workflows when: - -- **Tasks are simple and one-off**: A single prompt works fine for quick questions -- **Flexibility trumps structure**: Free-form conversation is better for exploration - -Modified BMad Workflows - -- **Tasks are truly one-step** - -If there's only one thing to do and it can be explained in under about 300 lines - don't bother with step files. Instead, you can still have -a short single file workflow.md file. - -## The Bottom Line - -Workflows transform AI from a tool that gives variable, unpredictable results into a reliable system for complex, multi-step processes. Through progressive disclosure, sequential execution, guided facilitation, and thoughtful design, workflows give you control and repeatability that ad-hoc prompting alone can't match. - -They're not just for software development. You can create workflows for any guided process - meal planning, course design, therapy intake, tax preparation, document processing, creative writing, event planning—any complex task that benefits from structure and thoroughness. - -Start simple. Study examples. Build workflows for your own domain. You'll wonder how you ever got by with just prompts. diff --git a/docs/explanation/core/index.md b/docs/explanation/core/index.md deleted file mode 100644 index 9c604a48..00000000 --- a/docs/explanation/core/index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Core Module" ---- - - -The Core Module is installed with all installations of BMad modules and provides common functionality that any module, workflow, or agent can take advantage of. - -## Core Module Components - -- **[Global Core Config](/docs/reference/configuration/global-config.md)** — Inheritable configuration that impacts all modules and custom content -- **[Core Workflows](/docs/reference/workflows/core-workflows.md)** — Domain-agnostic workflows usable by any module - - [Party Mode](/docs/explanation/features/party-mode.md) — Multi-agent conversation orchestration - - [Brainstorming](/docs/explanation/features/brainstorming-techniques.md) — Structured creative sessions with 60+ techniques - - [Advanced Elicitation](/docs/explanation/features/advanced-elicitation.md) — LLM rethinking with 50+ reasoning methods -- **[Core Tasks](/docs/reference/configuration/core-tasks.md)** — Common tasks available across modules - - [Index Docs](/docs/reference/configuration/core-tasks.md#index-docs) — Generate directory index files - - [Adversarial Review](/docs/reference/configuration/core-tasks.md#adversarial-review) — Critical content review - - [Shard Document](/docs/reference/configuration/core-tasks.md#shard-document) — Split large documents into sections diff --git a/docs/explanation/faq/getting-started-faq.md b/docs/explanation/faq/getting-started-faq.md deleted file mode 100644 index 78b7c88e..00000000 --- a/docs/explanation/faq/getting-started-faq.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "Getting Started FAQ" -description: Common questions about getting started with the BMad Method ---- - -Quick answers to common questions about getting started with the BMad Method. - -## Questions - -- [Why does BMad use so many tokens?](#why-does-bmad-use-so-many-tokens) -- [Do I always need to run workflow-init?](#do-i-always-need-to-run-workflow-init) -- [Why do I need fresh chats for each workflow?](#why-do-i-need-fresh-chats-for-each-workflow) -- [Can I skip workflow-status and just start working?](#can-i-skip-workflow-status-and-just-start-working) -- [What's the minimum I need to get started?](#whats-the-minimum-i-need-to-get-started) -- [How do I know if I'm in Phase 1, 2, 3, or 4?](#how-do-i-know-if-im-in-phase-1-2-3-or-4) - -### Why does BMad use so many tokens? - -BMad is not always the most token efficient approach, and that's by design. The checkpoints, story files, and retrospectives keep you in the loop so you can apply taste, judgment, and accumulated context that no agent has. Fully automated coding loops optimize for code velocity; BMad optimizes for decision quality. If you're building something you'll maintain for years, where user experience matters, where architectural choices compound—that tradeoff pays for itself. - -### Do I always need to run workflow-init? - -No, once you learn the flow you can go directly to workflows. However, workflow-init is helpful because it: - -- Determines your project's appropriate level automatically -- Creates the tracking status file -- Routes you to the correct starting workflow - -For experienced users: use the [Quick Start Guide](/docs/tutorials/getting-started/getting-started-bmadv6.md) to go directly to the right agent/workflow. - -### Why do I need fresh chats for each workflow? - -Context-intensive workflows (like brainstorming, PRD creation, architecture design) can cause AI hallucinations if run in sequence within the same chat. Starting fresh ensures the agent has maximum context capacity for each workflow. This is particularly important for: - -- Planning workflows (PRD, architecture) -- Analysis workflows (brainstorming, research) -- Complex story implementation - -Quick workflows like status checks can reuse chats safely. - -### Can I skip workflow-status and just start working? - -Yes, if you already know your project level and which workflow comes next. workflow-status is mainly useful for: - -- New projects (guides initial setup) -- When you're unsure what to do next -- After breaks in work (reminds you where you left off) -- Checking overall progress - -### What's the minimum I need to get started? - -For the fastest path: - -1. Install BMad Method: `npx bmad-method@alpha install` -2. For small changes: Load PM agent → run tech-spec → implement -3. For larger projects: Load PM agent → run prd → architect → implement - -### How do I know if I'm in Phase 1, 2, 3, or 4? - -Check your `bmm-workflow-status.md` file (created by workflow-init). It shows your current phase and progress. If you don't have this file, you can also tell by what you're working on: - -- **Phase 1** — Brainstorming, research, product brief (optional) -- **Phase 2** — Creating either a PRD or tech-spec (always required) -- **Phase 3** — Architecture design (Level 2-4 only) -- **Phase 4** — Actually writing code, implementing stories - -**Have a question not answered here?** Please [open an issue](https://github.com/bmad-code-org/BMAD-METHOD/issues) or ask in [Discord](https://discord.gg/gk8jAdXWmj) so we can add it! diff --git a/docs/explanation/faq/implementation-faq.md b/docs/explanation/faq/implementation-faq.md deleted file mode 100644 index fe4f64cb..00000000 --- a/docs/explanation/faq/implementation-faq.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "Implementation FAQ" -description: Common questions about implementation in the BMad Method ---- - -Quick answers to common questions about implementation in the BMad Method. - -## Questions - -- [Does create-story include implementation context?](#does-create-story-include-implementation-context) -- [How do I mark a story as done?](#how-do-i-mark-a-story-as-done) -- [Can I work on multiple stories at once?](#can-i-work-on-multiple-stories-at-once) -- [What if my story takes longer than estimated?](#what-if-my-story-takes-longer-than-estimated) -- [When should I run retrospective?](#when-should-i-run-retrospective) - -### Does create-story include implementation context? - -Yes! The create-story workflow generates story files that include implementation-specific guidance, references existing patterns from your documentation, and provides technical context. The workflow loads your architecture, PRD, and existing project documentation to create comprehensive stories. For Quick Flow projects using tech-spec, the tech-spec itself is already comprehensive, so stories can be simpler. - -### How do I mark a story as done? - -After dev-story completes and code-review passes: - -1. Open `sprint-status.yaml` (created by sprint-planning) -2. Change the story status from `review` to `done` -3. Save the file - -### Can I work on multiple stories at once? - -Yes, if you have capacity! Stories within different epics can be worked in parallel. However, stories within the same epic are usually sequential because they build on each other. - -### What if my story takes longer than estimated? - -That's normal! Stories are estimates. If implementation reveals more complexity: - -1. Continue working until DoD is met -2. Consider if story should be split -3. Document learnings in retrospective -4. Adjust future estimates based on this learning - -### When should I run retrospective? - -After completing all stories in an epic (when epic is done). Retrospectives capture: - -- What went well -- What could improve -- Technical insights -- Learnings for future epics - -Don't wait until project end — run after each epic for continuous improvement. - -**Have a question not answered here?** Please [open an issue](https://github.com/bmad-code-org/BMAD-METHOD/issues) or ask in [Discord](https://discord.gg/gk8jAdXWmj) so we can add it! diff --git a/docs/explanation/faq/index.md b/docs/explanation/faq/index.md deleted file mode 100644 index 2ccd7d3a..00000000 --- a/docs/explanation/faq/index.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: "Frequently Asked Questions" -description: Frequently asked questions about the BMad Method ---- - -Quick answers to common questions about the BMad Method, organized by topic. - -## Topics - -- [Getting Started](/docs/explanation/faq/getting-started-faq.md) - Questions about starting with BMad -- [Levels & Tracks](/docs/explanation/faq/levels-and-tracks-faq.md) - Choosing the right level -- [Workflows](/docs/explanation/faq/workflows-faq.md) - Workflow and phase questions -- [Planning](/docs/explanation/faq/planning-faq.md) - Planning document questions -- [Implementation](/docs/explanation/faq/implementation-faq.md) - Implementation questions -- [Brownfield](/docs/explanation/faq/brownfield-faq.md) - Existing codebase questions -- [Tools & Advanced](/docs/explanation/faq/tools-faq.md) - Tools, IDEs, and advanced topics diff --git a/docs/explanation/faq/levels-and-tracks-faq.md b/docs/explanation/faq/levels-and-tracks-faq.md deleted file mode 100644 index acce6ae1..00000000 --- a/docs/explanation/faq/levels-and-tracks-faq.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "Levels and Tracks FAQ" -description: Common questions about choosing the right level for your project ---- - -Quick answers to common questions about choosing the right level for your BMad Method project. - -## Questions - -- [How do I know which level my project is?](#how-do-i-know-which-level-my-project-is) -- [Can I change levels mid-project?](#can-i-change-levels-mid-project) -- [What if workflow-init suggests the wrong level?](#what-if-workflow-init-suggests-the-wrong-level) -- [Do I always need architecture for Level 2?](#do-i-always-need-architecture-for-level-2) -- [What's the difference between Level 1 and Level 2?](#whats-the-difference-between-level-1-and-level-2) - -### How do I know which level my project is? - -Use workflow-init for automatic detection, or self-assess using these keywords: - -- **Level 0** — "fix", "bug", "typo", "small change", "patch" → 1 story -- **Level 1** — "simple", "basic", "small feature", "add" → 1-10 stories -- **Level 2** — "dashboard", "several features", "admin panel" → 5-15 stories -- **Level 3** — "platform", "integration", "complex", "system" → 12-40 stories -- **Level 4** — "enterprise", "multi-tenant", "multiple products" → 40+ stories - -When in doubt, start smaller. You can always run create-prd later if needed. - -### Can I change levels mid-project? - -Yes! If you started at Level 1 but realize it's Level 2, you can run create-prd to add proper planning docs. The system is flexible — your initial level choice isn't permanent. - -### What if workflow-init suggests the wrong level? - -You can override it! workflow-init suggests a level but always asks for confirmation. If you disagree, just say so and choose the level you think is appropriate. Trust your judgment. - -### Do I always need architecture for Level 2? - -No, architecture is **optional** for Level 2. Only create architecture if you need system-level design. Many Level 2 projects work fine with just PRD created during planning. - -### What's the difference between Level 1 and Level 2? - -- **Level 1** — 1-10 stories, uses tech-spec (simpler, faster), no architecture -- **Level 2** — 5-15 stories, uses PRD (product-focused), optional architecture - -The overlap (5-10 stories) is intentional. Choose based on: - -- Need product-level planning? → Level 2 -- Just need technical plan? → Level 1 -- Multiple epics? → Level 2 -- Single epic? → Level 1 - -**Have a question not answered here?** Please [open an issue](https://github.com/bmad-code-org/BMAD-METHOD/issues) or ask in [Discord](https://discord.gg/gk8jAdXWmj) so we can add it! diff --git a/docs/explanation/faq/planning-faq.md b/docs/explanation/faq/planning-faq.md deleted file mode 100644 index c6ab49fe..00000000 --- a/docs/explanation/faq/planning-faq.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: "Planning Documents FAQ" -description: Common questions about planning documents in the BMad Method ---- - -Quick answers to common questions about planning documents in the BMad Method. - -## Questions - -- [Why no tech-spec at Level 2+?](#why-no-tech-spec-at-level-2) -- [Do I need a PRD for a bug fix?](#do-i-need-a-prd-for-a-bug-fix) -- [Can I skip the product brief?](#can-i-skip-the-product-brief) - -### Why no tech-spec at Level 2+? - -Level 2+ projects need product-level planning (PRD) and system-level design (Architecture), which tech-spec doesn't provide. Tech-spec is too narrow for coordinating multiple features. Instead, Level 2-4 uses: - -- PRD (product vision, functional requirements, non-functional requirements) -- Architecture (system design) -- Epics+Stories (created AFTER architecture is complete) - -### Do I need a PRD for a bug fix? - -No! Bug fixes are typically Level 0 (single atomic change). Use Quick Spec Flow: - -- Load PM agent -- Run tech-spec workflow -- Implement immediately - -PRDs are for Level 2-4 projects with multiple features requiring product-level coordination. - -### Can I skip the product brief? - -Yes, product brief is always optional. It's most valuable for: - -- Level 3-4 projects needing strategic direction -- Projects with stakeholders requiring alignment -- Novel products needing market research -- When you want to explore solution space before committing - -**Have a question not answered here?** Please [open an issue](https://github.com/bmad-code-org/BMAD-METHOD/issues) or ask in [Discord](https://discord.gg/gk8jAdXWmj) so we can add it! diff --git a/docs/explanation/faq/tools-faq.md b/docs/explanation/faq/tools-faq.md deleted file mode 100644 index 061f43e9..00000000 --- a/docs/explanation/faq/tools-faq.md +++ /dev/null @@ -1,277 +0,0 @@ ---- -title: "Tools and Advanced FAQ" -description: Common questions about tools, IDEs, and advanced topics in the BMad Method ---- - -Quick answers to common questions about tools, IDEs, and advanced topics in the BMad Method. - -## Questions - -**Tools and Technical** - -- [Questions](#questions) -- [Tools and Technical](#tools-and-technical) - - [Why are my Mermaid diagrams not rendering?](#why-are-my-mermaid-diagrams-not-rendering) - - [Can I use BMM with GitHub Copilot / Cursor / other AI tools?](#can-i-use-bmm-with-github-copilot--cursor--other-ai-tools) - - [What IDEs/tools support BMM?](#what-idestools-support-bmm) - - [Can I customize agents?](#can-i-customize-agents) - - [What happens to my planning docs after implementation?](#what-happens-to-my-planning-docs-after-implementation) - - [Can I use BMM for non-software projects?](#can-i-use-bmm-for-non-software-projects) -- [Advanced](#advanced) - - [What if my project grows from Level 1 to Level 3?](#what-if-my-project-grows-from-level-1-to-level-3) - - [Can I mix greenfield and brownfield approaches?](#can-i-mix-greenfield-and-brownfield-approaches) - - [How do I handle urgent hotfixes during a sprint?](#how-do-i-handle-urgent-hotfixes-during-a-sprint) - - [What if I disagree with the workflow's recommendations?](#what-if-i-disagree-with-the-workflows-recommendations) - - [Can multiple developers work on the same BMM project?](#can-multiple-developers-work-on-the-same-bmm-project) - - [What is party mode and when should I use it?](#what-is-party-mode-and-when-should-i-use-it) -- [Getting Help](#getting-help) - - [Where do I get help if my question isn't answered here?](#where-do-i-get-help-if-my-question-isnt-answered-here) - - [How do I report a bug or request a feature?](#how-do-i-report-a-bug-or-request-a-feature) - -**Advanced** - -- [Questions](#questions) -- [Tools and Technical](#tools-and-technical) - - [Why are my Mermaid diagrams not rendering?](#why-are-my-mermaid-diagrams-not-rendering) - - [Can I use BMM with GitHub Copilot / Cursor / other AI tools?](#can-i-use-bmm-with-github-copilot--cursor--other-ai-tools) - - [What IDEs/tools support BMM?](#what-idestools-support-bmm) - - [Can I customize agents?](#can-i-customize-agents) - - [What happens to my planning docs after implementation?](#what-happens-to-my-planning-docs-after-implementation) - - [Can I use BMM for non-software projects?](#can-i-use-bmm-for-non-software-projects) -- [Advanced](#advanced) - - [What if my project grows from Level 1 to Level 3?](#what-if-my-project-grows-from-level-1-to-level-3) - - [Can I mix greenfield and brownfield approaches?](#can-i-mix-greenfield-and-brownfield-approaches) - - [How do I handle urgent hotfixes during a sprint?](#how-do-i-handle-urgent-hotfixes-during-a-sprint) - - [What if I disagree with the workflow's recommendations?](#what-if-i-disagree-with-the-workflows-recommendations) - - [Can multiple developers work on the same BMM project?](#can-multiple-developers-work-on-the-same-bmm-project) - - [What is party mode and when should I use it?](#what-is-party-mode-and-when-should-i-use-it) -- [Getting Help](#getting-help) - - [Where do I get help if my question isn't answered here?](#where-do-i-get-help-if-my-question-isnt-answered-here) - - [How do I report a bug or request a feature?](#how-do-i-report-a-bug-or-request-a-feature) - -**Getting Help** - -- [Where do I get help if my question isn't answered here?](#where-do-i-get-help-if-my-question-isnt-answered-here) -- [How do I report a bug or request a feature?](#how-do-i-report-a-bug-or-request-a-feature) - -## Tools and Technical - -### Why are my Mermaid diagrams not rendering? - -Common issues: - -1. Missing language tag: Use ` ```mermaid` not just ` ``` ` -2. Syntax errors in diagram (validate at mermaid.live) -3. Tool doesn't support Mermaid (check your Markdown renderer) - -All BMM docs use valid Mermaid syntax that should render in GitHub, VS Code, and most IDEs. - -### Can I use BMM with GitHub Copilot / Cursor / other AI tools? - -Yes! BMM is complementary. BMM handles: - -- Project planning and structure -- Workflow orchestration -- Agent Personas and expertise -- Documentation generation -- Quality gates - -Your AI coding assistant handles: - -- Line-by-line code completion -- Quick refactoring -- Test generation - -Use them together for best results. - -### What IDEs/tools support BMM? - -BMM requires tools with **agent mode** and access to **high-quality LLM models** that can load and follow complex workflows, then properly implement code changes. - -**Recommended Tools:** - -- **Claude Code** — Best choice - - Sonnet 4.5 (excellent workflow following, coding, reasoning) - - Opus (maximum context, complex planning) - - Native agent mode designed for BMM workflows - -- **Cursor** - - Supports Anthropic (Claude) and OpenAI models - - Agent mode with composer - - Good for developers who prefer Cursor's UX - -- **Windsurf** - - Multi-model support - - Agent capabilities - - Suitable for BMM workflows - -**What Matters:** - -1. **Agent mode** — Can load long workflow instructions and maintain context -2. **High-quality LLM** — Models ranked high on SWE-bench (coding benchmarks) -3. **Model selection** — Access to Claude Sonnet 4.5, Opus, or GPT-4o class models -4. **Context capacity** — Can handle large planning documents and codebases - -**Why model quality matters:** BMM workflows require LLMs that can follow multi-step processes, maintain context across phases, and implement code that adheres to specifications. Tools with weaker models will struggle with workflow adherence and code quality. - -### Can I customize agents? - -Yes! Agents are installed as markdown files with XML-style content (optimized for LLMs, readable by any model). Create customization files in `_bmad/_config/agents/[agent-name].customize.yaml` to override default behaviors while keeping core functionality intact. See agent documentation for customization options. - -**Note:** While source agents in this repo are YAML, they install as `.md` files with XML-style tags — a format any LLM can read and follow. - -### What happens to my planning docs after implementation? - -Keep them! They serve as: - -- Historical record of decisions -- Onboarding material for new team members -- Reference for future enhancements -- Audit trail for compliance - -For enterprise projects (Level 4), consider archiving completed planning artifacts to keep workspace clean. - -### Can I use BMM for non-software projects? - -BMM is optimized for software development, but the methodology principles (scale-adaptive planning, just-in-time design, context injection) can apply to other complex project types. You'd need to adapt workflows and agents for your domain. - -## Advanced - -### What if my project grows from Level 1 to Level 3? - -Totally fine! When you realize scope has grown: - -1. Run create-prd to add product-level planning -2. Run create-architecture for system design -3. Use existing tech-spec as input for PRD -4. Continue with updated level - -The system is flexible — growth is expected. - -### Can I mix greenfield and brownfield approaches? - -Yes! Common scenario: adding new greenfield feature to brownfield codebase. Approach: - -1. Run document-project for brownfield context -2. Use greenfield workflows for new feature planning -3. Explicitly document integration points between new and existing -4. Test integration thoroughly - -### How do I handle urgent hotfixes during a sprint? - -Use correct-course workflow or just: - -1. Save your current work state -2. Load PM agent → quick tech-spec for hotfix -3. Implement hotfix (Level 0 flow) -4. Deploy hotfix -5. Return to original sprint work - -Level 0 Quick Spec Flow is perfect for urgent fixes. - -### What if I disagree with the workflow's recommendations? - -Workflows are guidance, not enforcement. If a workflow recommends something that doesn't make sense for your context: - -- Explain your reasoning to the agent -- Ask for alternative approaches -- Skip the recommendation if you're confident -- Document why you deviated (for future reference) - -Trust your expertise — BMM supports your decisions. - -### Can multiple developers work on the same BMM project? - -Yes! But the paradigm is fundamentally different from traditional agile teams. - -**Key Difference:** - -- **Traditional** — Multiple devs work on stories within one epic (months) -- **Agentic** — Each dev owns complete epics (days) - -**In traditional agile:** A team of 5 devs might spend 2-3 months on a single epic, with each dev owning different stories. - -**With BMM + AI agents:** A single dev can complete an entire epic in 1-3 days. What used to take months now takes days. - -**Team Work Distribution:** - -- **Recommended:** Split work by **epic** (not story) -- Each developer owns complete epics end-to-end -- Parallel work happens at epic level -- Minimal coordination needed - -**For full-stack apps:** - -- Frontend and backend can be separate epics (unusual in traditional agile) -- Frontend dev owns all frontend epics -- Backend dev owns all backend epics -- Works because delivery is so fast - -**Enterprise Considerations:** - -- Use **git submodules** for BMM installation (not .gitignore) -- Allows personal configurations without polluting main repo -- Teams may use different AI tools (Claude Code, Cursor, etc.) -- Developers may follow different methods or create custom agents/workflows - -**Quick Tips:** - -- Share `sprint-status.yaml` (single source of truth) -- Assign entire epics to developers (not individual stories) -- Coordinate at epic boundaries, not story level -- Use git submodules for BMM in enterprise settings - -### What is party mode and when should I use it? - -Party mode is a unique multi-agent collaboration feature where ALL your installed modules agents discuss your challenges together in real-time or have some fun with any topic you have in mind. - -**How it works:** - -1. Run `/bmad:core:workflows:party-mode` (or `PM or fuzzy match on party-mode` from any agent) -2. Introduce your topic -3. BMad Master selects 2-3 most relevant agents per message -4. Agents cross-talk, debate, and build on each other's ideas - -**Best for:** - -- Strategic decisions with trade-offs (architecture choices, tech stack, scope) -- Creative brainstorming (game design, product innovation, UX ideation) -- Cross-functional alignment (epic kickoffs, retrospectives, phase transitions) -- Complex problem-solving (multi-faceted challenges, risk assessment) - -**Example parties:** - -- **Product Strategy** — PM + Innovation Strategist (CIS) + Analyst -- **Technical Design** — Architect + Creative Problem Solver (CIS) + Game Architect -- **User Experience** — UX Designer + Design Thinking Coach (CIS) + Storyteller (CIS) - -**Why it's powerful:** - -- Diverse perspectives (technical, creative, strategic) -- Healthy debate reveals blind spots -- Emergent insights from agent interaction -- Natural collaboration across modules - -**For complete documentation:** See the [Party Mode Guide](/docs/explanation/features/party-mode.md) - -## Getting Help - -### Where do I get help if my question isn't answered here? - -1. Search [Complete Documentation](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/README.md) for related topics -2. Ask in [Discord Community](https://discord.gg/gk8jAdXWmj) (#bmad-method-help) -3. Open a [GitHub Issue](https://github.com/bmad-code-org/BMAD-METHOD/issues) -4. Watch [YouTube Tutorials](https://www.youtube.com/@BMadCode) - -### How do I report a bug or request a feature? - -Open a GitHub issue at: - -Please include: - -- BMM version (check your installed version) -- Steps to reproduce (for bugs) -- Expected vs actual behavior -- Relevant workflow or agent involved - -**Have a question not answered here?** Please [open an issue](https://github.com/bmad-code-org/BMAD-METHOD/issues) or ask in [Discord](https://discord.gg/gk8jAdXWmj) so we can add it! diff --git a/docs/explanation/faq/workflows-faq.md b/docs/explanation/faq/workflows-faq.md deleted file mode 100644 index 9e92121f..00000000 --- a/docs/explanation/faq/workflows-faq.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "Workflows FAQ" -description: Common questions about BMad Method workflows and phases ---- - -Quick answers to common questions about BMad Method workflows and phases. - -## Questions - -- [What's the difference between workflow-status and workflow-init?](#whats-the-difference-between-workflow-status-and-workflow-init) -- [Can I skip Phase 1 (Analysis)?](#can-i-skip-phase-1-analysis) -- [When is Phase 3 (Architecture) required?](#when-is-phase-3-architecture-required) -- [What happens if I skip a recommended workflow?](#what-happens-if-i-skip-a-recommended-workflow) -- [How do I know when Phase 3 is complete?](#how-do-i-know-when-phase-3-is-complete) -- [Can I run workflows in parallel?](#can-i-run-workflows-in-parallel) - -### What's the difference between workflow-status and workflow-init? - -- **workflow-status** — Checks existing status and tells you what's next (use when continuing work) -- **workflow-init** — Creates new status file and sets up project (use when starting new project) - -If status file exists, use workflow-status. If not, use workflow-init. - -### Can I skip Phase 1 (Analysis)? - -Yes! Phase 1 is optional for all levels, though recommended for complex projects. Skip if: - -- Requirements are clear -- No research needed -- Time-sensitive work -- Small changes (Level 0-1) - -### When is Phase 3 (Architecture) required? - -- **Level 0-1** — Never (skip entirely) -- **Level 2** — Optional (only if system design needed) -- **Level 3-4** — Required (comprehensive architecture mandatory) - -### What happens if I skip a recommended workflow? - -Nothing breaks! Workflows are guidance, not enforcement. However, skipping recommended workflows (like architecture for Level 3) may cause: - -- Integration issues during implementation -- Rework due to poor planning -- Conflicting design decisions -- Longer development time overall - -### How do I know when Phase 3 is complete? - -For Level 3-4, run the implementation-readiness workflow. It validates PRD + Architecture + Epics + UX (optional) are aligned before implementation. Pass the gate check = ready for Phase 4. - -### Can I run workflows in parallel? - -Most workflows must be sequential within a phase: - -- **Phase 1** — brainstorm → research → product-brief (optional order) -- **Phase 2** — PRD must complete before moving forward -- **Phase 3** — architecture → epics+stories → implementation-readiness (sequential) -- **Phase 4** — Stories within an epic should generally be sequential, but stories in different epics can be parallel if you have capacity - -**Have a question not answered here?** Please [open an issue](https://github.com/bmad-code-org/BMAD-METHOD/issues) or ask in [Discord](https://discord.gg/gk8jAdXWmj) so we can add it! diff --git a/docs/explanation/features/advanced-elicitation.md b/docs/explanation/features/advanced-elicitation.md deleted file mode 100644 index 0185977f..00000000 --- a/docs/explanation/features/advanced-elicitation.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: "Advanced Elicitation" ---- - -Push the LLM to rethink its work through 50+ reasoning methods — essentially, LLM brainstorming. - -Advanced Elicitation is the inverse of Brainstorming. Instead of pulling ideas out of you, the LLM applies sophisticated reasoning techniques to re-examine and enhance content it has just generated. It's the LLM brainstorming with itself to find better approaches, uncover hidden issues, and discover improvements it missed on the first pass. - -## When to Use It - -- After a workflow generates a section of content and you want to explore alternatives -- When the LLM's initial output seems adequate but you suspect there's more depth available -- For high-stakes content where multiple perspectives would strengthen the result -- To stress-test assumptions, explore edge cases, or find weaknesses in generated plans -- When you want the LLM to "think again" but with structured reasoning methods - -## How It Works - -### 1. Context Analysis -The LLM analyzes the current content, understanding its type, complexity, stakeholder needs, risk level, and creative potential. - -### 2. Smart Method Selection -Based on context, 5 methods are intelligently selected from a library of 50+ techniques and presented to you: - -| Option | Description | -| ----------------- | ---------------------------------------- | -| **1-5** | Apply the selected method to the content | -| **[r] Reshuffle** | Get 5 new methods selected randomly | -| **[a] List All** | Browse the complete method library | -| **[x] Proceed** | Continue with enhanced content | - -### 3. Method Execution & Iteration -- The selected method is applied to the current content -- Improvements are shown for your review -- You choose whether to apply changes or discard them -- The menu re-appears for additional elicitations -- Each method builds on previous enhancements - -### 4. Party Mode Integration (Optional) -If Party Mode is active, BMad agents participate randomly in the elicitation process, adding their unique perspectives to the methods. - -## Method Categories - -| Category | Focus | Example Methods | -| ----------------- | ----------------------------------- | -------------------------------------------------------------- | -| **Core** | Foundational reasoning techniques | First Principles Analysis, 5 Whys, Socratic Questioning | -| **Collaboration** | Multiple perspectives and synthesis | Stakeholder Round Table, Expert Panel Review, Debate Club | -| **Advanced** | Complex reasoning frameworks | Tree of Thoughts, Graph of Thoughts, Self-Consistency | -| **Competitive** | Adversarial stress-testing | Red Team vs Blue Team, Shark Tank Pitch, Code Review Gauntlet | -| **Technical** | Architecture and code quality | Decision Records, Rubber Duck Debugging, Algorithm Olympics | -| **Creative** | Innovation and lateral thinking | SCAMPER, Reverse Engineering, Random Input Stimulus | -| **Research** | Evidence-based analysis | Literature Review Personas, Thesis Defense, Comparative Matrix | -| **Risk** | Risk identification and mitigation | Pre-mortem Analysis, Failure Mode Analysis, Chaos Monkey | -| **Learning** | Understanding verification | Feynman Technique, Active Recall Testing | -| **Philosophical** | Conceptual clarity | Occam's Razor, Ethical Dilemmas | -| **Retrospective** | Reflection and lessons | Hindsight Reflection, Lessons Learned Extraction | - -## Key Features - -- **50+ reasoning methods** — Spanning core logic to advanced multi-step reasoning frameworks -- **Smart context selection** — Methods chosen based on content type, complexity, and stakeholder needs -- **Iterative enhancement** — Each method builds on previous improvements -- **User control** — Accept or discard each enhancement before proceeding -- **Party Mode integration** — Agents can participate when Party Mode is active - -## Workflow Integration - -Advanced Elicitation is a core workflow designed to be invoked by other workflows during content generation: - -| Parameter | Description | -| ---------------------- | --------------------------------------------------------- | -| **Content to enhance** | The current section content that was just generated | -| **Context type** | The kind of content being created (spec, code, doc, etc.) | -| **Enhancement goals** | What the calling workflow wants to improve | - -### Integration Flow - -When called from a workflow: -1. Receives the current section content that was just generated -2. Applies elicitation methods iteratively to enhance that content -3. Returns the enhanced version when user selects 'x' to proceed -4. The enhanced content replaces the original section in the output document - -### Example - -A specification generation workflow could invoke Advanced Elicitation after producing each major section (requirements, architecture, implementation plan). The workflow would pass the generated section, and Advanced Elicitation would offer methods like "Stakeholder Round Table" to gather diverse perspectives on requirements, or "Red Team vs Blue Team" to stress-test the architecture for vulnerabilities. - -## Advanced Elicitation vs. Brainstorming - -| | **Advanced Elicitation** | **Brainstorming** | -| ------------ | ------------------------------------------------- | --------------------------------------------- | -| **Source** | LLM generates ideas through structured reasoning | User provides ideas, AI coaches them out | -| **Purpose** | Rethink and improve LLM's own output | Unlock user's creativity | -| **Methods** | 50+ reasoning and analysis techniques | 60+ ideation and creativity techniques | -| **Best for** | Enhancing generated content, finding alternatives | Breaking through blocks, generating new ideas | diff --git a/docs/explanation/features/brainstorming-techniques.md b/docs/explanation/features/brainstorming-techniques.md deleted file mode 100644 index 704ddb3a..00000000 --- a/docs/explanation/features/brainstorming-techniques.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: "Brainstorming" ---- - -Facilitate structured creative sessions using 60+ proven ideation techniques. - -The Brainstorming workflow is an interactive facilitation system that helps you unlock your own creativity. The AI acts as coach, guide, and creative partner — using proven techniques to draw out ideas and insights that are already within you. - -:::note[Important] -Every idea comes from you. The workflow creates the conditions for your best thinking to emerge through guided exploration, but you are the source. -::: - -## When to Use It - -- Breaking through creative blocks on a specific challenge -- Generating innovative ideas for products, features, or solutions -- Exploring a problem from completely new angles -- Systematically developing ideas from raw concepts to actionable plans -- Team ideation (with collaborative techniques) or personal creative exploration - -## How It Works - -### 1. Session Setup -Define your topic, goals, and any constraints. - -### 2. Choose Your Approach - -| Approach | Description | -|----------|-------------| -| **User-Selected** | Browse the full technique library and pick what appeals to you | -| **AI-Recommended** | Get customized technique suggestions based on your goals | -| **Random Selection** | Discover unexpected methods through serendipitous technique combinations | -| **Progressive Flow** | Journey systematically from expansive exploration to focused action planning | - -### 3. Interactive Facilitation -Work through techniques with true collaborative coaching. The AI asks probing questions, builds on your ideas, and helps you think deeper—but your ideas are the source. - -### 4. Idea Organization -All your generated ideas are organized into themes and prioritized. - -### 5. Action Planning -Top ideas get concrete next steps, resource requirements, and success metrics. - -## What You Get - -A comprehensive session document that captures the entire journey: - -- Topic, goals, and session parameters -- Each technique used and how it was applied -- Your contributions and the ideas you generated -- Thematic organization connecting related insights -- Prioritized ideas with action plans -- Session highlights and key breakthroughs - -This document becomes a permanent record of your creative process — valuable for future reference, sharing with stakeholders, or continuing the session later. - -## Technique Categories - -| Category | Focus | -|----------|-------| -| **Collaborative** | Team dynamics and inclusive participation | -| **Creative** | Breakthrough thinking and paradigm shifts | -| **Deep** | Root cause analysis and strategic insight | -| **Structured** | Organized frameworks and systematic exploration | -| **Theatrical** | Playful, radical perspectives | -| **Wild** | Boundary-pushing, extreme thinking | -| **Biomimetic** | Nature-inspired solutions | -| **Quantum** | Quantum principles for innovation | -| **Cultural** | Traditional knowledge and cross-cultural approaches | -| **Introspective Delight** | Inner wisdom and authentic exploration | - -## Key Features - -- **Interactive coaching** — Pulls ideas *out* of you, doesn't generate them for you -- **On-demand loading** — Techniques loaded from a comprehensive library as needed -- **Session preservation** — Every step, insight, and action plan is documented -- **Continuation support** — Pause sessions and return later, or extend with additional techniques - -## Workflow Integration - -Brainstorming is a core workflow designed to be invoked and configured by other modules. When called from another workflow, it accepts contextual parameters: - -| Parameter | Description | -|-----------|-------------| -| **Topic focus** | What the brainstorming should help discover or solve | -| **Guardrails** | Constraints, boundaries, or must-avoid areas | -| **Output goals** | What the final output needs to accomplish for the calling workflow | -| **Context files** | Project-specific guidance to inform technique selection | - -### Example - -When creating a new module in the BMad Builder workflow, Brainstorming can be invoked with guardrails around the module's purpose and a goal to discover key features, user needs, or architectural considerations. The session becomes focused on producing exactly what the module creation workflow needs. diff --git a/docs/explanation/features/party-mode.md b/docs/explanation/features/party-mode.md deleted file mode 100644 index 1ff6d5cf..00000000 --- a/docs/explanation/features/party-mode.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: "Party Mode: Multi-Agent Collaboration" ---- - -Get all your AI agents in one conversation. - -## What is Party Mode? - -Ever wanted to gather your entire AI team in one room and see what happens? That's party mode. - -Type `/bmad:core:workflows:party-mode` (or `*party-mode` from any agent or at key workflow junctions when asked), and suddenly you've got **all your AI agents** in one conversation. PM, Architect, DEV, UX Designer and more that you can choose from. - -**Why it's useful:** - -- **After complex workflows** - Debrief with the whole team about what worked, what didn't -- **Big decisions with tradeoffs** - Get technical, creative, and strategic perspectives simultaneously -- **Brainstorming sessions** - Watch ideas evolve through cross-pollination -- **When things go wrong** - Call out failures, watch agents defend their decisions, let them debate whose fault it was (oddly therapeutic) -- **Sprint retrospectives** - Party mode powers the retrospective workflow -- **Sprint planning** - Multi-agent collaboration for planning sessions - -## How It Works - -**The basics:** - -1. Party mode reads `_bmad/_config/agent-manifest.csv` -2. Loads ALL installed agents (already includes your customizations from install) -3. BMad Master orchestrates - picks 2-3 relevant agents per message based on topic -4. Agents respond in character, can agree/disagree/build on each other's ideas -5. Discussion continues until you type "exit" or reach natural conclusion - -**That's it.** No complex merging, no runtime magic. Just agents talking. - -## Quick Start - -```bash -/bmad:core:workflows:party-mode - -*party-mode - - -/bmad:core:workflows:party-mode and include also in the party Santa Clause and Einstein - -Ask questions, respond to agents, direct the conversation - -Type: exit -``` - -## Fun Examples - -### Example 1: Calling Out Bad Architecture - -**You:** "Okay team, our last sprint was a disaster. The authentication service went down three times. Who screwed this up?" - -**Architect (Winston):** "The design was sound - distributed authentication with proper fallbacks. If implementation deviated from the spec..." - -**DEV (Amelia):** "I followed the architecture doc exactly. The spec didn't account for concurrent session invalidation race conditions." - -**PM (John):** "Both of you missed the bigger issue - we didn't validate session management requirements in the PRD. This is on me for not catching it." - -**TEA (Murat):** "And I should've caught this in integration tests. The test scenarios didn't cover concurrent invalidation." - -_(Watch them debate whose fault it really was - it's therapeutic)_ - -### Example 2: Creative Brainstorming - -**You:** "How do we make onboarding feel magical instead of boring?" - -**UX Designer (Sally):** "Start with progressive disclosure - reveal features as users need them, not all at once in a tutorial." - -**Storyteller (CIS):** "What if onboarding was a story? Each step reveals a character's journey - the user IS the hero." - -**Innovation Strategist (CIS):** "Take it further - gamify with unlockable achievements. But make them meaningful, not arbitrary badges." - -**Game Designer:** "Building on that - what if the first 'quest' is actually solving a real user problem? They learn by doing something valuable." - -_(Ideas cross-pollinate and evolve)_ - -### Example 3: Technical Decision - -**You:** "Monolith or microservices for MVP?" - -**Architect:** "Start monolith. Microservices add complexity you don't need at 1000 users." - -**PM:** "Agree. Time to market matters more than theoretical scalability." - -**DEV:** "Monolith with clear module boundaries. We can extract services later if needed." - -**Innovation Strategist:** "Contrarian take - if your differentiator IS scalability, build for it now. Otherwise Architect's right." - -_(Multiple perspectives reveal the right answer)_ - -:::tip[Better Decisions] -Better decisions through diverse perspectives. Welcome to party mode. -::: diff --git a/docs/explanation/features/quick-flow.md b/docs/explanation/features/quick-flow.md deleted file mode 100644 index 29857ef2..00000000 --- a/docs/explanation/features/quick-flow.md +++ /dev/null @@ -1,149 +0,0 @@ ---- -title: "Quick Spec Flow" -description: Understanding Quick Spec Flow for rapid development in BMad Method ---- - -Quick Spec Flow is a streamlined alternative to the full BMad Method for Quick Flow track projects. Instead of going through Product Brief → PRD → Architecture, you go straight to a context-aware technical specification and start coding. - -- **Perfect for:** Bug fixes, small features, rapid prototyping, and quick enhancements -- **Time to implementation:** Minutes, not hours - -## When to Use Quick Flow - -### Use Quick Flow when: - -- Single bug fix or small enhancement -- Small feature with clear scope (typically 1-15 stories) -- Rapid prototyping or experimentation -- Adding to existing brownfield codebase -- You know exactly what you want to build - -### Use BMad Method or Enterprise when: - -- Building new products or major features -- Need stakeholder alignment -- Complex multi-team coordination -- Requires extensive planning and architecture - -:::tip[Not Sure?] -Run `workflow-init` to get a recommendation based on your project's needs. -::: - -## Quick Flow Overview - -```mermaid -flowchart TD - START[Step 1: Run Tech-Spec Workflow] - DETECT[Detects project stack] - ANALYZE[Analyzes brownfield codebase] - TEST[Detects test frameworks] - CONFIRM[Confirms conventions] - GENERATE[Generates context-rich tech-spec] - STORIES[Creates ready-to-implement stories] - IMPL[Step 2: Implement with DEV Agent] - DONE[DONE!] - - START --> DETECT - DETECT --> ANALYZE - ANALYZE --> TEST - TEST --> CONFIRM - CONFIRM --> GENERATE - GENERATE --> STORIES - STORIES --> IMPL - IMPL --> DONE - - style START fill:#bfb,stroke:#333,stroke-width:2px - style IMPL fill:#bbf,stroke:#333,stroke-width:2px - style DONE fill:#f9f,stroke:#333,stroke-width:3px -``` - -## What Makes It Quick - -- No Product Brief needed -- No PRD needed -- No Architecture doc needed -- Auto-detects your stack -- Auto-analyzes brownfield code -- Auto-validates quality -- Story context optional (tech-spec is comprehensive) - -## Smart Context Discovery - -Quick Spec Flow automatically discovers and uses: - -### Existing Documentation -- Product briefs (if they exist) -- Research documents -- `document-project` output (brownfield codebase map) - -### Project Stack -- **Node.js:** package.json → frameworks, dependencies, scripts -- **Python:** requirements.txt, pyproject.toml → packages, tools -- **Ruby:** Gemfile → gems and versions -- **Java:** pom.xml, build.gradle → Maven/Gradle dependencies -- **Go:** go.mod → modules -- **Rust:** Cargo.toml → crates - -### Brownfield Code Patterns -- Directory structure and organization -- Existing code patterns (class-based, functional, MVC) -- Naming conventions -- Test frameworks and patterns -- Code style configurations - -### Convention Confirmation - -Quick Spec Flow detects your conventions and **asks for confirmation**: - -``` -I've detected these conventions in your codebase: - -Code Style: -- ESLint with Airbnb config -- Prettier with single quotes - -Test Patterns: -- Jest test framework -- .test.js file naming - -Should I follow these existing conventions? (yes/no) -``` - -**You decide:** Conform to existing patterns or establish new standards! - -## Auto-Validation - -Quick Spec Flow **automatically validates** everything: - -- Context gathering completeness -- Definitiveness (no "use X or Y" statements) -- Brownfield integration quality -- Stack alignment -- Implementation readiness - -## Comparison: Quick Flow vs Full BMM - -| Aspect | Quick Flow Track | BMad Method/Enterprise Tracks | -| --------------------- | ---------------------------- | ---------------------------------- | -| **Setup** | None (standalone) | workflow-init recommended | -| **Planning Docs** | tech-spec.md only | Product Brief → PRD → Architecture | -| **Time to Code** | Minutes | Hours to days | -| **Best For** | Bug fixes, small features | New products, major features | -| **Context Discovery** | Automatic | Manual + guided | -| **Validation** | Auto-validates everything | Manual validation steps | -| **Brownfield** | Auto-analyzes and conforms | Manual documentation required | - -## When to Graduate to BMad Method - -Start with Quick Flow, but switch to BMad Method when: - -- Project grows beyond initial scope -- Multiple teams need coordination -- Stakeholders need formal documentation -- Product vision is unclear -- Architectural decisions need deep analysis -- Compliance/regulatory requirements exist - -:::tip[Transition Tip] -You can always run `workflow-init` later to transition from Quick Flow to BMad Method. -::: diff --git a/docs/explanation/features/web-bundles.md b/docs/explanation/features/web-bundles.md deleted file mode 100644 index a3b1b522..00000000 --- a/docs/explanation/features/web-bundles.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "Web Bundles" ---- - -Use BMad agents in Gemini Gems and Custom GPTs. - -:::caution[Status] -The Web Bundling Feature is being rebuilt from the ground up. Current v6 bundles may be incomplete or missing functionality. -::: - -## What Are Web Bundles? - -Web bundles package BMad agents as self-contained files that work in Gemini Gems and Custom GPTs. Everything the agent needs - instructions, workflows, dependencies - is bundled into a single file for easy upload. - -### What's Included - -- Complete agent persona and instructions -- All workflows and dependencies -- Interactive menu system -- Party mode for multi-agent collaboration -- No external files required - -### Use Cases - -**Perfect for:** -- Uploading a single file to a Gemini GEM or Custom GPT -- Using BMad Method from the Web -- Cost savings (generally lower cost than local usage) -- Quick sharing of agent configurations - -**Trade-offs:** -- Some quality reduction vs local usage -- Less convenient than full local installation -- Limited to agent capabilities (no workflow file access) diff --git a/docs/explanation/party-mode.md b/docs/explanation/party-mode.md new file mode 100644 index 00000000..5e9dbaa9 --- /dev/null +++ b/docs/explanation/party-mode.md @@ -0,0 +1,57 @@ +--- +title: "Party Mode" +description: Multi-agent collaboration - get all your AI agents in one conversation +--- + +Get all your AI agents in one conversation. + +## What is Party Mode? + +Run `party-mode` and you've got your whole AI team in one room - PM, Architect, Dev, UX Designer, whoever you need. BMad Master orchestrates, picking relevant agents per message. Agents respond in character, agree, disagree, and build on each other's ideas. + +The conversation continues as long as you want. Ask follow-ups, push back on answers, redirect the discussion - it's a real back-and-forth with your agents until you're done. + +**Good for:** + +- Big decisions with tradeoffs +- Brainstorming sessions +- Post-mortems when things go wrong +- Sprint retrospectives and planning + +## Examples + +### Calling Out Bad Architecture + +**You:** "Okay team, our last sprint was a disaster. The authentication service went down three times. Who screwed this up?" + +**Architect:** "The design was sound - distributed authentication with proper fallbacks. If implementation deviated from the spec..." + +**Dev:** "I followed the architecture doc exactly. The spec didn't account for concurrent session invalidation race conditions." + +**PM:** "Both of you missed the bigger issue - we didn't validate session management requirements in the PRD. This is on me for not catching it." + +**TEA:** "And I should've caught this in integration tests. The test scenarios didn't cover concurrent invalidation." + +### Creative Brainstorming + +**You:** "How do we make onboarding feel magical instead of boring?" + +**UX Designer:** "Start with progressive disclosure - reveal features as users need them, not all at once in a tutorial." + +**Storyteller:** "What if onboarding was a story? Each step reveals a character's journey - the user IS the hero." + +**Game Designer:** "Building on that - what if the first 'quest' is actually solving a real user problem? They learn by doing something valuable." + +### Technical Decision + +**You:** "Monolith or microservices for MVP?" + +**Architect:** "Start monolith. Microservices add complexity you don't need at 1000 users." + +**PM:** "Agree. Time to market matters more than theoretical scalability." + +**Dev:** "Monolith with clear module boundaries. We can extract services later if needed." + +:::tip[Better Decisions] +Better decisions through diverse perspectives. Welcome to party mode. +::: diff --git a/docs/explanation/philosophy/facilitation-over-generation.md b/docs/explanation/philosophy/facilitation-over-generation.md deleted file mode 100644 index a0298c5a..00000000 --- a/docs/explanation/philosophy/facilitation-over-generation.md +++ /dev/null @@ -1,333 +0,0 @@ ---- -title: "Facilitation Over Generation" -description: Understanding a facilitation-first approach to AI workflows and creative collaboration ---- - -BMAD workflows take a fundamentally different approach from typical AI Prompts you will find. Instead of generating solutions directly, workflows act as facilitators who guide you through discovery processes, helping you arrive at insights and decisions yourself. - -This has always been the magic of the BMad method - if you have used it you have felt it intuitively and noticed a difference - and it is through this document I want to really explain what this is. This is fundamental to understand if you are also interested in producing your own workflows or improving upon existing ones in any BMad related module. - -## The Problem with Generation - -Traditional AI approaches to creative and knowledge work typically follow this pattern: - -:::note[Generation Example] -**User:** "I need a comprehensive UX design for my e-commerce app" - -**AI:** [Immediately generates] "Here's a complete UX specification with modern dark theme, card-based product grid, left navigation, and checkout flow..." -::: - -This approach: -- Produces generic, predictable outputs that may not fit your actual needs -- Removes your ownership and understanding of the solution -- Misses critical context, constraints, and nuance -- Limits creative exploration to the AI's training data patterns -- Creates deliverables you can't explain or iterate on effectively - -## The Facilitation Approach - -Facilitative workflows use strategic questioning and guided discovery: - -:::note[Facilitation Example from UX Design Workflow] -**User:** "I need a comprehensive UX design for my e-commerce app" - -**Workflow:** "Welcome! I'll act as your UX facilitator to help you discover the right approach. First, let me understand what documents you already have—do you have a product brief, PRD, or any research?" - -**User:** "I have a product brief and some user research" - -**Workflow:** "Great! Let me load those. [Loads documents] Now, what are the primary user goals for your e-commerce experience? What should users be able to accomplish?" - -**User:** "They need to browse products quickly and complete purchases without friction" - -**Workflow:** "Interesting! And what makes your e-commerce situation unique? What are the specific challenges or constraints you're working with?" -::: - -This approach: -- Draws out insights and expertise already within you -- Maintains your ownership and understanding of decisions -- Captures your specific context, constraints, and goals -- Enables deeper exploration of your unique situation -- Creates outputs you can confidently explain and iterate on - -## Real-World Examples from BMAD Workflows - -### Brainstorming Workflow (from core module) - -The brainstorming workflow demonstrates pure facilitation through its entire journey: - -**Session Setup:** -``` -"Welcome! I'm excited to facilitate your brainstorming session. I'll guide you -through proven creativity techniques to generate innovative ideas. - -**What are we brainstorming about?** (The central topic or challenge) -**What specific outcomes are you hoping for?** (Types of ideas, solutions, or insights) -``` - -**Technique Selection - Offering Options:** -``` -"Ready to explore technique approaches? -[1] User-Selected Techniques - Browse our complete technique library -[2] AI-Recommended Techniques - Get customized suggestions based on your goals -[3] Random Technique Selection - Discover unexpected creative methods -[4] Progressive Technique Flow - Start broad, then systematically narrow focus - -Which approach appeals to you most?" -``` - -**Technique Execution - Interactive Coaching:** -The workflow doesn't generate ideas—it coaches you through techniques with genuine back-and-forth dialogue: - -``` -"Let's start with: What if you could remove all practical constraints? - -I'm not just looking for a quick answer - I want to explore this together. -What immediately comes to mind? Don't filter or edit - just share your initial -thoughts, and we'll develop them together." - -[User responds] - -"That's interesting! Tell me more about [specific aspect you mentioned]. -What would that look like in practice? How does that connect to your core goal?" -``` - -**Key facilitation behaviors:** -- Aims for 100+ ideas before suggesting organization -- Asks "Continue exploring?" or "Move to next technique?"—user controls pace -- Uses anti-bias protocols to force thinking in new directions every 10 ideas -- Builds on user's ideas with genuine creative contributions -- Keeps user in "generative exploration mode" as long as possible - -**Organization - Collaborative Synthesis:** -``` -"Outstanding creative work! You've generated an incredible range of ideas. -Now let's organize these creative gems and identify your most promising opportunities. - -I'm analyzing all your generated ideas to identify natural themes and patterns. -**Emerging Themes I'm Identifying:** -- Theme 1: [Name] - Ideas: [list] - Pattern: [connection] -- Theme 2: [Name] - Ideas: [list] - Pattern: [connection] - -Which themes or specific ideas stand out to you as most valuable?" -``` - -Result: A comprehensive brainstorming session document with **your** ideas, organized by **your** priorities, with **your** action plans. - -### Create UX Design Workflow (from BMM method) - -The UX design workflow facilitates a 14-step journey from project understanding to complete UX specification—**never making design decisions for you**. - -**Step 1: Document Discovery (Collaborative Setup)** -``` -"Welcome! I've set up your UX design workspace. - -**Documents Found:** -- PRD: product-requirements.md -- Product brief: brief.md - -**Files loaded:** [lists specific files] - -Do you have any other documents you'd like me to include, or shall we continue?" -``` - -**Step 2: Project Understanding (Discovery Questions)** -``` -"Based on the project documentation, let me confirm what I'm understanding... - -**From the documents:** [summary of key insights] -**Target Users:** [summary from documents] -**Key Features/Goals:** [summary from documents] - -Does this match your understanding? Are there any corrections or additions?" -``` - -Then it dives deeper with targeted questions: -``` -"Let me understand your users better to inform the UX design: - -**User Context Questions:** -- What problem are users trying to solve? -- What frustrates them with current solutions? -- What would make them say 'this is exactly what I needed'?" -``` - -**Step 3: Core Experience Definition (Guiding Insights)** -``` -"Now let's dig into the heart of the user experience. - -**Core Experience Questions:** -- What's the ONE thing users will do most frequently? -- What user action is absolutely critical to get right? -- What should be completely effortless for users? -- If we nail one interaction, everything else follows - what is it? - -Think about the core loop or primary action that defines your product's value." -``` - -**Step 4: Emotional Response (Feelings-Based Design)** -``` -"Now let's think about how your product should make users feel. - -**Emotional Response Questions:** -- What should users FEEL when using this product? -- What emotion would make them tell a friend about this? -- How should users feel after accomplishing their primary goal? - -Common emotional goals: Empowered and in control? Delighted and surprised? -Efficient and productive? Creative and inspired?" -``` - -**Step 5: Pattern Inspiration (Learning from Examples)** -``` -"Let's learn from products your users already love and use regularly. - -**Inspiration Questions:** -- Name 2-3 apps your target users already love and USE frequently -- For each one, what do they do well from a UX perspective? -- What makes the experience compelling or delightful? - -For each inspiring app, let's analyze their UX success: -- What core problem does it solve elegantly? -- What makes the onboarding experience effective? -- How do they handle navigation and information hierarchy?" -``` - -**Step 9: Design Directions (Interactive Visual Exploration)** -The workflow generates 6-8 HTML mockup variations—but **you choose**: - -``` -"🎨 Design Direction Mockups Generated! - -I'm creating a comprehensive HTML showcase with 6-8 full-screen mockup variations. -Each mockup represents a complete visual direction for your app's look and feel. - -**As you explore the design directions, look for:** -✅ Which information hierarchy matches your priorities? -✅ Which interaction style fits your core experience? -✅ Which visual density feels right for your brand? - -**Which approach resonates most with you?** -- Pick a favorite direction as-is -- Combine elements from multiple directions -- Request modifications to any direction - -Tell me: Which layout feels most intuitive? Which visual weight matches your brand?" -``` - -**Step 12: UX Patterns (Consistency Through Questions)** -``` -"Let's establish consistency patterns for common situations. - -**Pattern Categories to Define:** -- Button hierarchy and actions -- Feedback patterns (success, error, warning, info) -- Form patterns and validation -- Navigation patterns - -Which categories are most critical for your product? - -**For [Critical Pattern Category]:** -What should users see/do when they need to [pattern action]? - -**Considerations:** -- Visual hierarchy (primary vs. secondary actions) -- Feedback mechanisms -- Error recovery -- Accessibility requirements - -How should your product handle [pattern type] interactions?" -``` - -**The Result:** A complete, production-ready UX specification document that captures **your** decisions, **your** reasoning, and **your** vision—documented through guided discovery, not generation. - -## Key Principles - -### 1. Questions Over Answers - -Facilitative workflows ask strategic questions rather than providing direct answers. This: -- Activates your own creative and analytical thinking -- Uncovers assumptions you didn't know you had -- Reveals blind spots in your understanding -- Builds on your domain expertise and context - -### 2. Multi-Turn Conversation - -Facilitation uses progressive discovery, not interrogation: -- Ask 1-2 questions at a time, not laundry lists -- Think about responses before asking follow-ups -- Probe to understand deeper, not just collect facts -- Use conversation to explore, not just extract - -### 3. Intent-Based Guidance - -Workflows specify goals and approaches, not exact scripts: -- "Guide the user through discovering X" (intent) -- NOT "Say exactly: 'What is X?'" (prescriptive) - -This allows the workflow to adapt naturally to your responses while maintaining structured progress. - -### 4. Process Trust - -Facilitative workflows use proven methodologies: -- Design Thinking's phases (Empathize, Define, Ideate, Prototype, Test) -- Structured brainstorming and creativity techniques -- Root cause analysis frameworks -- Innovation strategy patterns - -You're not just having a conversation—you're following time-tested processes adapted to your specific situation. - -### 5. YOU Are the Expert - -Facilitative workflows operate on a core principle: **you are the expert on your situation**. The workflow brings: -- Process expertise (how to think through problems) -- Facilitation skills (how to guide exploration) -- Technique knowledge (proven methods and frameworks) - -You bring: -- Domain knowledge (your specific field or industry) -- Context understanding (your unique situation and constraints) -- Decision authority (what will actually work for you) - -## When Generation is Appropriate - -Facilitative workflows DO generate when appropriate: -- Synthesizing and structuring outputs after you've made decisions -- Documenting your choices and rationale -- Creating structured artifacts based on your input -- Providing technique examples or option templates -- Formatting and organizing your conclusions - -But the **core creative and analytical work** happens through facilitated discovery, not generation. - -## The Distinction: Facilitator vs Generator - -| Facilitative Workflow | Generative AI | -| ------------------------------------- | --------------------------------------- | -| "What are your goals?" | "Here's the solution" | -| Asks 1-2 questions at a time | Produces complete output immediately | -| Multiple turns, progressive discovery | Single turn, bulk generation | -| "Let me understand your context" | "Here's a generic answer" | -| Offers options, you choose | Makes decisions for you | -| Documents YOUR reasoning | No reasoning visible | -| You can explain every decision | You can't explain why choices were made | -| Ownership and understanding | Outputs feel alien | - -## Benefits - -### For Individuals -- **Deeper insights** than pure generation—ideas connect to your actual knowledge -- **Full ownership** of creative outputs and decisions -- **Skill development** in structured thinking and problem-solving -- **More memorable and actionable** results—you understand the "why" - -### For Teams -- **Shared creative experience** building alignment and trust -- **Aligned understanding** through documented exploration -- **Documented rationale** for future reference and onboarding -- **Stronger buy-in** to outcomes because everyone participated in discovery - -### For Implementation -- **Outputs match reality** because they emerged from your actual constraints -- **Easier iteration** because you understand the reasoning behind choices -- **Confident implementation** because you can defend every decision -- **Reduced rework** because facilitation catches issues early diff --git a/docs/explanation/architecture/preventing-agent-conflicts.md b/docs/explanation/preventing-agent-conflicts.md similarity index 84% rename from docs/explanation/architecture/preventing-agent-conflicts.md rename to docs/explanation/preventing-agent-conflicts.md index e8141989..4516ef6c 100644 --- a/docs/explanation/architecture/preventing-agent-conflicts.md +++ b/docs/explanation/preventing-agent-conflicts.md @@ -3,7 +3,6 @@ title: "Preventing Agent Conflicts" description: How architecture prevents conflicts when multiple agents implement a system --- - When multiple AI agents implement different parts of a system, they can make conflicting technical decisions. Architecture documentation prevents this by establishing shared standards. ## Common Conflict Types @@ -86,14 +85,14 @@ Result: Consistent implementation Common decisions that prevent conflicts: -| Topic | Example Decision | -|-------|-----------------| -| API Style | GraphQL vs REST vs gRPC | -| Database | PostgreSQL vs MongoDB | -| Auth | JWT vs Sessions | -| State Management | Redux vs Context vs Zustand | -| Styling | CSS Modules vs Tailwind vs Styled Components | -| Testing | Jest + Playwright vs Vitest + Cypress | +| Topic | Example Decision | +| ---------------- | -------------------------------------------- | +| API Style | GraphQL vs REST vs gRPC | +| Database | PostgreSQL vs MongoDB | +| Auth | JWT vs Sessions | +| State Management | Redux vs Context vs Zustand | +| Styling | CSS Modules vs Tailwind vs Styled Components | +| Testing | Jest + Playwright vs Vitest + Cypress | ## Anti-Patterns to Avoid diff --git a/docs/explanation/quick-flow.md b/docs/explanation/quick-flow.md new file mode 100644 index 00000000..9b6e4ea7 --- /dev/null +++ b/docs/explanation/quick-flow.md @@ -0,0 +1,27 @@ +--- +title: "Quick Flow" +description: Fast-track for small changes - skip the full methodology +--- + +Quick Flow is for when you don't need the full BMad Method. Skip Product Brief, PRD, and Architecture - go straight to implementation. + +## How It Works + +1. **Run `quick-spec`** — generates a focused tech-spec +2. **Run `quick-dev`** — implements it + +That's it. + +## When to Use It + +- Bug fixes +- Refactoring +- Small features +- Prototyping + +## When to Use Full BMad Method Instead + +- New products +- Major features +- Multiple teams involved +- Stakeholder alignment needed diff --git a/docs/explanation/architecture/why-solutioning-matters.md b/docs/explanation/why-solutioning-matters.md similarity index 100% rename from docs/explanation/architecture/why-solutioning-matters.md rename to docs/explanation/why-solutioning-matters.md diff --git a/docs/how-to/brownfield/add-feature-to-existing.md b/docs/how-to/brownfield/add-feature-to-existing.md deleted file mode 100644 index 27c6412e..00000000 --- a/docs/how-to/brownfield/add-feature-to-existing.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: "How to Add a Feature to an Existing Project" -description: How to add new features to an existing brownfield project ---- - -Use the `workflow-init` workflow to add new functionality to your brownfield codebase while respecting existing patterns and architecture. - -## When to Use This - -- Adding a new feature to an existing codebase -- Major enhancements that need proper planning -- Features that touch multiple parts of the system - -:::note[Prerequisites] -- BMad Method installed -- Existing project documentation (run `document-project` first if needed) -- Clear understanding of what you want to build -::: - -## Steps - -### 1. Run workflow-init - -``` -Run workflow-init -``` - -The workflow should recognize you're in an existing project. If not, explicitly clarify that this is brownfield development. - -### 2. Choose Your Approach - -| Feature Scope | Recommended Approach | -|---------------|---------------------| -| Small (1-5 stories) | Quick Flow with tech-spec | -| Medium (5-15 stories) | BMad Method with PRD | -| Large (15+ stories) | Full BMad Method with architecture | - -### 3. Create Planning Documents - -**For Quick Flow:** -- Load PM agent -- Run tech-spec workflow -- The agent will analyze your existing codebase and create a context-aware spec - -**For BMad Method:** -- Load PM agent -- Run PRD workflow -- Ensure the agent reads your existing documentation -- Review that integration points are clearly identified - -### 4. Consider Architecture Impact - -If your feature affects system architecture: - -- Load Architect agent -- Run architecture workflow -- Ensure alignment with existing patterns -- Document any new ADRs (Architecture Decision Records) - -### 5. Implement - -Follow the standard Phase 4 implementation workflows: - -1. `sprint-planning` - Organize your work -2. `create-story` - Prepare each story -3. `dev-story` - Implement with tests -4. `code-review` - Quality assurance - -## Tips - -- Always ensure agents read your existing documentation -- Pay attention to integration points with existing code -- Follow existing conventions unless deliberately changing them -- Document why you're adding new patterns (if any) diff --git a/docs/how-to/brownfield/document-existing-project.md b/docs/how-to/brownfield/document-existing-project.md deleted file mode 100644 index b318363b..00000000 --- a/docs/how-to/brownfield/document-existing-project.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: "How to Document an Existing Project" -description: How to document an existing brownfield codebase using BMad Method ---- - -Use the `document-project` workflow to scan your entire codebase and generate comprehensive documentation about its current state. - -## When to Use This - -- Starting work on an undocumented legacy project -- Documentation is outdated and needs refresh -- AI agents need context about existing code patterns -- Onboarding new team members - -:::note[Prerequisites] -- BMad Method installed in your project -- Access to the codebase you want to document -::: - -## Steps - -### 1. Load the Analyst Agent - -Start a fresh chat and load the Analyst agent. - -### 2. Run the document-project Workflow - -Tell the agent: - -``` -Run the document-project workflow -``` - -### 3. Let the Agent Scan Your Codebase - -The workflow will: - -- Scan your codebase structure -- Identify architecture patterns -- Document the technology stack -- Create reference documentation -- Generate a PRD-like document from existing code - -### 4. Review the Generated Documentation - -The output will be saved to `project-documentation-{date}.md` in your output folder. - -Review the documentation for: - -- Accuracy of detected patterns -- Completeness of architecture description -- Any missing business rules or intent - -## What You Get - -- **Project overview** - High-level description of what the project does -- **Technology stack** - Detected frameworks, libraries, and tools -- **Architecture patterns** - Code organization and design patterns found -- **Business rules** - Logic extracted from the codebase -- **Integration points** - External APIs and services - -## Tips - -- Run this before any major brownfield work -- Keep the documentation updated as the project evolves -- Use it as input for future PRD creation diff --git a/docs/how-to/brownfield/index.md b/docs/how-to/brownfield/index.md index ab5f30e9..75bab690 100644 --- a/docs/how-to/brownfield/index.md +++ b/docs/how-to/brownfield/index.md @@ -36,9 +36,11 @@ Your `docs/` folder should contain succinct, well-organized documentation that a For complex projects, consider using the `document-project` workflow. It offers runtime variants that will scan your entire project and document its actual current state. -## Step 3: Initialize for Brownfield Work +## Step 3: Get Help -Run `workflow-init`. It should recognize you are in an existing project. If not, explicitly clarify that this is brownfield development for a new feature. +Get help to know what to do next based on your unique needs + +Run `bmad-help` to get guidance when you are not sure what to do next. ### Choosing Your Approach @@ -76,9 +78,7 @@ When doing architecture, ensure the architect: Pay close attention here to prevent reinventing the wheel or making decisions that misalign with your existing architecture. -## Next Steps +## More Information -- **[Document Existing Project](/docs/how-to/brownfield/document-existing-project.md)** - How to document your brownfield codebase -- **[Add Feature to Existing Project](/docs/how-to/brownfield/add-feature-to-existing.md)** - Adding new functionality - **[Quick Fix in Brownfield](/docs/how-to/brownfield/quick-fix-in-brownfield.md)** - Bug fixes and ad-hoc changes -- **[Brownfield FAQ](/docs/explanation/faq/brownfield-faq.md)** - Common questions about brownfield development +- **[Brownfield FAQ](/docs/explanation/brownfield-faq.md)** - Common questions about brownfield development diff --git a/docs/how-to/brownfield/quick-fix-in-brownfield.md b/docs/how-to/brownfield/quick-fix-in-brownfield.md index 2e8896ab..9dc430f1 100644 --- a/docs/how-to/brownfield/quick-fix-in-brownfield.md +++ b/docs/how-to/brownfield/quick-fix-in-brownfield.md @@ -7,11 +7,10 @@ Use the **DEV agent** directly for bug fixes, refactorings, or small targeted ch ## When to Use This -- Bug fixes -- Small refactorings -- Targeted code improvements +- Simple bug fixes +- Small refactorings and changes that don't need extensive ideation, planning, or architectural shifts +- Larger refactorings or improvement with built in tool planning and execution mode combination, or better yet use quick flow - Learning about your codebase -- One-off changes that don't need planning ## Steps @@ -20,7 +19,7 @@ Use the **DEV agent** directly for bug fixes, refactorings, or small targeted ch For quick fixes, you can use: - **DEV agent** - For implementation-focused work -- **Quick Flow Solo Dev** - For slightly larger changes that still need a tech-spec +- **Quick Flow Solo Dev** - For slightly larger changes that still need a quick-spec to keep the agent aligned to planning and standards ### 2. Describe the Change @@ -61,7 +60,7 @@ Explain how the authentication system works in this codebase Show me where error handling happens in the API layer ``` -LLMs are excellent at interpreting and analyzing code—whether it was AI-generated or not. Use the agent to: +LLMs are excellent at interpreting and analyzing code, whether it was AI-generated or not. Use the agent to: - Learn about your project - Understand how things are built diff --git a/docs/how-to/customization/customize-agents.md b/docs/how-to/customization/customize-agents.md deleted file mode 100644 index c4eec45b..00000000 --- a/docs/how-to/customization/customize-agents.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -title: "Agent Customization Guide" ---- - -Use `.customize.yaml` files to customize BMad agents without modifying core files. All customizations persist through updates. - -## When to Use This - -- Change agent names or personas -- Add project-specific memories or context -- Add custom menu items and workflows -- Define critical actions for consistent behavior - -## Quick Start - -**1. Locate Customization Files** - -After installation, find agent customization files in: - -``` -_bmad/_config/agents/ -├── core-bmad-master.customize.yaml -├── bmm-dev.customize.yaml -├── bmm-pm.customize.yaml -└── ... (one file per installed agent) -``` - -**2. Edit Any Agent** - -Open the `.customize.yaml` file for the agent you want to modify. All sections are optional - customize only what you need. - -**3. Rebuild the Agent** - -After editing, IT IS CRITICAL to rebuild the agent to apply changes: - -```bash -npx bmad-method@alpha install # and then select option to compile all agents -npx bmad-method@alpha build - -npx bmad-method@alpha build bmm-dev -npx bmad-method@alpha build core-bmad-master -npx bmad-method@alpha build bmm-pm -``` - -## What You Can Customize - -### Agent Name - -Change how the agent introduces itself: - -```yaml -agent: - metadata: - name: 'Spongebob' # Default: "Amelia" -``` - -### Persona - -Replace the agent's personality, role, and communication style: - -```yaml -persona: - role: 'Senior Full-Stack Engineer' - identity: 'Lives in a pineapple (under the sea)' - communication_style: 'Spongebob' - principles: - - 'Never Nester, Spongebob Devs hate nesting more than 2 levels deep' - - 'Favor composition over inheritance' -``` - -**Note:** The persona section replaces the entire default persona (not merged). - -### Memories - -Add persistent context the agent will always remember: - -```yaml -memories: - - 'Works at Krusty Krab' - - 'Favorite Celebrity: David Hasslehoff' - - 'Learned in Epic 1 that its not cool to just pretend that tests have passed' -``` - -### Custom Menu Items - -Add your own workflows to the agent's menu: - -```yaml -menu: - - trigger: my-workflow - workflow: '{project-root}/my-custom/workflows/my-workflow.yaml' - description: My custom workflow - - trigger: deploy - action: '#deploy-prompt' - description: Deploy to production -``` - -**Don't include:** `*` prefix or `help`/`exit` items - these are auto-injected. - -### Critical Actions - -Add instructions that execute before the agent starts: - -```yaml -critical_actions: - - 'Always check git status before making changes' - - 'Use conventional commit messages' -``` - -### Custom Prompts - -Define reusable prompts for `action="#id"` menu handlers: - -```yaml -prompts: - - id: deploy-prompt - content: | - Deploy the current branch to production: - 1. Run all tests - 2. Build the project - 3. Execute deployment script -``` - -## Real-World Examples - -**Example 1: Customize Developer Agent for TDD** - -```yaml -agent: - metadata: - name: 'TDD Developer' - -memories: - - 'Always write tests before implementation' - - 'Project uses Jest and React Testing Library' - -critical_actions: - - 'Review test coverage before committing' -``` - -**Example 2: Add Custom Deployment Workflow** - -```yaml -menu: - - trigger: deploy-staging - workflow: '{project-root}/_bmad/deploy-staging.yaml' - description: Deploy to staging environment - - trigger: deploy-prod - workflow: '{project-root}/_bmad/deploy-prod.yaml' - description: Deploy to production (with approval) -``` - -**Example 3: Multilingual Product Manager** - -```yaml -persona: - role: 'Bilingual Product Manager' - identity: 'Expert in US and LATAM markets' - communication_style: 'Clear, strategic, with cultural awareness' - principles: - - 'Consider localization from day one' - - 'Balance business goals with user needs' - -memories: - - 'User speaks English and Spanish' - - 'Target markets: US and Latin America' -``` - -## Tips - -- **Start Small:** Customize one section at a time and rebuild to test -- **Backup:** Copy customization files before major changes -- **Update-Safe:** Your customizations in `_config/` survive all BMad updates -- **Per-Project:** Customization files are per-project, not global -- **Version Control:** Consider committing `_config/` to share customizations with your team - -## Module vs. Global Config - -**Module-Level (Recommended):** - -- Customize agents per-project in `_bmad/_config/agents/` -- Different projects can have different agent behaviors - -**Global Config (Coming Soon):** - -- Set defaults that apply across all projects -- Override with project-specific customizations - -## Troubleshooting - -**Changes not appearing?** - -- Make sure you ran `npx bmad-method build ` after editing -- Check YAML syntax is valid (indentation matters!) -- Verify the agent name matches the file name pattern - -**Agent not loading?** - -- Check for YAML syntax errors -- Ensure required fields aren't left empty if you uncommented them -- Try reverting to the template and rebuilding - -**Need to reset?** - -- Delete the `.customize.yaml` file -- Run `npx bmad-method build ` to regenerate defaults - -## Next Steps - -- **[Learn about Agents](/docs/explanation/core-concepts/what-are-agents.md)** - Understand Simple vs Expert agents -- **[Agent Creation Guide](https://github.com/bmad-code-org/bmad-builder/blob/main/docs/tutorials/create-custom-agent.md)** - Build completely custom agents -- **[BMM Complete Documentation](/docs/explanation/bmm/index.md)** - Full BMad Method reference diff --git a/docs/how-to/customization/index.md b/docs/how-to/customization/index.md deleted file mode 100644 index a792104c..00000000 --- a/docs/how-to/customization/index.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: "BMad Customization" ---- - -Personalize agents and workflows to match your needs. - -## Guides - -| Guide | Description | -|-------|-------------| -| **[Agent Customization](/docs/how-to/customization/customize-agents.md)** | Modify agent behavior without editing core files | - -## Overview - -BMad provides two main customization approaches: - -### Agent Customization - -Modify any agent's persona, name, capabilities, or menu items using `.customize.yaml` files in `_bmad/_config/agents/`. Your customizations persist through updates. - -### Workflow Customization - -Replace or extend workflow steps to create tailored processes. (Coming soon) diff --git a/docs/how-to/customize-bmad.md b/docs/how-to/customize-bmad.md new file mode 100644 index 00000000..c466631f --- /dev/null +++ b/docs/how-to/customize-bmad.md @@ -0,0 +1,158 @@ +--- +title: "BMad Method Customization Guide" +--- + +The ability to customize the BMad Method and its core to your needs, while still being able to get updates and enhancements is a critical idea within the BMad Ecosystem. + +The Customization Guidance outlined here, while targeted at understanding BMad Method customization, applies to any other module use within the BMad Method. + +## Types of Customization + +Customization includes Agent Customization, Workflow/Skill customization, the addition of new MCPs or Skills to be used by existing agents. Aside from all of this, a whole other realm of customization involves creating / adding your own relevant BMad Builder workflows, skills, agents and maybe even your own net new modules to compliment the BMad Method Module. + +Warning: The reason for customizing as this guide will prescribe will allow you to continue getting updates without worrying about losing your customization changes. And by continuing to get updates as BMad modules advance, you will be able to continue to evolve as the system improves. + +## Agent Customization + +### Agent Customization Areas + +- Change agent names, personas or manner of speech +- Add project-specific memories or context +- Add custom menu items to custom or inline prompts, skills or custom BMad workflows +- Define critical actions that occur agent startup for consistent behavior + +## How to customize an agent. + +**1. Locate Customization Files** + +After installation, find agent customization files in: + +``` +_bmad/_config/agents/ +├── core-bmad-master.customize.yaml +├── bmm-dev.customize.yaml +├── bmm-pm.customize.yaml +└── ... (one file per installed agent) +``` + +**2. Edit Any Agent** + +Open the `.customize.yaml` file for the agent you want to modify. All sections are optional - customize only what you need. + +**3. Rebuild the Agent** + +After editing, IT IS CRITICAL to rebuild the agent to apply changes: + +```bash +npx bmad-method install +``` + +You can either then: + +- Select `Quick Update` - This will also ensure all packages are up to date AND compile all agents to include any updates or customizations +- Select `Rebuild Agents` - This will only rebuild and apply customizations to agents, without pulling the latest + +There will be additional tools shortly after beta launch to allow install of individual agents, workflows, skills and modules without the need for using the full bmad installer. + +### What Agent Properties Can Be Customized? + +#### Agent Name + +Change how the agent introduces itself: + +```yaml +agent: + metadata: + name: 'Spongebob' # Default: "Amelia" +``` + +#### Persona + +Replace the agent's personality, role, and communication style: + +```yaml +persona: + role: 'Senior Full-Stack Engineer' + identity: 'Lives in a pineapple (under the sea)' + communication_style: 'Spongebob annoying' + principles: + - 'Never Nester, Spongebob Devs hate nesting more than 2 levels deep' + - 'Favor composition over inheritance' +``` + +**Note:** The persona section replaces the entire default persona (not merged). + +#### Memories + +Add persistent context the agent will always remember: + +```yaml +memories: + - 'Works at Krusty Krab' + - 'Favorite Celebrity: David Hasslehoff' + - 'Learned in Epic 1 that its not cool to just pretend that tests have passed' +``` + +### Custom Menu Items + +Any custom items you add here will be included in the agents display menu. + +```yaml +menu: + - trigger: my-workflow + workflow: '{project-root}/my-custom/workflows/my-workflow.yaml' + description: My custom workflow + - trigger: deploy + action: '#deploy-prompt' + description: Deploy to production +``` + +### Critical Actions + +Add instructions that execute before the agent starts: + +```yaml +critical_actions: + - 'Check the CI Pipelines with the XYZ Skill and alert user on wake if anything is urgently needing attention' +``` + +### Custom Prompts + +Define reusable prompts for `action="#id"` menu handlers: + +```yaml +prompts: + - id: deploy-prompt + content: | + Deploy the current branch to production: + 1. Run all tests + 2. Build the project + 3. Execute deployment script +``` + +## Troubleshooting + +**Changes not appearing?** + +- Make sure you ran `npx bmad-method build ` after editing +- Check YAML syntax is valid (indentation matters!) +- Verify the agent name matches the file name pattern + +**Agent not loading?** + +- Check for YAML syntax errors +- Ensure required fields aren't left empty if you uncommented them +- Try reverting to the template and rebuilding + +**Need to reset?** + +- Remove content from the `.customize.yaml` file (or delete the file) +- Run `npx bmad-method build ` to regenerate defaults + +## Workflow Customization + +Information about customizing existing BMad MEthod workflows and skills are coming soon. + +## Module Customization + +Information on how to build expansion modules that augment BMad, or make other existing module customizations are coming soon. \ No newline at end of file diff --git a/docs/how-to/get-answers-about-bmad.md b/docs/how-to/get-answers-about-bmad.md index 6581e817..a8dbad09 100644 --- a/docs/how-to/get-answers-about-bmad.md +++ b/docs/how-to/get-answers-about-bmad.md @@ -3,11 +3,11 @@ title: "How to Get Answers About BMad" description: Use an LLM to quickly answer your own BMad questions --- -Use your AI tool to get answers about BMad by pointing it at the source files. +If you have successfully installed BMad and the BMad Method (+ other modules as needed) - the first step in getting answers is `/bmad-help`. This will answer upwards of 80% of all questions and is available to you in the IDE as you are working. ## When to Use This -- You have a question about how BMad works +- You have a question about how BMad works or what to do next with BMad - You want to understand a specific agent or workflow - You need quick answers without waiting for Discord @@ -19,11 +19,11 @@ An AI tool (Claude Code, Cursor, ChatGPT, Claude.ai, etc.) and either BMad insta ### 1. Choose Your Source -| Source | Best For | Examples | -|--------|----------|----------| -| **`_bmad` folder** | How BMad works—agents, workflows, prompts | "What does the PM agent do?" | -| **Full GitHub repo** | History, installer, architecture | "What changed in v6?" | -| **`llms-full.txt`** | Quick overview from docs | "Explain BMad's four phases" | +| Source | Best For | Examples | +| -------------------- | ----------------------------------------- | ---------------------------- | +| **`_bmad` folder** | How BMad works—agents, workflows, prompts | "What does the PM agent do?" | +| **Full GitHub repo** | History, installer, architecture | "What changed in v6?" | +| **`llms-full.txt`** | Quick overview from docs | "Explain BMad's four phases" | The `_bmad` folder is created when you install BMad. If you don't have it yet, clone the repo instead. @@ -65,12 +65,12 @@ Direct answers about BMad—how agents work, what workflows do, why things are s Tried the LLM approach and still need help? You now have a much better question to ask. -| Channel | Use For | -|---------|---------| -| `#bmad-method-help` | Quick questions (real-time chat) | -| `help-requests` forum | Detailed questions (searchable, persistent) | -| `#suggestions-feedback` | Ideas and feature requests | -| `#report-bugs-and-issues` | Bug reports | +| Channel | Use For | +| ------------------------- | ------------------------------------------- | +| `#bmad-method-help` | Quick questions (real-time chat) | +| `help-requests` forum | Detailed questions (searchable, persistent) | +| `#suggestions-feedback` | Ideas and feature requests | +| `#report-bugs-and-issues` | Bug reports | **Discord:** [discord.gg/gk8jAdXWmj](https://discord.gg/gk8jAdXWmj) diff --git a/docs/how-to/install-bmad.md b/docs/how-to/install-bmad.md new file mode 100644 index 00000000..27e7b253 --- /dev/null +++ b/docs/how-to/install-bmad.md @@ -0,0 +1,82 @@ +--- +title: "How to Install BMad" +description: Step-by-step guide to installing BMad in your project +--- + +Use the `npx bmad-method install` command to set up BMad in your project with your choice of modules and AI tools. + +## When to Use This + +- Starting a new project with BMad +- Adding BMad to an existing codebase +- Update the existing BMad Installation + +:::note[Prerequisites] +- **Node.js** 20+ (required for the installer) +- **Git** (recommended) +- **AI tool** (Claude Code, Cursor, Windsurf, or similar) +::: + +## Steps + +### 1. Run the Installer + +```bash +npx bmad-method install +``` + +### 2. Choose Installation Location + +The installer will ask where to install BMad files: + +- Current directory (recommended for new projects if you created the directory yourself and ran from within the directory) +- Custom path + +### 3. Select Your AI Tools + +Pick which AI tools you use: + +- Claude Code +- Cursor +- Windsurf +- Others + +Each tool has its own way of integrating commands. The installer creates tiny prompt files to activate workflows and agents — it just puts them where your tool expects to find them. + +### 4. Choose Modules + +The installer shows available modules. Select whichever ones you need — most users just want **BMad Method** (the software development module). + +### 5. Follow the Prompts + +The installer guides you through the rest — custom content, settings, etc. + +## What You Get + +``` +your-project/ +├── _bmad/ +│ ├── bmm/ # Your selected modules +│ │ └── config.yaml # Module settings (if you ever need to change them) +│ ├── core/ # Required core module +│ └── ... +├── _bmad-output/ # Generated artifacts +└── .claude/ # Claude Code commands (if using Claude Code) +``` + +## Verify Installation + +Run the `help` workflow (`/bmad-help` on most platforms) to verify everything works and see what to do next. + +**Latest from main branch:** +```bash +npx github:bmad-code-org/BMAD-METHOD install +``` + +Use these if you want the newest features before they're officially released. Things might break. + +## Troubleshooting + +**Installer throws an error** — Copy-paste the output into your AI assistant and let it figure it out. + +**Installer worked but something doesn't work later** — Your AI needs BMad context to help. See [How to Get Answers About BMad](/docs/how-to/get-answers-about-bmad.md) for how to point your AI at the right sources. diff --git a/docs/how-to/installation/index.md b/docs/how-to/installation/index.md deleted file mode 100644 index e3a3e29d..00000000 --- a/docs/how-to/installation/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "Installation Guides" -description: How to install and upgrade BMad Method ---- - -How-to guides for installing and configuring the BMad Method. - -| Guide | Description | -|-------|-------------| -| [Install BMad](/docs/how-to/installation/install-bmad.md) | Step-by-step installation instructions | -| [Install Custom Modules](/docs/how-to/installation/install-custom-modules.md) | Add custom agents, workflows, and modules | -| [Upgrade to v6](/docs/how-to/installation/upgrade-to-v6.md) | Migrate from BMad v4 to v6 | diff --git a/docs/how-to/installation/install-bmad.md b/docs/how-to/installation/install-bmad.md deleted file mode 100644 index 5d1ae33a..00000000 --- a/docs/how-to/installation/install-bmad.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: "How to Install BMad" -description: Step-by-step guide to installing BMad in your project ---- - -Use the `npx bmad-method install` command to set up BMad in your project with your choice of modules and AI tools. - -## When to Use This - -- Starting a new project with BMad -- Adding BMad to an existing codebase -- Update the existing BMad Installation - -:::note[Prerequisites] -- **Node.js** 20+ (required for the installer) -- **Git** (recommended) -- **AI-powered IDE** (Claude Code, Cursor, Windsurf, or similar) -::: - -## Steps - -### 1. Run the Installer - -```bash -npx bmad-method install -``` - -### 2. Choose Installation Location - -The installer will ask where to install BMad files: - -- Current directory (recommended for new projects if you created the directory yourself and ran from within the directory) -- Custom path - -### 3. Select Your AI Tools - -Choose which AI tools you'll be using: - -- Claude Code -- Cursor -- Windsurf -- Many others to choose from - -The installer configures BMad for your selected tools by setting up commands that will call the ui. - -### 4. Choose Modules - -Select which modules to install: - -| Module | Purpose | -| -------- | ----------------------------------------- | -| **BMM** | Core methodology for software development | -| **BMGD** | Game development workflows | -| **CIS** | Creative intelligence and facilitation | -| **BMB** | Building custom agents and workflows | - -### 5. Add Custom Content (Optional) - -If you have custom agents, workflows, or modules, point to their location and the installer will integrate them. - -### 6. Configure Settings - -For each module, either accept recommended defaults (faster) or customize settings (more control). - -## What You Get - -``` -your-project/ -├── _bmad/ -│ ├── bmm/ # Method module -│ │ ├── agents/ # Agent files -│ │ ├── workflows/ # Workflow files -│ │ └── config.yaml # Module config -│ ├── core/ # Core utilities -│ └── ... -├── _bmad-output/ # Generated artifacts -└── .claude/ # IDE configuration -``` - -## Verify Installation - -1. Check the `_bmad/` directory exists -2. Load an agent in your AI tool -3. Run `/workflow-init` which will autocomplete to the full command to see available commands - -## Configuration - -Edit `_bmad/[module]/config.yaml` to customize. For example these could be changed: - -```yaml -output_folder: ./_bmad-output -user_name: Your Name -communication_language: english -``` - -## Troubleshooting - -**"Command not found: npx"** — Install Node.js 20+: -```bash -brew install node -``` - -**"Permission denied"** — Check npm permissions: -```bash -npm config set prefix ~/.npm-global -``` - -**Installer hangs** — Try running with verbose output: -```bash -npx bmad-method install --verbose -``` diff --git a/docs/how-to/installation/install-custom-modules.md b/docs/how-to/installation/install-custom-modules.md deleted file mode 100644 index baab51ba..00000000 --- a/docs/how-to/installation/install-custom-modules.md +++ /dev/null @@ -1,118 +0,0 @@ ---- -title: "How to Install Custom Modules" -description: Add custom agents, workflows, and modules to BMad ---- - -Use the BMad installer to add custom agents, workflows, and modules that extend BMad's functionality. - -## When to Use This - -- Adding third-party BMad modules to your project -- Installing your own custom agents or workflows -- Sharing custom content across projects or teams - -:::note[Prerequisites] -- BMad installed in your project -- Custom content with a valid `module.yaml` file -::: - -## Steps - -### 1. Prepare Your Custom Content - -Your custom content needs a `module.yaml` file. Choose the appropriate structure: - -**For a cohesive module** (agents and workflows that work together): - -``` -module-code/ - module.yaml - agents/ - workflows/ - tools/ - templates/ -``` - -**For standalone items** (unrelated agents/workflows): - -``` -module-name/ - module.yaml # Contains unitary: true - agents/ - larry/larry.agent.md - curly/curly.agent.md - workflows/ -``` - -Add `unitary: true` in your `module.yaml` to indicate items don't depend on each other. - -### 2. Run the Installer - -**New project:** - -```bash -npx bmad-method install -``` - -When prompted "Would you like to install a local custom module?", select 'y' and provide the path to your module folder. - -**Existing project:** - -```bash -npx bmad-method install -``` - -1. Select `Modify BMad Installation` -2. Choose the option to add, modify, or update custom modules -3. Provide the path to your module folder - -### 3. Verify Installation - -Check that your custom content appears in the `_bmad/` directory and is accessible from your AI tool. - -## What You Get - -- Custom agents available in your AI tool -- Custom workflows accessible via `*workflow-name` -- Content integrated with BMad's update system - -## Content Types - -BMad supports several categories of custom content: - -| Type | Description | -| ----------------------- | ---------------------------------------------------- | -| **Stand Alone Modules** | Complete modules with their own agents and workflows | -| **Add On Modules** | Extensions that add to existing modules | -| **Global Modules** | Content available across all modules | -| **Custom Agents** | Individual agent definitions | -| **Custom Workflows** | Individual workflow definitions | - -For detailed information about content types, see [Custom Content Types](https://github.com/bmad-code-org/bmad-builder/blob/main/docs/explanation/bmad-builder/custom-content-types.md). - -## Updating Custom Content - -When BMad Core or module updates are available, the quick update process: - -1. Applies updates to core modules -2. Recompiles all agents with your customizations -3. Retains your custom content from cache -4. Preserves your configurations - -You don't need to keep source module files locally—just point to the updated location during updates. - -## Tips - -- **Use unique module codes** — Don't use `bmm` or other existing module codes -- **Avoid naming conflicts** — Each module needs a distinct code -- **Document dependencies** — Note any modules your custom content requires -- **Test in isolation** — Verify custom modules work before sharing -- **Version your content** — Track updates with version numbers - -:::caution[Naming Conflicts] -Don't create custom modules with codes like `bmm` (already used by BMad Method). Each custom module needs a unique code. -::: - -## Example Modules - -Find example custom modules in the `samples/sample-custom-modules/` folder of the [BMad repository](https://github.com/bmad-code-org/BMAD-METHOD). Download either sample folder to try them out. diff --git a/docs/how-to/customization/shard-large-documents.md b/docs/how-to/shard-large-documents.md similarity index 100% rename from docs/how-to/customization/shard-large-documents.md rename to docs/how-to/shard-large-documents.md diff --git a/docs/how-to/installation/upgrade-to-v6.md b/docs/how-to/upgrade-to-v6.md similarity index 100% rename from docs/how-to/installation/upgrade-to-v6.md rename to docs/how-to/upgrade-to-v6.md diff --git a/docs/how-to/workflows/bmgd-quick-flow.md b/docs/how-to/workflows/bmgd-quick-flow.md deleted file mode 100644 index fe07a124..00000000 --- a/docs/how-to/workflows/bmgd-quick-flow.md +++ /dev/null @@ -1,156 +0,0 @@ ---- -title: "BMGD Quick-Flow Guide" -description: Fast-track workflows for rapid game prototyping and flexible development ---- - -Use BMGD Quick-Flow workflows for rapid game prototyping and flexible development when you need to move fast. - -## When to Use This - -- Testing a game mechanic idea -- Implementing a small feature -- Rapid prototyping before committing to design -- Bug fixes and tweaks - -## When to Use Full BMGD Instead - -- Building a major feature or system -- The scope is unclear or large -- Multiple team members need alignment -- The work affects game pillars or core loop -- You need documentation for future reference - -:::note[Prerequisites] -- BMad Method installed with BMGD module -- Game Solo Dev agent (Indie) or other BMGD agent available -::: - -## Game Solo Dev Agent - -For dedicated quick-flow development, use the **Game Solo Dev** agent. This agent is optimized for solo developers and small teams who want to skip the full planning phases. - -**Switch to Game Solo Dev:** Type `@game-solo-dev` or select from your IDE. - -Includes: `quick-prototype`, `quick-dev`, `quick-spec`, `code-review`, `test-framework` - -## Quick-Prototype - -Use `quick-prototype` to rapidly test gameplay ideas with minimal setup. - -### When to Use - -- You have a mechanic idea and want to test the "feel" -- You're not sure if something will be fun -- You want to experiment before committing to design -- You need a proof of concept - -### Steps - -1. Run `quick-prototype` -2. Define what you're prototyping (mechanic, feature, system) -3. Set success criteria (2-3 items) -4. Build the minimum to test the idea -5. Playtest and evaluate - -### Prototype Principles - -- **Minimum Viable Prototype** — Only what's needed to test the idea -- **Hardcode First** — Magic numbers are fine, extract later -- **Skip Edge Cases** — Happy path only for now -- **Placeholder Everything** — Cubes, debug text, temp sounds -- **Comment Intent** — Mark what's temporary vs keeper code - -### After Prototyping - -- **Develop** (`d`) — Use `quick-dev` to build production code -- **Iterate** (`i`) — Adjust and re-test the prototype -- **Archive** (`a`) — Keep as reference, move on to other ideas - -## Quick-Dev - -Use `quick-dev` for flexible development with game-specific considerations. - -### When to Use - -- Implementing a feature from a tech-spec -- Building on a successful prototype -- Making changes that don't need full story workflow -- Quick fixes and improvements - -### Workflow Modes - -**Mode A: Tech-Spec Driven** -``` -quick-dev tech-spec-combat.md -``` - -**Mode B: Direct Instructions** -``` -quick-dev implement double-jump for the player -``` - -**Mode C: From Prototype** -``` -quick-dev from the grappling hook prototype -``` - -### Game-Specific Checks - -Quick-dev includes automatic consideration of: -- **Performance** — No allocations in hot paths, object pooling -- **Feel** — Input responsiveness, visual/audio feedback -- **Integration** — Save/load, multiplayer sync, platform testing - -### Complexity Routing - -| Signals | Recommendation | -|---------|----------------| -| Single mechanic, bug fix, tweak | Execute directly | -| Multiple systems, performance-critical | Plan first (tech-spec) | -| Platform/system level work | Use full BMGD workflow | - -## Choosing Between Quick-Flows - -| Scenario | Use | -|----------|-----| -| "Will this be fun?" | `quick-prototype` | -| "How should this feel?" | `quick-prototype` | -| "Build this feature" | `quick-dev` | -| "Fix this bug" | `quick-dev` | -| "Test then build" | `quick-prototype` → `quick-dev` | - -## Flow Comparison - -``` -Full BMGD Flow: -Brief → GDD → Architecture → Sprint Planning → Stories → Implementation - -Quick-Flow: -Idea → Quick-Prototype → Quick-Dev → Done -``` - -## Checklists - -**Quick-Prototype:** -- [ ] Prototype scope defined -- [ ] Success criteria established (2-3 items) -- [ ] Minimum viable code written -- [ ] Placeholder assets used -- [ ] Each criterion evaluated -- [ ] Decision made (develop/iterate/archive) - -**Quick-Dev:** -- [ ] Context loaded (spec, prototype, or guidance) -- [ ] Files to modify identified -- [ ] All tasks completed -- [ ] No allocations in hot paths -- [ ] Game runs without errors -- [ ] Manual playtest completed - -## Tips - -- **Timebox prototypes** — Set a limit (e.g., 2 hours). If it's not working, step back -- **Embrace programmer art** — Focus on feel, not visuals -- **Test on target hardware** — What feels right on dev machine might not on target -- **Document learnings** — Even failed prototypes teach something -- **Know when to graduate** — If quick-dev keeps expanding scope, create proper stories diff --git a/docs/how-to/workflows/conduct-research.md b/docs/how-to/workflows/conduct-research.md deleted file mode 100644 index e3300bca..00000000 --- a/docs/how-to/workflows/conduct-research.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: "How to Conduct Research" -description: How to conduct market, technical, and competitive research using BMad Method ---- - -Use the `research` workflow to perform comprehensive multi-type research for validating ideas, understanding markets, and making informed decisions. - -## When to Use This - -- Need market viability validation -- Choosing frameworks or platforms -- Understanding competitive landscape -- Need user understanding -- Understanding domain or industry -- Need deeper AI-assisted research - -:::note[Prerequisites] -- BMad Method installed -- Analyst agent available -::: - -## Steps - -### 1. Load the Analyst Agent - -Start a fresh chat and load the Analyst agent. - -### 2. Run the Research Workflow - -``` -*research -``` - -### 3. Choose Research Type - -Select the type of research you need: - -| Type | Purpose | Use When | -|------|---------|----------| -| **market** | TAM/SAM/SOM, competitive analysis | Need market viability validation | -| **technical** | Technology evaluation, ADRs | Choosing frameworks/platforms | -| **competitive** | Deep competitor analysis | Understanding competitive landscape | -| **user** | Customer insights, personas, JTBD | Need user understanding | -| **domain** | Industry deep dives, trends | Understanding domain/industry | -| **deep_prompt** | Generate AI research prompts | Need deeper AI-assisted research | - -### 4. Provide Context - -Give the agent details about what you're researching: - -- "SaaS project management tool" -- "React vs Vue for our dashboard" -- "Fintech compliance requirements" - -### 5. Set Research Depth - -Choose your depth level: - -- **Quick** — Fast overview -- **Standard** — Balanced depth -- **Comprehensive** — Deep analysis - -## What You Get - -Research output varies by type: - -**Market Research:** -- TAM/SAM/SOM analysis -- Top competitors -- Positioning recommendation - -**Technical Research:** -- Comparison matrix -- Trade-off analysis -- Recommendations with rationale - -## Key Features - -- Real-time web research -- Multiple analytical frameworks (Porter's Five Forces, SWOT, Technology Adoption Lifecycle) -- Platform-specific optimization for deep_prompt type -- Configurable research depth - -## Tips - -- **Use market research early** — Validates new product ideas -- **Technical research helps architecture** — Inform ADRs with data -- **Competitive research informs positioning** — Differentiate your product -- **Domain research for specialized industries** — Fintech, healthcare, etc. - -## Next Steps - -After research: - -1. **Product Brief** — Capture strategic vision informed by research -2. **PRD** — Use findings as context for requirements -3. **Architecture** — Use technical research in ADRs diff --git a/docs/how-to/workflows/create-architecture.md b/docs/how-to/workflows/create-architecture.md deleted file mode 100644 index 6ede529c..00000000 --- a/docs/how-to/workflows/create-architecture.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: "How to Create Architecture" -description: How to create system architecture using the BMad Method ---- - -Use the `architecture` workflow to make technical decisions explicit and prevent agent conflicts during implementation. - -## When to Use This - -- Multi-epic projects (BMad Method, Enterprise) -- Cross-cutting technical concerns -- Multiple agents implementing different parts -- Integration complexity exists -- Technology choices need alignment - -## When to Skip This - -- Quick Flow (simple changes) -- BMad Method Simple with straightforward tech stack -- Single epic with clear technical approach - -:::note[Prerequisites] -- BMad Method installed -- Architect agent available -- PRD completed -::: - -## Steps - -### 1. Load the Architect Agent - -Start a fresh chat and load the Architect agent. - -### 2. Run the Architecture Workflow - -``` -*create-architecture -``` - -### 3. Engage in Discovery - -This is NOT a template filler. The architecture workflow: - -1. **Discovers** technical needs through conversation -2. **Proposes** architectural options with trade-offs -3. **Documents** decisions that prevent agent conflicts -4. **Focuses** on decision points, not exhaustive documentation - -### 4. Document Key Decisions - -Work with the agent to create Architecture Decision Records (ADRs) for significant choices. - -### 5. Review the Architecture - -The agent produces a decision-focused architecture document. - -## What You Get - -An `architecture.md` document containing: - -1. **Architecture Overview** — System context, principles, style -2. **System Architecture** — High-level diagram, component interactions -3. **Data Architecture** — Database design, state management, caching -4. **API Architecture** — API style (REST/GraphQL/gRPC), auth, versioning -5. **Frontend Architecture** — Framework, state management, components -6. **Integration Architecture** — Third-party integrations, messaging -7. **Security Architecture** — Auth/authorization, data protection -8. **Deployment Architecture** — CI/CD, environments, monitoring -9. **ADRs** — Key decisions with context, options, rationale -10. **FR/NFR-Specific Guidance** — Technical approach per requirement -11. **Standards and Conventions** — Directory structure, naming, testing - -## ADR Format - -```markdown -## ADR-001: Use GraphQL for All APIs - -**Status:** Accepted | **Date:** 2025-11-02 - -**Context:** PRD requires flexible querying across multiple epics - -**Decision:** Use GraphQL for all client-server communication - -**Options Considered:** -1. REST - Familiar but requires multiple endpoints -2. GraphQL - Flexible querying, learning curve -3. gRPC - High performance, poor browser support - -**Rationale:** -- PRD requires flexible data fetching (Epic 1, 3) -- Mobile app needs bandwidth optimization (Epic 2) -- Team has GraphQL experience - -**Consequences:** -- Positive: Flexible querying, reduced versioning -- Negative: Caching complexity, N+1 query risk -- Mitigation: Use DataLoader for batching -``` - -## Example - -E-commerce platform produces: -- Monolith + PostgreSQL + Redis + Next.js + GraphQL -- ADRs explaining each choice -- FR/NFR-specific implementation guidance - -## Tips - -- **Focus on decisions that prevent conflicts** — Multiple agents need alignment -- **Use ADRs for every significant choice** — Document the "why" -- **Keep it practical** — Don't over-architect -- **Architecture is living** — Update as you learn - -## Next Steps - -After architecture: - -1. **Create Epics and Stories** — Work breakdown informed by architecture -2. **Implementation Readiness** — Gate check before Phase 4 diff --git a/docs/how-to/workflows/create-epics-and-stories.md b/docs/how-to/workflows/create-epics-and-stories.md deleted file mode 100644 index aa16a812..00000000 --- a/docs/how-to/workflows/create-epics-and-stories.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: "How to Create Epics and Stories" -description: How to break PRD requirements into epics and stories using BMad Method ---- - -Use the `create-epics-and-stories` workflow to transform PRD requirements into bite-sized stories organized into deliverable epics. - -## When to Use This - -- After architecture workflow completes -- When PRD contains FRs/NFRs ready for implementation breakdown -- Before implementation-readiness gate check - -:::note[Prerequisites] -- BMad Method installed -- PM agent available -- PRD completed -- Architecture completed -::: - -## Why After Architecture? - -This workflow runs AFTER architecture because: - -1. **Informed Story Sizing** — Architecture decisions affect story complexity -2. **Dependency Awareness** — Architecture reveals technical dependencies -3. **Technical Feasibility** — Stories can be properly scoped knowing the tech stack -4. **Consistency** — All stories align with documented architectural patterns - -## Steps - -### 1. Load the PM Agent - -Start a fresh chat and load the PM agent. - -### 2. Run the Workflow - -``` -*create-epics-and-stories -``` - -### 3. Provide Context - -Point the agent to: -- Your PRD (FRs/NFRs) -- Your architecture document -- Optional: UX design artifacts - -### 4. Review Epic Breakdown - -The agent organizes requirements into logical epics with user stories. - -### 5. Validate Story Quality - -Ensure each story has: -- Clear acceptance criteria -- Appropriate priority -- Identified dependencies -- Technical notes from architecture - -## What You Get - -Epic files (one per epic) containing: - -1. **Epic objective and scope** -2. **User stories with acceptance criteria** -3. **Story priorities** (P0/P1/P2/P3) -4. **Dependencies between stories** -5. **Technical notes** referencing architecture decisions - -## Example - -E-commerce PRD with FR-001 (User Registration), FR-002 (Product Catalog) produces: - -- **Epic 1: User Management** (3 stories) - - Story 1.1: User registration form - - Story 1.2: Email verification - - Story 1.3: Login/logout - -- **Epic 2: Product Display** (4 stories) - - Story 2.1: Product listing page - - Story 2.2: Product detail page - - Story 2.3: Search functionality - - Story 2.4: Category filtering - -Each story references relevant ADRs from architecture. - -## Story Priority Levels - -| Priority | Meaning | -|----------|---------| -| **P0** | Critical — Must have for MVP | -| **P1** | High — Important for release | -| **P2** | Medium — Nice to have | -| **P3** | Low — Future consideration | - -## Tips - -- **Keep stories small** — Complete in a single session -- **Make criteria testable** — Acceptance criteria should be verifiable -- **Document dependencies clearly** — Know what blocks what -- **Reference architecture** — Include ADR references in technical notes - -## Next Steps - -After creating epics and stories: - -1. **Implementation Readiness** — Validate alignment before Phase 4 -2. **Sprint Planning** — Organize work for implementation diff --git a/docs/how-to/workflows/create-prd.md b/docs/how-to/workflows/create-prd.md deleted file mode 100644 index f2ec0d0b..00000000 --- a/docs/how-to/workflows/create-prd.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "How to Create a PRD" -description: How to create a Product Requirements Document using the BMad Method ---- - -Use the `prd` workflow to create a strategic Product Requirements Document with Functional Requirements (FRs) and Non-Functional Requirements (NFRs). - -## When to Use This - -- Medium to large feature sets -- Multi-screen user experiences -- Complex business logic -- Multiple system integrations -- Phased delivery required - -:::note[Prerequisites] -- BMad Method installed -- PM agent available -- Optional: Product brief from Phase 1 -::: - -## Steps - -### 1. Load the PM Agent - -Start a fresh chat and load the PM agent. - -### 2. Run the PRD Workflow - -``` -*create-prd -``` - -### 3. Provide Context - -The workflow will: -- Load any existing product brief -- Ask about your project scope -- Gather requirements through conversation - -### 4. Define Requirements - -Work with the agent to define: -- Functional Requirements (FRs) — What the system should do -- Non-Functional Requirements (NFRs) — How well it should do it - -### 5. Review the PRD - -The agent produces a comprehensive PRD scaled to your project. - -## What You Get - -A `PRD.md` document containing: - -- Executive summary -- Problem statement -- User personas -- Functional requirements (FRs) -- Non-functional requirements (NFRs) -- Success metrics -- Risks and assumptions - -## Scale-Adaptive Structure - -The PRD adapts to your project complexity: - -| Scale | Pages | Focus | -|-------|-------|-------| -| **Light** | 10-15 | Focused FRs/NFRs, simplified analysis | -| **Standard** | 20-30 | Comprehensive FRs/NFRs, thorough analysis | -| **Comprehensive** | 30-50+ | Extensive FRs/NFRs, multi-phase, stakeholder analysis | - -## Example - -E-commerce checkout → PRD with: -- 15 FRs (user account, cart management, payment flow) -- 8 NFRs (performance, security, scalability) - -## Tips - -- **Do Product Brief first** — Run product-brief from Phase 1 for better results -- **Focus on "What" not "How"** — Planning defines what to build and why. Leave how (technical design) to Phase 3 -- **Document-Project first for Brownfield** — Always run `document-project` before planning brownfield projects. AI agents need existing codebase context - -## Next Steps - -After PRD: - -1. **Create UX Design** (optional) — If UX is critical -2. **Create Architecture** — Technical design -3. **Create Epics and Stories** — After architecture diff --git a/docs/how-to/workflows/create-product-brief.md b/docs/how-to/workflows/create-product-brief.md deleted file mode 100644 index a45ee119..00000000 --- a/docs/how-to/workflows/create-product-brief.md +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: "How to Create a Product Brief" -description: How to create a product brief using the BMad Method ---- - -Use the `product-brief` workflow to define product vision and strategy through an interactive process. - -## When to Use This - -- Starting new product or major feature initiative -- Aligning stakeholders before detailed planning -- Transitioning from exploration to strategy -- Need executive-level product documentation - -:::note[Prerequisites] -- BMad Method installed -- Analyst agent available -- Optional: Research documents from previous workflows -::: - -## Steps - -### 1. Load the Analyst Agent - -Start a fresh chat and load the Analyst agent. - -### 2. Run the Product Brief Workflow - -``` -*product-brief -``` - -### 3. Answer the Interactive Questions - -The workflow guides you through strategic product vision definition: - -- What problem are you solving? -- Who are your target users? -- What makes this solution different? -- What's the MVP scope? - -### 4. Review and Refine - -The agent will draft sections and let you refine them interactively. - -## What You Get - -The `product-brief.md` document includes: - -- **Executive summary** — High-level overview -- **Problem statement** — With evidence -- **Proposed solution** — And differentiators -- **Target users** — Segmented -- **MVP scope** — Ruthlessly defined -- **Financial impact** — And ROI -- **Strategic alignment** — With business goals -- **Risks and open questions** — Documented upfront - -## Integration with Other Workflows - -The product brief feeds directly into the PRD workflow: - -| Analysis Output | Planning Input | -|-----------------|----------------| -| product-brief.md | **prd** workflow | -| market-research.md | **prd** context | -| technical-research.md | **architecture** (Phase 3) | - -Planning workflows automatically load the product brief if it exists. - -## Common Patterns - -**Greenfield Software (Full Analysis):** - -``` -1. brainstorm-project - explore approaches -2. research (market/technical/domain) - validate viability -3. product-brief - capture strategic vision -4. → Phase 2: prd -``` - -**Skip Analysis (Clear Requirements):** - -``` -→ Phase 2: prd or tech-spec directly -``` - -## Tips - -- **Be specific about the problem** — Vague problems lead to vague solutions -- **Ruthlessly prioritize MVP scope** — Less is more -- **Document assumptions and risks** — Surface unknowns early -- **Use research findings as evidence** — Back up claims with data -- **Recommended for greenfield projects** — Sets strategic foundation diff --git a/docs/how-to/workflows/create-story.md b/docs/how-to/workflows/create-story.md deleted file mode 100644 index 34380a9a..00000000 --- a/docs/how-to/workflows/create-story.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "How to Create a Story" -description: How to create implementation-ready stories from epic backlog ---- - -Use the `create-story` workflow to prepare the next story from the epic backlog for implementation. - -## When to Use This - -- Before implementing each story -- When moving to the next story in an epic -- After sprint-planning has been run - -:::note[Prerequisites] -- BMad Method installed -- SM (Scrum Master) agent available -- Sprint-status.yaml created by sprint-planning -- Architecture and PRD available for context -::: - -## Steps - -### 1. Load the SM Agent - -Start a fresh chat and load the SM (Scrum Master) agent. - -### 2. Run the Workflow - -``` -*create-story -``` - -### 3. Specify the Story - -The agent will: -- Read the sprint-status.yaml -- Identify the next story to work on -- Or let you specify a particular story - -### 4. Review the Story File - -The agent creates a comprehensive story file ready for development. - -## What You Get - -A `story-[slug].md` file containing: - -- Story objective and scope -- Acceptance criteria (specific, testable) -- Technical implementation notes -- References to architecture decisions -- Dependencies on other stories -- Definition of Done - -## Story Content Sources - -The create-story workflow pulls from: - -- **PRD** — Requirements and acceptance criteria -- **Architecture** — Technical approach and ADRs -- **Epic file** — Story context and dependencies -- **Existing code** — Patterns to follow (brownfield) - -## Example Output - -```markdown -## Objective -Implement email verification flow for new user registrations. - -## Acceptance Criteria -- [ ] User receives verification email within 30 seconds -- [ ] Email contains unique verification link -- [ ] Link expires after 24 hours -- [ ] User can request new verification email - -## Technical Notes -- Use SendGrid API per ADR-003 -- Store verification tokens in Redis per architecture -- Follow existing email template patterns in /templates - -## Dependencies -- Story 1.1 (User Registration) - DONE - -## Definition of Done -- All acceptance criteria pass -- Tests written and passing -- Code review approved -``` - -## Tips - -- **Complete one story before creating the next** — Focus on finishing -- **Ensure dependencies are DONE** — Don't start blocked stories -- **Review technical notes** — Align with architecture -- **Use the story file as context** — Pass to dev-story workflow - -## Next Steps - -After creating a story: - -1. **Implement Story** — Run dev-story with the DEV agent -2. **Code Review** — Run code-review after implementation diff --git a/docs/how-to/workflows/create-ux-design.md b/docs/how-to/workflows/create-ux-design.md deleted file mode 100644 index 810e934f..00000000 --- a/docs/how-to/workflows/create-ux-design.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: "How to Create a UX Design" -description: How to create UX specifications using the BMad Method ---- - -Use the `create-ux-design` workflow to create UX specifications for projects where user experience is a primary differentiator. - -## When to Use This - -- UX is primary competitive advantage -- Complex user workflows needing design thinking -- Innovative interaction patterns -- Design system creation -- Accessibility-critical experiences - -## When to Skip This - -- Simple CRUD interfaces -- Internal tools with standard patterns -- Changes to existing screens you're happy with -- Quick Flow projects - -:::note[Prerequisites] -- BMad Method installed -- UX Designer agent available -- PRD completed -::: - -## Steps - -### 1. Load the UX Designer Agent - -Start a fresh chat and load the UX Designer agent. - -### 2. Run the UX Design Workflow - -``` -*create-ux-design -``` - -### 3. Provide Context - -Point the agent to your PRD and describe: -- Key user journeys -- UX priorities -- Any existing design patterns - -### 4. Collaborate on Design - -The workflow uses a collaborative approach: - -1. **Visual exploration** — Generate multiple options -2. **Informed decisions** — Evaluate with user needs -3. **Collaborative design** — Refine iteratively -4. **Living documentation** — Evolves with project - -### 5. Review the UX Spec - -The agent produces comprehensive UX documentation. - -## What You Get - -The `ux-spec.md` document includes: - -- User journeys -- Wireframes and mockups -- Interaction specifications -- Design system (components, patterns, tokens) -- Epic breakdown (UX stories) - -## Example - -Dashboard redesign produces: -- Card-based layout with split-pane toggle -- 5 card components -- 12 color tokens -- Responsive grid -- 3 epics (Layout, Visualization, Accessibility) - -## Integration - -The UX spec feeds into: -- PRD updates -- Epic and story creation -- Architecture decisions (Phase 3) - -## Tips - -- **Focus on user problems first** — Solutions come second -- **Generate multiple options** — Don't settle on the first idea -- **Consider accessibility from the start** — Not an afterthought -- **Document component reusability** — Build a system, not just screens - -## Next Steps - -After UX design: - -1. **Update PRD** — Incorporate UX findings -2. **Create Architecture** — Technical design informed by UX -3. **Create Epics and Stories** — Include UX-specific stories diff --git a/docs/how-to/workflows/implement-story.md b/docs/how-to/workflows/implement-story.md deleted file mode 100644 index c243a4ae..00000000 --- a/docs/how-to/workflows/implement-story.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: "How to Implement a Story" -description: How to implement a story using the dev-story workflow ---- - -Use the `dev-story` workflow to implement a story with tests following the architecture and conventions. - -## When to Use This - -- After create-story has prepared the story file -- When ready to write code for a story -- Story dependencies are marked DONE - -:::note[Prerequisites] -- BMad Method installed -- DEV agent available -- Story file created by create-story -- Architecture and tech-spec available for context -::: - -## Steps - -### 1. Load the DEV Agent - -Start a fresh chat and load the DEV agent. - -### 2. Run the Workflow - -``` -*dev-story -``` - -### 3. Provide Story Context - -Point the agent to the story file created by create-story. - -### 4. Implement with Guidance - -The DEV agent: -- Reads the story file and acceptance criteria -- References architecture decisions -- Follows existing code patterns -- Implements with tests - -### 5. Complete Implementation - -Work with the agent until all acceptance criteria are met. - -## What Happens - -The dev-story workflow: - -1. **Reads context** — Story file, architecture, existing patterns -2. **Plans implementation** — Identifies files to create/modify -3. **Writes code** — Following conventions and patterns -4. **Writes tests** — Unit, integration, or E2E as appropriate -5. **Validates** — Runs tests and checks acceptance criteria - -## Key Principles - -**One Story at a Time** — Complete each story's full lifecycle before starting the next. This prevents context switching and ensures quality. - -**Follow Architecture** — The DEV agent references ADRs for technology decisions, standards for naming and structure, and existing patterns in the codebase. - -**Write Tests** — Every story includes appropriate tests: unit tests for business logic, integration tests for API endpoints, E2E tests for critical flows. - -## After Implementation - -1. **Update sprint-status.yaml** — Mark story as READY FOR REVIEW -2. **Run code-review** — Quality assurance -3. **Address feedback** — If code review finds issues -4. **Mark DONE** — After code review passes - -## Tips - -- **Keep the story file open** — Reference it during implementation -- **Ask the agent to explain decisions** — Understand the approach -- **Run tests frequently** — Catch issues early -- **Don't skip tests** — Even for "simple" changes - -## Troubleshooting - -**Story needs significant changes mid-implementation?** -Run `correct-course` to analyze impact and route appropriately. - -**Can I work on multiple stories in parallel?** -Not recommended. Complete one story's full lifecycle first. - -**What if implementation reveals the story is too large?** -Split the story and document the change. - -## Next Steps - -After implementing a story: - -1. **Code Review** — Run code-review with the DEV agent -2. **Create Next Story** — Run create-story with the SM agent diff --git a/docs/how-to/workflows/quick-spec.md b/docs/how-to/workflows/quick-spec.md deleted file mode 100644 index 936dbdc3..00000000 --- a/docs/how-to/workflows/quick-spec.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: "How to Use Quick Spec" -description: How to create a technical specification using Quick Spec workflow ---- - -Use the `quick-spec` workflow for Quick Flow projects to go directly from idea to implementation-ready specification. - -## When to Use This - -- Bug fixes and small enhancements -- Small features with clear scope (1-15 stories) -- Rapid prototyping -- Adding to existing brownfield codebase -- Quick Flow track projects - -:::note[Prerequisites] -- BMad Method installed -- PM agent or Quick Flow Solo Dev agent available -- Project directory (can be empty for greenfield) -::: - -## Steps - -### 1. Load the PM Agent - -Start a fresh chat and load the PM agent (or Quick Flow Solo Dev agent). - -### 2. Run the Tech Spec Workflow - -``` -*quick-spec -``` - -Or simply describe what you want to build: - -``` -I want to fix the login validation bug -``` - -### 3. Answer Discovery Questions - -The workflow will ask: -- What problem are you solving? -- What's the scope of the change? -- Any specific constraints? - -### 4. Review Detected Context - -For brownfield projects, the agent will: -- Detect your project stack -- Analyze existing code patterns -- Detect test frameworks -- Ask: "Should I follow these existing conventions?" - -### 5. Get Your Tech Spec - -The agent generates a comprehensive tech-spec with ready-to-implement stories. - -## What You Get - -**tech-spec.md:** -- Problem statement and solution -- Detected framework versions and dependencies -- Brownfield code patterns (if applicable) -- Existing test patterns to follow -- Specific file paths to modify -- Complete implementation guidance - -**Story Files:** -- Single changes: `story-[slug].md` -- Small features: `epics.md` + `story-[epic-slug]-1.md`, etc. - -## Example: Bug Fix - -**You:** "I want to fix the login validation bug that allows empty passwords" - -**Agent:** -1. Asks clarifying questions about the issue -2. Detects your Node.js stack (Express 4.18.2, Jest for testing) -3. Analyzes existing UserService code patterns -4. Asks: "Should I follow your existing conventions?" → Yes -5. Generates tech-spec.md with specific file paths -6. Creates story-login-fix.md - -## Example: Small Feature - -**You:** "I want to add OAuth social login (Google, GitHub)" - -**Agent:** -1. Asks about feature scope -2. Detects your stack (Next.js 13.4, NextAuth.js already installed!) -3. Analyzes existing auth patterns -4. Confirms conventions -5. Generates: - - tech-spec.md (comprehensive implementation guide) - - epics.md (OAuth Integration epic) - - story-oauth-1.md (Backend OAuth setup) - - story-oauth-2.md (Frontend login buttons) - -## Implementing After Tech Spec - -```bash -# Single change: -# Load DEV agent and run dev-story - -# Multi-story feature: -# Optional: Load SM agent and run sprint-planning -# Then: Load DEV agent and run dev-story for each story -``` - -## Tips - -- **Be specific in discovery** — "Fix email validation in UserService to allow plus-addressing" beats "Fix validation bug" -- **Trust convention detection** — If it detects your patterns correctly, say yes! It's faster than establishing new conventions -- **Keep single changes atomic** — If your "single change" needs 3+ files, it might be a multi-story feature. Let the workflow guide you - -## Next Steps - -After tech spec: - -1. **Implement Story** — Run dev-story with the DEV agent -2. **Sprint Planning** — Optional for multi-story features diff --git a/docs/how-to/workflows/run-brainstorming-session.md b/docs/how-to/workflows/run-brainstorming-session.md deleted file mode 100644 index b05b821c..00000000 --- a/docs/how-to/workflows/run-brainstorming-session.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: "How to Run a Brainstorming Session" -description: How to run a brainstorming session using the BMad Method ---- - -Use the `brainstorm-project` workflow to explore solution approaches through parallel ideation tracks. - -## When to Use This - -- Very vague or seed kernel of an idea that needs exploration -- Consider alternatives or enhancements to an idea -- See your idea from different angles and viewpoints -- No idea what you want to build, but want to find some inspiration - -:::note[Prerequisites] -- BMad Method installed -- Analyst agent available -::: - -## Steps - -### 1. Load the Analyst Agent - -Start a fresh chat and load the Analyst agent. - -### 2. Run the Brainstorm Workflow - -``` -*brainstorm-project -``` - -### 3. Describe Your Idea - -Tell the agent about your project idea, even if it's vague: - -- "I want to build something that helps developers manage their context" -- "I have a game idea about resource management" -- "I need a tool for my team but I'm not sure what exactly" - -### 4. Explore the Tracks - -The workflow generates solution approaches through parallel ideation tracks: - -- **Architecture track** — Technical approaches and patterns -- **UX track** — User experience possibilities -- **Integration track** — How it connects with other systems -- **Value track** — Business value and differentiation - -### 5. Evaluate Options - -Review the generated options with rationale for each approach. - -## What You Get - -- Multiple solution approaches with trade-offs -- Different architectural options -- UX and integration considerations -- Clear rationale for each direction - -## Tips - -- **Don't worry about having a fully formed idea** — Vague is fine -- **Let the agent guide exploration** — Follow the prompts -- **Consider multiple tracks** — Don't settle on the first option -- **Use outputs as input for product-brief** — Build on brainstorming results - -## Next Steps - -After brainstorming: - -1. **Research** — Validate ideas with market/technical research -2. **Product Brief** — Capture strategic vision -3. **PRD** — Move to formal planning diff --git a/docs/how-to/workflows/run-code-review.md b/docs/how-to/workflows/run-code-review.md deleted file mode 100644 index ea6e2c85..00000000 --- a/docs/how-to/workflows/run-code-review.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: "How to Run Code Review" -description: How to run code review for quality assurance ---- - -Use the `code-review` workflow to perform a thorough quality review of implemented code. - -## When to Use This - -- After dev-story completes implementation -- Before marking a story as DONE -- Every story goes through code review — no exceptions - -:::note[Prerequisites] -- BMad Method installed -- DEV agent available -- Story implementation complete -- Tests written and passing -::: - -## Steps - -### 1. Load the DEV Agent - -Start a fresh chat (or continue from dev-story) and load the DEV agent. - -### 2. Run the Workflow - -``` -*code-review -``` - -### 3. Provide Context - -Point the agent to: -- The story file -- Files changed during implementation -- Test files - -### 4. Review Findings - -The agent performs a senior developer code review and reports findings. - -### 5. Address Issues - -If issues are found: -1. Fix issues using dev-story -2. Re-run tests -3. Run code-review again - -## What Gets Reviewed - -| Category | Checks | -|----------|--------| -| **Code Quality** | Clean code, appropriate abstractions, no code smells, proper error handling | -| **Architecture Alignment** | Follows ADRs, consistent with patterns, proper separation of concerns | -| **Testing** | Adequate coverage, meaningful tests, edge cases, follows project patterns | -| **Security** | No hardcoded secrets, input validation, proper auth, no common vulnerabilities | -| **Performance** | No obvious issues, appropriate data structures, efficient queries | - -## Review Outcomes - -**Approved** — Code meets quality standards, tests pass. Mark story as DONE in sprint-status.yaml. - -**Changes Requested** — Issues identified that need fixing. Fix issues in dev-story, then re-run code-review. - -## Quality Gates - -Every story goes through code-review before being marked done. This ensures: - -- Consistent code quality -- Architecture adherence -- Test coverage -- Security review - -## Tips - -- **Don't skip for "simple" changes** — Simple changes can have subtle bugs -- **Address all findings** — Not just critical ones -- **Use findings as learning opportunities** — Improve over time -- **Re-run review after fixes** — Verify issues are resolved - -## Next Steps - -After code review: - -1. **If approved** — Update sprint-status.yaml to mark story DONE -2. **If changes requested** — Fix issues and re-run review -3. **Move to next story** — Run create-story for the next item diff --git a/docs/how-to/workflows/run-implementation-readiness.md b/docs/how-to/workflows/run-implementation-readiness.md deleted file mode 100644 index 8f938f27..00000000 --- a/docs/how-to/workflows/run-implementation-readiness.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -title: "How to Run Implementation Readiness" -description: How to validate planning and solutioning before implementation ---- - -Use the `implementation-readiness` workflow to validate that planning and solutioning are complete and aligned before Phase 4 implementation. - -## When to Use This - -- **Always** before Phase 4 for BMad Method and Enterprise projects -- After create-epics-and-stories workflow completes -- Before sprint-planning workflow -- When stakeholders request readiness check - -## When to Skip This - -- Quick Flow (no solutioning phase) -- BMad Method Simple (no gate check required) - -:::note[Prerequisites] -- BMad Method installed -- Architect agent available -- PRD, Architecture, and Epics completed -::: - -## Steps - -### 1. Load the Architect Agent - -Start a fresh chat and load the Architect agent. - -### 2. Run the Workflow - -``` -*implementation-readiness -``` - -### 3. Let the Agent Validate - -The workflow systematically checks: -- PRD completeness -- Architecture completeness -- Epic/Story completeness -- Alignment between all documents - -### 4. Review the Gate Decision - -The agent produces a gate decision with rationale. - -## Gate Decision Outcomes - -| Decision | Meaning | Action | -|----------|---------|--------| -| **PASS** | All critical criteria met, minor gaps acceptable | Proceed to Phase 4 | -| **CONCERNS** | Some criteria not met but not blockers | Proceed with caution, address gaps in parallel | -| **FAIL** | Critical gaps or contradictions | BLOCK Phase 4, resolve issues first | - -## What Gets Checked - -**PRD/GDD Completeness:** -- Problem statement clear and evidence-based -- Success metrics defined -- User personas identified -- FRs and NFRs complete -- Risks and assumptions documented - -**Architecture Completeness:** -- System, data, API architecture defined -- Key ADRs documented -- Security architecture addressed -- FR/NFR-specific guidance provided -- Standards and conventions defined - -**Epic/Story Completeness:** -- All PRD features mapped to stories -- Stories have acceptance criteria -- Stories prioritized (P0/P1/P2/P3) -- Dependencies identified - -**Alignment Checks:** -- Architecture addresses all PRD FRs/NFRs -- Epics align with architecture decisions -- No contradictions between epics -- Integration points clear - -## What You Get - -An `implementation-readiness.md` document containing: - -1. **Executive Summary** (PASS/CONCERNS/FAIL) -2. **Completeness Assessment** (scores for PRD, Architecture, Epics) -3. **Alignment Assessment** (PRD↔Architecture, Architecture↔Epics) -4. **Quality Assessment** (story quality, dependencies, risks) -5. **Gaps and Recommendations** (critical/minor gaps, remediation) -6. **Gate Decision** with rationale -7. **Next Steps** - -## Example - -E-commerce platform → CONCERNS - -**Gaps identified:** -- Missing security architecture section -- Undefined payment gateway - -**Recommendation:** -- Complete security section -- Add payment gateway ADR - -**Action:** Proceed with caution, address before payment epic. - -## Tips - -- **Run before every Phase 4 start** — It's a valuable checkpoint -- **Take FAIL decisions seriously** — Fix issues first -- **Use CONCERNS as a checklist** — Track parallel work -- **Document why you proceed despite concerns** — Transparency matters - -## Next Steps - -After implementation readiness: - -1. **If PASS** — Run sprint-planning to start Phase 4 -2. **If CONCERNS** — Proceed with documented gaps to address -3. **If FAIL** — Return to relevant workflow to fix issues diff --git a/docs/how-to/workflows/run-sprint-planning.md b/docs/how-to/workflows/run-sprint-planning.md deleted file mode 100644 index ebdc3066..00000000 --- a/docs/how-to/workflows/run-sprint-planning.md +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: "How to Run Sprint Planning" -description: How to initialize sprint tracking for implementation ---- - -Use the `sprint-planning` workflow to initialize the sprint tracking file and organize work for implementation. - -## When to Use This - -- Once at the start of Phase 4 (Implementation) -- After implementation-readiness gate passes -- When starting a new sprint cycle - -:::note[Prerequisites] -- BMad Method installed -- SM (Scrum Master) agent available -- Epic files created from `create-epics-and-stories` -- Implementation-readiness passed (for BMad Method/Enterprise) -::: - -## Steps - -### 1. Load the SM Agent - -Start a fresh chat and load the SM (Scrum Master) agent. - -### 2. Run the Workflow - -``` -*sprint-planning -``` - -### 3. Provide Context - -Point the agent to your epic files created during Phase 3. - -### 4. Review Sprint Organization - -The agent organizes stories into the sprint tracking file. - -## What You Get - -A `sprint-status.yaml` file containing: - -- All epics with their stories -- Story status tracking (TODO, IN PROGRESS, READY FOR REVIEW, DONE) -- Dependencies between stories -- Priority ordering - -## Story Lifecycle States - -| State | Description | -|-------|-------------| -| **TODO** | Story identified but not started | -| **IN PROGRESS** | Story being implemented | -| **READY FOR REVIEW** | Implementation complete, awaiting code review | -| **DONE** | Accepted and complete | - -## Typical Sprint Flow - -**Sprint 0 (Planning Phase):** -- Complete Phases 1-3 -- PRD/GDD + Architecture complete -- Epics+Stories created via create-epics-and-stories - -**Sprint 1+ (Implementation Phase):** - -Start of Phase 4: -1. SM runs `sprint-planning` (once) - -Per Story (repeat until epic complete): -1. SM runs `create-story` -2. DEV runs `dev-story` -3. DEV runs `code-review` -4. Update sprint-status.yaml - -After Epic Complete: -- SM runs `retrospective` -- Move to next epic - -## Tips - -- **Run sprint-planning only once** — At Phase 4 start -- **Use sprint-status during Phase 4** — Check current state anytime -- **Keep sprint-status.yaml as single source of truth** — All status updates go here -- **Update story status after each stage** — Keep it current - -## Next Steps - -After sprint planning: - -1. **Create Story** — Prepare the first story for implementation -2. **Implement Story** — Run dev-story with the DEV agent -3. **Code Review** — Quality assurance after implementation diff --git a/docs/how-to/workflows/run-test-design.md b/docs/how-to/workflows/run-test-design.md deleted file mode 100644 index 2b44fdac..00000000 --- a/docs/how-to/workflows/run-test-design.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: "How to Run Test Design with TEA" -description: How to create comprehensive test plans using TEA's test-design workflow ---- - -Use TEA's `*test-design` workflow to create comprehensive test plans with risk assessment and coverage strategies. - -## When to Use This - -**System-level (Phase 3):** -- After architecture is complete -- Before implementation-readiness gate -- To validate architecture testability - -**Epic-level (Phase 4):** -- At the start of each epic -- Before implementing stories in the epic -- To identify epic-specific testing needs - -:::note[Prerequisites] -- BMad Method installed -- TEA agent available -- For system-level: Architecture document complete -- For epic-level: Epic defined with stories -::: - -## Steps - -### 1. Load the TEA Agent - -Start a fresh chat and load the TEA (Test Architect) agent. - -### 2. Run the Test Design Workflow - -``` -*test-design -``` - -### 3. Specify the Mode - -TEA will ask if you want: - -- **System-level** — For architecture testability review (Phase 3) -- **Epic-level** — For epic-specific test planning (Phase 4) - -### 4. Provide Context - -For system-level: -- Point to your architecture document -- Reference any ADRs (Architecture Decision Records) - -For epic-level: -- Specify which epic you're planning -- Reference the epic file with stories - -### 5. Review the Output - -TEA generates a comprehensive test design document. - -## What You Get - -**System-Level Output (`test-design-system.md`):** -- Testability review of architecture -- ADR → test mapping -- Architecturally Significant Requirements (ASRs) -- Environment needs -- Test infrastructure recommendations - -**Epic-Level Output (`test-design-epic-N.md`):** -- Risk assessment for the epic -- Test priorities -- Coverage plan -- Regression hotspots (for brownfield) -- Integration risks -- Mitigation strategies - -## Test Design for Different Tracks - -| Track | Phase 3 Focus | Phase 4 Focus | -|-------|---------------|---------------| -| **Greenfield** | System-level testability review | Per-epic risk assessment and test plan | -| **Brownfield** | System-level + existing test baseline | Regression hotspots, integration risks | -| **Enterprise** | Compliance-aware testability | Security/performance/compliance focus | - -## Tips - -- **Run system-level right after architecture** — Early testability review -- **Run epic-level at the start of each epic** — Targeted test planning -- **Update if ADRs change** — Keep test design aligned -- **Use output to guide other workflows** — Feeds into `*atdd` and `*automate` - -## Next Steps - -After test design: - -1. **Setup Test Framework** — If not already configured -2. **Implementation Readiness** — System-level feeds into gate check -3. **Story Implementation** — Epic-level guides testing during dev diff --git a/docs/how-to/workflows/setup-party-mode.md b/docs/how-to/workflows/setup-party-mode.md deleted file mode 100644 index ba6fc5d0..00000000 --- a/docs/how-to/workflows/setup-party-mode.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: "How to Set Up Party Mode" -description: How to set up and use Party Mode for multi-agent collaboration ---- - -Use Party Mode to orchestrate dynamic multi-agent conversations with your entire BMad team. - -## When to Use This - -- Exploring complex topics that benefit from diverse expert perspectives -- Brainstorming with agents who can build on each other's ideas -- Getting comprehensive views across multiple domains -- Strategic decisions with trade-offs - -:::note[Prerequisites] -- BMad Method installed with multiple agents -- Any agent loaded that supports party mode -::: - -## Steps - -### 1. Load Any Agent - -Start with any agent that supports party mode (most do). - -### 2. Start Party Mode - -``` -*party-mode -``` - -Or use the full path: -``` -/bmad:core:workflows:party-mode -``` - -### 3. Introduce Your Topic - -Present a topic or question for the group to discuss: - -``` -I'm trying to decide between a monolithic architecture -and microservices for our new platform. -``` - -### 4. Engage with the Discussion - -The facilitator will: -- Select 2-3 most relevant agents based on expertise -- Let agents respond in character -- Enable natural cross-talk and debate -- Continue until you choose to exit - -### 5. Exit When Ready - -Type "exit" or "done" to conclude the session. Participating agents will say personalized farewells. - -## What Happens - -1. **Agent Roster** — Party Mode loads your complete agent roster -2. **Introduction** — Available team members are introduced -3. **Topic Analysis** — The facilitator analyzes your topic -4. **Agent Selection** — 2-3 most relevant agents are selected -5. **Discussion** — Agents respond, reference each other, engage in cross-talk -6. **Exit** — Session concludes with farewells - -## Example Party Compositions - -| Topic | Typical Agents | -| ---------------------- | ----------------------------------------------------- | -| **Product Strategy** | PM + Innovation Strategist + Analyst | -| **Technical Design** | Architect + Creative Problem Solver + Game Architect | -| **User Experience** | UX Designer + Design Thinking Coach + Storyteller | -| **Quality Assessment** | TEA + DEV + Architect | - -## Key Features - -- **Intelligent agent selection** — Selects based on expertise needed -- **Authentic personalities** — Each agent maintains their unique voice -- **Natural cross-talk** — Agents reference and build on each other -- **Graceful exit** — Personalized farewells - -## Tips - -- **Be specific about your topic** — Better agent selection -- **Let the conversation flow** — Don't over-direct -- **Ask follow-up questions** — Go deeper on interesting points -- **Take notes on key insights** — Capture valuable perspectives -- **Use for strategic decisions** — Not routine tasks diff --git a/docs/index.md b/docs/index.md index abc96030..3dcf5cd0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -10,15 +10,10 @@ If you're comfortable working with AI coding assistants like Claude, Cursor, or ## New Here? Start with a Tutorial -The fastest way to understand BMad is to try it. Choose a tutorial to walk through your first project in about 10 minutes. +The fastest way to understand BMad is to try it. -- **[Get Started with BMad](/docs/tutorials/getting-started/getting-started-bmadv6.md)** — Latest features, still in active development - -:::tip[Already familiar with AI-assisted development?] -Feel free to skip around. Use the sidebar to jump to any topic, or check out [What Are Agents?](/docs/explanation/core-concepts/what-are-agents.md) to understand how BMad organizes its AI personas. -::: - ---- +- **[Get Started with BMad](/docs/tutorials/getting-started.md)** — Install and understand how BMad works +- **[Workflow Map](/docs/reference/workflow-map.md)** — Visual overview of BMM phases, workflows, and context management. ## How to Use These Docs @@ -58,6 +53,4 @@ Get help, share what you're building, or contribute to BMad: ## Next Step -Ready to dive in? Pick a tutorial and start building. - -- **[Get Started with BMad](/docs/tutorials/getting-started/getting-started-bmadv6.md)** — Explore the latest features +Ready to dive in? **[Get Started with BMad](/docs/tutorials/getting-started.md)** and build your first project. diff --git a/docs/reference/agents/index.md b/docs/reference/agents/index.md deleted file mode 100644 index 409f161c..00000000 --- a/docs/reference/agents/index.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: "Agents Reference" -description: Complete reference for BMad Method agents and their commands ---- - -Quick reference of all BMad Method agents and their available commands. - -:::tip[Universal Commands] -All agents support: `*menu` (redisplay options), `*dismiss` (dismiss agent), and `*party-mode` (multi-agent collaboration). -::: - -## Analyst (Mary) - -Business analysis and research. - -**Commands:** -- `*workflow-status` — Get workflow status or initialize tracking -- `*brainstorm-project` — Guided brainstorming session -- `*research` — Market, domain, competitive, or technical research -- `*product-brief` — Create a product brief (input for PRD) -- `*document-project` — Document existing brownfield projects - -## PM (John) - -Product requirements and planning. - -**Commands:** -- `*workflow-status` — Get workflow status or initialize tracking -- `*create-prd` — Create Product Requirements Document -- `*create-epics-and-stories` — Break PRD into epics and user stories (after Architecture) -- `*implementation-readiness` — Validate PRD, UX, Architecture, Epics alignment -- `*correct-course` — Course correction during implementation - -## Architect (Winston) - -System architecture and technical design. - -**Commands:** -- `*workflow-status` — Get workflow status or initialize tracking -- `*create-architecture` — Create architecture document to guide development -- `*implementation-readiness` — Validate PRD, UX, Architecture, Epics alignment -- `*create-excalidraw-diagram` — System architecture or technical diagrams -- `*create-excalidraw-dataflow` — Data flow diagrams - -## SM (Bob) - -Sprint planning and story preparation. - -**Commands:** -- `*sprint-planning` — Generate sprint-status.yaml from epic files -- `*create-story` — Create story from epic (prep for development) -- `*validate-create-story` — Validate story quality -- `*epic-retrospective` — Team retrospective after epic completion -- `*correct-course` — Course correction during implementation - -## DEV (Amelia) - -Story implementation and code review. - -**Commands:** -- `*dev-story` — Execute story workflow (implementation with tests) -- `*code-review` — Thorough code review - -## Quick Flow Solo Dev (Barry) - -Fast solo development without handoffs. - -**Commands:** -- `*quick-spec` — Architect technical spec with implementation-ready stories -- `*quick-dev` — Implement tech spec end-to-end solo -- `*code-review` — Review and improve code - -## TEA (Murat) - -Test architecture and quality strategy. - -**Commands:** -- `*framework` — Initialize production-ready test framework -- `*atdd` — Generate E2E tests first (before implementation) -- `*automate` — Comprehensive test automation -- `*test-design` — Create comprehensive test scenarios -- `*trace` — Map requirements to tests, quality gate decision -- `*nfr-assess` — Validate non-functional requirements -- `*ci` — Scaffold CI/CD quality pipeline -- `*test-review` — Review test quality - -## UX Designer (Sally) - -User experience and UI design. - -**Commands:** -- `*create-ux-design` — Generate UX design and UI plan from PRD -- `*validate-design` — Validate UX specification and design artifacts -- `*create-excalidraw-wireframe` — Create website or app wireframe - -## Technical Writer (Paige) - -Technical documentation and diagrams. - -**Commands:** -- `*document-project` — Comprehensive project documentation -- `*generate-mermaid` — Generate Mermaid diagrams -- `*create-excalidraw-flowchart` — Process and logic flow visualizations -- `*create-excalidraw-diagram` — System architecture or technical diagrams -- `*create-excalidraw-dataflow` — Data flow visualizations -- `*validate-doc` — Review documentation against standards -- `*improve-readme` — Review and improve README files -- `*explain-concept` — Create clear technical explanations -- `*standards-guide` — Show BMad documentation standards diff --git a/docs/reference/configuration/core-tasks.md b/docs/reference/configuration/core-tasks.md deleted file mode 100644 index fa90e484..00000000 --- a/docs/reference/configuration/core-tasks.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "Core Tasks" ---- - -Reusable task definitions that can be invoked by any BMad module, workflow, or agent. - -## Contents - -- [Index Docs](#index-docs) — Generate directory index files -- [Adversarial Review](#adversarial-review) — Critical content review -- [Shard Document](#shard-document) — Split large documents into sections - -## Index Docs - -**Generates or updates an index.md file documenting all files in a specified directory.** - -**Use it when:** -- You need navigable documentation for a folder of markdown files -- You want to maintain an updated index as content evolves - -**How it works:** -1. Scan the target directory for files and subdirectories -2. Group content by type, purpose, or location -3. Read each file to generate brief (3-10 word) descriptions -4. Create or update index.md with organized listings - -**Output:** Markdown index with sections for Files and Subdirectories, each entry containing a relative link and description. - -## Adversarial Review - -**Performs a cynical, skeptical review of any content to identify issues and improvement opportunities.** - -**Use it when:** -- Reviewing code diffs before merging -- Finalizing specifications or user stories -- Releasing documentation -- Any artifact needs a critical eye before completion - -**How it works:** -1. Load the content to review (diff, branch, document, etc.) -2. Perform adversarial analysis — assume problems exist -3. Find at least ten issues to fix or improve -4. Output findings as a markdown list - -:::note[Unbiased Review] -This task runs in a separate subagent with read access but no prior context, ensuring an unbiased review. -::: - -## Shard Document - -**Splits large markdown documents into smaller files based on level 2 (`##`) sections.** - -**Use it when:** -- A markdown file has grown too large to work with effectively -- You want to break a monolithic document into manageable sections -- Individual sections need to be edited independently - -**How it works:** -1. Confirm source document path (must be markdown) -2. Determine destination folder (defaults to folder named after document) -3. Execute sharding via `npx @kayvan/markdown-tree-parser` -4. Verify output files and index.md were created -5. Handle original document — delete, move to archive, or keep - -:::caution[Original File] -After sharding, delete or archive the original to avoid confusion. Updates should happen in the sharded files only. -::: diff --git a/docs/reference/configuration/global-config.md b/docs/reference/configuration/global-config.md deleted file mode 100644 index 5a2f243d..00000000 --- a/docs/reference/configuration/global-config.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: "Global Inheritable Config" ---- - -Configuration values defined in the Core Module that all other modules inherit by default. - -## Core Config Values - -These values are set during installation and recorded to the core `module.yaml`: - -| Config Key | Default | Description | -|------------|---------|-------------| -| `user_name` | System username | User's display name | -| `communication_language` | `english` | Language for agent communication | -| `document_output_language` | `english` | Language for generated documents | -| `output_folder` | `_bmad-output` | Directory for workflow outputs | - -## Inheritance Behavior - -All installed modules automatically clone these values into their own config. Modules can: - -- **Accept defaults** — Use core values as-is (recommended) -- **Override values** — Replace with module-specific settings -- **Extend values** — Build on core values with additional paths - -:::tip[Extending Config] -Use `{output_folder}` to reference the core value. Example: BMad Method defines `planning_artifacts` as `{output_folder}/planning-artifacts`, automatically inheriting whatever output folder the user configured. -::: diff --git a/docs/reference/workflow-map.md b/docs/reference/workflow-map.md new file mode 100644 index 00000000..22b97299 --- /dev/null +++ b/docs/reference/workflow-map.md @@ -0,0 +1,83 @@ +--- +title: "Workflow Map" +description: Visual reference for BMad Method workflow phases and outputs +--- + +The BMad Method (BMM) is a module in the BMad Ecosystem, targeted at following the best practices of context engineering and planning. AI agents work best with clear, structured context. The BMM system builds that context progressively across 4 distinct phases - each phase, and multiple workflows optionally within each phase, produce documents that inform the next, so agents always know what to build and why. + +The rationale and concepts come from agile methodologies that have been used across the industry with great success as a mental framework. + +If at anytime you are unsure what to do, the `/bmad-help` command will help you stay on track or know what to do next. You can always refer to this for reference also - but /bmad-help is fully interactive and much quicker if you have already installed the BMadMethod. Additionally, if you are using different modules that have extended the BMad Method or added other complimentary non extension modules - the /bmad-help evolves to know all that is available to give you the best in the moment advice. + +Final important note: Every workflow below can be run directly with your tool of choice via slash command or by loading an agent first and using the entry from the agents menu. + + + +*[Interactive diagram - hover over outputs to see artifact flows]* + +## Phase 1: Analysis (Optional) + +Explore the problem space and validate ideas before committing to planning. + +| Workflow | Purpose | Produces | +| ---------------------- | -------------------------------------------------------------------------- | ------------------------- | +| `brainstorm` | Brainstorm Project Ideas with guided facilitation of a brainstorming coach | `brainstorming-report.md` | +| `research` | Validate market, technical, or domain assumptions | Research findings | +| `create-product-brief` | Capture strategic vision | `product-brief.md` | + +## Phase 2: Planning + +Define what to build and for whom. + +| Workflow | Purpose | Produces | +| ------------------ | ---------------------------------------- | ------------ | +| `create-prd` | Define requirements (FRs/NFRs) | `PRD.md` | +| `create-ux-design` | Design user experience (when UX matters) | `ux-spec.md` | + +## Phase 3: Solutioning + +Decide how to build it and break work into stories. + +| Workflow | Purpose | Produces | +| -------------------------------- | ------------------------------------------ | --------------------------- | +| `create-architecture` | Make technical decisions explicit | `architecture.md` with ADRs | +| `create-epics-and-stories` | Break requirements into implementable work | Epic files with stories | +| `check-implementation-readiness` | Gate check before implementation | PASS/CONCERNS/FAIL decision | + +## Phase 4: Implementation + +Build it, one story at a time. + +| Workflow | Purpose | Produces | +| ----------------- | -------------------------------------- | ----------------------------- | +| `sprint-planning` | Initialize tracking (once per project) | `sprint-status.yaml` | +| `create-story` | Prepare next story for implementation | `story-[slug].md` | +| `dev-story` | Implement the story | Working code + tests | +| `code-review` | Validate implementation quality | Approved or changes requested | +| `correct-course` | Handle significant mid-sprint changes | Updated plan or re-routing | +| `retrospective` | Review after epic completion | Lessons learned | + +## Quick Flow (Parallel Track) + +Skip phases 1-3 for small, well-understood work. + +| Workflow | Purpose | Produces | +| ------------ | ------------------------------------------ | --------------------------------------------- | +| `quick-spec` | Define an ad-hoc change | `tech-spec.md` (story file for small changes) | +| `quick-dev` | Implement from spec or direct instructions | Working code + tests | + +## Context Management + +Each document becomes context for the next phase. The PRD tells the architect what constraints matter. The architecture tells the dev agent which patterns to follow. Story files give focused, complete context for implementation. Without this structure, agents make inconsistent decisions. + +For brownfield projects, `document-project` creates or updates `project-context.md` - what exists in the codebase and the rules all implementation workflows must observe. Run it just before Phase 4, and again when something significant changes - structure, architecture, or those rules. You can also edit `project-context.md` by hand. + +All implementation workflows load `project-context.md` if it exists. Additional context per workflow: + +| Workflow | Also Loads | +| -------------- | ---------------------------- | +| `create-story` | epics, PRD, architecture, UX | +| `dev-story` | story file | +| `code-review` | architecture, story file | +| `quick-spec` | planning docs (if exist) | +| `quick-dev` | tech-spec | diff --git a/docs/reference/workflows/core-workflows.md b/docs/reference/workflows/core-workflows.md deleted file mode 100644 index 7a4a4600..00000000 --- a/docs/reference/workflows/core-workflows.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: "Core Workflows" ---- - -Domain-agnostic workflows that can be utilized by any BMad-compliant module, workflow, or agent. - -## Party Mode - -Orchestrate dynamic multi-agent conversations with your entire BMad team. Engage multiple specialized perspectives simultaneously — each agent maintains their unique personality, expertise, and communication style. - -See [Party Mode](/docs/explanation/features/party-mode.md) for detailed usage. - -## Brainstorming - -Facilitate structured creative sessions using 60+ proven ideation techniques. The AI acts as coach and guide, using proven creativity methods to draw out ideas and insights. - -See [Brainstorming Techniques](/docs/explanation/features/brainstorming-techniques.md) for detailed usage. - -## Advanced Elicitation - -Push the LLM to rethink its work through 50+ reasoning methods — the inverse of brainstorming. The LLM applies sophisticated techniques to re-examine and enhance content it has just generated. - -See [Advanced Elicitation](/docs/explanation/features/advanced-elicitation.md) for detailed usage. - -## Workflow Integration - -Core Workflows accept contextual parameters when called from other modules: - -- **Topic focus** — Direct the session toward a specific domain or question -- **Additional personas** (Party Mode) — Inject expert agents into the roster at runtime -- **Guardrails** (Brainstorming) — Set constraints and boundaries for ideation -- **Output goals** — Define what the final output needs to accomplish diff --git a/docs/reference/workflows/document-project.md b/docs/reference/workflows/document-project.md deleted file mode 100644 index 74adca93..00000000 --- a/docs/reference/workflows/document-project.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: "Document Project Workflow" ---- - -Analyzes and documents brownfield projects for AI-assisted development. - -:::note[Quick Facts] -- **Module:** BMM (BMad Method Module) -- **Command:** `*document-project` -- **Agents:** Analyst, Technical Writer -- **Output:** Master index + documentation files in `{output_folder}` -::: - -## Purpose - -Scans your codebase, architecture, and patterns to create comprehensive reference documentation. Generates a master index and multiple documentation files tailored to your project structure and type. - -## How to Invoke - -```bash -*document-project -``` - -## Scan Levels - -Choose the right depth for your needs: - -### Quick Scan (Default) - -**What it does:** Pattern-based analysis without reading source files - -**Reads:** Config files, package manifests, directory structure, README - -**Use when:** -- You need a fast project overview -- Initial understanding of project structure -- Planning next steps before deeper analysis - -### Deep Scan - -**What it does:** Reads files in critical directories based on project type - -**Reads:** Files in critical paths defined by documentation requirements - -**Use when:** -- Creating comprehensive documentation for brownfield PRD -- Need detailed analysis of key areas -- Want balance between depth and speed - -### Exhaustive Scan - -**What it does:** Reads ALL source files in project - -**Reads:** Every source file (excludes node_modules, dist, build, .git) - -**Use when:** -- Complete project analysis needed -- Migration planning requires full understanding -- Detailed audit of entire codebase - -:::caution[Deep-Dive Mode] -Deep-dive mode always uses exhaustive scan — no choice of scan level. -::: - -## Resumability - -The workflow can be interrupted and resumed without losing progress: - -- **State Tracking** — Progress saved in `project-scan-report.json` -- **Auto-Detection** — Workflow detects incomplete runs (<24 hours old) -- **Resume Prompt** — Choose to resume or start fresh -- **Step-by-Step** — Resume from exact step where interrupted -- **Archiving** — Old state files automatically archived diff --git a/docs/reference/workflows/index.md b/docs/reference/workflows/index.md deleted file mode 100644 index afaff1a0..00000000 --- a/docs/reference/workflows/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "Workflows Reference" -description: Reference documentation for BMad Method workflows ---- - -Reference documentation for all BMad Method workflows. - -## Core Workflows - -- [Core Workflows](/docs/reference/workflows/core-workflows.md) — Domain-agnostic workflows available to all modules -- [Document Project](/docs/reference/workflows/document-project.md) — Brownfield project documentation - diff --git a/docs/explanation/tea/engagement-models.md b/docs/tea/explanation/engagement-models.md similarity index 75% rename from docs/explanation/tea/engagement-models.md rename to docs/tea/explanation/engagement-models.md index 17dfd543..856883d1 100644 --- a/docs/explanation/tea/engagement-models.md +++ b/docs/tea/explanation/engagement-models.md @@ -13,7 +13,7 @@ TEA is optional and flexible. There are five valid ways to engage with TEA - cho 1. **No TEA** - Skip all TEA workflows, use existing testing approach 2. **TEA Solo** - Use TEA standalone without BMad Method -3. **TEA Lite** - Beginner approach using just `*automate` +3. **TEA Lite** - Beginner approach using just `automate` 4. **TEA Integrated (Greenfield)** - Full BMad Method integration from scratch 5. **TEA Integrated (Brownfield)** - Full BMad Method integration with existing code @@ -84,10 +84,10 @@ Decision: Skip TEA, keep what works **Typical Sequence:** ``` -1. *test-design (system or epic) -2. *atdd or *automate -3. *test-review (optional) -4. *trace (coverage + gate decision) +1. `test-design` (system or epic) +2. `atdd` or `automate` +3. `test-review` (optional) +4. `trace` (coverage + gate decision) ``` **You Bring:** @@ -96,14 +96,14 @@ Decision: Skip TEA, keep what works - Project context **TEA Provides:** -- Risk-based test planning (`*test-design`) -- Test generation (`*atdd`, `*automate`) -- Quality review (`*test-review`) -- Coverage traceability (`*trace`) +- Risk-based test planning (`test-design`) +- Test generation (`atdd`, `automate`) +- Quality review (`test-review`) +- Coverage traceability (`trace`) **Optional:** -- Framework setup (`*framework`) if needed -- CI configuration (`*ci`) if needed +- Framework setup (`framework`) if needed +- CI configuration (`ci`) if needed **Example:** ``` @@ -114,10 +114,10 @@ Your project: Workflow: 1. Export stories from Jira -2. Run *test-design on epic -3. Run *atdd for each story +2. Run `test-design` on epic +3. Run `atdd` for each story 4. Implement features -5. Run *trace for coverage +5. Run `trace` for coverage ``` **Verdict:** Best for teams wanting TEA benefits without BMad Method commitment. @@ -126,7 +126,7 @@ Workflow: ### Model 3: TEA Lite -**What:** Beginner approach using just `*automate` to test existing features. +**What:** Beginner approach using just `automate` to test existing features. **When to Use:** - Learning TEA fundamentals @@ -136,9 +136,9 @@ Workflow: **Workflow:** ``` -1. *framework (setup test infrastructure) -2. *test-design (optional, risk assessment) -3. *automate (generate tests for existing features) +1. `framework` (setup test infrastructure) +2. `test-design` (optional, risk assessment) +3. `automate` (generate tests for existing features) 4. Run tests (they pass immediately) ``` @@ -150,8 +150,8 @@ Beginner developer: - 30 minutes available Steps: -1. Run *framework -2. Run *automate on TodoMVC demo +1. Run `framework` +2. Run `automate` on TodoMVC demo 3. Tests generated and passing 4. Learn TEA basics ``` @@ -186,29 +186,29 @@ Steps: **Phase 2: Planning** - PM creates PRD with NFRs -- (Optional) TEA runs `*nfr-assess` (Enterprise only) +- (Optional) TEA runs `nfr-assess` (Enterprise only) **Phase 3: Solutioning** - Architect creates architecture -- TEA runs `*test-design` (system-level) → testability review -- TEA runs `*framework` → test infrastructure -- TEA runs `*ci` → CI/CD pipeline -- Architect runs `*implementation-readiness` (fed by test design) +- TEA runs `test-design` (system-level) → testability review +- TEA runs `framework` → test infrastructure +- TEA runs `ci` → CI/CD pipeline +- Architect runs `implementation-readiness` (fed by test design) **Phase 4: Implementation (Per Epic)** -- SM runs `*sprint-planning` -- TEA runs `*test-design` (epic-level) → risk assessment for THIS epic +- SM runs `sprint-planning` +- TEA runs `test-design` (epic-level) → risk assessment for THIS epic - SM creates stories -- (Optional) TEA runs `*atdd` → failing tests before dev +- (Optional) TEA runs `atdd` → failing tests before dev - DEV implements story -- TEA runs `*automate` → expand coverage -- (Optional) TEA runs `*test-review` → quality audit -- TEA runs `*trace` Phase 1 → refresh coverage +- TEA runs `automate` → expand coverage +- (Optional) TEA runs `test-review` → quality audit +- TEA runs `trace` Phase 1 → refresh coverage **Release Gate:** -- (Optional) TEA runs `*test-review` → final audit -- (Optional) TEA runs `*nfr-assess` → validate NFRs -- TEA runs `*trace` Phase 2 → gate decision (PASS/CONCERNS/FAIL/WAIVED) +- (Optional) TEA runs `test-review` → final audit +- (Optional) TEA runs `nfr-assess` → validate NFRs +- TEA runs `trace` Phase 2 → gate decision (PASS/CONCERNS/FAIL/WAIVED) **What You Get:** - Complete quality operating model @@ -249,30 +249,30 @@ Workflow: **Phase 0: Documentation (if needed)** ``` -- Run *document-project +- Run `document-project` - Create baseline documentation ``` **Phase 2: Planning** ``` -- TEA runs *trace Phase 1 → establish coverage baseline +- TEA runs `trace` Phase 1 → establish coverage baseline - PM creates PRD (with existing system context) ``` **Phase 3: Solutioning** ``` - Architect creates architecture (with brownfield constraints) -- TEA runs *test-design (system-level) → testability review -- TEA runs *framework (only if modernizing test infra) -- TEA runs *ci (update existing CI or create new) +- TEA runs `test-design` (system-level) → testability review +- TEA runs `framework` (only if modernizing test infra) +- TEA runs `ci` (update existing CI or create new) ``` **Phase 4: Implementation** ``` -- TEA runs *test-design (epic-level) → focus on REGRESSION HOTSPOTS +- TEA runs `test-design` (epic-level) → focus on REGRESSION HOTSPOTS - Per story: ATDD → dev → automate -- TEA runs *test-review → improve legacy test quality -- TEA runs *trace Phase 1 → track coverage improvement +- TEA runs `test-review` → improve legacy test quality +- TEA runs `trace` Phase 1 → track coverage improvement ``` **Brownfield-Specific:** @@ -289,10 +289,10 @@ Legacy e-commerce platform: - Want to improve quality Workflow: -1. Phase 2: *trace baseline → 30% coverage -2. Phase 3: *test-design → identify regression risks +1. Phase 2: `trace` baseline → 30% coverage +2. Phase 3: `test-design` → identify regression risks 3. Phase 4: Fix top 20 flaky tests + add tests for new checkout -4. Gate: *trace → 60% coverage (2x improvement) +4. Gate: `trace` → 60% coverage (2x improvement) ``` **Verdict:** Best for incrementally improving legacy systems. @@ -309,7 +309,7 @@ flowchart TD Start([Choose TEA Model]) --> BMad{Using
    BMad Method?} BMad -->|No| NonBMad{Project Type?} - NonBMad -->|Learning| Lite[TEA Lite
    Just *automate
    30 min tutorial] + NonBMad -->|Learning| Lite[TEA Lite
    Just automate
    30 min tutorial] NonBMad -->|Serious Project| Solo[TEA Solo
    Standalone workflows
    Full capabilities] BMad -->|Yes| WantTEA{Want TEA?} @@ -374,18 +374,18 @@ flowchart TD ``` Week 1: TEA Lite -- Run *framework -- Run *automate +- Run `framework` +- Run `automate` - Learn basics Week 2: Expand to TEA Solo -- Add *test-design -- Use *atdd for new features -- Add *test-review +- Add `test-design` +- Use `atdd` for new features +- Add `test-review` Week 3: Continue expanding -- Add *trace for coverage -- Setup *ci +- Add `trace` for coverage +- Setup `ci` - Full TEA Solo workflow ``` @@ -435,8 +435,8 @@ Testing: Manual only Decision: Start with TEA Lite Result: -- Run *framework (Playwright setup) -- Run *automate (20 tests generated) +- Run `framework` (Playwright setup) +- Run `automate` (20 tests generated) - Learning TEA basics ``` @@ -447,9 +447,9 @@ Testing: Automated tests exist Decision: Expand to TEA Solo Result: -- Add *test-design (risk assessment) -- Add *atdd (TDD workflow) -- Add *test-review (quality audits) +- Add `test-design` (risk assessment) +- Add `atdd` (TDD workflow) +- Add `test-review` (quality audits) ``` **Month 6:** TEA Integrated @@ -477,26 +477,26 @@ Result: **Phase 2:** ``` -- *trace baseline → 45% coverage (lots of gaps) +- `trace` baseline → 45% coverage (lots of gaps) - Document current state ``` **Phase 3:** ``` -- *test-design (system) → identify regression hotspots -- *framework → modernize test infrastructure -- *ci → add selective testing +- `test-design` (system) → identify regression hotspots +- `framework` → modernize test infrastructure +- `ci` → add selective testing ``` **Phase 4:** ``` Per epic: -- *test-design → focus on regression + new features +- `test-design` → focus on regression + new features - Fix top 10 flaky tests -- *atdd for new features -- *automate for coverage expansion -- *test-review → track quality improvement -- *trace → compare to baseline +- `atdd` for new features +- `automate` for coverage expansion +- `test-review` → track quality improvement +- `trace` → compare to baseline ``` **Result after 6 months:** @@ -520,9 +520,9 @@ Per epic: ``` Client project 1 (Scrum): - Import Jira stories -- Run *test-design -- Generate tests with *atdd/*automate -- Deliver quality report with *test-review +- Run `test-design` +- Generate tests with `atdd`/`automate` +- Deliver quality report with `test-review` Client project 2 (Kanban): - Import requirements from Notion @@ -581,11 +581,11 @@ Client project 3 (Ad-hoc): **When:** Outgrow beginner approach, need more workflows. **Steps:** -1. Continue using `*framework` and `*automate` -2. Add `*test-design` for planning -3. Add `*atdd` for TDD workflow -4. Add `*test-review` for quality audits -5. Add `*trace` for coverage tracking +1. Continue using `framework` and `automate` +2. Add `test-design` for planning +3. Add `atdd` for TDD workflow +4. Add `test-review` for quality audits +5. Add `trace` for coverage tracking **Timeline:** 2-4 weeks of gradual expansion @@ -620,13 +620,13 @@ Client project 3 (Ad-hoc): ``` Phase 1 (Week 1-2): TEA Lite -- Learn with *automate on demo app +- Learn with `automate` on demo app - Understand TEA fundamentals - Low commitment Phase 2 (Week 3-4): Evaluate -- Try *test-design (planning) -- Try *atdd (TDD) +- Try `test-design` (planning) +- Try `atdd` (TDD) - See if value justifies investment Phase 3 (Month 2+): Decide @@ -664,46 +664,46 @@ Non-critical features (UI tweaks): ## Technical Implementation Each model uses different TEA workflows. See: -- [TEA Overview](/docs/explanation/features/tea-overview.md) - Model details -- [TEA Command Reference](/docs/reference/tea/commands.md) - Workflow reference -- [TEA Configuration](/docs/reference/tea/configuration.md) - Setup options +- [TEA Overview](/docs/tea/explanation/tea-overview.md) - Model details +- [TEA Command Reference](/docs/tea/reference/commands.md) - Workflow reference +- [TEA Configuration](/docs/tea/reference/configuration.md) - Setup options ## Related Concepts **Core TEA Concepts:** -- [Risk-Based Testing](/docs/explanation/tea/risk-based-testing.md) - Risk assessment in different models -- [Test Quality Standards](/docs/explanation/tea/test-quality-standards.md) - Quality across all models -- [Knowledge Base System](/docs/explanation/tea/knowledge-base-system.md) - Consistent patterns across models +- [Risk-Based Testing](/docs/tea/explanation/risk-based-testing.md) - Risk assessment in different models +- [Test Quality Standards](/docs/tea/explanation/test-quality-standards.md) - Quality across all models +- [Knowledge Base System](/docs/tea/explanation/knowledge-base-system.md) - Consistent patterns across models **Technical Patterns:** -- [Fixture Architecture](/docs/explanation/tea/fixture-architecture.md) - Infrastructure in different models -- [Network-First Patterns](/docs/explanation/tea/network-first-patterns.md) - Reliability in all models +- [Fixture Architecture](/docs/tea/explanation/fixture-architecture.md) - Infrastructure in different models +- [Network-First Patterns](/docs/tea/explanation/network-first-patterns.md) - Reliability in all models **Overview:** -- [TEA Overview](/docs/explanation/features/tea-overview.md) - 5 engagement models with cheat sheets -- [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md) - Design philosophy +- [TEA Overview](/docs/tea/explanation/tea-overview.md) - 5 engagement models with cheat sheets +- [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md) - Design philosophy ## Practical Guides **Getting Started:** -- [TEA Lite Quickstart Tutorial](/docs/tutorials/getting-started/tea-lite-quickstart.md) - Model 3: TEA Lite +- [TEA Lite Quickstart Tutorial](/docs/tea/tutorials/tea-lite-quickstart.md) - Model 3: TEA Lite **Use-Case Guides:** -- [Using TEA with Existing Tests](/docs/how-to/brownfield/use-tea-with-existing-tests.md) - Model 5: Brownfield -- [Running TEA for Enterprise](/docs/how-to/brownfield/use-tea-for-enterprise.md) - Enterprise integration +- [Using TEA with Existing Tests](/docs/tea/how-to/brownfield/use-tea-with-existing-tests.md) - Model 5: Brownfield +- [Running TEA for Enterprise](/docs/tea/how-to/brownfield/use-tea-for-enterprise.md) - Enterprise integration **All Workflow Guides:** -- [How to Run Test Design](/docs/how-to/workflows/run-test-design.md) - Used in TEA Solo and Integrated -- [How to Run ATDD](/docs/how-to/workflows/run-atdd.md) -- [How to Run Automate](/docs/how-to/workflows/run-automate.md) -- [How to Run Test Review](/docs/how-to/workflows/run-test-review.md) -- [How to Run Trace](/docs/how-to/workflows/run-trace.md) +- [How to Run Test Design](/docs/tea/how-to/workflows/run-test-design.md) - Used in TEA Solo and Integrated +- [How to Run ATDD](/docs/tea/how-to/workflows/run-atdd.md) +- [How to Run Automate](/docs/tea/how-to/workflows/run-automate.md) +- [How to Run Test Review](/docs/tea/how-to/workflows/run-test-review.md) +- [How to Run Trace](/docs/tea/how-to/workflows/run-trace.md) ## Reference -- [TEA Command Reference](/docs/reference/tea/commands.md) - All workflows explained -- [TEA Configuration](/docs/reference/tea/configuration.md) - Config per model -- [Glossary](/docs/reference/glossary/index.md#test-architect-tea-concepts) - TEA Lite, TEA Solo, TEA Integrated terms +- [TEA Command Reference](/docs/tea/reference/commands.md) - All workflows explained +- [TEA Configuration](/docs/tea/reference/configuration.md) - Config per model +- [Glossary](/docs/tea/glossary/index.md#test-architect-tea-concepts) - TEA Lite, TEA Solo, TEA Integrated terms --- diff --git a/docs/explanation/tea/fixture-architecture.md b/docs/tea/explanation/fixture-architecture.md similarity index 88% rename from docs/explanation/tea/fixture-architecture.md rename to docs/tea/explanation/fixture-architecture.md index 6b58d64f..36d47c29 100644 --- a/docs/explanation/tea/fixture-architecture.md +++ b/docs/tea/explanation/fixture-architecture.md @@ -232,7 +232,7 @@ test('should update profile', async ({ apiRequest, authToken, log }) => { }); ``` -**Note:** This example uses the vanilla pure function signature (`url`, `data`). Playwright Utils uses different parameter names (`path`, `body`). See [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md) for the utilities API. +**Note:** This example uses the vanilla pure function signature (`url`, `data`). Playwright Utils uses different parameter names (`path`, `body`). See [Integrate Playwright Utils](/docs/tea/how-to/customization/integrate-playwright-utils.md) for the utilities API. **Note:** `authToken` requires auth-session fixture setup with provider configuration. See [auth-session documentation](https://seontechnologies.github.io/playwright-utils/auth-session.html). @@ -246,7 +246,7 @@ test('should update profile', async ({ apiRequest, authToken, log }) => { ### TEA Generates This Pattern -When you run `*framework` with `tea_use_playwright_utils: true`: +When you run `framework` with `tea_use_playwright_utils: true`: **TEA scaffolds:** ``` @@ -265,7 +265,7 @@ tests/ ### TEA Reviews Against This Pattern -When you run `*test-review`: +When you run `test-review`: **TEA checks:** - Are utilities pure functions? ✓ @@ -385,8 +385,8 @@ export const test = mergeTests(apiRequestTest, authSessionTest, logTest); ## Technical Implementation For detailed fixture architecture patterns, see the knowledge base: -- [Knowledge Base Index - Architecture & Fixtures](/docs/reference/tea/knowledge-base.md) -- [Complete Knowledge Base Index](/docs/reference/tea/knowledge-base.md) +- [Knowledge Base Index - Architecture & Fixtures](/docs/tea/reference/knowledge-base.md) +- [Complete Knowledge Base Index](/docs/tea/reference/knowledge-base.md) ## When to Use This Pattern @@ -425,32 +425,32 @@ function createTestUser(name: string) { ## Related Concepts **Core TEA Concepts:** -- [Test Quality Standards](/docs/explanation/tea/test-quality-standards.md) - Quality standards fixtures enforce -- [Knowledge Base System](/docs/explanation/tea/knowledge-base-system.md) - Fixture patterns in knowledge base +- [Test Quality Standards](/docs/tea/explanation/test-quality-standards.md) - Quality standards fixtures enforce +- [Knowledge Base System](/docs/tea/explanation/knowledge-base-system.md) - Fixture patterns in knowledge base **Technical Patterns:** -- [Network-First Patterns](/docs/explanation/tea/network-first-patterns.md) - Network fixtures explained -- [Risk-Based Testing](/docs/explanation/tea/risk-based-testing.md) - Fixture complexity matches risk +- [Network-First Patterns](/docs/tea/explanation/network-first-patterns.md) - Network fixtures explained +- [Risk-Based Testing](/docs/tea/explanation/risk-based-testing.md) - Fixture complexity matches risk **Overview:** -- [TEA Overview](/docs/explanation/features/tea-overview.md) - Fixture architecture in workflows -- [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md) - Why fixtures matter +- [TEA Overview](/docs/tea/explanation/tea-overview.md) - Fixture architecture in workflows +- [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md) - Why fixtures matter ## Practical Guides **Setup Guides:** -- [How to Set Up Test Framework](/docs/how-to/workflows/setup-test-framework.md) - TEA scaffolds fixtures -- [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md) - Production-ready fixtures +- [How to Set Up Test Framework](/docs/tea/how-to/workflows/setup-test-framework.md) - TEA scaffolds fixtures +- [Integrate Playwright Utils](/docs/tea/how-to/customization/integrate-playwright-utils.md) - Production-ready fixtures **Workflow Guides:** -- [How to Run ATDD](/docs/how-to/workflows/run-atdd.md) - Using fixtures in tests -- [How to Run Automate](/docs/how-to/workflows/run-automate.md) - Fixture composition examples +- [How to Run ATDD](/docs/tea/how-to/workflows/run-atdd.md) - Using fixtures in tests +- [How to Run Automate](/docs/tea/how-to/workflows/run-automate.md) - Fixture composition examples ## Reference -- [TEA Command Reference](/docs/reference/tea/commands.md) - *framework command -- [Knowledge Base Index](/docs/reference/tea/knowledge-base.md) - Fixture architecture fragments -- [Glossary](/docs/reference/glossary/index.md#test-architect-tea-concepts) - Fixture architecture term +- [TEA Command Reference](/docs/tea/reference/commands.md) - `framework` command +- [Knowledge Base Index](/docs/tea/reference/knowledge-base.md) - Fixture architecture fragments +- [Glossary](/docs/tea/glossary/index.md#test-architect-tea-concepts) - Fixture architecture term --- diff --git a/docs/explanation/tea/knowledge-base-system.md b/docs/tea/explanation/knowledge-base-system.md similarity index 83% rename from docs/explanation/tea/knowledge-base-system.md rename to docs/tea/explanation/knowledge-base-system.md index 8264808e..4d5e69e3 100644 --- a/docs/explanation/tea/knowledge-base-system.md +++ b/docs/tea/explanation/knowledge-base-system.md @@ -91,7 +91,7 @@ fixture-architecture,Fixture Architecture,Composable fixture patterns,fixtures;a **2. Workflow Loads Relevant Fragments** -When user runs `*atdd`: +When user runs `atdd`: ``` TEA reads tea-index.csv Identifies fragments needed for ATDD: @@ -107,7 +107,7 @@ Generates tests following these patterns **3. Consistent Output** -Every time `*atdd` runs: +Every time `atdd` runs: - Same fragments loaded - Same patterns applied - Same quality standards @@ -120,7 +120,7 @@ Every time `*atdd` runs: ```mermaid %%{init: {'theme':'base', 'themeVariables': { 'fontSize':'14px'}}}%% flowchart TD - User([User: *atdd]) --> Workflow[TEA Workflow
    Triggered] + User([User: atdd]) --> Workflow[TEA Workflow
    Triggered] Workflow --> Read[Read Manifest
    tea-index.csv] Read --> Identify{Identify Relevant
    Fragments for ATDD} @@ -257,12 +257,12 @@ await page.waitForTimeout(3000); | Workflow | Fragments Loaded | Purpose | |----------|-----------------|---------| -| `*framework` | fixture-architecture, playwright-config, fixtures-composition | Infrastructure patterns | -| `*test-design` | test-quality, test-priorities-matrix, risk-governance | Planning standards | -| `*atdd` | test-quality, component-tdd, network-first, data-factories | TDD patterns | -| `*automate` | test-quality, test-levels-framework, selector-resilience | Comprehensive generation | -| `*test-review` | All quality/resilience/debugging fragments | Full audit patterns | -| `*ci` | ci-burn-in, burn-in, selective-testing | CI/CD optimization | +| `framework` | fixture-architecture, playwright-config, fixtures-composition | Infrastructure patterns | +| `test-design` | test-quality, test-priorities-matrix, risk-governance | Planning standards | +| `atdd` | test-quality, component-tdd, network-first, data-factories | TDD patterns | +| `automate` | test-quality, test-levels-framework, selector-resilience | Comprehensive generation | +| `test-review` | All quality/resilience/debugging fragments | Full audit patterns | +| `ci` | ci-burn-in, burn-in, selective-testing | CI/CD optimization | **Benefit:** Only load what's needed (focused context, no bloat). @@ -271,7 +271,7 @@ await page.waitForTimeout(3000); TEA doesn't load all 33 fragments at once: ``` -User runs: *atdd for authentication feature +User runs: atdd for authentication feature TEA analyzes context: - Feature type: Authentication @@ -298,7 +298,7 @@ Result: 5 relevant fragments loaded, 28 skipped **Without Knowledge Base (Vanilla Playwright, Random Quality):** ``` -Session 1: User runs *atdd +Session 1: User runs atdd AI: [Guesses patterns from general knowledge] Generated: @@ -309,7 +309,7 @@ test('api test', async ({ request }) => { // Random quality }); -Session 2: User runs *atdd (different day) +Session 2: User runs atdd (different day) AI: [Different random patterns] Generated: @@ -324,7 +324,7 @@ Result: Inconsistent quality, random patterns **With Knowledge Base (TEA + Playwright Utils):** ``` -Session 1: User runs *atdd +Session 1: User runs atdd TEA: [Loads test-quality.md, network-first.md, api-request.md from tea-index.csv] Generated: @@ -340,7 +340,7 @@ test('should fetch users', async ({ apiRequest }) => { expect(body).toBeInstanceOf(Array); }); -Session 2: User runs *atdd (different day) +Session 2: User runs atdd (different day) TEA: [Loads same fragments from tea-index.csv] Generated: Identical pattern, same quality @@ -356,10 +356,10 @@ Result: Systematic quality, established patterns (ALWAYS uses apiRequest utility **Without Knowledge Base:** ``` -*test-review session 1: +test-review session 1: "This test looks okay" [50 issues missed] -*test-review session 2: +test-review session 2: "This test has some issues" [Different issues flagged] Result: Inconsistent feedback @@ -367,11 +367,11 @@ Result: Inconsistent feedback **With Knowledge Base:** ``` -*test-review session 1: +test-review session 1: [Loads all quality fragments] Flags: 12 hard waits, 5 conditionals (based on test-quality.md) -*test-review session 2: +test-review session 2: [Loads same fragments] Flags: Same issues with same explanations @@ -430,12 +430,12 @@ Result: Consistent, reliable feedback ### 2. Onboarding **Before:** New team member reads 20 documents, asks 50 questions -**After:** New team member runs `*atdd`, sees patterns in generated code, learns by example +**After:** New team member runs `atdd`, sees patterns in generated code, learns by example ### 3. Quality Gates **Before:** "Is this test good?" → subjective opinion -**After:** "*test-review" → objective score against knowledge base +**After:** `test-review` → objective score against knowledge base ### 4. Pattern Evolution @@ -513,41 +513,41 @@ test('job completion', async ({ apiRequest, recurse }) => { ## Technical Implementation For details on the knowledge base index, see: -- [Knowledge Base Index](/docs/reference/tea/knowledge-base.md) -- [TEA Configuration](/docs/reference/tea/configuration.md) +- [Knowledge Base Index](/docs/tea/reference/knowledge-base.md) +- [TEA Configuration](/docs/tea/reference/configuration.md) ## Related Concepts **Core TEA Concepts:** -- [Test Quality Standards](/docs/explanation/tea/test-quality-standards.md) - Standards in knowledge base -- [Risk-Based Testing](/docs/explanation/tea/risk-based-testing.md) - Risk patterns in knowledge base -- [Engagement Models](/docs/explanation/tea/engagement-models.md) - Knowledge base across all models +- [Test Quality Standards](/docs/tea/explanation/test-quality-standards.md) - Standards in knowledge base +- [Risk-Based Testing](/docs/tea/explanation/risk-based-testing.md) - Risk patterns in knowledge base +- [Engagement Models](/docs/tea/explanation/engagement-models.md) - Knowledge base across all models **Technical Patterns:** -- [Fixture Architecture](/docs/explanation/tea/fixture-architecture.md) - Fixture patterns in knowledge base -- [Network-First Patterns](/docs/explanation/tea/network-first-patterns.md) - Network patterns in knowledge base +- [Fixture Architecture](/docs/tea/explanation/fixture-architecture.md) - Fixture patterns in knowledge base +- [Network-First Patterns](/docs/tea/explanation/network-first-patterns.md) - Network patterns in knowledge base **Overview:** -- [TEA Overview](/docs/explanation/features/tea-overview.md) - Knowledge base in workflows -- [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md) - **Foundation: Context engineering philosophy** (why knowledge base solves AI test problems) +- [TEA Overview](/docs/tea/explanation/tea-overview.md) - Knowledge base in workflows +- [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md) - **Foundation: Context engineering philosophy** (why knowledge base solves AI test problems) ## Practical Guides **All Workflow Guides Use Knowledge Base:** -- [How to Run Test Design](/docs/how-to/workflows/run-test-design.md) -- [How to Run ATDD](/docs/how-to/workflows/run-atdd.md) -- [How to Run Automate](/docs/how-to/workflows/run-automate.md) -- [How to Run Test Review](/docs/how-to/workflows/run-test-review.md) +- [How to Run Test Design](/docs/tea/how-to/workflows/run-test-design.md) +- [How to Run ATDD](/docs/tea/how-to/workflows/run-atdd.md) +- [How to Run Automate](/docs/tea/how-to/workflows/run-automate.md) +- [How to Run Test Review](/docs/tea/how-to/workflows/run-test-review.md) **Integration:** -- [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md) - PW-Utils in knowledge base +- [Integrate Playwright Utils](/docs/tea/how-to/customization/integrate-playwright-utils.md) - PW-Utils in knowledge base ## Reference -- [Knowledge Base Index](/docs/reference/tea/knowledge-base.md) - Complete fragment index -- [TEA Command Reference](/docs/reference/tea/commands.md) - Which workflows load which fragments -- [TEA Configuration](/docs/reference/tea/configuration.md) - Config affects fragment loading -- [Glossary](/docs/reference/glossary/index.md#test-architect-tea-concepts) - Context engineering, knowledge fragment terms +- [Knowledge Base Index](/docs/tea/reference/knowledge-base.md) - Complete fragment index +- [TEA Command Reference](/docs/tea/reference/commands.md) - Which workflows load which fragments +- [TEA Configuration](/docs/tea/reference/configuration.md) - Config affects fragment loading +- [Glossary](/docs/tea/glossary/index.md#test-architect-tea-concepts) - Context engineering, knowledge fragment terms --- diff --git a/docs/explanation/tea/network-first-patterns.md b/docs/tea/explanation/network-first-patterns.md similarity index 93% rename from docs/explanation/tea/network-first-patterns.md rename to docs/tea/explanation/network-first-patterns.md index 4be84dbb..8c1a460e 100644 --- a/docs/explanation/tea/network-first-patterns.md +++ b/docs/tea/explanation/network-first-patterns.md @@ -232,7 +232,7 @@ sequenceDiagram **Vanilla Playwright:** ```typescript -// When you run *atdd or *automate, TEA generates: +// When you run `atdd` or `automate`, TEA generates: test('should create user', async ({ page }) => { // TEA automatically includes network wait @@ -287,7 +287,7 @@ test('should create user', async ({ page, interceptNetworkCall }) => { ### TEA Reviews for Hard Waits -When you run `*test-review`: +When you run `test-review`: ```markdown ## Critical Issue: Hard Wait Detected @@ -807,46 +807,46 @@ test('test 2', async ({ page, interceptNetworkCall }) => { - Glob pattern matching (`**/api/**`) - Consistent API across all tests -See [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md#intercept-network-call) for setup. +See [Integrate Playwright Utils](/docs/tea/how-to/customization/integrate-playwright-utils.md#intercept-network-call) for setup. ## Technical Implementation For detailed network-first patterns, see the knowledge base: -- [Knowledge Base Index - Network & Reliability](/docs/reference/tea/knowledge-base.md) -- [Complete Knowledge Base Index](/docs/reference/tea/knowledge-base.md) +- [Knowledge Base Index - Network & Reliability](/docs/tea/reference/knowledge-base.md) +- [Complete Knowledge Base Index](/docs/tea/reference/knowledge-base.md) ## Related Concepts **Core TEA Concepts:** -- [Test Quality Standards](/docs/explanation/tea/test-quality-standards.md) - Determinism requires network-first -- [Risk-Based Testing](/docs/explanation/tea/risk-based-testing.md) - High-risk features need reliable tests +- [Test Quality Standards](/docs/tea/explanation/test-quality-standards.md) - Determinism requires network-first +- [Risk-Based Testing](/docs/tea/explanation/risk-based-testing.md) - High-risk features need reliable tests **Technical Patterns:** -- [Fixture Architecture](/docs/explanation/tea/fixture-architecture.md) - Network utilities as fixtures -- [Knowledge Base System](/docs/explanation/tea/knowledge-base-system.md) - Network patterns in knowledge base +- [Fixture Architecture](/docs/tea/explanation/fixture-architecture.md) - Network utilities as fixtures +- [Knowledge Base System](/docs/tea/explanation/knowledge-base-system.md) - Network patterns in knowledge base **Overview:** -- [TEA Overview](/docs/explanation/features/tea-overview.md) - Network-first in workflows -- [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md) - Why flakiness matters +- [TEA Overview](/docs/tea/explanation/tea-overview.md) - Network-first in workflows +- [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md) - Why flakiness matters ## Practical Guides **Workflow Guides:** -- [How to Run Test Review](/docs/how-to/workflows/run-test-review.md) - Review for hard waits -- [How to Run ATDD](/docs/how-to/workflows/run-atdd.md) - Generate network-first tests -- [How to Run Automate](/docs/how-to/workflows/run-automate.md) - Expand with network patterns +- [How to Run Test Review](/docs/tea/how-to/workflows/run-test-review.md) - Review for hard waits +- [How to Run ATDD](/docs/tea/how-to/workflows/run-atdd.md) - Generate network-first tests +- [How to Run Automate](/docs/tea/how-to/workflows/run-automate.md) - Expand with network patterns **Use-Case Guides:** -- [Using TEA with Existing Tests](/docs/how-to/brownfield/use-tea-with-existing-tests.md) - Fix flaky legacy tests +- [Using TEA with Existing Tests](/docs/tea/how-to/brownfield/use-tea-with-existing-tests.md) - Fix flaky legacy tests **Customization:** -- [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md) - Network utilities (recorder, interceptor, error monitor) +- [Integrate Playwright Utils](/docs/tea/how-to/customization/integrate-playwright-utils.md) - Network utilities (recorder, interceptor, error monitor) ## Reference -- [TEA Command Reference](/docs/reference/tea/commands.md) - All workflows use network-first -- [Knowledge Base Index](/docs/reference/tea/knowledge-base.md) - Network-first fragment -- [Glossary](/docs/reference/glossary/index.md#test-architect-tea-concepts) - Network-first pattern term +- [TEA Command Reference](/docs/tea/reference/commands.md) - All workflows use network-first +- [Knowledge Base Index](/docs/tea/reference/knowledge-base.md) - Network-first fragment +- [Glossary](/docs/tea/glossary/index.md#test-architect-tea-concepts) - Network-first pattern term --- diff --git a/docs/explanation/tea/risk-based-testing.md b/docs/tea/explanation/risk-based-testing.md similarity index 91% rename from docs/explanation/tea/risk-based-testing.md rename to docs/tea/explanation/risk-based-testing.md index 5a386a03..5b45d8a7 100644 --- a/docs/explanation/tea/risk-based-testing.md +++ b/docs/tea/explanation/risk-based-testing.md @@ -250,7 +250,7 @@ Risk scores inform test priorities (but aren't the only factor): - **Test Levels:** E2E smoke test only - **Example:** Theme customization, experimental features -**Note:** Priorities consider risk scores plus business context (usage frequency, user impact, etc.). See [Test Priorities Matrix](/docs/reference/tea/knowledge-base.md#quality-standards) for complete criteria. +**Note:** Priorities consider risk scores plus business context (usage frequency, user impact, etc.). See [Test Priorities Matrix](/docs/tea/reference/knowledge-base.md#quality-standards) for complete criteria. ### 3. Mitigation Plans @@ -459,12 +459,12 @@ describe('User profile - High Value (P1)', () => { ## Technical Implementation For detailed risk governance patterns, see the knowledge base: -- [Knowledge Base Index - Risk & Gates](/docs/reference/tea/knowledge-base.md) -- [TEA Command Reference - *test-design](/docs/reference/tea/commands.md#test-design) +- [Knowledge Base Index - Risk & Gates](/docs/tea/reference/knowledge-base.md) +- [TEA Command Reference - `test-design`](/docs/tea/reference/commands.md#test-design) ### Risk Scoring Matrix -TEA uses this framework in `*test-design`: +TEA uses this framework in `test-design`: ``` Impact @@ -553,33 +553,33 @@ flowchart TD ## Related Concepts **Core TEA Concepts:** -- [Test Quality Standards](/docs/explanation/tea/test-quality-standards.md) - Quality complements risk assessment -- [Engagement Models](/docs/explanation/tea/engagement-models.md) - When risk-based testing matters most -- [Knowledge Base System](/docs/explanation/tea/knowledge-base-system.md) - How risk patterns are loaded +- [Test Quality Standards](/docs/tea/explanation/test-quality-standards.md) - Quality complements risk assessment +- [Engagement Models](/docs/tea/explanation/engagement-models.md) - When risk-based testing matters most +- [Knowledge Base System](/docs/tea/explanation/knowledge-base-system.md) - How risk patterns are loaded **Technical Patterns:** -- [Fixture Architecture](/docs/explanation/tea/fixture-architecture.md) - Building risk-appropriate test infrastructure -- [Network-First Patterns](/docs/explanation/tea/network-first-patterns.md) - Quality patterns for high-risk features +- [Fixture Architecture](/docs/tea/explanation/fixture-architecture.md) - Building risk-appropriate test infrastructure +- [Network-First Patterns](/docs/tea/explanation/network-first-patterns.md) - Quality patterns for high-risk features **Overview:** -- [TEA Overview](/docs/explanation/features/tea-overview.md) - Risk assessment in TEA lifecycle -- [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md) - Design philosophy +- [TEA Overview](/docs/tea/explanation/tea-overview.md) - Risk assessment in TEA lifecycle +- [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md) - Design philosophy ## Practical Guides **Workflow Guides:** -- [How to Run Test Design](/docs/how-to/workflows/run-test-design.md) - Apply risk scoring -- [How to Run Trace](/docs/how-to/workflows/run-trace.md) - Gate decisions based on risk -- [How to Run NFR Assessment](/docs/how-to/workflows/run-nfr-assess.md) - NFR risk assessment +- [How to Run Test Design](/docs/tea/how-to/workflows/run-test-design.md) - Apply risk scoring +- [How to Run Trace](/docs/tea/how-to/workflows/run-trace.md) - Gate decisions based on risk +- [How to Run NFR Assessment](/docs/tea/how-to/workflows/run-nfr-assess.md) - NFR risk assessment **Use-Case Guides:** -- [Running TEA for Enterprise](/docs/how-to/brownfield/use-tea-for-enterprise.md) - Enterprise risk management +- [Running TEA for Enterprise](/docs/tea/how-to/brownfield/use-tea-for-enterprise.md) - Enterprise risk management ## Reference -- [TEA Command Reference](/docs/reference/tea/commands.md) - `*test-design`, `*nfr-assess`, `*trace` -- [Knowledge Base Index](/docs/reference/tea/knowledge-base.md) - Risk governance fragments -- [Glossary](/docs/reference/glossary/index.md#test-architect-tea-concepts) - Risk-based testing term +- [TEA Command Reference](/docs/tea/reference/commands.md) - `test-design`, `nfr-assess`, `trace` +- [Knowledge Base Index](/docs/tea/reference/knowledge-base.md) - Risk governance fragments +- [Glossary](/docs/tea/glossary/index.md#test-architect-tea-concepts) - Risk-based testing term --- diff --git a/docs/explanation/features/tea-overview.md b/docs/tea/explanation/tea-overview.md similarity index 52% rename from docs/explanation/features/tea-overview.md rename to docs/tea/explanation/tea-overview.md index 1289af6e..41c8e834 100644 --- a/docs/explanation/features/tea-overview.md +++ b/docs/tea/explanation/tea-overview.md @@ -7,7 +7,7 @@ description: Understanding the Test Architect (TEA) agent and its role in BMad M The Test Architect (TEA) is a specialized agent focused on quality strategy, test automation, and release gates in BMad Method projects. :::tip[Design Philosophy] -TEA was built to solve AI-generated tests that rot in review. For the problem statement and design principles, see [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md). For setup, see [Setup Test Framework](/docs/how-to/workflows/setup-test-framework.md). +TEA was built to solve AI-generated tests that rot in review. For the problem statement and design principles, see [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md). For setup, see [Setup Test Framework](/docs/tea/how-to/workflows/setup-test-framework.md). ::: ## Overview @@ -25,31 +25,31 @@ BMad does not mandate TEA. There are five valid ways to use it (or skip it). Pic 2. **TEA Solo (Standalone)** - Use TEA on a non-BMad project. Bring your own requirements, acceptance criteria, and environments. - - Typical sequence: `*test-design` (system or epic) -> `*atdd` and/or `*automate` -> optional `*test-review` -> `*trace` for coverage and gate decisions. - - Run `*framework` or `*ci` only if you want TEA to scaffold the harness or pipeline; they work best after you decide the stack/architecture. + - Typical sequence: `test-design` (system or epic) -> `atdd` and/or `automate` -> optional `test-review` -> `trace` for coverage and gate decisions. + - Run `framework` or `ci` only if you want TEA to scaffold the harness or pipeline; they work best after you decide the stack/architecture. **TEA Lite (Beginner Approach):** - - Simplest way to use TEA - just use `*automate` to test existing features. + - Simplest way to use TEA - just use `automate` to test existing features. - Perfect for learning TEA fundamentals in 30 minutes. - - See [TEA Lite Quickstart Tutorial](/docs/tutorials/getting-started/tea-lite-quickstart.md). + - See [TEA Lite Quickstart Tutorial](/docs/tea/tutorials/tea-lite-quickstart.md). 3. **Integrated: Greenfield - BMad Method (Simple/Standard Work)** - - Phase 3: system-level `*test-design`, then `*framework` and `*ci`. - - Phase 4: per-epic `*test-design`, optional `*atdd`, then `*automate` and optional `*test-review`. - - Gate (Phase 2): `*trace`. + - Phase 3: system-level `test-design`, then `framework` and `ci`. + - Phase 4: per-epic `test-design`, optional `atdd`, then `automate` and optional `test-review`. + - Gate (Phase 2): `trace`. 4. **Integrated: Brownfield - BMad Method or Enterprise (Simple or Complex)** - - Phase 2: baseline `*trace`. - - Phase 3: system-level `*test-design`, then `*framework` and `*ci`. - - Phase 4: per-epic `*test-design` focused on regression and integration risks. - - Gate (Phase 2): `*trace`; `*nfr-assess` (if not done earlier). - - For brownfield BMad Method, follow the same flow with `*nfr-assess` optional. + - Phase 2: baseline `trace`. + - Phase 3: system-level `test-design`, then `framework` and `ci`. + - Phase 4: per-epic `test-design` focused on regression and integration risks. + - Gate (Phase 2): `trace`; `nfr-assess` (if not done earlier). + - For brownfield BMad Method, follow the same flow with `nfr-assess` optional. 5. **Integrated: Greenfield - Enterprise Method (Enterprise/Compliance Work)** - - Phase 2: `*nfr-assess`. - - Phase 3: system-level `*test-design`, then `*framework` and `*ci`. - - Phase 4: per-epic `*test-design`, plus `*atdd`/`*automate`/`*test-review`. - - Gate (Phase 2): `*trace`; archive artifacts as needed. + - Phase 2: `nfr-assess`. + - Phase 3: system-level `test-design`, then `framework` and `ci`. + - Phase 4: per-epic `test-design`, plus `atdd`/`automate`/`test-review`. + - Gate (Phase 2): `trace`; archive artifacts as needed. If you are unsure, default to the integrated path for your track and adjust later. @@ -57,24 +57,24 @@ If you are unsure, default to the integrated path for your track and adjust late | Command | Primary Outputs | Notes | With Playwright MCP Enhancements | | -------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `*framework` | Playwright/Cypress scaffold, `.env.example`, `.nvmrc`, sample specs | Use when no production-ready harness exists | - | -| `*ci` | CI workflow, selective test scripts, secrets checklist | Platform-aware (GitHub Actions default) | - | -| `*test-design` | Combined risk assessment, mitigation plan, and coverage strategy | Risk scoring + optional exploratory mode | **+ Exploratory**: Interactive UI discovery with browser automation (uncover actual functionality) | -| `*atdd` | Failing acceptance tests + implementation checklist | TDD red phase + optional recording mode | **+ Recording**: UI selectors verified with live browser; API tests benefit from trace analysis | -| `*automate` | Prioritized specs, fixtures, README/script updates, DoD summary | Optional healing/recording, avoid duplicate coverage | **+ Healing**: Visual debugging + trace analysis for test fixes; **+ Recording**: Verified selectors (UI) + network inspection (API) | -| `*test-review` | Test quality review report with 0-100 score, violations, fixes | Reviews tests against knowledge base patterns | - | -| `*nfr-assess` | NFR assessment report with actions | Focus on security/performance/reliability | - | -| `*trace` | Phase 1: Coverage matrix, recommendations. Phase 2: Gate decision (PASS/CONCERNS/FAIL/WAIVED) | Two-phase workflow: traceability + gate decision | - | +| `framework` | Playwright/Cypress scaffold, `.env.example`, `.nvmrc`, sample specs | Use when no production-ready harness exists | - | +| `ci` | CI workflow, selective test scripts, secrets checklist | Platform-aware (GitHub Actions default) | - | +| `test-design` | Combined risk assessment, mitigation plan, and coverage strategy | Risk scoring + optional exploratory mode | **+ Exploratory**: Interactive UI discovery with browser automation (uncover actual functionality) | +| `atdd` | Failing acceptance tests + implementation checklist | TDD red phase + optional recording mode | **+ Recording**: UI selectors verified with live browser; API tests benefit from trace analysis | +| `automate` | Prioritized specs, fixtures, README/script updates, DoD summary | Optional healing/recording, avoid duplicate coverage | **+ Healing**: Visual debugging + trace analysis for test fixes; **+ Recording**: Verified selectors (UI) + network inspection (API) | +| `test-review` | Test quality review report with 0-100 score, violations, fixes | Reviews tests against knowledge base patterns | - | +| `nfr-assess` | NFR assessment report with actions | Focus on security/performance/reliability | - | +| `trace` | Phase 1: Coverage matrix, recommendations. Phase 2: Gate decision (PASS/CONCERNS/FAIL/WAIVED) | Two-phase workflow: traceability + gate decision | - | ## TEA Workflow Lifecycle **Phase Numbering Note:** BMad uses a 4-phase methodology with optional Phase 1 and a documentation prerequisite: -- **Documentation** (Optional for brownfield): Prerequisite using `*document-project` -- **Phase 1** (Optional): Discovery/Analysis (`*brainstorm`, `*research`, `*product-brief`) -- **Phase 2** (Required): Planning (`*prd` creates PRD with FRs/NFRs) -- **Phase 3** (Track-dependent): Solutioning (`*architecture` → `*test-design` (system-level) → `*create-epics-and-stories` → TEA: `*framework`, `*ci` → `*implementation-readiness`) -- **Phase 4** (Required): Implementation (`*sprint-planning` → per-epic: `*test-design` → per-story: dev workflows) +- **Documentation** (Optional for brownfield): Prerequisite using `document-project` +- **Phase 1** (Optional): Discovery/Analysis (`brainstorm`, `research`, `product-brief`) +- **Phase 2** (Required): Planning (`prd` creates PRD with FRs/NFRs) +- **Phase 3** (Track-dependent): Solutioning (`architecture` → `test-design` (system-level) → `create-epics-and-stories` → TEA: `framework`, `ci` → `implementation-readiness`) +- **Phase 4** (Required): Implementation (`sprint-planning` → per-epic: `test-design` → per-story: dev workflows) TEA integrates into the BMad development lifecycle during Solutioning (Phase 3) and Implementation (Phase 4): @@ -82,21 +82,21 @@ TEA integrates into the BMad development lifecycle during Solutioning (Phase 3) %%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#fff','primaryTextColor':'#000','primaryBorderColor':'#000','lineColor':'#000','secondaryColor':'#fff','tertiaryColor':'#fff','fontSize':'16px','fontFamily':'arial'}}}%% graph TB subgraph Phase2["Phase 2: PLANNING"] - PM["PM: *prd (creates PRD with FRs/NFRs)"] + PM["PM: prd (creates PRD with FRs/NFRs)"] PlanNote["Business requirements phase"] - NFR2["TEA: *nfr-assess (optional, enterprise)"] + NFR2["TEA: nfr-assess (optional, enterprise)"] PM -.-> NFR2 NFR2 -.-> PlanNote PM -.-> PlanNote end subgraph Phase3["Phase 3: SOLUTIONING"] - Architecture["Architect: *architecture"] - EpicsStories["PM/Architect: *create-epics-and-stories"] - TestDesignSys["TEA: *test-design (system-level)"] - Framework["TEA: *framework (optional if needed)"] - CI["TEA: *ci (optional if needed)"] - GateCheck["Architect: *implementation-readiness"] + Architecture["Architect: architecture"] + EpicsStories["PM/Architect: create-epics-and-stories"] + TestDesignSys["TEA: test-design (system-level)"] + Framework["TEA: framework (optional if needed)"] + CI["TEA: ci (optional if needed)"] + GateCheck["Architect: implementation-readiness"] Architecture --> EpicsStories Architecture --> TestDesignSys TestDesignSys --> Framework @@ -108,14 +108,14 @@ graph TB end subgraph Phase4["Phase 4: IMPLEMENTATION - Per Epic Cycle"] - SprintPlan["SM: *sprint-planning"] - TestDesign["TEA: *test-design (per epic)"] - CreateStory["SM: *create-story"] - ATDD["TEA: *atdd (optional, before dev)"] + SprintPlan["SM: sprint-planning"] + TestDesign["TEA: test-design (per epic)"] + CreateStory["SM: create-story"] + ATDD["TEA: atdd (optional, before dev)"] DevImpl["DEV: implements story"] - Automate["TEA: *automate"] - TestReview1["TEA: *test-review (optional)"] - Trace1["TEA: *trace (refresh coverage)"] + Automate["TEA: automate"] + TestReview1["TEA: test-review (optional)"] + Trace1["TEA: trace (refresh coverage)"] SprintPlan --> TestDesign TestDesign --> CreateStory @@ -130,9 +130,9 @@ graph TB end subgraph Gate["EPIC/RELEASE GATE"] - NFR["TEA: *nfr-assess (if not done earlier)"] - TestReview2["TEA: *test-review (final audit, optional)"] - TraceGate["TEA: *trace - Phase 2: Gate"] + NFR["TEA: nfr-assess (if not done earlier)"] + TestReview2["TEA: test-review (final audit, optional)"] + TraceGate["TEA: trace - Phase 2: Gate"] GateDecision{"Gate Decision"} NFR --> TestReview2 @@ -158,14 +158,14 @@ graph TB style Waived fill:#9c27b0,stroke:#4a148c,stroke-width:3px,color:#000 ``` -**TEA workflows:** `*framework` and `*ci` run once in Phase 3 after architecture. `*test-design` is **dual-mode**: +**TEA workflows:** `framework` and `ci` run once in Phase 3 after architecture. `test-design` is **dual-mode**: -- **System-level (Phase 3):** Run immediately after architecture/ADR drafting to produce `test-design-system.md` (testability review, ADR → test mapping, Architecturally Significant Requirements (ASRs), environment needs). Feeds the implementation-readiness gate. +- **System-level (Phase 3):** Run immediately after architecture/ADR drafting to produce TWO documents: `test-design-architecture.md` (for Architecture/Dev teams: testability gaps, ASRs, NFR requirements) + `test-design-qa.md` (for QA team: test execution recipe, coverage plan, Sprint 0 setup). Feeds the implementation-readiness gate. - **Epic-level (Phase 4):** Run per-epic to produce `test-design-epic-N.md` (risk, priorities, coverage plan). The Quick Flow track skips Phases 1 and 3. BMad Method and Enterprise use all phases based on project needs. -When an ADR or architecture draft is produced, run `*test-design` in **system-level** mode before the implementation-readiness gate. This ensures the ADR has an attached testability review and ADR → test mapping. Keep the test-design updated if ADRs change. +When an ADR or architecture draft is produced, run `test-design` in **system-level** mode before the implementation-readiness gate. This ensures the ADR has an attached testability review and ADR → test mapping. Keep the test-design updated if ADRs change. ## Why TEA Is Different from Other BMM Agents @@ -176,11 +176,11 @@ TEA spans multiple phases (Phase 3, Phase 4, and the release gate). Most BMM age | Phase | TEA Workflows | Frequency | Purpose | | ----------- | --------------------------------------------------------- | ---------------- | ------------------------------------------------------- | | **Phase 2** | (none) | - | Planning phase - PM defines requirements | -| **Phase 3** | \*test-design (system-level), \*framework, \*ci | Once per project | System testability review and test infrastructure setup | -| **Phase 4** | \*test-design, \*atdd, \*automate, \*test-review, \*trace | Per epic/story | Test planning per epic, then per-story testing | -| **Release** | \*nfr-assess, \*trace (Phase 2: gate) | Per epic/release | Go/no-go decision | +| **Phase 3** | `test-design` (system-level), `framework`, `ci` | Once per project | System testability review and test infrastructure setup | +| **Phase 4** | `test-design`, `atdd`, `automate`, `test-review`, `trace` | Per epic/story | Test planning per epic, then per-story testing | +| **Release** | `nfr-assess`, `trace` (Phase 2: gate) | Per epic/release | Go/no-go decision | -**Note**: `*trace` is a two-phase workflow: Phase 1 (traceability) + Phase 2 (gate decision). This reduces cognitive load while maintaining natural workflow. +**Note**: `trace` is a two-phase workflow: Phase 1 (traceability) + Phase 2 (gate decision). This reduces cognitive load while maintaining natural workflow. ### Why TEA Requires Its Own Knowledge Base @@ -211,19 +211,19 @@ These cheat sheets map TEA workflows to the **BMad Method and Enterprise tracks* | Workflow Stage | Test Architect | Dev / Team | Outputs | | -------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------- | -| **Phase 1**: Discovery | - | Analyst `*product-brief` (optional) | `product-brief.md` | -| **Phase 2**: Planning | - | PM `*prd` (creates PRD with FRs/NFRs) | PRD with functional/non-functional requirements | -| **Phase 3**: Solutioning | Run `*framework`, `*ci` AFTER architecture and epic creation | Architect `*architecture`, `*create-epics-and-stories`, `*implementation-readiness` | Architecture, epics/stories, test scaffold, CI pipeline | -| **Phase 4**: Sprint Start | - | SM `*sprint-planning` | Sprint status file with all epics and stories | -| **Phase 4**: Epic Planning | Run `*test-design` for THIS epic (per-epic test plan) | Review epic scope | `test-design-epic-N.md` with risk assessment and test plan | -| **Phase 4**: Story Dev | (Optional) `*atdd` before dev, then `*automate` after | SM `*create-story`, DEV implements | Tests, story implementation | -| **Phase 4**: Story Review | Execute `*test-review` (optional), re-run `*trace` | Address recommendations, update code/tests | Quality report, refreshed coverage matrix | -| **Phase 4**: Release Gate | (Optional) `*test-review` for final audit, Run `*trace` (Phase 2) | Confirm Definition of Done, share release notes | Quality audit, Gate YAML + release summary | +| **Phase 1**: Discovery | - | Analyst `product-brief` (optional) | `product-brief.md` | +| **Phase 2**: Planning | - | PM `prd` (creates PRD with FRs/NFRs) | PRD with functional/non-functional requirements | +| **Phase 3**: Solutioning | Run `framework`, `ci` AFTER architecture and epic creation | Architect `architecture`, `create-epics-and-stories`, `implementation-readiness` | Architecture, epics/stories, test scaffold, CI pipeline | +| **Phase 4**: Sprint Start | - | SM `sprint-planning` | Sprint status file with all epics and stories | +| **Phase 4**: Epic Planning | Run `test-design` for THIS epic (per-epic test plan) | Review epic scope | `test-design-epic-N.md` with risk assessment and test plan | +| **Phase 4**: Story Dev | (Optional) `atdd` before dev, then `automate` after | SM `create-story`, DEV implements | Tests, story implementation | +| **Phase 4**: Story Review | Execute `test-review` (optional), re-run `trace` | Address recommendations, update code/tests | Quality report, refreshed coverage matrix | +| **Phase 4**: Release Gate | (Optional) `test-review` for final audit, Run `trace` (Phase 2) | Confirm Definition of Done, share release notes | Quality audit, Gate YAML + release summary | **Key notes:** -- Run `*framework` and `*ci` once in Phase 3 after architecture. -- Run `*test-design` per epic in Phase 4; use `*atdd` before dev when helpful. -- Use `*trace` for gate decisions; `*test-review` is an optional audit. +- Run `framework` and `ci` once in Phase 3 after architecture. +- Run `test-design` per epic in Phase 4; use `atdd` before dev when helpful. +- Use `trace` for gate decisions; `test-review` is an optional audit. ### Brownfield - BMad Method or Enterprise (Simple or Complex) @@ -233,26 +233,26 @@ These cheat sheets map TEA workflows to the **BMad Method and Enterprise tracks* **🔄 Brownfield Deltas from Greenfield:** - ➕ Documentation (Prerequisite) - Document existing codebase if undocumented -- ➕ Phase 2: `*trace` - Baseline existing test coverage before planning -- 🔄 Phase 4: `*test-design` - Focus on regression hotspots and brownfield risks -- 🔄 Phase 4: Story Review - May include `*nfr-assess` if not done earlier +- ➕ Phase 2: `trace` - Baseline existing test coverage before planning +- 🔄 Phase 4: `test-design` - Focus on regression hotspots and brownfield risks +- 🔄 Phase 4: Story Review - May include `nfr-assess` if not done earlier | Workflow Stage | Test Architect | Dev / Team | Outputs | | --------------------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| **Documentation**: Prerequisite ➕ | - | Analyst `*document-project` (if undocumented) | Comprehensive project documentation | -| **Phase 1**: Discovery | - | Analyst/PM/Architect rerun planning workflows | Updated planning artifacts in `{output_folder}` | -| **Phase 2**: Planning | Run ➕ `*trace` (baseline coverage) | PM `*prd` (creates PRD with FRs/NFRs) | PRD with FRs/NFRs, ➕ coverage baseline | -| **Phase 3**: Solutioning | Run `*framework`, `*ci` AFTER architecture and epic creation | Architect `*architecture`, `*create-epics-and-stories`, `*implementation-readiness` | Architecture, epics/stories, test framework, CI pipeline | -| **Phase 4**: Sprint Start | - | SM `*sprint-planning` | Sprint status file with all epics and stories | -| **Phase 4**: Epic Planning | Run `*test-design` for THIS epic 🔄 (regression hotspots) | Review epic scope and brownfield risks | `test-design-epic-N.md` with brownfield risk assessment and mitigation | -| **Phase 4**: Story Dev | (Optional) `*atdd` before dev, then `*automate` after | SM `*create-story`, DEV implements | Tests, story implementation | -| **Phase 4**: Story Review | Apply `*test-review` (optional), re-run `*trace`, ➕ `*nfr-assess` if needed | Resolve gaps, update docs/tests | Quality report, refreshed coverage matrix, NFR report | -| **Phase 4**: Release Gate | (Optional) `*test-review` for final audit, Run `*trace` (Phase 2) | Capture sign-offs, share release notes | Quality audit, Gate YAML + release summary | +| **Documentation**: Prerequisite ➕ | - | Analyst `document-project` (if undocumented) | Comprehensive project documentation | +| **Phase 1**: Discovery | - | Analyst/PM/Architect rerun planning workflows | Updated planning artifacts in `{output_folder}` | +| **Phase 2**: Planning | Run ➕ `trace` (baseline coverage) | PM `prd` (creates PRD with FRs/NFRs) | PRD with FRs/NFRs, ➕ coverage baseline | +| **Phase 3**: Solutioning | Run `framework`, `ci` AFTER architecture and epic creation | Architect `architecture`, `create-epics-and-stories`, `implementation-readiness` | Architecture, epics/stories, test framework, CI pipeline | +| **Phase 4**: Sprint Start | - | SM `sprint-planning` | Sprint status file with all epics and stories | +| **Phase 4**: Epic Planning | Run `test-design` for THIS epic 🔄 (regression hotspots) | Review epic scope and brownfield risks | `test-design-epic-N.md` with brownfield risk assessment and mitigation | +| **Phase 4**: Story Dev | (Optional) `atdd` before dev, then `automate` after | SM `create-story`, DEV implements | Tests, story implementation | +| **Phase 4**: Story Review | Apply `test-review` (optional), re-run `trace`, ➕ `nfr-assess` if needed | Resolve gaps, update docs/tests | Quality report, refreshed coverage matrix, NFR report | +| **Phase 4**: Release Gate | (Optional) `test-review` for final audit, Run `trace` (Phase 2) | Capture sign-offs, share release notes | Quality audit, Gate YAML + release summary | **Key notes:** -- Start with `*trace` in Phase 2 to baseline coverage. -- Focus `*test-design` on regression hotspots and integration risk. -- Run `*nfr-assess` before the gate if it wasn't done earlier. +- Start with `trace` in Phase 2 to baseline coverage. +- Focus `test-design` on regression hotspots and integration risk. +- Run `nfr-assess` before the gate if it wasn't done earlier. ### Greenfield - Enterprise Method (Enterprise/Compliance Work) @@ -261,54 +261,54 @@ These cheat sheets map TEA workflows to the **BMad Method and Enterprise tracks* **🏢 Enterprise Deltas from BMad Method:** -- ➕ Phase 1: `*research` - Domain and compliance research (recommended) -- ➕ Phase 2: `*nfr-assess` - Capture NFR requirements early (security/performance/reliability) -- 🔄 Phase 4: `*test-design` - Enterprise focus (compliance, security architecture alignment) +- ➕ Phase 1: `research` - Domain and compliance research (recommended) +- ➕ Phase 2: `nfr-assess` - Capture NFR requirements early (security/performance/reliability) +- 🔄 Phase 4: `test-design` - Enterprise focus (compliance, security architecture alignment) - 📦 Release Gate - Archive artifacts and compliance evidence for audits | Workflow Stage | Test Architect | Dev / Team | Outputs | | -------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------ | -| **Phase 1**: Discovery | - | Analyst ➕ `*research`, `*product-brief` | Domain research, compliance analysis, product brief | -| **Phase 2**: Planning | Run ➕ `*nfr-assess` | PM `*prd` (creates PRD with FRs/NFRs), UX `*create-ux-design` | Enterprise PRD with FRs/NFRs, UX design, ➕ NFR documentation | -| **Phase 3**: Solutioning | Run `*framework`, `*ci` AFTER architecture and epic creation | Architect `*architecture`, `*create-epics-and-stories`, `*implementation-readiness` | Architecture, epics/stories, test framework, CI pipeline | -| **Phase 4**: Sprint Start | - | SM `*sprint-planning` | Sprint plan with all epics | -| **Phase 4**: Epic Planning | Run `*test-design` for THIS epic 🔄 (compliance focus) | Review epic scope and compliance requirements | `test-design-epic-N.md` with security/performance/compliance focus | -| **Phase 4**: Story Dev | (Optional) `*atdd`, `*automate`, `*test-review`, `*trace` per story | SM `*create-story`, DEV implements | Tests, fixtures, quality reports, coverage matrices | -| **Phase 4**: Release Gate | Final `*test-review` audit, Run `*trace` (Phase 2), 📦 archive artifacts | Capture sign-offs, 📦 compliance evidence | Quality audit, updated assessments, gate YAML, 📦 audit trail | +| **Phase 1**: Discovery | - | Analyst ➕ `research`, `product-brief` | Domain research, compliance analysis, product brief | +| **Phase 2**: Planning | Run ➕ `nfr-assess` | PM `prd` (creates PRD with FRs/NFRs), UX `create-ux-design` | Enterprise PRD with FRs/NFRs, UX design, ➕ NFR documentation | +| **Phase 3**: Solutioning | Run `framework`, `ci` AFTER architecture and epic creation | Architect `architecture`, `create-epics-and-stories`, `implementation-readiness` | Architecture, epics/stories, test framework, CI pipeline | +| **Phase 4**: Sprint Start | - | SM `sprint-planning` | Sprint plan with all epics | +| **Phase 4**: Epic Planning | Run `test-design` for THIS epic 🔄 (compliance focus) | Review epic scope and compliance requirements | `test-design-epic-N.md` with security/performance/compliance focus | +| **Phase 4**: Story Dev | (Optional) `atdd`, `automate`, `test-review`, `trace` per story | SM `create-story`, DEV implements | Tests, fixtures, quality reports, coverage matrices | +| **Phase 4**: Release Gate | Final `test-review` audit, Run `trace` (Phase 2), 📦 archive artifacts | Capture sign-offs, 📦 compliance evidence | Quality audit, updated assessments, gate YAML, 📦 audit trail | **Key notes:** -- Run `*nfr-assess` early in Phase 2. -- `*test-design` emphasizes compliance, security, and performance alignment. +- Run `nfr-assess` early in Phase 2. +- `test-design` emphasizes compliance, security, and performance alignment. - Archive artifacts at the release gate for audits. **Related how-to guides:** -- [How to Run Test Design](/docs/how-to/workflows/run-test-design.md) -- [How to Set Up a Test Framework](/docs/how-to/workflows/setup-test-framework.md) -- [How to Run ATDD](/docs/how-to/workflows/run-atdd.md) -- [How to Run Automate](/docs/how-to/workflows/run-automate.md) -- [How to Run Test Review](/docs/how-to/workflows/run-test-review.md) -- [How to Set Up CI Pipeline](/docs/how-to/workflows/setup-ci.md) -- [How to Run NFR Assessment](/docs/how-to/workflows/run-nfr-assess.md) -- [How to Run Trace](/docs/how-to/workflows/run-trace.md) +- [How to Run Test Design](/docs/tea/how-to/workflows/run-test-design.md) +- [How to Set Up a Test Framework](/docs/tea/how-to/workflows/setup-test-framework.md) +- [How to Run ATDD](/docs/tea/how-to/workflows/run-atdd.md) +- [How to Run Automate](/docs/tea/how-to/workflows/run-automate.md) +- [How to Run Test Review](/docs/tea/how-to/workflows/run-test-review.md) +- [How to Set Up CI Pipeline](/docs/tea/how-to/workflows/setup-ci.md) +- [How to Run NFR Assessment](/docs/tea/how-to/workflows/run-nfr-assess.md) +- [How to Run Trace](/docs/tea/how-to/workflows/run-trace.md) ## Deep Dive Concepts Want to understand TEA principles and patterns in depth? **Core Principles:** -- [Risk-Based Testing](/docs/explanation/tea/risk-based-testing.md) - Probability × impact scoring, P0-P3 priorities -- [Test Quality Standards](/docs/explanation/tea/test-quality-standards.md) - Definition of Done, determinism, isolation -- [Knowledge Base System](/docs/explanation/tea/knowledge-base-system.md) - Context engineering with tea-index.csv +- [Risk-Based Testing](/docs/tea/explanation/risk-based-testing.md) - Probability × impact scoring, P0-P3 priorities +- [Test Quality Standards](/docs/tea/explanation/test-quality-standards.md) - Definition of Done, determinism, isolation +- [Knowledge Base System](/docs/tea/explanation/knowledge-base-system.md) - Context engineering with tea-index.csv **Technical Patterns:** -- [Fixture Architecture](/docs/explanation/tea/fixture-architecture.md) - Pure function → fixture → composition -- [Network-First Patterns](/docs/explanation/tea/network-first-patterns.md) - Eliminating flakiness with intercept-before-navigate +- [Fixture Architecture](/docs/tea/explanation/fixture-architecture.md) - Pure function → fixture → composition +- [Network-First Patterns](/docs/tea/explanation/network-first-patterns.md) - Eliminating flakiness with intercept-before-navigate **Engagement & Strategy:** -- [Engagement Models](/docs/explanation/tea/engagement-models.md) - TEA Lite, TEA Solo, TEA Integrated (5 models explained) +- [Engagement Models](/docs/tea/explanation/engagement-models.md) - TEA Lite, TEA Solo, TEA Integrated (5 models explained) **Philosophy:** -- [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md) - **Start here to understand WHY TEA exists** - The problem with AI-generated tests and TEA's three-part solution +- [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md) - **Start here to understand WHY TEA exists** - The problem with AI-generated tests and TEA's three-part solution ## Optional Integrations @@ -318,7 +318,7 @@ Production-ready fixtures and utilities that enhance TEA workflows. - Install: `npm install -D @seontechnologies/playwright-utils` > Note: Playwright Utils is enabled via the installer. Only set `tea_use_playwright_utils` in `_bmad/bmm/config.yaml` if you need to override the installer choice. -- Impacts: `*framework`, `*atdd`, `*automate`, `*test-review`, `*ci` +- Impacts: `framework`, `atdd`, `automate`, `test-review`, `ci` - Utilities include: api-request, auth-session, network-recorder, intercept-network-call, recurse, log, file-utils, burn-in, network-error-monitor, fixtures-composition ### Playwright MCP Enhancements @@ -347,8 +347,8 @@ Live browser verification for test design and automation. } ``` -- Helps `*test-design` validate actual UI behavior. -- Helps `*atdd` and `*automate` verify selectors against the live DOM. +- Helps `test-design` validate actual UI behavior. +- Helps `atdd` and `automate` verify selectors against the live DOM. - Enhances healing with `browser_snapshot`, console, network, and locator tools. **To disable**: set `tea_use_mcp_enhancements: false` in `_bmad/bmm/config.yaml` or remove MCPs from IDE config. @@ -360,51 +360,51 @@ Live browser verification for test design and automation. ### Start Here **New to TEA? Start with the tutorial:** -- [TEA Lite Quickstart Tutorial](/docs/tutorials/getting-started/tea-lite-quickstart.md) - 30-minute beginner guide using TodoMVC +- [TEA Lite Quickstart Tutorial](/docs/tea/tutorials/tea-lite-quickstart.md) - 30-minute beginner guide using TodoMVC ### Workflow Guides (Task-Oriented) **All 8 TEA workflows with step-by-step instructions:** -1. [How to Set Up a Test Framework with TEA](/docs/how-to/workflows/setup-test-framework.md) - Scaffold Playwright or Cypress -2. [How to Set Up CI Pipeline with TEA](/docs/how-to/workflows/setup-ci.md) - Configure CI/CD with selective testing -3. [How to Run Test Design with TEA](/docs/how-to/workflows/run-test-design.md) - Risk-based test planning (system or epic) -4. [How to Run ATDD with TEA](/docs/how-to/workflows/run-atdd.md) - Generate failing tests before implementation -5. [How to Run Automate with TEA](/docs/how-to/workflows/run-automate.md) - Expand test coverage after implementation -6. [How to Run Test Review with TEA](/docs/how-to/workflows/run-test-review.md) - Audit test quality (0-100 scoring) -7. [How to Run NFR Assessment with TEA](/docs/how-to/workflows/run-nfr-assess.md) - Validate non-functional requirements -8. [How to Run Trace with TEA](/docs/how-to/workflows/run-trace.md) - Coverage traceability + gate decisions +1. [How to Set Up a Test Framework with TEA](/docs/tea/how-to/workflows/setup-test-framework.md) - Scaffold Playwright or Cypress +2. [How to Set Up CI Pipeline with TEA](/docs/tea/how-to/workflows/setup-ci.md) - Configure CI/CD with selective testing +3. [How to Run Test Design with TEA](/docs/tea/how-to/workflows/run-test-design.md) - Risk-based test planning (system or epic) +4. [How to Run ATDD with TEA](/docs/tea/how-to/workflows/run-atdd.md) - Generate failing tests before implementation +5. [How to Run Automate with TEA](/docs/tea/how-to/workflows/run-automate.md) - Expand test coverage after implementation +6. [How to Run Test Review with TEA](/docs/tea/how-to/workflows/run-test-review.md) - Audit test quality (0-100 scoring) +7. [How to Run NFR Assessment with TEA](/docs/tea/how-to/workflows/run-nfr-assess.md) - Validate non-functional requirements +8. [How to Run Trace with TEA](/docs/tea/how-to/workflows/run-trace.md) - Coverage traceability + gate decisions ### Customization & Integration **Optional enhancements to TEA workflows:** -- [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md) - Production-ready fixtures and 9 utilities -- [Enable TEA MCP Enhancements](/docs/how-to/customization/enable-tea-mcp-enhancements.md) - Live browser verification, visual debugging +- [Integrate Playwright Utils](/docs/tea/how-to/customization/integrate-playwright-utils.md) - Production-ready fixtures and 9 utilities +- [Enable TEA MCP Enhancements](/docs/tea/how-to/customization/enable-tea-mcp-enhancements.md) - Live browser verification, visual debugging ### Use-Case Guides **Specialized guidance for specific contexts:** -- [Using TEA with Existing Tests (Brownfield)](/docs/how-to/brownfield/use-tea-with-existing-tests.md) - Incremental improvement, regression hotspots, baseline coverage -- [Running TEA for Enterprise](/docs/how-to/brownfield/use-tea-for-enterprise.md) - Compliance, NFR assessment, audit trails, SOC 2/HIPAA +- [Using TEA with Existing Tests (Brownfield)](/docs/tea/how-to/brownfield/use-tea-with-existing-tests.md) - Incremental improvement, regression hotspots, baseline coverage +- [Running TEA for Enterprise](/docs/tea/how-to/brownfield/use-tea-for-enterprise.md) - Compliance, NFR assessment, audit trails, SOC 2/HIPAA ### Concept Deep Dives (Understanding-Oriented) **Understand the principles and patterns:** -- [Risk-Based Testing](/docs/explanation/tea/risk-based-testing.md) - Probability × impact scoring, P0-P3 priorities, mitigation strategies -- [Test Quality Standards](/docs/explanation/tea/test-quality-standards.md) - Definition of Done, determinism, isolation, explicit assertions -- [Fixture Architecture](/docs/explanation/tea/fixture-architecture.md) - Pure function → fixture → composition pattern -- [Network-First Patterns](/docs/explanation/tea/network-first-patterns.md) - Intercept-before-navigate, eliminating flakiness -- [Knowledge Base System](/docs/explanation/tea/knowledge-base-system.md) - Context engineering with tea-index.csv, 33 fragments -- [Engagement Models](/docs/explanation/tea/engagement-models.md) - TEA Lite, TEA Solo, TEA Integrated (5 models explained) +- [Risk-Based Testing](/docs/tea/explanation/risk-based-testing.md) - Probability × impact scoring, P0-P3 priorities, mitigation strategies +- [Test Quality Standards](/docs/tea/explanation/test-quality-standards.md) - Definition of Done, determinism, isolation, explicit assertions +- [Fixture Architecture](/docs/tea/explanation/fixture-architecture.md) - Pure function → fixture → composition pattern +- [Network-First Patterns](/docs/tea/explanation/network-first-patterns.md) - Intercept-before-navigate, eliminating flakiness +- [Knowledge Base System](/docs/tea/explanation/knowledge-base-system.md) - Context engineering with tea-index.csv, 33 fragments +- [Engagement Models](/docs/tea/explanation/engagement-models.md) - TEA Lite, TEA Solo, TEA Integrated (5 models explained) ### Philosophy & Design **Why TEA exists and how it works:** -- [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md) - **Start here to understand WHY** - The problem with AI-generated tests and TEA's three-part solution +- [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md) - **Start here to understand WHY** - The problem with AI-generated tests and TEA's three-part solution ### Reference (Quick Lookup) **Factual information for quick reference:** -- [TEA Command Reference](/docs/reference/tea/commands.md) - All 8 workflows: inputs, outputs, phases, frequency -- [TEA Configuration Reference](/docs/reference/tea/configuration.md) - Config options, file locations, setup examples -- [Knowledge Base Index](/docs/reference/tea/knowledge-base.md) - 33 fragments categorized and explained -- [Glossary - TEA Section](/docs/reference/glossary/index.md#test-architect-tea-concepts) - 20 TEA-specific terms defined +- [TEA Command Reference](/docs/tea/reference/commands.md) - All 8 workflows: inputs, outputs, phases, frequency +- [TEA Configuration Reference](/docs/tea/reference/configuration.md) - Config options, file locations, setup examples +- [Knowledge Base Index](/docs/tea/reference/knowledge-base.md) - 33 fragments categorized and explained +- [Glossary - TEA Section](/docs/tea/glossary/index.md#test-architect-tea-concepts) - 20 TEA-specific terms defined diff --git a/docs/explanation/tea/test-quality-standards.md b/docs/tea/explanation/test-quality-standards.md similarity index 93% rename from docs/explanation/tea/test-quality-standards.md rename to docs/tea/explanation/test-quality-standards.md index da1fdae4..987c603e 100644 --- a/docs/explanation/tea/test-quality-standards.md +++ b/docs/tea/explanation/test-quality-standards.md @@ -513,7 +513,7 @@ test('fast test', async ({ page, interceptNetworkCall }) => { ## TEA's Quality Scoring -TEA reviews tests against these standards in `*test-review`: +TEA reviews tests against these standards in `test-review`: ### Scoring Categories (100 points total) @@ -725,7 +725,7 @@ test('should create user with valid data', async ({ apiRequest }) => { ## How TEA Enforces Standards -### During Test Generation (`*atdd`, `*automate`) +### During Test Generation (`atdd`, `automate`) TEA generates tests following standards by default: @@ -755,7 +755,7 @@ test('should submit contact form', async ({ page }) => { }); ``` -### During Test Review (*test-review) +### During Test Review (`test-review`) TEA audits tests and flags violations: @@ -800,7 +800,7 @@ When is a test "done"? **Code Review DoD:** - [ ] Test quality score > 80 -- [ ] No critical issues from `*test-review` +- [ ] No critical issues from `test-review` - [ ] Follows project patterns (fixtures, selectors) - [ ] Test reviewed by team member @@ -866,41 +866,41 @@ test('should work with optional button', async ({ page }) => { ## Technical Implementation For detailed test quality patterns, see: -- [Test Quality Fragment](/docs/reference/tea/knowledge-base.md#quality-standards) -- [Test Levels Framework Fragment](/docs/reference/tea/knowledge-base.md#quality-standards) -- [Complete Knowledge Base Index](/docs/reference/tea/knowledge-base.md) +- [Test Quality Fragment](/docs/tea/reference/knowledge-base.md#quality-standards) +- [Test Levels Framework Fragment](/docs/tea/reference/knowledge-base.md#quality-standards) +- [Complete Knowledge Base Index](/docs/tea/reference/knowledge-base.md) ## Related Concepts **Core TEA Concepts:** -- [Risk-Based Testing](/docs/explanation/tea/risk-based-testing.md) - Quality scales with risk -- [Knowledge Base System](/docs/explanation/tea/knowledge-base-system.md) - How standards are enforced -- [Engagement Models](/docs/explanation/tea/engagement-models.md) - Quality in different models +- [Risk-Based Testing](/docs/tea/explanation/risk-based-testing.md) - Quality scales with risk +- [Knowledge Base System](/docs/tea/explanation/knowledge-base-system.md) - How standards are enforced +- [Engagement Models](/docs/tea/explanation/engagement-models.md) - Quality in different models **Technical Patterns:** -- [Network-First Patterns](/docs/explanation/tea/network-first-patterns.md) - Determinism explained -- [Fixture Architecture](/docs/explanation/tea/fixture-architecture.md) - Isolation through fixtures +- [Network-First Patterns](/docs/tea/explanation/network-first-patterns.md) - Determinism explained +- [Fixture Architecture](/docs/tea/explanation/fixture-architecture.md) - Isolation through fixtures **Overview:** -- [TEA Overview](/docs/explanation/features/tea-overview.md) - Quality standards in lifecycle -- [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md) - Why quality matters +- [TEA Overview](/docs/tea/explanation/tea-overview.md) - Quality standards in lifecycle +- [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md) - Why quality matters ## Practical Guides **Workflow Guides:** -- [How to Run Test Review](/docs/how-to/workflows/run-test-review.md) - Audit against these standards -- [How to Run ATDD](/docs/how-to/workflows/run-atdd.md) - Generate quality tests -- [How to Run Automate](/docs/how-to/workflows/run-automate.md) - Expand with quality +- [How to Run Test Review](/docs/tea/how-to/workflows/run-test-review.md) - Audit against these standards +- [How to Run ATDD](/docs/tea/how-to/workflows/run-atdd.md) - Generate quality tests +- [How to Run Automate](/docs/tea/how-to/workflows/run-automate.md) - Expand with quality **Use-Case Guides:** -- [Using TEA with Existing Tests](/docs/how-to/brownfield/use-tea-with-existing-tests.md) - Improve legacy quality -- [Running TEA for Enterprise](/docs/how-to/brownfield/use-tea-for-enterprise.md) - Enterprise quality thresholds +- [Using TEA with Existing Tests](/docs/tea/how-to/brownfield/use-tea-with-existing-tests.md) - Improve legacy quality +- [Running TEA for Enterprise](/docs/tea/how-to/brownfield/use-tea-for-enterprise.md) - Enterprise quality thresholds ## Reference -- [TEA Command Reference](/docs/reference/tea/commands.md) - *test-review command -- [Knowledge Base Index](/docs/reference/tea/knowledge-base.md) - Test quality fragment -- [Glossary](/docs/reference/glossary/index.md#test-architect-tea-concepts) - TEA terminology +- [TEA Command Reference](/docs/tea/reference/commands.md) - `test-review` command +- [Knowledge Base Index](/docs/tea/reference/knowledge-base.md) - Test quality fragment +- [Glossary](/docs/tea/glossary/index.md#test-architect-tea-concepts) - TEA terminology --- diff --git a/docs/explanation/philosophy/testing-as-engineering.md b/docs/tea/explanation/testing-as-engineering.md similarity index 89% rename from docs/explanation/philosophy/testing-as-engineering.md rename to docs/tea/explanation/testing-as-engineering.md index 7b8db5a4..8e2655e4 100644 --- a/docs/explanation/philosophy/testing-as-engineering.md +++ b/docs/tea/explanation/testing-as-engineering.md @@ -55,14 +55,14 @@ A quality operating model packaged as eight executable workflows spanning test d | Workflow | Purpose | |----------|---------| -| `*test-design` | Risk-based test planning per epic | -| `*framework` | Scaffold production-ready test infrastructure | -| `*ci` | CI pipeline with selective testing | -| `*atdd` | Acceptance test-driven development | -| `*automate` | Prioritized test automation | -| `*test-review` | Test quality audits (0-100 score) | -| `*nfr-assess` | Non-functional requirements assessment | -| `*trace` | Coverage traceability and gate decisions | +| `test-design` | Risk-based test planning per epic | +| `framework` | Scaffold production-ready test infrastructure | +| `ci` | CI pipeline with selective testing | +| `atdd` | Acceptance test-driven development | +| `automate` | Prioritized test automation | +| `test-review` | Test quality audits (0-100 score) | +| `nfr-assess` | Non-functional requirements assessment | +| `trace` | Coverage traceability and gate decisions | :::tip[Key Insight] TEA doesn't just generate tests—it provides a complete quality operating model with workflows for planning, execution, and release gates. @@ -105,8 +105,8 @@ The three-part stack addresses each gap: | Gap | Solution | |-----|----------| | No standards | Playwright-Utils provides production-ready patterns | -| No planning | TEA `*test-design` workflow creates risk-based test plans | +| No planning | TEA `test-design` creates risk-based test plans | | No verification | Playwright MCPs validate against live applications | -| No review | TEA `*test-review` audits quality with scoring | +| No review | TEA `test-review` audits quality with scoring | This approach is sometimes called *context engineering*—loading domain-specific standards into AI context automatically rather than relying on prompts alone. TEA's `tea-index.csv` manifest loads relevant knowledge fragments so the AI doesn't relearn testing patterns each session. diff --git a/docs/reference/glossary/index.md b/docs/tea/glossary/index.md similarity index 96% rename from docs/reference/glossary/index.md rename to docs/tea/glossary/index.md index 10624030..3d48d83c 100644 --- a/docs/reference/glossary/index.md +++ b/docs/tea/glossary/index.md @@ -101,7 +101,7 @@ Terminology reference for the BMad Method. | **Story** | Single unit of implementable work with clear acceptance criteria, typically 2-8 hours of effort. Grouped into epics. | | **Story Context** | Implementation guidance embedded in story files during create-story, referencing existing patterns and approaches. | | **Story File** | Markdown file containing story description, acceptance criteria, technical notes, and testing requirements. | -| **Track Selection** | Automatic analysis by workflow-init suggesting appropriate track based on complexity indicators. User can override. | +| **Track Selection** | Automatic analysis by `bmad-help` suggesting appropriate track based on complexity indicators. User can override. | ## Game Development Terms @@ -141,7 +141,7 @@ Terminology reference for the BMad Method. | **System-Level Test Design** | Test planning at architecture level (Phase 3) focusing on testability review, ADR mapping, and test infrastructure needs. | | **tea-index.csv** | Manifest file tracking all knowledge fragments, their descriptions, tags, and which workflows load them. | | **TEA Integrated** | Full BMad Method integration with TEA workflows across all phases (Phase 2, 3, 4, and Release Gate). | -| **TEA Lite** | Beginner approach using just `*automate` workflow to test existing features (simplest way to use TEA). | +| **TEA Lite** | Beginner approach using just `automate` to test existing features (simplest way to use TEA). | | **TEA Solo** | Standalone engagement model using TEA without full BMad Method integration (bring your own requirements). | | **Test Priorities** | Classification system for test importance: P0 (critical path), P1 (high value), P2 (medium value), P3 (low value). | @@ -149,10 +149,10 @@ Terminology reference for the BMad Method. ## See Also -- [TEA Overview](/docs/explanation/features/tea-overview.md) - Complete TEA capabilities -- [TEA Knowledge Base](/docs/reference/tea/knowledge-base.md) - Fragment index -- [TEA Command Reference](/docs/reference/tea/commands.md) - Workflow reference -- [TEA Configuration](/docs/reference/tea/configuration.md) - Config options +- [TEA Overview](/docs/tea/explanation/tea-overview.md) - Complete TEA capabilities +- [TEA Knowledge Base](/docs/tea/reference/knowledge-base.md) - Fragment index +- [TEA Command Reference](/docs/tea/reference/commands.md) - Workflow reference +- [TEA Configuration](/docs/tea/reference/configuration.md) - Config options --- diff --git a/docs/how-to/brownfield/use-tea-for-enterprise.md b/docs/tea/how-to/brownfield/use-tea-for-enterprise.md similarity index 86% rename from docs/how-to/brownfield/use-tea-for-enterprise.md rename to docs/tea/how-to/brownfield/use-tea-for-enterprise.md index 5285153c..9ca7add2 100644 --- a/docs/how-to/brownfield/use-tea-for-enterprise.md +++ b/docs/tea/how-to/brownfield/use-tea-for-enterprise.md @@ -24,7 +24,7 @@ Use TEA on enterprise projects with compliance, security, audit, and regulatory ## Enterprise-Specific TEA Workflows -### NFR Assessment (*nfr-assess) +### NFR Assessment (`nfr-assess`) **Purpose:** Validate non-functional requirements with evidence. @@ -38,7 +38,7 @@ Use TEA on enterprise projects with compliance, security, audit, and regulatory **Example:** ``` -*nfr-assess +nfr-assess Categories: Security, Performance, Reliability, Maintainability @@ -56,7 +56,7 @@ Evidence: **Output:** NFR assessment with PASS/CONCERNS/FAIL for each category. -### Trace with Audit Evidence (*trace) +### Trace with Audit Evidence (`trace`) **Purpose:** Requirements traceability with audit trail. @@ -69,7 +69,7 @@ Evidence: **Example:** ``` -*trace Phase 1 +trace Phase 1 Requirements: PRD.md (with compliance requirements) Test location: tests/ @@ -83,7 +83,7 @@ Output: traceability-matrix.md with: **For Release Gate:** ``` -*trace Phase 2 +trace Phase 2 Generate gate-decision-{gate_type}-{story_id}.md with: - Evidence references @@ -92,7 +92,7 @@ Generate gate-decision-{gate_type}-{story_id}.md with: - Decision rationale ``` -### Test Design with Compliance Focus (*test-design) +### Test Design with Compliance Focus (`test-design`) **Purpose:** Risk assessment with compliance and security focus. @@ -105,7 +105,7 @@ Generate gate-decision-{gate_type}-{story_id}.md with: **Example:** ``` -*test-design +test-design Mode: System-level @@ -114,10 +114,9 @@ Focus areas: - Performance requirements (SLA: P99 <200ms) - Compliance (HIPAA PHI handling, audit logging) -Output: test-design-system.md with: -- Security testing strategy -- Compliance requirement → test mapping -- Performance testing plan +Output: TWO documents (system-level): +- `test-design-architecture.md`: Security gaps, compliance requirements, performance SLOs for Architecture team +- `test-design-qa.md`: Security testing strategy, compliance test mapping, performance testing plan for QA team - Audit logging validation ``` @@ -127,7 +126,7 @@ Output: test-design-system.md with: **Research compliance requirements:** ``` -Analyst: *research +Analyst: research Topics: - Industry compliance (SOC 2, HIPAA, GDPR) @@ -139,7 +138,7 @@ Topics: **1. Define NFRs early:** ``` -PM: *prd +PM: prd Include in PRD: - Security requirements (authentication, encryption) @@ -150,7 +149,7 @@ Include in PRD: **2. Assess NFRs:** ``` -TEA: *nfr-assess +TEA: nfr-assess Categories: All (Security, Performance, Reliability, Maintainability) @@ -162,7 +161,7 @@ Output: nfr-assessment.md **3. Baseline (brownfield only):** ``` -TEA: *trace Phase 1 +TEA: trace Phase 1 Establish baseline coverage before new work ``` @@ -171,9 +170,9 @@ Establish baseline coverage before new work **1. Architecture with testability review:** ``` -Architect: *architecture +Architect: architecture -TEA: *test-design (system-level) +TEA: test-design (system-level) Focus: - Security architecture testability @@ -183,7 +182,7 @@ Focus: **2. Test infrastructure:** ``` -TEA: *framework +TEA: framework Requirements: - Separate test environments (dev, staging, prod-mirror) @@ -193,7 +192,7 @@ Requirements: **3. CI/CD with compliance:** ``` -TEA: *ci +TEA: ci Requirements: - Secrets management (Vault, AWS Secrets Manager) @@ -206,21 +205,21 @@ Requirements: **Per epic:** ``` -1. TEA: *test-design (epic-level) +1. TEA: test-design (epic-level) Focus: Compliance, security, performance for THIS epic -2. TEA: *atdd (optional) +2. TEA: atdd (optional) Generate tests including security/compliance scenarios 3. DEV: Implement story -4. TEA: *automate +4. TEA: automate Expand coverage including compliance edge cases -5. TEA: *test-review +5. TEA: test-review Audit quality (score >80 per epic, rises to >85 at release) -6. TEA: *trace Phase 1 +6. TEA: trace Phase 1 Refresh coverage, verify compliance requirements tested ``` @@ -228,7 +227,7 @@ Requirements: **1. Final NFR assessment:** ``` -TEA: *nfr-assess +TEA: nfr-assess All categories (if not done earlier) Latest evidence (performance tests, security scans) @@ -236,7 +235,7 @@ Latest evidence (performance tests, security scans) **2. Final quality audit:** ``` -TEA: *test-review tests/ +TEA: test-review tests/ Full suite review Quality target: >85 for enterprise @@ -244,7 +243,7 @@ Quality target: >85 for enterprise **3. Gate decision:** ``` -TEA: *trace Phase 2 +TEA: trace Phase 2 Evidence required: - traceability-matrix.md (from Phase 1) @@ -375,7 +374,7 @@ compliance/ **Priority 1:** Security requirements ``` 1. Document all security requirements -2. Generate security tests with *atdd +2. Generate security tests with `atdd` 3. Run security test suite 4. Pass security audit BEFORE moving forward ``` @@ -496,30 +495,30 @@ testWithAuth('admin can access admin endpoint', async ({ apiRequest, authToken, ## Related Guides **Workflow Guides:** -- [How to Run NFR Assessment](/docs/how-to/workflows/run-nfr-assess.md) - Deep dive on NFRs -- [How to Run Trace](/docs/how-to/workflows/run-trace.md) - Gate decisions with evidence -- [How to Run Test Review](/docs/how-to/workflows/run-test-review.md) - Quality audits -- [How to Run Test Design](/docs/how-to/workflows/run-test-design.md) - Compliance-focused planning +- [How to Run NFR Assessment](/docs/tea/how-to/workflows/run-nfr-assess.md) - Deep dive on NFRs +- [How to Run Trace](/docs/tea/how-to/workflows/run-trace.md) - Gate decisions with evidence +- [How to Run Test Review](/docs/tea/how-to/workflows/run-test-review.md) - Quality audits +- [How to Run Test Design](/docs/tea/how-to/workflows/run-test-design.md) - Compliance-focused planning **Use-Case Guides:** -- [Using TEA with Existing Tests](/docs/how-to/brownfield/use-tea-with-existing-tests.md) - Brownfield patterns +- [Using TEA with Existing Tests](/docs/tea/how-to/brownfield/use-tea-with-existing-tests.md) - Brownfield patterns **Customization:** -- [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md) - Production-ready utilities +- [Integrate Playwright Utils](/docs/tea/how-to/customization/integrate-playwright-utils.md) - Production-ready utilities ## Understanding the Concepts -- [Engagement Models](/docs/explanation/tea/engagement-models.md) - Enterprise model explained -- [Risk-Based Testing](/docs/explanation/tea/risk-based-testing.md) - Probability × impact scoring -- [Test Quality Standards](/docs/explanation/tea/test-quality-standards.md) - Enterprise quality thresholds -- [TEA Overview](/docs/explanation/features/tea-overview.md) - Complete TEA lifecycle +- [Engagement Models](/docs/tea/explanation/engagement-models.md) - Enterprise model explained +- [Risk-Based Testing](/docs/tea/explanation/risk-based-testing.md) - Probability × impact scoring +- [Test Quality Standards](/docs/tea/explanation/test-quality-standards.md) - Enterprise quality thresholds +- [TEA Overview](/docs/tea/explanation/tea-overview.md) - Complete TEA lifecycle ## Reference -- [TEA Command Reference](/docs/reference/tea/commands.md) - All 8 workflows -- [TEA Configuration](/docs/reference/tea/configuration.md) - Enterprise config options -- [Knowledge Base Index](/docs/reference/tea/knowledge-base.md) - Testing patterns -- [Glossary](/docs/reference/glossary/index.md#test-architect-tea-concepts) - TEA terminology +- [TEA Command Reference](/docs/tea/reference/commands.md) - All 8 workflows +- [TEA Configuration](/docs/tea/reference/configuration.md) - Enterprise config options +- [Knowledge Base Index](/docs/tea/reference/knowledge-base.md) - Testing patterns +- [Glossary](/docs/tea/glossary/index.md#test-architect-tea-concepts) - TEA terminology --- diff --git a/docs/how-to/brownfield/use-tea-with-existing-tests.md b/docs/tea/how-to/brownfield/use-tea-with-existing-tests.md similarity index 81% rename from docs/how-to/brownfield/use-tea-with-existing-tests.md rename to docs/tea/how-to/brownfield/use-tea-with-existing-tests.md index b2590373..0f05a9ad 100644 --- a/docs/how-to/brownfield/use-tea-with-existing-tests.md +++ b/docs/tea/how-to/brownfield/use-tea-with-existing-tests.md @@ -22,7 +22,7 @@ Use TEA on brownfield projects (existing codebases with legacy tests) to establi - Existing codebase with tests (even if incomplete or low quality) - Tests run successfully (or at least can be executed) -**Note:** If your codebase is completely undocumented, run `*document-project` first to create baseline documentation. +**Note:** If your codebase is completely undocumented, run `document-project` first to create baseline documentation. ## Brownfield Strategy @@ -30,12 +30,12 @@ Use TEA on brownfield projects (existing codebases with legacy tests) to establi Understand what you have before changing anything. -#### Step 1: Baseline Coverage with *trace +#### Step 1: Baseline Coverage with `trace` -Run `*trace` Phase 1 to map existing tests to requirements: +Run `trace` Phase 1 to map existing tests to requirements: ``` -*trace +trace ``` **Select:** Phase 1 (Requirements Traceability) @@ -68,12 +68,12 @@ Run `*trace` Phase 1 to map existing tests to requirements: This baseline becomes your improvement target. -#### Step 2: Quality Audit with *test-review +#### Step 2: Quality Audit with `test-review` -Run `*test-review` on existing tests: +Run `test-review` on existing tests: ``` -*test-review tests/ +test-review tests/ ``` **Output:** `test-review.md` with quality score and issues. @@ -113,7 +113,7 @@ Goal: Get P0 coverage to 100% Actions: 1. Identify P0 requirements with no tests (from trace) -2. Run *automate to generate tests for missing P0 scenarios +2. Run `automate` to generate tests for missing P0 scenarios 3. Fix critical quality issues in P0 tests (from test-review) ``` @@ -183,7 +183,7 @@ test('checkout completes', async ({ page, interceptNetworkCall }) => { - Glob pattern matching (`**/api/checkout`) - Cleaner, more maintainable code -**For automatic error detection,** use `network-error-monitor` fixture separately. See [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md#network-error-monitor). +**For automatic error detection,** use `network-error-monitor` fixture separately. See [Integrate Playwright Utils](/docs/tea/how-to/customization/integrate-playwright-utils.md#network-error-monitor). **Priority 3: P1 Requirements** ``` @@ -228,11 +228,11 @@ Apply TEA workflows to new work while improving legacy tests. **Use full TEA workflow:** ``` -1. *test-design (epic-level) - Plan tests for new feature -2. *atdd - Generate failing tests first (TDD) +1. `test-design` (epic-level) - Plan tests for new feature +2. `atdd` - Generate failing tests first (TDD) 3. Implement feature -4. *automate - Expand coverage -5. *test-review - Ensure quality +4. `automate` - Expand coverage +5. `test-review` - Ensure quality ``` **Benefits:** @@ -247,7 +247,7 @@ Apply TEA workflows to new work while improving legacy tests. 1. Reproduce bug with failing test 2. Fix bug 3. Verify test passes -4. Run *test-review on regression test +4. Run `test-review` on regression test 5. Add to regression test suite ``` @@ -255,10 +255,10 @@ Apply TEA workflows to new work while improving legacy tests. **Before refactoring:** ``` -1. Run *trace - Baseline coverage +1. Run `trace` - Baseline coverage 2. Note current coverage % 3. Refactor code -4. Run *trace - Verify coverage maintained +4. Run `trace` - Verify coverage maintained 5. No coverage should decrease ``` @@ -375,7 +375,7 @@ test.skip('flaky test - needs fixing', async ({ page }) => { **Week 1:** `tests/auth/` ``` -1. Run *test-review on auth tests +1. Run `test-review` on auth tests 2. Fix critical issues 3. Re-review 4. Mark directory as "modernized" @@ -425,7 +425,7 @@ Same process **Solution:** ``` -1. Run *trace - TEA analyzes tests and maps to requirements +1. Run `trace` - TEA analyzes tests and maps to requirements 2. Review traceability matrix 3. Document findings 4. Use as baseline for improvement @@ -463,7 +463,7 @@ Incremental changes = lower risk 3. Commit documentation for team ``` -**Note:** `*framework` is for new test setup, not existing tests. For brownfield, document what you have. +**Note:** `framework` is for new test setup, not existing tests. For brownfield, document what you have. ### "Tests Take Hours to Run" @@ -480,7 +480,7 @@ Before: 4 hours sequential After: 15 minutes with sharding + selective testing ``` -**How `*ci` helps:** +**How `ci` helps:** - Scaffolds CI configuration with parallel sharding examples - Provides selective testing script templates - Documents burn-in and optimization strategies @@ -489,7 +489,7 @@ After: 15 minutes with sharding + selective testing **With Playwright Utils burn-in:** - Smart selective testing based on git diff - Volume control (run percentage of affected tests) -- See [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md#burn-in) +- See [Integrate Playwright Utils](/docs/tea/how-to/customization/integrate-playwright-utils.md#burn-in) ### "We Have Tests But They Always Fail" @@ -497,7 +497,7 @@ After: 15 minutes with sharding + selective testing **Solution:** ``` -1. Run *test-review to identify flakiness patterns +1. Run `test-review` to identify flakiness patterns 2. Fix top 5 flaky tests (biggest impact) 3. Quarantine remaining flaky tests 4. Re-enable as you fix them @@ -511,66 +511,66 @@ Don't let perfect be the enemy of good **1. Documentation (if needed):** ``` -*document-project +document-project ``` **2. Baseline (Phase 2):** ``` -*trace Phase 1 - Establish coverage baseline -*test-review - Establish quality baseline +trace Phase 1 - Establish coverage baseline +test-review - Establish quality baseline ``` **3. Planning (Phase 2-3):** ``` -*prd - Document requirements (if missing) -*architecture - Document architecture (if missing) -*test-design (system-level) - Testability review +prd - Document requirements (if missing) +architecture - Document architecture (if missing) +test-design (system-level) - Testability review ``` **4. Infrastructure (Phase 3):** ``` -*framework - Modernize test framework (if needed) -*ci - Setup or improve CI/CD +framework - Modernize test framework (if needed) +ci - Setup or improve CI/CD ``` **5. Per Epic (Phase 4):** ``` -*test-design (epic-level) - Focus on regression hotspots -*automate - Add missing tests -*test-review - Ensure quality -*trace Phase 1 - Refresh coverage +test-design (epic-level) - Focus on regression hotspots +automate - Add missing tests +test-review - Ensure quality +trace Phase 1 - Refresh coverage ``` **6. Release Gate:** ``` -*nfr-assess - Validate NFRs (if enterprise) -*trace Phase 2 - Gate decision +nfr-assess - Validate NFRs (if enterprise) +trace Phase 2 - Gate decision ``` ## Related Guides **Workflow Guides:** -- [How to Run Trace](/docs/how-to/workflows/run-trace.md) - Baseline coverage analysis -- [How to Run Test Review](/docs/how-to/workflows/run-test-review.md) - Quality audit -- [How to Run Automate](/docs/how-to/workflows/run-automate.md) - Fill coverage gaps -- [How to Run Test Design](/docs/how-to/workflows/run-test-design.md) - Risk assessment +- [How to Run Trace](/docs/tea/how-to/workflows/run-trace.md) - Baseline coverage analysis +- [How to Run Test Review](/docs/tea/how-to/workflows/run-test-review.md) - Quality audit +- [How to Run Automate](/docs/tea/how-to/workflows/run-automate.md) - Fill coverage gaps +- [How to Run Test Design](/docs/tea/how-to/workflows/run-test-design.md) - Risk assessment **Customization:** -- [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md) - Modernize tests with utilities +- [Integrate Playwright Utils](/docs/tea/how-to/customization/integrate-playwright-utils.md) - Modernize tests with utilities ## Understanding the Concepts -- [Engagement Models](/docs/explanation/tea/engagement-models.md) - Brownfield model explained -- [Test Quality Standards](/docs/explanation/tea/test-quality-standards.md) - What makes tests good -- [Network-First Patterns](/docs/explanation/tea/network-first-patterns.md) - Fix flakiness -- [Risk-Based Testing](/docs/explanation/tea/risk-based-testing.md) - Prioritize improvements +- [Engagement Models](/docs/tea/explanation/engagement-models.md) - Brownfield model explained +- [Test Quality Standards](/docs/tea/explanation/test-quality-standards.md) - What makes tests good +- [Network-First Patterns](/docs/tea/explanation/network-first-patterns.md) - Fix flakiness +- [Risk-Based Testing](/docs/tea/explanation/risk-based-testing.md) - Prioritize improvements ## Reference -- [TEA Command Reference](/docs/reference/tea/commands.md) - All 8 workflows -- [TEA Configuration](/docs/reference/tea/configuration.md) - Config options -- [Knowledge Base Index](/docs/reference/tea/knowledge-base.md) - Testing patterns -- [Glossary](/docs/reference/glossary/index.md#test-architect-tea-concepts) - TEA terminology +- [TEA Command Reference](/docs/tea/reference/commands.md) - All 8 workflows +- [TEA Configuration](/docs/tea/reference/configuration.md) - Config options +- [Knowledge Base Index](/docs/tea/reference/knowledge-base.md) - Testing patterns +- [Glossary](/docs/tea/glossary/index.md#test-architect-tea-concepts) - TEA terminology --- diff --git a/docs/how-to/customization/enable-tea-mcp-enhancements.md b/docs/tea/how-to/customization/enable-tea-mcp-enhancements.md similarity index 85% rename from docs/how-to/customization/enable-tea-mcp-enhancements.md rename to docs/tea/how-to/customization/enable-tea-mcp-enhancements.md index 830ee22f..331578a1 100644 --- a/docs/how-to/customization/enable-tea-mcp-enhancements.md +++ b/docs/tea/how-to/customization/enable-tea-mcp-enhancements.md @@ -19,14 +19,14 @@ MCP (Model Context Protocol) servers enable AI agents to interact with live brow ## When to Use This **For UI Testing:** -- Want exploratory mode in `*test-design` (browser-based UI discovery) -- Want recording mode in `*atdd` or `*automate` (verify selectors with live browser) -- Want healing mode in `*automate` (fix tests with visual debugging) +- Want exploratory mode in `test-design` (browser-based UI discovery) +- Want recording mode in `atdd` or `automate` (verify selectors with live browser) +- Want healing mode in `automate` (fix tests with visual debugging) - Need accurate selectors from actual DOM - Debugging complex UI interactions **For API Testing:** -- Want healing mode in `*automate` (analyze failures with trace data) +- Want healing mode in `automate` (analyze failures with trace data) - Need to debug test failures (network responses, request/response data, timing) - Want to inspect trace files (network traffic, errors, race conditions) @@ -100,7 +100,7 @@ Add to your IDE's MCP configuration: } ``` -See [TEA Overview](/docs/explanation/features/tea-overview.md#playwright-mcp-enhancements) for IDE-specific config locations. +See [TEA Overview](/docs/tea/explanation/tea-overview.md#playwright-mcp-enhancements) for IDE-specific config locations. ### 2. Enable in BMAD @@ -117,7 +117,7 @@ Ensure your MCP servers are running in your IDE. ## How MCP Enhances TEA Workflows -### *test-design: Exploratory Mode +### test-design: Exploratory Mode **Without MCP:** - TEA infers UI functionality from documentation @@ -148,7 +148,7 @@ I'll design tests for these interactions." - Discovers functionality you might not describe - Validates test scenarios are possible -### *atdd: Recording Mode +### atdd: Recording Mode **Without MCP:** - TEA generates selectors from best practices @@ -187,7 +187,7 @@ I'll validate these in tests." - API: Validated request/response patterns from trace - Both: Tests work on first run -### *automate: Healing + Recording Modes +### automate: Healing + Recording Modes **Without MCP:** - TEA analyzes test code only @@ -227,7 +227,7 @@ API: [Analyzes network traffic, validates request/response patterns] ### Exploratory Mode Example ``` -User: Run *test-design +User: Run test-design TEA: What feature are you designing tests for? @@ -252,7 +252,7 @@ Test design will cover all these scenarios. ### Recording Mode Example ``` -User: Run *atdd for user registration feature +User: Run atdd for user registration feature TEA: [With MCP] Let me verify the registration form selectors [Opens browser at /register] @@ -271,7 +271,7 @@ Generating tests with verified selectors... ### Healing Mode Example ``` -User: Run *automate with healing mode +User: Run automate with healing mode TEA: [With MCP] Running tests and checking for failures [Runs test suite] @@ -398,26 +398,26 @@ tea_use_mcp_enhancements: false ## Related Guides **Getting Started:** -- [TEA Lite Quickstart Tutorial](/docs/tutorials/getting-started/tea-lite-quickstart.md) - Learn TEA basics first +- [TEA Lite Quickstart Tutorial](/docs/tea/tutorials/tea-lite-quickstart.md) - Learn TEA basics first **Workflow Guides (MCP-Enhanced):** -- [How to Run Test Design](/docs/how-to/workflows/run-test-design.md) - Exploratory mode with browser -- [How to Run ATDD](/docs/how-to/workflows/run-atdd.md) - Recording mode for accurate selectors -- [How to Run Automate](/docs/how-to/workflows/run-automate.md) - Healing mode for debugging +- [How to Run Test Design](/docs/tea/how-to/workflows/run-test-design.md) - Exploratory mode with browser +- [How to Run ATDD](/docs/tea/how-to/workflows/run-atdd.md) - Recording mode for accurate selectors +- [How to Run Automate](/docs/tea/how-to/workflows/run-automate.md) - Healing mode for debugging **Other Customization:** -- [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md) - Production-ready utilities +- [Integrate Playwright Utils](/docs/tea/how-to/customization/integrate-playwright-utils.md) - Production-ready utilities ## Understanding the Concepts -- [TEA Overview](/docs/explanation/features/tea-overview.md) - MCP enhancements in lifecycle -- [Engagement Models](/docs/explanation/tea/engagement-models.md) - When to use MCP enhancements +- [TEA Overview](/docs/tea/explanation/tea-overview.md) - MCP enhancements in lifecycle +- [Engagement Models](/docs/tea/explanation/engagement-models.md) - When to use MCP enhancements ## Reference -- [TEA Configuration](/docs/reference/tea/configuration.md) - tea_use_mcp_enhancements option -- [TEA Command Reference](/docs/reference/tea/commands.md) - MCP-enhanced workflows -- [Glossary](/docs/reference/glossary/index.md#test-architect-tea-concepts) - MCP Enhancements term +- [TEA Configuration](/docs/tea/reference/configuration.md) - tea_use_mcp_enhancements option +- [TEA Command Reference](/docs/tea/reference/commands.md) - MCP-enhanced workflows +- [Glossary](/docs/tea/glossary/index.md#test-architect-tea-concepts) - MCP Enhancements term --- diff --git a/docs/how-to/customization/integrate-playwright-utils.md b/docs/tea/how-to/customization/integrate-playwright-utils.md similarity index 94% rename from docs/how-to/customization/integrate-playwright-utils.md rename to docs/tea/how-to/customization/integrate-playwright-utils.md index 32d6fcff..12c9203f 100644 --- a/docs/how-to/customization/integrate-playwright-utils.md +++ b/docs/tea/how-to/customization/integrate-playwright-utils.md @@ -82,7 +82,7 @@ tea_use_playwright_utils: true ## What Changes When Enabled -### *framework Workflow +### `framework` Workflow **Vanilla Playwright:** ```typescript @@ -133,7 +133,7 @@ test('api test', async ({ apiRequest, log }) => { }); ``` -### `*atdd` and `*automate` Workflows +### `atdd` and `automate` Workflows **Without Playwright Utils:** ```typescript @@ -160,7 +160,7 @@ test('should fetch profile', async ({ apiRequest }) => { }); ``` -### *test-review Workflow +### `test-review` Workflow **Without Playwright Utils:** Reviews against generic Playwright patterns @@ -172,7 +172,7 @@ Reviews against playwright-utils best practices: - Network-first patterns - Structured logging -### *ci Workflow +### `ci` Workflow **Without Playwright Utils:** - Parallel sharding @@ -783,29 +783,29 @@ expect(status).toBe(200); ## Related Guides **Getting Started:** -- [TEA Lite Quickstart Tutorial](/docs/tutorials/getting-started/tea-lite-quickstart.md) - Learn TEA basics -- [How to Set Up Test Framework](/docs/how-to/workflows/setup-test-framework.md) - Initial framework setup +- [TEA Lite Quickstart Tutorial](/docs/tea/tutorials/tea-lite-quickstart.md) - Learn TEA basics +- [How to Set Up Test Framework](/docs/tea/how-to/workflows/setup-test-framework.md) - Initial framework setup **Workflow Guides:** -- [How to Run ATDD](/docs/how-to/workflows/run-atdd.md) - Generate tests with utilities -- [How to Run Automate](/docs/how-to/workflows/run-automate.md) - Expand coverage with utilities -- [How to Run Test Review](/docs/how-to/workflows/run-test-review.md) - Review against PW-Utils patterns +- [How to Run ATDD](/docs/tea/how-to/workflows/run-atdd.md) - Generate tests with utilities +- [How to Run Automate](/docs/tea/how-to/workflows/run-automate.md) - Expand coverage with utilities +- [How to Run Test Review](/docs/tea/how-to/workflows/run-test-review.md) - Review against PW-Utils patterns **Other Customization:** -- [Enable MCP Enhancements](/docs/how-to/customization/enable-tea-mcp-enhancements.md) - Live browser verification +- [Enable MCP Enhancements](/docs/tea/how-to/customization/enable-tea-mcp-enhancements.md) - Live browser verification ## Understanding the Concepts -- [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md) - **Why Playwright Utils matters** (part of TEA's three-part solution) -- [Fixture Architecture](/docs/explanation/tea/fixture-architecture.md) - Pure function → fixture pattern -- [Network-First Patterns](/docs/explanation/tea/network-first-patterns.md) - Network utilities explained -- [Test Quality Standards](/docs/explanation/tea/test-quality-standards.md) - Patterns PW-Utils enforces +- [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md) - **Why Playwright Utils matters** (part of TEA's three-part solution) +- [Fixture Architecture](/docs/tea/explanation/fixture-architecture.md) - Pure function → fixture pattern +- [Network-First Patterns](/docs/tea/explanation/network-first-patterns.md) - Network utilities explained +- [Test Quality Standards](/docs/tea/explanation/test-quality-standards.md) - Patterns PW-Utils enforces ## Reference -- [TEA Configuration](/docs/reference/tea/configuration.md) - tea_use_playwright_utils option -- [Knowledge Base Index](/docs/reference/tea/knowledge-base.md) - Playwright Utils fragments -- [Glossary](/docs/reference/glossary/index.md#test-architect-tea-concepts) - Playwright Utils term +- [TEA Configuration](/docs/tea/reference/configuration.md) - tea_use_playwright_utils option +- [Knowledge Base Index](/docs/tea/reference/knowledge-base.md) - Playwright Utils fragments +- [Glossary](/docs/tea/glossary/index.md#test-architect-tea-concepts) - Playwright Utils term - [Official PW-Utils Docs](https://seontechnologies.github.io/playwright-utils/) - Complete API reference --- diff --git a/docs/how-to/workflows/run-atdd.md b/docs/tea/how-to/workflows/run-atdd.md similarity index 87% rename from docs/how-to/workflows/run-atdd.md rename to docs/tea/how-to/workflows/run-atdd.md index 9b55ecb3..c3112176 100644 --- a/docs/how-to/workflows/run-atdd.md +++ b/docs/tea/how-to/workflows/run-atdd.md @@ -5,7 +5,7 @@ description: Generate failing acceptance tests before implementation using TEA's # How to Run ATDD with TEA -Use TEA's `*atdd` workflow to generate failing acceptance tests BEFORE implementation. This is the TDD (Test-Driven Development) red phase - tests fail first, guide development, then pass. +Use TEA's `atdd` workflow to generate failing acceptance tests BEFORE implementation. This is the TDD (Test-Driven Development) red phase - tests fail first, guide development, then pass. ## When to Use This @@ -15,14 +15,14 @@ Use TEA's `*atdd` workflow to generate failing acceptance tests BEFORE implement - You're practicing acceptance test-driven development **Don't use this if:** -- Feature already exists (use `*automate` instead) +- Feature already exists (use `automate` instead) - You want tests that pass immediately ## Prerequisites - BMad Method installed - TEA agent available -- Test framework setup complete (run `*framework` if needed) +- Test framework setup complete (run `framework` if needed) - Story or feature defined with acceptance criteria **Note:** This guide uses Playwright examples. If using Cypress, commands and syntax will differ (e.g., `cy.get()` instead of `page.locator()`). @@ -34,13 +34,13 @@ Use TEA's `*atdd` workflow to generate failing acceptance tests BEFORE implement Start a fresh chat and load TEA: ``` -*tea +tea ``` ### 2. Run the ATDD Workflow ``` -*atdd +atdd ``` ### 3. Provide Context @@ -80,7 +80,7 @@ And changes are not saved **Reference Documents** (optional): - Point to your story file - Reference PRD or tech spec -- Link to test design (if you ran `*test-design` first) +- Link to test design (if you ran `test-design` first) ### 4. Specify Test Levels @@ -367,20 +367,20 @@ Running 6 tests using 1 worker ### Start with Test Design -Run `*test-design` before `*atdd` for better results: +Run `test-design` before `atdd` for better results: ``` -*test-design # Risk assessment and priorities -*atdd # Generate tests based on design +test-design # Risk assessment and priorities +atdd # Generate tests based on design ``` ### MCP Enhancements (Optional) -If you have MCP servers configured (`tea_use_mcp_enhancements: true`), TEA can use them during `*atdd`. +If you have MCP servers configured (`tea_use_mcp_enhancements: true`), TEA can use them during `atdd`. **Note:** ATDD is for features that don't exist yet, so recording mode (verify selectors with live UI) only applies if you have skeleton/mockup UI already implemented. For typical ATDD (no UI yet), TEA infers selectors from best practices. -See [Enable MCP Enhancements](/docs/how-to/customization/enable-tea-mcp-enhancements.md) for setup. +See [Enable MCP Enhancements](/docs/tea/how-to/customization/enable-tea-mcp-enhancements.md) for setup. ### Focus on P0/P1 Scenarios @@ -391,15 +391,15 @@ Generate tests for: - P0: Critical path (happy path) - P1: High value (validation, errors) -Skip P2/P3 for now - add later with *automate +Skip P2/P3 for now - add later with automate ``` ### API Tests First, E2E Later Recommended order: -1. Generate API tests with `*atdd` +1. Generate API tests with `atdd` 2. Implement backend (make API tests pass) -3. Generate E2E tests with `*atdd` (or `*automate`) +3. Generate E2E tests with `atdd` (or `automate`) 4. Implement frontend (make E2E tests pass) This "outside-in" approach is faster and more reliable. @@ -415,21 +415,21 @@ Don't modify these patterns - they prevent flakiness! ## Related Guides -- [How to Run Test Design](/docs/how-to/workflows/run-test-design.md) - Plan before generating -- [How to Run Automate](/docs/how-to/workflows/run-automate.md) - Tests for existing features -- [How to Set Up Test Framework](/docs/how-to/workflows/setup-test-framework.md) - Initial setup +- [How to Run Test Design](/docs/tea/how-to/workflows/run-test-design.md) - Plan before generating +- [How to Run Automate](/docs/tea/how-to/workflows/run-automate.md) - Tests for existing features +- [How to Set Up Test Framework](/docs/tea/how-to/workflows/setup-test-framework.md) - Initial setup ## Understanding the Concepts -- [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md) - **Why TEA generates quality tests** (foundational) -- [Risk-Based Testing](/docs/explanation/tea/risk-based-testing.md) - Why P0 vs P3 matters -- [Test Quality Standards](/docs/explanation/tea/test-quality-standards.md) - What makes tests good -- [Network-First Patterns](/docs/explanation/tea/network-first-patterns.md) - Avoiding flakiness +- [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md) - **Why TEA generates quality tests** (foundational) +- [Risk-Based Testing](/docs/tea/explanation/risk-based-testing.md) - Why P0 vs P3 matters +- [Test Quality Standards](/docs/tea/explanation/test-quality-standards.md) - What makes tests good +- [Network-First Patterns](/docs/tea/explanation/network-first-patterns.md) - Avoiding flakiness ## Reference -- [Command: *atdd](/docs/reference/tea/commands.md#atdd) - Full command reference -- [TEA Configuration](/docs/reference/tea/configuration.md) - MCP and Playwright Utils options +- [Command: *atdd](/docs/tea/reference/commands.md#atdd) - Full command reference +- [TEA Configuration](/docs/tea/reference/configuration.md) - MCP and Playwright Utils options --- diff --git a/docs/how-to/workflows/run-automate.md b/docs/tea/how-to/workflows/run-automate.md similarity index 91% rename from docs/how-to/workflows/run-automate.md rename to docs/tea/how-to/workflows/run-automate.md index 0b48f8f1..ad44b27f 100644 --- a/docs/how-to/workflows/run-automate.md +++ b/docs/tea/how-to/workflows/run-automate.md @@ -5,7 +5,7 @@ description: Expand test automation coverage after implementation using TEA's au # How to Run Automate with TEA -Use TEA's `*automate` workflow to generate comprehensive tests for existing features. Unlike `*atdd`, these tests pass immediately because the feature already exists. +Use TEA's `automate` workflow to generate comprehensive tests for existing features. Unlike `*atdd`, these tests pass immediately because the feature already exists. ## When to Use This @@ -16,14 +16,14 @@ Use TEA's `*automate` workflow to generate comprehensive tests for existing feat - Adding tests to legacy code **Don't use this if:** -- Feature doesn't exist yet (use `*atdd` instead) -- Want failing tests to guide development (use `*atdd` for TDD) +- Feature doesn't exist yet (use `atdd` instead) +- Want failing tests to guide development (use `atdd` for TDD) ## Prerequisites - BMad Method installed - TEA agent available -- Test framework setup complete (run `*framework` if needed) +- Test framework setup complete (run `framework` if needed) - Feature implemented and working **Note:** This guide uses Playwright examples. If using Cypress, commands and syntax will differ. @@ -35,13 +35,13 @@ Use TEA's `*automate` workflow to generate comprehensive tests for existing feat Start a fresh chat and load TEA: ``` -*tea +tea ``` ### 2. Run the Automate Workflow ``` -*automate +automate ``` ### 3. Provide Context @@ -501,11 +501,11 @@ TEA supports component testing using framework-appropriate tools: ### Start with Test Design -Run `*test-design` before `*automate` for better results: +Run `test-design` before `automate` for better results: ``` -*test-design # Risk assessment, priorities -*automate # Generate tests based on priorities +test-design # Risk assessment, priorities +automate # Generate tests based on priorities ``` TEA will focus on P0/P1 scenarios and skip low-value tests. @@ -543,12 +543,12 @@ TEA will analyze existing tests and only generate new scenarios. ### MCP Enhancements (Optional) -If you have MCP servers configured (`tea_use_mcp_enhancements: true`), TEA can use them during `*automate` for: +If you have MCP servers configured (`tea_use_mcp_enhancements: true`), TEA can use them during `automate` for: - **Healing mode:** Fix broken selectors, update assertions, enhance with trace analysis - **Recording mode:** Verify selectors with live browser, capture network requests -No prompts - TEA uses MCPs automatically when available. See [Enable MCP Enhancements](/docs/how-to/customization/enable-tea-mcp-enhancements.md) for setup. +No prompts - TEA uses MCPs automatically when available. See [Enable MCP Enhancements](/docs/tea/how-to/customization/enable-tea-mcp-enhancements.md) for setup. ### Generate Tests Incrementally @@ -557,20 +557,20 @@ Don't generate all tests at once: **Iteration 1:** ``` Generate P0 tests only (critical path) -Run: *automate +Run: automate ``` **Iteration 2:** ``` Generate P1 tests (high value scenarios) -Run: *automate +Run: automate Tell TEA to avoid P0 coverage ``` **Iteration 3:** ``` Generate P2 tests (if time permits) -Run: *automate +Run: automate ``` This iterative approach: @@ -628,25 +628,25 @@ Generate tests for scenarios NOT covered by those files If you have MCP servers configured, TEA verifies selectors against live browser. Otherwise, TEA generates accessible selectors (`getByRole`, `getByLabel`) by default. -Setup: Answer "Yes" to MCPs in BMad installer + configure MCP servers in your IDE. See [Enable MCP Enhancements](/docs/how-to/customization/enable-tea-mcp-enhancements.md). +Setup: Answer "Yes" to MCPs in BMad installer + configure MCP servers in your IDE. See [Enable MCP Enhancements](/docs/tea/how-to/customization/enable-tea-mcp-enhancements.md). ## Related Guides -- [How to Run Test Design](/docs/how-to/workflows/run-test-design.md) - Plan before generating -- [How to Run ATDD](/docs/how-to/workflows/run-atdd.md) - Failing tests before implementation -- [How to Run Test Review](/docs/how-to/workflows/run-test-review.md) - Audit generated quality +- [How to Run Test Design](/docs/tea/how-to/workflows/run-test-design.md) - Plan before generating +- [How to Run ATDD](/docs/tea/how-to/workflows/run-atdd.md) - Failing tests before implementation +- [How to Run Test Review](/docs/tea/how-to/workflows/run-test-review.md) - Audit generated quality ## Understanding the Concepts -- [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md) - **Why TEA generates quality tests** (foundational) -- [Risk-Based Testing](/docs/explanation/tea/risk-based-testing.md) - Why prioritize P0 over P3 -- [Test Quality Standards](/docs/explanation/tea/test-quality-standards.md) - What makes tests good -- [Fixture Architecture](/docs/explanation/tea/fixture-architecture.md) - Reusable test patterns +- [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md) - **Why TEA generates quality tests** (foundational) +- [Risk-Based Testing](/docs/tea/explanation/risk-based-testing.md) - Why prioritize P0 over P3 +- [Test Quality Standards](/docs/tea/explanation/test-quality-standards.md) - What makes tests good +- [Fixture Architecture](/docs/tea/explanation/fixture-architecture.md) - Reusable test patterns ## Reference -- [Command: *automate](/docs/reference/tea/commands.md#automate) - Full command reference -- [TEA Configuration](/docs/reference/tea/configuration.md) - MCP and Playwright Utils options +- [Command: *automate](/docs/tea/reference/commands.md#automate) - Full command reference +- [TEA Configuration](/docs/tea/reference/configuration.md) - MCP and Playwright Utils options --- diff --git a/docs/how-to/workflows/run-nfr-assess.md b/docs/tea/how-to/workflows/run-nfr-assess.md similarity index 95% rename from docs/how-to/workflows/run-nfr-assess.md rename to docs/tea/how-to/workflows/run-nfr-assess.md index 6477aca1..f5bd1ecf 100644 --- a/docs/how-to/workflows/run-nfr-assess.md +++ b/docs/tea/how-to/workflows/run-nfr-assess.md @@ -5,7 +5,7 @@ description: Validate non-functional requirements for security, performance, rel # How to Run NFR Assessment with TEA -Use TEA's `*nfr-assess` workflow to validate non-functional requirements (NFRs) with evidence-based assessment across security, performance, reliability, and maintainability. +Use TEA's `nfr-assess` workflow to validate non-functional requirements (NFRs) with evidence-based assessment across security, performance, reliability, and maintainability. ## When to Use This @@ -37,7 +37,7 @@ Use TEA's `*nfr-assess` workflow to validate non-functional requirements (NFRs) Start a fresh chat and run: ``` -*nfr-assess +nfr-assess ``` This loads TEA and starts the NFR assessment workflow. @@ -463,7 +463,7 @@ If business decides to deploy with current performance: ### Run NFR Assessment Early **Phase 2 (Enterprise):** -Run `*nfr-assess` during planning to: +Run `nfr-assess` during planning to: - Identify NFR requirements early - Plan for performance testing - Budget for security audits @@ -559,7 +559,7 @@ After implementing mitigations: ``` 1. Fix performance issues 2. Run load tests again -3. Run *nfr-assess with new evidence +3. Run nfr-assess with new evidence 4. Verify PASS status ``` @@ -573,7 +573,7 @@ Don't deploy with CONCERNS without mitigation or waiver. ### Pre-Release - [ ] All tests passing - [ ] Test coverage > 80% -- [ ] Run *nfr-assess +- [ ] Run nfr-assess - [ ] NFR status: PASS or WAIVED ### Performance @@ -660,19 +660,19 @@ Assess categories incrementally, not all at once. ## Related Guides -- [How to Run Trace](/docs/how-to/workflows/run-trace.md) - Gate decision complements NFR -- [How to Run Test Review](/docs/how-to/workflows/run-test-review.md) - Quality complements NFR -- [Run TEA for Enterprise](/docs/how-to/brownfield/use-tea-for-enterprise.md) - Enterprise workflow +- [How to Run Trace](/docs/tea/how-to/workflows/run-trace.md) - Gate decision complements NFR +- [How to Run Test Review](/docs/tea/how-to/workflows/run-test-review.md) - Quality complements NFR +- [Run TEA for Enterprise](/docs/tea/how-to/brownfield/use-tea-for-enterprise.md) - Enterprise workflow ## Understanding the Concepts -- [Risk-Based Testing](/docs/explanation/tea/risk-based-testing.md) - Risk assessment principles -- [TEA Overview](/docs/explanation/features/tea-overview.md) - NFR in release gates +- [Risk-Based Testing](/docs/tea/explanation/risk-based-testing.md) - Risk assessment principles +- [TEA Overview](/docs/tea/explanation/tea-overview.md) - NFR in release gates ## Reference -- [Command: *nfr-assess](/docs/reference/tea/commands.md#nfr-assess) - Full command reference -- [TEA Configuration](/docs/reference/tea/configuration.md) - Enterprise config options +- [Command: *nfr-assess](/docs/tea/reference/commands.md#nfr-assess) - Full command reference +- [TEA Configuration](/docs/tea/reference/configuration.md) - Enterprise config options --- diff --git a/docs/tea/how-to/workflows/run-test-design.md b/docs/tea/how-to/workflows/run-test-design.md new file mode 100644 index 00000000..7b972820 --- /dev/null +++ b/docs/tea/how-to/workflows/run-test-design.md @@ -0,0 +1,135 @@ +--- +title: "How to Run Test Design with TEA" +description: How to create comprehensive test plans using TEA's test-design workflow +--- + +Use TEA's `test-design` workflow to create comprehensive test plans with risk assessment and coverage strategies. + +## When to Use This + +**System-level (Phase 3):** +- After architecture is complete +- Before implementation-readiness gate +- To validate architecture testability + +**Epic-level (Phase 4):** +- At the start of each epic +- Before implementing stories in the epic +- To identify epic-specific testing needs + +:::note[Prerequisites] +- BMad Method installed +- TEA agent available +- For system-level: Architecture document complete +- For epic-level: Epic defined with stories +::: + +## Steps + +### 1. Load the TEA Agent + +Start a fresh chat and load the TEA (Test Architect) agent. + +### 2. Run the Test Design Workflow + +``` +test-design +``` + +### 3. Specify the Mode + +TEA will ask if you want: + +- **System-level** — For architecture testability review (Phase 3) +- **Epic-level** — For epic-specific test planning (Phase 4) + +### 4. Provide Context + +For system-level: +- Point to your architecture document +- Reference any ADRs (Architecture Decision Records) + +For epic-level: +- Specify which epic you're planning +- Reference the epic file with stories + +### 5. Review the Output + +TEA generates test design document(s) based on mode. + +## What You Get + +**System-Level Output (TWO Documents):** + +TEA produces two focused documents for system-level mode: + +1. **`test-design-architecture.md`** (for Architecture/Dev teams) + - Purpose: Architectural concerns, testability gaps, NFR requirements + - Quick Guide with 🚨 BLOCKERS / ⚠️ HIGH PRIORITY / 📋 INFO ONLY + - Risk assessment (high/medium/low-priority with scoring) + - Testability concerns and architectural gaps + - Risk mitigation plans for high-priority risks (≥6) + - Assumptions and dependencies + +2. **`test-design-qa.md`** (for QA team) + - Purpose: Test execution recipe, coverage plan, Sprint 0 setup + - Quick Reference for QA (Before You Start, Execution Order, Need Help) + - System architecture summary + - Test environment requirements (moved up - early in doc) + - Testability assessment (prerequisites checklist) + - Test levels strategy (unit/integration/E2E split) + - Test coverage plan (P0/P1/P2/P3 with detailed scenarios + checkboxes) + - Sprint 0 setup requirements (blockers, infrastructure, environments) + - NFR readiness summary + +**Why Two Documents?** +- **Architecture teams** can scan blockers in <5 min (Quick Guide format) +- **QA teams** have actionable test recipes (step-by-step with checklists) +- **No redundancy** between documents (cross-references instead of duplication) +- **Clear separation** of concerns (what to deliver vs how to test) + +**Epic-Level Output (ONE Document):** + +**`test-design-epic-N.md`** (combined risk assessment + test plan) +- Risk assessment for the epic +- Test priorities (P0-P3) +- Coverage plan +- Regression hotspots (for brownfield) +- Integration risks +- Mitigation strategies + +## Test Design for Different Tracks + +| Track | Phase 3 Focus | Phase 4 Focus | +|-------|---------------|---------------| +| **Greenfield** | System-level testability review | Per-epic risk assessment and test plan | +| **Brownfield** | System-level + existing test baseline | Regression hotspots, integration risks | +| **Enterprise** | Compliance-aware testability | Security/performance/compliance focus | + +## Examples + +**System-Level (Two Documents):** +- `cluster-search/cluster-search-test-design-architecture.md` - Architecture doc with Quick Guide +- `cluster-search/cluster-search-test-design-qa.md` - QA doc with test scenarios + +**Key Pattern:** +- Architecture doc: "ASR-1: OAuth 2.1 required (see QA doc for 12 test scenarios)" +- QA doc: "OAuth tests: 12 P0 scenarios (see Architecture doc R-001 for risk details)" +- No duplication, just cross-references + +## Tips + +- **Run system-level right after architecture** — Early testability review +- **Run epic-level at the start of each epic** — Targeted test planning +- **Update if ADRs change** — Keep test design aligned +- **Use output to guide other workflows** — Feeds into `atdd` and `automate` +- **Architecture teams review Architecture doc** — Focus on blockers and mitigation plans +- **QA teams use QA doc as implementation guide** — Follow test scenarios and Sprint 0 checklist + +## Next Steps + +After test design: + +1. **Setup Test Framework** — If not already configured +2. **Implementation Readiness** — System-level feeds into gate check +3. **Story Implementation** — Epic-level guides testing during dev diff --git a/docs/how-to/workflows/run-test-review.md b/docs/tea/how-to/workflows/run-test-review.md similarity index 92% rename from docs/how-to/workflows/run-test-review.md rename to docs/tea/how-to/workflows/run-test-review.md index 924b12a7..ae538a47 100644 --- a/docs/how-to/workflows/run-test-review.md +++ b/docs/tea/how-to/workflows/run-test-review.md @@ -5,7 +5,7 @@ description: Audit test quality using TEA's comprehensive knowledge base and get # How to Run Test Review with TEA -Use TEA's `*test-review` workflow to audit test quality with objective scoring and actionable feedback. TEA reviews tests against its knowledge base of best practices. +Use TEA's `test-review` workflow to audit test quality with objective scoring and actionable feedback. TEA reviews tests against its knowledge base of best practices. ## When to Use This @@ -30,13 +30,13 @@ Use TEA's `*test-review` workflow to audit test quality with objective scoring a Start a fresh chat and load TEA: ``` -*tea +tea ``` ### 2. Run the Test Review Workflow ``` -*test-review +test-review ``` ### 3. Specify Review Scope @@ -351,17 +351,17 @@ test('should show validation error for expired card', async ({ page }) => { }); 6. Improve test names in `checkout.spec.ts` ### Long-term (Continuous Improvement) -7. Re-run `*test-review` after fixes (target: 85/100) +7. Re-run `test-review` after fixes (target: 85/100) 8. Add performance budgets to CI 9. Document test patterns for team ## Knowledge Base References TEA reviewed against these patterns: -- [test-quality.md](/docs/reference/tea/knowledge-base.md#test-quality) - Execution limits, isolation -- [network-first.md](/docs/reference/tea/knowledge-base.md#network-first) - Deterministic waits -- [timing-debugging.md](/docs/reference/tea/knowledge-base.md#timing-debugging) - Race conditions -- [selector-resilience.md](/docs/reference/tea/knowledge-base.md#selector-resilience) - Robust selectors +- [test-quality.md](/docs/tea/reference/knowledge-base.md#test-quality) - Execution limits, isolation +- [network-first.md](/docs/tea/reference/knowledge-base.md#network-first) - Deterministic waits +- [timing-debugging.md](/docs/tea/reference/knowledge-base.md#timing-debugging) - Race conditions +- [selector-resilience.md](/docs/tea/reference/knowledge-base.md#selector-resilience) - Robust selectors ``` ## Understanding the Scores @@ -445,8 +445,8 @@ Make test review part of release checklist: Always review AI-generated tests: ``` -1. Run *atdd or *automate -2. Run *test-review on generated tests +1. Run atdd or automate +2. Run test-review on generated tests 3. Fix critical issues 4. Commit tests ``` @@ -585,20 +585,20 @@ Don't try to fix everything at once. ## Related Guides -- [How to Run ATDD](/docs/how-to/workflows/run-atdd.md) - Generate tests to review -- [How to Run Automate](/docs/how-to/workflows/run-automate.md) - Expand coverage to review -- [How to Run Trace](/docs/how-to/workflows/run-trace.md) - Coverage complements quality +- [How to Run ATDD](/docs/tea/how-to/workflows/run-atdd.md) - Generate tests to review +- [How to Run Automate](/docs/tea/how-to/workflows/run-automate.md) - Expand coverage to review +- [How to Run Trace](/docs/tea/how-to/workflows/run-trace.md) - Coverage complements quality ## Understanding the Concepts -- [Test Quality Standards](/docs/explanation/tea/test-quality-standards.md) - What makes tests good -- [Network-First Patterns](/docs/explanation/tea/network-first-patterns.md) - Avoiding flakiness -- [Fixture Architecture](/docs/explanation/tea/fixture-architecture.md) - Reusable patterns +- [Test Quality Standards](/docs/tea/explanation/test-quality-standards.md) - What makes tests good +- [Network-First Patterns](/docs/tea/explanation/network-first-patterns.md) - Avoiding flakiness +- [Fixture Architecture](/docs/tea/explanation/fixture-architecture.md) - Reusable patterns ## Reference -- [Command: *test-review](/docs/reference/tea/commands.md#test-review) - Full command reference -- [Knowledge Base Index](/docs/reference/tea/knowledge-base.md) - Patterns TEA reviews against +- [Command: *test-review](/docs/tea/reference/commands.md#test-review) - Full command reference +- [Knowledge Base Index](/docs/tea/reference/knowledge-base.md) - Patterns TEA reviews against --- diff --git a/docs/how-to/workflows/run-trace.md b/docs/tea/how-to/workflows/run-trace.md similarity index 93% rename from docs/how-to/workflows/run-trace.md rename to docs/tea/how-to/workflows/run-trace.md index bd352f39..d86c3723 100644 --- a/docs/how-to/workflows/run-trace.md +++ b/docs/tea/how-to/workflows/run-trace.md @@ -5,7 +5,7 @@ description: Map requirements to tests and make quality gate decisions using TEA # How to Run Trace with TEA -Use TEA's `*trace` workflow for requirements traceability and quality gate decisions. This is a two-phase workflow: Phase 1 analyzes coverage, Phase 2 makes the go/no-go decision. +Use TEA's `trace` workflow for requirements traceability and quality gate decisions. This is a two-phase workflow: Phase 1 analyzes coverage, Phase 2 makes the go/no-go decision. ## When to Use This @@ -34,7 +34,7 @@ Use TEA's `*trace` workflow for requirements traceability and quality gate decis ### 1. Run the Trace Workflow ``` -*trace +trace ``` ### 2. Specify Phase @@ -306,7 +306,7 @@ test('should update bio via API', async ({ apiRequest, authToken }) => { }); ``` -**Note:** `authToken` requires auth-session fixture setup. See [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md#auth-session). +**Note:** `authToken` requires auth-session fixture setup. See [Integrate Playwright Utils](/docs/tea/how-to/customization/integrate-playwright-utils.md#auth-session). ### 2. Add Avatar Upload Tests @@ -350,7 +350,7 @@ test('should accept valid image upload', async ({ request }) => { After reviewing traceability: 1. **Fix critical gaps** - Add tests for P0/P1 requirements -2. **Run *test-review** - Ensure new tests meet quality standards +2. **Run `test-review`** - Ensure new tests meet quality standards 3. **Run Phase 2** - Make gate decision after gaps addressed ``` @@ -369,7 +369,7 @@ After Phase 1 coverage analysis is complete, run Phase 2 for the gate decision. ### 7. Run Phase 2 ``` -*trace +trace ``` Select "Phase 2: Quality Gate Decision" @@ -405,12 +405,12 @@ traceability-matrix.md (from Phase 1) **Test Quality (Optional):** ``` -test-review.md (from *test-review) +test-review.md (from test-review) ``` **NFR Assessment (Optional):** ``` -nfr-assessment.md (from *nfr-assess) +nfr-assessment.md (from nfr-assess) ``` ### 10. Review Gate Decision @@ -586,7 +586,7 @@ TEA uses deterministic rules when decision_mode = "deterministic": 1. Add login tests (QA team, 2 days) 2. Fix SQL injection (backend team, 1 day) 3. Re-run security scan (DevOps, 1 hour) -4. Re-run *trace after fixes +4. Re-run trace after fixes **Cannot proceed until all blockers resolved.** ``` @@ -612,15 +612,15 @@ TEA uses deterministic rules when decision_mode = "deterministic": **Phase 3:** ``` After architecture complete: -1. Run *test-design (system-level) -2. Run *trace Phase 1 (baseline) +1. Run test-design (system-level) +2. Run trace Phase 1 (baseline) 3. Use for implementation-readiness gate ``` **Phase 4:** ``` After each epic/story: -1. Run *trace Phase 1 (refresh coverage) +1. Run trace Phase 1 (refresh coverage) 2. Identify gaps 3. Add missing tests ``` @@ -628,8 +628,8 @@ After each epic/story: **Release Gate:** ``` Before deployment: -1. Run *trace Phase 1 (final coverage check) -2. Run *trace Phase 2 (make gate decision) +1. Run trace Phase 1 (final coverage check) +2. Run trace Phase 2 (make gate decision) 3. Get approvals 4. Deploy (if PASS or WAIVED) ``` @@ -639,7 +639,7 @@ Before deployment: **Phase 2:** ``` Before planning new work: -1. Run *trace Phase 1 (establish baseline) +1. Run trace Phase 1 (establish baseline) 2. Understand existing coverage 3. Plan testing strategy ``` @@ -647,7 +647,7 @@ Before planning new work: **Phase 4:** ``` After each epic/story: -1. Run *trace Phase 1 (refresh) +1. Run trace Phase 1 (refresh) 2. Compare to baseline 3. Track coverage improvement ``` @@ -655,8 +655,8 @@ After each epic/story: **Release Gate:** ``` Before deployment: -1. Run *trace Phase 1 (final check) -2. Run *trace Phase 2 (gate decision) +1. Run trace Phase 1 (final check) +2. Run trace Phase 2 (gate decision) 3. Compare to baseline 4. Deploy if coverage maintained or improved ``` @@ -668,10 +668,10 @@ Before deployment: Don't wait until release gate: ``` -After Story 1: *trace Phase 1 (identify gaps early) -After Story 2: *trace Phase 1 (refresh) -After Story 3: *trace Phase 1 (refresh) -Before Release: *trace Phase 1 + Phase 2 (final gate) +After Story 1: trace Phase 1 (identify gaps early) +After Story 2: trace Phase 1 (refresh) +After Story 3: trace Phase 1 (refresh) +Before Release: trace Phase 1 + Phase 2 (final gate) ``` **Benefit:** Catch gaps early when they're cheap to fix. @@ -864,19 +864,19 @@ Result: PARTIAL coverage (3/4 criteria) ## Related Guides -- [How to Run Test Design](/docs/how-to/workflows/run-test-design.md) - Provides requirements for traceability -- [How to Run Test Review](/docs/how-to/workflows/run-test-review.md) - Quality scores feed gate -- [How to Run NFR Assessment](/docs/how-to/workflows/run-nfr-assess.md) - NFR status feeds gate +- [How to Run Test Design](/docs/tea/how-to/workflows/run-test-design.md) - Provides requirements for traceability +- [How to Run Test Review](/docs/tea/how-to/workflows/run-test-review.md) - Quality scores feed gate +- [How to Run NFR Assessment](/docs/tea/how-to/workflows/run-nfr-assess.md) - NFR status feeds gate ## Understanding the Concepts -- [Risk-Based Testing](/docs/explanation/tea/risk-based-testing.md) - Why P0 vs P3 matters -- [TEA Overview](/docs/explanation/features/tea-overview.md) - Gate decisions in context +- [Risk-Based Testing](/docs/tea/explanation/risk-based-testing.md) - Why P0 vs P3 matters +- [TEA Overview](/docs/tea/explanation/tea-overview.md) - Gate decisions in context ## Reference -- [Command: *trace](/docs/reference/tea/commands.md#trace) - Full command reference -- [TEA Configuration](/docs/reference/tea/configuration.md) - Config options +- [Command: *trace](/docs/tea/reference/commands.md#trace) - Full command reference +- [TEA Configuration](/docs/tea/reference/configuration.md) - Config options --- diff --git a/docs/how-to/workflows/setup-ci.md b/docs/tea/how-to/workflows/setup-ci.md similarity index 94% rename from docs/how-to/workflows/setup-ci.md rename to docs/tea/how-to/workflows/setup-ci.md index 7f64ae56..2b7defb7 100644 --- a/docs/how-to/workflows/setup-ci.md +++ b/docs/tea/how-to/workflows/setup-ci.md @@ -5,7 +5,7 @@ description: Configure automated test execution with selective testing and burn- # How to Set Up CI Pipeline with TEA -Use TEA's `*ci` workflow to scaffold production-ready CI/CD configuration for automated test execution with selective testing, parallel sharding, and flakiness detection. +Use TEA's `ci` workflow to scaffold production-ready CI/CD configuration for automated test execution with selective testing, parallel sharding, and flakiness detection. ## When to Use This @@ -20,7 +20,7 @@ Use TEA's `*ci` workflow to scaffold production-ready CI/CD configuration for au - BMad Method installed - TEA agent available -- Test framework configured (run `*framework` first) +- Test framework configured (run `framework` first) - Tests written (have something to run in CI) - CI/CD platform access (GitHub Actions, GitLab CI, etc.) @@ -31,13 +31,13 @@ Use TEA's `*ci` workflow to scaffold production-ready CI/CD configuration for au Start a fresh chat and load TEA: ``` -*tea +tea ``` ### 2. Run the CI Workflow ``` -*ci +ci ``` ### 3. Select CI/CD Platform @@ -675,7 +675,7 @@ Speed up CI with caching: **Solution:** 1. Identify flaky tests (check which iteration fails) -2. Fix flaky tests using `*test-review` +2. Fix flaky tests using `test-review` 3. Re-run burn-in on specific files: ```bash npm run test:burn-in tests/flaky.spec.ts @@ -693,19 +693,19 @@ npm run test:burn-in tests/flaky.spec.ts ## Related Guides -- [How to Set Up Test Framework](/docs/how-to/workflows/setup-test-framework.md) - Run first -- [How to Run Test Review](/docs/how-to/workflows/run-test-review.md) - Audit CI tests -- [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md) - Burn-in utility +- [How to Set Up Test Framework](/docs/tea/how-to/workflows/setup-test-framework.md) - Run first +- [How to Run Test Review](/docs/tea/how-to/workflows/run-test-review.md) - Audit CI tests +- [Integrate Playwright Utils](/docs/tea/how-to/customization/integrate-playwright-utils.md) - Burn-in utility ## Understanding the Concepts -- [Test Quality Standards](/docs/explanation/tea/test-quality-standards.md) - Why determinism matters -- [Network-First Patterns](/docs/explanation/tea/network-first-patterns.md) - Avoid CI flakiness +- [Test Quality Standards](/docs/tea/explanation/test-quality-standards.md) - Why determinism matters +- [Network-First Patterns](/docs/tea/explanation/network-first-patterns.md) - Avoid CI flakiness ## Reference -- [Command: *ci](/docs/reference/tea/commands.md#ci) - Full command reference -- [TEA Configuration](/docs/reference/tea/configuration.md) - CI-related config options +- [Command: *ci](/docs/tea/reference/commands.md#ci) - Full command reference +- [TEA Configuration](/docs/tea/reference/configuration.md) - CI-related config options --- diff --git a/docs/how-to/workflows/setup-test-framework.md b/docs/tea/how-to/workflows/setup-test-framework.md similarity index 93% rename from docs/how-to/workflows/setup-test-framework.md rename to docs/tea/how-to/workflows/setup-test-framework.md index 4d1dd1e5..c0875929 100644 --- a/docs/how-to/workflows/setup-test-framework.md +++ b/docs/tea/how-to/workflows/setup-test-framework.md @@ -3,7 +3,7 @@ title: "How to Set Up a Test Framework with TEA" description: How to set up a production-ready test framework using TEA --- -Use TEA's `*framework` workflow to scaffold a production-ready test framework for your project. +Use TEA's `framework` workflow to scaffold a production-ready test framework for your project. ## When to Use This @@ -27,7 +27,7 @@ Start a fresh chat and load the TEA (Test Architect) agent. ### 2. Run the Framework Workflow ``` -*framework +framework ``` ### 3. Answer TEA's Questions @@ -87,7 +87,7 @@ Configure in your IDE's MCP settings. - **Run only once per repository** — Framework setup is a one-time operation - **Run after architecture is complete** — Framework aligns with tech stack -- **Follow up with CI setup** — Run `*ci` to configure CI/CD pipeline +- **Follow up with CI setup** — Run `ci` to configure CI/CD pipeline ## Next Steps diff --git a/docs/reference/tea/commands.md b/docs/tea/reference/commands.md similarity index 56% rename from docs/reference/tea/commands.md rename to docs/tea/reference/commands.md index ed1ad8c2..1866991b 100644 --- a/docs/reference/tea/commands.md +++ b/docs/tea/reference/commands.md @@ -9,18 +9,18 @@ Quick reference for all 8 TEA (Test Architect) workflows. For detailed step-by-s ## Quick Index -- [*framework](#framework) - Scaffold test framework -- [*ci](#ci) - Setup CI/CD pipeline -- [*test-design](#test-design) - Risk-based test planning -- [*atdd](#atdd) - Acceptance TDD -- [*automate](#automate) - Test automation -- [*test-review](#test-review) - Quality audit -- [*nfr-assess](#nfr-assess) - NFR assessment -- [*trace](#trace) - Coverage traceability +- [`framework`](#framework) - Scaffold test framework +- [`ci`](#ci) - Setup CI/CD pipeline +- [`test-design`](#test-design) - Risk-based test planning +- [`atdd`](#atdd) - Acceptance TDD +- [`automate`](#automate) - Test automation +- [`test-review`](#test-review) - Quality audit +- [`nfr-assess`](#nfr-assess) - NFR assessment +- [`trace`](#trace) - Coverage traceability --- -## *framework +## framework **Purpose:** Scaffold production-ready test framework (Playwright or Cypress) @@ -37,11 +37,11 @@ Quick reference for all 8 TEA (Test Architect) workflows. For detailed step-by-s - `.env.example`, `.nvmrc` - Sample tests with best practices -**How-To Guide:** [Setup Test Framework](/docs/how-to/workflows/setup-test-framework.md) +**How-To Guide:** [Setup Test Framework](/docs/tea/how-to/workflows/setup-test-framework.md) --- -## *ci +## ci **Purpose:** Setup CI/CD pipeline with selective testing and burn-in @@ -59,11 +59,11 @@ Quick reference for all 8 TEA (Test Architect) workflows. For detailed step-by-s - Burn-in loops for flakiness detection - Secrets checklist -**How-To Guide:** [Setup CI Pipeline](/docs/how-to/workflows/setup-ci.md) +**How-To Guide:** [Setup CI Pipeline](/docs/tea/how-to/workflows/setup-ci.md) --- -## *test-design +## test-design **Purpose:** Risk-based test planning with coverage strategy @@ -72,25 +72,47 @@ Quick reference for all 8 TEA (Test Architect) workflows. For detailed step-by-s **Frequency:** Once (system), per epic (epic-level) **Modes:** -- **System-level:** Architecture testability review -- **Epic-level:** Per-epic risk assessment +- **System-level:** Architecture testability review (TWO documents) +- **Epic-level:** Per-epic risk assessment (ONE document) **Key Inputs:** -- Architecture/epic, requirements, ADRs +- System-level: Architecture, PRD, ADRs +- Epic-level: Epic, stories, acceptance criteria **Key Outputs:** -- `test-design-system.md` or `test-design-epic-N.md` -- Risk assessment (probability × impact scores) -- Test priorities (P0-P3) -- Coverage strategy + +**System-Level (TWO Documents):** +- `test-design-architecture.md` - For Architecture/Dev teams + - Quick Guide (🚨 BLOCKERS / ⚠️ HIGH PRIORITY / 📋 INFO ONLY) + - Risk assessment with scoring + - Testability concerns and gaps + - Mitigation plans +- `test-design-qa.md` - For QA team + - Test execution recipe + - Coverage plan (P0/P1/P2/P3 with checkboxes) + - Sprint 0 setup requirements + - NFR readiness summary + +**Epic-Level (ONE Document):** +- `test-design-epic-N.md` + - Risk assessment (probability × impact scores) + - Test priorities (P0-P3) + - Coverage strategy + - Mitigation plans + +**Why Two Documents for System-Level?** +- Architecture teams scan blockers in <5 min +- QA teams have actionable test recipes +- No redundancy (cross-references instead) +- Clear separation (what to deliver vs how to test) **MCP Enhancement:** Exploratory mode (live browser UI discovery) -**How-To Guide:** [Run Test Design](/docs/how-to/workflows/run-test-design.md) +**How-To Guide:** [Run Test Design](/docs/tea/how-to/workflows/run-test-design.md) --- -## *atdd +## atdd **Purpose:** Generate failing acceptance tests BEFORE implementation (TDD red phase) @@ -108,11 +130,11 @@ Quick reference for all 8 TEA (Test Architect) workflows. For detailed step-by-s **MCP Enhancement:** Recording mode (for skeleton UI only - rare) -**How-To Guide:** [Run ATDD](/docs/how-to/workflows/run-atdd.md) +**How-To Guide:** [Run ATDD](/docs/tea/how-to/workflows/run-atdd.md) --- -## *automate +## automate **Purpose:** Expand test coverage after implementation @@ -130,11 +152,11 @@ Quick reference for all 8 TEA (Test Architect) workflows. For detailed step-by-s **MCP Enhancement:** Healing + Recording modes (fix tests, verify selectors) -**How-To Guide:** [Run Automate](/docs/how-to/workflows/run-automate.md) +**How-To Guide:** [Run Automate](/docs/tea/how-to/workflows/run-automate.md) --- -## *test-review +## test-review **Purpose:** Audit test quality with 0-100 scoring @@ -158,11 +180,11 @@ Quick reference for all 8 TEA (Test Architect) workflows. For detailed step-by-s - Structure: 10 points - Performance: 10 points -**How-To Guide:** [Run Test Review](/docs/how-to/workflows/run-test-review.md) +**How-To Guide:** [Run Test Review](/docs/tea/how-to/workflows/run-test-review.md) --- -## *nfr-assess +## nfr-assess **Purpose:** Validate non-functional requirements with evidence @@ -180,11 +202,11 @@ Quick reference for all 8 TEA (Test Architect) workflows. For detailed step-by-s - Mitigation plans - Gate decision inputs -**How-To Guide:** [Run NFR Assessment](/docs/how-to/workflows/run-nfr-assess.md) +**How-To Guide:** [Run NFR Assessment](/docs/tea/how-to/workflows/run-nfr-assess.md) --- -## *trace +## trace **Purpose:** Requirements traceability + quality gate decision @@ -210,7 +232,7 @@ Quick reference for all 8 TEA (Test Architect) workflows. For detailed step-by-s - P1 coverage: ≥90% for PASS, 80-89% for CONCERNS, <80% FAIL - Overall coverage: ≥80% required -**How-To Guide:** [Run Trace](/docs/how-to/workflows/run-trace.md) +**How-To Guide:** [Run Trace](/docs/tea/how-to/workflows/run-trace.md) --- @@ -218,36 +240,36 @@ Quick reference for all 8 TEA (Test Architect) workflows. For detailed step-by-s | Command | Phase | Frequency | Primary Output | |---------|-------|-----------|----------------| -| `*framework` | 3 | Once | Test infrastructure | -| `*ci` | 3 | Once | CI/CD pipeline | -| `*test-design` | 3, 4 | System + per epic | Test design doc | -| `*atdd` | 4 | Per story (optional) | Failing tests | -| `*automate` | 4 | Per story | Passing tests | -| `*test-review` | 4, Gate | Per epic/release | Quality report | -| `*nfr-assess` | 2, Gate | Per release | NFR assessment | -| `*trace` | 2, 4, Gate | Baseline + refresh + gate | Coverage matrix + decision | +| `framework` | 3 | Once | Test infrastructure | +| `ci` | 3 | Once | CI/CD pipeline | +| `test-design` | 3, 4 | System + per epic | Test design doc | +| `atdd` | 4 | Per story (optional) | Failing tests | +| `automate` | 4 | Per story | Passing tests | +| `test-review` | 4, Gate | Per epic/release | Quality report | +| `nfr-assess` | 2, Gate | Per release | NFR assessment | +| `trace` | 2, 4, Gate | Baseline + refresh + gate | Coverage matrix + decision | --- ## See Also **How-To Guides (Detailed Instructions):** -- [Setup Test Framework](/docs/how-to/workflows/setup-test-framework.md) -- [Setup CI Pipeline](/docs/how-to/workflows/setup-ci.md) -- [Run Test Design](/docs/how-to/workflows/run-test-design.md) -- [Run ATDD](/docs/how-to/workflows/run-atdd.md) -- [Run Automate](/docs/how-to/workflows/run-automate.md) -- [Run Test Review](/docs/how-to/workflows/run-test-review.md) -- [Run NFR Assessment](/docs/how-to/workflows/run-nfr-assess.md) -- [Run Trace](/docs/how-to/workflows/run-trace.md) +- [Setup Test Framework](/docs/tea/how-to/workflows/setup-test-framework.md) +- [Setup CI Pipeline](/docs/tea/how-to/workflows/setup-ci.md) +- [Run Test Design](/docs/tea/how-to/workflows/run-test-design.md) +- [Run ATDD](/docs/tea/how-to/workflows/run-atdd.md) +- [Run Automate](/docs/tea/how-to/workflows/run-automate.md) +- [Run Test Review](/docs/tea/how-to/workflows/run-test-review.md) +- [Run NFR Assessment](/docs/tea/how-to/workflows/run-nfr-assess.md) +- [Run Trace](/docs/tea/how-to/workflows/run-trace.md) **Explanation:** -- [TEA Overview](/docs/explanation/features/tea-overview.md) - Complete TEA lifecycle -- [Engagement Models](/docs/explanation/tea/engagement-models.md) - When to use which workflows +- [TEA Overview](/docs/tea/explanation/tea-overview.md) - Complete TEA lifecycle +- [Engagement Models](/docs/tea/explanation/engagement-models.md) - When to use which workflows **Reference:** -- [TEA Configuration](/docs/reference/tea/configuration.md) - Config options -- [Knowledge Base Index](/docs/reference/tea/knowledge-base.md) - Pattern fragments +- [TEA Configuration](/docs/tea/reference/configuration.md) - Config options +- [Knowledge Base Index](/docs/tea/reference/knowledge-base.md) - Pattern fragments --- diff --git a/docs/reference/tea/configuration.md b/docs/tea/reference/configuration.md similarity index 87% rename from docs/reference/tea/configuration.md rename to docs/tea/reference/configuration.md index 69913103..2d16c047 100644 --- a/docs/reference/tea/configuration.md +++ b/docs/tea/reference/configuration.md @@ -64,21 +64,21 @@ Enable Playwright Utils integration for production-ready fixtures and utilities. **Installer Prompt:** ``` Are you using playwright-utils (@seontechnologies/playwright-utils) in your project? -You must install packages yourself, or use test architect's *framework command. +You must install packages yourself, or use test architect's `framework` command. ``` **Purpose:** Enables TEA to: -- Include playwright-utils in `*framework` scaffold +- Include playwright-utils in `framework` scaffold - Generate tests using playwright-utils fixtures - Review tests against playwright-utils patterns - Configure CI with burn-in and selective testing utilities **Affects Workflows:** -- `*framework` - Includes playwright-utils imports and fixture examples -- `*atdd` - Uses fixtures like `apiRequest`, `authSession` in generated tests -- `*automate` - Leverages utilities for test patterns -- `*test-review` - Reviews against playwright-utils best practices -- `*ci` - Includes burn-in utility and selective testing +- `framework` - Includes playwright-utils imports and fixture examples +- `atdd` - Uses fixtures like `apiRequest`, `authSession` in generated tests +- `automate` - Leverages utilities for test patterns +- `test-review` - Reviews against playwright-utils best practices +- `ci` - Includes burn-in utility and selective testing **Example (Enable):** ```yaml @@ -96,7 +96,7 @@ npm install -D @seontechnologies/playwright-utils ``` **Related:** -- [Integrate Playwright Utils Guide](/docs/how-to/customization/integrate-playwright-utils.md) +- [Integrate Playwright Utils Guide](/docs/tea/how-to/customization/integrate-playwright-utils.md) - [Playwright Utils on npm](https://www.npmjs.com/package/@seontechnologies/playwright-utils) --- @@ -127,9 +127,9 @@ Would you like to enable MCP enhancements in Test Architect? - Visual debugging and healing **Affects Workflows:** -- `*test-design` - Enables exploratory mode (browser-based UI discovery) -- `*atdd` - Enables recording mode (verify selectors with live browser) -- `*automate` - Enables healing mode (fix tests with visual debugging) +- `test-design` - Enables exploratory mode (browser-based UI discovery) +- `atdd` - Enables recording mode (verify selectors with live browser) +- `automate` - Enables healing mode (fix tests with visual debugging) **MCP Servers Required:** @@ -173,8 +173,8 @@ tea_use_mcp_enhancements: false 3. Browser binaries installed (`npx playwright install`) **Related:** -- [Enable MCP Enhancements Guide](/docs/how-to/customization/enable-tea-mcp-enhancements.md) -- [TEA Overview - MCP Section](/docs/explanation/features/tea-overview.md#playwright-mcp-enhancements) +- [Enable MCP Enhancements Guide](/docs/tea/how-to/customization/enable-tea-mcp-enhancements.md) +- [TEA Overview - MCP Section](/docs/tea/explanation/tea-overview.md#playwright-mcp-enhancements) - [Playwright MCP on npm](https://www.npmjs.com/package/@playwright/mcp) --- @@ -197,14 +197,14 @@ output_folder: _bmad-output ``` **TEA Output Files:** -- `test-design-system.md` (from *test-design system-level) -- `test-design-epic-N.md` (from *test-design epic-level) -- `test-review.md` (from *test-review) -- `traceability-matrix.md` (from *trace Phase 1) -- `gate-decision-{gate_type}-{story_id}.md` (from *trace Phase 2) -- `nfr-assessment.md` (from *nfr-assess) -- `automation-summary.md` (from *automate) -- `atdd-checklist-{story_id}.md` (from *atdd) +- `test-design-architecture.md` + `test-design-qa.md` (from `test-design` system-level - TWO documents) +- `test-design-epic-N.md` (from `test-design` epic-level) +- `test-review.md` (from `test-review`) +- `traceability-matrix.md` (from `trace` Phase 1) +- `gate-decision-{gate_type}-{story_id}.md` (from `trace` Phase 2) +- `nfr-assessment.md` (from `nfr-assess`) +- `automation-summary.md` (from `automate`) +- `atdd-checklist-{story_id}.md` (from `atdd`) --- @@ -561,7 +561,7 @@ tea_use_mcp_enhancements: true # Recommended **Why recommended:** - Playwright Utils: Production-ready fixtures and utilities - MCP enhancements: Live browser verification, visual debugging -- Together: The three-part stack (see [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md)) +- Together: The three-part stack (see [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md)) **Prerequisites:** ```bash @@ -660,18 +660,18 @@ document_output_language: english ## See Also ### How-To Guides -- [Set Up Test Framework](/docs/how-to/workflows/setup-test-framework.md) -- [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md) -- [Enable MCP Enhancements](/docs/how-to/customization/enable-tea-mcp-enhancements.md) +- [Set Up Test Framework](/docs/tea/how-to/workflows/setup-test-framework.md) +- [Integrate Playwright Utils](/docs/tea/how-to/customization/integrate-playwright-utils.md) +- [Enable MCP Enhancements](/docs/tea/how-to/customization/enable-tea-mcp-enhancements.md) ### Reference -- [TEA Command Reference](/docs/reference/tea/commands.md) -- [Knowledge Base Index](/docs/reference/tea/knowledge-base.md) -- [Glossary](/docs/reference/glossary/index.md) +- [TEA Command Reference](/docs/tea/reference/commands.md) +- [Knowledge Base Index](/docs/tea/reference/knowledge-base.md) +- [Glossary](/docs/tea/glossary/index.md) ### Explanation -- [TEA Overview](/docs/explanation/features/tea-overview.md) -- [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md) +- [TEA Overview](/docs/tea/explanation/tea-overview.md) +- [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md) --- diff --git a/docs/reference/tea/knowledge-base.md b/docs/tea/reference/knowledge-base.md similarity index 92% rename from docs/reference/tea/knowledge-base.md rename to docs/tea/reference/knowledge-base.md index 606ff96e..661e911e 100644 --- a/docs/reference/tea/knowledge-base.md +++ b/docs/tea/reference/knowledge-base.md @@ -19,7 +19,7 @@ Instead of asking AI to "write good tests" every time, TEA: **Example:** ``` -User runs: *test-design +User runs: `test-design` TEA reads tea-index.csv: - Loads: test-quality.md, test-priorities-matrix.md, risk-governance.md @@ -31,7 +31,7 @@ Result: Focused context, consistent quality standards ## How Knowledge Loading Works ### 1. Workflow Trigger -User runs a TEA workflow (e.g., `*test-design`) +User runs a TEA workflow (e.g., `test-design`) ### 2. Manifest Lookup TEA reads `src/bmm/testarch/tea-index.csv`: @@ -60,7 +60,7 @@ Core patterns for test infrastructure and fixture composition. | [playwright-config](../../../src/bmm/testarch/knowledge/playwright-config.md) | Environment switching, timeout standards, artifact outputs | Configuration, environments, CI | | [fixtures-composition](../../../src/bmm/testarch/knowledge/fixtures-composition.md) | mergeTests composition patterns for combining utilities | Fixture merging, utility composition | -**Used in:** `*framework`, `*test-design`, `*atdd`, `*automate`, `*test-review` +**Used in:** `framework`, `test-design`, `atdd`, `automate`, `test-review` --- @@ -74,7 +74,7 @@ Patterns for test data generation, authentication, and setup. | [email-auth](../../../src/bmm/testarch/knowledge/email-auth.md) | Magic link extraction, state preservation, negative flows | Authentication, email testing | | [auth-session](../../../src/bmm/testarch/knowledge/auth-session.md) | Token persistence, multi-user, API/browser authentication | Auth patterns, session management | -**Used in:** `*framework`, `*atdd`, `*automate`, `*test-review` +**Used in:** `framework`, `atdd`, `automate`, `test-review` --- @@ -89,7 +89,7 @@ Network interception, error handling, and reliability patterns. | [error-handling](../../../src/bmm/testarch/knowledge/error-handling.md) | Scoped exception handling, retry validation, telemetry logging | Error patterns, resilience | | [network-error-monitor](../../../src/bmm/testarch/knowledge/network-error-monitor.md) | HTTP 4xx/5xx detection for UI tests | Error detection, monitoring | -**Used in:** `*atdd`, `*automate`, `*test-review` +**Used in:** `atdd`, `automate`, `test-review` --- @@ -103,7 +103,7 @@ CI/CD patterns, burn-in testing, and selective test execution. | [burn-in](../../../src/bmm/testarch/knowledge/burn-in.md) | Smart test selection, git diff for CI optimization | Test selection, performance | | [selective-testing](../../../src/bmm/testarch/knowledge/selective-testing.md) | Tag/grep usage, spec filters, diff-based runs | Test filtering, optimization | -**Used in:** `*ci`, `*test-review` +**Used in:** `ci`, `test-review` --- @@ -119,7 +119,7 @@ Test quality standards, test level selection, and TDD patterns. | [test-healing-patterns](../../../src/bmm/testarch/knowledge/test-healing-patterns.md) | Common failure patterns and automated fixes | Debugging, healing, fixes | | [component-tdd](../../../src/bmm/testarch/knowledge/component-tdd.md) | Red→green→refactor workflow, provider isolation | TDD, component testing | -**Used in:** `*test-design`, `*atdd`, `*automate`, `*test-review`, `*trace` +**Used in:** `test-design`, `atdd`, `automate`, `test-review`, `trace` --- @@ -133,7 +133,7 @@ Risk assessment, governance, and gate decision frameworks. | [probability-impact](../../../src/bmm/testarch/knowledge/probability-impact.md) | Probability × impact scale for scoring matrix | Risk scoring, impact analysis | | [nfr-criteria](../../../src/bmm/testarch/knowledge/nfr-criteria.md) | Security, performance, reliability, maintainability status | NFRs, compliance, enterprise | -**Used in:** `*test-design`, `*nfr-assess`, `*trace` +**Used in:** `test-design`, `nfr-assess`, `trace` --- @@ -147,7 +147,7 @@ Selector resilience, race condition debugging, and visual debugging. | [timing-debugging](../../../src/bmm/testarch/knowledge/timing-debugging.md) | Race condition identification and deterministic fixes | Race conditions, timing issues | | [visual-debugging](../../../src/bmm/testarch/knowledge/visual-debugging.md) | Trace viewer usage, artifact expectations | Debugging, trace viewer, artifacts | -**Used in:** `*atdd`, `*automate`, `*test-review` +**Used in:** `atdd`, `automate`, `test-review` --- @@ -161,7 +161,7 @@ Feature flag testing, contract testing, and API testing patterns. | [contract-testing](../../../src/bmm/testarch/knowledge/contract-testing.md) | Pact publishing, provider verification, resilience | Contract testing, Pact | | [api-testing-patterns](../../../src/bmm/testarch/knowledge/api-testing-patterns.md) | Pure API patterns without browser | API testing, backend testing | -**Used in:** `*test-design`, `*atdd`, `*automate` +**Used in:** `test-design`, `atdd`, `automate` --- @@ -183,7 +183,7 @@ Patterns for using `@seontechnologies/playwright-utils` package (9 utilities). **Note:** `fixtures-composition` is listed under Architecture & Fixtures (general Playwright `mergeTests` pattern, applies to all fixtures). -**Used in:** `*framework` (if `tea_use_playwright_utils: true`), `*atdd`, `*automate`, `*test-review`, `*ci` +**Used in:** `framework` (if `tea_use_playwright_utils: true`), `atdd`, `automate`, `test-review`, `ci` **Official Docs:** @@ -219,7 +219,7 @@ risk-governance,Risk Governance,Risk scoring and gate decisions,risk;governance, Each TEA workflow loads specific fragments: -### *framework +### `framework` **Key Fragments:** - fixture-architecture.md - playwright-config.md @@ -231,7 +231,7 @@ Each TEA workflow loads specific fragments: --- -### *test-design +### `test-design` **Key Fragments:** - test-quality.md - test-priorities-matrix.md @@ -245,7 +245,7 @@ Each TEA workflow loads specific fragments: --- -### *atdd +### `atdd` **Key Fragments:** - test-quality.md - component-tdd.md @@ -262,7 +262,7 @@ Each TEA workflow loads specific fragments: --- -### *automate +### `automate` **Key Fragments:** - test-quality.md - test-levels-framework.md @@ -279,7 +279,7 @@ Each TEA workflow loads specific fragments: --- -### *test-review +### `test-review` **Key Fragments:** - test-quality.md - test-healing-patterns.md @@ -296,7 +296,7 @@ Each TEA workflow loads specific fragments: --- -### *ci +### `ci` **Key Fragments:** - ci-burn-in.md - burn-in.md @@ -307,7 +307,7 @@ Each TEA workflow loads specific fragments: --- -### *nfr-assess +### `nfr-assess` **Key Fragments:** - nfr-criteria.md - risk-governance.md @@ -317,7 +317,7 @@ Each TEA workflow loads specific fragments: --- -### *trace +### `trace` **Key Fragments:** - test-priorities-matrix.md - risk-governance.md @@ -331,9 +331,9 @@ Each TEA workflow loads specific fragments: ## Related -- [TEA Overview](/docs/explanation/features/tea-overview.md) - How knowledge base fits in TEA -- [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md) - Context engineering philosophy -- [TEA Command Reference](/docs/reference/tea/commands.md) - Workflows that use fragments +- [TEA Overview](/docs/tea/explanation/tea-overview.md) - How knowledge base fits in TEA +- [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md) - Context engineering philosophy +- [TEA Command Reference](/docs/tea/reference/commands.md) - Workflows that use fragments --- diff --git a/docs/tutorials/getting-started/tea-lite-quickstart.md b/docs/tea/tutorials/tea-lite-quickstart.md similarity index 82% rename from docs/tutorials/getting-started/tea-lite-quickstart.md rename to docs/tea/tutorials/tea-lite-quickstart.md index 839c06ac..b6e7c108 100644 --- a/docs/tutorials/getting-started/tea-lite-quickstart.md +++ b/docs/tea/tutorials/tea-lite-quickstart.md @@ -3,7 +3,7 @@ title: "Getting Started with Test Architect" description: Learn Test Architect fundamentals by generating and running tests for an existing demo app in 30 minutes --- -Welcome! **Test Architect (TEA) Lite** is the simplest way to get started with TEA - just use `*automate` to generate tests for existing features. Perfect for beginners who want to learn TEA fundamentals quickly. +Welcome! **Test Architect (TEA) Lite** is the simplest way to get started with TEA - just use the `automate` workflow (e.g., `/automate` in Claude Code) to generate tests for existing features. Perfect for beginners who want to learn TEA fundamentals quickly. ## What You'll Build @@ -15,18 +15,18 @@ By the end of this 30-minute tutorial, you'll have: :::note[Prerequisites] - Node.js installed (v20 or later) - 30 minutes of focused time -- We'll use TodoMVC () as our demo app +- We'll use TodoMVC () as our demo app ::: :::tip[Quick Path] -Load TEA (`*tea`) → scaffold framework (`*framework`) → create test plan (`*test-design`) → generate tests (`*automate`) → run with `npx playwright test`. +Load TEA (`tea`) → scaffold framework (`framework`) → create test plan (`test-design`) → generate tests (`automate`) → run with `npx playwright test`. ::: ## TEA Approaches Explained Before we start, understand the three ways to use TEA: -- **TEA Lite** (this tutorial): Beginner using just `*automate` to test existing features +- **TEA Lite** (this tutorial): Beginner using just the `automate` workflow to test existing features - **TEA Solo**: Using TEA standalone without full BMad Method integration - **TEA Integrated**: Full BMad Method with all TEA workflows across phases @@ -68,7 +68,7 @@ BMad is now installed! You'll see a `_bmad/` folder in your project. Start a new chat with your AI assistant (Claude, etc.) and type: ``` -*tea +tea ``` This loads the Test Architect agent. You'll see TEA's menu with available workflows. @@ -78,7 +78,7 @@ This loads the Test Architect agent. You'll see TEA's menu with available workfl In your chat, run: ``` -*framework +framework ``` TEA will ask you questions: @@ -120,7 +120,7 @@ Test design is where TEA shines - risk-based planning before writing tests. In your chat with TEA, run: ``` -*test-design +test-design ``` **Q: System-level or epic-level?** @@ -161,7 +161,7 @@ Now the magic happens - TEA generates tests based on your test design. In your chat with TEA, run: ``` -*automate +automate ``` **Q: What are you testing?** @@ -280,7 +280,7 @@ test('should mark todo as complete', async ({ page, apiRequest }) => { - Built-in schema validation - Cleaner, more maintainable code -See [Integrate Playwright Utils](/docs/how-to/customization/integrate-playwright-utils.md) to enable this. +See [Integrate Playwright Utils](/docs/tea/how-to/customization/integrate-playwright-utils.md) to enable this. ## Step 4: Run and Validate (5 minutes) @@ -319,9 +319,9 @@ Opens a beautiful HTML report showing: ### What Just Happened? You used **TEA Lite** to: -1. Scaffold a production-ready test framework (`*framework`) -2. Create a risk-based test plan (`*test-design`) -3. Generate comprehensive tests (`*automate`) +1. Scaffold a production-ready test framework (`framework`) +2. Create a risk-based test plan (`test-design`) +3. Generate comprehensive tests (`automate`) 4. Run tests against an existing application All in 30 minutes! @@ -334,10 +334,10 @@ Congratulations! You've completed the TEA Lite tutorial. You learned: | Command | Purpose | | -------------- | ------------------------------------ | -| `*tea` | Load the TEA agent | -| `*framework` | Scaffold test infrastructure | -| `*test-design` | Risk-based test planning | -| `*automate` | Generate tests for existing features | +| `tea` | Load the TEA agent | +| `framework` | Scaffold test infrastructure | +| `test-design` | Risk-based test planning | +| `automate` | Generate tests for existing features | ### TEA Principles - **Risk-based testing** - Depth scales with impact (P0 vs P3) @@ -346,44 +346,44 @@ Congratulations! You've completed the TEA Lite tutorial. You learned: - **Production-ready from day one** - Not toy examples :::tip[Key Takeaway] -TEA Lite (just `*automate`) is perfect for beginners learning TEA fundamentals, testing existing applications, quick test coverage expansion, and teams wanting fast results. +TEA Lite (just `automate`) is perfect for beginners learning TEA fundamentals, testing existing applications, quick test coverage expansion, and teams wanting fast results. ::: ## Understanding ATDD vs Automate -This tutorial used `*automate` to generate tests for **existing features** (tests pass immediately). +This tutorial used the `automate` workflow to generate tests for **existing features** (tests pass immediately). -**When to use `*automate`:** +**When to use `automate`:** - Feature already exists - Want to add test coverage - Tests should pass on first run -**When to use `*atdd` (Acceptance Test-Driven Development):** +**When to use `atdd` (Acceptance Test-Driven Development):** - Feature doesn't exist yet (Test-Driven Development workflow) - Want failing tests BEFORE implementation - Following red → green → refactor cycle -See [How to Run ATDD](/docs/how-to/workflows/run-atdd.md) for the test-drive development (TDD) approach. +See [How to Run ATDD](/docs/tea/how-to/workflows/run-atdd.md) for the test-drive development (TDD) approach. ## Next Steps ### Level Up Your TEA Skills **How-To Guides** (task-oriented): -- [How to Run Test Design](/docs/how-to/workflows/run-test-design.md) - Deep dive into risk assessment -- [How to Run ATDD](/docs/how-to/workflows/run-atdd.md) - Generate failing tests first (TDD) -- [How to Set Up CI Pipeline](/docs/how-to/workflows/setup-ci.md) - Automate test execution -- [How to Review Test Quality](/docs/how-to/workflows/run-test-review.md) - Audit test quality +- [How to Run Test Design](/docs/tea/how-to/workflows/run-test-design.md) - Deep dive into risk assessment +- [How to Run ATDD](/docs/tea/how-to/workflows/run-atdd.md) - Generate failing tests first (TDD) +- [How to Set Up CI Pipeline](/docs/tea/how-to/workflows/setup-ci.md) - Automate test execution +- [How to Review Test Quality](/docs/tea/how-to/workflows/run-test-review.md) - Audit test quality **Explanation** (understanding-oriented): -- [TEA Overview](/docs/explanation/features/tea-overview.md) - Complete TEA capabilities -- [Testing as Engineering](/docs/explanation/philosophy/testing-as-engineering.md) - **Why TEA exists** (problem + solution) -- [Risk-Based Testing](/docs/explanation/tea/risk-based-testing.md) - How risk scoring works +- [TEA Overview](/docs/tea/explanation/tea-overview.md) - Complete TEA capabilities +- [Testing as Engineering](/docs/tea/explanation/testing-as-engineering.md) - **Why TEA exists** (problem + solution) +- [Risk-Based Testing](/docs/tea/explanation/risk-based-testing.md) - How risk scoring works **Reference** (quick lookup): -- [TEA Command Reference](/docs/reference/tea/commands.md) - All 8 TEA workflows -- [TEA Configuration](/docs/reference/tea/configuration.md) - Config options -- [Glossary](/docs/reference/glossary/index.md) - TEA terminology +- [TEA Command Reference](/docs/tea/reference/commands.md) - All 8 TEA workflows +- [TEA Configuration](/docs/tea/reference/configuration.md) - Config options +- [Glossary](/docs/tea/glossary/index.md) - TEA terminology ### Try TEA Solo @@ -392,14 +392,14 @@ Ready for standalone usage without full BMad Method? Use TEA Solo: - Bring your own requirements - Use on non-BMad projects -See [TEA Overview](/docs/explanation/features/tea-overview.md) for engagement models. +See [TEA Overview](/docs/tea/explanation/tea-overview.md) for engagement models. ### Go Full TEA Integrated Want the complete quality operating model? Try TEA Integrated with BMad Method: - Phase 2: Planning with non-functional requirements (NFR) assessment - Phase 3: Architecture testability review -- Phase 4: Per-epic test design → ATDD → automate +- Phase 4: Per-epic test design → `atdd` → `automate` - Release Gate: Coverage traceability and gate decisions See [BMad Method Documentation](/) for the full workflow. diff --git a/docs/tutorials/getting-started/getting-started-bmadv6.md b/docs/tutorials/getting-started.md similarity index 56% rename from docs/tutorials/getting-started/getting-started-bmadv6.md rename to docs/tutorials/getting-started.md index ed674cb3..38d25a2d 100644 --- a/docs/tutorials/getting-started/getting-started-bmadv6.md +++ b/docs/tutorials/getting-started.md @@ -1,12 +1,8 @@ --- -title: "Getting Started with the BMad Method" +title: "Getting Started" description: Install BMad and build your first project --- -**Upgrading from previous versions?** See the [Upgrade Guide](/docs/how-to/installation/upgrade-to-v6.md) instead. - ---- - Build software faster using AI-powered workflows with specialized agents that guide you through planning, architecture, and implementation. ## What You'll Learn @@ -24,11 +20,10 @@ Build software faster using AI-powered workflows with specialized agents that gu ::: :::tip[Quick Path] -**Install** → `npx bmad-method@alpha install` -**Initialize** → Load Analyst agent, run `workflow-init` +**Install** → `npx bmad-method install` **Plan** → PM creates PRD, Architect creates architecture **Build** → SM manages sprints, DEV implements stories -**Always use fresh chats** for each workflow to avoid context issues. +**Fresh chats** for each workflow to avoid context issues. ::: ## Understanding BMad @@ -42,9 +37,7 @@ BMad helps you build software through guided workflows with specialized AI agent | 3 | Solutioning | Design architecture *(BMad Method/Enterprise only)* | | 4 | Implementation | Build epic by epic, story by story | -![BMad Method Workflow - Standard Greenfield](./images/workflow-method-greenfield.svg) - -*Complete visual flowchart showing all phases, workflows, and agents for the standard greenfield track.* +**[Open the Workflow Map](/docs/reference/workflow-map.md)** to explore phases, workflows, and context management. Based on your project's complexity, BMad offers three planning tracks: @@ -63,69 +56,41 @@ Story counts are guidance, not definitions. Choose your track based on planning Open a terminal in your project directory and run: ```bash -npx bmad-method@alpha install +npx bmad-method install ``` -The interactive installer guides you through setup and creates a `_bmad/` folder with all agents and workflows. +When prompted to select modules, choose **BMad Method**. -Verify your installation: +The installer creates two folders: +- `_bmad/` — agents, workflows, tasks, and configuration +- `_bmad-output/` — empty for now, but this is where your artifacts will be saved -``` -your-project/ -├── _bmad/ -│ ├── bmm/ # Method module -│ │ ├── agents/ # Agent files -│ │ ├── workflows/ # Workflow files -│ │ └── config.yaml # Module config -│ └── core/ # Core utilities -├── _bmad-output/ # Generated artifacts (created later) -└── .claude/ # IDE configuration (if using Claude Code) -``` - -:::tip[Troubleshooting] -Having issues? See [Install BMad](/docs/how-to/installation/install-bmad.md) for common solutions. -::: - -## Step 1: Initialize Your Project - -Load the **Analyst agent** in your IDE, wait for the menu, then run `workflow-init`. - -:::note[How to Load Agents] -Type `/` in your IDE and use autocomplete. Not sure what's available? Start with `/bmad` to see all agents and workflows. -::: - -The workflow asks you to describe your project, whether it's new or existing, and the general complexity. Based on your description, it recommends a planning track. - -Once you confirm, the workflow creates `bmm-workflow-status.yaml` to track your progress through all phases. +Open your AI IDE in the project folder. Run the `help` workflow (`/bmad-help` on most platforms) to see what to do next — it detects what you've completed and recommends the next step. :::caution[Fresh Chats] Always start a fresh chat for each workflow. This prevents context limitations from causing issues. ::: -## Step 2: Create Your Plan +## Step 1: Create Your Plan -After initialization, work through phases 1-3. **Use fresh chats for each workflow.** - -:::tip[Check Your Status] -Unsure what's next? Load any agent and ask for `workflow-status`. It tells you the next recommended or required workflow. -::: +Work through phases 1-3. **Use fresh chats for each workflow.** ### Phase 1: Analysis (Optional) All workflows in this phase are optional: -- **brainstorm-project** — Guided ideation +- **brainstorming** — Guided ideation - **research** — Market and technical research -- **product-brief** — Recommended foundation document +- **create-product-brief** — Recommended foundation document ### Phase 2: Planning (Required) **For BMad Method and Enterprise tracks:** 1. Load the **PM agent** in a new chat -2. Run the PRD workflow: `*prd` +2. Run the `prd` workflow 3. Output: `PRD.md` **For Quick Flow track:** -- Use `tech-spec` instead of PRD, then skip to implementation +- Use the `quick-spec` workflow instead of PRD, then skip to implementation :::note[UX Design (Optional)] If your project has a user interface, load the **UX-Designer agent** and run the UX design workflow after creating your PRD. @@ -150,10 +115,10 @@ Epics and stories are now created *after* architecture. This produces better qua **Implementation Readiness Check** *(Highly Recommended)* 1. Load the **Architect agent** in a new chat -2. Run `implementation-readiness` +2. Run `check-implementation-readiness` 3. Validates cohesion across all planning documents -## Step 3: Build Your Project +## Step 2: Build Your Project Once planning is complete, move to implementation. **Each workflow should run in a fresh chat.** @@ -165,12 +130,11 @@ Load the **SM agent** and run `sprint-planning`. This creates `sprint-status.yam For each story, repeat this cycle with fresh chats: -| Step | Agent | Workflow | Purpose | -| ---- | ----- | -------------- | ------------------------------------- | -| 1 | SM | `create-story` | Create story file from epic | -| 2 | DEV | `dev-story` | Implement the story | -| 3 | TEA | `automate` | Generate guardrail tests *(optional)* | -| 4 | DEV | `code-review` | Quality validation *(recommended)* | +| Step | Agent | Workflow | Purpose | +| ---- | ----- | -------------- | ---------------------------------- | +| 1 | SM | `create-story` | Create story file from epic | +| 2 | DEV | `dev-story` | Implement the story | +| 3 | DEV | `code-review` | Quality validation *(recommended)* | After completing all stories in an epic, load the **SM agent** and run `retrospective`. @@ -192,25 +156,23 @@ your-project/ │ ├── PRD.md # Your requirements document │ ├── architecture.md # Technical decisions │ ├── epics/ # Epic and story files -│ ├── bmm-workflow-status.yaml # Phase progress tracking │ └── sprint-status.yaml # Sprint tracking └── ... ``` ## Quick Reference -| Command | Agent | Purpose | -| --------------------------- | --------- | ------------------------------------ | -| `*workflow-init` | Analyst | Initialize a new project | -| `*workflow-status` | Any | Check progress and next steps | -| `*prd` | PM | Create Product Requirements Document | -| `*create-architecture` | Architect | Create architecture document | -| `*create-epics-and-stories` | PM | Break down PRD into epics | -| `*implementation-readiness` | Architect | Validate planning cohesion | -| `*sprint-planning` | SM | Initialize sprint tracking | -| `*create-story` | SM | Create a story file | -| `*dev-story` | DEV | Implement a story | -| `*code-review` | DEV | Review implemented code | +| Workflow | Agent | Purpose | +| -------------------------------- | --------- | ------------------------------------ | +| `help` | Any | Get guidance on what to do next | +| `prd` | PM | Create Product Requirements Document | +| `create-architecture` | Architect | Create architecture document | +| `create-epics-and-stories` | PM | Break down PRD into epics | +| `check-implementation-readiness` | Architect | Validate planning cohesion | +| `sprint-planning` | SM | Initialize sprint tracking | +| `create-story` | SM | Create a story file | +| `dev-story` | DEV | Implement a story | +| `code-review` | DEV | Review implemented code | ## Common Questions @@ -221,26 +183,23 @@ Only for BMad Method and Enterprise tracks. Quick Flow skips from tech-spec to i Yes. The SM agent has a `correct-course` workflow for handling scope changes. **What if I want to brainstorm first?** -Load the Analyst agent and run `brainstorm-project` before `workflow-init`. +Load the Analyst agent and run `brainstorming` before starting your PRD. -**Can I skip workflow-init and workflow-status?** -Yes, once you learn the flow. Use the Quick Reference to go directly to needed workflows. +**Do I need to follow a strict order?** +Not strictly. Once you learn the flow, you can run workflows directly using the Quick Reference above. ## Getting Help - **During workflows** — Agents guide you with questions and explanations - **Community** — [Discord](https://discord.gg/gk8jAdXWmj) (#bmad-method-help, #report-bugs-and-issues) -- **Documentation** — [BMM Workflow Reference](/docs/reference/workflows/index.md) -- **Video tutorials** — [BMad Code YouTube](https://www.youtube.com/@BMadCode) +- **Stuck?** — Run `help` to see what to do next ## Key Takeaways :::tip[Remember These] -- **Always use fresh chats** — Load agents in new chats for each workflow -- **Let workflow-status guide you** — Ask any agent for status when unsure -- **Track matters** — Quick Flow uses tech-spec; Method/Enterprise need PRD and architecture -- **Tracking is automatic** — Status files update themselves -- **Agents are flexible** — Use menu numbers, shortcuts (`*prd`), or natural language +- **Always use fresh chats** — Start a new chat for each workflow +- **Track matters** — Quick Flow uses quick-spec; Method/Enterprise need PRD and architecture +- **Use `help` when stuck** — It detects your progress and suggests next steps ::: -Ready to start? Install BMad, load the Analyst, run `workflow-init`, and let the agents guide you. +Ready to start? Install BMad and let the agents guide you through your first project. diff --git a/docs/tutorials/getting-started/images/workflow-method-greenfield.excalidraw b/docs/tutorials/getting-started/images/workflow-method-greenfield.excalidraw deleted file mode 100644 index c7acf4f5..00000000 --- a/docs/tutorials/getting-started/images/workflow-method-greenfield.excalidraw +++ /dev/null @@ -1,5034 +0,0 @@ -{ - "type": "excalidraw", - "version": 2, - "source": "https://marketplace.visualstudio.com/items?itemName=pomdtr.excalidraw-editor", - "elements": [ - { - "id": "title", - "type": "text", - "x": 284.6321356748704, - "y": 20, - "width": 673.7520141601562, - "height": 37.15738334525602, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 29.725906676204815, - "fontFamily": 1, - "text": "BMad Method Workflow - Standard Greenfield", - "textAlign": "center", - "verticalAlign": "top", - "locked": false, - "version": 67, - "versionNonce": 1431078555, - "index": "a0", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522299028, - "link": null, - "containerId": null, - "originalText": "BMad Method Workflow - Standard Greenfield", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "start-ellipse", - "type": "ellipse", - "x": 60, - "y": 80, - "width": 120, - "height": 60, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "#e3f2fd", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "start-group" - ], - "boundElements": [ - { - "type": "text", - "id": "start-text" - }, - { - "type": "arrow", - "id": "arrow-start-discovery" - } - ], - "locked": false, - "version": 2, - "versionNonce": 1364787547, - "index": "a1", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "updated": 1763522171079, - "link": null - }, - { - "id": "start-text", - "type": "text", - "x": 93, - "y": 98, - "width": 54, - "height": 25, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "start-group" - ], - "fontSize": 20, - "fontFamily": 1, - "text": "Start", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "start-ellipse", - "locked": false, - "version": 2, - "versionNonce": 1303811541, - "index": "a2", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522171079, - "link": null, - "originalText": "Start", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "phase1-header", - "type": "text", - "x": 13.742901708014983, - "y": 180.0057616006372, - "width": 200, - "height": 30, - "angle": 0, - "strokeColor": "#2e7d32", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 24, - "fontFamily": 1, - "text": "PHASE 1", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 18, - "versionNonce": 1987415189, - "index": "a3", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522322404, - "link": null, - "containerId": null, - "originalText": "PHASE 1", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "phase1-subtitle", - "type": "text", - "x": 140.26189010000303, - "y": 168.98316506386624, - "width": 75.31195068359375, - "height": 40, - "angle": 0, - "strokeColor": "#666666", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 16, - "fontFamily": 1, - "text": "Discovery\n(Optional)", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 225, - "versionNonce": 1515322069, - "index": "a4", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522324513, - "link": null, - "containerId": null, - "originalText": "Discovery\n(Optional)", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "arrow-start-discovery", - "type": "arrow", - "x": 120, - "y": 140, - "width": 0, - "height": 100, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "start-ellipse", - "focus": 0, - "gap": 1 - }, - "endBinding": { - "elementId": "decision-discovery", - "focus": 0, - "gap": 1 - }, - "points": [ - [ - 0, - 0 - ], - [ - 0, - 100 - ] - ], - "lastCommittedPoint": null, - "version": 2, - "versionNonce": 2116462235, - "index": "a5", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522171079, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "decision-discovery", - "type": "diamond", - "x": 40, - "y": 240, - "width": 160, - "height": 100, - "angle": 0, - "strokeColor": "#f57c00", - "backgroundColor": "#fff3e0", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "decision-discovery-group" - ], - "boundElements": [ - { - "type": "text", - "id": "decision-discovery-text" - }, - { - "type": "arrow", - "id": "arrow-start-discovery" - }, - { - "type": "arrow", - "id": "arrow-discovery-yes" - }, - { - "type": "arrow", - "id": "arrow-discovery-no" - } - ], - "locked": false, - "version": 2, - "versionNonce": 1508959381, - "index": "a6", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "updated": 1763522171079, - "link": null - }, - { - "id": "decision-discovery-text", - "type": "text", - "x": 55, - "y": 265, - "width": 130, - "height": 50, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "decision-discovery-group" - ], - "fontSize": 16, - "fontFamily": 1, - "text": "Include\nDiscovery?", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "decision-discovery", - "locked": false, - "version": 2, - "versionNonce": 627907387, - "index": "a7", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522171079, - "link": null, - "originalText": "Include\nDiscovery?", - "autoResize": true, - "lineHeight": 1.5625 - }, - { - "id": "arrow-discovery-yes", - "type": "arrow", - "x": 120, - "y": 340, - "width": 0, - "height": 40, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "decision-discovery", - "focus": 0, - "gap": 1 - }, - "endBinding": { - "elementId": "proc-brainstorm", - "focus": 0, - "gap": 1 - }, - "points": [ - [ - 0, - 0 - ], - [ - 0, - 40 - ] - ], - "lastCommittedPoint": null, - "version": 2, - "versionNonce": 133270005, - "index": "a8", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522171079, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "label-yes-discovery", - "type": "text", - "x": 130, - "y": 350, - "width": 30, - "height": 20, - "angle": 0, - "strokeColor": "#2e7d32", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 16, - "fontFamily": 1, - "text": "Yes", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 2, - "versionNonce": 1362885595, - "index": "a9", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522171079, - "link": null, - "containerId": null, - "originalText": "Yes", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "proc-brainstorm", - "type": "rectangle", - "x": 40, - "y": 380, - "width": 160, - "height": 80, - "angle": 0, - "strokeColor": "#00acc1", - "backgroundColor": "#b2ebf2", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-brainstorm-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-brainstorm-text" - }, - { - "type": "arrow", - "id": "arrow-discovery-yes" - }, - { - "type": "arrow", - "id": "arrow-brainstorm-research" - }, - { - "id": "jv0rnlK2D9JKIGTO7pUtT", - "type": "arrow" - } - ], - "locked": false, - "version": 3, - "versionNonce": 115423290, - "index": "aA", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1764191341773, - "link": null - }, - { - "id": "proc-brainstorm-text", - "type": "text", - "x": 50, - "y": 395, - "width": 140, - "height": 50, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-brainstorm-group" - ], - "fontSize": 14, - "fontFamily": 1, - "text": "Brainstorm\n<>", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-brainstorm", - "locked": false, - "version": 2, - "versionNonce": 765839483, - "index": "aB", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522171079, - "link": null, - "originalText": "Brainstorm\n<>", - "autoResize": true, - "lineHeight": 1.7857142857142858 - }, - { - "id": "arrow-brainstorm-research", - "type": "arrow", - "x": 120, - "y": 460.45161416125165, - "width": 0, - "height": 29.096771677496633, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-brainstorm", - "focus": 0, - "gap": 1 - }, - "endBinding": { - "elementId": "proc-research", - "focus": 0, - "gap": 1 - }, - "points": [ - [ - 0, - 0 - ], - [ - 0, - 29.096771677496633 - ] - ], - "lastCommittedPoint": null, - "version": 3, - "versionNonce": 828709094, - "index": "aC", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764191023838, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "proc-research", - "type": "rectangle", - "x": 40, - "y": 490, - "width": 160, - "height": 80, - "angle": 0, - "strokeColor": "#00acc1", - "backgroundColor": "#b2ebf2", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-research-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-research-text" - }, - { - "type": "arrow", - "id": "arrow-brainstorm-research" - }, - { - "type": "arrow", - "id": "arrow-research-brief" - }, - { - "id": "RF10FfKbmG72P77I2IoP4", - "type": "arrow" - } - ], - "locked": false, - "version": 5, - "versionNonce": 987493562, - "index": "aD", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1764191042826, - "link": null - }, - { - "id": "proc-research-text", - "type": "text", - "x": 78.26604461669922, - "y": 505, - "width": 83.46791076660156, - "height": 50, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-research-group" - ], - "fontSize": 14, - "fontFamily": 1, - "text": "Research\n<>", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-research", - "locked": false, - "version": 5, - "versionNonce": 92329914, - "index": "aE", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764191023838, - "link": null, - "originalText": "Research\n<>", - "autoResize": true, - "lineHeight": 1.7857142857142858 - }, - { - "id": "arrow-research-brief", - "type": "arrow", - "x": 120.00000000000001, - "y": 570.4516141612517, - "width": 0, - "height": 29.09677167749669, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-research", - "focus": 0, - "gap": 1 - }, - "endBinding": { - "elementId": "proc-product-brief", - "focus": 0, - "gap": 1 - }, - "points": [ - [ - 0, - 0 - ], - [ - 0, - 29.09677167749669 - ] - ], - "lastCommittedPoint": null, - "version": 4, - "versionNonce": 1012730918, - "index": "aF", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764191023838, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "proc-product-brief", - "type": "rectangle", - "x": 40, - "y": 600, - "width": 160, - "height": 80, - "angle": 0, - "strokeColor": "#00acc1", - "backgroundColor": "#b2ebf2", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-product-brief-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-product-brief-text" - }, - { - "type": "arrow", - "id": "arrow-research-brief" - }, - { - "id": "arrow-phase1-to-phase2", - "type": "arrow" - } - ], - "locked": false, - "version": 6, - "versionNonce": 1568298662, - "index": "aG", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1764190985483, - "link": null - }, - { - "id": "proc-product-brief-text", - "type": "text", - "x": 72.69404602050781, - "y": 615, - "width": 94.61190795898438, - "height": 50, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-product-brief-group" - ], - "fontSize": 14, - "fontFamily": 1, - "text": "Product Brief\n<>", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-product-brief", - "locked": false, - "version": 3, - "versionNonce": 1653785435, - "index": "aH", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522366663, - "link": null, - "originalText": "Product Brief\n<>", - "autoResize": true, - "lineHeight": 1.7857142857142858 - }, - { - "id": "arrow-discovery-no", - "type": "arrow", - "x": 199.68944196572753, - "y": 290.14813727772287, - "width": 154.38771404438515, - "height": 0.2869361997344413, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "decision-discovery", - "focus": 0, - "gap": 1 - }, - "endBinding": { - "elementId": "proc-prd", - "focus": 0, - "gap": 5.918648042715176 - }, - "points": [ - [ - 0, - 0 - ], - [ - 154.38771404438515, - 0.2869361997344413 - ] - ], - "lastCommittedPoint": null, - "version": 134, - "versionNonce": 1651808102, - "index": "aI", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764191023838, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "label-no-discovery", - "type": "text", - "x": 220, - "y": 270, - "width": 25, - "height": 20, - "angle": 0, - "strokeColor": "#d32f2f", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 16, - "fontFamily": 1, - "text": "No", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 2, - "versionNonce": 198980347, - "index": "aJ", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522171079, - "link": null, - "containerId": null, - "originalText": "No", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "arrow-phase1-to-phase2", - "type": "arrow", - "x": 200.89221334296062, - "y": 647.2552625380853, - "width": 155.54926796151912, - "height": 344.1924874570816, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-product-brief", - "focus": 0.6109361701343846, - "gap": 1 - }, - "endBinding": { - "elementId": "proc-prd", - "focus": 0.48602478253370496, - "gap": 3.21773034122549 - }, - "points": [ - [ - 0, - 0 - ], - [ - 71.35560764925268, - -38.29318660613865 - ], - [ - 84.68337472706096, - -292.7672603376131 - ], - [ - 155.54926796151912, - -344.1924874570816 - ] - ], - "lastCommittedPoint": null, - "version": 1393, - "versionNonce": 261518822, - "index": "aK", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": { - "type": 2 - }, - "boundElements": [], - "updated": 1764191023838, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow", - "elbowed": false - }, - { - "id": "phase2-header", - "type": "text", - "x": 340, - "y": 180, - "width": 200, - "height": 30, - "angle": 0, - "strokeColor": "#2e7d32", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 24, - "fontFamily": 1, - "text": "PHASE 2", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 2, - "versionNonce": 292690843, - "index": "aL", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522171079, - "link": null, - "containerId": null, - "originalText": "PHASE 2", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "phase2-subtitle", - "type": "text", - "x": 340, - "y": 210, - "width": 200, - "height": 20, - "angle": 0, - "strokeColor": "#666666", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 16, - "fontFamily": 1, - "text": "Planning (Required)", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 2, - "versionNonce": 184762261, - "index": "aM", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522171079, - "link": null, - "containerId": null, - "originalText": "Planning (Required)", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "proc-prd", - "type": "rectangle", - "x": 359.2970847222632, - "y": 250.5934448656302, - "width": 160, - "height": 80, - "angle": 0, - "strokeColor": "#43a047", - "backgroundColor": "#c8e6c9", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-prd-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-prd-text" - }, - { - "type": "arrow", - "id": "arrow-discovery-no" - }, - { - "id": "arrow-phase1-to-phase2", - "type": "arrow" - }, - { - "id": "RF10FfKbmG72P77I2IoP4", - "type": "arrow" - }, - { - "id": "jv0rnlK2D9JKIGTO7pUtT", - "type": "arrow" - }, - { - "id": "arrow-has-ui-no", - "type": "arrow" - }, - { - "id": "arrow-prd-hasui", - "type": "arrow" - } - ], - "locked": false, - "version": 108, - "versionNonce": 930129275, - "index": "aN", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1764952855000, - "link": null - }, - { - "id": "proc-prd-text", - "type": "text", - "x": 418.107097539646, - "y": 278.0934448656302, - "width": 42.379974365234375, - "height": 25, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-prd-group" - ], - "fontSize": 20, - "fontFamily": 1, - "text": "PRD", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-prd", - "locked": false, - "version": 103, - "versionNonce": 1402977702, - "index": "aO", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764191023837, - "link": null, - "originalText": "PRD", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "decision-has-ui", - "type": "diamond", - "x": 360, - "y": 470, - "width": 160, - "height": 100, - "angle": 0, - "strokeColor": "#f57c00", - "backgroundColor": "#fff3e0", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "decision-has-ui-group" - ], - "boundElements": [ - { - "type": "text", - "id": "decision-has-ui-text" - }, - { - "type": "arrow", - "id": "arrow-prd-hasui" - }, - { - "type": "arrow", - "id": "arrow-has-ui-yes" - }, - { - "type": "arrow", - "id": "arrow-has-ui-no" - } - ], - "locked": false, - "version": 3, - "versionNonce": 1003877916, - "index": "aT", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "updated": 1764952855000, - "link": null - }, - { - "id": "decision-has-ui-text", - "type": "text", - "x": 375, - "y": 495, - "width": 130, - "height": 50, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "decision-has-ui-group" - ], - "fontSize": 16, - "fontFamily": 1, - "text": "Has UI?", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "decision-has-ui", - "locked": false, - "version": 2, - "versionNonce": 222317845, - "index": "aU", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522171080, - "link": null, - "originalText": "Has UI?", - "autoResize": true, - "lineHeight": 3.125 - }, - { - "id": "arrow-has-ui-yes", - "type": "arrow", - "x": 440, - "y": 570, - "width": 0, - "height": 30, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "decision-has-ui", - "focus": 0, - "gap": 1 - }, - "endBinding": { - "elementId": "proc-ux-design", - "focus": 0, - "gap": 1 - }, - "points": [ - [ - 0, - 0 - ], - [ - 0, - 30 - ] - ], - "lastCommittedPoint": null, - "version": 2, - "versionNonce": 528906939, - "index": "aV", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522171080, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "label-yes-ui", - "type": "text", - "x": 450, - "y": 580, - "width": 30, - "height": 20, - "angle": 0, - "strokeColor": "#2e7d32", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 16, - "fontFamily": 1, - "text": "Yes", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 2, - "versionNonce": 1581245045, - "index": "aW", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522171080, - "link": null, - "containerId": null, - "originalText": "Yes", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "proc-ux-design", - "type": "rectangle", - "x": 360, - "y": 600, - "width": 160, - "height": 80, - "angle": 0, - "strokeColor": "#8e24aa", - "backgroundColor": "#e1bee7", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-ux-design-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-ux-design-text" - }, - { - "type": "arrow", - "id": "arrow-has-ui-yes" - }, - { - "type": "arrow", - "id": "arrow-ux-to-phase3" - } - ], - "locked": false, - "version": 2, - "versionNonce": 268266331, - "index": "aX", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1763522171080, - "link": null - }, - { - "id": "proc-ux-design-text", - "type": "text", - "x": 370, - "y": 628, - "width": 140, - "height": 25, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-ux-design-group" - ], - "fontSize": 20, - "fontFamily": 1, - "text": "Create UX", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-ux-design", - "locked": false, - "version": 2, - "versionNonce": 157666261, - "index": "aY", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522171080, - "link": null, - "originalText": "Create UX", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "arrow-has-ui-no", - "type": "arrow", - "x": 517.6863546461885, - "y": 287.4640953051147, - "width": 158.4487370618814, - "height": 25.521141112371026, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-prd", - "focus": -0.13686633304390483, - "gap": 1.6107300760746739 - }, - "endBinding": { - "elementId": "proc-architecture", - "focus": 0.16050512337240405, - "gap": 6.573819526326588 - }, - "points": [ - [ - 0, - 0 - ], - [ - 65.15287677643596, - 2.2657676476494544 - ], - [ - 111.59197355857077, - 25.521141112371026 - ], - [ - 158.4487370618814, - 24.060724236900796 - ] - ], - "lastCommittedPoint": null, - "version": 831, - "versionNonce": 1382987110, - "index": "aZ", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": { - "type": 2 - }, - "boundElements": [], - "updated": 1764191570205, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow", - "elbowed": false - }, - { - "id": "label-no-ui", - "type": "text", - "x": 540, - "y": 500, - "width": 25, - "height": 20, - "angle": 0, - "strokeColor": "#d32f2f", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 16, - "fontFamily": 1, - "text": "No", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 5, - "versionNonce": 183981370, - "index": "aa", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [ - { - "id": "arrow-has-ui-no", - "type": "arrow" - } - ], - "updated": 1764191508105, - "link": null, - "containerId": null, - "originalText": "No", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "arrow-ux-to-phase3", - "type": "arrow", - "x": 523.3221723982787, - "y": 642.0805139439535, - "width": 158.4945254931572, - "height": 296.63050159541245, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-ux-design", - "focus": 0.5906867967554547, - "gap": 3.322172398278667 - }, - "endBinding": { - "elementId": "proc-architecture", - "focus": 0.3856343135512404, - "gap": 1 - }, - "points": [ - [ - 0, - 0 - ], - [ - 76.98345162139776, - -45.99075822656016 - ], - [ - 116.19277860378315, - -258.3973533698057 - ], - [ - 158.4945254931572, - -296.63050159541245 - ] - ], - "lastCommittedPoint": null, - "version": 328, - "versionNonce": 517434918, - "index": "ab", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": { - "type": 2 - }, - "boundElements": [], - "updated": 1764191529677, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow", - "elbowed": false - }, - { - "id": "phase3-header", - "type": "text", - "x": 709.0199784799299, - "y": 181.88359184111607, - "width": 200, - "height": 30, - "angle": 0, - "strokeColor": "#2e7d32", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 24, - "fontFamily": 1, - "text": "PHASE 3", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 32, - "versionNonce": 1258326202, - "index": "ac", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190667244, - "link": null, - "containerId": null, - "originalText": "PHASE 3", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "phase3-subtitle", - "type": "text", - "x": 687.4485256281371, - "y": 215.63080811867223, - "width": 220, - "height": 20, - "angle": 0, - "strokeColor": "#666666", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 16, - "fontFamily": 1, - "text": "Solutioning (Required)", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 35, - "versionNonce": 360954426, - "index": "ad", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190669111, - "link": null, - "containerId": null, - "originalText": "Solutioning (Required)", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "proc-architecture", - "type": "rectangle", - "x": 682.7089112343965, - "y": 275.64692474279855, - "width": 160, - "height": 80, - "angle": 0, - "strokeColor": "#f4511e", - "backgroundColor": "#ffccbc", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-architecture-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-architecture-text" - }, - { - "type": "arrow", - "id": "arrow-ux-to-phase3" - }, - { - "type": "arrow", - "id": "arrow-arch-epics" - }, - { - "id": "arrow-has-ui-no", - "type": "arrow" - } - ], - "locked": false, - "version": 90, - "versionNonce": 1912262330, - "index": "ae", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1764191508105, - "link": null - }, - { - "id": "proc-architecture-text", - "type": "text", - "x": 692.7089112343965, - "y": 303.64692474279855, - "width": 140, - "height": 25, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-architecture-group" - ], - "fontSize": 20, - "fontFamily": 1, - "text": "Architecture", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-architecture", - "locked": false, - "version": 88, - "versionNonce": 452440186, - "index": "af", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764191451669, - "link": null, - "originalText": "Architecture", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "arrow-arch-epics", - "type": "arrow", - "x": 760.6640738654764, - "y": 358.02872135607737, - "width": 0.007789277755136936, - "height": 35.679359419065065, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-architecture", - "focus": 0.025673321057619772, - "gap": 2.381796613278823 - }, - "endBinding": { - "elementId": "proc-validate-arch", - "focus": -0.09156227842994098, - "gap": 2.5273595258319688 - }, - "points": [ - [ - 0, - 0 - ], - [ - 0.007789277755136936, - 35.679359419065065 - ] - ], - "lastCommittedPoint": null, - "version": 549, - "versionNonce": 1665519674, - "index": "ag", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764191459184, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "proc-epics", - "type": "rectangle", - "x": 670.1028230821919, - "y": 510.76268244350774, - "width": 160, - "height": 80, - "angle": 0, - "strokeColor": "#43a047", - "backgroundColor": "#c8e6c9", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-epics-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-epics-text" - }, - { - "type": "arrow", - "id": "arrow-arch-epics" - }, - { - "type": "arrow", - "id": "arrow-epics-test" - }, - { - "id": "arrow-validate-ready", - "type": "arrow" - } - ], - "locked": false, - "version": 178, - "versionNonce": 1597058278, - "index": "ah", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1764191442604, - "link": null - }, - { - "id": "proc-epics-text", - "type": "text", - "x": 680.1028230821919, - "y": 538.7626824435077, - "width": 140, - "height": 25, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-epics-group" - ], - "fontSize": 20, - "fontFamily": 1, - "text": "Epics/Stories", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-epics", - "locked": false, - "version": 177, - "versionNonce": 2105920614, - "index": "ai", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764191427908, - "link": null, - "originalText": "Epics/Stories", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "arrow-epics-test", - "type": "arrow", - "x": 750.5489606775325, - "y": 591.2142966047594, - "width": 0.4387418927216231, - "height": 60.43894121748178, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-epics", - "focus": 0, - "gap": 1 - }, - "endBinding": { - "elementId": "proc-test-design", - "focus": 0, - "gap": 1 - }, - "points": [ - [ - 0, - 0 - ], - [ - 0.4387418927216231, - 60.43894121748178 - ] - ], - "lastCommittedPoint": null, - "version": 358, - "versionNonce": 1168009958, - "index": "aj", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764191427908, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "proc-test-design", - "type": "rectangle", - "x": 671.2209977440557, - "y": 652.1048519834928, - "width": 160, - "height": 80, - "angle": 0, - "strokeColor": "#e91e63", - "backgroundColor": "#f8bbd0", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-test-design-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-test-design-text" - }, - { - "type": "arrow", - "id": "arrow-epics-test" - }, - { - "type": "arrow", - "id": "arrow-test-validate" - } - ], - "locked": false, - "version": 124, - "versionNonce": 456543462, - "index": "ak", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1764191425140, - "link": null - }, - { - "id": "proc-test-design-text", - "type": "text", - "x": 709.1090363793096, - "y": 667.1048519834928, - "width": 84.22392272949219, - "height": 50, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-test-design-group" - ], - "fontSize": 14, - "fontFamily": 1, - "text": "Test Design\n<>", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-test-design", - "locked": false, - "version": 133, - "versionNonce": 1038598182, - "index": "al", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764191425140, - "link": null, - "originalText": "Test Design\n<>", - "autoResize": true, - "lineHeight": 1.7857142857142858 - }, - { - "id": "arrow-test-validate", - "type": "arrow", - "x": 742.3164554890545, - "y": 732.7428812826017, - "width": 0.2331013464803391, - "height": 41.16039866169126, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-test-design", - "focus": 0.11090307971902064, - "gap": 1.407314849962063 - }, - "endBinding": { - "elementId": "proc-impl-ready", - "focus": -0.07891534010655449, - "gap": 6.845537084300759 - }, - "points": [ - [ - 0, - 0 - ], - [ - 0.2331013464803391, - 41.16039866169126 - ] - ], - "lastCommittedPoint": null, - "version": 482, - "versionNonce": 362456762, - "index": "am", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764191475964, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "proc-validate-arch", - "type": "rectangle", - "x": 688.0069292751327, - "y": 396.2354403009744, - "width": 160, - "height": 80, - "angle": 0, - "strokeColor": "#f4511e", - "backgroundColor": "#ffccbc", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-validate-arch-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-validate-arch-text" - }, - { - "type": "arrow", - "id": "arrow-test-validate" - }, - { - "type": "arrow", - "id": "arrow-validate-ready" - }, - { - "id": "arrow-arch-epics", - "type": "arrow" - } - ], - "locked": false, - "version": 234, - "versionNonce": 940473658, - "index": "an", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1764191449834, - "link": null - }, - { - "id": "proc-validate-arch-text", - "type": "text", - "x": 698.0069292751327, - "y": 411.2354403009744, - "width": 140, - "height": 50, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-validate-arch-group" - ], - "fontSize": 14, - "fontFamily": 1, - "text": "Validate Arch\n<>", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-validate-arch", - "locked": false, - "version": 233, - "versionNonce": 41862650, - "index": "ao", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764191449834, - "link": null, - "originalText": "Validate Arch\n<>", - "autoResize": true, - "lineHeight": 1.7857142857142858 - }, - { - "id": "arrow-validate-ready", - "type": "arrow", - "x": 756.1926048905458, - "y": 477.82525825285865, - "width": 2.6030810941729214, - "height": 34.90186599521081, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-validate-arch", - "focus": 0.10499022285337105, - "gap": 1.5898179518842426 - }, - "endBinding": { - "elementId": "proc-epics", - "focus": 0.007831693483179265, - "gap": 1.9644418045617158 - }, - "points": [ - [ - 0, - 0 - ], - [ - -2.6030810941729214, - 34.90186599521081 - ] - ], - "lastCommittedPoint": null, - "version": 527, - "versionNonce": 679932090, - "index": "ap", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764191469649, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "proc-impl-ready", - "type": "rectangle", - "x": 669.3773407122919, - "y": 777.1531869468762, - "width": 160, - "height": 80, - "angle": 0, - "strokeColor": "#f4511e", - "backgroundColor": "#ffccbc", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-impl-ready-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-impl-ready-text" - }, - { - "type": "arrow", - "id": "arrow-validate-ready" - }, - { - "type": "arrow", - "id": "arrow-phase3-to-phase4" - }, - { - "id": "arrow-test-validate", - "type": "arrow" - } - ], - "locked": false, - "version": 102, - "versionNonce": 1799933050, - "index": "aq", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1764191475963, - "link": null - }, - { - "id": "proc-impl-ready-text", - "type": "text", - "x": 679.3773407122919, - "y": 792.1531869468762, - "width": 140, - "height": 50, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-impl-ready-group" - ], - "fontSize": 16, - "fontFamily": 1, - "text": "Implementation\nReadiness", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-impl-ready", - "locked": false, - "version": 101, - "versionNonce": 1345137978, - "index": "ar", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764191475963, - "link": null, - "originalText": "Implementation\nReadiness", - "autoResize": true, - "lineHeight": 1.5625 - }, - { - "id": "arrow-phase3-to-phase4", - "type": "arrow", - "x": 832.3758366994932, - "y": 828.1314512149465, - "width": 332.79883769023445, - "height": 519.9927682908395, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-impl-ready", - "focus": 0.8094917779899522, - "gap": 3.380037483859951 - }, - "endBinding": { - "elementId": "proc-sprint-planning", - "focus": 0.538276991056649, - "gap": 1.1436349518342013 - }, - "points": [ - [ - 0, - 0 - ], - [ - 80.82567439689569, - -94.83900216621896 - ], - [ - 159.28426317101867, - -458.225799867337 - ], - [ - 332.79883769023445, - -519.9927682908395 - ] - ], - "lastCommittedPoint": null, - "version": 1116, - "versionNonce": 55014906, - "index": "as", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": { - "type": 2 - }, - "boundElements": [], - "updated": 1764191475964, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow", - "elbowed": false - }, - { - "id": "phase4-header", - "type": "text", - "x": 1175.3730315866237, - "y": 167.81322734599433, - "width": 200, - "height": 30, - "angle": 0, - "strokeColor": "#2e7d32", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 24, - "fontFamily": 1, - "text": "PHASE 4", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 271, - "versionNonce": 866534438, - "index": "at", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "containerId": null, - "originalText": "PHASE 4", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "phase4-subtitle", - "type": "text", - "x": 1139.1188804963076, - "y": 204.18282943768378, - "width": 260, - "height": 20, - "angle": 0, - "strokeColor": "#666666", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 16, - "fontFamily": 1, - "text": "Implementation (Required)", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 238, - "versionNonce": 198627174, - "index": "au", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "containerId": null, - "originalText": "Implementation (Required)", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "proc-sprint-planning", - "type": "rectangle", - "x": 1166.1946812371566, - "y": 276.1576920193427, - "width": 160, - "height": 80, - "angle": 0, - "strokeColor": "#1e88e5", - "backgroundColor": "#bbdefb", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-sprint-planning-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-sprint-planning-text" - }, - { - "type": "arrow", - "id": "arrow-phase3-to-phase4" - }, - { - "id": "arrow-validate-epic-story", - "type": "arrow" - } - ], - "locked": false, - "version": 379, - "versionNonce": 2085876390, - "index": "av", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1764190763204, - "link": null - }, - { - "id": "proc-sprint-planning-text", - "type": "text", - "x": 1176.1946812371566, - "y": 304.1576920193427, - "width": 140, - "height": 25, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-sprint-planning-group" - ], - "fontSize": 20, - "fontFamily": 1, - "text": "Sprint Plan", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-sprint-planning", - "locked": false, - "version": 377, - "versionNonce": 2143989222, - "index": "aw", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "originalText": "Sprint Plan", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "label-story-loop", - "type": "text", - "x": 1176.2977877917795, - "y": 441.904906795244, - "width": 130.87991333007812, - "height": 25, - "angle": 0, - "strokeColor": "#e65100", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 20, - "fontFamily": 1, - "text": "STORY LOOP", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 603, - "versionNonce": 40529830, - "index": "b04", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "containerId": null, - "originalText": "STORY LOOP", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "arrow-validate-epic-story", - "type": "arrow", - "x": 1249.6597155437828, - "y": 357.36880197268204, - "width": 2.9293448190794606, - "height": 208.61271744725804, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-sprint-planning", - "focus": -0.050194107916528306, - "gap": 1.21110995333936 - }, - "endBinding": { - "elementId": "proc-create-story", - "focus": -0.004614835874420464, - "gap": 1 - }, - "points": [ - [ - 0, - 0 - ], - [ - -2.9293448190794606, - 208.61271744725804 - ] - ], - "lastCommittedPoint": null, - "version": 951, - "versionNonce": 1394233274, - "index": "b05", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763619, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "proc-create-story", - "type": "rectangle", - "x": 1166.5341271166512, - "y": 566.4331335811917, - "width": 160, - "height": 80, - "angle": 0, - "strokeColor": "#1e88e5", - "backgroundColor": "#bbdefb", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-create-story-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-create-story-text" - }, - { - "type": "arrow", - "id": "arrow-validate-epic-story" - }, - { - "type": "arrow", - "id": "arrow-create-validate-story" - }, - { - "type": "arrow", - "id": "arrow-more-stories-yes" - } - ], - "locked": false, - "version": 282, - "versionNonce": 966999590, - "index": "b06", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1764190763204, - "link": null - }, - { - "id": "proc-create-story-text", - "type": "text", - "x": 1176.5341271166512, - "y": 594.4331335811917, - "width": 140, - "height": 25, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-create-story-group" - ], - "fontSize": 20, - "fontFamily": 1, - "text": "Create Story", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-create-story", - "locked": false, - "version": 282, - "versionNonce": 2082769254, - "index": "b07", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "originalText": "Create Story", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "arrow-create-validate-story", - "type": "arrow", - "x": 1246.5341271166512, - "y": 646.4331335811917, - "width": 0, - "height": 30, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-create-story", - "focus": 0, - "gap": 1 - }, - "endBinding": { - "elementId": "proc-validate-story", - "focus": 0, - "gap": 1 - }, - "points": [ - [ - 0, - 0 - ], - [ - 0, - 30 - ] - ], - "lastCommittedPoint": null, - "version": 848, - "versionNonce": 1820404026, - "index": "b08", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763619, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "proc-validate-story", - "type": "rectangle", - "x": 1166.5341271166512, - "y": 676.4331335811917, - "width": 160, - "height": 80, - "angle": 0, - "strokeColor": "#1e88e5", - "backgroundColor": "#bbdefb", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-validate-story-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-validate-story-text" - }, - { - "type": "arrow", - "id": "arrow-create-validate-story" - }, - { - "type": "arrow", - "id": "arrow-validate-story-decision" - } - ], - "locked": false, - "version": 282, - "versionNonce": 282699366, - "index": "b09", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1764190763204, - "link": null - }, - { - "id": "proc-validate-story-text", - "type": "text", - "x": 1176.5341271166512, - "y": 691.4331335811917, - "width": 140, - "height": 50, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-validate-story-group" - ], - "fontSize": 14, - "fontFamily": 1, - "text": "Validate Story\n<>", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-validate-story", - "locked": false, - "version": 282, - "versionNonce": 686025126, - "index": "b0A", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "originalText": "Validate Story\n<>", - "autoResize": true, - "lineHeight": 1.7857142857142858 - }, - { - "id": "arrow-validate-story-decision", - "type": "arrow", - "x": 1246.5341271166512, - "y": 756.4331335811917, - "width": 0, - "height": 30, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-validate-story", - "focus": 0, - "gap": 1 - }, - "endBinding": null, - "points": [ - [ - 0, - 0 - ], - [ - 0, - 30 - ] - ], - "lastCommittedPoint": null, - "version": 566, - "versionNonce": 1807479290, - "index": "b0B", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763619, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "proc-dev-story", - "type": "rectangle", - "x": 1164.0395418694, - "y": 788.7867016847945, - "width": 160, - "height": 80, - "angle": 0, - "strokeColor": "#3f51b5", - "backgroundColor": "#c5cae9", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-dev-story-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-dev-story-text" - }, - { - "type": "arrow", - "id": "arrow-dev-review" - } - ], - "locked": false, - "version": 367, - "versionNonce": 935782054, - "index": "b0R", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1764190763204, - "link": null - }, - { - "id": "proc-dev-story-text", - "type": "text", - "x": 1174.0395418694, - "y": 816.7867016847945, - "width": 140, - "height": 25, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-dev-story-group" - ], - "fontSize": 20, - "fontFamily": 1, - "text": "Develop Story", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-dev-story", - "locked": false, - "version": 364, - "versionNonce": 952050150, - "index": "b0S", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "originalText": "Develop Story", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "arrow-dev-review", - "type": "arrow", - "x": 1244.2149450712877, - "y": 869.2383158460461, - "width": 5.032331195699953, - "height": 76.6679634046609, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-dev-story", - "focus": 0.030012029555609845, - "gap": 1 - }, - "endBinding": { - "elementId": "proc-code-review", - "focus": 0.04241833499478815, - "gap": 1.3466869862454587 - }, - "points": [ - [ - 0, - 0 - ], - [ - 5.032331195699953, - 76.6679634046609 - ] - ], - "lastCommittedPoint": null, - "version": 1191, - "versionNonce": 2052012922, - "index": "b0T", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763619, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "decision-code-review", - "type": "diamond", - "x": 1156.5341271166512, - "y": 1156.4331335811917, - "width": 180, - "height": 120, - "angle": 0, - "strokeColor": "#f57c00", - "backgroundColor": "#fff3e0", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "decision-code-review-group" - ], - "boundElements": [ - { - "type": "text", - "id": "decision-code-review-text" - }, - { - "type": "arrow", - "id": "arrow-dev-review" - }, - { - "type": "arrow", - "id": "arrow-review-fail" - }, - { - "id": "arrow-done-more-stories", - "type": "arrow" - }, - { - "id": "4chQ7PksRKpPe5YX-TfFJ", - "type": "arrow" - } - ], - "locked": false, - "version": 285, - "versionNonce": 46359462, - "index": "b0U", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "updated": 1764190763204, - "link": null - }, - { - "id": "decision-code-review-text", - "type": "text", - "x": 1171.5341271166512, - "y": 1191.4331335811917, - "width": 150, - "height": 50, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "decision-code-review-group" - ], - "fontSize": 16, - "fontFamily": 1, - "text": "Code Review\nPass?", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "decision-code-review", - "locked": false, - "version": 282, - "versionNonce": 1227095782, - "index": "b0V", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "originalText": "Code Review\nPass?", - "autoResize": true, - "lineHeight": 1.5625 - }, - { - "id": "arrow-review-fail", - "type": "arrow", - "x": 1151.5341271166512, - "y": 1216.3331335811918, - "width": 42.50541475274872, - "height": 387.6464318963972, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": null, - "endBinding": null, - "points": [ - [ - 0, - 0 - ], - [ - -35, - 0 - ], - [ - -35, - -387.6464318963972 - ], - [ - 7.50541475274872, - -387.6464318963972 - ] - ], - "lastCommittedPoint": null, - "elbowed": true, - "version": 319, - "versionNonce": 405929318, - "index": "b0W", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow", - "fixedSegments": null, - "startIsSpecial": null, - "endIsSpecial": null - }, - { - "id": "label-fail", - "type": "text", - "x": 1065.6231186673836, - "y": 1185.462969542075, - "width": 35, - "height": 20, - "angle": 0, - "strokeColor": "#d32f2f", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 16, - "fontFamily": 1, - "text": "Fail", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 316, - "versionNonce": 1897488550, - "index": "b0Y", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "containerId": null, - "originalText": "Fail", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "label-pass", - "type": "text", - "x": 1229.6819134569105, - "y": 1281.2421635916448, - "width": 40, - "height": 20, - "angle": 0, - "strokeColor": "#2e7d32", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 16, - "fontFamily": 1, - "text": "Pass", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 408, - "versionNonce": 1437752294, - "index": "b0a", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [ - { - "id": "4chQ7PksRKpPe5YX-TfFJ", - "type": "arrow" - } - ], - "updated": 1764190763204, - "link": null, - "containerId": null, - "originalText": "Pass", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "proc-code-review", - "type": "rectangle", - "x": 1169.3991588878014, - "y": 947.2529662369525, - "width": 160, - "height": 110, - "angle": 0, - "strokeColor": "#3f51b5", - "backgroundColor": "#c5cae9", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-code-review-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-code-review-text" - }, - { - "type": "arrow", - "id": "arrow-done-more-stories" - }, - { - "id": "arrow-dev-review", - "type": "arrow" - } - ], - "locked": false, - "version": 453, - "versionNonce": 277682790, - "index": "b0b", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1764190763204, - "link": null - }, - { - "id": "proc-code-review-text", - "type": "text", - "x": 1187.9272045420983, - "y": 972.2529662369525, - "width": 122.94390869140625, - "height": 60, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-code-review-group" - ], - "fontSize": 16, - "fontFamily": 1, - "text": "Code Review\n<>", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-code-review", - "locked": false, - "version": 502, - "versionNonce": 1242095014, - "index": "b0c", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "originalText": "Code Review\n<>", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "arrow-done-more-stories", - "type": "arrow", - "x": 1249.4681490735618, - "y": 1065.5372616587838, - "width": 1.7879398006109568, - "height": 90.97426236326123, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-code-review", - "focus": 0.014488632877232727, - "gap": 8.284295421831303 - }, - "endBinding": { - "elementId": "decision-code-review", - "focus": 0.09832693417954867, - "gap": 2.039543956918169 - }, - "points": [ - [ - 0, - 0 - ], - [ - 1.7879398006109568, - 90.97426236326123 - ] - ], - "lastCommittedPoint": null, - "version": 1093, - "versionNonce": 146679034, - "index": "b0d", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763619, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "decision-more-stories", - "type": "diamond", - "x": 1163.8719002449689, - "y": 1363.600308336051, - "width": 180, - "height": 120, - "angle": 0, - "strokeColor": "#f57c00", - "backgroundColor": "#fff3e0", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "decision-more-stories-group" - ], - "boundElements": [ - { - "type": "text", - "id": "decision-more-stories-text" - }, - { - "type": "arrow", - "id": "arrow-done-more-stories" - }, - { - "type": "arrow", - "id": "arrow-more-stories-yes" - }, - { - "type": "arrow", - "id": "arrow-more-stories-no" - }, - { - "id": "4chQ7PksRKpPe5YX-TfFJ", - "type": "arrow" - } - ], - "locked": false, - "version": 441, - "versionNonce": 886168230, - "index": "b0e", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "updated": 1764190763204, - "link": null - }, - { - "id": "decision-more-stories-text", - "type": "text", - "x": 1178.8719002449689, - "y": 1398.600308336051, - "width": 150, - "height": 50, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "decision-more-stories-group" - ], - "fontSize": 16, - "fontFamily": 1, - "text": "More Stories\nin Epic?", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "decision-more-stories", - "locked": false, - "version": 440, - "versionNonce": 1078695398, - "index": "b0f", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "originalText": "More Stories\nin Epic?", - "autoResize": true, - "lineHeight": 1.5625 - }, - { - "id": "arrow-more-stories-yes", - "type": "arrow", - "x": 1158.8719002449689, - "y": 1423.5003083360511, - "width": 141.95595587699154, - "height": 827.0007685048595, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "decision-more-stories", - "fixedPoint": [ - -0.027777777777777776, - 0.4991666666666674 - ], - "focus": 0, - "gap": 0 - }, - "endBinding": null, - "points": [ - [ - 0, - 0 - ], - [ - -140.44216650530916, - 0 - ], - [ - -140.44216650530916, - -827.0007685048595 - ], - [ - 1.5137893716823783, - -827.0007685048595 - ] - ], - "lastCommittedPoint": null, - "elbowed": true, - "version": 954, - "versionNonce": 2094428902, - "index": "b0g", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow", - "fixedSegments": [ - { - "index": 2, - "start": [ - -140.44216650530916, - 0 - ], - "end": [ - -140.44216650530916, - -827.0007685048595 - ] - } - ], - "startIsSpecial": false, - "endIsSpecial": false - }, - { - "id": "label-more-stories-yes", - "type": "text", - "x": 1024.8322929694286, - "y": 1455.9672274720815, - "width": 30, - "height": 20, - "angle": 0, - "strokeColor": "#2e7d32", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 16, - "fontFamily": 1, - "text": "Yes", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 320, - "versionNonce": 76752422, - "index": "b0h", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "containerId": null, - "originalText": "Yes", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "arrow-more-stories-no", - "type": "arrow", - "x": 1254.2299747445697, - "y": 1484.1816612705734, - "width": 0.09067340460524065, - "height": 69.22388536244944, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "decision-more-stories", - "focus": -0.004645359638607261, - "gap": 1 - }, - "endBinding": { - "elementId": "proc-retrospective", - "focus": -0.000007722345339971072, - "gap": 1 - }, - "points": [ - [ - 0, - 0 - ], - [ - 0.09067340460524065, - 69.22388536244944 - ] - ], - "lastCommittedPoint": null, - "version": 1115, - "versionNonce": 1285598842, - "index": "b0i", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763619, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "label-more-stories-no", - "type": "text", - "x": 1273.6656161640394, - "y": 1506.317970130127, - "width": 25, - "height": 20, - "angle": 0, - "strokeColor": "#d32f2f", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 16, - "fontFamily": 1, - "text": "No", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 327, - "versionNonce": 1022383270, - "index": "b0j", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "containerId": null, - "originalText": "No", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "proc-retrospective", - "type": "rectangle", - "x": 1174.3742521794413, - "y": 1553.8571607942745, - "width": 160, - "height": 80, - "angle": 0, - "strokeColor": "#1e88e5", - "backgroundColor": "#bbdefb", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "roundness": { - "type": 3, - "value": 8 - }, - "groupIds": [ - "proc-retrospective-group" - ], - "boundElements": [ - { - "type": "text", - "id": "proc-retrospective-text" - }, - { - "type": "arrow", - "id": "arrow-more-stories-no" - }, - { - "type": "arrow", - "id": "arrow-retro-more-epics" - } - ], - "locked": false, - "version": 391, - "versionNonce": 1921699814, - "index": "b0k", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "updated": 1764190763204, - "link": null - }, - { - "id": "proc-retrospective-text", - "type": "text", - "x": 1184.3742521794413, - "y": 1581.8571607942745, - "width": 140, - "height": 25, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "proc-retrospective-group" - ], - "fontSize": 20, - "fontFamily": 1, - "text": "Retrospective", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "proc-retrospective", - "locked": false, - "version": 391, - "versionNonce": 1572070182, - "index": "b0l", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "originalText": "Retrospective", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "arrow-retro-more-epics", - "type": "arrow", - "x": 1252.261821627823, - "y": 1634.3087749555261, - "width": 2.2496323163620673, - "height": 42.83146813764597, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-retrospective", - "focus": -0.00014865809573961995, - "gap": 1 - }, - "endBinding": { - "elementId": "decision-more-epics", - "focus": 0.006063807827498143, - "gap": 1 - }, - "points": [ - [ - 0, - 0 - ], - [ - -2.2496323163620673, - 42.83146813764597 - ] - ], - "lastCommittedPoint": null, - "version": 957, - "versionNonce": 1972295674, - "index": "b0m", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763619, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "decision-more-epics", - "type": "diamond", - "x": 1156.5341271166512, - "y": 1676.4331335811917, - "width": 180, - "height": 120, - "angle": 0, - "strokeColor": "#f57c00", - "backgroundColor": "#fff3e0", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "decision-more-epics-group" - ], - "boundElements": [ - { - "type": "text", - "id": "decision-more-epics-text" - }, - { - "type": "arrow", - "id": "arrow-retro-more-epics" - }, - { - "type": "arrow", - "id": "arrow-more-epics-yes" - }, - { - "type": "arrow", - "id": "arrow-more-epics-no" - } - ], - "locked": false, - "version": 282, - "versionNonce": 101589030, - "index": "b0n", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "updated": 1764190763204, - "link": null - }, - { - "id": "decision-more-epics-text", - "type": "text", - "x": 1171.5341271166512, - "y": 1711.4331335811917, - "width": 150, - "height": 50, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "decision-more-epics-group" - ], - "fontSize": 16, - "fontFamily": 1, - "text": "More Epics?", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "decision-more-epics", - "locked": false, - "version": 282, - "versionNonce": 2095262566, - "index": "b0o", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "originalText": "More Epics?", - "autoResize": true, - "lineHeight": 3.125 - }, - { - "id": "arrow-more-epics-yes", - "type": "arrow", - "x": 1151.5341271166512, - "y": 1736.3331335811918, - "width": 194.92191691435096, - "height": 1138.0678409916745, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "decision-more-epics", - "fixedPoint": [ - -0.027777777777777776, - 0.4991666666666674 - ], - "focus": 0, - "gap": 0 - }, - "endBinding": null, - "points": [ - [ - 0, - 0 - ], - [ - -184.89984110690511, - 0 - ], - [ - -184.89984110690511, - -1138.0678409916745 - ], - [ - 10.022075807445844, - -1138.0678409916745 - ] - ], - "lastCommittedPoint": null, - "elbowed": true, - "version": 1805, - "versionNonce": 1424088358, - "index": "b0p", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow", - "fixedSegments": [ - { - "index": 2, - "start": [ - -184.89984110690511, - 0 - ], - "end": [ - -184.89984110690511, - -1138.0678409916745 - ] - } - ], - "startIsSpecial": false, - "endIsSpecial": false - }, - { - "id": "label-more-epics-yes", - "type": "text", - "x": 1016.7607529532588, - "y": 1704.1213622982812, - "width": 30, - "height": 20, - "angle": 0, - "strokeColor": "#2e7d32", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 16, - "fontFamily": 1, - "text": "Yes", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 395, - "versionNonce": 339167334, - "index": "b0q", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "containerId": null, - "originalText": "Yes", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "arrow-more-epics-no", - "type": "arrow", - "x": 1246.5341271166512, - "y": 1796.4331335811921, - "width": 0, - "height": 50, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "label-more-epics-no", - "focus": 0, - "gap": 14.142135623730951 - }, - "endBinding": { - "elementId": "end-ellipse", - "focus": 0, - "gap": 1 - }, - "points": [ - [ - 0, - 0 - ], - [ - 0, - 50 - ] - ], - "lastCommittedPoint": null, - "version": 848, - "versionNonce": 757113210, - "index": "b0r", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763620, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "label-more-epics-no", - "type": "text", - "x": 1256.5341271166512, - "y": 1806.4331335811921, - "width": 25, - "height": 20, - "angle": 0, - "strokeColor": "#d32f2f", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "fontSize": 16, - "fontFamily": 1, - "text": "No", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 283, - "versionNonce": 1126229734, - "index": "b0s", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [ - { - "id": "arrow-more-epics-no", - "type": "arrow" - } - ], - "updated": 1764190763204, - "link": null, - "containerId": null, - "originalText": "No", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "end-ellipse", - "type": "ellipse", - "x": 1186.5341271166512, - "y": 1846.4331335811921, - "width": 120, - "height": 60, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "#e3f2fd", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "end-group" - ], - "boundElements": [ - { - "type": "text", - "id": "end-text" - }, - { - "type": "arrow", - "id": "arrow-more-epics-no" - } - ], - "locked": false, - "version": 282, - "versionNonce": 370468198, - "index": "b0t", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "updated": 1764190763204, - "link": null - }, - { - "id": "end-text", - "type": "text", - "x": 1223.5341271166512, - "y": 1864.4331335811921, - "width": 46, - "height": 25, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "end-group" - ], - "fontSize": 20, - "fontFamily": 1, - "text": "End", - "textAlign": "center", - "verticalAlign": "middle", - "containerId": "end-ellipse", - "locked": false, - "version": 282, - "versionNonce": 39798950, - "index": "b0u", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763204, - "link": null, - "originalText": "End", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "legend-box", - "type": "rectangle", - "x": -383.37044904818777, - "y": 130.62309916565027, - "width": 280, - "height": 240, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "#ffffff", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "roundness": { - "type": 3, - "value": 8 - }, - "locked": false, - "version": 240, - "versionNonce": 899126491, - "index": "b0v", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "boundElements": [], - "updated": 1763522286451, - "link": null - }, - { - "id": "legend-title", - "type": "text", - "x": -303.37044904818777, - "y": 140.62309916565027, - "width": 120, - "height": 25, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "fontSize": 20, - "fontFamily": 1, - "text": "Agent Legend", - "textAlign": "center", - "verticalAlign": "top", - "locked": false, - "version": 187, - "versionNonce": 354828667, - "index": "b0w", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null, - "containerId": null, - "originalText": "Agent Legend", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "legend-analyst", - "type": "rectangle", - "x": -373.37044904818777, - "y": 180.62309916565027, - "width": 20, - "height": 20, - "angle": 0, - "strokeColor": "#00acc1", - "backgroundColor": "#b2ebf2", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "locked": false, - "version": 187, - "versionNonce": 863394331, - "index": "b0x", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null - }, - { - "id": "legend-analyst-text", - "type": "text", - "x": -343.37044904818777, - "y": 182.62309916565027, - "width": 70, - "height": 20, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "fontSize": 16, - "fontFamily": 1, - "text": "Analyst", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 187, - "versionNonce": 226123451, - "index": "b0y", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null, - "containerId": null, - "originalText": "Analyst", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "legend-pm", - "type": "rectangle", - "x": -373.37044904818777, - "y": 210.62309916565027, - "width": 20, - "height": 20, - "angle": 0, - "strokeColor": "#43a047", - "backgroundColor": "#c8e6c9", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "locked": false, - "version": 187, - "versionNonce": 1574227803, - "index": "b0z", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null - }, - { - "id": "legend-pm-text", - "type": "text", - "x": -343.37044904818777, - "y": 212.62309916565027, - "width": 30, - "height": 20, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "fontSize": 16, - "fontFamily": 1, - "text": "PM", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 187, - "versionNonce": 1725443067, - "index": "b10", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null, - "containerId": null, - "originalText": "PM", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "legend-ux", - "type": "rectangle", - "x": -373.37044904818777, - "y": 240.62309916565027, - "width": 20, - "height": 20, - "angle": 0, - "strokeColor": "#8e24aa", - "backgroundColor": "#e1bee7", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "locked": false, - "version": 187, - "versionNonce": 2089219227, - "index": "b11", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null - }, - { - "id": "legend-ux-text", - "type": "text", - "x": -343.37044904818777, - "y": 242.62309916565027, - "width": 110, - "height": 20, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "fontSize": 16, - "fontFamily": 1, - "text": "UX Designer", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 187, - "versionNonce": 1318299963, - "index": "b12", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null, - "containerId": null, - "originalText": "UX Designer", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "legend-architect", - "type": "rectangle", - "x": -373.37044904818777, - "y": 270.6230991656503, - "width": 20, - "height": 20, - "angle": 0, - "strokeColor": "#f4511e", - "backgroundColor": "#ffccbc", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "locked": false, - "version": 187, - "versionNonce": 1918945755, - "index": "b13", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null - }, - { - "id": "legend-architect-text", - "type": "text", - "x": -343.37044904818777, - "y": 272.6230991656503, - "width": 80, - "height": 20, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "fontSize": 16, - "fontFamily": 1, - "text": "Architect", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 187, - "versionNonce": 755029627, - "index": "b14", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null, - "containerId": null, - "originalText": "Architect", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "legend-tea", - "type": "rectangle", - "x": -373.37044904818777, - "y": 300.6230991656503, - "width": 20, - "height": 20, - "angle": 0, - "strokeColor": "#e91e63", - "backgroundColor": "#f8bbd0", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "locked": false, - "version": 187, - "versionNonce": 2100711195, - "index": "b15", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null - }, - { - "id": "legend-tea-text", - "type": "text", - "x": -343.37044904818777, - "y": 302.6230991656503, - "width": 40, - "height": 20, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "fontSize": 16, - "fontFamily": 1, - "text": "TEA", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 187, - "versionNonce": 1702081467, - "index": "b16", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null, - "containerId": null, - "originalText": "TEA", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "legend-sm", - "type": "rectangle", - "x": -373.37044904818777, - "y": 330.6230991656503, - "width": 20, - "height": 20, - "angle": 0, - "strokeColor": "#1e88e5", - "backgroundColor": "#bbdefb", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "locked": false, - "version": 187, - "versionNonce": 1977320539, - "index": "b17", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null - }, - { - "id": "legend-sm-text", - "type": "text", - "x": -343.37044904818777, - "y": 332.6230991656503, - "width": 30, - "height": 20, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "fontSize": 16, - "fontFamily": 1, - "text": "SM", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 187, - "versionNonce": 373309691, - "index": "b18", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null, - "containerId": null, - "originalText": "SM", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "legend-dev", - "type": "rectangle", - "x": -223.37044904818777, - "y": 180.62309916565027, - "width": 20, - "height": 20, - "angle": 0, - "strokeColor": "#3f51b5", - "backgroundColor": "#c5cae9", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "locked": false, - "version": 187, - "versionNonce": 270821787, - "index": "b19", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null - }, - { - "id": "legend-dev-text", - "type": "text", - "x": -193.37044904818777, - "y": 182.62309916565027, - "width": 40, - "height": 20, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "fontSize": 16, - "fontFamily": 1, - "text": "DEV", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 187, - "versionNonce": 1488617019, - "index": "b1A", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null, - "containerId": null, - "originalText": "DEV", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "legend-decision", - "type": "diamond", - "x": -223.37044904818777, - "y": 210.62309916565027, - "width": 30, - "height": 30, - "angle": 0, - "strokeColor": "#f57c00", - "backgroundColor": "#fff3e0", - "fillStyle": "solid", - "strokeWidth": 1, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "locked": false, - "version": 187, - "versionNonce": 451215067, - "index": "b1B", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null - }, - { - "id": "legend-decision-text", - "type": "text", - "x": -183.37044904818777, - "y": 217.62309916565027, - "width": 70, - "height": 20, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [ - "FOWhENd6l0IWkDrktqohE" - ], - "fontSize": 16, - "fontFamily": 1, - "text": "Decision", - "textAlign": "left", - "verticalAlign": "top", - "locked": false, - "version": 187, - "versionNonce": 20343675, - "index": "b1C", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1763522286451, - "link": null, - "containerId": null, - "originalText": "Decision", - "autoResize": true, - "lineHeight": 1.25 - }, - { - "id": "4chQ7PksRKpPe5YX-TfFJ", - "type": "arrow", - "x": 1250.9718703296421, - "y": 1311.0799578560604, - "width": 3.1071377799139555, - "height": 47.57227388165256, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "label-pass", - "focus": 0.0002774287102738527, - "gap": 9.837794264415606 - }, - "endBinding": { - "elementId": "decision-more-stories", - "focus": 0.07415216095379644, - "gap": 5.01120144889627 - }, - "points": [ - [ - 0, - 0 - ], - [ - 3.1071377799139555, - 47.57227388165256 - ] - ], - "lastCommittedPoint": null, - "version": 1485, - "versionNonce": 384699130, - "index": "b1D", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1128360742, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764190763620, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "jv0rnlK2D9JKIGTO7pUtT", - "type": "arrow", - "x": 199.95091169427553, - "y": 434.3642722686245, - "width": 152.18808817436843, - "height": 126.81486476828513, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-brainstorm", - "focus": 0.3249856938901564, - "gap": 1 - }, - "endBinding": { - "elementId": "proc-prd", - "focus": 0.40022808683972894, - "gap": 7.158084853619243 - }, - "points": [ - [ - 0, - 0 - ], - [ - 69.77818267983719, - 0.8988822936652241 - ], - [ - 84.43045426782976, - -84.30283196996788 - ], - [ - 152.18808817436843, - -125.91598247461991 - ] - ], - "lastCommittedPoint": null, - "version": 2008, - "versionNonce": 1304633062, - "index": "b1F", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 753809018, - "frameId": null, - "roundness": { - "type": 2 - }, - "boundElements": [], - "updated": 1764191372763, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow", - "elbowed": false - }, - { - "id": "RF10FfKbmG72P77I2IoP4", - "type": "arrow", - "x": 200.50999902520755, - "y": 524.3440535408814, - "width": 155.72897460360434, - "height": 217.43940257292877, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-research", - "focus": 0.2547348377789515, - "gap": 1 - }, - "endBinding": { - "elementId": "proc-prd", - "focus": 0.3948133447078272, - "gap": 3.0581110934513163 - }, - "points": [ - [ - 0, - 0 - ], - [ - 71.74164413965786, - -18.904836665604307 - ], - [ - 83.93792495248488, - -172.66332121061578 - ], - [ - 155.72897460360434, - -217.43940257292877 - ] - ], - "lastCommittedPoint": null, - "version": 2022, - "versionNonce": 1289623162, - "index": "b1G", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 389493926, - "frameId": null, - "roundness": { - "type": 2 - }, - "boundElements": [], - "updated": 1764191336778, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow", - "elbowed": false - }, - { - "id": "FDR4ZvEvNmPvkP3HfQMY4", - "type": "arrow", - "x": 523.1179307657023, - "y": 528.6598293249855, - "width": 156.49193140361945, - "height": 211.37494429949584, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": null, - "endBinding": null, - "points": [ - [ - 0, - 0 - ], - [ - 67.6421465593952, - -30.201232355758236 - ], - [ - 96.50992722652438, - -178.58566948715793 - ], - [ - 156.49193140361945, - -211.37494429949584 - ] - ], - "lastCommittedPoint": null, - "version": 672, - "versionNonce": 1827754470, - "index": "b1I", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 310318758, - "frameId": null, - "roundness": { - "type": 2 - }, - "boundElements": [], - "updated": 1764191558236, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow", - "elbowed": false - }, - { - "id": "arrow-prd-hasui", - "type": "arrow", - "x": 440, - "y": 330, - "width": 0, - "height": 140, - "angle": 0, - "strokeColor": "#1976d2", - "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "roughness": 0, - "opacity": 100, - "groupIds": [], - "startBinding": { - "elementId": "proc-prd", - "focus": 0, - "gap": 1 - }, - "endBinding": { - "elementId": "decision-has-ui", - "focus": 0, - "gap": 1 - }, - "points": [ - [ - 0, - 0 - ], - [ - 0, - 140 - ] - ], - "lastCommittedPoint": null, - "version": 1, - "versionNonce": 1, - "index": "b1J", - "isDeleted": false, - "strokeStyle": "solid", - "seed": 1, - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1764952855000, - "link": null, - "locked": false, - "startArrowhead": null, - "endArrowhead": "arrow" - } - ], - "appState": { - "gridSize": 20, - "gridStep": 5, - "gridModeEnabled": false, - "viewBackgroundColor": "#ffffff" - }, - "files": {} -} \ No newline at end of file diff --git a/docs/tutorials/getting-started/images/workflow-method-greenfield.svg b/docs/tutorials/getting-started/images/workflow-method-greenfield.svg deleted file mode 100644 index 6522b695..00000000 --- a/docs/tutorials/getting-started/images/workflow-method-greenfield.svg +++ /dev/null @@ -1,4 +0,0 @@ - - -BMad Method Workflow - Standard GreenfieldStartPHASE 1Discovery(Optional)IncludeDiscovery?YesBrainstorm<<optional>>Research<<optional>>Product Brief<<optional>>NoPHASE 2Planning (Required)PRDHas UI?YesCreate UXNoPHASE 3Solutioning (Required)ArchitectureEpics/StoriesTest Design<<optional>>Validate Arch<<optional>>ImplementationReadinessPHASE 4Implementation (Required)Sprint PlanSTORY LOOPCreate StoryValidate Story<<optional>>Develop StoryCode ReviewPass?FailPassCode Review<<use differentLLM>>More Storiesin Epic?YesNoRetrospectiveMore Epics?YesNoEndAgent LegendAnalystPMUX DesignerArchitectTEASMDEVDecision \ No newline at end of file diff --git a/docs/tutorials/getting-started/images/workflow-overview.jpg b/docs/tutorials/getting-started/images/workflow-overview.jpg deleted file mode 100644 index 3f61b3c5..00000000 Binary files a/docs/tutorials/getting-started/images/workflow-overview.jpg and /dev/null differ diff --git a/docs/tutorials/getting-started/workflow-overview.jpg b/docs/tutorials/getting-started/workflow-overview.jpg deleted file mode 100644 index 3f61b3c5..00000000 Binary files a/docs/tutorials/getting-started/workflow-overview.jpg and /dev/null differ diff --git a/package-lock.json b/package-lock.json index e4cbe9b8..5b17a227 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bmad-method", - "version": "6.0.0-alpha.23", + "version": "6.0.0-Beta.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "bmad-method", - "version": "6.0.0-alpha.23", + "version": "6.0.0-Beta.2", "license": "MIT", "dependencies": { "@clack/prompts": "^0.11.0", diff --git a/package.json b/package.json index 14b0b42c..8e1164cf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "bmad-method", - "version": "6.0.0-alpha.23", + "version": "6.0.0-Beta.2", "description": "Breakthrough Method of Agile AI-driven Development", "keywords": [ "agile", diff --git a/src/bmm/_module-installer/platform-specifics/claude-code.js b/src/bmm/_module-installer/platform-specifics/claude-code.js deleted file mode 100644 index ab96fad0..00000000 --- a/src/bmm/_module-installer/platform-specifics/claude-code.js +++ /dev/null @@ -1,35 +0,0 @@ -const chalk = require('chalk'); - -/** - * BMM Platform-specific installer for Claude Code - * - * @param {Object} options - Installation options - * @param {string} options.projectRoot - The root directory of the target project - * @param {Object} options.config - Module configuration from module.yaml - * @param {Object} options.logger - Logger instance for output - * @param {Object} options.platformInfo - Platform metadata from global config - * @returns {Promise} - Success status - */ -async function install(options) { - const { logger, platformInfo } = options; - // projectRoot and config available for future use - - try { - const platformName = platformInfo ? platformInfo.name : 'Claude Code'; - logger.log(chalk.cyan(` BMM-${platformName} Specifics installed`)); - - // Add Claude Code specific BMM configurations here - // For example: - // - Custom command configurations - // - Agent party configurations - // - Workflow integrations - // - Template mappings - - return true; - } catch (error) { - logger.error(chalk.red(`Error installing BMM Claude Code specifics: ${error.message}`)); - return false; - } -} - -module.exports = { install }; diff --git a/src/bmm/_module-installer/platform-specifics/windsurf.js b/src/bmm/_module-installer/platform-specifics/windsurf.js deleted file mode 100644 index d1c6f012..00000000 --- a/src/bmm/_module-installer/platform-specifics/windsurf.js +++ /dev/null @@ -1,32 +0,0 @@ -const chalk = require('chalk'); - -/** - * BMM Platform-specific installer for Windsurf - * - * @param {Object} options - Installation options - * @param {string} options.projectRoot - The root directory of the target project - * @param {Object} options.config - Module configuration from module.yaml - * @param {Object} options.logger - Logger instance for output - * @returns {Promise} - Success status - */ -async function install(options) { - const { logger } = options; - // projectRoot and config available for future use - - try { - logger.log(chalk.cyan(' BMM-Windsurf Specifics installed')); - - // Add Windsurf specific BMM configurations here - // For example: - // - Custom cascades - // - Workflow adaptations - // - Template configurations - - return true; - } catch (error) { - logger.error(chalk.red(`Error installing BMM Windsurf specifics: ${error.message}`)); - return false; - } -} - -module.exports = { install }; diff --git a/src/bmm/agents/pm.agent.yaml b/src/bmm/agents/pm.agent.yaml index 14d04612..1fa22545 100644 --- a/src/bmm/agents/pm.agent.yaml +++ b/src/bmm/agents/pm.agent.yaml @@ -22,15 +22,15 @@ agent: menu: - trigger: CP or fuzzy match on create-prd - exec: "{project-root}/_bmad/bmm/workflows/2-plan-workflows/prd/workflow.md" + exec: "{project-root}/_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow.md" description: "[CP] Create PRD: Expert led facilitation to produce your Product Requirements Document" - trigger: VP or fuzzy match on validate-prd - exec: "{project-root}/_bmad/bmm/workflows/2-plan-workflows/prd/workflow.md" + exec: "{project-root}/_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow.md" description: "[VP] Validate PRD: Validate a Product Requirements Document is comprehensive, lean, well organized and cohesive" - trigger: EP or fuzzy match on edit-prd - exec: "{project-root}/_bmad/bmm/workflows/2-plan-workflows/prd/workflow.md" + exec: "{project-root}/_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow.md" description: "[EP] Edit PRD: Update an existing Product Requirements Document" - trigger: CE or fuzzy match on epics-stories diff --git a/src/bmm/module-help.csv b/src/bmm/module-help.csv index f2beaebf..4b2aba78 100644 --- a/src/bmm/module-help.csv +++ b/src/bmm/module-help.csv @@ -1,33 +1,32 @@ module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs, -bmm,anytime,Document Project,DP,10,_bmad/bmm/workflows/document-project/workflow.yaml,bmad:bmm:document-project,false,analyst,Create Mode,"Analyze an existing project to produce useful documentation",project-knowledge,*, -bmm,anytime,Tech Spec,TS,20,_bmad/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md,bmad:bmm:tech-spec,false,quick-flow-solo-dev,Create Mode,"Do not suggest for potentially very complex things unless requested or if the user complains that they do not want to follow the extensive planning of the bmad method. Quick one-off tasks small changes simple apps utilities without extensive planning",planning_artifacts,"tech spec", -bmm,anytime,Quick Dev,QD,30,_bmad/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md,bmad:bmm:quick-dev,false,quick-flow-solo-dev,Create Mode,"Quick one-off tasks small changes simple apps utilities without extensive planning - Do not suggest for potentially very complex things unless requested or if the user complains that they do not want to follow the extensive planning of the bmad method, unless the user is already working through the implementation phase and just requests a 1 off things not already in the plan",,, -bmm,anytime,Correct Course,CC,40,_bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml,bmad:bmm:correct-course,false,sm,Create Mode,"Anytime: Navigate significant changes. May recommend start over update PRD redo architecture sprint planning or correct epics and stories",planning_artifacts,"change proposal", -bmm,1-analysis,Brainstorm Project,BP,10,_bmad/core/workflows/brainstorming/workflow.md,bmad:bmm:brainstorming,false,analyst,"data=_bmad/bmm/data/project-context-template.md","Expert Guided Facilitation through a single or multiple techniques",planning_artifacts,"brainstorming session", -bmm,1-analysis,Market Research,MR,20,_bmad/bmm/workflows/1-analysis/research/workflow.md,bmad:bmm:research,false,analyst,Create Mode,"research_type=""market""","Market analysis competitive landscape customer needs and trends","planning_artifacts|project-knowledge","research documents" -bmm,1-analysis,Domain Research,DR,21,_bmad/bmm/workflows/1-analysis/research/workflow.md,bmad:bmm:research,false,analyst,Create Mode,"research_type=""domain""","Industry domain deep dive subject matter expertise and terminology","planning_artifacts|project-knowledge","research documents" -bmm,1-analysis,Technical Research,TR,22,_bmad/bmm/workflows/1-analysis/research/workflow.md,bmad:bmm:research,false,analyst,Create Mode,"research_type=""technical""","Technical feasibility architecture options and implementation approaches","planning_artifacts|project-knowledge","research documents" -bmm,1-analysis,Create Brief,CB,30,_bmad/bmm/workflows/1-analysis/create-product-brief/workflow.md,bmad:bmm:create-brief,false,analyst,Create Mode,"A guided experience to nail down your product idea",planning_artifacts,"product brief", -bmm,1-analysis,Validate Brief,VB,40,_bmad/bmm/workflows/1-analysis/create-product-brief/workflow.md,bmad:bmm:validate-brief,false,analyst,Validate Mode,"Validates product brief completeness",planning_artifacts,"brief validation report", -bmm,2-planning,Create PRD,CP,10,_bmad/bmm/workflows/2-plan-workflows/prd/workflow.md,bmad:bmm:create-prd,true,pm,Create Mode,"Expert led facilitation to produce your Product Requirements Document",planning_artifacts,prd, -bmm,2-planning,Validate PRD,VP,20,_bmad/bmm/workflows/2-plan-workflows/prd/workflow.md,bmad:bmm:validate-prd,false,pm,Validate Mode,"Validate PRD is comprehensive lean well organized and cohesive",planning_artifacts,"prd validation report", -bmm,2-planning,Create UX,CU,30,_bmad/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md,bmad:bmm:create-ux,false,ux-designer,Create Mode,"Guidance through realizing the plan for your UX, strongly recommended if a UI is a primary piece of the proposed project",planning_artifacts,"ux design", -bmm,2-planning,Validate UX,VU,40,_bmad/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md,bmad:bmm:validate-ux,false,ux-designer,Validate Mode,"Validates UX design deliverables",planning_artifacts,"ux validation report", -,,Create Dataflow,CDF,50,_bmad/bmm/workflows/excalidraw-diagrams/create-dataflow/workflow.yaml,bmad:bmm:create-dataflow,false,ux-designer,Create Mode,"Create data flow diagrams (DFD) in Excalidraw format - can be called standalone or during any workflow to add visual documentation",planning_artifacts,"dataflow diagram", -,,Create Diagram,CED,51,_bmad/bmm/workflows/excalidraw-diagrams/create-diagram/workflow.yaml,bmad:bmm:create-diagram,false,ux-designer,Create Mode,"Create system architecture diagrams ERDs UML diagrams or general technical diagrams in Excalidraw format - use anytime or call from architecture workflow to add visual documentation",planning_artifacts,"diagram", -,,Create Flowchart,CFC,52,_bmad/bmm/workflows/excalidraw-diagrams/create-flowchart/workflow.yaml,bmad:bmm:create-flowchart,false,ux-designer,Create Mode,"Create a flowchart visualization in Excalidraw format for processes pipelines or logic flows - use anytime or during architecture to add process documentation",planning_artifacts,"flowchart", -,,Create Wireframe,CEW,53,_bmad/bmm/workflows/excalidraw-diagrams/create-wireframe/workflow.yaml,bmad:bmm:create-wireframe,false,ux-designer,Create Mode,"Create website or app wireframes in Excalidraw format - use anytime standalone or call from UX workflow to add UI mockups",planning_artifacts,"wireframe", -bmm,3-solutioning,Create Architecture,CA,10,_bmad/bmm/workflows/3-solutioning/create-architecture/workflow.md,bmad:bmm:create-architecture,true,architect,Create Mode,"Guided Workflow to document technical decisions",planning_artifacts,architecture, -bmm,3-solutioning,Validate Architecture,VA,20,_bmad/bmm/workflows/3-solutioning/create-architecture/workflow.md,bmad:bmm:validate-architecture,false,architect,Validate Mode,"Validates architecture completeness",planning_artifacts,"architecture validation report", -bmm,3-solutioning,Create Epics and Stories,CE,30,_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md,bmad:bmm:create-epics-and-stories,true,pm,Create Mode,"Create the Epics and Stories Listing",planning_artifacts,"epics and stories", -bmm,3-solutioning,Validate Epics and Stories,VE,40,_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md,bmad:bmm:validate-epics-and-stories,false,pm,Validate Mode,"Validates epics and stories completeness",planning_artifacts,"epics validation report", -bmm,3-solutioning,Test Design,TD,50,_bmad/bmm/workflows/testarch/test-design/workflow.yaml,bmad:bmm:test-design,false,tea,Create Mode,"Create comprehensive test scenarios ahead of development, recommended if string test compliance or assurance is needed. Very critical for distributed applications with separate front ends and backends outside of a monorepo.",planning_artifacts,"test design", -bmm,3-solutioning,Validate Test Design,VT,60,_bmad/bmm/workflows/testarch/test-design/workflow.yaml,bmad:bmm:validate-test-design,false,tea,Validate Mode,"Validates test design coverage",planning_artifacts,"test design validation report", -bmm,3-solutioning,Implementation Readiness,IR,70,_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/workflow.md,bmad:bmm:implementation-readiness,true,architect,Validate Mode,"Ensure PRD UX Architecture and Epics Stories are aligned",planning_artifacts,"readiness report", -bmm,4-implementation,Sprint Planning,SP,10,_bmad/bmm/workflows/4-implementation/sprint-planning/workflow.yaml,bmad:bmm:sprint-planning,true,sm,Create Mode,"Generate sprint plan for development tasks - this kicks off the implementation phase by producing a plan the implementation agents will follow in sequence for every story in the plan.",implementation_artifacts,"sprint status", -bmm,4-implementation,Sprint Status,SS,20,_bmad/bmm/workflows/4-implementation/sprint-status/workflow.yaml,bmad:bmm:sprint-status,false,sm,Create Mode,"Anytime: Summarize sprint status and route to next workflow",,, -bmm,4-implementation,Create Story,CS,30,_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml,bmad:bmm:create-story,true,sm,Create Mode,"Story cycle start: Prepare first found story in the sprint plan that is next, or if the command is run with a specific epic and story designation with context. Once complete, then VS then DS then CR then back to DS if needed or next CS or ER",implementation_artifacts,story, -bmm,4-implementation,Validate Story,VS,35,_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml,bmad:bmm:validate-story,false,sm,Validate Mode,"Validates story readiness and completeness before development work begins",implementation_artifacts,"story validation report", -bmm,4-implementation,Dev Story,DS,40,_bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml,bmad:bmm:dev-story,true,dev,Create Mode,"Story cycle: Execute story implementation tasks and tests then CR then back to DS if fixes needed",,, -bmm,4-implementation,Code Review,CR,50,_bmad/bmm/workflows/4-implementation/code-review/workflow.yaml,bmad:bmm:code-review,false,dev,Create Mode,"Story cycle: If issues back to DS if approved then next CS or ER if epic complete",,, -bmm,4-implementation,Retrospective,ER,60,_bmad/bmm/workflows/4-implementation/retrospective/workflow.yaml,bmad:bmm:retrospective,false,sm,Create Mode,"Optional at epic end: Review completed work lessons learned and next epic or if major issues consider CC",implementation_artifacts,retrospective, +bmm,anytime,Document Project,DP,10,_bmad/bmm/workflows/document-project/workflow.yaml,bmad-bmm-document-project,false,analyst,Create Mode,"Analyze an existing project to produce useful documentation",project-knowledge,*, +bmm,anytime,Quick Spec,TS,20,_bmad/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md,bmad-bmm-quick-spec,false,quick-flow-solo-dev,Create Mode,"Do not suggest for potentially very complex things unless requested or if the user complains that they do not want to follow the extensive planning of the bmad method. Quick one-off tasks small changes simple apps utilities without extensive planning",planning_artifacts,"tech spec", +bmm,anytime,Quick Dev,QD,30,_bmad/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md,bmad-bmm-quick-dev,false,quick-flow-solo-dev,Create Mode,"Quick one-off tasks small changes simple apps utilities without extensive planning - Do not suggest for potentially very complex things unless requested or if the user complains that they do not want to follow the extensive planning of the bmad method, unless the user is already working through the implementation phase and just requests a 1 off things not already in the plan",,, +bmm,anytime,Correct Course,CC,40,_bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml,bmad-bmm-correct-course,false,sm,Create Mode,"Anytime: Navigate significant changes. May recommend start over update PRD redo architecture sprint planning or correct epics and stories",planning_artifacts,"change proposal", +bmm,1-analysis,Brainstorm Project,BP,10,_bmad/core/workflows/brainstorming/workflow.md,bmad-brainstorming,false,analyst,data=_bmad/bmm/data/project-context-template.md,"Expert Guided Facilitation through a single or multiple techniques",planning_artifacts,"brainstorming session", +bmm,1-analysis,Market Research,MR,20,_bmad/bmm/workflows/1-analysis/research/workflow.md,bmad-bmm-research,false,analyst,Create Mode research_type=market,"Market analysis competitive landscape customer needs and trends","planning_artifacts|project-knowledge","research documents" +bmm,1-analysis,Domain Research,DR,21,_bmad/bmm/workflows/1-analysis/research/workflow.md,bmad-bmm-research,false,analyst,Create Mode research_type=domain,"Industry domain deep dive subject matter expertise and terminology","planning_artifacts|project-knowledge","research documents" +bmm,1-analysis,Technical Research,TR,22,_bmad/bmm/workflows/1-analysis/research/workflow.md,bmad-bmm-research,false,analyst,Create Mode research_type=technical,"Technical feasibility architecture options and implementation approaches","planning_artifacts|project-knowledge","research documents" +bmm,1-analysis,Create Brief,CB,30,_bmad/bmm/workflows/1-analysis/create-product-brief/workflow.md,bmad-bmm-create-brief,false,analyst,Create Mode,"A guided experience to nail down your product idea",planning_artifacts,"product brief", +bmm,1-analysis,Validate Brief,VB,40,_bmad/bmm/workflows/1-analysis/create-product-brief/workflow.md,bmad-bmm-validate-brief,false,analyst,Validate Mode,"Validates product brief completeness",planning_artifacts,"brief validation report", +bmm,2-planning,Create PRD,CP,10,_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow.md,bmad-bmm-prd,true,pm,Create Mode,"Expert led facilitation to produce your Product Requirements Document",planning_artifacts,prd, +bmm,2-planning,Validate PRD,VP,20,_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow.md,bmad-bmm-prd,false,pm,Validate Mode,"Validate PRD is comprehensive lean well organized and cohesive",planning_artifacts,"prd validation report", +bmm,2-planning,Create UX,CU,30,_bmad/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md,bmad-bmm-create-ux-design,false,ux-designer,Create Mode,"Guidance through realizing the plan for your UX, strongly recommended if a UI is a primary piece of the proposed project",planning_artifacts,"ux design", +bmm,2-planning,Validate UX,VU,40,_bmad/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md,bmad-bmm-create-ux-design,false,ux-designer,Validate Mode,"Validates UX design deliverables",planning_artifacts,"ux validation report", +,anytime,Create Dataflow,CDF,50,_bmad/bmm/workflows/excalidraw-diagrams/create-dataflow/workflow.yaml,bmad-bmm-create-excalidraw-dataflow,false,ux-designer,Create Mode,"Create data flow diagrams (DFD) in Excalidraw format - can be called standalone or during any workflow to add visual documentation",planning_artifacts,"dataflow diagram", +,anytime,Create Diagram,CED,51,_bmad/bmm/workflows/excalidraw-diagrams/create-diagram/workflow.yaml,bmad-bmm-create-excalidraw-diagram,false,ux-designer,Create Mode,"Create system architecture diagrams ERDs UML diagrams or general technical diagrams in Excalidraw format - use anytime or call from architecture workflow to add visual documentation",planning_artifacts,"diagram", +,anytime,Create Flowchart,CFC,52,_bmad/bmm/workflows/excalidraw-diagrams/create-flowchart/workflow.yaml,bmad-bmm-create-excalidraw-flowchart,false,ux-designer,Create Mode,"Create a flowchart visualization in Excalidraw format for processes pipelines or logic flows - use anytime or during architecture to add process documentation",planning_artifacts,"flowchart", +,anytime,Create Wireframe,CEW,53,_bmad/bmm/workflows/excalidraw-diagrams/create-wireframe/workflow.yaml,bmad-bmm-create-excalidraw-wireframe,false,ux-designer,Create Mode,"Create website or app wireframes in Excalidraw format - use anytime standalone or call from UX workflow to add UI mockups",planning_artifacts,"wireframe", +bmm,3-solutioning,Create Architecture,CA,10,_bmad/bmm/workflows/3-solutioning/create-architecture/workflow.md,bmad-bmm-create-architecture,true,architect,Create Mode,"Guided Workflow to document technical decisions",planning_artifacts,architecture, +bmm,3-solutioning,Validate Architecture,VA,20,_bmad/bmm/workflows/3-solutioning/create-architecture/workflow.md,bmad-bmm-create-architecture,false,architect,Validate Mode,"Validates architecture completeness",planning_artifacts,"architecture validation report", +bmm,3-solutioning,Create Epics and Stories,CE,30,_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md,bmad-bmm-create-epics-and-stories,true,pm,Create Mode,"Create the Epics and Stories Listing",planning_artifacts,"epics and stories", +bmm,3-solutioning,Validate Epics and Stories,VE,40,_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md,bmad-bmm-create-epics-and-stories,false,pm,Validate Mode,"Validates epics and stories completeness",planning_artifacts,"epics validation report", +bmm,3-solutioning,Test Design,TD,50,_bmad/bmm/workflows/testarch/test-design/workflow.yaml,bmad-bmm-testarch-test-design,false,tea,Create Mode,"Create comprehensive test scenarios ahead of development, recommended if string test compliance or assurance is needed. Very critical for distributed applications with separate front ends and backends outside of a monorepo.",planning_artifacts,"test design", +bmm,3-solutioning,Check Implementation Readiness,IR,70,_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/workflow.md,bmad-bmm-check-implementation-readiness,true,architect,Validate Mode,"Ensure PRD UX Architecture and Epics Stories are aligned",planning_artifacts,"readiness report", +bmm,4-implementation,Sprint Planning,SP,10,_bmad/bmm/workflows/4-implementation/sprint-planning/workflow.yaml,bmad-bmm-sprint-planning,true,sm,Create Mode,"Generate sprint plan for development tasks - this kicks off the implementation phase by producing a plan the implementation agents will follow in sequence for every story in the plan.",implementation_artifacts,"sprint status", +bmm,4-implementation,Sprint Status,SS,20,_bmad/bmm/workflows/4-implementation/sprint-status/workflow.yaml,bmad-bmm-sprint-status,false,sm,Create Mode,"Anytime: Summarize sprint status and route to next workflow",,, +bmm,4-implementation,Create Story,CS,30,_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml,bmad-bmm-create-story,true,sm,Create Mode,"Story cycle start: Prepare first found story in the sprint plan that is next, or if the command is run with a specific epic and story designation with context. Once complete, then VS then DS then CR then back to DS if needed or next CS or ER",implementation_artifacts,story, +bmm,4-implementation,Validate Story,VS,35,_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml,bmad-bmm-create-story,false,sm,Validate Mode,"Validates story readiness and completeness before development work begins",implementation_artifacts,"story validation report", +bmm,4-implementation,Dev Story,DS,40,_bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml,bmad-bmm-dev-story,true,dev,Create Mode,"Story cycle: Execute story implementation tasks and tests then CR then back to DS if fixes needed",,, +bmm,4-implementation,Code Review,CR,50,_bmad/bmm/workflows/4-implementation/code-review/workflow.yaml,bmad-bmm-code-review,false,dev,Create Mode,"Story cycle: If issues back to DS if approved then next CS or ER if epic complete",,, +bmm,4-implementation,Retrospective,ER,60,_bmad/bmm/workflows/4-implementation/retrospective/workflow.yaml,bmad-bmm-retrospective,false,sm,Create Mode,"Optional at epic end: Review completed work lessons learned and next epic or if major issues consider CC",implementation_artifacts,retrospective, diff --git a/src/bmm/sub-modules/claude-code/config.yaml b/src/bmm/sub-modules/claude-code/config.yaml deleted file mode 100644 index 26d26bf9..00000000 --- a/src/bmm/sub-modules/claude-code/config.yaml +++ /dev/null @@ -1,4 +0,0 @@ -name: bmmcc -short-title: BMM Claude Code Sub Module -author: Brian (BMad) Madison -submodule: true diff --git a/src/bmm/sub-modules/claude-code/injections.yaml b/src/bmm/sub-modules/claude-code/injections.yaml deleted file mode 100644 index e8fabbe2..00000000 --- a/src/bmm/sub-modules/claude-code/injections.yaml +++ /dev/null @@ -1,242 +0,0 @@ -# Claude Code Content Injection Configuration -# This file defines content to be injected at specific points in BMAD files -# when Claude Code is selected as the IDE during installation -# -# The installer will: -# 1. Ask users if they want to install subagents (all/selective/none) -# 2. Ask where to install (project-level .claude/agents/_bmad/ or user-level ~/.claude/agents/_bmad/) -# 3. Only inject content related to selected subagents -# 4. Templates stay in _bmad/ directory and are referenced from there -# 5. Injections are placed at specific sections where each subagent is most valuable - -injections: - # ===== PRD WORKFLOW INJECTIONS ===== - - # PRD Subagent Instructions - - file: "_bmad/bmm/workflows/prd/instructions.md" - point: "prd-subagent-instructions" - requires: "all-prd-subagents" - content: | - - **Subagent Usage**: Throughout this workflow, leverage specialized subagents at critical decision points: - - Use `bmm-requirements-analyst` when defining functional requirements - - Use `bmm-user-journey-mapper` for comprehensive journey mapping - - Use `bmm-epic-optimizer` when structuring epic boundaries - - Use `bmm-technical-decisions-curator` to capture all technical mentions - - # PRD Requirements Analysis - - file: "_bmad/bmm/workflows/prd/instructions.md" - point: "prd-requirements-analysis" - requires: "requirements-analyst" - content: | - - **Subagent Hint**: Use `bmm-requirements-analyst` to validate requirements are testable and complete. - - # PRD User Journey Mapping - - file: "_bmad/bmm/workflows/prd/instructions.md" - point: "prd-user-journey" - requires: "user-journey-mapper" - content: | - - **Subagent Hint**: Use `bmm-user-journey-mapper` to map all user types and their value paths. - - # PRD Epic Optimization - - file: "_bmad/bmm/workflows/prd/instructions.md" - point: "prd-epic-optimization" - requires: "epic-optimizer" - content: | - - **Subagent Hint**: Use `bmm-epic-optimizer` to validate epic boundaries deliver coherent value. - - # PRD Document Review - - file: "_bmad/bmm/workflows/prd/instructions.md" - point: "prd-checklist-review" - requires: "document-reviewer" - content: | - - **Subagent Hint**: Use `bmm-document-reviewer` to validate PRD completeness before finalizing. - - # Technical Decisions Curator - - file: "_bmad/bmm/workflows/prd/instructions.md" - point: "technical-decisions-curator" - requires: "technical-decisions-curator" - content: | - - **Automatic Capture**: The `bmm-technical-decisions-curator` should be invoked whenever: - - Technology, framework, or tool is mentioned - - Architecture patterns are discussed - - Infrastructure or deployment topics arise - - Integration requirements are specified - - # ===== MARKET RESEARCH TEMPLATE INJECTIONS ===== - - # Market TAM/SAM/SOM Calculations - - file: "_bmad/bmm/templates/market.md" - point: "market-tam-calculations" - requires: "data-analyst" - content: | - - - MANDATORY: Use the 'bmm-data-analyst' subagent to perform all TAM, SAM, and SOM calculations. - The subagent will apply proper methodologies, validate assumptions, and provide defensible market sizing. - - - # Market Trends Analysis - - file: "_bmad/bmm/templates/market.md" - point: "market-trends-analysis" - requires: "trend-spotter" - content: | - - - MANDATORY: Use the 'bmm-trend-spotter' subagent to identify and analyze emerging market trends. - The subagent will detect disruption signals, technology shifts, and future opportunities. - - - # Market Customer Personas - - file: "_bmad/bmm/templates/market.md" - point: "market-customer-segments" - requires: "user-researcher" - content: | - - - MANDATORY: Use the 'bmm-user-researcher' subagent to develop detailed customer segment profiles and personas. - The subagent will analyze behavior patterns, needs, and journey maps for each segment. - - - # Market Research Review - - file: "_bmad/bmm/templates/market.md" - point: "market-executive-summary" - requires: "document-reviewer" - content: | - - - MANDATORY: Before finalizing the executive summary, use the 'bmm-document-reviewer' subagent to validate all market research findings and ensure data accuracy. - - - # ===== COMPETITOR ANALYSIS TEMPLATE INJECTIONS ===== - - # Competitor Intelligence Gathering - - file: "_bmad/bmm/templates/competitor.md" - point: "competitor-intelligence" - requires: "market-researcher" - content: | - - - MANDATORY: Use the 'bmm-market-researcher' subagent to gather comprehensive competitive intelligence for each competitor profile. - The subagent will analyze positioning, strategy, and market dynamics. - - - # Competitor Technical Analysis - - file: "_bmad/bmm/templates/competitor.md" - point: "competitor-tech-stack" - requires: "technical-evaluator" - content: | - - - MANDATORY: Use the 'bmm-technical-evaluator' subagent to analyze and compare competitor technology stacks. - The subagent will identify technical differentiators and architectural advantages. - - - # Competitor Metrics Analysis - - file: "_bmad/bmm/templates/competitor.md" - point: "competitor-metrics" - requires: "data-analyst" - content: | - - - MANDATORY: Use the 'bmm-data-analyst' subagent to analyze competitor performance metrics and market share data. - - - # Competitor Analysis Review - - file: "_bmad/bmm/templates/competitor.md" - point: "competitor-executive-summary" - requires: "document-reviewer" - content: | - - - MANDATORY: Before finalizing, use the 'bmm-document-reviewer' subagent to validate competitive analysis completeness and strategic recommendations. - - - # ===== PROJECT BRIEF TEMPLATE INJECTIONS ===== - - # Brief Problem Validation - - file: "_bmad/bmm/templates/brief.md" - point: "brief-problem-validation" - requires: "market-researcher" - content: | - - - IF market research has not been provided as input, MANDATORY: Use the 'bmm-market-researcher' subagent to validate the problem statement and assess market opportunity. - - - # Brief Target User Analysis - - file: "_bmad/bmm/templates/brief.md" - point: "brief-user-analysis" - requires: "user-researcher" - content: | - - - IF target user analysis has not been provided, MANDATORY: Use the 'bmm-user-researcher' subagent to develop detailed user profiles and validate user needs. - - - # Brief Success Metrics - - file: "_bmad/bmm/templates/brief.md" - point: "brief-success-metrics" - requires: "data-analyst" - content: | - - - MANDATORY: Use the 'bmm-data-analyst' subagent to define and validate KPIs, success metrics, and measurement approaches. - - - # Brief Technical Feasibility - - file: "_bmad/bmm/templates/brief.md" - point: "brief-technical-feasibility" - requires: "technical-evaluator" - content: | - - - IF technical assumptions need validation, use the 'bmm-technical-evaluator' subagent to assess feasibility and identify technical risks. - - - # Brief Requirements Extraction - - file: "_bmad/bmm/templates/brief.md" - point: "brief-requirements" - requires: "requirements-analyst" - content: | - - - MANDATORY: Use the 'bmm-requirements-analyst' subagent to extract initial high-level requirements from the brief content. - - - # Brief Document Review - - file: "_bmad/bmm/templates/brief.md" - point: "brief-final-review" - requires: "document-reviewer" - content: | - - - MANDATORY: Before finalizing the brief, use the 'bmm-document-reviewer' subagent to ensure completeness and internal consistency. - - -# Subagents to copy -subagents: - source: "sub-agents" - target: ".claude/agents" - files: - - "market-researcher.md" - - "requirements-analyst.md" - - "technical-evaluator.md" - - "epic-optimizer.md" - - "document-reviewer.md" - - "codebase-analyzer.md" - - "dependency-mapper.md" - - "pattern-detector.md" - - "tech-debt-auditor.md" - - "api-documenter.md" - - "test-coverage-analyzer.md" - - "user-researcher.md" - - "user-journey-mapper.md" - - "technical-decisions-curator.md" - - "data-analyst.md" - - "trend-spotter.md" diff --git a/src/bmm/sub-modules/claude-code/readme.md b/src/bmm/sub-modules/claude-code/readme.md deleted file mode 100644 index c0ef2694..00000000 --- a/src/bmm/sub-modules/claude-code/readme.md +++ /dev/null @@ -1,87 +0,0 @@ -# BMM Claude Code Sub-Module - -## Overview - -This sub-module provides Claude Code-specific enhancements for the BMM module, including specialized subagents and content injection for enhanced AI-assisted development workflows. - -## How the Installer Works - -When Claude Code is selected during BMAD installation: - -1. **Module Detection**: The installer checks for `sub-modules/claude-code/` in each selected module -2. **Configuration Loading**: Reads `injections.yaml` to understand what to inject and which subagents are available -3. **User Interaction**: Prompts users to: - - Choose subagent installation (all/selective/none) - - Select installation location (project `.claude/agents/` or user `~/.claude/agents/`) -4. **Selective Installation**: Based on user choices: - - Copies only selected subagents to Claude's agents directory - - Injects only relevant content at defined injection points - - Skips injection if no subagents selected - -## Subagent Directory - -### Product Management Subagents - -| Subagent | Purpose | Used By | Recommended For | -| ------------------------ | ---------------------------------------- | ---------- | --------------------------------------------- | -| **market-researcher** | Competitive analysis and market insights | PM Agent | PRD creation (`*create-prd`), market analysis | -| **requirements-analyst** | Extract and validate requirements | PM Agent | Requirements sections, user story creation | -| **technical-evaluator** | Technology stack evaluation | PM Agent | Technical assumptions in PRDs | -| **epic-optimizer** | Story breakdown and sizing | PM Agent | Epic details, story sequencing | -| **document-reviewer** | Quality checks and validation | PM/Analyst | Final document review before delivery | - -### Architecture and Documentation Subagents - -| Subagent | Purpose | Used By | Recommended For | -| -------------------------- | ----------------------------------------- | --------- | ---------------------------------------------- | -| **codebase-analyzer** | Project structure and tech stack analysis | Architect | `*generate-context-docs` (doc-proj task) | -| **dependency-mapper** | Module and package dependency analysis | Architect | Brownfield documentation, refactoring planning | -| **pattern-detector** | Identify patterns and conventions | Architect | Understanding existing codebases | -| **tech-debt-auditor** | Assess technical debt and risks | Architect | Brownfield architecture, migration planning | -| **api-documenter** | Document APIs and integrations | Architect | API documentation, service boundaries | -| **test-coverage-analyzer** | Analyze test suites and coverage | Architect | Test strategy, quality assessment | - -## Adding New Subagents - -1. **Create the subagent file** in `sub-agents/`: - - ```markdown - --- - name: your-subagent-name - description: Brief description. use PROACTIVELY when [specific scenario] - tools: Read, Write, Grep # Specify required tools - check claude-code docs to see what tools are available, or just leave blank to allow all - --- - - [System prompt describing the subagent's role and expertise] - ``` - -2. **Add to injections.yaml**: - - Add filename to `subagents.files` list - - Update relevant agent injection content if needed - -3. **Create injection point** (if new agent): - ```xml - - ``` - -## Injection Points - -All injection points in this module are documented in: `{project-root}{output_folder}/injection-points.md` - ensure this is kept up to date. - -Injection points allow IDE-specific content to be added during installation without modifying source files. They use HTML comment syntax and are replaced during the installation process based on user selections. - -## Configuration Files - -- **injections.yaml**: Defines what content to inject and where -- **config.yaml**: Additional Claude Code configuration (if needed) -- **sub-agents/**: Directory containing all subagent definitions - -## Testing - -To test subagent installation: - -1. Run the BMAD installer -2. Select BMM module and Claude Code -3. Verify prompts appear for subagent selection -4. Check `.claude/agents/` for installed subagents -5. Verify injection points are replaced in `.claude/commands/_bmad/` and the various tasks and templates under `_bmad/...` diff --git a/src/bmm/testarch/knowledge/adr-quality-readiness-checklist.md b/src/bmm/testarch/knowledge/adr-quality-readiness-checklist.md new file mode 100644 index 00000000..0e8c1899 --- /dev/null +++ b/src/bmm/testarch/knowledge/adr-quality-readiness-checklist.md @@ -0,0 +1,350 @@ +# ADR Quality Readiness Checklist + +**Purpose:** Standardized 8-category, 29-criteria framework for evaluating system testability and NFR compliance during architecture review (Phase 3) and NFR assessment. + +**When to Use:** +- System-level test design (Phase 3): Identify testability gaps in architecture +- NFR assessment workflow: Structured evaluation with evidence +- Gate decisions: Quantifiable criteria (X/29 met = PASS/CONCERNS/FAIL) + +**How to Use:** +1. For each criterion, assess status: ✅ Covered / ⚠️ Gap / ⬜ Not Assessed +2. Document gap description if ⚠️ +3. Describe risk if criterion unmet +4. Map to test scenarios (what tests validate this criterion) + +--- + +## 1. Testability & Automation + +**Question:** Can we verify this effectively without manual toil? + +| # | Criterion | Risk if Unmet | Typical Test Scenarios (P0-P2) | +| --- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| 1.1 | **Isolation:** Can the service be tested with all downstream dependencies (DBs, APIs, Queues) mocked or stubbed? | Flaky tests; inability to test in isolation | P1: Service runs with mocked DB, P1: Service runs with mocked API, P2: Integration tests with real deps | +| 1.2 | **Headless Interaction:** Is 100% of the business logic accessible via API (REST/gRPC) to bypass the UI for testing? | Slow, brittle UI-based automation | P0: All core logic callable via API, P1: No UI dependency for critical paths | +| 1.3 | **State Control:** Do we have "Seeding APIs" or scripts to inject specific data states (e.g., "User with expired subscription") instantly? | Long setup times; inability to test edge cases | P0: Seed baseline data, P0: Inject edge case data states, P1: Cleanup after tests | +| 1.4 | **Sample Requests:** Are there valid and invalid cURL/JSON sample requests provided in the design doc for QA to build upon? | Ambiguity on how to consume the service | P1: Valid request succeeds, P1: Invalid request fails with clear error | + +**Common Gaps:** +- No mock endpoints for external services (Athena, Milvus, third-party APIs) +- Business logic tightly coupled to UI (requires E2E tests for everything) +- No seeding APIs (manual database setup required) +- ADR has architecture diagrams but no sample API requests + +**Mitigation Examples:** +- 1.1 (Isolation): Provide mock endpoints, dependency injection, interface abstractions +- 1.2 (Headless): Expose all business logic via REST/GraphQL APIs +- 1.3 (State Control): Implement `/api/test-data` seeding endpoints (dev/staging only) +- 1.4 (Sample Requests): Add "Example API Calls" section to ADR with cURL commands + +--- + +## 2. Test Data Strategy + +**Question:** How do we fuel our tests safely? + +| # | Criterion | Risk if Unmet | Typical Test Scenarios (P0-P2) | +| --- | ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| 2.1 | **Segregation:** Does the design support multi-tenancy or specific headers (e.g., x-test-user) to keep test data out of prod metrics? | Skewed business analytics; data pollution | P0: Multi-tenant isolation (customer A ≠ customer B), P1: Test data excluded from prod metrics | +| 2.2 | **Generation:** Can we use synthetic data, or do we rely on scrubbing production data (GDPR/PII risk)? | Privacy violations; dependency on stale data | P0: Faker-based synthetic data, P1: No production data in tests | +| 2.3 | **Teardown:** Is there a mechanism to "reset" the environment or clean up data after destructive tests? | Environment rot; subsequent test failures | P0: Automated cleanup after tests, P2: Environment reset script | + +**Common Gaps:** +- No `customer_id` scoping in queries (cross-tenant data leakage risk) +- Reliance on production data dumps (GDPR/PII violations) +- No cleanup mechanism (tests leave data behind, polluting environment) + +**Mitigation Examples:** +- 2.1 (Segregation): Enforce `customer_id` in all queries, add test-specific headers +- 2.2 (Generation): Use Faker library, create synthetic data generators, prohibit prod dumps +- 2.3 (Teardown): Auto-cleanup hooks in test framework, isolated test customer IDs + +--- + +## 3. Scalability & Availability + +**Question:** Can it grow, and will it stay up? + +| # | Criterion | Risk if Unmet | Typical Test Scenarios (P0-P2) | +| --- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| 3.1 | **Statelessness:** Is the service stateless? If not, how is session state replicated across instances? | Inability to auto-scale horizontally | P1: Service restart mid-request → no data loss, P2: Horizontal scaling under load | +| 3.2 | **Bottlenecks:** Have we identified the weakest link (e.g., database connections, API rate limits) under load? | System crash during peak traffic | P2: Load test identifies bottleneck, P2: Connection pool exhaustion handled | +| 3.3 | **SLA Definitions:** What is the target Availability (e.g., 99.9%) and does the architecture support redundancy to meet it? | Breach of contract; customer churn | P1: Availability target defined, P2: Redundancy validated (multi-region/zone) | +| 3.4 | **Circuit Breakers:** If a dependency fails, does this service fail fast or hang? | Cascading failures taking down the whole platform | P1: Circuit breaker opens on 5 failures, P1: Auto-reset after recovery, P2: Timeout prevents hanging | + +**Common Gaps:** +- Stateful session management (can't scale horizontally) +- No load testing, bottlenecks unknown +- SLA undefined or unrealistic (99.99% without redundancy) +- No circuit breakers (cascading failures) + +**Mitigation Examples:** +- 3.1 (Statelessness): Externalize session to Redis/JWT, design for horizontal scaling +- 3.2 (Bottlenecks): Load test with k6, monitor connection pools, identify weak links +- 3.3 (SLA): Define realistic SLA (99.9% = 43 min/month downtime), add redundancy +- 3.4 (Circuit Breakers): Implement circuit breakers (Hystrix pattern), fail fast on errors + +--- + +## 4. Disaster Recovery (DR) + +**Question:** What happens when the worst-case scenario occurs? + +| # | Criterion | Risk if Unmet | Typical Test Scenarios (P0-P2) | +| --- | -------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | ----------------------------------------------------------------------- | +| 4.1 | **RTO/RPO:** What is the Recovery Time Objective (how long to restore) and Recovery Point Objective (max data loss)? | Extended outages; data loss liability | P2: RTO defined and tested, P2: RPO validated (backup frequency) | +| 4.2 | **Failover:** Is region/zone failover automated or manual? Has it been practiced? | "Heroics" required during outages; human error | P2: Automated failover works, P2: Manual failover documented and tested | +| 4.3 | **Backups:** Are backups immutable and tested for restoration integrity? | Ransomware vulnerability; corrupted backups | P2: Backup restore succeeds, P2: Backup immutability validated | + +**Common Gaps:** +- RTO/RPO undefined (no recovery plan) +- Failover never tested (manual process, prone to errors) +- Backups exist but restoration never validated (untested backups = no backups) + +**Mitigation Examples:** +- 4.1 (RTO/RPO): Define RTO (e.g., 4 hours) and RPO (e.g., 1 hour), document recovery procedures +- 4.2 (Failover): Automate multi-region failover, practice failover drills quarterly +- 4.3 (Backups): Implement immutable backups (S3 versioning), test restore monthly + +--- + +## 5. Security + +**Question:** Is the design safe by default? + +| # | Criterion | Risk if Unmet | Typical Test Scenarios (P0-P2) | +| --- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| 5.1 | **AuthN/AuthZ:** Does it implement standard protocols (OAuth2/OIDC)? Are permissions granular (Least Privilege)? | Unauthorized access; data leaks | P0: OAuth flow works, P0: Expired token rejected, P0: Insufficient permissions return 403, P1: Scope enforcement | +| 5.2 | **Encryption:** Is data encrypted at rest (DB) and in transit (TLS)? | Compliance violations; data theft | P1: Milvus data-at-rest encrypted, P1: TLS 1.2+ enforced, P2: Certificate rotation works | +| 5.3 | **Secrets:** Are API keys/passwords stored in a Vault (not in code or config files)? | Credentials leaked in git history | P1: No hardcoded secrets in code, P1: Secrets loaded from AWS Secrets Manager | +| 5.4 | **Input Validation:** Are inputs sanitized against Injection attacks (SQLi, XSS)? | System compromise via malicious payloads | P1: SQL injection sanitized, P1: XSS escaped, P2: Command injection prevented | + +**Common Gaps:** +- Weak authentication (no OAuth, hardcoded API keys) +- No encryption at rest (plaintext in database) +- Secrets in git (API keys, passwords in config files) +- No input validation (vulnerable to SQLi, XSS, command injection) + +**Mitigation Examples:** +- 5.1 (AuthN/AuthZ): Implement OAuth 2.1/OIDC, enforce least privilege, validate scopes +- 5.2 (Encryption): Enable TDE (Transparent Data Encryption), enforce TLS 1.2+ +- 5.3 (Secrets): Migrate to AWS Secrets Manager/Vault, scan git history for leaks +- 5.4 (Input Validation): Sanitize all inputs, use parameterized queries, escape outputs + +--- + +## 6. Monitorability, Debuggability & Manageability + +**Question:** Can we operate and fix this in production? + +| # | Criterion | Risk if Unmet | Typical Test Scenarios (P0-P2) | +| --- | ---------------------------------------------------------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| 6.1 | **Tracing:** Does the service propagate W3C Trace Context / Correlation IDs for distributed tracing? | Impossible to debug errors across microservices | P2: W3C Trace Context propagated (EventBridge → Lambda → Service), P2: Correlation ID in all logs | +| 6.2 | **Logs:** Can log levels (INFO vs DEBUG) be toggled dynamically without a redeploy? | Inability to diagnose issues in real-time | P2: Log level toggle works without redeploy, P2: Logs structured (JSON format) | +| 6.3 | **Metrics:** Does it expose RED metrics (Rate, Errors, Duration) for Prometheus/Datadog? | Flying blind regarding system health | P2: /metrics endpoint exposes RED metrics, P2: Prometheus/Datadog scrapes successfully | +| 6.4 | **Config:** Is configuration externalized? Can we change behavior without a code build? | Rigid system; full deploys needed for minor tweaks | P2: Config change without code build, P2: Feature flags toggle behavior | + +**Common Gaps:** +- No distributed tracing (can't debug across microservices) +- Static log levels (requires redeploy to enable DEBUG) +- No metrics endpoint (blind to system health) +- Configuration hardcoded (requires full deploy for minor changes) + +**Mitigation Examples:** +- 6.1 (Tracing): Implement W3C Trace Context, add correlation IDs to all logs +- 6.2 (Logs): Use dynamic log levels (environment variable), structured logging (JSON) +- 6.3 (Metrics): Expose /metrics endpoint, track RED metrics (Rate, Errors, Duration) +- 6.4 (Config): Externalize config (AWS SSM/AppConfig), use feature flags (LaunchDarkly) + +--- + +## 7. QoS (Quality of Service) & QoE (Quality of Experience) + +**Question:** How does it perform, and how does it feel? + +| # | Criterion | Risk if Unmet | Typical Test Scenarios (P0-P2) | +| --- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | +| 7.1 | **Latency (QoS):** What are the P95 and P99 latency targets? | Slow API responses affecting throughput | P3: P95 latency - Load and execute the systematic analysis from: {checklist} + Read fully and follow the systematic analysis from: {checklist} Work through each checklist section interactively with the user Record status for each checklist item: - [x] Done - Item completed successfully diff --git a/src/bmm/workflows/bmad-quick-flow/quick-dev/data/project-levels.yaml b/src/bmm/workflows/bmad-quick-flow/quick-dev/data/project-levels.yaml deleted file mode 100644 index 628573ec..00000000 --- a/src/bmm/workflows/bmad-quick-flow/quick-dev/data/project-levels.yaml +++ /dev/null @@ -1,59 +0,0 @@ -# BMM Project Scale Levels - Source of Truth -# Reference: /_bmad/bmm/README.md lines 77-85 - -levels: - 0: - name: "Level 0" - title: "Single Atomic Change" - stories: "1 story" - description: "Bug fix, tiny feature, one small change" - documentation: "Minimal - tech spec only" - architecture: false - - 1: - name: "Level 1" - title: "Small Feature" - stories: "1-10 stories" - description: "Small coherent feature, minimal documentation" - documentation: "Tech spec" - architecture: false - - 2: - name: "Level 2" - title: "Medium Project" - stories: "5-15 stories" - description: "Multiple features, focused PRD" - documentation: "PRD + optional tech spec" - architecture: false - - 3: - name: "Level 3" - title: "Complex System" - stories: "12-40 stories" - description: "Subsystems, integrations, full architecture" - documentation: "PRD + architecture + JIT tech specs" - architecture: true - - 4: - name: "Level 4" - title: "Enterprise Scale" - stories: "40+ stories" - description: "Multiple products, enterprise architecture" - documentation: "PRD + architecture + JIT tech specs" - architecture: true - -# Quick detection hints for workflow-init -detection_hints: - keywords: - level_0: ["fix", "bug", "typo", "small change", "quick update", "patch"] - level_1: ["simple", "basic", "small feature", "add", "minor"] - level_2: ["dashboard", "several features", "admin panel", "medium"] - level_3: ["platform", "integration", "complex", "system", "architecture"] - level_4: ["enterprise", "multi-tenant", "multiple products", "ecosystem", "scale"] - - story_counts: - level_0: [1, 1] - level_1: [1, 10] - level_2: [5, 15] - level_3: [12, 40] - level_4: [40, 999] diff --git a/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-01-mode-detection.md b/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-01-mode-detection.md index b9012da8..4ea630b1 100644 --- a/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-01-mode-detection.md +++ b/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-01-mode-detection.md @@ -52,7 +52,7 @@ Analyze the user's input to determine mode: - Load the spec, extract tasks/context/AC - Set `{execution_mode}` = "tech-spec" - Set `{tech_spec_path}` = provided path -- **NEXT:** Load `step-03-execute.md` +- **NEXT:** Read fully and follow: `step-03-execute.md` **Mode B: Direct Instructions** @@ -88,43 +88,63 @@ Use holistic judgment, not mechanical keyword matching. ### No Escalation (simple request) -Present choice: +Display: "**Select:** [P] Plan first (tech-spec) [E] Execute directly" -``` -**[t] Plan first** - Create tech-spec then implement -**[e] Execute directly** - Start now -``` +#### Menu Handling Logic: -- **[t]:** Direct user to `{quick_spec_workflow}`. **EXIT Quick Dev.** -- **[e]:** Ask for any additional guidance, then **NEXT:** Load `step-02-context-gathering.md` +- IF P: Direct user to `{quick_spec_workflow}`. **EXIT Quick Dev.** +- IF E: Ask for any additional guidance, then **NEXT:** Read fully and follow: `step-02-context-gathering.md` + +#### EXECUTION RULES: + +- ALWAYS halt and wait for user input after presenting menu +- ONLY proceed when user makes a selection + +--- ### Escalation Triggered - Level 0-2 -``` -This looks like a focused feature with multiple components. +Present: "This looks like a focused feature with multiple components." -**[t] Create tech-spec first** (recommended) -**[w] Seems bigger than quick-dev** - Recommend the Full BMad Flow PRD Process -**[e] Execute directly** -``` +Display: -- **[t]:** Direct to `{quick_spec_workflow}`. **EXIT Quick Dev.** -- **[w]:** Direct user to run the PRD workflow instead. **EXIT Quick Dev.** -- **[e]:** Ask for guidance, then **NEXT:** Load `step-02-context-gathering.md` +**[P] Plan first (tech-spec)** (recommended) +**[W] Seems bigger than quick-dev** - Recommend the Full BMad Flow PRD Process +**[E] Execute directly** + +#### Menu Handling Logic: + +- IF P: Direct to `{quick_spec_workflow}`. **EXIT Quick Dev.** +- IF W: Direct user to run the PRD workflow instead. **EXIT Quick Dev.** +- IF E: Ask for guidance, then **NEXT:** Read fully and follow: `step-02-context-gathering.md` + +#### EXECUTION RULES: + +- ALWAYS halt and wait for user input after presenting menu +- ONLY proceed when user makes a selection + +--- ### Escalation Triggered - Level 3+ -``` -This sounds like platform/system work. +Present: "This sounds like platform/system work." -**[w] Start BMad Method** (recommended) -**[t] Create tech-spec** (lighter planning) -**[e] Execute directly** - feeling lucky -``` +Display: -- **[t]:** Direct to `{quick_spec_workflow}`. **EXIT Quick Dev.** -- **[w]:** Direct user to run the PRD workflow instead. **EXIT Quick Dev.** -- **[e]:** Ask for guidance, then **NEXT:** Load `step-02-context-gathering.md` +**[W] Start BMad Method** (recommended) +**[P] Plan first (tech-spec)** (lighter planning) +**[E] Execute directly** - feeling lucky + +#### Menu Handling Logic: + +- IF P: Direct to `{quick_spec_workflow}`. **EXIT Quick Dev.** +- IF W: Direct user to run the PRD workflow instead. **EXIT Quick Dev.** +- IF E: Ask for guidance, then **NEXT:** Read fully and follow: `step-02-context-gathering.md` + +#### EXECUTION RULES: + +- ALWAYS halt and wait for user input after presenting menu +- ONLY proceed when user makes a selection --- @@ -132,9 +152,9 @@ This sounds like platform/system work. **CRITICAL:** When this step completes, explicitly state which step to load: -- Mode A (tech-spec): "**NEXT:** Loading `step-03-execute.md`" -- Mode B (direct, [e] selected): "**NEXT:** Loading `step-02-context-gathering.md`" -- Escalation ([t] or [w]): "**EXITING Quick Dev.** Follow the directed workflow." +- Mode A (tech-spec): "**NEXT:** read fully and follow: `step-03-execute.md`" +- Mode B (direct, [E] selected): "**NEXT:** Read fully and follow: `step-02-context-gathering.md`" +- Escalation ([P] or [W]): "**EXITING Quick Dev.** Follow the directed workflow." --- diff --git a/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-02-context-gathering.md b/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-02-context-gathering.md index a886b5f5..dffb86a8 100644 --- a/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-02-context-gathering.md +++ b/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-02-context-gathering.md @@ -99,7 +99,7 @@ Ready to execute? (y/n/adjust) **CRITICAL:** When user confirms ready, explicitly state: -- **y:** "**NEXT:** Loading `step-03-execute.md`" +- **y:** "**NEXT:** Read fully and follow: `step-03-execute.md`" - **n/adjust:** Continue gathering context, then re-present plan --- diff --git a/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-03-execute.md b/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-03-execute.md index f12113cf..9d728361 100644 --- a/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-03-execute.md +++ b/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-03-execute.md @@ -91,7 +91,7 @@ For each task: ## NEXT STEP -When ALL tasks are complete (or halted on blocker), load `step-04-self-check.md`. +When ALL tasks are complete (or halted on blocker), read fully and follow: `step-04-self-check.md`. --- diff --git a/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md b/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md index db03665f..50c786d0 100644 --- a/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md +++ b/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md @@ -65,7 +65,7 @@ With `{diff_output}` constructed, invoke the review task. If possible, use infor Review {diff_output} using {project-root}/_bmad/core/tasks/review-adversarial-general.xml ``` -**Platform fallback:** If task invocation not available, load the task file and execute its instructions inline, passing `{diff_output}` as the content. +**Platform fallback:** If task invocation not available, load the task file and follow its instructions inline, passing `{diff_output}` as the content. The task should: review `{diff_output}` and return a list of findings. @@ -85,7 +85,7 @@ If TodoWrite or similar tool is available, turn each finding into a TODO, includ ## NEXT STEP -With findings in hand, load `step-06-resolve-findings.md` for user to choose resolution approach. +With findings in hand, read fully and follow: `step-06-resolve-findings.md` for user to choose resolution approach. --- diff --git a/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-06-resolve-findings.md b/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-06-resolve-findings.md index fcc5146e..4ab367c6 100644 --- a/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-06-resolve-findings.md +++ b/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-06-resolve-findings.md @@ -25,19 +25,28 @@ From previous steps: ## RESOLUTION OPTIONS -Present choice to user: +Present: "How would you like to handle these findings?" -``` -How would you like to handle these findings? +Display: -**[1] Walk through** - Discuss each finding individually -**[2] Auto-fix** - Automatically fix issues classified as "real" -**[3] Skip** - Acknowledge and proceed to commit -``` +**[W] Walk through** - Discuss each finding individually +**[F] Fix automatically** - Automatically fix issues classified as "real" +**[S] Skip** - Acknowledge and proceed to commit + +### Menu Handling Logic: + +- IF W: Execute WALK THROUGH section below +- IF F: Execute FIX AUTOMATICALLY section below +- IF S: Execute SKIP section below + +### EXECUTION RULES: + +- ALWAYS halt and wait for user input after presenting menu +- ONLY proceed when user makes a selection --- -## OPTION 1: WALK THROUGH +## WALK THROUGH [W] For each finding in order: @@ -52,7 +61,7 @@ After all findings processed, summarize what was fixed/skipped. --- -## OPTION 2: AUTO-FIX +## FIX AUTOMATICALLY [F] 1. Filter findings to only those classified as "real" 2. Apply fixes for each real finding @@ -69,7 +78,7 @@ Skipped (noise/uncertain): F2, F4 --- -## OPTION 3: SKIP +## SKIP [S] 1. Acknowledge all findings were reviewed 2. Note that user chose to proceed without fixes diff --git a/src/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md b/src/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md index 5d9769c3..3fbeb13b 100644 --- a/src/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md +++ b/src/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md @@ -47,4 +47,4 @@ Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: ## EXECUTION -Load and execute `steps/step-01-mode-detection.md` to begin the workflow. +Read fully and follow: `steps/step-01-mode-detection.md` to begin the workflow. diff --git a/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-01-understand.md b/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-01-understand.md index e2f6f3f5..a7cde555 100644 --- a/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-01-understand.md +++ b/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-01-understand.md @@ -47,20 +47,20 @@ Hey {user_name}! Found a tech-spec in progress: Is this what you're here to continue? -[y] Yes, pick up where I left off -[n] No, archive it and start something new +[Y] Yes, pick up where I left off +[N] No, archive it and start something new ``` 4. **HALT and wait for user selection.** a) **Menu Handling:** -- **[y] Continue existing:** +- **[Y] Continue existing:** - Jump directly to the appropriate step based on `stepsCompleted`: - `[1]` → Load `{nextStepFile}` (Step 2) - `[1, 2]` → Load `{skipToStepFile}` (Step 3) - `[1, 2, 3]` → Load `./step-04-review.md` (Step 4) -- **[n] Archive and start fresh:** +- **[N] Archive and start fresh:** - Rename `{wipFile}` to `{implementation_artifacts}/tech-spec-{slug}-archived-{date}.md` ### 1. Greet and Ask for Initial Request @@ -162,19 +162,22 @@ b) **Report to user:** a) **Display menu:** -``` -[a] Advanced Elicitation - dig deeper into requirements -[c] Continue - proceed to next step -[p] Party Mode - bring in other experts -``` +Display: "**Select:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Deep Investigation (Step 2 of 4)" b) **HALT and wait for user selection.** -#### Menu Handling: +#### Menu Handling Logic: -- **[a]**: Load and execute `{advanced_elicitation}`, then return here and redisplay menu -- **[c]**: Load and execute `{nextStepFile}` (Map Technical Constraints) -- **[p]**: Load and execute `{party_mode_exec}`, then return here and redisplay menu +- IF A: Read fully and follow: `{advanced_elicitation}` with current tech-spec content, process enhanced insights, ask user "Accept improvements? (y/n)", if yes update WIP file then redisplay menu, if no keep original then redisplay menu +- IF P: Read fully and follow: `{party_mode_exec}` with current tech-spec content, process collaborative insights, ask user "Accept changes? (y/n)", if yes update WIP file then redisplay menu, if no keep original then redisplay menu +- IF C: Verify `{wipFile}` has `stepsCompleted: [1]`, then read fully and follow: `{nextStepFile}` +- IF Any other comments or queries: respond helpfully then redisplay menu + +#### EXECUTION RULES: + +- ALWAYS halt and wait for user input after presenting menu +- ONLY proceed to next step when user selects 'C' +- After A or P execution, return to this menu --- @@ -186,4 +189,4 @@ b) **HALT and wait for user selection.** - [ ] WIP check performed FIRST before any greeting. - [ ] `{wipFile}` created with correct frontmatter, Overview, Context for Development, and `stepsCompleted: [1]`. -- [ ] User selected [c] to continue. +- [ ] User selected [C] to continue. diff --git a/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-02-investigate.md b/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-02-investigate.md index 7a6852ef..1b0d0cee 100644 --- a/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-02-investigate.md +++ b/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-02-investigate.md @@ -115,21 +115,22 @@ Fill in: ### 4. Present Checkpoint Menu -**Display menu:** - -``` -[a] Advanced Elicitation - explore more context -[c] Continue - proceed to Generate Spec -[p] Party Mode - bring in other experts -``` +Display: "**Select:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Generate Spec (Step 3 of 4)" **HALT and wait for user selection.** -#### Menu Handling: +#### Menu Handling Logic: -- **[a]**: Load and execute `{advanced_elicitation}`, then return here and redisplay menu -- **[c]**: Verify frontmatter updated with `stepsCompleted: [1, 2]`, then load and execute `{nextStepFile}` -- **[p]**: Load and execute `{party_mode_exec}`, then return here and redisplay menu +- IF A: Read fully and follow: `{advanced_elicitation}` with current tech-spec content, process enhanced insights, ask user "Accept improvements? (y/n)", if yes update WIP file then redisplay menu, if no keep original then redisplay menu +- IF P: Read fully and follow: `{party_mode_exec}` with current tech-spec content, process collaborative insights, ask user "Accept changes? (y/n)", if yes update WIP file then redisplay menu, if no keep original then redisplay menu +- IF C: Verify frontmatter updated with `stepsCompleted: [1, 2]`, then read fully and follow: `{nextStepFile}` +- IF Any other comments or queries: respond helpfully then redisplay menu + +#### EXECUTION RULES: + +- ALWAYS halt and wait for user input after presenting menu +- ONLY proceed to next step when user selects 'C' +- After A or P execution, return to this menu --- diff --git a/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-03-generate.md b/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-03-generate.md index c266d0a7..79999db3 100644 --- a/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-03-generate.md +++ b/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-03-generate.md @@ -114,7 +114,7 @@ stepsCompleted: [1, 2, 3] --- ``` -c) **Load and execute `{nextStepFile}` (Step 4)** +c) **Read fully and follow: `{nextStepFile}` (Step 4)** ## REQUIRED OUTPUTS: diff --git a/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md b/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md index 3e612d9b..a223a2e4 100644 --- a/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md +++ b/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md @@ -43,23 +43,24 @@ wipFile: '{implementation_artifacts}/tech-spec-wip.md' **Present review menu:** -``` -[y] Approve - finalize the spec -[c] Changes - request modifications -[q] Questions - ask about any section -[a] Advanced Elicitation - dig deeper before approving -[p] Party Mode - get expert feedback before approving -``` +Display: "**Select:** [C] Continue [E] Edit [Q] Questions [A] Advanced Elicitation [P] Party Mode" **HALT and wait for user selection.** -#### Menu Handling: +#### Menu Handling Logic: -- **[y]**: Proceed to Section 3 (Finalize the Spec) -- **[c]**: Proceed to Section 2 (Handle Review Feedback), then return here and redisplay menu -- **[q]**: Answer questions, then redisplay this menu -- **[a]**: Load and execute `{advanced_elicitation}`, then return here and redisplay menu -- **[p]**: Load and execute `{party_mode_exec}`, then return here and redisplay menu +- IF C: Proceed to Section 3 (Finalize the Spec) +- IF E: Proceed to Section 2 (Handle Review Feedback), then return here and redisplay menu +- IF Q: Answer questions, then redisplay this menu +- IF A: Read fully and follow: `{advanced_elicitation}` with current spec content, process enhanced insights, ask user "Accept improvements? (y/n)", if yes update spec then redisplay menu, if no keep original then redisplay menu +- IF P: Read fully and follow: `{party_mode_exec}` with current spec content, process collaborative insights, ask user "Accept changes? (y/n)", if yes update spec then redisplay menu, if no keep original then redisplay menu +- IF Any other comments or queries: respond helpfully then redisplay menu + +#### EXECUTION RULES: + +- ALWAYS halt and wait for user input after presenting menu +- ONLY proceed to finalize when user selects 'C' +- After other menu items execution, return to this menu ### 2. Handle Review Feedback @@ -114,11 +115,11 @@ Saved to: {finalFile} **Next Steps:** -[a] Advanced Elicitation - refine further -[r] Adversarial Review - critique of the spec (highly recommended) -[b] Begin Development - start implementing now (not recommended) -[d] Done - exit workflow -[p] Party Mode - get expert feedback before dev +[A] Advanced Elicitation - refine further +[R] Adversarial Review - critique of the spec (highly recommended) +[B] Begin Development - start implementing now (not recommended) +[D] Done - exit workflow +[P] Party Mode - get expert feedback before dev --- @@ -135,17 +136,26 @@ This ensures the dev agent has clean context focused solely on implementation. b) **HALT and wait for user selection.** -#### Menu Handling: +#### Menu Handling Logic: -- **[a]**: Load and execute `{advanced_elicitation}`, then return here and redisplay menu -- **[b]**: Load and execute `{quick_dev_workflow}` with the final spec file (warn: fresh context is better) -- **[d]**: Exit workflow - display final confirmation and path to spec -- **[p]**: Load and execute `{party_mode_exec}`, then return here and redisplay menu -- **[r]**: Execute Adversarial Review: - 1. **Invoke Adversarial Review Task**: +- IF A: Read fully and follow: `{advanced_elicitation}` with current spec content, process enhanced insights, ask user "Accept improvements? (y/n)", if yes update spec then redisplay menu, if no keep original then redisplay menu +- IF B: Read the entire workflow file at `{quick_dev_workflow}` and follow the instructions with the final spec file (warn: fresh context is better) +- IF D: Exit workflow - display final confirmation and path to spec +- IF P: Read fully and follow: `{party_mode_exec}` with current spec content, process collaborative insights, ask user "Accept changes? (y/n)", if yes update spec then redisplay menu, if no keep original then redisplay menu +- IF R: Execute Adversarial Review (see below) +- IF Any other comments or queries: respond helpfully then redisplay menu + +#### EXECUTION RULES: + +- ALWAYS halt and wait for user input after presenting menu +- After A, P, or R execution, return to this menu + +#### Adversarial Review [R] Process: + +1. **Invoke Adversarial Review Task**: > With `{finalFile}` constructed, invoke the review task. If possible, use information asymmetry: run this task, and only it, in a separate subagent or process with read access to the project, but no context except the `{finalFile}`. Review {finalFile} using {project-root}/_bmad/core/tasks/review-adversarial-general.xml - > **Platform fallback:** If task invocation not available, load the task file and execute its instructions inline, passing `{finalFile}` as the content. + > **Platform fallback:** If task invocation not available, load the task file and follow its instructions inline, passing `{finalFile}` as the content. > The task should: review `{finalFile}` and return a list of findings. 2. **Process Findings**: @@ -161,7 +171,7 @@ b) **HALT and wait for user selection.** ### 5. Exit Workflow -**When user selects [d]:** +**When user selects [D]:** "**All done!** Your tech-spec is ready at: diff --git a/src/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md b/src/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md index dcda8a91..bb6c877a 100644 --- a/src/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md +++ b/src/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md @@ -47,9 +47,9 @@ This uses **step-file architecture** for disciplined execution: 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**: Only proceed to next step when user selects [c] (Continue) +4. **CHECK CONTINUATION**: Only proceed to next step when user selects [C] (Continue) 5. **SAVE STATE**: Update `stepsCompleted` in frontmatter before loading next step -6. **LOAD NEXT**: When directed, load and read entire next step file, then execute +6. **LOAD NEXT**: When directed, read fully and follow the next step file ### Critical Rules (NO EXCEPTIONS) @@ -76,4 +76,4 @@ Load and read full config from `{main_config}` and resolve: ### 2. First Step Execution -Load, read the full file, and then execute `steps/step-01-understand.md` to begin the workflow. +Read fully and follow: `steps/step-01-understand.md` to begin the workflow. diff --git a/src/bmm/workflows/document-project/instructions.md b/src/bmm/workflows/document-project/instructions.md index f2482775..2f567fa3 100644 --- a/src/bmm/workflows/document-project/instructions.md +++ b/src/bmm/workflows/document-project/instructions.md @@ -97,11 +97,11 @@ Your choice [1/2/3]: Display: "Resuming {{workflow_mode}} from {{current_step}} with cached project type(s): {{cached_project_types}}" - Load and execute: {installed_path}/workflows/deep-dive-instructions.md with resume context + Read fully and follow: {installed_path}/workflows/deep-dive-instructions.md with resume context - Load and execute: {installed_path}/workflows/full-scan-instructions.md with resume context + Read fully and follow: {installed_path}/workflows/full-scan-instructions.md with resume context @@ -148,7 +148,7 @@ Your choice [1/2/3]: Set workflow_mode = "full_rescan" Display: "Starting full project rescan..." - Load and execute: {installed_path}/workflows/full-scan-instructions.md + Read fully and follow: {installed_path}/workflows/full-scan-instructions.md After sub-workflow completes, continue to Step 4 @@ -156,7 +156,7 @@ Your choice [1/2/3]: Set workflow_mode = "deep_dive" Set scan_level = "exhaustive" Display: "Starting deep-dive documentation mode..." - Load and execute: {installed_path}/workflows/deep-dive-instructions.md + Read fully and follow: {installed_path}/workflows/deep-dive-instructions.md After sub-workflow completes, continue to Step 4 @@ -169,7 +169,7 @@ Your choice [1/2/3]: Set workflow_mode = "initial_scan" Display: "No existing documentation found. Starting initial project scan..." - Load and execute: {installed_path}/workflows/full-scan-instructions.md + Read fully and follow: {installed_path}/workflows/full-scan-instructions.md After sub-workflow completes, continue to Step 4 diff --git a/src/bmm/workflows/testarch/nfr-assess/instructions.md b/src/bmm/workflows/testarch/nfr-assess/instructions.md index 36ac99ec..f23e6b10 100644 --- a/src/bmm/workflows/testarch/nfr-assess/instructions.md +++ b/src/bmm/workflows/testarch/nfr-assess/instructions.md @@ -51,7 +51,7 @@ This workflow performs a comprehensive assessment of non-functional requirements **Actions:** 1. Load relevant knowledge fragments from `{project-root}/_bmad/bmm/testarch/tea-index.csv`: - - `nfr-criteria.md` - Non-functional requirements criteria and thresholds (security, performance, reliability, maintainability with code examples, 658 lines, 4 examples) + - `adr-quality-readiness-checklist.md` - 8-category 29-criteria NFR framework (testability, test data, scalability, DR, security, monitorability, QoS/QoE, deployability, ~450 lines) - `ci-burn-in.md` - CI/CD burn-in patterns for reliability validation (10-iteration detection, sharding, selective execution, 678 lines, 4 examples) - `test-quality.md` - Test quality expectations for maintainability (deterministic, isolated, explicit assertions, length/time limits, 658 lines, 5 examples) - `playwright-config.md` - Performance configuration patterns: parallelization, timeout standards, artifact output (722 lines, 5 examples) @@ -75,13 +75,17 @@ This workflow performs a comprehensive assessment of non-functional requirements **Actions:** -1. Determine which NFR categories to assess (default: performance, security, reliability, maintainability): - - **Performance**: Response time, throughput, resource usage - - **Security**: Authentication, authorization, data protection, vulnerability scanning - - **Reliability**: Error handling, recovery, availability, fault tolerance - - **Maintainability**: Code quality, test coverage, documentation, technical debt +1. Determine which NFR categories to assess using ADR Quality Readiness Checklist (8 standard categories): + - **1. Testability & Automation**: Isolation, headless interaction, state control, sample requests (4 criteria) + - **2. Test Data Strategy**: Segregation, generation, teardown (3 criteria) + - **3. Scalability & Availability**: Statelessness, bottlenecks, SLA definitions, circuit breakers (4 criteria) + - **4. Disaster Recovery**: RTO/RPO, failover, backups (3 criteria) + - **5. Security**: AuthN/AuthZ, encryption, secrets, input validation (4 criteria) + - **6. Monitorability, Debuggability & Manageability**: Tracing, logs, metrics, config (4 criteria) + - **7. QoS & QoE**: Latency, throttling, perceived performance, degradation (4 criteria) + - **8. Deployability**: Zero downtime, backward compatibility, rollback (3 criteria) -2. Add custom NFR categories if specified (e.g., accessibility, internationalization, compliance) +2. Add custom NFR categories if specified (e.g., accessibility, internationalization, compliance) beyond the 8 standard categories 3. Gather thresholds for each NFR: - From tech-spec.md (primary source) diff --git a/src/bmm/workflows/testarch/nfr-assess/nfr-report-template.md b/src/bmm/workflows/testarch/nfr-assess/nfr-report-template.md index 428a0a48..115ee969 100644 --- a/src/bmm/workflows/testarch/nfr-assess/nfr-report-template.md +++ b/src/bmm/workflows/testarch/nfr-assess/nfr-report-template.md @@ -355,13 +355,24 @@ Note: This assessment summarizes existing evidence; it does not run tests or CI ## Findings Summary -| Category | PASS | CONCERNS | FAIL | Overall Status | -| --------------- | ---------------- | -------------------- | ---------------- | ----------------------------------- | -| Performance | {P_PASS_COUNT} | {P_CONCERNS_COUNT} | {P_FAIL_COUNT} | {P_STATUS} {P_ICON} | -| Security | {S_PASS_COUNT} | {S_CONCERNS_COUNT} | {S_FAIL_COUNT} | {S_STATUS} {S_ICON} | -| Reliability | {R_PASS_COUNT} | {R_CONCERNS_COUNT} | {R_FAIL_COUNT} | {R_STATUS} {R_ICON} | -| Maintainability | {M_PASS_COUNT} | {M_CONCERNS_COUNT} | {M_FAIL_COUNT} | {M_STATUS} {M_ICON} | -| **Total** | **{TOTAL_PASS}** | **{TOTAL_CONCERNS}** | **{TOTAL_FAIL}** | **{OVERALL_STATUS} {OVERALL_ICON}** | +**Based on ADR Quality Readiness Checklist (8 categories, 29 criteria)** + +| Category | Criteria Met | PASS | CONCERNS | FAIL | Overall Status | +|----------|--------------|------|----------|------|----------------| +| 1. Testability & Automation | {T_MET}/4 | {T_PASS} | {T_CONCERNS} | {T_FAIL} | {T_STATUS} {T_ICON} | +| 2. Test Data Strategy | {TD_MET}/3 | {TD_PASS} | {TD_CONCERNS} | {TD_FAIL} | {TD_STATUS} {TD_ICON} | +| 3. Scalability & Availability | {SA_MET}/4 | {SA_PASS} | {SA_CONCERNS} | {SA_FAIL} | {SA_STATUS} {SA_ICON} | +| 4. Disaster Recovery | {DR_MET}/3 | {DR_PASS} | {DR_CONCERNS} | {DR_FAIL} | {DR_STATUS} {DR_ICON} | +| 5. Security | {SEC_MET}/4 | {SEC_PASS} | {SEC_CONCERNS} | {SEC_FAIL} | {SEC_STATUS} {SEC_ICON} | +| 6. Monitorability, Debuggability & Manageability | {MON_MET}/4 | {MON_PASS} | {MON_CONCERNS} | {MON_FAIL} | {MON_STATUS} {MON_ICON} | +| 7. QoS & QoE | {QOS_MET}/4 | {QOS_PASS} | {QOS_CONCERNS} | {QOS_FAIL} | {QOS_STATUS} {QOS_ICON} | +| 8. Deployability | {DEP_MET}/3 | {DEP_PASS} | {DEP_CONCERNS} | {DEP_FAIL} | {DEP_STATUS} {DEP_ICON} | +| **Total** | **{TOTAL_MET}/29** | **{TOTAL_PASS}** | **{TOTAL_CONCERNS}** | **{TOTAL_FAIL}** | **{OVERALL_STATUS} {OVERALL_ICON}** | + +**Criteria Met Scoring:** +- ≥26/29 (90%+) = Strong foundation +- 20-25/29 (69-86%) = Room for improvement +- <20/29 (<69%) = Significant gaps --- @@ -372,11 +383,16 @@ nfr_assessment: date: '{DATE}' story_id: '{STORY_ID}' feature_name: '{FEATURE_NAME}' + adr_checklist_score: '{TOTAL_MET}/29' # ADR Quality Readiness Checklist categories: - performance: '{PERFORMANCE_STATUS}' - security: '{SECURITY_STATUS}' - reliability: '{RELIABILITY_STATUS}' - maintainability: '{MAINTAINABILITY_STATUS}' + testability_automation: '{T_STATUS}' + test_data_strategy: '{TD_STATUS}' + scalability_availability: '{SA_STATUS}' + disaster_recovery: '{DR_STATUS}' + security: '{SEC_STATUS}' + monitorability: '{MON_STATUS}' + qos_qoe: '{QOS_STATUS}' + deployability: '{DEP_STATUS}' overall_status: '{OVERALL_STATUS}' critical_issues: { CRITICAL_COUNT } high_priority_issues: { HIGH_COUNT } diff --git a/src/bmm/workflows/testarch/test-design/checklist.md b/src/bmm/workflows/testarch/test-design/checklist.md index 4289359b..7c4475ca 100644 --- a/src/bmm/workflows/testarch/test-design/checklist.md +++ b/src/bmm/workflows/testarch/test-design/checklist.md @@ -1,10 +1,17 @@ # Test Design and Risk Assessment - Validation Checklist -## Prerequisites +## Prerequisites (Mode-Dependent) +**System-Level Mode (Phase 3):** +- [ ] PRD exists with functional and non-functional requirements +- [ ] ADR (Architecture Decision Record) exists +- [ ] Architecture document available (architecture.md or tech-spec) +- [ ] Requirements are testable and unambiguous + +**Epic-Level Mode (Phase 4):** - [ ] Story markdown with clear acceptance criteria exists - [ ] PRD or epic documentation available -- [ ] Architecture documents available (optional) +- [ ] Architecture documents available (test-design-architecture.md + test-design-qa.md from Phase 3, if exists) - [ ] Requirements are testable and unambiguous ## Process Steps @@ -73,23 +80,29 @@ - [ ] Owners assigned where applicable - [ ] No duplicate coverage (same behavior at multiple levels) -### Execution Order +### Execution Strategy -- [ ] Smoke tests defined (<5 min target) -- [ ] P0 tests listed (<10 min target) -- [ ] P1 tests listed (<30 min target) -- [ ] P2/P3 tests listed (<60 min target) -- [ ] Order optimizes for fast feedback +**CRITICAL: Keep execution strategy simple, avoid redundancy** + +- [ ] **Simple structure**: PR / Nightly / Weekly (NOT complex smoke/P0/P1/P2 tiers) +- [ ] **PR execution**: All functional tests unless significant infrastructure overhead +- [ ] **Nightly/Weekly**: Only performance, chaos, long-running, manual tests +- [ ] **No redundancy**: Don't re-list all tests (already in coverage plan) +- [ ] **Philosophy stated**: "Run everything in PRs if <15 min, defer only if expensive/long" +- [ ] **Playwright parallelization noted**: 100s of tests in 10-15 min ### Resource Estimates -- [ ] P0 hours calculated (count × 2 hours) -- [ ] P1 hours calculated (count × 1 hour) -- [ ] P2 hours calculated (count × 0.5 hours) -- [ ] P3 hours calculated (count × 0.25 hours) -- [ ] Total hours summed -- [ ] Days estimate provided (hours / 8) -- [ ] Estimates include setup time +**CRITICAL: Use intervals/ranges, NOT exact numbers** + +- [ ] P0 effort provided as interval range (e.g., "~25-40 hours" NOT "36 hours") +- [ ] P1 effort provided as interval range (e.g., "~20-35 hours" NOT "27 hours") +- [ ] P2 effort provided as interval range (e.g., "~10-30 hours" NOT "15.5 hours") +- [ ] P3 effort provided as interval range (e.g., "~2-5 hours" NOT "2.5 hours") +- [ ] Total effort provided as interval range (e.g., "~55-110 hours" NOT "81 hours") +- [ ] Timeline provided as week range (e.g., "~1.5-3 weeks" NOT "11 days") +- [ ] Estimates include setup time and account for complexity variations +- [ ] **No false precision**: Avoid exact calculations like "18 tests × 2 hours = 36 hours" ### Quality Gate Criteria @@ -119,11 +132,16 @@ ### Priority Assignment Accuracy -- [ ] P0: Truly blocks core functionality -- [ ] P0: High-risk (score ≥6) -- [ ] P0: No workaround exists -- [ ] P1: Important but not blocking -- [ ] P2/P3: Nice-to-have or edge cases +**CRITICAL: Priority classification is separate from execution timing** + +- [ ] **Priority sections (P0/P1/P2/P3) do NOT include execution context** (e.g., no "Run on every commit" in headers) +- [ ] **Priority sections have only "Criteria" and "Purpose"** (no "Execution:" field) +- [ ] **Execution Strategy section** is separate and handles timing based on infrastructure overhead +- [ ] P0: Truly blocks core functionality + High-risk (≥6) + No workaround +- [ ] P1: Important features + Medium-risk (3-4) + Common workflows +- [ ] P2: Secondary features + Low-risk (1-2) + Edge cases +- [ ] P3: Nice-to-have + Exploratory + Benchmarks +- [ ] **Note at top of Test Coverage Plan**: Clarifies P0/P1/P2/P3 = priority/risk, NOT execution timing ### Test Level Selection @@ -157,6 +175,146 @@ - [ ] Risk assessment informs `gate` workflow criteria - [ ] Integrates with `ci` workflow execution order +## System-Level Mode: Two-Document Validation + +**When in system-level mode (PRD + ADR input), validate BOTH documents:** + +### test-design-architecture.md + +- [ ] **Purpose statement** at top (serves as contract with Architecture team) +- [ ] **Executive Summary** with scope, business context, architecture decisions, risk summary +- [ ] **Quick Guide** section with three tiers: + - [ ] 🚨 BLOCKERS - Team Must Decide (Sprint 0 critical path items) + - [ ] ⚠️ HIGH PRIORITY - Team Should Validate (recommendations for approval) + - [ ] 📋 INFO ONLY - Solutions Provided (no decisions needed) +- [ ] **Risk Assessment** section - **ACTIONABLE** + - [ ] Total risks identified count + - [ ] High-priority risks table (score ≥6) with all columns: Risk ID, Category, Description, Probability, Impact, Score, Mitigation, Owner, Timeline + - [ ] Medium and low-priority risks tables + - [ ] Risk category legend included +- [ ] **Testability Concerns and Architectural Gaps** section - **ACTIONABLE** + - [ ] **Sub-section: 🚨 ACTIONABLE CONCERNS** at TOP + - [ ] Blockers to Fast Feedback table (WHAT architecture must provide) + - [ ] Architectural Improvements Needed (WHAT must be changed) + - [ ] Each concern has: Owner, Timeline, Impact + - [ ] **Sub-section: Testability Assessment Summary** at BOTTOM (FYI) + - [ ] What Works Well (passing items) + - [ ] Accepted Trade-offs (no action required) + - [ ] This section only included if worth mentioning; otherwise omitted +- [ ] **Risk Mitigation Plans** for all high-priority risks (≥6) + - [ ] Each plan has: Strategy (numbered steps), Owner, Timeline, Status, Verification + - [ ] **Only Backend/DevOps/Arch/Security mitigations** (production code changes) + - [ ] QA-owned mitigations belong in QA doc instead +- [ ] **Assumptions and Dependencies** section + - [ ] **Architectural assumptions only** (SLO targets, replication lag, system design) + - [ ] Assumptions list (numbered) + - [ ] Dependencies list with required dates + - [ ] Risks to plan with impact and contingency + - [ ] QA execution assumptions belong in QA doc instead +- [ ] **NO test implementation code** (long examples belong in QA doc) +- [ ] **NO test scripts** (no Playwright test(...) blocks, no assertions, no test setup code) +- [ ] **NO NFR test examples** (NFR sections describe WHAT to test, not HOW to test) +- [ ] **NO test scenario checklists** (belong in QA doc) +- [ ] **NO bloat or repetition** (consolidate repeated notes, avoid over-explanation) +- [ ] **Cross-references to QA doc** where appropriate (instead of duplication) +- [ ] **RECIPE SECTIONS NOT IN ARCHITECTURE DOC:** + - [ ] NO "Test Levels Strategy" section (unit/integration/E2E split belongs in QA doc only) + - [ ] NO "NFR Testing Approach" section with detailed test procedures (belongs in QA doc only) + - [ ] NO "Test Environment Requirements" section (belongs in QA doc only) + - [ ] NO "Recommendations for Sprint 0" section with test framework setup (belongs in QA doc only) + - [ ] NO "Quality Gate Criteria" section (pass rates, coverage targets belong in QA doc only) + - [ ] NO "Tool Selection" section (Playwright, k6, etc. belongs in QA doc only) + +### test-design-qa.md + +**REQUIRED SECTIONS:** + +- [ ] **Purpose statement** at top (test execution recipe) +- [ ] **Executive Summary** with risk summary and coverage summary +- [ ] **Dependencies & Test Blockers** section in POSITION 2 (right after Executive Summary) + - [ ] Backend/Architecture dependencies listed (what QA needs from other teams) + - [ ] QA infrastructure setup listed (factories, fixtures, environments) + - [ ] Code example with playwright-utils if config.tea_use_playwright_utils is true + - [ ] Test from '@seontechnologies/playwright-utils/api-request/fixtures' + - [ ] Expect from '@playwright/test' (playwright-utils does not re-export expect) + - [ ] Code examples include assertions (no unused imports) +- [ ] **Risk Assessment** section (brief, references Architecture doc) + - [ ] High-priority risks table + - [ ] Medium/low-priority risks table + - [ ] Each risk shows "QA Test Coverage" column (how QA validates) +- [ ] **Test Coverage Plan** with P0/P1/P2/P3 sections + - [ ] Priority sections have ONLY "Criteria" (no execution context) + - [ ] Note at top: "P0/P1/P2/P3 = priority, NOT execution timing" + - [ ] Test tables with columns: Test ID | Requirement | Test Level | Risk Link | Notes +- [ ] **Execution Strategy** section (organized by TOOL TYPE) + - [ ] Every PR: Playwright tests (~10-15 min) + - [ ] Nightly: k6 performance tests (~30-60 min) + - [ ] Weekly: Chaos & long-running (~hours) + - [ ] Philosophy: "Run everything in PRs unless expensive/long-running" +- [ ] **QA Effort Estimate** section (QA effort ONLY) + - [ ] Interval-based estimates (e.g., "~1-2 weeks" NOT "36 hours") + - [ ] NO DevOps, Backend, Data Eng, Finance effort + - [ ] NO Sprint breakdowns (too prescriptive) +- [ ] **Appendix A: Code Examples & Tagging** +- [ ] **Appendix B: Knowledge Base References** + +**DON'T INCLUDE (bloat):** +- [ ] ❌ NO Quick Reference section +- [ ] ❌ NO System Architecture Summary +- [ ] ❌ NO Test Environment Requirements as separate section (integrate into Dependencies) +- [ ] ❌ NO Testability Assessment section (covered in Dependencies) +- [ ] ❌ NO Test Levels Strategy section (obvious from test scenarios) +- [ ] ❌ NO NFR Readiness Summary +- [ ] ❌ NO Quality Gate Criteria section (teams decide for themselves) +- [ ] ❌ NO Follow-on Workflows section (BMAD commands self-explanatory) +- [ ] ❌ NO Approval section +- [ ] ❌ NO Infrastructure/DevOps/Finance effort tables (out of scope) +- [ ] ❌ NO Sprint 0/1/2/3 breakdown tables +- [ ] ❌ NO Next Steps section + +### Cross-Document Consistency + +- [ ] Both documents reference same risks by ID (R-001, R-002, etc.) +- [ ] Both documents use consistent priority levels (P0, P1, P2, P3) +- [ ] Both documents reference same Sprint 0 blockers +- [ ] No duplicate content (cross-reference instead) +- [ ] Dates and authors match across documents +- [ ] ADR and PRD references consistent + +### Document Quality (Anti-Bloat Check) + +**CRITICAL: Check for bloat and repetition across BOTH documents** + +- [ ] **No repeated notes 10+ times** (e.g., "Timing is pessimistic until R-005 fixed" on every section) +- [ ] **Repeated information consolidated** (write once at top, reference briefly if needed) +- [ ] **No excessive detail** that doesn't add value (obvious concepts, redundant examples) +- [ ] **Focus on unique/critical info** (only document what's different from standard practice) +- [ ] **Architecture doc**: Concerns-focused, NOT implementation-focused +- [ ] **QA doc**: Implementation-focused, NOT theory-focused +- [ ] **Clear separation**: Architecture = WHAT and WHY, QA = HOW +- [ ] **Professional tone**: No AI slop markers + - [ ] Avoid excessive ✅/❌ emojis (use sparingly, only when adding clarity) + - [ ] Avoid "absolutely", "excellent", "fantastic", overly enthusiastic language + - [ ] Write professionally and directly +- [ ] **Architecture doc length**: Target ~150-200 lines max (focus on actionable concerns only) +- [ ] **QA doc length**: Keep concise, remove bloat sections + +### Architecture Doc Structure (Actionable-First Principle) + +**CRITICAL: Validate structure follows actionable-first, FYI-last principle** + +- [ ] **Actionable sections at TOP:** + - [ ] Quick Guide (🚨 BLOCKERS first, then ⚠️ HIGH PRIORITY, then 📋 INFO ONLY last) + - [ ] Risk Assessment (high-priority risks ≥6 at top) + - [ ] Testability Concerns (concerns/blockers at top, passing items at bottom) + - [ ] Risk Mitigation Plans (for high-priority risks ≥6) +- [ ] **FYI sections at BOTTOM:** + - [ ] Testability Assessment Summary (what works well - only if worth mentioning) + - [ ] Assumptions and Dependencies +- [ ] **ASRs categorized correctly:** + - [ ] Actionable ASRs included in 🚨 or ⚠️ sections + - [ ] FYI ASRs included in 📋 section or omitted if obvious + ## Completion Criteria **All must be true:** @@ -166,7 +324,9 @@ - [ ] All output validations passed - [ ] All quality checks passed - [ ] All integration points verified -- [ ] Output file complete and well-formatted +- [ ] Output file(s) complete and well-formatted +- [ ] **System-level mode:** Both documents validated (if applicable) +- [ ] **Epic-level mode:** Single document validated (if applicable) - [ ] Team review scheduled (if required) ## Post-Workflow Actions @@ -212,9 +372,20 @@ If workflow fails: - **Solution**: Use test pyramid - E2E for critical paths only -**Issue**: Resource estimates too high +**Issue**: Resource estimates too high or too precise -- **Solution**: Invest in fixtures/factories to reduce per-test setup time +- **Solution**: + - Invest in fixtures/factories to reduce per-test setup time + - Use interval ranges (e.g., "~55-110 hours") instead of exact numbers (e.g., "81 hours") + - Widen intervals if high uncertainty exists + +**Issue**: Execution order section too complex or redundant + +- **Solution**: + - Default: Run everything in PRs (<15 min with Playwright parallelization) + - Only defer to nightly/weekly if expensive (k6, chaos, 4+ hour tests) + - Don't create smoke/P0/P1/P2/P3 tier structure + - Don't re-list all tests (already in coverage plan) ### Best Practices @@ -222,7 +393,9 @@ If workflow fails: - High-priority risks (≥6) require immediate mitigation - P0 tests should cover <10% of total scenarios - Avoid testing same behavior at multiple levels -- Include smoke tests (P0 subset) for fast feedback +- **Use interval-based estimates** (e.g., "~25-40 hours") instead of exact numbers to avoid false precision and provide flexibility +- **Keep execution strategy simple**: Default to "run everything in PRs" (<15 min with Playwright), only defer if expensive/long-running +- **Avoid execution order redundancy**: Don't create complex tier structures or re-list tests --- diff --git a/src/bmm/workflows/testarch/test-design/instructions.md b/src/bmm/workflows/testarch/test-design/instructions.md index 6f182df5..1eae05be 100644 --- a/src/bmm/workflows/testarch/test-design/instructions.md +++ b/src/bmm/workflows/testarch/test-design/instructions.md @@ -22,28 +22,64 @@ The workflow auto-detects which mode to use based on project phase. **Critical:** Determine mode before proceeding. -### Mode Detection +### Mode Detection (Flexible for Standalone Use) -1. **Check for sprint-status.yaml** - - If `{implementation_artifacts}/sprint-status.yaml` exists → **Epic-Level Mode** (Phase 4) - - If NOT exists → Check workflow status +TEA test-design workflow supports TWO modes, detected automatically: -2. **Mode-Specific Requirements** +1. **Check User Intent Explicitly (Priority 1)** - **System-Level Mode (Phase 3 - Testability Review):** - - ✅ Architecture document exists (architecture.md or tech-spec) - - ✅ PRD exists with functional and non-functional requirements - - ✅ Epics documented (epics.md) - - ⚠️ Output: `{output_folder}/test-design-system.md` + **Deterministic Rules:** + - User provided **PRD+ADR only** (no Epic+Stories) → **System-Level Mode** + - User provided **Epic+Stories only** (no PRD+ADR) → **Epic-Level Mode** + - User provided **BOTH PRD+ADR AND Epic+Stories** → **Prefer System-Level Mode** (architecture review comes first in Phase 3, then epic planning in Phase 4). If mode preference is unclear, ask user: "Should I create (A) System-level test design (PRD + ADR → Architecture doc + QA doc) or (B) Epic-level test design (Epic → Single test plan)?" + - If user intent is clear from context, use that mode regardless of file structure - **Epic-Level Mode (Phase 4 - Per-Epic Planning):** - - ✅ Story markdown with acceptance criteria available - - ✅ PRD or epic documentation exists for context - - ✅ Architecture documents available (optional but recommended) - - ✅ Requirements are clear and testable - - ⚠️ Output: `{output_folder}/test-design-epic-{epic_num}.md` +2. **Fallback to File-Based Detection (Priority 2 - BMad-Integrated)** + - Check for `{implementation_artifacts}/sprint-status.yaml` + - If exists → **Epic-Level Mode** (Phase 4, single document output) + - If NOT exists → **System-Level Mode** (Phase 3, TWO document outputs) -**Halt Condition:** If mode cannot be determined or required files missing, HALT and notify user with missing prerequisites. +3. **If Ambiguous, ASK USER (Priority 3)** + - "I see you have [PRD/ADR/Epic/Stories]. Should I create: + - (A) System-level test design (PRD + ADR → Architecture doc + QA doc)? + - (B) Epic-level test design (Epic → Single test plan)?" + +**Mode Descriptions:** + +**System-Level Mode (PRD + ADR Input)** +- **When to use:** Early in project (Phase 3 Solutioning), architecture being designed +- **Input:** PRD, ADR, architecture.md (optional) +- **Output:** TWO documents + - `test-design-architecture.md` (for Architecture/Dev teams) + - `test-design-qa.md` (for QA team) +- **Focus:** Testability assessment, ASRs, NFR requirements, Sprint 0 setup + +**Epic-Level Mode (Epic + Stories Input)** +- **When to use:** During implementation (Phase 4), per-epic planning +- **Input:** Epic, Stories, tech-specs (optional) +- **Output:** ONE document + - `test-design-epic-{N}.md` (combined risk assessment + test plan) +- **Focus:** Risk assessment, coverage plan, execution order, quality gates + +**Key Insight: TEA Works Standalone OR Integrated** + +**Standalone (No BMad artifacts):** +- User provides PRD + ADR → System-Level Mode +- User provides Epic description → Epic-Level Mode +- TEA doesn't mandate full BMad workflow + +**BMad-Integrated (Full workflow):** +- BMad creates `sprint-status.yaml` → Automatic Epic-Level detection +- BMad creates PRD, ADR, architecture.md → Automatic System-Level detection +- TEA leverages BMad artifacts for richer context + +**Message to User:** +> You don't need to follow full BMad methodology to use TEA test-design. +> Just provide PRD + ADR for system-level, or Epic for epic-level. +> TEA will auto-detect and produce appropriate documents. + +**Halt Condition:** If mode cannot be determined AND user intent unclear AND required files missing, HALT and notify user: +- "Please provide either: (A) PRD + ADR for system-level test design, OR (B) Epic + Stories for epic-level test design" --- @@ -69,8 +105,8 @@ The workflow auto-detects which mode to use based on project phase. 3. **Load Knowledge Base Fragments (System-Level)** - **Critical:** Consult `{project-root}/_bmad/bmm/testarch/tea-index.csv` to load: - - `nfr-criteria.md` - NFR validation approach (security, performance, reliability, maintainability) + **Critical:** Consult `src/bmm/testarch/tea-index.csv` to load: + - `adr-quality-readiness-checklist.md` - 8-category 29-criteria NFR framework (testability, security, scalability, DR, QoS, deployability, etc.) - `test-levels-framework.md` - Test levels strategy guidance - `risk-governance.md` - Testability risk identification - `test-quality.md` - Quality standards and Definition of Done @@ -91,7 +127,7 @@ The workflow auto-detects which mode to use based on project phase. 2. **Load Architecture Context** - Read architecture.md for system design - Read tech-spec for implementation details - - Read test-design-system.md (if exists from Phase 3) + - Read test-design-architecture.md and test-design-qa.md (if exist from Phase 3 system-level test design) - Identify technical constraints and dependencies - Note integration points and external systems @@ -103,7 +139,7 @@ The workflow auto-detects which mode to use based on project phase. 4. **Load Knowledge Base Fragments (Epic-Level)** - **Critical:** Consult `{project-root}/_bmad/bmm/testarch/tea-index.csv` to load: + **Critical:** Consult `src/bmm/testarch/tea-index.csv` to load: - `risk-governance.md` - Risk classification framework (6 categories: TECH, SEC, PERF, DATA, BUS, OPS), automated scoring, gate decision engine, owner tracking (625 lines, 4 examples) - `probability-impact.md` - Risk scoring methodology (probability × impact matrix, automated classification, dynamic re-assessment, gate integration, 604 lines, 4 examples) - `test-levels-framework.md` - Test level selection guidance (E2E vs API vs Component vs Unit with decision matrix, characteristics, when to use each, 467 lines, 4 examples) @@ -121,7 +157,13 @@ The workflow auto-detects which mode to use based on project phase. 1. **Review Architecture for Testability** - Evaluate architecture against these criteria: + **STRUCTURE PRINCIPLE: CONCERNS FIRST, PASSING ITEMS LAST** + + Evaluate architecture against these criteria and structure output as: + 1. **Testability Concerns** (ACTIONABLE - what's broken/missing) + 2. **Testability Assessment Summary** (FYI - what works well) + + **Testability Criteria:** **Controllability:** - Can we control system state for testing? (API seeding, factories, database reset) @@ -138,8 +180,18 @@ The workflow auto-detects which mode to use based on project phase. - Can we reproduce failures? (deterministic waits, HAR capture, seed data) - Are components loosely coupled? (mockable, testable boundaries) + **In Architecture Doc Output:** + - **Section A: Testability Concerns** (TOP) - List what's BROKEN or MISSING + - Example: "No API for test data seeding → Cannot parallelize tests" + - Example: "Hardcoded DB connection → Cannot test in CI" + - **Section B: Testability Assessment Summary** (BOTTOM) - List what PASSES + - Example: "✅ API-first design supports test isolation" + - Only include if worth mentioning; otherwise omit this section entirely + 2. **Identify Architecturally Significant Requirements (ASRs)** + **CRITICAL: ASRs must indicate if ACTIONABLE or FYI** + From PRD NFRs and architecture decisions, identify quality requirements that: - Drive architecture decisions (e.g., "Must handle 10K concurrent users" → caching architecture) - Pose testability challenges (e.g., "Sub-second response time" → performance test infrastructure) @@ -147,21 +199,60 @@ The workflow auto-detects which mode to use based on project phase. Score each ASR using risk matrix (probability × impact). + **In Architecture Doc, categorize ASRs:** + - **ACTIONABLE ASRs** (require architecture changes): Include in "Quick Guide" 🚨 or ⚠️ sections + - **FYI ASRs** (already satisfied by architecture): Include in "Quick Guide" 📋 section OR omit if obvious + + **Example:** + - ASR-001 (Score 9): "Multi-region deployment requires region-specific test infrastructure" → **ACTIONABLE** (goes in 🚨 BLOCKERS) + - ASR-002 (Score 4): "OAuth 2.1 authentication already implemented in ADR-5" → **FYI** (goes in 📋 INFO ONLY or omit) + + **Structure Principle:** Actionable ASRs at TOP, FYI ASRs at BOTTOM (or omit) + 3. **Define Test Levels Strategy** + **IMPORTANT: This section goes in QA doc ONLY, NOT in Architecture doc** + Based on architecture (mobile, web, API, microservices, monolith): - Recommend unit/integration/E2E split (e.g., 70/20/10 for API-heavy, 40/30/30 for UI-heavy) - Identify test environment needs (local, staging, ephemeral, production-like) - Define testing approach per technology (Playwright for web, Maestro for mobile, k6 for performance) -4. **Assess NFR Testing Approach** + **In Architecture doc:** Only mention test level split if it's an ACTIONABLE concern + - Example: "API response time <100ms requires load testing infrastructure" (concern) + - DO NOT include full test level strategy table in Architecture doc - For each NFR category: - - **Security**: Auth/authz tests, OWASP validation, secret handling (Playwright E2E + security tools) - - **Performance**: Load/stress/spike testing with k6, SLO/SLA thresholds - - **Reliability**: Error handling, retries, circuit breakers, health checks (Playwright + API tests) +4. **Assess NFR Requirements (MINIMAL in Architecture Doc)** + + **CRITICAL: NFR testing approach is a RECIPE - belongs in QA doc ONLY** + + **In Architecture Doc:** + - Only mention NFRs if they create testability CONCERNS + - Focus on WHAT architecture must provide, not HOW to test + - Keep it brief - 1-2 sentences per NFR category at most + + **Example - Security NFR in Architecture doc (if there's a concern):** + ✅ CORRECT (concern-focused, brief, WHAT/WHY only): + - "System must prevent cross-customer data access (GDPR requirement). Requires test infrastructure for multi-tenant isolation in Sprint 0." + - "OAuth tokens must expire after 1 hour (ADR-5). Requires test harness for token expiration validation." + + ❌ INCORRECT (too detailed, belongs in QA doc): + - Full table of security test scenarios + - Test scripts with code examples + - Detailed test procedures + - Tool selection (e.g., "use Playwright E2E + OWASP ZAP") + - Specific test approaches (e.g., "Test approach: Playwright E2E for auth/authz") + + **In QA Doc (full NFR testing approach):** + - **Security**: Full test scenarios, tooling (Playwright + OWASP ZAP), test procedures + - **Performance**: Load/stress/spike test scenarios, k6 scripts, SLO thresholds + - **Reliability**: Error handling tests, retry logic validation, circuit breaker tests - **Maintainability**: Coverage targets, code quality gates, observability validation + **Rule of Thumb:** + - Architecture doc: "What NFRs exist and what concerns they create" (1-2 sentences) + - QA doc: "How to test those NFRs" (full sections with tables, code, procedures) + 5. **Flag Testability Concerns** Identify architecture decisions that harm testability: @@ -173,50 +264,216 @@ The workflow auto-detects which mode to use based on project phase. **Critical:** If testability concerns are blockers (e.g., "Architecture makes performance testing impossible"), document as CONCERNS or FAIL recommendation for gate check. -6. **Output System-Level Test Design** +6. **Output System-Level Test Design (TWO Documents)** - Write to `{output_folder}/test-design-system.md` containing: + **IMPORTANT:** System-level mode produces TWO documents instead of one: + + **Document 1: test-design-architecture.md** (for Architecture/Dev teams) + - Purpose: Architectural concerns, testability gaps, NFR requirements + - Audience: Architects, Backend Devs, Frontend Devs, DevOps, Security Engineers + - Focus: What architecture must deliver for testability + - Template: `test-design-architecture-template.md` + + **Document 2: test-design-qa.md** (for QA team) + - Purpose: Test execution recipe, coverage plan, Sprint 0 setup + - Audience: QA Engineers, Test Automation Engineers, QA Leads + - Focus: How QA will execute tests + - Template: `test-design-qa-template.md` + + **Standard Structures (REQUIRED):** + + **test-design-architecture.md sections (in this order):** + + **STRUCTURE PRINCIPLE: Actionable items FIRST, FYI items LAST** + + 1. Executive Summary (scope, business context, architecture, risk summary) + 2. Quick Guide (🚨 BLOCKERS / ⚠️ HIGH PRIORITY / 📋 INFO ONLY) + 3. Risk Assessment (high/medium/low-priority risks with scoring) - **ACTIONABLE** + 4. Testability Concerns and Architectural Gaps - **ACTIONABLE** (what arch team must do) + - Sub-section: Blockers to Fast Feedback (ACTIONABLE - concerns FIRST) + - Sub-section: Architectural Improvements Needed (ACTIONABLE) + - Sub-section: Testability Assessment Summary (FYI - passing items LAST, only if worth mentioning) + 5. Risk Mitigation Plans (detailed for high-priority risks ≥6) - **ACTIONABLE** + 6. Assumptions and Dependencies - **FYI** + + **SECTIONS THAT DO NOT BELONG IN ARCHITECTURE DOC:** + - ❌ Test Levels Strategy (unit/integration/E2E split) - This is a RECIPE, belongs in QA doc ONLY + - ❌ NFR Testing Approach with test examples - This is a RECIPE, belongs in QA doc ONLY + - ❌ Test Environment Requirements - This is a RECIPE, belongs in QA doc ONLY + - ❌ Recommendations for Sprint 0 (test framework setup, factories) - This is a RECIPE, belongs in QA doc ONLY + - ❌ Quality Gate Criteria (pass rates, coverage targets) - This is a RECIPE, belongs in QA doc ONLY + - ❌ Tool Selection (Playwright, k6, etc.) - This is a RECIPE, belongs in QA doc ONLY + + **WHAT BELONGS IN ARCHITECTURE DOC:** + - ✅ Testability CONCERNS (what makes it hard to test) + - ✅ Architecture GAPS (what's missing for testability) + - ✅ What architecture team must DO (blockers, improvements) + - ✅ Risks and mitigation plans + - ✅ ASRs (Architecturally Significant Requirements) - but clarify if FYI or actionable + + **test-design-qa.md sections (in this order):** + 1. Executive Summary (risk summary, coverage summary) + 2. **Dependencies & Test Blockers** (CRITICAL: RIGHT AFTER SUMMARY - what QA needs from other teams) + 3. Risk Assessment (scored risks with categories - reference Arch doc, don't duplicate) + 4. Test Coverage Plan (P0/P1/P2/P3 with detailed scenarios + checkboxes) + 5. **Execution Strategy** (SIMPLE: Organized by TOOL TYPE: PR (Playwright) / Nightly (k6) / Weekly (chaos/manual)) + 6. QA Effort Estimate (QA effort ONLY - no DevOps, Data Eng, Finance, Backend) + 7. Appendices (code examples with playwright-utils, tagging strategy, knowledge base refs) + + **SECTIONS TO EXCLUDE FROM QA DOC:** + - ❌ Quality Gate Criteria (pass/fail thresholds - teams decide for themselves) + - ❌ Follow-on Workflows (bloat - BMAD commands are self-explanatory) + - ❌ Approval section (unnecessary formality) + - ❌ Test Environment Requirements (remove as separate section - integrate into Dependencies if needed) + - ❌ NFR Readiness Summary (bloat - covered in Risk Assessment) + - ❌ Testability Assessment (bloat - covered in Dependencies) + - ❌ Test Levels Strategy (bloat - obvious from test scenarios) + - ❌ Sprint breakdowns (too prescriptive) + - ❌ Infrastructure/DevOps/Data Eng effort tables (out of scope) + - ❌ Mitigation plans for non-QA work (belongs in Arch doc) + + **Content Guidelines:** + + **Architecture doc (DO):** + - ✅ Risk scoring visible (Probability × Impact = Score) + - ✅ Clear ownership (each blocker/ASR has owner + timeline) + - ✅ Testability requirements (what architecture must support) + - ✅ Mitigation plans (for each high-risk item ≥6) + - ✅ Brief conceptual examples ONLY if needed to clarify architecture concerns (5-10 lines max) + - ✅ **Target length**: ~150-200 lines max (focus on actionable concerns only) + - ✅ **Professional tone**: Avoid AI slop (excessive ✅/❌ emojis, "absolutely", "excellent", overly enthusiastic language) + + **Architecture doc (DON'T) - CRITICAL:** + - ❌ NO test scripts or test implementation code AT ALL - This is a communication doc for architects, not a testing guide + - ❌ NO Playwright test examples (e.g., test('...', async ({ request }) => ...)) + - ❌ NO assertion logic (e.g., expect(...).toBe(...)) + - ❌ NO test scenario checklists with checkboxes (belongs in QA doc) + - ❌ NO implementation details about HOW QA will test + - ❌ Focus on CONCERNS, not IMPLEMENTATION + + **QA doc (DO):** + - ✅ Test scenario recipes (clear P0/P1/P2/P3 with checkboxes) + - ✅ Full test implementation code samples when helpful + - ✅ **IMPORTANT: If config.tea_use_playwright_utils is true, ALL code samples MUST use @seontechnologies/playwright-utils fixtures and utilities** + - ✅ Import test fixtures from '@seontechnologies/playwright-utils/api-request/fixtures' + - ✅ Import expect from '@playwright/test' (playwright-utils does not re-export expect) + - ✅ Use apiRequest fixture with schema validation, retry logic, and structured responses + - ✅ Dependencies & Test Blockers section RIGHT AFTER Executive Summary (what QA needs from other teams) + - ✅ **QA effort estimates ONLY** (no DevOps, Data Eng, Finance, Backend effort - out of scope) + - ✅ Cross-references to Architecture doc (not duplication) + - ✅ **Professional tone**: Avoid AI slop (excessive ✅/❌ emojis, "absolutely", "excellent", overly enthusiastic language) + + **QA doc (DON'T):** + - ❌ NO architectural theory (just reference Architecture doc) + - ❌ NO ASR explanations (link to Architecture doc instead) + - ❌ NO duplicate risk assessments (reference Architecture doc) + - ❌ NO Quality Gate Criteria section (teams decide pass/fail thresholds for themselves) + - ❌ NO Follow-on Workflows section (bloat - BMAD commands are self-explanatory) + - ❌ NO Approval section (unnecessary formality) + - ❌ NO effort estimates for other teams (DevOps, Backend, Data Eng, Finance - out of scope, QA effort only) + - ❌ NO Sprint breakdowns (too prescriptive - e.g., "Sprint 0: 40 hours, Sprint 1: 48 hours") + - ❌ NO mitigation plans for Backend/Arch/DevOps work (those belong in Architecture doc) + - ❌ NO architectural assumptions or debates (those belong in Architecture doc) + + **Anti-Patterns to Avoid (Cross-Document Redundancy):** + + **CRITICAL: NO BLOAT, NO REPETITION, NO OVERINFO** + + ❌ **DON'T duplicate OAuth requirements:** + - Architecture doc: Explain OAuth 2.1 flow in detail + - QA doc: Re-explain why OAuth 2.1 is required + + ✅ **DO cross-reference instead:** + - Architecture doc: "ASR-1: OAuth 2.1 required (see QA doc for 12 test scenarios)" + - QA doc: "OAuth tests: 12 P0 scenarios (see Architecture doc R-001 for risk details)" + + ❌ **DON'T repeat the same note 10+ times:** + - Example: "Timing is pessimistic until R-005 is fixed" repeated on every P0, P1, P2 section + - This creates bloat and makes docs hard to read + + ✅ **DO consolidate repeated information:** + - Write once at the top: "**Note**: All timing estimates are pessimistic pending R-005 resolution" + - Reference briefly if needed: "(pessimistic timing)" + + ❌ **DON'T include excessive detail that doesn't add value:** + - Long explanations of obvious concepts + - Redundant examples showing the same pattern + - Over-documentation of standard practices + + ✅ **DO focus on what's unique or critical:** + - Document only what's different from standard practice + - Highlight critical decisions and risks + - Keep explanations concise and actionable + + **Markdown Cross-Reference Syntax Examples:** ```markdown - # System-Level Test Design + # In test-design-architecture.md + + ### 🚨 R-001: Multi-Tenant Isolation (Score: 9) + + **Test Coverage:** 8 P0 tests (see [QA doc - Multi-Tenant Isolation](test-design-qa.md#multi-tenant-isolation-8-tests-security-critical) for detailed scenarios) + + --- + + # In test-design-qa.md ## Testability Assessment - - Controllability: [PASS/CONCERNS/FAIL with details] - - Observability: [PASS/CONCERNS/FAIL with details] - - Reliability: [PASS/CONCERNS/FAIL with details] + **Prerequisites from Architecture Doc:** + - [ ] R-001: Multi-tenant isolation validated (see [Architecture doc R-001](test-design-architecture.md#r-001-multi-tenant-isolation-score-9) for mitigation plan) + - [ ] R-002: Test customer provisioned (see [Architecture doc 🚨 BLOCKERS](test-design-architecture.md#blockers---team-must-decide-cant-proceed-without)) - ## Architecturally Significant Requirements (ASRs) + ## Sprint 0 Setup Requirements - [Risk-scored quality requirements] - - ## Test Levels Strategy - - - Unit: [X%] - [Rationale] - - Integration: [Y%] - [Rationale] - - E2E: [Z%] - [Rationale] - - ## NFR Testing Approach - - - Security: [Approach with tools] - - Performance: [Approach with tools] - - Reliability: [Approach with tools] - - Maintainability: [Approach with tools] - - ## Test Environment Requirements - - [Infrastructure needs based on deployment architecture] - - ## Testability Concerns (if any) - - [Blockers or concerns that should inform solutioning gate check] - - ## Recommendations for Sprint 0 - - [Specific actions for *framework and *ci workflows] + **Source:** See [Architecture doc "Quick Guide"](test-design-architecture.md#quick-guide) for detailed mitigation plans ``` -**After System-Level Mode:** Skip to Step 4 (Generate Deliverables) - Steps 2-3 are epic-level only. + **Key Points:** + - Use relative links: `[Link Text](test-design-qa.md#section-anchor)` + - Anchor format: lowercase, hyphens for spaces, remove emojis/special chars + - Example anchor: `### 🚨 R-001: Title` → `#r-001-title` + + ❌ **DON'T put long code examples in Architecture doc:** + - Example: 50+ lines of test implementation + + ✅ **DO keep examples SHORT in Architecture doc:** + - Example: 5-10 lines max showing what architecture must support + - Full implementation goes in QA doc + + ❌ **DON'T repeat same note 10+ times:** + - Example: "Pessimistic timing until R-005 fixed" on every P0/P1/P2 section + + ✅ **DO consolidate repeated notes:** + - Single timing note at top + - Reference briefly throughout: "(pessimistic)" + + **Write Both Documents:** + - Use `test-design-architecture-template.md` for Architecture doc + - Use `test-design-qa-template.md` for QA doc + - Follow standard structures defined above + - Cross-reference between docs (no duplication) + - Validate against checklist.md (System-Level Mode section) + +**Common Over-Engineering to Avoid:** + + **In QA Doc:** + 1. ❌ Quality gate thresholds ("P0 must be 100%, P1 ≥95%") - Let teams decide for themselves + 2. ❌ Effort estimates for other teams - QA doc should only estimate QA effort + 3. ❌ Sprint breakdowns ("Sprint 0: 40 hours, Sprint 1: 48 hours") - Too prescriptive + 4. ❌ Approval sections - Unnecessary formality + 5. ❌ Assumptions about architecture (SLO targets, replication lag) - These are architectural concerns, belong in Arch doc + 6. ❌ Mitigation plans for Backend/Arch/DevOps - Those belong in Arch doc + 7. ❌ Follow-on workflows section - Bloat, BMAD commands are self-explanatory + 8. ❌ NFR Readiness Summary - Bloat, covered in Risk Assessment + + **Test Coverage Numbers Reality Check:** + - With Playwright parallelization, running ALL Playwright tests is as fast as running just P0 + - Don't split Playwright tests by priority into different CI gates - it adds no value + - Tool type matters, not priority labels + - Defer based on infrastructure cost, not importance + +**After System-Level Mode:** Workflow COMPLETE. System-level outputs (test-design-architecture.md + test-design-qa.md) are written in this step. Steps 2-4 are epic-level only - do NOT execute them in system-level mode. --- @@ -426,12 +683,51 @@ The workflow auto-detects which mode to use based on project phase. 8. **Plan Mitigations** + **CRITICAL: Mitigation placement depends on WHO does the work** + For each high-priority risk: - Define mitigation strategy - Assign owner (dev, QA, ops) - Set timeline - Update residual risk expectation + **Mitigation Plan Placement:** + + **Architecture Doc:** + - Mitigations owned by Backend, DevOps, Architecture, Security, Data Eng + - Example: "Add authorization layer for customer-scoped access" (Backend work) + - Example: "Configure AWS Fault Injection Simulator" (DevOps work) + - Example: "Define CloudWatch log schema for backfill events" (Architecture work) + + **QA Doc:** + - Mitigations owned by QA (test development work) + - Example: "Create factories for test data with randomization" (QA work) + - Example: "Implement polling with retry for async validation" (QA test code) + - Brief reference to Architecture doc mitigations (don't duplicate) + + **Rule of Thumb:** + - If mitigation requires production code changes → Architecture doc + - If mitigation is test infrastructure/code → QA doc + - If mitigation involves multiple teams → Architecture doc with QA validation approach + + **Assumptions Placement:** + + **Architecture Doc:** + - Architectural assumptions (SLO targets, replication lag, system design assumptions) + - Example: "P95 <500ms inferred from <2s timeout (requires Product approval)" + - Example: "Multi-region replication lag <1s assumed (ADR doesn't specify SLA)" + - Example: "Recent Cache hit ratio >80% assumed (not in PRD/ADR)" + + **QA Doc:** + - Test execution assumptions (test infrastructure readiness, test data availability) + - Example: "Assumes test factories already created" + - Example: "Assumes CI/CD pipeline configured" + - Brief reference to Architecture doc for architectural assumptions + + **Rule of Thumb:** + - If assumption is about system architecture/design → Architecture doc + - If assumption is about test infrastructure/execution → QA doc + --- ## Step 3: Design Test Coverage @@ -480,6 +776,8 @@ The workflow auto-detects which mode to use based on project phase. 3. **Assign Priority Levels** + **CRITICAL: P0/P1/P2/P3 indicates priority and risk level, NOT execution timing** + **Knowledge Base Reference**: `test-priorities-matrix.md` **P0 (Critical)**: @@ -487,25 +785,28 @@ The workflow auto-detects which mode to use based on project phase. - High-risk areas (score ≥6) - Revenue-impacting - Security-critical - - **Run on every commit** + - No workaround exists + - Affects majority of users **P1 (High)**: - Important user features - Medium-risk areas (score 3-4) - Common workflows - - **Run on PR to main** + - Workaround exists but difficult **P2 (Medium)**: - Secondary features - Low-risk areas (score 1-2) - Edge cases - - **Run nightly or weekly** + - Regression prevention **P3 (Low)**: - Nice-to-have - Exploratory - Performance benchmarks - - **Run on-demand** + - Documentation validation + + **NOTE:** Priority classification is separate from execution timing. A P1 test might run in PRs if it's fast, or nightly if it requires expensive infrastructure (e.g., k6 performance test). See "Execution Strategy" section for timing guidance. 4. **Outline Data and Tooling Prerequisites** @@ -515,13 +816,55 @@ The workflow auto-detects which mode to use based on project phase. - Environment setup - Tools and dependencies -5. **Define Execution Order** +5. **Define Execution Strategy** (Keep It Simple) - Recommend test execution sequence: - 1. **Smoke tests** (P0 subset, <5 min) - 2. **P0 tests** (critical paths, <10 min) - 3. **P1 tests** (important features, <30 min) - 4. **P2/P3 tests** (full regression, <60 min) + **IMPORTANT: Avoid over-engineering execution order** + + **Default Philosophy:** + - Run **everything** in PRs if total duration <15 minutes + - Playwright is fast with parallelization (100s of tests in ~10-15 min) + - Only defer to nightly/weekly if there's significant overhead: + - Performance tests (k6, load testing) - expensive infrastructure + - Chaos engineering - requires special setup (AWS FIS) + - Long-running tests - endurance (4+ hours), disaster recovery + - Manual tests - require human intervention + + **Simple Execution Strategy (Organized by TOOL TYPE):** + + ```markdown + ## Execution Strategy + + **Philosophy**: Run everything in PRs unless significant infrastructure overhead. + Playwright with parallelization is extremely fast (100s of tests in ~10-15 min). + + **Organized by TOOL TYPE:** + + ### Every PR: Playwright Tests (~10-15 min) + All functional tests (from any priority level): + - All E2E, API, integration, unit tests using Playwright + - Parallelized across {N} shards + - Total: ~{N} tests (includes P0, P1, P2, P3) + + ### Nightly: k6 Performance Tests (~30-60 min) + All performance tests (from any priority level): + - Load, stress, spike, endurance + - Reason: Expensive infrastructure, long-running (10-40 min per test) + + ### Weekly: Chaos & Long-Running (~hours) + Special infrastructure tests (from any priority level): + - Multi-region failover, disaster recovery, endurance + - Reason: Very expensive, very long (4+ hours) + ``` + + **KEY INSIGHT: Organize by TOOL TYPE, not priority** + - Playwright (fast, cheap) → PR + - k6 (expensive, long) → Nightly + - Chaos/Manual (very expensive, very long) → Weekly + + **Avoid:** + - ❌ Don't organize by priority (smoke → P0 → P1 → P2 → P3) + - ❌ Don't say "P1 runs on PR to main" (some P1 are Playwright/PR, some are k6/Nightly) + - ❌ Don't create artificial tiers - organize by tool type and infrastructure overhead --- @@ -547,34 +890,66 @@ The workflow auto-detects which mode to use based on project phase. | Login flow | E2E | P0 | R-001 | 3 | QA | ``` -3. **Document Execution Order** +3. **Document Execution Strategy** (Simple, Not Redundant) + + **IMPORTANT: Keep execution strategy simple and avoid redundancy** ```markdown - ### Smoke Tests (<5 min) + ## Execution Strategy - - Login successful - - Dashboard loads + **Default: Run all functional tests in PRs (~10-15 min)** + - All Playwright tests (parallelized across 4 shards) + - Includes E2E, API, integration, unit tests + - Total: ~{N} tests - ### P0 Tests (<10 min) + **Nightly: Performance & Infrastructure tests** + - k6 load/stress/spike tests (~30-60 min) + - Reason: Expensive infrastructure, long-running - - [Full P0 list] - - ### P1 Tests (<30 min) - - - [Full P1 list] + **Weekly: Chaos & Disaster Recovery** + - Endurance tests (4+ hours) + - Multi-region failover (requires AWS FIS) + - Backup restore validation + - Reason: Special infrastructure, very long-running ``` + **DO NOT:** + - ❌ Create redundant smoke/P0/P1/P2/P3 tier structure + - ❌ List all tests again in execution order (already in coverage plan) + - ❌ Split tests by priority unless there's infrastructure overhead + 4. **Include Resource Estimates** + **IMPORTANT: Use intervals/ranges, not exact numbers** + + Provide rough estimates with intervals to avoid false precision: + ```markdown ### Test Effort Estimates - - P0 scenarios: 15 tests × 2 hours = 30 hours - - P1 scenarios: 25 tests × 1 hour = 25 hours - - P2 scenarios: 40 tests × 0.5 hour = 20 hours - - **Total:** 75 hours (~10 days) + - P0 scenarios: 15 tests (~1.5-2.5 hours each) = **~25-40 hours** + - P1 scenarios: 25 tests (~0.75-1.5 hours each) = **~20-35 hours** + - P2 scenarios: 40 tests (~0.25-0.75 hours each) = **~10-30 hours** + - **Total:** **~55-105 hours** (~1.5-3 weeks with 1 QA engineer) ``` + **Why intervals:** + - Avoids false precision (estimates are never exact) + - Provides flexibility for complexity variations + - Accounts for unknowns and dependencies + - More realistic and less prescriptive + + **Guidelines:** + - P0 tests: 1.5-2.5 hours each (complex setup, security, performance) + - P1 tests: 0.75-1.5 hours each (standard integration, API tests) + - P2 tests: 0.25-0.75 hours each (edge cases, simple validation) + - P3 tests: 0.1-0.5 hours each (exploratory, documentation) + + **Express totals as:** + - Hour ranges: "~55-105 hours" + - Week ranges: "~1.5-3 weeks" + - Avoid: Exact numbers like "75 hours" or "11 days" + 5. **Add Gate Criteria** ```markdown diff --git a/src/bmm/workflows/testarch/test-design/test-design-architecture-template.md b/src/bmm/workflows/testarch/test-design/test-design-architecture-template.md new file mode 100644 index 00000000..571f6f20 --- /dev/null +++ b/src/bmm/workflows/testarch/test-design/test-design-architecture-template.md @@ -0,0 +1,213 @@ +# Test Design for Architecture: {Feature Name} + +**Purpose:** Architectural concerns, testability gaps, and NFR requirements for review by Architecture/Dev teams. Serves as a contract between QA and Engineering on what must be addressed before test development begins. + +**Date:** {date} +**Author:** {author} +**Status:** Architecture Review Pending +**Project:** {project_name} +**PRD Reference:** {prd_link} +**ADR Reference:** {adr_link} + +--- + +## Executive Summary + +**Scope:** {Brief description of feature scope} + +**Business Context** (from PRD): +- **Revenue/Impact:** {Business metrics if applicable} +- **Problem:** {Problem being solved} +- **GA Launch:** {Target date or timeline} + +**Architecture** (from ADR {adr_number}): +- **Key Decision 1:** {e.g., OAuth 2.1 authentication} +- **Key Decision 2:** {e.g., Centralized MCP Server pattern} +- **Key Decision 3:** {e.g., Stack: TypeScript, SDK v1.x} + +**Expected Scale** (from ADR): +- {RPS, volume, users, etc.} + +**Risk Summary:** +- **Total risks**: {N} +- **High-priority (≥6)**: {N} risks requiring immediate mitigation +- **Test effort**: ~{N} tests (~{X} weeks for 1 QA, ~{Y} weeks for 2 QAs) + +--- + +## Quick Guide + +### 🚨 BLOCKERS - Team Must Decide (Can't Proceed Without) + +**Sprint 0 Critical Path** - These MUST be completed before QA can write integration tests: + +1. **{Blocker ID}: {Blocker Title}** - {What architecture must provide} (recommended owner: {Team/Role}) +2. **{Blocker ID}: {Blocker Title}** - {What architecture must provide} (recommended owner: {Team/Role}) +3. **{Blocker ID}: {Blocker Title}** - {What architecture must provide} (recommended owner: {Team/Role}) + +**What we need from team:** Complete these {N} items in Sprint 0 or test development is blocked. + +--- + +### ⚠️ HIGH PRIORITY - Team Should Validate (We Provide Recommendation, You Approve) + +1. **{Risk ID}: {Title}** - {Recommendation + who should approve} (Sprint {N}) +2. **{Risk ID}: {Title}** - {Recommendation + who should approve} (Sprint {N}) +3. **{Risk ID}: {Title}** - {Recommendation + who should approve} (Sprint {N}) + +**What we need from team:** Review recommendations and approve (or suggest changes). + +--- + +### 📋 INFO ONLY - Solutions Provided (Review, No Decisions Needed) + +1. **Test strategy**: {Test level split} ({Rationale}) +2. **Tooling**: {Test frameworks and utilities} +3. **Tiered CI/CD**: {Execution tiers with timing} +4. **Coverage**: ~{N} test scenarios prioritized P0-P3 with risk-based classification +5. **Quality gates**: {Pass criteria} + +**What we need from team:** Just review and acknowledge (we already have the solution). + +--- + +## For Architects and Devs - Open Topics 👷 + +### Risk Assessment + +**Total risks identified**: {N} ({X} high-priority score ≥6, {Y} medium, {Z} low) + +#### High-Priority Risks (Score ≥6) - IMMEDIATE ATTENTION + +| Risk ID | Category | Description | Probability | Impact | Score | Mitigation | Owner | Timeline | +|---------|----------|-------------|-------------|--------|-------|------------|-------|----------| +| **{R-ID}** | **{CAT}** | {Description} | {1-3} | {1-3} | **{Score}** | {Mitigation strategy} | {Owner} | {Date} | + +#### Medium-Priority Risks (Score 3-5) + +| Risk ID | Category | Description | Probability | Impact | Score | Mitigation | Owner | +|---------|----------|-------------|-------------|--------|-------|------------|-------| +| {R-ID} | {CAT} | {Description} | {1-3} | {1-3} | {Score} | {Mitigation} | {Owner} | + +#### Low-Priority Risks (Score 1-2) + +| Risk ID | Category | Description | Probability | Impact | Score | Action | +|---------|----------|-------------|-------------|--------|-------|--------| +| {R-ID} | {CAT} | {Description} | {1-3} | {1-3} | {Score} | Monitor | + +#### Risk Category Legend + +- **TECH**: Technical/Architecture (flaws, integration, scalability) +- **SEC**: Security (access controls, auth, data exposure) +- **PERF**: Performance (SLA violations, degradation, resource limits) +- **DATA**: Data Integrity (loss, corruption, inconsistency) +- **BUS**: Business Impact (UX harm, logic errors, revenue) +- **OPS**: Operations (deployment, config, monitoring) + +--- + +### Testability Concerns and Architectural Gaps + +**🚨 ACTIONABLE CONCERNS - Architecture Team Must Address** + +{If system has critical testability concerns, list them here. If architecture supports testing well, state "No critical testability concerns identified" and skip to Testability Assessment Summary} + +#### 1. Blockers to Fast Feedback (WHAT WE NEED FROM ARCHITECTURE) + +| Concern | Impact | What Architecture Must Provide | Owner | Timeline | +|---------|--------|--------------------------------|-------|----------| +| **{Concern name}** | {Impact on testing} | {Specific architectural change needed} | {Team} | {Sprint} | + +**Example:** +- **No API for test data seeding** → Cannot parallelize tests → Provide POST /test/seed endpoint (Backend, Sprint 0) + +#### 2. Architectural Improvements Needed (WHAT SHOULD BE CHANGED) + +{List specific improvements that would make the system more testable} + +1. **{Improvement name}** + - **Current problem**: {What's wrong} + - **Required change**: {What architecture must do} + - **Impact if not fixed**: {Consequences} + - **Owner**: {Team} + - **Timeline**: {Sprint} + +--- + +### Testability Assessment Summary + +**📊 CURRENT STATE - FYI** + +{Only include this section if there are passing items worth mentioning. Otherwise omit.} + +#### What Works Well + +- ✅ {Passing item 1} (e.g., "API-first design supports parallel test execution") +- ✅ {Passing item 2} (e.g., "Feature flags enable test isolation") +- ✅ {Passing item 3} + +#### Accepted Trade-offs (No Action Required) + +For {Feature} Phase 1, the following trade-offs are acceptable: +- **{Trade-off 1}** - {Why acceptable for now} +- **{Trade-off 2}** - {Why acceptable for now} + +{This is technical debt OR acceptable for Phase 1} that {should be revisited post-GA OR maintained as-is} + +--- + +### Risk Mitigation Plans (High-Priority Risks ≥6) + +**Purpose**: Detailed mitigation strategies for all {N} high-priority risks (score ≥6). These risks MUST be addressed before {GA launch date or milestone}. + +#### {R-ID}: {Risk Description} (Score: {Score}) - {CRITICALITY LEVEL} + +**Mitigation Strategy:** +1. {Step 1} +2. {Step 2} +3. {Step 3} + +**Owner:** {Owner} +**Timeline:** {Sprint or date} +**Status:** Planned / In Progress / Complete +**Verification:** {How to verify mitigation is effective} + +--- + +{Repeat for all high-priority risks} + +--- + +### Assumptions and Dependencies + +#### Assumptions + +1. {Assumption about architecture or requirements} +2. {Assumption about team or timeline} +3. {Assumption about scope or constraints} + +#### Dependencies + +1. {Dependency} - Required by {date/sprint} +2. {Dependency} - Required by {date/sprint} + +#### Risks to Plan + +- **Risk**: {Risk to the test plan itself} + - **Impact**: {How it affects testing} + - **Contingency**: {Backup plan} + +--- + +**End of Architecture Document** + +**Next Steps for Architecture Team:** +1. Review Quick Guide (🚨/⚠️/📋) and prioritize blockers +2. Assign owners and timelines for high-priority risks (≥6) +3. Validate assumptions and dependencies +4. Provide feedback to QA on testability gaps + +**Next Steps for QA Team:** +1. Wait for Sprint 0 blockers to be resolved +2. Refer to companion QA doc (test-design-qa.md) for test scenarios +3. Begin test infrastructure setup (factories, fixtures, environments) diff --git a/src/bmm/workflows/testarch/test-design/test-design-qa-template.md b/src/bmm/workflows/testarch/test-design/test-design-qa-template.md new file mode 100644 index 00000000..037856b7 --- /dev/null +++ b/src/bmm/workflows/testarch/test-design/test-design-qa-template.md @@ -0,0 +1,286 @@ +# Test Design for QA: {Feature Name} + +**Purpose:** Test execution recipe for QA team. Defines what to test, how to test it, and what QA needs from other teams. + +**Date:** {date} +**Author:** {author} +**Status:** Draft +**Project:** {project_name} + +**Related:** See Architecture doc (test-design-architecture.md) for testability concerns and architectural blockers. + +--- + +## Executive Summary + +**Scope:** {Brief description of testing scope} + +**Risk Summary:** +- Total Risks: {N} ({X} high-priority score ≥6, {Y} medium, {Z} low) +- Critical Categories: {Categories with most high-priority risks} + +**Coverage Summary:** +- P0 tests: ~{N} (critical paths, security) +- P1 tests: ~{N} (important features, integration) +- P2 tests: ~{N} (edge cases, regression) +- P3 tests: ~{N} (exploratory, benchmarks) +- **Total**: ~{N} tests (~{X}-{Y} weeks with 1 QA) + +--- + +## Dependencies & Test Blockers + +**CRITICAL:** QA cannot proceed without these items from other teams. + +### Backend/Architecture Dependencies (Sprint 0) + +**Source:** See Architecture doc "Quick Guide" for detailed mitigation plans + +1. **{Dependency 1}** - {Team} - {Timeline} + - {What QA needs} + - {Why it blocks testing} + +2. **{Dependency 2}** - {Team} - {Timeline} + - {What QA needs} + - {Why it blocks testing} + +### QA Infrastructure Setup (Sprint 0) + +1. **Test Data Factories** - QA + - {Entity} factory with faker-based randomization + - Auto-cleanup fixtures for parallel safety + +2. **Test Environments** - QA + - Local: {Setup details} + - CI/CD: {Setup details} + - Staging: {Setup details} + +**Example factory pattern:** + +```typescript +import { test } from '@seontechnologies/playwright-utils/api-request/fixtures'; +import { expect } from '@playwright/test'; +import { faker } from '@faker-js/faker'; + +test('example test @p0', async ({ apiRequest }) => { + const testData = { + id: `test-${faker.string.uuid()}`, + email: faker.internet.email(), + }; + + const { status } = await apiRequest({ + method: 'POST', + path: '/api/resource', + body: testData, + }); + + expect(status).toBe(201); +}); +``` + +--- + +## Risk Assessment + +**Note:** Full risk details in Architecture doc. This section summarizes risks relevant to QA test planning. + +### High-Priority Risks (Score ≥6) + +| Risk ID | Category | Description | Score | QA Test Coverage | +|---------|----------|-------------|-------|------------------| +| **{R-ID}** | {CAT} | {Brief description} | **{Score}** | {How QA validates this risk} | + +### Medium/Low-Priority Risks + +| Risk ID | Category | Description | Score | QA Test Coverage | +|---------|----------|-------------|-------|------------------| +| {R-ID} | {CAT} | {Brief description} | {Score} | {How QA validates this risk} | + +--- + +## Test Coverage Plan + +**IMPORTANT:** P0/P1/P2/P3 = **priority and risk level** (what to focus on if time-constrained), NOT execution timing. See "Execution Strategy" for when tests run. + +### P0 (Critical) + +**Criteria:** Blocks core functionality + High risk (≥6) + No workaround + Affects majority of users + +| Test ID | Requirement | Test Level | Risk Link | Notes | +|---------|-------------|------------|-----------|-------| +| **P0-001** | {Requirement} | {Level} | {R-ID} | {Notes} | +| **P0-002** | {Requirement} | {Level} | {R-ID} | {Notes} | + +**Total P0:** ~{N} tests + +--- + +### P1 (High) + +**Criteria:** Important features + Medium risk (3-4) + Common workflows + Workaround exists but difficult + +| Test ID | Requirement | Test Level | Risk Link | Notes | +|---------|-------------|------------|-----------|-------| +| **P1-001** | {Requirement} | {Level} | {R-ID} | {Notes} | +| **P1-002** | {Requirement} | {Level} | {R-ID} | {Notes} | + +**Total P1:** ~{N} tests + +--- + +### P2 (Medium) + +**Criteria:** Secondary features + Low risk (1-2) + Edge cases + Regression prevention + +| Test ID | Requirement | Test Level | Risk Link | Notes | +|---------|-------------|------------|-----------|-------| +| **P2-001** | {Requirement} | {Level} | {R-ID} | {Notes} | + +**Total P2:** ~{N} tests + +--- + +### P3 (Low) + +**Criteria:** Nice-to-have + Exploratory + Performance benchmarks + Documentation validation + +| Test ID | Requirement | Test Level | Notes | +|---------|-------------|------------|-------| +| **P3-001** | {Requirement} | {Level} | {Notes} | + +**Total P3:** ~{N} tests + +--- + +## Execution Strategy + +**Philosophy:** Run everything in PRs unless there's significant infrastructure overhead. Playwright with parallelization is extremely fast (100s of tests in ~10-15 min). + +**Organized by TOOL TYPE:** + +### Every PR: Playwright Tests (~10-15 min) + +**All functional tests** (from any priority level): +- All E2E, API, integration, unit tests using Playwright +- Parallelized across {N} shards +- Total: ~{N} Playwright tests (includes P0, P1, P2, P3) + +**Why run in PRs:** Fast feedback, no expensive infrastructure + +### Nightly: k6 Performance Tests (~30-60 min) + +**All performance tests** (from any priority level): +- Load, stress, spike, endurance tests +- Total: ~{N} k6 tests (may include P0, P1, P2) + +**Why defer to nightly:** Expensive infrastructure (k6 Cloud), long-running (10-40 min per test) + +### Weekly: Chaos & Long-Running (~hours) + +**Special infrastructure tests** (from any priority level): +- Multi-region failover (requires AWS Fault Injection Simulator) +- Disaster recovery (backup restore, 4+ hours) +- Endurance tests (4+ hours runtime) + +**Why defer to weekly:** Very expensive infrastructure, very long-running, infrequent validation sufficient + +**Manual tests** (excluded from automation): +- DevOps validation (deployment, monitoring) +- Finance validation (cost alerts) +- Documentation validation + +--- + +## QA Effort Estimate + +**QA test development effort only** (excludes DevOps, Backend, Data Eng, Finance work): + +| Priority | Count | Effort Range | Notes | +|----------|-------|--------------|-------| +| P0 | ~{N} | ~{X}-{Y} weeks | Complex setup (security, performance, multi-step) | +| P1 | ~{N} | ~{X}-{Y} weeks | Standard coverage (integration, API tests) | +| P2 | ~{N} | ~{X}-{Y} days | Edge cases, simple validation | +| P3 | ~{N} | ~{X}-{Y} days | Exploratory, benchmarks | +| **Total** | ~{N} | **~{X}-{Y} weeks** | **1 QA engineer, full-time** | + +**Assumptions:** +- Includes test design, implementation, debugging, CI integration +- Excludes ongoing maintenance (~10% effort) +- Assumes test infrastructure (factories, fixtures) ready + +**Dependencies from other teams:** +- See "Dependencies & Test Blockers" section for what QA needs from Backend, DevOps, Data Eng + +--- + +## Appendix A: Code Examples & Tagging + +**Playwright Tags for Selective Execution:** + +```typescript +import { test } from '@seontechnologies/playwright-utils/api-request/fixtures'; +import { expect } from '@playwright/test'; + +// P0 critical test +test('@P0 @API @Security unauthenticated request returns 401', async ({ apiRequest }) => { + const { status, body } = await apiRequest({ + method: 'POST', + path: '/api/endpoint', + body: { data: 'test' }, + skipAuth: true, + }); + + expect(status).toBe(401); + expect(body.error).toContain('unauthorized'); +}); + +// P1 integration test +test('@P1 @Integration data syncs correctly', async ({ apiRequest }) => { + // Seed data + await apiRequest({ + method: 'POST', + path: '/api/seed', + body: { /* test data */ }, + }); + + // Validate + const { status, body } = await apiRequest({ + method: 'GET', + path: '/api/resource', + }); + + expect(status).toBe(200); + expect(body).toHaveProperty('data'); +}); +``` + +**Run specific tags:** + +```bash +# Run only P0 tests +npx playwright test --grep @P0 + +# Run P0 + P1 tests +npx playwright test --grep "@P0|@P1" + +# Run only security tests +npx playwright test --grep @Security + +# Run all Playwright tests in PR (default) +npx playwright test +``` + +--- + +## Appendix B: Knowledge Base References + +- **Risk Governance**: `risk-governance.md` - Risk scoring methodology +- **Test Priorities Matrix**: `test-priorities-matrix.md` - P0-P3 criteria +- **Test Levels Framework**: `test-levels-framework.md` - E2E vs API vs Unit selection +- **Test Quality**: `test-quality.md` - Definition of Done (no hard waits, <300 lines, <1.5 min) + +--- + +**Generated by:** BMad TEA Agent +**Workflow:** `_bmad/bmm/testarch/test-design` +**Version:** 4.0 (BMad v6) diff --git a/src/bmm/workflows/testarch/test-design/workflow.yaml b/src/bmm/workflows/testarch/test-design/workflow.yaml index b5fbd661..961eff34 100644 --- a/src/bmm/workflows/testarch/test-design/workflow.yaml +++ b/src/bmm/workflows/testarch/test-design/workflow.yaml @@ -15,6 +15,9 @@ date: system-generated installed_path: "{project-root}/_bmad/bmm/workflows/testarch/test-design" instructions: "{installed_path}/instructions.md" validation: "{installed_path}/checklist.md" +# Note: Template selection is mode-based (see instructions.md Step 1.5): +# - System-level: test-design-architecture-template.md + test-design-qa-template.md +# - Epic-level: test-design-template.md (unchanged) template: "{installed_path}/test-design-template.md" # Variables and inputs @@ -26,13 +29,25 @@ variables: # Note: Actual output file determined dynamically based on mode detection # Declared outputs for new workflow format outputs: - - id: system-level - description: "System-level testability review (Phase 3)" - path: "{output_folder}/test-design-system.md" + # System-Level Mode (Phase 3) - TWO documents + - id: test-design-architecture + description: "System-level test architecture: Architectural concerns, testability gaps, NFR requirements for Architecture/Dev teams" + path: "{output_folder}/test-design-architecture.md" + mode: system-level + audience: architecture + + - id: test-design-qa + description: "System-level test design: Test execution recipe, coverage plan, Sprint 0 setup for QA team" + path: "{output_folder}/test-design-qa.md" + mode: system-level + audience: qa + + # Epic-Level Mode (Phase 4) - ONE document (unchanged) - id: epic-level description: "Epic-level test plan (Phase 4)" path: "{output_folder}/test-design-epic-{epic_num}.md" -default_output_file: "{output_folder}/test-design-epic-{epic_num}.md" + mode: epic-level +# Note: No default_output_file - mode detection determines which outputs to write # Required tools required_tools: diff --git a/src/core/agents/bmad-master.agent.yaml b/src/core/agents/bmad-master.agent.yaml index 50debe2c..66e9d37f 100644 --- a/src/core/agents/bmad-master.agent.yaml +++ b/src/core/agents/bmad-master.agent.yaml @@ -17,8 +17,7 @@ agent: - "Load resources at runtime never pre-load, and always present numbered lists for choices." critical_actions: - - "Load into memory {project-root}/_bmad/core/config.yaml and set variable project_name, output_folder, user_name, communication_language" - - "ALWAYS communicate in {communication_language}" + - "Always greet the user and let them know they can use `/bmad-help` at any time to get advice on what to do next, and they can combine that with what they need help with `/bmad-help where should I start with an idea I have that does XYZ`" menu: - trigger: "LT or fuzzy match on list-tasks" diff --git a/src/core/module-help.csv b/src/core/module-help.csv index fc45dcfb..206f1cd3 100644 --- a/src/core/module-help.csv +++ b/src/core/module-help.csv @@ -1,11 +1,9 @@ module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs -core,,Advanced Elicitation,AE,10,_bmad/core/workflows/advanced-elicitation/workflow.xml,bmad:advanced-elicitation,false,,,"Apply elicitation methods iteratively to enhance content being generated, presenting options and allowing reshuffle or full method listing for comprehensive content improvement",, -core,,Brainstorming,BS,20,_bmad/core/workflows/brainstorming/workflow.md,bmad:brainstorming,false,analyst,,Facilitate interactive brainstorming sessions using diverse creative techniques and ideation methods,{output_folder}/brainstorming/brainstorming-session-{{date}}.md,, -core,,Party Mode,PM,30,_bmad/core/workflows/party-mode/workflow.md,bmad:party-mode,false,party-mode facilitator,,Orchestrates group discussions between all installed BMAD agents enabling natural multi-agent conversations,, -core,,bmad-help,BH,40,_bmad/core/tasks/bmad-help.md,bmad:help,false,system,,Get unstuck by showing what workflow steps come next or answering questions about what to do in the BMad Method,, -core,,Index Docs,ID,50,_bmad/core/tasks/index-docs.xml,bmad:index-docs,false,llm,,Generates or updates an index.md of all documents in the specified directory,, -core,,Execute Workflow,WF,60,_bmad/core/tasks/workflow.xml,bmad:workflow,false,llm,,Execute given workflow by loading its configuration following instructions and producing output,, -core,,Shard Document,SD,70,_bmad/core/tasks/shard-doc.xml,bmad:shard-doc,false,llm,,Splits large markdown documents into smaller organized files based on level 2 sections,, -core,,Editorial Review - Prose,EP,80,_bmad/core/tasks/editorial-review-prose.xml,bmad:editorial-review-prose,false,llm,reader_type,Clinical copy-editor that reviews text for communication issues,,"three-column markdown table with suggested fixes", -core,,Editorial Review - Structure,ES,90,_bmad/core/tasks/editorial-review-structure.xml,bmad:editorial-review-structure,false,llm,,Structural editor that proposes cuts reorganization and simplification while preserving comprehension,, -core,,Adversarial Review (General),AR,100,_bmad/core/tasks/review-adversarial-general.xml,bmad:review-adversarial-general,false,llm,,Cynically review content and produce findings,, +core,,Brainstorming,BS,20,_bmad/core/workflows/brainstorming/workflow.md,bmad-brainstorming,false,analyst,,Facilitate interactive brainstorming sessions using diverse creative techniques and ideation methods,{output_folder}/brainstorming/brainstorming-session-{{date}}.md,, +core,,Party Mode,PM,30,_bmad/core/workflows/party-mode/workflow.md,bmad-party-mode,false,party-mode facilitator,,Orchestrates group discussions between all installed BMAD agents enabling natural multi-agent conversations,, +core,,bmad-help,BH,40,_bmad/core/tasks/help.md,bmad-help,false,,,Get unstuck by showing what workflow steps come next or answering questions about what to do in the BMad Method,, +core,,Index Docs,ID,50,_bmad/core/tasks/index-docs.xml,bmad-index-docs,false,,,Generates or updates an index.md of all documents in the specified directory,, +core,,Shard Document,SD,70,_bmad/core/tasks/shard-doc.xml,bmad-shard-doc,false,,,Splits large markdown documents into smaller organized files based on level 2 sections,, +core,,Editorial Review - Prose,EP,80,_bmad/core/tasks/editorial-review-prose.xml,bmad-editorial-review-prose,false,,,Clinical copy-editor that reviews text for communication issues,,"three-column markdown table with suggested fixes", +core,,Editorial Review - Structure,ES,90,_bmad/core/tasks/editorial-review-structure.xml,bmad-editorial-review-structure,false,,,Structural editor that proposes cuts reorganization and simplification while preserving comprehension,, +core,,Adversarial Review (General),AR,100,_bmad/core/tasks/review-adversarial-general.xml,bmad-review-adversarial-general,false,,,Cynically review content and produce findings,, diff --git a/src/core/tasks/editorial-review-prose.xml b/src/core/tasks/editorial-review-prose.xml index f6714b43..7ef28f90 100644 --- a/src/core/tasks/editorial-review-prose.xml +++ b/src/core/tasks/editorial-review-prose.xml @@ -1,12 +1,16 @@ + standalone="true"> Review text for communication issues that impede comprehension and output suggested fixes in a three-column table + @@ -32,7 +36,11 @@ No conflicts: Merge overlapping fixes into single entries Respect author voice: Preserve intentional stylistic choices - + STYLE GUIDE OVERRIDE: If a style_guide input is provided, + it overrides ALL generic principles in this task (including the Microsoft + Writing Style Guide baseline and reader_type-specific priorities). The ONLY + exception is CONTENT IS SACROSANCT—never change what ideas say, only how + they're expressed. When style guide conflicts with this task, style guide wins. @@ -54,6 +62,7 @@ + Consult style_guide now and note its key requirements—these override default principles for this review Review all prose sections (skip code blocks, frontmatter, structural markup) Identify communication issues that impede comprehension For each issue, determine the minimal fix that achieves clarity diff --git a/src/core/tasks/editorial-review-structure.xml b/src/core/tasks/editorial-review-structure.xml index 26ef400a..aac169ee 100644 --- a/src/core/tasks/editorial-review-structure.xml +++ b/src/core/tasks/editorial-review-structure.xml @@ -5,12 +5,16 @@ name="Editorial Review - Structure" description="Structural editor that proposes cuts, reorganization, and simplification while preserving comprehension" - standalone="false"> + standalone="true"> Review document structure and propose substantive changes to improve clarity and flow-run this BEFORE copy editing + @@ -41,6 +45,12 @@ Propose, don't execute: Output recommendations-user decides what to accept CONTENT IS SACROSANCT: Never challenge ideas—only optimize how they're organized. + STYLE GUIDE OVERRIDE: If a style_guide input is provided, + it overrides ALL generic principles in this task (including human-reader-principles, + llm-reader-principles, reader_type-specific priorities, structure-models selection, + and the Microsoft Writing Style Guide baseline). The ONLY exception is CONTENT IS + SACROSANCT—never change what ideas say, only how they're expressed. When style + guide conflicts with this task, style guide wins. These elements serve human comprehension and engagement-preserve unless clearly wasteful: Visual aids: Diagrams, images, and flowcharts anchor understanding @@ -122,6 +132,7 @@ Note reader_type and which principles apply (human-reader-principles or llm-reader-principles) + Consult style_guide now and note its key requirements—these override default principles for this analysis Map the document structure: list each major section with its word count Evaluate structure against the selected model's primary rules (e.g., 'Does recommendation come first?' for Pyramid) diff --git a/src/core/tasks/bmad-help.md b/src/core/tasks/help.md similarity index 99% rename from src/core/tasks/bmad-help.md rename to src/core/tasks/help.md index 9d7f947c..3df95fd5 100644 --- a/src/core/tasks/bmad-help.md +++ b/src/core/tasks/help.md @@ -1,5 +1,5 @@ --- -name: bmad-help +name: help description: Get unstuck by showing what workflow steps come next or answering questions about what to do standalone: true --- diff --git a/src/core/tasks/review-adversarial-general.xml b/src/core/tasks/review-adversarial-general.xml index 4e68ff9a..0ebe5cdf 100644 --- a/src/core/tasks/review-adversarial-general.xml +++ b/src/core/tasks/review-adversarial-general.xml @@ -1,11 +1,13 @@ - + Cynically review content and produce findings + diff --git a/src/core/tasks/workflow.xml b/src/core/tasks/workflow.xml index 09f5d04a..137b6dd5 100644 --- a/src/core/tasks/workflow.xml +++ b/src/core/tasks/workflow.xml @@ -1,4 +1,4 @@ - + Execute given workflow by loading its configuration, following instructions, and producing output diff --git a/src/core/workflows/brainstorming/workflow.md b/src/core/workflows/brainstorming/workflow.md index 9ba92d61..3190c983 100644 --- a/src/core/workflows/brainstorming/workflow.md +++ b/src/core/workflows/brainstorming/workflow.md @@ -53,6 +53,6 @@ Load config from `{project-root}/_bmad/core/config.yaml` and resolve: ## EXECUTION -Load and execute `steps/step-01-session-setup.md` to begin the workflow. +Read fully and follow: `steps/step-01-session-setup.md` to begin the workflow. **Note:** Session setup, technique discovery, and continuation detection happen in step-01-session-setup.md. diff --git a/src/core/workflows/party-mode/steps/step-02-discussion-orchestration.md b/src/core/workflows/party-mode/steps/step-02-discussion-orchestration.md index f328a410..361c1937 100644 --- a/src/core/workflows/party-mode/steps/step-02-discussion-orchestration.md +++ b/src/core/workflows/party-mode/steps/step-02-discussion-orchestration.md @@ -136,7 +136,7 @@ Check for exit conditions before continuing: #### If 'E' (Exit Party Mode): -- Load read and execute: `./step-03-graceful-exit.md` +- Read fully and follow: `./step-03-graceful-exit.md` ## SUCCESS METRICS: diff --git a/src/utility/agent-components/activation-steps.txt b/src/utility/agent-components/activation-steps.txt index 860be6a7..24def0af 100644 --- a/src/utility/agent-components/activation-steps.txt +++ b/src/utility/agent-components/activation-steps.txt @@ -8,6 +8,7 @@ Remember: user's name is {user_name} {AGENT_SPECIFIC_STEPS} Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of ALL menu items from menu section + -Let {user_name} know they can type command `/bmad-help` at any time to get advice on what to do next, and that they can combine that with what they need help with `/bmad-help where should I start with an idea I have that does XYZ` STOP and WAIT for user input - do NOT execute menu items automatically - accept number or cmd trigger or fuzzy command match - On user input: Number → execute menu item[n] | Text → case-insensitive substring match | Multiple matches → ask user to clarify | No match → show "Not recognized" - When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions \ No newline at end of file + On user input: Number → process menu item[n] | Text → case-insensitive substring match | Multiple matches → ask user to clarify | No match → show "Not recognized" + When processing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions \ No newline at end of file diff --git a/src/utility/agent-components/handler-action.txt b/src/utility/agent-components/handler-action.txt index 21dd31e1..db31f485 100644 --- a/src/utility/agent-components/handler-action.txt +++ b/src/utility/agent-components/handler-action.txt @@ -1,4 +1,4 @@ - When menu item has: action="#id" → Find prompt with id="id" in current agent XML, execute its content - When menu item has: action="text" → Execute the text directly as an inline instruction + When menu item has: action="#id" → Find prompt with id="id" in current agent XML, follow its content + When menu item has: action="text" → Follow the text directly as an inline instruction \ No newline at end of file diff --git a/src/utility/agent-components/handler-exec.txt b/src/utility/agent-components/handler-exec.txt index 5dbc1368..1c8459a6 100644 --- a/src/utility/agent-components/handler-exec.txt +++ b/src/utility/agent-components/handler-exec.txt @@ -1,6 +1,6 @@ When menu item or handler has: exec="path/to/file.md": - 1. Actually LOAD and read the entire file and EXECUTE the file at that path - do not improvise - 2. Read the complete file and follow all instructions within it + 1. Read fully and follow the file at that path + 2. Process the complete file and follow all instructions within it 3. If there is data="some/path/data-foo.md" with the same item, pass that data path to the executed file as context. \ No newline at end of file diff --git a/src/utility/agent-components/handler-multi.txt b/src/utility/agent-components/handler-multi.txt index 7c8f535a..f33a73fe 100644 --- a/src/utility/agent-components/handler-multi.txt +++ b/src/utility/agent-components/handler-multi.txt @@ -4,7 +4,7 @@ 2. Parse all nested handlers within the multi item 3. For each nested handler: - Use the 'match' attribute for fuzzy matching user input (or Exact Match of character code in brackets []) - - Execute based on handler attributes (exec, workflow, action) + - Process based on handler attributes (exec, workflow, action) 4. When user input matches a handler's 'match' pattern: - For exec="path/to/file.md": follow the `handler type="exec"` instructions - For workflow="path/to/workflow.yaml": follow the `handler type="workflow"` instructions diff --git a/src/utility/agent-components/handler-workflow.txt b/src/utility/agent-components/handler-workflow.txt index 84c0d9ea..1be1dcbe 100644 --- a/src/utility/agent-components/handler-workflow.txt +++ b/src/utility/agent-components/handler-workflow.txt @@ -1,10 +1,10 @@ When menu item has: workflow="path/to/workflow.yaml": - + 1. CRITICAL: Always LOAD {project-root}/_bmad/core/tasks/workflow.xml - 2. Read the complete file - this is the CORE OS for executing BMAD workflows + 2. Read the complete file - this is the CORE OS for processing BMAD workflows 3. Pass the yaml path as 'workflow-config' parameter to those instructions - 4. Execute workflow.xml instructions precisely following all steps + 4. Follow workflow.xml instructions precisely following all steps 5. Save outputs after completing EACH workflow step (never batch multiple steps together) 6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet \ No newline at end of file diff --git a/test/adversarial-review-tests/README.md b/test/adversarial-review-tests/README.md new file mode 100644 index 00000000..8d2af507 --- /dev/null +++ b/test/adversarial-review-tests/README.md @@ -0,0 +1,56 @@ +# Adversarial Review Test Suite + +Tests for the `also_consider` optional input in `review-adversarial-general.xml`. + +## Purpose + +Evaluate whether the `also_consider` input gently nudges the reviewer toward specific areas without overriding normal adversarial analysis. + +## Test Content + +All tests use `sample-content.md` - a deliberately imperfect User Authentication API doc with: + +- Vague error handling section +- Missing rate limit details +- No token expiration info +- Password in plain text example +- Missing authentication headers +- No error response examples + +## Running Tests + +For each test case in `test-cases.yaml`, invoke the adversarial review task. + +### Manual Test Invocation + +``` +Review this content using the adversarial review task: + + +[paste sample-content.md] + + + +[paste items from test case, or omit for TC01] + +``` + +## Evaluation Criteria + +For each test, note: + +1. **Total findings** - Still hitting ~10 issues? +2. **Distribution** - Are findings spread across concerns or clustered? +3. **Relevance** - Do findings relate to `also_consider` items when provided? +4. **Balance** - Are `also_consider` findings elevated over others, or naturally mixed? +5. **Quality** - Are findings actionable regardless of source? + +## Expected Outcomes + +- **TC01 (baseline)**: Generic spread of findings +- **TC02-TC05 (domain-focused)**: Some findings align with domain, others still organic +- **TC06 (single item)**: Light influence, not dominant +- **TC07 (vague items)**: Minimal change from baseline +- **TC08 (specific items)**: Direct answers if gaps exist +- **TC09 (mixed)**: Balanced across domains +- **TC10 (contradictory)**: Graceful handling diff --git a/test/adversarial-review-tests/sample-content.md b/test/adversarial-review-tests/sample-content.md new file mode 100644 index 00000000..a821096d --- /dev/null +++ b/test/adversarial-review-tests/sample-content.md @@ -0,0 +1,46 @@ +# User Authentication API + +## Overview + +This API provides endpoints for user authentication and session management. + +## Endpoints + +### POST /api/auth/login + +Authenticates a user and returns a token. + +**Request Body:** +```json +{ + "email": "user@example.com", + "password": "password123" +} +``` + +**Response:** +```json +{ + "token": "eyJhbGciOiJIUzI1NiIs...", + "user": { + "id": 1, + "email": "user@example.com" + } +} +``` + +### POST /api/auth/logout + +Logs out the current user. + +### GET /api/auth/me + +Returns the current user's profile. + +## Error Handling + +Errors return appropriate HTTP status codes. + +## Rate Limiting + +Rate limiting is applied to prevent abuse. diff --git a/test/adversarial-review-tests/test-cases.yaml b/test/adversarial-review-tests/test-cases.yaml new file mode 100644 index 00000000..7f20e84f --- /dev/null +++ b/test/adversarial-review-tests/test-cases.yaml @@ -0,0 +1,103 @@ +# Test Cases for review-adversarial-general.xml with also_consider input +# +# Purpose: Evaluate how the optional also_consider input influences review findings +# Content: All tests use sample-content.md (User Authentication API docs) +# +# To run: Manually invoke the task with each configuration and compare outputs + +test_cases: + # BASELINE - No also_consider + - id: TC01 + name: "Baseline - no also_consider" + description: "Control test with no also_consider input" + also_consider: null + expected_behavior: "Generic adversarial findings across all aspects" + + # DOCUMENTATION-FOCUSED + - id: TC02 + name: "Documentation - reader confusion" + description: "Nudge toward documentation UX issues" + also_consider: + - What would confuse a first-time reader? + - What questions are left unanswered? + - What could be interpreted multiple ways? + - What jargon is unexplained? + expected_behavior: "More findings about clarity, completeness, reader experience" + + - id: TC03 + name: "Documentation - examples and usage" + description: "Nudge toward practical usage gaps" + also_consider: + - Missing code examples + - Unclear usage patterns + - Edge cases not documented + expected_behavior: "More findings about practical application gaps" + + # SECURITY-FOCUSED + - id: TC04 + name: "Security review" + description: "Nudge toward security concerns" + also_consider: + - Authentication vulnerabilities + - Token handling issues + - Input validation gaps + - Information disclosure risks + expected_behavior: "More security-related findings" + + # API DESIGN-FOCUSED + - id: TC05 + name: "API design" + description: "Nudge toward API design best practices" + also_consider: + - REST conventions not followed + - Inconsistent response formats + - Missing pagination or filtering + - Versioning concerns + expected_behavior: "More API design pattern findings" + + # SINGLE ITEM + - id: TC06 + name: "Single item - error handling" + description: "Test with just one also_consider item" + also_consider: + - Error handling completeness + expected_behavior: "Some emphasis on error handling while still covering other areas" + + # BROAD/VAGUE + - id: TC07 + name: "Broad items" + description: "Test with vague also_consider items" + also_consider: + - Quality issues + - Things that seem off + expected_behavior: "Minimal change from baseline - items too vague to steer" + + # VERY SPECIFIC + - id: TC08 + name: "Very specific items" + description: "Test with highly specific also_consider items" + also_consider: + - Is the JWT token expiration documented? + - Are refresh token mechanics explained? + - What happens on concurrent sessions? + expected_behavior: "Specific findings addressing these exact questions if gaps exist" + + # MIXED DOMAINS + - id: TC09 + name: "Mixed domain concerns" + description: "Test with items from different domains" + also_consider: + - Security vulnerabilities + - Reader confusion points + - API design inconsistencies + - Performance implications + expected_behavior: "Balanced findings across multiple domains" + + # CONTRADICTORY/UNUSUAL + - id: TC10 + name: "Contradictory items" + description: "Test resilience with odd inputs" + also_consider: + - Things that are too detailed + - Things that are not detailed enough + expected_behavior: "Reviewer handles gracefully, finds issues in both directions" diff --git a/test/fixtures/agent-schema/valid/menu-triggers/kebab-case-triggers.agent.yaml b/test/fixtures/agent-schema/valid/menu-triggers/kebab-case-triggers.agent.yaml index 06184350..cfae4fde 100644 --- a/test/fixtures/agent-schema/valid/menu-triggers/kebab-case-triggers.agent.yaml +++ b/test/fixtures/agent-schema/valid/menu-triggers/kebab-case-triggers.agent.yaml @@ -23,7 +23,7 @@ agent: - trigger: list-tasks description: Two word trigger action: list_tasks - - trigger: workflow-init-process + - trigger: three-word-process description: Three word trigger action: init_workflow - trigger: test123 diff --git a/tools/cli/commands/status.js b/tools/cli/commands/status.js new file mode 100644 index 00000000..5df2cfac --- /dev/null +++ b/tools/cli/commands/status.js @@ -0,0 +1,65 @@ +const chalk = require('chalk'); +const path = require('node:path'); +const { Installer } = require('../installers/lib/core/installer'); +const { Manifest } = require('../installers/lib/core/manifest'); +const { UI } = require('../lib/ui'); + +const installer = new Installer(); +const manifest = new Manifest(); +const ui = new UI(); + +module.exports = { + command: 'status', + description: 'Display BMAD installation status and module versions', + options: [], + action: async (options) => { + try { + // Find the bmad directory + const projectDir = process.cwd(); + const { bmadDir } = await installer.findBmadDir(projectDir); + + // Check if bmad directory exists + const fs = require('fs-extra'); + if (!(await fs.pathExists(bmadDir))) { + console.log(chalk.yellow('No BMAD installation found in the current directory.')); + console.log(chalk.dim(`Expected location: ${bmadDir}`)); + console.log(chalk.dim('\nRun "bmad install" to set up a new installation.')); + process.exit(0); + return; + } + + // Read manifest + const manifestData = await manifest._readRaw(bmadDir); + + if (!manifestData) { + console.log(chalk.yellow('No BMAD installation manifest found.')); + console.log(chalk.dim('\nRun "bmad install" to set up a new installation.')); + process.exit(0); + return; + } + + // Get installation info + const installation = manifestData.installation || {}; + const modules = manifestData.modules || []; + + // Check for available updates (only for external modules) + const availableUpdates = await manifest.checkForUpdates(bmadDir); + + // Display status + ui.displayStatus({ + installation, + modules, + availableUpdates, + bmadDir, + }); + + process.exit(0); + } catch (error) { + console.error(chalk.red('Status check failed:'), error.message); + if (process.env.BMAD_DEBUG) { + console.error(chalk.dim(error.stack)); + } + process.exit(1); + } + }, +}; diff --git a/tools/cli/external-official-modules.yaml b/tools/cli/external-official-modules.yaml index b476cb5f..c48f7175 100644 --- a/tools/cli/external-official-modules.yaml +++ b/tools/cli/external-official-modules.yaml @@ -10,6 +10,7 @@ modules: description: "Agent, Workflow and Module Builder" defaultSelected: false type: bmad-org + npmPackage: bmad-builder bmad-creative-intelligence-suite: url: https://github.com/bmad-code-org/bmad-module-creative-intelligence-suite @@ -19,6 +20,7 @@ modules: description: "Creative tools for writing, brainstorming, and more" defaultSelected: false type: bmad-org + npmPackage: bmad-creative-intelligence-suite bmad-game-dev-studio: url: https://github.com/bmad-code-org/bmad-module-game-dev-studio.git @@ -28,6 +30,7 @@ modules: description: "Game development agents and workflows" defaultSelected: false type: bmad-org + npmPackage: bmad-game-dev-studio # TODO: Enable once fixes applied: diff --git a/tools/cli/installers/install-messages.yaml b/tools/cli/installers/install-messages.yaml index 860b8352..d9f40b0d 100644 --- a/tools/cli/installers/install-messages.yaml +++ b/tools/cli/installers/install-messages.yaml @@ -6,24 +6,24 @@ startMessage: | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ⭐ IMPORTANT: Version Alpha.23 Changes + 🎉 BETA IS HERE! Welcome to BMad Method V6 Beta! - If your current version is older than Alpha.21, you'll need a fresh install: - - Remove .bmad folder and reinstall - - Only needed during final push to beta (ETA January 18th) + We've officially graduated from Alpha! This milestone represents: + - 50+ workflows covering the full development lifecycle + - Stability - we will still be adding and evolving and optimizing, + but anticipate no massive breaking changes + - Groundwork in place for customization and community modules 📚 New Docs Site: http://docs.bmad-method.org/ - - Tons of guides and articles coming soon! + - High quality tutorials, guided walkthrough, and articles coming soon! - Everything is free. No paywalls. No gated content. - Knowledge should be shared, not sold. - 📺 YouTube Master Class & Podcast launching February 1st! - 💡 Love BMad? Please star us on GitHub & subscribe on YouTube! - GitHub: https://github.com/bmad-code-org/BMAD-METHOD/ - YouTube: https://www.youtube.com/@BMadCode - Latest updates: https://github.com/bmad-code-org/BMAD-METHOD/blob/main/CHANGELOG.md + Latest updates: https://github.com/bmad-code-org/BMAD-METHOD/CHANGELOG.md ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ @@ -31,13 +31,14 @@ startMessage: | endMessage: | ════════════════════════════════════════════════════════════════════════════════ - ✨ BMAD IS READY! Beta is just days away! Thank you for your support! + ✨ BMAD V6 BETA IS INSTALLED! Thank you for being part of this journey! 🌟 BMad is 100% free and open source. - No gated Discord. No paywalls. - We believe in empowering everyone, not just those who can pay. 🙏 SUPPORT BMAD DEVELOPMENT: + - During the Beta, please give us feedback and raise issues on GitHub! - Donate: https://buymeacoffee.com/bmad - Corporate Sponsorship available - DM on Discord @@ -48,7 +49,7 @@ endMessage: | 📚 RESOURCES: - Docs: http://docs.bmad-method.org/ (bookmark it!) - - Changelog: https://github.com/bmad-code-org/BMAD-METHOD/blob/main/CHANGELOG.md + - Changelog: https://github.com/bmad-code-org/BMAD-METHOD/CHANGELOG.md ⭐⭐⭐ HELP US GROW: - Star us on GitHub: https://github.com/bmad-code-org/BMAD-METHOD/ diff --git a/tools/cli/installers/lib/core/installer.js b/tools/cli/installers/lib/core/installer.js index 9089775d..a14c3d19 100644 --- a/tools/cli/installers/lib/core/installer.js +++ b/tools/cli/installers/lib/core/installer.js @@ -161,56 +161,39 @@ class Installer { } if (!toolConfig.skipIde && toolConfig.ides && toolConfig.ides.length > 0) { + // Ensure IDE manager is initialized + await this.ideManager.ensureInitialized(); + // Determine which IDEs are newly selected (not previously configured) const newlySelectedIdes = toolConfig.ides.filter((ide) => !previouslyConfiguredIdes.includes(ide)); if (newlySelectedIdes.length > 0) { console.log('\n'); // Add spacing before IDE questions + // Collect configuration for IDEs that support it for (const ide of newlySelectedIdes) { - // List of IDEs that have interactive prompts - //TODO: Why is this here, hardcoding this list here is bad, fix me! - const needsPrompts = ['claude-code', 'github-copilot', 'roo', 'cline', 'auggie', 'codex', 'qwen', 'gemini', 'rovo-dev'].includes( - ide, - ); + try { + const handler = this.ideManager.handlers.get(ide); - if (needsPrompts) { - // Get IDE handler and collect configuration - try { - // Dynamically load the IDE setup module - const ideModule = require(`../ide/${ide}`); - - // Get the setup class (handle different export formats) - let SetupClass; - const className = - ide - .split('-') - .map((part) => part.charAt(0).toUpperCase() + part.slice(1)) - .join('') + 'Setup'; - - if (ideModule[className]) { - SetupClass = ideModule[className]; - } else if (ideModule.default) { - SetupClass = ideModule.default; - } else { - continue; - } - - const ideSetup = new SetupClass(); - - // Check if this IDE has a collectConfiguration method - if (typeof ideSetup.collectConfiguration === 'function') { - console.log(chalk.cyan(`\nConfiguring ${ide}...`)); - ideConfigurations[ide] = await ideSetup.collectConfiguration({ - selectedModules: selectedModules || [], - projectDir, - bmadDir, - }); - } - } catch { - // IDE doesn't have a setup file or collectConfiguration method - console.warn(chalk.yellow(`Warning: Could not load configuration for ${ide}`)); + if (!handler) { + console.warn(chalk.yellow(`Warning: IDE '${ide}' handler not found`)); + continue; } + + // Check if this IDE handler has a collectConfiguration method + // (custom installers like Codex, Kilo, Kiro-cli may have this) + if (typeof handler.collectConfiguration === 'function') { + console.log(chalk.cyan(`\nConfiguring ${ide}...`)); + ideConfigurations[ide] = await handler.collectConfiguration({ + selectedModules: selectedModules || [], + projectDir, + bmadDir, + }); + } + // Most config-driven IDEs don't need configuration - silently skip + } catch (error) { + // IDE doesn't support configuration or has an error + console.warn(chalk.yellow(`Warning: Could not load configuration for ${ide}: ${error.message}`)); } } } @@ -1016,6 +999,9 @@ class Installer { // Configure IDEs and copy documentation if (!config.skipIde && config.ides && config.ides.length > 0) { + // Ensure IDE manager is initialized (handlers may not be loaded in quick update flow) + await this.ideManager.ensureInitialized(); + // Filter out any undefined/null values from the IDE list const validIdes = config.ides.filter((ide) => ide && typeof ide === 'string'); diff --git a/tools/cli/installers/lib/core/manifest-generator.js b/tools/cli/installers/lib/core/manifest-generator.js index 5aff792a..100164d5 100644 --- a/tools/cli/installers/lib/core/manifest-generator.js +++ b/tools/cli/installers/lib/core/manifest-generator.js @@ -534,18 +534,71 @@ class ManifestGenerator { /** * Write main manifest as YAML with installation info only + * Fetches fresh version info for all modules * @returns {string} Path to the manifest file */ async writeMainManifest(cfgDir) { const manifestPath = path.join(cfgDir, 'manifest.yaml'); + // Read existing manifest to preserve install date + let existingInstallDate = null; + const existingModulesMap = new Map(); + + if (await fs.pathExists(manifestPath)) { + try { + const existingContent = await fs.readFile(manifestPath, 'utf8'); + const existingManifest = yaml.parse(existingContent); + + // Preserve original install date + if (existingManifest.installation?.installDate) { + existingInstallDate = existingManifest.installation.installDate; + } + + // Build map of existing modules for quick lookup + if (existingManifest.modules && Array.isArray(existingManifest.modules)) { + for (const m of existingManifest.modules) { + if (typeof m === 'object' && m.name) { + existingModulesMap.set(m.name, m); + } else if (typeof m === 'string') { + existingModulesMap.set(m, { installDate: existingInstallDate }); + } + } + } + } catch { + // If we can't read existing manifest, continue with defaults + } + } + + // Fetch fresh version info for all modules + const { Manifest } = require('./manifest'); + const manifestObj = new Manifest(); + const updatedModules = []; + + for (const moduleName of this.modules) { + // Get fresh version info from source + const versionInfo = await manifestObj.getModuleVersionInfo(moduleName, this.bmadDir); + + // Get existing install date if available + const existing = existingModulesMap.get(moduleName); + + updatedModules.push({ + name: moduleName, + version: versionInfo.version, + installDate: existing?.installDate || new Date().toISOString(), + lastUpdated: new Date().toISOString(), + source: versionInfo.source, + npmPackage: versionInfo.npmPackage, + repoUrl: versionInfo.repoUrl, + }); + } + const manifest = { installation: { version: packageJson.version, - installDate: new Date().toISOString(), + installDate: existingInstallDate || new Date().toISOString(), lastUpdated: new Date().toISOString(), }, - modules: this.modules, // Include ALL modules (standard and custom) + modules: updatedModules, ides: this.selectedIdes, }; diff --git a/tools/cli/installers/lib/core/manifest.js b/tools/cli/installers/lib/core/manifest.js index 643a945c..209399d1 100644 --- a/tools/cli/installers/lib/core/manifest.js +++ b/tools/cli/installers/lib/core/manifest.js @@ -1,6 +1,7 @@ const path = require('node:path'); const fs = require('fs-extra'); const crypto = require('node:crypto'); +const { getProjectRoot } = require('../../../lib/project-root'); class Manifest { /** @@ -16,14 +17,35 @@ class Manifest { // Ensure _config directory exists await fs.ensureDir(path.dirname(manifestPath)); + // Get the BMad version from package.json + const bmadVersion = data.version || require(path.join(process.cwd(), 'package.json')).version; + + // Convert module list to new detailed format + const moduleDetails = []; + if (data.modules && Array.isArray(data.modules)) { + for (const moduleName of data.modules) { + // Core and BMM modules use the BMad version + const moduleVersion = moduleName === 'core' || moduleName === 'bmm' ? bmadVersion : null; + const now = data.installDate || new Date().toISOString(); + + moduleDetails.push({ + name: moduleName, + version: moduleVersion, + installDate: now, + lastUpdated: now, + source: moduleName === 'core' || moduleName === 'bmm' ? 'built-in' : 'unknown', + }); + } + } + // Structure the manifest data const manifestData = { installation: { - version: data.version || require(path.join(process.cwd(), 'package.json')).version, + version: bmadVersion, installDate: data.installDate || new Date().toISOString(), lastUpdated: data.lastUpdated || new Date().toISOString(), }, - modules: data.modules || [], + modules: moduleDetails, ides: data.ides || [], }; @@ -57,12 +79,23 @@ class Manifest { const content = await fs.readFile(yamlPath, 'utf8'); const manifestData = yaml.parse(content); + // Handle new detailed module format + const modules = manifestData.modules || []; + + // For backward compatibility: if modules is an array of strings (old format), + // the calling code may need the array of names + const moduleNames = modules.map((m) => (typeof m === 'string' ? m : m.name)); + + // Check if we have the new detailed format + const hasDetailedModules = modules.length > 0 && typeof modules[0] === 'object'; + // Flatten the structure for compatibility with existing code return { version: manifestData.installation?.version, installDate: manifestData.installation?.installDate, lastUpdated: manifestData.installation?.lastUpdated, - modules: manifestData.modules || [], // All modules (standard and custom) + modules: moduleNames, // Simple array of module names for backward compatibility + modulesDetailed: hasDetailedModules ? modules : null, // New detailed format customModules: manifestData.customModules || [], // Keep for backward compatibility ides: manifestData.ides || [], }; @@ -82,28 +115,92 @@ class Manifest { */ async update(bmadDir, updates, installedFiles = null) { const yaml = require('yaml'); - const manifest = (await this.read(bmadDir)) || {}; - - // Merge updates - Object.assign(manifest, updates); - manifest.lastUpdated = new Date().toISOString(); - - // Convert back to structured format for YAML - const manifestData = { - installation: { - version: manifest.version, - installDate: manifest.installDate, - lastUpdated: manifest.lastUpdated, - }, - modules: manifest.modules || [], // All modules (standard and custom) - ides: manifest.ides || [], + const manifest = (await this._readRaw(bmadDir)) || { + installation: {}, + modules: [], + ides: [], }; + // Handle module updates + if (updates.modules) { + // If modules is being updated, we need to preserve detailed module info + const existingDetailed = manifest.modules || []; + const incomingNames = updates.modules; + + // Build updated modules array + const updatedModules = []; + for (const name of incomingNames) { + const existing = existingDetailed.find((m) => m.name === name); + if (existing) { + // Preserve existing details, update lastUpdated if this module is being updated + updatedModules.push({ + ...existing, + lastUpdated: new Date().toISOString(), + }); + } else { + // New module - add with minimal details + updatedModules.push({ + name, + version: null, + installDate: new Date().toISOString(), + lastUpdated: new Date().toISOString(), + source: 'unknown', + }); + } + } + + manifest.modules = updatedModules; + } + + // Merge other updates + if (updates.version) { + manifest.installation.version = updates.version; + } + if (updates.installDate) { + manifest.installation.installDate = updates.installDate; + } + manifest.installation.lastUpdated = new Date().toISOString(); + + if (updates.ides) { + manifest.ides = updates.ides; + } + + // Handle per-module version updates + if (updates.moduleVersions) { + for (const [moduleName, versionInfo] of Object.entries(updates.moduleVersions)) { + const moduleIndex = manifest.modules.findIndex((m) => m.name === moduleName); + if (moduleIndex !== -1) { + manifest.modules[moduleIndex] = { + ...manifest.modules[moduleIndex], + ...versionInfo, + lastUpdated: new Date().toISOString(), + }; + } + } + } + + // Handle adding a new module with version info + if (updates.addModule) { + const { name, version, source, npmPackage, repoUrl } = updates.addModule; + const existing = manifest.modules.find((m) => m.name === name); + if (!existing) { + manifest.modules.push({ + name, + version: version || null, + installDate: new Date().toISOString(), + lastUpdated: new Date().toISOString(), + source: source || 'external', + npmPackage: npmPackage || null, + repoUrl: repoUrl || null, + }); + } + } + const manifestPath = path.join(bmadDir, '_config', 'manifest.yaml'); await fs.ensureDir(path.dirname(manifestPath)); // Clean the manifest data to remove any non-serializable values - const cleanManifestData = structuredClone(manifestData); + const cleanManifestData = structuredClone(manifest); const yamlContent = yaml.stringify(cleanManifestData, { indent: 2, @@ -115,16 +212,61 @@ class Manifest { const content = yamlContent.endsWith('\n') ? yamlContent : yamlContent + '\n'; await fs.writeFile(manifestPath, content, 'utf8'); - return manifest; + // Return the flattened format for compatibility + return this._flattenManifest(manifest); } /** - * Add a module to the manifest + * Read raw manifest data without flattening + * @param {string} bmadDir - Path to bmad directory + * @returns {Object|null} Raw manifest data or null if not found + */ + async _readRaw(bmadDir) { + const yamlPath = path.join(bmadDir, '_config', 'manifest.yaml'); + const yaml = require('yaml'); + + if (await fs.pathExists(yamlPath)) { + try { + const content = await fs.readFile(yamlPath, 'utf8'); + return yaml.parse(content); + } catch (error) { + console.error('Failed to read YAML manifest:', error.message); + } + } + + return null; + } + + /** + * Flatten manifest for backward compatibility + * @param {Object} manifest - Raw manifest data + * @returns {Object} Flattened manifest + */ + _flattenManifest(manifest) { + const modules = manifest.modules || []; + const moduleNames = modules.map((m) => (typeof m === 'string' ? m : m.name)); + const hasDetailedModules = modules.length > 0 && typeof modules[0] === 'object'; + + return { + version: manifest.installation?.version, + installDate: manifest.installation?.installDate, + lastUpdated: manifest.installation?.lastUpdated, + modules: moduleNames, + modulesDetailed: hasDetailedModules ? modules : null, + customModules: manifest.customModules || [], + ides: manifest.ides || [], + }; + } + + /** + * Add a module to the manifest with optional version info + * If module already exists, update its version info * @param {string} bmadDir - Path to bmad directory * @param {string} moduleName - Module name to add + * @param {Object} options - Optional version info */ - async addModule(bmadDir, moduleName) { - const manifest = await this.read(bmadDir); + async addModule(bmadDir, moduleName, options = {}) { + const manifest = await this._readRaw(bmadDir); if (!manifest) { throw new Error('No manifest found'); } @@ -133,10 +275,33 @@ class Manifest { manifest.modules = []; } - if (!manifest.modules.includes(moduleName)) { - manifest.modules.push(moduleName); - await this.update(bmadDir, { modules: manifest.modules }); + const existingIndex = manifest.modules.findIndex((m) => m.name === moduleName); + + if (existingIndex === -1) { + // Module doesn't exist, add it + manifest.modules.push({ + name: moduleName, + version: options.version || null, + installDate: new Date().toISOString(), + lastUpdated: new Date().toISOString(), + source: options.source || 'unknown', + npmPackage: options.npmPackage || null, + repoUrl: options.repoUrl || null, + }); + } else { + // Module exists, update its version info + const existing = manifest.modules[existingIndex]; + manifest.modules[existingIndex] = { + ...existing, + version: options.version === undefined ? existing.version : options.version, + source: options.source || existing.source, + npmPackage: options.npmPackage === undefined ? existing.npmPackage : options.npmPackage, + repoUrl: options.repoUrl === undefined ? existing.repoUrl : options.repoUrl, + lastUpdated: new Date().toISOString(), + }; } + + await this._writeRaw(bmadDir, manifest); } /** @@ -145,18 +310,93 @@ class Manifest { * @param {string} moduleName - Module name to remove */ async removeModule(bmadDir, moduleName) { - const manifest = await this.read(bmadDir); + const manifest = await this._readRaw(bmadDir); if (!manifest || !manifest.modules) { return; } - const index = manifest.modules.indexOf(moduleName); + const index = manifest.modules.findIndex((m) => m.name === moduleName); if (index !== -1) { manifest.modules.splice(index, 1); - await this.update(bmadDir, { modules: manifest.modules }); + await this._writeRaw(bmadDir, manifest); } } + /** + * Update a single module's version info + * @param {string} bmadDir - Path to bmad directory + * @param {string} moduleName - Module name + * @param {Object} versionInfo - Version info to update + */ + async updateModuleVersion(bmadDir, moduleName, versionInfo) { + const manifest = await this._readRaw(bmadDir); + if (!manifest || !manifest.modules) { + return; + } + + const index = manifest.modules.findIndex((m) => m.name === moduleName); + if (index !== -1) { + manifest.modules[index] = { + ...manifest.modules[index], + ...versionInfo, + lastUpdated: new Date().toISOString(), + }; + await this._writeRaw(bmadDir, manifest); + } + } + + /** + * Get version info for a specific module + * @param {string} bmadDir - Path to bmad directory + * @param {string} moduleName - Module name + * @returns {Object|null} Module version info or null + */ + async getModuleVersion(bmadDir, moduleName) { + const manifest = await this._readRaw(bmadDir); + if (!manifest || !manifest.modules) { + return null; + } + + return manifest.modules.find((m) => m.name === moduleName) || null; + } + + /** + * Get all modules with their version info + * @param {string} bmadDir - Path to bmad directory + * @returns {Array} Array of module info objects + */ + async getAllModuleVersions(bmadDir) { + const manifest = await this._readRaw(bmadDir); + if (!manifest || !manifest.modules) { + return []; + } + + return manifest.modules; + } + + /** + * Write raw manifest data to file + * @param {string} bmadDir - Path to bmad directory + * @param {Object} manifestData - Raw manifest data to write + */ + async _writeRaw(bmadDir, manifestData) { + const yaml = require('yaml'); + const manifestPath = path.join(bmadDir, '_config', 'manifest.yaml'); + + await fs.ensureDir(path.dirname(manifestPath)); + + const cleanManifestData = structuredClone(manifestData); + + const yamlContent = yaml.stringify(cleanManifestData, { + indent: 2, + lineWidth: 0, + sortKeys: false, + }); + + const content = yamlContent.endsWith('\n') ? yamlContent : yamlContent + '\n'; + await fs.writeFile(manifestPath, content, 'utf8'); + } + /** * Add an IDE configuration to the manifest * @param {string} bmadDir - Path to bmad directory @@ -585,6 +825,212 @@ class Manifest { await this.update(bmadDir, { customModules: manifest.customModules }); } } + + /** + * Get module version info from source + * @param {string} moduleName - Module name/code + * @param {string} bmadDir - Path to bmad directory + * @param {string} moduleSourcePath - Optional source path for custom modules + * @returns {Object} Version info object with version, source, npmPackage, repoUrl + */ + async getModuleVersionInfo(moduleName, bmadDir, moduleSourcePath = null) { + const os = require('node:os'); + + // Built-in modules use BMad version (only core and bmm are in BMAD-METHOD repo) + if (['core', 'bmm'].includes(moduleName)) { + const bmadVersion = require(path.join(getProjectRoot(), 'package.json')).version; + return { + version: bmadVersion, + source: 'built-in', + npmPackage: null, + repoUrl: null, + }; + } + + // Check if this is an external official module + const { ExternalModuleManager } = require('../modules/external-manager'); + const extMgr = new ExternalModuleManager(); + const moduleInfo = await extMgr.getModuleByCode(moduleName); + + if (moduleInfo) { + // External module - try to get version from npm registry first, then fall back to cache + let version = null; + + if (moduleInfo.npmPackage) { + // Fetch version from npm registry + try { + version = await this.fetchNpmVersion(moduleInfo.npmPackage); + } catch { + // npm fetch failed, try cache as fallback + } + } + + // If npm didn't work, try reading from cached repo's package.json + if (!version) { + const cacheDir = path.join(os.homedir(), '.bmad', 'cache', 'external-modules', moduleName); + const packageJsonPath = path.join(cacheDir, 'package.json'); + + if (await fs.pathExists(packageJsonPath)) { + try { + const pkg = require(packageJsonPath); + version = pkg.version; + } catch (error) { + console.warn(`Failed to read package.json for ${moduleName}: ${error.message}`); + } + } + } + + return { + version: version, + source: 'external', + npmPackage: moduleInfo.npmPackage || null, + repoUrl: moduleInfo.url || null, + }; + } + + // Custom module - check cache directory + const cacheDir = path.join(bmadDir, '_config', 'custom', moduleName); + const moduleYamlPath = path.join(cacheDir, 'module.yaml'); + + if (await fs.pathExists(moduleYamlPath)) { + try { + const yamlContent = await fs.readFile(moduleYamlPath, 'utf8'); + const moduleConfig = yaml.parse(yamlContent); + return { + version: moduleConfig.version || null, + source: 'custom', + npmPackage: moduleConfig.npmPackage || null, + repoUrl: moduleConfig.repoUrl || null, + }; + } catch (error) { + console.warn(`Failed to read module.yaml for ${moduleName}: ${error.message}`); + } + } + + // Unknown module + return { + version: null, + source: 'unknown', + npmPackage: null, + repoUrl: null, + }; + } + + /** + * Fetch latest version from npm for a package + * @param {string} packageName - npm package name + * @returns {string|null} Latest version or null + */ + async fetchNpmVersion(packageName) { + try { + const https = require('node:https'); + const { execSync } = require('node:child_process'); + + // Try using npm view first (more reliable) + try { + const result = execSync(`npm view ${packageName} version`, { + encoding: 'utf8', + stdio: 'pipe', + timeout: 10_000, + }); + return result.trim(); + } catch { + // Fallback to npm registry API + return new Promise((resolve, reject) => { + https + .get(`https://registry.npmjs.org/${packageName}`, (res) => { + let data = ''; + res.on('data', (chunk) => (data += chunk)); + res.on('end', () => { + try { + const pkg = JSON.parse(data); + resolve(pkg['dist-tags']?.latest || pkg.version || null); + } catch { + resolve(null); + } + }); + }) + .on('error', () => resolve(null)); + }); + } + } catch { + return null; + } + } + + /** + * Check for available updates for installed modules + * @param {string} bmadDir - Path to bmad directory + * @returns {Array} Array of update info objects + */ + async checkForUpdates(bmadDir) { + const modules = await this.getAllModuleVersions(bmadDir); + const updates = []; + + for (const module of modules) { + if (!module.npmPackage) { + continue; // Skip modules without npm package (built-in) + } + + const latestVersion = await this.fetchNpmVersion(module.npmPackage); + if (!latestVersion) { + continue; + } + + if (module.version !== latestVersion) { + updates.push({ + name: module.name, + installedVersion: module.version, + latestVersion: latestVersion, + npmPackage: module.npmPackage, + updateAvailable: true, + }); + } + } + + return updates; + } + + /** + * Compare two semantic versions + * @param {string} v1 - First version + * @param {string} v2 - Second version + * @returns {number} -1 if v1 < v2, 0 if v1 == v2, 1 if v1 > v2 + */ + compareVersions(v1, v2) { + if (!v1 || !v2) return 0; + + const normalize = (v) => { + // Remove leading 'v' if present + v = v.replace(/^v/, ''); + // Handle prerelease tags + const parts = v.split('-'); + const main = parts[0].split('.'); + const prerelease = parts[1]; + return { main, prerelease }; + }; + + const n1 = normalize(v1); + const n2 = normalize(v2); + + // Compare main version parts + for (let i = 0; i < 3; i++) { + const num1 = parseInt(n1.main[i] || '0', 10); + const num2 = parseInt(n2.main[i] || '0', 10); + if (num1 !== num2) { + return num1 < num2 ? -1 : 1; + } + } + + // If main versions are equal, compare prerelease + if (n1.prerelease && n2.prerelease) { + return n1.prerelease < n2.prerelease ? -1 : n1.prerelease > n2.prerelease ? 1 : 0; + } + if (n1.prerelease) return -1; // Prerelease is older than stable + if (n2.prerelease) return 1; // Stable is newer than prerelease + + return 0; + } } module.exports = { Manifest }; diff --git a/tools/cli/installers/lib/ide/STANDARDIZATION_PLAN.md b/tools/cli/installers/lib/ide/STANDARDIZATION_PLAN.md deleted file mode 100644 index 4af15755..00000000 --- a/tools/cli/installers/lib/ide/STANDARDIZATION_PLAN.md +++ /dev/null @@ -1,234 +0,0 @@ -# IDE Installer Standardization Plan - -## Overview - -Standardize IDE installers to use **flat file naming** and centralize duplicated code in shared utilities. - -**Key Rule: Only folder-based IDEs convert to colon format. IDEs already using dashes keep using dashes.** - -## Current State Analysis - -### File Structure Patterns - -| IDE | Current Pattern | Path Format | -|-----|-----------------|-------------| -| **claude-code** | Hierarchical | `.claude/commands/bmad/{module}/agents/{name}.md` | -| **cursor** | Hierarchical | `.cursor/commands/bmad/{module}/agents/{name}.md` | -| **crush** | Hierarchical | `.crush/commands/bmad/{module}/agents/{name}.md` | -| **antigravity** | Flattened (dashes) | `.agent/workflows/bmad-module-agents-name.md` | -| **codex** | Flattened (dashes) | `~/.codex/prompts/bmad-module-agents-name.md` | -| **cline** | Flattened (dashes) | `.clinerules/workflows/bmad-module-type-name.md` | -| **roo** | Flattened (dashes) | `.roo/commands/bmad-{module}-agent-{name}.md` | -| **auggie** | Hybrid | `.augment/commands/bmad/agents/{module}-{name}.md` | -| **iflow** | Hybrid | `.iflow/commands/bmad/agents/{module}-{name}.md` | -| **trae** | Different (rules) | `.trae/rules/bmad-agent-{module}-{name}.md` | -| **github-copilot** | Different (agents) | `.github/agents/bmd-custom-{module}-{name}.agent.md` | - -### Shared Generators (in `/shared`) - -1. `agent-command-generator.js` - generates agent launchers -2. `task-tool-command-generator.js` - generates task/tool commands -3. `workflow-command-generator.js` - generates workflow commands - -All currently create artifacts with **nested relative paths** like `{module}/agents/{name}.md` - -### Code Duplication Issues - -1. **Flattening logic** duplicated in multiple IDEs -2. **Agent launcher content creation** duplicated -3. **Path transformation** duplicated - -## Target Standardization - -### For Folder-Based IDEs (convert to colon format) - -**IDEs affected:** claude-code, cursor, crush - -``` -Format: bmad:{module}:{type}:{name}.md - -Examples: -- Agent: bmad:bmm:agents:pm.md -- Agent: bmad:core:agents:dev.md -- Workflow: bmad:bmm:workflows:correct-course.md -- Task: bmad:bmm:tasks:bmad-help.md -- Tool: bmad:core:tools:code-review.md -- Custom: bmad:custom:agents:fred-commit-poet.md -``` - -### For Already-Flat IDEs (keep using dashes) - -**IDEs affected:** antigravity, codex, cline, roo - -``` -Format: bmad-{module}-{type}-{name}.md - -Examples: -- Agent: bmad-bmm-agents-pm.md -- Workflow: bmad-bmm-workflows-correct-course.md -- Task: bmad-bmm-tasks-bmad-help.md -- Custom: bmad-custom-agents-fred-commit-poet.md -``` - -### For Hybrid IDEs (keep as-is) - -**IDEs affected:** auggie, iflow - -These use `{module}-{name}.md` format within subdirectories - keep as-is. - -### Skip (drastically different) - -**IDEs affected:** trae, github-copilot - -## Implementation Plan - -### Phase 1: Create Shared Utility - -**File:** `shared/path-utils.js` - -```javascript -/** - * Convert hierarchical path to flat colon-separated name (for folder-based IDEs) - * @param {string} module - Module name (e.g., 'bmm', 'core') - * @param {string} type - Artifact type ('agents', 'workflows', 'tasks', 'tools') - * @param {string} name - Artifact name (e.g., 'pm', 'correct-course') - * @returns {string} Flat filename like 'bmad:bmm:agents:pm.md' - */ -function toColonName(module, type, name) { - return `bmad:${module}:${type}:${name}.md`; -} - -/** - * Convert relative path to flat colon-separated name (for folder-based IDEs) - * @param {string} relativePath - Path like 'bmm/agents/pm.md' - * @returns {string} Flat filename like 'bmad:bmm:agents:pm.md' - */ -function toColonPath(relativePath) { - const withoutExt = relativePath.replace('.md', ''); - const parts = withoutExt.split(/[\/\\]/); - return `bmad:${parts.join(':')}.md`; -} - -/** - * Convert hierarchical path to flat dash-separated name (for flat IDEs) - * @param {string} relativePath - Path like 'bmm/agents/pm.md' - * @returns {string} Flat filename like 'bmad-bmm-agents-pm.md' - */ -function toDashPath(relativePath) { - const withoutExt = relativePath.replace('.md', ''); - const parts = withoutExt.split(/[\/\\]/); - return `bmad-${parts.join('-')}.md`; -} - -/** - * Create custom agent colon name - * @param {string} agentName - Custom agent name - * @returns {string} Flat filename like 'bmad:custom:agents:fred-commit-poet.md' - */ -function customAgentColonName(agentName) { - return `bmad:custom:agents:${agentName}.md`; -} - -/** - * Create custom agent dash name - * @param {string} agentName - Custom agent name - * @returns {string} Flat filename like 'bmad-custom-agents-fred-commit-poet.md' - */ -function customAgentDashName(agentName) { - return `bmad-custom-agents-${agentName}.md`; -} - -module.exports = { - toColonName, - toColonPath, - toDashPath, - customAgentColonName, - customAgentDashName, -}; -``` - -### Phase 2: Update Shared Generators - -**Files to modify:** -- `shared/agent-command-generator.js` -- `shared/task-tool-command-generator.js` -- `shared/workflow-command-generator.js` - -**Changes:** -1. Import path utilities -2. Change `relativePath` to use flat format -3. Add method `writeColonArtifacts()` for folder-based IDEs -4. Add method `writeDashArtifacts()` for flat IDEs - -### Phase 3: Update Folder-Based IDEs - -**Files to modify:** -- `claude-code.js` -- `cursor.js` -- `crush.js` - -**Changes:** -1. Import `toColonPath`, `customAgentColonName` from path-utils -2. Change from hierarchical to flat colon naming -3. Update cleanup to handle flat structure - -### Phase 4: Update Flat IDEs - -**Files to modify:** -- `antigravity.js` -- `codex.js` -- `cline.js` -- `roo.js` - -**Changes:** -1. Import `toDashPath`, `customAgentDashName` from path-utils -2. Replace local `flattenFilename()` with shared `toDashPath()` - -### Phase 5: Update Base Class - -**File:** `_base-ide.js` - -**Changes:** -1. Mark `flattenFilename()` as `@deprecated` -2. Add comment pointing to new path-utils - -## Migration Checklist - -### New Files -- [ ] Create `shared/path-utils.js` - -### Folder-Based IDEs (convert to colon format) -- [ ] Update `shared/agent-command-generator.js` - add `writeColonArtifacts()` -- [ ] Update `shared/task-tool-command-generator.js` - add `writeColonArtifacts()` -- [ ] Update `shared/workflow-command-generator.js` - add `writeColonArtifacts()` -- [ ] Update `claude-code.js` - convert to colon format -- [ ] Update `cursor.js` - convert to colon format -- [ ] Update `crush.js` - convert to colon format - -### Flat IDEs (standardize dash format) -- [ ] Update `shared/agent-command-generator.js` - add `writeDashArtifacts()` -- [ ] Update `shared/task-tool-command-generator.js` - add `writeDashArtifacts()` -- [ ] Update `shared/workflow-command-generator.js` - add `writeDashArtifacts()` -- [ ] Update `antigravity.js` - use shared `toDashPath()` -- [ ] Update `codex.js` - use shared `toDashPath()` -- [ ] Update `cline.js` - use shared `toDashPath()` -- [ ] Update `roo.js` - use shared `toDashPath()` - -### Base Class -- [ ] Update `_base-ide.js` - add deprecation notice - -### Testing -- [ ] Test claude-code installation -- [ ] Test cursor installation -- [ ] Test crush installation -- [ ] Test antigravity installation -- [ ] Test codex installation -- [ ] Test cline installation -- [ ] Test roo installation - -## Notes - -1. **Keep segments**: agents, workflows, tasks, tools all become part of the flat name -2. **Colon vs Dash**: Colons for folder-based IDEs converting to flat, dashes for already-flat IDEs -3. **Custom agents**: Follow the same pattern as regular agents -4. **Backward compatibility**: Cleanup will remove old folder structure diff --git a/tools/cli/installers/lib/ide/_config-driven.js b/tools/cli/installers/lib/ide/_config-driven.js new file mode 100644 index 00000000..7d637faf --- /dev/null +++ b/tools/cli/installers/lib/ide/_config-driven.js @@ -0,0 +1,423 @@ +const path = require('node:path'); +const fs = require('fs-extra'); +const chalk = require('chalk'); +const { BaseIdeSetup } = require('./_base-ide'); +const { AgentCommandGenerator } = require('./shared/agent-command-generator'); +const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator'); +const { TaskToolCommandGenerator } = require('./shared/task-tool-command-generator'); + +/** + * Config-driven IDE setup handler + * + * This class provides a standardized way to install BMAD artifacts to IDEs + * based on configuration in platform-codes.yaml. It eliminates the need for + * individual installer files for each IDE. + * + * Features: + * - Config-driven from platform-codes.yaml + * - Template-based content generation + * - Multi-target installation support (e.g., GitHub Copilot) + * - Artifact type filtering (agents, workflows, tasks, tools) + */ +class ConfigDrivenIdeSetup extends BaseIdeSetup { + constructor(platformCode, platformConfig) { + super(platformCode, platformConfig.name, platformConfig.preferred); + this.platformConfig = platformConfig; + this.installerConfig = platformConfig.installer || null; + } + + /** + * Main setup method - called by IdeManager + * @param {string} projectDir - Project directory + * @param {string} bmadDir - BMAD installation directory + * @param {Object} options - Setup options + * @returns {Promise} Setup result + */ + async setup(projectDir, bmadDir, options = {}) { + console.log(chalk.cyan(`Setting up ${this.name}...`)); + + // Clean up any old BMAD installation first + await this.cleanup(projectDir); + + if (!this.installerConfig) { + return { success: false, reason: 'no-config' }; + } + + // Handle multi-target installations (e.g., GitHub Copilot) + if (this.installerConfig.targets) { + return this.installToMultipleTargets(projectDir, bmadDir, this.installerConfig.targets, options); + } + + // Handle single-target installations + if (this.installerConfig.target_dir) { + return this.installToTarget(projectDir, bmadDir, this.installerConfig, options); + } + + return { success: false, reason: 'invalid-config' }; + } + + /** + * Install to a single target directory + * @param {string} projectDir - Project directory + * @param {string} bmadDir - BMAD installation directory + * @param {Object} config - Installation configuration + * @param {Object} options - Setup options + * @returns {Promise} Installation result + */ + async installToTarget(projectDir, bmadDir, config, options) { + const { target_dir, template_type, artifact_types } = config; + const targetPath = path.join(projectDir, target_dir); + await this.ensureDir(targetPath); + + const selectedModules = options.selectedModules || []; + const results = { agents: 0, workflows: 0, tasks: 0, tools: 0 }; + + // Install agents + if (!artifact_types || artifact_types.includes('agents')) { + const agentGen = new AgentCommandGenerator(this.bmadFolderName); + const { artifacts } = await agentGen.collectAgentArtifacts(bmadDir, selectedModules); + results.agents = await this.writeAgentArtifacts(targetPath, artifacts, template_type, config); + } + + // Install workflows + if (!artifact_types || artifact_types.includes('workflows')) { + const workflowGen = new WorkflowCommandGenerator(this.bmadFolderName); + const { artifacts } = await workflowGen.collectWorkflowArtifacts(bmadDir); + results.workflows = await this.writeWorkflowArtifacts(targetPath, artifacts, template_type, config); + } + + // Install tasks and tools + if (!artifact_types || artifact_types.includes('tasks') || artifact_types.includes('tools')) { + const taskToolGen = new TaskToolCommandGenerator(); + const taskToolResult = await taskToolGen.generateDashTaskToolCommands(projectDir, bmadDir, targetPath); + results.tasks = taskToolResult.tasks || 0; + results.tools = taskToolResult.tools || 0; + } + + this.printSummary(results, target_dir); + return { success: true, results }; + } + + /** + * Install to multiple target directories + * @param {string} projectDir - Project directory + * @param {string} bmadDir - BMAD installation directory + * @param {Array} targets - Array of target configurations + * @param {Object} options - Setup options + * @returns {Promise} Installation result + */ + async installToMultipleTargets(projectDir, bmadDir, targets, options) { + const allResults = { agents: 0, workflows: 0, tasks: 0, tools: 0 }; + + for (const target of targets) { + const result = await this.installToTarget(projectDir, bmadDir, target, options); + if (result.success) { + allResults.agents += result.results.agents || 0; + allResults.workflows += result.results.workflows || 0; + allResults.tasks += result.results.tasks || 0; + allResults.tools += result.results.tools || 0; + } + } + + return { success: true, results: allResults }; + } + + /** + * Write agent artifacts to target directory + * @param {string} targetPath - Target directory path + * @param {Array} artifacts - Agent artifacts + * @param {string} templateType - Template type to use + * @param {Object} config - Installation configuration + * @returns {Promise} Count of artifacts written + */ + async writeAgentArtifacts(targetPath, artifacts, templateType, config = {}) { + // Try to load platform-specific template, fall back to default-agent + const template = await this.loadTemplate(templateType, 'agent', config, 'default-agent'); + let count = 0; + + for (const artifact of artifacts) { + const content = this.renderTemplate(template, artifact); + const filename = this.generateFilename(artifact, 'agent'); + const filePath = path.join(targetPath, filename); + await this.writeFile(filePath, content); + count++; + } + + return count; + } + + /** + * Write workflow artifacts to target directory + * @param {string} targetPath - Target directory path + * @param {Array} artifacts - Workflow artifacts + * @param {string} templateType - Template type to use + * @param {Object} config - Installation configuration + * @returns {Promise} Count of artifacts written + */ + async writeWorkflowArtifacts(targetPath, artifacts, templateType, config = {}) { + let count = 0; + + for (const artifact of artifacts) { + if (artifact.type === 'workflow-command') { + // Use different template based on workflow type (YAML vs MD) + // Default to 'default' template type, but allow override via config + const workflowTemplateType = artifact.isYamlWorkflow + ? config.yaml_workflow_template || `${templateType}-workflow-yaml` + : config.md_workflow_template || `${templateType}-workflow`; + + // Fall back to default templates if specific ones don't exist + const finalTemplateType = artifact.isYamlWorkflow ? 'default-workflow-yaml' : 'default-workflow'; + const template = await this.loadTemplate(workflowTemplateType, 'workflow', config, finalTemplateType); + const content = this.renderTemplate(template, artifact); + const filename = this.generateFilename(artifact, 'workflow'); + const filePath = path.join(targetPath, filename); + await this.writeFile(filePath, content); + count++; + } + } + + return count; + } + + /** + * Load template based on type and configuration + * @param {string} templateType - Template type (claude, windsurf, etc.) + * @param {string} artifactType - Artifact type (agent, workflow, task, tool) + * @param {Object} config - Installation configuration + * @param {string} fallbackTemplateType - Fallback template type if requested template not found + * @returns {Promise} Template content + */ + async loadTemplate(templateType, artifactType, config = {}, fallbackTemplateType = null) { + const { header_template, body_template } = config; + + // Check for separate header/body templates + if (header_template || body_template) { + return await this.loadSplitTemplates(templateType, artifactType, header_template, body_template); + } + + // Load combined template + const templateName = `${templateType}-${artifactType}.md`; + const templatePath = path.join(__dirname, 'templates', 'combined', templateName); + + if (await fs.pathExists(templatePath)) { + return await fs.readFile(templatePath, 'utf8'); + } + + // Fall back to default template (if provided) + if (fallbackTemplateType) { + const fallbackPath = path.join(__dirname, 'templates', 'combined', `${fallbackTemplateType}.md`); + if (await fs.pathExists(fallbackPath)) { + return await fs.readFile(fallbackPath, 'utf8'); + } + } + + // Ultimate fallback - minimal template + return this.getDefaultTemplate(artifactType); + } + + /** + * Load split templates (header + body) + * @param {string} templateType - Template type + * @param {string} artifactType - Artifact type + * @param {string} headerTpl - Header template name + * @param {string} bodyTpl - Body template name + * @returns {Promise} Combined template content + */ + async loadSplitTemplates(templateType, artifactType, headerTpl, bodyTpl) { + let header = ''; + let body = ''; + + // Load header template + if (headerTpl) { + const headerPath = path.join(__dirname, 'templates', 'split', headerTpl); + if (await fs.pathExists(headerPath)) { + header = await fs.readFile(headerPath, 'utf8'); + } + } else { + // Use default header for template type + const defaultHeaderPath = path.join(__dirname, 'templates', 'split', templateType, 'header.md'); + if (await fs.pathExists(defaultHeaderPath)) { + header = await fs.readFile(defaultHeaderPath, 'utf8'); + } + } + + // Load body template + if (bodyTpl) { + const bodyPath = path.join(__dirname, 'templates', 'split', bodyTpl); + if (await fs.pathExists(bodyPath)) { + body = await fs.readFile(bodyPath, 'utf8'); + } + } else { + // Use default body for template type + const defaultBodyPath = path.join(__dirname, 'templates', 'split', templateType, 'body.md'); + if (await fs.pathExists(defaultBodyPath)) { + body = await fs.readFile(defaultBodyPath, 'utf8'); + } + } + + // Combine header and body + return `${header}\n${body}`; + } + + /** + * Get default minimal template + * @param {string} artifactType - Artifact type + * @returns {string} Default template + */ + getDefaultTemplate(artifactType) { + if (artifactType === 'agent') { + return `--- +name: '{{name}}' +description: '{{description}}' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. + + +1. LOAD the FULL agent file from {project-root}/{{bmadFolderName}}/{{path}} +2. READ its entire contents - this contains the complete agent persona, menu, and instructions +3. FOLLOW every step in the section precisely + +`; + } + return `--- +name: '{{name}}' +description: '{{description}}' +--- + +# {{name}} + +LOAD and execute from: {project-root}/{{bmadFolderName}}/{{path}} +`; + } + + /** + * Render template with artifact data + * @param {string} template - Template content + * @param {Object} artifact - Artifact data + * @returns {string} Rendered content + */ + renderTemplate(template, artifact) { + // Use the appropriate path property based on artifact type + let pathToUse = artifact.relativePath || ''; + if (artifact.type === 'agent-launcher') { + pathToUse = artifact.agentPath || artifact.relativePath || ''; + } else if (artifact.type === 'workflow-command') { + pathToUse = artifact.workflowPath || artifact.relativePath || ''; + } + + let rendered = template + .replaceAll('{{name}}', artifact.name || '') + .replaceAll('{{module}}', artifact.module || 'core') + .replaceAll('{{path}}', pathToUse) + .replaceAll('{{description}}', artifact.description || `${artifact.name} ${artifact.type || ''}`) + .replaceAll('{{workflow_path}}', pathToUse); + + // Replace _bmad placeholder with actual folder name + rendered = rendered.replaceAll('_bmad', this.bmadFolderName); + + // Replace {{bmadFolderName}} placeholder if present + rendered = rendered.replaceAll('{{bmadFolderName}}', this.bmadFolderName); + + return rendered; + } + + /** + * Generate filename for artifact + * @param {Object} artifact - Artifact data + * @param {string} artifactType - Artifact type (agent, workflow, task, tool) + * @returns {string} Generated filename + */ + generateFilename(artifact, artifactType) { + const { toDashPath } = require('./shared/path-utils'); + // toDashPath already handles the .agent.md suffix for agents correctly + // No need to add it again here + return toDashPath(artifact.relativePath); + } + + /** + * Print installation summary + * @param {Object} results - Installation results + * @param {string} targetDir - Target directory (relative) + */ + printSummary(results, targetDir) { + console.log(chalk.green(`\n✓ ${this.name} configured:`)); + if (results.agents > 0) { + console.log(chalk.dim(` - ${results.agents} agents installed`)); + } + if (results.workflows > 0) { + console.log(chalk.dim(` - ${results.workflows} workflow commands generated`)); + } + if (results.tasks > 0 || results.tools > 0) { + console.log(chalk.dim(` - ${results.tasks + results.tools} task/tool commands generated`)); + } + console.log(chalk.dim(` - Destination: ${targetDir}`)); + } + + /** + * Cleanup IDE configuration + * @param {string} projectDir - Project directory + */ + async cleanup(projectDir) { + // Clean all target directories + if (this.installerConfig?.targets) { + for (const target of this.installerConfig.targets) { + await this.cleanupTarget(projectDir, target.target_dir); + } + } else if (this.installerConfig?.target_dir) { + await this.cleanupTarget(projectDir, this.installerConfig.target_dir); + } + } + + /** + * Cleanup a specific target directory + * @param {string} projectDir - Project directory + * @param {string} targetDir - Target directory to clean + */ + async cleanupTarget(projectDir, targetDir) { + const targetPath = path.join(projectDir, targetDir); + + if (!(await fs.pathExists(targetPath))) { + return; + } + + // Remove all bmad* files + let entries; + try { + entries = await fs.readdir(targetPath); + } catch { + // Directory exists but can't be read - skip cleanup + return; + } + + if (!entries || !Array.isArray(entries)) { + return; + } + + let removedCount = 0; + + for (const entry of entries) { + // Skip non-strings or undefined entries + if (!entry || typeof entry !== 'string') { + continue; + } + if (entry.startsWith('bmad')) { + const entryPath = path.join(targetPath, entry); + const stat = await fs.stat(entryPath); + if (stat.isFile()) { + await fs.remove(entryPath); + removedCount++; + } else if (stat.isDirectory()) { + await fs.remove(entryPath); + removedCount++; + } + } + } + + if (removedCount > 0) { + console.log(chalk.dim(` Cleaned ${removedCount} BMAD files from ${targetDir}`)); + } + } +} + +module.exports = { ConfigDrivenIdeSetup }; diff --git a/tools/cli/installers/lib/ide/antigravity.js b/tools/cli/installers/lib/ide/antigravity.js deleted file mode 100644 index 71fbd4b7..00000000 --- a/tools/cli/installers/lib/ide/antigravity.js +++ /dev/null @@ -1,474 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const { BaseIdeSetup } = require('./_base-ide'); -const chalk = require('chalk'); -const { getProjectRoot, getSourcePath, getModulePath } = require('../../../lib/project-root'); -const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator'); -const { TaskToolCommandGenerator } = require('./shared/task-tool-command-generator'); -const { AgentCommandGenerator } = require('./shared/agent-command-generator'); -const { - loadModuleInjectionConfig, - shouldApplyInjection, - filterAgentInstructions, - resolveSubagentFiles, -} = require('./shared/module-injections'); -const { getAgentsFromBmad, getAgentsFromDir } = require('./shared/bmad-artifacts'); -const { toDashPath, customAgentDashName } = require('./shared/path-utils'); -const prompts = require('../../../lib/prompts'); - -/** - * Google Antigravity IDE setup handler - * - * Uses .agent/workflows/ directory for slash commands - */ -class AntigravitySetup extends BaseIdeSetup { - constructor() { - super('antigravity', 'Google Antigravity', true); - this.configDir = '.agent'; - this.workflowsDir = 'workflows'; - } - - /** - * Prompt for subagent installation location - * @returns {Promise} Selected location ('project' or 'user') - */ - async _promptInstallLocation() { - return prompts.select({ - message: 'Where would you like to install Antigravity subagents?', - choices: [ - { name: 'Project level (.agent/agents/)', value: 'project' }, - { name: 'User level (~/.agent/agents/)', value: 'user' }, - ], - default: 'project', - }); - } - - /** - * Collect configuration choices before installation - * @param {Object} options - Configuration options - * @returns {Object} Collected configuration - */ - async collectConfiguration(options = {}) { - // const config = { - // subagentChoices: null, - // installLocation: null, - // }; - - // const sourceModulesPath = getSourcePath('modules'); - // const modules = options.selectedModules || []; - - // for (const moduleName of modules) { - // // Check for Antigravity sub-module injection config in SOURCE directory - // const injectionConfigPath = path.join(sourceModulesPath, moduleName, 'sub-modules', 'antigravity', 'injections.yaml'); - - // if (await this.exists(injectionConfigPath)) { - // const yaml = require('yaml'); - - // try { - // // Load injection configuration - // const configContent = await fs.readFile(injectionConfigPath, 'utf8'); - // const injectionConfig = yaml.parse(configContent); - - // // Ask about subagents if they exist and we haven't asked yet - // if (injectionConfig.subagents && !config.subagentChoices) { - // config.subagentChoices = await this.promptSubagentInstallation(injectionConfig.subagents); - - // if (config.subagentChoices.install !== 'none') { - // config.installLocation = await this._promptInstallLocation(); - // } - // } - // } catch (error) { - // console.log(chalk.yellow(` Warning: Failed to process ${moduleName} features: ${error.message}`)); - // } - // } - // } - - return config; - } - - /** - * Cleanup old BMAD installation before reinstalling - * @param {string} projectDir - Project directory - */ - async cleanup(projectDir) { - const bmadWorkflowsDir = path.join(projectDir, this.configDir, this.workflowsDir, 'bmad'); - - if (await fs.pathExists(bmadWorkflowsDir)) { - await fs.remove(bmadWorkflowsDir); - console.log(chalk.dim(` Removed old BMAD workflows from ${this.name}`)); - } - } - - /** - * Setup Antigravity IDE configuration - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Object} options - Setup options - */ - async setup(projectDir, bmadDir, options = {}) { - // Store project directory for use in processContent - this.projectDir = projectDir; - - console.log(chalk.cyan(`Setting up ${this.name}...`)); - - // Clean up old BMAD installation first - await this.cleanup(projectDir); - - // Create .agent/workflows directory structure - const agentDir = path.join(projectDir, this.configDir); - const workflowsDir = path.join(agentDir, this.workflowsDir); - const bmadWorkflowsDir = path.join(workflowsDir, 'bmad'); - - await this.ensureDir(bmadWorkflowsDir); - - // Generate agent launchers using AgentCommandGenerator - // This creates small launcher files that reference the actual agents in _bmad/ - const agentGen = new AgentCommandGenerator(this.bmadFolderName); - const { artifacts: agentArtifacts, counts: agentCounts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []); - - // Write agent launcher files with FLATTENED naming using shared utility - // Antigravity ignores directory structure, so we flatten to: bmad-module-name.md - // This creates slash commands like /bmad-bmm-dev instead of /dev - const agentCount = await agentGen.writeDashArtifacts(bmadWorkflowsDir, agentArtifacts); - - // Process Antigravity specific injections for installed modules - // Use pre-collected configuration if available, or skip if already configured - if (options.preCollectedConfig && options.preCollectedConfig._alreadyConfigured) { - // IDE is already configured from previous installation, skip prompting - // Just process with default/existing configuration - await this.processModuleInjectionsWithConfig(projectDir, bmadDir, options, {}); - } else if (options.preCollectedConfig) { - await this.processModuleInjectionsWithConfig(projectDir, bmadDir, options, options.preCollectedConfig); - } else { - await this.processModuleInjections(projectDir, bmadDir, options); - } - - // Generate workflow commands from manifest (if it exists) - const workflowGen = new WorkflowCommandGenerator(this.bmadFolderName); - const { artifacts: workflowArtifacts } = await workflowGen.collectWorkflowArtifacts(bmadDir); - - // Write workflow-command artifacts with FLATTENED naming using shared utility - const workflowCommandCount = await workflowGen.writeDashArtifacts(bmadWorkflowsDir, workflowArtifacts); - - // Generate task and tool commands from manifests (if they exist) - const taskToolGen = new TaskToolCommandGenerator(); - const taskToolResult = await taskToolGen.generateTaskToolCommands(projectDir, bmadDir); - - console.log(chalk.green(`✓ ${this.name} configured:`)); - console.log(chalk.dim(` - ${agentCount} agents installed`)); - if (workflowCommandCount > 0) { - console.log(chalk.dim(` - ${workflowCommandCount} workflow commands generated`)); - } - if (taskToolResult.generated > 0) { - console.log( - chalk.dim( - ` - ${taskToolResult.generated} task/tool commands generated (${taskToolResult.tasks} tasks, ${taskToolResult.tools} tools)`, - ), - ); - } - console.log(chalk.dim(` - Workflows directory: ${path.relative(projectDir, bmadWorkflowsDir)}`)); - console.log(chalk.yellow(`\n Note: Antigravity uses flattened slash commands (e.g., /bmad-module-agents-name)`)); - - return { - success: true, - agents: agentCount, - }; - } - - /** - * Read and process file content - */ - async readAndProcess(filePath, metadata) { - const content = await fs.readFile(filePath, 'utf8'); - return this.processContent(content, metadata); - } - - /** - * Override processContent to keep {project-root} placeholder - */ - processContent(content, metadata = {}) { - // Use the base class method WITHOUT projectDir to preserve {project-root} placeholder - return super.processContent(content, metadata); - } - - /** - * Get agents from source modules (not installed location) - */ - async getAgentsFromSource(sourceDir, selectedModules) { - const agents = []; - - // Add core agents - const corePath = getModulePath('core'); - if (await fs.pathExists(path.join(corePath, 'agents'))) { - const coreAgents = await getAgentsFromDir(path.join(corePath, 'agents'), 'core'); - agents.push(...coreAgents); - } - - // Add module agents - for (const moduleName of selectedModules) { - const modulePath = path.join(sourceDir, moduleName); - const agentsPath = path.join(modulePath, 'agents'); - - if (await fs.pathExists(agentsPath)) { - const moduleAgents = await getAgentsFromDir(agentsPath, moduleName); - agents.push(...moduleAgents); - } - } - - return agents; - } - - /** - * Process module injections with pre-collected configuration - */ - async processModuleInjectionsWithConfig(projectDir, bmadDir, options, preCollectedConfig) { - // Get list of installed modules - const modules = options.selectedModules || []; - const { subagentChoices, installLocation } = preCollectedConfig; - - // Get the actual source directory (not the installation directory) - await this.processModuleInjectionsInternal({ - projectDir, - modules, - handler: 'antigravity', - subagentChoices, - installLocation, - interactive: false, - }); - } - - /** - * Process Antigravity specific injections for installed modules - * Looks for injections.yaml in each module's antigravity sub-module - */ - async processModuleInjections(projectDir, bmadDir, options) { - // Get list of installed modules - const modules = options.selectedModules || []; - let subagentChoices = null; - let installLocation = null; - - // Get the actual source directory (not the installation directory) - const { subagentChoices: updatedChoices, installLocation: updatedLocation } = await this.processModuleInjectionsInternal({ - projectDir, - modules, - handler: 'antigravity', - subagentChoices, - installLocation, - interactive: true, - }); - - if (updatedChoices) { - subagentChoices = updatedChoices; - } - if (updatedLocation) { - installLocation = updatedLocation; - } - } - - async processModuleInjectionsInternal({ projectDir, modules, handler, subagentChoices, installLocation, interactive = false }) { - let choices = subagentChoices; - let location = installLocation; - - for (const moduleName of modules) { - const configData = await loadModuleInjectionConfig(handler, moduleName); - - if (!configData) { - continue; - } - - const { config, handlerBaseDir } = configData; - - if (interactive) { - console.log(chalk.cyan(`\nConfiguring ${moduleName} ${handler} features...`)); - } - - // if (interactive && config.subagents && !choices) { - // choices = await this.promptSubagentInstallation(config.subagents); - - // if (choices.install !== 'none') { - // location = await this._promptInstallLocation(); - // } - // } - - if (config.injections && choices && choices.install !== 'none') { - for (const injection of config.injections) { - if (shouldApplyInjection(injection, choices)) { - await this.injectContent(projectDir, injection, choices); - } - } - } - - if (config.subagents && choices && choices.install !== 'none') { - await this.copySelectedSubagents(projectDir, handlerBaseDir, config.subagents, choices, location || 'project'); - } - } - - return { subagentChoices: choices, installLocation: location }; - } - - /** - * Prompt user for subagent installation preferences - */ - async promptSubagentInstallation(subagentConfig) { - // First ask if they want to install subagents - const install = await prompts.select({ - message: 'Would you like to install Antigravity subagents for enhanced functionality?', - choices: [ - { name: 'Yes, install all subagents', value: 'all' }, - { name: 'Yes, let me choose specific subagents', value: 'selective' }, - { name: 'No, skip subagent installation', value: 'none' }, - ], - default: 'all', - }); - - if (install === 'selective') { - // Show list of available subagents with descriptions - const subagentInfo = { - 'market-researcher.md': 'Market research and competitive analysis', - 'requirements-analyst.md': 'Requirements extraction and validation', - 'technical-evaluator.md': 'Technology stack evaluation', - 'epic-optimizer.md': 'Epic and story breakdown optimization', - 'document-reviewer.md': 'Document quality review', - }; - - const selected = await prompts.multiselect({ - message: `Select subagents to install ${chalk.dim('(↑/↓ navigates multiselect, SPACE toggles, A to toggles All, ENTER confirm)')}:`, - choices: subagentConfig.files.map((file) => ({ - name: `${file.replace('.md', '')} - ${subagentInfo[file] || 'Specialized assistant'}`, - value: file, - checked: true, - })), - }); - - return { install: 'selective', selected }; - } - - return { install }; - } - - /** - * Inject content at specified point in file - */ - async injectContent(projectDir, injection, subagentChoices = null) { - const targetPath = path.join(projectDir, injection.file); - - if (await this.exists(targetPath)) { - let content = await fs.readFile(targetPath, 'utf8'); - const marker = ``; - - if (content.includes(marker)) { - let injectionContent = injection.content; - - // Filter content if selective subagents chosen - if (subagentChoices && subagentChoices.install === 'selective' && injection.point === 'pm-agent-instructions') { - injectionContent = filterAgentInstructions(injection.content, subagentChoices.selected); - } - - content = content.replace(marker, injectionContent); - await fs.writeFile(targetPath, content); - console.log(chalk.dim(` Injected: ${injection.point} → ${injection.file}`)); - } - } - } - - /** - * Copy selected subagents to appropriate Antigravity agents directory - */ - async copySelectedSubagents(projectDir, handlerBaseDir, subagentConfig, choices, location) { - const os = require('node:os'); - - // Determine target directory based on user choice - let targetDir; - if (location === 'user') { - targetDir = path.join(os.homedir(), '.agent', 'agents'); - console.log(chalk.dim(` Installing subagents globally to: ~/.agent/agents/`)); - } else { - targetDir = path.join(projectDir, '.agent', 'agents'); - console.log(chalk.dim(` Installing subagents to project: .agent/agents/`)); - } - - // Ensure target directory exists - await this.ensureDir(targetDir); - - const resolvedFiles = await resolveSubagentFiles(handlerBaseDir, subagentConfig, choices); - - let copiedCount = 0; - for (const resolved of resolvedFiles) { - try { - const sourcePath = resolved.absolutePath; - - const subFolder = path.dirname(resolved.relativePath); - let targetPath; - if (subFolder && subFolder !== '.') { - const targetSubDir = path.join(targetDir, subFolder); - await this.ensureDir(targetSubDir); - targetPath = path.join(targetSubDir, path.basename(resolved.file)); - } else { - targetPath = path.join(targetDir, path.basename(resolved.file)); - } - - await fs.copyFile(sourcePath, targetPath); - console.log(chalk.green(` ✓ Installed: ${subFolder === '.' ? '' : `${subFolder}/`}${path.basename(resolved.file, '.md')}`)); - copiedCount++; - } catch (error) { - console.log(chalk.yellow(` ⚠ Error copying ${resolved.file}: ${error.message}`)); - } - } - - if (copiedCount > 0) { - console.log(chalk.dim(` Total subagents installed: ${copiedCount}`)); - } - } - - /** - * Install a custom agent launcher for Antigravity - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object} Installation result - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - // Create .agent/workflows/bmad directory structure (same as regular agents) - const agentDir = path.join(projectDir, this.configDir); - const workflowsDir = path.join(agentDir, this.workflowsDir); - const bmadWorkflowsDir = path.join(workflowsDir, 'bmad'); - - await fs.ensureDir(bmadWorkflowsDir); - - // Create custom agent launcher with same pattern as regular agents - const launcherContent = `name: '${agentName}' -description: '${agentName} agent' -usage: | - Custom BMAD agent: ${agentName} - - Launch with: /${agentName} - - You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. - -1. LOAD the FULL agent file from @${agentPath} -2. READ its entire contents - this contains the complete agent persona, menu, and instructions -3. EXECUTE as ${agentName} with full persona adoption - - ---- - -⚠️ **IMPORTANT**: Run @${agentPath} to load the complete agent before using this launcher!`; - - // Use dash format: bmad-custom-agents-fred-commit-poet.md - const fileName = customAgentDashName(agentName); - const launcherPath = path.join(bmadWorkflowsDir, fileName); - - // Write the launcher file - await fs.writeFile(launcherPath, launcherContent, 'utf8'); - - return { - ide: 'antigravity', - path: path.relative(projectDir, launcherPath), - command: `/${fileName.replace('.md', '')}`, - type: 'custom-agent-launcher', - }; - } -} - -module.exports = { AntigravitySetup }; diff --git a/tools/cli/installers/lib/ide/auggie.js b/tools/cli/installers/lib/ide/auggie.js deleted file mode 100644 index 04e08788..00000000 --- a/tools/cli/installers/lib/ide/auggie.js +++ /dev/null @@ -1,244 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const { BaseIdeSetup } = require('./_base-ide'); -const chalk = require('chalk'); -const { AgentCommandGenerator } = require('./shared/agent-command-generator'); -const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator'); - -/** - * Auggie CLI setup handler - * Installs to project directory (.augment/commands) - */ -class AuggieSetup extends BaseIdeSetup { - constructor() { - super('auggie', 'Auggie CLI'); - this.detectionPaths = ['.augment']; - } - - /** - * Setup Auggie CLI configuration - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Object} options - Setup options - */ - async setup(projectDir, bmadDir, options = {}) { - console.log(chalk.cyan(`Setting up ${this.name}...`)); - - // Always use project directory - const location = path.join(projectDir, '.augment', 'commands'); - - // Clean up old BMAD installation first - await this.cleanup(projectDir); - - // Generate agent launchers - const agentGen = new AgentCommandGenerator(this.bmadFolderName); - const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []); - - // Get tasks, tools, and workflows (ALL workflows now generate commands) - const tasks = await this.getTasks(bmadDir, true); - const tools = await this.getTools(bmadDir, true); - - // Get ALL workflows using the new workflow command generator - const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName); - const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir); - - // Convert workflow artifacts to expected format - const workflows = workflowArtifacts - .filter((artifact) => artifact.type === 'workflow-command') - .map((artifact) => ({ - module: artifact.module, - name: path.basename(artifact.relativePath, '.md'), - path: artifact.sourcePath, - content: artifact.content, - })); - - const bmadCommandsDir = path.join(location, 'bmad'); - const agentsDir = path.join(bmadCommandsDir, 'agents'); - const tasksDir = path.join(bmadCommandsDir, 'tasks'); - const toolsDir = path.join(bmadCommandsDir, 'tools'); - const workflowsDir = path.join(bmadCommandsDir, 'workflows'); - - await this.ensureDir(agentsDir); - await this.ensureDir(tasksDir); - await this.ensureDir(toolsDir); - await this.ensureDir(workflowsDir); - - // Install agent launchers - for (const artifact of agentArtifacts) { - const targetPath = path.join(agentsDir, `${artifact.module}-${artifact.name}.md`); - await this.writeFile(targetPath, artifact.content); - } - - // Install tasks - for (const task of tasks) { - const content = await this.readFile(task.path); - const commandContent = this.createTaskCommand(task, content); - - const targetPath = path.join(tasksDir, `${task.module}-${task.name}.md`); - await this.writeFile(targetPath, commandContent); - } - - // Install tools - for (const tool of tools) { - const content = await this.readFile(tool.path); - const commandContent = this.createToolCommand(tool, content); - - const targetPath = path.join(toolsDir, `${tool.module}-${tool.name}.md`); - await this.writeFile(targetPath, commandContent); - } - - // Install workflows (already generated commands) - for (const workflow of workflows) { - // Use the pre-generated workflow command content - const targetPath = path.join(workflowsDir, `${workflow.module}-${workflow.name}.md`); - await this.writeFile(targetPath, workflow.content); - } - - const totalInstalled = agentArtifacts.length + tasks.length + tools.length + workflows.length; - - console.log(chalk.green(`✓ ${this.name} configured:`)); - console.log(chalk.dim(` - ${agentArtifacts.length} agents installed`)); - console.log(chalk.dim(` - ${tasks.length} tasks installed`)); - console.log(chalk.dim(` - ${tools.length} tools installed`)); - console.log(chalk.dim(` - ${workflows.length} workflows installed`)); - console.log(chalk.dim(` - Location: ${path.relative(projectDir, location)}`)); - console.log(chalk.yellow(`\n 💡 Tip: Add 'model: gpt-4o' to command frontmatter to specify AI model`)); - - return { - success: true, - agents: agentArtifacts.length, - tasks: tasks.length, - tools: tools.length, - workflows: workflows.length, - }; - } - - /** - * Create task command content - */ - createTaskCommand(task, content) { - const nameMatch = content.match(/name="([^"]+)"/); - const taskName = nameMatch ? nameMatch[1] : this.formatTitle(task.name); - - return `--- -description: "Execute the ${taskName} task" ---- - -# ${taskName} Task - -${content} - -## Module -BMAD ${task.module.toUpperCase()} module -`; - } - - /** - * Create tool command content - */ - createToolCommand(tool, content) { - const nameMatch = content.match(/name="([^"]+)"/); - const toolName = nameMatch ? nameMatch[1] : this.formatTitle(tool.name); - - return `--- -description: "Use the ${toolName} tool" ---- - -# ${toolName} Tool - -${content} - -## Module -BMAD ${tool.module.toUpperCase()} module -`; - } - - /** - * Create workflow command content - */ - createWorkflowCommand(workflow, content) { - const description = workflow.description || `Execute the ${workflow.name} workflow`; - - return `--- -description: "${description}" ---- - -# ${workflow.name} Workflow - -${content} - -## Module -BMAD ${workflow.module.toUpperCase()} module -`; - } - - /** - * Cleanup Auggie configuration - */ - async cleanup(projectDir) { - const fs = require('fs-extra'); - - // Only clean up project directory - const location = path.join(projectDir, '.augment', 'commands'); - const bmadDir = path.join(location, 'bmad'); - - if (await fs.pathExists(bmadDir)) { - await fs.remove(bmadDir); - console.log(chalk.dim(` Removed old BMAD commands`)); - } - } - - /** - * Install a custom agent launcher for Auggie - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object} Installation result - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - // Auggie uses .augment/commands directory - const location = path.join(projectDir, '.augment', 'commands'); - const bmadCommandsDir = path.join(location, 'bmad'); - const agentsDir = path.join(bmadCommandsDir, 'agents'); - - // Create .augment/commands/bmad/agents directory if it doesn't exist - await fs.ensureDir(agentsDir); - - // Create custom agent launcher - const launcherContent = `--- -description: "Use the ${agentName} custom agent" ---- - -# ${agentName} Custom Agent - -**⚠️ IMPORTANT**: Run @${agentPath} first to load the complete agent! - -This is a launcher for the custom BMAD agent "${agentName}". - -## Usage -1. First run: \`${agentPath}\` to load the complete agent -2. Then use this command to activate ${agentName} - -The agent will follow the persona and instructions from the main agent file. - -## Module -BMAD Custom agent -`; - - const fileName = `custom-${agentName.toLowerCase()}.md`; - const launcherPath = path.join(agentsDir, fileName); - - // Write the launcher file - await fs.writeFile(launcherPath, launcherContent, 'utf8'); - - return { - ide: 'auggie', - path: path.relative(projectDir, launcherPath), - command: agentName, - type: 'custom-agent-launcher', - }; - } -} - -module.exports = { AuggieSetup }; diff --git a/tools/cli/installers/lib/ide/claude-code.js b/tools/cli/installers/lib/ide/claude-code.js deleted file mode 100644 index 9de97794..00000000 --- a/tools/cli/installers/lib/ide/claude-code.js +++ /dev/null @@ -1,506 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const { BaseIdeSetup } = require('./_base-ide'); -const chalk = require('chalk'); -const { getProjectRoot, getSourcePath, getModulePath } = require('../../../lib/project-root'); -const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator'); -const { TaskToolCommandGenerator } = require('./shared/task-tool-command-generator'); -const { AgentCommandGenerator } = require('./shared/agent-command-generator'); -const { - loadModuleInjectionConfig, - shouldApplyInjection, - filterAgentInstructions, - resolveSubagentFiles, -} = require('./shared/module-injections'); -const { getAgentsFromBmad, getAgentsFromDir } = require('./shared/bmad-artifacts'); -const { customAgentColonName } = require('./shared/path-utils'); -const prompts = require('../../../lib/prompts'); - -/** - * Claude Code IDE setup handler - */ -class ClaudeCodeSetup extends BaseIdeSetup { - constructor() { - super('claude-code', 'Claude Code', true); // preferred IDE - this.configDir = '.claude'; - this.commandsDir = 'commands'; - this.agentsDir = 'agents'; - } - - /** - * Prompt for subagent installation location - * @returns {Promise} Selected location ('project' or 'user') - */ - async promptInstallLocation() { - return prompts.select({ - message: 'Where would you like to install Claude Code subagents?', - choices: [ - { name: 'Project level (.claude/agents/)', value: 'project' }, - { name: 'User level (~/.claude/agents/)', value: 'user' }, - ], - default: 'project', - }); - } - - // /** - // * Collect configuration choices before installation - // * @param {Object} options - Configuration options - // * @returns {Object} Collected configuration - // */ - // async collectConfiguration(options = {}) { - // const config = { - // subagentChoices: null, - // installLocation: null, - // }; - - // const sourceModulesPath = getSourcePath('modules'); - // const modules = options.selectedModules || []; - - // for (const moduleName of modules) { - // // Check for Claude Code sub-module injection config in SOURCE directory - // const injectionConfigPath = path.join(sourceModulesPath, moduleName, 'sub-modules', 'claude-code', 'injections.yaml'); - - // if (await this.exists(injectionConfigPath)) { - // const yaml = require('yaml'); - - // try { - // // Load injection configuration - // const configContent = await fs.readFile(injectionConfigPath, 'utf8'); - // const injectionConfig = yaml.parse(configContent); - - // // Ask about subagents if they exist and we haven't asked yet - // if (injectionConfig.subagents && !config.subagentChoices) { - // config.subagentChoices = await this.promptSubagentInstallation(injectionConfig.subagents); - - // if (config.subagentChoices.install !== 'none') { - // config.installLocation = await this.promptInstallLocation(); - // } - // } - // } catch (error) { - // console.log(chalk.yellow(` Warning: Failed to process ${moduleName} features: ${error.message}`)); - // } - // } - // } - - // return config; - // } - - /** - * Cleanup old BMAD installation before reinstalling - * @param {string} projectDir - Project directory - */ - async cleanup(projectDir) { - const commandsDir = path.join(projectDir, this.configDir, this.commandsDir); - - // Remove any bmad:* files from the commands directory - if (await fs.pathExists(commandsDir)) { - const entries = await fs.readdir(commandsDir); - let removedCount = 0; - for (const entry of entries) { - if (entry.startsWith('bmad:')) { - await fs.remove(path.join(commandsDir, entry)); - removedCount++; - } - } - // Also remove legacy bmad folder if it exists - const bmadFolder = path.join(commandsDir, 'bmad'); - if (await fs.pathExists(bmadFolder)) { - await fs.remove(bmadFolder); - console.log(chalk.dim(` Removed old BMAD commands from ${this.name}`)); - } - } - } - - /** - * Clean up legacy folder structure (module/type/name.md) if it exists - * This can be called after migration to remove old nested directories - * @param {string} projectDir - Project directory - */ - async cleanupLegacyFolders(projectDir) { - const commandsDir = path.join(projectDir, this.configDir, this.commandsDir); - - if (!(await fs.pathExists(commandsDir))) { - return; - } - - // Remove legacy bmad folder if it exists - const bmadFolder = path.join(commandsDir, 'bmad'); - if (await fs.pathExists(bmadFolder)) { - await fs.remove(bmadFolder); - console.log(chalk.dim(` Removed legacy bmad folder from ${this.name}`)); - } - } - - /** - * Setup Claude Code IDE configuration - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Object} options - Setup options - */ - async setup(projectDir, bmadDir, options = {}) { - // Store project directory for use in processContent - this.projectDir = projectDir; - - console.log(chalk.cyan(`Setting up ${this.name}...`)); - - // Clean up old BMAD installation first - await this.cleanup(projectDir); - - // Create .claude/commands directory structure - const claudeDir = path.join(projectDir, this.configDir); - const commandsDir = path.join(claudeDir, this.commandsDir); - await this.ensureDir(commandsDir); - - // Use colon format: files written directly to commands dir (no bmad subfolder) - // Creates: .claude/commands/bmad:bmm:pm.md - - // Generate agent launchers using AgentCommandGenerator - // This creates small launcher files that reference the actual agents in _bmad/ - const agentGen = new AgentCommandGenerator(this.bmadFolderName); - const { artifacts: agentArtifacts, counts: agentCounts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []); - - // Write agent launcher files using flat colon naming - // Creates files like: bmad:bmm:pm.md - const agentCount = await agentGen.writeColonArtifacts(commandsDir, agentArtifacts); - - // Process Claude Code specific injections for installed modules - // Use pre-collected configuration if available, or skip if already configured - if (options.preCollectedConfig && options.preCollectedConfig._alreadyConfigured) { - // IDE is already configured from previous installation, skip prompting - // Just process with default/existing configuration - await this.processModuleInjectionsWithConfig(projectDir, bmadDir, options, {}); - } else if (options.preCollectedConfig) { - await this.processModuleInjectionsWithConfig(projectDir, bmadDir, options, options.preCollectedConfig); - } else { - await this.processModuleInjections(projectDir, bmadDir, options); - } - - // Skip CLAUDE.md creation - let user manage their own CLAUDE.md file - // await this.createClaudeConfig(projectDir, modules); - - // Generate workflow commands from manifest (if it exists) - const workflowGen = new WorkflowCommandGenerator(this.bmadFolderName); - const { artifacts: workflowArtifacts } = await workflowGen.collectWorkflowArtifacts(bmadDir); - - // Write workflow-command artifacts using flat colon naming - // Creates files like: bmad:bmm:correct-course.md - const workflowCommandCount = await workflowGen.writeColonArtifacts(commandsDir, workflowArtifacts); - - // Generate task and tool commands from manifests (if they exist) - const taskToolGen = new TaskToolCommandGenerator(); - const taskToolResult = await taskToolGen.generateColonTaskToolCommands(projectDir, bmadDir, commandsDir); - - console.log(chalk.green(`✓ ${this.name} configured:`)); - console.log(chalk.dim(` - ${agentCount} agents installed`)); - if (workflowCommandCount > 0) { - console.log(chalk.dim(` - ${workflowCommandCount} workflow commands generated`)); - } - if (taskToolResult.generated > 0) { - console.log( - chalk.dim( - ` - ${taskToolResult.generated} task/tool commands generated (${taskToolResult.tasks} tasks, ${taskToolResult.tools} tools)`, - ), - ); - } - console.log(chalk.dim(` - Commands directory: ${path.relative(projectDir, commandsDir)}`)); - - return { - success: true, - agents: agentCount, - }; - } - - // Method removed - CLAUDE.md file management left to user - - /** - * Read and process file content - */ - async readAndProcess(filePath, metadata) { - const content = await fs.readFile(filePath, 'utf8'); - return this.processContent(content, metadata); - } - - /** - * Override processContent to keep {project-root} placeholder - */ - processContent(content, metadata = {}) { - // Use the base class method WITHOUT projectDir to preserve {project-root} placeholder - return super.processContent(content, metadata); - } - - /** - * Get agents from source modules (not installed location) - */ - async getAgentsFromSource(sourceDir, selectedModules) { - const agents = []; - - // Add core agents - const corePath = getModulePath('core'); - if (await fs.pathExists(path.join(corePath, 'agents'))) { - const coreAgents = await getAgentsFromDir(path.join(corePath, 'agents'), 'core'); - agents.push(...coreAgents); - } - - // Add module agents - for (const moduleName of selectedModules) { - const modulePath = path.join(sourceDir, moduleName); - const agentsPath = path.join(modulePath, 'agents'); - - if (await fs.pathExists(agentsPath)) { - const moduleAgents = await getAgentsFromDir(agentsPath, moduleName); - agents.push(...moduleAgents); - } - } - - return agents; - } - - /** - * Process module injections with pre-collected configuration - */ - async processModuleInjectionsWithConfig(projectDir, bmadDir, options, preCollectedConfig) { - // Get list of installed modules - const modules = options.selectedModules || []; - const { subagentChoices, installLocation } = preCollectedConfig; - - // Get the actual source directory (not the installation directory) - await this.processModuleInjectionsInternal({ - projectDir, - modules, - handler: 'claude-code', - subagentChoices, - installLocation, - interactive: false, - }); - } - - /** - * Process Claude Code specific injections for installed modules - * Looks for injections.yaml in each module's claude-code sub-module - */ - async processModuleInjections(projectDir, bmadDir, options) { - // Get list of installed modules - const modules = options.selectedModules || []; - let subagentChoices = null; - let installLocation = null; - - // Get the actual source directory (not the installation directory) - const { subagentChoices: updatedChoices, installLocation: updatedLocation } = await this.processModuleInjectionsInternal({ - projectDir, - modules, - handler: 'claude-code', - subagentChoices, - installLocation, - interactive: true, - }); - - if (updatedChoices) { - subagentChoices = updatedChoices; - } - if (updatedLocation) { - installLocation = updatedLocation; - } - } - - async processModuleInjectionsInternal({ projectDir, modules, handler, subagentChoices, installLocation, interactive = false }) { - let choices = subagentChoices; - let location = installLocation; - - for (const moduleName of modules) { - const configData = await loadModuleInjectionConfig(handler, moduleName); - - if (!configData) { - continue; - } - - const { config, handlerBaseDir } = configData; - - if (interactive) { - console.log(chalk.cyan(`\nConfiguring ${moduleName} ${handler.replace('-', ' ')} features...`)); - } - - if (interactive && config.subagents && !choices) { - // choices = await this.promptSubagentInstallation(config.subagents); - // if (choices.install !== 'none') { - // location = await this.promptInstallLocation(); - // } - } - - if (config.injections && choices && choices.install !== 'none') { - for (const injection of config.injections) { - if (shouldApplyInjection(injection, choices)) { - await this.injectContent(projectDir, injection, choices); - } - } - } - - if (config.subagents && choices && choices.install !== 'none') { - await this.copySelectedSubagents(projectDir, handlerBaseDir, config.subagents, choices, location || 'project'); - } - } - - return { subagentChoices: choices, installLocation: location }; - } - - /** - * Prompt user for subagent installation preferences - */ - async promptSubagentInstallation(subagentConfig) { - // First ask if they want to install subagents - const install = await prompts.select({ - message: 'Would you like to install Claude Code subagents for enhanced functionality?', - choices: [ - { name: 'Yes, install all subagents', value: 'all' }, - { name: 'Yes, let me choose specific subagents', value: 'selective' }, - { name: 'No, skip subagent installation', value: 'none' }, - ], - default: 'all', - }); - - if (install === 'selective') { - // Show list of available subagents with descriptions - const subagentInfo = { - 'market-researcher.md': 'Market research and competitive analysis', - 'requirements-analyst.md': 'Requirements extraction and validation', - 'technical-evaluator.md': 'Technology stack evaluation', - 'epic-optimizer.md': 'Epic and story breakdown optimization', - 'document-reviewer.md': 'Document quality review', - }; - - const selected = await prompts.multiselect({ - message: `Select subagents to install ${chalk.dim('(↑/↓ navigates multiselect, SPACE toggles, A to toggles All, ENTER confirm)')}:`, - options: subagentConfig.files.map((file) => ({ - label: `${file.replace('.md', '')} - ${subagentInfo[file] || 'Specialized assistant'}`, - value: file, - })), - initialValues: subagentConfig.files, - }); - - return { install: 'selective', selected }; - } - - return { install }; - } - - /** - * Inject content at specified point in file - */ - async injectContent(projectDir, injection, subagentChoices = null) { - const targetPath = path.join(projectDir, injection.file); - - if (await this.exists(targetPath)) { - let content = await fs.readFile(targetPath, 'utf8'); - const marker = ``; - - if (content.includes(marker)) { - let injectionContent = injection.content; - - // Filter content if selective subagents chosen - if (subagentChoices && subagentChoices.install === 'selective' && injection.point === 'pm-agent-instructions') { - injectionContent = filterAgentInstructions(injection.content, subagentChoices.selected); - } - - content = content.replace(marker, injectionContent); - await fs.writeFile(targetPath, content); - console.log(chalk.dim(` Injected: ${injection.point} → ${injection.file}`)); - } - } - } - - /** - * Copy selected subagents to appropriate Claude agents directory - */ - async copySelectedSubagents(projectDir, handlerBaseDir, subagentConfig, choices, location) { - const os = require('node:os'); - - // Determine target directory based on user choice - let targetDir; - if (location === 'user') { - targetDir = path.join(os.homedir(), '.claude', 'agents'); - console.log(chalk.dim(` Installing subagents globally to: ~/.claude/agents/`)); - } else { - targetDir = path.join(projectDir, '.claude', 'agents'); - console.log(chalk.dim(` Installing subagents to project: .claude/agents/`)); - } - - // Ensure target directory exists - await this.ensureDir(targetDir); - - const resolvedFiles = await resolveSubagentFiles(handlerBaseDir, subagentConfig, choices); - - let copiedCount = 0; - for (const resolved of resolvedFiles) { - try { - const sourcePath = resolved.absolutePath; - - const subFolder = path.dirname(resolved.relativePath); - let targetPath; - if (subFolder && subFolder !== '.') { - const targetSubDir = path.join(targetDir, subFolder); - await this.ensureDir(targetSubDir); - targetPath = path.join(targetSubDir, path.basename(resolved.file)); - } else { - targetPath = path.join(targetDir, path.basename(resolved.file)); - } - - await fs.copyFile(sourcePath, targetPath); - console.log(chalk.green(` ✓ Installed: ${subFolder === '.' ? '' : `${subFolder}/`}${path.basename(resolved.file, '.md')}`)); - copiedCount++; - } catch (error) { - console.log(chalk.yellow(` ⚠ Error copying ${resolved.file}: ${error.message}`)); - } - } - - if (copiedCount > 0) { - console.log(chalk.dim(` Total subagents installed: ${copiedCount}`)); - } - } - - /** - * Install a custom agent launcher for Claude Code - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object|null} Info about created command - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - const commandsDir = path.join(projectDir, this.configDir, this.commandsDir); - - if (!(await this.exists(path.join(projectDir, this.configDir)))) { - return null; // IDE not configured for this project - } - - await this.ensureDir(commandsDir); - - const launcherContent = `--- -name: '${agentName}' -description: '${agentName} agent' ---- - -You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. - - -1. LOAD the FULL agent file from @${agentPath} -2. READ its entire contents - this contains the complete agent persona, menu, and instructions -3. FOLLOW every step in the section precisely -4. DISPLAY the welcome/greeting as instructed -5. PRESENT the numbered menu -6. WAIT for user input before proceeding - -`; - - // Use colon format: bmad:custom:agents:fred-commit-poet.md - // Written directly to commands dir (no bmad subfolder) - const launcherName = customAgentColonName(agentName); - const launcherPath = path.join(commandsDir, launcherName); - await this.writeFile(launcherPath, launcherContent); - - return { - path: launcherPath, - command: `/${launcherName.replace('.md', '')}`, - }; - } -} - -module.exports = { ClaudeCodeSetup }; diff --git a/tools/cli/installers/lib/ide/cline.js b/tools/cli/installers/lib/ide/cline.js deleted file mode 100644 index 07e674ba..00000000 --- a/tools/cli/installers/lib/ide/cline.js +++ /dev/null @@ -1,272 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const chalk = require('chalk'); -const { BaseIdeSetup } = require('./_base-ide'); -const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator'); -const { AgentCommandGenerator } = require('./shared/agent-command-generator'); -const { TaskToolCommandGenerator } = require('./shared/task-tool-command-generator'); -const { getAgentsFromBmad, getTasksFromBmad } = require('./shared/bmad-artifacts'); -const { toDashPath, customAgentDashName } = require('./shared/path-utils'); - -/** - * Cline IDE setup handler - * Installs BMAD artifacts to .clinerules/workflows with flattened naming - */ -class ClineSetup extends BaseIdeSetup { - constructor() { - super('cline', 'Cline', false); - this.configDir = '.clinerules'; - this.workflowsDir = 'workflows'; - } - - /** - * Setup Cline IDE configuration - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Object} options - Setup options - */ - async setup(projectDir, bmadDir, options = {}) { - console.log(chalk.cyan(`Setting up ${this.name}...`)); - - // Create .clinerules/workflows directory - const clineDir = path.join(projectDir, this.configDir); - const workflowsDir = path.join(clineDir, this.workflowsDir); - - await this.ensureDir(workflowsDir); - - // Clear old BMAD files - await this.clearOldBmadFiles(workflowsDir); - - // Collect all artifacts - const { artifacts, counts } = await this.collectClineArtifacts(projectDir, bmadDir, options); - - // Write flattened files - const written = await this.flattenAndWriteArtifacts(artifacts, workflowsDir); - - console.log(chalk.green(`✓ ${this.name} configured:`)); - console.log(chalk.dim(` - ${counts.agents} agents installed`)); - console.log(chalk.dim(` - ${counts.tasks} tasks installed`)); - console.log(chalk.dim(` - ${counts.workflows} workflow commands installed`)); - if (counts.workflowLaunchers > 0) { - console.log(chalk.dim(` - ${counts.workflowLaunchers} workflow launchers installed`)); - } - console.log(chalk.dim(` - ${written} files written to ${path.relative(projectDir, workflowsDir)}`)); - - // Usage instructions - console.log(chalk.yellow('\n ⚠️ How to Use Cline Workflows')); - console.log(chalk.cyan(' BMAD workflows are available as slash commands in Cline')); - console.log(chalk.dim(' Usage:')); - console.log(chalk.dim(' - Type / to see available commands')); - console.log(chalk.dim(' - All BMAD items start with "bmad-"')); - console.log(chalk.dim(' - Example: /bmad-bmm-pm')); - - return { - success: true, - agents: counts.agents, - tasks: counts.tasks, - workflows: counts.workflows, - workflowLaunchers: counts.workflowLaunchers, - written, - }; - } - - /** - * Detect Cline installation by checking for .clinerules/workflows directory - */ - async detect(projectDir) { - const workflowsDir = path.join(projectDir, this.configDir, this.workflowsDir); - - if (!(await fs.pathExists(workflowsDir))) { - return false; - } - - const entries = await fs.readdir(workflowsDir); - return entries.some((entry) => entry.startsWith('bmad-')); - } - - /** - * Collect all artifacts for Cline export - */ - async collectClineArtifacts(projectDir, bmadDir, options = {}) { - const selectedModules = options.selectedModules || []; - const artifacts = []; - - // Generate agent launchers - const agentGen = new AgentCommandGenerator(this.bmadFolderName); - const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, selectedModules); - - // Process agent launchers with project-specific paths - for (const agentArtifact of agentArtifacts) { - const content = agentArtifact.content; - - artifacts.push({ - type: 'agent', - module: agentArtifact.module, - sourcePath: agentArtifact.sourcePath, - relativePath: agentArtifact.relativePath, - content, - }); - } - - // Get tasks - const tasks = await getTasksFromBmad(bmadDir, selectedModules); - for (const task of tasks) { - const content = await this.readAndProcessWithProject( - task.path, - { - module: task.module, - name: task.name, - }, - projectDir, - ); - - artifacts.push({ - type: 'task', - module: task.module, - sourcePath: task.path, - relativePath: path.join(task.module, 'tasks', `${task.name}.md`), - content, - }); - } - - // Get workflows - const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName); - const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir); - artifacts.push(...workflowArtifacts); - - return { - artifacts, - counts: { - agents: agentArtifacts.length, - tasks: tasks.length, - workflows: workflowCounts.commands, - workflowLaunchers: workflowCounts.launchers, - }, - }; - } - - /** - * Flatten file path to bmad-module-type-name.md format - * Uses shared toDashPath utility - */ - flattenFilename(relativePath) { - return toDashPath(relativePath); - } - - /** - * Write all artifacts with flattened names - */ - async flattenAndWriteArtifacts(artifacts, destDir) { - let written = 0; - - for (const artifact of artifacts) { - const flattenedName = this.flattenFilename(artifact.relativePath); - const targetPath = path.join(destDir, flattenedName); - await fs.writeFile(targetPath, artifact.content); - written++; - } - - return written; - } - - /** - * Clear old BMAD files from the workflows directory - */ - async clearOldBmadFiles(destDir) { - if (!(await fs.pathExists(destDir))) { - return; - } - - const entries = await fs.readdir(destDir); - - for (const entry of entries) { - if (!entry.startsWith('bmad-')) { - continue; - } - - const entryPath = path.join(destDir, entry); - const stat = await fs.stat(entryPath); - if (stat.isFile()) { - await fs.remove(entryPath); - } else if (stat.isDirectory()) { - await fs.remove(entryPath); - } - } - } - - /** - * Read and process file with project-specific paths - */ - async readAndProcessWithProject(filePath, metadata, projectDir) { - const content = await fs.readFile(filePath, 'utf8'); - return super.processContent(content, metadata, projectDir); - } - - /** - * Cleanup Cline configuration - */ - async cleanup(projectDir) { - const workflowsDir = path.join(projectDir, this.configDir, this.workflowsDir); - await this.clearOldBmadFiles(workflowsDir); - console.log(chalk.dim(`Removed ${this.name} BMAD configuration`)); - } - - /** - * Install a custom agent launcher for Cline - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object} Installation result - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - const clineDir = path.join(projectDir, this.configDir); - const workflowsDir = path.join(clineDir, this.workflowsDir); - - // Create .clinerules/workflows directory if it doesn't exist - await fs.ensureDir(workflowsDir); - - // Create custom agent launcher workflow - const launcherContent = `name: ${agentName} -description: Custom BMAD agent: ${agentName} - -# ${agentName} Custom Agent - -**⚠️ IMPORTANT**: Run @${agentPath} first to load the complete agent! - -This is a launcher for the custom BMAD agent "${agentName}". - -## Usage -1. First run: \`${agentPath}\` to load the complete agent -2. Then use this workflow as ${agentName} - -The agent will follow the persona and instructions from the main agent file. - ---- - -*Generated by BMAD Method*`; - - // Use dash format: bmad-custom-agents-fred-commit-poet.md - const fileName = customAgentDashName(agentName); - const launcherPath = path.join(workflowsDir, fileName); - - // Write the launcher file - await fs.writeFile(launcherPath, launcherContent, 'utf8'); - - return { - ide: 'cline', - path: path.relative(projectDir, launcherPath), - command: fileName.replace('.md', ''), - type: 'custom-agent-launcher', - }; - } - - /** - * Utility: Ensure directory exists - */ - async ensureDir(dirPath) { - await fs.ensureDir(dirPath); - } -} - -module.exports = { ClineSetup }; diff --git a/tools/cli/installers/lib/ide/codex.js b/tools/cli/installers/lib/ide/codex.js index 0002b5ed..60250a39 100644 --- a/tools/cli/installers/lib/ide/codex.js +++ b/tools/cli/installers/lib/ide/codex.js @@ -86,7 +86,7 @@ class CodexSetup extends BaseIdeSetup { await fs.ensureDir(destDir); await this.clearOldBmadFiles(destDir); - // Collect artifacts and write using DASH format + // Collect artifacts and write using underscore format const agentGen = new AgentCommandGenerator(this.bmadFolderName); const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []); const agentCount = await agentGen.writeDashArtifacts(destDir, agentArtifacts); @@ -115,7 +115,7 @@ class CodexSetup extends BaseIdeSetup { const { artifacts: workflowArtifacts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir); const workflowCount = await workflowGenerator.writeDashArtifacts(destDir, workflowArtifacts); - // Also write tasks using dash format + // Also write tasks using underscore format const ttGen = new TaskToolCommandGenerator(); const tasksWritten = await ttGen.writeDashArtifacts(destDir, taskArtifacts); @@ -154,17 +154,25 @@ class CodexSetup extends BaseIdeSetup { // Check global location if (await fs.pathExists(globalDir)) { - const entries = await fs.readdir(globalDir); - if (entries.some((entry) => entry.startsWith('bmad-'))) { - return true; + try { + const entries = await fs.readdir(globalDir); + if (entries && entries.some((entry) => entry && typeof entry === 'string' && entry.startsWith('bmad'))) { + return true; + } + } catch { + // Ignore errors } } // Check project-specific location if (await fs.pathExists(projectSpecificDir)) { - const entries = await fs.readdir(projectSpecificDir); - if (entries.some((entry) => entry.startsWith('bmad-'))) { - return true; + try { + const entries = await fs.readdir(projectSpecificDir); + if (entries && entries.some((entry) => entry && typeof entry === 'string' && entry.startsWith('bmad'))) { + return true; + } + } catch { + // Ignore errors } } @@ -253,19 +261,39 @@ class CodexSetup extends BaseIdeSetup { return; } - const entries = await fs.readdir(destDir); + let entries; + try { + entries = await fs.readdir(destDir); + } catch (error) { + // Directory exists but can't be read - skip cleanup + console.warn(chalk.yellow(`Warning: Could not read directory ${destDir}: ${error.message}`)); + return; + } + + if (!entries || !Array.isArray(entries)) { + return; + } for (const entry of entries) { - if (!entry.startsWith('bmad-')) { + // Skip non-strings or undefined entries + if (!entry || typeof entry !== 'string') { + continue; + } + if (!entry.startsWith('bmad')) { continue; } const entryPath = path.join(destDir, entry); - const stat = await fs.stat(entryPath); - if (stat.isFile()) { - await fs.remove(entryPath); - } else if (stat.isDirectory()) { - await fs.remove(entryPath); + try { + const stat = await fs.stat(entryPath); + if (stat.isFile()) { + await fs.remove(entryPath); + } else if (stat.isDirectory()) { + await fs.remove(entryPath); + } + } catch (error) { + // Skip files that can't be processed + console.warn(chalk.dim(` Skipping ${entry}: ${error.message}`)); } } } @@ -292,7 +320,7 @@ class CodexSetup extends BaseIdeSetup { chalk.dim(" To use with other projects, you'd need to copy the _bmad dir"), '', chalk.green(' ✓ You can now use /commands in Codex CLI'), - chalk.dim(' Example: /bmad-bmm-pm'), + chalk.dim(' Example: /bmad_bmm_pm'), chalk.dim(' Type / to see all available commands'), '', chalk.bold.cyan('═'.repeat(70)), @@ -397,7 +425,7 @@ You must fully embody this agent's persona and follow all activation instruction `; - // Use dash format: bmad-custom-agents-fred-commit-poet.md + // Use underscore format: bmad_custom_fred-commit-poet.md const fileName = customAgentDashName(agentName); const launcherPath = path.join(destDir, fileName); await fs.writeFile(launcherPath, launcherContent, 'utf8'); diff --git a/tools/cli/installers/lib/ide/crush.js b/tools/cli/installers/lib/ide/crush.js deleted file mode 100644 index 7bf04164..00000000 --- a/tools/cli/installers/lib/ide/crush.js +++ /dev/null @@ -1,149 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const { BaseIdeSetup } = require('./_base-ide'); -const chalk = require('chalk'); -const { AgentCommandGenerator } = require('./shared/agent-command-generator'); -const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator'); -const { TaskToolCommandGenerator } = require('./shared/task-tool-command-generator'); -const { customAgentColonName } = require('./shared/path-utils'); - -/** - * Crush IDE setup handler - * Creates commands in .crush/commands/ directory structure using flat colon naming - */ -class CrushSetup extends BaseIdeSetup { - constructor() { - super('crush', 'Crush'); - this.configDir = '.crush'; - this.commandsDir = 'commands'; - } - - /** - * Setup Crush IDE configuration - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Object} options - Setup options - */ - async setup(projectDir, bmadDir, options = {}) { - console.log(chalk.cyan(`Setting up ${this.name}...`)); - - // Clean up old BMAD installation first - await this.cleanup(projectDir); - - // Create .crush/commands directory - const crushDir = path.join(projectDir, this.configDir); - const commandsDir = path.join(crushDir, this.commandsDir); - await this.ensureDir(commandsDir); - - // Use colon format: files written directly to commands dir (no bmad subfolder) - // Creates: .crush/commands/bmad:bmm:pm.md - - // Generate agent launchers - const agentGen = new AgentCommandGenerator(this.bmadFolderName); - const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []); - - // Write agent launcher files using flat colon naming - // Creates files like: bmad:bmm:pm.md - const agentCount = await agentGen.writeColonArtifacts(commandsDir, agentArtifacts); - - // Get ALL workflows using the new workflow command generator - const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName); - const { artifacts: workflowArtifacts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir); - - // Write workflow-command artifacts using flat colon naming - // Creates files like: bmad:bmm:correct-course.md - const workflowCount = await workflowGenerator.writeColonArtifacts(commandsDir, workflowArtifacts); - - // Generate task and tool commands using flat colon naming - const taskToolGen = new TaskToolCommandGenerator(); - const taskToolResult = await taskToolGen.generateColonTaskToolCommands(projectDir, bmadDir, commandsDir); - - console.log(chalk.green(`✓ ${this.name} configured:`)); - console.log(chalk.dim(` - ${agentCount} agent commands created`)); - console.log(chalk.dim(` - ${taskToolResult.tasks} task commands created`)); - console.log(chalk.dim(` - ${taskToolResult.tools} tool commands created`)); - console.log(chalk.dim(` - ${workflowCount} workflow commands created`)); - console.log(chalk.dim(` - Commands directory: ${path.relative(projectDir, commandsDir)}`)); - console.log(chalk.dim('\n Commands can be accessed via Crush command palette')); - - return { - success: true, - agents: agentCount, - tasks: taskToolResult.tasks || 0, - tools: taskToolResult.tools || 0, - workflows: workflowCount, - }; - } - - /** - * Cleanup Crush configuration - */ - async cleanup(projectDir) { - const commandsDir = path.join(projectDir, this.configDir, this.commandsDir); - - // Remove any bmad:* files from the commands directory - if (await fs.pathExists(commandsDir)) { - const entries = await fs.readdir(commandsDir); - for (const entry of entries) { - if (entry.startsWith('bmad:')) { - await fs.remove(path.join(commandsDir, entry)); - } - } - } - // Also remove legacy bmad folder if it exists - const bmadFolder = path.join(commandsDir, 'bmad'); - if (await fs.pathExists(bmadFolder)) { - await fs.remove(bmadFolder); - console.log(chalk.dim(`Removed BMAD commands from Crush`)); - } - } - - /** - * Install a custom agent launcher for Crush - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object} Installation result - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - const commandsDir = path.join(projectDir, this.configDir, this.commandsDir); - - // Create .crush/commands directory if it doesn't exist - await fs.ensureDir(commandsDir); - - // Create custom agent launcher - const launcherContent = `# ${agentName} Custom Agent - -**⚠️ IMPORTANT**: Run @${agentPath} first to load the complete agent! - -This is a launcher for the custom BMAD agent "${agentName}". - -## Usage -1. First run: \`${agentPath}\` to load the complete agent -2. Then use this command to activate ${agentName} - -The agent will follow the persona and instructions from the main agent file. - ---- - -*Generated by BMAD Method*`; - - // Use colon format: bmad:custom:agents:fred-commit-poet.md - // Written directly to commands dir (no bmad subfolder) - const launcherName = customAgentColonName(agentName); - const launcherPath = path.join(commandsDir, launcherName); - - // Write the launcher file - await fs.writeFile(launcherPath, launcherContent, 'utf8'); - - return { - ide: 'crush', - path: path.relative(projectDir, launcherPath), - command: launcherName.replace('.md', ''), - type: 'custom-agent-launcher', - }; - } -} - -module.exports = { CrushSetup }; diff --git a/tools/cli/installers/lib/ide/cursor.js b/tools/cli/installers/lib/ide/cursor.js deleted file mode 100644 index 53113e05..00000000 --- a/tools/cli/installers/lib/ide/cursor.js +++ /dev/null @@ -1,160 +0,0 @@ -const path = require('node:path'); -const { BaseIdeSetup } = require('./_base-ide'); -const chalk = require('chalk'); -const { AgentCommandGenerator } = require('./shared/agent-command-generator'); -const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator'); -const { TaskToolCommandGenerator } = require('./shared/task-tool-command-generator'); -const { customAgentColonName } = require('./shared/path-utils'); - -/** - * Cursor IDE setup handler - */ -class CursorSetup extends BaseIdeSetup { - constructor() { - super('cursor', 'Cursor', true); // preferred IDE - this.configDir = '.cursor'; - this.rulesDir = 'rules'; - this.commandsDir = 'commands'; - } - - /** - * Cleanup old BMAD installation before reinstalling - * @param {string} projectDir - Project directory - */ - async cleanup(projectDir) { - const fs = require('fs-extra'); - const commandsDir = path.join(projectDir, this.configDir, this.commandsDir); - - // Remove any bmad:* files from the commands directory - if (await fs.pathExists(commandsDir)) { - const entries = await fs.readdir(commandsDir); - for (const entry of entries) { - if (entry.startsWith('bmad:')) { - await fs.remove(path.join(commandsDir, entry)); - } - } - } - // Also remove legacy bmad folder if it exists - const bmadFolder = path.join(commandsDir, 'bmad'); - if (await fs.pathExists(bmadFolder)) { - await fs.remove(bmadFolder); - console.log(chalk.dim(` Removed old BMAD commands from ${this.name}`)); - } - } - - /** - * Setup Cursor IDE configuration - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Object} options - Setup options - */ - async setup(projectDir, bmadDir, options = {}) { - console.log(chalk.cyan(`Setting up ${this.name}...`)); - - // Clean up old BMAD installation first - await this.cleanup(projectDir); - - // Create .cursor/commands directory structure - const cursorDir = path.join(projectDir, this.configDir); - const commandsDir = path.join(cursorDir, this.commandsDir); - await this.ensureDir(commandsDir); - - // Use colon format: files written directly to commands dir (no bmad subfolder) - // Creates: .cursor/commands/bmad:bmm:pm.md - - // Generate agent launchers using AgentCommandGenerator - // This creates small launcher files that reference the actual agents in _bmad/ - const agentGen = new AgentCommandGenerator(this.bmadFolderName); - const { artifacts: agentArtifacts, counts: agentCounts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []); - - // Write agent launcher files using flat colon naming - // Creates files like: bmad:bmm:pm.md - const agentCount = await agentGen.writeColonArtifacts(commandsDir, agentArtifacts); - - // Generate workflow commands from manifest (if it exists) - const workflowGen = new WorkflowCommandGenerator(this.bmadFolderName); - const { artifacts: workflowArtifacts } = await workflowGen.collectWorkflowArtifacts(bmadDir); - - // Write workflow-command artifacts using flat colon naming - // Creates files like: bmad:bmm:correct-course.md - const workflowCommandCount = await workflowGen.writeColonArtifacts(commandsDir, workflowArtifacts); - - // Generate task and tool commands from manifests (if they exist) - const taskToolGen = new TaskToolCommandGenerator(); - const taskToolResult = await taskToolGen.generateColonTaskToolCommands(projectDir, bmadDir, commandsDir); - - console.log(chalk.green(`✓ ${this.name} configured:`)); - console.log(chalk.dim(` - ${agentCount} agents installed`)); - if (workflowCommandCount > 0) { - console.log(chalk.dim(` - ${workflowCommandCount} workflow commands generated`)); - } - if (taskToolResult.generated > 0) { - console.log( - chalk.dim( - ` - ${taskToolResult.generated} task/tool commands generated (${taskToolResult.tasks} tasks, ${taskToolResult.tools} tools)`, - ), - ); - } - console.log(chalk.dim(` - Commands directory: ${path.relative(projectDir, commandsDir)}`)); - - return { - success: true, - agents: agentCount, - tasks: taskToolResult.tasks || 0, - tools: taskToolResult.tools || 0, - workflows: workflowCommandCount, - }; - } - - /** - * Install a custom agent launcher for Cursor - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object|null} Info about created command - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - const commandsDir = path.join(projectDir, this.configDir, this.commandsDir); - - if (!(await this.exists(path.join(projectDir, this.configDir)))) { - return null; // IDE not configured for this project - } - - await this.ensureDir(commandsDir); - - const launcherContent = `You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. - - -1. LOAD the FULL agent file from @${agentPath} -2. READ its entire contents - this contains the complete agent persona, menu, and instructions -3. FOLLOW every step in the section precisely -4. DISPLAY the welcome/greeting as instructed -5. PRESENT the numbered menu -6. WAIT for user input before proceeding - -`; - - // Cursor uses YAML frontmatter matching Claude Code format - const commandContent = `--- -name: '${agentName}' -description: '${agentName} agent' ---- - -${launcherContent} -`; - - // Use colon format: bmad:custom:agents:fred-commit-poet.md - // Written directly to commands dir (no bmad subfolder) - const launcherName = customAgentColonName(agentName); - const launcherPath = path.join(commandsDir, launcherName); - await this.writeFile(launcherPath, commandContent); - - return { - path: launcherPath, - command: `/${launcherName.replace('.md', '')}`, - }; - } -} - -module.exports = { CursorSetup }; diff --git a/tools/cli/installers/lib/ide/gemini.js b/tools/cli/installers/lib/ide/gemini.js deleted file mode 100644 index 82746abf..00000000 --- a/tools/cli/installers/lib/ide/gemini.js +++ /dev/null @@ -1,301 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const yaml = require('yaml'); -const { BaseIdeSetup } = require('./_base-ide'); -const chalk = require('chalk'); -const { AgentCommandGenerator } = require('./shared/agent-command-generator'); -const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator'); - -/** - * Gemini CLI setup handler - * Creates TOML files in .gemini/commands/ structure - */ -class GeminiSetup extends BaseIdeSetup { - constructor() { - super('gemini', 'Gemini CLI', false); - this.configDir = '.gemini'; - this.commandsDir = 'commands'; - this.agentTemplatePath = path.join(__dirname, 'templates', 'gemini-agent-command.toml'); - this.taskTemplatePath = path.join(__dirname, 'templates', 'gemini-task-command.toml'); - } - - /** - * Load config values from bmad installation - * @param {string} bmadDir - BMAD installation directory - * @returns {Object} Config values - */ - async loadConfigValues(bmadDir) { - const configValues = { - user_name: 'User', // Default fallback - }; - - // Try to load core config.yaml - const coreConfigPath = path.join(bmadDir, 'core', 'config.yaml'); - if (await fs.pathExists(coreConfigPath)) { - try { - const configContent = await fs.readFile(coreConfigPath, 'utf8'); - const config = yaml.parse(configContent); - - if (config.user_name) { - configValues.user_name = config.user_name; - } - } catch (error) { - console.warn(chalk.yellow(` Warning: Could not load config values: ${error.message}`)); - } - } - - return configValues; - } - - /** - * Setup Gemini CLI configuration - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Object} options - Setup options - */ - async setup(projectDir, bmadDir, options = {}) { - console.log(chalk.cyan(`Setting up ${this.name}...`)); - - // Create .gemini/commands directory (flat structure with bmad- prefix) - const geminiDir = path.join(projectDir, this.configDir); - const commandsDir = path.join(geminiDir, this.commandsDir); - - await this.ensureDir(commandsDir); - - // Clean up any existing BMAD files before reinstalling - await this.cleanup(projectDir); - - // Generate agent launchers - const agentGen = new AgentCommandGenerator(this.bmadFolderName); - const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []); - - // Get tasks and workflows (ALL workflows now generate commands) - const tasks = await this.getTasks(bmadDir); - - // Get ALL workflows using the new workflow command generator - const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName); - const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir); - - // Install agents as TOML files with bmad- prefix (flat structure) - let agentCount = 0; - for (const artifact of agentArtifacts) { - const tomlContent = await this.createAgentLauncherToml(artifact); - - // Flat structure: bmad-agent-{module}-{name}.toml - const tomlPath = path.join(commandsDir, `bmad-agent-${artifact.module}-${artifact.name}.toml`); - await this.writeFile(tomlPath, tomlContent); - agentCount++; - - console.log(chalk.green(` ✓ Added agent: /bmad:agents:${artifact.module}:${artifact.name}`)); - } - - // Install tasks as TOML files with bmad- prefix (flat structure) - let taskCount = 0; - for (const task of tasks) { - const content = await this.readFile(task.path); - const tomlContent = await this.createTaskToml(task, content); - - // Flat structure: bmad-task-{module}-{name}.toml - const tomlPath = path.join(commandsDir, `bmad-task-${task.module}-${task.name}.toml`); - await this.writeFile(tomlPath, tomlContent); - taskCount++; - - console.log(chalk.green(` ✓ Added task: /bmad:tasks:${task.module}:${task.name}`)); - } - - // Install workflows as TOML files with bmad- prefix (flat structure) - let workflowCount = 0; - for (const artifact of workflowArtifacts) { - if (artifact.type === 'workflow-command') { - // Create TOML wrapper around workflow command content - const tomlContent = await this.createWorkflowToml(artifact); - - // Flat structure: bmad-workflow-{module}-{name}.toml - const workflowName = path.basename(artifact.relativePath, '.md'); - const tomlPath = path.join(commandsDir, `bmad-workflow-${artifact.module}-${workflowName}.toml`); - await this.writeFile(tomlPath, tomlContent); - workflowCount++; - - console.log(chalk.green(` ✓ Added workflow: /bmad:workflows:${artifact.module}:${workflowName}`)); - } - } - - console.log(chalk.green(`✓ ${this.name} configured:`)); - console.log(chalk.dim(` - ${agentCount} agents configured`)); - console.log(chalk.dim(` - ${taskCount} tasks configured`)); - console.log(chalk.dim(` - ${workflowCount} workflows configured`)); - console.log(chalk.dim(` - Commands directory: ${path.relative(projectDir, commandsDir)}`)); - console.log(chalk.dim(` - Agent activation: /bmad:agents:{agent-name}`)); - console.log(chalk.dim(` - Task activation: /bmad:tasks:{task-name}`)); - console.log(chalk.dim(` - Workflow activation: /bmad:workflows:{workflow-name}`)); - - return { - success: true, - agents: agentCount, - tasks: taskCount, - workflows: workflowCount, - }; - } - - /** - * Create agent launcher TOML content from artifact - */ - async createAgentLauncherToml(artifact) { - // Strip frontmatter from launcher content - const frontmatterRegex = /^---\s*\n[\s\S]*?\n---\s*\n/; - const contentWithoutFrontmatter = artifact.content.replace(frontmatterRegex, '').trim(); - - // Extract title from launcher frontmatter - const titleMatch = artifact.content.match(/description:\s*"([^"]+)"/); - const title = titleMatch ? titleMatch[1] : this.formatTitle(artifact.name); - - // Create TOML wrapper around launcher content (without frontmatter) - const description = `BMAD ${artifact.module.toUpperCase()} Agent: ${title}`; - - return `description = "${description}" -prompt = """ -${contentWithoutFrontmatter} -""" -`; - } - - /** - * Create agent TOML content using template - */ - async createAgentToml(agent, content) { - // Extract metadata - const titleMatch = content.match(/title="([^"]+)"/); - const title = titleMatch ? titleMatch[1] : this.formatTitle(agent.name); - - // Load template - const template = await fs.readFile(this.agentTemplatePath, 'utf8'); - - // Replace template variables - // Note: {user_name} and other {config_values} are left as-is for runtime substitution by Gemini - const tomlContent = template - .replaceAll('{{title}}', title) - .replaceAll('{_bmad}', '_bmad') - .replaceAll('{_bmad}', this.bmadFolderName) - .replaceAll('{{module}}', agent.module) - .replaceAll('{{name}}', agent.name); - - return tomlContent; - } - - /** - * Create task TOML content using template - */ - async createTaskToml(task, content) { - // Extract task name from XML if available - const nameMatch = content.match(/([^<]+)<\/name>/); - const taskName = nameMatch ? nameMatch[1] : this.formatTitle(task.name); - - // Load template - const template = await fs.readFile(this.taskTemplatePath, 'utf8'); - - // Replace template variables - const tomlContent = template - .replaceAll('{{taskName}}', taskName) - .replaceAll('{_bmad}', '_bmad') - .replaceAll('{_bmad}', this.bmadFolderName) - .replaceAll('{{module}}', task.module) - .replaceAll('{{filename}}', task.filename); - - return tomlContent; - } - - /** - * Create workflow TOML content from artifact - */ - async createWorkflowToml(artifact) { - // Extract description from artifact content - const descriptionMatch = artifact.content.match(/description:\s*"([^"]+)"/); - const description = descriptionMatch - ? descriptionMatch[1] - : `BMAD ${artifact.module.toUpperCase()} Workflow: ${path.basename(artifact.relativePath, '.md')}`; - - // Strip frontmatter from command content - const frontmatterRegex = /^---\s*\n[\s\S]*?\n---\s*\n/; - const contentWithoutFrontmatter = artifact.content.replace(frontmatterRegex, '').trim(); - - return `description = "${description}" -prompt = """ -${contentWithoutFrontmatter} -""" -`; - } - - /** - * Cleanup Gemini configuration - surgically remove only BMAD files - */ - async cleanup(projectDir) { - const fs = require('fs-extra'); - const commandsDir = path.join(projectDir, this.configDir, this.commandsDir); - - if (await fs.pathExists(commandsDir)) { - // Only remove files that start with bmad- prefix - const files = await fs.readdir(commandsDir); - let removed = 0; - - for (const file of files) { - if (file.startsWith('bmad-') && file.endsWith('.toml')) { - await fs.remove(path.join(commandsDir, file)); - removed++; - } - } - - if (removed > 0) { - console.log(chalk.dim(` Cleaned up ${removed} existing BMAD files`)); - } - } - } - - /** - * Install a custom agent launcher for Gemini - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object} Installation result - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - const geminiDir = path.join(projectDir, this.configDir); - const commandsDir = path.join(geminiDir, this.commandsDir); - - // Create .gemini/commands directory if it doesn't exist - await fs.ensureDir(commandsDir); - - // Create custom agent launcher in TOML format - const launcherContent = `description = "Custom BMAD Agent: ${agentName}" -prompt = """ -**⚠️ IMPORTANT**: Run @${agentPath} first to load the complete agent! - -This is a launcher for the custom BMAD agent "${agentName}". - -## Usage -1. First run: \`${agentPath}\` to load the complete agent -2. Then use this command to activate ${agentName} - -The agent will follow the persona and instructions from the main agent file. - ---- - -*Generated by BMAD Method* -"""`; - - const fileName = `bmad-custom-${agentName.toLowerCase()}.toml`; - const launcherPath = path.join(commandsDir, fileName); - - // Write the launcher file - await fs.writeFile(launcherPath, launcherContent, 'utf8'); - - return { - ide: 'gemini', - path: path.relative(projectDir, launcherPath), - command: agentName, - type: 'custom-agent-launcher', - }; - } -} - -module.exports = { GeminiSetup }; diff --git a/tools/cli/installers/lib/ide/github-copilot.js b/tools/cli/installers/lib/ide/github-copilot.js deleted file mode 100644 index c500a284..00000000 --- a/tools/cli/installers/lib/ide/github-copilot.js +++ /dev/null @@ -1,383 +0,0 @@ -const path = require('node:path'); -const { BaseIdeSetup } = require('./_base-ide'); -const chalk = require('chalk'); -const { AgentCommandGenerator } = require('./shared/agent-command-generator'); -const prompts = require('../../../lib/prompts'); - -/** - * GitHub Copilot setup handler - * Creates agents in .github/agents/ and configures VS Code settings - */ -class GitHubCopilotSetup extends BaseIdeSetup { - constructor() { - super('github-copilot', 'GitHub Copilot', true); // preferred IDE - this.configDir = '.github'; - this.agentsDir = 'agents'; - this.vscodeDir = '.vscode'; - } - - /** - * Collect configuration choices before installation - * @param {Object} options - Configuration options - * @returns {Object} Collected configuration - */ - async collectConfiguration(options = {}) { - const config = {}; - - console.log('\n' + chalk.blue(' 🔧 VS Code Settings Configuration')); - console.log(chalk.dim(' GitHub Copilot works best with specific settings\n')); - - config.vsCodeConfig = await prompts.select({ - message: 'How would you like to configure VS Code settings?', - choices: [ - { name: 'Use recommended defaults (fastest)', value: 'defaults' }, - { name: 'Configure each setting manually', value: 'manual' }, - { name: 'Skip settings configuration', value: 'skip' }, - ], - default: 'defaults', - }); - - if (config.vsCodeConfig === 'manual') { - config.manualSettings = await prompts.prompt([ - { - type: 'input', - name: 'maxRequests', - message: 'Maximum requests per session (1-50)?', - default: '15', - validate: (input) => { - const num = parseInt(input, 10); - if (isNaN(num)) return 'Enter a valid number 1-50'; - if (num < 1 || num > 50) return 'Enter a number between 1-50'; - return true; - }, - }, - { - type: 'confirm', - name: 'runTasks', - message: 'Allow running workspace tasks?', - default: true, - }, - { - type: 'confirm', - name: 'mcpDiscovery', - message: 'Enable MCP server discovery?', - default: true, - }, - { - type: 'confirm', - name: 'autoFix', - message: 'Enable automatic error fixing?', - default: true, - }, - { - type: 'confirm', - name: 'autoApprove', - message: 'Auto-approve tools (less secure)?', - default: false, - }, - ]); - } - - return config; - } - - /** - * Setup GitHub Copilot configuration - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Object} options - Setup options - */ - async setup(projectDir, bmadDir, options = {}) { - console.log(chalk.cyan(`Setting up ${this.name}...`)); - - // Configure VS Code settings using pre-collected config if available - const config = options.preCollectedConfig || {}; - await this.configureVsCodeSettings(projectDir, { ...options, ...config }); - - // Create .github/agents directory - const githubDir = path.join(projectDir, this.configDir); - const agentsDir = path.join(githubDir, this.agentsDir); - await this.ensureDir(agentsDir); - - // Clean up any existing BMAD files before reinstalling - await this.cleanup(projectDir); - - // Generate agent launchers - const agentGen = new AgentCommandGenerator(this.bmadFolderName); - const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []); - - // Create agent files with bmd- prefix - let agentCount = 0; - for (const artifact of agentArtifacts) { - const content = artifact.content; - const agentContent = await this.createAgentContent({ module: artifact.module, name: artifact.name }, content); - - // Use bmd- prefix: bmd-custom-{module}-{name}.agent.md - const targetPath = path.join(agentsDir, `bmd-custom-${artifact.module}-${artifact.name}.agent.md`); - await this.writeFile(targetPath, agentContent); - agentCount++; - - console.log(chalk.green(` ✓ Created agent: bmd-custom-${artifact.module}-${artifact.name}`)); - } - - console.log(chalk.green(`✓ ${this.name} configured:`)); - console.log(chalk.dim(` - ${agentCount} agents created`)); - console.log(chalk.dim(` - Agents directory: ${path.relative(projectDir, agentsDir)}`)); - console.log(chalk.dim(` - VS Code settings configured`)); - console.log(chalk.dim('\n Agents available in VS Code Chat view')); - - return { - success: true, - agents: agentCount, - settings: true, - }; - } - - /** - * Configure VS Code settings for GitHub Copilot - */ - async configureVsCodeSettings(projectDir, options) { - const fs = require('fs-extra'); - const vscodeDir = path.join(projectDir, this.vscodeDir); - const settingsPath = path.join(vscodeDir, 'settings.json'); - - await this.ensureDir(vscodeDir); - - // Read existing settings - let existingSettings = {}; - if (await fs.pathExists(settingsPath)) { - try { - const content = await fs.readFile(settingsPath, 'utf8'); - existingSettings = JSON.parse(content); - console.log(chalk.yellow(' Found existing .vscode/settings.json')); - } catch { - console.warn(chalk.yellow(' Could not parse settings.json, creating new')); - } - } - - // Use pre-collected configuration or skip if not available - let configChoice = options.vsCodeConfig; - if (!configChoice) { - // If no pre-collected config, skip configuration - console.log(chalk.yellow(' ⚠ No configuration collected, skipping VS Code settings')); - return; - } - - if (configChoice === 'skip') { - console.log(chalk.yellow(' ⚠ Skipping VS Code settings')); - return; - } - - let bmadSettings = {}; - - if (configChoice === 'defaults') { - bmadSettings = { - 'chat.agent.enabled': true, - 'chat.agent.maxRequests': 15, - 'github.copilot.chat.agent.runTasks': true, - 'chat.mcp.discovery.enabled': true, - 'github.copilot.chat.agent.autoFix': true, - 'chat.tools.autoApprove': false, - }; - console.log(chalk.green(' ✓ Using recommended defaults')); - } else { - // Manual configuration - use pre-collected settings - const manual = options.manualSettings || {}; - - const maxRequests = parseInt(manual.maxRequests || '15', 10); - bmadSettings = { - 'chat.agent.enabled': true, - 'chat.agent.maxRequests': isNaN(maxRequests) ? 15 : maxRequests, - 'github.copilot.chat.agent.runTasks': manual.runTasks === undefined ? true : manual.runTasks, - 'chat.mcp.discovery.enabled': manual.mcpDiscovery === undefined ? true : manual.mcpDiscovery, - 'github.copilot.chat.agent.autoFix': manual.autoFix === undefined ? true : manual.autoFix, - 'chat.tools.autoApprove': manual.autoApprove || false, - }; - } - - // Merge settings (existing take precedence) - const mergedSettings = { ...bmadSettings, ...existingSettings }; - - // Write settings - await fs.writeFile(settingsPath, JSON.stringify(mergedSettings, null, 2)); - console.log(chalk.green(' ✓ VS Code settings configured')); - } - - /** - * Create agent content - */ - async createAgentContent(agent, content) { - // Extract metadata from launcher frontmatter if present - const descMatch = content.match(/description:\s*"([^"]+)"/); - const title = descMatch ? descMatch[1] : this.formatTitle(agent.name); - - const description = `Activates the ${title} agent persona.`; - - // Strip any existing frontmatter from the content - const frontmatterRegex = /^---\s*\n[\s\S]*?\n---\s*\n/; - let cleanContent = content; - if (frontmatterRegex.test(content)) { - cleanContent = content.replace(frontmatterRegex, '').trim(); - } - - // Available GitHub Copilot tools (November 2025 - Official VS Code Documentation) - // Reference: https://code.visualstudio.com/docs/copilot/reference/copilot-vscode-features#_chat-tools - const tools = [ - 'changes', // List of source control changes - 'edit', // Edit files in your workspace including: createFile, createDirectory, editNotebook, newJupyterNotebook and editFiles - 'fetch', // Fetch content from web page - 'githubRepo', // Perform code search in GitHub repo - 'problems', // Add workspace issues from Problems panel - 'runCommands', // Runs commands in the terminal including: getTerminalOutput, terminalSelection, terminalLastCommand and runInTerminal - 'runTasks', // Runs tasks and gets their output for your workspace - 'runTests', // Run unit tests in workspace - 'search', // Search and read files in your workspace, including:fileSearch, textSearch, listDirectory, readFile, codebase and searchResults - 'runSubagent', // Runs a task within an isolated subagent context. Enables efficient organization of tasks and context window management. - 'testFailure', // Get unit test failure information - 'todos', // Tool for managing and tracking todo items for task planning - 'usages', // Find references and navigate definitions - ]; - - let agentContent = `--- -description: "${description.replaceAll('"', String.raw`\"`)}" -tools: ${JSON.stringify(tools)} ---- - -# ${title} Agent - -${cleanContent} - -`; - - return agentContent; - } - - /** - * Format name as title - */ - formatTitle(name) { - return name - .split('-') - .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) - .join(' '); - } - - /** - * Cleanup GitHub Copilot configuration - surgically remove only BMAD files - */ - async cleanup(projectDir) { - const fs = require('fs-extra'); - - // Clean up old chatmodes directory - const chatmodesDir = path.join(projectDir, this.configDir, 'chatmodes'); - if (await fs.pathExists(chatmodesDir)) { - const files = await fs.readdir(chatmodesDir); - let removed = 0; - - for (const file of files) { - if (file.startsWith('bmad-') && file.endsWith('.chatmode.md')) { - await fs.remove(path.join(chatmodesDir, file)); - removed++; - } - } - - if (removed > 0) { - console.log(chalk.dim(` Cleaned up ${removed} old BMAD chat modes`)); - } - } - - // Clean up new agents directory - const agentsDir = path.join(projectDir, this.configDir, this.agentsDir); - if (await fs.pathExists(agentsDir)) { - const files = await fs.readdir(agentsDir); - let removed = 0; - - for (const file of files) { - if (file.startsWith('bmd-') && file.endsWith('.agent.md')) { - await fs.remove(path.join(agentsDir, file)); - removed++; - } - } - - if (removed > 0) { - console.log(chalk.dim(` Cleaned up ${removed} existing BMAD agents`)); - } - } - } - - /** - * Install a custom agent launcher for GitHub Copilot - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object|null} Info about created command - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - const agentsDir = path.join(projectDir, this.configDir, this.agentsDir); - - if (!(await this.exists(path.join(projectDir, this.configDir)))) { - return null; // IDE not configured for this project - } - - await this.ensureDir(agentsDir); - - const launcherContent = `You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. - - -1. LOAD the FULL agent file from @${agentPath} -2. READ its entire contents - this contains the complete agent persona, menu, and instructions -3. FOLLOW every step in the section precisely -4. DISPLAY the welcome/greeting as instructed -5. PRESENT the numbered menu -6. WAIT for user input before proceeding - -`; - - // GitHub Copilot needs specific tools in frontmatter - const copilotTools = [ - 'changes', - 'codebase', - 'createDirectory', - 'createFile', - 'editFiles', - 'fetch', - 'fileSearch', - 'githubRepo', - 'listDirectory', - 'problems', - 'readFile', - 'runInTerminal', - 'runTask', - 'runTests', - 'runVscodeCommand', - 'search', - 'searchResults', - 'terminalLastCommand', - 'terminalSelection', - 'testFailure', - 'textSearch', - 'usages', - ]; - - const agentContent = `--- -description: "Activates the ${metadata.title || agentName} agent persona." -tools: ${JSON.stringify(copilotTools)} ---- - -# ${metadata.title || agentName} Agent - -${launcherContent} -`; - - const agentFilePath = path.join(agentsDir, `bmd-custom-${agentName}.agent.md`); - await this.writeFile(agentFilePath, agentContent); - - return { - path: agentFilePath, - command: `bmd-custom-${agentName}`, - }; - } -} - -module.exports = { GitHubCopilotSetup }; diff --git a/tools/cli/installers/lib/ide/iflow.js b/tools/cli/installers/lib/ide/iflow.js deleted file mode 100644 index bbe6d470..00000000 --- a/tools/cli/installers/lib/ide/iflow.js +++ /dev/null @@ -1,191 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const { BaseIdeSetup } = require('./_base-ide'); -const chalk = require('chalk'); -const { AgentCommandGenerator } = require('./shared/agent-command-generator'); -const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator'); - -/** - * iFlow CLI setup handler - * Creates commands in .iflow/commands/ directory structure - */ -class IFlowSetup extends BaseIdeSetup { - constructor() { - super('iflow', 'iFlow CLI'); - this.configDir = '.iflow'; - this.commandsDir = 'commands'; - } - - /** - * Setup iFlow CLI configuration - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Object} options - Setup options - */ - async setup(projectDir, bmadDir, options = {}) { - console.log(chalk.cyan(`Setting up ${this.name}...`)); - - // Create .iflow/commands/bmad directory structure - const iflowDir = path.join(projectDir, this.configDir); - const commandsDir = path.join(iflowDir, this.commandsDir, 'bmad'); - const agentsDir = path.join(commandsDir, 'agents'); - const tasksDir = path.join(commandsDir, 'tasks'); - const workflowsDir = path.join(commandsDir, 'workflows'); - - await this.ensureDir(agentsDir); - await this.ensureDir(tasksDir); - await this.ensureDir(workflowsDir); - - // Generate agent launchers - const agentGen = new AgentCommandGenerator(this.bmadFolderName); - const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []); - - // Setup agents as commands - let agentCount = 0; - for (const artifact of agentArtifacts) { - const commandContent = await this.createAgentCommand(artifact); - - const targetPath = path.join(agentsDir, `${artifact.module}-${artifact.name}.md`); - await this.writeFile(targetPath, commandContent); - agentCount++; - } - - // Get tasks and workflows (ALL workflows now generate commands) - const tasks = await this.getTasks(bmadDir); - - // Get ALL workflows using the new workflow command generator - const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName); - const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir); - - // Setup tasks as commands - let taskCount = 0; - for (const task of tasks) { - const content = await this.readFile(task.path); - const commandContent = this.createTaskCommand(task, content); - - const targetPath = path.join(tasksDir, `${task.module}-${task.name}.md`); - await this.writeFile(targetPath, commandContent); - taskCount++; - } - - // Setup workflows as commands (already generated) - let workflowCount = 0; - for (const artifact of workflowArtifacts) { - if (artifact.type === 'workflow-command') { - const targetPath = path.join(workflowsDir, `${artifact.module}-${path.basename(artifact.relativePath, '.md')}.md`); - await this.writeFile(targetPath, artifact.content); - workflowCount++; - } - } - - console.log(chalk.green(`✓ ${this.name} configured:`)); - console.log(chalk.dim(` - ${agentCount} agent commands created`)); - console.log(chalk.dim(` - ${taskCount} task commands created`)); - console.log(chalk.dim(` - ${workflowCount} workflow commands created`)); - console.log(chalk.dim(` - Commands directory: ${path.relative(projectDir, commandsDir)}`)); - - return { - success: true, - agents: agentCount, - tasks: taskCount, - workflows: workflowCount, - }; - } - - /** - * Create agent command content - */ - async createAgentCommand(artifact) { - // The launcher content is already complete - just return it as-is - return artifact.content; - } - - /** - * Create task command content - */ - createTaskCommand(task, content) { - // Extract task name - const nameMatch = content.match(/([^<]+)<\/name>/); - const taskName = nameMatch ? nameMatch[1] : this.formatTitle(task.name); - - let commandContent = `# /task-${task.name} Command - -When this command is used, execute the following task: - -## ${taskName} Task - -${content} - -## Usage - -This command executes the ${taskName} task from the BMAD ${task.module.toUpperCase()} module. - -## Module - -Part of the BMAD ${task.module.toUpperCase()} module. -`; - - return commandContent; - } - - /** - * Cleanup iFlow configuration - */ - async cleanup(projectDir) { - const fs = require('fs-extra'); - const bmadCommandsDir = path.join(projectDir, this.configDir, this.commandsDir, 'bmad'); - - if (await fs.pathExists(bmadCommandsDir)) { - await fs.remove(bmadCommandsDir); - console.log(chalk.dim(`Removed BMAD commands from iFlow CLI`)); - } - } - - /** - * Install a custom agent launcher for iFlow - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object} Installation result - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - const iflowDir = path.join(projectDir, this.configDir); - const bmadCommandsDir = path.join(iflowDir, this.commandsDir, 'bmad'); - - // Create .iflow/commands/bmad directory if it doesn't exist - await fs.ensureDir(bmadCommandsDir); - - // Create custom agent launcher - const launcherContent = `# ${agentName} Custom Agent - -**⚠️ IMPORTANT**: Run @${agentPath} first to load the complete agent! - -This is a launcher for the custom BMAD agent "${agentName}". - -## Usage -1. First run: \`${agentPath}\` to load the complete agent -2. Then use this command to activate ${agentName} - -The agent will follow the persona and instructions from the main agent file. - ---- - -*Generated by BMAD Method*`; - - const fileName = `custom-${agentName.toLowerCase()}.md`; - const launcherPath = path.join(bmadCommandsDir, fileName); - - // Write the launcher file - await fs.writeFile(launcherPath, launcherContent, 'utf8'); - - return { - ide: 'iflow', - path: path.relative(projectDir, launcherPath), - command: agentName, - type: 'custom-agent-launcher', - }; - } -} - -module.exports = { IFlowSetup }; diff --git a/tools/cli/installers/lib/ide/kiro-cli.js b/tools/cli/installers/lib/ide/kiro-cli.js index 8298455f..612ea5fa 100644 --- a/tools/cli/installers/lib/ide/kiro-cli.js +++ b/tools/cli/installers/lib/ide/kiro-cli.js @@ -25,7 +25,7 @@ class KiroCliSetup extends BaseIdeSetup { // Remove existing BMad agents const files = await fs.readdir(bmadAgentsDir); for (const file of files) { - if (file.startsWith('bmad-') || file.includes('bmad')) { + if (file.startsWith('bmad')) { await fs.remove(path.join(bmadAgentsDir, file)); } } diff --git a/tools/cli/installers/lib/ide/manager.js b/tools/cli/installers/lib/ide/manager.js index 97462746..2b68dfad 100644 --- a/tools/cli/installers/lib/ide/manager.js +++ b/tools/cli/installers/lib/ide/manager.js @@ -5,11 +5,15 @@ const chalk = require('chalk'); /** * IDE Manager - handles IDE-specific setup * Dynamically discovers and loads IDE handlers + * + * Loading strategy: + * 1. Custom installer files (codex.js, kilo.js, kiro-cli.js) - for platforms with unique installation logic + * 2. Config-driven handlers (from platform-codes.yaml) - for standard IDE installation patterns */ class IdeManager { constructor() { this.handlers = new Map(); - this.loadHandlers(); + this._initialized = false; this.bmadFolderName = 'bmad'; // Default, can be overridden } @@ -28,53 +32,76 @@ class IdeManager { } /** - * Dynamically load all IDE handlers from directory + * Ensure handlers are loaded (lazy loading) */ - loadHandlers() { + async ensureInitialized() { + if (!this._initialized) { + await this.loadHandlers(); + this._initialized = true; + } + } + + /** + * Dynamically load all IDE handlers + * 1. Load custom installer files first (codex.js, kilo.js, kiro-cli.js) + * 2. Load config-driven handlers from platform-codes.yaml + */ + async loadHandlers() { + // Load custom installer files + this.loadCustomInstallerFiles(); + + // Load config-driven handlers from platform-codes.yaml + await this.loadConfigDrivenHandlers(); + } + + /** + * Load custom installer files (unique installation logic) + * These files have special installation patterns that don't fit the config-driven model + */ + loadCustomInstallerFiles() { const ideDir = __dirname; + const customFiles = ['codex.js', 'kilo.js', 'kiro-cli.js']; - try { - // Get all JS files in the IDE directory - const files = fs.readdirSync(ideDir).filter((file) => { - // Skip base class, manager, utility files (starting with _), and helper modules - return ( - file.endsWith('.js') && - !file.startsWith('_') && - file !== 'manager.js' && - file !== 'workflow-command-generator.js' && - file !== 'task-tool-command-generator.js' - ); - }); + for (const file of customFiles) { + const filePath = path.join(ideDir, file); + if (!fs.existsSync(filePath)) continue; - // Sort alphabetically for consistent ordering - files.sort(); + try { + const HandlerModule = require(filePath); + const HandlerClass = HandlerModule.default || Object.values(HandlerModule)[0]; - for (const file of files) { - const moduleName = path.basename(file, '.js'); - - try { - const modulePath = path.join(ideDir, file); - const HandlerModule = require(modulePath); - - // Get the first exported class (handles various export styles) - const HandlerClass = HandlerModule.default || HandlerModule[Object.keys(HandlerModule)[0]]; - - if (HandlerClass) { - const instance = new HandlerClass(); - // Use the name property from the instance (set in constructor) - // Only add if the instance has a valid name - if (instance.name && typeof instance.name === 'string') { - this.handlers.set(instance.name, instance); - } else { - console.log(chalk.yellow(` Warning: ${moduleName} handler missing valid 'name' property`)); - } + if (HandlerClass) { + const instance = new HandlerClass(); + if (instance.name && typeof instance.name === 'string') { + this.handlers.set(instance.name, instance); } - } catch (error) { - console.log(chalk.yellow(` Warning: Could not load ${moduleName}: ${error.message}`)); } + } catch (error) { + console.log(chalk.yellow(` Warning: Could not load ${file}: ${error.message}`)); } - } catch (error) { - console.error(chalk.red('Failed to load IDE handlers:'), error.message); + } + } + + /** + * Load config-driven handlers from platform-codes.yaml + * This creates ConfigDrivenIdeSetup instances for platforms with installer config + */ + async loadConfigDrivenHandlers() { + const { loadPlatformCodes } = require('./platform-codes'); + const platformConfig = await loadPlatformCodes(); + + const { ConfigDrivenIdeSetup } = require('./_config-driven'); + + for (const [platformCode, platformInfo] of Object.entries(platformConfig.platforms)) { + // Skip if already loaded by custom installer + if (this.handlers.has(platformCode)) continue; + + // Skip if no installer config (platform may not need installation) + if (!platformInfo.installer) continue; + + const handler = new ConfigDrivenIdeSetup(platformCode, platformInfo); + handler.setBmadFolderName(this.bmadFolderName); + this.handlers.set(platformCode, handler); } } diff --git a/tools/cli/installers/lib/ide/opencode.js b/tools/cli/installers/lib/ide/opencode.js deleted file mode 100644 index cf5e8eec..00000000 --- a/tools/cli/installers/lib/ide/opencode.js +++ /dev/null @@ -1,257 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const os = require('node:os'); -const chalk = require('chalk'); -const yaml = require('yaml'); -const { BaseIdeSetup } = require('./_base-ide'); -const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator'); -const { TaskToolCommandGenerator } = require('./shared/task-tool-command-generator'); -const { AgentCommandGenerator } = require('./shared/agent-command-generator'); - -/** - * OpenCode IDE setup handler - */ -class OpenCodeSetup extends BaseIdeSetup { - constructor() { - super('opencode', 'OpenCode', true); // Mark as preferred/recommended - this.configDir = '.opencode'; - this.commandsDir = 'command'; - this.agentsDir = 'agent'; - } - - async setup(projectDir, bmadDir, options = {}) { - console.log(chalk.cyan(`Setting up ${this.name}...`)); - - const baseDir = path.join(projectDir, this.configDir); - const commandsBaseDir = path.join(baseDir, this.commandsDir); - const agentsBaseDir = path.join(baseDir, this.agentsDir); - - await this.ensureDir(commandsBaseDir); - await this.ensureDir(agentsBaseDir); - - // Clean up any existing BMAD files before reinstalling - await this.cleanup(projectDir); - - // Generate agent launchers - const agentGen = new AgentCommandGenerator(this.bmadFolderName); - const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []); - - // Install primary agents with flat naming: bmad-agent-{module}-{name}.md - // OpenCode agents go in the agent folder (not command folder) - let agentCount = 0; - for (const artifact of agentArtifacts) { - const agentContent = artifact.content; - // Flat structure in agent folder: bmad-agent-{module}-{name}.md - const targetPath = path.join(agentsBaseDir, `bmad-agent-${artifact.module}-${artifact.name}.md`); - await this.writeFile(targetPath, agentContent); - agentCount++; - } - - // Install workflow commands with flat naming: bmad-{module}-{workflow-name} - const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName); - const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir); - - let workflowCommandCount = 0; - for (const artifact of workflowArtifacts) { - if (artifact.type === 'workflow-command') { - const commandContent = artifact.content; - // Flat structure: bmad-{module}-{workflow-name}.md - // artifact.relativePath is like: bmm/workflows/plan-project.md - const workflowName = path.basename(artifact.relativePath, '.md'); - const targetPath = path.join(commandsBaseDir, `bmad-${artifact.module}-${workflowName}.md`); - await this.writeFile(targetPath, commandContent); - workflowCommandCount++; - } - // Skip workflow launcher READMEs as they're not needed in flat structure - } - - // Install task and tool commands with flat naming - const { tasks, tools } = await this.generateFlatTaskToolCommands(bmadDir, commandsBaseDir); - - console.log(chalk.green(`✓ ${this.name} configured:`)); - console.log(chalk.dim(` - ${agentCount} agents installed to .opencode/agent/`)); - if (workflowCommandCount > 0) { - console.log(chalk.dim(` - ${workflowCommandCount} workflows installed to .opencode/command/`)); - } - if (tasks + tools > 0) { - console.log(chalk.dim(` - ${tasks + tools} tasks/tools installed to .opencode/command/ (${tasks} tasks, ${tools} tools)`)); - } - - return { - success: true, - agents: agentCount, - workflows: workflowCommandCount, - workflowCounts, - }; - } - - /** - * Generate flat task and tool commands for OpenCode - * OpenCode doesn't support nested command directories - */ - async generateFlatTaskToolCommands(bmadDir, commandsBaseDir) { - const taskToolGen = new TaskToolCommandGenerator(); - const tasks = await taskToolGen.loadTaskManifest(bmadDir); - const tools = await taskToolGen.loadToolManifest(bmadDir); - - // Filter to only standalone items - const standaloneTasks = tasks ? tasks.filter((t) => t.standalone === 'true' || t.standalone === true) : []; - const standaloneTools = tools ? tools.filter((t) => t.standalone === 'true' || t.standalone === true) : []; - - // Generate command files for tasks with flat naming: bmad-task-{module}-{name}.md - for (const task of standaloneTasks) { - const commandContent = taskToolGen.generateCommandContent(task, 'task'); - const targetPath = path.join(commandsBaseDir, `bmad-task-${task.module}-${task.name}.md`); - await this.writeFile(targetPath, commandContent); - } - - // Generate command files for tools with flat naming: bmad-tool-{module}-{name}.md - for (const tool of standaloneTools) { - const commandContent = taskToolGen.generateCommandContent(tool, 'tool'); - const targetPath = path.join(commandsBaseDir, `bmad-tool-${tool.module}-${tool.name}.md`); - await this.writeFile(targetPath, commandContent); - } - - return { - tasks: standaloneTasks.length, - tools: standaloneTools.length, - }; - } - - async readAndProcess(filePath, metadata) { - const content = await fs.readFile(filePath, 'utf8'); - return this.processContent(content, metadata); - } - - async createAgentContent(content, metadata) { - const { frontmatter = {}, body } = this.parseFrontmatter(content); - - frontmatter.description = - frontmatter.description && String(frontmatter.description).trim().length > 0 - ? frontmatter.description - : `BMAD ${metadata.module} agent: ${metadata.name}`; - - // OpenCode agents use: 'primary' mode for main agents - frontmatter.mode = 'primary'; - - const frontmatterString = this.stringifyFrontmatter(frontmatter); - - // Get the activation header from central template - const activationHeader = await this.getAgentCommandHeader(); - - return `${frontmatterString}\n\n${activationHeader}\n\n${body}`; - } - - parseFrontmatter(content) { - const match = content.match(/^---\s*\n([\s\S]*?)\n---\s*\n?/); - if (!match) { - return { data: {}, body: content }; - } - - const body = content.slice(match[0].length); - - let frontmatter = {}; - try { - frontmatter = yaml.parse(match[1]) || {}; - } catch { - frontmatter = {}; - } - - return { frontmatter, body }; - } - - stringifyFrontmatter(frontmatter) { - const yamlText = yaml - .dump(frontmatter, { - indent: 2, - lineWidth: -1, - noRefs: true, - sortKeys: false, - }) - .trimEnd(); - - return `---\n${yamlText}\n---`; - } - - /** - * Cleanup OpenCode configuration - surgically remove only BMAD files - */ - async cleanup(projectDir) { - const agentsDir = path.join(projectDir, this.configDir, this.agentsDir); - const commandsDir = path.join(projectDir, this.configDir, this.commandsDir); - let removed = 0; - - // Clean up agent folder - if (await fs.pathExists(agentsDir)) { - const files = await fs.readdir(agentsDir); - for (const file of files) { - if (file.startsWith('bmad-') && file.endsWith('.md')) { - await fs.remove(path.join(agentsDir, file)); - removed++; - } - } - } - - // Clean up command folder - if (await fs.pathExists(commandsDir)) { - const files = await fs.readdir(commandsDir); - for (const file of files) { - if (file.startsWith('bmad-') && file.endsWith('.md')) { - await fs.remove(path.join(commandsDir, file)); - removed++; - } - } - } - - if (removed > 0) { - console.log(chalk.dim(` Cleaned up ${removed} existing BMAD files`)); - } - } - - /** - * Install a custom agent launcher for OpenCode - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object|null} Info about created command - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - const agentsDir = path.join(projectDir, this.configDir, this.agentsDir); - - if (!(await this.exists(path.join(projectDir, this.configDir)))) { - return null; // IDE not configured for this project - } - - await this.ensureDir(agentsDir); - - const launcherContent = `--- -name: '${agentName}' -description: '${metadata.title || agentName} agent' -mode: 'primary' ---- - -You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. - - -1. LOAD the FULL agent file from @${agentPath} -2. READ its entire contents - this contains the complete agent persona, menu, and instructions -3. FOLLOW every step in the section precisely -4. DISPLAY the welcome/greeting as instructed -5. PRESENT the numbered menu -6. WAIT for user input before proceeding - -`; - - // OpenCode uses flat naming: bmad-agent-custom-{name}.md - const launcherPath = path.join(agentsDir, `bmad-agent-custom-${agentName}.md`); - await this.writeFile(launcherPath, launcherContent); - - return { - path: launcherPath, - command: `bmad-agent-custom-${agentName}`, - }; - } -} - -module.exports = { OpenCodeSetup }; diff --git a/tools/cli/installers/lib/ide/platform-codes.js b/tools/cli/installers/lib/ide/platform-codes.js new file mode 100644 index 00000000..d5d8e0a4 --- /dev/null +++ b/tools/cli/installers/lib/ide/platform-codes.js @@ -0,0 +1,100 @@ +const fs = require('fs-extra'); +const path = require('node:path'); +const yaml = require('yaml'); + +const PLATFORM_CODES_PATH = path.join(__dirname, 'platform-codes.yaml'); + +let _cachedPlatformCodes = null; + +/** + * Load the platform codes configuration from YAML + * @returns {Object} Platform codes configuration + */ +async function loadPlatformCodes() { + if (_cachedPlatformCodes) { + return _cachedPlatformCodes; + } + + if (!(await fs.pathExists(PLATFORM_CODES_PATH))) { + throw new Error(`Platform codes configuration not found at: ${PLATFORM_CODES_PATH}`); + } + + const content = await fs.readFile(PLATFORM_CODES_PATH, 'utf8'); + _cachedPlatformCodes = yaml.parse(content); + return _cachedPlatformCodes; +} + +/** + * Get platform information by code + * @param {string} platformCode - Platform code (e.g., 'claude-code', 'cursor') + * @returns {Object|null} Platform info or null if not found + */ +function getPlatformInfo(platformCode) { + if (!_cachedPlatformCodes) { + throw new Error('Platform codes not loaded. Call loadPlatformCodes() first.'); + } + + return _cachedPlatformCodes.platforms[platformCode] || null; +} + +/** + * Get all preferred platforms + * @returns {Promise} Array of preferred platform codes + */ +async function getPreferredPlatforms() { + const config = await loadPlatformCodes(); + return Object.entries(config.platforms) + .filter(([_, info]) => info.preferred) + .map(([code, _]) => code); +} + +/** + * Get all platform codes by category + * @param {string} category - Category to filter by (ide, cli, tool, etc.) + * @returns {Promise} Array of platform codes in the category + */ +async function getPlatformsByCategory(category) { + const config = await loadPlatformCodes(); + return Object.entries(config.platforms) + .filter(([_, info]) => info.category === category) + .map(([code, _]) => code); +} + +/** + * Get all platforms with installer config + * @returns {Promise} Array of platform codes that have installer config + */ +async function getConfigDrivenPlatforms() { + const config = await loadPlatformCodes(); + return Object.entries(config.platforms) + .filter(([_, info]) => info.installer) + .map(([code, _]) => code); +} + +/** + * Get platforms that use custom installers (no installer config) + * @returns {Promise} Array of platform codes with custom installers + */ +async function getCustomInstallerPlatforms() { + const config = await loadPlatformCodes(); + return Object.entries(config.platforms) + .filter(([_, info]) => !info.installer) + .map(([code, _]) => code); +} + +/** + * Clear the cached platform codes (useful for testing) + */ +function clearCache() { + _cachedPlatformCodes = null; +} + +module.exports = { + loadPlatformCodes, + getPlatformInfo, + getPreferredPlatforms, + getPlatformsByCategory, + getConfigDrivenPlatforms, + getCustomInstallerPlatforms, + clearCache, +}; diff --git a/tools/cli/installers/lib/ide/platform-codes.yaml b/tools/cli/installers/lib/ide/platform-codes.yaml new file mode 100644 index 00000000..e3aea054 --- /dev/null +++ b/tools/cli/installers/lib/ide/platform-codes.yaml @@ -0,0 +1,241 @@ +# BMAD Platform Codes Configuration +# Central configuration for all platform/IDE codes used in the BMAD system +# +# This file defines: +# 1. Platform metadata (name, preferred status, category, description) +# 2. Installer configuration (target directories, templates, artifact types) +# +# Format: +# code: Platform identifier used internally +# name: Display name shown to users +# preferred: Whether this platform is shown as a recommended option on install +# category: Type of platform (ide, cli, tool, service) +# description: Brief description of the platform +# installer: Installation configuration (optional - omit for custom installers) + +platforms: + # ============================================================================ + # CLI Tools + # ============================================================================ + + claude-code: + name: "Claude Code" + preferred: true + category: cli + description: "Anthropic's official CLI for Claude" + installer: + target_dir: .claude/commands + template_type: default + + auggie: + name: "Auggie" + preferred: false + category: cli + description: "AI development tool" + installer: + target_dir: .augment/commands + template_type: default + + gemini: + name: "Gemini CLI" + preferred: false + category: cli + description: "Google's CLI for Gemini" + installer: + target_dir: .gemini/commands + template_type: gemini + + # ============================================================================ + # IDEs + # ============================================================================ + + cursor: + name: "Cursor" + preferred: true + category: ide + description: "AI-first code editor" + installer: + target_dir: .cursor/commands + template_type: default + + windsurf: + name: "Windsurf" + preferred: true + category: ide + description: "AI-powered IDE with cascade flows" + installer: + target_dir: .windsurf/workflows + template_type: windsurf + + cline: + name: "Cline" + preferred: false + category: ide + description: "AI coding assistant" + installer: + target_dir: .clinerules/workflows + template_type: windsurf + + roo: + name: "Roo Cline" + preferred: false + category: ide + description: "Enhanced Cline fork" + installer: + target_dir: .roo/commands + template_type: default + + github-copilot: + name: "GitHub Copilot" + preferred: false + category: ide + description: "GitHub's AI pair programmer" + installer: + targets: + - target_dir: .github/agents + template_type: copilot_agents + artifact_types: [agents] + - target_dir: .vscode + template_type: vscode_settings + artifact_types: [] + + opencode: + name: "OpenCode" + preferred: false + category: ide + description: "OpenCode terminal coding assistant" + installer: + target_dir: .opencode/command + template_type: opencode + + crush: + name: "Crush" + preferred: false + category: ide + description: "AI development assistant" + installer: + target_dir: .crush/commands + template_type: default + + iflow: + name: "iFlow" + preferred: false + category: ide + description: "AI workflow automation" + installer: + target_dir: .iflow/commands + template_type: default + + qwen: + name: "QwenCoder" + preferred: false + category: ide + description: "Qwen AI coding assistant" + installer: + target_dir: .qwen/commands + template_type: default + + rovo-dev: + name: "Rovo Dev" + preferred: false + category: ide + description: "Atlassian's Rovo development environment" + installer: + target_dir: .rovodev/workflows + template_type: rovodev + + trae: + name: "Trae" + preferred: false + category: ide + description: "AI coding tool" + installer: + target_dir: .trae/rules + template_type: trae + + antigravity: + name: "Google Antigravity" + preferred: false + category: ide + description: "Google's AI development environment" + installer: + target_dir: .agent/workflows + template_type: antigravity + # Note: Antigravity uses .agent/workflows/ directory (not .antigravity/) + + # ============================================================================ + # Custom Installers (no installer config - use custom file) + # These have unique installation logic that doesn't fit the config-driven model + # ============================================================================ + + codex: + name: "Codex" + preferred: false + category: cli + description: "OpenAI Codex integration" + # No installer config - uses custom codex.js + + kilo: + name: "KiloCoder" + preferred: false + category: ide + description: "AI coding platform" + # No installer config - uses custom kilo.js (creates .kilocodemodes file) + + kiro-cli: + name: "Kiro CLI" + preferred: false + category: cli + description: "Kiro command-line interface" + # No installer config - uses custom kiro-cli.js (YAML→JSON conversion) + +# ============================================================================ +# Installer Config Schema +# ============================================================================ +# +# installer: +# target_dir: string # Directory where artifacts are installed +# template_type: string # Default template type to use +# header_template: string (optional) # Override for header/frontmatter template +# body_template: string (optional) # Override for body/content template +# targets: array (optional) # For multi-target installations +# - target_dir: string +# template_type: string +# artifact_types: [agents, workflows, tasks, tools] +# artifact_types: array (optional) # Filter which artifacts to install (default: all) +# skip_existing: boolean (optional) # Skip files that already exist (default: false) + +# ============================================================================ +# Platform Categories +# ============================================================================ + +categories: + ide: + name: "Integrated Development Environment" + description: "Full-featured code editors with AI assistance" + + cli: + name: "Command Line Interface" + description: "Terminal-based tools" + + tool: + name: "Development Tool" + description: "Standalone development utilities" + + service: + name: "Cloud Service" + description: "Cloud-based development platforms" + + extension: + name: "Editor Extension" + description: "Plugins for existing editors" + +# ============================================================================ +# Naming Conventions and Rules +# ============================================================================ + +conventions: + code_format: "lowercase-kebab-case" + name_format: "Title Case" + max_code_length: 20 + allowed_characters: "a-z0-9-" diff --git a/tools/cli/installers/lib/ide/qwen.js b/tools/cli/installers/lib/ide/qwen.js deleted file mode 100644 index bdc0cb29..00000000 --- a/tools/cli/installers/lib/ide/qwen.js +++ /dev/null @@ -1,372 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const { BaseIdeSetup } = require('./_base-ide'); -const chalk = require('chalk'); -const { getAgentsFromBmad, getTasksFromBmad } = require('./shared/bmad-artifacts'); -const { AgentCommandGenerator } = require('./shared/agent-command-generator'); - -/** - * Qwen Code setup handler - * Creates TOML command files in .qwen/commands/BMad/ - */ -class QwenSetup extends BaseIdeSetup { - constructor() { - super('qwen', 'Qwen Code'); - this.configDir = '.qwen'; - this.commandsDir = 'commands'; - this.bmadDir = 'bmad'; - } - - /** - * Setup Qwen Code configuration - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Object} options - Setup options - */ - async setup(projectDir, bmadDir, options = {}) { - console.log(chalk.cyan(`Setting up ${this.name}...`)); - - // Create .qwen/commands/BMad directory structure - const qwenDir = path.join(projectDir, this.configDir); - const commandsDir = path.join(qwenDir, this.commandsDir); - const bmadCommandsDir = path.join(commandsDir, this.bmadDir); - - await this.ensureDir(bmadCommandsDir); - - // Update existing settings.json if present - await this.updateSettings(qwenDir); - - // Clean up old configuration if exists - await this.cleanupOldConfig(qwenDir); - - // Generate agent launchers - const agentGen = new AgentCommandGenerator(this.bmadFolderName); - const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []); - - // Get tasks, tools, and workflows (standalone only for tools/workflows) - const tasks = await getTasksFromBmad(bmadDir, options.selectedModules || []); - const tools = await this.getTools(bmadDir, true); - const workflows = await this.getWorkflows(bmadDir, true); - - // Create directories for each module (including standalone) - const modules = new Set(); - for (const item of [...agentArtifacts, ...tasks, ...tools, ...workflows]) modules.add(item.module); - - for (const module of modules) { - await this.ensureDir(path.join(bmadCommandsDir, module)); - await this.ensureDir(path.join(bmadCommandsDir, module, 'agents')); - await this.ensureDir(path.join(bmadCommandsDir, module, 'tasks')); - await this.ensureDir(path.join(bmadCommandsDir, module, 'tools')); - await this.ensureDir(path.join(bmadCommandsDir, module, 'workflows')); - } - - // Create TOML files for each agent launcher - let agentCount = 0; - for (const artifact of agentArtifacts) { - // Convert markdown launcher content to TOML format - const tomlContent = this.processAgentLauncherContent(artifact.content, { - module: artifact.module, - name: artifact.name, - }); - - const targetPath = path.join(bmadCommandsDir, artifact.module, 'agents', `${artifact.name}.toml`); - - await this.writeFile(targetPath, tomlContent); - - agentCount++; - console.log(chalk.green(` ✓ Added agent: /bmad:${artifact.module}:agents:${artifact.name}`)); - } - - // Create TOML files for each task - let taskCount = 0; - for (const task of tasks) { - const content = await this.readAndProcess(task.path, { - module: task.module, - name: task.name, - }); - - const targetPath = path.join(bmadCommandsDir, task.module, 'tasks', `${task.name}.toml`); - - await this.writeFile(targetPath, content); - - taskCount++; - console.log(chalk.green(` ✓ Added task: /bmad:${task.module}:tasks:${task.name}`)); - } - - // Create TOML files for each tool - let toolCount = 0; - for (const tool of tools) { - const content = await this.readAndProcess(tool.path, { - module: tool.module, - name: tool.name, - }); - - const targetPath = path.join(bmadCommandsDir, tool.module, 'tools', `${tool.name}.toml`); - - await this.writeFile(targetPath, content); - - toolCount++; - console.log(chalk.green(` ✓ Added tool: /bmad:${tool.module}:tools:${tool.name}`)); - } - - // Create TOML files for each workflow - let workflowCount = 0; - for (const workflow of workflows) { - const content = await this.readAndProcess(workflow.path, { - module: workflow.module, - name: workflow.name, - }); - - const targetPath = path.join(bmadCommandsDir, workflow.module, 'workflows', `${workflow.name}.toml`); - - await this.writeFile(targetPath, content); - - workflowCount++; - console.log(chalk.green(` ✓ Added workflow: /bmad:${workflow.module}:workflows:${workflow.name}`)); - } - - console.log(chalk.green(`✓ ${this.name} configured:`)); - console.log(chalk.dim(` - ${agentCount} agents configured`)); - console.log(chalk.dim(` - ${taskCount} tasks configured`)); - console.log(chalk.dim(` - ${toolCount} tools configured`)); - console.log(chalk.dim(` - ${workflowCount} workflows configured`)); - console.log(chalk.dim(` - Commands directory: ${path.relative(projectDir, bmadCommandsDir)}`)); - - return { - success: true, - agents: agentCount, - tasks: taskCount, - tools: toolCount, - workflows: workflowCount, - }; - } - - /** - * Update settings.json to remove old agent references - */ - async updateSettings(qwenDir) { - const fs = require('fs-extra'); - const settingsPath = path.join(qwenDir, 'settings.json'); - - if (await fs.pathExists(settingsPath)) { - try { - const settingsContent = await fs.readFile(settingsPath, 'utf8'); - const settings = JSON.parse(settingsContent); - let updated = false; - - // Remove agent file references from contextFileName - if (settings.contextFileName && Array.isArray(settings.contextFileName)) { - const originalLength = settings.contextFileName.length; - settings.contextFileName = settings.contextFileName.filter( - (fileName) => !fileName.startsWith('agents/') && !fileName.startsWith('bmad-method/'), - ); - - if (settings.contextFileName.length !== originalLength) { - updated = true; - } - } - - if (updated) { - await fs.writeFile(settingsPath, JSON.stringify(settings, null, 2)); - console.log(chalk.green(' ✓ Updated .qwen/settings.json')); - } - } catch (error) { - console.warn(chalk.yellow(' ⚠ Could not update settings.json:'), error.message); - } - } - } - - /** - * Clean up old configuration directories - */ - async cleanupOldConfig(qwenDir) { - const fs = require('fs-extra'); - const agentsDir = path.join(qwenDir, 'agents'); - const bmadMethodDir = path.join(qwenDir, 'bmad-method'); - const bmadDir = path.join(qwenDir, 'bmadDir'); - - if (await fs.pathExists(agentsDir)) { - await fs.remove(agentsDir); - console.log(chalk.green(' ✓ Removed old agents directory')); - } - - if (await fs.pathExists(bmadMethodDir)) { - await fs.remove(bmadMethodDir); - console.log(chalk.green(' ✓ Removed old bmad-method directory')); - } - - if (await fs.pathExists(bmadDir)) { - await fs.remove(bmadDir); - console.log(chalk.green(' ✓ Removed old BMad directory')); - } - } - - /** - * Read and process file content - */ - async readAndProcess(filePath, metadata) { - const fs = require('fs-extra'); - const content = await fs.readFile(filePath, 'utf8'); - return this.processContent(content, metadata); - } - - /** - * Process agent launcher content and convert to TOML format - * @param {string} launcherContent - Launcher markdown content - * @param {Object} metadata - File metadata - * @returns {string} TOML formatted content - */ - processAgentLauncherContent(launcherContent, metadata = {}) { - // Strip frontmatter from launcher content - const frontmatterRegex = /^---\s*\n[\s\S]*?\n---\s*\n/; - const contentWithoutFrontmatter = launcherContent.replace(frontmatterRegex, ''); - - // Extract title for TOML description - const titleMatch = launcherContent.match(/description:\s*"([^"]+)"/); - const title = titleMatch ? titleMatch[1] : metadata.name; - - // Create TOML with launcher content (without frontmatter) - return `description = "BMAD ${metadata.module.toUpperCase()} Agent: ${title}" -prompt = """ -${contentWithoutFrontmatter.trim()} -""" -`; - } - - /** - * Override processContent to add TOML metadata header for Qwen - * @param {string} content - File content - * @param {Object} metadata - File metadata - * @returns {string} Processed content with Qwen template - */ - processContent(content, metadata = {}) { - // First apply base processing (includes activation injection for agents) - let prompt = super.processContent(content, metadata); - - // Determine the type and description based on content - const isAgent = content.includes(' word.charAt(0).toUpperCase() + word.slice(1)) - .join(' '); - } - - /** - * Cleanup Qwen configuration - */ - async cleanup(projectDir) { - const fs = require('fs-extra'); - const bmadCommandsDir = path.join(projectDir, this.configDir, this.commandsDir, this.bmadDir); - const oldBmadMethodDir = path.join(projectDir, this.configDir, 'bmad-method'); - const oldBMadDir = path.join(projectDir, this.configDir, 'BMad'); - - if (await fs.pathExists(bmadCommandsDir)) { - await fs.remove(bmadCommandsDir); - console.log(chalk.dim(`Removed BMAD configuration from Qwen Code`)); - } - - if (await fs.pathExists(oldBmadMethodDir)) { - await fs.remove(oldBmadMethodDir); - console.log(chalk.dim(`Removed old BMAD configuration from Qwen Code`)); - } - - if (await fs.pathExists(oldBMadDir)) { - await fs.remove(oldBMadDir); - console.log(chalk.dim(`Removed old BMAD configuration from Qwen Code`)); - } - } - - /** - * Install a custom agent launcher for Qwen - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object} Installation result - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - const qwenDir = path.join(projectDir, this.configDir); - const commandsDir = path.join(qwenDir, this.commandsDir); - const bmadCommandsDir = path.join(commandsDir, this.bmadDir); - - // Create .qwen/commands/BMad directory if it doesn't exist - await fs.ensureDir(bmadCommandsDir); - - // Create custom agent launcher in TOML format (same pattern as regular agents) - const launcherContent = `# ${agentName} Custom Agent - -**⚠️ IMPORTANT**: Run @${agentPath} first to load the complete agent! - -This is a launcher for the custom BMAD agent "${agentName}". - -## Usage -1. First run: \`${agentPath}\` to load the complete agent -2. Then use this command to activate ${agentName} - -The agent will follow the persona and instructions from the main agent file. - ---- - -*Generated by BMAD Method*`; - - // Use Qwen's TOML conversion method - const tomlContent = this.processAgentLauncherContent(launcherContent, { - name: agentName, - module: 'custom', - }); - - const fileName = `custom-${agentName.toLowerCase()}.toml`; - const launcherPath = path.join(bmadCommandsDir, fileName); - - // Write the launcher file - await fs.writeFile(launcherPath, tomlContent, 'utf8'); - - return { - ide: 'qwen', - path: path.relative(projectDir, launcherPath), - command: agentName, - type: 'custom-agent-launcher', - }; - } -} - -module.exports = { QwenSetup }; diff --git a/tools/cli/installers/lib/ide/roo.js b/tools/cli/installers/lib/ide/roo.js deleted file mode 100644 index b8a1dd24..00000000 --- a/tools/cli/installers/lib/ide/roo.js +++ /dev/null @@ -1,273 +0,0 @@ -const path = require('node:path'); -const { BaseIdeSetup } = require('./_base-ide'); -const chalk = require('chalk'); -const { AgentCommandGenerator } = require('./shared/agent-command-generator'); -const { toDashPath, customAgentDashName } = require('./shared/path-utils'); - -/** - * Roo IDE setup handler - * Creates custom commands in .roo/commands directory - */ -class RooSetup extends BaseIdeSetup { - constructor() { - super('roo', 'Roo Code'); - this.configDir = '.roo'; - this.commandsDir = 'commands'; - } - - /** - * Setup Roo IDE configuration - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Object} options - Setup options - */ - async setup(projectDir, bmadDir, options = {}) { - console.log(chalk.cyan(`Setting up ${this.name}...`)); - - // Create .roo/commands directory - const rooCommandsDir = path.join(projectDir, this.configDir, this.commandsDir); - await this.ensureDir(rooCommandsDir); - - // Generate agent launchers - const agentGen = new AgentCommandGenerator(this.bmadFolderName); - const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []); - - let addedCount = 0; - let skippedCount = 0; - - for (const artifact of agentArtifacts) { - // Use shared toDashPath to get consistent naming: bmad-bmm-name.md - const commandName = toDashPath(artifact.relativePath).replace('.md', ''); - const commandPath = path.join(rooCommandsDir, `${commandName}.md`); - - // Skip if already exists - if (await this.pathExists(commandPath)) { - console.log(chalk.dim(` Skipping ${commandName} - already exists`)); - skippedCount++; - continue; - } - - // artifact.sourcePath contains the full path to the agent file - if (!artifact.sourcePath) { - console.error(`Error: Missing sourcePath for artifact ${artifact.name} from module ${artifact.module}`); - console.error(`Artifact object:`, artifact); - throw new Error(`Missing sourcePath for agent: ${artifact.name}`); - } - - const content = await this.readFile(artifact.sourcePath); - - // Create command file that references the actual _bmad agent - await this.createCommandFile( - { module: artifact.module, name: artifact.name, path: artifact.sourcePath }, - content, - commandPath, - projectDir, - ); - - addedCount++; - console.log(chalk.green(` ✓ Added command: ${commandName}`)); - } - - console.log(chalk.green(`✓ ${this.name} configured:`)); - console.log(chalk.dim(` - ${addedCount} commands added`)); - if (skippedCount > 0) { - console.log(chalk.dim(` - ${skippedCount} commands skipped (already exist)`)); - } - console.log(chalk.dim(` - Commands directory: ${this.configDir}/${this.commandsDir}/`)); - console.log(chalk.dim(` Commands will be available when you open this project in Roo Code`)); - - return { - success: true, - commands: addedCount, - skipped: skippedCount, - }; - } - - /** - * Create a unified command file for agents - * @param {string} commandPath - Path where to write the command file - * @param {Object} options - Command options - * @param {string} options.name - Display name for the command - * @param {string} options.description - Description for the command - * @param {string} options.agentPath - Path to the agent file (relative to project root) - * @param {string} [options.icon] - Icon emoji (defaults to 🤖) - * @param {string} [options.extraContent] - Additional content to include before activation - */ - async createAgentCommandFile(commandPath, options) { - const { name, description, agentPath, icon = '🤖', extraContent = '' } = options; - - // Build command content with YAML frontmatter - let commandContent = `---\n`; - commandContent += `name: '${icon} ${name}'\n`; - commandContent += `description: '${description}'\n`; - commandContent += `---\n\n`; - - commandContent += `You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.\n\n`; - - // Add any extra content (e.g., warnings for custom agents) - if (extraContent) { - commandContent += `${extraContent}\n\n`; - } - - commandContent += `\n`; - commandContent += `1. LOAD the FULL agent file from @${agentPath}\n`; - commandContent += `2. READ its entire contents - this contains the complete agent persona, menu, and instructions\n`; - commandContent += `3. Execute ALL activation steps exactly as written in the agent file\n`; - commandContent += `4. Follow the agent's persona and menu system precisely\n`; - commandContent += `5. Stay in character throughout the session\n`; - commandContent += `\n`; - - // Write command file - await this.writeFile(commandPath, commandContent); - } - - /** - * Create a command file for an agent - */ - async createCommandFile(agent, content, commandPath, projectDir) { - // Extract metadata from agent content - const titleMatch = content.match(/title="([^"]+)"/); - const title = titleMatch ? titleMatch[1] : this.formatTitle(agent.name); - - const iconMatch = content.match(/icon="([^"]+)"/); - const icon = iconMatch ? iconMatch[1] : '🤖'; - - const whenToUseMatch = content.match(/whenToUse="([^"]+)"/); - const whenToUse = whenToUseMatch ? whenToUseMatch[1] : `Use for ${title} tasks`; - - // Get relative path - const relativePath = path.relative(projectDir, agent.path).replaceAll('\\', '/'); - - // Use unified method - await this.createAgentCommandFile(commandPath, { - name: title, - description: whenToUse, - agentPath: relativePath, - icon: icon, - }); - } - - /** - * Format name as title - */ - formatTitle(name) { - return name - .split('-') - .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) - .join(' '); - } - - /** - * Cleanup Roo configuration - */ - async cleanup(projectDir) { - const fs = require('fs-extra'); - const rooCommandsDir = path.join(projectDir, this.configDir, this.commandsDir); - - if (await fs.pathExists(rooCommandsDir)) { - const files = await fs.readdir(rooCommandsDir); - let removedCount = 0; - - for (const file of files) { - if (file.startsWith('bmad-') && file.endsWith('.md')) { - await fs.remove(path.join(rooCommandsDir, file)); - removedCount++; - } - } - - if (removedCount > 0) { - console.log(chalk.dim(`Removed ${removedCount} BMAD commands from .roo/commands/`)); - } - } - - // Also clean up old .roomodes file if it exists - const roomodesPath = path.join(projectDir, '.roomodes'); - if (await fs.pathExists(roomodesPath)) { - const content = await fs.readFile(roomodesPath, 'utf8'); - - // Remove BMAD modes only - const lines = content.split('\n'); - const filteredLines = []; - let skipMode = false; - let removedCount = 0; - - for (const line of lines) { - if (/^\s*- slug: bmad-/.test(line)) { - skipMode = true; - removedCount++; - } else if (skipMode && /^\s*- slug: /.test(line)) { - skipMode = false; - } - - if (!skipMode) { - filteredLines.push(line); - } - } - - // Write back filtered content - await fs.writeFile(roomodesPath, filteredLines.join('\n')); - if (removedCount > 0) { - console.log(chalk.dim(`Removed ${removedCount} BMAD modes from legacy .roomodes file`)); - } - } - } - - /** - * Install a custom agent launcher for Roo - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata (unused, kept for compatibility) - * @returns {Object} Installation result - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - const rooCommandsDir = path.join(projectDir, this.configDir, this.commandsDir); - await this.ensureDir(rooCommandsDir); - - // Use dash format: bmad-custom-agents-fred-commit-poet.md - const commandName = customAgentDashName(agentName).replace('.md', ''); - const commandPath = path.join(rooCommandsDir, `${commandName}.md`); - - // Check if command already exists - if (await this.pathExists(commandPath)) { - return { - ide: 'roo', - path: path.join(this.configDir, this.commandsDir, `${commandName}.md`), - command: commandName, - type: 'custom-agent-launcher', - alreadyExists: true, - }; - } - - // Read the custom agent file to extract metadata (same as regular agents) - const fullAgentPath = path.join(projectDir, agentPath); - const content = await this.readFile(fullAgentPath); - - // Extract metadata from agent content - const titleMatch = content.match(/title="([^"]+)"/); - const title = titleMatch ? titleMatch[1] : this.formatTitle(agentName); - - const iconMatch = content.match(/icon="([^"]+)"/); - const icon = iconMatch ? iconMatch[1] : '🤖'; - - const whenToUseMatch = content.match(/whenToUse="([^"]+)"/); - const whenToUse = whenToUseMatch ? whenToUseMatch[1] : `Use for ${title} tasks`; - - // Use unified method without extra content (clean) - await this.createAgentCommandFile(commandPath, { - name: title, - description: whenToUse, - agentPath: agentPath, - icon: icon, - }); - - return { - ide: 'roo', - path: path.join(this.configDir, this.commandsDir, `${commandName}.md`), - command: commandName, - type: 'custom-agent-launcher', - }; - } -} - -module.exports = { RooSetup }; diff --git a/tools/cli/installers/lib/ide/rovo-dev.js b/tools/cli/installers/lib/ide/rovo-dev.js deleted file mode 100644 index ecb34d4b..00000000 --- a/tools/cli/installers/lib/ide/rovo-dev.js +++ /dev/null @@ -1,290 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const chalk = require('chalk'); -const { BaseIdeSetup } = require('./_base-ide'); -const { AgentCommandGenerator } = require('./shared/agent-command-generator'); -const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator'); -const { TaskToolCommandGenerator } = require('./shared/task-tool-command-generator'); - -/** - * Rovo Dev IDE setup handler - * - * Installs BMAD agents as Rovo Dev subagents in .rovodev/subagents/ - * Installs workflows and tasks/tools as reference guides in .rovodev/ - * Rovo Dev automatically discovers agents and integrates with BMAD like other IDEs - */ -class RovoDevSetup extends BaseIdeSetup { - constructor() { - super('rovo-dev', 'Atlassian Rovo Dev', false); - this.configDir = '.rovodev'; - this.subagentsDir = 'subagents'; - this.workflowsDir = 'workflows'; - this.referencesDir = 'references'; - } - - /** - * Cleanup old BMAD installation before reinstalling - * @param {string} projectDir - Project directory - */ - async cleanup(projectDir) { - const rovoDevDir = path.join(projectDir, this.configDir); - - if (!(await fs.pathExists(rovoDevDir))) { - return; - } - - // Clean BMAD agents from subagents directory - const subagentsDir = path.join(rovoDevDir, this.subagentsDir); - if (await fs.pathExists(subagentsDir)) { - const entries = await fs.readdir(subagentsDir); - const bmadFiles = entries.filter((file) => file.startsWith('bmad-') && file.endsWith('.md')); - - for (const file of bmadFiles) { - await fs.remove(path.join(subagentsDir, file)); - } - } - - // Clean BMAD workflows from workflows directory - const workflowsDir = path.join(rovoDevDir, this.workflowsDir); - if (await fs.pathExists(workflowsDir)) { - const entries = await fs.readdir(workflowsDir); - const bmadFiles = entries.filter((file) => file.startsWith('bmad-') && file.endsWith('.md')); - - for (const file of bmadFiles) { - await fs.remove(path.join(workflowsDir, file)); - } - } - - // Clean BMAD tasks/tools from references directory - const referencesDir = path.join(rovoDevDir, this.referencesDir); - if (await fs.pathExists(referencesDir)) { - const entries = await fs.readdir(referencesDir); - const bmadFiles = entries.filter((file) => file.startsWith('bmad-') && file.endsWith('.md')); - - for (const file of bmadFiles) { - await fs.remove(path.join(referencesDir, file)); - } - } - } - - /** - * Setup Rovo Dev configuration - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Object} options - Setup options - */ - async setup(projectDir, bmadDir, options = {}) { - console.log(chalk.cyan(`Setting up ${this.name}...`)); - - // Clean up old BMAD installation first - await this.cleanup(projectDir); - - // Create .rovodev directory structure - const rovoDevDir = path.join(projectDir, this.configDir); - const subagentsDir = path.join(rovoDevDir, this.subagentsDir); - const workflowsDir = path.join(rovoDevDir, this.workflowsDir); - const referencesDir = path.join(rovoDevDir, this.referencesDir); - - await this.ensureDir(subagentsDir); - await this.ensureDir(workflowsDir); - await this.ensureDir(referencesDir); - - // Generate and install agents - const agentGen = new AgentCommandGenerator(this.bmadFolderName); - const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []); - - let agentCount = 0; - for (const artifact of agentArtifacts) { - const subagentFilename = `bmad-${artifact.module}-${artifact.name}.md`; - const targetPath = path.join(subagentsDir, subagentFilename); - const subagentContent = this.convertToRovoDevSubagent(artifact.content, artifact.name, artifact.module); - await this.writeFile(targetPath, subagentContent); - agentCount++; - } - - // Generate and install workflows - const workflowGen = new WorkflowCommandGenerator(this.bmadFolderName); - const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGen.collectWorkflowArtifacts(bmadDir); - - let workflowCount = 0; - for (const artifact of workflowArtifacts) { - if (artifact.type === 'workflow-command') { - const workflowFilename = path.basename(artifact.relativePath); - const targetPath = path.join(workflowsDir, workflowFilename); - await this.writeFile(targetPath, artifact.content); - workflowCount++; - } - } - - // Generate and install tasks and tools - const taskToolGen = new TaskToolCommandGenerator(); - const { tasks: taskCount, tools: toolCount } = await this.generateTaskToolReferences(bmadDir, referencesDir, taskToolGen); - - // Summary output - console.log(chalk.green(`✓ ${this.name} configured:`)); - console.log(chalk.dim(` - ${agentCount} agents installed to .rovodev/subagents/`)); - if (workflowCount > 0) { - console.log(chalk.dim(` - ${workflowCount} workflows installed to .rovodev/workflows/`)); - } - if (taskCount + toolCount > 0) { - console.log( - chalk.dim(` - ${taskCount + toolCount} tasks/tools installed to .rovodev/references/ (${taskCount} tasks, ${toolCount} tools)`), - ); - } - console.log(chalk.yellow(`\n Note: Agents are automatically discovered by Rovo Dev`)); - console.log(chalk.dim(` - Access agents by typing @ in Rovo Dev to see available options`)); - console.log(chalk.dim(` - Workflows and references are available in .rovodev/ directory`)); - - return { - success: true, - agents: agentCount, - workflows: workflowCount, - tasks: taskCount, - tools: toolCount, - }; - } - - /** - * Generate task and tool reference guides - * @param {string} bmadDir - BMAD directory - * @param {string} referencesDir - References directory - * @param {TaskToolCommandGenerator} taskToolGen - Generator instance - */ - async generateTaskToolReferences(bmadDir, referencesDir, taskToolGen) { - const tasks = await taskToolGen.loadTaskManifest(bmadDir); - const tools = await taskToolGen.loadToolManifest(bmadDir); - - const standaloneTasks = tasks ? tasks.filter((t) => t.standalone === 'true' || t.standalone === true) : []; - const standaloneTools = tools ? tools.filter((t) => t.standalone === 'true' || t.standalone === true) : []; - - let taskCount = 0; - for (const task of standaloneTasks) { - const commandContent = taskToolGen.generateCommandContent(task, 'task'); - const targetPath = path.join(referencesDir, `bmad-task-${task.module}-${task.name}.md`); - await this.writeFile(targetPath, commandContent); - taskCount++; - } - - let toolCount = 0; - for (const tool of standaloneTools) { - const commandContent = taskToolGen.generateCommandContent(tool, 'tool'); - const targetPath = path.join(referencesDir, `bmad-tool-${tool.module}-${tool.name}.md`); - await this.writeFile(targetPath, commandContent); - toolCount++; - } - - return { tasks: taskCount, tools: toolCount }; - } - - /** - * Convert BMAD agent launcher to Rovo Dev subagent format - * - * Rovo Dev subagents use Markdown files with YAML frontmatter containing: - * - name: Unique identifier for the subagent - * - description: One-line description of the subagent's purpose - * - tools: Array of tools the subagent can use (optional) - * - model: Specific model for this subagent (optional) - * - load_memory: Whether to load memory files (optional, defaults to true) - * - * @param {string} launcherContent - Original agent launcher content - * @param {string} agentName - Name of the agent - * @param {string} moduleName - Name of the module - * @returns {string} Rovo Dev subagent-formatted content - */ - convertToRovoDevSubagent(launcherContent, agentName, moduleName) { - // Extract metadata from the launcher XML - const titleMatch = launcherContent.match(/title="([^"]+)"/); - const title = titleMatch ? titleMatch[1] : this.formatTitle(agentName); - - const descriptionMatch = launcherContent.match(/description="([^"]+)"/); - const description = descriptionMatch ? descriptionMatch[1] : `BMAD agent: ${title}`; - - const roleDefinitionMatch = launcherContent.match(/roleDefinition="([^"]+)"/); - const roleDefinition = roleDefinitionMatch ? roleDefinitionMatch[1] : `You are a specialized agent for ${title.toLowerCase()} tasks.`; - - // Extract the main system prompt from the launcher (content after closing tags) - let systemPrompt = roleDefinition; - - // Try to extract additional instructions from the launcher content - const instructionsMatch = launcherContent.match(/([\s\S]*?)<\/instructions>/); - if (instructionsMatch) { - systemPrompt += '\n\n' + instructionsMatch[1].trim(); - } - - // Build YAML frontmatter for Rovo Dev subagent - const frontmatter = { - name: `bmad-${moduleName}-${agentName}`, - description: description, - // Note: tools and model can be added by users in their .rovodev/subagents/*.md files - // We don't enforce specific tools since BMAD agents are flexible - }; - - // Create YAML frontmatter string with proper quoting for special characters - let yamlContent = '---\n'; - yamlContent += `name: ${frontmatter.name}\n`; - // Quote description to handle colons and other special characters in YAML - yamlContent += `description: "${frontmatter.description.replaceAll('"', String.raw`\"`)}"\n`; - yamlContent += '---\n'; - - // Combine frontmatter with system prompt - const subagentContent = yamlContent + systemPrompt; - - return subagentContent; - } - - /** - * Detect whether Rovo Dev is already configured in the project - * @param {string} projectDir - Project directory - * @returns {boolean} - */ - async detect(projectDir) { - const rovoDevDir = path.join(projectDir, this.configDir); - - if (!(await fs.pathExists(rovoDevDir))) { - return false; - } - - // Check for BMAD agents in subagents directory - const subagentsDir = path.join(rovoDevDir, this.subagentsDir); - if (await fs.pathExists(subagentsDir)) { - try { - const entries = await fs.readdir(subagentsDir); - if (entries.some((entry) => entry.startsWith('bmad-') && entry.endsWith('.md'))) { - return true; - } - } catch { - // Continue checking other directories - } - } - - // Check for BMAD workflows in workflows directory - const workflowsDir = path.join(rovoDevDir, this.workflowsDir); - if (await fs.pathExists(workflowsDir)) { - try { - const entries = await fs.readdir(workflowsDir); - if (entries.some((entry) => entry.startsWith('bmad-') && entry.endsWith('.md'))) { - return true; - } - } catch { - // Continue checking other directories - } - } - - // Check for BMAD tasks/tools in references directory - const referencesDir = path.join(rovoDevDir, this.referencesDir); - if (await fs.pathExists(referencesDir)) { - try { - const entries = await fs.readdir(referencesDir); - if (entries.some((entry) => entry.startsWith('bmad-') && entry.endsWith('.md'))) { - return true; - } - } catch { - // Continue - } - } - - return false; - } -} - -module.exports = { RovoDevSetup }; diff --git a/tools/cli/installers/lib/ide/shared/agent-command-generator.js b/tools/cli/installers/lib/ide/shared/agent-command-generator.js index 6d610b6b..084ed048 100644 --- a/tools/cli/installers/lib/ide/shared/agent-command-generator.js +++ b/tools/cli/installers/lib/ide/shared/agent-command-generator.js @@ -31,11 +31,23 @@ class AgentCommandGenerator { const launcherContent = await this.generateLauncherContent(agent); // Use relativePath if available (for nested agents), otherwise just name with .md const agentPathInModule = agent.relativePath || `${agent.name}.md`; + // Calculate the relative agent path (e.g., bmm/agents/pm.md) + let agentRelPath = agent.path; + // Remove _bmad/ prefix if present to get relative path from project root + // Handle both absolute paths (/path/to/_bmad/...) and relative paths (_bmad/...) + if (agentRelPath.includes('_bmad/')) { + const parts = agentRelPath.split(/_bmad\//); + if (parts.length > 1) { + agentRelPath = parts.slice(1).join('/'); + } + } artifacts.push({ type: 'agent-launcher', - module: agent.module, name: agent.name, - relativePath: path.join(agent.module, 'agents', agentPathInModule), + description: agent.description || `${agent.name} agent`, + module: agent.module, + relativePath: path.join(agent.module, 'agents', agentPathInModule), // For command filename + agentPath: agentRelPath, // Relative path to actual agent file content: launcherContent, sourcePath: agent.path, }); @@ -94,8 +106,8 @@ class AgentCommandGenerator { } /** - * Write agent launcher artifacts using COLON format (for folder-based IDEs) - * Creates flat files like: bmad:bmm:pm.md + * Write agent launcher artifacts using underscore format (Windows-compatible) + * Creates flat files like: bmad_bmm_pm.md * * @param {string} baseCommandsDir - Base commands directory for the IDE * @param {Array} artifacts - Agent launcher artifacts @@ -106,7 +118,7 @@ class AgentCommandGenerator { for (const artifact of artifacts) { if (artifact.type === 'agent-launcher') { - // Convert relativePath to colon format: bmm/agents/pm.md → bmad:bmm:pm.md + // Convert relativePath to underscore format: bmm/agents/pm.md → bmad_bmm_pm.md const flatName = toColonPath(artifact.relativePath); const launcherPath = path.join(baseCommandsDir, flatName); await fs.ensureDir(path.dirname(launcherPath)); @@ -119,8 +131,10 @@ class AgentCommandGenerator { } /** - * Write agent launcher artifacts using DASH format (for flat IDEs) - * Creates flat files like: bmad-bmm-pm.md + * Write agent launcher artifacts using dash format (NEW STANDARD) + * Creates flat files like: bmad-bmm-pm.agent.md + * + * The .agent.md suffix distinguishes agents from workflows/tasks/tools. * * @param {string} baseCommandsDir - Base commands directory for the IDE * @param {Array} artifacts - Agent launcher artifacts @@ -131,7 +145,7 @@ class AgentCommandGenerator { for (const artifact of artifacts) { if (artifact.type === 'agent-launcher') { - // Convert relativePath to dash format: bmm/agents/pm.md → bmad-bmm-pm.md + // Convert relativePath to dash format: bmm/agents/pm.md → bmad-bmm-pm.agent.md const flatName = toDashPath(artifact.relativePath); const launcherPath = path.join(baseCommandsDir, flatName); await fs.ensureDir(path.dirname(launcherPath)); @@ -144,18 +158,18 @@ class AgentCommandGenerator { } /** - * Get the custom agent name in colon format + * Get the custom agent name in underscore format (Windows-compatible) * @param {string} agentName - Custom agent name - * @returns {string} Colon-formatted filename + * @returns {string} Underscore-formatted filename */ getCustomAgentColonName(agentName) { return customAgentColonName(agentName); } /** - * Get the custom agent name in dash format + * Get the custom agent name in underscore format (Windows-compatible) * @param {string} agentName - Custom agent name - * @returns {string} Dash-formatted filename + * @returns {string} Underscore-formatted filename */ getCustomAgentDashName(agentName) { return customAgentDashName(agentName); diff --git a/tools/cli/installers/lib/ide/shared/bmad-artifacts.js b/tools/cli/installers/lib/ide/shared/bmad-artifacts.js index eb190589..e88a64f5 100644 --- a/tools/cli/installers/lib/ide/shared/bmad-artifacts.js +++ b/tools/cli/installers/lib/ide/shared/bmad-artifacts.js @@ -86,6 +86,11 @@ async function getAgentsFromDir(dirPath, moduleName, relativePath = '') { const entries = await fs.readdir(dirPath, { withFileTypes: true }); for (const entry of entries) { + // Skip if entry.name is undefined or not a string + if (!entry.name || typeof entry.name !== 'string') { + continue; + } + const fullPath = path.join(dirPath, entry.name); const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name; diff --git a/tools/cli/installers/lib/ide/shared/path-utils.js b/tools/cli/installers/lib/ide/shared/path-utils.js index d0b06f67..7c335d4b 100644 --- a/tools/cli/installers/lib/ide/shared/path-utils.js +++ b/tools/cli/installers/lib/ide/shared/path-utils.js @@ -2,88 +2,81 @@ * Path transformation utilities for IDE installer standardization * * Provides utilities to convert hierarchical paths to flat naming conventions. - * - Colon format (bmad:module:name.md) for folder-based IDEs converting to flat - * - Dash format (bmad-module-name.md) for already-flat IDEs + * + * DASH-BASED NAMING (new standard): + * - Agents: bmad-module-name.agent.md (with .agent.md suffix) + * - Workflows/Tasks/Tools: bmad-module-name.md + * + * Example outputs: + * - cis/agents/storymaster.md → bmad-cis-storymaster.agent.md + * - bmm/workflows/plan-project.md → bmad-bmm-plan-project.md + * - bmm/tasks/create-story.md → bmad-bmm-create-story.md + * - core/agents/brainstorming.md → bmad-brainstorming.agent.md */ -// Type segments to filter out from paths -const TYPE_SEGMENTS = ['agents', 'workflows', 'tasks', 'tools']; +// Type segments - agents are included in naming, others are filtered out +const TYPE_SEGMENTS = ['workflows', 'tasks', 'tools']; +const AGENT_SEGMENT = 'agents'; /** - * Convert hierarchical path to flat colon-separated name (for folder-based IDEs) - * Converts: 'bmm/agents/pm.md' → 'bmad:bmm:pm.md' - * Converts: 'bmm/workflows/correct-course.md' → 'bmad:bmm:correct-course.md' + * Convert hierarchical path to flat dash-separated name (NEW STANDARD) + * Converts: 'bmm', 'agents', 'pm' → 'bmad-bmm-pm.agent.md' + * Converts: 'bmm', 'workflows', 'correct-course' → 'bmad-bmm-correct-course.md' + * Converts: 'core', 'agents', 'brainstorming' → 'bmad-brainstorming.agent.md' (core items skip module prefix) * * @param {string} module - Module name (e.g., 'bmm', 'core') - * @param {string} type - Artifact type ('agents', 'workflows', 'tasks', 'tools') - filtered out - * @param {string} name - Artifact name (e.g., 'pm', 'correct-course') - * @returns {string} Flat filename like 'bmad:bmm:pm.md' + * @param {string} type - Artifact type ('agents', 'workflows', 'tasks', 'tools') + * @param {string} name - Artifact name (e.g., 'pm', 'brainstorming') + * @returns {string} Flat filename like 'bmad-bmm-pm.agent.md' or 'bmad-bmm-correct-course.md' */ -function toColonName(module, type, name) { - return `bmad:${module}:${name}.md`; +function toDashName(module, type, name) { + const isAgent = type === AGENT_SEGMENT; + + // For core module, skip the module prefix: use 'bmad-name.md' instead of 'bmad-core-name.md' + if (module === 'core') { + return isAgent ? `bmad-${name}.agent.md` : `bmad-${name}.md`; + } + + // Module artifacts: bmad-module-name.md or bmad-module-name.agent.md + // eslint-disable-next-line unicorn/prefer-string-replace-all -- regex replace is intentional here + const dashName = name.replace(/\//g, '-'); // Flatten nested paths + return isAgent ? `bmad-${module}-${dashName}.agent.md` : `bmad-${module}-${dashName}.md`; } /** - * Convert relative path to flat colon-separated name (for folder-based IDEs) - * Converts: 'bmm/agents/pm.md' → 'bmad:bmm:pm.md' - * Converts: 'bmm/workflows/correct-course.md' → 'bmad:bmm:correct-course.md' - * - * @param {string} relativePath - Path like 'bmm/agents/pm.md' - * @returns {string} Flat filename like 'bmad:bmm:pm.md' - */ -function toColonPath(relativePath) { - const withoutExt = relativePath.replace('.md', ''); - const parts = withoutExt.split(/[/\\]/); - // Filter out type segments (agents, workflows, tasks, tools) - const filtered = parts.filter((p) => !TYPE_SEGMENTS.includes(p)); - return `bmad:${filtered.join(':')}.md`; -} - -/** - * Convert hierarchical path to flat dash-separated name (for flat IDEs) - * Converts: 'bmm/agents/pm.md' → 'bmad-bmm-pm.md' + * Convert relative path to flat dash-separated name + * Converts: 'bmm/agents/pm.md' → 'bmad-bmm-pm.agent.md' * Converts: 'bmm/workflows/correct-course.md' → 'bmad-bmm-correct-course.md' + * Converts: 'core/agents/brainstorming.md' → 'bmad-brainstorming.agent.md' (core items skip module prefix) * * @param {string} relativePath - Path like 'bmm/agents/pm.md' - * @returns {string} Flat filename like 'bmad-bmm-pm.md' + * @returns {string} Flat filename like 'bmad-bmm-pm.agent.md' or 'bmad-brainstorming.md' */ function toDashPath(relativePath) { + if (!relativePath || typeof relativePath !== 'string') { + // Return a safe default for invalid input + return 'bmad-unknown.md'; + } + const withoutExt = relativePath.replace('.md', ''); const parts = withoutExt.split(/[/\\]/); - // Filter out type segments (agents, workflows, tasks, tools) - const filtered = parts.filter((p) => !TYPE_SEGMENTS.includes(p)); - return `bmad-${filtered.join('-')}.md`; + + const module = parts[0]; + const type = parts[1]; + const name = parts.slice(2).join('-'); + + return toDashName(module, type, name); } /** - * Create custom agent colon name (for folder-based IDEs) - * Creates: 'bmad:custom:fred-commit-poet.md' + * Create custom agent dash name + * Creates: 'bmad-custom-fred-commit-poet.agent.md' * * @param {string} agentName - Custom agent name - * @returns {string} Flat filename like 'bmad:custom:fred-commit-poet.md' - */ -function customAgentColonName(agentName) { - return `bmad:custom:${agentName}.md`; -} - -/** - * Create custom agent dash name (for flat IDEs) - * Creates: 'bmad-custom-fred-commit-poet.md' - * - * @param {string} agentName - Custom agent name - * @returns {string} Flat filename like 'bmad-custom-fred-commit-poet.md' + * @returns {string} Flat filename like 'bmad-custom-fred-commit-poet.agent.md' */ function customAgentDashName(agentName) { - return `bmad-custom-${agentName}.md`; -} - -/** - * Check if a filename uses colon format - * @param {string} filename - Filename to check - * @returns {boolean} True if filename uses colon format - */ -function isColonFormat(filename) { - return filename.includes('bmad:') && filename.includes(':'); + return `bmad-custom-${agentName}.agent.md`; } /** @@ -92,34 +85,15 @@ function isColonFormat(filename) { * @returns {boolean} True if filename uses dash format */ function isDashFormat(filename) { - return filename.startsWith('bmad-') && !filename.includes(':'); -} - -/** - * Extract parts from a colon-formatted filename - * Parses: 'bmad:bmm:pm.md' → { prefix: 'bmad', module: 'bmm', name: 'pm' } - * - * @param {string} filename - Colon-formatted filename - * @returns {Object|null} Parsed parts or null if invalid format - */ -function parseColonName(filename) { - const withoutExt = filename.replace('.md', ''); - const parts = withoutExt.split(':'); - - if (parts.length < 3 || parts[0] !== 'bmad') { - return null; - } - - return { - prefix: parts[0], - module: parts[1], - name: parts.slice(2).join(':'), // Handle names that might contain colons - }; + return filename.startsWith('bmad-') && filename.includes('-'); } /** * Extract parts from a dash-formatted filename - * Parses: 'bmad-bmm-pm.md' → { prefix: 'bmad', module: 'bmm', name: 'pm' } + * Parses: 'bmad-bmm-pm.agent.md' → { prefix: 'bmad', module: 'bmm', type: 'agents', name: 'pm' } + * Parses: 'bmad-bmm-correct-course.md' → { prefix: 'bmad', module: 'bmm', type: 'workflows', name: 'correct-course' } + * Parses: 'bmad-brainstorming.agent.md' → { prefix: 'bmad', module: 'core', type: 'agents', name: 'brainstorming' } (core agents) + * Parses: 'bmad-brainstorming.md' → { prefix: 'bmad', module: 'core', type: 'workflows', name: 'brainstorming' } (core workflows) * * @param {string} filename - Dash-formatted filename * @returns {Object|null} Parsed parts or null if invalid format @@ -128,26 +102,180 @@ function parseDashName(filename) { const withoutExt = filename.replace('.md', ''); const parts = withoutExt.split('-'); - if (parts.length < 3 || parts[0] !== 'bmad') { + if (parts.length < 2 || parts[0] !== 'bmad') { return null; } + // Check if this is an agent file (has .agent suffix) + const isAgent = withoutExt.endsWith('.agent'); + + if (isAgent) { + // This is an agent file + // Format: bmad-name.agent (core) or bmad-module-name.agent + if (parts.length === 3) { + // Core agent: bmad-name.agent + return { + prefix: parts[0], + module: 'core', + type: 'agents', + name: parts[1], + }; + } else { + // Module agent: bmad-module-name.agent + return { + prefix: parts[0], + module: parts[1], + type: 'agents', + name: parts.slice(2).join('-'), + }; + } + } + + // Not an agent file - must be a workflow/tool/task + // If only 2 parts (bmad-name), it's a core workflow/tool/task + if (parts.length === 2) { + return { + prefix: parts[0], + module: 'core', + type: 'workflows', // Default to workflows for non-agent core items + name: parts[1], + }; + } + + // Otherwise, it's a module workflow/tool/task (bmad-module-name) + return { + prefix: parts[0], + module: parts[1], + type: 'workflows', // Default to workflows for non-agent module items + name: parts.slice(2).join('-'), + }; +} + +// ============================================================================ +// LEGACY FUNCTIONS (underscore format) - kept for backward compatibility +// ============================================================================ + +/** + * Convert hierarchical path to flat underscore-separated name (LEGACY) + * @deprecated Use toDashName instead + */ +function toUnderscoreName(module, type, name) { + const isAgent = type === AGENT_SEGMENT; + if (module === 'core') { + return isAgent ? `bmad_agent_${name}.md` : `bmad_${name}.md`; + } + return isAgent ? `bmad_${module}_agent_${name}.md` : `bmad_${module}_${name}.md`; +} + +/** + * Convert relative path to flat underscore-separated name (LEGACY) + * @deprecated Use toDashPath instead + */ +function toUnderscorePath(relativePath) { + const withoutExt = relativePath.replace('.md', ''); + const parts = withoutExt.split(/[/\\]/); + + const module = parts[0]; + const type = parts[1]; + const name = parts.slice(2).join('_'); + + return toUnderscoreName(module, type, name); +} + +/** + * Create custom agent underscore name (LEGACY) + * @deprecated Use customAgentDashName instead + */ +function customAgentUnderscoreName(agentName) { + return `bmad_custom_${agentName}.md`; +} + +/** + * Check if a filename uses underscore format (LEGACY) + * @deprecated Use isDashFormat instead + */ +function isUnderscoreFormat(filename) { + return filename.startsWith('bmad_') && filename.includes('_'); +} + +/** + * Extract parts from an underscore-formatted filename (LEGACY) + * @deprecated Use parseDashName instead + */ +function parseUnderscoreName(filename) { + const withoutExt = filename.replace('.md', ''); + const parts = withoutExt.split('_'); + + if (parts.length < 2 || parts[0] !== 'bmad') { + return null; + } + + const agentIndex = parts.indexOf('agent'); + + if (agentIndex !== -1) { + if (agentIndex === 1) { + return { + prefix: parts[0], + module: 'core', + type: 'agents', + name: parts.slice(agentIndex + 1).join('_'), + }; + } else { + return { + prefix: parts[0], + module: parts[1], + type: 'agents', + name: parts.slice(agentIndex + 1).join('_'), + }; + } + } + + if (parts.length === 2) { + return { + prefix: parts[0], + module: 'core', + type: 'workflows', + name: parts[1], + }; + } + return { prefix: parts[0], module: parts[1], - name: parts.slice(2).join('-'), // Handle names that might contain dashes + type: 'workflows', + name: parts.slice(2).join('_'), }; } +// Backward compatibility aliases (colon format was same as underscore) +const toColonName = toUnderscoreName; +const toColonPath = toUnderscorePath; +const customAgentColonName = customAgentUnderscoreName; +const isColonFormat = isUnderscoreFormat; +const parseColonName = parseUnderscoreName; + module.exports = { + // New standard (dash-based) + toDashName, + toDashPath, + customAgentDashName, + isDashFormat, + parseDashName, + + // Legacy (underscore-based) - kept for backward compatibility + toUnderscoreName, + toUnderscorePath, + customAgentUnderscoreName, + isUnderscoreFormat, + parseUnderscoreName, + + // Backward compatibility aliases toColonName, toColonPath, - toDashPath, customAgentColonName, - customAgentDashName, isColonFormat, - isDashFormat, parseColonName, - parseDashName, + TYPE_SEGMENTS, + AGENT_SEGMENT, }; diff --git a/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js b/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js index de2af163..0e54ad89 100644 --- a/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +++ b/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js @@ -66,7 +66,7 @@ class TaskToolCommandGenerator { // Convert path to use {project-root} placeholder let itemPath = item.path; - if (itemPath.startsWith('bmad/')) { + if (itemPath && typeof itemPath === 'string' && itemPath.startsWith('bmad/')) { itemPath = `{project-root}/${itemPath}`; } @@ -76,7 +76,7 @@ description: '${description.replaceAll("'", "''")}' # ${item.displayName || item.name} -LOAD and execute the ${type} at: ${itemPath} +Read the entire ${type} file at: ${itemPath} Follow all instructions in the ${type} file exactly as written. `; @@ -117,8 +117,8 @@ Follow all instructions in the ${type} file exactly as written. } /** - * Generate task and tool commands using COLON format (for folder-based IDEs) - * Creates flat files like: bmad:bmm:bmad-help.md + * Generate task and tool commands using underscore format (Windows-compatible) + * Creates flat files like: bmad_bmm_bmad-help.md * * @param {string} projectDir - Project directory * @param {string} bmadDir - BMAD installation directory @@ -138,7 +138,7 @@ Follow all instructions in the ${type} file exactly as written. // Generate command files for tasks for (const task of standaloneTasks) { const commandContent = this.generateCommandContent(task, 'task'); - // Use colon format: bmad:bmm:name.md + // Use underscore format: bmad_bmm_name.md const flatName = toColonName(task.module, 'tasks', task.name); const commandPath = path.join(baseCommandsDir, flatName); await fs.ensureDir(path.dirname(commandPath)); @@ -149,7 +149,7 @@ Follow all instructions in the ${type} file exactly as written. // Generate command files for tools for (const tool of standaloneTools) { const commandContent = this.generateCommandContent(tool, 'tool'); - // Use colon format: bmad:bmm:name.md + // Use underscore format: bmad_bmm_name.md const flatName = toColonName(tool.module, 'tools', tool.name); const commandPath = path.join(baseCommandsDir, flatName); await fs.ensureDir(path.dirname(commandPath)); @@ -165,8 +165,8 @@ Follow all instructions in the ${type} file exactly as written. } /** - * Generate task and tool commands using DASH format (for flat IDEs) - * Creates flat files like: bmad-bmm-bmad-help.md + * Generate task and tool commands using underscore format (Windows-compatible) + * Creates flat files like: bmad_bmm_bmad-help.md * * @param {string} projectDir - Project directory * @param {string} bmadDir - BMAD installation directory @@ -186,7 +186,7 @@ Follow all instructions in the ${type} file exactly as written. // Generate command files for tasks for (const task of standaloneTasks) { const commandContent = this.generateCommandContent(task, 'task'); - // Use dash format: bmad-bmm-name.md + // Use underscore format: bmad_bmm_name.md const flatName = toDashPath(`${task.module}/tasks/${task.name}.md`); const commandPath = path.join(baseCommandsDir, flatName); await fs.ensureDir(path.dirname(commandPath)); @@ -197,7 +197,7 @@ Follow all instructions in the ${type} file exactly as written. // Generate command files for tools for (const tool of standaloneTools) { const commandContent = this.generateCommandContent(tool, 'tool'); - // Use dash format: bmad-bmm-name.md + // Use underscore format: bmad_bmm_name.md const flatName = toDashPath(`${tool.module}/tools/${tool.name}.md`); const commandPath = path.join(baseCommandsDir, flatName); await fs.ensureDir(path.dirname(commandPath)); @@ -213,8 +213,8 @@ Follow all instructions in the ${type} file exactly as written. } /** - * Write task/tool artifacts using COLON format (for folder-based IDEs) - * Creates flat files like: bmad:bmm:bmad-help.md + * Write task/tool artifacts using underscore format (Windows-compatible) + * Creates flat files like: bmad_bmm_bmad-help.md * * @param {string} baseCommandsDir - Base commands directory for the IDE * @param {Array} artifacts - Task/tool artifacts with relativePath @@ -226,7 +226,7 @@ Follow all instructions in the ${type} file exactly as written. for (const artifact of artifacts) { if (artifact.type === 'task' || artifact.type === 'tool') { const commandContent = this.generateCommandContent(artifact, artifact.type); - // Use colon format: bmad:module:name.md + // Use underscore format: bmad_module_name.md const flatName = toColonPath(artifact.relativePath); const commandPath = path.join(baseCommandsDir, flatName); await fs.ensureDir(path.dirname(commandPath)); @@ -239,9 +239,11 @@ Follow all instructions in the ${type} file exactly as written. } /** - * Write task/tool artifacts using DASH format (for flat IDEs) + * Write task/tool artifacts using dash format (NEW STANDARD) * Creates flat files like: bmad-bmm-bmad-help.md * + * Note: Tasks/tools do NOT have .agent.md suffix - only agents do. + * * @param {string} baseCommandsDir - Base commands directory for the IDE * @param {Array} artifacts - Task/tool artifacts with relativePath * @returns {number} Count of commands written diff --git a/tools/cli/installers/lib/ide/shared/workflow-command-generator.js b/tools/cli/installers/lib/ide/shared/workflow-command-generator.js index a10a2b95..b3410b0f 100644 --- a/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +++ b/tools/cli/installers/lib/ide/shared/workflow-command-generator.js @@ -67,10 +67,26 @@ class WorkflowCommandGenerator { for (const workflow of allWorkflows) { const commandContent = await this.generateCommandContent(workflow, bmadDir); + // Calculate the relative workflow path (e.g., bmm/workflows/4-implementation/sprint-planning/workflow.yaml) + let workflowRelPath = workflow.path; + // Remove _bmad/ prefix if present to get relative path from project root + // Handle both absolute paths (/path/to/_bmad/...) and relative paths (_bmad/...) + if (workflowRelPath.includes('_bmad/')) { + const parts = workflowRelPath.split(/_bmad\//); + if (parts.length > 1) { + workflowRelPath = parts.slice(1).join('/'); + } + } + // Determine if this is a YAML workflow + const isYamlWorkflow = workflow.path.endsWith('.yaml') || workflow.path.endsWith('.yml'); artifacts.push({ type: 'workflow-command', + isYamlWorkflow: isYamlWorkflow, // For template selection + name: workflow.name, + description: workflow.description || `${workflow.name} workflow`, module: workflow.module, relativePath: path.join(workflow.module, 'workflows', `${workflow.name}.md`), + workflowPath: workflowRelPath, // Relative path to actual workflow file content: commandContent, sourcePath: workflow.path, }); @@ -240,8 +256,8 @@ When running any workflow: } /** - * Write workflow command artifacts using COLON format (for folder-based IDEs) - * Creates flat files like: bmad:bmm:correct-course.md + * Write workflow command artifacts using underscore format (Windows-compatible) + * Creates flat files like: bmad_bmm_correct-course.md * * @param {string} baseCommandsDir - Base commands directory for the IDE * @param {Array} artifacts - Workflow artifacts @@ -252,7 +268,7 @@ When running any workflow: for (const artifact of artifacts) { if (artifact.type === 'workflow-command') { - // Convert relativePath to colon format: bmm/workflows/correct-course.md → bmad:bmm:correct-course.md + // Convert relativePath to underscore format: bmm/workflows/correct-course.md → bmad_bmm_correct-course.md const flatName = toColonPath(artifact.relativePath); const commandPath = path.join(baseCommandsDir, flatName); await fs.ensureDir(path.dirname(commandPath)); @@ -265,9 +281,11 @@ When running any workflow: } /** - * Write workflow command artifacts using DASH format (for flat IDEs) + * Write workflow command artifacts using dash format (NEW STANDARD) * Creates flat files like: bmad-bmm-correct-course.md * + * Note: Workflows do NOT have .agent.md suffix - only agents do. + * * @param {string} baseCommandsDir - Base commands directory for the IDE * @param {Array} artifacts - Workflow artifacts * @returns {number} Count of commands written diff --git a/tools/cli/installers/lib/ide/templates/combined/antigravity.md b/tools/cli/installers/lib/ide/templates/combined/antigravity.md new file mode 100644 index 00000000..88e806e9 --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/combined/antigravity.md @@ -0,0 +1,8 @@ +--- +name: '{{name}}' +description: '{{description}}' +--- + +Read the entire workflow file at: {project-root}/_bmad/{{workflow_path}} + +Follow all instructions in the workflow file exactly as written. diff --git a/tools/cli/installers/lib/ide/templates/combined/claude-agent.md b/tools/cli/installers/lib/ide/templates/combined/claude-agent.md new file mode 120000 index 00000000..9f6c17b4 --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/combined/claude-agent.md @@ -0,0 +1 @@ +default-agent.md \ No newline at end of file diff --git a/tools/cli/installers/lib/ide/templates/combined/claude-workflow-yaml.md b/tools/cli/installers/lib/ide/templates/combined/claude-workflow-yaml.md new file mode 120000 index 00000000..11f78e1d --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/combined/claude-workflow-yaml.md @@ -0,0 +1 @@ +default-workflow-yaml.md \ No newline at end of file diff --git a/tools/cli/installers/lib/ide/templates/combined/claude-workflow.md b/tools/cli/installers/lib/ide/templates/combined/claude-workflow.md new file mode 120000 index 00000000..8d4ae523 --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/combined/claude-workflow.md @@ -0,0 +1 @@ +default-workflow.md \ No newline at end of file diff --git a/tools/cli/installers/lib/ide/templates/combined/default-agent.md b/tools/cli/installers/lib/ide/templates/combined/default-agent.md new file mode 100644 index 00000000..f8ad9380 --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/combined/default-agent.md @@ -0,0 +1,15 @@ +--- +name: '{{name}}' +description: '{{description}}' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + + +1. LOAD the FULL agent file from {project-root}/_bmad/{{path}} +2. READ its entire contents - this contains the complete agent persona, menu, and instructions +3. FOLLOW every step in the section precisely +4. DISPLAY the welcome/greeting as instructed +5. PRESENT the numbered menu +6. WAIT for user input before proceeding + diff --git a/tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md b/tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md new file mode 100644 index 00000000..eca90437 --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md @@ -0,0 +1,14 @@ +--- +name: '{{name}}' +description: '{{description}}' +--- + +IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded: + + +1. Always LOAD the FULL @{project-root}/{{bmadFolderName}}/core/tasks/workflow.xml +2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config @{project-root}/{{bmadFolderName}}/{{path}} +3. Pass the yaml path @{project-root}/{{bmadFolderName}}/{{path}} as 'workflow-config' parameter to the workflow.xml instructions +4. Follow workflow.xml instructions EXACTLY as written to process and follow the specific workflow config and its instructions +5. Save outputs after EACH section when generating any documents from templates + diff --git a/tools/cli/installers/lib/ide/templates/combined/default-workflow.md b/tools/cli/installers/lib/ide/templates/combined/default-workflow.md new file mode 100644 index 00000000..afb0dea5 --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/combined/default-workflow.md @@ -0,0 +1,6 @@ +--- +name: '{{name}}' +description: '{{description}}' +--- + +IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{project-root}/{{bmadFolderName}}/{{path}}, READ its entire contents and follow its directions exactly! diff --git a/tools/cli/installers/lib/ide/templates/combined/rovodev.md b/tools/cli/installers/lib/ide/templates/combined/rovodev.md new file mode 100644 index 00000000..066945ee --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/combined/rovodev.md @@ -0,0 +1,9 @@ +# {{name}} + +{{description}} + +--- + +Read the entire workflow file at: {project-root}/_bmad/{{workflow_path}} + +Follow all instructions in the workflow file exactly as written. diff --git a/tools/cli/installers/lib/ide/templates/combined/trae.md b/tools/cli/installers/lib/ide/templates/combined/trae.md new file mode 100644 index 00000000..b4d43d7a --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/combined/trae.md @@ -0,0 +1,9 @@ +# {{name}} + +{{description}} + +## Instructions + +Read the entire workflow file at: {project-root}/_bmad/{{workflow_path}} + +Follow all instructions in the workflow file exactly as written. diff --git a/tools/cli/installers/lib/ide/templates/combined/windsurf-workflow.md b/tools/cli/installers/lib/ide/templates/combined/windsurf-workflow.md new file mode 100644 index 00000000..6366425c --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/combined/windsurf-workflow.md @@ -0,0 +1,10 @@ +--- +description: '{{description}}' +auto_execution_mode: "iterate" +--- + +# {{name}} + +Read the entire workflow file at {project-root}/_bmad/{{workflow_path}} + +Follow all instructions in the workflow file exactly as written. diff --git a/tools/cli/installers/lib/ide/templates/split/gemini/body.md b/tools/cli/installers/lib/ide/templates/split/gemini/body.md new file mode 100644 index 00000000..b20f6651 --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/split/gemini/body.md @@ -0,0 +1,10 @@ +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + + +1. LOAD the FULL agent file from {project-root}/_bmad/{{path}} +2. READ its entire contents - this contains the complete agent persona, menu, and instructions +3. FOLLOW every step in the section precisely +4. DISPLAY the welcome/greeting as instructed +5. PRESENT the numbered menu +6. WAIT for user input before proceeding + diff --git a/tools/cli/installers/lib/ide/templates/split/gemini/header.toml b/tools/cli/installers/lib/ide/templates/split/gemini/header.toml new file mode 100644 index 00000000..099b1e26 --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/split/gemini/header.toml @@ -0,0 +1,2 @@ +name = "{{name}}" +description = "{{description}}" diff --git a/tools/cli/installers/lib/ide/templates/split/opencode/body.md b/tools/cli/installers/lib/ide/templates/split/opencode/body.md new file mode 100644 index 00000000..b20f6651 --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/split/opencode/body.md @@ -0,0 +1,10 @@ +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + + +1. LOAD the FULL agent file from {project-root}/_bmad/{{path}} +2. READ its entire contents - this contains the complete agent persona, menu, and instructions +3. FOLLOW every step in the section precisely +4. DISPLAY the welcome/greeting as instructed +5. PRESENT the numbered menu +6. WAIT for user input before proceeding + diff --git a/tools/cli/installers/lib/ide/templates/split/opencode/header.md b/tools/cli/installers/lib/ide/templates/split/opencode/header.md new file mode 100644 index 00000000..a384374c --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/split/opencode/header.md @@ -0,0 +1,4 @@ +--- +name: '{{name}}' +description: '{{description}}' +--- diff --git a/tools/cli/installers/lib/ide/trae.js b/tools/cli/installers/lib/ide/trae.js deleted file mode 100644 index b4bea49b..00000000 --- a/tools/cli/installers/lib/ide/trae.js +++ /dev/null @@ -1,313 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const { BaseIdeSetup } = require('./_base-ide'); -const chalk = require('chalk'); -const { AgentCommandGenerator } = require('./shared/agent-command-generator'); - -/** - * Trae IDE setup handler - */ -class TraeSetup extends BaseIdeSetup { - constructor() { - super('trae', 'Trae'); - this.configDir = '.trae'; - this.rulesDir = 'rules'; - } - - /** - * Setup Trae IDE configuration - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Object} options - Setup options - */ - async setup(projectDir, bmadDir, options = {}) { - console.log(chalk.cyan(`Setting up ${this.name}...`)); - - // Create .trae/rules directory - const traeDir = path.join(projectDir, this.configDir); - const rulesDir = path.join(traeDir, this.rulesDir); - - await this.ensureDir(rulesDir); - - // Clean up any existing BMAD files before reinstalling - await this.cleanup(projectDir); - - // Generate agent launchers - const agentGen = new AgentCommandGenerator(this.bmadFolderName); - const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []); - - // Get tasks, tools, and workflows (standalone only) - const tasks = await this.getTasks(bmadDir, true); - const tools = await this.getTools(bmadDir, true); - const workflows = await this.getWorkflows(bmadDir, true); - - // Process agents as rules with bmad- prefix - let agentCount = 0; - for (const artifact of agentArtifacts) { - const processedContent = await this.createAgentRule(artifact, bmadDir, projectDir); - - // Use bmad- prefix: bmad-agent-{module}-{name}.md - const targetPath = path.join(rulesDir, `bmad-agent-${artifact.module}-${artifact.name}.md`); - await this.writeFile(targetPath, processedContent); - agentCount++; - } - - // Process tasks as rules with bmad- prefix - let taskCount = 0; - for (const task of tasks) { - const content = await this.readFile(task.path); - const processedContent = this.createTaskRule(task, content); - - // Use bmad- prefix: bmad-task-{module}-{name}.md - const targetPath = path.join(rulesDir, `bmad-task-${task.module}-${task.name}.md`); - await this.writeFile(targetPath, processedContent); - taskCount++; - } - - // Process tools as rules with bmad- prefix - let toolCount = 0; - for (const tool of tools) { - const content = await this.readFile(tool.path); - const processedContent = this.createToolRule(tool, content); - - // Use bmad- prefix: bmad-tool-{module}-{name}.md - const targetPath = path.join(rulesDir, `bmad-tool-${tool.module}-${tool.name}.md`); - await this.writeFile(targetPath, processedContent); - toolCount++; - } - - // Process workflows as rules with bmad- prefix - let workflowCount = 0; - for (const workflow of workflows) { - const content = await this.readFile(workflow.path); - const processedContent = this.createWorkflowRule(workflow, content); - - // Use bmad- prefix: bmad-workflow-{module}-{name}.md - const targetPath = path.join(rulesDir, `bmad-workflow-${workflow.module}-${workflow.name}.md`); - await this.writeFile(targetPath, processedContent); - workflowCount++; - } - - const totalRules = agentCount + taskCount + toolCount + workflowCount; - - console.log(chalk.green(`✓ ${this.name} configured:`)); - console.log(chalk.dim(` - ${agentCount} agent rules created`)); - console.log(chalk.dim(` - ${taskCount} task rules created`)); - console.log(chalk.dim(` - ${toolCount} tool rules created`)); - console.log(chalk.dim(` - ${workflowCount} workflow rules created`)); - console.log(chalk.dim(` - Total: ${totalRules} rules`)); - console.log(chalk.dim(` - Rules directory: ${path.relative(projectDir, rulesDir)}`)); - console.log(chalk.dim(` - Agents can be activated with @{agent-name}`)); - - return { - success: true, - rules: totalRules, - agents: agentCount, - tasks: taskCount, - tools: toolCount, - workflows: workflowCount, - }; - } - - /** - * Create rule content for an agent - */ - async createAgentRule(artifact, bmadDir, projectDir) { - // Strip frontmatter from launcher - const frontmatterRegex = /^---\s*\n[\s\S]*?\n---\s*\n/; - const contentWithoutFrontmatter = artifact.content.replace(frontmatterRegex, '').trim(); - - // Extract metadata from launcher content - const titleMatch = artifact.content.match(/description:\s*"([^"]+)"/); - const title = titleMatch ? titleMatch[1] : this.formatTitle(artifact.name); - - // Calculate relative path for reference - const relativePath = path.relative(projectDir, artifact.sourcePath).replaceAll('\\', '/'); - - let ruleContent = `# ${title} Agent Rule - -This rule is triggered when the user types \`@${artifact.name}\` and activates the ${title} agent persona. - -## Agent Activation - -${contentWithoutFrontmatter} - -## File Reference - -The full agent definition is located at: \`${relativePath}\` -`; - - return ruleContent; - } - - /** - * Create rule content for a task - */ - createTaskRule(task, content) { - // Extract task name from content - const nameMatch = content.match(/name="([^"]+)"/); - const taskName = nameMatch ? nameMatch[1] : this.formatTitle(task.name); - - let ruleContent = `# ${taskName} Task Rule - -This rule defines the ${taskName} task workflow. - -## Task Definition - -When this task is triggered, execute the following workflow: - -${content} - -## Usage - -Reference this task with \`@task-${task.name}\` to execute the defined workflow. - -## Module - -Part of the BMAD ${task.module.toUpperCase()} module. -`; - - return ruleContent; - } - - /** - * Create rule content for a tool - */ - createToolRule(tool, content) { - // Extract tool name from content - const nameMatch = content.match(/name="([^"]+)"/); - const toolName = nameMatch ? nameMatch[1] : this.formatTitle(tool.name); - - let ruleContent = `# ${toolName} Tool Rule - -This rule defines the ${toolName} tool. - -## Tool Definition - -When this tool is triggered, execute the following: - -${content} - -## Usage - -Reference this tool with \`@tool-${tool.name}\` to execute it. - -## Module - -Part of the BMAD ${tool.module.toUpperCase()} module. -`; - - return ruleContent; - } - - /** - * Create rule content for a workflow - */ - createWorkflowRule(workflow, content) { - let ruleContent = `# ${workflow.name} Workflow Rule - -This rule defines the ${workflow.name} workflow. - -## Workflow Description - -${workflow.description || 'No description provided'} - -## Workflow Definition - -${content} - -## Usage - -Reference this workflow with \`@workflow-${workflow.name}\` to execute the guided workflow. - -## Module - -Part of the BMAD ${workflow.module.toUpperCase()} module. -`; - - return ruleContent; - } - - /** - * Format agent/task name as title - */ - formatTitle(name) { - return name - .split('-') - .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) - .join(' '); - } - - /** - * Cleanup Trae configuration - surgically remove only BMAD files - */ - async cleanup(projectDir) { - const fs = require('fs-extra'); - const rulesPath = path.join(projectDir, this.configDir, this.rulesDir); - - if (await fs.pathExists(rulesPath)) { - // Only remove files that start with bmad- prefix - const files = await fs.readdir(rulesPath); - let removed = 0; - - for (const file of files) { - if (file.startsWith('bmad-') && file.endsWith('.md')) { - await fs.remove(path.join(rulesPath, file)); - removed++; - } - } - - if (removed > 0) { - console.log(chalk.dim(` Cleaned up ${removed} existing BMAD rules`)); - } - } - } - - /** - * Install a custom agent launcher for Trae - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object} Installation result - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - const traeDir = path.join(projectDir, this.configDir); - const rulesDir = path.join(traeDir, this.rulesDir); - - // Create .trae/rules directory if it doesn't exist - await fs.ensureDir(rulesDir); - - // Create custom agent launcher - const launcherContent = `# ${agentName} Custom Agent - -**⚠️ IMPORTANT**: Run @${agentPath} first to load the complete agent! - -This is a launcher for the custom BMAD agent "${agentName}". - -## Usage -1. First run: \`${agentPath}\` to load the complete agent -2. Then use this rule to activate ${agentName} - -The agent will follow the persona and instructions from the main agent file. - ---- - -*Generated by BMAD Method*`; - - const fileName = `bmad-agent-custom-${agentName.toLowerCase()}.md`; - const launcherPath = path.join(rulesDir, fileName); - - // Write the launcher file - await fs.writeFile(launcherPath, launcherContent, 'utf8'); - - return { - ide: 'trae', - path: path.relative(projectDir, launcherPath), - command: agentName, - type: 'custom-agent-launcher', - }; - } -} - -module.exports = { TraeSetup }; diff --git a/tools/cli/installers/lib/ide/windsurf.js b/tools/cli/installers/lib/ide/windsurf.js deleted file mode 100644 index 92596db3..00000000 --- a/tools/cli/installers/lib/ide/windsurf.js +++ /dev/null @@ -1,258 +0,0 @@ -const path = require('node:path'); -const { BaseIdeSetup } = require('./_base-ide'); -const chalk = require('chalk'); -const { AgentCommandGenerator } = require('./shared/agent-command-generator'); - -/** - * Windsurf IDE setup handler - */ -class WindsurfSetup extends BaseIdeSetup { - constructor() { - super('windsurf', 'Windsurf', true); // preferred IDE - this.configDir = '.windsurf'; - this.workflowsDir = 'workflows'; - } - - /** - * Setup Windsurf IDE configuration - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Object} options - Setup options - */ - async setup(projectDir, bmadDir, options = {}) { - console.log(chalk.cyan(`Setting up ${this.name}...`)); - - // Create .windsurf/workflows/bmad directory structure - const windsurfDir = path.join(projectDir, this.configDir); - const workflowsDir = path.join(windsurfDir, this.workflowsDir); - const bmadWorkflowsDir = path.join(workflowsDir, 'bmad'); - - await this.ensureDir(bmadWorkflowsDir); - - // Clean up any existing BMAD workflows before reinstalling - await this.cleanup(projectDir); - - // Generate agent launchers - const agentGen = new AgentCommandGenerator(this.bmadFolderName); - const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []); - - // Convert artifacts to agent format for module organization - const agents = agentArtifacts.map((a) => ({ module: a.module, name: a.name })); - - // Get tasks, tools, and workflows (standalone only) - const tasks = await this.getTasks(bmadDir, true); - const tools = await this.getTools(bmadDir, true); - const workflows = await this.getWorkflows(bmadDir, true); - - // Create directories for each module under bmad/ - const modules = new Set(); - for (const item of [...agents, ...tasks, ...tools, ...workflows]) modules.add(item.module); - - for (const module of modules) { - await this.ensureDir(path.join(bmadWorkflowsDir, module)); - await this.ensureDir(path.join(bmadWorkflowsDir, module, 'agents')); - await this.ensureDir(path.join(bmadWorkflowsDir, module, 'tasks')); - await this.ensureDir(path.join(bmadWorkflowsDir, module, 'tools')); - await this.ensureDir(path.join(bmadWorkflowsDir, module, 'workflows')); - } - - // Process agent launchers as workflows with organized structure - let agentCount = 0; - for (const artifact of agentArtifacts) { - const processedContent = this.createWorkflowContent({ module: artifact.module, name: artifact.name }, artifact.content); - - // Organized path: bmad/module/agents/agent-name.md - const targetPath = path.join(bmadWorkflowsDir, artifact.module, 'agents', `${artifact.name}.md`); - await this.writeFile(targetPath, processedContent); - agentCount++; - } - - // Process tasks as workflows with organized structure - let taskCount = 0; - for (const task of tasks) { - const content = await this.readFile(task.path); - const processedContent = this.createTaskWorkflowContent(task, content); - - // Organized path: bmad/module/tasks/task-name.md - const targetPath = path.join(bmadWorkflowsDir, task.module, 'tasks', `${task.name}.md`); - await this.writeFile(targetPath, processedContent); - taskCount++; - } - - // Process tools as workflows with organized structure - let toolCount = 0; - for (const tool of tools) { - const content = await this.readFile(tool.path); - const processedContent = this.createToolWorkflowContent(tool, content); - - // Organized path: bmad/module/tools/tool-name.md - const targetPath = path.join(bmadWorkflowsDir, tool.module, 'tools', `${tool.name}.md`); - await this.writeFile(targetPath, processedContent); - toolCount++; - } - - // Process workflows with organized structure - let workflowCount = 0; - for (const workflow of workflows) { - const content = await this.readFile(workflow.path); - const processedContent = this.createWorkflowWorkflowContent(workflow, content); - - // Organized path: bmad/module/workflows/workflow-name.md - const targetPath = path.join(bmadWorkflowsDir, workflow.module, 'workflows', `${workflow.name}.md`); - await this.writeFile(targetPath, processedContent); - workflowCount++; - } - - console.log(chalk.green(`✓ ${this.name} configured:`)); - console.log(chalk.dim(` - ${agentCount} agents installed`)); - console.log(chalk.dim(` - ${taskCount} tasks installed`)); - console.log(chalk.dim(` - ${toolCount} tools installed`)); - console.log(chalk.dim(` - ${workflowCount} workflows installed`)); - console.log(chalk.dim(` - Organized in modules: ${[...modules].join(', ')}`)); - console.log(chalk.dim(` - Workflows directory: ${path.relative(projectDir, workflowsDir)}`)); - - // Provide additional configuration hints - if (options.showHints !== false) { - console.log(chalk.dim('\n Windsurf workflow settings:')); - console.log(chalk.dim(' - auto_execution_mode: 3 (recommended for agents)')); - console.log(chalk.dim(' - auto_execution_mode: 2 (recommended for tasks/tools)')); - console.log(chalk.dim(' - auto_execution_mode: 1 (recommended for workflows)')); - console.log(chalk.dim(' - Workflows can be triggered via the Windsurf menu')); - } - - return { - success: true, - agents: agentCount, - tasks: taskCount, - tools: toolCount, - workflows: workflowCount, - }; - } - - /** - * Create workflow content for an agent - */ - createWorkflowContent(agent, content) { - // Strip existing frontmatter from launcher - const frontmatterRegex = /^---\s*\n[\s\S]*?\n---\s*\n/; - const contentWithoutFrontmatter = content.replace(frontmatterRegex, ''); - - // Create simple Windsurf frontmatter matching original format - let workflowContent = `--- -description: ${agent.name} -auto_execution_mode: 3 ---- - -${contentWithoutFrontmatter}`; - - return workflowContent; - } - - /** - * Create workflow content for a task - */ - createTaskWorkflowContent(task, content) { - // Create simple Windsurf frontmatter matching original format - let workflowContent = `--- -description: task-${task.name} -auto_execution_mode: 2 ---- - -${content}`; - - return workflowContent; - } - - /** - * Create workflow content for a tool - */ - createToolWorkflowContent(tool, content) { - // Create simple Windsurf frontmatter matching original format - let workflowContent = `--- -description: tool-${tool.name} -auto_execution_mode: 2 ---- - -${content}`; - - return workflowContent; - } - - /** - * Create workflow content for a workflow - */ - createWorkflowWorkflowContent(workflow, content) { - // Create simple Windsurf frontmatter matching original format - let workflowContent = `--- -description: ${workflow.name} -auto_execution_mode: 1 ---- - -${content}`; - - return workflowContent; - } - - /** - * Cleanup Windsurf configuration - surgically remove only BMAD files - */ - async cleanup(projectDir) { - const fs = require('fs-extra'); - const bmadPath = path.join(projectDir, this.configDir, this.workflowsDir, 'bmad'); - - if (await fs.pathExists(bmadPath)) { - // Remove the entire bmad folder - this is our territory - await fs.remove(bmadPath); - console.log(chalk.dim(` Cleaned up existing BMAD workflows`)); - } - } - - /** - * Install a custom agent launcher for Windsurf - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object|null} Info about created command - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - const fs = require('fs-extra'); - const customAgentsDir = path.join(projectDir, this.configDir, this.workflowsDir, 'bmad', 'custom', 'agents'); - - if (!(await this.exists(path.join(projectDir, this.configDir)))) { - return null; // IDE not configured for this project - } - - await this.ensureDir(customAgentsDir); - - const launcherContent = `You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. - - -1. LOAD the FULL agent file from @${agentPath} -2. READ its entire contents - this contains the complete agent persona, menu, and instructions -3. FOLLOW every step in the section precisely -4. DISPLAY the welcome/greeting as instructed -5. PRESENT the numbered menu -6. WAIT for user input before proceeding - -`; - - // Windsurf uses workflow format with frontmatter - const workflowContent = `--- -description: ${metadata.title || agentName} -auto_execution_mode: 3 ---- - -${launcherContent}`; - - const launcherPath = path.join(customAgentsDir, `${agentName}.md`); - await fs.writeFile(launcherPath, workflowContent); - - return { - path: launcherPath, - command: `bmad/custom/agents/${agentName}`, - }; - } -} - -module.exports = { WindsurfSetup }; diff --git a/tools/cli/installers/lib/modules/external-manager.js b/tools/cli/installers/lib/modules/external-manager.js index 8843df38..a68a2ba1 100644 --- a/tools/cli/installers/lib/modules/external-manager.js +++ b/tools/cli/installers/lib/modules/external-manager.js @@ -54,6 +54,7 @@ class ExternalModuleManager { description: moduleConfig.description || '', defaultSelected: moduleConfig.defaultSelected === true, type: moduleConfig.type || 'community', // bmad-org or community + npmPackage: moduleConfig.npmPackage || null, // Include npm package name isExternal: true, }); } @@ -95,6 +96,7 @@ class ExternalModuleManager { description: moduleConfig.description || '', defaultSelected: moduleConfig.defaultSelected === true, type: moduleConfig.type || 'community', // bmad-org or community + npmPackage: moduleConfig.npmPackage || null, // Include npm package name isExternal: true, }; } diff --git a/tools/cli/installers/lib/modules/manager.js b/tools/cli/installers/lib/modules/manager.js index 453fa81c..efbddcf0 100644 --- a/tools/cli/installers/lib/modules/manager.js +++ b/tools/cli/installers/lib/modules/manager.js @@ -371,9 +371,9 @@ class ModuleManager { const fetchSpinner = ora(`Fetching ${moduleInfo.name}...`).start(); try { const currentRef = execSync('git rev-parse HEAD', { cwd: moduleCacheDir, stdio: 'pipe' }).toString().trim(); - execSync('git fetch --depth 1', { cwd: moduleCacheDir, stdio: 'pipe' }); - execSync('git checkout -f', { cwd: moduleCacheDir, stdio: 'pipe' }); - execSync('git pull --ff-only', { cwd: moduleCacheDir, stdio: 'pipe' }); + // Fetch and reset to remote - works better with shallow clones than pull + execSync('git fetch origin --depth 1', { cwd: moduleCacheDir, stdio: 'pipe' }); + execSync('git reset --hard origin/HEAD', { cwd: moduleCacheDir, stdio: 'pipe' }); const newRef = execSync('git rev-parse HEAD', { cwd: moduleCacheDir, stdio: 'pipe' }).toString().trim(); fetchSpinner.succeed(`Fetched ${moduleInfo.name}`); @@ -555,10 +555,23 @@ class ModuleManager { await this.runModuleInstaller(moduleName, bmadDir, options); } + // Capture version info for manifest + const { Manifest } = require('../core/manifest'); + const manifestObj = new Manifest(); + const versionInfo = await manifestObj.getModuleVersionInfo(moduleName, bmadDir, sourcePath); + + await manifestObj.addModule(bmadDir, moduleName, { + version: versionInfo.version, + source: versionInfo.source, + npmPackage: versionInfo.npmPackage, + repoUrl: versionInfo.repoUrl, + }); + return { success: true, module: moduleName, path: targetPath, + versionInfo, }; } diff --git a/tools/cli/lib/ui.js b/tools/cli/lib/ui.js index a5b53a77..da5420cb 100644 --- a/tools/cli/lib/ui.js +++ b/tools/cli/lib/ui.js @@ -81,7 +81,7 @@ class UI { hasLegacyCfg = bmadResult.hasLegacyCfg; } - // Handle legacy .bmad or _cfg folder - these are very old (more than 2 versions behind) + // Handle legacy .bmad or _cfg folder - these are very old (v4 or alpha) // Show version warning instead of offering conversion if (hasLegacyBmadFolder || hasLegacyCfg) { console.log(''); @@ -92,9 +92,8 @@ class UI { 'Found a ".bmad"/"bmad" folder, or a legacy "_cfg" folder under the bmad folder - this is from a old BMAD version that is out of date for automatic upgrade, manual intervention required.', ), ); - console.log(chalk.yellow('This version is more than 2 alpha versions behind current.')); + console.log(chalk.yellow('You have a legacy version installed (v4 or alpha).')); console.log(''); - console.log(chalk.dim('For stability, we only support updates from the previous 2 alpha versions.')); console.log(chalk.dim('Legacy installations may have compatibility issues.')); console.log(''); console.log(chalk.dim('For the best experience, we strongly recommend:')); @@ -188,8 +187,8 @@ class UI { const currentVersion = require(packageJsonPath).version; const installedVersion = existingInstall.version || 'unknown'; - // Check if version is too old and warn user - const shouldProceed = await this.showOldAlphaVersionWarning(installedVersion, currentVersion, path.basename(bmadDir)); + // Check if version is pre beta + const shouldProceed = await this.showLegacyVersionWarning(installedVersion, currentVersion, path.basename(bmadDir)); // If user chose to cancel, exit the installer if (!shouldProceed) { @@ -362,6 +361,7 @@ class UI { // Get IDE manager to fetch available IDEs dynamically const { IdeManager } = require('../installers/lib/ide/manager'); const ideManager = new IdeManager(); + await ideManager.ensureInitialized(); // IMPORTANT: Must initialize before getting IDEs const preferredIdes = ideManager.getPreferredIdes(); const otherIdes = ideManager.getOtherIdes(); @@ -1456,96 +1456,40 @@ class UI { } /** - * Parse alpha version string (e.g., "6.0.0-Alpha.20") - * @param {string} version - Version string - * @returns {Object|null} Object with alphaNumber and fullVersion, or null if invalid - */ - parseAlphaVersion(version) { - if (!version || version === 'unknown') { - return null; - } - - // Remove 'v' prefix if present - const cleanVersion = version.toString().replace(/^v/i, ''); - - // Match alpha version pattern: X.Y.Z-Alpha.N (case-insensitive) - const match = cleanVersion.match(/[\d.]+-Alpha\.(\d+)/i); - - if (!match) { - return null; - } - - return { - alphaNumber: parseInt(match[1], 10), - fullVersion: cleanVersion, - }; - } - - /** - * Check if installed version is more than 2 alpha versions behind current + * Check if installed version is a legacy version that needs fresh install * @param {string} installedVersion - The installed version - * @param {string} currentVersion - The current version - * @returns {Object} Object with { isOldVersion, versionDiff, shouldWarn, installed, current } + * @returns {boolean} True if legacy (v4 or any alpha) */ - checkAlphaVersionAge(installedVersion, currentVersion) { - const installed = this.parseAlphaVersion(installedVersion); - const current = this.parseAlphaVersion(currentVersion); - - // If we can't parse either version, don't warn - if (!installed || !current) { - return { isOldVersion: false, versionDiff: 0, shouldWarn: false }; + isLegacyVersion(installedVersion) { + if (!installedVersion || installedVersion === 'unknown') { + return true; // Treat unknown as legacy for safety } - - // Calculate alpha version difference - const versionDiff = current.alphaNumber - installed.alphaNumber; - - // Consider it old if more than 2 versions behind - const isOldVersion = versionDiff > 2; - - return { - isOldVersion, - versionDiff, - shouldWarn: isOldVersion, - installed: installed.fullVersion, - current: current.fullVersion, - installedAlpha: installed.alphaNumber, - currentAlpha: current.alphaNumber, - }; + // Check if version string contains -alpha or -Alpha (any v6 alpha) + return /-alpha\./i.test(installedVersion); } /** - * Show warning for old alpha version and ask if user wants to proceed + * Show warning for legacy version (v4 or alpha) and ask if user wants to proceed * @param {string} installedVersion - The installed version * @param {string} currentVersion - The current version * @param {string} bmadFolderName - Name of the BMAD folder * @returns {Promise} True if user wants to proceed, false if they cancel */ - async showOldAlphaVersionWarning(installedVersion, currentVersion, bmadFolderName) { - const versionInfo = this.checkAlphaVersionAge(installedVersion, currentVersion); - - // Also warn if version is unknown or can't be parsed (legacy/unsupported) - const isUnknownVersion = installedVersion === 'unknown' || !versionInfo.installed; - - if (!versionInfo.shouldWarn && !isUnknownVersion) { - return true; // Not old, proceed + async showLegacyVersionWarning(installedVersion, currentVersion, bmadFolderName) { + if (!this.isLegacyVersion(installedVersion)) { + return true; // Not legacy, proceed } console.log(''); console.log(chalk.yellow.bold('⚠️ VERSION WARNING')); console.log(chalk.yellow('─'.repeat(80))); - if (isUnknownVersion) { + if (installedVersion === 'unknown') { console.log(chalk.yellow('Unable to detect your installed BMAD version.')); console.log(chalk.yellow('This appears to be a legacy or unsupported installation.')); - console.log(''); - console.log(chalk.dim('For stability, we only support updates from the previous 2 alpha versions.')); - console.log(chalk.dim('Legacy installations may have compatibility issues.')); } else { - console.log(chalk.yellow(`You are updating from ${versionInfo.installed} to ${versionInfo.current}.`)); - console.log(chalk.yellow(`This is ${versionInfo.versionDiff} alpha versions behind.`)); - console.log(''); - console.log(chalk.dim(`For stability, we only support updates from the previous 2 alpha versions`)); - console.log(chalk.dim(`(Alpha.${versionInfo.currentAlpha - 2} through Alpha.${versionInfo.currentAlpha - 1}).`)); + console.log(chalk.yellow(`You are updating from ${installedVersion} to ${currentVersion}.`)); + console.log(chalk.yellow('You have a legacy version installed (v4 or alpha).')); } console.log(''); @@ -1586,6 +1530,131 @@ class UI { return proceed === 'proceed'; } + + /** + * Display module versions with update availability + * @param {Array} modules - Array of module info objects with version info + * @param {Array} availableUpdates - Array of available updates + */ + displayModuleVersions(modules, availableUpdates = []) { + console.log(''); + console.log(chalk.cyan.bold('📦 Module Versions')); + console.log(chalk.gray('─'.repeat(80))); + + // Group modules by source + const builtIn = modules.filter((m) => m.source === 'built-in'); + const external = modules.filter((m) => m.source === 'external'); + const custom = modules.filter((m) => m.source === 'custom'); + const unknown = modules.filter((m) => m.source === 'unknown'); + + const displayGroup = (group, title) => { + if (group.length === 0) return; + + console.log(chalk.yellow(`\n${title}`)); + for (const module of group) { + const updateInfo = availableUpdates.find((u) => u.name === module.name); + const versionDisplay = module.version || chalk.gray('unknown'); + + if (updateInfo) { + console.log( + ` ${chalk.cyan(module.name.padEnd(20))} ${versionDisplay} → ${chalk.green(updateInfo.latestVersion)} ${chalk.green('↑')}`, + ); + } else { + console.log(` ${chalk.cyan(module.name.padEnd(20))} ${versionDisplay} ${chalk.gray('✓')}`); + } + } + }; + + displayGroup(builtIn, 'Built-in Modules'); + displayGroup(external, 'External Modules (Official)'); + displayGroup(custom, 'Custom Modules'); + displayGroup(unknown, 'Other Modules'); + + console.log(''); + } + + /** + * Prompt user to select which modules to update + * @param {Array} availableUpdates - Array of available updates + * @returns {Array} Selected module names to update + */ + async promptUpdateSelection(availableUpdates) { + if (availableUpdates.length === 0) { + return []; + } + + console.log(''); + console.log(chalk.cyan.bold('🔄 Available Updates')); + console.log(chalk.gray('─'.repeat(80))); + + const choices = availableUpdates.map((update) => ({ + name: `${update.name} ${chalk.dim(`(v${update.installedVersion} → v${update.latestVersion})`)}`, + value: update.name, + checked: true, // Default to selecting all updates + })); + + // Add "Update All" and "Cancel" options + const action = await prompts.select({ + message: 'How would you like to proceed?', + choices: [ + { name: 'Update all available modules', value: 'all' }, + { name: 'Select specific modules to update', value: 'select' }, + { name: 'Skip updates for now', value: 'skip' }, + ], + default: 'all', + }); + + if (action === 'all') { + return availableUpdates.map((u) => u.name); + } + + if (action === 'skip') { + return []; + } + + // Allow specific selection + const selected = await prompts.multiselect({ + message: `Select modules to update ${chalk.dim('(↑/↓ navigates, SPACE toggles, ENTER to confirm)')}:`, + choices: choices, + required: true, + }); + + return selected || []; + } + + /** + * Display status of all installed modules + * @param {Object} statusData - Status data with modules, installation info, and available updates + */ + displayStatus(statusData) { + const { installation, modules, availableUpdates, bmadDir } = statusData; + + console.log(''); + console.log(chalk.cyan.bold('📋 BMAD Status')); + console.log(chalk.gray('─'.repeat(80))); + + // Installation info + console.log(chalk.yellow('\nInstallation')); + console.log(` ${chalk.gray('Version:'.padEnd(20))} ${installation.version || chalk.gray('unknown')}`); + console.log(` ${chalk.gray('Location:'.padEnd(20))} ${bmadDir}`); + console.log(` ${chalk.gray('Installed:'.padEnd(20))} ${new Date(installation.installDate).toLocaleDateString()}`); + console.log( + ` ${chalk.gray('Last Updated:'.padEnd(20))} ${installation.lastUpdated ? new Date(installation.lastUpdated).toLocaleDateString() : chalk.gray('unknown')}`, + ); + + // Module versions + this.displayModuleVersions(modules, availableUpdates); + + // Update summary + if (availableUpdates.length > 0) { + console.log(chalk.yellow.bold(`\n⚠️ ${availableUpdates.length} update(s) available`)); + console.log(chalk.dim(` Run 'bmad install' and select "Quick Update" to update`)); + } else { + console.log(chalk.green.bold('\n✓ All modules are up to date')); + } + + console.log(''); + } } module.exports = { UI }; diff --git a/tools/docs/fix-refs.md b/tools/docs/fix-refs.md new file mode 100644 index 00000000..df9835b4 --- /dev/null +++ b/tools/docs/fix-refs.md @@ -0,0 +1,91 @@ +--- +title: Fix Documentation References +description: Corrects workflow, agent, and command references in BMad documentation +--- + +# Fix Documentation References + +## Scope + +Fix reference patterns ONLY. Do not modify links, formatting, structure, or other content. + +## Purpose + +Fix incorrect references to workflows, agents, and commands in BMad documentation files. + +## Step 1: Establish Target Audience + +Before fixing references, determine who the document is for: + +| Audience | Indicators | Style | +|----------|------------|-------| +| **Newbies** | tutorials/, getting-started, installation/, "What You'll Learn" | Keep "workflow", include platform hints | +| **Experienced** | reference/, explanation/ | Drop "workflow", no platform hints | +| **How-To** | how-to/ | **Ask** — depends on the task | + +**How-To guides require judgment**: Don't assume experienced. Ask: "Does this task require prior BMad knowledge?" Early-journey tasks (first PRD, first sprint) are newbie docs. Customization and advanced features are experienced. + +**If unclear**: Ask the user "Who is the target audience for this document — new users learning BMad, or experienced users who know the system?" + +This determines whether helper words like "workflow" and platform hints are helpful context or just noise. + +## Reference Patterns to Fix + +### Always Wrong + +| Pattern | Example | Problem | +|---------|---------|---------| +| `*workflow` | `*prd` | Obsolete menu shortcut notation | +| `/workflow` | `/workflow-init` | Platform-specific slash command | +| `bmad_bmm_*` | `bmad_bmm_workflow-init` | Internal slash command name, platform-specific | + +### Correct Format + +Use backticks with plain workflow name: +- **Wrong**: Run `/workflow-init` +- **Wrong**: Run `*prd` + +**When to say "workflow"**: +- **Newbie docs** (getting-started): "Run the `prd` workflow" — helps them learn what it is +- **Other docs**: "Run `prd`" — they already know, so "workflow" is noise + +**Platform hint**: Only in newbie docs, and only on the **first** workflow mention: +- First mention: Run the `help` workflow (`/bmad-help` on most platforms) +- Subsequent mentions: Run `prd` — no hint, no "workflow" needed after they've seen the pattern + +In experienced docs, the hint is always noise — just use the workflow name. + +### Workflow Name Changes + +| Old Name | New Name | Notes | +|----------|----------|-------| +| `workflow-init` | `bmad-help` | DEPRECATED - help system replaces initialization | +| `workflow-status` | `bmad-help` | DEPRECATED - help system replaces status checking | + +### The Help System + +The `bmad-help` workflow is the modern replacement for both `workflow-init` and `workflow-status`: +- **Universal**: Works regardless of workflow state or module +- **Contextual**: Infers completion from artifacts and conversation +- **Adaptive**: Guides users through workflows based on phase ordering +- **Anytime**: Can be run at any point, no pre-initialization needed + +Users can run `bmad-help` to get guidance on what to do next. It detects: +- What workflows have been completed (by checking for output artifacts) +- What module is active +- What the next recommended/required step is + +## Lessons Learned + +1. **Platform-agnostic**: Docs should never include platform-specific invocation patterns (slashes, prefixes) +2. **Backtick the name**: Use backticks around workflow names: `workflow-name` +3. **Simple names**: Just the workflow name, no `bmad_bmm_` prefix, no `/` prefix + +## Self-Check + +Before finishing, verify you ONLY changed reference patterns: + +- [ ] Did I change any hyperlinks? **If yes, revert.** +- [ ] Did I change any formatting (horizontal rules, whitespace, structure)? **If yes, revert.** +- [ ] Did I remove or add any sections? **If yes, revert.** +- [ ] Did I modify anything not matching the patterns in "Reference Patterns to Fix"? **If yes, revert.** diff --git a/tools/validate-doc-links.js b/tools/validate-doc-links.js index 5b0a018a..f6f514cc 100644 --- a/tools/validate-doc-links.js +++ b/tools/validate-doc-links.js @@ -27,6 +27,9 @@ const LINK_REGEX = /\[([^\]]*)\]\((\/[^)]+)\)/g; // File extensions that are static assets, not markdown docs const STATIC_ASSET_EXTENSIONS = ['.zip', '.txt', '.pdf', '.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico']; +// Custom Astro page routes (not part of the docs content collection) +const CUSTOM_PAGE_ROUTES = new Set([]); + // Regex to extract headings for anchor validation const HEADING_PATTERN = /^#{1,6}\s+(.+)$/gm; @@ -210,6 +213,11 @@ function processFile(filePath) { continue; } + // Skip custom Astro page routes + if (CUSTOM_PAGE_ROUTES.has(linkPath)) { + continue; + } + // Validate the link target exists const targetFile = resolveLink(linkPath); diff --git a/website/_basement/components/WorkflowGuide.astro b/website/_basement/components/WorkflowGuide.astro new file mode 100644 index 00000000..d9dc7e19 --- /dev/null +++ b/website/_basement/components/WorkflowGuide.astro @@ -0,0 +1,444 @@ +--- +--- + +
    +
    + /bmad-help + Run this anytime to see what to do next — or ask it a question like "what should I do to build a web app?" +
    + +

    Loading agents is optional. If your IDE supports slash commands, you can run workflows directly.

    + +
    +
    + + + +
    +
    + +
    +

    Select a track above to see the workflow.

    + +
    + +
    Analysis
    + +
    + /brainstorm-project + Analyst + +

    Guided ideation using 60+ techniques to explore your project idea and create brainstorm notes.

    +
    +
    + +
    + /research + Analyst + +

    Market, technical, or competitive research producing a structured research document.

    +
    +
    + +
    + /product-brief + Analyst + +

    Combines brainstorm and research into a foundation document covering problem, users, and MVP scope.

    +
    +
    + + +
    Planning
    + +
    + /quick-spec + Barry + +

    Analyzes your codebase, auto-detects stack, and produces tech-spec.md with implementation-ready story files.

    +
    +
    + +
    + /create-prd + PM + +

    Creates PRD.md with user personas, requirements, success metrics, and risks.

    +
    +
    + +
    + /create-ux-design + UX Designer + +

    Creates ux-design.md with user journeys, wireframes, and a design system.

    +
    +
    + + +
    Solutioning
    + +
    + /create-architecture + Architect + +

    Designs system architecture with ADRs covering data, API, security, and deployment decisions.

    +
    +
    + +
    + /create-epics-and-stories + PM + +

    Breaks PRD and architecture into epic files with prioritized, technically-informed stories.

    +
    +
    + +
    + /implementation-readiness + Architect + +

    Validates cohesion across all planning documents to confirm you're ready to build.

    +
    +
    + + +
    Implementation
    + +
    + /sprint-planning + SM + +

    Initializes sprint-status.yaml to track all stories through development. Run once.

    +
    +
    + + +
    + ↻ Repeat for each story + +
    + /create-story + SM + +

    Prepares a story file with full context and acceptance criteria from the epic.

    +
    +
    + +
    + /dev-story + DEV + +

    Implements production code and tests following architecture patterns.

    +
    +
    + +
    + /code-review + DEV + +

    Reviews code for quality, architecture alignment, tests, and security.

    +
    +
    +
    + +
    + /epic-retrospective + SM + +

    Captures learnings from a completed epic to improve the next one.

    +
    +
    +
    +
    + + + + diff --git a/website/_basement/pages/workflow-guide.astro b/website/_basement/pages/workflow-guide.astro new file mode 100644 index 00000000..f9f929df --- /dev/null +++ b/website/_basement/pages/workflow-guide.astro @@ -0,0 +1,17 @@ +--- +import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro'; +import WorkflowGuide from '../components/WorkflowGuide.astro'; +--- + + +

    + This interactive guide helps you understand which workflows to run, which agents to use, and what outputs to expect at each phase. Select your project's track to see the relevant path. +

    + +
    diff --git a/website/astro.config.mjs b/website/astro.config.mjs index e7b111fe..a57bc648 100644 --- a/website/astro.config.mjs +++ b/website/astro.config.mjs @@ -3,6 +3,7 @@ import { defineConfig } from 'astro/config'; import starlight from '@astrojs/starlight'; import sitemap from '@astrojs/sitemap'; import rehypeMarkdownLinks from './src/rehype-markdown-links.js'; +import rehypeBasePaths from './src/rehype-base-paths.js'; import { getSiteUrl } from './src/lib/site-url.js'; const siteUrl = getSiteUrl(); @@ -28,7 +29,10 @@ export default defineConfig({ }, markdown: { - rehypePlugins: [rehypeMarkdownLinks], + rehypePlugins: [ + [rehypeMarkdownLinks, { base: basePath }], + [rehypeBasePaths, { base: basePath }], + ], }, integrations: [ @@ -89,121 +93,55 @@ export default defineConfig({ { label: 'Tutorials', collapsed: false, - items: [ - { - label: 'Getting Started', - autogenerate: { directory: 'tutorials/getting-started' }, - }, - { - label: 'Advanced', - autogenerate: { directory: 'tutorials/advanced' }, - }, - ], + autogenerate: { directory: 'tutorials' }, }, { label: 'How-To Guides', collapsed: true, - items: [ - { slug: 'how-to/get-answers-about-bmad' }, - { - label: 'Installation', - autogenerate: { directory: 'how-to/installation' }, - }, - { - label: 'Workflows', - autogenerate: { directory: 'how-to/workflows' }, - }, - { - label: 'Customization', - autogenerate: { directory: 'how-to/customization' }, - }, - { - label: 'Brownfield Development', - autogenerate: { directory: 'how-to/brownfield' }, - }, - { - label: 'Troubleshooting', - autogenerate: { directory: 'how-to/troubleshooting' }, - }, - ], + autogenerate: { directory: 'how-to' }, }, { label: 'Explanation', collapsed: true, - items: [ - { - label: 'Core Concepts', - autogenerate: { directory: 'explanation/core-concepts' }, - }, - { - label: 'Architecture', - autogenerate: { directory: 'explanation/architecture' }, - }, - { - label: 'Philosophy', - autogenerate: { directory: 'explanation/philosophy' }, - }, - { - label: 'Features', - autogenerate: { directory: 'explanation/features' }, - }, - { - label: 'TEA (Test Architect)', - autogenerate: { directory: 'explanation/tea' }, - }, - { - label: 'Agents', - autogenerate: { directory: 'explanation/agents' }, - }, - { - label: 'BMM', - autogenerate: { directory: 'explanation/bmm' }, - }, - { - label: 'BMad Builder', - autogenerate: { directory: 'explanation/bmad-builder' }, - }, - { - label: 'Game Development', - autogenerate: { directory: 'explanation/game-dev' }, - }, - { - label: 'Creative Intelligence', - autogenerate: { directory: 'explanation/creative-intelligence' }, - }, - { - label: 'Core Module', - autogenerate: { directory: 'explanation/core' }, - }, - { - label: 'FAQ', - autogenerate: { directory: 'explanation/faq' }, - }, - ], + autogenerate: { directory: 'explanation' }, }, { label: 'Reference', collapsed: true, + autogenerate: { directory: 'reference' }, + }, + { + label: 'TEA - Testing in BMAD', + collapsed: true, items: [ { - label: 'Agents', - autogenerate: { directory: 'reference/agents' }, + label: 'Tutorials', + autogenerate: { directory: 'tea/tutorials' }, }, { - label: 'Workflows', - autogenerate: { directory: 'reference/workflows' }, + label: 'How-To Guides', + items: [ + { + label: 'Workflows', + autogenerate: { directory: 'tea/how-to/workflows' }, + }, + { + label: 'Customization', + autogenerate: { directory: 'tea/how-to/customization' }, + }, + { + label: 'Brownfield', + autogenerate: { directory: 'tea/how-to/brownfield' }, + }, + ], }, { - label: 'Configuration', - autogenerate: { directory: 'reference/configuration' }, + label: 'Explanation', + autogenerate: { directory: 'tea/explanation' }, }, { - label: 'TEA (Test Architect)', - autogenerate: { directory: 'reference/tea' }, - }, - { - label: 'Glossary', - autogenerate: { directory: 'reference/glossary' }, + label: 'Reference', + autogenerate: { directory: 'tea/reference' }, }, ], }, @@ -213,7 +151,10 @@ export default defineConfig({ credits: false, // Pagination - pagination: true, + pagination: false, + + // Use our docs/404.md instead of Starlight's built-in 404 + disable404Route: true, // Custom components components: { diff --git a/website/public/img/workflow-map.png b/website/public/img/workflow-map.png new file mode 100644 index 00000000..61e0ab4a Binary files /dev/null and b/website/public/img/workflow-map.png differ diff --git a/website/public/workflow-map-diagram.html b/website/public/workflow-map-diagram.html new file mode 100644 index 00000000..2bcc4c44 --- /dev/null +++ b/website/public/workflow-map-diagram.html @@ -0,0 +1,361 @@ + + + + + + BMad Method Workflow Map + + + +
    +
    ⚡ Workflow Map V6
    +

    BMad Method

    +

    Context engineering for AI-powered development

    +
    + +
    → arrows show artifact flow between workflows
    + +
    + +
    +
    +
    1
    +
    Analysis
    + Optional +
    +
    +
    +
    + brainstorm + opt +
    +
    +
    M
    Mary
    + brainstorming-report.md +
    +
    +
    +
    + research + opt +
    +
    +
    M
    Mary
    + findings +
    +
    +
    +
    + create-product-brief +
    +
    +
    M
    Mary
    + product-brief.md → +
    +
    +
    +
    +
    + + +
    +
    +
    2
    +
    Planning
    +
    +
    +
    +
    + create-prd +
    +
    +
    J
    John
    + PRD.md → +
    +
    +
    Has UI?
    +
    +
    + create-ux-design + if yes +
    +
    +
    S
    Sally
    + ux-spec.md → +
    +
    +
    +
    +
    + + +
    +
    +
    3
    +
    Solutioning
    +
    +
    +
    +
    + create-architecture +
    +
    +
    W
    Winston
    + architecture.md → +
    +
    +
    +
    + create-epics-and-stories +
    +
    +
    J
    John
    + epics.md → +
    +
    +
    +
    + check-implementation-readiness +
    +
    +
    J
    John
    + gate check +
    +
    +
    +
    +
    + + +
    +
    +
    4
    +
    Implementation
    +
    +
    +
    +
    + sprint-planning +
    +
    +
    B
    Bob
    + sprint-status.yaml → +
    +
    +
    +
    + create-story +
    +
    +
    B
    Bob
    + story-[slug].md → +
    +
    +
    +
    + dev-story +
    +
    +
    A
    Amelia
    + code → +
    +
    +
    +
    + code-review +
    +
    +
    A
    Amelia
    + approve +
    +
    +
    +
    + correct-course + ad-hoc +
    +
    +
    J
    John
    + updated plan +
    +
    +
    +
    + retrospective + per epic +
    +
    +
    B
    Bob
    + lessons +
    +
    +
    +
    +
    + +
    +
    + +
    +

    Quick Flow (Parallel Track)

    + For small, well-understood changes — skip phases 1-3 +
    +
    +
    +
    +
    B
    Barry
    + quick-spec +
    → tech-spec.md
    +
    + +
    +
    B
    Barry
    + quick-dev +
    → working code
    +
    +
    +
    + +
    +
    📚 Context Flow
    +

    Each document becomes context for the next phase.

    +
    + create-story loads epics, PRD, architecture, UX + dev-story loads story file + code-review loads architecture, story + quick-dev loads tech-spec +
    +
    + +
    +
    Analysis
    +
    Planning
    +
    Solutioning
    +
    Implementation
    +
    Quick Flow
    +
    + + diff --git a/website/src/pages/404.astro b/website/src/pages/404.astro new file mode 100644 index 00000000..46065d04 --- /dev/null +++ b/website/src/pages/404.astro @@ -0,0 +1,11 @@ +--- +import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro'; +import { getEntry } from 'astro:content'; + +const entry = await getEntry('docs', '404'); +const { Content } = await entry.render(); +--- + + + + diff --git a/website/src/rehype-base-paths.js b/website/src/rehype-base-paths.js new file mode 100644 index 00000000..c6160091 --- /dev/null +++ b/website/src/rehype-base-paths.js @@ -0,0 +1,89 @@ +/** + * Rehype plugin to prepend base path to absolute URLs + * + * Transforms: + * /img/foo.png → /BMAD-METHOD/img/foo.png (when base is /BMAD-METHOD/) + * /downloads/file.zip → /BMAD-METHOD/downloads/file.zip + * /llms.txt → /BMAD-METHOD/llms.txt + * + * Only affects absolute paths (/) - relative paths and external URLs are unchanged. + * Does NOT process .md links (those are handled by rehype-markdown-links). + */ + +import { visit } from 'unist-util-visit'; + +/** + * Create a rehype plugin that prepends the base path to absolute URLs. + * + * @param {Object} options - Plugin options + * @param {string} options.base - The base path to prepend (e.g., '/BMAD-METHOD/') + * @returns {function} A HAST tree transformer + */ +export default function rehypeBasePaths(options = {}) { + const base = options.base || '/'; + + // Normalize base: ensure it ends with / and doesn't have double slashes + const normalizedBase = base === '/' ? '/' : base.endsWith('/') ? base : base + '/'; + + return (tree) => { + visit(tree, 'element', (node) => { + // Process img tags with src attribute + if (node.tagName === 'img' && node.properties?.src) { + const src = node.properties.src; + + if (typeof src === 'string' && src.startsWith('/') && !src.startsWith('//')) { + // Don't transform if already has the base path + if (normalizedBase !== '/' && !src.startsWith(normalizedBase)) { + node.properties.src = normalizedBase + src.slice(1); + } + } + } + + // Process iframe tags with src attribute + if (node.tagName === 'iframe' && node.properties?.src) { + const src = node.properties.src; + + if (typeof src === 'string' && src.startsWith('/') && !src.startsWith('//')) { + // Don't transform if already has the base path + if (normalizedBase !== '/' && !src.startsWith(normalizedBase)) { + node.properties.src = normalizedBase + src.slice(1); + } + } + } + + // Process anchor tags with href attribute + if (node.tagName === 'a' && node.properties?.href) { + const href = node.properties.href; + + if (typeof href !== 'string') { + return; + } + + // Only transform absolute paths starting with / (but not //) + if (!href.startsWith('/') || href.startsWith('//')) { + return; + } + + // Skip if already has the base path + if (normalizedBase !== '/' && href.startsWith(normalizedBase)) { + return; + } + + // Skip .md links - those are handled by rehype-markdown-links + // Extract path portion (before ? and #) + const firstDelimiter = Math.min( + href.indexOf('?') === -1 ? Infinity : href.indexOf('?'), + href.indexOf('#') === -1 ? Infinity : href.indexOf('#'), + ); + const pathPortion = firstDelimiter === Infinity ? href : href.substring(0, firstDelimiter); + + if (pathPortion.endsWith('.md')) { + return; // Let rehype-markdown-links handle this + } + + // Prepend base path + node.properties.href = normalizedBase + href.slice(1); + } + }); + }; +} diff --git a/website/src/rehype-markdown-links.js b/website/src/rehype-markdown-links.js index 97d8dec3..352b60de 100644 --- a/website/src/rehype-markdown-links.js +++ b/website/src/rehype-markdown-links.js @@ -6,10 +6,11 @@ * ./path/index.md → ./path/ (index.md becomes directory root) * ../path/file.md#anchor → ../path/file/#anchor * ./file.md?query=param → ./file/?query=param - * /docs/absolute/path/file.md → /absolute/path/file/ + * /docs/absolute/path/file.md → {base}/absolute/path/file/ * * For absolute paths starting with /docs/, the /docs prefix is stripped * since the Astro site serves content from the docs directory as the root. + * The base path is prepended to absolute paths for subdirectory deployments. * * Affects relative links (./, ../) and absolute paths (/) - external links are unchanged */ @@ -21,9 +22,15 @@ import { visit } from 'unist-util-visit'; * * The returned transformer walks the HTML tree and rewrites anchor `href` values that are relative paths (./, ../) or absolute paths (/) pointing to `.md` files. It preserves query strings and hash anchors, rewrites `.../index.md` to the directory root path (`.../`), and rewrites other `.md` file paths by removing the `.md` extension and ensuring a trailing slash. External links (http://, https://) and non-.md links are left unchanged. * + * @param {Object} options - Plugin options + * @param {string} options.base - The base path to prepend to absolute URLs (e.g., '/BMAD-METHOD/') * @returns {function} A HAST tree transformer that mutates `a` element `href` properties as described. */ -export default function rehypeMarkdownLinks() { +export default function rehypeMarkdownLinks(options = {}) { + const base = options.base || '/'; + // Normalize base: ensure it ends with / and doesn't have double slashes + const normalizedBase = base === '/' ? '' : base.endsWith('/') ? base.slice(0, -1) : base; + return (tree) => { visit(tree, 'element', (node) => { // Only process anchor tags with href @@ -82,6 +89,9 @@ export default function rehypeMarkdownLinks() { } } + // Track if this was an absolute path (for base path prepending) + const isAbsolute = urlPath.startsWith('/'); + // Strip /docs/ prefix from absolute paths (repo-relative → site-relative) if (urlPath.startsWith('/docs/')) { urlPath = urlPath.slice(5); // Remove '/docs' prefix, keeping the leading / @@ -95,6 +105,11 @@ export default function rehypeMarkdownLinks() { urlPath = urlPath.replace(/\.md$/, '/'); } + // Prepend base path to absolute URLs for subdirectory deployments + if (isAbsolute && normalizedBase) { + urlPath = normalizedBase + urlPath; + } + // Reconstruct the href node.properties.href = urlPath + query + anchor; }); diff --git a/website/src/styles/custom.css b/website/src/styles/custom.css index 70688aa2..4ad9cb2d 100644 --- a/website/src/styles/custom.css +++ b/website/src/styles/custom.css @@ -16,6 +16,9 @@ --ai-banner-height: 2.75rem; --sl-nav-height: 6.25rem; /* Base nav height (~3.5rem) + banner height (2.75rem) */ + /* Full-width content - override Starlight's default 45rem/67.5rem */ + --sl-content-width: 100%; + /* Primary accent colors - purple to match Docusaurus */ --sl-color-accent-low: #e0e0ff; --sl-color-accent: #8C8CFF; @@ -45,6 +48,9 @@ COLOR PALETTE - Dark Mode (Primary Focus) ============================================ */ :root[data-theme='dark'] { + /* Full-width content - override Starlight's default */ + --sl-content-width: 100%; + /* Primary accent colors - purple to match Docusaurus */ --sl-color-accent-low: #2a2a5a; --sl-color-accent: #8C8CFF; @@ -174,13 +180,22 @@ } /* ============================================ - LAYOUT - Fixed width at large viewport + LAYOUT - Full width content ============================================ */ .content-panel { - max-width: 1400px; + width: 100%; margin: 0 auto; } +/* Full-width workflow diagram iframe */ +.sl-markdown-content > iframe:first-child { + width: 100vw !important; + margin-left: calc(50% - 50vw); + border-radius: 0 !important; + border-left: none !important; + border-right: none !important; +} + /* Main content area */ main { min-width: 0;