docs: massive documentation overhaul + introduce Paige (Documentation Guide agent)

## 📚 Complete Documentation Restructure

**BMM Documentation Hub Created:**
- New centralized documentation system at `src/modules/bmm/docs/`
- 18 comprehensive guides organized by topic (7000+ lines total)
- Clear learning paths for greenfield, brownfield, and quick spec flows
- Professional technical writing standards throughout

**New Documentation:**
- `README.md` - Complete documentation hub with navigation
- `quick-start.md` - 15-minute getting started guide
- `agents-guide.md` - Comprehensive 12-agent reference (45 min read)
- `party-mode.md` - Multi-agent collaboration guide (20 min read)
- `scale-adaptive-system.md` - Deep dive on Levels 0-4 (42 min read)
- `brownfield-guide.md` - Existing codebase development (53 min read)
- `quick-spec-flow.md` - Rapid Level 0-1 development (26 min read)
- `workflows-analysis.md` - Phase 1 workflows (12 min read)
- `workflows-planning.md` - Phase 2 workflows (19 min read)
- `workflows-solutioning.md` - Phase 3 workflows (13 min read)
- `workflows-implementation.md` - Phase 4 workflows (33 min read)
- `workflows-testing.md` - Testing & QA workflows (29 min read)
- `workflow-architecture-reference.md` - Architecture workflow deep-dive
- `workflow-document-project-reference.md` - Document-project workflow reference
- `enterprise-agentic-development.md` - Team collaboration patterns
- `faq.md` - Comprehensive Q&A covering all topics
- `glossary.md` - Complete terminology reference
- `troubleshooting.md` - Common issues and solutions

**Documentation Improvements:**
- Removed all version/date footers (git handles versioning)
- Agent customization docs now include full rebuild process
- Cross-referenced links between all guides
- Reading time estimates for all major docs
- Consistent professional formatting and structure

**Consolidated & Streamlined:**
- Module README (`src/modules/bmm/README.md`) streamlined to lean signpost
- Root README polished with better hierarchy and clear CTAs
- Moved docs from root `docs/` to module-specific locations
- Better separation of user docs vs. developer reference

## 🤖 New Agent: Paige (Documentation Guide)

**Role:** Technical documentation specialist and information architect

**Expertise:**
- Professional technical writing standards
- Documentation structure and organization
- Information architecture and navigation
- User-focused content design
- Style guide enforcement

**Status:** Work in progress - Paige will evolve as documentation needs grow

**Integration:**
- Listed in agents-guide.md, glossary.md, FAQ
- Available for all phases (documentation is continuous)
- Can be customized like all BMM agents

## 🔧 Additional Changes

- Updated agent manifest with Paige
- Updated workflow manifest with new documentation workflows
- Fixed workflow-to-agent mappings across all guides
- Improved root README with clearer Quick Start section
- Better module structure explanations
- Enhanced community links with Discord channel names

**Total Impact:**
- 18 new/restructured documentation files
- 7000+ lines of professional technical documentation
- Complete navigation system with cross-references
- Clear learning paths for all user types
- Foundation for knowledge base (coming in beta)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Brian Madison
2025-11-02 21:18:33 -06:00
parent 8a00f8ad70
commit cfedecbd53
359 changed files with 72374 additions and 809 deletions

View File

@@ -1020,6 +1020,164 @@ _Generated on {{date}}_
- **Unclosed check tags** - Always close `<check if="">...</check>` blocks
- **Wrong conditional pattern** - Use `<action if="">` for single items, `<check if="">` for blocks
## Document Sharding Support
If your workflow loads large planning documents (PRDs, epics, architecture, etc.), implement sharding support for efficiency.
### What is Document Sharding?
Document sharding splits large markdown files into smaller section-based files:
- `PRD.md` (50k tokens) → `prd/epic-1.md`, `prd/epic-2.md`, etc.
- Enables selective loading (90%+ token savings)
- All BMM workflows support both whole and sharded documents
### When to Add Sharding Support
**Add sharding support if your workflow:**
- Loads planning documents (PRD, epics, architecture, UX specs)
- May be used in large multi-epic projects
- Processes documents that could exceed 20k tokens
- Would benefit from selective section loading
**Skip sharding support if your workflow:**
- Only generates small documents
- Doesn't load external documents
- Works with code files (not planning docs)
### Implementation Pattern
#### 1. Add input_file_patterns to workflow.yaml
```yaml
# Smart input file references - handles both whole docs and sharded docs
# Priority: Whole document first, then sharded version
input_file_patterns:
prd:
whole: '{output_folder}/*prd*.md'
sharded: '{output_folder}/*prd*/index.md'
epics:
whole: '{output_folder}/*epic*.md'
sharded_index: '{output_folder}/*epic*/index.md'
sharded_single: '{output_folder}/*epic*/epic-{{epic_num}}.md' # For selective load
architecture:
whole: '{output_folder}/*architecture*.md'
sharded: '{output_folder}/*architecture*/index.md'
document_project:
sharded: '{output_folder}/docs/index.md' # Brownfield always uses index
```
#### 2. Add Discovery Instructions to instructions.md
Place early in instructions (after critical declarations, before workflow steps):
```markdown
## 📚 Document Discovery
This workflow requires: [list required documents]
**Discovery Process** (execute for each document):
1. **Search for whole document first** - Use fuzzy file matching
2. **Check for sharded version** - If whole document not found, look for `{doc-name}/index.md`
3. **If sharded version found**:
- Read `index.md` to understand the document structure
- Read ALL section files listed in the index (or specific sections for selective load)
- Treat the combined content as if it were a single document
4. **Brownfield projects**: The `document-project` workflow creates `{output_folder}/docs/index.md`
**Priority**: If both whole and sharded versions exist, use the whole document.
**Fuzzy matching**: Be flexible with document names - users may use variations.
```
#### 3. Choose Loading Strategy
**Full Load Strategy** (most workflows):
```xml
<action>Search for document using fuzzy pattern: {output_folder}/*prd*.md</action>
<action>If not found, check for sharded version: {output_folder}/*prd*/index.md</action>
<action if="sharded found">Read index.md to understand structure</action>
<action if="sharded found">Read ALL section files listed in index</action>
<action if="sharded found">Combine content as single document</action>
```
**Selective Load Strategy** (advanced - for phase 4 type workflows):
```xml
<action>Determine section needed (e.g., epic_num from story key)</action>
<action>Check for sharded version: {output_folder}/*epics*/index.md</action>
<action if="sharded found">Read ONLY the specific section file: epics/epic-{{epic_num}}.md</action>
<action if="sharded found">Skip all other section files (efficiency optimization)</action>
<action if="whole document found">Load complete document and extract relevant section</action>
```
### Pattern Examples
**Example 1: Simple Full Load**
```yaml
# workflow.yaml
input_file_patterns:
requirements:
whole: '{output_folder}/*requirements*.md'
sharded: '{output_folder}/*requirements*/index.md'
```
```markdown
<!-- instructions.md -->
## Document Discovery
Load requirements document (whole or sharded).
1. Try whole: _requirements_.md
2. If not found, try sharded: _requirements_/index.md
3. If sharded: Read index + ALL section files
```
**Example 2: Selective Load with Epic Number**
```yaml
# workflow.yaml
input_file_patterns:
epics:
whole: '{output_folder}/*epic*.md'
sharded_single: '{output_folder}/*epic*/epic-{{epic_num}}.md'
```
```xml
<!-- instructions.md step -->
<step n="2" goal="Load Epic Content">
<action>Extract epic number from story key (e.g., "3-2-feature" → epic_num = 3)</action>
<action>Check for sharded epics: {output_folder}/*epic*/index.md</action>
<action if="sharded found">Load ONLY epics/epic-{{epic_num}}.md (selective optimization)</action>
<action if="whole document found">Load full epics.md and extract Epic {{epic_num}}</action>
</step>
```
### Testing Your Sharding Support
1. **Test with whole document**: Verify workflow works with single `document.md`
2. **Test with sharded document**: Create sharded version and verify discovery
3. **Test with both present**: Ensure whole document takes priority
4. **Test selective loading**: Verify only needed sections are loaded (if applicable)
### Complete Reference
**[→ Document Sharding Guide](../../../../docs/document-sharding-guide.md)** - Comprehensive guide with examples
**BMM Examples**:
- Full Load: `src/modules/bmm/workflows/2-plan-workflows/prd/`
- Selective Load: `src/modules/bmm/workflows/4-implementation/epic-tech-context/`
## Web Bundles
Web bundles allow workflows to be deployed as self-contained packages for web environments.

View File

@@ -0,0 +1,39 @@
# {TITLE} Workflow Template Configuration
name: "{WORKFLOW_CODE}"
description: "{WORKFLOW_DESCRIPTION}"
author: "BMad"
# Critical variables load from config_source
# Add Additional Config Pulled Variables Here
config_source: "{project-root}/{module-code}/config.yaml"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
date: system-generated
# Required Data Files - HALT if missing!
# optional, can be omitted
brain_techniques: "{installed_path}/{critical-data-file.csv}" # example, can be other formats or URLs
# Optional docs that if loaded on start to kickstart this workflow or used at some point, these are meant to be suggested inputs for the user
recommended_inputs: # optional, can be omitted
- example_input: "{project-root}/{path/to/file.md}"
# Module path and component files
installed_path: "{project-root}/bmad/{module-code}/workflows/{workflow-code}"
template: "{installed_path}/template.md" # optional, can be omitted
instructions: "{installed_path}/instructions.md" # optional, can be omitted
validation: "{installed_path}/checklist.md" # optional, can be omitted
# Output configuration
default_output_file: "{output_folder}/{file.md}" # optional, can be omitted
validation_output_file: "{output_folder}/{file-validation-report.md}" # optional, can be omitted
# Tool Requirements (MCP Required Tools or other tools needed to run this workflow)
required_tools: #optional, can be omitted
- "Tool Name": #example, can be omitted if none
description: "Description of why this tool is needed"
link: "https://link-to-tool.com"
# Web Bundle Configuration (optional - for web-deployable workflows)
# IMPORTANT: Web bundles are self-contained and cannot use config_source variables
# All referenced files must be listed in web_bundle_files

View File

@@ -0,0 +1,40 @@
# Build Workflow - Workflow Builder Configuration
name: create-workflow
description: "Interactive workflow builder that guides creation of new BMAD workflows with proper structure and validation for optimal human-AI collaboration. Includes optional brainstorming phase for workflow ideas and design."
author: "BMad Builder"
# Critical variables
config_source: "{project-root}/bmad/bmb/config.yaml"
custom_workflow_location: "{config_source}:custom_workflow_location"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
# Template files for new workflows
template_workflow_yaml: "{workflow_template_path}/workflow.yaml"
template_instructions: "{workflow_template_path}/instructions.md"
template_template: "{workflow_template_path}/template.md"
template_checklist: "{workflow_template_path}/checklist.md"
# Optional input docs
recommended_inputs:
- existing_workflows: "{project-root}/bmad/*/workflows/"
- bmm_workflows: "{project-root}/bmad/bmm/workflows/"
# Module path and component files
installed_path: "{project-root}/bmad/bmb/workflows/create-workflow"
template: false # This is an action workflow - no template needed
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Required data files - CRITICAL for workflow conventions
workflow_creation_guide: "{installed_path}/workflow-creation-guide.md"
workflow_template_path: "{installed_path}/workflow-template"
# Output configuration - Creates the new workflow folder with all files
# If workflow belongs to a module: Save to module's workflows folder
# If standalone workflow: Save to custom_workflow_location/{{workflow_name}}
module_output_folder: "{project-root}/bmad/{{target_module}}/workflows/{{workflow_name}}"
standalone_output_folder: "{custom_workflow_location}/{{workflow_name}}"
standalone: true
# Web bundle configuration