/bounty 100
Description
Input validation logic is currently scattered across different command files (add.py, list.py, done.py). This creates code duplication and makes validation logic harder to maintain and test.
Current State
validate_description() in commands/add.py
validate_task_file() in commands/list.py
validate_task_id() in commands/done.py
- Each command also has duplicate
get_tasks_file() helper
Proposed Solution
- Create new
utils/validation.py module
- Extract all validation functions to this module
- Create
utils/paths.py for shared path helpers like get_tasks_file()
- Update all commands to import and use shared validators
- Ensure NO behavior changes (pure refactor)
Requirements
- Create
utils/ directory with proper __init__.py
- Move validation functions to
utils/validation.py
- Move path helpers to
utils/paths.py
- Update all command imports
- All existing tests must still pass
- No duplicate validation code remains
Acceptance Criteria
/bounty 100
Description
Input validation logic is currently scattered across different command files (
add.py,list.py,done.py). This creates code duplication and makes validation logic harder to maintain and test.Current State
validate_description()incommands/add.pyvalidate_task_file()incommands/list.pyvalidate_task_id()incommands/done.pyget_tasks_file()helperProposed Solution
utils/validation.pymoduleutils/paths.pyfor shared path helpers likeget_tasks_file()Requirements
utils/directory with proper__init__.pyutils/validation.pyutils/paths.pyAcceptance Criteria
utils/validation.pyutils/paths.py