feat: Add Codex CLI support as alternative analysis method in workflow system

## Major Changes
- Add --AM flag to /workflow:plan command for analysis method selection
- Support both Gemini CLI (pattern-based) and Codex CLI (autonomous) analysis
- Implement dual marker system: [GEMINI_CLI_REQUIRED] and [CODEX_CLI_REQUIRED]
- Update all 4 agents to handle both analysis markers
- Create analysis method templates for standardized CLI usage

## Files Modified
- workflow-architecture.md: Add Analysis Method Integration section
- plan.md: Add --AM flag and bilingual rule standardization
- execute.md: Update marker mapping logic and standardize to English
- 4 agent files: Add dual CLI support with usage guidelines
- New: analysis-methods/ templates for Gemini and Codex CLI

## Backward Compatibility
- Gemini CLI remains default analysis method
- Existing workflows continue to work unchanged
- Progressive enhancement for autonomous development scenarios

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-09-12 23:40:12 +08:00
parent 2038d83398
commit 685c0f7f79
7 changed files with 215 additions and 56 deletions

View File

@@ -37,20 +37,27 @@ You are a code execution specialist focused on implementing high-quality, produc
```
IF context sufficient for implementation:
→ Proceed with execution
ELIF context insufficient OR task has [GEMINI_CLI_REQUIRED] marker:
Execute Gemini CLI for codebase analysis (MANDATORY)
ELIF context insufficient OR task has analysis marker:
Check marker type:
- [GEMINI_CLI_REQUIRED] → Execute Gemini CLI for codebase analysis (MANDATORY)
- [CODEX_CLI_REQUIRED] → Execute Codex CLI for autonomous context gathering (MANDATORY)
→ Extract patterns and conventions
→ Proceed with execution
```
**Gemini CLI Marker System**:
- **[GEMINI_CLI_REQUIRED]**: Mandatory analysis flag
- **Trigger**: Auto-added when task.analysis_source = "gemini" or scope > 3 files
**Analysis CLI Marker System**:
- **[GEMINI_CLI_REQUIRED]**: Mandatory Gemini analysis flag
- **Trigger**: Auto-added when task.analysis_source = "gemini" or scope > 3 files (default)
- **Action**: MUST run Gemini CLI first to gather context
- **Purpose**: Ensures code aligns with existing patterns
- **Purpose**: Ensures code aligns with existing patterns through pattern-based analysis
- **[CODEX_CLI_REQUIRED]**: Mandatory Codex analysis flag
- **Trigger**: Auto-added when task.analysis_source = "codex"
- **Action**: MUST run Codex CLI in autonomous mode first to gather context
- **Purpose**: Enables autonomous development with intelligent file discovery and code generation
**Gemini CLI Usage Standards**:
Follow unified Gemini CLI guidelines: @~/.claude/workflows/gemini-unified.md
**Analysis CLI Usage Standards**:
- **Gemini CLI**: Follow unified guidelines: @~/.claude/workflows/gemini-unified.md
- **Codex CLI**: Follow unified guidelines: @~/.claude/workflows/codex-unified.md
**Test-Driven Development**:
- Write tests first (red → green → refactor)