From 7ea75d102fa16a97de2f9ad2170546a3a67386af Mon Sep 17 00:00:00 2001 From: catlog22 Date: Wed, 10 Sep 2025 22:51:27 +0800 Subject: [PATCH] feat: Update documentation to include Codex CLI usage guidelines and enhance template references --- .../agent-workflow-coordination.md | 5 +- .claude/workflows/codex-unified.md | 23 ------ .claude/workflows/gemini-unified.md | 18 ----- .claude/workflows/shared-template-system.md | 73 ------------------- CLAUDE.md | 2 +- 5 files changed, 5 insertions(+), 116 deletions(-) diff --git a/.claude/output-styles/agent-workflow-coordination.md b/.claude/output-styles/agent-workflow-coordination.md index f2565d2f..689016cd 100644 --- a/.claude/output-styles/agent-workflow-coordination.md +++ b/.claude/output-styles/agent-workflow-coordination.md @@ -22,4 +22,7 @@ description: Core coordination principles for multi-agent development workflows ### Gemini Context Protocol For all Gemini CLI usage, command syntax, and integration guidelines: -@~/.claude/workflows/gemini-unified.md \ No newline at end of file +@~/.claude/workflows/gemini-unified.md + +For all Codex CLI usage, command syntax, and integration guidelines: +@~/.claude/workflows/codex-unified.md \ No newline at end of file diff --git a/.claude/workflows/codex-unified.md b/.claude/workflows/codex-unified.md index 0d59161e..84130ff7 100644 --- a/.claude/workflows/codex-unified.md +++ b/.claude/workflows/codex-unified.md @@ -73,29 +73,6 @@ type: technical-guideline > **📋 Complete Template Reference**: See [Shared Template System](./shared-template-system.md) for comprehensive template directory structure, cross-tool compatibility, and detailed usage patterns. -#### Template System Overview -Codex uses a shared template system with Gemini, located at `~/.claude/workflows/cli-templates/`. Templates are organized by primary use case: - -- **`development/`** - Development templates (Codex primary) -- **`automation/`** - Autonomous workflow templates (Codex specialized) -- **`analysis/`** - Analysis templates (Gemini primary, Codex compatible) -- **`integration/`** - Cross-system templates (Codex primary) -- **`planning/`** - Planning templates (Cross-tool) -- **`review/`** - Review templates (Cross-tool) - -### 🧭 Template Selection Guide (Codex Focus) - -| Task Type | Primary Template | Purpose | Codex Advantage | -|---|---|---|---| -| Build New Feature | `development/feature.txt` | End-to-end feature development | Autonomous implementation | -| Create Component | `development/component.txt` | Reusable component development | Pattern-aware generation | -| Refactor Code | `development/refactor.txt` | Code improvement & optimization | Context-aware refactoring | -| Generate Tests | `development/testing.txt` | Comprehensive test coverage | Intelligent test generation | -| Debug Issues | `development/debugging.txt` | Problem analysis & resolution | Root cause identification | -| Scaffold Project | `automation/scaffold.txt` | Project structure creation | Best practice templates | -| Automate Migration | `automation/migration.txt` | Technology upgrades | Automated migration paths | -| API Development | `integration/api-design.txt` | API design & implementation | RESTful pattern adherence | - > **💡 Cross-Tool Usage**: Analysis templates (`analysis/`) work with Codex for understanding existing code before development. See shared template system for complete compatibility matrix. ### 📦 Standard Command Structures diff --git a/.claude/workflows/gemini-unified.md b/.claude/workflows/gemini-unified.md index fcc4a808..9ff9bdf7 100644 --- a/.claude/workflows/gemini-unified.md +++ b/.claude/workflows/gemini-unified.md @@ -70,24 +70,6 @@ type: technical-guideline > **📋 Complete Template Reference**: See [Shared Template System](./shared-template-system.md) for comprehensive template directory structure, selection guide, and cross-tool compatibility details. -#### 🗂️ Template System Overview -Gemini uses a shared template system with Codex, located at `~/.claude/workflows/cli-templates/`. Templates are organized by primary use case: - -- **`analysis/`** - Code analysis templates (Gemini primary) -- **`development/`** - Development templates (Codex primary, Gemini compatible) -- **`planning/`** - Planning templates (Cross-tool) -- **`review/`** - Review templates (Cross-tool) - -#### 🧭 Quick Template Selection (Gemini Focus) -| Task Type | Primary Template | Usage Pattern | -|---|---|---| -| Understand Existing Code | `analysis/pattern.txt` | Analysis & onboarding | -| Security Review | `analysis/security.txt` | Vulnerability assessment | -| Performance Analysis | `analysis/performance.txt` | Bottleneck investigation | -| Code Quality Assessment | `analysis/quality.txt` | Technical debt review | -| Architecture Review | `analysis/architecture.txt` | System design analysis | -| Plan New Features | `planning/task-breakdown.txt` | Development planning | - > **💡 Template Usage**: All templates work with both `$(cat ~/.claude/workflows/cli-templates/prompts/[category]/[template].txt)` syntax and multi-template composition patterns. diff --git a/.claude/workflows/shared-template-system.md b/.claude/workflows/shared-template-system.md index 3f670265..96086a5c 100644 --- a/.claude/workflows/shared-template-system.md +++ b/.claude/workflows/shared-template-system.md @@ -4,12 +4,6 @@ description: Unified template directory structure and organization for Gemini an type: system-architecture --- -# 🗂️ Shared Template System - -## Overview - -This document defines the unified template system shared between Gemini (analysis) and Codex (development) CLI tools. The template system provides standardized, reusable prompts for common software development and analysis tasks. - ## 📁 Template Directory Structure Templates are shared between gemini and codex. This structure can be located at either `~/.claude/workflows/cli-templates/` (global) or `./.claude/workflows/cli-templates/` (project-specific). @@ -118,70 +112,3 @@ Templates are shared between gemini and codex. This structure can be located at | Automate Migration | `automation/migration.txt` | Automated system upgrades | Codex | | Setup Deployment | `automation/deployment.txt` | CI/CD pipeline automation | Codex | -## 🔄 Template Usage Patterns - -### Gemini Template Usage -```bash -# Analysis template usage -gemini --all-files -p "@{src/**/*} @{CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/analysis/pattern.txt)" - -# Multi-template composition -gemini -p "@{src/**/*} @{CLAUDE.md} -$(cat ~/.claude/workflows/cli-templates/prompts/analysis/security.txt) - -Additional Performance Focus: -$(cat ~/.claude/workflows/cli-templates/prompts/analysis/performance.txt)" -``` - -### Codex Template Usage -```bash -# Development template usage -codex exec "@{src/**/*,CLAUDE.md} $(cat ~/.claude/workflows/cli-templates/prompts/development/feature.txt)" - -# Multi-template composition -codex exec "@{**/*,CLAUDE.md} -$(cat ~/.claude/workflows/cli-templates/prompts/development/component.txt) - -Security Integration: -$(cat ~/.claude/workflows/cli-templates/prompts/analysis/security.txt)" -``` - -## 📝 Template Maintenance Guidelines - -### Template Creation -1. **Single Responsibility**: Each template should focus on one specific task type -2. **Tool Compatibility**: Consider both Gemini and Codex usage patterns -3. **Clear Instructions**: Include specific output requirements and format expectations -4. **Reusability**: Write templates that work across different project types - -### Template Organization -1. **Consistent Naming**: Use descriptive, consistent file naming conventions -2. **Category Separation**: Keep templates in appropriate category directories -3. **Documentation**: Include inline comments explaining template purpose and usage -4. **Version Control**: Track template changes and maintain backwards compatibility - -### Cross-Tool Compatibility -1. **Analysis Templates**: Should work with both Gemini's `--all-files` and Codex's `@{}` patterns -2. **Development Templates**: Should provide clear implementation guidance for Codex while remaining analyzable by Gemini -3. **Shared Context**: Ensure templates reference `CLAUDE.md` and common project structures - -## 🎯 Best Practices - -### Template Selection -- **Start with Primary Tool**: Use the tool most suited for the template's primary purpose -- **Complement with Secondary**: Use the other tool for validation and cross-verification -- **Combine When Needed**: Use multi-template composition for complex tasks - -### Template Customization -- **Project-Specific Templates**: Create in `./.claude/workflows/cli-templates/` for project-specific needs -- **Global Templates**: Maintain in `~/.claude/workflows/cli-templates/` for reusable patterns -- **Template Inheritance**: Build on existing templates rather than creating from scratch - -### Quality Assurance -- **Test Both Tools**: Verify templates work effectively with both Gemini and Codex -- **Validate Output**: Ensure templates produce consistent, high-quality results -- **Regular Updates**: Keep templates current with evolving development practices - ---- - -This shared template system enables consistent, high-quality interactions with both Gemini (analysis) and Codex (development) CLI tools while maintaining clear separation of concerns and optimal tool utilization. \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md index 5ab631aa..d6c0d8b9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -73,7 +73,7 @@ This document defines project-specific coding standards and development principl ### CLI Tool Context Protocols For all CLI tool usage, command syntax, and integration guidelines: - **Gemini (Analysis)**: @~/.claude/workflows/gemini-unified.md -- **Codex (Development)**: @~/.claude/workflows/codex-unified.md +- **Codex (Analysis)**: @~/.claude/workflows/codex-unified.md #### **Content Uniqueness Rules**