# Dev Flow Task List Template
# This file defines the tasks for your project following TDD principles

tasks:
  - id: "setup_project"
    title: "Project Setup and Configuration"
    description: "Set up the basic project structure, dependencies, and development environment"
    success_criteria: "Project builds successfully, basic tests run, development environment is configured"
    # NEW: machine-readable completion rules
    completion_conditions:
      - "tests_pass"
      - "build_success"
    dependencies: []
    phases: ["setup"]
    status: "pending"
    priority: "high"
    created_at: "2024-01-01T00:00:00Z"
    updated_at: "2024-01-01T00:00:00Z"
    test_command: "npm test"  # Adjust for your project type

  - id: "core_functionality"
    title: "Implement Core Functionality"
    description: "Implement the main business logic and core features of the application"
    success_criteria: "Core features work as specified, all unit tests pass, integration tests pass"
    completion_conditions:
      - "tests_pass"
      - "coverage>80"
      - "eslint=0"
    dependencies: ["setup_project"]
    phases: ["development"]
    status: "pending"
    priority: "high"
    created_at: "2024-01-01T00:00:00Z"
    updated_at: "2024-01-01T00:00:00Z"
    test_command: "npm test"

  - id: "error_handling"
    title: "Error Handling and Edge Cases"
    description: "Implement comprehensive error handling and cover edge cases"
    success_criteria: "All error scenarios are handled gracefully, edge case tests pass"
    completion_conditions:
      - "tests_pass"
      - "coverage>85"
    dependencies: ["core_functionality"]
    phases: ["development"]
    status: "pending"
    priority: "medium"
    created_at: "2024-01-01T00:00:00Z"
    updated_at: "2024-01-01T00:00:00Z"
    test_command: "npm test"

  - id: "performance_optimization"
    title: "Performance Optimization"
    description: "Optimize performance and ensure scalability requirements are met"
    success_criteria: "Performance benchmarks are met, no memory leaks, efficient algorithms"
    completion_conditions:
      - "tests_pass"
      - "build_success"
      - "no_todos"
    dependencies: ["error_handling"]
    phases: ["optimization"]
    status: "pending"
    priority: "medium"
    created_at: "2024-01-01T00:00:00Z"
    updated_at: "2024-01-01T00:00:00Z"
    test_command: "npm test"

  - id: "documentation"
    title: "Documentation and Examples"
    description: "Create comprehensive documentation and usage examples"
    success_criteria: "API documentation is complete, examples work, README is comprehensive"
    completion_conditions:
      - "tests_pass"
      - "no_todos"
      - "docs_updated"
      - "readme_complete"
    dependencies: ["performance_optimization"]
    phases: ["documentation"]
    status: "pending"
    priority: "low"
    created_at: "2024-01-01T00:00:00Z"
    updated_at: "2024-01-01T00:00:00Z"
    test_command: "npm test"

  - id: "security_audit"
    title: "Security Audit and Hardening"
    description: "Perform security audit and implement security best practices"
    success_criteria: "No security vulnerabilities, dependencies are secure, security tests pass"
    completion_conditions:
      - "tests_pass"
      - "security_scan_pass"
      - "dependencies_secure"
      - "eslint=0"
    dependencies: ["core_functionality"]
    phases: ["security"]
    status: "pending"
    priority: "high"
    created_at: "2024-01-01T00:00:00Z"
    updated_at: "2024-01-01T00:00:00Z"
    test_command: "npm test"

  - id: "performance_benchmarks"
    title: "Performance Testing and Benchmarks"
    description: "Implement performance tests and ensure benchmarks are met"
    success_criteria: "Performance tests pass, benchmarks meet requirements, no memory leaks"
    completion_conditions:
      - "tests_pass"
      - "performance_acceptable"
      - "coverage>75"
      - "build_success"
    dependencies: ["error_handling"]
    phases: ["performance"]
    status: "pending"
    priority: "medium"
    created_at: "2024-01-01T00:00:00Z"
    updated_at: "2024-01-01T00:00:00Z"
    test_command: "npm test"

# Template Notes:
# - Adjust task IDs, titles, and descriptions for your specific project
# - Update test_command based on your project type (npm test, pytest, cargo test, etc.)
# - Modify dependencies to reflect your actual task relationships
# - Add or remove tasks as needed for your project scope
# - Update dates to reflect actual project timeline
# - Customize success_criteria to match your project requirements
# - Adjust completion_conditions based on your quality standards

# Common test commands by project type:
# - Node.js: "npm test" or "yarn test"
# - Python: "pytest" or "python -m pytest"
# - Rust: "cargo test"
# - Go: "go test ./..."
# - Java: "mvn test" or "gradle test"

# Standard completion_conditions (6-1):
# Core Testing:
#   - "tests_pass": All tests must pass
#   - "coverage>X": Test coverage above X% (60, 80, 90, 95)
# Code Quality:
#   - "eslint=0": No ESLint errors (JavaScript/TypeScript)
#   - "build_success": Project builds without errors
#   - "no_todos": No TODO comments remain
# Documentation:
#   - "docs_updated": Documentation reflects current code
#   - "readme_complete": README contains required sections
# Performance:
#   - "performance_acceptable": Performance benchmarks met
# Security:
#   - "security_scan_pass": Security vulnerability scan passes
#   - "dependencies_secure": All dependencies are secure
#
# See completion_conditions_guide.md for detailed information
