id: task-106 title: Add --desc alias for description flag status: Done assignee: [] created_date: '2025-07-03' updated_date: '2025-07-04' labels: [] dependencies: []
Description
Add --desc as an additional alias for the -d/--description flag to provide more convenience when creating tasks with descriptions.
Acceptance Criteria
- [x] The --desc flag works as an alias for --description
- [x] All three flags (-d, --description, --desc) work interchangeably
- [x] Help text shows all three aliases
- [x] Tests verify all aliases work correctly
- [x] Documentation is updated to reflect the new alias
Implementation Plan
- Analyze current CLI argument parsing for description flags
- Add --desc alias to task create, edit, and draft create commands
- Update option handling logic to support both --description and --desc
- Create comprehensive test suite to verify functionality
- Update documentation to include the new alias
- Run tests and ensure all functionality works correctly
Implementation Notes
Approach taken:
- Added
--descas a separate option in Commander.js alongside existing-d, --description - Updated option handling logic in both
buildTaskFromOptionsand task edit command - Created comprehensive test suite to verify functionality
Features implemented:
--descalias for task create command--descalias for task edit command--descalias for draft create command- Help text shows all available aliases
- Proper handling when both
--descriptionand--descare provided (uses first one found)
Technical decisions and trade-offs:
- Separate options approach: Used separate
.option()calls instead of trying to combine flags, as Commander.js doesn't support multiple long flags in a single option - Priority handling: Used
options.description || options.descto handle cases where both are provided - Comprehensive testing: Created dedicated test file to ensure all functionality works correctly
Modified files:
src/cli.ts: Added--descoptions to all three commands and updated option handling logicsrc/test/desc-alias.test.ts: Created comprehensive test suitesrc/guidelines/agent-guidelines.md: Updated command reference table to include--descexample