2025-10-30 11:26:15 -05:00
|
|
|
# BMM Workflows - Complete v6 Guide
|
2025-10-12 18:10:23 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
Master guide for BMM's four-phase methodology that adapts to project scale (Level 0-4) and context (greenfield/brownfield).
|
2025-10-12 18:10:23 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
## Table of Contents
|
2025-10-12 18:10:23 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
- [Core Innovations](#core-innovations)
|
|
|
|
|
- [Universal Entry Point](#universal-entry-point)
|
|
|
|
|
- [Four Phases Overview](#four-phases-overview)
|
|
|
|
|
- [Phase Details](#phase-details)
|
|
|
|
|
- [Documentation Prerequisite](#documentation-prerequisite)
|
|
|
|
|
- [Phase 1: Analysis](#phase-1-analysis)
|
|
|
|
|
- [Phase 2: Planning](#phase-2-planning)
|
|
|
|
|
- [Phase 3: Solutioning](#phase-3-solutioning)
|
|
|
|
|
- [Phase 4: Implementation](#phase-4-implementation)
|
|
|
|
|
- [Scale Levels](#scale-levels)
|
|
|
|
|
- [Greenfield vs Brownfield](#greenfield-vs-brownfield)
|
|
|
|
|
- [Critical Rules](#critical-rules)
|
2025-10-26 15:03:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
## Core Innovations
|
2025-10-26 15:03:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
- **Scale-Adaptive Planning** - Automatic routing based on complexity (Level 0-4)
|
|
|
|
|
- **Just-In-Time Design** - Tech specs created per epic during implementation
|
|
|
|
|
- **Dynamic Expertise Injection** - Story-specific technical guidance
|
|
|
|
|
- **Continuous Learning Loop** - Retrospectives improve each cycle
|
feat: add universal document sharding support with dual-strategy loading
Implement comprehensive document sharding system across all BMM workflows enabling 90%+ token savings for large multi-epic projects through selective loading optimization.
## Document Sharding System
### Core Features
- **Universal Support**: All 12 BMM workflows (Phase 1-4) handle both whole and sharded documents
- **Dual Loading Strategy**: Full Load (Phase 1-3) vs Selective Load (Phase 4)
- **Automatic Discovery**: Workflows detect format transparently (whole → sharded priority)
- **Efficiency Optimization**: 90%+ token reduction for 10+ epic projects in Phase 4
### Implementation Details
**Phase 1-3 Workflows (7 workflows) - Full Load Strategy:**
- product-brief, prd, gdd, create-ux-design, tech-spec, architecture, solutioning-gate-check
- Load entire sharded documents when present
- Transparent to user experience
- Better organization for large projects
**Phase 4 Workflows (5 workflows) - Selective Load Strategy:**
- sprint-planning (Full Load exception - needs all epics)
- epic-tech-context, create-story, story-context, code-review (Selective Load)
- Load ONLY the specific epic needed (e.g., epic-3.md for Epic 3 stories)
- Massive efficiency: Skip loading 9 other epics in 10-epic project
### Workflow Enhancements
**Added to all workflows:**
- `input_file_patterns` in workflow.yaml with wildcard discovery
- Document Discovery section in instructions.md
- Support for sharded index + section files
- Brownfield `docs/index.md` support
**Pattern standardization:**
```yaml
input_file_patterns:
document:
whole: "{output_folder}/*doc*.md"
sharded: "{output_folder}/*doc*/index.md"
sharded_single: "{output_folder}/*doc*/section-{{id}}.md" # Selective load
```
### Retrospective Workflow Major Overhaul
Transformed retrospective into immersive, interactive team experience:
**Epic Discovery Priority (Fixed):**
- Priority 1: Check sprint-status.yaml for last completed epic
- Priority 2: Ask user directly
- Priority 3: Scan stories folder (last resort)
**New Capabilities:**
- Deep story analysis: Extract dev notes, mistakes, review feedback, lessons learned
- Previous retro integration: Track action items, verify lessons applied
- Significant change detection: Alert when discoveries require epic updates
- Intent-based facilitation: Natural conversation vs scripted phrases
- Party mode protocol: Clear speaker identification (Name (Role): dialogue)
- Team dynamics: Drama, disagreements, diverse perspectives, authentic conflict
**Structure:**
- 12 whole-number steps (no decimals)
- Highly interactive with constant user engagement
- Cross-references previous retro for accountability
- Synthesizes patterns across all stories
- Detects architectural assumption changes
## Documentation
**Created:**
- `docs/document-sharding-guide.md` - Comprehensive 300+ line guide
- What is sharding, when to use it (token thresholds)
- How sharding works (discovery system, loading strategies)
- Using shard-doc tool
- Full Load vs Selective Load patterns
- Complete examples and troubleshooting
- Custom workflow integration patterns
**Updated:**
- `README.md` - Added Document Sharding feature section
- `docs/index.md` - Added under Advanced Topics → Optimization
- `src/modules/bmm/workflows/README.md` - Added sharding section with usage
- `src/modules/bmb/workflows/create-workflow/workflow-creation-guide.md` - Added complete implementation patterns for workflow builders
**Documentation levels:**
1. Overview (README.md) - Quick feature highlight
2. User guide (BMM workflows README) - Practical usage
3. Reference (document-sharding-guide.md) - Complete details
4. Builder guide (workflow-creation-guide.md) - Implementation patterns
## Efficiency Gains
**Example: 10-Epic Project**
Before sharding:
- epic-tech-context for Epic 3: Load all 10 epics (~50k tokens)
- create-story for Epic 3: Load all 10 epics (~50k tokens)
- story-context for Epic 3: Load all 10 epics (~50k tokens)
After sharding with selective load:
- epic-tech-context for Epic 3: Load Epic 3 only (~5k tokens) = 90% reduction
- create-story for Epic 3: Load Epic 3 only (~5k tokens) = 90% reduction
- story-context for Epic 3: Load Epic 3 only (~5k tokens) = 90% reduction
## Breaking Changes
None - fully backward compatible. Workflows work with existing whole documents.
## Files Changed
**Workflows Updated (25 files):**
- 7 Phase 1-3 workflows: Added full load sharding support
- 5 Phase 4 workflows: Added selective load sharding support
- 1 retrospective workflow: Complete overhaul with sharding support
**Documentation (5 files):**
- Created: document-sharding-guide.md
- Updated: README.md, docs/index.md, BMM workflows README, BMB workflow-creation-guide
- Removed: Old conversion report (obsolete)
## Future Extensibility
- BMB workflows now aware of sharding patterns
- Custom modules can easily implement sharding support
- Standard patterns documented for consistency
- No need to explain concept in future development
2025-11-02 00:13:33 -05:00
|
|
|
- **Document Sharding Support** - All workflows handle whole or sharded documents for efficiency
|
2025-10-28 22:21:13 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
## Universal Entry Point
|
2025-10-28 22:21:13 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
**Always start with `workflow-status` or `workflow-init`**
|
2025-10-28 22:21:13 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
### workflow-status
|
2025-10-26 15:03:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
- Checks for existing workflow status file
|
|
|
|
|
- Displays current phase and progress
|
|
|
|
|
- Routes to appropriate next workflow
|
|
|
|
|
- Shows Phase 4 implementation state
|
2025-10-26 15:03:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
### workflow-init
|
2025-10-26 15:03:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
- Creates initial bmm-workflow-status.md
|
|
|
|
|
- Detects greenfield vs brownfield
|
|
|
|
|
- Routes undocumented brownfield to document-project
|
|
|
|
|
- Sets up workflow tracking
|
2025-10-28 22:21:13 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
## Four Phases Overview
|
2025-10-26 15:03:54 -05:00
|
|
|
|
|
|
|
|
```
|
2025-10-30 11:26:15 -05:00
|
|
|
PREREQUISITE: document-project (brownfield without docs)
|
|
|
|
|
↓
|
|
|
|
|
PHASE 1: Analysis (optional)
|
|
|
|
|
brainstorm → research → brief
|
|
|
|
|
↓
|
|
|
|
|
PHASE 2: Planning (required, scale-adaptive)
|
|
|
|
|
Level 0-1: tech-spec only
|
|
|
|
|
Level 2-4: PRD + epics
|
|
|
|
|
↓
|
|
|
|
|
PHASE 3: Solutioning (Level 2-4 only)
|
|
|
|
|
architecture → validation → gate-check
|
|
|
|
|
↓
|
|
|
|
|
PHASE 4: Implementation (iterative)
|
|
|
|
|
sprint-planning → epic-context → story cycle
|
2025-10-01 18:28:35 -05:00
|
|
|
```
|
|
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
## Phase Details
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
### Documentation Prerequisite
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
**When:** Brownfield projects without documentation OR post-completion cleanup
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
| Workflow | Purpose | Output |
|
|
|
|
|
| ---------------- | ----------------------------- | ------------------ |
|
|
|
|
|
| document-project | Analyze and document codebase | Comprehensive docs |
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
**Use Cases:**
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
1. **Pre-Phase 1**: Understand existing brownfield code
|
|
|
|
|
2. **Post-Phase 4**: Create clean documentation replacing scattered artifacts
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
### Phase 1: Analysis
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
**Optional workflows for discovery and requirements gathering**
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
| Workflow | Agent | Purpose | Output |
|
|
|
|
|
| ------------------ | ------------- | --------------------- | ---------------------- |
|
|
|
|
|
| brainstorm-project | Analyst | Software ideation | Architecture proposals |
|
|
|
|
|
| brainstorm-game | Game Designer | Game concept ideation | Concept proposals |
|
|
|
|
|
| research | Analyst | Multi-mode research | Research artifacts |
|
|
|
|
|
| product-brief | Analyst | Strategic planning | Product brief |
|
|
|
|
|
| game-brief | Game Designer | Game foundation | Game brief |
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
### Phase 2: Planning
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
**Required phase with scale-adaptive routing**
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
| Workflow | Agent | Output | Levels |
|
|
|
|
|
| ---------------- | ------------- | -------------- | ----------- |
|
|
|
|
|
| prd | PM | PRD.md + epics | 2-4 |
|
|
|
|
|
| tech-spec | PM | tech-spec.md | 0-1 |
|
|
|
|
|
| gdd | Game Designer | GDD.md | Games |
|
|
|
|
|
| create-ux-design | UX | ux-design.md | Conditional |
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
### Phase 3: Solutioning
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
**Architecture phase for Level 2-4 projects**
|
2025-10-26 15:03:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
| Workflow | Agent | Purpose | Output |
|
|
|
|
|
| ---------------------- | --------- | ----------------- | ---------------------- |
|
|
|
|
|
| create-architecture | Architect | System design | architecture.md + ADRs |
|
|
|
|
|
| validate-architecture | Architect | Design validation | Validation report |
|
|
|
|
|
| solutioning-gate-check | Architect | PRD/UX/arch check | Gate report |
|
2025-10-26 15:03:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
### Phase 4: Implementation
|
2025-10-26 15:03:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
**Sprint-based development cycle**
|
2025-10-26 15:03:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
#### Sprint Status System
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
**Epic Flow:** `backlog → contexted`
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
**Story Flow:** `backlog → drafted → ready-for-dev → in-progress → review → done`
|
2025-10-26 15:03:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
#### Implementation Workflows
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
| Workflow | Agent | Purpose | Status Updates |
|
|
|
|
|
| ----------------- | ----- | ----------------------- | ------------------------------------------- |
|
|
|
|
|
| sprint-planning | SM | Initialize tracking | Creates sprint-status.yaml |
|
|
|
|
|
| epic-tech-context | SM | Epic technical context | Epic: backlog → contexted |
|
|
|
|
|
| create-story | SM | Draft story files | Story: backlog → drafted |
|
|
|
|
|
| story-context | SM | Implementation guidance | Story: drafted → ready-for-dev |
|
|
|
|
|
| dev-story | DEV | Implement | Story: ready-for-dev → in-progress → review |
|
|
|
|
|
| code-review | DEV | Quality validation | No auto update |
|
|
|
|
|
| retrospective | SM | Capture learnings | Retrospective: optional → completed |
|
|
|
|
|
| correct-course | SM | Handle issues | Adaptive |
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
#### Implementation Loop
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-26 15:03:54 -05:00
|
|
|
```
|
2025-10-30 11:26:15 -05:00
|
|
|
sprint-planning (creates sprint-status.yaml)
|
|
|
|
|
↓
|
|
|
|
|
For each epic:
|
|
|
|
|
epic-tech-context
|
|
|
|
|
↓
|
|
|
|
|
For each story:
|
|
|
|
|
create-story → story-context → dev-story → code-review
|
|
|
|
|
↓
|
|
|
|
|
Mark done in sprint-status.yaml
|
|
|
|
|
↓
|
|
|
|
|
retrospective (epic complete)
|
2025-10-26 15:03:54 -05:00
|
|
|
```
|
|
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
## Scale Levels
|
2025-10-26 15:03:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
| Level | Scope | Documentation | Path |
|
|
|
|
|
| ----- | ------------- | --------------------- | --------------- |
|
|
|
|
|
| 0 | Single change | tech-spec only | Phase 2 → 4 |
|
|
|
|
|
| 1 | 1-10 stories | tech-spec only | Phase 2 → 4 |
|
|
|
|
|
| 2 | 5-15 stories | PRD + architecture | Phase 2 → 3 → 4 |
|
|
|
|
|
| 3 | 12-40 stories | PRD + full arch | Phase 2 → 3 → 4 |
|
|
|
|
|
| 4 | 40+ stories | PRD + enterprise arch | Phase 2 → 3 → 4 |
|
2025-10-26 15:03:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
## Greenfield vs Brownfield
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
### Greenfield (New Projects)
|
2025-10-01 18:28:35 -05:00
|
|
|
|
|
|
|
|
```
|
2025-10-30 11:26:15 -05:00
|
|
|
Phase 1 (optional) → Phase 2 → Phase 3 (L2-4) → Phase 4
|
2025-10-01 18:28:35 -05:00
|
|
|
```
|
|
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
- Clean slate for design
|
|
|
|
|
- No existing constraints
|
|
|
|
|
- Direct to planning
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
### Brownfield (Existing Code)
|
2025-10-01 18:28:35 -05:00
|
|
|
|
|
|
|
|
```
|
2025-10-30 11:26:15 -05:00
|
|
|
document-project (if needed) → Phase 1 (optional) → Phase 2 → Phase 3 (L2-4) → Phase 4
|
2025-10-01 18:28:35 -05:00
|
|
|
```
|
|
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
- Must understand existing patterns
|
|
|
|
|
- Documentation prerequisite if undocumented
|
|
|
|
|
- Consider technical debt in planning
|
2025-10-28 22:21:13 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
## Critical Rules
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
### Phase Transitions
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
1. **Check workflow-status** before any Phase 1-3 workflow
|
|
|
|
|
2. **Document brownfield** before planning if undocumented
|
|
|
|
|
3. **Complete planning** before solutioning
|
|
|
|
|
4. **Complete architecture** (L2-4) before implementation
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
### Implementation Rules
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
1. **Epic context first** - Must context epic before drafting stories
|
|
|
|
|
2. **Sequential by default** - Work stories in order within epic
|
|
|
|
|
3. **Learning transfer** - Draft next story after previous done
|
|
|
|
|
4. **Manual status updates** - Update sprint-status.yaml as needed
|
2025-10-26 15:03:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
### Story Management
|
2025-10-12 16:59:54 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
1. **Single source of truth** - sprint-status.yaml tracks everything
|
|
|
|
|
2. **No story search** - Agents read exact story from status file
|
|
|
|
|
3. **Context injection** - Each story gets specific technical guidance
|
|
|
|
|
4. **Retrospective learning** - Capture improvements per epic
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
### Best Practices
|
2025-10-01 18:28:35 -05:00
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
1. **Trust the process** - Let workflows guide you
|
|
|
|
|
2. **Respect scale** - Don't over-document small projects
|
|
|
|
|
3. **Use status tracking** - Always know where you are
|
|
|
|
|
4. **Iterate and learn** - Each epic improves the next
|
feat: add universal document sharding support with dual-strategy loading
Implement comprehensive document sharding system across all BMM workflows enabling 90%+ token savings for large multi-epic projects through selective loading optimization.
## Document Sharding System
### Core Features
- **Universal Support**: All 12 BMM workflows (Phase 1-4) handle both whole and sharded documents
- **Dual Loading Strategy**: Full Load (Phase 1-3) vs Selective Load (Phase 4)
- **Automatic Discovery**: Workflows detect format transparently (whole → sharded priority)
- **Efficiency Optimization**: 90%+ token reduction for 10+ epic projects in Phase 4
### Implementation Details
**Phase 1-3 Workflows (7 workflows) - Full Load Strategy:**
- product-brief, prd, gdd, create-ux-design, tech-spec, architecture, solutioning-gate-check
- Load entire sharded documents when present
- Transparent to user experience
- Better organization for large projects
**Phase 4 Workflows (5 workflows) - Selective Load Strategy:**
- sprint-planning (Full Load exception - needs all epics)
- epic-tech-context, create-story, story-context, code-review (Selective Load)
- Load ONLY the specific epic needed (e.g., epic-3.md for Epic 3 stories)
- Massive efficiency: Skip loading 9 other epics in 10-epic project
### Workflow Enhancements
**Added to all workflows:**
- `input_file_patterns` in workflow.yaml with wildcard discovery
- Document Discovery section in instructions.md
- Support for sharded index + section files
- Brownfield `docs/index.md` support
**Pattern standardization:**
```yaml
input_file_patterns:
document:
whole: "{output_folder}/*doc*.md"
sharded: "{output_folder}/*doc*/index.md"
sharded_single: "{output_folder}/*doc*/section-{{id}}.md" # Selective load
```
### Retrospective Workflow Major Overhaul
Transformed retrospective into immersive, interactive team experience:
**Epic Discovery Priority (Fixed):**
- Priority 1: Check sprint-status.yaml for last completed epic
- Priority 2: Ask user directly
- Priority 3: Scan stories folder (last resort)
**New Capabilities:**
- Deep story analysis: Extract dev notes, mistakes, review feedback, lessons learned
- Previous retro integration: Track action items, verify lessons applied
- Significant change detection: Alert when discoveries require epic updates
- Intent-based facilitation: Natural conversation vs scripted phrases
- Party mode protocol: Clear speaker identification (Name (Role): dialogue)
- Team dynamics: Drama, disagreements, diverse perspectives, authentic conflict
**Structure:**
- 12 whole-number steps (no decimals)
- Highly interactive with constant user engagement
- Cross-references previous retro for accountability
- Synthesizes patterns across all stories
- Detects architectural assumption changes
## Documentation
**Created:**
- `docs/document-sharding-guide.md` - Comprehensive 300+ line guide
- What is sharding, when to use it (token thresholds)
- How sharding works (discovery system, loading strategies)
- Using shard-doc tool
- Full Load vs Selective Load patterns
- Complete examples and troubleshooting
- Custom workflow integration patterns
**Updated:**
- `README.md` - Added Document Sharding feature section
- `docs/index.md` - Added under Advanced Topics → Optimization
- `src/modules/bmm/workflows/README.md` - Added sharding section with usage
- `src/modules/bmb/workflows/create-workflow/workflow-creation-guide.md` - Added complete implementation patterns for workflow builders
**Documentation levels:**
1. Overview (README.md) - Quick feature highlight
2. User guide (BMM workflows README) - Practical usage
3. Reference (document-sharding-guide.md) - Complete details
4. Builder guide (workflow-creation-guide.md) - Implementation patterns
## Efficiency Gains
**Example: 10-Epic Project**
Before sharding:
- epic-tech-context for Epic 3: Load all 10 epics (~50k tokens)
- create-story for Epic 3: Load all 10 epics (~50k tokens)
- story-context for Epic 3: Load all 10 epics (~50k tokens)
After sharding with selective load:
- epic-tech-context for Epic 3: Load Epic 3 only (~5k tokens) = 90% reduction
- create-story for Epic 3: Load Epic 3 only (~5k tokens) = 90% reduction
- story-context for Epic 3: Load Epic 3 only (~5k tokens) = 90% reduction
## Breaking Changes
None - fully backward compatible. Workflows work with existing whole documents.
## Files Changed
**Workflows Updated (25 files):**
- 7 Phase 1-3 workflows: Added full load sharding support
- 5 Phase 4 workflows: Added selective load sharding support
- 1 retrospective workflow: Complete overhaul with sharding support
**Documentation (5 files):**
- Created: document-sharding-guide.md
- Updated: README.md, docs/index.md, BMM workflows README, BMB workflow-creation-guide
- Removed: Old conversion report (obsolete)
## Future Extensibility
- BMB workflows now aware of sharding patterns
- Custom modules can easily implement sharding support
- Standard patterns documented for consistency
- No need to explain concept in future development
2025-11-02 00:13:33 -05:00
|
|
|
5. **Consider sharding** - Split large documents (PRD, epics, architecture) for efficiency
|
|
|
|
|
|
|
|
|
|
## Document Sharding
|
|
|
|
|
|
|
|
|
|
For large multi-epic projects, consider sharding planning documents to improve workflow efficiency.
|
|
|
|
|
|
|
|
|
|
### What is Sharding?
|
|
|
|
|
|
|
|
|
|
Splits large markdown files into smaller section-based files:
|
|
|
|
|
|
|
|
|
|
- PRD with 15 epics → `prd/epic-1.md`, `prd/epic-2.md`, etc.
|
|
|
|
|
- Large epics file → Individual epic files
|
|
|
|
|
- Architecture layers → Separate layer files
|
|
|
|
|
|
|
|
|
|
### Benefits
|
|
|
|
|
|
|
|
|
|
**Phase 1-3 Workflows:**
|
|
|
|
|
|
|
|
|
|
- Workflows load entire sharded documents (transparent to user)
|
|
|
|
|
- Better organization for large projects
|
|
|
|
|
|
|
|
|
|
**Phase 4 Workflows:**
|
|
|
|
|
|
|
|
|
|
- **Selective loading** - Only load the epic/section needed
|
|
|
|
|
- **Massive efficiency** - 90%+ token reduction for 10+ epic projects
|
|
|
|
|
- Examples: `epic-tech-context`, `create-story`, `story-context`, `code-review`
|
|
|
|
|
|
|
|
|
|
### Usage
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
Load bmad-master or analyst agent:
|
|
|
|
|
/shard-doc
|
|
|
|
|
|
|
|
|
|
Source: docs/PRD.md
|
|
|
|
|
Destination: docs/prd/
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**All BMM workflows automatically support both whole and sharded documents.**
|
|
|
|
|
|
|
|
|
|
**[→ Complete Sharding Guide](../../../docs/document-sharding-guide.md)**
|
2025-10-01 18:28:35 -05:00
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2025-10-30 11:26:15 -05:00
|
|
|
For specific workflow details, see individual workflow READMEs in their respective directories.
|