mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-10 02:24:35 +08:00
- Move CORE.md to workflows/task-core.md for better organization - Significantly reduce task command file sizes: * breakdown.md: 310 → 120 lines * create.md: 326 → 100 lines * replan.md: 594 → 150 lines - Centralize task schema and implementation details in task-core.md - Update all references to use consistent ~/.claude/workflows/task-core.md paths - Maintain full functionality while improving clarity and maintainability - Separate task-level concerns from workflow-level architecture 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
3.2 KiB
3.2 KiB
name, description, usage, argument-hint, examples
| name | description | usage | argument-hint | examples | |||
|---|---|---|---|---|---|---|---|
| breakdown | Intelligent task decomposition with context-aware subtask generation | /task:breakdown <task-id> | task-id |
|
Task Breakdown Command (/task:breakdown)
Overview
Breaks down complex tasks into executable subtasks with context inheritance and agent assignment.
Core Principles
Task System: @~/.claude/workflows/task-core.md
Core Features
⚠️ CRITICAL: Check for active session before breakdown to avoid conflicts.
Breakdown Process
- Session Check: Verify active session contains parent task
- Task Validation: Ensure parent is
pendingstatus - AI Decomposition: Generate subtasks based on parent title
- Context Distribution: Inherit parent requirements and scope
- Agent Assignment: Auto-assign agents based on subtask type
Breakdown Rules
- Only
pendingtasks can be broken down - Parent becomes
containerstatus (not executable) - Subtasks use format: impl-N.M (max 2 levels)
- Context flows from parent to subtasks
- All relationships tracked in JSON
Usage
Basic Breakdown
/task:breakdown impl-1
Interactive process:
Task: Build authentication module
Suggested subtasks:
1. Design authentication schema
2. Implement core auth logic
3. Add security middleware
4. Write comprehensive tests
Accept breakdown? (y/n): y
✅ Task impl-1 broken down:
▸ impl-1: Build authentication module (container)
├── impl-1.1: Design schema → planning-agent
├── impl-1.2: Implement logic → code-developer
├── impl-1.3: Add middleware → code-developer
└── impl-1.4: Write tests → code-review-test-agent
Files created: .task/impl-1.json + 4 subtask files
Decomposition Logic
Agent Assignment
- Design/Planning →
planning-agent - Implementation →
code-developer - Testing →
code-review-test-agent - Review →
review-agent
Context Inheritance
- Subtasks inherit parent requirements
- Scope refined for specific subtask
- Implementation details distributed appropriately
Implementation Details
See @~/.claude/workflows/task-core.md for:
- Complete task JSON schema
- Implementation field structure
- Context inheritance rules
- Agent assignment logic
Validation
Pre-breakdown Checks
- Active session exists
- Task found in session
- Task status is
pending - Not already broken down
Post-breakdown Actions
- Update parent to
containerstatus - Create subtask JSON files
- Update parent subtasks list
- Update session stats
Examples
Basic Breakdown
/task:breakdown impl-1
▸ impl-1: Build authentication (container)
├── impl-1.1: Design schema → planning-agent
├── impl-1.2: Implement logic → code-developer
└── impl-1.3: Write tests → code-review-test-agent
Error Handling
# Task not found
❌ Task impl-5 not found
# Already broken down
⚠️ Task impl-1 already has subtasks
# Wrong status
❌ Cannot breakdown completed task impl-2
Related Commands
/task:create- Create new tasks/task:execute- Execute subtasks/context- View task hierarchy