UNPKG

@versatil/sdlc-framework

Version:

๐Ÿš€ AI-Native SDLC framework with 11-MCP ecosystem, RAG memory, OPERA orchestration, and 6 specialized agents achieving ZERO CONTEXT LOSS. Features complete CI/CD pipeline with 7 GitHub workflows (MCP testing, security scanning, performance benchmarking),

1,155 lines (874 loc) โ€ข 30.1 kB
# BMad Commands Reference **VERSATIL SDLC Framework v4.1.0** - Complete Command Reference BMad (Business + Marcus + Alex + Development) represents the VERSATIL 5-Rule automation system. This document provides a complete reference for all framework commands, slash commands, and automation features. --- ## ๐Ÿ“– Table of Contents 1. [Core CLI Commands](#core-cli-commands) 2. [BMad Slash Commands](#bmad-slash-commands) 3. [Agent Commands](#agent-commands) 4. [Quality Gate Commands](#quality-gate-commands) 5. [MCP Integration Commands](#mcp-integration-commands) 6. [Configuration Commands](#configuration-commands) 7. [Diagnostic Commands](#diagnostic-commands) 8. [Git Workflow Commands](#git-workflow-commands) 9. [Command Output Examples](#command-output-examples) --- ## Core CLI Commands ### `versatil init` **Description**: Interactive setup wizard with OPERA agent customization **Usage**: ```bash versatil init # Advanced options: versatil init --force # Overwrite existing configuration versatil init --template=enterprise # Use enterprise template versatil init --no-git-hooks # Skip Git hooks installation ``` **What It Does**: 1. Detects your project type and tech stack 2. Creates `.versatil-project.json` configuration 3. Generates `.cursorrules` template (for Cursor IDE users) 4. Sets up `.cursor/settings.json` with agent auto-activation 5. Installs Git hooks for quality gates 6. Configures RAG memory system 7. Tests agent activation **Output Example**: ``` ๐Ÿš€ VERSATIL Framework Setup Wizard ๐Ÿ“ Analyzing project structure... โœ… Detected: Full-stack project โœ… Frontend: React + TypeScript + Tailwind CSS โœ… Backend: Node.js + Express + PostgreSQL โœ… Testing: Jest + Playwright ๐Ÿค– Configuring agents... โœ… Maria-QA: Enabled (test coverage threshold: 80%) โœ… James-Frontend: Enabled (WCAG 2.1 AA) โœ… Marcus-Backend: Enabled (OWASP Top 10 2023) โœ… Sarah-PM: Enabled (14-day sprints) โœ… Alex-BA: Enabled (user story format) โœ… Dr.AI-ML: Disabled (not an AI/ML project) ๐Ÿ“ Creating configuration files... โœ… .versatil-project.json โœ… .cursorrules โœ… .cursor/settings.json ๐Ÿ” Setting up quality gates... โœ… Pre-commit hook installed โœ… Pre-push hook installed โœ… Coverage threshold: 80% ๐Ÿงช Testing agent activation... โœ… Maria-QA: Ready โœ… James-Frontend: Ready โœ… Marcus-Backend: Ready โœ… Setup complete! Start coding - agents will activate automatically. Next steps: 1. Edit a test file to verify Maria-QA activation 2. Run: versatil test-activation 3. Read: docs/CURSOR_INTEGRATION.md ``` --- ### `versatil doctor` **Description**: Run comprehensive health check and verification **Usage**: ```bash versatil doctor # Options: versatil doctor --fix # Auto-fix issues versatil doctor:install # Diagnose installation issues versatil doctor --verbose # Detailed output ``` **What It Checks**: - โœ… Framework installation and PATH - โœ… Configuration files (.versatil-project.json, .cursorrules) - โœ… Agent activation status - โœ… Git hooks installation - โœ… MCP server connection - โœ… RAG memory system - โœ… Dependencies and versions - โœ… Quality gate configuration **Output Example**: ``` ๐Ÿฅ VERSATIL Framework Health Check Installation: โœ… Framework version: 4.1.0 โœ… Node.js version: 20.10.0 โœ… npm global bin: /usr/local/bin โœ… Command in PATH: versatil Configuration: โœ… .versatil-project.json found โœ… .cursorrules found โœ… .cursor/settings.json found โš ๏ธ Warning: RAG memory not initialized (run: versatil init --force) Agents: โœ… Maria-QA: Operational โœ… James-Frontend: Operational โœ… Marcus-Backend: Operational โœ… Sarah-PM: Operational โœ… Alex-BA: Operational โŒ Dr.AI-ML: Disabled (expected) Quality Gates: โœ… Pre-commit hook: Installed โœ… Pre-push hook: Installed โœ… Coverage threshold: 80% MCP Integration: โœ… MCP server: Running โœ… Claude Desktop: Connected โœ… Memory persistence: Active Overall Health Score: 95/100 (Excellent) Issues found: 1 โš ๏ธ RAG memory not initialized Suggested fixes: versatil init --force ``` --- ### `versatil analyze` **Description**: Analyze project and suggest additional agents **Usage**: ```bash versatil analyze # Options: versatil analyze --deep # Deep code analysis versatil analyze --output=json # JSON output ``` **Output Example**: ``` ๐Ÿ” Analyzing project for agent recommendations... ๐Ÿ“Š Project Analysis Results: File Types Detected: - TypeScript: 89 files - React Components: 45 files - Test Files: 67 files - API Routes: 23 files - Python: 0 files ๐Ÿ’ก Recommended agents: โ€ข Maria-QA (95% confidence) Reason: 67 test files detected, current coverage: 72% Action: Enable comprehensive test coverage analysis โ€ข James-Frontend (92% confidence) Reason: 45 React components, accessibility checks needed Action: Enable WCAG 2.1 AA validation โ€ข Marcus-Backend (88% confidence) Reason: 23 API routes, security validation recommended Action: Enable OWASP Top 10 security scans Agents NOT recommended: โœ— Dr.AI-ML (No ML code detected) Current Setup: Optimal for your project โœ… ``` --- ### `versatil agents` **Description**: List available agent templates and status **Usage**: ```bash versatil agents # List all agents versatil agents --status # Show activation status versatil agents --watch # Real-time monitoring versatil agents --stats # Performance statistics ``` **Output Example** (`versatil agents --status`): ``` ๐Ÿค– VERSATIL Agent Status โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Agent โ”‚ Status โ”‚ Active โ”‚ Last Action โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ Maria-QA โ”‚ Ready โ”‚ No โ”‚ 5m ago โ”‚ โ”‚ James-Frontend โ”‚ Ready โ”‚ No โ”‚ 12m ago โ”‚ โ”‚ Marcus-Backend โ”‚ Running โ”‚ Yes โ”‚ 2s ago โ”‚ โ”‚ Sarah-PM โ”‚ Ready โ”‚ No โ”‚ 1h ago โ”‚ โ”‚ Alex-BA โ”‚ Ready โ”‚ No โ”‚ 3h ago โ”‚ โ”‚ Dr.AI-ML โ”‚ Disabled โ”‚ No โ”‚ Never โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ Currently Running Tasks: ๐Ÿค– Marcus-Backend: Running stress test on /api/auth/login (1000 requests) Press Ctrl+C to exit ``` --- ### `versatil config` **Description**: Manage framework preferences and configuration **Usage**: ```bash versatil config show # Show current configuration versatil config set <key>=<value> # Set configuration value versatil config wizard # Interactive configuration versatil config profile <name> # Load configuration profile versatil config validate # Validate configuration ``` **Examples**: ```bash # Show current config versatil config show # Set coverage threshold versatil config set maria-qa.coverage_threshold=85 # Set accessibility standard versatil config set james-frontend.accessibility_standard="WCAG 2.1 AAA" # Enable proactive mode versatil config set proactive_agents.enabled=true # Load enterprise profile versatil config profile enterprise ``` --- ### `versatil update` **Description**: Update framework to latest version **Usage**: ```bash versatil update check # Check for updates versatil update install # Install latest update versatil update status # Show update status versatil update list # List available versions versatil update changelog # Show changelog ``` **Output Example** (`versatil update check`): ``` ๐Ÿ” Checking for updates... Current version: 4.1.0 Latest version: 4.2.0 ๐Ÿ“ What's New in 4.2.0: โœจ New: Visual regression testing integration โœจ Enhanced: RAG memory performance (+40%) ๐Ÿ› Fixed: MCP connection timeout issues ๐Ÿ› Fixed: Quality gate enforcement on Windows Do you want to update? (y/N) ``` --- ### `versatil rollback` **Description**: Rollback to previous framework version **Usage**: ```bash versatil rollback list # List available versions versatil rollback to <version> # Rollback to specific version versatil rollback previous # Rollback to previous version versatil rollback validate # Validate rollback safety ``` --- ### `versatil mcp` **Description**: Start MCP server for Claude Desktop integration **Usage**: ```bash versatil mcp # Start with current directory versatil mcp /path/to/project # Start with specific project versatil mcp:test # Test MCP connection ``` **Claude Desktop Configuration**: ```json { "mcpServers": { "versatil": { "command": "versatil-mcp", "args": ["/path/to/your/project"] } } } ``` --- ## BMad Slash Commands BMad slash commands are used within Cursor IDE or Claude Desktop for real-time agent control. ### `/bmad:audit` - Comprehensive Health Audit (Rule 3) **Description**: Run the VERSATIL Daily Audit and Health Check System **Usage**: ```bash /bmad:audit # Run full audit /bmad:audit --security # Security audit only /bmad:audit --performance # Performance audit only /bmad:audit --quick # Quick health check ``` **What Gets Checked**: - ๐Ÿฅ **System Health**: CPU, memory, disk, network utilization - ๐Ÿ“Š **Application Performance**: Response times, throughput, error rates - ๐Ÿ”’ **Security**: OWASP Top 10, access control, compliance (SOC 2, ISO 27001) - โœ… **Code Quality**: 85%+ test coverage, standards, technical debt - ๐Ÿ—๏ธ **Infrastructure**: Service availability, dependency health - ๐Ÿ“ˆ **Business Intelligence**: Metrics and KPI tracking **Audit Categories**: 1. **System**: Resource utilization, process health, uptime 2. **Performance**: Response times, throughput, error rates 3. **Security**: Vulnerability scans, access control 4. **Quality**: Test coverage, code standards, technical debt 5. **Infrastructure**: Service availability, dependencies 6. **Compliance**: SOC 2, ISO 27001, GDPR **Auto-Remediation**: - โœจ Performance optimization (memory cleanup, auto-scaling) - โœจ Security patch application for critical vulnerabilities - โœจ Quality gate enforcement with automatic blocking - โœจ Resource optimization based on usage patterns - โœจ Alert escalation with intelligent routing **Schedule**: - **Daily**: Comprehensive audit at 2 AM (configurable) - **Hourly**: Critical system health checks - **Real-time**: Performance monitoring and alerting **Output Example**: ``` ๐Ÿฅ VERSATIL Comprehensive Audit Report System Health: โœ… CPU Usage: 45% (Normal) โœ… Memory: 8.2GB / 16GB (51%) โœ… Disk Space: 120GB / 500GB (24%) โš ๏ธ Network Latency: 250ms (High) Performance: โœ… API Response Time: 185ms (Target: < 200ms) โœ… Throughput: 1,200 req/min โŒ Error Rate: 2.3% (Target: < 1%) Security: โœ… OWASP Top 10: Compliant โœ… Access Control: Configured โš ๏ธ Dependency Vulnerabilities: 3 low severity Quality: โœ… Test Coverage: 87% (Target: 85%) โœ… Code Standards: Passing โš ๏ธ Technical Debt: 12 issues Overall Health Score: 88/100 (Good) โš ๏ธ 3 Issues Require Attention: 1. High network latency (investigate DNS/routing) 2. Error rate above threshold (check logs) 3. 3 dependency vulnerabilities (run: npm audit fix) Auto-Remediation Actions: โœ… Triggered cache cleanup (freed 2.1GB) โœ… Scaled API workers +2 instances โณ Dependency update scheduled (tonight 2 AM) ``` --- ### `/bmad:parallel` - Parallel Task Execution (Rule 1) **Description**: Enable VERSATIL Rule 1 for parallel task execution with collision detection **Usage**: ```bash /bmad:parallel # Check status /bmad:parallel enable # Enable parallel execution /bmad:parallel disable # Disable parallel execution /bmad:parallel configure # Configure max tasks /bmad:parallel stats # Show statistics ``` **What This Does**: Activates parallel execution of development tasks with: - **Global max tasks**: 20 concurrent operations (configurable) - **Agent workload balancing**: Max 3 tasks per agent - **Resource contention prevention**: File system/database locks - **SDLC-aware orchestration**: Respects development phases - **Real-time optimization**: Auto-scaling based on load **Tasks That Run in Parallel**: - โœ… File pattern changes (component builds) - โœ… Test execution across modules - โœ… Security scans - โœ… Documentation generation - โœ… Build processes - โœ… Code quality checks **Collision Detection**: - ๐Ÿ›ก๏ธ Resource conflicts (file system, database, network) - ๐Ÿ›ก๏ธ SDLC phase violations (testing before implementation) - ๐Ÿ›ก๏ธ Agent overload prevention - ๐Ÿ›ก๏ธ Dependency cycle detection **Performance Impact**: - **3x faster** development cycles - **Zero** resource conflicts - **Optimal** agent utilization **Output Example**: ``` ๐Ÿ”„ VERSATIL Parallel Execution Status Configuration: Status: Enabled โœ… Max Concurrent Tasks: 20 Max Tasks Per Agent: 3 Collision Detection: Active Currently Running (8 tasks): ๐Ÿค– Maria-QA (2 tasks): - Test coverage analysis: src/auth/** - Visual regression: Button component ๐Ÿค– James-Frontend (3 tasks): - Accessibility check: LoginForm.tsx - Performance audit: UserProfile.tsx - Responsive validation: Dashboard.tsx ๐Ÿค– Marcus-Backend (3 tasks): - Security scan: /api/auth/login - Stress test: /api/users (1000 req) - Query optimization: UserRepository Completed Today: 247 tasks Average Completion Time: 12.3s Conflicts Prevented: 34 Performance Gain: 3.2x faster than sequential ``` --- ### `/bmad:stress-test` - Automated Stress Testing (Rule 2) **Description**: Generate and run automated stress tests **Usage**: ```bash /bmad:stress-test # Run all stress tests /bmad:stress-test api # Stress test APIs only /bmad:stress-test ui # Stress test UI components /bmad:stress-test --generate # Generate new test scenarios /bmad:stress-test --baseline # Establish performance baseline ``` **What This Does**: Creates comprehensive stress test scenarios: - **Load Testing**: Normal traffic patterns (1,000 users) - **Stress Testing**: Beyond capacity to breaking point (10,000+ users) - **Spike Testing**: Sudden traffic surges (0 โ†’ 5,000 in 10s) - **Volume Testing**: Large data sets (1M+ records) - **Chaos Engineering**: Network failures, service outages - **Security Stress**: Authentication attacks, rate limiting **Auto-Generation Triggers**: - ๐ŸŽฏ Code changes in critical paths (API endpoints, components) - ๐ŸŽฏ New feature deployment - ๐ŸŽฏ Performance regression thresholds breached - ๐ŸŽฏ Security vulnerability patterns detected - ๐ŸŽฏ Integration point modifications **Test Output**: - Performance baselines and regression detection - Security vulnerability reports - Scalability bottleneck identification - Real-time results feed into quality gates **Benefits**: - **85% reduction** in production issues - Automated performance regression detection - Proactive scalability issue identification **Output Example**: ``` ๐Ÿงช VERSATIL Automated Stress Test Report Test Suite: API Endpoints Started: 2025-10-05 14:32:15 Duration: 3m 45s Load Test (1,000 concurrent users): โœ… /api/auth/login Response Time: 145ms (p95: 198ms) Throughput: 1,200 req/s Error Rate: 0.02% โœ… /api/users Response Time: 89ms (p95: 142ms) Throughput: 2,400 req/s Error Rate: 0.01% Stress Test (10,000 concurrent users): โš ๏ธ /api/auth/login Response Time: 425ms (p95: 892ms) Throughput: 4,200 req/s Error Rate: 1.2% Issue: Database connection pool saturation at 8,000 users Spike Test (0 โ†’ 5,000 in 10s): โœ… /api/users Recovery Time: 3.2s Auto-scaling: +4 instances triggered Recommendations: 1. Increase database connection pool: 100 โ†’ 200 2. Add Redis caching for /api/auth/login 3. Implement rate limiting: 100 req/min per IP Performance Baseline Established: - /api/auth/login: 200ms @ 1,000 users - /api/users: 100ms @ 1,000 users Quality Gate: โš ๏ธ WARNING - /api/auth/login exceeded 200ms threshold under stress - Review required before deployment ``` --- ## Agent Commands ### `/maria` - Activate Maria-QA **Description**: Manually activate Maria-QA for quality assurance **Usage**: ```bash /maria review test coverage for authentication /maria analyze component tests /maria suggest missing tests for UserProfile /maria run visual regression tests ``` **Auto-Activation Triggers**: - File patterns: `*.test.*`, `**/__tests__/**`, `*.spec.*` - Code patterns: `describe(`, `it(`, `expect(`, `test(` --- ### `/james` - Activate James-Frontend **Description**: Manually activate James-Frontend for UI/UX review **Usage**: ```bash /james optimize React component performance /james check accessibility for LoginForm /james review responsive design /james analyze bundle size ``` **Auto-Activation Triggers**: - File patterns: `*.tsx`, `*.jsx`, `*.vue`, `*.css`, `*.scss` - Code patterns: `useState`, `useEffect`, `component`, `className` --- ### `/marcus` - Activate Marcus-Backend **Description**: Manually activate Marcus-Backend for API/security review **Usage**: ```bash /marcus review API security implementation /marcus optimize database queries /marcus generate stress tests for /api/auth /marcus check OWASP compliance ``` **Auto-Activation Triggers**: - File patterns: `*.api.*`, `**/routes/**`, `**/controllers/**` - Code patterns: `router.`, `app.`, `express.`, `async function` --- ### `/sarah` - Activate Sarah-PM **Description**: Manually activate Sarah-PM for project management **Usage**: ```bash /sarah update project timeline /sarah generate sprint report /sarah analyze team velocity /sarah create milestone plan ``` --- ### `/alex` - Activate Alex-BA **Description**: Manually activate Alex-BA for requirements analysis **Usage**: ```bash /alex refine user story acceptance criteria /alex extract requirements from feature request /alex create traceability matrix /alex validate business rules ``` --- ### `/dr-ai-ml` - Activate Dr.AI-ML **Description**: Manually activate Dr.AI-ML for AI/ML work **Usage**: ```bash /dr-ai-ml deploy ML model to production /dr-ai-ml validate model accuracy /dr-ai-ml optimize inference performance /dr-ai-ml analyze training metrics ``` --- ## Quality Gate Commands ### `versatil quality-gate` **Description**: Run quality gate checks **Usage**: ```bash versatil quality-gate pre-commit # Pre-commit checks versatil quality-gate pre-push # Pre-push checks versatil quality-gate pre-deploy # Pre-deployment checks versatil quality-gate:setup # Install Git hooks ``` **Pre-Commit Gate** (runs before `git commit`): - โœ… Lint check (ESLint, Prettier) - โœ… Type check (TypeScript) - โœ… Unit tests (must pass) - โœ… Coverage threshold (80%+) - โœ… Security scan (basic SAST) **Pre-Push Gate** (runs before `git push`): - โœ… Full test suite - โœ… Integration tests - โœ… Coverage threshold (85%+) - โœ… Visual regression (if configured) - โœ… Security scan (OWASP) **Pre-Deploy Gate** (runs before deployment): - โœ… E2E tests (Playwright + Chrome MCP) - โœ… Security audit (OWASP ZAP, Snyk) - โœ… Performance validation (Lighthouse 90+) - โœ… Accessibility audit (axe, pa11y 95+) - โœ… API contract validation --- ## MCP Integration Commands ### `versatil-mcp` **Description**: Start VERSATIL MCP server for Claude Desktop **Usage**: ```bash versatil-mcp # Start with current directory versatil-mcp /path/to/project # Start with specific project ``` **Claude Desktop Configuration**: Add to `~/Library/Application Support/Claude/claude_desktop_config.json`: ```json { "mcpServers": { "versatil": { "command": "versatil-mcp", "args": ["/absolute/path/to/your/project"] } } } ``` **Available MCP Tools**: - `read_file` - Read file contents - `write_file` - Write file contents - `search_files` - Search for files by pattern - `run_command` - Execute shell command - `activate_agent` - Activate specific VERSATIL agent - `run_quality_gate` - Run quality gate checks - `analyze_coverage` - Analyze test coverage - `security_scan` - Run security audit --- ## Configuration Commands ### `versatil cursor:init` **Description**: Initialize Cursor IDE integration **Usage**: ```bash versatil cursor:init # Create .cursorrules template versatil cursor:init --force # Overwrite existing configuration ``` **Creates**: - `.cursorrules` - Cursor-specific agent configuration - `.cursor/settings.json` - Auto-activation rules - `.versatil-project.json` - Project-specific config --- ## Diagnostic Commands ### `versatil test-activation` **Description**: Test agent auto-activation **Usage**: ```bash versatil test-activation # Test with current project versatil test-activation --file=src/LoginForm.test.tsx versatil test-activation --verbose # Detailed output ``` **Output Example**: ``` ๐Ÿงช Testing Agent Activation โœ… Cursor IDE detected: Version 0.40.1 โœ… .cursorrules found โœ… .cursor/settings.json found โœ… Agent triggers configured: 6 agents Testing file: src/LoginForm.test.tsx Matching Agents: โœ… Maria-QA (95% confidence) Matched patterns: - File pattern: *.test.* - Code pattern: describe( - Code pattern: it( - Code pattern: expect( Proactive actions configured: - test_coverage_analysis - missing_test_detection - assertion_validation Testing file: src/components/Button.tsx Matching Agents: โœ… James-Frontend (92% confidence) Matched patterns: - File pattern: *.tsx - Code pattern: useState - Code pattern: component Proactive actions configured: - accessibility_check_wcag - component_structure_validation โœ… Agent activation working correctly! Recommendations: - Edit a test file to verify real-time activation - Check statusline for agent activity - Run: versatil agents --watch ``` --- ### `versatil agents --watch` **Description**: Real-time agent monitoring **Usage**: ```bash versatil agents --watch # Monitor all agents versatil agents --watch maria # Monitor specific agent ``` **Output Example**: ``` ๐Ÿค– VERSATIL Agent Real-Time Monitor Press Ctrl+C to exit [14:32:15] ๐Ÿค– Maria-QA activated File: src/LoginForm.test.tsx Action: test_coverage_analysis [14:32:17] ๐Ÿ“Š Maria-QA analysis complete Coverage: 85% (โ†‘ 5% from baseline) Missing tests: 2 Suggestions: Added inline comments [14:33:02] ๐Ÿค– James-Frontend activated File: src/components/Button.tsx Action: accessibility_check_wcag [14:33:05] โœ… James-Frontend validation complete Accessibility: WCAG 2.1 AA compliant Issues: 0 Suggestions: None [14:33:45] ๐Ÿค– Marcus-Backend activated File: src/api/auth/login.ts Action: security_pattern_validation_owasp [14:33:50] โš ๏ธ Marcus-Backend security scan complete OWASP Status: 1 warning Issue: Missing rate limiting on login endpoint Suggestion: Add express-rate-limit middleware ``` --- ## Git Workflow Commands ### `versatil backup` **Description**: Git backup management **Usage**: ```bash versatil backup create # Create backup versatil backup status # Show backup status versatil backup sync # Sync with remote ``` --- ### `versatil changelog` **Description**: Generate changelog from git commits **Usage**: ```bash versatil changelog # Generate changelog versatil changelog --format=markdown # Markdown output versatil changelog --since=v4.0.0 # Since specific version ``` --- ### `versatil version` **Description**: Auto version bump or manual versioning **Usage**: ```bash versatil version # Auto-analyze and bump versatil version major # Manual major bump versatil version minor # Manual minor bump versatil version patch # Manual patch bump versatil version prerelease # Prerelease version ``` --- ### `versatil release` **Description**: Create full release with changelog and tagging **Usage**: ```bash versatil release # Create release versatil release --github # Create GitHub release versatil release --dry-run # Preview release ``` --- ## Command Output Examples ### Example 1: Full Quality Gate Run ```bash $ versatil quality-gate pre-deploy ๐Ÿ” VERSATIL Pre-Deploy Quality Gate Running comprehensive checks... 1. E2E Tests (Playwright + Chrome MCP) โœ… Authentication flow: 12 tests passed โœ… User management: 8 tests passed โœ… API integration: 15 tests passed Time: 2m 34s 2. Security Audit (OWASP ZAP + Snyk) โœ… OWASP Top 10: Compliant โœ… Dependency vulnerabilities: 0 high, 2 low โš ๏ธ Rate limiting: Missing on 1 endpoint Time: 1m 12s 3. Performance Validation (Lighthouse) โœ… Performance: 94/100 (target: 90) โœ… Accessibility: 98/100 (target: 95) โœ… Best Practices: 100/100 โœ… SEO: 92/100 Time: 45s 4. Accessibility Audit (axe + pa11y) โœ… WCAG 2.1 AA: 100% compliant โœ… Color contrast: All checks passed โœ… Keyboard navigation: Verified Time: 23s 5. API Contract Validation โœ… OpenAPI schema: Valid โœ… Breaking changes: None detected โœ… Backward compatibility: Maintained Time: 8s Overall Result: โš ๏ธ WARNING - Quality score: 94/100 (target: 90) โœ… - 1 issue requires review: * Add rate limiting to /api/auth/login Recommendation: Review security issue before deployment Do you want to proceed with deployment? (y/N) ``` --- ### Example 2: Agent Statistics ```bash $ versatil agents --stats ๐Ÿ“Š VERSATIL Agent Performance (Last 7 Days) Maria-QA (Quality Guardian): - Activations: 247 - Avg Response Time: 1.8s - Tests Generated: 89 - Bugs Detected: 12 - Coverage Improvement: +15% - Quality Gate Blocks: 7 Top Actions: 1. test_coverage_analysis (124 times) 2. missing_test_detection (89 times) 3. assertion_validation (67 times) James-Frontend (UI/UX Expert): - Activations: 183 - Avg Response Time: 2.1s - Accessibility Fixes: 34 - Performance Improvements: 21 - Components Optimized: 67 Top Actions: 1. accessibility_check_wcag (98 times) 2. component_structure_validation (76 times) 3. performance_optimization_suggestions (54 times) Marcus-Backend (API Architect): - Activations: 156 - Avg Response Time: 3.2s - Security Issues Found: 8 - APIs Optimized: 23 - Stress Tests Generated: 45 Top Actions: 1. security_pattern_validation_owasp (87 times) 2. stress_test_generation (45 times) 3. database_query_optimization (34 times) Overall Metrics: - Total Agent Activations: 586 - Avg Response Time: 2.1s - Code Quality Improvement: +27% - Bugs Prevented: 23 - Development Velocity: +3.2x ``` --- ## ๐Ÿ’ก Tips & Best Practices ### When to Use CLI vs Slash Commands **CLI Commands** (in terminal): ```bash # Use for: - Initial setup (versatil init) - Health checks (versatil doctor) - Configuration (versatil config) - Updates (versatil update) ``` **Slash Commands** (in Cursor/Claude): ```bash # Use for: - Real-time agent activation (/maria, /james, /marcus) - Quality checks during development (/bmad:audit) - Stress testing specific endpoints (/bmad:stress-test api) ``` ### Proactive vs Manual Activation **Proactive Mode** (recommended): - Agents activate automatically based on file patterns - Real-time feedback in statusline - Best for: Day-to-day development **Manual Mode** (fallback): - Use slash commands to activate agents - More control over when agents run - Best for: Complex scenarios, debugging ### Quality Gate Strategy **Recommended Setup**: ```bash Pre-Commit: Lint + Type Check + Unit Tests (fast, local) Pre-Push: Full Test Suite + Coverage (comprehensive) Pre-Deploy: E2E + Security + Performance (thorough) ``` --- ## ๐Ÿšจ Troubleshooting Commands ### Command Not Found ```bash # Check installation which versatil # Reinstall if needed npm install -g @versatil/sdlc-framework # Diagnose PATH issues versatil doctor:install ``` ### Agents Not Activating ```bash # Test activation versatil test-activation # Check agent status versatil agents --status # Watch agent activity versatil agents --watch # Enable debug mode VERSATIL_DEBUG=true versatil agents --watch ``` ### Quality Gates Not Enforcing ```bash # Verify Git hooks ls -la .git/hooks/ # Reinstall hooks versatil quality-gate:setup # Test pre-commit gate versatil quality-gate pre-commit ``` --- ## ๐Ÿ“š Related Documentation - [Cursor Integration Guide](CURSOR_INTEGRATION.md) - [Agent Activation Troubleshooting](AGENT_ACTIVATION_TROUBLESHOOTING.md) - [Quality Gates Documentation](QUALITY_GATES.md) - [MCP Integration Guide](mcp-integration.md) - [Installation Troubleshooting](INSTALLATION_TROUBLESHOOTING.md) --- **Framework Version**: 4.1.0 **Last Updated**: 2025-10-05 **Maintained By**: VERSATIL Development Team **Community Support**: [GitHub Discussions](https://github.com/versatil-sdlc-framework/discussions)