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:
catlog22
2025-09-16 13:11:13 +08:00
parent 972771d080
commit 1357756295
14 changed files with 89 additions and 84 deletions

View File

@@ -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

View File

@@ -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**

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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/

View File

@@ -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