docs: add modules reference page and site fixes (#1540)

* docs: add official external modules reference page

* chore: remove obsolete docs and basement files

* fix: update robots.txt URLs to docs.bmad-method.org

* fix: generate robots.txt dynamically from site base URL

Replace static robots.txt with an Astro endpoint that uses the
configured site URL, so sitemap references are correct on both
fork deployments and production.

* fix: unify site URL resolution in build-docs.js

build-docs.js had its own hardcoded fallback URL
(bmad-code-org.github.io) instead of using the shared
getSiteUrl() function, causing URL mismatches between
robots.txt, llms.txt, and sitemaps. Now all components
resolve the site URL through the same function. Renamed
site-url.js to .mjs to avoid Node ESM detection warnings.

* fix: correct module names and relocate prompt file

- CIS: "Creative Innovation Suite" → "Creative Intelligence Suite"
- GDS: "Game Dev Suite" → "Game Dev Studio"
- Move _prompt-external-modules-page.md from docs/ to tools/docs/

* refactor: convert build-docs to ESM, eliminate mutable globals

- Convert build-docs.js to build-docs.mjs (CJS → ESM)
- Import getSiteUrl directly, remove async import workaround
- Kill mutable SITE_URL global, call getSiteUrl() where needed
- Clean up Banner.astro variable naming
- Update package.json and CI workflow for .mjs extension
This commit is contained in:
Alex Verkhovsky 2026-02-06 05:58:09 -07:00 committed by GitHub
parent 22601f8198
commit 8be3713595
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 175 additions and 494 deletions

View File

@ -8,7 +8,7 @@ on:
- "docs/**" - "docs/**"
- "src/modules/*/docs/**" - "src/modules/*/docs/**"
- "website/**" - "website/**"
- "tools/build-docs.js" - "tools/build-docs.mjs"
- ".github/workflows/docs.yaml" - ".github/workflows/docs.yaml"
workflow_dispatch: workflow_dispatch:

73
docs/reference/modules.md Normal file
View File

@ -0,0 +1,73 @@
---
title: Official Modules
---
BMad extends through official modules that you select during installation. These add-on modules provide specialized agents, workflows, and tasks for specific domains beyond the built-in core and BMM (Agile suite).
:::tip[Installing Modules]
Run `npx bmad-method install` and select the modules you want. The installer handles downloading, configuration, and IDE integration automatically.
:::
## BMad Builder
Create custom agents, workflows, and domain-specific modules with guided assistance. BMad Builder is the meta-module for extending the framework itself.
- **Code:** `bmb`
- **npm:** [`bmad-builder`](https://www.npmjs.com/package/bmad-builder)
- **GitHub:** [bmad-code-org/bmad-builder](https://github.com/bmad-code-org/bmad-builder)
**Provides:**
- Agent Builder -- create specialized AI agents with custom expertise and tool access
- Workflow Builder -- design structured processes with steps and decision points
- Module Builder -- package agents and workflows into shareable, publishable modules
- Interactive setup with YAML configuration and npm publishing support
## Creative Intelligence Suite
AI-powered tools for structured creativity, ideation, and innovation during early-stage development. The suite provides multiple agents that facilitate brainstorming, design thinking, and problem-solving using proven frameworks.
- **Code:** `cis`
- **npm:** [`bmad-creative-intelligence-suite`](https://www.npmjs.com/package/bmad-creative-intelligence-suite)
- **GitHub:** [bmad-code-org/bmad-module-creative-intelligence-suite](https://github.com/bmad-code-org/bmad-module-creative-intelligence-suite)
**Provides:**
- Innovation Strategist, Design Thinking Coach, and Brainstorming Coach agents
- Problem Solver and Creative Problem Solver for systematic and lateral thinking
- Storyteller and Presentation Master for narratives and pitches
- Ideation frameworks including SCAMPER, Reverse Brainstorming, and problem reframing
## Game Dev Studio
Structured game development workflows adapted for Unity, Unreal, Godot, and custom engines. Supports rapid prototyping through Quick Flow and full-scale production with epic-driven sprints.
- **Code:** `gds`
- **npm:** [`bmad-game-dev-studio`](https://www.npmjs.com/package/bmad-game-dev-studio)
- **GitHub:** [bmad-code-org/bmad-module-game-dev-studio](https://github.com/bmad-code-org/bmad-module-game-dev-studio)
**Provides:**
- Game Design Document (GDD) generation workflow
- Quick Dev mode for rapid prototyping
- Narrative design support for characters, dialogue, and world-building
- Coverage for 21+ game types with engine-specific architecture guidance
## Test Architect (TEA)
Enterprise-grade test strategy, automation guidance, and release gate decisions through an expert agent and nine structured workflows. TEA goes well beyond the built-in QA agent with risk-based prioritization and requirements traceability.
- **Code:** `tea`
- **npm:** [`bmad-method-test-architecture-enterprise`](https://www.npmjs.com/package/bmad-method-test-architecture-enterprise)
- **GitHub:** [bmad-code-org/bmad-method-test-architecture-enterprise](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise)
**Provides:**
- Murat agent (Master Test Architect and Quality Advisor)
- Workflows for test design, ATDD, automation, test review, and traceability
- NFR assessment, CI setup, and framework scaffolding
- P0-P3 prioritization with optional Playwright Utils and MCP integrations
## Community Modules
Community modules and a module marketplace are coming. Check the [BMad GitHub organization](https://github.com/bmad-code-org) for updates.

View File

@ -26,7 +26,7 @@
"scripts": { "scripts": {
"bmad:install": "node tools/cli/bmad-cli.js install", "bmad:install": "node tools/cli/bmad-cli.js install",
"bundle": "node tools/cli/bundlers/bundle-web.js all", "bundle": "node tools/cli/bundlers/bundle-web.js all",
"docs:build": "node tools/build-docs.js", "docs:build": "node tools/build-docs.mjs",
"docs:dev": "astro dev --root website", "docs:dev": "astro dev --root website",
"docs:fix-links": "node tools/fix-doc-links.js", "docs:fix-links": "node tools/fix-doc-links.js",
"docs:preview": "astro preview --root website", "docs:preview": "astro preview --root website",

View File

@ -9,19 +9,20 @@
* build/site/ - Final Astro output (deployable) * build/site/ - Final Astro output (deployable)
*/ */
const { execSync } = require('node:child_process'); import { execSync } from 'node:child_process';
const fs = require('node:fs'); import fs from 'node:fs';
const path = require('node:path'); import path from 'node:path';
const archiver = require('archiver'); import { fileURLToPath } from 'node:url';
import archiver from 'archiver';
import { getSiteUrl } from '../website/src/lib/site-url.mjs';
// ============================================================================= // =============================================================================
// Configuration // Configuration
// ============================================================================= // =============================================================================
const PROJECT_ROOT = path.dirname(__dirname); const PROJECT_ROOT = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
const BUILD_DIR = path.join(PROJECT_ROOT, 'build'); const BUILD_DIR = path.join(PROJECT_ROOT, 'build');
const SITE_URL = process.env.SITE_URL || 'https://bmad-code-org.github.io/BMAD-METHOD';
const REPO_URL = 'https://github.com/bmad-code-org/BMAD-METHOD'; const REPO_URL = 'https://github.com/bmad-code-org/BMAD-METHOD';
// DO NOT CHANGE THESE VALUES! // DO NOT CHANGE THESE VALUES!
@ -143,39 +144,40 @@ function buildAstroSite() {
function generateLlmsTxt(outputDir) { function generateLlmsTxt(outputDir) {
console.log(' → Generating llms.txt...'); console.log(' → Generating llms.txt...');
const siteUrl = getSiteUrl();
const content = [ const content = [
'# BMAD Method Documentation', '# BMAD Method Documentation',
'', '',
'> AI-driven agile development with specialized agents and workflows that scale from bug fixes to enterprise platforms.', '> AI-driven agile development with specialized agents and workflows that scale from bug fixes to enterprise platforms.',
'', '',
`Documentation: ${SITE_URL}`, `Documentation: ${siteUrl}`,
`Repository: ${REPO_URL}`, `Repository: ${REPO_URL}`,
`Full docs: ${SITE_URL}/llms-full.txt`, `Full docs: ${siteUrl}/llms-full.txt`,
'', '',
'## Quick Start', '## Quick Start',
'', '',
`- **[Quick Start](${SITE_URL}/docs/modules/bmm/quick-start)** - Get started with BMAD Method`, `- **[Quick Start](${siteUrl}/docs/modules/bmm/quick-start)** - Get started with BMAD Method`,
`- **[Installation](${SITE_URL}/docs/getting-started/installation)** - Installation guide`, `- **[Installation](${siteUrl}/docs/getting-started/installation)** - Installation guide`,
'', '',
'## Core Concepts', '## Core Concepts',
'', '',
`- **[Scale Adaptive System](${SITE_URL}/docs/modules/bmm/scale-adaptive-system)** - Understand BMAD scaling`, `- **[Scale Adaptive System](${siteUrl}/docs/modules/bmm/scale-adaptive-system)** - Understand BMAD scaling`,
`- **[Quick Flow](${SITE_URL}/docs/modules/bmm/bmad-quick-flow)** - Fast development workflow`, `- **[Quick Flow](${siteUrl}/docs/modules/bmm/bmad-quick-flow)** - Fast development workflow`,
`- **[Party Mode](${SITE_URL}/docs/modules/bmm/party-mode)** - Multi-agent collaboration`, `- **[Party Mode](${siteUrl}/docs/modules/bmm/party-mode)** - Multi-agent collaboration`,
'', '',
'## Modules', '## Modules',
'', '',
`- **[BMM - Method](${SITE_URL}/docs/modules/bmm/quick-start)** - Core methodology module`, `- **[BMM - Method](${siteUrl}/docs/modules/bmm/quick-start)** - Core methodology module`,
`- **[BMB - Builder](${SITE_URL}/docs/modules/bmb/)** - Agent and workflow builder`, `- **[BMB - Builder](${siteUrl}/docs/modules/bmb/)** - Agent and workflow builder`,
`- **[BMGD - Game Dev](${SITE_URL}/docs/modules/bmgd/quick-start)** - Game development module`, `- **[BMGD - Game Dev](${siteUrl}/docs/modules/bmgd/quick-start)** - Game development module`,
'', '',
'---', '---',
'', '',
'## Quick Links', '## Quick Links',
'', '',
`- [Full Documentation (llms-full.txt)](${SITE_URL}/llms-full.txt) - Complete docs for AI context`, `- [Full Documentation (llms-full.txt)](${siteUrl}/llms-full.txt) - Complete docs for AI context`,
`- [Source Bundle](${SITE_URL}/downloads/bmad-sources.zip) - Complete source code`, `- [Source Bundle](${siteUrl}/downloads/bmad-sources.zip) - Complete source code`,
`- [Prompts Bundle](${SITE_URL}/downloads/bmad-prompts.zip) - Agent prompts and workflows`, `- [Prompts Bundle](${siteUrl}/downloads/bmad-prompts.zip) - Agent prompts and workflows`,
'', '',
].join('\n'); ].join('\n');

View File

@ -16,7 +16,7 @@ modules:
url: https://github.com/bmad-code-org/bmad-module-creative-intelligence-suite url: https://github.com/bmad-code-org/bmad-module-creative-intelligence-suite
module-definition: src/module.yaml module-definition: src/module.yaml
code: cis code: cis
name: "BMad Creative Innovation Suite" name: "BMad Creative Intelligence Suite"
description: "Creative tools for writing, brainstorming, and more" description: "Creative tools for writing, brainstorming, and more"
defaultSelected: false defaultSelected: false
type: bmad-org type: bmad-org
@ -26,7 +26,7 @@ modules:
url: https://github.com/bmad-code-org/bmad-module-game-dev-studio.git url: https://github.com/bmad-code-org/bmad-module-game-dev-studio.git
module-definition: src/module.yaml module-definition: src/module.yaml
code: gds code: gds
name: "BMad Game Dev Suite" name: "BMad Game Dev Studio"
description: "Game development agents and workflows" description: "Game development agents and workflows"
defaultSelected: false defaultSelected: false
type: bmad-org type: bmad-org

View File

@ -0,0 +1,59 @@
# Prompt: Generate External Modules Reference Page
## Goal
Create a reference documentation page at `docs/reference/modules.md` that lists all official external BMad modules with descriptions and links.
## Source of Truth
Read `tools/cli/external-official-modules.yaml` — this is the authoritative registry of official external modules. Use the module names, codes, npm package names, and repository URLs from this file.
## Research Step
For each module in the registry, visit its GitHub repository (url in the YAML record)
and read its README to get:
- A 1-2 sentence description of what the module does
- The key agents and workflows it provides (if listed)
- Any notable features or use cases
## Output Format
Create `docs/reference/modules.md` following the project's Reference Catalog structure (see `docs/_STYLE_GUIDE.md`):
```
1. Title + Hook
2. Items (## for each module)
- Brief description (one sentence)
- **Key Info:** as flat list (code, npm package, GitHub link)
3. Installation note
```
## Style
use @docs/_STYLE_GUIDE.md
## Frontmatter
```yaml
---
title: Official Modules
---
```
## Content Requirements
- Start with a brief intro explaining that BMad extends through official modules selected during installation
- For each module include:
- `##` header with module name
- 1-2 sentence description (sourced from GitHub README, not just the registry's short description)
- Key info list: module code, npm package (linked), GitHub repo (linked)
- Brief bullet list of what it provides (agents, workflows, key features) — keep to 3-5 bullets
- Include a `:::tip` admonition about how to install modules (via `npx bmad-method` installer)
- Mention that community modules and a marketplace are coming
- Do NOT include built-in modules (core, bmm) — this page is specifically for external/add-on modules
## Existing Pages for Reference
Look at these files to match the tone and style of existing reference docs:
- `docs/reference/agents.md`
- `docs/reference/commands.md`
- `docs/reference/testing.md`

View File

@ -1,2 +0,0 @@
# Tool and Repo Maintainability Documentation

View File

@ -1,444 +0,0 @@
---
---
<div class="workflow-guide not-content">
<div class="help-callout">
<code>/bmad-help</code>
<span>Run this anytime to see what to do next — or ask it a question like <em>"what should I do to build a web app?"</em></span>
</div>
<p class="agents-note">Loading agents is optional. If your IDE supports slash commands, you can run workflows directly.</p>
<div class="track-selector">
<div class="track-buttons">
<button class="track-btn" data-track="quick">
<span class="track-label">Quick Flow</span>
<span class="track-desc">Bug fixes, small features</span>
</button>
<button class="track-btn" data-track="method">
<span class="track-label">BMad Method</span>
<span class="track-desc">Products, platforms</span>
</button>
<button class="track-btn" data-track="enterprise">
<span class="track-label">Enterprise</span>
<span class="track-desc">Compliance, large-scale</span>
</button>
</div>
</div>
<div class="flow-container" data-state="no-track">
<p class="choose-prompt">Select a track above to see the workflow.</p>
<div class="flow-list">
<!-- Phase 1: Analysis -->
<div class="phase-label">Analysis</div>
<div class="flow-row" data-quick="optional" data-method="optional" data-enterprise="optional">
<code class="flow-cmd">/brainstorm-project</code>
<span class="flow-agent">Analyst</span>
<span class="flow-status"></span>
<p class="flow-desc">Guided ideation using 60+ techniques to explore your project idea and create brainstorm notes.</p>
</div>
<div class="flow-arrow" data-quick="optional" data-method="optional" data-enterprise="optional">&#x2193;</div>
<div class="flow-row" data-quick="optional" data-method="optional" data-enterprise="optional">
<code class="flow-cmd">/research</code>
<span class="flow-agent">Analyst</span>
<span class="flow-status"></span>
<p class="flow-desc">Market, technical, or competitive research producing a structured research document.</p>
</div>
<div class="flow-arrow" data-quick="optional" data-method="optional" data-enterprise="optional">&#x2193;</div>
<div class="flow-row" data-quick="optional" data-method="optional" data-enterprise="optional">
<code class="flow-cmd">/product-brief</code>
<span class="flow-agent">Analyst</span>
<span class="flow-status"></span>
<p class="flow-desc">Combines brainstorm and research into a foundation document covering problem, users, and MVP scope.</p>
</div>
<div class="flow-arrow" data-quick="optional" data-method="required" data-enterprise="required">&#x2193;</div>
<!-- Phase 2: Planning -->
<div class="phase-label">Planning</div>
<div class="flow-row" data-quick="required" data-method="skip" data-enterprise="skip">
<code class="flow-cmd">/quick-spec</code>
<span class="flow-agent">Barry</span>
<span class="flow-status"></span>
<p class="flow-desc">Analyzes your codebase, auto-detects stack, and produces tech-spec.md with implementation-ready story files.</p>
</div>
<div class="flow-arrow" data-quick="required" data-method="skip" data-enterprise="skip">&#x2193;</div>
<div class="flow-row" data-quick="skip" data-method="required" data-enterprise="required">
<code class="flow-cmd">/create-prd</code>
<span class="flow-agent">PM</span>
<span class="flow-status"></span>
<p class="flow-desc">Creates PRD.md with user personas, requirements, success metrics, and risks.</p>
</div>
<div class="flow-arrow" data-quick="skip" data-method="required" data-enterprise="required">&#x2193;</div>
<div class="flow-row" data-quick="optional" data-method="optional" data-enterprise="optional">
<code class="flow-cmd">/create-ux-design</code>
<span class="flow-agent">UX Designer</span>
<span class="flow-status"></span>
<p class="flow-desc">Creates ux-design.md with user journeys, wireframes, and a design system.</p>
</div>
<div class="flow-arrow" data-quick="required" data-method="required" data-enterprise="required">&#x2193;</div>
<!-- Phase 3: Solutioning -->
<div class="phase-label" data-quick="skip" data-method="required" data-enterprise="required">Solutioning</div>
<div class="flow-row" data-quick="skip" data-method="required" data-enterprise="required">
<code class="flow-cmd">/create-architecture</code>
<span class="flow-agent">Architect</span>
<span class="flow-status"></span>
<p class="flow-desc">Designs system architecture with ADRs covering data, API, security, and deployment decisions.</p>
</div>
<div class="flow-arrow" data-quick="skip" data-method="required" data-enterprise="required">&#x2193;</div>
<div class="flow-row" data-quick="skip" data-method="required" data-enterprise="required">
<code class="flow-cmd">/create-epics-and-stories</code>
<span class="flow-agent">PM</span>
<span class="flow-status"></span>
<p class="flow-desc">Breaks PRD and architecture into epic files with prioritized, technically-informed stories.</p>
</div>
<div class="flow-arrow" data-quick="skip" data-method="required" data-enterprise="required">&#x2193;</div>
<div class="flow-row" data-quick="skip" data-method="optional" data-enterprise="required">
<code class="flow-cmd">/implementation-readiness</code>
<span class="flow-agent">Architect</span>
<span class="flow-status"></span>
<p class="flow-desc">Validates cohesion across all planning documents to confirm you're ready to build.</p>
</div>
<div class="flow-arrow" data-quick="skip" data-method="required" data-enterprise="required">&#x2193;</div>
<!-- Phase 4: Implementation -->
<div class="phase-label">Implementation</div>
<div class="flow-row" data-quick="skip" data-method="required" data-enterprise="required">
<code class="flow-cmd">/sprint-planning</code>
<span class="flow-agent">SM</span>
<span class="flow-status"></span>
<p class="flow-desc">Initializes sprint-status.yaml to track all stories through development. Run once.</p>
</div>
<div class="flow-arrow" data-quick="skip" data-method="required" data-enterprise="required">&#x2193;</div>
<!-- Dev loop -->
<div class="dev-loop" data-quick="required" data-method="required" data-enterprise="required">
<span class="loop-label">&#x21bb; Repeat for each story</span>
<div class="flow-row" data-quick="skip" data-method="required" data-enterprise="required">
<code class="flow-cmd">/create-story</code>
<span class="flow-agent">SM</span>
<span class="flow-status"></span>
<p class="flow-desc">Prepares a story file with full context and acceptance criteria from the epic.</p>
</div>
<div class="flow-arrow" data-quick="required" data-method="required" data-enterprise="required">&#x2193;</div>
<div class="flow-row" data-quick="required" data-method="required" data-enterprise="required">
<code class="flow-cmd">/dev-story</code>
<span class="flow-agent">DEV</span>
<span class="flow-status"></span>
<p class="flow-desc">Implements production code and tests following architecture patterns.</p>
</div>
<div class="flow-arrow" data-quick="required" data-method="required" data-enterprise="required">&#x2193;</div>
<div class="flow-row" data-quick="optional" data-method="required" data-enterprise="required">
<code class="flow-cmd">/code-review</code>
<span class="flow-agent">DEV</span>
<span class="flow-status"></span>
<p class="flow-desc">Reviews code for quality, architecture alignment, tests, and security.</p>
</div>
</div>
<div class="flow-arrow" data-quick="skip" data-method="optional" data-enterprise="optional">&#x2193;</div>
<div class="flow-row" data-quick="skip" data-method="optional" data-enterprise="optional">
<code class="flow-cmd">/epic-retrospective</code>
<span class="flow-agent">SM</span>
<span class="flow-status"></span>
<p class="flow-desc">Captures learnings from a completed epic to improve the next one.</p>
</div>
</div>
</div>
</div>
<style>
.workflow-guide {
max-width: 36rem;
margin: 0 auto;
}
.help-callout {
display: flex;
align-items: baseline;
gap: 0.75rem;
padding: 0.75rem 1rem;
border: 2px solid var(--sl-color-accent);
border-radius: 0.5rem;
background: var(--sl-color-accent-low);
margin-bottom: 1rem;
}
.help-callout code {
font-size: 1.05rem;
font-weight: 700;
color: var(--sl-color-accent-high);
white-space: nowrap;
background: none;
padding: 0;
}
.help-callout span {
font-size: 0.85rem;
color: var(--sl-color-gray-2);
line-height: 1.4;
}
.agents-note {
font-size: 0.8rem;
color: var(--sl-color-gray-3);
margin-bottom: 1rem;
font-style: italic;
}
.track-selector {
margin-bottom: 1.25rem;
}
.track-buttons {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0.5rem;
}
.track-btn {
width: 100%;
box-sizing: border-box;
padding: 0.5rem 0.6rem;
border: 1px solid var(--sl-color-gray-5);
border-radius: 0.4rem;
background: transparent;
cursor: pointer;
text-align: left;
transition: border-color 0.15s ease, background-color 0.15s ease;
display: flex;
flex-direction: column;
gap: 0.1rem;
}
.track-btn:hover {
border-color: var(--sl-color-accent);
}
.track-btn.active {
border-color: var(--sl-color-accent);
background: var(--sl-color-accent-low);
}
.track-label {
font-weight: 600;
font-size: 0.85rem;
color: var(--sl-color-white);
}
.track-desc {
font-size: 0.7rem;
color: var(--sl-color-gray-3);
}
.flow-container[data-state="no-track"] .flow-list {
display: none;
}
.flow-container[data-state="no-track"] .choose-prompt {
display: block;
}
.choose-prompt {
display: none;
color: var(--sl-color-gray-3);
font-style: italic;
text-align: center;
padding: 1.5rem 0;
}
.flow-list {
display: flex;
flex-direction: column;
align-items: stretch;
}
.phase-label {
font-size: 0.65rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--sl-color-gray-3);
margin-top: 0.75rem;
margin-bottom: 0.3rem;
padding-left: 0.25rem;
}
.phase-label:first-child {
margin-top: 0;
}
.phase-label[data-visibility="skip"] {
display: none;
}
.flow-row {
display: grid;
grid-template-columns: 1fr auto auto;
align-items: center;
gap: 0.75rem;
padding: 0.4rem 0.6rem;
border: 1px solid var(--sl-color-gray-5);
border-radius: 0.3rem;
transition: opacity 0.15s ease, border-color 0.15s ease;
}
.flow-row[data-visibility="active"] {
border-color: var(--sl-color-gray-4);
}
.flow-row[data-visibility="skip"] {
display: none;
}
.flow-cmd {
font-size: 0.9rem;
font-weight: 600;
color: var(--sl-color-white);
background: none;
padding: 0;
}
.flow-agent {
font-size: 0.75rem;
color: var(--sl-color-accent-high);
background: var(--sl-color-accent-low);
padding: 0.1rem 0.4rem;
border-radius: 0.2rem;
white-space: nowrap;
}
.flow-status {
font-size: 0.65rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.03em;
min-width: 4rem;
text-align: right;
}
.flow-status[data-status="required"] {
color: var(--sl-color-accent-high);
}
.flow-status[data-status="optional"] {
color: var(--sl-color-gray-3);
}
.flow-status[data-status="recommended"] {
color: var(--sl-color-accent-high);
}
.flow-desc {
grid-column: 1 / -1;
font-size: 0.75rem;
color: var(--sl-color-gray-3);
line-height: 1.4;
margin: 0.1rem 0 0;
}
.flow-arrow {
text-align: center;
font-size: 1rem;
color: var(--sl-color-gray-4);
line-height: 1;
padding: 0.15rem 0;
}
.flow-arrow[data-visibility="skip"] {
display: none;
}
.dev-loop {
border: 1px dashed var(--sl-color-accent);
border-radius: 0.4rem;
padding: 0.4rem 0.5rem;
display: flex;
flex-direction: column;
align-items: stretch;
}
.dev-loop[data-visibility="skip"] {
display: none;
}
.dev-loop .flow-row {
border-color: var(--sl-color-gray-5);
}
.loop-label {
font-size: 0.65rem;
font-weight: 600;
color: var(--sl-color-accent-high);
text-transform: uppercase;
letter-spacing: 0.04em;
margin-bottom: 0.3rem;
}
@media (max-width: 30rem) {
.track-buttons {
grid-template-columns: 1fr;
}
.help-callout {
flex-direction: column;
gap: 0.4rem;
}
}
</style>
<script>
function initWorkflowGuide() {
const guide = document.querySelector('.workflow-guide');
if (!guide) return;
const trackBtns = guide.querySelectorAll('.track-btn');
const flowContainer = guide.querySelector('.flow-container');
const allElements = guide.querySelectorAll('[data-quick]');
trackBtns.forEach((btn) => {
btn.addEventListener('click', () => {
const track = btn.getAttribute('data-track');
trackBtns.forEach((b) => b.classList.remove('active'));
btn.classList.add('active');
flowContainer.setAttribute('data-state', 'has-track');
allElements.forEach((el) => {
const status = el.getAttribute(`data-${track}`);
if (status === 'skip') {
el.setAttribute('data-visibility', 'skip');
} else {
el.setAttribute('data-visibility', 'active');
}
// Update status text for flow rows
const statusEl = el.querySelector('.flow-status');
if (statusEl) {
statusEl.setAttribute('data-status', status);
statusEl.textContent = status === 'skip' ? '' : status;
}
});
});
});
}
document.addEventListener('DOMContentLoaded', initWorkflowGuide);
document.addEventListener('astro:page-load', initWorkflowGuide);
</script>

View File

@ -1,17 +0,0 @@
---
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
import WorkflowGuide from '../components/WorkflowGuide.astro';
---
<StarlightPage
frontmatter={{
title: 'Workflow Guide',
description: 'Interactive guide to the BMad Method workflow — choose your track and see the recommended phases, agents, and outputs.',
tableOfContents: false,
}}
>
<p>
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.
</p>
<WorkflowGuide />
</StarlightPage>

View File

@ -4,7 +4,7 @@ import starlight from '@astrojs/starlight';
import sitemap from '@astrojs/sitemap'; import sitemap from '@astrojs/sitemap';
import rehypeMarkdownLinks from './src/rehype-markdown-links.js'; import rehypeMarkdownLinks from './src/rehype-markdown-links.js';
import rehypeBasePaths from './src/rehype-base-paths.js'; import rehypeBasePaths from './src/rehype-base-paths.js';
import { getSiteUrl } from './src/lib/site-url.js'; import { getSiteUrl } from './src/lib/site-url.mjs';
const siteUrl = getSiteUrl(); const siteUrl = getSiteUrl();
const urlParts = new URL(siteUrl); const urlParts = new URL(siteUrl);

View File

@ -1,12 +1,11 @@
--- ---
import { getSiteUrl } from '../lib/site-url.js'; import { getSiteUrl } from '../lib/site-url.mjs';
const SITE_URL = getSiteUrl(); const llmsFullUrl = `${getSiteUrl()}/llms-full.txt`;
const fullDocsUrl = `${SITE_URL}/llms-full.txt`;
--- ---
<div class="ai-banner"> <div class="ai-banner">
<span>🤖 Consolidated, AI-optimized BMAD docs: <a href={fullDocsUrl}>llms-full.txt</a>. Fetch this plain text file for complete context.</span> <span>🤖 Consolidated, AI-optimized BMAD docs: <a href={llmsFullUrl}>llms-full.txt</a>. Fetch this plain text file for complete context.</span>
</div> </div>
<style> <style>

View File

@ -1,5 +1,10 @@
# BMAD Method Documentation import type { APIRoute } from 'astro';
# https://bmad-code-org.github.io/BMAD-METHOD/
export const GET: APIRoute = ({ site }) => {
const siteUrl = site?.href.replace(/\/$/, '') ?? '';
const body = `# BMAD Method Documentation
# ${siteUrl}/
# #
# This file controls web crawler access to the documentation site. # This file controls web crawler access to the documentation site.
@ -34,4 +39,10 @@ User-agent: cohere-ai
Allow: / Allow: /
# Sitemap # Sitemap
Sitemap: https://bmad-code-org.github.io/BMAD-METHOD/sitemap.xml Sitemap: ${siteUrl}/sitemap-index.xml
`;
return new Response(body, {
headers: { 'Content-Type': 'text/plain; charset=utf-8' },
});
};