feat: Optimize TODO_LIST structure with hierarchical display and container task handling

- Replace separate Main Tasks/Subtasks sections with unified hierarchical list
- Use ▸ symbol for container tasks (with subtasks) instead of checkboxes
- Maintain standard - [ ]/- [x] for executable leaf tasks
- Add 2-space indentation to show task hierarchy clearly
- Include status legend for better user understanding

Benefits:
- Eliminates confusion about non-executable main tasks
- Provides clear visual hierarchy in single list
- Reduces TODO_LIST complexity and improves usability
- Aligns container task concept with execution model

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-09-13 11:45:52 +08:00
parent 9a4003deda
commit b717f229a4
4 changed files with 50 additions and 29 deletions

View File

@@ -73,10 +73,11 @@ Accept task breakdown? (y/n/edit): y
Automatic generation:
```
✅ Task impl-1 broken down:
├── impl-1.1: Design authentication schema
├── impl-1.2: Implement core auth logic
├── impl-1.3: Add security middleware
── impl-1.4: Write comprehensive tests
impl-1: Build authentication module (container)
├── impl-1.1: Design authentication schema
├── impl-1.2: Implement core auth logic
── impl-1.3: Add security middleware
└── impl-1.4: Write comprehensive tests
Agents assigned:
- impl-1.1 → planning-agent
@@ -85,6 +86,7 @@ Agents assigned:
- impl-1.4 → code-review-test-agent
JSON files created:
- .task/impl-1.json (container)
- .task/impl-1.1.json
- .task/impl-1.2.json
- .task/impl-1.3.json
@@ -267,11 +269,11 @@ Based on subtask type and implementation complexity:
/task:breakdown impl-1
Result:
impl-1: Build authentication (container)
├── impl-1.1: Design auth schema
├── impl-1.2: Implement auth logic
├── impl-1.3: Add security middleware
└── impl-1.4: Write tests
impl-1: Build authentication (container)
├── impl-1.1: Design auth schema
├── impl-1.2: Implement auth logic
├── impl-1.3: Add security middleware
└── impl-1.4: Write tests
```
### Two-Level Breakdown
@@ -279,13 +281,13 @@ impl-1: Build authentication (container)
/task:breakdown impl-1 --depth=2
Result:
impl-1: E-commerce checkout (container)
├── impl-1.1: Payment processing
│ ├── impl-1.1.1: Integrate gateway
│ └── impl-1.1.2: Handle transactions
├── impl-1.2: Order management
│ └── impl-1.2.1: Create order model
└── impl-1.3: Testing
impl-1: E-commerce checkout (container)
├── impl-1.1: Payment processing
│ ├── impl-1.1.1: Integrate gateway
│ └── impl-1.1.2: Handle transactions
├── impl-1.2: Order management
│ └── impl-1.2.1: Create order model
└── impl-1.3: Testing
```
## Error Handling

View File

@@ -90,6 +90,7 @@ The command automatically detects input type:
### Task Generation
- Automatically creates .task/ files when complexity warrants
- Generates hierarchical task structure (max 3 levels)
- Main tasks with subtasks become container tasks (not directly executable)
- Updates session state with task references
- Runs project structure analysis to populate paths field
@@ -191,6 +192,12 @@ task.paths = join(relevant_paths, ";")
### Optional TODO_LIST.md (Auto-triggered)
Created when complexity > simple or task count > 5
**TODO_LIST Structure**: Uses unified hierarchical list format
- Container tasks (with subtasks) marked with `` symbol
- Leaf tasks use standard `- [ ]` / `- [x]` checkboxes
- Indentation shows hierarchy (2 spaces per level)
- Container tasks represent logical grouping, not executable items
### Task JSON Files (Auto-created)
Generated in .task/ directory when decomposition enabled