feat: Streamline agents to pure executor roles with enhanced workflow architecture

## Agent Streamlining
- **code-developer.md**: Reduce from 315 to 122 lines - pure code execution focus
- **action-planning-agent.md**: Reduce from 502 to 124 lines - pure planning execution
- Remove complex decision logic - commands layer now handles control flow
- Add clean code rules: minimize debug output, GBK compatibility, ASCII-only

## Workflow Architecture Enhancements
- Enhanced workflow-architecture.md with progressive complexity system
- Clear separation: Commands (control) → Agents (execution) → Output
- Improved task decomposition and TODO_LIST.md examples
- Added Gemini CLI standards references

## Command System Updates
- Updated task and workflow commands with enhanced functionality
- Better integration with streamlined agents
- Improved error handling and user experience

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-09-10 21:41:58 +08:00
parent 44287cf80e
commit 5b80c9c242
14 changed files with 777 additions and 874 deletions

View File

@@ -65,6 +65,7 @@ This command operates on **individual tasks only**. For workflow-wide changes, u
4. **Dependencies**: Update task relationships?
5. **Success Criteria**: Modify completion conditions?
6. **Agent Assignment**: Change assigned agent?
7. **Implementation Details**: Update file paths, code locations, and logic flows?
### Interactive Mode
```bash
@@ -154,6 +155,44 @@ Each replan creates a new version with complete history:
"requirements": ["Basic auth", "Session mgmt", "OAuth2 support"],
"scope": ["src/auth/*", "tests/auth/*"],
"acceptance": ["All auth methods work"]
},
"implementation": {
"files": [
{
"path": "src/auth/oauth.ts",
"location": {
"function": "handleOAuthCallback",
"lines": "45-80",
"description": "OAuth callback handler (added in replan)"
},
"original_code": "// New file - requires creation",
"modifications": {
"current_state": "File does not exist",
"proposed_changes": [
"Create OAuth2 callback handler",
"Integrate with existing auth system"
],
"logic_flow": [
"receiveCallback() ───► validateAuthCode()",
"◊─── if valid ───► exchangeForToken() ───► storeUserSession()",
"◊─── if invalid ───► logError() ───► redirectToLogin()"
],
"reason": "Support external authentication providers",
"expected_outcome": "Seamless OAuth2 integration"
}
}
],
"context_notes": {
"dependencies": ["passport-oauth2", "express-session"],
"affected_modules": ["auth-middleware", "user-session"],
"risks": [
"OAuth provider configuration complexity",
"Session management conflicts with existing auth"
],
"performance_considerations": "External API calls may add 200-500ms latency",
"error_handling": "Graceful fallback to standard login on OAuth failure"
},
"analysis_source": "manual"
}
}
```
@@ -170,6 +209,48 @@ Each replan creates a new version with complete history:
└── replan-impl-1-20250908.md # Change log
```
## Implementation Field Updates
### Implementation Change Detection
When replanning, the system analyzes changes to the implementation field:
**Implementation Changes Tracked**:
- New files added to implementation.files array
- Modified file paths or locations
- Updated original_code snippets (via gemini re-analysis if needed)
- Changed logic flows and data flow diagrams
- Modified dependencies and risk assessments
- Updated performance considerations and error handling
**Gemini Re-analysis Triggers**:
- New file paths that need code extraction
- Changed function locations requiring updated code snippets
- Modified scope requiring dependency re-evaluation
- When analysis_source was "gemini" and major changes occur
**Example Implementation Update**:
```json
"implementation": {
"files": [
{
"path": "src/auth/oauth.ts", // NEW FILE ADDED
"original_code": "// New file - requires creation",
"modifications": {
"logic_flow": [
"// NEW FLOW ADDED FOR OAUTH"
]
}
}
],
"context_notes": {
"dependencies": ["passport-oauth2"], // NEW DEPENDENCY
"risks": [
"OAuth provider configuration complexity" // NEW RISK
]
}
}
```
## IMPL_PLAN.md Updates
### Automatic Plan Regeneration