DeleteAsync(int id);
}
frontend_component_template: |
'use client';
import { useState } from 'react';
import { useForm } from 'react-hook-form';
import { {domain}Service } from '../services/{domain}Service';
interface {Component}Props {
// Define props following existing component patterns
}
export function {Component}({ }: {Component}Props) {
// Follow existing component patterns from UserProfile component
return (
{/* Component implementation */}
);
}
```
## Integration Points
### Dev Agent Integration
- **Codebase Context**: Provides comprehensive codebase understanding to dev agents
- **Implementation Guidance**: Specific instructions on where and how to implement features
- **Pattern Following**: Ensures new code follows existing patterns and conventions
### Workflow Integration
- **Pre-Implementation**: Runs before dev agents start implementation
- **Context Sharing**: Shares analysis results with all development agents
- **Quality Assurance**: Ensures implementations maintain architectural integrity
### Quality Standards
- **Pattern Consistency**: Maintains consistent patterns across codebase
- **Architectural Integrity**: Preserves existing architectural decisions
- **Domain Boundaries**: Respects business domain boundaries and separation
==================== END: .hubtel-workflow/tasks/codebase-analyzer.md ====================
==================== START: .hubtel-workflow/tasks/coordinate-integration.md ====================
# Coordinate Integration
## ⚠️ CRITICAL EXECUTION NOTICE ⚠️
**THIS IS AN EXECUTABLE WORKFLOW - NOT REFERENCE MATERIAL**
When this task is invoked:
1. **CROSS-TEAM COORDINATION** - This workflow manages frontend/backend integration
2. **API CONTRACT MANAGEMENT** - Handles API changes and compatibility
3. **ENVIRONMENT SYNCHRONIZATION** - Updates Docker Compose and configurations
4. **COMMUNICATION ORCHESTRATION** - Coordinates Teams, Swagger, and Postman updates
## Overview
This workflow coordinates integration activities between frontend and backend development teams, managing API changes, environment updates, and cross-team communication to ensure smooth development workflows and prevent integration conflicts.
## Input Parameters
### Required Parameters
- **integration_type**: "api_change" | "environment_update" | "deployment_coordination" | "conflict_resolution"
- **affected_services**: Array of services requiring coordination
### Optional Parameters
- **notification_channels**: ["teams", "swagger", "postman"] (default: all)
- **urgency_level**: "low" | "normal" | "high" | "critical" (default: "normal")
- **rollback_plan**: boolean (default: true)
- **validation_required**: boolean (default: true)
## Coordination Workflows
### API Change Coordination
```yaml
workflow: api_change_coordination
description: Manage API changes between frontend and backend teams
phases:
- phase: "change_detection"
activities:
- analyze_api_changes: Compare current vs new API specifications
- identify_breaking_changes: Flag changes that affect existing contracts
- assess_impact: Determine affected frontend components and services
- categorize_urgency: Classify change urgency and timeline requirements
- phase: "impact_analysis"
activities:
- frontend_impact_assessment:
- identify_affected_components: Find components using changed APIs
- estimate_modification_effort: Calculate required frontend changes
- compatibility_analysis: Assess backward compatibility requirements
- backend_impact_assessment:
- service_dependency_analysis: Identify dependent backend services
- database_migration_needs: Determine schema change requirements
- performance_impact: Assess performance implications of changes
- phase: "coordination_planning"
activities:
- development_sequencing:
- backend_first: API implementation and testing completion
- frontend_adaptation: Frontend updates based on new API contract
- integration_testing: End-to-end validation of changes
- rollback_strategy:
- version_management: API versioning for backward compatibility
- deployment_sequence: Safe rollback procedures if needed
- data_migration_rollback: Database change reversal procedures
- phase: "communication_execution"
activities:
- team_notifications:
- breaking_change_alerts: Immediate notification for breaking changes
- timeline_communication: Expected completion and deployment dates
- testing_coordination: Shared testing plans and responsibilities
- documentation_updates:
- swagger_regeneration: Updated OpenAPI specifications
- postman_collection_updates: Refreshed API testing collections
- integration_examples: Updated code examples and patterns
```
### Environment Update Coordination
```yaml
workflow: environment_update_coordination
description: Synchronize Docker Compose and environment configurations
phases:
- phase: "environment_analysis"
activities:
- service_inventory: Catalog all services in Docker Compose setup
- dependency_mapping: Map service-to-service communication patterns
- configuration_audit: Review environment variables and secrets
- network_analysis: Assess service networking and port requirements
- phase: "update_planning"
activities:
- change_categorization:
- new_services: Services being added to the environment
- configuration_updates: Environment variable and setting changes
- network_modifications: Port mappings and service communication updates
- volume_changes: Persistent storage and shared volume updates
- impact_assessment:
- service_disruption: Assess which services need restart or recreation
- data_persistence: Ensure data safety during environment updates
- development_workflow_impact: Minimize disruption to ongoing development
- phase: "coordinated_deployment"
activities:
- staged_rollout:
- backup_current_environment: Save current working configuration
- incremental_updates: Apply changes in small, testable increments
- validation_checkpoints: Verify functionality at each stage
- team_coordination:
- synchronized_updates: Coordinate team environment refresh timing
- troubleshooting_support: Provide assistance for update issues
- rollback_procedures: Quick recovery if updates cause problems
```
### Deployment Coordination
```yaml
workflow: deployment_coordination
description: Coordinate service deployment sequences and dependencies
phases:
- phase: "deployment_planning"
activities:
- dependency_analysis:
- service_dependencies: Map required deployment order
- database_migrations: Coordinate schema changes with deployments
- configuration_dependencies: Environment and secret updates
- risk_assessment:
- breaking_change_identification: Flag changes requiring careful sequencing
- rollback_complexity: Assess rollback difficulty and requirements
- business_impact: Evaluate user-facing impact of deployment
- phase: "coordination_execution"
activities:
- deployment_sequencing:
- backend_services_first: Deploy API changes before frontend updates
- database_migrations: Execute schema changes during maintenance windows
- frontend_deployment: Deploy UI changes after backend stabilization
- monitoring_coordination:
- health_check_validation: Verify service health after each deployment
- integration_testing: Execute cross-service validation tests
- performance_monitoring: Track system performance during rollout
- phase: "post_deployment_coordination"
activities:
- validation_orchestration:
- end_to_end_testing: Comprehensive system validation
- user_acceptance_testing: Coordinate UAT with stakeholders
- performance_verification: Validate system performance metrics
- communication_closure:
- success_notifications: Inform teams of successful deployment
- documentation_updates: Update deployment procedures and lessons learned
- incident_response_readiness: Prepare for potential post-deployment issues
```
## Communication Templates
### API Change Notification Template
```yaml
api_change_notification:
urgency_indicators:
critical: "🚨 CRITICAL API CHANGE 🚨"
high: "⚠️ HIGH PRIORITY API CHANGE ⚠️"
normal: "📋 API Change Notification"
low: "ℹ️ Minor API Update"
message_structure:
header:
service: "{affected_service_name}"
change_type: "{breaking|non-breaking|enhancement}"
timeline: "{implementation_timeline}"
impact_summary:
frontend_impact: "{specific_frontend_changes_required}"
backend_impact: "{backend_service_modifications}"
testing_impact: "{additional_testing_requirements}"
implementation_plan:
backend_completion: "{backend_implementation_date}"
frontend_updates: "{frontend_modification_timeline}"
integration_testing: "{testing_and_validation_period}"
resources:
updated_documentation: "{swagger_documentation_url}"
postman_collection: "{updated_postman_collection_url}"
code_examples: "{implementation_examples_and_patterns}"
contact_information:
backend_contact: "{backend_team_contact}"
frontend_contact: "{frontend_team_contact}"
integration_coordinator: "{coordinator_contact}"
```
### Environment Update Template
```yaml
environment_update_notification:
update_categories:
new_service: "🆕 NEW SERVICE ADDED"
configuration_change: "⚙️ CONFIGURATION UPDATE"
network_modification: "🌐 NETWORK CHANGES"
volume_update: "💾 STORAGE CHANGES"
message_structure:
summary:
changes: "{list_of_environment_changes}"
impact: "{development_workflow_impact}"
update_required: "{action_required_by_developers}"
update_instructions:
backup_current: "docker-compose down && cp docker-compose.yml docker-compose.yml.backup"
get_updates: "git pull origin main"
apply_changes: "docker-compose up -d"
verify_services: "docker-compose ps"
new_environment_variables:
- variable: "{VARIABLE_NAME}"
description: "{variable_purpose_and_usage}"
default_value: "{default_or_example_value}"
troubleshooting:
common_issues: "{frequently_encountered_problems}"
resolution_steps: "{step_by_step_problem_resolution}"
escalation_contact: "{support_contact_information}"
```
## Integration Monitoring
### Health Check Coordination
```yaml
health_monitoring:
service_health_checks:
- service: "frontend_app"
endpoint: "https://code-confidence-index.hubtel.com/health"
expected_status: 200
timeout_seconds: 5
- service: "backend_api"
endpoint: "http://localhost:5000/health"
expected_status: 200
timeout_seconds: 3
- service: "database"
connection: "postgresql://localhost:5432/hubtel"
timeout_seconds: 2
integration_validations:
- validation: "frontend_to_backend_api"
test: "Login flow end-to-end test"
endpoint: "POST /api/auth/login"
expected_result: "JWT token returned and user redirected"
- validation: "backend_to_database"
test: "User data persistence test"
operation: "User creation and retrieval"
expected_result: "Data correctly stored and retrieved"
```
### Conflict Resolution Procedures
```yaml
conflict_resolution:
conflict_types:
- type: "api_version_mismatch"
detection: "Frontend expecting different API version than backend provides"
resolution: "Coordinate API versioning strategy and update frontend"
- type: "environment_configuration_mismatch"
detection: "Services unable to communicate due to configuration differences"
resolution: "Synchronize environment configurations and restart affected services"
- type: "database_schema_conflict"
detection: "Application code incompatible with database schema"
resolution: "Coordinate migration sequencing and application updates"
escalation_procedures:
level_1: "Integration coordinator attempts automated resolution"
level_2: "Involve frontend and backend team leads for manual coordination"
level_3: "Escalate to technical architect for design decision"
level_4: "Involve product owner for business impact assessment"
```
## Usage Examples
### API Change Coordination
```yaml
*coordinate-integration
integration_type: "api_change"
affected_services: ["user-service", "frontend-app"]
change_description: "User authentication endpoint changed from /auth to /api/v2/auth"
urgency_level: "high"
```
### Environment Update
```yaml
*coordinate-integration
integration_type: "environment_update"
affected_services: ["redis-cache", "frontend-app", "backend-api"]
change_description: "Add Redis service for session management"
notification_channels: ["teams", "docker-compose-update"]
```
### Deployment Coordination
```yaml
*coordinate-integration
integration_type: "deployment_coordination"
affected_services: ["backend-api", "frontend-app", "database"]
deployment_sequence: ["database-migration", "backend-api", "frontend-app"]
validation_required: true
```
This workflow ensures seamless coordination between development teams, preventing integration conflicts and maintaining development velocity through proactive communication and environment management.
==================== END: .hubtel-workflow/tasks/coordinate-integration.md ====================
==================== START: .hubtel-workflow/tasks/create-onboarding-guide.md ====================
# Create Onboarding Guide
## ⚠️ CRITICAL EXECUTION NOTICE ⚠️
**THIS IS AN EXECUTABLE WORKFLOW - NOT REFERENCE MATERIAL**
When this task is invoked:
1. **PERSONALIZED GUIDANCE** - Create onboarding specific to the engineer's experience and project needs
2. **HANDS-ON APPROACH** - Provide practical, executable steps rather than theoretical knowledge
3. **CONFIDENCE BUILDING** - Structure learning to build competence progressively
4. **IMMEDIATE PRODUCTIVITY** - Focus on getting engineer contributing within hours, not days
## Overview
This workflow creates a comprehensive, personalized onboarding guide that transforms an engineer unfamiliar with a project into a confident contributor ready to make meaningful changes safely and effectively.
## Onboarding Guide Framework
### Phase 1: Project Context & Setup
```yaml
step: establish_project_context
description: Build foundational understanding of what this project does and why it exists
activities:
- business_context_explanation:
- project_purpose: "What business problem does this solve?"
- user_impact: "How do users benefit from this system?"
- hubtel_ecosystem_role: "How does this fit into Hubtel's broader platform?"
- success_metrics: "How is project success measured?"
- recent_priorities: "What are the current focus areas and initiatives?"
- stakeholder_mapping:
- primary_users: "Who are the end users and what do they need?"
- internal_customers: "Which Hubtel teams depend on this project?"
- external_dependencies: "What external systems or partners are involved?"
- decision_makers: "Who makes product and technical decisions?"
- project_timeline_context:
- development_history: "Key milestones and architectural decisions"
- current_phase: "Where the project is in its lifecycle"
- upcoming_initiatives: "Major features or changes planned"
- technical_debt_areas: "Known areas needing improvement"
```
### Phase 2: Technical Foundation Building
```yaml
step: build_technical_foundation
description: Establish deep technical understanding through hands-on exploration
activities:
- guided_environment_setup:
- prerequisites_installation: "Step-by-step tool and dependency setup"
- configuration_walkthrough: "Environment variables and settings explanation"
- verification_checklist: "How to confirm everything is working correctly"
- troubleshooting_guide: "Common setup issues and their solutions"
- architecture_deep_dive:
- system_overview: "High-level architecture with visual diagrams"
- component_relationships: "How major pieces fit together and communicate"
- data_flow_tracing: "Follow data from input to output with examples"
- design_pattern_explanation: "Why specific patterns were chosen and how they work"
- hands_on_code_exploration:
- critical_path_walkthrough: "Step through the most important code paths"
- pattern_identification: "Show repeated patterns and conventions"
- abstraction_layer_explanation: "How different layers separate concerns"
- configuration_deep_dive: "How system behavior is configured and controlled"
```
### Phase 3: Practical Skills Development
```yaml
step: develop_practical_skills
description: Build hands-on capabilities through guided practice and real scenarios
activities:
- development_workflow_mastery:
- local_development_cycle: "Edit → Test → Debug → Verify cycle"
- testing_strategy_practice: "How to write and run different types of tests"
- debugging_technique_training: "Tools and approaches for investigating issues"
- performance_monitoring_understanding: "How to assess and improve system performance"
- change_implementation_training:
- safe_change_identification: "Areas where changes have minimal risk"
- impact_assessment_techniques: "How to understand change implications"
- testing_requirement_determination: "What level of testing different changes need"
- rollback_procedure_understanding: "How to undo changes if needed"
- collaboration_pattern_learning:
- code_review_process: "How to request and provide effective code reviews"
- team_communication_norms: "How to ask questions and share updates"
- documentation_maintenance: "When and how to update project documentation"
- knowledge_sharing_practices: "How to contribute to team learning"
```
### Phase 4: Confidence Validation & Independence
```yaml
step: validate_readiness_and_build_independence
description: Confirm understanding through practical application and build self-sufficiency
activities:
- guided_task_completion:
- starter_task_selection: "Choose appropriate first task based on learning"
- implementation_mentoring: "Provide guidance while engineer implements"
- review_and_feedback: "Thorough review with learning-focused feedback"
- success_celebration: "Acknowledge achievement and build confidence"
- knowledge_validation_exercises:
- scenario_based_questions: "How would you approach common situations?"
- troubleshooting_scenarios: "Walk through investigating sample issues"
- change_impact_assessments: "Analyze implications of proposed changes"
- architectural_decision_discussions: "Understand rationale behind design choices"
- independence_preparation:
- resource_identification: "Where to find answers to future questions"
- escalation_path_clarification: "When and how to ask for help"
- continuous_learning_plan: "How to deepen understanding over time"
- contribution_opportunity_mapping: "Areas where engineer can make meaningful impact"
```
## Personalized Onboarding Strategies
### Based on Engineer Experience Level
#### Junior Engineer Onboarding
```yaml
junior_engineer_approach:
focus_areas:
- fundamental_concepts: "Explain basic patterns and why they exist"
- safety_first: "Emphasize testing and careful change practices"
- learning_resources: "Point to documentation, tutorials, and references"
- mentorship_heavy: "Frequent check-ins and guided practice"
success_criteria:
- can_complete_simple_tasks: "Bug fixes and small feature additions"
- understands_testing: "Can write and run tests for their changes"
- knows_help_sources: "Comfortable asking questions and finding resources"
- follows_patterns: "Consistently applies established coding patterns"
```
#### Mid-Level Engineer Onboarding
```yaml
mid_level_engineer_approach:
focus_areas:
- architectural_understanding: "Why system is designed the way it is"
- performance_awareness: "How changes affect system performance"
- integration_complexity: "How this system interacts with others"
- design_decision_context: "Trade-offs and alternatives considered"
success_criteria:
- can_design_solutions: "Can plan approach for medium complexity features"
- understands_trade_offs: "Aware of performance, security, maintainability implications"
- contributes_to_architecture: "Can participate in design discussions meaningfully"
- mentors_others: "Can help onboard other team members"
```
#### Senior Engineer Onboarding
```yaml
senior_engineer_approach:
focus_areas:
- system_constraints: "Historical decisions and current limitations"
- evolution_strategy: "How system is evolving and why"
- cross_system_impacts: "How changes propagate through ecosystem"
- organizational_context: "Team dynamics and decision-making processes"
success_criteria:
- can_lead_initiatives: "Can drive significant features or improvements"
- identifies_improvements: "Spots opportunities for architectural enhancements"
- influences_decisions: "Contributes meaningfully to strategic technical decisions"
- drives_standards: "Helps establish and evolve team practices"
```
### Based on Project Complexity
#### Simple Project Onboarding
```yaml
simple_project_approach:
characteristics: "Clear patterns, limited dependencies, straightforward architecture"
onboarding_time: "2-4 hours"
focus: "Quick productivity through pattern recognition and hands-on practice"
onboarding_steps:
- "30-minute architecture overview"
- "1-hour hands-on setup and exploration"
- "1-hour guided task completion"
- "30-minute independence validation"
```
#### Complex Project Onboarding
```yaml
complex_project_approach:
characteristics: "Multiple patterns, heavy dependencies, sophisticated architecture"
onboarding_time: "1-2 days"
focus: "Deep understanding building through systematic exploration and mentored practice"
onboarding_steps:
- "2-hour business context and architecture deep dive"
- "4-hour guided code exploration and pattern learning"
- "4-hour hands-on development with mentoring"
- "2-hour advanced scenarios and independence preparation"
```
## Onboarding Deliverables
### Personalized Learning Guide
```markdown
# {Engineer Name}'s {Project Name} Onboarding Guide
## Your Learning Path
Based on your {experience_level} experience and the {project_complexity} complexity of {project_name},
here's your personalized path to productivity:
### Day 1: Foundation Building
- [ ] **9:00-10:30**: Business context and project purpose deep dive
- [ ] **10:45-12:00**: Architecture overview and system boundaries
- [ ] **13:00-14:30**: Environment setup and verification
- [ ] **14:45-16:00**: Guided code exploration and pattern identification
- [ ] **16:00-17:00**: Testing strategy and debugging tools overview
### Day 2: Hands-On Practice
- [ ] **9:00-10:30**: First guided task implementation
- [ ] **10:45-12:00**: Code review and feedback session
- [ ] **13:00-14:30**: Independent task attempt with support
- [ ] **14:45-16:00**: Troubleshooting scenario practice
- [ ] **16:00-17:00**: Knowledge validation and next steps planning
## Your Success Indicators
✅ **Ready for Independent Work When:**
- Can explain system architecture to someone else
- Can implement small features following established patterns
- Can debug issues using logs and monitoring tools
- Can assess impact of proposed changes
- Knows when and how to ask for help
## Your Go-To Resources
📚 **Documentation**: {links_to_key_docs}
🔧 **Tools**: {development_tools_and_shortcuts}
👥 **People**: {team_contacts_and_expertise_areas}
🚨 **Help**: {escalation_paths_and_communication_channels}
```
### Quick Reference Cards
```yaml
quick_reference_deliverables:
architecture_cheat_sheet:
- "System component diagram with responsibilities"
- "Data flow diagram with typical scenarios"
- "Integration points and external dependencies"
development_workflow_card:
- "Local development commands and shortcuts"
- "Testing commands and coverage expectations"
- "Debugging tools and common investigation steps"
- "Deployment process and verification steps"
common_scenarios_guide:
- "How to add a new API endpoint"
- "How to add a new UI component"
- "How to investigate a performance issue"
- "How to handle a production incident"
```
### Confidence Building Exercises
```yaml
hands_on_exercises:
exploration_tasks:
- "Find and explain the authentication flow"
- "Trace a user request from UI to database and back"
- "Locate and understand the error handling patterns"
- "Identify the most critical business logic components"
implementation_challenges:
- "Add logging to an existing function"
- "Write a test for an existing feature"
- "Fix a simple bug with provided reproduction steps"
- "Add a new field to an existing form/API"
scenario_responses:
- "A user reports slow page loading - what do you investigate?"
- "A new feature needs to integrate with external API - what are the considerations?"
- "Production logs show increasing error rates - what's your investigation approach?"
```
This comprehensive onboarding approach ensures engineers gain not just surface knowledge, but deep confidence and practical capability that enables immediate meaningful contribution to any Hubtel project! 🚀
==================== END: .hubtel-workflow/tasks/create-onboarding-guide.md ====================
==================== START: .hubtel-workflow/tasks/hubtel-task-enhancer.md ====================
# Hubtel Task Enhancer
## ⚠️ CRITICAL EXECUTION NOTICE ⚠️
**THIS IS AN EXECUTABLE WORKFLOW - NOT REFERENCE MATERIAL**
When this task is invoked:
1. **JUNIOR ENGINEER READINESS** - All tasks must meet junior developer implementation standards
2. **COMPREHENSIVE ENHANCEMENT** - Add technical context, testing requirements, and implementation guidance
3. **HUBTEL STANDARDS** - Apply Hubtel-specific coding standards and patterns
4. **1-HOUR SIZING** - Ensure all tasks fit within 1-hour implementation windows
## Overview
This workflow transforms basic task descriptions into comprehensive, implementable work items with full Hubtel context, technical guidance, and quality standards. It ensures tasks are ready for successful implementation by developers of all experience levels.
## Input Parameters
### Required Parameters
- **task_content**: Task description, title, and any existing acceptance criteria
- **task_type**: "frontend" | "backend" | "integration" | "full-stack"
### Optional Parameters
- **enhancement_depth**: "basic" | "standard" | "comprehensive" (default: "comprehensive")
- **include_examples**: boolean (default: true)
- **generate_templates**: boolean (default: true)
- **coordination_analysis**: boolean (default: true)
## Enhancement Framework
### Core Enhancement Principles
```yaml
enhancement_principles:
clarity:
- objective_transparency: Task purpose immediately clear
- scope_definition: Explicit boundaries and deliverables
- success_criteria: Unambiguous completion definition
completeness:
- requirements_specification: Clear functional and technical requirements
- acceptance_criteria: Testable completion criteria
- testing_requirements: Basic testing expectations
```
## Enhancement Process
### Phase 0: Codebase Analysis & Technical Context
```yaml
step: codebase_technical_analysis
description: Auto-determine domain placement, patterns, and integration approach
actions:
- run_codebase_analyzer: Execute codebase-analyzer.md to understand project structure
- identify_domain_placement: Auto-determine which business domain tasks belong to
- map_existing_patterns: Find existing code patterns and conventions to follow
- identify_integration_points: Locate existing services and components to reuse
- determine_coding_style: Extract coding conventions and architectural patterns
auto_determined_context:
- domain_location: "Automatically place in appropriate domain (Users, Payments, etc.)"
- implementation_patterns: "Follow existing controller/service/component patterns"
- integration_approach: "Use existing auth, validation, and middleware patterns"
- coding_conventions: "Apply existing naming, folder structure, and style rules"
- testing_patterns: "Follow existing test structure and naming conventions"
technical_decisions:
- no_engineer_questions: "Domain, patterns, and style are auto-determined from codebase"
- pattern_consistency: "New code follows existing architectural decisions"
- integration_reuse: "Leverage existing infrastructure and services"
```
### Phase 1: Content Analysis
```yaml
step: analyze_existing_content
description: Parse and understand current task information
analysis_activities:
- content_parsing:
- extract_requirements: Identify functional and technical requirements
- identify_gaps: Find missing information and unclear specifications
- categorize_complexity: Assess technical complexity and scope
- detect_dependencies: Identify potential dependencies and integrations
- context_assessment:
- business_value: Understand user and business impact
- technical_implications: Assess technical challenges and considerations
- integration_points: Identify API and service integration needs
- testing_requirements: Determine necessary testing strategies
```
### Phase 2: Gap Analysis with Engineer Input Integration
```yaml
step: identify_enhancement_gaps
description: Determine what information needs to be added, combining codebase analysis with engineer input
gap_categories:
- business_logic_gaps:
- missing_business_rules: Business logic not specified in Azure task (from engineer)
- unclear_user_behavior: Ambiguous expected user flow and interaction (from engineer)
- undefined_validation_rules: Unspecified data validation requirements (from engineer)
- error_handling_scenarios: Missing error and edge case handling (from engineer)
- technical_gaps_auto_resolved:
- implementation_patterns: Auto-determined from codebase analysis
- architecture_integration: Auto-determined from existing code patterns
- domain_placement: Auto-determined from codebase structure
- coding_conventions: Auto-determined from existing code style
- enhancement_synthesis:
- combine_contexts: Merge engineer business input with codebase technical context
- generate_complete_requirements: Create comprehensive requirements from both sources
- validate_consistency: Ensure business requirements align with technical constraints
engineer_input_integration:
- business_context_only: "Engineer provides business logic, user flow, validation rules"
- technical_context_automated: "Codebase analyzer provides patterns, domain, integration"
- no_redundant_questions: "Never ask engineers about technical decisions auto-determined"
```
### Phase 3: Technical Context Addition
```yaml
step: add_technical_context
description: Add minimal technical context for requirement clarity
context_enhancements:
- technology_stack:
- framework: Next.js/Nuxt.js or .NET Core
- database: PostgreSQL/MongoDB
- testing: Vitest/Playwright or Karate
- hubtel_standards:
- security_requirements: Authentication and authorization needs
- performance_expectations: Response time requirements
```
### Phase 4: Acceptance Criteria Generation
```yaml
step: generate_comprehensive_criteria
description: Create detailed, testable acceptance criteria
criteria_categories:
- functional_criteria:
- user_interactions: Expected user interface behavior
- business_logic: Core functionality and business rules
- data_handling: Input validation and data processing
- integration_behavior: API and service interaction expectations
- technical_criteria:
- performance_requirements: Response time and throughput expectations
- security_validations: Authentication and authorization checks
- error_handling: Graceful degradation and error messaging
- compatibility_requirements: Browser, device, or service compatibility
- testing_criteria:
- unit_test_coverage: Minimum coverage percentage and critical paths
- integration_tests: End-to-end user journey validations
- accessibility_tests: WCAG compliance and keyboard navigation
- performance_tests: Load testing and optimization validation
```
### Phase 5: Implementation Guidance
```yaml
step: add_implementation_guidance
description: Provide high-level technical direction without detailed code
guidance_components:
- approach_recommendations:
- architectural_patterns: Recommended design patterns (name only)
- technology_choices: Specific frameworks to use
- implementation_approach: High-level development approach
- reference_materials:
- documentation_links: Relevant Hubtel documentation sections
- pattern_references: Links to existing similar implementations
```
### Phase 6: Testing Requirements Specification
```yaml
step: specify_testing_requirements
description: Define basic testing requirements
testing_specifications:
- unit_testing:
- coverage_requirements: Minimum 85% code coverage
- framework: Vitest for frontend, NUnit for backend
- integration_testing:
- end_to_end_scenarios: Critical user journey validation
- api_testing: Karate tests for backend endpoints
```
### Phase 7: Coordination Requirements
```yaml
step: identify_coordination_needs
description: Determine basic coordination requirements
coordination_analysis:
- frontend_backend_coordination:
- api_dependencies: Required API endpoints
- data_alignment: Shared data requirements
- environment_coordination:
- configuration_changes: Environment or infrastructure updates needed
```
## Output Format
### Enhanced Task Structure
```yaml
enhanced_task:
metadata:
original_task_id: "AZ-123"
enhancement_timestamp: "2024-01-15T10:30:00Z"
estimated_implementation_hours: 1
enhanced_content:
title: "Clear, specific task title"
overview:
business_purpose: "Why this task is needed and its business value"
technical_objective: "What will be implemented"
user_impact: "How this affects end users"
requirements:
functional:
- requirement: "Specific functional requirement"
priority: "high|medium|low"
technical:
- requirement: "Technical requirement"
- framework: "Next.js|.NET Core"
performance:
- metric: "Response time < 200ms"
acceptance_criteria:
- criterion: "Given/When/Then format testable condition"
category: "functional|technical|performance|security"
testing_requirements:
unit_tests:
framework: "Vitest|NUnit"
coverage_minimum: "85%"
integration_tests:
framework: "Playwright|Karate"
scenarios: ["Critical user journeys to validate"]
coordination_needs:
frontend_backend: "API dependencies if any"
environment: "Configuration changes if any"
definition_of_done:
- "Requirements implemented"
- "Acceptance criteria met"
- "Tests passing"
- "Code reviewed"
```
## Quality Validation
### Junior Engineer Readiness Checklist
```yaml
readiness_validation:
clarity_check:
- objective_clear: Can junior engineer understand what to build?
- scope_defined: Are boundaries and deliverables explicit?
- success_measurable: Can completion be objectively verified?
requirements_completeness:
- functional_requirements: Are functional requirements clearly defined?
- acceptance_criteria: Are acceptance criteria testable and specific?
- technical_context: Are basic technical requirements specified?
```
## Usage Examples
### Frontend Task Enhancement
```yaml
input:
task_content: "Create user dashboard"
task_type: "frontend"
output:
enhanced_title: "Implement responsive user dashboard with real-time balance display and transaction history"
requirements: "Display user balance, show transaction history, responsive design"
acceptance_criteria: "User can view current balance, transaction list loads within 2s, mobile responsive"
testing_requirements: "Unit tests for components, E2E tests for user flows"
```
### Backend Task Enhancement
```yaml
input:
task_content: "User authentication API"
task_type: "backend"
output:
enhanced_title: "Implement JWT-based user authentication API with refresh token support"
requirements: "User login endpoint, JWT token generation, refresh token handling"
acceptance_criteria: "Login returns valid JWT, refresh endpoint works, tokens expire properly"
testing_requirements: "API tests for endpoints, unit tests for auth logic"
```
This workflow ensures that all tasks entering Hubtel's development pipeline are enhanced with clear requirements and acceptance criteria suitable for implementation.
==================== END: .hubtel-workflow/tasks/hubtel-task-enhancer.md ====================
==================== START: .hubtel-workflow/tasks/progress-tracker.md ====================
# Progress Tracker
## ⚠️ CRITICAL EXECUTION NOTICE ⚠️
**THIS IS AN EXECUTABLE WORKFLOW - NOT REFERENCE MATERIAL**
When this task is invoked:
1. **LIVE PROGRESS MONITORING** - Real-time tracking of workflow execution across all agents
2. **STATE PERSISTENCE** - Maintain persistent workflow state for resumption capability
3. **COORDINATION STATUS** - Track agent handoffs and coordination points
4. **COMPLETION VALIDATION** - Verify workflow objectives and quality gates
## Overview
This workflow maintains comprehensive progress tracking throughout the entire engineering workflow, providing real-time visibility, state persistence, and coordination status across all participating agents and task groups.
## Input Parameters
### Required Parameters
- **workflow_id**: Unique identifier for the workflow being tracked
- **tracking_mode**: "create" | "update" | "status" | "complete"
### Optional Parameters
- **detail_level**: "summary" | "detailed" | "comprehensive" (default: "detailed")
- **update_data**: Progress update data when tracking_mode is "update"
- **completion_data**: Final results when tracking_mode is "complete"
## Execution Steps
### Phase 1: Progress Tracking Initialization
```yaml
step: initialize_tracking
description: Setup comprehensive progress tracking system
actions:
- create_progress_document: Generate progress-checklist-{workflow_id}.md
- create_state_document: Generate workflow-state-{workflow_id}.yaml
- setup_coordination_log: Initialize agent coordination tracking
- establish_checkpoints: Define key progress milestones
- initialize_metrics: Setup time tracking and completion metrics
tracking_structure:
workflow_overview:
- total_tasks: "Number of tasks in workflow"
- task_groups: "Number of logical groups created"
- phases: "List of workflow phases"
- estimated_duration: "Total estimated completion time"
phase_tracking:
- current_phase: "Active workflow phase"
- phase_progress: "Completion percentage for current phase"
- next_phase: "Upcoming phase in workflow"
- phase_duration: "Time spent in current phase"
agent_coordination:
- active_agents: "Currently executing agents"
- pending_handoffs: "Agents waiting for handoff data"
- completed_handoffs: "Successfully completed agent transitions"
- coordination_issues: "Any coordination problems or delays"
```
### Phase 2: Real-Time Progress Updates
```yaml
step: live_progress_monitoring
description: Continuously update progress as workflow executes
actions:
- monitor_agent_status: Track status of all active agents
- update_task_completion: Mark individual tasks as completed
- track_coordination_events: Log agent handoffs and coordination points
- measure_phase_progress: Calculate completion percentage for each phase
- identify_blockers: Detect and log any workflow blockers or issues
update_triggers:
- agent_completion: "When an agent completes its assigned work"
- phase_transition: "When workflow moves to next phase"
- coordination_event: "When agents exchange data or coordinate"
- user_checkpoint: "When user reviews and approves progress"
- error_occurrence: "When errors or issues are encountered"
progress_metrics:
- tasks_completed: "Number of tasks fully implemented and tested"
- phases_completed: "Number of workflow phases completed"
- agent_efficiency: "Agent completion time vs estimates"
- coordination_success: "Successful handoffs vs total handoffs"
- quality_gates_passed: "Quality validations successfully completed"
```
### Phase 3: Coordination Status Tracking
```yaml
step: coordination_monitoring
description: Track agent coordination and handoff status
actions:
- monitor_handoff_queue: Track pending agent handoffs
- validate_data_flow: Ensure data properly passed between agents
- track_coordination_health: Monitor coordination success rates
- identify_coordination_bottlenecks: Detect coordination delays or failures
- maintain_agent_synchronization: Ensure agents have required context
coordination_events:
- handoff_initiated: "Agent begins handoff process to next agent"
- handoff_completed: "Receiving agent confirms data receipt and context"
- coordination_required: "Multiple agents need to coordinate on shared work"
- coordination_completed: "Multi-agent coordination successfully finished"
- coordination_failed: "Coordination attempt failed, requires intervention"
coordination_health_metrics:
- handoff_success_rate: "Percentage of successful agent handoffs"
- average_handoff_time: "Time required for agent transitions"
- coordination_efficiency: "Coordination overhead vs actual work time"
- data_integrity: "Data consistency maintained across agent boundaries"
```
### Phase 4: Quality Gate Monitoring
```yaml
step: quality_gate_tracking
description: Monitor quality checkpoints and validation gates
actions:
- track_validation_gates: Monitor quality validation checkpoints
- measure_quality_metrics: Track code quality, test coverage, standards compliance
- validate_completion_criteria: Ensure all completion criteria met
- monitor_review_readiness: Track code review preparation status
- assess_deployment_readiness: Evaluate readiness for deployment
quality_checkpoints:
- task_enhancement_quality: "Tasks meet junior engineer readiness standards"
- implementation_quality: "Code meets Hubtel coding standards"
- testing_coverage: "Test coverage meets minimum requirements (85%)"
- review_preparation: "All code prepared for review, no direct commits"
- integration_validation: "All integrations working correctly"
- documentation_completeness: "Documentation updated and complete"
quality_metrics:
- standards_compliance: "Adherence to Hubtel coding standards"
- test_coverage_percentage: "Automated test coverage percentage"
- review_readiness_score: "Readiness for code review process"
- integration_health: "Status of all system integrations"
```
### Phase 5: Completion Validation
```yaml
step: completion_validation
description: Validate workflow completion and generate final report
actions:
- validate_all_tasks_complete: Verify all tasks fully implemented
- check_quality_gates_passed: Confirm all quality checkpoints met
- validate_coordination_complete: Ensure all agent coordination finished
- generate_completion_report: Create comprehensive completion summary
- archive_workflow_state: Preserve workflow state for future reference
completion_criteria:
- all_tasks_implemented: "Every task in workflow fully implemented"
- all_tests_passing: "All unit, integration, and E2E tests passing"
- code_review_ready: "All code prepared for review with no direct commits"
- integration_validated: "All system integrations working correctly"
- documentation_complete: "All documentation updated and complete"
- quality_standards_met: "All Hubtel quality standards satisfied"
final_validation:
- workflow_objectives_met: "All original workflow objectives achieved"
- no_outstanding_issues: "No unresolved issues or blockers"
- handoff_complete: "All agent handoffs successfully completed"
- state_consistent: "Workflow state consistent and complete"
```
## Output Format
### Live Progress Status
```yaml
progress_status:
workflow:
id: "batch-20241214-143022"
status: "in_progress"
current_phase: "implementation"
overall_progress: "65%"
elapsed_time: "2.5 hours"
estimated_remaining: "1.5 hours"
phases:
- phase: "task_import"
status: "completed"
progress: "100%"
duration: "15 minutes"
quality_gates_passed: true
- phase: "task_enhancement"
status: "completed"
progress: "100%"
duration: "30 minutes"
quality_gates_passed: true
- phase: "implementation"
status: "in_progress"
progress: "65%"
duration: "1.75 hours"
quality_gates_passed: false
current_activities:
- "Backend API implementation: 80% complete"
- "Frontend component implementation: 50% complete"
task_groups:
- group_id: "backend-api-implementation"
status: "completed"
progress: "100%"
agent: "hubtel-backend-dev"
tasks_completed: ["AZ-123", "AZ-125"]
quality_validation: "passed"
handoff_status: "completed"
- group_id: "frontend-ui-implementation"
status: "in_progress"
progress: "75%"
agent: "hubtel-frontend-dev"
tasks_completed: []
current_task: "AZ-124"
quality_validation: "pending"
handoff_status: "pending"
- group_id: "testing-validation"
status: "pending"
progress: "0%"
agent: "hubtel-test-engineer"
tasks_completed: []
dependencies_met: false
handoff_status: "waiting"
```
### Coordination Status
```yaml
coordination_status:
active_handoffs:
- from_agent: "hubtel-backend-dev"
to_agent: "hubtel-integration-coordinator"
status: "completed"
data_package: "API contracts and database schema"
timestamp: "2024-12-14T15:30:22Z"
- from_agent: "hubtel-integration-coordinator"
to_agent: "hubtel-frontend-dev"
status: "in_progress"
data_package: "Updated API contracts and integration guidelines"
timestamp: "2024-12-14T15:45:10Z"
coordination_health:
handoff_success_rate: "100%"
average_handoff_time: "5 minutes"
coordination_efficiency: "95%"
outstanding_issues: 0
agent_status:
- agent: "hubtel-backend-dev"
status: "completed"
work_completed: ["AZ-123", "AZ-125"]
handoff_completed: true
- agent: "hubtel-frontend-dev"
status: "active"
current_work: "AZ-124"
progress: "75%"
estimated_completion: "30 minutes"
- agent: "hubtel-test-engineer"
status: "waiting"
waiting_for: ["frontend-ui-implementation"]
ready_to_start: false
```
### Quality Metrics
```yaml
quality_metrics:
overall_quality_score: "92%"
quality_gates:
- gate: "task_enhancement_quality"
status: "passed"
score: "100%"
details: "All tasks meet junior engineer readiness standards"
- gate: "implementation_quality"
status: "in_progress"
score: "85%"
details: "Backend code meets standards, frontend code in review"
- gate: "testing_coverage"
status: "pending"
score: "N/A"
details: "Testing phase not yet started"
- gate: "review_preparation"
status: "partial"
score: "50%"
details: "Backend code prepared, frontend code pending"
compliance_metrics:
hubtel_coding_standards: "100%"
test_coverage_target: "85%"
documentation_completeness: "90%"
review_readiness: "50%"
```
## Progress Checklist Template
### Dynamic Progress Checklist
```markdown
# Engineering Workflow Progress - Batch 20241214-143022
## Workflow Overview
- **Total Tasks**: 4 (AZ-123, AZ-124, AZ-125, AZ-126)
- **Task Groups**: 3 groups created
- **Start Time**: 2024-12-14 14:30:22
- **Estimated Duration**: 4 hours
- **Current Status**: In Progress (65% complete)
## Phase Progress
### ✅ Phase 1: Task Import & Analysis (COMPLETED)
- ✅ Batch import from Azure DevOps (4 tasks retrieved)
- ✅ Task relationship analysis completed
- ✅ Intelligent grouping created (3 groups)
- ✅ Dependencies mapped and validated
- ✅ Workflow state document created
### ✅ Phase 2: Task Enhancement (COMPLETED)
- ✅ All tasks enhanced to junior engineer readiness
- ✅ Implementation context added to all tasks
- ✅ Quality validation completed
- ✅ Agent assignments confirmed
### 🔄 Phase 3: Implementation (IN PROGRESS - 65%)
- ✅ **Backend Group** (hubtel-backend-dev)
- ✅ AZ-123: API endpoint implementation
- ✅ AZ-125: Database integration
- ✅ Karate API tests created
- ✅ Code prepared for review
- 🔄 **Frontend Group** (hubtel-frontend-dev)
- 🔄 AZ-124: Next.js component (75% complete)
- ⏳ API integration pending
- ⏳ Vitest tests pending
- ⏳ **Testing Group** (hubtel-test-engineer)
- ⏳ AZ-126: Waiting for implementation completion
### ⏳ Phase 4: Quality Validation (PENDING)
- ⏳ Integration testing
- ⏳ E2E test execution
- ⏳ Coverage validation (target: 85%)
- ⏳ Final quality gates
## Agent Coordination Status
### ✅ Completed Handoffs
- ✅ batch-azure-processor → hubtel-task-processor
- ✅ hubtel-task-processor → hubtel-backend-dev
- ✅ hubtel-backend-dev → hubtel-integration-coordinator
### 🔄 Active Handoffs
- 🔄 hubtel-integration-coordinator → hubtel-frontend-dev (in progress)
### ⏳ Pending Handoffs
- ⏳ hubtel-frontend-dev → hubtel-test-engineer
## Quality Gates Status
- ✅ Task enhancement quality (100%)
- 🔄 Implementation quality (85% - backend complete, frontend in progress)
- ⏳ Testing coverage (pending)
- 🔄 Review preparation (50% - backend ready, frontend pending)
## Next Steps
1. **Immediate**: Complete frontend component implementation (AZ-124)
2. **Next**: Frontend code review preparation
3. **Then**: Begin comprehensive testing phase (AZ-126)
4. **Finally**: Quality validation and workflow completion
## Issues & Blockers
- No current blockers
- All dependencies resolved
- Agent coordination proceeding smoothly
---
*Last Updated: 2024-12-14 16:15:33 by Isaac Workflow Orchestrator*
```
## Integration Points
### Workflow Integration
- **Real-time updates**: Continuous progress updates from all participating agents
- **State persistence**: Workflow state maintained across all phases and resumptions
- **Coordination visibility**: Complete visibility into agent handoffs and coordination
### Agent Integration
- **Progress reporting**: All agents report progress to centralized tracker
- **State synchronization**: Shared workflow state across all agents
- **Coordination facilitation**: Progress tracker facilitates agent handoffs
### Quality Assurance
- **Quality gate monitoring**: Continuous monitoring of all quality checkpoints
- **Completion validation**: Comprehensive validation of workflow completion
- **Standards compliance**: Ensure all Hubtel quality standards maintained throughout
==================== END: .hubtel-workflow/tasks/progress-tracker.md ====================
==================== START: .hubtel-workflow/tasks/task-grouping-analyzer.md ====================
# Task Grouping Analyzer
## ⚠️ CRITICAL EXECUTION NOTICE ⚠️
**THIS IS AN EXECUTABLE WORKFLOW - NOT REFERENCE MATERIAL**
When this task is invoked:
1. **RELATIONSHIP ANALYSIS** - Deep analysis of task dependencies and relationships
2. **INTELLIGENT GROUPING** - Create logical implementation groups for coordinated execution
3. **COORDINATION PLANNING** - Determine optimal agent assignment and execution order
4. **DEPENDENCY MAPPING** - Build complete dependency graph for workflow planning
## Overview
This workflow performs comprehensive analysis of imported tasks to create intelligent groupings that optimize implementation coordination, minimize dependencies conflicts, and ensure efficient agent utilization.
## Input Parameters
### Required Parameters
- **tasks_data**: Array of imported task objects with full Azure DevOps metadata
- **workflow_context**: Current workflow state and coordination requirements
### Optional Parameters
- **grouping_strategy**: "technical" | "functional" | "hybrid" (default: "hybrid")
- **max_group_size**: integer (default: 5) - Maximum tasks per group
- **coordination_complexity**: "simple" | "standard" | "complex" (default: "standard")
## Execution Steps
### Phase 1: Task Relationship Discovery
```yaml
step: relationship_analysis
description: Analyze all relationships between imported tasks
actions:
- link_analysis: Extract parent/child, predecessor/successor relationships
- epic_feature_mapping: Group tasks by Epic/Feature hierarchy
- work_item_type_analysis: Categorize by Task, Bug, User Story, etc.
- assignee_analysis: Identify team/developer assignments
- area_path_analysis: Group by product area or component
- iteration_analysis: Consider sprint/iteration assignments
relationship_types:
- hierarchical: "Parent-Child, Epic-Feature-Task relationships"
- sequential: "Predecessor-Successor, blocking dependencies"
- technical: "Same component, API contract dependencies"
- functional: "Same feature area, user journey relationships"
- team: "Same assignee, same team assignments"
output:
relationship_graph:
nodes: "List of all tasks with metadata"
edges: "Relationships with type and strength scoring"
clusters: "Preliminary grouping based on relationship strength"
```
### Phase 2: User Story & Domain Analysis
```yaml
step: user_story_domain_analysis
description: Analyze tasks by user stories and business domains for proper grouping
actions:
- user_story_extraction: Extract user stories and acceptance criteria from tasks
- domain_identification: Identify business domain and feature area
- user_journey_mapping: Map tasks to complete user journeys
- feature_scope_analysis: Determine feature boundaries and scope
- domain_expertise_requirements: Identify required domain knowledge
domain_based_grouping:
user_story_focus:
- primary_user_story: "Main user story being implemented"
- related_user_stories: "Connected user stories in same feature"
- user_journey_phase: "Which part of user journey this supports"
- acceptance_criteria: "User acceptance criteria defining success"
business_domain:
- domain_area: "Business domain (payments, user management, notifications, etc.)"
- feature_module: "Specific feature module within domain"
- stakeholder_group: "Primary stakeholders affected"
- business_value: "Business value delivered by this group"
technical_specialization:
- frontend_focus: "Frontend tasks grouped by user interface flows"
- backend_focus: "Backend tasks grouped by business logic domains"
- integration_focus: "Integration tasks grouped by data flow"
- testing_focus: "Testing tasks grouped by user scenario validation"
grouping_strategy:
- user_story_cohesion: "Group tasks that belong to same user story"
- domain_expertise: "Group tasks requiring same domain knowledge"
- frontend_user_flows: "Frontend tasks grouped by user interface flows"
- backend_business_logic: "Backend tasks grouped by business domain logic"
- end_to_end_features: "Complete features from frontend to backend"
```
### Phase 3: Intelligent Grouping Algorithm
```yaml
step: intelligent_grouping
description: Create optimal groups using hybrid algorithm
actions:
- dependency_graph_analysis: Build complete dependency graph
- critical_path_identification: Identify critical path through dependencies
- coordination_minimization: Group to minimize cross-group coordination
- agent_workload_balancing: Distribute work evenly across agents
- implementation_order_optimization: Order groups for optimal execution flow
grouping_algorithm:
1. primary_clustering: "Group by strongest relationships (Epic/Feature)"
2. technical_separation: "Separate by technical stack to avoid conflicts"
3. dependency_ordering: "Order groups by dependency requirements"
4. coordination_optimization: "Minimize required cross-group communication"
5. size_balancing: "Balance group sizes for parallel execution"
6. complexity_distribution: "Distribute complexity evenly across groups"
group_validation:
- dependency_conflicts: "Ensure no circular dependencies between groups"
- coordination_feasibility: "Verify coordination requirements are manageable"
- implementation_feasibility: "Confirm groups can be implemented by assigned agents"
- size_constraints: "Ensure groups fit within size limits"
```
### Phase 4: Coordination Planning
```yaml
step: coordination_planning
description: Plan agent coordination and execution sequence
actions:
- execution_sequence: Determine optimal group execution order
- agent_assignment: Assign primary and supporting agents to each group
- handoff_planning: Plan data handoffs between groups and agents
- coordination_checkpoints: Identify points requiring coordination
- parallel_execution_opportunities: Identify groups that can run in parallel
coordination_strategy:
sequential_groups:
- dependencies: "Groups with hard dependencies must execute in sequence"
- data_flow: "Groups that produce data for other groups"
- validation_gates: "Groups requiring validation before subsequent groups"
parallel_groups:
- independent: "Groups with no dependencies can run in parallel"
- different_stacks: "Frontend and backend groups can often run in parallel"
- separate_components: "Different product areas can run in parallel"
agent_coordination:
primary_agent: "Main agent responsible for group implementation"
supporting_agents: "Agents providing assistance or validation"
coordination_agent: "Agent managing handoffs and integration"
```
### Phase 5: Group Optimization
```yaml
step: group_optimization
description: Optimize groups for maximum efficiency and coordination
actions:
- dependency_minimization: Reduce cross-group dependencies where possible
- coordination_simplification: Simplify coordination requirements
- parallelization_maximization: Increase opportunities for parallel execution
- resource_optimization: Optimize agent utilization and workload distribution
optimization_criteria:
- minimize_dependencies: "Reduce number of cross-group dependencies"
- maximize_parallelism: "Increase groups that can execute in parallel"
- balance_complexity: "Distribute implementation complexity evenly"
- optimize_coordination: "Minimize required coordination overhead"
- ensure_quality: "Maintain quality standards and validation gates"
validation_checks:
- dependency_integrity: "Verify all dependencies are properly handled"
- coordination_feasibility: "Ensure coordination plan is executable"
- quality_standards: "Confirm all groups meet Hubtel quality standards"
- agent_capability: "Verify assigned agents can handle group requirements"
```
## Output Format
### Group Analysis Results
```yaml
grouping_results:
summary:
total_tasks: 4
groups_created: 3
dependency_chains: 2
parallel_opportunities: 1
coordination_complexity: "standard"
groups:
- group_id: "backend-api-implementation"
tasks: ["AZ-123", "AZ-125"]
category: "backend"
complexity: 4
estimated_effort: "2 hours"
primary_agent: "hubtel-backend-dev"
supporting_agents: []
coordination_agent: "hubtel-integration-coordinator"
dependencies: []
provides_data_to: ["frontend-ui-implementation", "testing-validation"]
technical_scope:
- "REST API endpoints"
- "Entity Framework models"
- "Database migrations"
- "Karate API tests"
coordination_requirements:
- "API contract definition for frontend"
- "Database schema coordination"
- "OpenTelemetry configuration"
- group_id: "frontend-ui-implementation"
tasks: ["AZ-124"]
category: "frontend"
complexity: 3
estimated_effort: "1 hour"
primary_agent: "hubtel-frontend-dev"
supporting_agents: []
coordination_agent: "hubtel-integration-coordinator"
dependencies: ["backend-api-implementation"]
provides_data_to: ["testing-validation"]
technical_scope:
- "Next.js/Nuxt.js components"
- "API integration"
- "Responsive design"
- "Vitest unit tests"
coordination_requirements:
- "API contract consumption"
- "UI/UX consistency"
- "State management integration"
- group_id: "testing-validation"
tasks: ["AZ-126"]
category: "testing"
complexity: 2
estimated_effort: "1 hour"
primary_agent: "hubtel-test-engineer"
supporting_agents: ["hubtel-backend-dev", "hubtel-frontend-dev"]
coordination_agent: "hubtel-test-engineer"
dependencies: ["backend-api-implementation", "frontend-ui-implementation"]
provides_data_to: []
technical_scope:
- "Integration test suite"
- "E2E Playwright tests"
- "Coverage validation"
- "Quality gates"
coordination_requirements:
- "Test data coordination"
- "Environment setup"
- "Coverage reporting"
```
### Coordination Plan
```yaml
coordination_plan:
execution_sequence:
phase_1:
groups: ["backend-api-implementation"]
parallel: false
rationale: "Foundation APIs required for other groups"
coordination_checkpoints:
- "API contract finalization"
- "Database schema validation"
phase_2:
groups: ["frontend-ui-implementation"]
parallel: false
rationale: "Depends on API contracts from phase 1"
coordination_checkpoints:
- "API integration validation"
- "UI component completion"
phase_3:
groups: ["testing-validation"]
parallel: false
rationale: "Requires completed implementation from phases 1 & 2"
coordination_checkpoints:
- "Test suite execution"
- "Coverage validation"
- "Quality gate completion"
agent_handoffs:
- from_agent: "batch-azure-processor"
to_agent: "hubtel-task-processor"
data_package: "Enhanced task definitions with group context"
trigger: "Grouping analysis complete"
- from_agent: "hubtel-task-processor"
to_agent: "hubtel-backend-dev"
data_package: "Backend group tasks with implementation details"
trigger: "Task enhancement complete"
- from_agent: "hubtel-backend-dev"
to_agent: "hubtel-integration-coordinator"
data_package: "API contracts and database schema"
trigger: "Backend implementation complete"
```
### Dependency Graph
```yaml
dependency_graph:
nodes:
- id: "AZ-123"
type: "backend_task"
group: "backend-api-implementation"
dependencies: []
dependents: ["AZ-124", "AZ-126"]
- id: "AZ-124"
type: "frontend_task"
group: "frontend-ui-implementation"
dependencies: ["AZ-123"]
dependents: ["AZ-126"]
- id: "AZ-125"
type: "backend_task"
group: "backend-api-implementation"
dependencies: []
dependents: ["AZ-126"]
- id: "AZ-126"
type: "testing_task"
group: "testing-validation"
dependencies: ["AZ-123", "AZ-124", "AZ-125"]
dependents: []
critical_path: ["AZ-123", "AZ-124", "AZ-126"]
parallel_opportunities: [["AZ-123", "AZ-125"]]
coordination_points: ["API_contract_definition", "Integration_validation", "Testing_coordination"]
```
## Integration Points
### Workflow Integration
- **Input source**: `batch-azure-processor` provides raw task data
- **Output target**: `workflow-orchestrator` receives optimized groups
- **Coordination**: Seamless handoff with complete group context
### Agent Coordination
- **Group assignments**: Each group assigned to optimal specialized agent
- **Coordination agents**: Integration coordinator manages cross-group coordination
- **Handoff data**: Complete implementation context provided to each agent
### Quality Assurance
- **Dependency validation**: All dependencies properly mapped and validated
- **Coordination feasibility**: All coordination requirements verified as manageable
- **Implementation readiness**: Groups ready for immediate implementation by assigned agents
==================== END: .hubtel-workflow/tasks/task-grouping-analyzer.md ====================
==================== START: .hubtel-workflow/tasks/test-project-analysis.md ====================
# Test Project Analysis
## ⚠️ CRITICAL EXECUTION NOTICE ⚠️
**THIS IS AN EXECUTABLE WORKFLOW - NOT REFERENCE MATERIAL**
When this task is invoked:
1. **MANDATORY PROJECT SCANNING** - Analyze entire project structure for testing setup
2. **FRAMEWORK DETECTION** - Identify all testing frameworks and configurations
3. **COVERAGE ANALYSIS** - Assess current test coverage and quality
4. **COMPREHENSIVE REPORT** - Generate detailed analysis with actionable insights
## Overview
This workflow performs comprehensive analysis of a project's testing setup, identifies testing frameworks, analyzes coverage, and provides detailed recommendations for improving test quality and coverage.
## Input Parameters
### Required Parameters
- **project_path**: Absolute path to the project root directory
- **analysis_depth**: "basic" | "standard" | "comprehensive" (default: "comprehensive")
### Optional Parameters
- **include_dependencies**: boolean (default: true)
- **analyze_performance**: boolean (default: true)
- **check_accessibility**: boolean (default: true)
- **validate_security**: boolean (default: true)
## Analysis Framework
### Phase 1: Project Structure Analysis
```yaml
step: analyze_project_structure
description: Scan project structure to understand architecture and testing setup
analysis_activities:
- directory_mapping:
- scan_source_directories: Identify src/, lib/, components/ directories
- find_test_directories: Locate __tests__/, test/, spec/ directories
- detect_config_files: Find testing configuration files
- map_file_patterns: Identify naming conventions and patterns
- framework_detection:
- frontend_frameworks: Detect React, Vue, Next.js, Nuxt.js
- backend_frameworks: Identify .NET Core, Node.js, Express
- testing_frameworks: Find Vitest, Jest, Playwright, Cypress, Karate, NUnit
- build_tools: Identify Vite, Webpack, build configurations
```
### Phase 2: Testing Framework Analysis
```yaml
step: analyze_testing_frameworks
description: Deep analysis of configured testing frameworks and their setup
framework_analysis:
- frontend_testing:
- unit_test_runner: Vitest, Jest configuration and setup
- component_testing: Testing Library, Enzyme setup
- e2e_framework: Playwright, Cypress configuration
- mocking_strategy: MSW, manual mocks, module mocking
- backend_testing:
- api_testing: Karate feature files and configuration
- unit_testing: NUnit, xUnit test structure
- integration_testing: Test containers, database testing
- mutation_testing: Stryker.NET or similar setup
- configuration_quality:
- test_scripts: Package.json test commands
- ci_integration: GitHub Actions, Azure DevOps pipelines
- coverage_tools: Coverage reporters and thresholds
- quality_gates: Lint rules, code quality checks
```
### Phase 3: Test Coverage Analysis
```yaml
step: analyze_test_coverage
description: Comprehensive analysis of existing test coverage and quality
coverage_analysis:
- quantitative_metrics:
- line_coverage: Percentage of lines covered by tests
- branch_coverage: Percentage of code branches tested
- function_coverage: Percentage of functions with tests
- statement_coverage: Detailed statement-level coverage
- qualitative_assessment:
- test_quality: Assertion quality, test structure, maintainability
- edge_case_coverage: Boundary conditions, error scenarios
- integration_coverage: API endpoints, database interactions
- user_journey_coverage: End-to-end workflow testing
- gap_identification:
- uncovered_files: Files without any test coverage
- critical_paths: Important business logic without tests
- error_handling: Missing error scenario testing
- accessibility_gaps: Components without accessibility tests
```
### Phase 4: Test Quality Assessment
```yaml
step: assess_test_quality
description: Evaluate existing tests for quality, maintainability, and effectiveness
quality_metrics:
- test_structure:
- organization: Test file organization and naming
- readability: Clear test descriptions and structure
- maintainability: DRY principles, helper functions
- performance: Test execution speed and reliability
- assertion_quality:
- meaningful_assertions: Tests verify actual behavior
- error_messages: Clear failure messages for debugging
- test_isolation: Independent tests without side effects
- data_setup: Proper test data and mocking strategies
- best_practices:
- aaa_pattern: Arrange, Act, Assert structure
- single_responsibility: One concept per test
- descriptive_names: Clear test naming conventions
- cleanup_procedures: Proper test cleanup and teardown
```
### Phase 5: Framework Compatibility Analysis
```yaml
step: analyze_framework_compatibility
description: Assess how well current testing setup aligns with Hubtel standards
compatibility_check:
- hubtel_standards:
- required_frameworks: Vitest, Playwright, Karate, NUnit alignment
- coverage_requirements: 85% minimum coverage compliance
- accessibility_testing: WCAG AA testing requirements
- performance_benchmarks: Response time testing standards
- integration_assessment:
- ci_cd_integration: Pipeline testing integration
- reporting_tools: Coverage and quality reporting
- automation_level: Test automation coverage
- monitoring_integration: Test result monitoring and alerting
```
## Output Format
### Comprehensive Analysis Report
```yaml
project_analysis_report:
summary:
project_name: "Project Name"
analysis_timestamp: "2024-01-15T10:30:00Z"
total_files_analyzed: 156
test_files_found: 45
overall_coverage_score: 67.5
quality_score: 8.2
framework_detection:
frontend:
primary_framework: "Next.js"
testing_runner: "Vitest"
e2e_framework: "Playwright"
component_testing: "@testing-library/react"
backend:
primary_framework: ".NET Core"
unit_testing: "NUnit"
api_testing: "Karate"
integration_testing: "TestContainers"
coverage_analysis:
overall_metrics:
line_coverage: 67.5
branch_coverage: 62.1
function_coverage: 71.8
statement_coverage: 68.2
by_category:
components: 78.5
services: 65.2
utilities: 82.1
api_endpoints: 45.7
business_logic: 71.3
critical_gaps:
- path: "src/services/payment-processor.ts"
coverage: 23.4
priority: "high"
reason: "Critical business logic with low coverage"
- path: "src/api/user-management.ts"
coverage: 31.2
priority: "high"
reason: "Security-sensitive code needs more tests"
quality_assessment:
test_quality_score: 8.2
strengths:
- "Well-organized test structure"
- "Good use of testing utilities"
- "Clear test descriptions"
areas_for_improvement:
- priority: "high"
issue: "Missing error scenario testing"
affected_files: 23
recommendation: "Add error handling and edge case tests"
- priority: "medium"
issue: "Inconsistent mocking strategies"
affected_files: 12
recommendation: "Standardize mock patterns across tests"
hubtel_compliance:
standards_met: 6
standards_total: 10
compliance_score: 60
compliance_gaps:
- standard: "85% minimum coverage"
current: "67.5%"
gap: "17.5%"
action: "Add tests for uncovered critical paths"
- standard: "Accessibility testing"
current: "15% of components tested"
gap: "85% components missing a11y tests"
action: "Implement WCAG AA testing for all components"
recommendations:
immediate_actions:
- priority: 1
action: "Add tests for payment-processor.ts"
estimated_effort: "4 hours"
impact: "High security and business impact"
- priority: 2
action: "Implement accessibility testing setup"
estimated_effort: "6 hours"
impact: "Compliance and user experience"
strategic_improvements:
- category: "Framework Optimization"
recommendation: "Migrate remaining Jest tests to Vitest"
benefit: "Consistent tooling and better performance"
effort: "8 hours"
- category: "Coverage Enhancement"
recommendation: "Implement mutation testing"
benefit: "Validate test quality and effectiveness"
effort: "12 hours"
detailed_file_analysis:
high_priority_files:
- path: "src/components/Dashboard.tsx"
coverage: 45.2
test_file: "src/components/__tests__/Dashboard.test.tsx"
issues:
- "Missing error state testing"
- "No accessibility tests"
- "Incomplete prop validation tests"
recommendations:
- "Add error boundary testing"
- "Implement WCAG compliance tests"
- "Test all prop combinations"
```
## Usage Examples
### Basic Project Analysis
```yaml
input:
project_path: "/path/to/project"
analysis_depth: "basic"
```
### Comprehensive Analysis
```yaml
input:
project_path: "/path/to/project"
analysis_depth: "comprehensive"
include_dependencies: true
analyze_performance: true
check_accessibility: true
```
### Targeted Analysis
```yaml
input:
project_path: "/path/to/project"
focus_areas: ["coverage", "quality", "compliance"]
exclude_patterns: ["node_modules", "dist", "build"]
```
This workflow provides comprehensive insights into project testing setup, identifies improvement opportunities, and generates actionable recommendations for achieving Hubtel testing standards.
==================== END: .hubtel-workflow/tasks/test-project-analysis.md ====================
==================== START: .hubtel-workflow/tasks/test-report-generator.md ====================
# Test Report Generator
## ⚠️ CRITICAL EXECUTION NOTICE ⚠️
**THIS IS AN EXECUTABLE WORKFLOW - NOT REFERENCE MATERIAL**
When this task is invoked:
1. **COMPREHENSIVE DATA COLLECTION** - Gather all testing metrics and results
2. **DETAILED ANALYSIS** - Process coverage, quality, and compliance data
3. **VISUAL REPORTING** - Generate charts, graphs, and visual representations
4. **ACTIONABLE INSIGHTS** - Provide specific recommendations with priorities
## Overview
This workflow generates comprehensive testing reports that combine coverage analysis, quality metrics, compliance assessment, and actionable recommendations. Reports are designed for both technical teams and stakeholders.
## Input Parameters
### Required Parameters
- **project_path**: Absolute path to the project root
- **report_type**: "summary" | "detailed" | "executive" | "technical"
- **output_format**: "markdown" | "html" | "pdf" | "json"
### Optional Parameters
- **include_trends**: boolean (default: true)
- **compare_baseline**: string (baseline report path for comparison)
- **focus_areas**: array ["coverage", "quality", "performance", "accessibility", "security"]
- **stakeholder_level**: "developer" | "lead" | "manager" | "executive"
## Report Generation Framework
### Phase 1: Data Collection and Analysis
```yaml
step: collect_testing_data
description: Gather comprehensive testing metrics from various sources
data_collection:
- coverage_metrics:
- line_coverage: Parse coverage reports (lcov, cobertura)
- branch_coverage: Extract branch coverage data
- function_coverage: Analyze function-level coverage
- file_coverage: Per-file coverage breakdown
- test_execution_data:
- test_results: Pass/fail rates, test counts
- performance_metrics: Test execution times
- flaky_tests: Tests with inconsistent results
- error_patterns: Common failure reasons
- quality_metrics:
- test_maintainability: Code complexity in tests
- assertion_quality: Meaningful vs trivial assertions
- test_isolation: Dependencies and side effects
- code_duplication: DRY violations in tests
```
### Phase 2: Compliance Assessment
```yaml
step: assess_hubtel_compliance
description: Evaluate project against Hubtel testing standards
compliance_evaluation:
- coverage_standards:
- minimum_coverage: 85% requirement assessment
- critical_path_coverage: Business logic coverage
- edge_case_coverage: Error and boundary testing
- regression_coverage: Bug prevention testing
- framework_compliance:
- required_frameworks: Vitest, Playwright, Karate, NUnit usage
- configuration_standards: Proper setup and configuration
- naming_conventions: Test file and function naming
- organization_patterns: Test structure and organization
- accessibility_compliance:
- wcag_aa_testing: Accessibility test coverage
- screen_reader_tests: Assistive technology compatibility
- keyboard_navigation: Navigation testing coverage
- color_contrast_tests: Visual accessibility validation
```
### Phase 3: Trend Analysis and Comparison
```yaml
step: analyze_trends_and_changes
description: Compare current metrics with historical data and baselines
trend_analysis:
- coverage_trends:
- coverage_over_time: Historical coverage progression
- coverage_by_feature: Feature-specific coverage trends
- regression_detection: Coverage decreases over time
- improvement_velocity: Rate of coverage improvement
- quality_trends:
- test_reliability: Flakiness trends over time
- performance_trends: Test execution speed changes
- maintainability_trends: Test complexity evolution
- defect_correlation: Test quality vs bug rates
- baseline_comparison:
- coverage_delta: Changes since baseline
- quality_improvements: Quality metric improvements
- new_gaps: Newly introduced coverage gaps
- resolved_issues: Fixed testing issues
```
### Phase 4: Report Generation
```yaml
step: generate_comprehensive_report
description: Create detailed testing report with visual elements and recommendations
report_generation:
- executive_summary:
- key_metrics_overview: High-level testing health
- compliance_status: Standards compliance summary
- critical_issues: Priority issues requiring attention
- success_highlights: Recent improvements and achievements
- detailed_analysis:
- coverage_breakdown: Detailed coverage analysis by component
- quality_assessment: Test quality metrics and trends
- performance_analysis: Test execution and reliability metrics
- compliance_review: Standard-by-standard compliance analysis
- visual_representations:
- coverage_charts: Coverage trends and breakdowns
- quality_graphs: Quality metrics visualization
- compliance_dashboards: Standards compliance overview
- trend_analysis: Historical data visualization
- actionable_recommendations:
- priority_matrix: Issues prioritized by impact and effort
- improvement_roadmap: Step-by-step improvement plan
- resource_requirements: Time and skill estimates
- success_metrics: KPIs for tracking improvement
```
## Report Templates
### Executive Summary Template
```markdown
# Testing Quality Report - Executive Summary
## 📊 Key Metrics Overview
- **Overall Test Coverage**: 78.5% ⬆️ (+5.2% from last month)
- **Quality Score**: 8.4/10 ⬆️ (+0.3 improvement)
- **Compliance Level**: 85% ✅ (Meeting Hubtel standards)
- **Critical Issues**: 3 🚨 (Down from 8 last month)
## 🎯 Compliance Status
| Standard | Status | Score | Trend |
|----------|--------|-------|-------|
| Minimum Coverage (85%) | ⚠️ | 78.5% | ⬆️ |
| Framework Compliance | ✅ | 95% | ➡️ |
| Accessibility Testing | 🚨 | 45% | ⬆️ |
| Performance Testing | ✅ | 90% | ⬆️ |
## 🚨 Critical Actions Required
1. **Increase Coverage** - 23 files below 60% coverage
2. **Accessibility Testing** - 67% of components missing a11y tests
3. **API Testing** - 5 critical endpoints without integration tests
## 🏆 Recent Achievements
- ✅ Migrated all tests to Vitest (100% complete)
- ✅ Implemented Playwright E2E testing framework
- ✅ Reduced test execution time by 35%
```
### Technical Report Template
```markdown
# Comprehensive Testing Analysis Report
## 📋 Project Overview
- **Project**: Hubtel Payment Platform
- **Analysis Date**: 2024-01-15
- **Total Files**: 1,247
- **Test Files**: 342
- **Frameworks**: Vitest, Playwright, Karate, NUnit
## 📈 Coverage Analysis
### Overall Coverage Metrics
```json
{
"line_coverage": 78.5,
"branch_coverage": 74.2,
"function_coverage": 82.1,
"statement_coverage": 79.3
}
```
### Coverage by Category
| Category | Coverage | Files | Status |
|----------|----------|-------|--------|
| Components | 85.2% | 89 | ✅ Good |
| Services | 72.1% | 45 | ⚠️ Needs Work |
| Utils | 91.4% | 23 | ✅ Excellent |
| API Routes | 58.7% | 34 | 🚨 Critical |
### Critical Coverage Gaps
1. **Payment Processing** (`src/services/payment/`)
- Current Coverage: 45.2%
- Critical Business Logic: ❌ Not Covered
- Recommendation: Priority 1 - Add comprehensive tests
2. **Authentication Service** (`src/auth/`)
- Current Coverage: 62.8%
- Security Impact: 🚨 High
- Recommendation: Priority 1 - Security testing required
## 🧪 Test Quality Analysis
### Quality Metrics
- **Test Reliability**: 94.2% (6 flaky tests identified)
- **Average Execution Time**: 45.3s (Target: <60s) ✅
- **Maintainability Score**: 8.4/10
- **Assertion Quality**: 87.3%
### Best Practices Compliance
- ✅ AAA Pattern: 94% of tests
- ✅ Descriptive Names: 89% of tests
- ⚠️ Single Responsibility: 76% of tests
- 🚨 Proper Cleanup: 62% of tests
## 🎯 Framework Analysis
### Frontend Testing (Next.js)
- **Unit Testing**: Vitest ✅ Properly configured
- **Component Testing**: @testing-library/react ✅
- **E2E Testing**: Playwright ✅ Setup complete
- **Coverage**: 82.4% ✅ Above target
### Backend Testing (.NET Core)
- **Unit Testing**: NUnit ✅ Well structured
- **API Testing**: Karate ✅ 67% endpoints covered
- **Integration**: TestContainers ⚠️ Limited usage
- **Coverage**: 71.8% ⚠️ Below target
## 📊 Accessibility Testing
### Current State
- **Components Tested**: 23/89 (25.8%)
- **WCAG AA Compliance**: 15/23 tested components
- **Screen Reader Tests**: 8 components
- **Keyboard Navigation**: 12 components
### Accessibility Gaps
1. **Form Components** - 12 forms missing a11y tests
2. **Modal Dialogs** - 5 modals without screen reader tests
3. **Navigation** - Main navigation missing keyboard tests
## 🚀 Performance Testing
### Test Performance Metrics
- **Average Test Suite Runtime**: 45.3s
- **Slowest Test File**: `payment.integration.test.ts` (8.2s)
- **Parallel Execution**: ✅ Enabled
- **CI Pipeline Time**: 3m 42s ✅ Under 5min target
### Performance Recommendations
1. **Optimize slow tests** - 8 tests taking >500ms
2. **Increase parallelization** - Current: 4 workers, Recommended: 6
3. **Mock optimization** - Replace real API calls in 12 tests
## 📋 Action Plan & Recommendations
### Immediate Actions (Next 2 Weeks)
1. **🚨 Priority 1**: Add tests for payment processing service
- Estimated Effort: 12 hours
- Impact: Critical business logic protection
- Assignee: Senior Developer
2. **🚨 Priority 1**: Security testing for authentication
- Estimated Effort: 8 hours
- Impact: Security vulnerability prevention
- Assignee: Security-focused Developer
3. **⚠️ Priority 2**: Implement accessibility testing framework
- Estimated Effort: 16 hours
- Impact: Compliance and user experience
- Assignee: Frontend Team
### Strategic Improvements (Next Month)
1. **Coverage Enhancement**
- Target: Reach 85% overall coverage
- Focus: API routes and service layers
- Timeline: 4 weeks
2. **Test Quality Improvement**
- Implement mutation testing
- Standardize testing patterns
- Timeline: 3 weeks
3. **CI/CD Integration**
- Enhanced coverage reporting
- Quality gates implementation
- Timeline: 2 weeks
## 📈 Success Metrics & KPIs
### Monthly Targets
- **Coverage**: Reach 85% (current: 78.5%)
- **Quality Score**: Maintain >8.5/10 (current: 8.4)
- **Flaky Tests**: <5 (current: 6)
- **CI Pipeline**: <5min (current: 3m 42s) ✅
### Quarterly Goals
- **Accessibility**: 90% component coverage
- **Performance**: All tests <100ms average
- **Compliance**: 100% Hubtel standards
- **Innovation**: Implement AI-assisted test generation
```
## Output Formats
### Markdown Report
```markdown
# [Generated comprehensive markdown report as shown above]
```
### HTML Dashboard
```html
Testing Quality Dashboard
```
### JSON Data Export
```json
{
"report_metadata": {
"generated_at": "2024-01-15T10:30:00Z",
"project": "hubtel-payment-platform",
"report_type": "comprehensive"
},
"summary_metrics": {
"coverage": 78.5,
"quality_score": 8.4,
"compliance_level": 85,
"critical_issues": 3
},
"detailed_analysis": {
"coverage_breakdown": {...},
"quality_metrics": {...},
"compliance_assessment": {...}
},
"recommendations": [...],
"action_items": [...]
}
```
This comprehensive reporting system provides detailed insights into testing quality, compliance status, and actionable recommendations for continuous improvement.
==================== END: .hubtel-workflow/tasks/test-report-generator.md ====================
==================== START: .hubtel-workflow/tasks/uac-generator.md ====================
# UAC Generator
## ⚠️ CRITICAL EXECUTION NOTICE ⚠️
**THIS IS AN EXECUTABLE WORKFLOW - NOT REFERENCE MATERIAL**
When this task is invoked:
1. **USER ACCEPTANCE CRITERIA GENERATION** - Create comprehensive acceptance criteria for task groups
2. **TEST CASE CREATION** - Generate detailed test cases serving as user stories/UAC
3. **VALIDATION RULES SETUP** - Establish validation rules for implementation success
4. **CONFIRMATION WORKFLOW** - Present UAC to user for confirmation before implementation
## Overview
This workflow generates comprehensive User Acceptance Criteria (UAC) and test cases for task groups, ensuring clear success criteria and validation rules before implementation begins. It creates testable acceptance criteria that serve as both implementation guidance and validation checkpoints.
## Input Parameters
### Required Parameters
- **task_groups**: Array of task group objects with enhanced task details
- **workflow_context**: Current workflow state and requirements
### Optional Parameters
- **uac_depth**: "basic" | "standard" | "comprehensive" (default: "comprehensive")
- **test_case_types**: Array of test types ["unit", "integration", "e2e", "acceptance"] (default: all)
- **validation_level**: "functional" | "technical" | "business" | "complete" (default: "complete")
## Execution Steps
### Phase 1: UAC Analysis & Planning
```yaml
step: uac_analysis
description: Analyze task groups to determine UAC requirements
actions:
- analyze_business_requirements: Extract business value and user impact
- identify_functional_requirements: Determine functional behavior requirements
- assess_technical_requirements: Identify technical validation needs
- map_user_journeys: Trace user interactions and workflows
- determine_success_criteria: Define clear success metrics
analysis_categories:
business_value:
- user_impact: "How implementation affects end users"
- business_benefit: "Business value delivered by implementation"
- success_metrics: "Measurable outcomes indicating success"
functional_behavior:
- core_functionality: "Primary functions being implemented"
- edge_cases: "Boundary conditions and error scenarios"
- integration_points: "How implementation integrates with existing systems"
technical_validation:
- performance_criteria: "Performance requirements and benchmarks"
- security_requirements: "Security validation and compliance needs"
- compatibility_requirements: "Browser, device, and system compatibility"
```
### Phase 2: Test Case Generation
```yaml
step: test_case_generation
description: Generate comprehensive test cases for each task group
actions:
- create_unit_test_cases: Generate unit test specifications
- create_integration_test_cases: Generate integration test specifications
- create_e2e_test_cases: Generate end-to-end test scenarios
- create_acceptance_test_cases: Generate user acceptance test scenarios
- validate_test_coverage: Ensure complete coverage of requirements
test_case_structure:
unit_tests:
- test_id: "Unique identifier for test case"
- description: "Clear description of what is being tested"
- preconditions: "Required setup and initial state"
- test_steps: "Detailed steps to execute test"
- expected_results: "Expected outcome of test execution"
- validation_criteria: "How to determine if test passes"
integration_tests:
- test_scenario: "Integration scenario being validated"
- systems_involved: "All systems participating in integration"
- data_flow: "Expected data flow between systems"
- validation_points: "Key points to validate integration success"
e2e_tests:
- user_journey: "Complete user workflow being tested"
- user_persona: "Type of user performing the workflow"
- workflow_steps: "Step-by-step user actions"
- success_criteria: "Criteria indicating successful user journey"
acceptance_tests:
- business_scenario: "Business scenario being validated"
- acceptance_criteria: "Criteria for business acceptance"
- stakeholder_validation: "How stakeholders validate success"
```
### Phase 3: Validation Rules Creation
```yaml
step: validation_rules_creation
description: Create comprehensive validation rules for implementation success
actions:
- define_functional_validation: Create functional behavior validation rules
- define_technical_validation: Create technical performance validation rules
- define_integration_validation: Create integration success validation rules
- define_quality_validation: Create code quality validation rules
- define_user_experience_validation: Create UX validation rules
validation_categories:
functional_validation:
- core_features: "All primary features working as specified"
- error_handling: "Proper error handling and user feedback"
- data_integrity: "Data consistency and accuracy maintained"
- business_logic: "Business rules correctly implemented"
technical_validation:
- performance_benchmarks: "Response times and throughput requirements"
- security_compliance: "Security standards and vulnerability checks"
- compatibility_testing: "Cross-browser and device compatibility"
- scalability_validation: "System performance under load"
integration_validation:
- api_contracts: "API contracts maintained and functional"
- data_flow: "Correct data flow between system components"
- third_party_integrations: "External system integrations working"
- environment_consistency: "Consistent behavior across environments"
quality_validation:
- code_standards: "Adherence to Hubtel coding standards"
- test_coverage: "Minimum 85% test coverage achieved"
- documentation: "Complete and accurate documentation"
- review_readiness: "Code prepared for review process"
```
### Phase 4: UAC Document Generation
```yaml
step: uac_document_generation
description: Generate comprehensive UAC document for user review and confirmation
actions:
- compile_acceptance_criteria: Combine all acceptance criteria into structured document
- organize_test_scenarios: Organize test cases by priority and execution order
- create_validation_checklist: Create checklist for implementation validation
- generate_confirmation_format: Create user-friendly format for UAC confirmation
- prepare_implementation_guidance: Provide clear guidance for implementation teams
document_structure:
executive_summary:
- workflow_overview: "High-level description of workflow and objectives"
- business_value: "Expected business value and user impact"
- success_metrics: "Key metrics indicating successful implementation"
acceptance_criteria:
- functional_requirements: "Detailed functional acceptance criteria"
- technical_requirements: "Technical validation and performance criteria"
- user_experience_requirements: "UX and usability acceptance criteria"
- integration_requirements: "Integration and compatibility requirements"
test_scenarios:
- priority_1_tests: "Critical tests that must pass for basic functionality"
- priority_2_tests: "Important tests for full feature functionality"
- priority_3_tests: "Additional tests for edge cases and optimization"
validation_checklist:
- implementation_checklist: "Checklist for implementation teams"
- testing_checklist: "Checklist for testing validation"
- review_checklist: "Checklist for code review process"
- deployment_checklist: "Checklist for deployment readiness"
```
### Phase 5: User Confirmation Workflow
```yaml
step: user_confirmation
description: Present UAC to user for review and confirmation
actions:
- present_uac_summary: Show high-level UAC summary for initial review
- provide_detailed_uac: Present complete UAC document for thorough review
- facilitate_uac_discussion: Enable user questions and clarifications
- capture_uac_modifications: Record any requested changes or additions
- confirm_implementation_approval: Obtain formal approval to proceed with implementation
confirmation_process:
1. summary_presentation: "Present executive summary and key acceptance criteria"
2. detailed_review: "Provide access to complete UAC document"
3. clarification_phase: "Address user questions and concerns"
4. modification_phase: "Incorporate user-requested changes"
5. final_approval: "Obtain confirmation to proceed with implementation"
confirmation_criteria:
- acceptance_criteria_approved: "User confirms acceptance criteria are complete and accurate"
- test_scenarios_validated: "User validates test scenarios cover all requirements"
- success_metrics_agreed: "User agrees on success metrics and validation approach"
- implementation_authorized: "User authorizes proceeding with implementation"
```
## Output Format
### UAC Document
```yaml
uac_document:
metadata:
workflow_id: "batch-20241214-143022"
generation_timestamp: "2024-12-14T15:00:00Z"
task_groups_covered: 3
total_test_cases: 24
validation_rules: 16
executive_summary:
objective: "Implement user profile management system with API backend and responsive frontend"
business_value: "Enable users to manage profiles efficiently with 50% reduction in support tickets"
success_metrics:
- "Profile updates complete in <2 seconds"
- "95% user satisfaction score"
- "Zero data loss incidents"
- "85%+ test coverage achieved"
acceptance_criteria:
backend_group:
functional_requirements:
- "RESTful API endpoints for profile CRUD operations"
- "Proper input validation and error handling"
- "Secure authentication and authorization"
- "Audit logging for all profile changes"
technical_requirements:
- "API response time <500ms for 95% of requests"
- "Database queries optimized for performance"
- "Proper error codes and messages returned"
- "OpenTelemetry logging integrated"
validation_criteria:
- "All Karate API tests pass"
- "Database migrations execute successfully"
- "API documentation updated and accurate"
- "Security scan passes with no high-severity issues"
frontend_group:
functional_requirements:
- "Responsive profile management interface"
- "Real-time validation and user feedback"
- "Seamless API integration"
- "Accessible design following WCAG guidelines"
technical_requirements:
- "Page load time <3 seconds"
- "Mobile-responsive design (320px+)"
- "Cross-browser compatibility (Chrome, Firefox, Safari, Edge)"
- "Proper error handling and user notifications"
validation_criteria:
- "All Vitest unit tests pass"
- "Playwright E2E tests pass"
- "Accessibility audit passes"
- "Performance lighthouse score >90"
```
### Test Cases
```yaml
test_cases:
unit_tests:
- test_id: "UT-001"
group: "backend-api-implementation"
description: "Validate user profile creation with valid data"
preconditions: "Clean database state, valid authentication token"
test_steps:
- "Send POST request to /api/profiles with valid profile data"
- "Verify response status is 201 Created"
- "Verify profile data is correctly stored in database"
- "Verify audit log entry is created"
expected_results: "Profile created successfully with all data persisted"
validation_criteria: "Database contains new profile with correct data"
- test_id: "UT-002"
group: "frontend-ui-implementation"
description: "Validate profile form validation with invalid email"
preconditions: "Profile form loaded, user authenticated"
test_steps:
- "Enter invalid email format in email field"
- "Attempt to submit form"
- "Verify validation message appears"
- "Verify form submission is prevented"
expected_results: "Form shows validation error, prevents submission"
validation_criteria: "User sees clear error message, form not submitted"
integration_tests:
- test_id: "IT-001"
group: "integration-validation"
description: "Validate end-to-end profile update workflow"
systems_involved: ["Frontend UI", "Backend API", "Database", "Audit System"]
workflow_steps:
- "User loads profile page"
- "User modifies profile information"
- "User submits changes"
- "Frontend sends API request"
- "Backend validates and persists changes"
- "Audit log entry created"
- "Success confirmation shown to user"
success_criteria: "Profile updated in database, audit logged, user notified"
e2e_tests:
- test_id: "E2E-001"
group: "testing-validation"
description: "Complete user profile management journey"
user_persona: "Standard authenticated user"
journey_steps:
- "User logs into application"
- "User navigates to profile page"
- "User views current profile information"
- "User edits profile details"
- "User saves changes"
- "User receives confirmation"
- "User logs out and logs back in"
- "User verifies changes persisted"
success_criteria: "All profile changes saved and persistent across sessions"
```
### Validation Rules
```yaml
validation_rules:
functional_validation:
- rule_id: "FV-001"
description: "All CRUD operations must complete successfully"
validation_method: "Automated API testing"
success_criteria: "100% of CRUD operations return success status"
- rule_id: "FV-002"
description: "Input validation must prevent invalid data submission"
validation_method: "Boundary value testing"
success_criteria: "Invalid inputs rejected with appropriate error messages"
technical_validation:
- rule_id: "TV-001"
description: "API response times must meet performance requirements"
validation_method: "Load testing with performance monitoring"
success_criteria: "95% of requests complete within 500ms"
- rule_id: "TV-002"
description: "Frontend must be responsive across all device sizes"
validation_method: "Responsive design testing"
success_criteria: "UI functions correctly on devices 320px and wider"
quality_validation:
- rule_id: "QV-001"
description: "Code coverage must meet minimum threshold"
validation_method: "Automated coverage reporting"
success_criteria: "85% or higher test coverage achieved"
- rule_id: "QV-002"
description: "All code must pass linting and formatting checks"
validation_method: "Automated linting and formatting validation"
success_criteria: "Zero linting errors, consistent formatting"
```
### Confirmation Checklist
```yaml
confirmation_checklist:
uac_review:
- acceptance_criteria_complete: "☐ All acceptance criteria reviewed and approved"
- test_scenarios_validated: "☐ Test scenarios cover all requirements adequately"
- validation_rules_agreed: "☐ Validation rules are comprehensive and appropriate"
- success_metrics_confirmed: "☐ Success metrics are measurable and achievable"
implementation_approval:
- scope_confirmed: "☐ Implementation scope is clear and agreed upon"
- timeline_acceptable: "☐ Estimated timeline is acceptable"
- resource_allocation_approved: "☐ Resource allocation and agent assignments approved"
- quality_standards_understood: "☐ Quality standards and gates understood"
coordination_agreement:
- agent_coordination_plan_approved: "☐ Agent coordination plan is satisfactory"
- progress_tracking_acceptable: "☐ Progress tracking approach is acceptable"
- communication_plan_agreed: "☐ Communication and update plan agreed upon"
- escalation_process_understood: "☐ Issue escalation process understood"
final_authorization:
- proceed_with_implementation: "☐ Authorized to proceed with implementation"
- uac_document_accepted: "☐ UAC document accepted as implementation contract"
- validation_approach_confirmed: "☐ Validation approach confirmed for completion"
```
## Integration Points
### Workflow Integration
- **Input source**: Receives enhanced task groups from `task-grouping-analyzer`
- **Output target**: Provides UAC document to `workflow-orchestrator` for user confirmation
- **Coordination**: Seamless integration with implementation and validation phases
### Agent Integration
- **UAC guidance**: Provides implementation guidance to all specialized agents
- **Validation criteria**: Establishes clear success criteria for agent work
- **Quality gates**: Defines quality checkpoints for agent validation
### User Experience
- **Clear presentation**: UAC presented in user-friendly format for easy review
- **Interactive confirmation**: Facilitates user questions and modifications
- **Implementation contract**: Serves as agreed-upon contract for implementation success
==================== END: .hubtel-workflow/tasks/uac-generator.md ====================
==================== START: .hubtel-workflow/tasks/unit-test-generator.md ====================
# Unit Test Generator
## ⚠️ CRITICAL EXECUTION NOTICE ⚠️
**THIS IS AN EXECUTABLE WORKFLOW - NOT REFERENCE MATERIAL**
When this task is invoked:
1. **CODE ANALYSIS** - Analyze source code structure, dependencies, and logic flows
2. **TEST CASE GENERATION** - Create comprehensive test cases covering all scenarios
3. **FRAMEWORK-SPECIFIC IMPLEMENTATION** - Generate tests using appropriate testing frameworks
4. **QUALITY VALIDATION** - Ensure tests follow best practices and achieve high coverage
## Overview
This workflow analyzes source code and generates high-quality unit tests using the appropriate testing framework for the technology stack. It creates comprehensive test suites covering normal cases, edge cases, and error scenarios.
## Input Parameters
### Required Parameters
- **file_path**: Absolute path to the source file to test
- **test_framework**: "vitest" | "jest" | "nunit" | "auto-detect"
### Optional Parameters
- **coverage_target**: number (default: 90)
- **include_edge_cases**: boolean (default: true)
- **mock_dependencies**: boolean (default: true)
- **generate_integration_helpers**: boolean (default: true)
- **accessibility_tests**: boolean (default: true for components)
## Test Generation Framework
### Phase 1: Source Code Analysis
```yaml
step: analyze_source_code
description: Comprehensive analysis of source code to understand structure and behavior
code_analysis:
- structure_analysis:
- function_identification: Extract all functions, methods, and exports
- dependency_mapping: Map imports, external dependencies, and internal modules
- type_analysis: Analyze TypeScript types, interfaces, and props
- complexity_assessment: Evaluate cyclomatic complexity and edge cases
- behavior_analysis:
- input_output_mapping: Identify function inputs and expected outputs
- side_effect_detection: Find state mutations, API calls, DOM manipulation
- error_conditions: Identify potential error scenarios and exceptions
- async_patterns: Detect promises, async/await, callbacks
- framework_detection:
- component_analysis: React/Vue component props, state, lifecycle
- service_analysis: Business logic, data processing, API services
- utility_analysis: Pure functions, helpers, transformations
- hook_analysis: Custom hooks, state management patterns
```
### Phase 2: Test Case Design
```yaml
step: design_test_cases
description: Create comprehensive test scenarios covering all code paths
test_case_design:
- happy_path_scenarios:
- normal_inputs: Standard use cases with expected inputs
- typical_workflows: Common user interactions and data flows
- success_conditions: Verify correct behavior under normal conditions
- expected_outputs: Validate return values and side effects
- edge_case_scenarios:
- boundary_conditions: Min/max values, empty/null inputs
- unusual_inputs: Special characters, extreme values, type mismatches
- state_transitions: Component lifecycle, state changes
- timing_conditions: Race conditions, delayed responses
- error_scenarios:
- invalid_inputs: Malformed data, wrong types, missing parameters
- network_failures: API errors, timeout conditions
- permission_errors: Authentication, authorization failures
- system_errors: Out of memory, file system issues
- integration_scenarios:
- dependency_interactions: How component interacts with dependencies
- event_handling: User events, system events, custom events
- data_flow_testing: Props down, events up patterns
- context_usage: React Context, global state interactions
```
### Phase 3: Mock Strategy Development
```yaml
step: develop_mocking_strategy
description: Create comprehensive mocking strategy for dependencies and external services
mocking_strategy:
- dependency_mocking:
- external_apis: HTTP clients, REST services, GraphQL
- database_access: ORMs, query builders, direct DB connections
- file_system: File operations, configuration loading
- third_party_libraries: Payment gateways, analytics, notifications
- component_mocking:
- child_components: Mock complex child components
- custom_hooks: Mock custom hook implementations
- context_providers: Mock React Context providers
- higher_order_components: Mock HOC wrapping
- service_mocking:
- business_services: Core business logic services
- utility_services: Logging, caching, validation
- infrastructure_services: Message queues, event buses
- configuration_services: Environment, feature flags
```
### Phase 4: Test Implementation Generation
```yaml
step: generate_test_implementation
description: Generate framework-specific test implementations with best practices
implementation_generation:
- test_structure:
- describe_blocks: Logical grouping of related tests
- test_organization: Clear naming and categorization
- setup_teardown: Proper before/after hooks
- test_isolation: Independent test execution
- assertion_patterns:
- behavior_assertions: Verify actual behavior vs expected
- state_assertions: Check component/service state changes
- interaction_assertions: Verify function calls and parameters
- output_assertions: Validate return values and side effects
- framework_specific:
- vitest_patterns: Vitest-specific utilities and matchers
- testing_library: Component testing with user events
- nunit_patterns: .NET testing patterns and attributes
- async_testing: Promise/async handling patterns
```
## Framework-Specific Implementation
### Vitest/React Component Tests
```typescript
// Generated test for React component
import { render, screen, fireEvent, waitFor } from '@testing-library/react'
import { vi, describe, it, expect, beforeEach } from 'vitest'
import { UserDashboard } from '../UserDashboard'
import { useAuth } from '../hooks/useAuth'
import { fetchUserData } from '../services/userService'
// Mock dependencies
vi.mock('../hooks/useAuth')
vi.mock('../services/userService')
const mockUseAuth = vi.mocked(useAuth)
const mockFetchUserData = vi.mocked(fetchUserData)
describe('UserDashboard', () => {
const defaultProps = {
userId: 'user123',
onUserUpdate: vi.fn(),
theme: 'light'
}
beforeEach(() => {
vi.clearAllMocks()
mockUseAuth.mockReturnValue({
user: { id: 'user123', name: 'John Doe', role: 'user' },
isAuthenticated: true,
loading: false
})
})
describe('Rendering', () => {
it('should render user dashboard with user information', () => {
render()
expect(screen.getByText('Welcome, John Doe')).toBeInTheDocument()
expect(screen.getByRole('main')).toHaveAttribute('aria-label', 'User Dashboard')
})
it('should show loading state when user data is loading', () => {
mockUseAuth.mockReturnValue({
user: null,
isAuthenticated: true,
loading: true
})
render()
expect(screen.getByRole('progressbar')).toBeInTheDocument()
expect(screen.getByText('Loading dashboard...')).toBeInTheDocument()
})
it('should handle unauthenticated state', () => {
mockUseAuth.mockReturnValue({
user: null,
isAuthenticated: false,
loading: false
})
render()
expect(screen.getByText('Please log in to access your dashboard')).toBeInTheDocument()
})
})
describe('User Interactions', () => {
it('should call onUserUpdate when profile is edited', async () => {
render()
const editButton = screen.getByRole('button', { name: /edit profile/i })
fireEvent.click(editButton)
const nameInput = screen.getByLabelText(/name/i)
fireEvent.change(nameInput, { target: { value: 'Jane Doe' } })
const saveButton = screen.getByRole('button', { name: /save/i })
fireEvent.click(saveButton)
await waitFor(() => {
expect(defaultProps.onUserUpdate).toHaveBeenCalledWith({
id: 'user123',
name: 'Jane Doe',
role: 'user'
})
})
})
it('should handle keyboard navigation', () => {
render()
const dashboard = screen.getByRole('main')
fireEvent.keyDown(dashboard, { key: 'Tab' })
expect(screen.getByRole('button', { name: /edit profile/i })).toHaveFocus()
})
})
describe('Data Fetching', () => {
it('should fetch user data on mount', async () => {
mockFetchUserData.mockResolvedValue({
profile: { avatar: 'avatar.jpg', preferences: {} },
stats: { loginCount: 42 }
})
render()
expect(mockFetchUserData).toHaveBeenCalledWith('user123')
await waitFor(() => {
expect(screen.getByText('Login Count: 42')).toBeInTheDocument()
})
})
it('should handle fetch errors gracefully', async () => {
mockFetchUserData.mockRejectedValue(new Error('Network error'))
render()
await waitFor(() => {
expect(screen.getByText('Unable to load dashboard data')).toBeInTheDocument()
})
})
})
describe('Accessibility', () => {
it('should have proper ARIA labels and roles', () => {
render()
expect(screen.getByRole('main')).toHaveAttribute('aria-label', 'User Dashboard')
expect(screen.getByRole('button', { name: /edit profile/i })).toBeInTheDocument()
expect(screen.getByLabelText(/user statistics/i)).toBeInTheDocument()
})
it('should announce loading state to screen readers', () => {
mockUseAuth.mockReturnValue({
user: null,
isAuthenticated: true,
loading: true
})
render()
expect(screen.getByRole('progressbar')).toHaveAttribute('aria-label', 'Loading dashboard')
})
})
describe('Error Boundaries', () => {
it('should handle component errors gracefully', () => {
const ThrowingComponent = () => {
throw new Error('Test error')
}
const consoleSpy = vi.spyOn(console, 'error').mockImplementation(() => {})
expect(() => {
render(
)
}).not.toThrow()
consoleSpy.mockRestore()
})
})
})
```
### NUnit/.NET Service Tests
```csharp
// Generated test for .NET service
using NUnit.Framework;
using Moq;
using FluentAssertions;
using Microsoft.Extensions.Logging;
using Hubtel.Services;
using Hubtel.Models;
using Hubtel.Exceptions;
namespace Hubtel.Tests.Services
{
[TestFixture]
public class PaymentServiceTests
{
private Mock _mockPaymentGateway;
private Mock _mockUserRepository;
private Mock> _mockLogger;
private PaymentService _paymentService;
[SetUp]
public void Setup()
{
_mockPaymentGateway = new Mock();
_mockUserRepository = new Mock();
_mockLogger = new Mock>();
_paymentService = new PaymentService(
_mockPaymentGateway.Object,
_mockUserRepository.Object,
_mockLogger.Object
);
}
[TearDown]
public void TearDown()
{
_paymentService?.Dispose();
}
[TestFixture]
public class ProcessPaymentMethod : PaymentServiceTests
{
private PaymentRequest _validPaymentRequest;
private User _validUser;
[SetUp]
public void ProcessPaymentSetup()
{
_validPaymentRequest = new PaymentRequest
{
UserId = "user123",
Amount = 100.00m,
Currency = "USD",
PaymentMethod = "credit_card",
Description = "Test payment"
};
_validUser = new User
{
Id = "user123",
Email = "test@example.com",
IsActive = true,
PaymentMethodsEnabled = true
};
}
[Test]
public async Task ProcessPayment_WithValidRequest_ShouldReturnSuccessResult()
{
// Arrange
_mockUserRepository
.Setup(x => x.GetByIdAsync("user123"))
.ReturnsAsync(_validUser);
_mockPaymentGateway
.Setup(x => x.ProcessPaymentAsync(It.IsAny()))
.ReturnsAsync(new PaymentResult
{
Success = true,
TransactionId = "txn123",
Status = PaymentStatus.Completed
});
// Act
var result = await _paymentService.ProcessPaymentAsync(_validPaymentRequest);
// Assert
result.Should().NotBeNull();
result.Success.Should().BeTrue();
result.TransactionId.Should().NotBeNullOrEmpty();
result.Status.Should().Be(PaymentStatus.Completed);
}
[Test]
public async Task ProcessPayment_WithInvalidUser_ShouldThrowUserNotFoundException()
{
// Arrange
_mockUserRepository
.Setup(x => x.GetByIdAsync("invalid_user"))
.ReturnsAsync((User)null);
var invalidRequest = _validPaymentRequest with { UserId = "invalid_user" };
// Act & Assert
var exception = await Assert.ThrowsAsync(
() => _paymentService.ProcessPaymentAsync(invalidRequest)
);
exception.UserId.Should().Be("invalid_user");
exception.Message.Should().Contain("User not found");
}
[TestCase(0)]
[TestCase(-10)]
[TestCase(-100.50)]
public async Task ProcessPayment_WithInvalidAmount_ShouldThrowInvalidPaymentException(decimal invalidAmount)
{
// Arrange
var invalidRequest = _validPaymentRequest with { Amount = invalidAmount };
_mockUserRepository
.Setup(x => x.GetByIdAsync("user123"))
.ReturnsAsync(_validUser);
// Act & Assert
var exception = await Assert.ThrowsAsync(
() => _paymentService.ProcessPaymentAsync(invalidRequest)
);
exception.Message.Should().Contain("Amount must be greater than zero");
}
[Test]
public async Task ProcessPayment_WithInactiveUser_ShouldThrowUserNotActiveException()
{
// Arrange
var inactiveUser = _validUser with { IsActive = false };
_mockUserRepository
.Setup(x => x.GetByIdAsync("user123"))
.ReturnsAsync(inactiveUser);
// Act & Assert
var exception = await Assert.ThrowsAsync(
() => _paymentService.ProcessPaymentAsync(_validPaymentRequest)
);
exception.UserId.Should().Be("user123");
}
[Test]
public async Task ProcessPayment_WhenGatewayFails_ShouldReturnFailureResult()
{
// Arrange
_mockUserRepository
.Setup(x => x.GetByIdAsync("user123"))
.ReturnsAsync(_validUser);
_mockPaymentGateway
.Setup(x => x.ProcessPaymentAsync(It.IsAny()))
.ReturnsAsync(new PaymentResult
{
Success = false,
ErrorCode = "GATEWAY_ERROR",
ErrorMessage = "Payment gateway unavailable"
});
// Act
var result = await _paymentService.ProcessPaymentAsync(_validPaymentRequest);
// Assert
result.Should().NotBeNull();
result.Success.Should().BeFalse();
result.ErrorCode.Should().Be("GATEWAY_ERROR");
result.ErrorMessage.Should().Contain("gateway unavailable");
}
[Test]
public async Task ProcessPayment_ShouldLogPaymentAttempt()
{
// Arrange
_mockUserRepository
.Setup(x => x.GetByIdAsync("user123"))
.ReturnsAsync(_validUser);
_mockPaymentGateway
.Setup(x => x.ProcessPaymentAsync(It.IsAny()))
.ReturnsAsync(new PaymentResult { Success = true, TransactionId = "txn123" });
// Act
await _paymentService.ProcessPaymentAsync(_validPaymentRequest);
// Assert
_mockLogger.Verify(
x => x.Log(
LogLevel.Information,
It.IsAny(),
It.Is((v, t) => v.ToString().Contains("Processing payment for user")),
It.IsAny(),
It.IsAny>()
),
Times.Once
);
}
}
[TestFixture]
public class ValidatePaymentRequestMethod : PaymentServiceTests
{
[Test]
public void ValidatePaymentRequest_WithValidRequest_ShouldNotThrow()
{
// Arrange
var validRequest = new PaymentRequest
{
UserId = "user123",
Amount = 50.00m,
Currency = "USD",
PaymentMethod = "credit_card"
};
// Act & Assert
Assert.DoesNotThrow(() => _paymentService.ValidatePaymentRequest(validRequest));
}
[TestCase(null)]
[TestCase("")]
[TestCase(" ")]
public void ValidatePaymentRequest_WithInvalidUserId_ShouldThrowArgumentException(string invalidUserId)
{
// Arrange
var invalidRequest = new PaymentRequest
{
UserId = invalidUserId,
Amount = 50.00m,
Currency = "USD",
PaymentMethod = "credit_card"
};
// Act & Assert
var exception = Assert.Throws(
() => _paymentService.ValidatePaymentRequest(invalidRequest)
);
exception.Message.Should().Contain("UserId cannot be null or empty");
}
[TestCase("INVALID")]
[TestCase("123")]
[TestCase("")]
public void ValidatePaymentRequest_WithInvalidCurrency_ShouldThrowArgumentException(string invalidCurrency)
{
// Arrange
var invalidRequest = new PaymentRequest
{
UserId = "user123",
Amount = 50.00m,
Currency = invalidCurrency,
PaymentMethod = "credit_card"
};
// Act & Assert
var exception = Assert.Throws(
() => _paymentService.ValidatePaymentRequest(invalidRequest)
);
exception.Message.Should().Contain("Invalid currency code");
}
}
}
}
```
## Quality Validation
### Test Quality Checklist
- ✅ **AAA Pattern**: Arrange, Act, Assert structure
- ✅ **Descriptive Names**: Clear test method and describe block names
- ✅ **Single Responsibility**: Each test validates one specific behavior
- ✅ **Test Isolation**: Tests can run independently in any order
- ✅ **Proper Mocking**: Dependencies are properly mocked and verified
- ✅ **Edge Cases**: Boundary conditions and error scenarios covered
- ✅ **Accessibility**: Components tested for a11y compliance
- ✅ **Async Handling**: Promises and async operations properly tested
### Coverage Validation
- **Line Coverage**: Target 90%+ for generated tests
- **Branch Coverage**: All conditional paths tested
- **Function Coverage**: All exported functions tested
- **Statement Coverage**: All executable statements covered
This comprehensive unit test generator creates high-quality, maintainable tests that follow best practices and achieve excellent coverage across different testing frameworks.
==================== END: .hubtel-workflow/tasks/unit-test-generator.md ====================
==================== START: .hubtel-workflow/tasks/workflow-orchestrator.md ====================
# Workflow Orchestrator
## ⚠️ CRITICAL EXECUTION NOTICE ⚠️
**THIS IS AN EXECUTABLE WORKFLOW - NOT REFERENCE MATERIAL**
When this task is invoked:
1. **AUTOMATIC AGENT COORDINATION** - Seamlessly coordinate all specialized agents
2. **WORKFLOW ORCHESTRATION** - Manage complete end-to-end workflow execution
3. **STATE MANAGEMENT** - Maintain workflow state across all phases and agent transitions
4. **ERROR RECOVERY** - Handle failures and provide workflow resumption capabilities
## Overview
This workflow serves as the central orchestration engine for complete engineering workflows, managing automatic agent handoffs, maintaining state consistency, and ensuring seamless execution from task import through implementation completion.
## Input Parameters
### Required Parameters
- **workflow_type**: "full-implementation" | "import-only" | "coordination-only"
- **task_groups**: Array of task group objects with coordination requirements
### Optional Parameters
- **execution_mode**: "automatic" | "step-by-step" | "manual-approval" (default: "automatic")
- **parallel_execution**: boolean (default: true) - Enable parallel group execution
- **error_handling**: "stop-on-error" | "continue-on-error" | "retry-on-error" (default: "retry-on-error")
## Execution Steps
### Phase 1: Orchestration Setup
```yaml
step: orchestration_initialization
description: Initialize complete workflow orchestration
actions:
- validate_workflow_prerequisites: Ensure all required data and agents available
- create_orchestration_state: Initialize comprehensive workflow state tracking
- setup_agent_coordination: Prepare agent communication and handoff protocols
- establish_execution_plan: Create detailed execution plan with dependencies
- initialize_error_recovery: Setup error handling and recovery mechanisms
orchestration_components:
workflow_state:
- current_phase: "Active workflow phase"
- execution_queue: "Queue of pending agent executions"
- completed_phases: "List of successfully completed phases"
- active_agents: "Currently executing agents"
- pending_handoffs: "Agents waiting for handoff data"
coordination_protocol:
- handoff_format: "Standardized data format for agent handoffs"
- state_synchronization: "Mechanism for maintaining consistent state"
- error_propagation: "How errors are communicated and handled"
- recovery_checkpoints: "Points where workflow can be resumed"
```
### Phase 2: Agent Execution Coordination
```yaml
step: agent_execution_management
description: Coordinate execution of all specialized agents
actions:
- manage_execution_queue: Process agent execution queue with dependency handling
- coordinate_parallel_execution: Enable parallel execution where dependencies allow
- monitor_agent_progress: Continuously monitor progress of all active agents
- handle_agent_handoffs: Facilitate seamless data handoffs between agents
- maintain_coordination_state: Keep coordination state consistent across all agents
execution_patterns:
sequential_execution:
- dependency_driven: "Execute agents in dependency order"
- data_flow_driven: "Execute based on data availability"
- critical_path_driven: "Prioritize critical path agents"
parallel_execution:
- independent_groups: "Execute independent task groups in parallel"
- different_stacks: "Run frontend and backend groups simultaneously"
- separate_components: "Parallelize work on different system components"
coordination_mechanisms:
- agent_communication: "Direct communication between coordinated agents"
- shared_state: "Common state accessible to all agents"
- event_driven_handoffs: "Automatic handoffs triggered by completion events"
- data_validation: "Validation of handoff data before agent transitions"
```
### Phase 3: Implementation Workflow Execution
```yaml
step: implementation_coordination
description: Orchestrate complete implementation workflow across all agents
actions:
- coordinate_backend_implementation: Manage backend development agent execution
- coordinate_frontend_implementation: Manage frontend development agent execution
- coordinate_integration_work: Manage integration coordination agent
- coordinate_testing_validation: Manage testing and validation agent
- synchronize_cross_cutting_concerns: Handle concerns spanning multiple agents
implementation_phases:
backend_phase:
agent: "hubtel-backend-dev"
coordination_requirements:
- "API contract definition and validation"
- "Database schema coordination"
- "Performance benchmark establishment"
handoff_data_to:
- target: "hubtel-integration-coordinator"
data: "API contracts, database schema, configuration"
- target: "hubtel-frontend-dev"
data: "API documentation, endpoint specifications"
frontend_phase:
agent: "hubtel-frontend-dev"
coordination_requirements:
- "API contract consumption validation"
- "UI/UX consistency verification"
- "Cross-browser compatibility confirmation"
handoff_data_to:
- target: "hubtel-integration-coordinator"
data: "Frontend build artifacts, integration points"
- target: "hubtel-test-engineer"
data: "UI components for testing, user journeys"
integration_phase:
agent: "hubtel-integration-coordinator"
coordination_requirements:
- "Frontend-backend integration validation"
- "Environment configuration management"
- "Deployment coordination"
handoff_data_to:
- target: "hubtel-test-engineer"
data: "Integration test environments, test data"
testing_phase:
agent: "hubtel-test-engineer"
coordination_requirements:
- "Comprehensive test suite execution"
- "Coverage validation and reporting"
- "Quality gate validation"
handoff_data_to:
- target: "workflow-completion"
data: "Test results, coverage reports, quality metrics"
```
### Phase 4: State Management & Synchronization
```yaml
step: state_synchronization
description: Maintain consistent workflow state across all agents and phases
actions:
- synchronize_agent_states: Ensure all agents have consistent view of workflow state
- update_progress_tracking: Continuously update progress tracking and visibility
- validate_state_consistency: Validate state consistency across all components
- checkpoint_workflow_state: Create recovery checkpoints at key transitions
- handle_state_conflicts: Resolve any state inconsistencies or conflicts
state_management_components:
workflow_state:
- phase_status: "Current status of each workflow phase"
- agent_progress: "Detailed progress for each active agent"
- dependency_status: "Status of all inter-agent dependencies"
- data_flow_status: "Status of data flow between agents"
synchronization_mechanisms:
- state_broadcasting: "Broadcast state changes to all interested agents"
- state_validation: "Validate state changes for consistency"
- conflict_resolution: "Resolve conflicts in state updates"
- atomic_updates: "Ensure state updates are atomic and consistent"
recovery_mechanisms:
- checkpoint_creation: "Create checkpoints at key workflow milestones"
- state_reconstruction: "Reconstruct state from checkpoints and logs"
- partial_recovery: "Resume workflow from partial completion states"
- rollback_capability: "Rollback to previous stable state if necessary"
```
### Phase 5: Completion & Validation
```yaml
step: workflow_completion
description: Validate workflow completion and finalize all coordination
actions:
- validate_all_phases_complete: Ensure all workflow phases completed successfully
- validate_quality_gates: Verify all quality gates and validation criteria met
- finalize_agent_coordination: Complete all pending agent handoffs and coordination
- generate_completion_report: Create comprehensive workflow completion report
- archive_workflow_artifacts: Archive all workflow state and artifacts for future reference
completion_validation:
phase_completion:
- all_tasks_implemented: "Every task in workflow fully implemented"
- all_agents_completed: "All assigned agents completed their work"
- all_handoffs_successful: "All agent handoffs completed successfully"
- all_coordination_resolved: "All coordination requirements satisfied"
quality_validation:
- acceptance_criteria_met: "All UAC acceptance criteria satisfied"
- test_coverage_achieved: "Minimum test coverage thresholds met"
- code_quality_standards: "All code quality standards satisfied"
- integration_validation: "All system integrations working correctly"
final_validation:
- workflow_objectives_achieved: "All original workflow objectives met"
- no_outstanding_issues: "No unresolved issues or blockers"
- deployment_readiness: "Implementation ready for deployment"
- documentation_complete: "All documentation updated and complete"
```
## Output Format
### Orchestration Status
```yaml
orchestration_status:
workflow:
id: "batch-20241214-143022"
type: "full-implementation"
status: "in_progress"
current_phase: "implementation_coordination"
overall_progress: "75%"
estimated_completion: "45 minutes"
execution_plan:
phases:
- phase: "backend_implementation"
status: "completed"
agent: "hubtel-backend-dev"
completion_time: "1.5 hours"
handoffs_completed: true
- phase: "frontend_implementation"
status: "in_progress"
agent: "hubtel-frontend-dev"
progress: "80%"
estimated_remaining: "20 minutes"
- phase: "integration_coordination"
status: "pending"
agent: "hubtel-integration-coordinator"
dependencies_met: false
waiting_for: ["frontend_implementation"]
- phase: "testing_validation"
status: "pending"
agent: "hubtel-test-engineer"
dependencies_met: false
waiting_for: ["frontend_implementation", "integration_coordination"]
coordination_health:
active_handoffs: 1
completed_handoffs: 3
pending_handoffs: 2
coordination_efficiency: "95%"
state_consistency: "validated"
```
### Agent Coordination Status
```yaml
agent_coordination:
active_agents:
- agent: "hubtel-frontend-dev"
status: "executing"
current_task: "AZ-124"
progress: "80%"
coordination_data:
received_from: "hubtel-integration-coordinator"
data_package: "API contracts and integration guidelines"
handoff_quality: "validated"
completed_agents:
- agent: "hubtel-backend-dev"
status: "completed"
completion_time: "2024-12-14T16:30:00Z"
work_delivered: ["AZ-123", "AZ-125"]
handoff_data:
delivered_to: ["hubtel-integration-coordinator", "hubtel-frontend-dev"]
data_quality: "validated"
coordination_success: true
pending_agents:
- agent: "hubtel-test-engineer"
status: "waiting"
dependencies: ["frontend_implementation"]
readiness_status: "prepared"
estimated_start: "2024-12-14T17:00:00Z"
coordination_metrics:
handoff_success_rate: "100%"
average_handoff_time: "3 minutes"
coordination_overhead: "5%"
data_integrity_score: "100%"
```
### Workflow State
```yaml
workflow_state:
current_state:
phase: "implementation_coordination"
subphase: "frontend_implementation"
active_operations: ["AZ-124_component_implementation"]
blocked_operations: []
next_operations: ["integration_validation", "testing_setup"]
state_history:
- timestamp: "2024-12-14T14:30:00Z"
phase: "workflow_initialization"
action: "Workflow started with 4 tasks"
- timestamp: "2024-12-14T14:45:00Z"
phase: "task_enhancement"
action: "All tasks enhanced to implementation readiness"
- timestamp: "2024-12-14T15:00:00Z"
phase: "uac_generation"
action: "UAC generated and confirmed by user"
- timestamp: "2024-12-14T15:15:00Z"
phase: "implementation_coordination"
action: "Backend implementation started"
- timestamp: "2024-12-14T16:30:00Z"
phase: "implementation_coordination"
action: "Backend implementation completed, frontend started"
checkpoints:
- checkpoint_id: "workflow_initialized"
timestamp: "2024-12-14T14:30:00Z"
state_snapshot: "Initial workflow state with task groups"
- checkpoint_id: "uac_confirmed"
timestamp: "2024-12-14T15:00:00Z"
state_snapshot: "UAC confirmed, ready for implementation"
- checkpoint_id: "backend_completed"
timestamp: "2024-12-14T16:30:00Z"
state_snapshot: "Backend implementation completed with handoff data"
```
### Error Recovery Information
```yaml
error_recovery:
recovery_capabilities:
- checkpoint_recovery: "Resume from any saved checkpoint"
- partial_recovery: "Resume from partial completion states"
- agent_recovery: "Restart specific agents with preserved context"
- state_reconstruction: "Rebuild state from logs and artifacts"
current_status:
errors_encountered: 0
recovery_attempts: 0
state_integrity: "validated"
recovery_readiness: "prepared"
recovery_plan:
immediate_recovery: "Resume from current state"
checkpoint_recovery: "Resume from 'backend_completed' checkpoint"
full_restart: "Restart workflow from 'uac_confirmed' checkpoint"
manual_intervention: "Escalate to manual coordination if automated recovery fails"
```
## Integration Points
### Agent Integration
- **Seamless handoffs**: Automatic data handoffs between all specialized agents
- **State synchronization**: Shared workflow state across all agents
- **Error propagation**: Coordinated error handling across agent boundaries
### Workflow Integration
- **Progress tracking**: Real-time progress updates fed to progress tracker
- **State persistence**: Workflow state maintained for resumption capabilities
- **Quality validation**: Continuous quality gate monitoring and validation
### User Experience
- **Visibility**: Complete visibility into workflow execution and coordination
- **Control**: User control over workflow execution mode and error handling
- **Transparency**: Clear understanding of workflow status and next steps
==================== END: .hubtel-workflow/tasks/workflow-orchestrator.md ====================
==================== START: .hubtel-workflow/checklists/backend-implementation-checklist.md ====================
# Backend Implementation Checklist
## Overview
This checklist ensures backend implementations meet Hubtel's quality standards for .NET Core applications, including API design, database integration, security, testing, and observability requirements.
## Pre-Implementation Setup
### Environment and Dependencies
- [ ] **Development Environment**: Docker Compose environment running with all required services
- [ ] **Package Dependencies**: All required NuGet packages installed and up to date
- [ ] **Database Connectivity**: PostgreSQL/MongoDB connection established and tested
- [ ] **Configuration Management**: appsettings.json and environment variables properly configured
- [ ] **Authentication Setup**: JWT authentication middleware configured and tested
### Task Analysis
- [ ] **Requirements Review**: All functional and technical requirements understood
- [ ] **API Design**: RESTful API endpoints designed following OpenAPI specifications
- [ ] **Database Design**: Entity models and relationships designed and validated
- [ ] **Acceptance Criteria**: All acceptance criteria reviewed and implementation approach planned
- [ ] **Testing Strategy**: Unit, integration, and API testing approach planned
## Implementation Standards
### Code Quality and Architecture
#### Project Structure
- [ ] **Clean Architecture**: Solution follows clean architecture principles (Controllers, Services, Repositories)
- [ ] **Dependency Injection**: Proper DI container configuration and service registration
- [ ] **Separation of Concerns**: Business logic separated from data access and presentation layers
- [ ] **SOLID Principles**: Code follows SOLID design principles
- [ ] **File Organization**: Files organized according to Hubtel project structure standards
#### Code Standards
- [ ] **C# Conventions**: Code follows C# naming conventions and best practices
- [ ] **Async/Await**: Proper async/await implementation for I/O operations
- [ ] **Error Handling**: Comprehensive exception handling with proper HTTP status codes
- [ ] **Null Safety**: Proper null checking and nullable reference types usage
- [ ] **Code Comments**: Complex business logic documented with XML documentation
#### Data Access Layer
- [ ] **Entity Framework**: EF Core models properly configured with relationships
- [ ] **Repository Pattern**: Repository pattern implemented for data access abstraction
- [ ] **Database Context**: DbContext properly configured with connection strings
- [ ] **Query Optimization**: LINQ queries optimized to prevent N+1 problems
- [ ] **Transaction Management**: Database transactions properly managed for data consistency
### API Design and Implementation
#### RESTful API Standards
- [ ] **HTTP Verbs**: Proper HTTP verb usage (GET, POST, PUT, DELETE, PATCH)
- [ ] **Resource Naming**: RESTful URL conventions followed consistently
- [ ] **Status Codes**: Appropriate HTTP status codes returned for all scenarios
- [ ] **Content Negotiation**: Proper Accept and Content-Type header handling
- [ ] **API Versioning**: API versioning strategy implemented (URL path or header-based)
#### Request/Response Handling
- [ ] **Input Validation**: Comprehensive input validation with clear error messages
- [ ] **Model Binding**: Proper model binding with validation attributes
- [ ] **Response DTOs**: Data Transfer Objects used for API responses
- [ ] **Error Responses**: Consistent error response format across all endpoints
- [ ] **Rate Limiting**: API rate limiting implemented to prevent abuse
#### OpenAPI Documentation
- [ ] **Swagger Configuration**: Swagger/OpenAPI documentation properly configured
- [ ] **Endpoint Documentation**: All endpoints documented with descriptions and examples
- [ ] **Model Documentation**: Request/response models documented with XML comments
- [ ] **Authentication Documentation**: Security schemes documented in OpenAPI spec
- [ ] **Example Responses**: Sample requests and responses provided for all endpoints
### Security Implementation
#### Authentication and Authorization
- [ ] **JWT Implementation**: JWT token generation and validation properly implemented
- [ ] **Token Refresh**: Refresh token mechanism implemented for security
- [ ] **Role-Based Access**: Role-based authorization implemented using [Authorize] attributes
- [ ] **Permission Validation**: Fine-grained permissions validated at endpoint level
- [ ] **Secure Headers**: Security headers configured (CORS, HSTS, Content Security Policy)
#### Data Protection
- [ ] **Input Sanitization**: All user inputs properly sanitized and validated
- [ ] **SQL Injection Prevention**: Parameterized queries used to prevent SQL injection
- [ ] **XSS Prevention**: Output encoding implemented to prevent cross-site scripting
- [ ] **Sensitive Data**: Passwords and sensitive data properly hashed and encrypted
- [ ] **Connection Security**: Database connections use encrypted connections (SSL/TLS)
#### API Security
- [ ] **HTTPS Enforcement**: HTTPS enforced for all API endpoints
- [ ] **CORS Configuration**: CORS properly configured for frontend integration
- [ ] **Request Size Limits**: Request size limits configured to prevent DoS attacks
- [ ] **API Key Validation**: API keys validated and rate-limited appropriately
- [ ] **Audit Logging**: Security events logged for audit and compliance
### Database Integration
#### Entity Framework Core
- [ ] **Model Configuration**: Entity models properly configured with Fluent API
- [ ] **Relationships**: Foreign key relationships properly defined and configured
- [ ] **Indexes**: Database indexes created for frequently queried columns
- [ ] **Constraints**: Database constraints implemented for data integrity
- [ ] **Migrations**: Database migrations created and tested for schema changes
#### Data Persistence
- [ ] **Transaction Scope**: Database transactions properly scoped for consistency
- [ ] **Connection Pooling**: Database connection pooling properly configured
- [ ] **Query Performance**: Database queries optimized for performance
- [ ] **Lazy Loading**: Lazy loading disabled to prevent N+1 query problems
- [ ] **Bulk Operations**: Bulk insert/update operations used where appropriate
#### Data Validation
- [ ] **Model Validation**: Entity validation rules implemented with data annotations
- [ ] **Business Rules**: Business logic validation implemented in service layer
- [ ] **Referential Integrity**: Foreign key constraints properly enforced
- [ ] **Unique Constraints**: Unique constraints implemented where business rules require
- [ ] **Check Constraints**: Database check constraints implemented for data quality
### Observability and Monitoring
#### OpenTelemetry Implementation
- [ ] **Logging Configuration**: Structured logging configured with Serilog or built-in logging
- [ ] **Trace Correlation**: Correlation IDs implemented for request tracing
- [ ] **Performance Metrics**: Custom metrics implemented for business operations
- [ ] **Distributed Tracing**: OpenTelemetry tracing configured for microservices
- [ ] **Error Tracking**: Exception tracking and monitoring implemented
#### Health Monitoring
- [ ] **Health Checks**: Health check endpoints implemented for all dependencies
- [ ] **Dependency Monitoring**: Database and external service health monitored
- [ ] **Performance Counters**: Key performance metrics collected and exposed
- [ ] **Resource Monitoring**: CPU, memory, and I/O metrics monitored
- [ ] **Alert Configuration**: Alerts configured for critical system events
#### Logging Standards
- [ ] **Log Levels**: Appropriate log levels used (Debug, Info, Warning, Error, Critical)
- [ ] **Structured Logging**: JSON structured logging implemented for log analysis
- [ ] **Sensitive Data**: Sensitive information excluded from logs
- [ ] **Request Logging**: HTTP requests and responses logged with correlation IDs
- [ ] **Performance Logging**: Slow queries and operations logged for optimization
## Testing Implementation
### Unit Testing
#### Test Coverage
- [ ] **Business Logic**: All business logic covered by unit tests
- [ ] **Service Layer**: Service classes tested with mocked dependencies
- [ ] **Repository Layer**: Repository implementations tested with in-memory database
- [ ] **Controller Logic**: Controller logic tested with mocked services
- [ ] **Coverage Threshold**: Minimum 90% test coverage achieved for business logic
#### Test Quality
- [ ] **Test Structure**: Tests follow AAA (Arrange, Act, Assert) pattern
- [ ] **Descriptive Names**: Test method names clearly describe test scenarios
- [ ] **Edge Cases**: Boundary conditions and error scenarios tested
- [ ] **Mocking Strategy**: External dependencies properly mocked using Moq
- [ ] **Test Data**: Test data builders or factories used for consistent test setup
#### Testing Frameworks
- [ ] **NUnit/xUnit**: Unit testing framework properly configured and used
- [ ] **FluentAssertions**: Readable assertions implemented for better test clarity
- [ ] **AutoFixture**: Test data generation automated with AutoFixture
- [ ] **MockWebAPI**: Web API testing performed with TestServer
- [ ] **Test Isolation**: Tests run independently without shared state
### Integration Testing
#### API Testing (Karate)
- [ ] **Endpoint Coverage**: All API endpoints covered by Karate tests
- [ ] **Authentication Testing**: Authentication flows tested end-to-end
- [ ] **Data Validation**: Request/response data validation tested
- [ ] **Error Scenarios**: Error conditions and edge cases tested
- [ ] **Performance Testing**: API response times validated under load
#### Database Integration
- [ ] **Database Tests**: Entity Framework operations tested with test database
- [ ] **Migration Testing**: Database migrations tested in isolation
- [ ] **Transaction Testing**: Transaction rollback scenarios tested
- [ ] **Concurrency Testing**: Concurrent data access scenarios tested
- [ ] **Data Integrity**: Referential integrity and constraints validated
### Mutation Testing
#### Code Quality Validation
- [ ] **Mutation Score**: Minimum 80% mutation testing score achieved
- [ ] **Test Effectiveness**: Tests validate actual business logic, not just syntax
- [ ] **Dead Code Detection**: Unused code paths identified and removed
- [ ] **Logic Validation**: Boolean logic and conditional statements properly tested
- [ ] **Boundary Testing**: Off-by-one errors and boundary conditions detected
## Performance and Scalability
### API Performance
- [ ] **Response Times**: API endpoints respond within 200ms under normal load
- [ ] **Concurrent Requests**: Application handles expected concurrent load
- [ ] **Memory Management**: No memory leaks detected during load testing
- [ ] **Database Performance**: Database queries optimized for performance
- [ ] **Caching Strategy**: Appropriate caching implemented for frequently accessed data
### Resource Optimization
- [ ] **Connection Management**: Database connections properly managed and pooled
- [ ] **Memory Usage**: Memory usage optimized and garbage collection tuned
- [ ] **CPU Utilization**: CPU usage optimized for expected load patterns
- [ ] **I/O Operations**: File and network I/O operations optimized
- [ ] **Background Processing**: Background tasks implemented with proper cancellation
## Error Handling and Resilience
### Exception Management
- [ ] **Global Error Handler**: Global exception handler implemented for unhandled exceptions
- [ ] **Custom Exceptions**: Business-specific exceptions defined and properly handled
- [ ] **Error Logging**: All exceptions logged with appropriate context and correlation IDs
- [ ] **User-Friendly Errors**: Technical errors translated to user-friendly messages
- [ ] **Stack Trace Security**: Stack traces excluded from production error responses
### Resilience Patterns
- [ ] **Retry Logic**: Retry logic implemented for transient failures
- [ ] **Circuit Breaker**: Circuit breaker pattern implemented for external dependencies
- [ ] **Timeout Handling**: Appropriate timeouts configured for all external calls
- [ ] **Fallback Mechanisms**: Graceful degradation implemented for service failures
- [ ] **Health Recovery**: System recovers gracefully from temporary failures
## Integration and Deployment
### API Integration
- [ ] **Frontend Integration**: API endpoints tested with frontend application
- [ ] **External Services**: Third-party service integrations tested and validated
- [ ] **Authentication Flow**: End-to-end authentication tested with frontend
- [ ] **Real-time Features**: WebSocket or SignalR connections tested if applicable
- [ ] **File Upload/Download**: File handling operations tested with appropriate limits
### Database Deployment
- [ ] **Migration Scripts**: Database migration scripts tested and validated
- [ ] **Seed Data**: Database seed data scripts created for initial setup
- [ ] **Backup Strategy**: Database backup and recovery procedures validated
- [ ] **Schema Validation**: Database schema matches entity model definitions
- [ ] **Index Performance**: Database indexes tested for query performance improvement
### Configuration Management
- [ ] **Environment Configuration**: Application configuration externalized for different environments
- [ ] **Secret Management**: Sensitive configuration stored securely (Azure Key Vault, etc.)
- [ ] **Feature Flags**: Feature toggles implemented for gradual rollout capability
- [ ] **Configuration Validation**: Required configuration values validated at startup
- [ ] **Environment Parity**: Configuration consistency across dev/staging/production
## Code Review Preparation
### Documentation
- [ ] **API Documentation**: OpenAPI/Swagger documentation complete and accurate
- [ ] **Code Documentation**: Complex business logic documented with XML comments
- [ ] **Database Schema**: Entity relationship diagrams and schema documentation updated
- [ ] **Deployment Guide**: Deployment and configuration instructions documented
- [ ] **Architecture Decisions**: Significant architectural decisions documented
### Review Package
- [ ] **Clean Git History**: Commits are logical with clear, descriptive messages
- [ ] **Branch Naming**: Branch follows naming convention (feature/AZ-{id}-{description})
- [ ] **No Debug Code**: Debug code and temporary logging statements removed
- [ ] **Configuration Clean**: No hardcoded environment-specific values or secrets
- [ ] **Dependency Justification**: New NuGet packages justified and security-reviewed
## Task Completion Verification
### Acceptance Criteria Validation
- [ ] **Functional Requirements**: All functional requirements implemented and tested
- [ ] **Technical Requirements**: All technical specifications met and validated
- [ ] **Performance Requirements**: API response times and throughput meet specifications
- [ ] **Security Requirements**: Authentication, authorization, and data protection implemented
- [ ] **Integration Requirements**: All required integrations working end-to-end
### Quality Gates
- [ ] **All Tests Pass**: Unit, integration, and API tests passing in CI/CD pipeline
- [ ] **Build Success**: Release build completes without errors or warnings
- [ ] **Code Analysis**: Static code analysis tools report no critical issues
- [ ] **Security Scan**: Security vulnerability scanning passes with no high/critical issues
- [ ] **Performance Baseline**: Performance metrics meet established baseline requirements
## Commit Preparation
### Commit Structure
- [ ] **Task ID Reference**: Commit message includes Azure DevOps task ID
- [ ] **Clear Description**: Commit message clearly describes what was implemented
- [ ] **Conventional Commits**: Commit message follows conventional commit format
- [ ] **Breaking Changes**: Any breaking changes clearly documented in commit message
- [ ] **Migration Notes**: Database migration details included in commit description
### Example Commit Message Format
```
feat(AZ-456): implement JWT authentication middleware with refresh token support
- Add JWT authentication middleware with role-based authorization
- Implement refresh token mechanism for enhanced security
- Add comprehensive input validation and error handling
- Create Karate API tests and NUnit unit tests with 95% coverage
- Add OpenTelemetry logging and performance monitoring
- Include database migration for user tokens table
Breaking Changes:
- Authentication endpoints moved to /api/v2/auth/*
- Authorization header now required for all protected endpoints
🤖 Generated with Hubtel CQT Agent
Co-Authored-By: Hubtel-Backend-Dev
```
This checklist ensures that all backend implementations meet Hubtel's high standards for security, performance, maintainability, and reliability while providing a comprehensive framework for successful API development and deployment.
==================== END: .hubtel-workflow/checklists/backend-implementation-checklist.md ====================
==================== START: .hubtel-workflow/checklists/frontend-implementation-checklist.md ====================
# Frontend Implementation Checklist
## Overview
This checklist ensures frontend implementations meet Hubtel's quality standards for Next.js/Nuxt.js applications, including responsive design, accessibility, testing, and API integration requirements.
## Pre-Implementation Setup
### Environment and Dependencies
- [ ] **Development Environment**: Docker Compose environment running with all required services
- [ ] **Package Dependencies**: All required npm packages installed and up to date
- [ ] **TypeScript Configuration**: TypeScript properly configured with strict mode enabled
- [ ] **ESLint/Prettier**: Code linting and formatting tools configured and working
- [ ] **Environment Variables**: All required environment variables configured and accessible
### Task Analysis
- [ ] **Requirements Review**: All functional and technical requirements understood
- [ ] **API Documentation**: Backend API documentation reviewed and endpoints identified
- [ ] **HTML Artifacts**: UX team HTML artifacts reviewed and design requirements understood
- [ ] **Acceptance Criteria**: All acceptance criteria reviewed and implementation approach planned
- [ ] **Testing Strategy**: Unit and E2E testing approach planned and frameworks configured
## Implementation Standards
### Code Quality and Structure
#### Component Architecture
- [ ] **Component Structure**: Components follow established Next.js/Nuxt.js patterns
- [ ] **Props Interface**: TypeScript interfaces defined for all component props
- [ ] **Single Responsibility**: Each component has a single, well-defined purpose
- [ ] **Reusability**: Components designed for reusability where appropriate
- [ ] **File Organization**: Files organized according to Hubtel project structure standards
#### Code Standards
- [ ] **TypeScript Usage**: Full TypeScript implementation with proper typing
- [ ] **Naming Conventions**: Variables, functions, and components follow Hubtel naming conventions
- [ ] **Code Comments**: Complex logic documented with clear comments
- [ ] **Import Organization**: Imports organized and grouped logically
- [ ] **Dead Code Removal**: No unused imports, variables, or functions
#### Error Handling
- [ ] **API Error Handling**: Comprehensive error handling for all API calls
- [ ] **User Feedback**: Loading states and error messages properly displayed to users
- [ ] **Graceful Degradation**: Application handles network failures gracefully
- [ ] **Error Boundaries**: React Error Boundaries implemented where appropriate
- [ ] **Validation**: Input validation implemented with clear error messages
### Responsive Design and Accessibility
#### Responsive Implementation
- [ ] **Mobile-First Approach**: Design implemented with mobile-first responsive strategy
- [ ] **Breakpoint Consistency**: Standard breakpoints used consistently across components
- [ ] **Touch Interactions**: Mobile-optimized touch interactions and gesture support
- [ ] **Viewport Meta Tag**: Proper viewport configuration for mobile devices
- [ ] **Flexible Layouts**: CSS Grid and Flexbox used appropriately for flexible layouts
#### Accessibility (WCAG AA Compliance)
- [ ] **Semantic HTML**: Proper HTML5 semantic elements used throughout
- [ ] **ARIA Labels**: ARIA labels and roles properly implemented where needed
- [ ] **Keyboard Navigation**: Full keyboard navigation support implemented
- [ ] **Focus Management**: Focus states clearly visible and properly managed
- [ ] **Screen Reader**: Content accessible and meaningful to screen readers
- [ ] **Color Contrast**: All text meets WCAG AA color contrast requirements
- [ ] **Alternative Text**: All images have appropriate alt text or are marked decorative
### API Integration
#### HTTP Client Setup
- [ ] **Client Configuration**: HTTP client (Axios/Fetch) properly configured with base URLs
- [ ] **Authentication**: JWT token handling and refresh logic implemented
- [ ] **Request Interceptors**: Request/response interceptors configured for common functionality
- [ ] **Error Interceptors**: Global error handling and user feedback implemented
- [ ] **Loading States**: Loading indicators implemented for all async operations
#### Data Management
- [ ] **State Management**: Appropriate state management solution implemented (Context/Redux/Zustand)
- [ ] **Cache Strategy**: API response caching strategy implemented where beneficial
- [ ] **Optimistic Updates**: Optimistic UI updates implemented for better user experience
- [ ] **Data Validation**: Client-side validation matches server-side validation rules
- [ ] **Real-time Updates**: WebSocket or SSE integration implemented if required
### Performance Optimization
#### Bundle Optimization
- [ ] **Code Splitting**: Dynamic imports and code splitting implemented appropriately
- [ ] **Tree Shaking**: Unused code eliminated through proper import practices
- [ ] **Bundle Analysis**: Bundle size analyzed and optimized
- [ ] **Lazy Loading**: Images and components lazy loaded where appropriate
- [ ] **Critical Path**: Critical rendering path optimized for fast initial load
#### Runtime Performance
- [ ] **Memory Leaks**: Component cleanup and event listener removal implemented
- [ ] **Re-render Optimization**: Unnecessary re-renders prevented with memoization
- [ ] **Image Optimization**: Images optimized and served in appropriate formats
- [ ] **Caching Strategy**: Browser caching strategy implemented for static assets
- [ ] **Performance Monitoring**: Core Web Vitals monitored and optimized
## Testing Implementation
### Unit Testing (Vitest)
#### Test Coverage
- [ ] **Component Logic**: All component logic covered by unit tests
- [ ] **Custom Hooks**: Custom hooks tested in isolation
- [ ] **Utility Functions**: All utility functions have comprehensive test coverage
- [ ] **API Integration**: API integration functions mocked and tested
- [ ] **Coverage Threshold**: Minimum 85% test coverage achieved
#### Test Quality
- [ ] **Test Structure**: Tests follow AAA (Arrange, Act, Assert) pattern
- [ ] **Descriptive Names**: Test descriptions clearly explain what is being tested
- [ ] **Edge Cases**: Edge cases and error conditions tested
- [ ] **Mocking Strategy**: External dependencies properly mocked
- [ ] **Test Data**: Test data factories or fixtures used for consistent test setup
### End-to-End Testing (Playwright)
#### Critical User Journeys
- [ ] **Authentication Flow**: Login/logout functionality tested end-to-end
- [ ] **Primary User Flows**: Main user journeys tested with realistic data
- [ ] **Form Submissions**: All forms tested with valid and invalid data
- [ ] **API Integration**: Frontend-backend integration tested end-to-end
- [ ] **Error Scenarios**: Error handling and recovery tested in browser environment
#### Cross-Browser Testing
- [ ] **Browser Support**: Tests run on all supported browsers (Chrome, Firefox, Safari, Edge)
- [ ] **Mobile Testing**: Mobile-specific functionality tested on device emulators
- [ ] **Accessibility Testing**: Automated accessibility tests integrated into E2E suite
- [ ] **Performance Testing**: Page load and interaction performance validated
- [ ] **Visual Regression**: Screenshots compared for visual consistency
## Integration and Deployment
### API Integration Validation
- [ ] **Endpoint Integration**: All required API endpoints successfully integrated
- [ ] **Data Transformation**: API response data properly transformed for UI consumption
- [ ] **Error Handling**: API errors properly caught and displayed to users
- [ ] **Authentication**: Token-based authentication working correctly
- [ ] **Real-time Features**: WebSocket or SSE connections working as expected
### Environment Configuration
- [ ] **Environment Variables**: All environment-specific configurations properly set
- [ ] **Build Configuration**: Production build configuration optimized and tested
- [ ] **Docker Integration**: Application runs correctly in Docker container
- [ ] **Environment Parity**: Development environment matches staging/production setup
- [ ] **Configuration Validation**: Required configuration values validated at startup
### Code Review Preparation
#### Documentation
- [ ] **README Updates**: Component usage and setup instructions documented
- [ ] **API Documentation**: Frontend API usage patterns documented
- [ ] **Component Documentation**: Props and usage examples documented
- [ ] **Deployment Notes**: Any deployment-specific requirements documented
- [ ] **Breaking Changes**: Any breaking changes clearly documented
#### Review Package
- [ ] **Clean Git History**: Commits are logical and have clear messages
- [ ] **Branch Naming**: Branch follows naming convention (feature/AZ-{id}-{description})
- [ ] **No Debug Code**: Console.log statements and debug code removed
- [ ] **Environment Agnostic**: No hardcoded environment-specific values
- [ ] **Dependency Justification**: New dependencies justified and approved
## Quality Gates
### Pre-Review Validation
- [ ] **All Tests Pass**: Unit tests and E2E tests passing in CI/CD pipeline
- [ ] **Build Success**: Production build completes without errors or warnings
- [ ] **Linting Clean**: No ESLint errors or warnings
- [ ] **Type Safety**: No TypeScript errors or warnings
- [ ] **Performance Baseline**: Performance metrics meet baseline requirements
### Deployment Readiness
- [ ] **Staging Validation**: Application deployed and tested in staging environment
- [ ] **Feature Flag Ready**: Feature flags configured for gradual rollout if needed
- [ ] **Rollback Plan**: Rollback procedure documented and tested
- [ ] **Monitoring Setup**: Frontend monitoring and error tracking configured
- [ ] **Team Communication**: Deployment plan communicated to relevant teams
## Task Completion Verification
### Acceptance Criteria Validation
- [ ] **Functional Requirements**: All functional requirements implemented and tested
- [ ] **Technical Requirements**: All technical specifications met and validated
- [ ] **Performance Requirements**: Response times and user experience meet specifications
- [ ] **Accessibility Requirements**: WCAG AA compliance verified through automated and manual testing
- [ ] **Cross-Browser Requirements**: Functionality verified across all supported browsers and devices
### Implementation Quality
- [ ] **Code Standards**: Implementation follows Hubtel frontend coding standards
- [ ] **Design Fidelity**: Implementation matches UX designs and HTML artifacts
- [ ] **User Experience**: Smooth, intuitive user experience with proper feedback
- [ ] **Error Recovery**: Users can recover gracefully from all error conditions
- [ ] **Performance**: Application feels fast and responsive under normal usage
### Final Review Items
- [ ] **Security Review**: No sensitive data exposed in client-side code
- [ ] **Accessibility Audit**: Manual accessibility testing completed
- [ ] **Performance Audit**: Lighthouse audit scores meet minimum thresholds
- [ ] **Mobile Testing**: Manual testing on actual mobile devices completed
- [ ] **Integration Testing**: Full integration with backend services validated
## Commit Preparation
### Commit Structure
- [ ] **Task ID Reference**: Commit message includes Azure DevOps task ID
- [ ] **Clear Description**: Commit message clearly describes what was implemented
- [ ] **Conventional Commits**: Commit message follows conventional commit format
- [ ] **Breaking Changes**: Any breaking changes clearly documented in commit message
- [ ] **Co-author Attribution**: CQT Agent co-authorship included if applicable
### Example Commit Message Format
```
feat(AZ-123): implement responsive user dashboard with real-time notifications
- Add responsive dashboard component with mobile-first design
- Integrate WebSocket for real-time balance updates
- Implement comprehensive error handling and loading states
- Add Vitest unit tests and Playwright E2E tests
- Ensure WCAG AA accessibility compliance
🤖 Generated with Hubtel CQT Agent
Co-Authored-By: Hubtel-Frontend-Dev
```
This checklist ensures that all frontend implementations meet Hubtel's high standards for quality, performance, accessibility, and maintainability while providing a comprehensive framework for successful development and deployment.
==================== END: .hubtel-workflow/checklists/frontend-implementation-checklist.md ====================
==================== START: .hubtel-workflow/checklists/hubtel-task-quality-checklist.md ====================
# Hubtel Task Quality Checklist
## Overview
This checklist ensures all tasks meet Hubtel's quality standards for junior engineer implementation readiness, technical completeness, and integration compatibility.
## Task Quality Validation
### 1. Clarity and Completeness
#### Basic Information
- [ ] **Clear Title**: Task title is specific and includes technical context
- [ ] **Objective Clarity**: Task purpose is immediately obvious to any developer
- [ ] **Scope Definition**: Clear boundaries of what's included and excluded
- [ ] **Business Context**: Explains why the task is needed and its value
#### Requirements Specification
- [ ] **Functional Requirements**: All functional requirements clearly defined
- [ ] **Technical Requirements**: Technology stack and implementation constraints specified
- [ ] **Integration Requirements**: API dependencies and service integrations identified
- [ ] **Performance Requirements**: Response time and quality expectations defined
### 2. Junior Engineer Readiness
#### Implementation Guidance
- [ ] **Approach Specified**: Clear implementation approach and sequence outlined
- [ ] **Technology Stack**: Specific frameworks and tools identified (Next.js/Nuxt.js/.NET Core)
- [ ] **Code Patterns**: References to established patterns and similar implementations
- [ ] **Common Pitfalls**: Known issues and resolution approaches documented
#### Resource Availability
- [ ] **Documentation Links**: References to Hubtel coding standards and guidelines
- [ ] **Code Examples**: Relevant code snippets and scaffolding provided
- [ ] **Similar Implementations**: Links to comparable existing implementations
- [ ] **Troubleshooting Guide**: Common problems and solutions documented
#### Task Sizing
- [ ] **1-Hour Window**: Task can be reasonably completed within 1 hour
- [ ] **Single Focus**: Task has one clear, focused objective
- [ ] **Atomic Deliverable**: Task delivers a complete, testable piece of functionality
- [ ] **Dependency Management**: External dependencies clearly identified and available
### 3. Acceptance Criteria Quality
#### Functional Criteria
- [ ] **Testable Conditions**: All criteria can be objectively verified
- [ ] **User Perspective**: Criteria written from user/system behavior perspective
- [ ] **Edge Cases**: Error conditions and boundary cases addressed
- [ ] **Given/When/Then**: Criteria follow clear behavioral specification format
#### Technical Criteria
- [ ] **Implementation Standards**: Technical requirements clearly specified
- [ ] **Performance Benchmarks**: Response time and throughput expectations defined
- [ ] **Security Requirements**: Authentication, authorization, and validation specified
- [ ] **Compatibility Requirements**: Browser, device, or service compatibility defined
#### Quality Criteria
- [ ] **Testing Coverage**: Unit and E2E testing requirements specified
- [ ] **Code Quality**: Coding standards and review requirements defined
- [ ] **Documentation**: Documentation update requirements included
- [ ] **Accessibility**: WCAG compliance requirements specified (if applicable)
### 4. Hubtel Standards Integration
#### Technology Stack Alignment
- [ ] **Frontend Framework**: Next.js or Nuxt.js properly specified
- [ ] **Backend Framework**: .NET Core patterns and practices referenced
- [ ] **Database Integration**: PostgreSQL or MongoDB usage properly defined
- [ ] **Testing Frameworks**: Vitest/Playwright or Karate appropriately specified
#### Development Standards
- [ ] **Coding Guidelines**: References to https://dev-docs.hubtel.com/introduction.html
- [ ] **Architectural Patterns**: SOLID principles and clean architecture applied
- [ ] **Security Practices**: Input validation and secure coding practices included
- [ ] **Observability**: OpenTelemetry logging requirements specified
#### Quality Practices
- [ ] **Code Review**: Review requirements and criteria clearly defined
- [ ] **Testing Strategy**: Comprehensive testing approach specified
- [ ] **Performance**: Response time and optimization requirements included
- [ ] **Documentation**: API documentation and code comment requirements defined
### 5. Testing Requirements
#### Unit Testing
- [ ] **Framework Specified**: Vitest (frontend) or NUnit (backend) clearly identified
- [ ] **Coverage Requirements**: Minimum 85% coverage requirement specified
- [ ] **Critical Path Coverage**: 100% coverage of business logic required
- [ ] **Test Categories**: Component, service, and integration test types defined
#### Integration Testing
- [ ] **E2E Framework**: Playwright or Karate framework appropriately specified
- [ ] **Scenario Coverage**: Critical user journeys identified and specified
- [ ] **API Testing**: Backend API endpoint testing requirements defined
- [ ] **Cross-Browser**: Browser compatibility testing requirements specified
#### Quality Validation
- [ ] **Accessibility Testing**: WCAG AA compliance validation specified
- [ ] **Performance Testing**: Load and response time validation defined
- [ ] **Security Testing**: Authentication and authorization validation included
- [ ] **Compatibility Testing**: Device and browser compatibility requirements defined
### 6. Coordination Requirements
#### Frontend/Backend Coordination
- [ ] **API Dependencies**: Backend API requirements clearly defined
- [ ] **Data Model Alignment**: Shared data structures and validation specified
- [ ] **Authentication Integration**: User session and security coordination defined
- [ ] **Timeline Coordination**: Development sequence and handoff points specified
#### Environment Coordination
- [ ] **Docker Updates**: Container and service configuration changes identified
- [ ] **Configuration Management**: Environment variable and secret updates specified
- [ ] **Database Changes**: Migration and schema change requirements defined
- [ ] **Deployment Sequence**: Service deployment order and dependencies specified
#### Communication Requirements
- [ ] **Team Notifications**: Teams communication requirements specified
- [ ] **Documentation Updates**: Swagger and Postman collection updates identified
- [ ] **Change Announcements**: Breaking change communication requirements defined
- [ ] **Escalation Procedures**: Issue resolution and support contact information included
### 7. Definition of Done
#### Implementation Completeness
- [ ] **Feature Complete**: All functional requirements implemented
- [ ] **Error Handling**: Comprehensive error handling and user feedback implemented
- [ ] **Performance**: Meets specified performance and quality benchmarks
- [ ] **Security**: Authentication, authorization, and validation implemented
#### Testing Completeness
- [ ] **Unit Tests**: All unit tests written and passing with required coverage
- [ ] **Integration Tests**: All integration and E2E tests written and passing
- [ ] **Manual Testing**: Manual testing scenarios executed and validated
- [ ] **Performance Tests**: Performance and load testing completed and validated
#### Quality Assurance
- [ ] **Code Review**: Code reviewed and approved by senior developer
- [ ] **Standards Compliance**: Code follows Hubtel coding standards and guidelines
- [ ] **Documentation**: All documentation updated (API docs, README, comments)
- [ ] **Deployment Ready**: Code committed, reviewed, and ready for deployment
### 8. Azure DevOps Integration
#### Work Item Structure
- [ ] **Proper Hierarchy**: Work item properly linked to parent epic/feature
- [ ] **Metadata Complete**: All required Azure DevOps fields populated
- [ ] **Tags Applied**: Appropriate tags for filtering and organization applied
- [ ] **Team Assignment**: Proper area path and team assignment specified
#### Tracking and Management
- [ ] **Effort Estimation**: Accurate time estimates for planning purposes
- [ ] **Priority Setting**: Appropriate priority level set based on business value
- [ ] **Iteration Assignment**: Proper sprint or iteration assignment specified
- [ ] **Status Tracking**: Clear status progression and completion criteria defined
## Checklist Scoring
### Quality Levels
- **90-100%**: Excellent - Ready for junior engineer implementation
- **80-89%**: Good - Minor improvements needed before assignment
- **70-79%**: Acceptable - Significant improvements required
- **Below 70%**: Insufficient - Major rework needed before implementation
### Critical Requirements
These items are mandatory and must be checked for task approval:
- Task can be completed within 1-hour window
- All acceptance criteria are testable and specific
- Technology stack and implementation approach clearly defined
- Testing requirements comprehensive and framework-specific
- Hubtel coding standards and documentation properly referenced
### Usage Instructions
1. **Initial Review**: Complete checklist during task creation or enhancement
2. **Quality Gate**: Use as approval criteria before task assignment to developers
3. **Continuous Improvement**: Track common checklist failures to improve task creation processes
4. **Training Tool**: Use checklist to train team members on Hubtel task quality standards
This checklist ensures that all tasks entering Hubtel's development workflow meet the high standards required for successful implementation by developers at all experience levels.
==================== END: .hubtel-workflow/checklists/hubtel-task-quality-checklist.md ====================
==================== START: .hubtel-workflow/checklists/project-understanding-checklist.md ====================
# Project Understanding Checklist
## Overview
This checklist validates that an engineer has achieved comprehensive project understanding and is ready for independent, confident contribution. Use this as both an onboarding validation tool and a self-assessment guide.
## Business Context Understanding ✅
### Project Purpose & Value
- [ ] **Business Problem**: Can clearly explain what business problem this project solves
- [ ] **User Value**: Understands how end users benefit from this system
- [ ] **Success Metrics**: Knows how project success is measured and tracked
- [ ] **Hubtel Ecosystem Role**: Understands how this project fits into Hubtel's broader platform
- [ ] **Stakeholder Impact**: Can identify who is affected by changes to this system
### User Understanding
- [ ] **Primary Users**: Can describe who the main users are and their typical workflows
- [ ] **User Journeys**: Understands critical user paths through the system
- [ ] **Pain Points**: Aware of common user issues and system limitations
- [ ] **Usage Patterns**: Knows when and how the system experiences peak usage
- [ ] **Feature Priorities**: Understands which features are most critical to users
### Business Context Application
- [ ] **Change Prioritization**: Can assess business impact of different types of changes
- [ ] **Feature Decisions**: Understands rationale behind existing feature choices
- [ ] **Resource Allocation**: Aware of team priorities and resource constraints
- [ ] **Competitive Landscape**: Knows how this system compares to alternatives
- [ ] **Regulatory Requirements**: Understands any compliance or regulatory considerations
## Technical Architecture Mastery ✅
### System Design Understanding
- [ ] **High-Level Architecture**: Can draw and explain the system architecture diagram
- [ ] **Component Relationships**: Understands how major components interact and depend on each other
- [ ] **Data Flow**: Can trace data movement through the entire system
- [ ] **System Boundaries**: Clearly understands what's internal vs external to the system
- [ ] **Integration Points**: Knows all external systems, APIs, and services integrated
### Technology Stack Proficiency
- [ ] **Primary Technologies**: Confident with main frameworks, languages, and tools used
- [ ] **Architecture Patterns**: Understands design patterns used and why they were chosen
- [ ] **Database Design**: Comfortable with data models, relationships, and query patterns
- [ ] **Performance Characteristics**: Aware of system performance patterns and bottlenecks
- [ ] **Scalability Considerations**: Understands how system handles load and growth
### Code Organization Mastery
- [ ] **Directory Structure**: Can navigate codebase efficiently and understands organization logic
- [ ] **Naming Conventions**: Follows and understands project naming and coding conventions
- [ ] **Abstraction Layers**: Comfortable with different abstraction levels and their purposes
- [ ] **Dependency Management**: Understands how components depend on each other
- [ ] **Configuration Management**: Knows how system configuration is managed across environments
## Development Workflow Proficiency ✅
### Local Development Mastery
- [ ] **Environment Setup**: Can set up development environment from scratch without guidance
- [ ] **Development Tools**: Proficient with IDE, debugger, and development utilities
- [ ] **Local Testing**: Can run full test suite locally and understands test categories
- [ ] **Database Management**: Comfortable with local database setup and migrations
- [ ] **Service Dependencies**: Can start and manage external service dependencies locally
### Testing Competence
- [ ] **Test Types**: Understands unit, integration, and E2E testing approaches used
- [ ] **Test Execution**: Can run different test categories and interpret results
- [ ] **Test Writing**: Can write tests following project patterns and conventions
- [ ] **Coverage Understanding**: Knows coverage expectations and can assess test completeness
- [ ] **Test Debugging**: Can debug failing tests and understand root causes
### Development Process Understanding
- [ ] **Branching Strategy**: Understands git workflow and branching conventions
- [ ] **Code Review Process**: Knows how to request reviews and provide quality feedback
- [ ] **CI/CD Pipeline**: Understands build, test, and deployment automation
- [ ] **Quality Gates**: Aware of quality checks and requirements before code merge
- [ ] **Documentation Standards**: Knows when and how to update project documentation
## Change Implementation Confidence ✅
### Change Planning Ability
- [ ] **Impact Assessment**: Can analyze the impact of proposed changes across the system
- [ ] **Risk Evaluation**: Able to identify high-risk vs low-risk changes
- [ ] **Testing Strategy**: Can determine appropriate testing approach for different changes
- [ ] **Rollback Planning**: Understands how to safely undo changes if problems arise
- [ ] **Performance Consideration**: Aware of performance implications of different changes
### Implementation Patterns
- [ ] **Common Scenarios**: Confident implementing common change patterns (CRUD, API endpoints, UI components)
- [ ] **Code Patterns**: Consistently follows established coding patterns and conventions
- [ ] **Error Handling**: Implements proper error handling following project standards
- [ ] **Security Practices**: Applies appropriate security measures for different types of changes
- [ ] **Performance Optimization**: Considers and implements performance best practices
### Feature Development Capability
- [ ] **Requirements Analysis**: Can break down feature requirements into implementation tasks
- [ ] **Design Decisions**: Makes appropriate technical design choices within project constraints
- [ ] **Integration Implementation**: Can integrate new features with existing system components
- [ ] **User Experience**: Considers user experience implications of implementation choices
- [ ] **Backward Compatibility**: Ensures changes don't break existing functionality
## Debugging & Troubleshooting Mastery ✅
### Investigation Skills
- [ ] **Log Analysis**: Can effectively use logs to investigate issues
- [ ] **Monitoring Tools**: Proficient with system monitoring and observability tools
- [ ] **Debugging Techniques**: Can use debugger and other tools to investigate code issues
- [ ] **Performance Profiling**: Can identify and investigate performance problems
- [ ] **Error Reproduction**: Can reproduce issues based on user reports or bug descriptions
### Problem-Solving Approach
- [ ] **Systematic Investigation**: Follows logical approach to isolate and identify root causes
- [ ] **Hypothesis Testing**: Can form and test hypotheses about potential issue causes
- [ ] **Documentation Review**: Knows where to find relevant documentation and resources
- [ ] **Code History Analysis**: Can use git history and blame to understand change context
- [ ] **Collaborative Problem Solving**: Knows when and how to involve team members in investigation
### Issue Resolution Capability
- [ ] **Fix Implementation**: Can implement appropriate fixes based on root cause analysis
- [ ] **Testing Fixes**: Thoroughly tests fixes to ensure they resolve issues without side effects
- [ ] **Prevention Measures**: Can identify and implement measures to prevent similar issues
- [ ] **Knowledge Sharing**: Documents solutions and shares knowledge with team
- [ ] **Escalation Judgment**: Knows when issues require escalation or additional expertise
## Production & Deployment Understanding ✅
### Deployment Process Knowledge
- [ ] **Deployment Pipeline**: Understands the complete deployment process from code to production
- [ ] **Environment Differences**: Aware of differences between dev, staging, and production environments
- [ ] **Deployment Verification**: Knows how to verify successful deployments
- [ ] **Rollback Procedures**: Understands when and how to execute rollback procedures
- [ ] **Deployment Scheduling**: Aware of deployment windows and scheduling considerations
### Production Monitoring
- [ ] **Health Monitoring**: Can check system health using monitoring dashboards and tools
- [ ] **Alert Understanding**: Understands different types of alerts and their significance
- [ ] **Performance Monitoring**: Can assess system performance using production metrics
- [ ] **Error Tracking**: Knows how to investigate production errors and exceptions
- [ ] **User Impact Assessment**: Can evaluate the user impact of production issues
### Incident Response Readiness
- [ ] **Incident Classification**: Can assess incident severity and priority appropriately
- [ ] **Communication Protocols**: Knows who to notify and how during production issues
- [ ] **Investigation Procedures**: Can investigate production issues following established procedures
- [ ] **Mitigation Strategies**: Understands available mitigation options for different issue types
- [ ] **Post-Incident Actions**: Knows post-incident procedures including retrospectives and improvements
## Team Collaboration & Communication ✅
### Knowledge Sharing
- [ ] **Documentation Contribution**: Actively contributes to team documentation and knowledge base
- [ ] **Code Review Participation**: Provides valuable feedback in code reviews and learns from others
- [ ] **Team Meetings**: Contributes meaningfully to technical discussions and planning meetings
- [ ] **Mentoring Capability**: Can help onboard and mentor other team members
- [ ] **Knowledge Transfer**: Effectively shares expertise and lessons learned with colleagues
### Communication Skills
- [ ] **Technical Communication**: Can explain technical concepts clearly to different audiences
- [ ] **Problem Reporting**: Reports issues and bugs with appropriate detail and context
- [ ] **Solution Proposals**: Can propose technical solutions with clear rationale
- [ ] **Status Updates**: Provides clear, concise updates on work progress and blockers
- [ ] **Cross-Team Collaboration**: Communicates effectively with other teams and stakeholders
### Professional Development
- [ ] **Continuous Learning**: Actively learns new technologies and improves existing skills
- [ ] **Industry Awareness**: Stays current with relevant industry trends and best practices
- [ ] **Feedback Reception**: Receives and applies feedback constructively
- [ ] **Initiative Taking**: Identifies and proposes improvements to processes and systems
- [ ] **Team Culture**: Contributes positively to team culture and collaborative environment
## Confidence Validation Scenarios ✅
### Practical Application Tests
- [ ] **Feature Implementation**: Successfully implement a medium-complexity feature independently
- [ ] **Bug Investigation**: Investigate and resolve a production issue with minimal guidance
- [ ] **Performance Optimization**: Identify and implement a performance improvement
- [ ] **Code Refactoring**: Refactor existing code to improve maintainability without breaking functionality
- [ ] **Integration Development**: Implement integration with a new external service or API
### Knowledge Application Scenarios
- [ ] **Architecture Explanation**: Can explain system architecture to a new team member
- [ ] **Change Impact Analysis**: Accurately assess the impact of a proposed significant change
- [ ] **Technical Decision Making**: Make appropriate technical decisions within project constraints
- [ ] **Problem-Solution Matching**: Identify appropriate solutions for different types of problems
- [ ] **Risk Assessment**: Evaluate and communicate technical risks of different approaches
### Independence Indicators
- [ ] **Self-Directed Work**: Can work independently on tasks without constant guidance
- [ ] **Resource Utilization**: Effectively uses available resources (documentation, tools, team knowledge)
- [ ] **Decision Making**: Makes good technical decisions and knows when to seek input
- [ ] **Quality Ownership**: Takes ownership of code quality and follows testing best practices
- [ ] **Proactive Communication**: Communicates proactively about progress, blockers, and discoveries
## Scoring and Assessment
### Competency Levels
- **90-100% Complete**: **Expert Level** - Ready for complex tasks and mentoring others
- **80-89% Complete**: **Proficient Level** - Ready for independent work with occasional guidance
- **70-79% Complete**: **Developing Level** - Can work independently on routine tasks
- **60-69% Complete**: **Basic Level** - Needs continued mentoring and guidance
- **Below 60%**: **Novice Level** - Requires intensive mentoring and structured learning
### Critical Competencies
These areas are essential and must be at least 80% complete:
- Business Context Understanding
- Technical Architecture Mastery
- Development Workflow Proficiency
- Change Implementation Confidence
- Debugging & Troubleshooting Mastery
### Usage Guidelines
**For Onboarding Mentors:**
- Use this checklist to plan and track onboarding progress
- Focus on critical competencies first, then fill in supporting areas
- Validate understanding through practical application, not just theoretical knowledge
**For Engineers:**
- Use as self-assessment tool to identify learning priorities
- Seek specific help in areas where you're below 70% confidence
- Practice scenarios and hands-on application to build real competence
**For Team Leads:**
- Use to assess readiness for different types of task assignments
- Identify team knowledge gaps and training opportunities
- Plan career development paths based on competency assessment
This checklist ensures engineers develop not just surface familiarity, but deep, practical competence that enables confident, independent contribution to any project! 🚀
==================== END: .hubtel-workflow/checklists/project-understanding-checklist.md ====================
==================== START: .hubtel-workflow/workflows/hubtel-development-workflow.yaml ====================
workflow:
id: hubtel-development-workflow
name: Hubtel Development Workflow
description: >-
Complete Hubtel development workflow supporting all entry points with Azure DevOps integration,
frontend/backend coordination, and junior engineer optimization.
type: hubtel-specific
project_types:
- web-application
- api-service
- full-stack
- microservice
- frontend-only
- backend-only
# Entry point sequences
entry_point_workflows:
# Entry Point A: Azure DevOps Import
azure_import:
sequence:
- agent: hubtel-task-creator
action: import_azure_tasks
creates: project_contextualized_tasks
requires: azure_task_ids
notes: |
Import existing Azure DevOps tasks and analyze within current project context.
Supports batch processing of multiple tasks simultaneously.
OUTPUT: Tasks understood within codebase context, ready for implementation.
- agent: hubtel-task-processor
action: analyze_project_context
uses: project-context-analysis
notes: |
Analyze tasks within current project structure and identify related code.
Map dependencies and understand implementation complexity.
- coordination_point: route_to_development
notes: Route to implementation agents with project context and related files
# Entry Point B: Task Description Processing
task_description:
sequence:
- agent: hubtel-task-processor
action: process_descriptions
creates: structured_tasks
requires: task_descriptions
notes: |
Convert free-form task descriptions into structured, implementable work items.
Add comprehensive acceptance criteria and technical context.
- agent: hubtel-task-creator
action: create_azure_tasks
creates: azure_work_items
condition: create_azure_tasks_enabled
notes: |
OPTIONAL: Create Azure DevOps work items from structured tasks.
Include proper hierarchy and relationship management.
- coordination_point: route_to_development
notes: Proceed to implementation phase with structured tasks
# Entry Point C: Planning Phase Integration
planning_phase:
sequence:
- agent: analyst
creates: project_brief
optional_steps:
- market_research
- competitive_analysis
notes: "Standard CQT planning phase - gather requirements and create project brief"
- agent: pm
creates: prd
requires: project_brief
notes: "Create comprehensive Product Requirements Document with Hubtel context"
- agent: architect
creates: system_architecture
requires: prd
notes: "Design system architecture using Hubtel technology stack preferences"
- agent: hubtel-task-creator
action: convert_planning_to_tasks
creates: azure_epic_hierarchy
requires: [prd, system_architecture]
notes: |
Convert planning artifacts into Azure DevOps epic/feature/story hierarchy.
Break down into 1-hour implementable tasks with full Hubtel context.
- coordination_point: route_to_development
notes: Proceed to implementation with complete task hierarchy
# Entry Point D: Idea to Implementation
idea_to_implementation:
sequence:
- agent: hubtel-task-creator
action: analyze_business_idea
creates: requirements_analysis
requires: business_idea
notes: |
Analyze business idea and extract functional/technical requirements.
Apply Hubtel technology stack constraints and patterns.
- agent: hubtel-task-creator
action: generate_task_hierarchy
creates: azure_work_item_hierarchy
requires: requirements_analysis
notes: |
Generate complete Epic → Feature → Story → Task hierarchy in Azure DevOps.
Automatically create work items with proper relationships and assignments.
- agent: hubtel-task-processor
action: enhance_generated_tasks
uses: hubtel-task-enhancer
notes: |
Apply comprehensive enhancement to all generated tasks.
Ensure junior engineer readiness and testing completeness.
- coordination_point: route_to_development
notes: Proceed to implementation with auto-created Azure task hierarchy
# Development implementation phase (common to all entry points)
implementation_phase:
sequence:
# Task assignment and coordination
- coordination_point: analyze_task_dependencies
agent: hubtel-integration-coordinator
action: coordinate_dependencies
notes: |
Analyze task dependencies and coordination requirements.
Plan frontend/backend development sequence and integration points.
# Frontend implementation cycle
- agent: hubtel-frontend-dev
action: implement_frontend_tasks
repeats: for_each_frontend_task
creates: frontend_implementation
requires: [azure_task, html_artifacts, api_specifications]
notes: |
Frontend Development Cycle:
- Parse Azure task and acceptance criteria
- Process HTML artifacts from UX team
- Implement responsive Next.js/Nuxt.js components
- Add comprehensive Vitest unit tests and Playwright E2E tests
- Integrate with backend APIs with proper error handling
- Prepare for code review (no direct commits)
# Backend implementation cycle
- agent: hubtel-backend-dev
action: implement_backend_tasks
repeats: for_each_backend_task
creates: backend_implementation
requires: [azure_task, api_specifications, database_requirements]
notes: |
Backend Development Cycle:
- Parse Azure task and technical requirements
- Implement .NET Core API endpoints with proper validation
- Add Entity Framework Core models and migrations
- Include OpenTelemetry logging and monitoring
- Create comprehensive Karate API tests and unit tests
- Prepare for code review (no direct commits)
# Integration coordination
- agent: hubtel-integration-coordinator
action: coordinate_integration_points
condition: has_frontend_backend_dependencies
creates: integration_coordination
notes: |
Integration Coordination Activities:
- Manage API contract changes between teams
- Update Docker Compose configurations
- Coordinate environment variable synchronization
- Send Teams notifications for breaking changes
- Update Swagger documentation and Postman collections
# Code review and validation cycle
- coordination_point: developer_review_gate
notes: |
Developer Review Process:
1. Present implementation summary with files changed
2. Show test results and coverage metrics
3. Display review checklist and quality metrics
4. Wait for developer approval or feedback
5. Handle revision requests and re-implementation
6. Proceed to commit only after approval
# Commit and Azure update cycle
- coordination_point: commit_implementation
notes: |
Post-Review Commit Process:
1. Generate commit message with proper task ID reference
2. Execute git commit with CQT Agent co-authorship
3. Optionally update Azure DevOps work item status (if configured)
4. Trigger any configured CI/CD pipelines
# Task completion validation
- coordination_point: validate_task_completion
uses: [frontend-implementation-checklist, backend-implementation-checklist]
notes: |
Final Validation:
1. Verify all acceptance criteria met
2. Confirm testing requirements satisfied
3. Validate code review completion
4. Check Azure DevOps status updates
5. Ensure coordination requirements addressed
# Workflow decision guidance
decision_guidance:
when_to_use_azure_import:
- "Existing Azure DevOps tasks need enhancement for implementation"
- "Tasks created by engineering managers need technical context"
- "Batch processing of multiple related tasks required"
- "Tasks need junior engineer readiness improvement"
when_to_use_task_descriptions:
- "Free-form requirements need structuring"
- "Business requirements need technical translation"
- "New Azure tasks need to be created from descriptions"
- "Acceptance criteria need comprehensive development"
when_to_use_planning_phase:
- "Starting with high-level business ideas or requirements"
- "Need comprehensive requirement gathering and architecture"
- "Project requires full CQT planning methodology"
- "Multiple stakeholders need alignment on requirements"
when_to_use_idea_to_implementation:
- "Converting business ideas directly to implementable tasks"
- "Need rapid prototyping with proper task structure"
- "Automatic Azure DevOps hierarchy creation required"
- "Streamlined idea-to-code pipeline needed"
# Coordination patterns
coordination_patterns:
frontend_backend_coordination:
triggers:
- api_specification_changes
- database_schema_modifications
- authentication_integration_updates
- real_time_feature_implementation
coordination_agent: hubtel-integration-coordinator
activities:
- api_contract_validation
- docker_compose_updates
- environment_synchronization
- teams_notifications
- swagger_documentation_updates
azure_devops_integration:
manager: hubtel-task-creator
capabilities:
- batch_work_item_operations
- hierarchy_relationship_management
- status_synchronization
- commit_linking
- time_tracking_integration
quality_gates:
- junior_engineer_readiness_validation
- acceptance_criteria_completeness_check
- testing_requirement_verification
- hubtel_standards_compliance_audit
quality_assurance:
framework:
- task_enhancement_validation
- implementation_quality_checks
- testing_coverage_verification
- code_review_preparation
- azure_integration_validation
tools:
- hubtel-task-quality-checklist
- frontend-implementation-checklist
- backend-implementation-checklist
- azure-devops-integration-validation
# Technology stack integration
technology_integration:
frontend:
frameworks: [Next.js, Nuxt.js]
testing: [Vitest, Playwright]
patterns: [Component composition, API integration, State management]
quality: [Responsive design, Accessibility, Performance optimization]
backend:
framework: .NET Core
orm: Entity Framework Core
databases: [PostgreSQL, MongoDB]
testing: [Karate, NUnit, Mutation testing]
patterns: [Clean architecture, Repository pattern, SOLID principles]
observability: OpenTelemetry
integration:
containerization: Docker Compose
api_documentation: OpenAPI/Swagger
communication: Teams notifications
version_control: Azure DevOps Git
project_management: Azure DevOps Work Items
# Flow diagram
flow_diagram: |
```mermaid
graph TD
A[Choose Entry Point] --> B{Entry Point Type}
B -->|Azure Import| C[hubtel-task-creator: Import Azure Tasks]
B -->|Task Descriptions| D[hubtel-task-processor: Structure Tasks]
B -->|Planning Phase| E[Standard CQT Planning Agents]
B -->|Idea to Tasks| F[hubtel-task-creator: Analyze Idea]
C --> G[Enhance with Hubtel Context]
D --> H{Create Azure Tasks?}
E --> I[hubtel-task-creator: Convert to Tasks]
F --> J[Generate Azure Task Hierarchy]
H -->|Yes| K[Create Azure Work Items]
H -->|No| L[Use Structured Tasks]
G --> M[Quality Validation]
I --> M
J --> M
K --> M
L --> M
M --> N[hubtel-integration-coordinator: Analyze Dependencies]
N --> O{Task Type}
O -->|Frontend| P[hubtel-frontend-dev: Implement]
O -->|Backend| Q[hubtel-backend-dev: Implement]
O -->|Both| R[Coordinate Implementation]
P --> S[Code Review Gate]
Q --> S
R --> S
S --> T{Developer Approval}
T -->|Approved| U[Commit with Task ID]
T -->|Changes Needed| V[Revise Implementation]
U --> W[Update Azure DevOps]
V --> P
V --> Q
W --> X{More Tasks?}
X -->|Yes| N
X -->|No| Y[Workflow Complete]
style A fill:#e1f5fe
style Y fill:#c8e6c9
style S fill:#fff3e0
style T fill:#fce4ec
```
# Handoff prompts
handoff_prompts:
azure_import_complete: "Azure tasks imported and analyzed within project context. Ready for implementation by frontend/backend agents."
task_processing_complete: "Task descriptions processed into structured work items. Proceed with implementation or Azure creation."
planning_to_tasks: "Planning artifacts complete. Converting to Azure DevOps task hierarchy with Hubtel context."
idea_analysis_complete: "Business idea analyzed and converted to implementable Azure task hierarchy. Ready for development."
implementation_ready: "All tasks analyzed and contextualized. Route to appropriate development agents for implementation."
coordination_needed: "Cross-team coordination required. Integration coordinator will manage API changes and environment updates."
review_prepared: "Implementation complete and prepared for developer review. All quality gates passed."
implementation_committed: "Code committed with task reference. Azure DevOps status updated automatically."
# Success metrics
success_metrics:
task_quality:
- junior_engineer_implementation_success_rate: ">95%"
- task_completion_within_1_hour: ">90%"
- acceptance_criteria_completeness: "100%"
- testing_requirement_coverage: ">90%"
development_efficiency:
- code_review_first_pass_rate: ">85%"
- integration_conflict_rate: "<5%"
- azure_devops_synchronization_accuracy: ">99%"
- cross_team_coordination_effectiveness: ">90%"
quality_standards:
- hubtel_coding_standards_compliance: "100%"
- testing_coverage_achievement: ">85%"
- accessibility_compliance: "WCAG AA"
- performance_benchmark_achievement: ">95%"
==================== END: .hubtel-workflow/workflows/hubtel-development-workflow.yaml ====================
==================== START: .hubtel-workflow/data/hubtel-kb.md ====================
# Hubtel Development Knowledge Base
## Overview
The Hubtel CQT Expansion Pack provides AI agents specialized for Hubtel's development workflow, including Azure DevOps integration, frontend/backend coordination, and automated task management.
## Hubtel Technology Stack
### Frontend Technologies
- **Next.js**: React-based framework for production-ready applications
- **Nuxt.js**: Vue.js framework for server-side rendered applications
- **Testing**: Vitest for unit testing, Playwright for end-to-end testing
- **Styling**: Tailwind CSS, CSS Modules, or styled-components depending on project
### Backend Technologies
- **.NET Core**: Primary backend framework for APIs and services
- **Entity Framework Core**: ORM for database operations
- **PostgreSQL**: Primary relational database
- **MongoDB**: Document database for specific use cases
- **Testing**: Karate for API testing, mutation testing for code quality
### Development Tools
- **Azure DevOps**: Project management, CI/CD, and code repositories
- **Docker**: Containerization for local development and deployment
- **OpenTelemetry**: Observability and logging framework
- **Git**: Version control with Azure Repos integration
## Development Workflow
### Task Management
- **Task Sizing**: All tasks should be completable within 1 hour
- **Acceptance Criteria**: Every task must have clear, testable acceptance criteria
- **Testing Requirements**: Unit tests and E2E tests are mandatory for all features
- **Code Review**: All code must be reviewed before merging
### Entry Points
1. **Azure DevOps Import**: Import existing tasks for enhancement and implementation
2. **Task Description**: Process free-form task descriptions into structured work
3. **Planning Phase**: Full requirement gathering and architecture planning
4. **Idea to Tasks**: Convert business ideas into implementable Azure work items
### Coordination Patterns
- **API Changes**: Coordinate between frontend and backend when APIs change
- **Docker Updates**: Share new compose files for local development
- **Documentation**: Maintain API documentation via Swagger/OpenAPI
- **Communication**: Use Teams for real-time coordination
## Quality Standards
### Code Standards
- Follow Hubtel coding guidelines: https://dev-docs.hubtel.com/introduction.html
- Use consistent naming conventions across frontend and backend
- Implement proper error handling and logging
- Include comprehensive unit and integration tests
### Testing Requirements
- **Frontend**: Vitest for unit tests, Playwright for E2E
- **Backend**: Karate for API tests, mutation testing for quality
- **Coverage**: Minimum 80% code coverage for new features
- **E2E**: Critical user journeys must have automated E2E tests
### Documentation Standards
- API documentation via OpenAPI/Swagger
- Code documentation for complex business logic
- README files for setup and development instructions
- Architecture decisions documented in ADRs
## Integration Patterns
### Azure DevOps Integration
- Work items linked to commits via task IDs
- Automatic status updates based on code commits
- Parent-child relationships for epic/feature/story hierarchy
- Time tracking for development effort estimation
### Cross-Team Coordination
- Shared Docker Compose files for consistent environments
- API contract-first development approach
- Regular API specification updates via Postman/Swagger
- Teams notifications for breaking changes
### Environment Management
- Local development via Docker Compose
- Environment-specific configuration management
- Secrets management via Azure Key Vault
- Consistent deployment pipelines across environments
## Best Practices
### Development Practices
- Branch naming: feature/AZ-{task-id}-{description}
- Commit messages: {type}(AZ-{task-id}): {description}
- Pull request templates with checklists
- Automated testing in CI/CD pipeline
### Performance Considerations
- Database query optimization with EF Core
- Frontend bundle optimization and code splitting
- API response caching strategies
- Monitoring and alerting via OpenTelemetry
### Security Practices
- Input validation on all API endpoints
- Authentication and authorization patterns
- Secure secret management
- Regular security scanning and updates
## Common Scenarios
### Frontend Task Implementation
1. Parse HTML artifacts from UX team
2. Implement responsive component with Next.js/Nuxt.js
3. Add Vitest unit tests for component logic
4. Create Playwright E2E tests for user interactions
5. Update API integration based on backend specifications
### Backend Task Implementation
1. Design API endpoints following REST principles
2. Implement .NET Core controllers and services
3. Add Entity Framework Core data models and migrations
4. Create Karate tests for API endpoints
5. Add OpenTelemetry logging and monitoring
### Integration Task Implementation
1. Coordinate API changes between frontend and backend
2. Update Docker Compose files for new services
3. Generate updated OpenAPI specifications
4. Notify teams of breaking changes
5. Validate end-to-end functionality
This knowledge base serves as the foundation for all Hubtel-specific agents, ensuring consistent development practices and quality standards across all projects.
==================== END: .hubtel-workflow/data/hubtel-kb.md ====================