diff --git a/.claude/workflows/codex-unified.md b/.claude/workflows/codex-unified.md index cf2ac336..c670e761 100644 --- a/.claude/workflows/codex-unified.md +++ b/.claude/workflows/codex-unified.md @@ -8,8 +8,8 @@ type: technical-guideline - **Purpose**: An AI-powered CLI tool for automated codebase analysis, intelligent code generation, and autonomous development workflows. - **Key Characteristic**: **No `--all-files` flag** - requires explicit `@` pattern references for file inclusion. -- **Directory Analysis Rule**: When user intends to analyze specific directory (cd XXX), use: `codex --cd XXX exec "@{**/*} prompt"` or `cd XXX && codex exec "@{**/*} prompt"` -- **Default Mode**: `--full-auto` autonomous development mode (RECOMMENDED for all tasks). +- **Directory Analysis Rule**: When user intends to analyze specific directory (cd XXX), use: `codex --cd XXX --full-auto exec "prompt"` or `cd XXX && codex --full-auto exec "@{**/*} prompt"` +- **Default Mode**: `--full-auto exec` autonomous development mode (RECOMMENDED for all tasks). - **Primary Triggers**: - When user needs automated code generation or refactoring. - When task requires intelligent analysis with autonomous execution. @@ -22,7 +22,7 @@ type: technical-guideline ### ⭐ **CRITICAL: Default to `--full-auto` Mode** -> **🎯 Golden Rule**: Always start with `codex --full-auto "your task description"` for maximum autonomous capabilities. This is the recommended approach for 90% of development tasks. +> **🎯 Golden Rule**: Always start with `codex --full-auto exec "your task description"` for maximum autonomous capabilities. This is the recommended approach for 90% of development tasks. **Why `--full-auto` Should Be Your Default:** - **🧠 Intelligent File Discovery**: Codex automatically identifies relevant files without manual `@` patterns @@ -31,7 +31,7 @@ type: technical-guideline - **🚀 Maximum Automation**: Leverages full autonomous development capabilities - **📚 Smart Documentation**: Automatically includes relevant CLAUDE.md files and project context -**When to Use `codex exec` Instead:** +**When to Use `codex --full-auto exec` with Explicit Patterns:** - ✅ When you need precise control over which files are included - ✅ When working with specific file patterns that require manual specification - ✅ When debugging issues with file discovery in `--full-auto` mode @@ -41,24 +41,25 @@ type: technical-guideline - **Basic Structure** (Priority Order): ```bash - codex --full-auto "autonomous development task" # DEFAULT & RECOMMENDED - codex exec "prompt with @{patterns}" # For specific control needs + codex --full-auto exec "autonomous development task" # DEFAULT & RECOMMENDED + codex --full-auto exec "prompt with @{patterns}" # For specific control needs ``` - **Key Commands** (In Order of Preference): - - `codex --full-auto "..."` ⭐ **PRIMARY MODE** - Full autonomous development - - `codex exec "..."` - Controlled execution when you need specific patterns - - `codex --cd /path --full-auto "..."` - Directory-specific autonomous development + - `codex --full-auto exec "..."` ⭐ **PRIMARY MODE** - Full autonomous development + - `codex --full-auto exec "..."` - Controlled execution when you need specific patterns + - `codex --cd /path --full-auto exec "..."` - Directory-specific autonomous development + - `codex --cd /path --full-auto exec "@{patterns} ..."` - Directory-specific execution with patterns - **Template Usage** (Preferred Approaches): ```bash # RECOMMENDED: Full autonomous mode (let Codex handle file discovery) - codex --full-auto "Refactor authentication system using best practices" + codex --full-auto exec "Refactor authentication system using best practices" # Alternative: Direct execution with explicit patterns - codex exec "@{src/**/*} @{CLAUDE.md} Refactor authentication system" + codex --full-auto exec "@{src/**/*} @{CLAUDE.md} Refactor authentication system" # Advanced: Template injection with autonomous mode - codex --full-auto "$(cat ~/.claude/workflows/cli-templates/prompts/development/feature.txt) + codex --full-auto exec "$(cat ~/.claude/workflows/cli-templates/prompts/development/feature.txt) ## Task: Authentication System Refactoring - Apply modern security patterns @@ -93,7 +94,7 @@ type: technical-guideline ### 📁 Shared Template Directory Structure -> **📋 Complete Template Reference**: See [Shared Template System](./shared-template-system.md) for comprehensive template directory structure, cross-tool compatibility, and detailed usage patterns. +> **📋 Complete Template Reference**: See [Shared Template System] @~/.claude/workflows/shared-template-system.md for comprehensive template directory structure, cross-tool compatibility, and detailed usage patterns. > **💡 Cross-Tool Usage**: Analysis templates (`analysis/`) work with Codex for understanding existing code before development. See shared template system for complete compatibility matrix. @@ -102,28 +103,31 @@ type: technical-guideline - **Module-Specific Development** ```bash # RECOMMENDED: Full autonomous mode with directory context - codex --cd src/auth --full-auto "Refactor authentication module using latest patterns" + codex --cd src/auth --full-auto exec "Refactor authentication module using latest patterns" # Alternative: Full autonomous mode with explicit task description - codex --full-auto "Refactor the authentication module in src/auth/ using latest security patterns" + codex --full-auto exec "Refactor the authentication module in src/auth/ using latest security patterns" - # Fallback: Explicit patterns when autonomous mode needs guidance - codex exec "@{src/auth/**/*,CLAUDE.md} Refactor authentication module using latest patterns" + # Fallback: Explicit patterns when autonomous mode needs guidance + codex --full-auto exec "@{src/auth/**/*,CLAUDE.md} Refactor authentication module using latest patterns" + + # Alternative: Directory-specific execution with explicit patterns + codex --cd src/auth --full-auto exec "@{**/*,../../CLAUDE.md} Refactor authentication module using latest patterns" ``` - **Basic Development Task** ```bash # RECOMMENDED: Let Codex handle everything autonomously - codex --full-auto "Implement user authentication with JWT tokens" + codex --full-auto exec "Implement user authentication with JWT tokens" # Alternative: Explicit file patterns if needed - codex exec "@{src/**/*,*.json,CLAUDE.md} Implement user authentication with JWT" + codex --full-auto exec "@{src/**/*,*.json,CLAUDE.md} Implement user authentication with JWT" ``` - **Template-Enhanced Development** ```bash # RECOMMENDED: Autonomous mode with template guidance - codex --full-auto "$(cat ~/.claude/workflows/cli-templates/prompts/development/feature.txt) + codex --full-auto exec "$(cat ~/.claude/workflows/cli-templates/prompts/development/feature.txt) ## Task: User Authentication System - JWT token management @@ -131,22 +135,22 @@ type: technical-guideline - Password reset functionality" # Alternative: Explicit patterns with templates - codex exec "@{src/**/*,CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/feature.txt)" + codex --full-auto exec "@{src/**/*,CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/feature.txt)" ``` - **Full Auto Mode (PRIMARY RECOMMENDATION)** ```bash # OPTIMAL: Let Codex discover files and handle everything - codex --full-auto "Create a complete todo application with React and TypeScript" + codex --full-auto exec "Create a complete todo application with React and TypeScript" # Alternative: Explicit patterns if you want to control file scope - codex --full-auto "@{**/*} Create a complete todo application with React and TypeScript" + codex --full-auto exec "@{**/*} Create a complete todo application with React and TypeScript" ``` - **Debugging & Analysis** ```bash # RECOMMENDED: Autonomous debugging mode - codex --full-auto "$(cat ~/.claude/workflows/cli-templates/prompts/development/debugging.txt) + codex --full-auto exec "$(cat ~/.claude/workflows/cli-templates/prompts/development/debugging.txt) ## Issue: Performance degradation in user dashboard - Identify bottlenecks in the codebase @@ -154,7 +158,7 @@ type: technical-guideline - Add performance monitoring" # Alternative: Explicit patterns for controlled analysis - codex exec "@{src/**/*,package.json,CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/debugging.txt)" + codex --full-auto exec "@{src/**/*,package.json,CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/debugging.txt)" ``` ### ⭐ Best Practices & Rules @@ -168,10 +172,10 @@ type: technical-guideline - **Be selective**: Use specific patterns like `@{src/**/*.ts}` for targeted analysis **Default Automation Mode (CRITICAL GUIDANCE):** -- **`--full-auto` is the PRIMARY choice**: Use for 90% of all tasks - maximizes autonomous capabilities -- **`codex exec` only when necessary**: Reserve for cases where you need explicit file pattern control +- **`--full-auto exec` is the PRIMARY choice**: Use for 90% of all tasks - maximizes autonomous capabilities +- **`codex --full-auto exec` with explicit patterns only when necessary**: Reserve for cases where you need explicit file pattern control - **Trust the autonomous intelligence**: Codex excels at file discovery, context gathering, and architectural decisions -- **Start with `--full-auto` always**: If it doesn't meet needs, then consider `exec` mode +- **Start with `--full-auto exec` always**: If it doesn't meet needs, then consider explicit patterns with `exec` mode #### 📋 CLAUDE.md Loading Rules @@ -208,7 +212,7 @@ type: technical-guideline | Feature | Codex | Gemini | |---------|--------|---------| | File Loading | `@` patterns **required** | `--all-files` available | -| Default Mode | `--full-auto` automation | Interactive analysis | +| Default Mode | `--full-auto exec` automation | Interactive analysis | | Primary Use | Development & implementation | Analysis & planning | | Template Support | Full compatibility via `cat` | Native template system | | Automation Level | Autonomous execution | Manual implementation | @@ -219,18 +223,18 @@ type: technical-guideline **Pre-Development Analysis:** ```bash # RECOMMENDED: Autonomous pattern analysis -codex --full-auto "$(cat ~/.claude/workflows/cli-templates/prompts/analysis/pattern.txt) +codex --full-auto exec "$(cat ~/.claude/workflows/cli-templates/prompts/analysis/pattern.txt) Analyze the existing codebase patterns and conventions before implementing new features." # Alternative: Explicit patterns if needed -codex exec "@{src/**/*,CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/analysis/pattern.txt)" +codex --full-auto exec "@{src/**/*,CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/analysis/pattern.txt)" ``` **Feature Development:** ```bash # RECOMMENDED: Full autonomous feature development -codex --full-auto "$(cat ~/.claude/workflows/cli-templates/prompts/development/feature.txt) +codex --full-auto exec "$(cat ~/.claude/workflows/cli-templates/prompts/development/feature.txt) ## Feature: Advanced Search Functionality - Full-text search capabilities @@ -239,18 +243,18 @@ codex --full-auto "$(cat ~/.claude/workflows/cli-templates/prompts/development/f - Integration with existing UI components" # Alternative: Explicit patterns when needed -codex exec "@{**/*,CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/feature.txt)" +codex --full-auto exec "@{**/*,CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/feature.txt)" ``` **Quality Assurance:** ```bash # RECOMMENDED: Autonomous testing and validation -codex --full-auto "$(cat ~/.claude/workflows/cli-templates/prompts/development/testing.txt) +codex --full-auto exec "$(cat ~/.claude/workflows/cli-templates/prompts/development/testing.txt) Generate comprehensive tests and perform validation for the entire codebase." # Alternative: Specific test scope control -codex exec "@{src/**/*,test/**/*,CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/testing.txt)" +codex --full-auto exec "@{src/**/*,test/**/*,CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/testing.txt)" ``` ### 🎨 Advanced Usage Patterns @@ -258,25 +262,25 @@ codex exec "@{src/**/*,test/**/*,CLAUDE.md} $(cat ~/.claude/workflows/cli-templa **Multi-Phase Development (Full Autonomous Workflow):** ```bash # Phase 1: Autonomous Analysis -codex --full-auto "Analyze current architecture for payment system integration" +codex --full-auto exec "Analyze current architecture for payment system integration" # Phase 2: Autonomous Implementation (RECOMMENDED APPROACH) -codex --full-auto "Implement Stripe payment integration based on the analyzed architecture" +codex --full-auto exec "Implement Stripe payment integration based on the analyzed architecture" # Phase 3: Autonomous Testing -codex --full-auto "Generate comprehensive tests for the payment system implementation" +codex --full-auto exec "Generate comprehensive tests for the payment system implementation" # Alternative: Explicit control when needed -codex exec "@{**/*,CLAUDE.md} Analyze current architecture for payment system integration" +codex --full-auto exec "@{**/*,CLAUDE.md} Analyze current architecture for payment system integration" ``` **Cross-Project Learning:** ```bash # RECOMMENDED: Autonomous cross-project pattern learning -codex --full-auto "Implement feature X by learning patterns from ../other-project/ and applying them to the current codebase" +codex --full-auto exec "Implement feature X by learning patterns from ../other-project/ and applying them to the current codebase" # Alternative: Explicit pattern specification -codex exec "@{../other-project/src/**/*,src/**/*,CLAUDE.md} Implement feature X using patterns from other-project" +codex --full-auto exec "@{../other-project/src/**/*,src/**/*,CLAUDE.md} Implement feature X using patterns from other-project" ``` -Remember: **Codex excels at autonomous development** - `--full-auto` mode should be your default choice. Trust its intelligence for file discovery, context gathering, and implementation decisions. Use explicit `@` patterns only when you need precise control over file scope. \ No newline at end of file +Remember: **Codex excels at autonomous development** - `--full-auto exec` mode should be your default choice. Trust its intelligence for file discovery, context gathering, and implementation decisions. Use explicit `@` patterns with `--full-auto exec` only when you need precise control over file scope. \ No newline at end of file diff --git a/.claude/workflows/gemini-unified.md b/.claude/workflows/gemini-unified.md index 304f8f3a..9229eafb 100644 --- a/.claude/workflows/gemini-unified.md +++ b/.claude/workflows/gemini-unified.md @@ -74,7 +74,7 @@ type: technical-guideline ### TPL (Templates) -> **📋 Complete Template Reference**: See [Shared Template System](./shared-template-system.md) for comprehensive template directory structure, selection guide, and cross-tool compatibility details. +> **📋 Complete Template Reference**: See [Shared Template System] @~/.claude/workflows/shared-template-system.md for comprehensive template directory structure, selection guide, and cross-tool compatibility details. > **💡 Template Usage**: All templates work with both `$(cat ~/.claude/workflows/cli-templates/prompts/[category]/[template].txt)` syntax and multi-template composition patterns.