mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
refactor: Update all codex commands to use -s danger-full-access and correct syntax
- Move -s parameter to end of command: codex --full-auto exec "..." -s danger-full-access - Change default sandbox mode from workspace-write to danger-full-access - Add missing --full-auto parameter to commands requiring autonomous development - Add missing exec parameter to all codex commands - Add missing -s danger-full-access parameter to multi-line commands - Update all documentation and examples to use consistent syntax - Fix CLAUDE.md detection functionality in detect_changed_modules.sh script Files updated: - Core configuration: CLAUDE.md, RELEASE_NOTES_v1.3.0.md - Documentation: tools-implementation-guide.md, intelligent-tools-strategy.md - Command files: All .claude/commands/codex/*.md and workflow/*.md files - Agent templates: action-planning-agent.md - Scripts: detect_changed_modules.sh 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -55,7 +55,7 @@ You are a pure execution agent specialized in creating actionable implementation
|
||||
- **Method Selection**: Use method specified in each step (gemini/codex/manual/auto-detected)
|
||||
- **CLI Commands**:
|
||||
- **Gemini**: `bash(~/.claude/scripts/gemini-wrapper -p "$(cat template_path) [expanded_action]")`
|
||||
- **Codex**: `bash(codex -s workspace-write --full-auto exec "$(cat template_path) [expanded_action]")`
|
||||
- **Codex**: `bash(codex --full-auto exec "$(cat template_path) [expanded_action]" -s danger-full-access)`
|
||||
- **Follow Guidelines**: @~/.claude/workflows/intelligent-tools-strategy.md and @~/.claude/workflows/tools-implementation-guide.md
|
||||
|
||||
### Pre-Execution Analysis
|
||||
|
||||
@@ -37,19 +37,19 @@ Quick analysis tool for codebase insights using intelligent pattern detection an
|
||||
```bash
|
||||
/codex:analyze "authentication patterns"
|
||||
```
|
||||
**Executes**: `codex exec "@{**/*auth*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/analysis/pattern.txt)"`
|
||||
**Executes**: `codex --full-auto exec "@{**/*auth*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/analysis/pattern.txt)" -s danger-full-access`
|
||||
|
||||
### Targeted Analysis
|
||||
```bash
|
||||
/codex:analyze "React component architecture"
|
||||
```
|
||||
**Executes**: `codex exec "@{src/components/**/*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/analysis/architecture.txt)"`
|
||||
**Executes**: `codex --full-auto exec "@{src/components/**/*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/analysis/architecture.txt)" -s danger-full-access`
|
||||
|
||||
### Security Focus
|
||||
```bash
|
||||
/codex:analyze "API security vulnerabilities"
|
||||
```
|
||||
**Executes**: `codex exec "@{**/api/**/*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/analysis/security.txt)"`
|
||||
**Executes**: `codex --full-auto exec "@{**/api/**/*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/analysis/security.txt)" -s danger-full-access`
|
||||
|
||||
## Codex-Specific Patterns
|
||||
|
||||
@@ -83,25 +83,25 @@ Templates are automatically selected based on analysis type:
|
||||
### Technology Stack Analysis
|
||||
```bash
|
||||
/codex:analyze "project technology stack"
|
||||
# Executes: codex exec "@{package.json,*.config.*,CLAUDE.md} [analysis prompt]"
|
||||
# Executes: codex --full-auto exec "@{package.json,*.config.*,CLAUDE.md} [analysis prompt]" -s danger-full-access
|
||||
```
|
||||
|
||||
### Code Quality Review
|
||||
```bash
|
||||
/codex:analyze "code quality and standards"
|
||||
# Executes: codex exec "@{src/**/*,test/**/*,CLAUDE.md} [analysis prompt]"
|
||||
# Executes: codex --full-auto exec "@{src/**/*,test/**/*,CLAUDE.md} [analysis prompt]" -s danger-full-access
|
||||
```
|
||||
|
||||
### Migration Planning
|
||||
```bash
|
||||
/codex:analyze "legacy code modernization"
|
||||
# Executes: codex exec "@{**/*.{js,jsx,ts,tsx},CLAUDE.md} [analysis prompt]"
|
||||
# Executes: codex --full-auto exec "@{**/*.{js,jsx,ts,tsx},CLAUDE.md} [analysis prompt]" -s danger-full-access
|
||||
```
|
||||
|
||||
### Module-Specific Analysis
|
||||
```bash
|
||||
/codex:analyze "authentication module patterns"
|
||||
# Executes: codex exec "@{src/auth/**/*,**/*auth*,CLAUDE.md} [analysis prompt]"
|
||||
# Executes: codex --full-auto exec "@{src/auth/**/*,**/*auth*,CLAUDE.md} [analysis prompt]" -s danger-full-access
|
||||
```
|
||||
|
||||
## Output Format
|
||||
@@ -117,7 +117,7 @@ Analysis results include:
|
||||
|
||||
### Basic Analysis Template
|
||||
```bash
|
||||
codex exec "@{inferred_patterns} @{CLAUDE.md,**/*CLAUDE.md}
|
||||
codex --full-auto exec "@{inferred_patterns} @{CLAUDE.md,**/*CLAUDE.md}
|
||||
|
||||
Analysis Type: [analysis_type]
|
||||
|
||||
@@ -125,15 +125,15 @@ Provide:
|
||||
- Pattern identification and analysis
|
||||
- Code quality assessment
|
||||
- Architecture insights
|
||||
- Specific recommendations with file:line references"
|
||||
- Specific recommendations with file:line references" -s danger-full-access
|
||||
```
|
||||
|
||||
### Template-Enhanced Analysis
|
||||
```bash
|
||||
codex exec "@{inferred_patterns} @{CLAUDE.md,**/*CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/analysis/[template].txt)
|
||||
codex --full-auto exec "@{inferred_patterns} @{CLAUDE.md,**/*CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/analysis/[template].txt)
|
||||
|
||||
Focus: [analysis_type]
|
||||
Context: [user_description]"
|
||||
Context: [user_description]" -s danger-full-access
|
||||
```
|
||||
|
||||
## Error Prevention
|
||||
|
||||
@@ -127,25 +127,25 @@ When `--save-session` flag is used:
|
||||
#### Basic Development Chat
|
||||
```bash
|
||||
/codex:chat "implement password reset functionality"
|
||||
# Executes: codex exec "@{CLAUDE.md,**/*CLAUDE.md,**/*auth*,**/*user*} implement password reset functionality"
|
||||
# Executes: codex --full-auto exec "@{CLAUDE.md,**/*CLAUDE.md,**/*auth*,**/*user*} implement password reset functionality" -s danger-full-access
|
||||
```
|
||||
|
||||
#### Architecture Discussion
|
||||
```bash
|
||||
/codex:chat "how should I structure the user management module?"
|
||||
# Executes: codex exec "@{CLAUDE.md,**/*CLAUDE.md,**/*user*,src/**/*} how should I structure the user management module?"
|
||||
# Executes: codex --full-auto exec "@{CLAUDE.md,**/*CLAUDE.md,**/*user*,src/**/*} how should I structure the user management module?" -s danger-full-access
|
||||
```
|
||||
|
||||
#### Performance Optimization
|
||||
```bash
|
||||
/codex:chat "optimize React component rendering performance"
|
||||
# Executes: codex exec "@{CLAUDE.md,**/*CLAUDE.md,src/**/*.{jsx,tsx}} optimize React component rendering performance"
|
||||
# Executes: codex --full-auto exec "@{CLAUDE.md,**/*CLAUDE.md,src/**/*.{jsx,tsx}} optimize React component rendering performance" -s danger-full-access
|
||||
```
|
||||
|
||||
#### Full Auto Mode
|
||||
```bash
|
||||
/codex:chat "create a complete user dashboard with charts" --full-auto
|
||||
# Executes: codex -s workspace-write --full-auto "@{CLAUDE.md,**/*CLAUDE.md,**/*user*,**/*dashboard*} create a complete user dashboard with charts"
|
||||
# Executes: codex --full-auto exec "@{CLAUDE.md,**/*CLAUDE.md,**/*user*,**/*dashboard*} create a complete user dashboard with charts" -s danger-full-access
|
||||
```
|
||||
|
||||
### ⚠️ **Error Prevention**
|
||||
|
||||
@@ -53,7 +53,7 @@ model: sonnet
|
||||
```bash
|
||||
/codex:execute "create complete todo application with React and TypeScript"
|
||||
```
|
||||
**Process**: Uses `codex -s workspace-write --full-auto` for autonomous implementation
|
||||
**Process**: Uses `codex --full-auto ... -s danger-full-access` for autonomous implementation
|
||||
|
||||
## Context Inference Logic
|
||||
|
||||
@@ -105,7 +105,7 @@ model: sonnet
|
||||
|
||||
### User Description Template
|
||||
```bash
|
||||
codex exec "@{inferred_patterns} @{CLAUDE.md,**/*CLAUDE.md}
|
||||
codex --full-auto exec "@{inferred_patterns} @{CLAUDE.md,**/*CLAUDE.md}
|
||||
|
||||
Implementation Task: [user_description]
|
||||
|
||||
@@ -113,23 +113,23 @@ Provide:
|
||||
- Specific implementation code
|
||||
- File modification locations (file:line)
|
||||
- Test cases
|
||||
- Integration guidance"
|
||||
- Integration guidance" -s danger-full-access
|
||||
```
|
||||
|
||||
### Task ID Template
|
||||
```bash
|
||||
codex exec "@{task_files} @{brainstorming_refs} @{CLAUDE.md,**/*CLAUDE.md}
|
||||
codex --full-auto exec "@{task_files} @{brainstorming_refs} @{CLAUDE.md,**/*CLAUDE.md}
|
||||
|
||||
Task: [task_title] (ID: [task-id])
|
||||
Type: [task_type]
|
||||
Scope: [task_scope]
|
||||
|
||||
Execute implementation following task acceptance criteria."
|
||||
Execute implementation following task acceptance criteria." -s danger-full-access
|
||||
```
|
||||
|
||||
### Full Auto Template
|
||||
```bash
|
||||
codex -s workspace-write --full-auto "@{**/*} @{CLAUDE.md,**/*CLAUDE.md}
|
||||
codex --full-auto exec "@{**/*} @{CLAUDE.md,**/*CLAUDE.md}
|
||||
|
||||
Development Task: [user_description]
|
||||
|
||||
@@ -137,7 +137,7 @@ Autonomous implementation with:
|
||||
- Architecture decisions
|
||||
- Code generation
|
||||
- Testing
|
||||
- Documentation"
|
||||
- Documentation" -s danger-full-access
|
||||
```
|
||||
|
||||
## Auto-Generated Outputs
|
||||
|
||||
@@ -19,7 +19,7 @@ Leverages Codex's `--full-auto` mode for autonomous development with intelligent
|
||||
|
||||
**Process**: Analyze Input → Select Templates → Gather Context → Execute Autonomous Development
|
||||
|
||||
⚠️ **Critical Feature**: Uses `codex -s workspace-write --full-auto` for maximum autonomous capability with mandatory `@` pattern requirements.
|
||||
⚠️ **Critical Feature**: Uses `codex --full-auto ... -s danger-full-access` for maximum autonomous capability with mandatory `@` pattern requirements.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -137,7 +137,7 @@ END FUNCTION
|
||||
### Step 3: Execute with Full Auto Mode
|
||||
```bash
|
||||
# Autonomous development execution with comprehensive context
|
||||
codex -s workspace-write --full-auto "@{**/*} @{CLAUDE.md,**/*CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/[selected_template])
|
||||
codex --full-auto "@{**/*} @{CLAUDE.md,**/*CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/[selected_template])
|
||||
|
||||
Development Task: [user_input]
|
||||
|
||||
@@ -146,7 +146,7 @@ Autonomous Implementation Requirements:
|
||||
- Code generation with best practices
|
||||
- Automatic testing integration
|
||||
- Documentation updates
|
||||
- Error handling and validation"
|
||||
- Error handling and validation" -s danger-full-access
|
||||
```
|
||||
|
||||
## Essential Codex Auto Patterns
|
||||
|
||||
@@ -29,19 +29,19 @@ Systematic bug analysis, debugging, and automated fix implementation using exper
|
||||
```bash
|
||||
/codex:mode:bug-index "authentication error during login"
|
||||
```
|
||||
**Executes**: `codex exec "@{**/*auth*,**/*login*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/debugging.txt)"`
|
||||
**Executes**: `codex --full-auto exec "@{**/*auth*,**/*login*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/debugging.txt)" -s danger-full-access`
|
||||
|
||||
### Comprehensive Bug Investigation
|
||||
```bash
|
||||
/codex:mode:bug-index "React state not updating in dashboard"
|
||||
```
|
||||
**Executes**: `codex exec "@{src/**/*.{jsx,tsx},**/*dashboard*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/debugging.txt)"`
|
||||
**Executes**: `codex --full-auto exec "@{src/**/*.{jsx,tsx},**/*dashboard*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/debugging.txt)" -s danger-full-access`
|
||||
|
||||
### Production Error Analysis
|
||||
```bash
|
||||
/codex:mode:bug-index "API timeout issues in production environment"
|
||||
```
|
||||
**Executes**: `codex exec "@{**/api/**/*,*.config.*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/debugging.txt)"`
|
||||
**Executes**: `codex --full-auto exec "@{**/api/**/*,*.config.*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/debugging.txt)" -s danger-full-access`
|
||||
|
||||
## Codex-Specific Debugging Patterns
|
||||
|
||||
@@ -65,7 +65,7 @@ codex exec "@{inferred_bug_patterns} @{CLAUDE.md,**/*CLAUDE.md} $(cat ~/.claude/
|
||||
|
||||
Context: Comprehensive codebase analysis for bug investigation
|
||||
Bug Description: [user_description]
|
||||
Fix Implementation: Provide working code solutions"
|
||||
Fix Implementation: Provide working code solutions" -s danger-full-access
|
||||
```
|
||||
|
||||
## Bug Pattern Inference
|
||||
|
||||
@@ -15,7 +15,7 @@ model: sonnet
|
||||
|
||||
## Overview
|
||||
Comprehensive development planning and implementation strategy using expert planning templates with Codex CLI.
|
||||
- **Directory Analysis Rule**: When user intends to analyze specific directory (cd XXX), use: `codex -s workspace-write --cd XXX --full-auto exec "prompt"` or `cd XXX && codex -s workspace-write --full-auto exec "@{**/*} prompt"`
|
||||
- **Directory Analysis Rule**: When user intends to analyze specific directory (cd XXX), use: `codex --cd XXX --full-auto exec "prompt" -s danger-full-access` or `cd XXX && codex --full-auto exec "@{**/*} prompt" -s danger-full-access`
|
||||
- **Default Mode**: `--full-auto exec` autonomous development mode (RECOMMENDED for all tasks).
|
||||
|
||||
|
||||
@@ -27,20 +27,20 @@ Comprehensive development planning and implementation strategy using expert plan
|
||||
```bash
|
||||
/codex:mode:plan "design authentication system with implementation"
|
||||
```
|
||||
**Executes**: `codex -s workspace-write --full-auto exec "@{**/*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/planning/task-breakdown.txt) design authentication system with implementation"`
|
||||
**Executes**: `codex --full-auto exec "@{**/*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/planning/task-breakdown.txt) design authentication system with implementation" -s danger-full-access`
|
||||
|
||||
### Architecture Planning with Context
|
||||
```bash
|
||||
/codex:mode:plan "microservices migration strategy"
|
||||
```
|
||||
**Executes**: `codex -s workspace-write --full-auto exec "@{src/**/*,*.config.*,CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/planning/migration.txt) microservices migration strategy"`
|
||||
**Executes**: `codex --full-auto exec "@{src/**/*,*.config.*,CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/planning/migration.txt) microservices migration strategy" -s danger-full-access`
|
||||
|
||||
### Feature Implementation Planning
|
||||
```bash
|
||||
/codex:mode:plan "real-time notifications with WebSocket integration"
|
||||
```
|
||||
|
||||
**Executes**: `codex -s workspace-write --full-auto exec "@{**/*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/feature.txt) Additional Planning Context:$(cat ~/.claude/workflows/cli-templates/prompts/planning/task-breakdown.txt) real-time notifications with WebSocket integration"`
|
||||
**Executes**: `codex --full-auto exec "@{**/*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/feature.txt) Additional Planning Context:$(cat ~/.claude/workflows/cli-templates/prompts/planning/task-breakdown.txt) real-time notifications with WebSocket integration" -s danger-full-access`
|
||||
|
||||
## Codex-Specific Planning Patterns
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ Task(subagent_type="code-developer",
|
||||
Output: pattern_analysis
|
||||
|
||||
Step 3 (implement): Implement JWT based on analysis
|
||||
Command: codex -s workspace-write --full-auto exec 'Implement JWT using analysis: [pattern_analysis] and context: [dependency_context]'
|
||||
Command: codex --full-auto exec 'Implement JWT using analysis: [pattern_analysis] and context: [dependency_context]' -s danger-full-access
|
||||
|
||||
Session Context:
|
||||
- Workflow Directory: .workflow/WFS-user-auth/
|
||||
|
||||
@@ -163,16 +163,16 @@ cd [module] && ~/.claude/scripts/gemini-wrapper -p "Find 3+ similar [feature_typ
|
||||
#### Codex Analysis Templates
|
||||
```bash
|
||||
# Architectural analysis
|
||||
codex -s workspace-write --full-auto exec "analyze [scope] architecture and identify optimization opportunities"
|
||||
codex --full-auto exec "analyze [scope] architecture and identify optimization opportunities" -s danger-full-access
|
||||
|
||||
# Pattern-based development
|
||||
codex -s workspace-write --full-auto exec "analyze existing patterns for [feature] implementation with concrete examples"
|
||||
codex --full-auto exec "analyze existing patterns for [feature] implementation with concrete examples" -s danger-full-access
|
||||
|
||||
# Project understanding
|
||||
codex -s workspace-write --full-auto exec "analyze project structure, conventions, and development requirements"
|
||||
codex --full-auto exec "analyze project structure, conventions, and development requirements" -s danger-full-access
|
||||
|
||||
# Modernization analysis
|
||||
codex -s workspace-write --full-auto exec "identify modernization opportunities and refactoring priorities"
|
||||
codex --full-auto exec "identify modernization opportunities and refactoring priorities" -s danger-full-access
|
||||
```
|
||||
|
||||
### Context Accumulation & Inheritance
|
||||
|
||||
@@ -55,7 +55,9 @@ detect_changed_modules() {
|
||||
|
||||
local types=$(find "$dir" -maxdepth 1 -type f -name "*.*" 2>/dev/null | \
|
||||
grep -E '\.[^/]*$' | sed 's/.*\.//' | sort -u | tr '\n' ',' | sed 's/,$//')
|
||||
echo "depth:$depth|path:$dir|files:$file_count|types:[$types]|status:changed"
|
||||
local has_claude="no"
|
||||
[ -f "$dir/CLAUDE.md" ] && has_claude="yes"
|
||||
echo "depth:$depth|path:$dir|files:$file_count|types:[$types]|has_claude:$has_claude|status:changed"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
@@ -69,7 +71,9 @@ detect_changed_modules() {
|
||||
if [ -d "$dir" ]; then
|
||||
local depth=$(echo "$dir" | tr -cd '/' | wc -c)
|
||||
if [ "$dir" = "." ]; then depth=0; fi
|
||||
echo "$depth:$dir"
|
||||
local claude_indicator=""
|
||||
[ -f "$dir/CLAUDE.md" ] && claude_indicator=" [✓]"
|
||||
echo "$depth:$dir$claude_indicator"
|
||||
fi
|
||||
done | sort -n | awk -F: '
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ type: strategic-guideline
|
||||
|
||||
**Codex** (Development & Implementation):
|
||||
```bash
|
||||
codex -s workspace-write --full-auto exec "implement user authentication system"
|
||||
codex --full-auto exec "implement user authentication system" -s danger-full-access
|
||||
```
|
||||
|
||||
### ⚠️ CRITICAL Command Differences
|
||||
@@ -25,7 +25,7 @@ codex -s workspace-write --full-auto exec "implement user authentication system"
|
||||
| Tool | Command | Has Wrapper | Key Feature |
|
||||
|------|---------|-------------|-------------|
|
||||
| **Gemini** | `~/.claude/scripts/gemini-wrapper` | ✅ YES | Large context window, pattern recognition |
|
||||
| **Codex** | `codex -s workspace-write --full-auto exec` | ❌ NO | Autonomous development, math reasoning |
|
||||
| **Codex** | `codex --full-auto exec ... -s danger-full-access` | ❌ NO | Autonomous development, math reasoning |
|
||||
|
||||
**❌ NEVER use**: `~/.claude/scripts/codex` - this wrapper does not exist!
|
||||
|
||||
@@ -34,10 +34,10 @@ codex -s workspace-write --full-auto exec "implement user authentication system"
|
||||
Codex requires the `-s` (sandbox) parameter for write operations:
|
||||
|
||||
- **`-s read-only`**: Safe analysis mode, no file modifications
|
||||
- **`-s workspace-write`**: Standard development mode, can modify project files (RECOMMENDED for development tasks)
|
||||
- **`-s danger-full-access`**: Full system access (use with extreme caution)
|
||||
- **`-s workspace-write`**: Standard development mode, can modify project files
|
||||
- **`-s danger-full-access`**: Full system access (RECOMMENDED for development tasks)
|
||||
|
||||
**Default Choice**: Use `-s workspace-write` for all development and implementation tasks.
|
||||
**Default Choice**: Use `-s danger-full-access` for all development and implementation tasks.
|
||||
|
||||
## 🎯 Tool Selection Matrix
|
||||
|
||||
@@ -52,7 +52,7 @@ Codex requires the `-s` (sandbox) parameter for write operations:
|
||||
- Large codebase understanding
|
||||
|
||||
### When to Use Codex
|
||||
- **Command**: `codex -s workspace-write --full-auto exec "prompt"`
|
||||
- **Command**: `codex --full-auto exec "prompt" -s danger-full-access`
|
||||
- **Strengths**: Mathematical reasoning, autonomous development
|
||||
- **Best For**:
|
||||
- Complex algorithm analysis
|
||||
@@ -121,13 +121,13 @@ cd src && ~/.claude/scripts/gemini-wrapper -p "review overall architecture"
|
||||
### Codex Quick Commands
|
||||
```bash
|
||||
# Feature development
|
||||
codex -s workspace-write --full-auto exec "implement JWT authentication with refresh tokens"
|
||||
codex --full-auto exec "implement JWT authentication with refresh tokens" -s danger-full-access
|
||||
|
||||
# Performance optimization
|
||||
codex -s workspace-write --full-auto exec "optimize database queries in user service"
|
||||
codex --full-auto exec "optimize database queries in user service" -s danger-full-access
|
||||
|
||||
# Security enhancement
|
||||
codex -s workspace-write --full-auto exec "add input validation and sanitization"
|
||||
codex --full-auto exec "add input validation and sanitization" -s danger-full-access
|
||||
```
|
||||
|
||||
## 📋 Implementation Guidelines
|
||||
@@ -148,7 +148,7 @@ For comprehensive syntax, patterns, and advanced usage:
|
||||
|---------|--------|-------|
|
||||
| **Command Syntax** | Has wrapper script | Direct command only |
|
||||
| **File Loading** | `--all-files` available | `@` patterns required |
|
||||
| **Default Mode** | Interactive analysis | `-s workspace-write --full-auto exec` automation |
|
||||
| **Default Mode** | Interactive analysis | `--full-auto exec ... -s danger-full-access` automation |
|
||||
| **Primary Use** | Analysis & planning | Development & implementation |
|
||||
| **Context Window** | Very large | Standard with smart discovery |
|
||||
| **Automation Level** | Manual implementation | Autonomous execution |
|
||||
|
||||
@@ -232,14 +232,15 @@ gemini -p "@{**/*.ts} @{**/*.js} @{CLAUDE.md} Analyze authentication patterns"
|
||||
Codex requires the `-s` (sandbox) parameter to control file modification permissions:
|
||||
|
||||
- **`-s read-only`**: Safe analysis mode, no file modifications allowed
|
||||
- **`-s workspace-write`**: Standard development mode, can modify project files (**RECOMMENDED for development tasks**)
|
||||
- **`-s workspace-write`**: Standard development mode, can modify project files
|
||||
- **`-s danger-full-access`**: Full system access (**RECOMMENDED for development tasks**)
|
||||
- **`-s danger-full-access`**: Full system access, use with extreme caution
|
||||
|
||||
**Default Choice**: Always use `-s workspace-write` for development and implementation tasks.
|
||||
**Default Choice**: Always use `-s danger-full-access` for development and implementation tasks.
|
||||
|
||||
### ⭐ CRITICAL: Default to `--full-auto` Mode
|
||||
|
||||
**🎯 Golden Rule**: Always start with `codex -s workspace-write --full-auto exec "task description"` for maximum autonomous capabilities.
|
||||
**🎯 Golden Rule**: Always start with `codex --full-auto exec "task description" -s danger-full-access` for maximum autonomous capabilities.
|
||||
|
||||
**Why `--full-auto` Should Be Your Default**:
|
||||
- **🧠 Intelligent File Discovery**: Auto-identifies relevant files without manual `@` patterns
|
||||
@@ -258,16 +259,16 @@ Codex requires the `-s` (sandbox) parameter to control file modification permiss
|
||||
|
||||
**Basic Structure** (Priority Order):
|
||||
```bash
|
||||
codex -s workspace-write --full-auto exec "autonomous development task" # DEFAULT & RECOMMENDED
|
||||
codex -s workspace-write --full-auto exec "prompt with @{patterns}" # For specific control needs
|
||||
codex --full-auto exec "autonomous development task" -s danger-full-access # DEFAULT & RECOMMENDED
|
||||
codex --full-auto exec "prompt with @{patterns}" -s danger-full-access # For specific control needs
|
||||
```
|
||||
|
||||
**⚠️ NEVER use**: `~/.claude/scripts/codex` - this wrapper script does not exist!
|
||||
|
||||
**Key Commands** (In Order of Preference):
|
||||
- `codex -s workspace-write --full-auto exec "..."` ⭐ **PRIMARY MODE** - Full autonomous development
|
||||
- `codex -s workspace-write --cd /path --full-auto exec "..."` - Directory-specific autonomous development
|
||||
- `codex -s workspace-write --cd /path --full-auto exec "@{patterns} ..."` - Directory-specific with patterns
|
||||
- `codex --full-auto exec "..." -s danger-full-access` ⭐ **PRIMARY MODE** - Full autonomous development
|
||||
- `codex --cd /path --full-auto exec "..." -s danger-full-access` - Directory-specific autonomous development
|
||||
- `codex --cd /path --full-auto exec "@{patterns} ..." -s danger-full-access` - Directory-specific with patterns
|
||||
|
||||
### 📦 Codex Usage Patterns
|
||||
|
||||
@@ -276,24 +277,24 @@ codex -s workspace-write --full-auto exec "prompt with @{patterns}" # For s
|
||||
**Basic Development**:
|
||||
```bash
|
||||
# RECOMMENDED: Let Codex handle everything autonomously
|
||||
codex -s workspace-write --full-auto exec "Implement user authentication with JWT tokens"
|
||||
codex --full-auto exec "Implement user authentication with JWT tokens" -s danger-full-access
|
||||
|
||||
# Directory-specific autonomous development
|
||||
codex -s workspace-write --cd src/auth --full-auto exec "Refactor authentication module using latest patterns"
|
||||
codex --cd src/auth --full-auto exec "Refactor authentication module using latest patterns" -s danger-full-access
|
||||
|
||||
# Complex feature development
|
||||
codex -s workspace-write --full-auto exec "Create a complete todo application with React and TypeScript"
|
||||
codex --full-auto exec "Create a complete todo application with React and TypeScript" -s danger-full-access
|
||||
```
|
||||
|
||||
**Template-Enhanced Development**:
|
||||
```bash
|
||||
# Autonomous mode with template guidance
|
||||
codex -s workspace-write --full-auto exec "$(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
|
||||
- Role-based access control
|
||||
- Password reset functionality"
|
||||
- Password reset functionality" -s danger-full-access
|
||||
```
|
||||
|
||||
#### 🛠️ Controlled Development (When Explicit Control Needed)
|
||||
@@ -301,24 +302,24 @@ codex -s workspace-write --full-auto exec "$(cat ~/.claude/workflows/cli-templat
|
||||
**Module-Specific with Patterns**:
|
||||
```bash
|
||||
# Explicit patterns when autonomous mode needs guidance
|
||||
codex -s workspace-write --full-auto exec "@{src/auth/**/*,CLAUDE.md} Refactor authentication module using latest patterns"
|
||||
codex --full-auto exec "@{src/auth/**/*,CLAUDE.md} Refactor authentication module using latest patterns" -s danger-full-access
|
||||
|
||||
# Alternative: Directory-specific execution with explicit patterns
|
||||
codex -s workspace-write --cd src/auth --full-auto exec "@{**/*,../../CLAUDE.md} Refactor authentication module"
|
||||
codex --cd src/auth --full-auto exec "@{**/*,../../CLAUDE.md} Refactor authentication module" -s danger-full-access
|
||||
```
|
||||
|
||||
**Debugging & Analysis**:
|
||||
```bash
|
||||
# Autonomous debugging mode
|
||||
codex -s workspace-write --full-auto exec "$(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
|
||||
- Propose and implement optimizations
|
||||
- Add performance monitoring"
|
||||
- Add performance monitoring" -s danger-full-access
|
||||
|
||||
# Alternative: Explicit patterns for controlled analysis
|
||||
codex -s workspace-write --full-auto 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)" -s danger-full-access
|
||||
```
|
||||
|
||||
### 📂 Codex File Pattern Rules - CRITICAL
|
||||
@@ -345,26 +346,26 @@ codex -s workspace-write --full-auto exec "@{src/**/*,package.json,CLAUDE.md} $(
|
||||
|
||||
```bash
|
||||
# Phase 1: Autonomous Analysis
|
||||
codex -s workspace-write --full-auto exec "Analyze current architecture for payment system integration"
|
||||
codex --full-auto exec "Analyze current architecture for payment system integration" -s danger-full-access
|
||||
|
||||
# Phase 2: Autonomous Implementation (RECOMMENDED APPROACH)
|
||||
codex -s workspace-write --full-auto exec "Implement Stripe payment integration based on the analyzed architecture"
|
||||
codex --full-auto exec "Implement Stripe payment integration based on the analyzed architecture" -s danger-full-access
|
||||
|
||||
# Phase 3: Autonomous Testing
|
||||
codex -s workspace-write --full-auto exec "Generate comprehensive tests for the payment system implementation"
|
||||
codex --full-auto exec "Generate comprehensive tests for the payment system implementation" -s danger-full-access
|
||||
|
||||
# Alternative: Explicit control when needed
|
||||
codex -s workspace-write --full-auto exec "@{**/*,CLAUDE.md} Analyze current architecture for payment system integration"
|
||||
codex --full-auto exec "@{**/*,CLAUDE.md} Analyze current architecture for payment system integration" -s danger-full-access
|
||||
```
|
||||
|
||||
#### 🌐 Cross-Project Learning
|
||||
|
||||
```bash
|
||||
# RECOMMENDED: Autonomous cross-project pattern learning
|
||||
codex -s workspace-write --full-auto exec "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" -s danger-full-access
|
||||
|
||||
# Alternative: Explicit pattern specification
|
||||
codex -s workspace-write --full-auto 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" -s danger-full-access
|
||||
```
|
||||
|
||||
#### 📊 Development Workflow Integration
|
||||
@@ -372,17 +373,17 @@ codex -s workspace-write --full-auto exec "@{../other-project/src/**/*,src/**/*,
|
||||
**Pre-Development Analysis**:
|
||||
```bash
|
||||
# RECOMMENDED: Autonomous pattern analysis
|
||||
codex -s workspace-write --full-auto exec "$(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."
|
||||
Analyze the existing codebase patterns and conventions before implementing new features." -s danger-full-access
|
||||
```
|
||||
|
||||
**Quality Assurance**:
|
||||
```bash
|
||||
# RECOMMENDED: Autonomous testing and validation
|
||||
codex -s workspace-write --full-auto exec "$(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."
|
||||
Generate comprehensive tests and perform validation for the entire codebase." -s danger-full-access
|
||||
```
|
||||
|
||||
### ⚠️ Codex Best Practices
|
||||
@@ -394,7 +395,7 @@ Generate comprehensive tests and perform validation for the entire codebase."
|
||||
- **Be selective**: Use specific patterns like `@{src/**/*.ts}` for targeted analysis
|
||||
|
||||
**Default Automation Mode** (CRITICAL GUIDANCE):
|
||||
- **`codex -s workspace-write --full-auto exec` is PRIMARY choice**: Use for 90% of all tasks - maximizes autonomous capabilities
|
||||
- **`codex --full-auto exec ... -s danger-full-access` is PRIMARY choice**: Use for 90% of all tasks - maximizes autonomous capabilities
|
||||
- **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 explicit patterns
|
||||
@@ -428,4 +429,4 @@ Generate comprehensive tests and perform validation for the entire codebase."
|
||||
|
||||
**Remember**:
|
||||
- **Gemini excels at understanding** - use `~/.claude/scripts/gemini-wrapper` for analysis and pattern recognition
|
||||
- **Codex excels at building** - use `codex -s workspace-write --full-auto exec` for autonomous development and implementation
|
||||
- **Codex excels at building** - use `codex --full-auto exec ... -s danger-full-access` for autonomous development and implementation
|
||||
@@ -19,7 +19,7 @@ For all CLI tool usage, command syntax, and integration guidelines:
|
||||
|
||||
Bash(cd [module] && ~/.claude/scripts/gemini-wrapper -p "analyze [scope] architecture")
|
||||
|
||||
Bash(codex -s workspace-write --full-auto exec "analyze [scope] architecture")
|
||||
Bash(codex --full-auto exec "analyze [scope] architecture" -s danger-full-access)
|
||||
|
||||
**Context Requirements**:
|
||||
- Identify 3+ existing similar patterns before implementation
|
||||
|
||||
@@ -166,10 +166,10 @@ cd [module] && ~/.claude/scripts/gemini-wrapper -p "Analyze patterns, convention
|
||||
#### **Codex Analysis Templates**
|
||||
```bash
|
||||
# Architectural analysis
|
||||
codex -s workspace-write --full-auto exec "analyze [scope] architecture and identify optimization opportunities"
|
||||
codex --full-auto exec "analyze [scope] architecture and identify optimization opportunities" -s danger-full-access
|
||||
|
||||
# Pattern-based development
|
||||
codex -s workspace-write --full-auto exec "analyze existing patterns for [feature] implementation with examples"
|
||||
codex --full-auto exec "analyze existing patterns for [feature] implementation with examples" -s danger-full-access
|
||||
```
|
||||
|
||||
### **Improved Command Structure**
|
||||
|
||||
Reference in New Issue
Block a user