Skip to content

PRD Management

Saros Industries edited this page Jun 28, 2025 · 1 revision

πŸ“„ PRD Management

Product Requirements Document (PRD) management in BMAD Enterprise provides a structured approach to documenting, tracking, and managing business requirements throughout the development lifecycle.

PRD Lifecycle Integration

// Framework event-driven PRD workflow
class BMADPRDManager {
  constructor(framework) {
    this.framework = framework;
    this.eventBus = framework.getEventBus();
    this.dbService = framework.getDatabase();
    this.initialize();
  }

  initialize() {
    // Subscribe to framework events
    this.eventBus.subscribe('project.created', this.onProjectCreated.bind(this));
    this.eventBus.subscribe('user.role.changed', this.onRoleChanged.bind(this));
    this.eventBus.subscribe('bmad.model.updated', this.onModelUpdated.bind(this));
  }

  async createPRD(projectId, templateType = 'standard') {
    const template = await this.getTemplate(templateType);
    const project = await this.framework.projects.get(projectId);
    
    const prd = {
      id: this.framework.utils.generateId(),
      projectId,
      template: templateType,
      status: 'draft',
      version: '1.0.0',
      created: new Date(),
      sections: this.initializeSections(template),
      metadata: {
        businessModel: project.businessModel,
        stakeholders: project.stakeholders,
        timeline: project.timeline
      }
    };

    await this.dbService.collection('prds').create(prd);
    
    // Emit framework event
    this.eventBus.emit('bmad.prd.created', {
      prd,
      project,
      timestamp: new Date()
    });

    return prd;
  }
}

Document Templates

Business Model PRD Template

template_id: "bmad_business_model"
version: "2.1.0"
framework_integration: true

sections:
  executive_summary:
    required: true
    approvers: ["bmad.strategist", "bmad.project_manager"]
    framework_data: 
      - project.overview
      - stakeholder.summary
      
  business_model_canvas:
    required: true
    approvers: ["bmad.strategist"]
    components:
      - value_propositions
      - customer_segments
      - channels
      - customer_relationships
      - revenue_streams
      - key_resources
      - key_activities
      - key_partnerships
      - cost_structure
    framework_integration:
      - bmad.canvas.export
      - bmad.canvas.import
      
  stakeholder_analysis:
    required: true
    approvers: ["bmad.analyst", "bmad.project_manager"]
    framework_data:
      - stakeholder.roles
      - stakeholder.influence_map
      - stakeholder.engagement_plan
      
  financial_projections:
    required: true
    approvers: ["bmad.strategist", "financial.analyst"]
    framework_integration:
      - bmad.financial.model
      - external.financial_apis
      
  risk_assessment:
    required: true
    approvers: ["bmad.strategist", "risk.manager"]
    framework_data:
      - bmad.risk.matrix
      - bmad.mitigation.plans

Approval Workflows

class BMADApprovalWorkflow {
  constructor(framework, prdManager) {
    this.framework = framework;
    this.prdManager = prdManager;
    this.workflowEngine = framework.getWorkflowEngine();
  }

  async initiatePRDApproval(prdId) {
    const prd = await this.prdManager.getPRD(prdId);
    const workflow = {
      id: `prd_approval_${prdId}`,
      type: 'bmad.prd.approval',
      data: { prdId, currentSection: 0 },
      steps: await this.buildApprovalSteps(prd)
    };

    return await this.workflowEngine.start(workflow);
  }

  async buildApprovalSteps(prd) {
    const steps = [];
    
    for (const [sectionName, section] of Object.entries(prd.sections)) {
      if (section.required && section.approvers) {
        steps.push({
          name: `approve_${sectionName}`,
          type: 'approval',
          approvers: section.approvers,
          data: {
            section: sectionName,
            content: section.content,
            framework_validations: section.framework_validations || []
          },
          onApproval: this.onSectionApproved.bind(this),
          onRejection: this.onSectionRejected.bind(this)
        });
      }
    }

    return steps;
  }

  async onSectionApproved(stepData, approver) {
    // Update PRD section status
    await this.prdManager.updateSectionStatus(
      stepData.prdId, 
      stepData.section, 
      'approved'
    );

    // Emit framework event
    this.framework.getEventBus().emit('bmad.prd.section.approved', {
      prdId: stepData.prdId,
      section: stepData.section,
      approver,
      timestamp: new Date()
    });

    // Check if all sections are approved
    const prd = await this.prdManager.getPRD(stepData.prdId);
    if (this.areAllSectionsApproved(prd)) {
      await this.finalizePRD(prd);
    }
  }
}

Version Control Integration

class BMADVersionControl {
  constructor(framework) {
    this.framework = framework;
    this.gitService = framework.getGitService();
    this.storageService = framework.getStorage();
  }

  async commitPRDVersion(prdId, message, author) {
    const prd = await this.getPRD(prdId);
    const serialized = await this.serializePRD(prd);
    
    // Create framework-compatible commit
    const commit = {
      module: 'bmad',
      type: 'prd_update',
      data: serialized,
      metadata: {
        prdId,
        version: prd.version,
        author,
        businessModel: prd.metadata.businessModel
      }
    };

    return await this.framework.versionControl.commit(commit, message);
  }

  async createPRDBranch(prdId, branchName, baseVersion = 'latest') {
    const prd = await this.getPRD(prdId);
    
    // Use framework's branching system
    return await this.framework.versionControl.createBranch({
      name: `prd/${prdId}/${branchName}`,
      base: baseVersion,
      metadata: {
        type: 'bmad.prd',
        prdId,
        businessModel: prd.metadata.businessModel
      }
    });
  }

  async mergePRDChanges(prdId, sourceBranch, targetBranch) {
    // Framework-assisted merge with conflict resolution
    const mergeResult = await this.framework.versionControl.merge({
      source: sourceBranch,
      target: targetBranch,
      resolver: this.resolvePRDConflicts.bind(this)
    });

    if (mergeResult.conflicts) {
      // Use BMAD-specific conflict resolution
      return await this.handlePRDConflicts(prdId, mergeResult.conflicts);
    }

    return mergeResult;
  }
}

πŸš€ Getting Started


🧠 Core Concepts


⚑ Features


πŸ“– Guides


πŸ“‹ Reference


πŸ”Œ Advanced

MCP Integration

BMAD Enterprise


πŸ”§ Troubleshooting

Quick Navigation

🚨 Emergency Procedures

πŸ“‹ Common Issues

Installation & Setup

  • Installation Issues
    • Node.js Version Compatibility
    • Package Installation Failures
    • Framework Dependencies Missing
    • Database Connection Issues
    • Port Conflicts
    • Environment Setup Issues
    • Build and Development Issues
    • Framework CLI Issues

Configuration & Runtime

  • Configuration & Runtime Issues
    • Framework Configuration Problems
    • Runtime Performance Issues
    • Module Loading and Plugin Issues
    • Database and Storage Issues
    • Memory Leaks and High Memory Usage
    • High CPU Usage

BMAD Module

  • BMAD Module Issues
    • BMAD Module Initialization Problems
    • Business Model Canvas Issues
    • Stakeholder Management Issues
    • Analytics and Reporting Issues
    • Performance Optimization

Database & API

  • Database & API Issues
    • Database Connection Problems
    • Database Migration Issues
    • API Performance and Reliability Issues
    • Data Consistency Issues
    • Transaction Problems

Performance & Memory

Security & Authentication

  • Security & Authentication Issues
    • Authentication Failures
    • Authorization Problems
    • JWT Token Issues
    • Session Management
    • CORS and Security Headers
    • SSL/TLS Configuration

Deployment & Production

  • Deployment & Production Issues
    • Production Deployment Failures
    • Environment Configuration
    • Load Balancing Issues
    • Monitoring and Logging
    • Backup and Recovery

Information to Gather

When reporting issues, please include:

  • Framework version (npm list @cursoriper/core)
  • Node.js version (node --version)
  • Operating system and version
  • Error messages and stack traces
  • Steps to reproduce the issue
  • Configuration files (sanitized)
  • Recent changes or deployments

Tech Docs & Suport


πŸ“ž Support & Community


πŸ“‹ Release Notes

Last Updated: June 28, 2025
Framework Version: CursorRIPER.sigma v1.0+

For the original verbose framework, see CursorRIPER

← Back to Home

Clone this wiki locally