UNPKG

@papaoloba/nightly-code-orchestrator

Version:
308 lines (263 loc) 11 kB
# Nightly Code Tasks Configuration # Define the tasks to be executed during automated coding sessions version: "1.0" created_at: "2025-01-01T00:00:00Z" tasks: # Example Feature Task - id: "implement-user-auth" type: "feature" priority: 8 title: "Implement User Authentication System" requirements: | Implement a complete user authentication system with the following features: 1. User registration with email and password 2. Email verification for new accounts 3. User login with JWT token generation 4. Password reset functionality 5. Protected routes middleware 6. User profile management Technical Requirements: - Use industry-standard security practices - Hash passwords with bcrypt - Implement JWT with proper expiration - Add input validation and sanitization - Include proper error handling - Follow REST API conventions Integration Requirements: - Integrate with existing database schema - Maintain backward compatibility - Add appropriate logging - Update API documentation acceptance_criteria: - "User can register with email and password" - "Email verification is sent and processed correctly" - "User can login and receive valid JWT token" - "Password reset functionality works end-to-end" - "Protected routes reject unauthenticated requests" - "All endpoints return proper HTTP status codes" - "Input validation prevents common security issues" - "Unit tests cover all authentication flows" - "Integration tests verify end-to-end functionality" - "API documentation is updated with new endpoints" minimum_duration: 180 # Optional: Forces iterative prompting until 3 hours is reached dependencies: [] tags: ["backend", "security", "authentication"] files_to_modify: - "src/auth/" - "src/middleware/" - "src/routes/auth.js" - "src/models/User.js" - "test/auth/" custom_validation: script: "./scripts/validate-auth.js" timeout: 300 enabled: true # Example Bug Fix Task - id: "fix-memory-leak" type: "bugfix" priority: 9 title: "Fix Memory Leak in Data Processing" requirements: | There is a memory leak in the data processing module that causes the application to consume increasing amounts of memory over time, eventually leading to crashes. Problem Description: - Memory usage increases by ~50MB per hour during normal operation - Application crashes after 8-12 hours of continuous operation - Issue appears to be related to event listeners not being properly cleaned up - Affects the data processing pipeline in src/processors/ Investigation Notes: - Memory profiling shows growing number of Event objects - Occurs specifically when processing large datasets - May be related to recent changes in stream processing Fix Requirements: - Identify and fix the memory leak - Add proper cleanup of event listeners - Implement memory monitoring and alerts - Add unit tests to prevent regression - Update documentation with memory management best practices acceptance_criteria: - "Memory usage remains stable during extended operation" - "All event listeners are properly cleaned up" - "Unit tests verify proper cleanup in all scenarios" - "Memory monitoring is implemented and functional" - "Application can run for 24+ hours without memory issues" - "Performance benchmarks show no regression" minimum_duration: 90 # Optional: Forces iterative prompting until 1.5 hours is reached dependencies: [] tags: ["bugfix", "performance", "memory"] files_to_modify: - "src/processors/" - "src/utils/monitoring.js" - "test/processors/" enabled: true # Example Refactoring Task - id: "refactor-api-handlers" type: "refactor" priority: 5 title: "Refactor API Route Handlers for Better Maintainability" requirements: | The current API route handlers have grown large and complex, making them difficult to maintain and test. Refactor them to improve code organization and maintainability. Current Issues: - Individual route files are over 500 lines long - Business logic is mixed with HTTP handling code - Duplicated validation logic across routes - Difficult to unit test individual components - Error handling is inconsistent Refactoring Goals: - Extract business logic into service layer - Create reusable validation middleware - Implement consistent error handling - Improve code organization and readability - Maintain 100% backward compatibility - Improve test coverage to 90%+ Architecture: - Controllers: Handle HTTP requests/responses - Services: Contain business logic - Validators: Reusable validation logic - Middleware: Cross-cutting concerns acceptance_criteria: - "Route handlers are under 100 lines each" - "Business logic is extracted to service layer" - "Validation logic is centralized and reusable" - "Error handling is consistent across all routes" - "All existing API endpoints continue to work" - "Test coverage is improved to 90%+" - "Code passes all linting rules" - "Documentation is updated to reflect new architecture" minimum_duration: 150 # Optional: Forces iterative prompting until 2.5 hours is reached dependencies: [] tags: ["refactor", "architecture", "maintainability"] files_to_modify: - "src/routes/" - "src/services/" - "src/controllers/" - "src/middleware/" - "test/" enabled: true # Example Test Task - id: "add-integration-tests" type: "test" priority: 6 title: "Add Comprehensive Integration Tests" requirements: | Add comprehensive integration tests to improve code quality and prevent regressions. Current test coverage is focused on unit tests but lacks integration test coverage. Test Coverage Goals: - API endpoint integration tests - Database integration tests - External service integration tests - End-to-end user workflow tests - Performance and load testing Technical Requirements: - Use existing test framework (Jest) - Set up test database for integration tests - Mock external services appropriately - Implement test data factories - Add CI/CD integration test pipeline - Ensure tests can run in isolation Test Categories: 1. API Integration Tests - Test all REST endpoints - Verify request/response formats - Test authentication and authorization - Test error scenarios 2. Database Integration Tests - Test data persistence - Test database migrations - Test complex queries - Test transaction handling 3. Service Integration Tests - Test service-to-service communication - Test external API integrations - Test message queue interactions acceptance_criteria: - "Integration test coverage reaches 80%+" - "All critical user workflows are tested end-to-end" - "Tests run reliably in CI/CD pipeline" - "Test execution time is under 5 minutes" - "Tests properly clean up test data" - "Clear test documentation is provided" - "Tests follow established patterns and conventions" minimum_duration: 120 # Optional: Forces iterative prompting until 2 hours is reached dependencies: ["refactor-api-handlers"] tags: ["testing", "quality", "ci-cd"] files_to_modify: - "test/integration/" - "test/fixtures/" - "test/helpers/" - "package.json" enabled: true # Example Documentation Task - id: "update-api-documentation" type: "docs" priority: 3 title: "Update API Documentation" requirements: | Update the API documentation to reflect recent changes and improvements. The current documentation is outdated and missing several new endpoints. Documentation Requirements: - Update OpenAPI/Swagger specification - Add examples for all endpoints - Document authentication methods - Include error response formats - Add SDK/client library examples - Create getting started guide Format and Tools: - Use OpenAPI 3.0 specification - Generate interactive documentation with Swagger UI - Include Postman collection - Add code examples in multiple languages - Ensure documentation is version controlled Content to Update: - New authentication endpoints - Updated user management endpoints - New data processing endpoints - Error handling and status codes - Rate limiting information - WebSocket API documentation acceptance_criteria: - "All API endpoints are documented with examples" - "Authentication methods are clearly explained" - "Error responses include proper status codes and messages" - "Interactive documentation is generated and accessible" - "Postman collection is updated and tested" - "Getting started guide helps new developers" - "Documentation passes accessibility checks" minimum_duration: 75 # Optional: Forces iterative prompting until 1.25 hours is reached dependencies: ["implement-user-auth"] tags: ["documentation", "api", "developer-experience"] files_to_modify: - "docs/" - "openapi.yaml" - "README.md" - "examples/" enabled: true # Template for new tasks (disabled by default) - id: "template-task" type: "feature" priority: 5 title: "Task Title Here" requirements: | Detailed description of what needs to be implemented. Include: - Functional requirements - Technical requirements - Integration requirements - Performance requirements - Security considerations acceptance_criteria: - "Specific, measurable criteria" - "Each criteria should be testable" - "Include both functional and non-functional requirements" minimum_duration: 60 # Optional: Forces iterative prompting until duration is reached (in minutes) dependencies: [] # List of task IDs this depends on tags: ["tag1", "tag2"] # Organizing tags files_to_modify: - "src/" # File patterns that might be modified custom_validation: script: "./scripts/validate-task.js" timeout: 300 enabled: false # Set to true to enable this task