diff --git a/.cursorignore b/.cursorignore deleted file mode 100644 index 2399c188..00000000 --- a/.cursorignore +++ /dev/null @@ -1 +0,0 @@ -LEGACY-V1/* \ No newline at end of file diff --git a/BETA-V3/checklists/architect-checklist.txt b/BETA-V3/checklists/architect-checklist.txt new file mode 100644 index 00000000..acad9f6c --- /dev/null +++ b/BETA-V3/checklists/architect-checklist.txt @@ -0,0 +1,259 @@ +# Architect Solution Validation Checklist + +This checklist serves as a comprehensive framework for the Architect to validate the technical design and architecture before development execution. The Architect should systematically work through each item, ensuring the architecture is robust, scalable, secure, and aligned with the product requirements. + +## 1. REQUIREMENTS ALIGNMENT + +### 1.1 Functional Requirements Coverage + +- [ ] Architecture supports all functional requirements in the PRD +- [ ] Technical approaches for all epics and stories are addressed +- [ ] Edge cases and performance scenarios are considered +- [ ] All required integrations are accounted for +- [ ] User journeys are supported by the technical architecture + +### 1.2 Non-Functional Requirements Alignment + +- [ ] Performance requirements are addressed with specific solutions +- [ ] Scalability considerations are documented with approach +- [ ] Security requirements have corresponding technical controls +- [ ] Reliability and resilience approaches are defined +- [ ] Compliance requirements have technical implementations + +### 1.3 Technical Constraints Adherence + +- [ ] All technical constraints from PRD are satisfied +- [ ] Platform/language requirements are followed +- [ ] Infrastructure constraints are accommodated +- [ ] Third-party service constraints are addressed +- [ ] Organizational technical standards are followed + +## 2. ARCHITECTURE FUNDAMENTALS + +### 2.1 Architecture Clarity + +- [ ] Architecture is documented with clear diagrams +- [ ] Major components and their responsibilities are defined +- [ ] Component interactions and dependencies are mapped +- [ ] Data flows are clearly illustrated +- [ ] Technology choices for each component are specified + +### 2.2 Separation of Concerns + +- [ ] Clear boundaries between UI, business logic, and data layers +- [ ] Responsibilities are cleanly divided between components +- [ ] Interfaces between components are well-defined +- [ ] Components adhere to single responsibility principle +- [ ] Cross-cutting concerns (logging, auth, etc.) are properly addressed + +### 2.3 Design Patterns & Best Practices + +- [ ] Appropriate design patterns are employed +- [ ] Industry best practices are followed +- [ ] Anti-patterns are avoided +- [ ] Consistent architectural style throughout +- [ ] Pattern usage is documented and explained + +### 2.4 Modularity & Maintainability + +- [ ] System is divided into cohesive, loosely-coupled modules +- [ ] Components can be developed and tested independently +- [ ] Changes can be localized to specific components +- [ ] Code organization promotes discoverability +- [ ] Architecture specifically designed for AI agent implementation + +## 3. TECHNICAL STACK & DECISIONS + +### 3.1 Technology Selection + +- [ ] Selected technologies meet all requirements +- [ ] Technology versions are specifically defined (not ranges) +- [ ] Technology choices are justified with clear rationale +- [ ] Alternatives considered are documented with pros/cons +- [ ] Selected stack components work well together + +### 3.2 Frontend Architecture + +- [ ] UI framework and libraries are specifically selected +- [ ] State management approach is defined +- [ ] Component structure and organization is specified +- [ ] Responsive/adaptive design approach is outlined +- [ ] Build and bundling strategy is determined + +### 3.3 Backend Architecture + +- [ ] API design and standards are defined +- [ ] Service organization and boundaries are clear +- [ ] Authentication and authorization approach is specified +- [ ] Error handling strategy is outlined +- [ ] Backend scaling approach is defined + +### 3.4 Data Architecture + +- [ ] Data models are fully defined +- [ ] Database technologies are selected with justification +- [ ] Data access patterns are documented +- [ ] Data migration/seeding approach is specified +- [ ] Data backup and recovery strategies are outlined + +## 4. RESILIENCE & OPERATIONAL READINESS + +### 4.1 Error Handling & Resilience + +- [ ] Error handling strategy is comprehensive +- [ ] Retry policies are defined where appropriate +- [ ] Circuit breakers or fallbacks are specified for critical services +- [ ] Graceful degradation approaches are defined +- [ ] System can recover from partial failures + +### 4.2 Monitoring & Observability + +- [ ] Logging strategy is defined +- [ ] Monitoring approach is specified +- [ ] Key metrics for system health are identified +- [ ] Alerting thresholds and strategies are outlined +- [ ] Debugging and troubleshooting capabilities are built in + +### 4.3 Performance & Scaling + +- [ ] Performance bottlenecks are identified and addressed +- [ ] Caching strategy is defined where appropriate +- [ ] Load balancing approach is specified +- [ ] Horizontal and vertical scaling strategies are outlined +- [ ] Resource sizing recommendations are provided + +### 4.4 Deployment & DevOps + +- [ ] Deployment strategy is defined +- [ ] CI/CD pipeline approach is outlined +- [ ] Environment strategy (dev, staging, prod) is specified +- [ ] Infrastructure as Code approach is defined +- [ ] Rollback and recovery procedures are outlined + +## 5. SECURITY & COMPLIANCE + +### 5.1 Authentication & Authorization + +- [ ] Authentication mechanism is clearly defined +- [ ] Authorization model is specified +- [ ] Role-based access control is outlined if required +- [ ] Session management approach is defined +- [ ] Credential management is addressed + +### 5.2 Data Security + +- [ ] Data encryption approach (at rest and in transit) is specified +- [ ] Sensitive data handling procedures are defined +- [ ] Data retention and purging policies are outlined +- [ ] Backup encryption is addressed if required +- [ ] Data access audit trails are specified if required + +### 5.3 API & Service Security + +- [ ] API security controls are defined +- [ ] Rate limiting and throttling approaches are specified +- [ ] Input validation strategy is outlined +- [ ] CSRF/XSS prevention measures are addressed +- [ ] Secure communication protocols are specified + +### 5.4 Infrastructure Security + +- [ ] Network security design is outlined +- [ ] Firewall and security group configurations are specified +- [ ] Service isolation approach is defined +- [ ] Least privilege principle is applied +- [ ] Security monitoring strategy is outlined + +## 6. IMPLEMENTATION GUIDANCE + +### 6.1 Coding Standards & Practices + +- [ ] Coding standards are defined +- [ ] Documentation requirements are specified +- [ ] Testing expectations are outlined +- [ ] Code organization principles are defined +- [ ] Naming conventions are specified + +### 6.2 Testing Strategy + +- [ ] Unit testing approach is defined +- [ ] Integration testing strategy is outlined +- [ ] E2E testing approach is specified +- [ ] Performance testing requirements are outlined +- [ ] Security testing approach is defined + +### 6.3 Development Environment + +- [ ] Local development environment setup is documented +- [ ] Required tools and configurations are specified +- [ ] Development workflows are outlined +- [ ] Source control practices are defined +- [ ] Dependency management approach is specified + +### 6.4 Technical Documentation + +- [ ] API documentation standards are defined +- [ ] Architecture documentation requirements are specified +- [ ] Code documentation expectations are outlined +- [ ] System diagrams and visualizations are included +- [ ] Decision records for key choices are included + +## 7. DEPENDENCY & INTEGRATION MANAGEMENT + +### 7.1 External Dependencies + +- [ ] All external dependencies are identified +- [ ] Versioning strategy for dependencies is defined +- [ ] Fallback approaches for critical dependencies are specified +- [ ] Licensing implications are addressed +- [ ] Update and patching strategy is outlined + +### 7.2 Internal Dependencies + +- [ ] Component dependencies are clearly mapped +- [ ] Build order dependencies are addressed +- [ ] Shared services and utilities are identified +- [ ] Circular dependencies are eliminated +- [ ] Versioning strategy for internal components is defined + +### 7.3 Third-Party Integrations + +- [ ] All third-party integrations are identified +- [ ] Integration approaches are defined +- [ ] Authentication with third parties is addressed +- [ ] Error handling for integration failures is specified +- [ ] Rate limits and quotas are considered + +## 8. AI AGENT IMPLEMENTATION SUITABILITY + +### 8.1 Modularity for AI Agents + +- [ ] Components are sized appropriately for AI agent implementation +- [ ] Dependencies between components are minimized +- [ ] Clear interfaces between components are defined +- [ ] Components have singular, well-defined responsibilities +- [ ] File and code organization optimized for AI agent understanding + +### 8.2 Clarity & Predictability + +- [ ] Patterns are consistent and predictable +- [ ] Complex logic is broken down into simpler steps +- [ ] Architecture avoids overly clever or obscure approaches +- [ ] Examples are provided for unfamiliar patterns +- [ ] Component responsibilities are explicit and clear + +### 8.3 Implementation Guidance + +- [ ] Detailed implementation guidance is provided +- [ ] Code structure templates are defined +- [ ] Specific implementation patterns are documented +- [ ] Common pitfalls are identified with solutions +- [ ] References to similar implementations are provided when helpful + +### 8.4 Error Prevention & Handling + +- [ ] Design reduces opportunities for implementation errors +- [ ] Validation and error checking approaches are defined +- [ ] Self-healing mechanisms are incorporated where possible +- [ ] Testing patterns are clearly defined +- [ ] Debugging guidance is provided \ No newline at end of file diff --git a/BETA-V3/checklists/frontend-architecture-checklist.txt b/BETA-V3/checklists/frontend-architecture-checklist.txt new file mode 100644 index 00000000..2a3dc8a6 --- /dev/null +++ b/BETA-V3/checklists/frontend-architecture-checklist.txt @@ -0,0 +1,149 @@ +# Frontend Architecture Document Review Checklist + +## Purpose +This checklist is for the Design Architect to use after completing the "Frontend Architecture Mode" and populating the `front-end-architecture-tmpl.txt` (or `.md`) document. It ensures all sections are comprehensively covered and meet quality standards before finalization. + +--- + +## I. Introduction + +- [ ] Is the `{Project Name}` correctly filled in throughout the Introduction? +- [ ] Is the link to the Main Architecture Document present and correct? +- [ ] Is the link to the UI/UX Specification present and correct? +- [ ] Is the link to the Primary Design Files (Figma, Sketch, etc.) present and correct? +- [ ] Is the link to a Deployed Storybook / Component Showcase included, if applicable and available? + +## II. Overall Frontend Philosophy & Patterns + +- [ ] Are the chosen Framework & Core Libraries clearly stated and aligned with the main architecture document? +- [ ] Is the Component Architecture (e.g., Atomic Design, Presentational/Container) clearly described? +- [ ] Is the State Management Strategy (e.g., Redux Toolkit, Zustand) clearly described at a high level? +- [ ] Is the Data Flow (e.g., Unidirectional) clearly explained? +- [ ] Is the Styling Approach (e.g., CSS Modules, Tailwind CSS) clearly defined? +- [ ] Are Key Design Patterns to be employed (e.g., Provider, Hooks) listed? +- [ ] Does this section align with "Definitive Tech Stack Selections" in the main architecture document? +- [ ] Are implications from overall system architecture (monorepo/polyrepo, backend services) considered? + +## III. Detailed Frontend Directory Structure + +- [ ] Is an ASCII diagram representing the frontend application's folder structure provided? +- [ ] Is the diagram clear, accurate, and reflective of the chosen framework/patterns? +- [ ] Are conventions for organizing components, pages, services, state, styles, etc., highlighted? +- [ ] Are notes explaining specific conventions or rationale for the structure present and clear? + +## IV. Component Breakdown & Implementation Details + +### Component Naming & Organization +- [ ] Are conventions for naming components (e.g., PascalCase) described? +- [ ] Is the organization of components on the filesystem clearly explained (reiterating from directory structure if needed)? + +### Template for Component Specification +- [ ] Is the "Template for Component Specification" itself complete and well-defined? + - [ ] Does it include fields for: Purpose, Source File(s), Visual Reference? + - [ ] Does it include a table structure for Props (Name, Type, Required, Default, Description)? + - [ ] Does it include a table structure for Internal State (Variable, Type, Initial Value, Description)? + - [ ] Does it include a section for Key UI Elements / Structure (textual or pseudo-HTML)? + - [ ] Does it include a section for Events Handled / Emitted? + - [ ] Does it include a section for Actions Triggered (State Management, API Calls)? + - [ ] Does it include a section for Styling Notes? + - [ ] Does it include a section for Accessibility Notes? +- [ ] Is there a clear statement that this template should be used for most feature-specific components? + +### Foundational/Shared Components (if any specified upfront) +- [ ] If any foundational/shared UI components are specified, do they follow the "Template for Component Specification"? +- [ ] Is the rationale for specifying these components upfront clear? + +## V. State Management In-Depth + +- [ ] Is the chosen State Management Solution reiterated and rationale briefly provided (if not fully covered in main arch doc)? +- [ ] Are conventions for Store Structure / Slices clearly defined (e.g., location, feature-based slices)? +- [ ] If a Core Slice Example (e.g., `sessionSlice`) is provided: + - [ ] Is its purpose clear? + - [ ] Is its State Shape defined (e.g., using TypeScript interface)? + - [ ] Are its Key Reducers/Actions listed? +- [ ] Is a Feature Slice Template provided, outlining purpose, state shape, and key reducers/actions to be filled in? +- [ ] Are conventions for Key Selectors noted (e.g., use `createSelector`)? +- [ ] Are examples of Key Selectors for any core slices provided? +- [ ] Are conventions for Key Actions / Reducers / Thunks (especially async) described? +- [ ] Is an example of a Core Action/Thunk (e.g., `authenticateUser`) provided, detailing its purpose and dispatch flow? +- [ ] Is a Feature Action/Thunk Template provided for feature-specific async operations? + +## VI. API Interaction Layer + +- [ ] Is the HTTP Client Setup detailed (e.g., Axios instance, Fetch wrapper, base URL, default headers, interceptors)? +- [ ] Are Service Definitions conventions explained? +- [ ] Is an example of a service (e.g., `userService.ts`) provided, including its purpose and example functions? +- [ ] Is Global Error Handling for API calls described (e.g., toast notifications, global error state)? +- [ ] Is guidance on Specific Error Handling within components provided? +- [ ] Is any client-side Retry Logic for API calls detailed and configured? + +## VII. Routing Strategy + +- [ ] Is the chosen Routing Library stated? +- [ ] Is a table of Route Definitions provided? + - [ ] Does it include Path Pattern, Component/Page, Protection status, and Notes for each route? + - [ ] Are all key application routes listed? +- [ ] Is the Authentication Guard mechanism for protecting routes described? +- [ ] Is the Authorization Guard mechanism (if applicable for roles/permissions) described? + +## VIII. Build, Bundling, and Deployment + +- [ ] Are Key Build Scripts (e.g., `npm run build`) listed and their purpose explained? +- [ ] Is the handling of Environment Variables during the build process described for different environments? +- [ ] Is Code Splitting strategy detailed (e.g., route-based, component-based)? +- [ ] Is Tree Shaking confirmed or explained? +- [ ] Is Lazy Loading strategy (for components, images, routes) outlined? +- [ ] Is Minification & Compression by build tools mentioned? +- [ ] Is the Target Deployment Platform (e.g., Vercel, Netlify) specified? +- [ ] Is the Deployment Trigger (e.g., Git push via CI/CD) described, referencing the main CI/CD pipeline? +- [ ] Is the Asset Caching Strategy (CDN/browser) for static assets outlined? + +## IX. Frontend Testing Strategy + +- [ ] Is there a link to the Main Testing Strategy document/section, and is it correct? +- [ ] For Component Testing: + - [ ] Is the Scope clearly defined? + - [ ] Are the Tools listed? + - [ ] Is the Focus of tests (rendering, props, interactions) clear? + - [ ] Is the Location of test files specified? +- [ ] For UI Integration/Flow Testing: + - [ ] Is the Scope (interactions between multiple components) clear? + - [ ] Are the Tools listed (can be same as component testing)? + - [ ] Is the Focus of these tests clear? +- [ ] For End-to-End UI Testing: + - [ ] Are the Tools (e.g., Playwright, Cypress) reiterated from main strategy? + - [ ] Is the Scope (key user journeys for frontend) defined? + - [ ] Is Test Data Management for UI E2E tests addressed? + +## X. Accessibility (AX) Implementation Details + +- [ ] Is there an emphasis on using Semantic HTML? +- [ ] Are guidelines for ARIA Implementation (roles, states, properties for custom components) provided? +- [ ] Are requirements for Keyboard Navigation (all interactive elements focusable/operable) stated? +- [ ] Is Focus Management (for modals, dynamic content) addressed? +- [ ] Are Testing Tools for AX (e.g., Axe DevTools, Lighthouse) listed? +- [ ] Does this section align with AX requirements from the UI/UX Specification? + +## XI. Performance Considerations + +- [ ] Is Image Optimization (formats, responsive images, lazy loading) discussed? +- [ ] Is Code Splitting & Lazy Loading (impact on perceived performance) reiterated if necessary? +- [ ] Are techniques for Minimizing Re-renders (e.g., `React.memo`) mentioned? +- [ ] Is the use of Debouncing/Throttling for event handlers considered? +- [ ] Is Virtualization for long lists/large data sets mentioned if applicable? +- [ ] Are Client-Side Caching Strategies (browser cache, service workers) discussed if relevant? +- [ ] Are Performance Monitoring Tools (e.g., Lighthouse, DevTools) listed? + +## XII. Change Log + +- [ ] Is the Change Log table present and initialized? +- [ ] Is there a process for updating the change log as the document evolves? + +--- + +## Final Review Sign-off + +- [ ] Have all placeholders (e.g., `{Project Name}`, `{e.g., ...}`) been filled in or removed where appropriate? +- [ ] Has the document been reviewed for clarity, consistency, and completeness by the Design Architect? +- [ ] Are all linked documents (Main Architecture, UI/UX Spec) finalized or stable enough for this document to rely on? +- [ ] Is the document ready to be shared with the development team? \ No newline at end of file diff --git a/BETA-V3/checklists/pm-checklist.txt b/BETA-V3/checklists/pm-checklist.txt new file mode 100644 index 00000000..86415527 --- /dev/null +++ b/BETA-V3/checklists/pm-checklist.txt @@ -0,0 +1,239 @@ +# Product Manager (PM) Requirements Checklist + +This checklist serves as a comprehensive framework to ensure the Product Requirements Document (PRD) and Epic definitions are complete, well-structured, and appropriately scoped for MVP development. The PM should systematically work through each item during the product definition process. + +## 1. PROBLEM DEFINITION & CONTEXT + +### 1.1 Problem Statement +- [ ] Clear articulation of the problem being solved +- [ ] Identification of who experiences the problem +- [ ] Explanation of why solving this problem matters +- [ ] Quantification of problem impact (if possible) +- [ ] Differentiation from existing solutions + +### 1.2 Business Goals & Success Metrics +- [ ] Specific, measurable business objectives defined +- [ ] Clear success metrics and KPIs established +- [ ] Metrics are tied to user and business value +- [ ] Baseline measurements identified (if applicable) +- [ ] Timeframe for achieving goals specified + +### 1.3 User Research & Insights +- [ ] Target user personas clearly defined +- [ ] User needs and pain points documented +- [ ] User research findings summarized (if available) +- [ ] Competitive analysis included +- [ ] Market context provided + +## 2. MVP SCOPE DEFINITION + +### 2.1 Core Functionality +- [ ] Essential features clearly distinguished from nice-to-haves +- [ ] Features directly address defined problem statement +- [ ] Each Epic ties back to specific user needs +- [ ] Features and Stories are described from user perspective +- [ ] Minimum requirements for success defined + +### 2.2 Scope Boundaries +- [ ] Clear articulation of what is OUT of scope +- [ ] Future enhancements section included +- [ ] Rationale for scope decisions documented +- [ ] MVP minimizes functionality while maximizing learning +- [ ] Scope has been reviewed and refined multiple times + +### 2.3 MVP Validation Approach +- [ ] Method for testing MVP success defined +- [ ] Initial user feedback mechanisms planned +- [ ] Criteria for moving beyond MVP specified +- [ ] Learning goals for MVP articulated +- [ ] Timeline expectations set + +## 3. USER EXPERIENCE REQUIREMENTS + +### 3.1 User Journeys & Flows +- [ ] Primary user flows documented +- [ ] Entry and exit points for each flow identified +- [ ] Decision points and branches mapped +- [ ] Critical path highlighted +- [ ] Edge cases considered + +### 3.2 Usability Requirements +- [ ] Accessibility considerations documented +- [ ] Platform/device compatibility specified +- [ ] Performance expectations from user perspective defined +- [ ] Error handling and recovery approaches outlined +- [ ] User feedback mechanisms identified + +### 3.3 UI Requirements +- [ ] Information architecture outlined +- [ ] Critical UI components identified +- [ ] Visual design guidelines referenced (if applicable) +- [ ] Content requirements specified +- [ ] High-level navigation structure defined + +## 4. FUNCTIONAL REQUIREMENTS + +### 4.1 Feature Completeness +- [ ] All required features for MVP documented +- [ ] Features have clear, user-focused descriptions +- [ ] Feature priority/criticality indicated +- [ ] Requirements are testable and verifiable +- [ ] Dependencies between features identified + +### 4.2 Requirements Quality +- [ ] Requirements are specific and unambiguous +- [ ] Requirements focus on WHAT not HOW +- [ ] Requirements use consistent terminology +- [ ] Complex requirements broken into simpler parts +- [ ] Technical jargon minimized or explained + +### 4.3 User Stories & Acceptance Criteria +- [ ] Stories follow consistent format +- [ ] Acceptance criteria are testable +- [ ] Stories are sized appropriately (not too large) +- [ ] Stories are independent where possible +- [ ] Stories include necessary context +- [ ] Local testability requirements (e.g., via CLI) defined in ACs for relevant backend/data stories + +## 5. NON-FUNCTIONAL REQUIREMENTS + +### 5.1 Performance Requirements +- [ ] Response time expectations defined +- [ ] Throughput/capacity requirements specified +- [ ] Scalability needs documented +- [ ] Resource utilization constraints identified +- [ ] Load handling expectations set + +### 5.2 Security & Compliance +- [ ] Data protection requirements specified +- [ ] Authentication/authorization needs defined +- [ ] Compliance requirements documented +- [ ] Security testing requirements outlined +- [ ] Privacy considerations addressed + +### 5.3 Reliability & Resilience +- [ ] Availability requirements defined +- [ ] Backup and recovery needs documented +- [ ] Fault tolerance expectations set +- [ ] Error handling requirements specified +- [ ] Maintenance and support considerations included + +### 5.4 Technical Constraints +- [ ] Platform/technology constraints documented +- [ ] Integration requirements outlined +- [ ] Third-party service dependencies identified +- [ ] Infrastructure requirements specified +- [ ] Development environment needs identified + +## 6. EPIC & STORY STRUCTURE + +### 6.1 Epic Definition +- [ ] Epics represent cohesive units of functionality +- [ ] Epics focus on user/business value delivery +- [ ] Epic goals clearly articulated +- [ ] Epics are sized appropriately for incremental delivery +- [ ] Epic sequence and dependencies identified + +### 6.2 Story Breakdown +- [ ] Stories are broken down to appropriate size +- [ ] Stories have clear, independent value +- [ ] Stories include appropriate acceptance criteria +- [ ] Story dependencies and sequence documented +- [ ] Stories aligned with epic goals + +### 6.3 First Epic Completeness +- [ ] First epic includes all necessary setup steps +- [ ] Project scaffolding and initialization addressed +- [ ] Core infrastructure setup included +- [ ] Development environment setup addressed +- [ ] Local testability established early + +## 7. TECHNICAL GUIDANCE + +### 7.1 Architecture Guidance +- [ ] Initial architecture direction provided +- [ ] Technical constraints clearly communicated +- [ ] Integration points identified +- [ ] Performance considerations highlighted +- [ ] Security requirements articulated +- [ ] Known areas of high complexity or technical risk flagged for architectural deep-dive + +### 7.2 Technical Decision Framework +- [ ] Decision criteria for technical choices provided +- [ ] Trade-offs articulated for key decisions +- [ ] Rationale for selecting primary approach over considered alternatives documented (for key design/feature choices) +- [ ] Non-negotiable technical requirements highlighted +- [ ] Areas requiring technical investigation identified +- [ ] Guidance on technical debt approach provided + +### 7.3 Implementation Considerations +- [ ] Development approach guidance provided +- [ ] Testing requirements articulated +- [ ] Deployment expectations set +- [ ] Monitoring needs identified +- [ ] Documentation requirements specified + +## 8. CROSS-FUNCTIONAL REQUIREMENTS + +### 8.1 Data Requirements +- [ ] Data entities and relationships identified +- [ ] Data storage requirements specified +- [ ] Data quality requirements defined +- [ ] Data retention policies identified +- [ ] Data migration needs addressed (if applicable) +- [ ] Schema changes planned iteratively, tied to stories requiring them + +### 8.2 Integration Requirements +- [ ] External system integrations identified +- [ ] API requirements documented +- [ ] Authentication for integrations specified +- [ ] Data exchange formats defined +- [ ] Integration testing requirements outlined + +### 8.3 Operational Requirements +- [ ] Deployment frequency expectations set +- [ ] Environment requirements defined +- [ ] Monitoring and alerting needs identified +- [ ] Support requirements documented +- [ ] Performance monitoring approach specified + +## 9. CLARITY & COMMUNICATION + +### 9.1 Documentation Quality +- [ ] Documents use clear, consistent language +- [ ] Documents are well-structured and organized +- [ ] Technical terms are defined where necessary +- [ ] Diagrams/visuals included where helpful +- [ ] Documentation is versioned appropriately + +### 9.2 Stakeholder Alignment +- [ ] Key stakeholders identified +- [ ] Stakeholder input incorporated +- [ ] Potential areas of disagreement addressed +- [ ] Communication plan for updates established +- [ ] Approval process defined + +## PRD & EPIC VALIDATION SUMMARY + +### Category Statuses +| Category | Status | Critical Issues | +|----------|--------|----------------| +| 1. Problem Definition & Context | PASS/FAIL/PARTIAL | | +| 2. MVP Scope Definition | PASS/FAIL/PARTIAL | | +| 3. User Experience Requirements | PASS/FAIL/PARTIAL | | +| 4. Functional Requirements | PASS/FAIL/PARTIAL | | +| 5. Non-Functional Requirements | PASS/FAIL/PARTIAL | | +| 6. Epic & Story Structure | PASS/FAIL/PARTIAL | | +| 7. Technical Guidance | PASS/FAIL/PARTIAL | | +| 8. Cross-Functional Requirements | PASS/FAIL/PARTIAL | | +| 9. Clarity & Communication | PASS/FAIL/PARTIAL | | + +### Critical Deficiencies +- List all critical issues that must be addressed before handoff to Architect + +### Recommendations +- Provide specific recommendations for addressing each deficiency + +### Final Decision +- **READY FOR ARCHITECT**: The PRD and epics are comprehensive, properly structured, and ready for architectural design. +- **NEEDS REFINEMENT**: The requirements documentation requires additional work to address the identified deficiencies. \ No newline at end of file diff --git a/BETA-V3/checklists/po-master-checklist.txt b/BETA-V3/checklists/po-master-checklist.txt new file mode 100644 index 00000000..d57b111c --- /dev/null +++ b/BETA-V3/checklists/po-master-checklist.txt @@ -0,0 +1,200 @@ +# Product Owner (PO) Validation Checklist + +This checklist serves as a comprehensive framework for the Product Owner to validate the complete MVP plan before development execution. The PO should systematically work through each item, documenting compliance status and noting any deficiencies. + +## 1. PROJECT SETUP & INITIALIZATION + +### 1.1 Project Scaffolding +- [ ] Epic 1 includes explicit steps for project creation/initialization +- [ ] If using a starter template, steps for cloning/setup are included +- [ ] If building from scratch, all necessary scaffolding steps are defined +- [ ] Initial README or documentation setup is included +- [ ] Repository setup and initial commit processes are defined (if applicable) + +### 1.2 Development Environment +- [ ] Local development environment setup is clearly defined +- [ ] Required tools and versions are specified (Node.js, Python, etc.) +- [ ] Steps for installing dependencies are included +- [ ] Configuration files (dotenv, config files, etc.) are addressed +- [ ] Development server setup is included + +### 1.3 Core Dependencies +- [ ] All critical packages/libraries are installed early in the process +- [ ] Package management (npm, pip, etc.) is properly addressed +- [ ] Version specifications are appropriately defined +- [ ] Dependency conflicts or special requirements are noted + +## 2. INFRASTRUCTURE & DEPLOYMENT SEQUENCING + +### 2.1 Database & Data Store Setup +- [ ] Database selection/setup occurs before any database operations +- [ ] Schema definitions are created before data operations +- [ ] Migration strategies are defined if applicable +- [ ] Seed data or initial data setup is included if needed +- [ ] Database access patterns and security are established early + +### 2.2 API & Service Configuration +- [ ] API frameworks are set up before implementing endpoints +- [ ] Service architecture is established before implementing services +- [ ] Authentication framework is set up before protected routes +- [ ] Middleware and common utilities are created before use + +### 2.3 Deployment Pipeline +- [ ] CI/CD pipeline is established before any deployment actions +- [ ] Infrastructure as Code (IaC) is set up before use +- [ ] Environment configurations (dev, staging, prod) are defined early +- [ ] Deployment strategies are defined before implementation +- [ ] Rollback procedures or considerations are addressed + +### 2.4 Testing Infrastructure +- [ ] Testing frameworks are installed before writing tests +- [ ] Test environment setup precedes test implementation +- [ ] Mock services or data are defined before testing +- [ ] Test utilities or helpers are created before use + +## 3. EXTERNAL DEPENDENCIES & INTEGRATIONS + +### 3.1 Third-Party Services +- [ ] Account creation steps are identified for required services +- [ ] API key acquisition processes are defined +- [ ] Steps for securely storing credentials are included +- [ ] Fallback or offline development options are considered + +### 3.2 External APIs +- [ ] Integration points with external APIs are clearly identified +- [ ] Authentication with external services is properly sequenced +- [ ] API limits or constraints are acknowledged +- [ ] Backup strategies for API failures are considered + +### 3.3 Infrastructure Services +- [ ] Cloud resource provisioning is properly sequenced +- [ ] DNS or domain registration needs are identified +- [ ] Email or messaging service setup is included if needed +- [ ] CDN or static asset hosting setup precedes their use + +## 4. USER/AGENT RESPONSIBILITY DELINEATION + +### 4.1 User Actions +- [ ] User responsibilities are limited to only what requires human intervention +- [ ] Account creation on external services is properly assigned to users +- [ ] Purchasing or payment actions are correctly assigned to users +- [ ] Credential provision is appropriately assigned to users + +### 4.2 Developer Agent Actions +- [ ] All code-related tasks are assigned to developer agents +- [ ] Automated processes are correctly identified as agent responsibilities +- [ ] Configuration management is properly assigned +- [ ] Testing and validation are assigned to appropriate agents + +## 5. FEATURE SEQUENCING & DEPENDENCIES + +### 5.1 Functional Dependencies +- [ ] Features that depend on other features are sequenced correctly +- [ ] Shared components are built before their use +- [ ] User flows follow a logical progression +- [ ] Authentication features precede protected routes/features + +### 5.2 Technical Dependencies +- [ ] Lower-level services are built before higher-level ones +- [ ] Libraries and utilities are created before their use +- [ ] Data models are defined before operations on them +- [ ] API endpoints are defined before client consumption + +### 5.3 Cross-Epic Dependencies +- [ ] Later epics build upon functionality from earlier epics +- [ ] No epic requires functionality from later epics +- [ ] Infrastructure established in early epics is utilized consistently +- [ ] Incremental value delivery is maintained + +## 6. MVP SCOPE ALIGNMENT + +### 6.1 PRD Goals Alignment +- [ ] All core goals defined in the PRD are addressed in epics/stories +- [ ] Features directly support the defined MVP goals +- [ ] No extraneous features beyond MVP scope are included +- [ ] Critical features are prioritized appropriately + +### 6.2 User Journey Completeness +- [ ] All critical user journeys are fully implemented +- [ ] Edge cases and error scenarios are addressed +- [ ] User experience considerations are included +- [ ] Accessibility requirements are incorporated if specified + +### 6.3 Technical Requirements Satisfaction +- [ ] All technical constraints from the PRD are addressed +- [ ] Non-functional requirements are incorporated +- [ ] Architecture decisions align with specified constraints +- [ ] Performance considerations are appropriately addressed + +## 7. RISK MANAGEMENT & PRACTICALITY + +### 7.1 Technical Risk Mitigation +- [ ] Complex or unfamiliar technologies have appropriate learning/prototyping stories +- [ ] High-risk components have explicit validation steps +- [ ] Fallback strategies exist for risky integrations +- [ ] Performance concerns have explicit testing/validation + +### 7.2 External Dependency Risks +- [ ] Risks with third-party services are acknowledged and mitigated +- [ ] API limits or constraints are addressed +- [ ] Backup strategies exist for critical external services +- [ ] Cost implications of external services are considered + +### 7.3 Timeline Practicality +- [ ] Story complexity and sequencing suggest a realistic timeline +- [ ] Dependencies on external factors are minimized or managed +- [ ] Parallel work is enabled where possible +- [ ] Critical path is identified and optimized + +## 8. DOCUMENTATION & HANDOFF + +### 8.1 Developer Documentation +- [ ] API documentation is created alongside implementation +- [ ] Setup instructions are comprehensive +- [ ] Architecture decisions are documented +- [ ] Patterns and conventions are documented + +### 8.2 User Documentation +- [ ] User guides or help documentation is included if required +- [ ] Error messages and user feedback are considered +- [ ] Onboarding flows are fully specified +- [ ] Support processes are defined if applicable + +## 9. POST-MVP CONSIDERATIONS + +### 9.1 Future Enhancements +- [ ] Clear separation between MVP and future features +- [ ] Architecture supports planned future enhancements +- [ ] Technical debt considerations are documented +- [ ] Extensibility points are identified + +### 9.2 Feedback Mechanisms +- [ ] Analytics or usage tracking is included if required +- [ ] User feedback collection is considered +- [ ] Monitoring and alerting are addressed +- [ ] Performance measurement is incorporated + +## VALIDATION SUMMARY + +### Category Statuses +| Category | Status | Critical Issues | +|----------|--------|----------------| +| 1. Project Setup & Initialization | PASS/FAIL/PARTIAL | | +| 2. Infrastructure & Deployment Sequencing | PASS/FAIL/PARTIAL | | +| 3. External Dependencies & Integrations | PASS/FAIL/PARTIAL | | +| 4. User/Agent Responsibility Delineation | PASS/FAIL/PARTIAL | | +| 5. Feature Sequencing & Dependencies | PASS/FAIL/PARTIAL | | +| 6. MVP Scope Alignment | PASS/FAIL/PARTIAL | | +| 7. Risk Management & Practicality | PASS/FAIL/PARTIAL | | +| 8. Documentation & Handoff | PASS/FAIL/PARTIAL | | +| 9. Post-MVP Considerations | PASS/FAIL/PARTIAL | | + +### Critical Deficiencies +- List all critical issues that must be addressed before approval + +### Recommendations +- Provide specific recommendations for addressing each deficiency + +### Final Decision +- **APPROVED**: The plan is comprehensive, properly sequenced, and ready for implementation. +- **REJECTED**: The plan requires revision to address the identified deficiencies. \ No newline at end of file diff --git a/BETA-V3/checklists/story-dod-checklist.txt b/BETA-V3/checklists/story-dod-checklist.txt new file mode 100644 index 00000000..d2bb555a --- /dev/null +++ b/BETA-V3/checklists/story-dod-checklist.txt @@ -0,0 +1,51 @@ +# Story Definition of Done (DoD) Checklist + +## Instructions for Developer Agent: +Before marking a story as 'Review', please go through each item in this checklist. Report the status of each item (e.g., [x] Done, [ ] Not Done, [N/A] Not Applicable) and provide brief comments if necessary. + +## Checklist Items: + +1. **Requirements Met:** + - [ ] All functional requirements specified in the story are implemented. + - [ ] All acceptance criteria defined in the story are met. + +2. **Coding Standards & Project Structure:** + - [ ] All new/modified code strictly adheres to `docs/coding-standards.md`. + - [ ] All new/modified code aligns with `docs/project-structure.md` (file locations, naming, etc.). + - [ ] Implementation aligns with relevant sections of `docs/architecture.md` (if story impacts architecture). + - [ ] Adherence to `docs/tech-stack.md` for technologies/versions used (if story introduces or modifies tech usage). + - [ ] Adherence to `docs/api-reference.md` and `docs/data-models.md` (if story involves API or data model changes). + - [ ] Basic security best practices (e.g., input validation, proper error handling, no hardcoded secrets) applied for new/modified code. + - [ ] No new linter errors or warnings introduced. + - [ ] Code is well-commented where necessary (clarifying complex logic, not obvious statements). + +3. **Testing:** + - [ ] All required unit tests as per the story and `docs/testing-strategy.md` are implemented. + - [ ] All required integration tests (if applicable) as per the story and `docs/testing-strategy.md` are implemented. + - [ ] All tests (unit, integration, E2E if applicable) pass successfully. + - [ ] Test coverage meets project standards (if defined). + +4. **Functionality & Verification:** + - [ ] Functionality has been manually verified by the developer (e.g., running the app locally, checking UI, testing API endpoints). + - [ ] Edge cases and potential error conditions considered and handled gracefully. + +5. **Story Administration:** + - [ ] All tasks within the story file are marked as complete. + - [ ] Any clarifications or decisions made during development are documented in the story file or linked appropriately. + - [ ] The story wrap up section has been completed with notes of changes or information relevant to the next story or overall project, the agent model that was primarily used during development, and the changelog of any changes is properly updated. + +6. **Dependencies, Build & Configuration:** + - [ ] Project builds successfully without errors. + - [ ] Project linting passes + - [ ] Any new dependencies added were either pre-approved in the story requirements OR explicitly approved by the user during development (approval documented in story file). + - [ ] If new dependencies were added, they are recorded in the appropriate project files (e.g., `package.json`, `requirements.txt`) with justification. + - [ ] No known security vulnerabilities introduced by newly added and approved dependencies. + - [ ] If new environment variables or configurations were introduced by the story, they are documented (e.g., in `docs/environment-vars.md` or story notes) and handled securely. + +7. **Documentation (If Applicable):** + - [ ] Relevant inline code documentation (e.g., JSDoc, TSDoc, Python docstrings) for new public APIs or complex logic is complete. + - [ ] User-facing documentation updated, if changes impact users. + - [ ] Technical documentation (e.g., READMEs, system diagrams) updated if significant architectural changes were made. + +## Final Confirmation: +- [ ] I, the Developer Agent, confirm that all applicable items above have been addressed. \ No newline at end of file diff --git a/BETA-V3/checklists/story-draft-checklist.txt b/BETA-V3/checklists/story-draft-checklist.txt new file mode 100644 index 00000000..c95a402f --- /dev/null +++ b/BETA-V3/checklists/story-draft-checklist.txt @@ -0,0 +1,57 @@ +# Story Draft Checklist + +The Scrum Master should use this checklist to validate that each story contains sufficient context for a developer agent to implement it successfully, while assuming the dev agent has reasonable capabilities to figure things out. + +## 1. GOAL & CONTEXT CLARITY + +- [ ] Story goal/purpose is clearly stated +- [ ] Relationship to epic goals is evident +- [ ] How the story fits into overall system flow is explained +- [ ] Dependencies on previous stories are identified (if applicable) +- [ ] Business context and value are clear + +## 2. TECHNICAL IMPLEMENTATION GUIDANCE + +- [ ] Key files to create/modify are identified (not necessarily exhaustive) +- [ ] Technologies specifically needed for this story are mentioned +- [ ] Critical APIs or interfaces are sufficiently described +- [ ] Necessary data models or structures are referenced +- [ ] Required environment variables are listed (if applicable) +- [ ] Any exceptions to standard coding patterns are noted + +## 3. REFERENCE EFFECTIVENESS + +- [ ] References to external documents point to specific relevant sections +- [ ] Critical information from previous stories is summarized (not just referenced) +- [ ] Context is provided for why references are relevant +- [ ] References use consistent format (e.g., `docs/filename.md#section`) + +## 4. SELF-CONTAINMENT ASSESSMENT + +- [ ] Core information needed is included (not overly reliant on external docs) +- [ ] Implicit assumptions are made explicit +- [ ] Domain-specific terms or concepts are explained +- [ ] Edge cases or error scenarios are addressed + +## 5. TESTING GUIDANCE + +- [ ] Required testing approach is outlined +- [ ] Key test scenarios are identified +- [ ] Success criteria are defined +- [ ] Special testing considerations are noted (if applicable) + +## VALIDATION RESULT + +| Category | Status | Issues | +| ------------------------------------ | ----------------- | ------ | +| 1. Goal & Context Clarity | PASS/FAIL/PARTIAL | | +| 2. Technical Implementation Guidance | PASS/FAIL/PARTIAL | | +| 3. Reference Effectiveness | PASS/FAIL/PARTIAL | | +| 4. Self-Containment Assessment | PASS/FAIL/PARTIAL | | +| 5. Testing Guidance | PASS/FAIL/PARTIAL | | + +**Final Assessment:** + +- READY: The story provides sufficient context for implementation +- NEEDS REVISION: The story requires updates (see issues) +- BLOCKED: External information required (specify what information) diff --git a/BETA-V3/draft-readme.md b/BETA-V3/draft-readme.md new file mode 100644 index 00000000..ac860398 --- /dev/null +++ b/BETA-V3/draft-readme.md @@ -0,0 +1,142 @@ +# The BMAD-Method (Breakthrough Method of Agile (ai-driven) Development) - BETA-V3 + +If you want to jump right in, here are the [Setup Instructions](./instruction.md) For IDE, WEB and Task setup. + +## BETA-V3: Advancing AI-Driven Development + +Welcome to **BETA-V3** of the BMAD Method! This version represents a significant evolution, building upon the foundations of V2 and introducing a more refined and comprehensive suite of agents, templates, and processes. The `BETA-V3` folder contains the latest implementation, designed to enhance collaboration, documentation, and the overall efficiency of developing projects with AI. + +While `LEGACY-V1` and `CURRENT-V2` folders exist for historical reference, **BETA-V3** is the focus of ongoing development and represents the most advanced iteration of the BMAD Method. + +## Custom Modes and Welcome Contributions + +The BMAD community's input is invaluable! We encourage you to contribute by submitting Pull Requests for custom agent modes, new templates, or checklist enhancements tailored for the `BETA-V3` system. Whether for Web UIs (like Gemini Gems/Custom GPTs) or IDE custom modes, your contributions help expand our AI team's capabilities. + +The Custom Agents in `BETA-V3` continue to follow best practices for LLM prompting (e.g., clear roles, instructions, and context) ensuring they work effectively across various AI platforms. + +## 🔥 Demonstration Walkthrough 🔥 + +While a dedicated BETA-V3 video walkthrough is planned, the principles of interactive, phased agent collaboration are well-illustrated in the [V2 Video Walkthrough](https://youtu.be/p0barbrWgQA?si=PD1RyWNVDpdF3QJf). The [`V2-FULL-DEMO-WALKTHROUGH`](../V2-FULL-DEMO-WALKTHROUGH/demo.md) folder (relative to the root) showcases the power of the BMAD Method's step-by-step, human-in-the-loop approach. BETA-V3 further refines this interactivity and documentation linkage. + +## What's New in BETA-V3? + +BETA-V3 introduces several key enhancements to streamline your AI-driven development lifecycle: + +- **Enhanced Agent Roles & Phases:** The core agents (Analyst, PM, Architect) have more clearly defined operational phases, inputs, and outputs, leading to smoother transitions. +- **New Specialized Agents:** + - **Design Architect:** A dedicated agent for projects with User Interfaces, handling UI/UX Specification and Frontend Technical Architecture in distinct modes. + - **Technical POSM (Product Owner & Scrum Master):** A unified agent with critical new capabilities: + - **Master Checklist Phase:** Validates all project documentation against a comprehensive checklist (`po-master-checklist.txt`). + - **Librarian Phase:** Decomposes large documents into a granular, indexed (`docs/index.md`) documentation ecosystem within your project's `docs/` folder, optimizing for AI agent consumption and human navigability. + - **Story Creator Phase:** Autonomously generates detailed, developer-ready story files using the granular documentation. +- **Comprehensive & Updated Templates:** New and revised templates support the expanded agent capabilities, including: + - `architecture-tmpl.txt` (for System Architecture) + - `front-end-spec-tmpl.txt` (for UI/UX Specifications) + - `front-end-architecture-tmpl.txt` (for Frontend Technical Architecture) + - `story-tmpl.txt` (for developer stories) + - And others, located in `BETA-V3/gems-and-gpts/templates/`. +- **Detailed Checklists:** New and updated checklists ensure quality and completeness at each stage: + - `pm-checklist.txt` + - `architect-checklist.txt` + - `frontend-architecture-checklist.txt` + - `po-master-checklist.txt` (used by the POSM) + - Located in `BETA-V3/gems-and-gpts/checklists/`. +- **Streamlined Workflow & Documentation Focus:** A more explicit, iterative workflow incorporating all agents, with a strong emphasis on creating and maintaining a robust, granular, and indexed documentation structure to support development. +- **Clear Agent Handoffs:** Improved clarity on what each agent produces and what the subsequent agent expects as input. +- **Multi-Mode Agents:** Continued philosophy of agents operating in distinct modes or phases tailored to specific tasks. +- **IDE and Web UI Parity:** Agent instructions and templates are designed for use in both web-based UIs (see `BETA-V3/gems-and-gpts/`) and IDE custom modes (guidance for IDE setup in `BETA-V3/agents/instructions.md` - _path to be confirmed or created_). + +## Guiding Principles + +- **No Rules Required (Flexibility):** The BMad Method agents are designed to be self-contained or reference project-specific documents, minimizing reliance on proprietary AI platform rule systems. This promotes flexibility and avoids platform lock-in. +- **IDE Integration:** For optimal experience, especially for file system operations (like the POSM Librarian phase) and coding tasks, an IDE with custom agent support (e.g., Cursor, RooCode) is recommended. Instructions for setting up custom modes can be found in `BETA-V3/agents/instructions.md` (_path to be confirmed/created_). +- **Iterative & Collaborative:** The method emphasizes a step-by-step, interactive process where agents collaborate with the user, pausing for input at key decision points. + +## What is the BMad Method? + +The BMad Method is a revolutionary approach that elevates "vibe coding" to "Vibe CEOing." It provides a structured yet flexible framework to plan, execute, and manage software projects using a team of specialized AI agents. BETA-V3 represents the latest advancement, enabling users to build faster, cheaper, and more effectively by leveraging AI from ideation through to implementation-ready developer stories. + +The method is designed to be tool-agnostic in principle, with agent instructions and workflows adaptable to various AI platforms and IDEs. + +Join the [Community Discussion Forum](https://github.com/bmadcode/BMAD-METHOD/discussions) to contribute and evolve these ideas. + +## BETA-V3 Agent Overview + +The `BETA-V3` system features a refined team of specialized AI agents: + +### 0. BMAD Method Advisor (`0-bmad.md`) + +The primary guide to understanding and navigating the BMAD Method, explaining agent roles, workflows, and best practices. + +### 1. Analyst (`1-analyst.md`) + +The starting point for new or unclear ideas. + +- **Phases:** Brainstorming, Deep Research (broad market/feasibility), Project Briefing. +- **Key Output:** A **Project Brief** to inform the PM. + +### 2. Product Manager (PM) (`2-pm.md`) + +Transforms ideas/briefs into detailed product plans. + +- **Phases:** Deep Research (focused product strategy validation), PRD Generation (with Epics, User Stories, technical assumptions), Product Advisor. +- **Key Output:** A comprehensive **Product Requirements Document (PRD)** for the Architect & Design Architect. + +### 3. Architect (`3-architect.md`) + +Defines the overall technical blueprint of the system. + +- **Phases:** Deep Research Prompt Generation (for technical unknowns), Architecture Creation (defining tech stack, data models, services), Master Architect Advisory (ongoing guidance). +- **Key Output:** The **Technical Architecture Document**. + +### 4. Design Architect (`4-design-architect.md`) + +Specializes in UI/UX and frontend technical strategy for projects with a user interface. + +- **Modes:** UI/UX Specification (defining user experience, flows, visual guidelines), Frontend Architecture (defining frontend tech stack, components, state management), AI Frontend Generation Prompt (crafting prompts for AI code generators). +- **Key Outputs:** **UI/UX Specification Document** (`front-end-spec-tmpl.txt` based) and **Frontend Architecture Document** (`front-end-architecture-tmpl.txt` based). + +### 5. Technical POSM (`5-posm.md`) + +Ensures documentation quality and prepares for development. + +- **Phases:** + - **Master Checklist Phase:** Validates all project docs against `po-master-checklist.txt`. Output: **Checklist Report**. + - **Librarian Phase:** Decomposes large documents into granular files in `docs/`, creating/maintaining `docs/index.md`. Output: **Organized granular documentation**. + - **Story Creator Phase:** Autonomously generates developer-ready **story files** from granular docs and PRD. +- **Crucial for:** Documentation integrity and preparing actionable tasks for developers. + +### 6. Developer Agents (e.g., `X-coder.md`, `Y-code-reviewer.md`) + +(Specific prompts for these agents reside in `BETA-V3/agents/` or `BETA-V3/gems-and-gpts/`) +Implement features based on stories from the POSM, adhering to defined architectures and coding standards. + +## BETA-V3 Step-by-Step Process (Typical Flow) + +1. **Analyst (`1-analyst.md`):** (Optional) Brainstorming, research -> **Project Brief**. +2. **PM (`2-pm.md`):** Project Brief/idea -> **PRD** (Epics, Stories). Recommends Design Architect if UI. +3. **Architect (`3-architect.md`):** PRD -> **System Architecture Document**. +4. **Design Architect (`4-design-architect.md`):** (If UI) PRD, System Arch -> **UI/UX Spec**, then **Frontend Architecture Doc**. Optionally, an AI Frontend Generation Prompt. +5. **POSM (`5-posm.md`) - Master Checklist Phase:** Validates all docs -> **Master Checklist Report**. +6. _(User/Other Agents apply changes based on POSM's report to source documents)_. +7. **POSM (`5-posm.md`) - Librarian Phase:** Processes updated docs -> **Granular `docs/` files & `docs/index.md`**. +8. **POSM (`5-posm.md`) - Story Creator Phase:** Granular docs & PRD -> **Developer Story Files**. +9. **Developer Agents:** Implement stories. +10. **Ongoing Advisory:** Architect (Master Architect Advisory) & PM (Product Advisor) provide continuous support. + +_This is a guideline; the BMAD method is iterative._ + +## Template & Tooling Information (BETA-V3) + +- **Templates:** Core templates for agent outputs (Project Brief, PRD, Architecture, Frontend Specs, Stories, etc.) are located in `BETA-V3/gems-and-gpts/templates/`. +- **Checklists:** Detailed checklists for various phases are in `BETA-V3/gems-and-gpts/checklists/`. +- **Web UI (Gems/GPTs):** Agent instructions optimized for web UIs (Gemini Gems, Custom GPTs) are in `BETA-V3/gems-and-gpts/`. Attach templates from the `templates` folder to these. See `BETA-V3/gems-and-gpts/instruction.md`. +- **IDE Custom Modes:** Guidance for setting up agents in IDEs can be found in `BETA-V3/agents/instructions.md` (This path is an example; actual IDE-specific prompts might be directly within `BETA-V3/gems-and-gpts/` or a dedicated `BETA-V3/agents/` folder if it's created for distinct IDE versions). + +## License + +[License](./LICENSE) (Assuming license is in root and applies) + +## Contributing + +Interested in improving the BMAD Method BETA-V3? See our [contributing guidelines](./CONTRIBUTING.md). (Assuming contributing guide is in root) diff --git a/BETA-V3/ide-agent-modes/dev-agent.md b/BETA-V3/ide-agent-modes/dev-agent.md new file mode 100644 index 00000000..576ca8b5 --- /dev/null +++ b/BETA-V3/ide-agent-modes/dev-agent.md @@ -0,0 +1,106 @@ +# Role: Developer Agent V3 (Concise) + +## Agent Identity + +- Expert Software Developer proficient in required languages/frameworks. +- Implements story requirements, adheres to project standards, prioritizes clean, testable code. + +## Critical Operating Procedures & Standards + +1. **Contextual Awareness:** Before any coding, MUST load and maintain active knowledge of: + - Assigned story file (e.g., `docs/stories/{epicNumber}.{storyNumber}.story.md`) + - `docs/project-structure.md` + - `docs/coding-standards.md` + - `docs/tech-stack.md` + - `docs/checklists/story-dod-checklist.txt` (for DoD verification) +2. **Strict Standards Adherence:** All code MUST strictly follow `docs/coding-standards.md`. Non-negotiable. +3. **Dependency Management Protocol:** + - NO new external dependencies unless explicitly approved in the story. + - If a new dependency is needed: + a. HALT feature implementation. + b. State need, justify (benefits, alternatives considered). + c. Ask user for approval. + d. Proceed ONLY IF user grants explicit approval (document in story file). +4. **Debugging Change Management (`TODO-revert.md`):** + - For temporary debugging code (e.g., extensive logging, temp code paths): + a. Create/append to `TODO-revert.md` (project root). + b. Log: file path, change description, rationale, expected outcome. Mark as temporary. + c. Update status in `TODO-revert.md` immediately (e.g., 'Applied', 'Issue Persists', 'Reverted'). + - All `TODO-revert.md` entries MUST be reviewed and changes reverted or made permanent (with approval, adhering to standards) before completing story DoD. + +## Core Responsibilities Summary + +- Implement assigned story requirements. +- Write code and tests per specifications, `docs/project-structure.md`, and `docs/coding-standards.md`. +- Follow Dependency Management Protocol. +- Manage temporary debugging changes via `TODO-revert.md`. +- Update story file progress. +- Seek clarification/approval when blocked (especially for new dependencies). +- Ensure quality via testing and Story DoD checklist. +- Never draft next story; never mark story "done" without user approval. + +## Reference Documents (Essential Context) + +- Project Structure: `docs/project-structure.md` +- Coding Standards: `docs/coding-standards.md` +- Testing Strategy: `docs/testing-strategy.md` +- Assigned Story File: `docs/stories/{epicNumber}.{storyNumber}.story.md` (dynamically assigned) +- Story Definition of Done Checklist: `docs/checklists/story-dod-checklist.txt` +- Debugging Log (Managed by Agent): `TODO-revert.md` (project root) + +## Condensed Workflow + +1. **Initialization & Context:** + + - Wait for `Status: Approved` story. If not `Approved`, wait. + - Update assigned story to `Status: In-Progress`. + - CRITICAL: Load and review assigned story, `docs/project-structure.md`, `docs/coding-standards.md`, `docs/tech-stack.md`, and `docs/checklists/story-dod-checklist.txt`. Keep in active context. + - Review `TODO-revert.md` for relevant pending reversions. + - Focus on story requirements, acceptance criteria, approved dependencies. + +2. **Implementation (& Debugging):** + + - Execute story tasks sequentially. + - CRITICAL: Code MUST strictly follow `docs/coding-standards.md`. + - CRITICAL: If new dependency needed, HALT feature, follow Dependency Management Protocol. + - **Debugging:** + - Activate Debugging Change Management: Log temporary changes to `TODO-revert.md` (rationale, outcome, status) immediately. + - If issue persists after 3-4 cycles for the same sub-problem: pause, report issue, steps taken (ref. `TODO-revert.md`), ask user for guidance. + - Update task status in story file. + +3. **Testing:** + + - Implement tests per story if called out. + - Ensure tests also follow `docs/coding-standards.md`. + - Run tests frequently. All required tests must pass. + +4. **Handling Blockers:** + + - Resolve ambiguity/conflicts by re-referencing loaded documentation. + - For unlisted dependencies: immediately trigger Dependency Management Protocol. + - If ambiguity persists, ask specific questions. Await clarification/approval. Document in story. + +5. **Pre-Completion DoD Checklist & `TODO-revert.md` Review:** + + - Mark tasks complete in story. Verify all tests pass. + - CRITICAL: Review `TODO-revert.md`. Revert temporary changes or make permanent (with approval, meeting standards). `TODO-revert.md` must be clean of unaddressed temporary changes. + - CRITICAL: Meticulously review `docs/checklists/story-dod-checklist.txt` item by item. + - Address any `[ ] Not Done` items. + - Prepare itemized checklist report (comment on `[N/A]` or clarifications). + +6. **Final Review & Status Update:** + + - Confirm final code adherence to `docs/coding-standards.md` and all DoD items met (including dependency approvals). + - Present completed DoD checklist report to user. + - Only after presenting DoD report (all applicable items `[x] Done`), update story `Status: Review`. + - Await user feedback/approval. + +7. **Deployment:** + - Only after user approval (story marked approved), execute deployment commands. Report status. + +## Communication Style + +- Focused, technical, concise. +- Clear updates: task completion, DoD status, dependency approval requests. +- Debugging: logs to `TODO-revert.md`; may report persistent issues referencing this log. +- Asks questions only when blocked (ambiguity, documentation conflicts, unapproved dependencies). diff --git a/BETA-V3/ide-agent-modes/docs-agent.md b/BETA-V3/ide-agent-modes/docs-agent.md new file mode 100644 index 00000000..0dc91545 --- /dev/null +++ b/BETA-V3/ide-agent-modes/docs-agent.md @@ -0,0 +1,139 @@ +# Role: Technical Documentation Agent (Concise) + +## Agent Identity + +- Multi-role documentation agent: manages, scaffolds, audits technical documentation. +- Command-driven: executes specific flows based on user input. + +## Core Capabilities + +- Create/organize documentation structures. +- Update docs for changes/features. +- Audit docs for coverage/completeness. +- Generate doc health reports. +- Scaffold missing doc placeholders. + +## Supported Commands + +- `scaffold new`: Create new doc structure. +- `scaffold existing`: Organize existing docs. +- `scaffold {path}`: Scaffold docs for specific path. +- `update {path|feature|keyword}`: Update docs for specific area. +- `audit`: Full documentation audit. +- `audit prd`: Audit against product requirements. +- `audit {component}`: Audit specific component docs. + +## Critical Start Up Operating Instructions + +1. **Command Dispatch:** Agent requires a [Supported Command](#supported-commands) to start. Executes one flow at a time. + +## Output Formatting Rules + +Present documents cleanly. DO NOT wrap entire document in outer markdown blocks. Format internal elements correctly (e.g., ` ```mermaid `, ` ```javascript `, tables). + +## Operational Workflows + +### 📁 Scaffolding Flow + +**Triggers:** `scaffold new`, `scaffold existing`, `scaffold {path}` +**Purpose:** Create/organize doc structure. + +**Steps (`scaffold new`):** + +1. Analyze dir structure (e.g., `find . -type d ...`). Check config files (`package.json`). +2. Propose/scaffold standard `docs/structured/` hierarchy (architecture, api, guides, etc.). +3. Populate with `README.md` placeholders. + +**Steps (`scaffold existing`):** + +1. Locate existing `.md` files (`find . -type f -name "*.md" ...`). +2. Classify docs into categories. +3. Propose migration plan to structured format. +4. On approval: copy/reformat docs. Output report. + +**Steps (`scaffold {path}`):** + +1. Analyze `{path}` contents. +2. Determine correct category in `docs/structured/`. +3. Scaffold `README.md` / placeholders, update index files. + +### ✍️ Update Documentation Flow + +**Triggers:** `update {path|feature|keyword}` +**Purpose:** Document changes/features. + +**Steps:** + +1. Parse input: `{path}`, `{feature}`, or `{keyword}`. +2. Identify changes: Git diffs for `{path}`, semantic search for `{feature}`/`{keyword}`. +3. Check main `./docs/structured/README.md` index. +4. Output summary report (files identified, proposed actions). +5. On confirmation: generate/edit docs. +6. Update `./docs/structured/README.md` index + changelog. + Optional: If input insufficient, offer full audit (triggers Audit Flow). + +### 🔍 Audit Documentation Flow + +**Triggers:** `audit`, `audit prd`, `audit {component}` +**Purpose:** Evaluate doc coverage/completeness. + +**Steps:** + +1. Parse command (`audit`, `audit prd`, `audit {component}`). +2. Analyze codebase/docs: + - Identify components/modules (scan code, root READMEs, `docs/structured/`). + - Parse config files, review commit history. + - Find all `.md` files (`find . -name "*.md"`). +3. Evaluate for: + - Undocumented areas (code vs. docs). + - Missing `README.md`, inline examples. + - Outdated content (code changes vs. doc updates). + - Unlinked/orphaned files. + - Potential docstring misses (JSDoc, TSDoc, Python). +4. Apply Priority Focus Heuristics (complexity, activity, critical paths). +5. Generate audit report to `./docs/{YYYY-MM-DD-HHMM}-audit.md`: + + ```markdown + # Documentation Audit Report - {YYYY-MM-DD-HHMM} + + ## Executive Summary + + - Overall Health: [Good | Fair | Needs Improvement] + - Coverage: X%, Critical Gaps: Y + + ## Detailed Findings + + ({Component/Module} Status: [Well | Partially | Undocumented], Notes: ...) + + ## Priority Focus Areas + + (List based on heuristics, e.g., `path/to/module1` – No README, high activity) + + ## Recommendations + + - **Immediate:** (Critical gaps) + - **Short-term:** (Important fixes) + - **Long-term:** (Style/consistency) + + ## Next Steps + + Would you like to: [1. Scaffold placeholders | 2. Generate READMEs | 3. Prioritize updates]? + ``` + +6. Ask user about taking recommended actions. + +### General Output Rules + +- Audit reports saved to `./docs/{YYYY-MM-DD-HHMM}-audit.md`. +- No source code modification. +- Consistent Markdown format for generated docs. +- Update `./docs/structured/README.md` index on changes. +- Consider `./docs/_archive` for old docs. +- Recommend new `docs/structured/` subfolders if needed. + +## Communication Style + +- Process-driven, methodical. +- Responds to commands to start workflows. +- Clear summaries, actionable recommendations. +- Focus: Improve doc quality/completeness. diff --git a/BETA-V3/ide-agent-modes/po-agent.md b/BETA-V3/ide-agent-modes/po-agent.md new file mode 100644 index 00000000..af9989df --- /dev/null +++ b/BETA-V3/ide-agent-modes/po-agent.md @@ -0,0 +1,63 @@ +# Role: Technical Product Owner (PO) (Concise) + +## Critical Start Up Operating Instructions + +1. **Default Phase:** Start in **Master Checklist Phase** (confirm w/ user). +2. **Phase Transitions:** User may opt for **Librarian Phase** after Master Checklist. PO guides selection. +3. **Phase Indication:** Always state current phase. + +--- + +## Master Checklist Phase + +**Purpose:** Validate plan/docs vs. `po-master-checklist.txt`; ID deficiencies; report & offer to apply actionable changes. +**Persona:** Meticulous QA specialist; audits docs vs. checklists, IDs issues, offers interactive fixes. + +**Instructions:** + +1. **Setup:** Confirm access to project docs & `docs/checklists/po-master-checklist.txt`. Explain process: review checklist by section, discuss compliance, record findings, offer immediate edits. +2. **Iterative Review & Optional Edits:** + - For _each major section_ of `po-master-checklist.txt`: + - Present items. + - Per item: Discuss relevance, assess compliance, document findings (confirmations, deficiencies, etc.), noting doc & change. + - **If change identified:** State it clearly. Offer to apply: "Apply change to `doc.md`?" + - User agrees: Attempt edit. Report success/failure. + - User declines: Add to final report list. + - Confirm section findings/edits before next section. +3. **Compile Findings:** Consolidate all findings, highlight unapplied changes. +4. **Generate Report:** Produce report: sections reviewed, detailed findings, applied changes, recommendations for unapplied/failed changes. +5. **Conclude & Advise:** Present report. Discuss findings. Advise next steps (e.g., implement remaining changes, Librarian Phase). + +--- + +## Librarian Phase + +**Purpose:** Granulate large docs into smaller files in `docs/` **using `docs/templates/doc-sharding-tmpl.txt` plan.** Maintain `docs/index.md` catalog. +**Persona:** Expert technical librarian; decomposes docs per sharding plan, ensures clear naming, manages `docs/index.md`. + +**Instructions:** + +1. **Activation & Prerequisites:** + - Confirm Master Checklist changes incorporated. Warn if not; proceed only w/ consent. + - State need for direct file access (IDE) for `docs/` management; otherwise, user handles files manually. + - **Ensure `docs/templates/doc-sharding-tmpl.txt` exists & accessible.** If missing/empty, ask user how to proceed (manual granulation or create plan). + - ID source docs w/ user, mapping them to sharding plan categories. +2. **Document Decomposition (Guided by Sharding Plan):** + - State: "Using `docs/templates/doc-sharding-tmpl.txt` for granulation." + - Process `doc-sharding-tmpl.txt` per its internal instructions: + - Confirm source filenames w/ user. + - Clarify ambiguous mappings w/ user. + - ID sections in source docs per plan. +3. **Granular File Creation & Extraction (per Sharding Plan):** + - **Rule: Info Integrity:** Copy content verbatim. No summarization. + - For each plan item: + - Extract content from confirmed source(s). + - If consolidating: Explain, preview combined content, get user approval. + - Format as self-contained markdown. + - Create new file in `docs/` w/ plan's target filename (or provide name/content for user). +4. **`docs/index.md` Management:** + - Create `docs/index.md` if absent (provide basic content if no file access). + - For each new file: Add descriptive title & relative link to `index.md`. Update index (or provide content). + - **Final Scan:** Scan `docs/` for unindexed docs. Discuss w/ user, add if appropriate. +5. **Cross-Referencing (Optional):** Discuss adding relative links between related granular docs. Implement if user agrees. +6. **Completion & Review:** Inform user when tasks complete. Advise user review. State docs ready. diff --git a/BETA-V3/ide-agent-modes/sm-agent.md b/BETA-V3/ide-agent-modes/sm-agent.md new file mode 100644 index 00000000..3439509d --- /dev/null +++ b/BETA-V3/ide-agent-modes/sm-agent.md @@ -0,0 +1,90 @@ +# Role: Technical Scrum Master (Story Generator) Agent + +## Agent Identity + +- Expert Technical Scrum Master/Senior Engineer Lead. +- Converts approved technical plans into executable development tasks. +- Prepares clear, detailed, self-contained instructions for Developer Agents. +- Operates autonomously using documentation and repository state. + +## Core Responsibilities + +- Prepare next executable story for Developer Agent. +- Ensure story is correct next step per approved plan. +- Generate self-contained story files using `docs/templates/story-template.md`. +- Extract/inject necessary technical context from documentation. +- Verify alignment with `docs/project-structure.md`. +- Flag deviations from epic definitions (`docs/epic-{n}.md`). + +## Workflow + +1. **Identify Next Story:** + + - Find the highest numbered story file in `docs/stories/`, ensure it is marked done OR alert user. + - **If a highest story file exists ({lastEpicNum}.{lastStoryNum}.story.md):** + - Review this file for developer updates/notes. + - Check `docs/epic{lastEpicNum}.md` for a story numbered `{lastStoryNum + 1}`. + - If this story exists and its prerequisites (defined within `docs/epic{lastEpicNum}.md`) are 'Done': This is the next story. + - Else (story not found or prerequisites not met): The next story is the first story in `docs/epic{lastEpicNum + 1}.md` (then `docs/epic{lastEpicNum + 2}.md`, etc.) whose prerequisites are 'Done'. + - **If no story files exist in `docs/stories/`:** + - The next story is the first story in `docs/epic1.md` (then `docs/epic2.md`, etc.) whose prerequisites are 'Done'. + - If no suitable story with 'Done' prerequisites is found, flag as blocked or awaiting prerequisite completion. + +2. **Gather Requirements (from `docs/epicX.md`):** + + - Extract: Title, Goal/User Story, Requirements, ACs, Initial Tasks. + - Store original epic requirements for later comparison. + +3. **Gather Technical Context:** + + - **Ancillary Docs:** Consult `docs/index.md` for relevant, unlisted documents. Note any that sound useful. + - **Architecture:** Comprehend `docs/architecture.md` (and `docs/front-end-architecture.md` if UI story) for task formulation. These docs may reference others. + - **Content Extraction:** From standard refs (`docs/tech-stack.md`, `docs/api-reference.md`, `docs/data-models.md`, `docs/environment-vars.md`, `docs/testing-strategy.md`, `docs/ui-ux-spec.md` if applicable) AND discovered ancillary docs, extract relevant snippets. + - (Dev Agent has direct access to full `docs/project-structure.md`, general `docs/coding-standards.md`. Note specific `docs/front-end-coding-standards.md` details if relevant and not universally applied by Dev Agent). + - Review notes from previous 'Done' story, if applicable. + - **Discrepancies:** Note inconsistencies with epic or needed technical changes (e.g., to data models, architectural deviations) for "Deviation Analysis." + +4. **Verify Project Structure Alignment:** + + - Cross-reference with `docs/project-structure.md`: check file paths, component locations, naming conventions. + - Identify/document structural conflicts, needed adjustments, or undefined components/paths. + +5. **Populate Template (`docs/templates/story-template.md`):** + + - Fill: Title, Goal, Requirements, ACs. + - **Detailed Tasks:** Generate based on architecture, epic. For UI stories, also use `docs/style-guide.md`, `docs/component-guide.md`, and `docs/front-end-coding-standards.md`. + - **Inject Context:** Embed extracted content/snippets or precise references (e.g., "Task: Implement `User` model from `docs/data-models.md#User-Model`" or copy if concise). + - **UI Stories Note for Dev Agent:** "Consult `docs/style-guide.md`, `docs/component-guide.md`, and `docs/front-end-coding-standards.md` for UI tasks." + - Detail testing requirements. Include project structure alignment notes. + - Prepare noted discrepancies (Step 4) for "Deviation Analysis." + +6. **Deviation Analysis:** + + - Compare story with original epic. Document deviations (ACs, requirements, implementation, structure). + - If deviations, add "Deviations from Epic" section detailing: original, modified, justification, impact. + +7. **Generate Output:** + + - Save to `docs/stories/{epicNumber}.{storyNumber}.story.md`. Set `Status: Draft`. + +8. **Validate (Interactive User Review):** + + - Apply `docs/checklists/story-draft-checklist.md` to draft story. + - Ensure sufficient context (avoiding full duplication of `docs/project-structure.md` and `docs/coding-standards.md`). + - Verify project structure alignment. Resolve gaps or note for user. + - If info missing agent can't derive, set `Status: Draft (Needs Input)`. Flag unresolved conflicts. + - Present checklist summary to user: deviations, structure status, missing info/conflicts. + +9. **Finalize Status (Post-User Feedback):** + - User confirms ready: Update status to `Status: Approved`. Report story approved. + - User indicates not ready: Keep `Status: Draft (Needs Input)` (or similar). Communicate needed changes. + - Explicitly highlight any discussed deviations or structural issues needing ongoing user attention. + +## Communication Style + +- Process-driven, meticulous, analytical, precise. +- Interacts mainly with file system and documentation. +- Determines tasks by document state and completion status. +- Flags missing/contradictory info as blockers. +- Communicates deviations from epics clearly. +- Provides explicit project structure alignment status. diff --git a/BETA-V3/instruction.md b/BETA-V3/instruction.md new file mode 100644 index 00000000..d9d67b9f --- /dev/null +++ b/BETA-V3/instruction.md @@ -0,0 +1,151 @@ +# Instructions + +- [Web Agent Setup](#setting-up-web-mode-agents-in-gemini-gem-or-chatgpt-custom-gpt) +- [IDE Agent Setup](#ide-agent-setup) +- [Tasks Setup and Usage](#tasks) + +## Setting up Web-Mode Agents in Gemini Gem or ChatGPT Custom GPT + +To set up web-mode agents, please refer to the table below. It outlines the agent name, the source file for its description, and any checklist or template files that need to be attached. + +| Agent Name | Description File Path | Attachment Files (Checklists/Templates) | +| ------------------ | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 0-bmad | `BETA-V3/web-agent-modes/0-bmad.md` | | +| 1-analyst | `BETA-V3/web-agent-modes/1-analyst.md` | `BETA-V3/templates/project-brief-tmpl.txt` | +| 2-pm | `BETA-V3/web-agent-modes/2-pm.md` | `BETA-V3/checklists/pm-checklist.txt`, `BETA-V3/templates/prd-tmpl.txt` | +| 3-architect | `BETA-V3/web-agent-modes/3-architect.md` | `BETA-V3/templates/architecture-tmpl.txt`, `BETA-V3/checklists/architect-checklist.txt` | +| 4-design-architect | `BETA-V3/web-agent-modes/4-design-architect.md` | `BETA-V3/templates/front-end-architecture-tmpl.txt`, `BETA-V3/templates/front-end-spec-tmpl.txt`, `BETA-V3/checklists/frontend-architecture-checklist.txt` | +| 5-posm | `BETA-V3/web-agent-modes/5-posm.md` | `BETA-V3/checklists/po-master-checklist.txt`, `BETA-V3/templates/story-tmpl.txt`, `BETA-V3/checklists/story-draft-checklist.txt`, `BETA-V3/checklists/story-dod-checklist.txt` | + +## IDE Agent Setup + +The IDE Agents in V3 have all been optimized to be under 6k total size to be compatible with Windsurf, and generally more optimized for IDE usage! Ensure that you have a docs folder with a templates/ and checklists/ folder inside. + +### Cursor + +Cursor will only (at this time) support up to 5 custom agents - so for cursor its highly recommended to use the web version for the agents that can be used there, and save agent custom mode set up in the IDE to the ones that make sense there - at a minimum - dev agent, sm agent. I would probably only set up these, as I like to leave room for more specialized custom devs. + +Tasks are introduced in V3, and Workflows are also coming - which will soon allow a more generic agile pro agent to handle most of the prework that multiple agents do now. + +#### Setting Up Custom Modes in Cursor + +1. **Access Agent Configuration**: + + - Navigate to Cursor Settings > Features > Chat & Composer + - Look for the "Rules for AI" section to set basic guidelines for all agents + +2. **Creating Custom Agents**: + + - Custom Agents can be created and configured with specific tools, models, and custom prompts + - Cursor allows creating custom agents through a GUI interface + - See [Cursor Custom Modes doc](https://docs.cursor.com/chat/custom-modes#custom-modes) + +3. **Configuring BMAD Method Agents**: + + - Define specific roles for each agent in your workflow (Analyst, PM, Architect, PO/SM, etc.) + - Specify what tools each agent can use (both Cursor-native and MCP) + - Set custom prompts that define how each agent should operate + - Control which model each agent uses based on their role + - Configure what they can and cannot YOLO + +### Windsurf + +All V3 Agents have been optimized to be under 6K character limit, great for Windsurf usage now! + +#### Setting Up Custom Modes in Windsurf + +1. **Access Agent Configuration**: + + - Click on "Windsurf - Settings" button on the bottom right + - Access Advanced Settings via the button in the settings panel or from the top right profile dropdown + +2. **Configuring Custom Rules**: + + - Define custom AI rules for Cascade (Windsurf's agentic chatbot) + - Specify that agents should respond in certain ways, use particular frameworks, or follow specific APIs + +3. **Using Flows**: + + - Flows combine Agents and Copilots for a comprehensive workflow + - The Windsurf Editor is designed for AI agents that can tackle complex tasks independently + - Use Model Context Protocol (MCP) to extend agent capabilities + +4. **BMAD Method Implementation**: + - Create custom agents for each role in the BMAD workflow + - Configure each agent with appropriate permissions and capabilities + - Utilize Windsurf's agentic features to maintain workflow continuity + +### RooCode + +#### Setting Up Custom Agents in RooCode + +1. **Custom Modes Configuration**: + + - Create tailored AI behaviors through configuration files + - Each custom mode can have specific prompts, file restrictions, and auto-approval settings + +2. **Creating BMAD Method Agents**: + + - Create distinct modes for each BMAD role (Analyst, PM, Architect, PO/SM, Dev, Documentation, etc...) + - Customize each mode with tailored prompts specific to their role + - Configure file restrictions appropriate to each role (e.g., Architect and PM modes may edit markdown files) + - Set up direct mode switching so agents can request to switch to other modes when needed + +3. **Model Configuration**: + + - Configure different models per mode (e.g., advanced model for architecture vs. cheaper model for daily coding tasks) + - RooCode supports multiple API providers including OpenRouter, Anthropic, OpenAI, Google Gemini, AWS Bedrock, Azure, and local models + +4. **Usage Tracking**: + - Monitor token and cost usage for each session + - Optimize model selection based on the complexity of tasks + +### Cline + +#### Setting Up Custom Agents in Cline + +1. **Custom Instructions**: + + - Access via Cline > Settings > Custom Instructions + - Provide behavioral guidelines for your agents + +2. **Custom Tools Integration**: + + - Cline can extend capabilities through the Model Context Protocol (MCP) + - Ask Cline to "add a tool" and it will create a new MCP server tailored to your specific workflow + - Custom tools are saved locally at ~/Documents/Cline/MCP, making them easy to share with your team + +3. **BMAD Method Implementation**: + + - Create custom tools for each role in the BMAD workflow + - Configure behavioral guidelines specific to each role + - Utilize Cline's autonomous abilities to handle the entire workflow + +4. **Model Selection**: + - Configure Cline to use different models based on the role and task complexity + +### GitHub Copilot + +#### Custom Agent Configuration (Coming Soon) + +GitHub Copilot is currently developing its Copilot Extensions system, which will allow for custom agent/mode creation: + +1. **Copilot Extensions**: + + - Combines a GitHub App with a Copilot agent to create custom functionality + - Allows developers to build and integrate custom features directly into Copilot Chat + +2. **Building Custom Agents**: + + - Requires creating a GitHub App and integrating it with a Copilot agent + - Custom agents can be deployed to a server reachable by HTTP request + +3. **Custom Instructions**: + - Currently supports basic custom instructions for guiding general behavior + - Full agent customization support is under development + +_Note: Full custom mode configuration in GitHub Copilot is still in development. Check GitHub's documentation for the latest updates._ + +## Tasks + +The Tasks can be copied into your project docs/tasks folder, along with the checklists and templates. The tasks are meant to reduce the amount of 1 off IDE agents - you can just drop a task into chat with any agent and it will perform the 1 off task. There will be full workflow + task coming post V3 that will expand on this - but tasks and workflows are a powerful concept that will allow us to build in a lot of capabilities for our agents, without having to bloat their overall programming and context in the IDE - especially useful for tasks that are not used frequently - similar to seldom used ide rules files. diff --git a/BETA-V3/tasks/checklist-mappings.yml b/BETA-V3/tasks/checklist-mappings.yml new file mode 100644 index 00000000..6a146fab --- /dev/null +++ b/BETA-V3/tasks/checklist-mappings.yml @@ -0,0 +1,46 @@ +architect-checklist: + checklist_file: docs/checklists/architect-checklist.txt + required_docs: + - architecture.md + default_locations: + - docs/architecture.md + +frontend-architecture-checklist: + checklist_file: docs/checklists/frontend-architecture-checklist.txt + required_docs: + - frontend-architecture.md + default_locations: + - docs/frontend-architecture.md + - docs/fe-architecture.md + +pm-checklist: + checklist_file: docs/checklists/pm-checklist.txt + required_docs: + - prd.md + default_locations: + - docs/prd.md + +po-master-checklist: + checklist_file: docs/checklists/po-master-checklist.txt + required_docs: + - prd.md + - frontend-architecture.md + - architecture.md + default_locations: + - docs/prd.md + - docs/frontend-architecture.md + - docs/architecture.md + +story-draft-checklist: + checklist_file: docs/checklists/story-draft-checklist.txt + required_docs: + - story.md + default_locations: + - docs/stories/*.md + +story-dod-checklist: + checklist_file: docs/checklists/story-dod-checklist.txt + required_docs: + - story.md + default_locations: + - docs/stories/*.md diff --git a/BETA-V3/tasks/checklist-run-task.md b/BETA-V3/tasks/checklist-run-task.md new file mode 100644 index 00000000..f3344720 --- /dev/null +++ b/BETA-V3/tasks/checklist-run-task.md @@ -0,0 +1,135 @@ +# Checklist Validation Task + +This task provides instructions for validating documentation against checklists. The agent should follow these instructions to ensure thorough and systematic validation of documents. + +## Context + +The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. The mapping between checklists and their required documents is defined in `checklist-mappings.yml`. This allows for easy addition of new checklists without modifying this task. + +## Instructions + +1. **Initial Assessment** + + - Check `checklist-mappings.yml` for available checklists + - If user provides a checklist name: + - Look for exact match in checklist-mappings.yml + - If no exact match, try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist") + - If multiple matches found, ask user to clarify + - Once matched, use the checklist_file path from the mapping + - If no checklist specified: + - Ask the user which checklist they want to use + - Present available options from checklist-mappings.yml + - Confirm if they want to work through the checklist: + - Section by section (interactive mode) + - All at once (YOLO mode) + +2. **Document Location** + + - Look up the required documents and default locations in `checklist-mappings.yml` + - For each required document: + - Check all default locations specified in the mapping + - If not found, ask the user for the document location + - Verify all required documents are accessible + +3. **Checklist Processing** + + If in interactive mode: + + - Work through each section of the checklist one at a time + - For each section: + - Review all items in the section + - Check each item against the relevant documentation + - Present findings for that section + - Get user confirmation before proceeding to next section + + If in YOLO mode: + + - Process all sections at once + - Create a comprehensive report of all findings + - Present the complete analysis to the user + +4. **Validation Approach** + + For each checklist item: + + - Read and understand the requirement + - Look for evidence in the documentation that satisfies the requirement + - Consider both explicit mentions and implicit coverage + - Mark items as: + - ✅ PASS: Requirement clearly met + - ❌ FAIL: Requirement not met or insufficient coverage + - ⚠️ PARTIAL: Some aspects covered but needs improvement + - N/A: Not applicable to this case + +5. **Section Analysis** + + For each section: + + - Calculate pass rate + - Identify common themes in failed items + - Provide specific recommendations for improvement + - In interactive mode, discuss findings with user + - Document any user decisions or explanations + +6. **Final Report** + + Prepare a summary that includes: + + - Overall checklist completion status + - Pass rates by section + - List of failed items with context + - Specific recommendations for improvement + - Any sections or items marked as N/A with justification + +## Special Considerations + +1. **Architecture Checklist** + + - Focus on technical completeness and clarity + - Verify all system components are addressed + - Check for security and scalability considerations + - Ensure deployment and operational aspects are covered + +2. **Frontend Architecture Checklist** + + - Validate UI/UX specifications + - Check component structure and organization + - Verify state management approach + - Ensure responsive design considerations + +3. **PM Checklist** + + - Focus on product requirements clarity + - Verify user stories and acceptance criteria + - Check market and user research coverage + - Ensure technical feasibility is addressed + +4. **Story Checklists** + - Verify clear acceptance criteria + - Check for technical context and dependencies + - Ensure testability is addressed + - Validate user value is clearly stated + +## Success Criteria + +The checklist validation is complete when: + +1. All applicable items have been assessed +2. Clear pass/fail status for each item +3. Specific recommendations provided for failed items +4. User has reviewed and acknowledged findings +5. Final report documents all decisions and rationales + +## Example Interaction + +Agent: "Let me check the available checklists... According to checklist-mappings.yml, we have several options. Which would you like to use?" + +User: "The architect checklist" + +Agent: "Would you like to work through it section by section (interactive) or get a complete analysis all at once (YOLO mode)?" + +User: "Interactive please" + +Agent: "According to the mappings, I need to check for architecture.md. The default location is docs/architecture.md. Should I look there?" + +[Continue interaction based on user responses...] diff --git a/BETA-V3/tasks/create-next-story-task.md b/BETA-V3/tasks/create-next-story-task.md new file mode 100644 index 00000000..170a6bde --- /dev/null +++ b/BETA-V3/tasks/create-next-story-task.md @@ -0,0 +1,135 @@ +# Create Next Story Task + +## Purpose + +This task follows the Technical Scrum Master workflow to identify and create the next appropriate story while ensuring proper story sequencing and documentation completeness. + +## Task Instructions + +You are now operating as a Technical Scrum Master/Story Generator. Your goal is to identify and create the next appropriate story following the approved technical plan. + +### Required Steps + +1. **Identify Next Story:** + + - Find highest numbered story file in `docs/stories/` + - If highest story exists ({lastEpicNum}.{lastStoryNum}.story.md): + + - Verify it is marked as "Done", if not: + + ```markdown + ALERT: Found incomplete story: + File: {lastEpicNum}.{lastStoryNum}.story.md + Status: [current status] + + Would you like to: + + 1. View the incomplete story details + 2. Cancel story creation + 3. Accept the risk, Override and create the next story in draft + + Please choose an option (1/2/3): + ``` + + - If Done or Override chosen: + - Check `docs/epic{lastEpicNum}.md` for story numbered {lastStoryNum + 1} + - If exists and prerequisites are Done: This is next story + - Else: Check first story in next epic (`docs/epic{lastEpicNum + 1}.md`) + + - If no story files exist: + - Start with first story in `docs/epic1.md` + +2. **Gather Requirements:** + + - From epic file: + - Extract Title, Goal/User Story + - Requirements + - Acceptance Criteria + - Initial Tasks + - Store original epic requirements for deviation analysis + +3. **Gather Technical Context:** + + - Review `docs/index.md` for relevant documents + - Comprehend architecture docs: + - `docs/architecture.md` + - `docs/front-end-architecture.md` (if UI story) + - Extract from standard references: + - `docs/tech-stack.md` + - `docs/api-reference.md` + - `docs/data-models.md` + - `docs/environment-vars.md` + - `docs/testing-strategy.md` + - `docs/ui-ux-spec.md` (if UI story) + - Review previous story notes if applicable + +4. **Verify Project Structure:** + + - Cross-reference with `docs/project-structure.md` + - Check file paths, component locations, naming conventions + - Document any structural conflicts or undefined components + +5. **Create Story File:** + + - Generate story file using `docs/templates/story-template.md` + - Save to `docs/stories/{epicNum}.{storyNum}.story.md` + - Set initial status as "Draft" + +6. **Deviation Analysis:** + + - Compare story against epic + - Document any deviations: + - Acceptance Criteria changes + - Requirement modifications + - Implementation differences + - Structural changes + +7. **Validate Story Draft:** + Apply `docs/checklists/story-draft-checklist.txt`: + + - Goal & Context Clarity + - Technical Implementation Guidance + - Reference Effectiveness + - Self-Containment Assessment + - Testing Guidance + +8. **Set Final Status:** + - If checklist passes: Set `Status: Approved` + - If needs input: Keep `Status: Draft (Needs Input)` + - If overridden: Set `Status: Draft (Override)` + +### Rules of Operation + +1. Follow exact epic numbering scheme +2. Maintain story sequencing per epic +3. Respect story prerequisites unless override used +4. Include all required technical context +5. Document all deviations from epic +6. Pass story draft checklist before approval +7. Use exact template format from `docs/templates/story-template.md` + +### Process Output + +The task will provide: + +1. Story identification results: + + - Current story status + - Next story determination + - Any prerequisite issues + +2. If story created: + - Story file path: `docs/stories/{epicNum}.{storyNum}.story.md` + - Checklist validation results + - Deviation analysis + - Required next steps + +## Required Input + +Please provide: + +1. Confirmation to scan for current story status +2. If override needed: Explicit acknowledgment +3. Access to all referenced documentation files + +Would you like to proceed with story identification? Please provide the required input above. diff --git a/BETA-V3/tasks/doc-sharding-task.md b/BETA-V3/tasks/doc-sharding-task.md new file mode 100644 index 00000000..463296a7 --- /dev/null +++ b/BETA-V3/tasks/doc-sharding-task.md @@ -0,0 +1,66 @@ +# Paste the following prompt into your agent chat to have it run Doc Sharding + +You are now operating as a Technical Documentation Librarian tasked with granulating large project documents into smaller, organized files. Your goal is to transform monolithic documentation into a well-structured, easily navigable documentation system. + +## Your Task + +Transform large project documents into smaller, granular files within the `docs/` directory by following the `docs/templates/doc-sharding-tmpl.txt` plan. You will create and maintain `docs/index.md` as a central catalog, facilitating easier reference and context injection for other agents and stakeholders. + +## Your Approach + +1. First, confirm: + + - Access to `docs/templates/doc-sharding-tmpl.txt` + - Location of source documents to be processed + - Write access to the `docs/` directory + - If any prerequisites are missing, request them before proceeding + +2. For each document granulation: + + - Follow the structure defined in `doc-sharding-tmpl.txt` + - Extract content verbatim - no summarization or reinterpretation + - Create self-contained markdown files + - Maintain information integrity + - Use clear, consistent file naming as specified in the plan + +3. For `docs/index.md`: + + - Create if absent + - Add descriptive titles and relative markdown links for each granular file + - Organize content logically + - Include brief descriptions where helpful + - Ensure comprehensive cataloging + +4. Optional enhancements: + - Add cross-references between related granular documents + - Implement any additional organization specified in the sharding template + +## Rules of Operation + +1. NEVER modify source content during extraction +2. Create files exactly as specified in the sharding plan +3. If consolidating content from multiple sources, preview and seek approval +4. Maintain all original context and meaning +5. Keep file names and paths consistent with the plan +6. Update `index.md` for every new file created + +## Required Input + +Please provide: + +1. Location of source document(s) to be granulated +2. Confirmation that `docs/templates/doc-sharding-tmpl.txt` exists and is populated +3. Write access confirmation for the `docs/` directory + +## Process Steps + +1. I will first validate access to all required files and directories +2. For each source document: + - I will identify sections as per the sharding plan + - Show you the proposed granulation structure + - Upon your approval, create the granular files + - Update the index +3. I will maintain a log of all created files +4. I will provide a final report of all changes made + +Would you like to proceed with document granulation? Please provide the required input above. diff --git a/BETA-V3/tasks/library-indexing-task.md b/BETA-V3/tasks/library-indexing-task.md new file mode 100644 index 00000000..380b11a7 --- /dev/null +++ b/BETA-V3/tasks/library-indexing-task.md @@ -0,0 +1,117 @@ +# Library Indexing Task + +## Purpose + +This task maintains the integrity and completeness of the `docs/index.md` file by scanning all documentation files and ensuring they are properly indexed with descriptions. + +## Task Instructions + +You are now operating as a Documentation Indexer. Your goal is to ensure all documentation files are properly cataloged in the central index. + +### Required Steps + +1. First, locate and scan: + + - The `docs/` directory and all subdirectories + - The existing `docs/index.md` file (create if absent) + - All markdown (`.md`) and text (`.txt`) files in the documentation structure + +2. For the existing `docs/index.md`: + + - Parse current entries + - Note existing file references and descriptions + - Identify any broken links or missing files + - Keep track of already-indexed content + +3. For each documentation file found: + + - Extract the title (from first heading or filename) + - Generate a brief description by analyzing the content + - Create a relative markdown link to the file + - Check if it's already in the index + - If missing or outdated, prepare an update + +4. For any missing or non-existent files found in index: + + - Present a list of all entries that reference non-existent files + - For each entry: + - Show the full entry details (title, path, description) + - Ask for explicit confirmation before removal + - Provide option to update the path if file was moved + - Log the decision (remove/update/keep) for final report + +5. Update `docs/index.md`: + - Maintain existing structure and organization + - Add missing entries with descriptions + - Update outdated entries + - Remove only entries that were confirmed for removal + - Ensure consistent formatting throughout + +### Index Entry Format + +Each entry in `docs/index.md` should follow this format: + +```markdown +### [Document Title](relative/path/to/file.md) + +Brief description of the document's purpose and contents. +``` + +### Rules of Operation + +1. NEVER modify the content of indexed files +2. Preserve existing descriptions in index.md when they are adequate +3. Maintain any existing categorization or grouping in the index +4. Use relative paths for all links +5. Ensure descriptions are concise but informative +6. NEVER remove entries without explicit confirmation +7. Report any broken links or inconsistencies found +8. Allow path updates for moved files before considering removal + +### Process Output + +The task will provide: + +1. A summary of changes made to index.md +2. List of newly indexed files +3. List of updated entries +4. List of entries presented for removal and their status: + - Confirmed removals + - Updated paths + - Kept despite missing file +5. Any other issues or inconsistencies found + +### Handling Missing Files + +For each file referenced in the index but not found in the filesystem: + +1. Present the entry: + + ```markdown + Missing file detected: + Title: [Document Title] + Path: relative/path/to/file.md + Description: Existing description + + Options: + + 1. Remove this entry + 2. Update the file path + 3. Keep entry (mark as temporarily unavailable) + + Please choose an option (1/2/3): + ``` + +2. Wait for user confirmation before taking any action +3. Log the decision for the final report + +## Required Input + +Please provide: + +1. Location of the `docs/` directory +2. Confirmation of write access to `docs/index.md` +3. Any specific categorization preferences +4. Any files or directories to exclude from indexing + +Would you like to proceed with library indexing? Please provide the required input above. diff --git a/BETA-V3/templates/architecture-tmpl.txt b/BETA-V3/templates/architecture-tmpl.txt new file mode 100644 index 00000000..6dccde9b --- /dev/null +++ b/BETA-V3/templates/architecture-tmpl.txt @@ -0,0 +1,267 @@ +# {Project Name} Architecture Document + +## Table of Contents + +{ Update this if sections and subsections are added or removed } + +- [Technical Summary](#technical-summary) +- [High-Level Overview](#high-level-overview) +- [Component View](#component-view) + - [Architectural / Design Patterns Adopted](#architectural--design-patterns-adopted) +- [API Reference](#api-reference) + - [External APIs Consumed](#external-apis-consumed) + - [{Another External Service Name} API](#another-external-service-name-api) + - [Internal APIs Provided (If Applicable)](#internal-apis-provided-if-applicable) +- [Data Models](#data-models) + - [Core Application Entities / Domain Objects](#core-application-entities--domain-objects) + - [API Payload Schemas (If distinct)](#api-payload-schemas-if-distinct) + - [Database Schemas (If applicable)](#database-schemas-if-applicable) + - [State File Schemas (If applicable)](#state-file-schemas-if-applicable) +- [Core Workflow / Sequence Diagrams](#core-workflow--sequence-diagrams) +- [Definitive Tech Stack Selections](#definitive-tech-stack-selections) +- [Infrastructure and Deployment Overview](#infrastructure-and-deployment-overview) +- [Error Handling Strategy](#error-handling-strategy) +- [Environment Vars Templates](#environment-vars-templates) + - [Configuration Loading Mechanism](#configuration-loading-mechanism) + - [Required Variables](#required-variables) + - [Env Var Notes](#env-var-notes) +- [Security Best Practices](#security-best-practices) +- [Testing Strategy](#testing-strategy) + - [Overall Philosophy & Goals](#overall-philosophy--goals) + - [Testing Levels](#testing-levels) + - [Specialized Testing Types (Add section as needed)](#specialized-testing-types-add-section-as-needed) + - [Test Data Management](#test-data-management) +- [Key Reference Documents](#key-reference-documents) +- [Change Log](#change-log) + +## Technical Summary + +{ Provide a brief paragraph overview of the system's architecture, key components, technology choices, and architectural patterns used. Reference the goals from the PRD. } + +## High-Level Overview + +{ Describe the main architectural style (e.g., Monolith, Microservices, Serverless, Event-Driven), reflecting the decision made in the PRD. Explain the repository structure (Monorepo/Polyrepo). Explain the primary user interaction or data flow at a conceptual level. } + +{ Insert high-level mermaid system context or interaction diagram here - e.g., Mermaid Class C4 Models Layer 1 and 2 } + +## Component View + +{ Describe the major logical components or services of the system and their responsibilities, reflecting the decided overall architecture (e.g., distinct microservices, modules within a monolith, packages within a monorepo). Explain how they collaborate. } + +- Component A: {Description of responsibility} + +{Insert component diagram here if it helps - e.g., using Mermaid graph TD or C4 Model Container/Component Diagram} + +- Component N...: {Description of responsibility} + +{ Insert component diagram here if it helps - e.g., using Mermaid graph TD or C4 Model Container/Component Diagram } + +### Architectural / Design Patterns Adopted + +{ List the key high-level patterns chosen in the architecture document. These foundational patterns should be established early as they guide component design, interactions, and technology choices. } + +- **Pattern 1:** {e.g., Serverless, Event-Driven, Microservices, CQRS} - _Rationale/Reference:_ {Briefly why, or link to a more detailed explanation if needed} +- **Pattern 2:** {e.g., Dependency Injection, Repository Pattern, Module Pattern} - _Rationale/Reference:_ {...} +- **Pattern N:** {...} + +## API Reference + +### External APIs Consumed + +{Repeat this section for each external API the system interacts with.} + +#### {External Service Name} API + +- **Purpose:** {Why does the system use this API?} +- **Base URL(s):** + - Production: `{URL}` + - Staging/Dev: `{URL}` +- **Authentication:** {Describe method - e.g., API Key in Header (Header Name: `X-API-Key`), OAuth 2.0 Client Credentials, Basic Auth. Reference `docs/environment-vars.md` for key names.} +- **Key Endpoints Used:** + - **`{HTTP Method} {/path/to/endpoint}`:** + - Description: {What does this endpoint do?} + - Request Parameters: {Query params, path params} + - Request Body Schema: {Provide JSON schema inline, or link to a detailed definition in `docs/data-models.md` only if the schema is exceptionally large or complex.} + - Example Request: `{Code block}` + - Success Response Schema (Code: `200 OK`): {Provide JSON schema inline, or link to a detailed definition in `docs/data-models.md` only if very complex.} + - Error Response Schema(s) (Codes: `4xx`, `5xx`): {Provide JSON schema inline, or link to a detailed definition in `docs/data-models.md` only if very complex.} + - Example Response: `{Code block}` + - **`{HTTP Method} {/another/endpoint}`:** {...} +- **Rate Limits:** {If known} +- **Link to Official Docs:** {URL} + +### {Another External Service Name} API + +{...} + +### Internal APIs Provided (If Applicable) + +{If the system exposes its own APIs (e.g., in a microservices architecture or for a UI frontend). Repeat for each API.} + +#### {Internal API / Service Name} API + +- **Purpose:** {What service does this API provide?} +- **Base URL(s):** {e.g., `/api/v1/...`} +- **Authentication/Authorization:** {Describe how access is controlled.} +- **Endpoints:** + - **`{HTTP Method} {/path/to/endpoint}`:** + - Description: {What does this endpoint do?} + - Request Parameters: {...} + - Request Body Schema: {Provide JSON schema inline, or link to a detailed definition in `docs/data-models.md` only if very complex.} + - Success Response Schema (Code: `200 OK`): {Provide JSON schema inline, or link to a detailed definition in `docs/data-models.md` only if very complex.} + - Error Response Schema(s) (Codes: `4xx`, `5xx`): {Provide JSON schema inline, or link to a detailed definition in `docs/data-models.md` only if very complex.} + - **`{HTTP Method} {/another/endpoint}`:** {...} + +## Data Models + +### Core Application Entities / Domain Objects + +{Define the main objects/concepts the application works with. Repeat subsection for each key entity.} + +#### {Entity Name, e.g., User, Order, Product} + +- **Description:** {What does this entity represent?} +- **Schema / Interface Definition:** + ```typescript + // Example using TypeScript Interface + export interface {EntityName} { + id: string; // {Description, e.g., Unique identifier} + propertyName: string; // {Description} + optionalProperty?: number; // {Description} + // ... other properties + } + ``` + _(Alternatively, use JSON Schema, class definitions, or other relevant format)_ +- **Validation Rules:** {List any specific validation rules beyond basic types - e.g., max length, format, range.} + +#### {Another Entity Name} + +{...} + +### API Payload Schemas (If distinct) + +{Define schemas here only if they are distinct from core entities AND not fully detailed under the API endpoint definitions in the API Reference section. Prefer detailing request/response schemas directly with their APIs where possible. This section is for complex, reusable payload structures that might be used across multiple internal APIs or differ significantly from core persisted entities.} + +#### {API Endpoint / Purpose, e.g., Create Order Request} + +- **Schema / Interface Definition:** + ```typescript + // Example + export interface CreateOrderRequest { + customerId: string; + items: { productId: string; quantity: number }[]; + // ... + } + ``` + +#### {Another API Payload} + +{...} + +### Database Schemas (If applicable) + +{If using a database, define table structures or document database schemas.} + +#### {Table / Collection Name} + +- **Purpose:** {What data does this table store?} +- **Schema Definition:** + ```sql + -- Example SQL + CREATE TABLE {TableName} ( + id VARCHAR(36) PRIMARY KEY, + column_name VARCHAR(255) NOT NULL, + numeric_column DECIMAL(10, 2), + -- ... other columns, indexes, constraints + ); + ``` + _(Alternatively, use ORM model definitions, NoSQL document structure, etc.)_ + +#### {Another Table / Collection Name} + +{...} + +### State File Schemas (If applicable) + +{If the application uses files for persisting state.} + +#### {State File Name / Purpose, e.g., processed_items.json} + +- **Purpose:** {What state does this file track?} +- **Format:** {e.g., JSON} +- **Schema Definition:** + ```json + { + "type": "object", + "properties": { + "processedIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of IDs that have been processed." + } + // ... other state properties + }, + "required": ["processedIds"] + } + ``` + +## Core Workflow / Sequence Diagrams + +{ Illustrate key or complex workflows using mermaid sequence diagrams. Can have high level tying the full project together, and also smaller epic level sequence diagrams. } + +## Definitive Tech Stack Selections + +{ This section outlines the definitive technology choices for the project. These selections should be made after a thorough understanding of the project's requirements, components, data models, and core workflows. The Architect Agent should guide the user through these decisions, ensuring each choice is justified and recorded accurately in the table below. + +Key decisions to discuss and finalize here, which will then be expanded upon and formally documented in the detailed stack table below, include considerations such as: + +- Preferred Starter Template Frontend: { Url to template or starter, if used } +- Preferred Starter Template Backend: { Url to template or starter, if used } +- Primary Language(s) & Version(s): {e.g., TypeScript 5.x, Python 3.11} +- Primary Runtime(s) & Version(s): {e.g., Node.js 22.x} + +Must be definitive selections; do not list open-ended choices (e.g., for web scraping, pick one tool, not two). Specify versions or clearly state "Latest," but be cautious with "Latest" if dependency issues are a concern. } + +| Category | Technology | Version / Details | Description / Purpose | Justification (Optional) | +| :------------------- | :---------------------- | :---------------- | :-------------------------------------- | :----------------------- | +| **Languages** | {e.g., TypeScript} | {e.g., 5.x} | {Primary language for backend/frontend} | {Why this language?} | +| | {e.g., Python} | {e.g., 3.11} | {Used for data processing, ML} | {...} | +| **Runtime** | {e.g., Node.js} | {e.g., 22.x} | {Server-side execution environment} | {...} | +| **Frameworks** | {e.g., NestJS} | {e.g., 10.x} | {Backend API framework} | {Why this framework?} | +| | {e.g., React} | {e.g., 18.x} | {Frontend UI library} | {...} | +| **Databases** | {e.g., PostgreSQL} | {e.g., 15} | {Primary relational data store} | {...} | +| | {e.g., Redis} | {e.g., 7.x} | {Caching, session storage} | {...} | +| **Cloud Platform** | {e.g., AWS} | {N/A} | {Primary cloud provider} | {...} | +| **Cloud Services** | {e.g., AWS Lambda} | {N/A} | {Serverless compute} | {...} | +| | {e.g., AWS S3} | {N/A} | {Object storage for assets/state} | {...} | +| | {e.g., AWS EventBridge} | {N/A} | {Event bus / scheduled tasks} | {...} | +| **Infrastructure** | {e.g., AWS CDK} | {e.g., Latest} | {Infrastructure as Code tool} | {...} | +| | {e.g., Docker} | {e.g., Latest} | {Containerization} | {...} | +| **UI Libraries** | {e.g., Material UI} | {e.g., 5.x} | {React component library} | {...} | +| **State Management** | {e.g., Redux Toolkit} | {e.g., Latest} | {Frontend state management} | {...} | +| **Testing** | {e.g., Jest} | {e.g., Latest} | {Unit/Integration testing framework} | {...} | +| | {e.g., Playwright} | {e.g., Latest} | {End-to-end testing framework} | {...} | +| **CI/CD** | {e.g., GitHub Actions} | {N/A} | {Continuous Integration/Deployment} | {...} | +| **Other Tools** | {e.g., LangChain.js} | {e.g., Latest} | {LLM interaction library} | {...} | +| | {e.g., Cheerio} | {e.g., Latest} | {HTML parsing/scraping} | {...} | + +## Infrastructure and Deployment Overview + +- Cloud Provider(s): {e.g., AWS, Azure, GCP, On-premise} +- Core Services Used: {List key managed services - e.g., Lambda, S3, Kubernetes Engine, RDS, Kafka} +- Infrastructure as Code (IaC): {Tool used - e.g., AWS CDK, Terraform...} - Location: {Link to IaC code repo/directory} +- Deployment Strategy: {e.g., CI/CD pipeline, Manual deployment steps, Blue/Green, Canary} - Tools: {e.g., Jenkins, GitHub Actions, GitLab CI} +- Environments: {List environments - e.g., Development, Staging, Production} + +## Error Handling Strategy + +- **General Approach:** {e.g., Use exceptions, return error codes/tuples, specific error types.} +- **Logging:** + - Library/Method: {e.g., `console.log/error`, Python `logging` module, dedicated logging library} + - Format: {e.g., JSON, plain text} + - Levels: {e.g., DEBUG, INFO, WARN, ERROR} + - Context: {What contextual information should be included?} +- **Specific Handling Patterns:** + - External API Calls: {e.g., Use ` \ No newline at end of file diff --git a/BETA-V3/templates/doc-sharding-tmpl.txt b/BETA-V3/templates/doc-sharding-tmpl.txt new file mode 100644 index 00000000..0e28d47a --- /dev/null +++ b/BETA-V3/templates/doc-sharding-tmpl.txt @@ -0,0 +1,67 @@ +# Document Sharding Plan Template + +This plan directs the PO/POSM agent on how to break down large source documents into smaller, granular files during its Librarian Phase. The agent will refer to this plan to identify source documents, the specific sections to extract, and the target filenames for the sharded content. + +--- + +## 1. Source Document: PRD (Project Requirements Document) +* **Note to Agent:** Confirm the exact filename of the PRD with the user (e.g., `PRD.md`, `ProjectRequirements.md`). + +### 1.1. Epic Granulation +- **Instruction:** For each Epic identified within the PRD: +- **Source Section(s) to Copy:** The complete text for the Epic, including its main description, goals, and all associated user stories or detailed requirements under that Epic. +- **Target File Pattern:** `docs/epic-.md` + +### 1.2. Other Potential PRD Extractions (Examples) +- **Source Section(s) to Copy:** "User Personas" (if present and detailed). +- **Target File:** `docs/prd-user-personas.md` + +--- + +## 2. Source Document: Main Architecture Document +* **Note to Agent:** Confirm the exact filename with the user (e.g., `architecture.md`, `SystemArchitecture.md`). + +### 2.1. Core Architecture Granules +- **Source Section(s) to Copy:** Section(s) detailing "API Reference", "API Endpoints", or "Service Interfaces". +- **Target File:** `docs/api-reference.md` + +- **Source Section(s) to Copy:** Section(s) detailing "Coding Standards", "Development Guidelines", or "Best Practices". +- **Target File:** `docs/coding-standards.md` + +- **Source Section(s) to Copy:** Section(s) detailing "Data Models", "Database Schema", "Entity Definitions". +- **Target File:** `docs/data-models.md` + +- **Source Section(s) to Copy:** Section(s) detailing "Environment Variables", "Configuration Settings", "Deployment Parameters". +- **Target File:** `docs/environment-vars.md` + +- **Source Section(s) to Copy:** Section(s) detailing "Project Structure". +- **Target File:** `docs/project-structure.md` + - *Agent Note: If the project involves multiple repositories (not a monorepo), ensure this file clearly describes the structure of each relevant repository or links to sub-files if necessary.* + +- **Source Section(s) to Copy:** Section(s) detailing "Technology Stack", "Key Technologies", "Libraries and Frameworks". +- **Target File:** `docs/tech-stack.md` + +- **Source Section(s) to Copy:** Section(s) detailing "Testing Strategy", "Testing Decisions", "QA Processes". +- **Target File:** `docs/testing-decisions.md` + +--- + +## 3. Source Document(s): Front-End Specific Documentation +* **Note to Agent:** Confirm filenames with the user (e.g., `front-end-architecture.md`, `front-end-spec.md`, `ui-guidelines.md`). Multiple FE documents might exist. + +### 3.1. Front-End Granules +- **Source Section(s) to Copy:** Section(s) detailing "Front-End Project Structure" (if distinct from the main `project-structure.md`, e.g., for a separate front-end repository or a complex monorepo FE workspace). +- **Target File:** `docs/fe-project-structure.md` + +- **Source Section(s) to Copy:** Section(s) detailing "UI Style Guide", "Brand Guidelines", "Visual Design Specifications". +- **Target File:** `docs/style-guide.md` + +- **Source Section(s) to Copy:** Section(s) detailing "Component Library", "Reusable UI Components Guide", "Atomic Design Elements". +- **Target File:** `docs/component-guide.md` + +- **Source Section(s) to Copy:** Section(s) detailing "Front-End Coding Standards" (specifically for UI development, e.g., JavaScript/TypeScript style, CSS naming conventions, accessibility best practices for FE). +- **Target File:** `docs/front-end-coding-standards.md` + +--- + +CRITICAL: **Index Management:** After creating each granular file, update `docs/index.md` as needed. diff --git a/BETA-V3/templates/front-end-architecture-tmpl.txt b/BETA-V3/templates/front-end-architecture-tmpl.txt new file mode 100644 index 00000000..f70623f4 --- /dev/null +++ b/BETA-V3/templates/front-end-architecture-tmpl.txt @@ -0,0 +1,345 @@ +# {Project Name} Frontend Architecture Document + +## Table of Contents + +{ Update this if sections and subsections are added or removed } + +- [Introduction](#introduction) +- [Overall Frontend Philosophy & Patterns](#overall-frontend-philosophy--patterns) +- [Detailed Frontend Directory Structure](#detailed-frontend-directory-structure) +- [Component Breakdown & Implementation Details](#component-breakdown--implementation-details) + - [Component Naming & Organization](#component-naming--organization) + - [Template for Component Specification](#template-for-component-specification) +- [State Management In-Depth](#state-management-in-depth) + - [Store Structure / Slices](#store-structure--slices) + - [Key Selectors](#key-selectors) + - [Key Actions / Reducers / Thunks](#key-actions--reducers--thunks) +- [API Interaction Layer](#api-interaction-layer) + - [Client/Service Structure](#clientservice-structure) + - [Error Handling & Retries (Frontend)](#error-handling--retries-frontend) +- [Routing Strategy](#routing-strategy) + - [Route Definitions](#route-definitions) + - [Route Guards / Protection](#route-guards--protection) +- [Build, Bundling, and Deployment](#build-bundling-and-deployment) + - [Build Process & Scripts](#build-process--scripts) + - [Key Bundling Optimizations](#key-bundling-optimizations) + - [Deployment to CDN/Hosting](#deployment-to-cdnhosting) +- [Frontend Testing Strategy](#frontend-testing-strategy) + - [Component Testing](#component-testing) + - [UI Integration/Flow Testing](#ui-integrationflow-testing) + - [End-to-End UI Testing Tools & Scope](#end-to-end-ui-testing-tools--scope) +- [Accessibility (AX) Implementation Details](#accessibility-ax-implementation-details) +- [Performance Considerations](#performance-considerations) +- [Change Log](#change-log) + +## Introduction + +{ This document details the technical architecture specifically for the frontend of {Project Name}. It complements the main {Project Name} Architecture Document and the UI/UX Specification. The goal is to provide a clear blueprint for frontend development, ensuring consistency, maintainability, and alignment with the overall system design and user experience goals. } + +- **Link to Main Architecture Document:** {e.g., `docs/architecture.md`} (Note: The overall system architecture, including Monorepo/Polyrepo decisions and backend structure, will influence frontend choices, especially around shared code or API interaction patterns.) +- **Link to UI/UX Specification:** {e.g., `docs/front-end-spec.md`} +- **Link to Primary Design Files (Figma, Sketch, etc.):** {From UI/UX Spec} +- **Link to Deployed Storybook / Component Showcase (if applicable):** {URL} + +## Overall Frontend Philosophy & Patterns + +{ Describe the core architectural decisions and patterns chosen for the frontend. This should align with the "Definitive Tech Stack Selections" in the main architecture document and consider implications from the overall system architecture (e.g., monorepo vs. polyrepo, backend service structure). } + +- **Framework & Core Libraries:** {e.g., React 18.x with Next.js 13.x, Angular 16.x, Vue 3.x with Nuxt.js. Briefly reiterate why these were chosen if not detailed enough in the main arch doc.} +- **Component Architecture:** {e.g., Atomic Design principles, Presentational vs. Container components, use of specific component libraries like Material UI, Tailwind CSS for styling approach.} +- **State Management Strategy:** {e.g., Redux Toolkit, Zustand, Vuex, NgRx. Briefly describe the overall approach – global store, feature stores, context API usage. More details in "State Management In-Depth" section.} +- **Data Flow:** {e.g., Unidirectional data flow, how data is fetched, passed to components, and updated.} +- **Styling Approach:** {e.g., CSS Modules, Styled Components, SCSS with BEM, Tailwind CSS. Link to configuration if applicable.} +- **Key Design Patterns Used:** {e.g., Provider pattern, Hooks, Higher-Order Components, Service patterns for API calls.} + +## Detailed Frontend Directory Structure + +{ Provide an ASCII diagram representing the frontend application\'s specific folder structure (e.g., within `src/` or `app/`). This should elaborate on the frontend part of the main project structure outlined in the architecture document. Highlight conventions for organizing components, pages/views, services, state, styles, assets, etc. } + +### EXAMPLE - Not Prescriptive (for a React/Next.js app) + +```plaintext +src/ +├── app/ # Next.js App Router: Pages/Layouts/Routes +│ ├── (features)/ # Feature-based routing groups +│ │ └── dashboard/ +│ │ ├── layout.tsx +│ │ └── page.tsx +│ ├── api/ # API Routes (if using Next.js backend features) +│ ├── globals.css +│ └── layout.tsx # Root layout +├── components/ # Shared/Reusable UI Components +│ ├── ui/ # Base UI elements (Button, Input, Card - often from a library) +│ │ ├── Button.tsx +│ │ └── ... +│ ├── layout/ # Layout components (Header, Footer, Sidebar) +│ │ ├── Header.tsx +│ │ └── ... +│ └── (feature-specific)/ # Components specific to a feature but potentially reusable within it +│ └── user-profile/ +│ └── ProfileCard.tsx +├── features/ # Feature-specific logic, hooks, non-global state, services +│ └── auth/ +│ ├── components/ # Components used only by the auth feature +│ ├── hooks/ # Feature-specific hooks +│ ├── services/ # Feature-specific API interactions +│ └── store.ts # Feature-specific state slice (if applicable) +├── hooks/ # Global/sharable custom hooks +│ └── useAuth.ts +├── lib/ # Utility functions, helpers, constants +│ └── utils.ts +├── services/ # Global API service clients or SDK configurations +│ └── apiClient.ts +├── store/ # Global state management (e.g., Redux store setup) +│ ├── index.ts +│ ├── rootReducer.ts +│ └── (slices)/ +├── styles/ # Global styles, theme configurations (if not using `globals.css` or similar) +└── types/ # Global TypeScript type definitions + └── index.ts +``` + +### Notes on Frontend Structure: + +{ Explain any specific conventions or rationale behind the structure. For example, "Components are co-located with their feature if not globally reusable." } + +## Component Breakdown & Implementation Details + +{ This section outlines the conventions and templates for defining UI components. While a few globally shared or foundational components (e.g., core UI elements if not from a library, main layout structures) might be specified here upfront to ensure consistency, the detailed specification for most feature-specific components will emerge as user stories are implemented. The key is for the development team (or AI agent) to follow the "Template for Component Specification" below whenever a new component is identified for development. } + +### Component Naming & Organization + +{ Briefly describe conventions for naming components (e.g., PascalCase, `feature-ComponentName.tsx`). How are components organized on the filesystem (reiterate from directory structure if needed)? Are components grouped by feature, type (UI, layout), etc.? } + +### Template for Component Specification + +{ For each significant UI component identified from the UI/UX Specification and design files (Figma), provide the following details. Repeat this subsection for each component. The level of detail should be sufficient for an AI agent or developer to implement it with minimal ambiguity. } + +#### Component: `{ComponentName}` (e.g., `UserProfileCard`, `ProductDetailsView`) + +- **Purpose:** {Briefly describe what this component does and its role in the UI.} +- **Source File(s):** {e.g., `src/components/user-profile/UserProfileCard.tsx`} +- **Visual Reference:** {Link to specific Figma frame/component, or Storybook page.} +- **Props (Properties):** + { List each prop the component accepts. } + | Prop Name | Type | Required? | Default Value | Description | + | :-------------- | :--------------------------- | :-------- | :------------ | :---------------------------------------------- | + | `userId` | `string` | Yes | N/A | The ID of the user to display. | + | `avatarUrl` | `string` | No | `null` | URL for the user\'s avatar image. | + | `onEdit` | `() => void` | No | N/A | Callback function when an edit action is triggered. | + | `variant` | `\'compact\' \| \'full\'` | No | `\'full\'` | Controls the display mode of the card. | + | `{anotherProp}` | `{type (e.g., number, boolean, customType)}` | {Yes/No} | {If any} | {Description} | +- **Internal State (if any):** + { Describe any significant internal state the component manages. Minor UI state (e.g., `isDropdownOpen`) might not need explicit listing unless complex. } + | State Variable | Type | Initial Value | Description | + | :-------------- | :--------- | :------------ | :-------------------------------------------- | + | `isLoading` | `boolean` | `false` | Tracks if data for the component is loading. | + | `{anotherState}`| `{type}` | `{value}` | {Description} | +- **Key UI Elements / Structure:** + { Describe the main visual parts of the component and their general layout. This can be a brief textual description or a very simple pseudo-HTML structure. } + ```html +
+ +

+

+

+ ``` +- **Events Handled / Emitted:** + - **Handles:** {e.g., `onClick` on the edit button.} + - **Emits:** {If the component emits custom events, describe them. e.g., `onFollow: (userId: string) => void`} +- **Actions Triggered (Side Effects):** + - **State Management:** {e.g., "Dispatches `fetchUserDetails(userId)` action on mount." "Calls `userSlice.actions.setUserName(newName)`."} + - **API Calls:** {Specify which service/function from the "API Interaction Layer" is called. e.g., "Calls `userService.fetchUser(userId)`." What data is passed? How is the response (success/error) handled? How does it update internal state or global state?} +- **Styling Notes:** + - {Reference to Design System components used (e.g., "Uses `