cqt-agent
Version:
304 lines (243 loc) • 11.5 kB
Markdown
# 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.