feat: Add task-specific path management system for precise CLI analysis

- Add 'paths' field to task JSON schema with semicolon-separated concrete paths
- Create read-task-paths.sh script to convert paths to Gemini @ format
- Update all agents to use task-specific paths instead of --all-files
- Integrate get_modules_by_depth.sh for project structure discovery
- Update workflow planning to populate paths field automatically
- Enhance execute command to pass task-specific paths to agents
- Update documentation for new path management system

🤖 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:28:16 +08:00
parent e8de626387
commit 9a4003deda
10 changed files with 146 additions and 7 deletions

View File

@@ -91,6 +91,7 @@ The command automatically detects input type:
- Automatically creates .task/ files when complexity warrants
- Generates hierarchical task structure (max 3 levels)
- Updates session state with task references
- Runs project structure analysis to populate paths field
### Implementation Field Requirements
⚠️ **CRITICAL**: All generated tasks must include detailed implementation guidance
@@ -132,6 +133,31 @@ The command automatically detects input type:
- **context_notes**: Dependencies, risks, performance considerations
- **analysis_source**: manual|gemini|codex|auto-detected
**Paths Field Population Process**:
1. **Project Structure Analysis**: Run `get_modules_by_depth.sh` to discover project structure
2. **Relevance Filtering**: Match discovered modules to task requirements
3. **Path Selection**: Choose concrete directories/files (avoid wildcards)
4. **Format**: Semicolon-separated list (e.g., `"src/auth;tests/auth;config/auth.json"`)
**Path Selection Strategy**:
```pseudo
# Step 1: Analyze project structure
modules = Bash(.claude/scripts/get_modules_by_depth.sh list)
# Step 2: Extract relevant modules based on task scope
relevant_paths = []
for module in modules:
if matches_task_scope(module.path, task_requirements):
relevant_paths.append(module.path)
# Step 3: Add specific files mentioned in requirements
specific_files = extract_file_mentions(task_requirements)
relevant_paths.extend(specific_files)
# Step 4: Format as semicolon-separated string
task.paths = join(relevant_paths, ";")
```
**Quality Standards**:
- logic_flow must use specified symbols (───►, ◊───, ◄───)
- Each file must have specific location (function name or line range)