From 28124f1a951ddb8d0c27b6a136580ef326aa04c0 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Sun, 7 Sep 2025 19:55:26 +0800 Subject: [PATCH] Update gemini-execute command to use auto-approval by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove --yolo parameter option from usage and parameters - Make all executions use auto-approval mode by default - Add --yolo flag to internal bash command templates - Simplify workflow integration logic to always auto-approve - Update examples to remove --yolo from command usage 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .claude/commands/gemini-execute.md | 46 ++++++++++++++---------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/.claude/commands/gemini-execute.md b/.claude/commands/gemini-execute.md index b3e8460d..0566248c 100644 --- a/.claude/commands/gemini-execute.md +++ b/.claude/commands/gemini-execute.md @@ -1,12 +1,12 @@ --- name: gemini-execute description: Intelligent context inference executor with auto-approval capabilities, supporting user descriptions and task ID execution modes -usage: /gemini-execute [--yolo] [--debug] [--save-session] -argument-hint: "implementation description or task-id" [auto-approve, debug, session saving] +usage: /gemini-execute [--debug] [--save-session] +argument-hint: "implementation description or task-id" [debug, session saving] examples: - - /gemini-execute "implement user authentication system" --yolo - - /gemini-execute "optimize React component performance @{custom/path}" --yolo - - /gemini-execute IMPL-001 --yolo + - /gemini-execute "implement user authentication system" + - /gemini-execute "optimize React component performance @{custom/path}" + - /gemini-execute IMPL-001 - /gemini-execute "fix API performance issues" --debug --save-session allowed-tools: Bash(gemini:*) model: sonnet @@ -17,7 +17,7 @@ model: sonnet - **Type**: Intelligent Context Inference Executor. - **Purpose**: Infers context files to automatically execute implementation tasks using the Gemini CLI. -- **Key Feature**: `--yolo` flag for non-interactive, auto-approved execution within workflows. +- **Key Feature**: Non-interactive, auto-approved execution by default for streamlined workflows. - **Core Tool**: `Bash(gemini:*)`. ### ⚙️ Execution Modes @@ -31,10 +31,11 @@ model: sonnet ### 📥 Command Parameters -- `--yolo`: Enables non-interactive auto-approval mode. Automatically accepts all inferred operations. - `--debug`: Outputs detailed logs of the inference process and execution steps. - `--save-session`: Saves the entire execution session to the `.workflow/WFS-[topic-slug]/.chat/` directory. +**Note**: All executions run in auto-approval mode by default (equivalent to previous --yolo behavior). + ### 🔄 High-Level Execution Flow - **Description Input**: `Keyword Extraction` -> `Pattern Mapping` -> `Context Collection` -> `Gemini Execution` @@ -97,7 +98,7 @@ The following templates are used to call the `gemini` command via the `Bash` too ```bash # User Description Mode -gemini --all-files -p "@{intelligently_inferred_file_patterns} @{CLAUDE.md,**/*CLAUDE.md} +gemini --all-files --yolo -p "@{intelligently_inferred_file_patterns} @{CLAUDE.md,**/*CLAUDE.md} Implementation Task: [user_description] @@ -108,7 +109,7 @@ Based on intelligently inferred context, please provide: - Integration guidance" # Task ID Mode -gemini --all-files -p "@{task_related_files} @{brainstorming_refs} @{CLAUDE.md,**/*CLAUDE.md} +gemini --all-files --yolo -p "@{task_related_files} @{brainstorming_refs} @{CLAUDE.md,**/*CLAUDE.md} Task Execution: [task_title] (ID: [task-id]) Task Description: [extracted_from_json] @@ -122,25 +123,20 @@ Please execute implementation based on task definition: ### 🔗 Workflow System Integration Logic -The command integrates deeply with the workflow system, especially with `--yolo`. +The command integrates deeply with the workflow system with auto-approval by default. ```pseudo FUNCTION execute_with_workflow(task, flags): - IF "--yolo" in flags: - // With --yolo, all confirmation steps are automatically approved. - confirm_inferred_files = TRUE - confirm_gemini_execution = TRUE - confirm_file_modifications = TRUE - ELSE: - // Standard mode requires user confirmation at each critical step. - confirm_inferred_files = request_user_confirmation("Approve inferred files?") - // ... and so on for other steps. + // All confirmation steps are automatically approved by default + confirm_inferred_files = TRUE + confirm_gemini_execution = TRUE + confirm_file_modifications = TRUE - IF all_confirmations_are_true: - execute_gemini_task(task) - // Actions performed after successful execution - generate_task_summary_doc() - update_workflow_status_files() // Updates WFS & workflow-session.json + // Execute the task with auto-approval + execute_gemini_task(task) + // Actions performed after successful execution + generate_task_summary_doc() + update_workflow_status_files() // Updates WFS & workflow-session.json END FUNCTION ``` @@ -187,7 +183,7 @@ This template is automatically filled and generated after execution. 1. `workflow:session "..."` 2. `workflow:brainstorm` 3. `workflow:plan` - 4. `/gemini-execute IMPL-001 --yolo` + 4. `/gemini-execute IMPL-001` 5. `workflow:review` ### 💾 Session Persistence