mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-12 02:37:45 +08:00
feat: Enhance workflow planning with integrated engineering analysis
- Combine engineering analysis enhancement with project structure analysis - Add core principles for CLI and Task tool integration - Define workflow process: Context → Analyze → Implement - Establish tool usage priority: Task(complex) > CLI(simple) > Hybrid(mixed) - Add complexity-driven selection and intelligent escalation strategies 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,7 @@ examples:
|
|||||||
|
|
||||||
## Core Rules
|
## Core Rules
|
||||||
|
|
||||||
|
|
||||||
### File Structure Reference
|
### File Structure Reference
|
||||||
**Architecture**: @~/.claude/workflows/workflow-architecture.md
|
**Architecture**: @~/.claude/workflows/workflow-architecture.md
|
||||||
|
|
||||||
@@ -53,13 +54,17 @@ examples:
|
|||||||
3. **File grouping**: Identify cohesive file sets
|
3. **File grouping**: Identify cohesive file sets
|
||||||
4. **Quantity prediction**: Estimate main tasks, subtasks, container vs leaf ratio
|
4. **Quantity prediction**: Estimate main tasks, subtasks, container vs leaf ratio
|
||||||
|
|
||||||
### Session Management
|
### Session Management ⚠️ CRITICAL
|
||||||
- **Active session check**: Check for `.workflow/.active-*` marker first
|
- **⚡ FIRST ACTION**: Always check for `.workflow/.active-*` marker before any planning
|
||||||
- Auto-creates new session: `WFS-[topic-slug]`
|
- **Auto-session creation**: `WFS-[topic-slug]` only if no active session exists
|
||||||
- Uses existing active session if available
|
- **Session continuity**: MUST use existing active session to maintain context
|
||||||
- **Dependency context**: MUST read previous task summary documents before planning
|
- **⚠️ Dependency context**: MUST read ALL previous task summary documents before planning
|
||||||
|
- **Session isolation**: Each session maintains independent context and state
|
||||||
|
|
||||||
|
### Project Structure Analysis & Engineering Enhancement
|
||||||
|
**Process**: Context → Analyze → Implement (Simple: CLI direct | Complex: Task + CLI hybrid)
|
||||||
|
**Tool Priority**: Task(complex) > CLI(simple) > Hybrid(mixed complexity)
|
||||||
|
|
||||||
### Project Structure Analysis
|
|
||||||
**Always First**: Run project hierarchy analysis before planning
|
**Always First**: Run project hierarchy analysis before planning
|
||||||
```bash
|
```bash
|
||||||
# Get project structure with depth analysis
|
# Get project structure with depth analysis
|
||||||
@@ -69,6 +74,12 @@ examples:
|
|||||||
# Used for focus_paths and target_files generation
|
# Used for focus_paths and target_files generation
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Core Principles**:
|
||||||
|
- **Complexity-Driven Selection**: Simple patterns use direct CLI, complex analysis uses Task agents with CLI integration
|
||||||
|
- **Context-First Approach**: Always gather project understanding before tool selection
|
||||||
|
- **Intelligent Escalation**: Start CLI, escalate to Task agents when encountering complexity
|
||||||
|
- **Hybrid Flexibility**: Task agents can freely use CLI commands and built-in tools for comprehensive analysis
|
||||||
|
|
||||||
**Structure Integration**:
|
**Structure Integration**:
|
||||||
- Identifies module boundaries and relationships
|
- Identifies module boundaries and relationships
|
||||||
- Maps file dependencies and cohesion groups
|
- Maps file dependencies and cohesion groups
|
||||||
@@ -137,11 +148,6 @@ Documents created for `/workflow:execute`:
|
|||||||
- **File not found**: Clear suggestions
|
- **File not found**: Clear suggestions
|
||||||
- **>10 tasks**: Force re-scoping into iterations
|
- **>10 tasks**: Force re-scoping into iterations
|
||||||
|
|
||||||
## Context Acquisition Strategy
|
|
||||||
|
|
||||||
### Analysis Method Selection (--AM)
|
|
||||||
- **gemini** (default): Pattern analysis, architectural understanding
|
|
||||||
- **codex**: Autonomous development, intelligent file discovery
|
|
||||||
|
|
||||||
### Detailed Context Gathering Commands
|
### Detailed Context Gathering Commands
|
||||||
|
|
||||||
@@ -156,9 +162,6 @@ cd [module] && ~/.claude/scripts/gemini-wrapper -p "Analyze [scope] architecture
|
|||||||
# Cross-module dependencies
|
# Cross-module dependencies
|
||||||
~/.claude/scripts/gemini-wrapper -p "@{src/**/*} @{CLAUDE.md} analyze module relationships and dependencies"
|
~/.claude/scripts/gemini-wrapper -p "@{src/**/*} @{CLAUDE.md} analyze module relationships and dependencies"
|
||||||
|
|
||||||
# Similar feature analysis
|
|
||||||
cd [module] && ~/.claude/scripts/gemini-wrapper -p "Find 3+ similar [feature_type] implementations and their patterns"
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Codex Analysis Templates
|
#### Codex Analysis Templates
|
||||||
```bash
|
```bash
|
||||||
@@ -170,9 +173,6 @@ codex --full-auto exec "analyze existing patterns for [feature] implementation w
|
|||||||
|
|
||||||
# Project understanding
|
# Project understanding
|
||||||
codex --full-auto exec "analyze project structure, conventions, and development requirements" -s danger-full-access
|
codex --full-auto exec "analyze project structure, conventions, and development requirements" -s danger-full-access
|
||||||
|
|
||||||
# Modernization analysis
|
|
||||||
codex --full-auto exec "identify modernization opportunities and refactoring priorities" -s danger-full-access
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Context Accumulation & Inheritance
|
### Context Accumulation & Inheritance
|
||||||
|
|||||||
Reference in New Issue
Block a user