From b717f229a4ed8c095b77b311f5848244d4d42484 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Sat, 13 Sep 2025 11:45:52 +0800 Subject: [PATCH] feat: Optimize TODO_LIST structure with hierarchical display and container task handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .claude/agents/code-developer.md | 14 +++++---- .claude/commands/task/breakdown.md | 34 ++++++++++++---------- .claude/commands/workflow/plan.md | 7 +++++ .claude/workflows/workflow-architecture.md | 24 ++++++++++----- 4 files changed, 50 insertions(+), 29 deletions(-) diff --git a/.claude/agents/code-developer.md b/.claude/agents/code-developer.md index 6c578f67..5669cc16 100644 --- a/.claude/agents/code-developer.md +++ b/.claude/agents/code-developer.md @@ -122,14 +122,18 @@ ELIF context insufficient OR task has analysis marker: ```markdown # Tasks: User Authentication System - ## Main Tasks - - [x] **IMPL-001**: Create auth module → [📋](./.task/impl-001.json) | [✅](./.summaries/IMPL-001.md) + ## Task Progress + ▸ **IMPL-001**: Create auth module → [📋](./.task/impl-001.json) + - [x] **IMPL-001.1**: Database schema → [📋](./.task/impl-001.1.json) | [✅](./.summaries/IMPL-001.1.md) + - [ ] **IMPL-001.2**: API endpoints → [📋](./.task/impl-001.2.json) + - [ ] **IMPL-002**: Add JWT validation → [📋](./.task/impl-002.json) - [ ] **IMPL-003**: OAuth2 integration → [📋](./.task/impl-003.json) - ## Subtasks - - [x] **IMPL-001.1**: Database schema → [📋](./.task/impl-001.1.json) | [✅](./.summaries/IMPL-001.1.md) - - [ ] **IMPL-001.2**: API endpoints → [📋](./.task/impl-001.2.json) + ## Status Legend + - `▸` = Container task (has subtasks) + - `- [ ]` = Pending leaf task + - `- [x]` = Completed leaf task ``` 3. **Generate Summary** (using session context paths): diff --git a/.claude/commands/task/breakdown.md b/.claude/commands/task/breakdown.md index 63bc2975..b2bc4ec0 100644 --- a/.claude/commands/task/breakdown.md +++ b/.claude/commands/task/breakdown.md @@ -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 diff --git a/.claude/commands/workflow/plan.md b/.claude/commands/workflow/plan.md index 0951b6d4..8af3156d 100644 --- a/.claude/commands/workflow/plan.md +++ b/.claude/commands/workflow/plan.md @@ -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 diff --git a/.claude/workflows/workflow-architecture.md b/.claude/workflows/workflow-architecture.md index d4cfb8a6..8fbaaf61 100644 --- a/.claude/workflows/workflow-architecture.md +++ b/.claude/workflows/workflow-architecture.md @@ -384,17 +384,25 @@ File structure scales with task complexity to minimize overhead for simple tasks ```markdown # Tasks: [Session Topic] -## Main Tasks -- [ ] **IMPL-001**: [Task Description] → [📋](./.task/impl-001.json) -- [x] **IMPL-002**: [Completed Task] → [📋](./.task/impl-002.json) | [✅](./.summaries/IMPL-002.md) -- [ ] **IMPL-003**: [Task Description] → [📋](./.task/impl-003.json) +## Task Progress +▸ **IMPL-001**: [Main Task Group] → [📋](./.task/impl-001.json) + - [ ] **IMPL-001.1**: [Subtask] → [📋](./.task/impl-001.1.json) + - [x] **IMPL-001.2**: [Subtask] → [📋](./.task/impl-001.2.json) | [✅](./.summaries/IMPL-001.2.md) + +- [x] **IMPL-002**: [Simple Task] → [📋](./.task/impl-002.json) | [✅](./.summaries/IMPL-002.md) -## Subtasks -- [ ] **IMPL-001.1**: [Subtask] → [📋](./.task/impl-001.1.json) -- [ ] **IMPL-001.2**: [Subtask] → [📋](./.task/impl-001.2.json) +▸ **IMPL-003**: [Main Task Group] → [📋](./.task/impl-003.json) + - [ ] **IMPL-003.1**: [Subtask] → [📋](./.task/impl-003.1.json) + - [ ] **IMPL-003.1.1**: [Sub-subtask] → [📋](./.task/impl-003.1.1.json) + +## Status Legend +- `▸` = Container task (has subtasks) +- `- [ ]` = Pending leaf task +- `- [x]` = Completed leaf task +- Indentation shows hierarchy (2 spaces per level) ## Notes -[可选备注] +[Optional notes] ``` ## Agent Integration