From 99a8c0d6856ca362808bf4b7a89837a25b98cfbd Mon Sep 17 00:00:00 2001 From: catlog22 Date: Sun, 28 Sep 2025 23:26:15 +0800 Subject: [PATCH] feat: Add core task merging principle to workflow plan MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add "Task Merging Over Decomposition" as core principle - Define concrete decomposition criteria (2500 lines or 6+ files) - Standardize error messages to English for consistency - Improve workflow planning efficiency by reducing unnecessary task splits 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .claude/commands/workflow/plan.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.claude/commands/workflow/plan.md b/.claude/commands/workflow/plan.md index f3e6372a..b8383214 100644 --- a/.claude/commands/workflow/plan.md +++ b/.claude/commands/workflow/plan.md @@ -113,8 +113,8 @@ The following pre_analysis steps are generated for agent execution: "step": "load_base_documentation", "action": "Load core documentation files", "commands": [ - "bash(cat .workflow/docs/README.md 2>/dev/null || echo 'base docs not found')", - "bash(cat CLAUDE.md README.md 2>/dev/null || echo 'project docs not found')" + "bash(cat .workflow/docs/README.md 2>/dev/null || echo 'Base docs not found')", + "bash(cat CLAUDE.md README.md 2>/dev/null || echo 'Project docs not found')" ], "output_to": "base_docs" }, @@ -122,8 +122,8 @@ The following pre_analysis steps are generated for agent execution: "step": "load_task_specific_docs", "action": "Load documentation relevant to task type", "commands": [ - "bash(cat .workflow/docs/architecture/*.md 2>/dev/null || echo 'architecture docs not found')", - "bash(cat .workflow/docs/api/*.md 2>/dev/null || echo 'api docs not found')" + "bash(cat .workflow/docs/architecture/*.md 2>/dev/null || echo 'Architecture docs not found')", + "bash(cat .workflow/docs/api/*.md 2>/dev/null || echo 'API docs not found')" ], "output_to": "task_docs" }, @@ -198,6 +198,14 @@ Each task's `flow_control.implementation_approach` defines execution strategy (p ### Task Decomposition Standards +**Core Principle: Task Merging Over Decomposition** +- **Merge Rule**: Tasks that can be executed together should not be separated - avoid unnecessary decomposition +- **Decomposition Criteria**: Only decompose tasks in the following situations: + - **Excessive Workload**: Code exceeds 2500 lines or modifies more than 6 files + - **Context Separation**: Involves completely different tech stacks or business domains + - **Dependency Blocking**: Subsequent tasks must wait for prerequisite task completion + - **Parallel Execution**: Independent features that can be developed simultaneously by different developers + **Rules**: - **Maximum 10 tasks**: Hard limit - exceeding requires re-scoping - **Function-based**: Complete functional units with related files (logic + UI + tests + config)