diff --git a/.claude/commands/gemini/pre/auto.md b/.claude/commands/gemini/mode/auto.md similarity index 86% rename from .claude/commands/gemini/pre/auto.md rename to .claude/commands/gemini/mode/auto.md index cad82284..bfd9df88 100644 --- a/.claude/commands/gemini/pre/auto.md +++ b/.claude/commands/gemini/mode/auto.md @@ -1,18 +1,18 @@ --- name: auto description: Auto-select and execute appropriate template based on user input analysis -usage: /gemini:pre:auto "description of task or problem" +usage: /gemini:mode:auto "description of task or problem" argument-hint: "description of what you want to analyze or plan" examples: - - /gemini:pre:auto "authentication system keeps crashing during login" - - /gemini:pre:auto "design a real-time notification architecture" - - /gemini:pre:auto "database connection errors in production" - - /gemini:pre:auto "plan user dashboard with analytics features" + - /gemini:mode:auto "authentication system keeps crashing during login" + - /gemini:mode:auto "design a real-time notification architecture" + - /gemini:mode:auto "database connection errors in production" + - /gemini:mode:auto "plan user dashboard with analytics features" allowed-tools: Bash(ls:*), Bash(gemini:*) model: sonnet --- -# Auto Template Selection (/gemini:pre:auto) +# Auto Template Selection (/gemini:mode:auto) ## Overview Automatically analyzes user input to select the most appropriate template and execute Gemini CLI with optimal context. @@ -24,16 +24,16 @@ Automatically analyzes user input to select the most appropriate template and ex ### Auto-Detection Examples ```bash # Bug-related keywords → selects bug-fix.md -/gemini:pre:auto "React component not rendering after state update" +/gemini:mode:auto "React component not rendering after state update" # Planning keywords → selects plan.md -/gemini:pre:auto "design microservices architecture for user management" +/gemini:mode:auto "design microservices architecture for user management" # Error/crash keywords → selects bug-fix.md -/gemini:pre:auto "API timeout errors in production environment" +/gemini:mode:auto "API timeout errors in production environment" # Architecture/design keywords → selects plan.md -/gemini:pre:auto "implement real-time chat system architecture" +/gemini:mode:auto "implement real-time chat system architecture" ``` ## Template Selection Logic @@ -140,14 +140,14 @@ User Input: [user_input]" ### Manual Template Override ```bash # Force specific template -/gemini:pre:auto "user authentication" --template bug-fix.md -/gemini:pre:auto "fix login issues" --template plan.md +/gemini:mode:auto "user authentication" --template bug-fix.md +/gemini:mode:auto "fix login issues" --template plan.md ``` ### Dynamic Template Listing ```bash # List all dynamically discovered templates -/gemini:pre:auto --list-templates +/gemini:mode:auto --list-templates # Output: # Dynamically discovered templates in ~/.claude/prompt-templates/: # - bug-fix.md (用于定位bug并提供修改建议) [Keywords: 规划, bug, 修改方案] diff --git a/.claude/commands/gemini/pre/bug-index.md b/.claude/commands/gemini/mode/bug-index.md similarity index 71% rename from .claude/commands/gemini/pre/bug-index.md rename to .claude/commands/gemini/mode/bug-index.md index 2dc442dd..e1921f25 100644 --- a/.claude/commands/gemini/pre/bug-index.md +++ b/.claude/commands/gemini/mode/bug-index.md @@ -1,17 +1,17 @@ --- name: bug-index description: Bug analysis and fix suggestions using specialized template -usage: /gemini:pre:bug-index "bug description" +usage: /gemini:mode:bug-index "bug description" argument-hint: "description of the bug or error you're experiencing" examples: - - /gemini:pre:bug-index "authentication null pointer error in login flow" - - /gemini:pre:bug-index "React component not re-rendering after state change" - - /gemini:pre:bug-index "database connection timeout in production" + - /gemini:mode:bug-index "authentication null pointer error in login flow" + - /gemini:mode:bug-index "React component not re-rendering after state change" + - /gemini:mode:bug-index "database connection timeout in production" allowed-tools: Bash(gemini:*) model: sonnet --- -# Bug Analysis Command (/gemini:pre:bug-index) +# Bug Analysis Command (/gemini:mode:bug-index) ## Overview Systematic bug analysis and fix suggestions using expert diagnostic template. @@ -20,17 +20,17 @@ Systematic bug analysis and fix suggestions using expert diagnostic template. ### Basic Bug Analysis ```bash -/gemini:pre:bug-index "authentication error during login" +/gemini:mode:bug-index "authentication error during login" ``` ### With All Files Context ```bash -/gemini:pre:bug-index "React state not updating" --all-files +/gemini:mode:bug-index "React state not updating" --all-files ``` ### Save to Workflow Session ```bash -/gemini:pre:bug-index "API timeout issues" --save-session +/gemini:mode:bug-index "API timeout issues" --save-session ``` ## Command Execution diff --git a/.claude/commands/gemini/pre/plan.md b/.claude/commands/gemini/mode/plan.md similarity index 75% rename from .claude/commands/gemini/pre/plan.md rename to .claude/commands/gemini/mode/plan.md index f99f15d0..a5d710bd 100644 --- a/.claude/commands/gemini/pre/plan.md +++ b/.claude/commands/gemini/mode/plan.md @@ -1,17 +1,17 @@ --- name: plan description: Project planning and architecture analysis using specialized template -usage: /gemini:pre:plan "planning topic" +usage: /gemini:mode:plan "planning topic" argument-hint: "planning topic or architectural challenge to analyze" examples: - - /gemini:pre:plan "design user dashboard feature architecture" - - /gemini:pre:plan "plan microservices migration strategy" - - /gemini:pre:plan "implement real-time notification system" + - /gemini:mode:plan "design user dashboard feature architecture" + - /gemini:mode:plan "plan microservices migration strategy" + - /gemini:mode:plan "implement real-time notification system" allowed-tools: Bash(gemini:*) model: sonnet --- -# Planning Analysis Command (/gemini:pre:plan) +# Planning Analysis Command (/gemini:mode:plan) ## Overview Comprehensive project planning and architecture analysis using expert planning template. @@ -20,17 +20,17 @@ Comprehensive project planning and architecture analysis using expert planning t ### Basic Planning Analysis ```bash -/gemini:pre:plan "design authentication system" +/gemini:mode:plan "design authentication system" ``` ### With All Files Context ```bash -/gemini:pre:plan "microservices migration" --all-files +/gemini:mode:plan "microservices migration" --all-files ``` ### Save to Workflow Session ```bash -/gemini:pre:plan "real-time notifications" --save-session +/gemini:mode:plan "real-time notifications" --save-session ``` ## Command Execution diff --git a/.claude/workflows/gemini-unified.md b/.claude/workflows/gemini-unified.md index e7019d50..334a03a3 100644 --- a/.claude/workflows/gemini-unified.md +++ b/.claude/workflows/gemini-unified.md @@ -113,7 +113,7 @@ FUNCTION analyze_and_run_gemini(analysis_type): // Step 3: Construct and execute the gemini command. // Always include project standards from CLAUDE.md. - // Uses a pre-defined analysis template for consistency. + // Uses a mode-defined analysis template for consistency. command = "gemini -p \"" + patterns + " @{CLAUDE.md} $(cat ~/.claude/workflows/gemini-templates/prompts/analysis/pattern.txt)\"" execute_shell(command) diff --git a/README.md b/README.md index 6b4d857b..bdeda1cd 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A sophisticated multi-agent automation workflow framework that transforms complex software development tasks from conceptualization to implementation review into manageable, trackable, AI-orchestrated processes. -> **🎉 Major Architecture Upgrade (v2.0)**: Recently underwent comprehensive refactoring with **JSON-only data model**, **marker file session management**, and **unified complexity standards**. See [WORKFLOW_SYSTEM_UPGRADE.md](WORKFLOW_SYSTEM_UPGRADE.md) for details. +> **🎉 v1.0 Release**: Complete Gemini CLI integration with template system, dynamic template discovery, streamlined documentation, and intelligent auto-selection capabilities. See [CHANGELOG.md](CHANGELOG.md) for details. ## 🏗️ Architecture Overview @@ -39,7 +39,13 @@ CCW intelligently adapts its file structure and workflow processes based on unif - **Action Planning Agent**: Converts high-level concepts into executable implementation plans - **Code Developer**: Implements code based on plans - **Code Review Agent**: Reviews code quality and compliance -- **Memory Gemini Bridge**: Intelligent CLAUDE.md documentation system with 4-layer hierarchy, context-aware updates, and automatic scaling based on project complexity +- **Memory Gemini Bridge**: Intelligent CLAUDE.md documentation system with context-aware updates + +### Gemini CLI Integration (v1.0) +- **Dynamic Template Discovery**: Automatically detects and loads templates from `~/.claude/prompt-templates/` +- **Intelligent Auto-Selection**: Matches user input against template keywords and descriptions +- **Template System**: Bug-fix, planning, and custom analysis templates +- **Streamlined Commands**: Consolidated documentation with 500+ lines reduced ### Workflow Session Management - Create, pause, resume, list, and switch workflow sessions @@ -124,7 +130,8 @@ For Gemini CLI integration, configure your `settings.json` file: | `/gemini:chat:plan` | `/gemini:chat:plan [--all-files] [--save-session]` | Project planning using specialized architecture template | | `/gemini-execute` | `/gemini-execute [--yolo] [--debug]` | Intelligent executor with automatic file context inference | | `/gemini-mode` | `/gemini-mode [options]` | Template-driven codebase analysis (pattern, architecture, security) | -| `/update-memory` | `/update-memory [related\|full]` | Intelligent CLAUDE.md documentation system with context-aware updates and strict hierarchy preservation | +| `/gemini:mode:auto` | `/gemini:mode:auto ""` | 🆕 Auto-select and execute appropriate template based on user input analysis | +| `/update-memory` | `/update-memory [related\|full]` | Intelligent CLAUDE.md documentation system with context-aware updates | ### Workflow Management @@ -193,19 +200,21 @@ For Gemini CLI integration, configure your `settings.json` file: /workflow:review ``` -### Advanced Code Analysis +### Smart Template Auto-Selection (v1.0) ```bash -# 1. Security audit -/gemini-mode security "Scan authentication modules for vulnerabilities" +# 1. Automatic template selection based on keywords +/gemini:mode:auto "React component not rendering after state update" +# → Auto-selects bug-fix template -# 2. Architecture analysis -/gemini-mode architecture "Analyze component dependencies and data flow" +# 2. Planning template for architecture work +/gemini:mode:auto "design microservices architecture for user management" +# → Auto-selects planning template -# 3. Performance optimization -/gemini-mode performance "Identify bottlenecks in React rendering" +# 3. Manual template override when needed +/gemini:mode:auto "authentication issues" --template plan.md -# 4. Pattern recognition -/gemini-mode pattern "Extract reusable component patterns" +# 4. List available templates +/gemini:mode:auto --list-templates ``` ### Intelligent Documentation Management @@ -232,12 +241,12 @@ git commit -m "Major refactoring" | **Medium** | 5-15 tasks | 2 levels (impl-N.M) | Enhanced + auto-generated TODO_LIST.md | Optional brainstorming → Action plan → Progress tracking | | **Complex** | >15 tasks | 3 levels (impl-N.M.P) | Complete document suite | Required brainstorming → Multi-agent orchestration → Deep context analysis | -### 🚀 Architecture v2.0 Benefits -- **Performance**: 95% faster session operations with marker file system -- **Consistency**: 100% data consistency with JSON-only model -- **Efficiency**: 40-50% reduction in maintenance overhead -- **Scalability**: Support for hundreds of concurrent sessions -- **Onboarding**: 50% faster learning curve with progressive complexity +### 🚀 v1.0 Release Benefits +- **Smart Automation**: Intelligent template selection reduces manual template discovery +- **Documentation**: 500+ lines streamlined while maintaining functionality +- **Template System**: Dynamic discovery and YAML-based metadata parsing +- **Cross-Platform**: Unified path handling for Windows/Linux compatibility +- **Developer Experience**: Simplified commands with powerful auto-selection ## 🔧 Technical Highlights diff --git a/README_CN.md b/README_CN.md index e4e4693e..a1f3b415 100644 --- a/README_CN.md +++ b/README_CN.md @@ -8,7 +8,7 @@ 一个精密的多智能体自动化工作流框架,将复杂的软件开发任务从概念构思到实现审查转化为可管理、可追踪、AI协调的流程。 -> **🎉 重大架构升级 (v2.0)**:最近进行了全面重构,采用 **JSON纯数据模型**、**标记文件会话管理** 和 **统一复杂度标准**。详见 [WORKFLOW_SYSTEM_UPGRADE.md](WORKFLOW_SYSTEM_UPGRADE.md)。 +> **🎉 v1.0 版本发布**:完整的 Gemini CLI 集成,包含模板系统、动态模板发现、精简文档和智能自动选择功能。详见 [CHANGELOG.md](CHANGELOG.md)。 ## 🏗️ 架构概览 @@ -39,7 +39,13 @@ CCW 根据统一的任务数量阈值智能调整其文件结构和工作流程 - **行动规划智能体**:将高层概念转化为可执行的实施计划 - **代码开发智能体**:基于计划实现代码 - **代码审查智能体**:审查代码质量和合规性 -- **记忆桥接智能体**:同步 Claude 和 Gemini 记忆,维护 CLAUDE.md 文件 +- **记忆桥接智能体**:智能 CLAUDE.md 文档系统,提供上下文感知更新 + +### Gemini CLI 集成 (v1.0) +- **动态模板发现**:自动检测和加载来自 `~/.claude/prompt-templates/` 的模板 +- **智能自动选择**:根据模板关键词和描述匹配用户输入 +- **模板系统**:Bug修复、规划和自定义分析模板 +- **精简命令**:整合文档,减少500+行代码 ### 工作流会话管理 - 创建、暂停、恢复、列出和切换工作流会话