mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
Remove granular progress tracking across workflow system
- Remove detailed progress views (Total Tasks: X, Completed: Y %) from all templates - Simplify TODO_LIST.md structure by removing Progress Overview sections - Remove stats tracking from session-management-principles.json schema - Eliminate progress format and calculation logic from context command - Remove percentage-based progress displays from action-planning-agent - Simplify vibe command coordination by removing detailed task counts - Focus on essential JSON state changes rather than UI progress metrics 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2,112 +2,159 @@
|
||||
|
||||
## Core Agent Coordination Features
|
||||
|
||||
- **Context Preservation**: Maintain original task context throughout Agent chain
|
||||
- **Gemini Context Analysis**: MANDATORY context gathering before any agent execution
|
||||
- **Context-Driven Coordination**: Agents work with comprehensive codebase understanding
|
||||
- **Dynamic Agent Selection**: Choose agents based on discovered context and patterns
|
||||
- **Continuous Context Updates**: Refine understanding throughout agent execution
|
||||
- **Cross-Agent Context Sharing**: Maintain shared context state across all agents
|
||||
- **Pattern-Aware Execution**: Leverage discovered patterns for optimal implementation
|
||||
- **Quality Gates**: Each Agent validates input and ensures output standards
|
||||
- **Adaptive Complexity**: Workflow depth matches task complexity requirements
|
||||
- **Iterative Improvement**: Complex workflows include multiple review-fix cycles
|
||||
- **Structured Output**: Standardized Agent output formats ensure reliable coordination
|
||||
- **Error Recovery**: Graceful handling of Agent coordination failures
|
||||
|
||||
## Workflow Implementation Patterns
|
||||
|
||||
### Simple Workflow Pattern
|
||||
```pseudocode
|
||||
Flow: TodoWrite Creation → Context → Implementation → Review
|
||||
Flow: Gemini Context Analysis → TodoWrite Creation → Context-Aware Implementation → Review
|
||||
|
||||
1. MANDATORY TodoWrite Creation:
|
||||
- "Gather context for implementation"
|
||||
- "Implement solution"
|
||||
- "Review and validate code"
|
||||
- "Complete task"
|
||||
1. MANDATORY Gemini Context Analysis:
|
||||
- Analyze target files and immediate dependencies
|
||||
- Discover existing patterns and conventions
|
||||
- Identify utilities and libraries to use
|
||||
- Generate context package for agents
|
||||
|
||||
2. Implementation Checkpoint:
|
||||
Task(code-developer): Direct implementation
|
||||
2. TodoWrite Creation (Context-informed):
|
||||
- "Execute Gemini context analysis"
|
||||
- "Implement solution following discovered patterns"
|
||||
- "Review against codebase standards"
|
||||
- "Complete task with context validation"
|
||||
|
||||
3. Context-Aware Implementation:
|
||||
Task(code-developer): Implementation with Gemini context package
|
||||
Input: CONTEXT_PACKAGE, PATTERNS_DISCOVERED, CONVENTIONS_IDENTIFIED
|
||||
Output: SUMMARY, FILES_MODIFIED, TESTS, VERIFICATION
|
||||
|
||||
3. Review Checkpoint:
|
||||
Task(code-review-agent): Quick quality review
|
||||
4. Context-Aware Review:
|
||||
Task(code-review-agent): Review with codebase standards context
|
||||
Input: CONTEXT_PACKAGE, IMPLEMENTATION_RESULTS
|
||||
Output: STATUS, SCORE, ISSUES, RECOMMENDATIONS
|
||||
|
||||
Resume Support: Load todos + context from checkpoint
|
||||
Resume Support: Load todos + full context state from checkpoint
|
||||
```
|
||||
|
||||
### Medium Workflow Pattern
|
||||
```pseudocode
|
||||
Flow: TodoWrite → Planning → Implementation → Review
|
||||
Flow: Comprehensive Gemini Analysis → TodoWrite → Multi-Context Implementation → Review
|
||||
|
||||
1. MANDATORY TodoWrite Creation (5-7 todos):
|
||||
- "Create implementation plan"
|
||||
- "Gather context", "Implement with tests"
|
||||
- "Validate", "Review", "Complete"
|
||||
1. MANDATORY Comprehensive Gemini Context Analysis:
|
||||
- Analyze feature area and related components
|
||||
- Discover cross-file patterns and architectural decisions
|
||||
- Identify integration points and dependencies
|
||||
- Generate comprehensive context packages for multiple agents
|
||||
|
||||
2. Planning Checkpoint:
|
||||
Task(planning-agent): Create plan
|
||||
Trigger decomposition if >3 modules or >5 subtasks
|
||||
Output: PLAN_SUMMARY, STEPS, SUCCESS_CRITERIA
|
||||
2. TodoWrite Creation (Context-driven, 5-7 todos):
|
||||
- "Execute comprehensive Gemini context analysis"
|
||||
- "Coordinate multi-agent implementation with shared context"
|
||||
- "Implement following discovered architectural patterns"
|
||||
- "Validate against existing system patterns", "Review", "Complete"
|
||||
|
||||
3. Multi-Context Implementation:
|
||||
Task(code-developer): Implementation with comprehensive context
|
||||
Input: CONTEXT_PACKAGES, ARCHITECTURAL_PATTERNS, INTEGRATION_POINTS
|
||||
Update context as new patterns discovered
|
||||
|
||||
3. Implementation Checkpoint:
|
||||
Task(code-developer): Follow plan
|
||||
Update TODO_CHECKLIST.md if decomposition exists
|
||||
|
||||
4. Review Checkpoint:
|
||||
Task(code-review-agent): Comprehensive review
|
||||
Verify against plan and decomposition
|
||||
4. Context-Aware Review:
|
||||
Task(code-review-agent): Comprehensive review with system context
|
||||
Input: FULL_CONTEXT_STATE, IMPLEMENTATION_RESULTS, PATTERN_COMPLIANCE
|
||||
Verify against discovered architectural patterns
|
||||
|
||||
Resume Support: Full state restoration at each checkpoint
|
||||
Resume Support: Full context state + pattern discovery restoration
|
||||
```
|
||||
|
||||
### Complex Workflow Pattern
|
||||
```pseudocode
|
||||
Flow: TodoWrite → Planning → Implementation → Review → Iterate (max 2)
|
||||
Flow: Deep Gemini Analysis → TodoWrite → Orchestrated Multi-Agent → Review → Iterate (max 2)
|
||||
|
||||
1. MANDATORY TodoWrite Creation (7-10 todos):
|
||||
- "Create detailed plan", "Generate decomposition docs"
|
||||
- "Gather context", "Implement with testing"
|
||||
- "Validate criteria", "Review", "Iterate", "Complete"
|
||||
1. MANDATORY Deep Gemini Context Analysis:
|
||||
- System-wide architectural understanding
|
||||
- Deep pattern analysis across entire codebase
|
||||
- Integration complexity assessment
|
||||
- Multi-agent coordination requirements discovery
|
||||
- Risk pattern identification
|
||||
|
||||
2. Planning Checkpoint:
|
||||
Task(planning-agent): MANDATORY task decomposition
|
||||
Generate: IMPL_PLAN.md (enhanced structure), TODO_LIST.md
|
||||
Include risk assessment and quality gates
|
||||
2. TodoWrite Creation (Context-orchestrated, 7-10 todos):
|
||||
- "Execute deep system-wide Gemini analysis"
|
||||
- "Orchestrate multi-agent coordination with shared context"
|
||||
- "Implement with continuous context refinement"
|
||||
- "Validate against system architectural patterns", "Review", "Iterate", "Complete"
|
||||
|
||||
3. Orchestrated Multi-Agent Implementation:
|
||||
Multiple specialized agents with shared deep context
|
||||
Input: SYSTEM_CONTEXT, ARCHITECTURAL_PATTERNS, RISK_ASSESSMENT
|
||||
Continuous Gemini context updates throughout execution
|
||||
Cross-agent context synchronization
|
||||
|
||||
3. Implementation Checkpoint:
|
||||
Task(code-developer): Follow hierarchical breakdown
|
||||
Update TODO_CHECKLIST.md for each subtask completion
|
||||
|
||||
4. Review & Iteration Loop (max 2 iterations):
|
||||
Task(code-review-agent): Production-ready review
|
||||
If CRITICAL_ISSUES found: Task(code-developer) fixes issues
|
||||
4. Deep Context Review & Iteration Loop (max 2 iterations):
|
||||
Task(code-review-agent): Production-ready review with full system context
|
||||
If CRITICAL_ISSUES found: Re-analyze context and coordinate fixes
|
||||
Continue until no critical issues or max iterations reached
|
||||
|
||||
Document Validation: Verify decomposition docs generated
|
||||
Resume Support: Full state + iteration tracking
|
||||
Context Validation: Verify deep context analysis maintained throughout
|
||||
Resume Support: Full context state + iteration tracking + cross-agent coordination
|
||||
```
|
||||
|
||||
## Workflow Characteristics by Pattern
|
||||
|
||||
| Pattern | Agent Chain | Quality Focus | Iteration Strategy |
|
||||
|---------|-------------|---------------|--------------------|
|
||||
| **Complex** | Full 3-stage + iterations | Production-ready quality | Multiple rounds until perfect |
|
||||
| **Medium** | Full 3-stage single-pass | Comprehensive quality | Single thorough review |
|
||||
| **Simple** | 2-stage direct | Basic quality | Quick validation |
|
||||
| Pattern | Context Analysis | Agent Coordination | Iteration Strategy |
|
||||
|---------|------------------|--------------------|--------------------|
|
||||
| **Complex** | Deep system-wide Gemini analysis | Multi-agent orchestration with shared context | Multiple rounds with context refinement |
|
||||
| **Medium** | Comprehensive multi-file analysis | Context-driven coordination | Single thorough pass with pattern validation |
|
||||
| **Simple** | Focused file-level analysis | Direct context-aware execution | Quick context validation |
|
||||
|
||||
## Task Invocation Examples
|
||||
## Context-Driven Task Invocation Examples
|
||||
|
||||
```bash
|
||||
# Research Task
|
||||
# Gemini Context Analysis (Always First)
|
||||
gemini "Analyze authentication patterns in codebase - identify existing implementations,
|
||||
conventions, utilities, and integration patterns"
|
||||
|
||||
# Context-Aware Research Task
|
||||
Task(subagent_type="general-purpose",
|
||||
prompt="Research authentication patterns in codebase")
|
||||
prompt="Research authentication patterns in codebase",
|
||||
context="[GEMINI_CONTEXT_PACKAGE]")
|
||||
|
||||
# Planning Task
|
||||
Task(subagent_type="planning-agent",
|
||||
prompt="Plan OAuth2 implementation across API, middleware, and UI")
|
||||
|
||||
# Implementation Task
|
||||
# Context-Informed Implementation Task
|
||||
Task(subagent_type="code-developer",
|
||||
prompt="Implement email validation function with tests")
|
||||
prompt="Implement email validation function following discovered patterns",
|
||||
context="PATTERNS: [pattern_list], UTILITIES: [util_list], CONVENTIONS: [conv_list]")
|
||||
|
||||
# Review Task
|
||||
# Context-Driven Review Task
|
||||
Task(subagent_type="code-review-agent",
|
||||
prompt="Review recently implemented authentication service")
|
||||
prompt="Review authentication service against codebase standards and patterns",
|
||||
context="STANDARDS: [discovered_standards], PATTERNS: [existing_patterns]")
|
||||
|
||||
# Cross-Agent Context Sharing
|
||||
Task(subagent_type="code-developer",
|
||||
prompt="Coordinate with previous agent results using shared context",
|
||||
context="PREVIOUS_CONTEXT: [agent_context], SHARED_STATE: [context_state]")
|
||||
```
|
||||
|
||||
## Gemini Context Integration Points
|
||||
|
||||
### Pre-Agent Context Gathering
|
||||
```bash
|
||||
# Always execute before agent coordination
|
||||
gemini "Comprehensive analysis for [task] - discover patterns, conventions, and optimal approach"
|
||||
```
|
||||
|
||||
### During-Agent Context Updates
|
||||
```bash
|
||||
# Continuous context refinement
|
||||
gemini "Update context understanding based on agent discoveries in [area]"
|
||||
```
|
||||
|
||||
### Cross-Agent Context Synchronization
|
||||
```bash
|
||||
# Ensure context consistency across agents
|
||||
gemini "Synchronize context between [agent1] and [agent2] work on [feature]"
|
||||
```
|
||||
Reference in New Issue
Block a user