Resolve all TODO comments using parallel processing for backend development tasks.
Resolve all backend TODOs using parallel processing for API, database, security, and performance tasks. Automatically groups independent tasks (different endpoints, services) to run simultaneously while enforcing sequential execution for dependencies like database migrations → entity updates → service changes. Includes comprehensive testing, validation, and commit strategy.
/plugin marketplace add shivrajkumar/traya-plugin/plugin install traya-backend-engineering@traya-pluginResolve all TODO comments using parallel processing for backend development tasks.
Get all unresolved TODOs from the /todos/*.md directory and analyze their backend-specific requirements:
Create a TodoWrite list of all unresolved items grouped by type and dependencies. Make sure to analyze dependencies that might occur and prioritize the ones needed by others.
Backend-Specific Dependencies:
Dependency Analysis:
For example, if you need to:
These must run sequentially. However, independent tasks (different API endpoints, separate services, documentation) can run in parallel.
Output a mermaid flow diagram showing how we can execute these tasks:
graph TD
A[Database Migration: Add user_role column] --> B[Update User Entity]
B --> C[Update UserService]
C --> D[Update UserController + DTO]
D --> E[Add Unit Tests]
D --> F[Add Integration Tests]
G[New API Endpoint: GET /health] --> H[Add HealthController]
H --> I[Add Health Tests]
J[Documentation: Update OpenAPI] --> K[Update Postman Collection]
E --> L[Run All Tests]
F --> L
I --> L
L --> M[Commit Changes]
The diagram should clearly show:
Based on the dependency analysis, spawn backend-specific resolver agents in parallel for independent tasks.
Agent Assignment by Task Type:
For API Development Tasks:
For Database Tasks:
For Security Tasks:
For Performance Tasks:
For Testing Tasks:
For Documentation Tasks:
Parallel Execution Strategy:
# Example: 5 independent tasks can run in parallel
Parallel Group 1 (can all run simultaneously):
1. Task nestjs-specialist(todo-042-add-health-endpoint)
2. Task api-documenter(todo-043-update-openapi-spec)
3. Task testing-specialist(todo-044-add-user-service-tests)
4. Task security-auditor(todo-045-fix-jwt-validation)
5. Task performance-analyzer(todo-046-optimize-query-performance)
Sequential Group 1 (must run in order):
1. Task database-modeler(todo-047-add-user-role-field)
↓
2. Task typeorm-specialist(todo-048-update-user-entity)
↓
3. Task nestjs-specialist(todo-049-update-user-service)
↓
4. Task testing-specialist(todo-050-test-user-role)
Backend-Specific Parallel Execution Rules:
✅ CAN run in parallel:
❌ CANNOT run in parallel (must be sequential):
After parallel execution completes, run comprehensive validation:
Backend Testing Suite:
# TypeScript compilation
npm run build || tsc --noEmit
# Linting
npm run lint || eslint . --ext .ts
# Unit tests
npm test || jest --coverage
# Integration tests
npm run test:integration || jest --config jest.integration.config.js
# E2E tests (if applicable)
npm run test:e2e
# Type checking
tsc --noEmit --pretty
# Database migration validation (test rollback)
npm run migration:run
npm run migration:revert
npm run migration:run
API Testing:
# Test all endpoints with Postman (if Postman MCP available)
# Validate OpenAPI spec compliance
# Check response schemas
# Verify authentication/authorization
# Test error scenarios
Database Validation:
# Verify migrations applied successfully
# Check indexes created
# Validate constraints
# Test query performance
Pre-commit Checklist:
Commit Strategy:
# If all tasks are related (same feature):
git add .
git commit -m "feat(api): implement user role-based access control
- Add user_role column to users table (migration)
- Update User entity with role field
- Implement role-based guards in NestJS
- Add RBAC tests (unit + integration)
- Update OpenAPI spec with role requirements
- Add Postman collection examples
Breaking changes:
- All protected endpoints now require role claim in JWT
Refs: #042, #043, #044, #045
"
# If tasks are unrelated, create separate commits:
git add src/api/health/*
git commit -m "feat(health): add health check endpoint"
git add src/api/users/* src/database/migrations/*
git commit -m "feat(users): add role-based access control"
git add docs/* postman/*
git commit -m "docs: update API documentation and Postman collection"
Resolve TODOs:
pending to completedtodos/completed/)Push Changes:
# Push to remote branch
git push origin feature-branch-name
# Or create PR if work is complete
gh pr create --title "feat: [description]" --body "[details]"
If any todo involves breaking API changes:
Document the change:
## Breaking Changes
- Endpoint: `GET /api/v1/users`
- Change: Added required `role` query parameter
- Migration: Clients must include `?role=user` in requests
- Version: Affects v1, new behavior in v2
Update API version (if using versioning)
Add deprecation warnings to old endpoints
Notify API consumers before merging
Update migration guides
For todos involving database changes:
Test migration on fresh database:
npm run migration:run
Test rollback:
npm run migration:revert
Test with production-like data:
Document migration:
/**
* Migration: Add user_role column
*
* Changes:
* - Add role column to users table
* - Create index on role column
* - Set default role to 'user'
*
* Rollback: Drops role column and index
*
* Data impact: None - column is nullable with default
*/
For performance-related todos:
Benchmark before:
# Record baseline metrics
npm run benchmark
Implement optimization
Benchmark after:
# Compare with baseline
npm run benchmark
Document improvement:
## Performance Improvement
- Endpoint: GET /api/v1/users
- Before: 450ms (p95)
- After: 125ms (p95)
- Improvement: 72% reduction
- Method: Added Redis caching, optimized query with indexes
For security-related todos:
Verify fix with security tests:
# Run security-specific tests
npm run test:security
Check for similar vulnerabilities:
Update security documentation:
Run dependency audit:
npm audit
npm audit fix
After all todos resolved:
## Backend TODOs Resolution Complete
**Total TODOs Resolved:** [X]
**Execution Mode:** [Parallel/Sequential/Mixed]
**Execution Time:** [Y minutes]
### Completed Tasks by Category:
- 🌐 API Development: [count]
- 🗄️ Database: [count]
- 🔒 Security: [count]
- ⚡ Performance: [count]
- ✅ Testing: [count]
- 📝 Documentation: [count]
### Database Changes:
- Migrations created: [count]
- Tables modified: [list]
- Indexes added: [count]
### API Changes:
- New endpoints: [count]
- Modified endpoints: [count]
- Breaking changes: [Yes/No - list if yes]
- OpenAPI spec updated: [Yes/No]
### Test Coverage:
- Unit tests added: [count]
- Integration tests added: [count]
- Coverage change: [before% → after%]
### Performance Improvements:
- Optimized endpoints: [list]
- Response time improvements: [details]
- Query optimizations: [count]
### Commits Created:
- [commit SHA] - [commit message]
- [commit SHA] - [commit message]
### Next Steps:
1. Create pull request: `gh pr create`
2. Request code review from backend team
3. Run CI/CD pipeline
4. Test on staging environment
5. Plan deployment (especially for migrations)
6. Notify API consumers if breaking changes