id: task-19 title: CLI - fix default task status and remove Draft from statuses status: Done reporter: @MrLesk created_date: '2025-06-09' labels: [] dependencies: []
Description
The CLI currently creates tasks in the "Draft" status by default and includes "Draft" in the list of task statuses. Draft tasks should be handled separately.
Acceptance Criteria
- [x]
backlog task createwithout options creates a task in.backlog/taskswith statusTo Do. - [x]
backlog task create --draftcreates a draft task in.backlog/draftswith statusDraft. - [x]
config.ymlno longer listsDraftin thestatusesarray and setsdefault_statustoTo Do. - [x] Documentation updated to reflect the new behaviour.
Implementation Notes
Constants Updated (src/constants/index.ts:36-41):
- Changed
DEFAULT_STATUSESfrom["Draft", "To Do", "In Progress", "Done"]to["To Do", "In Progress", "Done"] - Set
FALLBACK_STATUSto"To Do"instead of"Draft" - Removed "Draft" from the standard workflow statuses
CLI Command Enhancement (src/cli.ts:191-204):
- Added
--draftoption tobacklog task createcommand - When
--draftflag is used, task is created in.backlog/draftsusingcore.createDraft() - Without
--draftflag, task is created in.backlog/tasksusingcore.createTask() - Both operations properly handle the status assignment based on context
Configuration Updates:
- Project
config.ymlnow showsstatuses: ["To Do", "In Progress", "Done"](no Draft) - Default status set to
"To Do"in configuration files - Draft tasks are managed separately from the main workflow statuses
Documentation Updates (README.md):
- Line 74: Added
--draftoption documentation for task creation - Line 199: Added explanation that "Draft tasks are stored separately under
.backlog/drafts" - Clear distinction between workflow statuses and draft storage location
Test Verification:
- All 35 CLI integration tests pass
- All 20 core tests pass
- Manual testing confirms regular tasks created with "To Do" status in
.backlog/tasks - Manual testing confirms draft tasks created with "Draft" status in
.backlog/drafts
Workflow Impact:
- Regular task creation:
backlog task create "Title"→.backlog/taskswith status "To Do" - Draft task creation:
backlog task create "Title" --draft→.backlog/draftswith status "Draft" - Kanban board and listing commands now show only workflow statuses: To Do, In Progress, Done
- Draft tasks are managed through separate
backlog draftcommands
The implementation successfully separates draft handling from the main task workflow while maintaining backward compatibility and clear user experience.