mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
feat: refine batch module trees task documentation and clarify execution model
This commit is contained in:
@@ -387,14 +387,14 @@ Each task JSON is written to `.workflow/WFS-docs-20240120-143022/.task/IMPL-XXX.
|
|||||||
|
|
||||||
## Task Templates
|
## Task Templates
|
||||||
|
|
||||||
### Level 1: Batch Module Trees Task (Optimized)
|
### Level 1: Batch Module Trees Task
|
||||||
|
|
||||||
**Path Mapping**:
|
**Path Mapping**:
|
||||||
- Project: `{project_name}` (extracted from target_path)
|
- Project: `{project_name}` (extracted from target_path)
|
||||||
- Sources: Multiple directories from `top-level-dirs.txt`
|
- Sources: Multiple directories from `top-level-dirs.txt`
|
||||||
- Output: `.workflow/docs/{project_name}/` (mirrored structure)
|
- Output: `.workflow/docs/{project_name}/` (mirrored structure)
|
||||||
|
|
||||||
**Key Optimization**: Single task processes all module trees by reading pre-analyzed data from Phase 2.
|
**Execution Model**: Single task processes all module trees by reading pre-analyzed data from Phase 2.
|
||||||
|
|
||||||
**Agent Mode (cli_execute=false)**:
|
**Agent Mode (cli_execute=false)**:
|
||||||
```json
|
```json
|
||||||
@@ -731,21 +731,16 @@ Each task JSON is written to `.workflow/WFS-docs-20240120-143022/.task/IMPL-XXX.
|
|||||||
│ ├── folder-analysis.txt # Folder classification results
|
│ ├── folder-analysis.txt # Folder classification results
|
||||||
│ ├── top-level-dirs.txt # Top-level directory list
|
│ ├── top-level-dirs.txt # Top-level directory list
|
||||||
│ ├── all-paths.txt # All folder paths
|
│ ├── all-paths.txt # All folder paths
|
||||||
│ ├── all-existing-module-docs.txt # ⭐ All existing module docs (one-time read)
|
│ ├── all-existing-module-docs.txt # All existing module docs (loaded once)
|
||||||
│ ├── unified-module-analysis.txt # ⭐ Unified analysis for all modules (one-time CLI call)
|
│ ├── unified-module-analysis.txt # Unified analysis for all modules
|
||||||
│ └── existing-docs.txt # Existing documentation paths
|
│ └── existing-docs.txt # Existing documentation paths
|
||||||
└── .task/ # Task JSON files (optimized count)
|
└── .task/ # Task JSON files
|
||||||
├── IMPL-001.json # ⭐ Batch module trees task (all directories)
|
├── IMPL-001.json # Batch module trees task (all directories)
|
||||||
├── IMPL-002.json # Project README (full mode)
|
├── IMPL-002.json # Project README (full mode)
|
||||||
├── IMPL-003.json # ARCHITECTURE.md + EXAMPLES.md (full mode)
|
├── IMPL-003.json # ARCHITECTURE.md + EXAMPLES.md (full mode)
|
||||||
└── IMPL-004.json # HTTP API docs (optional)
|
└── IMPL-004.json # HTTP API docs (optional)
|
||||||
```
|
```
|
||||||
|
|
||||||
**⭐ Optimization Highlights**:
|
|
||||||
- `all-existing-module-docs.txt`: Single file read replaces per-task reads
|
|
||||||
- `unified-module-analysis.txt`: Single CLI call replaces per-task analysis
|
|
||||||
- Task count reduced: 3+ tasks → 1 batch task for all module trees
|
|
||||||
|
|
||||||
**Workflow Session Structure** (workflow-session.json):
|
**Workflow Session Structure** (workflow-session.json):
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -878,14 +873,15 @@ bash(test -d .workflow/docs/my_project && echo "exists" || echo "not exists")
|
|||||||
|
|
||||||
## Execution Mode Summary
|
## Execution Mode Summary
|
||||||
|
|
||||||
| Mode | CLI Placement | CLI MODE | Agent Role | Optimization |
|
| Mode | CLI Placement | CLI MODE | Agent Role |
|
||||||
|------|---------------|----------|------------|--------------|
|
|------|---------------|----------|------------|
|
||||||
| **Agent Mode (default)** | pre_analysis (Phase 2 only) | analysis | Generates documentation files based on pre-analyzed data | Single CLI call in Phase 2, batch processing in IMPL-001 |
|
| **Agent Mode (default)** | pre_analysis (Phase 2) | analysis | Generates documentation files based on pre-analyzed data |
|
||||||
| **CLI Mode (--cli-execute)** | implementation_approach | write | Executes CLI commands to generate docs, validates output | Batch CLI execution for all directories in IMPL-001 |
|
| **CLI Mode (--cli-execute)** | implementation_approach | write | Executes CLI commands to generate docs, validates output |
|
||||||
|
|
||||||
**Key Differences from Previous Version**:
|
**Execution Flow**:
|
||||||
- **Before**: Per-directory tasks, per-task CLI calls, redundant file reads
|
- **Phase 2**: Unified analysis performed once, results stored in `.process/`
|
||||||
- **After**: Single batch task, Phase 2 unified analysis, one-time file reads
|
- **IMPL-001**: Batch processing for all module trees using pre-analyzed data
|
||||||
|
- **IMPL-002+**: Sequential execution for project-level documentation
|
||||||
|
|
||||||
## Related Commands
|
## Related Commands
|
||||||
- `/workflow:execute` - Execute documentation tasks
|
- `/workflow:execute` - Execute documentation tasks
|
||||||
|
|||||||
Reference in New Issue
Block a user