mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1ffe9503c | ||
|
|
437897faff |
@@ -1,33 +1,46 @@
|
|||||||
---
|
---
|
||||||
name: update-memory-full
|
name: update-memory-full
|
||||||
description: Complete project-wide CLAUDE.md documentation update
|
description: Complete project-wide CLAUDE.md documentation update
|
||||||
usage: /update-memory-full
|
usage: /update-memory-full [--tool <gemini|qwen|codex>]
|
||||||
|
argument-hint: "[--tool gemini|qwen|codex]"
|
||||||
examples:
|
examples:
|
||||||
- /update-memory-full # Full project documentation update
|
- /update-memory-full # Full project documentation update (gemini default)
|
||||||
|
- /update-memory-full --tool qwen # Use Qwen for architecture analysis
|
||||||
|
- /update-memory-full --tool codex # Use Codex for implementation validation
|
||||||
---
|
---
|
||||||
|
|
||||||
### 🚀 Command Overview: `/update-memory-full`
|
### 🚀 Command Overview: `/update-memory-full`
|
||||||
|
|
||||||
Complete project-wide documentation update using depth-parallel execution.
|
Complete project-wide documentation update using depth-parallel execution.
|
||||||
|
|
||||||
|
**Tool Selection**:
|
||||||
|
- **Gemini (default)**: Documentation generation, pattern recognition, architecture review
|
||||||
|
- **Qwen**: Architecture analysis, system design documentation
|
||||||
|
- **Codex**: Implementation validation, code quality analysis
|
||||||
|
|
||||||
### 📝 Execution Template
|
### 📝 Execution Template
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Complete project-wide CLAUDE.md documentation update
|
# Complete project-wide CLAUDE.md documentation update
|
||||||
|
|
||||||
# Step 1: Code Index architecture analysis
|
# Step 1: Parse tool selection (default: gemini)
|
||||||
|
tool="gemini"
|
||||||
|
[[ "$*" == *"--tool qwen"* ]] && tool="qwen"
|
||||||
|
[[ "$*" == *"--tool codex"* ]] && tool="codex"
|
||||||
|
|
||||||
|
# Step 2: Code Index architecture analysis
|
||||||
mcp__code-index__search_code_advanced(pattern="class|function|interface", file_pattern="**/*.{ts,js,py}")
|
mcp__code-index__search_code_advanced(pattern="class|function|interface", file_pattern="**/*.{ts,js,py}")
|
||||||
mcp__code-index__find_files(pattern="**/*.{md,json,yaml,yml}")
|
mcp__code-index__find_files(pattern="**/*.{md,json,yaml,yml}")
|
||||||
|
|
||||||
# Step 2: Cache git changes
|
# Step 3: Cache git changes
|
||||||
Bash(git add -A 2>/dev/null || true)
|
Bash(git add -A 2>/dev/null || true)
|
||||||
|
|
||||||
# Step 3: Get and display project structure
|
# Step 4: Get and display project structure
|
||||||
modules=$(Bash(~/.claude/scripts/get_modules_by_depth.sh list))
|
modules=$(Bash(~/.claude/scripts/get_modules_by_depth.sh list))
|
||||||
count=$(echo "$modules" | wc -l)
|
count=$(echo "$modules" | wc -l)
|
||||||
|
|
||||||
# Step 3: Analysis handover → Model takes control
|
# Step 5: Analysis handover → Model takes control
|
||||||
# BASH_EXECUTION_STOPS → MODEL_ANALYSIS_BEGINS
|
# BASH_EXECUTION_STOPS → MODEL_ANALYSIS_BEGINS
|
||||||
|
|
||||||
# Pseudocode flow:
|
# Pseudocode flow:
|
||||||
@@ -35,6 +48,8 @@ count=$(echo "$modules" | wc -l)
|
|||||||
# → Task "Complex project full update" subagent_type: "memory-gemini-bridge"
|
# → Task "Complex project full update" subagent_type: "memory-gemini-bridge"
|
||||||
# ELSE:
|
# ELSE:
|
||||||
# → Present plan and WAIT FOR USER APPROVAL before execution
|
# → Present plan and WAIT FOR USER APPROVAL before execution
|
||||||
|
#
|
||||||
|
# Pass tool parameter to update_module_claude.sh: "$tool"
|
||||||
```
|
```
|
||||||
|
|
||||||
### 🧠 Model Analysis Phase
|
### 🧠 Model Analysis Phase
|
||||||
@@ -56,6 +71,8 @@ After the bash script completes the initial analysis, the model takes control to
|
|||||||
Model will present detailed plan:
|
Model will present detailed plan:
|
||||||
```
|
```
|
||||||
📋 Update Plan:
|
📋 Update Plan:
|
||||||
|
Tool: [gemini|qwen|codex] (from --tool parameter)
|
||||||
|
|
||||||
NEW CLAUDE.md files (X):
|
NEW CLAUDE.md files (X):
|
||||||
- ./src/components/CLAUDE.md
|
- ./src/components/CLAUDE.md
|
||||||
- ./src/services/CLAUDE.md
|
- ./src/services/CLAUDE.md
|
||||||
@@ -84,7 +101,7 @@ depth_modules = organize_by_depth(modules)
|
|||||||
FOR depth FROM max_depth DOWN TO 0:
|
FOR depth FROM max_depth DOWN TO 0:
|
||||||
FOR each module IN depth_modules[depth]:
|
FOR each module IN depth_modules[depth]:
|
||||||
WHILE active_jobs >= 4: wait(0.1)
|
WHILE active_jobs >= 4: wait(0.1)
|
||||||
Bash(~/.claude/scripts/update_module_claude.sh "$module" "full" &)
|
Bash(~/.claude/scripts/update_module_claude.sh "$module" "full" "$tool" &)
|
||||||
wait_all_jobs()
|
wait_all_jobs()
|
||||||
|
|
||||||
# Step 6: Safety check and restore staging state
|
# Step 6: Safety check and restore staging state
|
||||||
@@ -105,7 +122,7 @@ Bash(git status --short)
|
|||||||
The model will delegate to the memory-gemini-bridge agent using the Task tool:
|
The model will delegate to the memory-gemini-bridge agent using the Task tool:
|
||||||
```
|
```
|
||||||
Task "Complex project full update"
|
Task "Complex project full update"
|
||||||
prompt: "Execute full documentation update for [count] modules using depth-parallel execution"
|
prompt: "Execute full documentation update for [count] modules using [tool] with depth-parallel execution"
|
||||||
subagent_type: "memory-gemini-bridge"
|
subagent_type: "memory-gemini-bridge"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,23 @@
|
|||||||
---
|
---
|
||||||
name: update-memory-related
|
name: update-memory-related
|
||||||
description: Context-aware CLAUDE.md documentation updates based on recent changes
|
description: Context-aware CLAUDE.md documentation updates based on recent changes
|
||||||
usage: /update-memory-related
|
usage: /update-memory-related [--tool <gemini|qwen|codex>]
|
||||||
|
argument-hint: "[--tool gemini|qwen|codex]"
|
||||||
examples:
|
examples:
|
||||||
- /update-memory-related # Update documentation based on recent changes
|
- /update-memory-related # Update documentation based on recent changes (gemini default)
|
||||||
|
- /update-memory-related --tool qwen # Use Qwen for architecture analysis
|
||||||
|
- /update-memory-related --tool codex # Use Codex for implementation validation
|
||||||
---
|
---
|
||||||
|
|
||||||
### 🚀 Command Overview: `/update-memory-related`
|
### 🚀 Command Overview: `/update-memory-related`
|
||||||
|
|
||||||
Context-aware documentation update for modules affected by recent changes.
|
Context-aware documentation update for modules affected by recent changes.
|
||||||
|
|
||||||
|
**Tool Selection**:
|
||||||
|
- **Gemini (default)**: Documentation generation, pattern recognition, architecture review
|
||||||
|
- **Qwen**: Architecture analysis, system design documentation
|
||||||
|
- **Codex**: Implementation validation, code quality analysis
|
||||||
|
|
||||||
|
|
||||||
### 📝 Execution Template
|
### 📝 Execution Template
|
||||||
|
|
||||||
@@ -17,23 +25,28 @@ Context-aware documentation update for modules affected by recent changes.
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Context-aware CLAUDE.md documentation update
|
# Context-aware CLAUDE.md documentation update
|
||||||
|
|
||||||
# Step 1: Code Index refresh and architecture analysis
|
# Step 1: Parse tool selection (default: gemini)
|
||||||
|
tool="gemini"
|
||||||
|
[[ "$*" == *"--tool qwen"* ]] && tool="qwen"
|
||||||
|
[[ "$*" == *"--tool codex"* ]] && tool="codex"
|
||||||
|
|
||||||
|
# Step 2: Code Index refresh and architecture analysis
|
||||||
mcp__code-index__refresh_index()
|
mcp__code-index__refresh_index()
|
||||||
mcp__code-index__search_code_advanced(pattern="class|function|interface", file_pattern="**/*.{ts,js,py}")
|
mcp__code-index__search_code_advanced(pattern="class|function|interface", file_pattern="**/*.{ts,js,py}")
|
||||||
|
|
||||||
# Step 2: Detect changed modules (before staging)
|
# Step 3: Detect changed modules (before staging)
|
||||||
changed=$(Bash(~/.claude/scripts/detect_changed_modules.sh list))
|
changed=$(Bash(~/.claude/scripts/detect_changed_modules.sh list))
|
||||||
|
|
||||||
# Step 3: Cache git changes (protect current state)
|
# Step 4: Cache git changes (protect current state)
|
||||||
Bash(git add -A 2>/dev/null || true)
|
Bash(git add -A 2>/dev/null || true)
|
||||||
|
|
||||||
# Step 3: Use detected changes or fallback
|
# Step 5: Use detected changes or fallback
|
||||||
if [ -z "$changed" ]; then
|
if [ -z "$changed" ]; then
|
||||||
changed=$(Bash(~/.claude/scripts/get_modules_by_depth.sh list | head -10))
|
changed=$(Bash(~/.claude/scripts/get_modules_by_depth.sh list | head -10))
|
||||||
fi
|
fi
|
||||||
count=$(echo "$changed" | wc -l)
|
count=$(echo "$changed" | wc -l)
|
||||||
|
|
||||||
# Step 4: Analysis handover → Model takes control
|
# Step 6: Analysis handover → Model takes control
|
||||||
# BASH_EXECUTION_STOPS → MODEL_ANALYSIS_BEGINS
|
# BASH_EXECUTION_STOPS → MODEL_ANALYSIS_BEGINS
|
||||||
|
|
||||||
# Pseudocode flow:
|
# Pseudocode flow:
|
||||||
@@ -41,6 +54,8 @@ count=$(echo "$changed" | wc -l)
|
|||||||
# → Task "Complex project related update" subagent_type: "memory-gemini-bridge"
|
# → Task "Complex project related update" subagent_type: "memory-gemini-bridge"
|
||||||
# ELSE:
|
# ELSE:
|
||||||
# → Present plan and WAIT FOR USER APPROVAL before execution
|
# → Present plan and WAIT FOR USER APPROVAL before execution
|
||||||
|
#
|
||||||
|
# Pass tool parameter to update_module_claude.sh: "$tool"
|
||||||
```
|
```
|
||||||
|
|
||||||
### 🧠 Model Analysis Phase
|
### 🧠 Model Analysis Phase
|
||||||
@@ -62,6 +77,8 @@ After the bash script completes change detection, the model takes control to:
|
|||||||
Model will present detailed plan for affected modules:
|
Model will present detailed plan for affected modules:
|
||||||
```
|
```
|
||||||
📋 Related Update Plan:
|
📋 Related Update Plan:
|
||||||
|
Tool: [gemini|qwen|codex] (from --tool parameter)
|
||||||
|
|
||||||
CHANGED modules affecting CLAUDE.md:
|
CHANGED modules affecting CLAUDE.md:
|
||||||
|
|
||||||
NEW CLAUDE.md files (X):
|
NEW CLAUDE.md files (X):
|
||||||
@@ -91,7 +108,7 @@ depth_modules = organize_by_depth(changed_modules)
|
|||||||
FOR depth FROM max_depth DOWN TO 0:
|
FOR depth FROM max_depth DOWN TO 0:
|
||||||
FOR each module IN depth_modules[depth]:
|
FOR each module IN depth_modules[depth]:
|
||||||
WHILE active_jobs >= 4: wait(0.1)
|
WHILE active_jobs >= 4: wait(0.1)
|
||||||
Bash(~/.claude/scripts/update_module_claude.sh "$module" "related" &)
|
Bash(~/.claude/scripts/update_module_claude.sh "$module" "related" "$tool" &)
|
||||||
wait_all_jobs()
|
wait_all_jobs()
|
||||||
|
|
||||||
# Step 6: Safety check and restore staging state
|
# Step 6: Safety check and restore staging state
|
||||||
@@ -112,7 +129,7 @@ Bash(git diff --stat)
|
|||||||
The model will delegate to the memory-gemini-bridge agent using the Task tool:
|
The model will delegate to the memory-gemini-bridge agent using the Task tool:
|
||||||
```
|
```
|
||||||
Task "Complex project related update"
|
Task "Complex project related update"
|
||||||
prompt: "Execute context-aware update for [count] changed modules using depth-parallel execution"
|
prompt: "Execute context-aware update for [count] changed modules using [tool] with depth-parallel execution"
|
||||||
subagent_type: "memory-gemini-bridge"
|
subagent_type: "memory-gemini-bridge"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Update CLAUDE.md for a specific module with automatic layer detection
|
# Update CLAUDE.md for a specific module with automatic layer detection
|
||||||
# Usage: update_module_claude.sh <module_path> [update_type]
|
# Usage: update_module_claude.sh <module_path> [update_type] [tool]
|
||||||
# module_path: Path to the module directory
|
# module_path: Path to the module directory
|
||||||
# update_type: full|related (default: full)
|
# update_type: full|related (default: full)
|
||||||
|
# tool: gemini|qwen|codex (default: gemini)
|
||||||
# Script automatically detects layer depth and selects appropriate template
|
# Script automatically detects layer depth and selects appropriate template
|
||||||
|
|
||||||
update_module_claude() {
|
update_module_claude() {
|
||||||
local module_path="$1"
|
local module_path="$1"
|
||||||
local update_type="${2:-full}"
|
local update_type="${2:-full}"
|
||||||
|
local tool="${3:-gemini}"
|
||||||
|
|
||||||
# Validate parameters
|
# Validate parameters
|
||||||
if [ -z "$module_path" ]; then
|
if [ -z "$module_path" ]; then
|
||||||
@@ -63,7 +65,7 @@ update_module_claude() {
|
|||||||
local module_name=$(basename "$module_path")
|
local module_name=$(basename "$module_path")
|
||||||
|
|
||||||
echo "⚡ Updating: $module_path"
|
echo "⚡ Updating: $module_path"
|
||||||
echo " Layer: $layer | Type: $update_type | Files: $file_count"
|
echo " Layer: $layer | Type: $update_type | Tool: $tool | Files: $file_count"
|
||||||
echo " Template: $(basename "$template_path") | Strategy: $analysis_strategy"
|
echo " Template: $(basename "$template_path") | Strategy: $analysis_strategy"
|
||||||
|
|
||||||
# Generate prompt with template injection
|
# Generate prompt with template injection
|
||||||
@@ -108,29 +110,48 @@ update_module_claude() {
|
|||||||
echo " 🔄 Starting update..."
|
echo " 🔄 Starting update..."
|
||||||
|
|
||||||
if cd "$module_path" 2>/dev/null; then
|
if cd "$module_path" 2>/dev/null; then
|
||||||
# Execute gemini command with layer-specific analysis strategy
|
local tool_result=0
|
||||||
local gemini_result=0
|
local final_prompt="$base_prompt
|
||||||
|
|
||||||
|
Module Information:
|
||||||
|
- Name: $module_name
|
||||||
|
- Path: $module_path
|
||||||
|
- Layer: $layer
|
||||||
|
- Tool: $tool
|
||||||
|
- Analysis Strategy: $analysis_strategy"
|
||||||
|
|
||||||
|
# Execute with selected tool
|
||||||
|
case "$tool" in
|
||||||
|
qwen)
|
||||||
if [ "$analysis_strategy" = "--all-files" ]; then
|
if [ "$analysis_strategy" = "--all-files" ]; then
|
||||||
gemini --all-files --yolo -p "$base_prompt
|
qwen --all-files --yolo -p "$final_prompt" 2>&1
|
||||||
|
tool_result=$?
|
||||||
Module Information:
|
|
||||||
- Name: $module_name
|
|
||||||
- Path: $module_path
|
|
||||||
- Layer: $layer
|
|
||||||
- Analysis Strategy: $analysis_strategy" 2>&1
|
|
||||||
gemini_result=$?
|
|
||||||
else
|
else
|
||||||
gemini --yolo -p "$analysis_strategy $base_prompt
|
qwen --yolo -p "$analysis_strategy $final_prompt" 2>&1
|
||||||
|
tool_result=$?
|
||||||
Module Information:
|
|
||||||
- Name: $module_name
|
|
||||||
- Path: $module_path
|
|
||||||
- Layer: $layer
|
|
||||||
- Analysis Strategy: $analysis_strategy" 2>&1
|
|
||||||
gemini_result=$?
|
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
codex)
|
||||||
|
if [ "$analysis_strategy" = "--all-files" ]; then
|
||||||
|
codex --full-auto exec "$final_prompt" --skip-git-repo-check -s danger-full-access 2>&1
|
||||||
|
tool_result=$?
|
||||||
|
else
|
||||||
|
codex --full-auto exec "$final_prompt CONTEXT: $analysis_strategy" --skip-git-repo-check -s danger-full-access 2>&1
|
||||||
|
tool_result=$?
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
gemini|*)
|
||||||
|
if [ "$analysis_strategy" = "--all-files" ]; then
|
||||||
|
gemini --all-files --yolo -p "$final_prompt" 2>&1
|
||||||
|
tool_result=$?
|
||||||
|
else
|
||||||
|
gemini --yolo -p "$analysis_strategy $final_prompt" 2>&1
|
||||||
|
tool_result=$?
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ $gemini_result -eq 0 ]; then
|
if [ $tool_result -eq 0 ]; then
|
||||||
local end_time=$(date +%s)
|
local end_time=$(date +%s)
|
||||||
local duration=$((end_time - start_time))
|
local duration=$((end_time - start_time))
|
||||||
echo " ✅ Completed in ${duration}s"
|
echo " ✅ Completed in ${duration}s"
|
||||||
|
|||||||
143
.qwen/QWEN.md
Normal file
143
.qwen/QWEN.md
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
# QWEN Execution Protocol
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
**Role**: QWEN - code analysis and documentation generation
|
||||||
|
|
||||||
|
## Prompt Structure
|
||||||
|
|
||||||
|
**Receive prompts in this format**:
|
||||||
|
|
||||||
|
```
|
||||||
|
PURPOSE: [goal statement]
|
||||||
|
TASK: [specific task]
|
||||||
|
MODE: [analysis|write]
|
||||||
|
CONTEXT: [file patterns]
|
||||||
|
EXPECTED: [deliverables]
|
||||||
|
RULES: [constraints and templates]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Execution Requirements
|
||||||
|
|
||||||
|
### ALWAYS
|
||||||
|
|
||||||
|
- **Parse all six fields** - Understand PURPOSE, TASK, MODE, CONTEXT, EXPECTED, RULES
|
||||||
|
- **Follow MODE strictly** - Respect permission boundaries
|
||||||
|
- **Analyze CONTEXT files** - Read all matching patterns thoroughly
|
||||||
|
- **Apply RULES** - Follow templates and constraints exactly
|
||||||
|
- **Provide evidence** - Quote code with file:line references
|
||||||
|
- **Match EXPECTED** - Deliver exactly what's requested
|
||||||
|
|
||||||
|
### NEVER
|
||||||
|
|
||||||
|
- **Assume behavior** - Verify with actual code
|
||||||
|
- **Ignore CONTEXT** - Stay within specified file patterns
|
||||||
|
- **Skip RULES** - Templates are mandatory when provided
|
||||||
|
- **Make unsubstantiated claims** - Always back with code references
|
||||||
|
- **Deviate from MODE** - Respect read/write boundaries
|
||||||
|
|
||||||
|
## MODE Behavior
|
||||||
|
|
||||||
|
### MODE: analysis (default)
|
||||||
|
|
||||||
|
**Permissions**:
|
||||||
|
- Read all CONTEXT files
|
||||||
|
- Create/modify documentation files
|
||||||
|
|
||||||
|
**Execute**:
|
||||||
|
1. Read and analyze CONTEXT files
|
||||||
|
2. Identify patterns and issues
|
||||||
|
3. Generate insights and recommendations
|
||||||
|
4. Create documentation if needed
|
||||||
|
5. Output structured analysis
|
||||||
|
|
||||||
|
**Constraint**: Do NOT modify source code files
|
||||||
|
|
||||||
|
### MODE: write
|
||||||
|
|
||||||
|
**Permissions**:
|
||||||
|
- Full file operations
|
||||||
|
- Create/modify any files
|
||||||
|
|
||||||
|
**Execute**:
|
||||||
|
1. Read CONTEXT files
|
||||||
|
2. Perform requested file operations
|
||||||
|
3. Create/modify files as specified
|
||||||
|
4. Validate changes
|
||||||
|
5. Report file changes
|
||||||
|
|
||||||
|
## Output Format
|
||||||
|
|
||||||
|
### Standard Analysis Structure
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# Analysis: [TASK Title]
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
[2-3 sentence overview]
|
||||||
|
|
||||||
|
## Key Findings
|
||||||
|
1. [Finding] - path/to/file:123
|
||||||
|
2. [Finding] - path/to/file:456
|
||||||
|
|
||||||
|
## Detailed Analysis
|
||||||
|
[Evidence-based analysis with code quotes]
|
||||||
|
|
||||||
|
## Recommendations
|
||||||
|
1. [Actionable recommendation]
|
||||||
|
2. [Actionable recommendation]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Code References
|
||||||
|
|
||||||
|
Always use format: `path/to/file:line_number`
|
||||||
|
|
||||||
|
Example: "Authentication logic at `src/auth/jwt.ts:45` uses deprecated algorithm"
|
||||||
|
|
||||||
|
## RULES Processing
|
||||||
|
|
||||||
|
- **Parse the RULES field** to identify template content and additional constraints
|
||||||
|
- **Recognize `|` as separator** between template and additional constraints
|
||||||
|
- **ALWAYS apply all template guidelines** provided in the prompt
|
||||||
|
- **ALWAYS apply all additional constraints** specified after `|`
|
||||||
|
- **Treat all rules as mandatory** - both template and constraints must be followed
|
||||||
|
- **Failure to follow any rule** constitutes task failure
|
||||||
|
|
||||||
|
## Error Handling
|
||||||
|
|
||||||
|
**File Not Found**:
|
||||||
|
- Report missing files
|
||||||
|
- Continue with available files
|
||||||
|
- Note in output
|
||||||
|
|
||||||
|
**Invalid CONTEXT Pattern**:
|
||||||
|
- Report invalid pattern
|
||||||
|
- Request correction
|
||||||
|
- Do not guess
|
||||||
|
|
||||||
|
## Quality Standards
|
||||||
|
|
||||||
|
### Thoroughness
|
||||||
|
- Analyze ALL files in CONTEXT
|
||||||
|
- Check cross-file patterns
|
||||||
|
- Identify edge cases
|
||||||
|
- Quantify when possible
|
||||||
|
|
||||||
|
### Evidence-Based
|
||||||
|
- Quote relevant code
|
||||||
|
- Provide file:line references
|
||||||
|
- Link related patterns
|
||||||
|
|
||||||
|
### Actionable
|
||||||
|
- Clear recommendations
|
||||||
|
- Prioritized by impact
|
||||||
|
- Specific, not vague
|
||||||
|
|
||||||
|
## Philosophy
|
||||||
|
|
||||||
|
- **Incremental over big bangs** - Suggest small, testable changes
|
||||||
|
- **Learn from existing code** - Reference project patterns
|
||||||
|
- **Pragmatic over dogmatic** - Adapt to project reality
|
||||||
|
- **Clear over clever** - Prefer obvious solutions
|
||||||
|
- **Simple over complex** - Avoid over-engineering
|
||||||
|
|
||||||
50
CHANGELOG.md
50
CHANGELOG.md
@@ -5,6 +5,56 @@ All notable changes to Claude Code Workflow (CCW) will be documented in this fil
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [3.4.1] - 2025-10-04
|
||||||
|
|
||||||
|
### 🎯 Multi-Tool Support for Documentation Updates
|
||||||
|
|
||||||
|
This release adds flexible tool selection for CLAUDE.md documentation generation, allowing users to choose between Gemini, Qwen, or Codex based on their analysis needs.
|
||||||
|
|
||||||
|
#### Added
|
||||||
|
|
||||||
|
**Multi-Tool Support**:
|
||||||
|
- **`/update-memory-full --tool <gemini|qwen|codex>`**: Choose tool for full project documentation update
|
||||||
|
- **`/update-memory-related --tool <gemini|qwen|codex>`**: Choose tool for context-aware documentation update
|
||||||
|
- **Default**: Gemini (documentation generation, pattern recognition)
|
||||||
|
- **Qwen**: Architecture analysis, system design documentation
|
||||||
|
- **Codex**: Implementation validation, code quality analysis
|
||||||
|
|
||||||
|
**Script Enhancement** (`update_module_claude.sh`):
|
||||||
|
- Added third parameter for tool selection: `<module_path> [update_type] [tool]`
|
||||||
|
- Support for three tools with consistent parameter syntax:
|
||||||
|
- `gemini --all-files --yolo -p` (default)
|
||||||
|
- `qwen --all-files --yolo -p` (direct command, no wrapper)
|
||||||
|
- `codex --full-auto exec` (with danger-full-access)
|
||||||
|
- Automatic tool routing via case statement
|
||||||
|
- Improved logging with tool information display
|
||||||
|
|
||||||
|
#### Changed
|
||||||
|
|
||||||
|
**Command Documentation**:
|
||||||
|
- Updated `/update-memory-full.md` with tool selection usage and examples
|
||||||
|
- Updated `/update-memory-related.md` with tool selection usage and examples
|
||||||
|
- Added tool selection strategy and rationale documentation
|
||||||
|
|
||||||
|
#### Technical Details
|
||||||
|
|
||||||
|
**Tool Execution Patterns**:
|
||||||
|
```bash
|
||||||
|
# Gemini (default)
|
||||||
|
gemini --all-files --yolo -p "$prompt"
|
||||||
|
|
||||||
|
# Qwen (architecture analysis)
|
||||||
|
qwen --all-files --yolo -p "$prompt"
|
||||||
|
|
||||||
|
# Codex (implementation validation)
|
||||||
|
codex --full-auto exec "$prompt" --skip-git-repo-check -s danger-full-access
|
||||||
|
```
|
||||||
|
|
||||||
|
**Backward Compatibility**:
|
||||||
|
- ✅ Existing commands without `--tool` parameter default to Gemini
|
||||||
|
- ✅ All three tools support Layer 1-4 template system
|
||||||
|
- ✅ No breaking changes to existing workflows
|
||||||
|
|
||||||
## [3.3.0] - 2025-10-04
|
## [3.3.0] - 2025-10-04
|
||||||
|
|
||||||
### 🚀 CLI Tool Enhancements & Codex Multi-Step Execution
|
### 🚀 CLI Tool Enhancements & Codex Multi-Step Execution
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ function Test-Prerequisites {
|
|||||||
$claudeMd = Join-Path $sourceDir "CLAUDE.md"
|
$claudeMd = Join-Path $sourceDir "CLAUDE.md"
|
||||||
$codexDir = Join-Path $sourceDir ".codex"
|
$codexDir = Join-Path $sourceDir ".codex"
|
||||||
$geminiDir = Join-Path $sourceDir ".gemini"
|
$geminiDir = Join-Path $sourceDir ".gemini"
|
||||||
|
$qwenDir = Join-Path $sourceDir ".qwen"
|
||||||
|
|
||||||
if (-not (Test-Path $claudeDir)) {
|
if (-not (Test-Path $claudeDir)) {
|
||||||
Write-ColorOutput "ERROR: .claude directory not found in $sourceDir" $ColorError
|
Write-ColorOutput "ERROR: .claude directory not found in $sourceDir" $ColorError
|
||||||
@@ -188,6 +189,11 @@ function Test-Prerequisites {
|
|||||||
return $false
|
return $false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (-not (Test-Path $qwenDir)) {
|
||||||
|
Write-ColorOutput "ERROR: .qwen directory not found in $sourceDir" $ColorError
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
|
||||||
Write-ColorOutput "Prerequisites check passed" $ColorSuccess
|
Write-ColorOutput "Prerequisites check passed" $ColorSuccess
|
||||||
return $true
|
return $true
|
||||||
}
|
}
|
||||||
@@ -666,6 +672,7 @@ function Install-Global {
|
|||||||
$globalClaudeMd = Join-Path $globalClaudeDir "CLAUDE.md"
|
$globalClaudeMd = Join-Path $globalClaudeDir "CLAUDE.md"
|
||||||
$globalCodexDir = Join-Path $userProfile ".codex"
|
$globalCodexDir = Join-Path $userProfile ".codex"
|
||||||
$globalGeminiDir = Join-Path $userProfile ".gemini"
|
$globalGeminiDir = Join-Path $userProfile ".gemini"
|
||||||
|
$globalQwenDir = Join-Path $userProfile ".qwen"
|
||||||
|
|
||||||
Write-ColorOutput "Global installation path: $userProfile" $ColorInfo
|
Write-ColorOutput "Global installation path: $userProfile" $ColorInfo
|
||||||
|
|
||||||
@@ -675,11 +682,12 @@ function Install-Global {
|
|||||||
$sourceClaudeMd = Join-Path $sourceDir "CLAUDE.md"
|
$sourceClaudeMd = Join-Path $sourceDir "CLAUDE.md"
|
||||||
$sourceCodexDir = Join-Path $sourceDir ".codex"
|
$sourceCodexDir = Join-Path $sourceDir ".codex"
|
||||||
$sourceGeminiDir = Join-Path $sourceDir ".gemini"
|
$sourceGeminiDir = Join-Path $sourceDir ".gemini"
|
||||||
|
$sourceQwenDir = Join-Path $sourceDir ".qwen"
|
||||||
|
|
||||||
# Create backup folder if needed (default behavior unless NoBackup is specified)
|
# Create backup folder if needed (default behavior unless NoBackup is specified)
|
||||||
$backupFolder = $null
|
$backupFolder = $null
|
||||||
if (-not $NoBackup) {
|
if (-not $NoBackup) {
|
||||||
if ((Test-Path $globalClaudeDir) -or (Test-Path $globalCodexDir) -or (Test-Path $globalGeminiDir)) {
|
if ((Test-Path $globalClaudeDir) -or (Test-Path $globalCodexDir) -or (Test-Path $globalGeminiDir) -or (Test-Path $globalQwenDir)) {
|
||||||
$existingFiles = @()
|
$existingFiles = @()
|
||||||
if (Test-Path $globalClaudeDir) {
|
if (Test-Path $globalClaudeDir) {
|
||||||
$existingFiles += Get-ChildItem $globalClaudeDir -Recurse -File -ErrorAction SilentlyContinue
|
$existingFiles += Get-ChildItem $globalClaudeDir -Recurse -File -ErrorAction SilentlyContinue
|
||||||
@@ -690,6 +698,9 @@ function Install-Global {
|
|||||||
if (Test-Path $globalGeminiDir) {
|
if (Test-Path $globalGeminiDir) {
|
||||||
$existingFiles += Get-ChildItem $globalGeminiDir -Recurse -File -ErrorAction SilentlyContinue
|
$existingFiles += Get-ChildItem $globalGeminiDir -Recurse -File -ErrorAction SilentlyContinue
|
||||||
}
|
}
|
||||||
|
if (Test-Path $globalQwenDir) {
|
||||||
|
$existingFiles += Get-ChildItem $globalQwenDir -Recurse -File -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
if (($existingFiles -and ($existingFiles | Measure-Object).Count -gt 0)) {
|
if (($existingFiles -and ($existingFiles | Measure-Object).Count -gt 0)) {
|
||||||
$backupFolder = Get-BackupDirectory -TargetDirectory $userProfile
|
$backupFolder = Get-BackupDirectory -TargetDirectory $userProfile
|
||||||
Write-ColorOutput "Backup folder created: $backupFolder" $ColorInfo
|
Write-ColorOutput "Backup folder created: $backupFolder" $ColorInfo
|
||||||
@@ -717,6 +728,10 @@ function Install-Global {
|
|||||||
Write-ColorOutput "Merging .gemini directory contents..." $ColorInfo
|
Write-ColorOutput "Merging .gemini directory contents..." $ColorInfo
|
||||||
$geminiMerged = Merge-DirectoryContents -Source $sourceGeminiDir -Destination $globalGeminiDir -Description ".gemini directory contents" -BackupFolder $backupFolder
|
$geminiMerged = Merge-DirectoryContents -Source $sourceGeminiDir -Destination $globalGeminiDir -Description ".gemini directory contents" -BackupFolder $backupFolder
|
||||||
|
|
||||||
|
# Merge .qwen directory contents
|
||||||
|
Write-ColorOutput "Merging .qwen directory contents..." $ColorInfo
|
||||||
|
$qwenMerged = Merge-DirectoryContents -Source $sourceQwenDir -Destination $globalQwenDir -Description ".qwen directory contents" -BackupFolder $backupFolder
|
||||||
|
|
||||||
# Create version.json in global .claude directory
|
# Create version.json in global .claude directory
|
||||||
Write-ColorOutput "Creating version.json..." $ColorInfo
|
Write-ColorOutput "Creating version.json..." $ColorInfo
|
||||||
Create-VersionJson -TargetClaudeDir $globalClaudeDir -InstallationMode "Global"
|
Create-VersionJson -TargetClaudeDir $globalClaudeDir -InstallationMode "Global"
|
||||||
@@ -753,16 +768,18 @@ function Install-Path {
|
|||||||
$sourceClaudeMd = Join-Path $sourceDir "CLAUDE.md"
|
$sourceClaudeMd = Join-Path $sourceDir "CLAUDE.md"
|
||||||
$sourceCodexDir = Join-Path $sourceDir ".codex"
|
$sourceCodexDir = Join-Path $sourceDir ".codex"
|
||||||
$sourceGeminiDir = Join-Path $sourceDir ".gemini"
|
$sourceGeminiDir = Join-Path $sourceDir ".gemini"
|
||||||
|
$sourceQwenDir = Join-Path $sourceDir ".qwen"
|
||||||
|
|
||||||
# Local paths - for agents, commands, output-styles, .codex, .gemini
|
# Local paths - for agents, commands, output-styles, .codex, .gemini, .qwen
|
||||||
$localClaudeDir = Join-Path $TargetDirectory ".claude"
|
$localClaudeDir = Join-Path $TargetDirectory ".claude"
|
||||||
$localCodexDir = Join-Path $TargetDirectory ".codex"
|
$localCodexDir = Join-Path $TargetDirectory ".codex"
|
||||||
$localGeminiDir = Join-Path $TargetDirectory ".gemini"
|
$localGeminiDir = Join-Path $TargetDirectory ".gemini"
|
||||||
|
$localQwenDir = Join-Path $TargetDirectory ".qwen"
|
||||||
|
|
||||||
# Create backup folder if needed
|
# Create backup folder if needed
|
||||||
$backupFolder = $null
|
$backupFolder = $null
|
||||||
if (-not $NoBackup) {
|
if (-not $NoBackup) {
|
||||||
if ((Test-Path $localClaudeDir) -or (Test-Path $localCodexDir) -or (Test-Path $localGeminiDir) -or (Test-Path $globalClaudeDir)) {
|
if ((Test-Path $localClaudeDir) -or (Test-Path $localCodexDir) -or (Test-Path $localGeminiDir) -or (Test-Path $localQwenDir) -or (Test-Path $globalClaudeDir)) {
|
||||||
$backupFolder = Get-BackupDirectory -TargetDirectory $TargetDirectory
|
$backupFolder = Get-BackupDirectory -TargetDirectory $TargetDirectory
|
||||||
Write-ColorOutput "Backup folder created: $backupFolder" $ColorInfo
|
Write-ColorOutput "Backup folder created: $backupFolder" $ColorInfo
|
||||||
}
|
}
|
||||||
@@ -858,6 +875,10 @@ function Install-Path {
|
|||||||
Write-ColorOutput "Merging .gemini directory contents to local location..." $ColorInfo
|
Write-ColorOutput "Merging .gemini directory contents to local location..." $ColorInfo
|
||||||
$geminiMerged = Merge-DirectoryContents -Source $sourceGeminiDir -Destination $localGeminiDir -Description ".gemini directory contents" -BackupFolder $backupFolder
|
$geminiMerged = Merge-DirectoryContents -Source $sourceGeminiDir -Destination $localGeminiDir -Description ".gemini directory contents" -BackupFolder $backupFolder
|
||||||
|
|
||||||
|
# Merge .qwen directory contents to local location
|
||||||
|
Write-ColorOutput "Merging .qwen directory contents to local location..." $ColorInfo
|
||||||
|
$qwenMerged = Merge-DirectoryContents -Source $sourceQwenDir -Destination $localQwenDir -Description ".qwen directory contents" -BackupFolder $backupFolder
|
||||||
|
|
||||||
# Create version.json in local .claude directory
|
# Create version.json in local .claude directory
|
||||||
Write-ColorOutput "Creating version.json in local directory..." $ColorInfo
|
Write-ColorOutput "Creating version.json in local directory..." $ColorInfo
|
||||||
Create-VersionJson -TargetClaudeDir $localClaudeDir -InstallationMode "Path"
|
Create-VersionJson -TargetClaudeDir $localClaudeDir -InstallationMode "Path"
|
||||||
@@ -971,11 +992,11 @@ function Show-Summary {
|
|||||||
if ($Mode -eq "Path") {
|
if ($Mode -eq "Path") {
|
||||||
Write-Host " Local Path: $Path"
|
Write-Host " Local Path: $Path"
|
||||||
Write-Host " Global Path: $([Environment]::GetFolderPath('UserProfile'))"
|
Write-Host " Global Path: $([Environment]::GetFolderPath('UserProfile'))"
|
||||||
Write-Host " Local Components: agents, commands, output-styles, .codex, .gemini"
|
Write-Host " Local Components: agents, commands, output-styles, .codex, .gemini, .qwen"
|
||||||
Write-Host " Global Components: workflows, scripts, python_script, etc."
|
Write-Host " Global Components: workflows, scripts, python_script, etc."
|
||||||
} else {
|
} else {
|
||||||
Write-Host " Path: $Path"
|
Write-Host " Path: $Path"
|
||||||
Write-Host " Global Components: .claude, .codex, .gemini"
|
Write-Host " Global Components: .claude, .codex, .gemini, .qwen"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($NoBackup) {
|
if ($NoBackup) {
|
||||||
@@ -991,10 +1012,11 @@ function Show-Summary {
|
|||||||
Write-Host "1. Review CLAUDE.md - Customize guidelines for your project"
|
Write-Host "1. Review CLAUDE.md - Customize guidelines for your project"
|
||||||
Write-Host "2. Review .codex/Agent.md - Codex agent execution protocol"
|
Write-Host "2. Review .codex/Agent.md - Codex agent execution protocol"
|
||||||
Write-Host "3. Review .gemini/CLAUDE.md - Gemini agent execution protocol"
|
Write-Host "3. Review .gemini/CLAUDE.md - Gemini agent execution protocol"
|
||||||
Write-Host "4. Configure settings - Edit .claude/settings.local.json as needed"
|
Write-Host "4. Review .qwen/QWEN.md - Qwen agent execution protocol"
|
||||||
Write-Host "5. Start using Claude Code with Agent workflow coordination!"
|
Write-Host "5. Configure settings - Edit .claude/settings.local.json as needed"
|
||||||
Write-Host "6. Use /workflow commands for task execution"
|
Write-Host "6. Start using Claude Code with Agent workflow coordination!"
|
||||||
Write-Host "7. Use /update-memory commands for memory system management"
|
Write-Host "7. Use /workflow commands for task execution"
|
||||||
|
Write-Host "8. Use /update-memory commands for memory system management"
|
||||||
|
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
Write-ColorOutput "Documentation: https://github.com/catlog22/Claude-CCW" $ColorInfo
|
Write-ColorOutput "Documentation: https://github.com/catlog22/Claude-CCW" $ColorInfo
|
||||||
|
|||||||
Reference in New Issue
Block a user