docs: Clarify Gemini CLI marker system and analysis_source assignment logic

- Add explicit analysis_source assignment rules in plan.md (manual/gemini/auto-detected)
- Enhance GEMINI_CLI_REQUIRED marker documentation in code-developer.md and execute.md
- Specify fixed analysis_source="gemini" setting for plan-deep.md
- Add mapping rules from analysis_source values to CLI markers

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-09-12 16:07:17 +08:00
parent 00ed337594
commit 9082951519
4 changed files with 32 additions and 7 deletions

View File

@@ -37,12 +37,18 @@ You are a code execution specialist focused on implementing high-quality, produc
``` ```
IF context sufficient for implementation: IF context sufficient for implementation:
→ Proceed with execution → Proceed with execution
ELIF context insufficient: ELIF context insufficient OR task has [GEMINI_CLI_REQUIRED] marker:
Use Gemini CLI for codebase analysis Execute Gemini CLI for codebase analysis (MANDATORY)
→ Extract patterns and conventions → Extract patterns and conventions
→ Proceed with execution → 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
- **Action**: MUST run Gemini CLI first to gather context
- **Purpose**: Ensures code aligns with existing patterns
**Gemini CLI Usage Standards**: **Gemini CLI Usage Standards**:
Follow unified Gemini CLI guidelines: @~/.claude/workflows/gemini-unified.md Follow unified Gemini CLI guidelines: @~/.claude/workflows/gemini-unified.md

View File

@@ -13,9 +13,6 @@ examples:
Coordinates multiple agents for executing existing workflow tasks through automatic discovery and intelligent task orchestration. Analyzes workflow folders, checks task statuses, and coordinates agent execution based on discovered plans. Coordinates multiple agents for executing existing workflow tasks through automatic discovery and intelligent task orchestration. Analyzes workflow folders, checks task statuses, and coordinates agent execution based on discovered plans.
## Core Principles ## Core Principles
**Session Management:** @~/.claude/workflows/workflow-architecture.md
**Agent Orchestration:** @~/.claude/workflows/agent-orchestration-patterns.md
## Execution Philosophy ## Execution Philosophy
@@ -26,7 +23,15 @@ The intelligent execution approach focuses on:
- **Dynamic task orchestration** - Coordinate based on discovered task relationships - **Dynamic task orchestration** - Coordinate based on discovered task relationships
- **Progress tracking** - Update task status after agent completion - **Progress tracking** - Update task status after agent completion
**IMPORTANT**: Gemini context analysis is automatically applied based on discovered task scope and requirements. **GEMINI_CLI_REQUIRED Marker**:
- **Purpose**: Forces agent to analyze existing codebase before implementation
- **Auto-trigger**: When task.analysis_source = "gemini" OR scope > 3 files
- **Agent Action**: MUST execute Gemini CLI as first step
**analysis_source 到标记的映射**:
- **"gemini"** → 添加 [GEMINI_CLI_REQUIRED]
- **"auto-detected"** + scope > 3 files → 添加 [GEMINI_CLI_REQUIRED]
- **"manual"** → 不添加标记
## Execution Flow ## Execution Flow
@@ -60,6 +65,8 @@ Workflow Discovery:
- [ ] **TASK-002**: [Agent: code-developer] [GEMINI_CLI_REQUIRED] Implement auth logic (impl-1.2) - [ ] **TASK-002**: [Agent: code-developer] [GEMINI_CLI_REQUIRED] Implement auth logic (impl-1.2)
- [ ] **TASK-003**: [Agent: code-review-agent] Review implementations - [ ] **TASK-003**: [Agent: code-review-agent] Review implementations
- [ ] **TASK-004**: Update task statuses and session state - [ ] **TASK-004**: Update task statuses and session state
**Marker Legend**: [GEMINI_CLI_REQUIRED] = Agent must analyze codebase context first
``` ```
### 3. Agent Context Assignment ### 3. Agent Context Assignment
@@ -130,7 +137,7 @@ For each executable task:
- **Risk Awareness**: Alert agents to implementation.context_notes.risks before execution - **Risk Awareness**: Alert agents to implementation.context_notes.risks before execution
- **Workflow Integration**: Include session state and IMPL_PLAN.md context - **Workflow Integration**: Include session state and IMPL_PLAN.md context
- **Scope Focus**: Direct agents to specific files from implementation.files[].path - **Scope Focus**: Direct agents to specific files from implementation.files[].path
- **Gemini Flags**: Auto-add [GEMINI_CLI_REQUIRED] when analysis_source is "gemini" - **Gemini Marker**: Auto-add [GEMINI_CLI_REQUIRED] when analysis_source = "gemini"
### 4. Agent Execution & Progress Tracking ### 4. Agent Execution & Progress Tracking

View File

@@ -85,6 +85,7 @@ Task(action-planning-agent):
- Skip PRD processing (no PRD provided) - Skip PRD processing (no PRD provided)
- Skip session inheritance (standalone planning) - Skip session inheritance (standalone planning)
- Force GEMINI_CLI_REQUIRED flag = true - Force GEMINI_CLI_REQUIRED flag = true
- Set analysis_source = "gemini" (深度分析固定值)
- Generate hierarchical task decomposition - Generate hierarchical task decomposition
- Create detailed IMPL_PLAN.md with subtasks - Create detailed IMPL_PLAN.md with subtasks
- Generate TODO_LIST.md for tracking - Generate TODO_LIST.md for tracking
@@ -120,6 +121,7 @@ def process_plan_deep_command(input):
MANDATORY FLAGS: MANDATORY FLAGS:
- GEMINI_CLI_REQUIRED = true - GEMINI_CLI_REQUIRED = true
- analysis_source = "gemini" (固定设置)
- FORCE_PARALLEL_ANALYSIS = true - FORCE_PARALLEL_ANALYSIS = true
- SKIP_PRD = true - SKIP_PRD = true
- SKIP_SESSION_INHERITANCE = true - SKIP_SESSION_INHERITANCE = true

View File

@@ -83,6 +83,16 @@ The command automatically detects input type:
### Implementation Field Requirements ### Implementation Field Requirements
⚠️ **CRITICAL**: All generated tasks must include detailed implementation guidance ⚠️ **CRITICAL**: All generated tasks must include detailed implementation guidance
**analysis_source 赋值规则**:
- **"manual"**: 用户提供完整实现细节(包含具体文件、代码片段)
- **"gemini"**: 信息不足,需要 Gemini 分析(缺少文件路径或代码上下文)
- **"auto-detected"**: 系统自动推断实现细节(基于模式识别)
**判断流程**:
1. **IF** 用户提供文件路径 + 代码片段 → "manual"
2. **ELIF** 系统能推断实现位置 → "auto-detected"
3. **ELSE** → "gemini" (需要深度分析)
**Auto-fill Strategy**: **Auto-fill Strategy**:
1. **Sufficient Information**: Auto-fill implementation field based on user input and project context 1. **Sufficient Information**: Auto-fill implementation field based on user input and project context
2. **Insufficient Information**: Mark analysis_source as "gemini" and prompt: 2. **Insufficient Information**: Mark analysis_source as "gemini" and prompt: