mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-09 02:24:11 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f549dfcc9b | ||
|
|
c5c36a23ea | ||
|
|
a03415bfeb | ||
|
|
06772c675e | ||
|
|
8c062f3611 | ||
|
|
2efd45b0ed | ||
|
|
ae77e698db | ||
|
|
b945e2de55 |
@@ -228,7 +228,7 @@ Generate individual `.task/IMPL-*.json` files with:
|
|||||||
"modification_points": ["Apply requirements"],
|
"modification_points": ["Apply requirements"],
|
||||||
"logic_flow": ["Load spec", "Analyze", "Implement", "Validate"]
|
"logic_flow": ["Load spec", "Analyze", "Implement", "Validate"]
|
||||||
},
|
},
|
||||||
"target_files": ["file:function:lines"]
|
"target_files": ["file:function:lines", "path/to/NewFile.ts"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
261
.claude/commands/version.md
Normal file
261
.claude/commands/version.md
Normal file
@@ -0,0 +1,261 @@
|
|||||||
|
---
|
||||||
|
name: version
|
||||||
|
description: Display version information and check for updates
|
||||||
|
usage: /version
|
||||||
|
examples:
|
||||||
|
- /version
|
||||||
|
allowed-tools: Bash(*)
|
||||||
|
---
|
||||||
|
|
||||||
|
# Version Command (/version)
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
Display local and global installation versions, check for the latest updates from GitHub, and provide upgrade recommendations.
|
||||||
|
|
||||||
|
## Execution Flow
|
||||||
|
1. **Local Version Check**: Read version information from `./.claude/version.json` if it exists.
|
||||||
|
2. **Global Version Check**: Read version information from `~/.claude/version.json` if it exists.
|
||||||
|
3. **Fetch Remote Versions**: Use GitHub API to get the latest stable release tag and the latest commit hash from the main branch.
|
||||||
|
4. **Compare & Suggest**: Compare installed versions with the latest remote versions and provide upgrade suggestions if applicable.
|
||||||
|
|
||||||
|
## Step 1: Check Local Version
|
||||||
|
|
||||||
|
### Check if local version.json exists
|
||||||
|
```bash
|
||||||
|
bash(test -f ./.claude/version.json && echo "found" || echo "not_found")
|
||||||
|
```
|
||||||
|
|
||||||
|
### Read local version (if exists)
|
||||||
|
```bash
|
||||||
|
bash(cat ./.claude/version.json)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extract version with jq (preferred)
|
||||||
|
```bash
|
||||||
|
bash(cat ./.claude/version.json | grep -o '"version": *"[^"]*"' | cut -d'"' -f4)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extract installation date
|
||||||
|
```bash
|
||||||
|
bash(cat ./.claude/version.json | grep -o '"installation_date_utc": *"[^"]*"' | cut -d'"' -f4)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Output Format**:
|
||||||
|
```
|
||||||
|
Local Version: 3.2.1
|
||||||
|
Installed: 2025-10-03T12:00:00Z
|
||||||
|
```
|
||||||
|
|
||||||
|
## Step 2: Check Global Version
|
||||||
|
|
||||||
|
### Check if global version.json exists
|
||||||
|
```bash
|
||||||
|
bash(test -f ~/.claude/version.json && echo "found" || echo "not_found")
|
||||||
|
```
|
||||||
|
|
||||||
|
### Read global version
|
||||||
|
```bash
|
||||||
|
bash(cat ~/.claude/version.json)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extract version
|
||||||
|
```bash
|
||||||
|
bash(cat ~/.claude/version.json | grep -o '"version": *"[^"]*"' | cut -d'"' -f4)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extract installation date
|
||||||
|
```bash
|
||||||
|
bash(cat ~/.claude/version.json | grep -o '"installation_date_utc": *"[^"]*"' | cut -d'"' -f4)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Output Format**:
|
||||||
|
```
|
||||||
|
Global Version: 3.2.1
|
||||||
|
Installed: 2025-10-03T12:00:00Z
|
||||||
|
```
|
||||||
|
|
||||||
|
## Step 3: Fetch Latest Stable Release
|
||||||
|
|
||||||
|
### Call GitHub API for latest release (with timeout)
|
||||||
|
```bash
|
||||||
|
bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest" 2>/dev/null, timeout: 30000)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extract tag name (version)
|
||||||
|
```bash
|
||||||
|
bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest" 2>/dev/null | grep -o '"tag_name": *"[^"]*"' | head -1 | cut -d'"' -f4, timeout: 30000)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extract release name
|
||||||
|
```bash
|
||||||
|
bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest" 2>/dev/null | grep -o '"name": *"[^"]*"' | head -1 | cut -d'"' -f4, timeout: 30000)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extract published date
|
||||||
|
```bash
|
||||||
|
bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest" 2>/dev/null | grep -o '"published_at": *"[^"]*"' | cut -d'"' -f4, timeout: 30000)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Output Format**:
|
||||||
|
```
|
||||||
|
Latest Stable: v3.2.2
|
||||||
|
Release: v3.2.2: Independent Test-Gen Workflow with Cross-Session Context
|
||||||
|
Published: 2025-10-03T04:10:08Z
|
||||||
|
```
|
||||||
|
|
||||||
|
## Step 4: Fetch Latest Main Branch
|
||||||
|
|
||||||
|
### Call GitHub API for latest commit on main (with timeout)
|
||||||
|
```bash
|
||||||
|
bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main" 2>/dev/null, timeout: 30000)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extract commit SHA (short)
|
||||||
|
```bash
|
||||||
|
bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main" 2>/dev/null | grep -o '"sha": *"[^"]*"' | head -1 | cut -d'"' -f4 | cut -c1-7, timeout: 30000)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extract commit message (first line only)
|
||||||
|
```bash
|
||||||
|
bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main" 2>/dev/null | grep '"message":' | cut -d'"' -f4 | cut -d'\' -f1, timeout: 30000)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extract commit date
|
||||||
|
```bash
|
||||||
|
bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main" 2>/dev/null | grep -o '"date": *"[^"]*"' | head -1 | cut -d'"' -f4, timeout: 30000)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Output Format**:
|
||||||
|
```
|
||||||
|
Latest Dev: a03415b
|
||||||
|
Message: feat: Add version tracking and upgrade check system
|
||||||
|
Date: 2025-10-03T04:46:44Z
|
||||||
|
```
|
||||||
|
|
||||||
|
## Step 5: Compare Versions and Suggest Upgrade
|
||||||
|
|
||||||
|
### Normalize versions (remove 'v' prefix)
|
||||||
|
```bash
|
||||||
|
bash(echo "v3.2.1" | sed 's/^v//')
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compare two versions
|
||||||
|
```bash
|
||||||
|
bash(printf "%s\n%s" "3.2.1" "3.2.2" | sort -V | tail -n 1)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Check if versions are equal
|
||||||
|
```bash
|
||||||
|
# If equal: Up to date
|
||||||
|
# If remote newer: Upgrade available
|
||||||
|
# If local newer: Development version
|
||||||
|
```
|
||||||
|
|
||||||
|
**Output Scenarios**:
|
||||||
|
|
||||||
|
**Scenario 1: Up to date**
|
||||||
|
```
|
||||||
|
✅ You are on the latest stable version (3.2.1)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Scenario 2: Upgrade available**
|
||||||
|
```
|
||||||
|
⬆️ A newer stable version is available: v3.2.2
|
||||||
|
Your version: 3.2.1
|
||||||
|
|
||||||
|
To upgrade:
|
||||||
|
PowerShell: iex (iwr -useb https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.ps1)
|
||||||
|
Bash: bash <(curl -fsSL https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.sh)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Scenario 3: Development version**
|
||||||
|
```
|
||||||
|
✨ You are running a development version (3.3.0-dev)
|
||||||
|
This is newer than the latest stable release (v3.2.2)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Simple Bash Commands
|
||||||
|
|
||||||
|
### Basic Operations
|
||||||
|
```bash
|
||||||
|
# Check local version file
|
||||||
|
bash(test -f ./.claude/version.json && cat ./.claude/version.json)
|
||||||
|
|
||||||
|
# Check global version file
|
||||||
|
bash(test -f ~/.claude/version.json && cat ~/.claude/version.json)
|
||||||
|
|
||||||
|
# Extract version from JSON
|
||||||
|
bash(cat version.json | grep -o '"version": *"[^"]*"' | cut -d'"' -f4)
|
||||||
|
|
||||||
|
# Extract date from JSON
|
||||||
|
bash(cat version.json | grep -o '"installation_date_utc": *"[^"]*"' | cut -d'"' -f4)
|
||||||
|
|
||||||
|
# Fetch latest release (with timeout)
|
||||||
|
bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest" 2>/dev/null, timeout: 30000)
|
||||||
|
|
||||||
|
# Extract tag name
|
||||||
|
bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest" 2>/dev/null | grep -o '"tag_name": *"[^"]*"' | cut -d'"' -f4, timeout: 30000)
|
||||||
|
|
||||||
|
# Extract release name
|
||||||
|
bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest" 2>/dev/null | grep -o '"name": *"[^"]*"' | head -1 | cut -d'"' -f4, timeout: 30000)
|
||||||
|
|
||||||
|
# Fetch latest commit (with timeout)
|
||||||
|
bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main" 2>/dev/null, timeout: 30000)
|
||||||
|
|
||||||
|
# Extract commit SHA
|
||||||
|
bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main" 2>/dev/null | grep -o '"sha": *"[^"]*"' | head -1 | cut -d'"' -f4 | cut -c1-7, timeout: 30000)
|
||||||
|
|
||||||
|
# Extract commit message (first line)
|
||||||
|
bash(curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main" 2>/dev/null | grep '"message":' | cut -d'"' -f4 | cut -d'\' -f1, timeout: 30000)
|
||||||
|
|
||||||
|
# Compare versions
|
||||||
|
bash(printf "%s\n%s" "3.2.1" "3.2.2" | sort -V | tail -n 1)
|
||||||
|
|
||||||
|
# Remove 'v' prefix
|
||||||
|
bash(echo "v3.2.1" | sed 's/^v//')
|
||||||
|
```
|
||||||
|
|
||||||
|
## Error Handling
|
||||||
|
|
||||||
|
### No installation found
|
||||||
|
```
|
||||||
|
WARNING: Claude Code Workflow not installed
|
||||||
|
Install using:
|
||||||
|
PowerShell: iex (iwr -useb https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.ps1)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Network error
|
||||||
|
```
|
||||||
|
ERROR: Could not fetch latest version from GitHub
|
||||||
|
Check your network connection
|
||||||
|
```
|
||||||
|
|
||||||
|
### Invalid version.json
|
||||||
|
```
|
||||||
|
ERROR: version.json is invalid or corrupted
|
||||||
|
```
|
||||||
|
|
||||||
|
## Design Notes
|
||||||
|
|
||||||
|
- Uses simple, direct bash commands instead of complex functions
|
||||||
|
- Each step is independent and can be executed separately
|
||||||
|
- Fallback to grep/sed for JSON parsing (no jq dependency required)
|
||||||
|
- Network calls use curl with error suppression and 30-second timeout
|
||||||
|
- Version comparison uses `sort -V` for accurate semantic versioning
|
||||||
|
- Use `/commits/main` API instead of `/branches/main` for more reliable commit info
|
||||||
|
- Extract first line of commit message using `cut -d'\' -f1` to handle JSON escape sequences
|
||||||
|
|
||||||
|
## API Endpoints
|
||||||
|
|
||||||
|
### GitHub API Used
|
||||||
|
- **Latest Release**: `https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest`
|
||||||
|
- Fields: `tag_name`, `name`, `published_at`
|
||||||
|
- **Latest Commit**: `https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main`
|
||||||
|
- Fields: `sha`, `commit.message`, `commit.author.date`
|
||||||
|
|
||||||
|
### Timeout Configuration
|
||||||
|
All network calls should use `timeout: 30000` (30 seconds) to handle slow connections.
|
||||||
|
|
||||||
|
## Related Commands
|
||||||
|
- `/cli:cli-init` - Initialize CLI configurations
|
||||||
|
- `/workflow:session:list` - List workflow sessions
|
||||||
@@ -356,8 +356,8 @@ Task(subagent_type="{meta.agent}",
|
|||||||
|
|
||||||
**WORKFLOW COMPLETION CHECK**:
|
**WORKFLOW COMPLETION CHECK**:
|
||||||
After updating task status, check if workflow is complete:
|
After updating task status, check if workflow is complete:
|
||||||
total_tasks=\$(ls .workflow/*/\.task/*.json | wc -l)
|
total_tasks=\$(find .workflow/*/\.task/ -name "*.json" -type f 2>/dev/null | wc -l)
|
||||||
completed_tasks=\$(ls .workflow/*/\.summaries/*.md 2>/dev/null | wc -l)
|
completed_tasks=\$(find .workflow/*/\.summaries/ -name "*.md" -type f 2>/dev/null | wc -l)
|
||||||
if [ \$total_tasks -eq \$completed_tasks ]; then
|
if [ \$total_tasks -eq \$completed_tasks ]; then
|
||||||
SlashCommand(command=\"/workflow:session:complete\")
|
SlashCommand(command=\"/workflow:session:complete\")
|
||||||
fi"),
|
fi"),
|
||||||
@@ -433,7 +433,7 @@ Task(subagent_type="{meta.agent}",
|
|||||||
"task_description": "Implement following consolidated synthesis specification...",
|
"task_description": "Implement following consolidated synthesis specification...",
|
||||||
"modification_points": ["Apply synthesis specification requirements..."]
|
"modification_points": ["Apply synthesis specification requirements..."]
|
||||||
},
|
},
|
||||||
"target_files": ["file:function:lines"]
|
"target_files": ["file:function:lines", "path/to/NewFile.ts"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ if [ ! -d ".workflow/${sessionId}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for completed tasks
|
# Check for completed tasks
|
||||||
if [ ! -d ".workflow/${sessionId}/.summaries" ] || [ -z "$(ls .workflow/${sessionId}/.summaries/IMPL-*.md 2>/dev/null)" ]; then
|
if [ ! -d ".workflow/${sessionId}/.summaries" ] || [ -z "$(find .workflow/${sessionId}/.summaries/ -name "IMPL-*.md" -type f 2>/dev/null)" ]; then
|
||||||
echo "❌ No completed implementation found. Complete implementation first"
|
echo "❌ No completed implementation found. Complete implementation first"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ mv temp.json .workflow/WFS-session/workflow-session.json
|
|||||||
|
|
||||||
### Step 5: Count Final Statistics
|
### Step 5: Count Final Statistics
|
||||||
```bash
|
```bash
|
||||||
ls .workflow/WFS-session/.task/*.json 2>/dev/null | wc -l
|
find .workflow/WFS-session/.task/ -name "*.json" -type f 2>/dev/null | wc -l
|
||||||
ls .workflow/WFS-session/.summaries/*.md 2>/dev/null | wc -l
|
find .workflow/WFS-session/.summaries/ -name "*.md" -type f 2>/dev/null | wc -l
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 6: Remove Active Marker
|
### Step 6: Remove Active Marker
|
||||||
@@ -56,12 +56,12 @@ rm .workflow/.active-WFS-session-name
|
|||||||
## Simple Bash Commands
|
## Simple Bash Commands
|
||||||
|
|
||||||
### Basic Operations
|
### Basic Operations
|
||||||
- **Find active session**: `ls .workflow/.active-*`
|
- **Find active session**: `find .workflow/ -name ".active-*" -type f`
|
||||||
- **Get session name**: `basename marker | sed 's/^\.active-//'`
|
- **Get session name**: `basename marker | sed 's/^\.active-//'`
|
||||||
- **Update status**: `jq '.status = "completed"' session.json > temp.json`
|
- **Update status**: `jq '.status = "completed"' session.json > temp.json`
|
||||||
- **Add timestamp**: `jq '.completed_at = "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"'`
|
- **Add timestamp**: `jq '.completed_at = "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"'`
|
||||||
- **Count tasks**: `ls .task/*.json | wc -l`
|
- **Count tasks**: `find .task/ -name "*.json" -type f | wc -l`
|
||||||
- **Count completed**: `ls .summaries/*.md | wc -l`
|
- **Count completed**: `find .summaries/ -name "*.md" -type f 2>/dev/null | wc -l`
|
||||||
- **Remove marker**: `rm .workflow/.active-session`
|
- **Remove marker**: `rm .workflow/.active-session`
|
||||||
|
|
||||||
### Completion Result
|
### Completion Result
|
||||||
@@ -92,11 +92,11 @@ Session Completion Summary:
|
|||||||
### Error Handling
|
### Error Handling
|
||||||
```bash
|
```bash
|
||||||
# No active session
|
# No active session
|
||||||
ls .workflow/.active-* 2>/dev/null || echo "No active session found"
|
find .workflow/ -name ".active-*" -type f 2>/dev/null || echo "No active session found"
|
||||||
|
|
||||||
# Incomplete tasks
|
# Incomplete tasks
|
||||||
task_count=$(ls .task/*.json | wc -l)
|
task_count=$(find .task/ -name "*.json" -type f | wc -l)
|
||||||
summary_count=$(ls .summaries/*.md 2>/dev/null | wc -l)
|
summary_count=$(find .summaries/ -name "*.md" -type f 2>/dev/null | wc -l)
|
||||||
test $task_count -eq $summary_count || echo "Warning: Not all tasks completed"
|
test $task_count -eq $summary_count || echo "Warning: Not all tasks completed"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ jq -r '.session_id, .status, .project' .workflow/WFS-session/workflow-session.js
|
|||||||
|
|
||||||
### Step 4: Count Task Progress
|
### Step 4: Count Task Progress
|
||||||
```bash
|
```bash
|
||||||
ls .workflow/WFS-session/.task/*.json 2>/dev/null | wc -l
|
find .workflow/WFS-session/.task/ -name "*.json" -type f 2>/dev/null | wc -l
|
||||||
ls .workflow/WFS-session/.summaries/*.md 2>/dev/null | wc -l
|
find .workflow/WFS-session/.summaries/ -name "*.md" -type f 2>/dev/null | wc -l
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 5: Get Creation Time
|
### Step 5: Get Creation Time
|
||||||
@@ -47,11 +47,11 @@ jq -r '.created_at // "unknown"' .workflow/WFS-session/workflow-session.json
|
|||||||
## Simple Bash Commands
|
## Simple Bash Commands
|
||||||
|
|
||||||
### Basic Operations
|
### Basic Operations
|
||||||
- **List sessions**: `ls .workflow/WFS-*`
|
- **List sessions**: `find .workflow/ -maxdepth 1 -type d -name "WFS-*"`
|
||||||
- **Find active**: `ls .workflow/.active-*`
|
- **Find active**: `find .workflow/ -name ".active-*" -type f`
|
||||||
- **Read session data**: `jq -r '.session_id, .status' session.json`
|
- **Read session data**: `jq -r '.session_id, .status' session.json`
|
||||||
- **Count tasks**: `ls .task/*.json | wc -l`
|
- **Count tasks**: `find .task/ -name "*.json" -type f | wc -l`
|
||||||
- **Count completed**: `ls .summaries/*.md | wc -l`
|
- **Count completed**: `find .summaries/ -name "*.md" -type f 2>/dev/null | wc -l`
|
||||||
- **Get timestamp**: `jq -r '.created_at' session.json`
|
- **Get timestamp**: `jq -r '.created_at' session.json`
|
||||||
|
|
||||||
## Simple Output Format
|
## Simple Output Format
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ Generates on-demand views from JSON task data. No synchronization needed - all v
|
|||||||
|
|
||||||
### Step 1: Find Active Session
|
### Step 1: Find Active Session
|
||||||
```bash
|
```bash
|
||||||
ls .workflow/.active-* 2>/dev/null | head -1
|
find .workflow/ -name ".active-*" -type f 2>/dev/null | head -1
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 2: Load Session Data
|
### Step 2: Load Session Data
|
||||||
@@ -35,7 +35,7 @@ cat .workflow/WFS-session/workflow-session.json
|
|||||||
|
|
||||||
### Step 3: Scan Task Files
|
### Step 3: Scan Task Files
|
||||||
```bash
|
```bash
|
||||||
ls .workflow/WFS-session/.task/*.json 2>/dev/null
|
find .workflow/WFS-session/.task/ -name "*.json" -type f 2>/dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 4: Generate Task Status
|
### Step 4: Generate Task Status
|
||||||
@@ -45,8 +45,8 @@ cat .workflow/WFS-session/.task/impl-1.json | jq -r '.status'
|
|||||||
|
|
||||||
### Step 5: Count Task Progress
|
### Step 5: Count Task Progress
|
||||||
```bash
|
```bash
|
||||||
ls .workflow/WFS-session/.task/*.json | wc -l
|
find .workflow/WFS-session/.task/ -name "*.json" -type f | wc -l
|
||||||
ls .workflow/WFS-session/.summaries/*.md 2>/dev/null | wc -l
|
find .workflow/WFS-session/.summaries/ -name "*.md" -type f 2>/dev/null | wc -l
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 6: Display Overview
|
### Step 6: Display Overview
|
||||||
@@ -66,11 +66,11 @@ ls .workflow/WFS-session/.summaries/*.md 2>/dev/null | wc -l
|
|||||||
## Simple Bash Commands
|
## Simple Bash Commands
|
||||||
|
|
||||||
### Basic Operations
|
### Basic Operations
|
||||||
- **Find active session**: `ls .workflow/.active-*`
|
- **Find active session**: `find .workflow/ -name ".active-*" -type f`
|
||||||
- **Read session info**: `cat .workflow/session/workflow-session.json`
|
- **Read session info**: `cat .workflow/session/workflow-session.json`
|
||||||
- **List tasks**: `ls .workflow/session/.task/*.json`
|
- **List tasks**: `find .workflow/session/.task/ -name "*.json" -type f`
|
||||||
- **Check task status**: `cat task.json | jq -r '.status'`
|
- **Check task status**: `cat task.json | jq -r '.status'`
|
||||||
- **Count completed**: `ls .summaries/*.md | wc -l`
|
- **Count completed**: `find .summaries/ -name "*.md" -type f | wc -l`
|
||||||
|
|
||||||
### Task Status Check
|
### Task Status Check
|
||||||
- **pending**: Not started yet
|
- **pending**: Not started yet
|
||||||
@@ -87,8 +87,8 @@ test -f .workflow/.active-* && echo "Session active"
|
|||||||
for f in .workflow/session/.task/*.json; do jq empty "$f" && echo "Valid: $f"; done
|
for f in .workflow/session/.task/*.json; do jq empty "$f" && echo "Valid: $f"; done
|
||||||
|
|
||||||
# Check summaries match
|
# Check summaries match
|
||||||
ls .task/*.json | wc -l
|
find .task/ -name "*.json" -type f | wc -l
|
||||||
ls .summaries/*.md | wc -l
|
find .summaries/ -name "*.md" -type f 2>/dev/null | wc -l
|
||||||
```
|
```
|
||||||
|
|
||||||
## Simple Output Format
|
## Simple Output Format
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
name: test-gen
|
name: test-gen
|
||||||
description: Orchestrate test-fix workflow by analyzing implementation and generating TEST-FIX tasks
|
description: Create independent test-fix workflow session by analyzing completed implementation
|
||||||
usage: /workflow:test-gen [session-id]
|
usage: /workflow:test-gen <source-session-id>
|
||||||
argument-hint: "[session-id]"
|
argument-hint: "<source-session-id>"
|
||||||
examples:
|
examples:
|
||||||
- /workflow:test-gen
|
|
||||||
- /workflow:test-gen WFS-user-auth
|
- /workflow:test-gen WFS-user-auth
|
||||||
|
- /workflow:test-gen WFS-api-refactor
|
||||||
allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -13,134 +13,177 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
|||||||
|
|
||||||
## Coordinator Role
|
## Coordinator Role
|
||||||
|
|
||||||
**This command is a pure orchestrator**: Analyze completed implementation session, generate test-fix workflow through standardized tool commands, and trigger automated test validation.
|
**This command is a pure orchestrator**: Creates an independent test-fix workflow session for validating a completed implementation. It reuses the standard planning toolchain with automatic cross-session context gathering.
|
||||||
|
|
||||||
|
**Core Principles**:
|
||||||
|
- **Session Isolation**: Creates new `WFS-test-[source]` session to keep verification separate from implementation
|
||||||
|
- **Context-First**: Prioritizes gathering code changes and summaries from source session
|
||||||
|
- **Format Reuse**: Creates standard `IMPL-*.json` task, using `meta.type: "test-fix"` for agent assignment
|
||||||
|
- **Parameter Simplification**: Tools auto-detect test session type via metadata, no manual cross-session parameters needed
|
||||||
|
|
||||||
**Execution Flow**:
|
**Execution Flow**:
|
||||||
1. Initialize TodoWrite → Execute Phase 1 → Parse output → Update TodoWrite
|
1. Initialize TodoWrite → Create test session → Parse session ID
|
||||||
2. Execute Phase 2 with Phase 1 data → Parse output → Update TodoWrite
|
2. Gather cross-session context (automatic) → Parse context path
|
||||||
3. Execute Phase 3 with Phase 2 data → Parse output → Update TodoWrite
|
3. Analyze implementation with concept-enhanced → Parse ANALYSIS_RESULTS.md
|
||||||
4. Execute Phase 4 with Phase 3 validation → Update TodoWrite → Return summary
|
4. Generate test task from analysis → Return summary
|
||||||
|
|
||||||
## Core Rules
|
## Core Rules
|
||||||
|
|
||||||
1. **Start Immediately**: First action is TodoWrite initialization, second action is Phase 1 session discovery
|
1. **Start Immediately**: First action is TodoWrite initialization, second action is Phase 1 test session creation
|
||||||
2. **No Preliminary Analysis**: Do not read files or analyze before Phase 1
|
2. **No Preliminary Analysis**: Do not read files or analyze before Phase 1
|
||||||
3. **Parse Every Output**: Extract required data from each phase for next phase
|
3. **Parse Every Output**: Extract required data from each phase for next phase
|
||||||
4. **Sequential Execution**: Each phase depends on previous phase's output
|
4. **Sequential Execution**: Each phase depends on previous phase's output
|
||||||
5. **Complete All Phases**: Do not return to user until Phase 4 completes
|
5. **Complete All Phases**: Do not return to user until Phase 4 completes (execution triggered separately)
|
||||||
6. **Track Progress**: Update TodoWrite after every phase completion
|
6. **Track Progress**: Update TodoWrite after every phase completion
|
||||||
7. **Use Standard Tools**: Follow plan.md pattern using context-gather, concept-enhanced, task-generate
|
7. **Automatic Detection**: context-gather auto-detects test session and gathers source session context
|
||||||
|
|
||||||
## 4-Phase Execution
|
## 4-Phase Execution
|
||||||
|
|
||||||
### Phase 1: Session Discovery & Context Gathering
|
### Phase 1: Create Test Session
|
||||||
**Command**: `SlashCommand(command="/workflow:tools:context-gather --session [sessionId] \"TEST-FIX: Validate implementation for [sessionId]\"")`
|
**Command**: `SlashCommand(command="/workflow:session:start --new \"Test validation for [sourceSessionId]\"")`
|
||||||
|
|
||||||
**Session ID Resolution**:
|
**Input**: `sourceSessionId` from user argument (e.g., `WFS-user-auth`)
|
||||||
- If argument provided → Use directly as `sessionId`
|
|
||||||
- If no argument → Auto-detect from `.workflow/.active-*` marker
|
|
||||||
- Format: `WFS-[session-name]`
|
|
||||||
|
|
||||||
**Task Description Structure**:
|
**Expected Behavior**:
|
||||||
```
|
- Creates new session with pattern `WFS-test-[source-slug]` (e.g., `WFS-test-user-auth`)
|
||||||
GOAL: Execute and validate all tests for completed implementation
|
- Writes metadata to `workflow-session.json`:
|
||||||
SCOPE: Test execution, failure diagnosis, code fixing
|
- `workflow_type: "test_session"`
|
||||||
CONTEXT: Implementation session [sessionId] with completed IMPL tasks
|
- `source_session_id: "[sourceSessionId]"`
|
||||||
```
|
- Returns new session ID for subsequent phases
|
||||||
|
|
||||||
**Parse Output**:
|
**Parse Output**:
|
||||||
- Extract: context package path (store as `contextPath`)
|
- Extract: new test session ID (store as `testSessionId`)
|
||||||
- Typical pattern: `.workflow/[sessionId]/.process/context-package-test.json`
|
- Pattern: `WFS-test-[slug]`
|
||||||
|
|
||||||
**Validation**:
|
**Validation**:
|
||||||
- Session directory `.workflow/[sessionId]/` exists
|
- Source session `.workflow/[sourceSessionId]/` exists
|
||||||
- Session has completed IMPL tasks (check .summaries/IMPL-*-summary.md)
|
- Source session has completed IMPL tasks (`.summaries/IMPL-*-summary.md`)
|
||||||
- Context package created successfully
|
- New test session directory created
|
||||||
|
- Metadata includes `workflow_type` and `source_session_id`
|
||||||
|
|
||||||
**TodoWrite**: Mark phase 1 completed, phase 2 in_progress
|
**TodoWrite**: Mark phase 1 completed, phase 2 in_progress
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Phase 2: Implementation Analysis
|
### Phase 2: Gather Cross-Session Context
|
||||||
**Command**: `SlashCommand(command="/workflow:tools:concept-enhanced --session [sessionId] --context [contextPath]")`
|
**Command**: `SlashCommand(command="/workflow:tools:context-gather --session [testSessionId]")`
|
||||||
|
|
||||||
**Input**: `sessionId` from Phase 1, `contextPath` from Phase 1
|
**Input**: `testSessionId` from Phase 1 (e.g., `WFS-test-user-auth`)
|
||||||
|
|
||||||
**Expected Analysis**:
|
**Automatic Detection**:
|
||||||
- Review completed implementation summaries
|
- context-gather reads `.workflow/[testSessionId]/workflow-session.json`
|
||||||
- Identify test files and coverage gaps
|
- Detects `workflow_type: "test_session"`
|
||||||
- Assess test execution strategy
|
- Automatically uses `source_session_id` to gather source session context
|
||||||
- Determine failure diagnosis approach
|
- No need for manual `--source-session` parameter
|
||||||
|
|
||||||
|
**Cross-Session Context Collection** (Automatic):
|
||||||
|
- Implementation summaries: `.workflow/[sourceSessionId]/.summaries/IMPL-*-summary.md`
|
||||||
|
- Code changes: `git log --since=[source_session_created_at]` for changed files
|
||||||
|
- Original plan: `.workflow/[sourceSessionId]/IMPL_PLAN.md`
|
||||||
|
- Test files: Discovered via MCP code-index tools
|
||||||
|
|
||||||
**Parse Output**:
|
**Parse Output**:
|
||||||
- Verify `.workflow/[sessionId]/.process/ANALYSIS_RESULTS.md` created
|
- Extract: context package path (store as `contextPath`)
|
||||||
- Extract test execution recommendations
|
- Pattern: `.workflow/[testSessionId]/.process/context-package.json`
|
||||||
- Identify critical test areas
|
|
||||||
|
|
||||||
**Validation**:
|
**Validation**:
|
||||||
- File `.workflow/[sessionId]/.process/ANALYSIS_RESULTS.md` exists
|
- Context package created in test session directory
|
||||||
- Contains test strategy and execution plan
|
- Contains source session artifacts (summaries, changed files)
|
||||||
- Lists focus test paths and acceptance criteria
|
- Includes test file inventory
|
||||||
|
|
||||||
**TodoWrite**: Mark phase 2 completed, phase 3 in_progress
|
**TodoWrite**: Mark phase 2 completed, phase 3 in_progress
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Phase 3: TEST-FIX Task Generation
|
### Phase 3: Implementation Analysis
|
||||||
**Command**: `SlashCommand(command="/workflow:tools:task-generate --session [sessionId]")`
|
**Command**: `SlashCommand(command="/workflow:tools:concept-enhanced --session [testSessionId] --context [contextPath]")`
|
||||||
|
|
||||||
**Input**: `sessionId` from Phase 1
|
**Input**:
|
||||||
|
- `testSessionId` from Phase 1 (e.g., `WFS-test-user-auth`)
|
||||||
|
- `contextPath` from Phase 2 (e.g., `.workflow/WFS-test-user-auth/.process/context-package.json`)
|
||||||
|
|
||||||
|
**Analysis Focus**:
|
||||||
|
- Review implementation summaries from source session
|
||||||
|
- Identify test files and coverage gaps
|
||||||
|
- Assess test execution strategy (unit, integration, e2e)
|
||||||
|
- Determine failure diagnosis approach
|
||||||
|
- Recommend code quality improvements
|
||||||
|
|
||||||
**Expected Behavior**:
|
**Expected Behavior**:
|
||||||
- Parse ANALYSIS_RESULTS.md for test requirements
|
- Reads context-package.json with cross-session artifacts
|
||||||
- Generate TEST-FIX-001.json with:
|
- Executes parallel analysis (Gemini for test strategy, optional Codex for validation)
|
||||||
- `meta.type: "test-fix"`
|
- Generates comprehensive test execution strategy
|
||||||
- `meta.agent: "@test-fix-agent"`
|
- Identifies code modification targets for test fixes
|
||||||
- `context.requirements`: Test execution requirements
|
- Provides feasibility assessment for test validation
|
||||||
- `context.focus_paths`: Test files and source files
|
|
||||||
- `context.acceptance`: All tests pass criteria
|
|
||||||
- `flow_control.pre_analysis`: Load implementation summaries
|
|
||||||
- `flow_control.implementation_approach`: Test execution strategy
|
|
||||||
|
|
||||||
**Parse Output**:
|
**Parse Output**:
|
||||||
- Verify `.workflow/[sessionId]/.task/TEST-FIX-001.json` exists
|
- Verify `.workflow/[testSessionId]/.process/ANALYSIS_RESULTS.md` created
|
||||||
- Verify `.workflow/[sessionId]/IMPL_PLAN.md` updated
|
- Contains test strategy and execution plan
|
||||||
- Verify `.workflow/[sessionId]/TODO_LIST.md` updated
|
- Lists code modification targets (format: `file:function:lines` or `file`)
|
||||||
|
- Includes risk assessment and optimization recommendations
|
||||||
|
|
||||||
**Validation**:
|
**Validation**:
|
||||||
- Task JSON has correct structure (id, meta.type="test-fix", meta.agent="@test-fix-agent")
|
- File `.workflow/[testSessionId]/.process/ANALYSIS_RESULTS.md` exists
|
||||||
- IMPL_PLAN.md contains test-fix strategy
|
- Contains complete analysis sections:
|
||||||
- TODO_LIST.md shows TEST-FIX-001 task
|
- Current State Analysis (test coverage, existing tests)
|
||||||
|
- Proposed Solution Design (test execution strategy)
|
||||||
|
- Implementation Strategy (code targets, feasibility)
|
||||||
|
- Solution Optimization (performance, quality)
|
||||||
|
- Critical Success Factors (acceptance criteria)
|
||||||
|
|
||||||
**TodoWrite**: Mark phase 3 completed, phase 4 in_progress
|
**TodoWrite**: Mark phase 3 completed, phase 4 in_progress
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Phase 4: Execute Test-Fix Workflow
|
### Phase 4: Generate Test Task
|
||||||
**Command**: `SlashCommand(command="/workflow:execute --session [sessionId]")`
|
**Command**: `SlashCommand(command="/workflow:tools:task-generate --session [testSessionId]")`
|
||||||
|
|
||||||
**Input**: `sessionId` from Phase 1
|
**Input**: `testSessionId` from Phase 1
|
||||||
|
|
||||||
**Expected Behavior**:
|
**Expected Behavior**:
|
||||||
- Workflow executor detects TEST-FIX-001 task
|
- Reads ANALYSIS_RESULTS.md from Phase 3
|
||||||
- Assigns to @test-fix-agent
|
- Extracts test strategy and code modification targets
|
||||||
- Agent executes tests using flow_control.pre_analysis
|
- Generates `IMPL-001.json` (reusing standard format) with:
|
||||||
- If failures: diagnoses and fixes code
|
- `meta.type: "test-fix"` (enables @test-fix-agent assignment)
|
||||||
- Re-runs tests until all pass
|
- `meta.agent: "@test-fix-agent"`
|
||||||
- Generates completion summary
|
- `context.requirements`: Test execution requirements from analysis
|
||||||
|
- `context.focus_paths`: Test files and source files from analysis
|
||||||
|
- `context.acceptance`: All tests pass criteria
|
||||||
|
- `flow_control.pre_analysis`: Load source session summaries
|
||||||
|
- `flow_control.implementation_approach`: Test execution strategy from ANALYSIS_RESULTS.md
|
||||||
|
- `flow_control.target_files`: Code modification targets from analysis
|
||||||
|
|
||||||
|
**Parse Output**:
|
||||||
|
- Verify `.workflow/[testSessionId]/.task/IMPL-001.json` exists
|
||||||
|
- Verify `.workflow/[testSessionId]/IMPL_PLAN.md` created
|
||||||
|
- Verify `.workflow/[testSessionId]/TODO_LIST.md` created
|
||||||
|
|
||||||
**Validation**:
|
**Validation**:
|
||||||
- Workflow execution started successfully
|
- Task JSON has `id: "IMPL-001"` and `meta.type: "test-fix"`
|
||||||
- TEST-FIX-001 task status updated to "active" or "completed"
|
- IMPL_PLAN.md contains test validation strategy from ANALYSIS_RESULTS.md
|
||||||
|
- TODO_LIST.md shows IMPL-001 task
|
||||||
|
- flow_control includes code targets and test strategy
|
||||||
|
- Task is ready for /workflow:execute
|
||||||
|
|
||||||
**TodoWrite**: Mark phase 4 completed
|
**TodoWrite**: Mark phase 4 completed
|
||||||
|
|
||||||
**Return to User**:
|
**Return to User**:
|
||||||
```
|
```
|
||||||
Test-fix workflow initiated for session: [sessionId]
|
Independent test-fix workflow created successfully!
|
||||||
- TEST-FIX-001 created and executing
|
|
||||||
- @test-fix-agent validating implementation
|
Source Session: [sourceSessionId]
|
||||||
- Progress: /workflow:status [sessionId]
|
Test Session: [testSessionId]
|
||||||
|
Task Created: IMPL-001 (test-fix)
|
||||||
|
|
||||||
|
Next Steps:
|
||||||
|
1. Review test plan: .workflow/[testSessionId]/IMPL_PLAN.md
|
||||||
|
2. Execute validation: /workflow:execute
|
||||||
|
3. Monitor progress: /workflow:status
|
||||||
|
|
||||||
|
The @test-fix-agent will:
|
||||||
|
- Execute all tests
|
||||||
|
- Diagnose any failures
|
||||||
|
- Fix code until tests pass
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -150,72 +193,112 @@ Test-fix workflow initiated for session: [sessionId]
|
|||||||
```javascript
|
```javascript
|
||||||
// Initialize (before Phase 1)
|
// Initialize (before Phase 1)
|
||||||
TodoWrite({todos: [
|
TodoWrite({todos: [
|
||||||
{"content": "Execute context gathering for test-fix", "status": "in_progress", "activeForm": "Executing context gathering for test-fix"},
|
{"content": "Create independent test session", "status": "in_progress", "activeForm": "Creating test session"},
|
||||||
{"content": "Execute implementation analysis", "status": "pending", "activeForm": "Executing implementation analysis"},
|
{"content": "Gather cross-session context", "status": "pending", "activeForm": "Gathering cross-session context"},
|
||||||
{"content": "Execute TEST-FIX task generation", "status": "pending", "activeForm": "Executing TEST-FIX task generation"},
|
{"content": "Analyze implementation for test strategy", "status": "pending", "activeForm": "Analyzing implementation"},
|
||||||
{"content": "Execute test-fix workflow", "status": "pending", "activeForm": "Executing test-fix workflow"}
|
{"content": "Generate test validation task", "status": "pending", "activeForm": "Generating test validation task"}
|
||||||
]})
|
]})
|
||||||
|
|
||||||
// After Phase 1
|
// After Phase 1
|
||||||
TodoWrite({todos: [
|
TodoWrite({todos: [
|
||||||
{"content": "Execute context gathering for test-fix", "status": "completed", "activeForm": "Executing context gathering for test-fix"},
|
{"content": "Create independent test session", "status": "completed", "activeForm": "Creating test session"},
|
||||||
{"content": "Execute implementation analysis", "status": "in_progress", "activeForm": "Executing implementation analysis"},
|
{"content": "Gather cross-session context", "status": "in_progress", "activeForm": "Gathering cross-session context"},
|
||||||
{"content": "Execute TEST-FIX task generation", "status": "pending", "activeForm": "Executing TEST-FIX task generation"},
|
{"content": "Analyze implementation for test strategy", "status": "pending", "activeForm": "Analyzing implementation"},
|
||||||
{"content": "Execute test-fix workflow", "status": "pending", "activeForm": "Executing test-fix workflow"}
|
{"content": "Generate test validation task", "status": "pending", "activeForm": "Generating test validation task"}
|
||||||
]})
|
]})
|
||||||
|
|
||||||
// Continue pattern for Phase 2, 3, 4...
|
// After Phase 2
|
||||||
|
TodoWrite({todos: [
|
||||||
|
{"content": "Create independent test session", "status": "completed", "activeForm": "Creating test session"},
|
||||||
|
{"content": "Gather cross-session context", "status": "completed", "activeForm": "Gathering cross-session context"},
|
||||||
|
{"content": "Analyze implementation for test strategy", "status": "in_progress", "activeForm": "Analyzing implementation"},
|
||||||
|
{"content": "Generate test validation task", "status": "pending", "activeForm": "Generating test validation task"}
|
||||||
|
]})
|
||||||
|
|
||||||
|
// After Phase 3
|
||||||
|
TodoWrite({todos: [
|
||||||
|
{"content": "Create independent test session", "status": "completed", "activeForm": "Creating test session"},
|
||||||
|
{"content": "Gather cross-session context", "status": "completed", "activeForm": "Gathering cross-session context"},
|
||||||
|
{"content": "Analyze implementation for test strategy", "status": "completed", "activeForm": "Analyzing implementation"},
|
||||||
|
{"content": "Generate test validation task", "status": "in_progress", "activeForm": "Generating test validation task"}
|
||||||
|
]})
|
||||||
|
|
||||||
|
// After Phase 4
|
||||||
|
TodoWrite({todos: [
|
||||||
|
{"content": "Create independent test session", "status": "completed", "activeForm": "Creating test session"},
|
||||||
|
{"content": "Gather cross-session context", "status": "completed", "activeForm": "Gathering cross-session context"},
|
||||||
|
{"content": "Analyze implementation for test strategy", "status": "completed", "activeForm": "Analyzing implementation"},
|
||||||
|
{"content": "Generate test validation task", "status": "completed", "activeForm": "Generating test validation task"}
|
||||||
|
]})
|
||||||
```
|
```
|
||||||
|
|
||||||
## Data Flow
|
## Data Flow
|
||||||
|
|
||||||
```
|
```
|
||||||
Session ID (from argument or auto-detect)
|
User: /workflow:test-gen WFS-user-auth
|
||||||
↓
|
↓
|
||||||
Phase 1: context-gather --session sessionId "test-fix description"
|
Phase 1: session-start --new "Test validation for WFS-user-auth"
|
||||||
↓ Output: contextPath (context-package-test.json)
|
↓ Creates: WFS-test-user-auth session
|
||||||
|
↓ Writes: workflow-session.json with workflow_type="test_session", source_session_id="WFS-user-auth"
|
||||||
|
↓ Output: testSessionId = "WFS-test-user-auth"
|
||||||
↓
|
↓
|
||||||
Phase 2: concept-enhanced --session sessionId --context contextPath
|
Phase 2: context-gather --session WFS-test-user-auth
|
||||||
↓ Input: sessionId + contextPath
|
↓ Auto-detects: test session type from workflow-session.json
|
||||||
↓ Output: ANALYSIS_RESULTS.md (test execution strategy)
|
↓ Auto-reads: source_session_id = "WFS-user-auth"
|
||||||
|
↓ Gathers: Cross-session context (summaries, code changes, tests)
|
||||||
|
↓ Output: .workflow/WFS-test-user-auth/.process/context-package.json
|
||||||
↓
|
↓
|
||||||
Phase 3: task-generate --session sessionId
|
Phase 3: concept-enhanced --session WFS-test-user-auth --context context-package.json
|
||||||
↓ Input: sessionId + ANALYSIS_RESULTS.md
|
↓ Reads: context-package.json with cross-session artifacts
|
||||||
↓ Output: TEST-FIX-001.json, IMPL_PLAN.md, TODO_LIST.md
|
↓ Executes: Parallel analysis (Gemini test strategy + optional Codex validation)
|
||||||
|
↓ Analyzes: Test coverage, execution strategy, code targets
|
||||||
|
↓ Output: .workflow/WFS-test-user-auth/.process/ANALYSIS_RESULTS.md
|
||||||
↓
|
↓
|
||||||
Phase 4: execute --session sessionId
|
Phase 4: task-generate --session WFS-test-user-auth
|
||||||
↓ Input: sessionId + TEST-FIX-001.json
|
↓ Reads: ANALYSIS_RESULTS.md with test strategy and code targets
|
||||||
↓ Output: Test execution and fixing
|
↓ Generates: IMPL-001.json with meta.type="test-fix"
|
||||||
|
↓ Output: Task, plan, and todo files in test session
|
||||||
↓
|
↓
|
||||||
Return summary to user
|
Return: Summary with next steps (user triggers /workflow:execute separately)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Context Gathering Customization
|
## Session Metadata Design
|
||||||
|
|
||||||
context-gather will analyze:
|
**Test Session (`WFS-test-user-auth/workflow-session.json`)**:
|
||||||
- Completed IMPL task summaries
|
```json
|
||||||
- Git changes since session start
|
{
|
||||||
- Test files in focus_paths
|
"session_id": "WFS-test-user-auth",
|
||||||
- Implementation files to be tested
|
"project": "Test validation for user authentication implementation",
|
||||||
- Test framework configuration
|
"status": "planning",
|
||||||
|
"created_at": "2025-10-03T12:00:00Z",
|
||||||
|
"workflow_type": "test_session",
|
||||||
|
"source_session_id": "WFS-user-auth"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Analysis Focus
|
## Automatic Cross-Session Context Collection
|
||||||
|
|
||||||
concept-enhanced will analyze:
|
When `context-gather` detects `workflow_type: "test_session"`:
|
||||||
- Test coverage gaps
|
|
||||||
- Test execution strategy (unit, integration, e2e)
|
**Collected from Source Session** (`.workflow/WFS-user-auth/`):
|
||||||
- Failure diagnosis approaches
|
- Implementation summaries: `.summaries/IMPL-*-summary.md`
|
||||||
- Code fixing patterns
|
- Code changes: `git log --since=[source_created_at] --name-only`
|
||||||
- Test framework best practices
|
- Original plan: `IMPL_PLAN.md`
|
||||||
|
- Task definitions: `.task/IMPL-*.json`
|
||||||
|
|
||||||
|
**Collected from Current Project**:
|
||||||
|
- Test files: `mcp__code-index__find_files(pattern="*.test.*")`
|
||||||
|
- Test configuration: `package.json`, `jest.config.js`, etc.
|
||||||
|
- Source files: Based on changed files from git log
|
||||||
|
|
||||||
## Task Generation Output
|
## Task Generation Output
|
||||||
|
|
||||||
task-generate creates TEST-FIX-001.json with:
|
task-generate creates `IMPL-001.json` (reusing standard format) with:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"id": "TEST-FIX-001",
|
"id": "IMPL-001",
|
||||||
"title": "Execute and validate tests for [sessionId]",
|
"title": "Execute and validate tests for [sourceSessionId]",
|
||||||
"status": "pending",
|
"status": "pending",
|
||||||
"meta": {
|
"meta": {
|
||||||
"type": "test-fix",
|
"type": "test-fix",
|
||||||
@@ -239,11 +322,11 @@ task-generate creates TEST-FIX-001.json with:
|
|||||||
"flow_control": {
|
"flow_control": {
|
||||||
"pre_analysis": [
|
"pre_analysis": [
|
||||||
{
|
{
|
||||||
"step": "load_implementation_summaries",
|
"step": "load_source_session_summaries",
|
||||||
"action": "Load completed IMPL task summaries",
|
"action": "Load implementation summaries from source session",
|
||||||
"commands": [
|
"commands": [
|
||||||
"bash(find .workflow/[sessionId]/.summaries/ -name 'IMPL-*-summary.md' 2>/dev/null)",
|
"bash(find .workflow/[sourceSessionId]/.summaries/ -name 'IMPL-*-summary.md' 2>/dev/null)",
|
||||||
"Read(.workflow/[sessionId]/.summaries/IMPL-001-summary.md)"
|
"Read(.workflow/[sourceSessionId]/.summaries/IMPL-001-summary.md)"
|
||||||
],
|
],
|
||||||
"output_to": "implementation_context",
|
"output_to": "implementation_context",
|
||||||
"on_error": "skip_optional"
|
"on_error": "skip_optional"
|
||||||
@@ -286,20 +369,22 @@ task-generate creates TEST-FIX-001.json with:
|
|||||||
## Error Handling
|
## Error Handling
|
||||||
|
|
||||||
### Phase 1 Failures
|
### Phase 1 Failures
|
||||||
- **No session found**: Return error "No active session detected. Provide session-id or run /workflow:plan first"
|
- **Source session not found**: Return error "Source session [sourceSessionId] not found in .workflow/"
|
||||||
- **Invalid session**: Return error "Session [sessionId] not found or incomplete"
|
- **Invalid source session**: Return error "Source session [sourceSessionId] has no completed IMPL tasks"
|
||||||
- **No implementation**: Return error "No completed IMPL tasks found. Complete implementation first"
|
- **Session creation failed**: Return error "Could not create test session. Check /workflow:session:start"
|
||||||
|
|
||||||
### Phase 2 Failures
|
### Phase 2 Failures
|
||||||
- **Analysis failed**: Return error "Implementation analysis failed. Check context package"
|
- **Context gathering failed**: Return error "Could not gather cross-session context. Check source session artifacts"
|
||||||
- **No test strategy**: Return error "Could not determine test execution strategy"
|
- **No source artifacts**: Return error "Source session has no implementation summaries or git history"
|
||||||
|
|
||||||
### Phase 3 Failures
|
### Phase 3 Failures
|
||||||
- **Task generation failed**: Retry once, then return error with details
|
- **Analysis failed**: Return error "Implementation analysis failed. Check context package and ANALYSIS_RESULTS.md"
|
||||||
- **Invalid task structure**: Return error with JSON validation details
|
- **No test strategy**: Return error "Could not determine test execution strategy from analysis"
|
||||||
|
- **Missing code targets**: Warning only, proceed with general test task
|
||||||
|
|
||||||
### Phase 4 Failures
|
### Phase 4 Failures
|
||||||
- **Execution failed**: Return error "Could not start test-fix workflow. Check session state"
|
- **Task generation failed**: Retry once, then return error with details
|
||||||
|
- **Invalid task structure**: Return error with JSON validation details
|
||||||
|
|
||||||
## Workflow Integration
|
## Workflow Integration
|
||||||
|
|
||||||
@@ -307,18 +392,22 @@ task-generate creates TEST-FIX-001.json with:
|
|||||||
```
|
```
|
||||||
1. Implementation Phase (prior to test-gen)
|
1. Implementation Phase (prior to test-gen)
|
||||||
/workflow:plan "Build auth system"
|
/workflow:plan "Build auth system"
|
||||||
|
→ Creates WFS-auth session
|
||||||
→ @code-developer implements + writes tests
|
→ @code-developer implements + writes tests
|
||||||
→ Creates IMPL-001-summary.md
|
→ Creates IMPL-001-summary.md in WFS-auth
|
||||||
|
|
||||||
2. Test Generation Phase (test-gen)
|
2. Test Generation Phase (test-gen)
|
||||||
/workflow:test-gen WFS-auth
|
/workflow:test-gen WFS-auth
|
||||||
Phase 1: context-gather → Creates context-package-test.json
|
Phase 1: session-start → Creates WFS-test-auth session
|
||||||
Phase 2: concept-enhanced → Creates ANALYSIS_RESULTS.md
|
Phase 2: context-gather → Gathers from WFS-auth, creates context-package.json
|
||||||
Phase 3: task-generate → Creates TEST-FIX-001.json
|
Phase 3: concept-enhanced → Analyzes implementation, creates ANALYSIS_RESULTS.md
|
||||||
Phase 4: execute → Triggers @test-fix-agent
|
Phase 4: task-generate → Creates IMPL-001.json with meta.type="test-fix"
|
||||||
|
Returns: Summary with next steps
|
||||||
|
|
||||||
3. Test-Fix Phase (automated)
|
3. Test Execution Phase (user-triggered)
|
||||||
@test-fix-agent picks up TEST-FIX-001
|
/workflow:execute
|
||||||
|
→ Detects active session: WFS-test-auth
|
||||||
|
→ @test-fix-agent picks up IMPL-001 (test-fix type)
|
||||||
→ Runs test suite
|
→ Runs test suite
|
||||||
→ Diagnoses failures (if any)
|
→ Diagnoses failures (if any)
|
||||||
→ Fixes source code
|
→ Fixes source code
|
||||||
@@ -327,39 +416,72 @@ task-generate creates TEST-FIX-001.json with:
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Output Files Created
|
### Output Files Created
|
||||||
- `.workflow/[sessionId]/.process/context-package-test.json` - Test context package
|
|
||||||
- `.workflow/[sessionId]/.process/ANALYSIS_RESULTS.md` - Test execution strategy
|
**In Test Session** (`.workflow/WFS-test-auth/`):
|
||||||
- `.workflow/[sessionId]/.task/TEST-FIX-001.json` - Task definition
|
- `workflow-session.json` - Contains workflow_type and source_session_id
|
||||||
- `.workflow/[sessionId]/IMPL_PLAN.md` - Updated with test-fix plan
|
- `.process/context-package.json` - Cross-session context from WFS-auth
|
||||||
- `.workflow/[sessionId]/TODO_LIST.md` - Updated with TEST-FIX task
|
- `.process/ANALYSIS_RESULTS.md` - Test strategy and code targets from concept-enhanced
|
||||||
- `.workflow/[sessionId]/.summaries/TEST-FIX-001-summary.md` - Created by test-fix-agent after completion
|
- `.task/IMPL-001.json` - Test-fix task definition
|
||||||
|
- `IMPL_PLAN.md` - Test validation plan (from ANALYSIS_RESULTS.md)
|
||||||
|
- `TODO_LIST.md` - Task checklist
|
||||||
|
- `.summaries/IMPL-001-summary.md` - Created by @test-fix-agent after completion
|
||||||
|
|
||||||
## Best Practices
|
## Best Practices
|
||||||
|
|
||||||
1. **Run after implementation complete**: Ensure all IMPL tasks are done before test-gen
|
1. **Run after implementation complete**: Ensure source session has completed IMPL tasks and summaries
|
||||||
2. **Check git commits**: Make sure implementation changes are committed
|
2. **Check git commits**: Implementation changes should be committed for accurate git log analysis
|
||||||
3. **Verify test files exist**: Code-developer should have created tests
|
3. **Verify test files exist**: Source implementation should include test files
|
||||||
4. **Monitor execution**: Use `/workflow:status` to track test-fix progress
|
4. **Independent sessions**: Test session is separate from implementation session for clean separation
|
||||||
5. **Review failures**: If tests fail repeatedly, check test-fix-agent summary for details
|
5. **Monitor execution**: Use `/workflow:status` to track test-fix progress after /workflow:execute
|
||||||
|
|
||||||
## Coordinator Checklist
|
## Coordinator Checklist
|
||||||
|
|
||||||
✅ Initialize TodoWrite before any command
|
✅ Initialize TodoWrite before any command (4 phases)
|
||||||
✅ Execute Phase 1 immediately with session ID
|
✅ Phase 1: Create test session with source session ID
|
||||||
✅ Parse context package path from Phase 1 output
|
✅ Parse new test session ID from Phase 1 output
|
||||||
✅ Pass session ID and context path to Phase 2 command
|
✅ Phase 2: Run context-gather (auto-detects test session, no extra params)
|
||||||
✅ Verify ANALYSIS_RESULTS.md after Phase 2
|
✅ Verify context-package.json contains cross-session artifacts
|
||||||
✅ Pass session ID to Phase 3 command
|
✅ Phase 3: Run concept-enhanced with session and context path
|
||||||
✅ Verify all Phase 3 outputs (task JSON, IMPL_PLAN, TODO_LIST)
|
✅ Verify ANALYSIS_RESULTS.md contains test strategy and code targets
|
||||||
✅ Pass session ID to Phase 4 command
|
✅ Phase 4: Run task-generate to create IMPL-001.json
|
||||||
|
✅ Verify task has meta.type="test-fix" and meta.agent="@test-fix-agent"
|
||||||
|
✅ Verify flow_control includes analysis insights and code targets
|
||||||
✅ Update TodoWrite after each phase
|
✅ Update TodoWrite after each phase
|
||||||
✅ Return summary only after Phase 4 completes
|
✅ Return summary after Phase 4 (execution is separate user action)
|
||||||
|
|
||||||
|
## Required Tool Modifications
|
||||||
|
|
||||||
|
### `/workflow:session:start`
|
||||||
|
- Support `--new` flag for test session creation
|
||||||
|
- Auto-detect test session pattern from task description
|
||||||
|
- Write `workflow_type: "test_session"` and `source_session_id` to metadata
|
||||||
|
|
||||||
|
### `/workflow:tools:context-gather`
|
||||||
|
- Read session metadata to detect `workflow_type: "test_session"`
|
||||||
|
- Auto-extract `source_session_id` from metadata
|
||||||
|
- Gather cross-session context from source session artifacts
|
||||||
|
- Include git log analysis from source session creation time
|
||||||
|
|
||||||
|
### `/workflow:tools:concept-enhanced`
|
||||||
|
- No changes required (already supports cross-session context analysis)
|
||||||
|
- Will automatically analyze test strategy based on context-package.json
|
||||||
|
- Generates ANALYSIS_RESULTS.md with code targets and test execution plan
|
||||||
|
|
||||||
|
### `/workflow:tools:task-generate`
|
||||||
|
- Recognize test session context and generate appropriate task
|
||||||
|
- Create `IMPL-001.json` with `meta.type: "test-fix"`
|
||||||
|
- Extract test strategy from ANALYSIS_RESULTS.md
|
||||||
|
- Include code targets and cross-session references in flow_control
|
||||||
|
|
||||||
|
### `/workflow:execute`
|
||||||
|
- No changes required (already dispatches by meta.agent)
|
||||||
|
|
||||||
## Related Commands
|
## Related Commands
|
||||||
- `/workflow:plan` - Create implementation workflow (run before test-gen)
|
- `/workflow:plan` - Create implementation workflow (run before test-gen)
|
||||||
- `/workflow:tools:context-gather` - Phase 1 tool for context collection
|
- `/workflow:session:start` - Phase 1 tool for test session creation
|
||||||
- `/workflow:tools:concept-enhanced` - Phase 2 tool for analysis
|
- `/workflow:tools:context-gather` - Phase 2 tool for cross-session context collection
|
||||||
- `/workflow:tools:task-generate` - Phase 3 tool for task creation
|
- `/workflow:tools:concept-enhanced` - Phase 3 tool for implementation analysis and test strategy
|
||||||
- `/workflow:execute` - Phase 4 workflow execution
|
- `/workflow:tools:task-generate` - Phase 4 tool for test task creation
|
||||||
|
- `/workflow:execute` - Execute test-fix workflow (user-triggered after test-gen)
|
||||||
- `/workflow:status` - Check workflow progress
|
- `/workflow:status` - Check workflow progress
|
||||||
- `@test-fix-agent` - Agent that executes and fixes tests
|
- `@test-fix-agent` - Agent that executes and fixes tests
|
||||||
|
|||||||
@@ -141,6 +141,9 @@ Advanced solution design and feasibility analysis engine with parallel CLI execu
|
|||||||
RULES:
|
RULES:
|
||||||
- Focus on SOLUTION IMPROVEMENTS and KEY DESIGN DECISIONS, NOT task planning
|
- Focus on SOLUTION IMPROVEMENTS and KEY DESIGN DECISIONS, NOT task planning
|
||||||
- Provide architectural rationale, evaluate alternatives, assess tradeoffs
|
- Provide architectural rationale, evaluate alternatives, assess tradeoffs
|
||||||
|
- **CRITICAL**: Identify code targets - existing files as "file:function:lines", new files as "file"
|
||||||
|
- For modifications: specify exact files/functions/line ranges
|
||||||
|
- For new files: specify file path only (no function or lines)
|
||||||
- Do NOT create task lists, implementation steps, or code examples
|
- Do NOT create task lists, implementation steps, or code examples
|
||||||
- Do NOT generate any code snippets or implementation details
|
- Do NOT generate any code snippets or implementation details
|
||||||
- **MUST write output to .workflow/{session_id}/.process/gemini-solution-design.md**
|
- **MUST write output to .workflow/{session_id}/.process/gemini-solution-design.md**
|
||||||
@@ -172,6 +175,8 @@ Advanced solution design and feasibility analysis engine with parallel CLI execu
|
|||||||
RULES:
|
RULES:
|
||||||
- Focus on TECHNICAL FEASIBILITY and RISK ASSESSMENT, NOT implementation planning
|
- Focus on TECHNICAL FEASIBILITY and RISK ASSESSMENT, NOT implementation planning
|
||||||
- Validate architectural decisions, identify potential issues, recommend optimizations
|
- Validate architectural decisions, identify potential issues, recommend optimizations
|
||||||
|
- **CRITICAL**: Verify code targets - existing files "file:function:lines", new files "file"
|
||||||
|
- Confirm exact locations for modifications, identify additional new files if needed
|
||||||
- Do NOT create task breakdowns, step-by-step guides, or code examples
|
- Do NOT create task breakdowns, step-by-step guides, or code examples
|
||||||
- Do NOT generate any code snippets or implementation details
|
- Do NOT generate any code snippets or implementation details
|
||||||
- **MUST write output to .workflow/{session_id}/.process/codex-feasibility-validation.md**
|
- **MUST write output to .workflow/{session_id}/.process/codex-feasibility-validation.md**
|
||||||
@@ -301,6 +306,39 @@ Generated ANALYSIS_RESULTS.md focuses on **solution improvements, key design dec
|
|||||||
- **Module Dependencies**: {dependency_graph_and_order}
|
- **Module Dependencies**: {dependency_graph_and_order}
|
||||||
- **Quality Assurance**: {qa_approach_and_validation}
|
- **Quality Assurance**: {qa_approach_and_validation}
|
||||||
|
|
||||||
|
### Code Modification Targets
|
||||||
|
**Purpose**: Specific code locations for modification AND new files to create
|
||||||
|
|
||||||
|
**Format**:
|
||||||
|
- Existing files: `file:function:lines` (with line numbers)
|
||||||
|
- New files: `file` (no function or lines)
|
||||||
|
|
||||||
|
**Identified Targets**:
|
||||||
|
1. **Target**: `src/auth/AuthService.ts:login:45-52`
|
||||||
|
- **Type**: Modify existing
|
||||||
|
- **Modification**: Enhance error handling
|
||||||
|
- **Rationale**: Current logic lacks validation for edge cases
|
||||||
|
|
||||||
|
2. **Target**: `src/auth/PasswordReset.ts`
|
||||||
|
- **Type**: Create new file
|
||||||
|
- **Purpose**: Password reset functionality
|
||||||
|
- **Rationale**: New feature requirement
|
||||||
|
|
||||||
|
3. **Target**: `src/middleware/auth.ts:validateToken:30-45`
|
||||||
|
- **Type**: Modify existing
|
||||||
|
- **Modification**: Add token expiry check
|
||||||
|
- **Rationale**: Security requirement for JWT validation
|
||||||
|
|
||||||
|
4. **Target**: `tests/auth/PasswordReset.test.ts`
|
||||||
|
- **Type**: Create new file
|
||||||
|
- **Purpose**: Test coverage for password reset
|
||||||
|
- **Rationale**: Test requirement for new feature
|
||||||
|
|
||||||
|
**Note**:
|
||||||
|
- For new files, only specify the file path (no function or lines)
|
||||||
|
- For existing files without line numbers, use `file:function:*` format
|
||||||
|
- Task generation will refine these during the `analyze_task_patterns` step
|
||||||
|
|
||||||
### Feasibility Assessment
|
### Feasibility Assessment
|
||||||
- **Technical Complexity**: {complexity_rating_and_analysis}
|
- **Technical Complexity**: {complexity_rating_and_analysis}
|
||||||
- **Performance Impact**: {expected_performance_characteristics}
|
- **Performance Impact**: {expected_performance_characteristics}
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ Task(
|
|||||||
"Validate against acceptance criteria"
|
"Validate against acceptance criteria"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"target_files": ["file:function:lines"]
|
"target_files": ["file:function:lines", "path/to/NewFile.ts"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|||||||
@@ -142,12 +142,12 @@ Generate task JSON files and IMPL_PLAN.md from analysis results with automatic a
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"step": "analyze_task_patterns",
|
"step": "analyze_task_patterns",
|
||||||
"action": "Analyze existing code patterns",
|
"action": "Analyze existing code patterns and identify modification targets",
|
||||||
"commands": [
|
"commands": [
|
||||||
"bash(cd \"[focus_paths]\")",
|
"bash(cd \"[focus_paths]\")",
|
||||||
"bash(~/.claude/scripts/gemini-wrapper -p \"PURPOSE: Analyze patterns TASK: Review '[title]' CONTEXT: [synthesis_specification] [individual_artifacts] EXPECTED: Pattern analysis RULES: Prioritize synthesis-specification.md\")"
|
"bash(~/.claude/scripts/gemini-wrapper -p \"PURPOSE: Identify modification targets TASK: Analyze '[title]' and locate specific files/functions/lines to modify CONTEXT: [synthesis_specification] [individual_artifacts] EXPECTED: Code locations in format 'file:function:lines' RULES: Prioritize synthesis-specification.md, identify exact modification points\")"
|
||||||
],
|
],
|
||||||
"output_to": "task_context",
|
"output_to": "task_context_with_targets",
|
||||||
"on_error": "fail"
|
"on_error": "fail"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -175,8 +175,40 @@ Generate task JSON files and IMPL_PLAN.md from analysis results with automatic a
|
|||||||
1. Parse analysis results and extract task definitions
|
1. Parse analysis results and extract task definitions
|
||||||
2. Detect brainstorming artifacts with priority scoring
|
2. Detect brainstorming artifacts with priority scoring
|
||||||
3. Generate task context (requirements, focus_paths, acceptance)
|
3. Generate task context (requirements, focus_paths, acceptance)
|
||||||
4. Build flow_control with artifact loading steps
|
4. **Determine modification targets**: Extract specific code locations from analysis
|
||||||
5. Create individual task JSON files in `.task/`
|
5. Build flow_control with artifact loading steps and target_files
|
||||||
|
6. Create individual task JSON files in `.task/`
|
||||||
|
|
||||||
|
#### Target Files Generation (Critical)
|
||||||
|
**Purpose**: Identify specific code locations for modification AND new files to create
|
||||||
|
|
||||||
|
**Source Data Priority**:
|
||||||
|
1. **ANALYSIS_RESULTS.md** - Should contain identified code locations
|
||||||
|
2. **Gemini/MCP Analysis** - From `analyze_task_patterns` step
|
||||||
|
3. **Context Package** - File references from `focus_paths`
|
||||||
|
|
||||||
|
**Format**: `["file:function:lines"]` or `["file"]` (for new files)
|
||||||
|
- `file`: Relative path from project root (e.g., `src/auth/AuthService.ts`)
|
||||||
|
- `function`: Function/method name to modify (e.g., `login`, `validateToken`) - **omit for new files**
|
||||||
|
- `lines`: Approximate line range (e.g., `45-52`, `120-135`) - **omit for new files**
|
||||||
|
|
||||||
|
**Examples**:
|
||||||
|
```json
|
||||||
|
"target_files": [
|
||||||
|
"src/auth/AuthService.ts:login:45-52",
|
||||||
|
"src/middleware/auth.ts:validateToken:30-45",
|
||||||
|
"src/auth/PasswordReset.ts",
|
||||||
|
"tests/auth/PasswordReset.test.ts",
|
||||||
|
"tests/auth.test.ts:testLogin:15-20"
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Generation Strategy**:
|
||||||
|
- **New files to create** → Use `["path/to/NewFile.ts"]` (no function or lines)
|
||||||
|
- **Existing files with specific locations** → Use `["file:function:lines"]`
|
||||||
|
- **Existing files with function only** → Search lines using MCP/grep `["file:function:*"]`
|
||||||
|
- **Existing files (explore entire)** → Mark as `["file.ts:*:*"]`
|
||||||
|
- **No specific targets** → Leave empty `[]` (agent explores focus_paths)
|
||||||
|
|
||||||
### Phase 3: Artifact Detection & Integration
|
### Phase 3: Artifact Detection & Integration
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,12 @@ type: search-guideline
|
|||||||
|
|
||||||
# Context Search Strategy
|
# Context Search Strategy
|
||||||
|
|
||||||
|
## ⚡ Execution Environment
|
||||||
|
|
||||||
|
**CRITICAL**: All commands execute in **Bash environment** (Git Bash on Windows, Bash on Linux/macOS)
|
||||||
|
|
||||||
|
**❌ Forbidden**: Windows-specific commands (`findstr`, `dir`, `where`, `type`, `copy`, `del`) - Use Bash equivalents (`grep`, `find`, `which`, `cat`, `cp`, `rm`)
|
||||||
|
|
||||||
## ⚡ Core Search Tools
|
## ⚡ Core Search Tools
|
||||||
|
|
||||||
**rg (ripgrep)**: Fast content search with regex support
|
**rg (ripgrep)**: Fast content search with regex support
|
||||||
@@ -18,6 +24,7 @@ type: search-guideline
|
|||||||
- **Use find for files** - Locate files/directories by name
|
- **Use find for files** - Locate files/directories by name
|
||||||
- **Use grep sparingly** - Only when rg unavailable
|
- **Use grep sparingly** - Only when rg unavailable
|
||||||
- **Use get_modules_by_depth.sh first** - MANDATORY for program architecture analysis before planning
|
- **Use get_modules_by_depth.sh first** - MANDATORY for program architecture analysis before planning
|
||||||
|
- **Always use Bash commands** - NEVER use Windows cmd/PowerShell commands
|
||||||
|
|
||||||
### Quick Command Reference
|
### Quick Command Reference
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ All task files use this simplified 5-field schema (aligned with workflow-archite
|
|||||||
},
|
},
|
||||||
"target_files": [
|
"target_files": [
|
||||||
"src/auth/login.ts:handleLogin:75-120",
|
"src/auth/login.ts:handleLogin:75-120",
|
||||||
"src/middleware/auth.ts:validateToken"
|
"src/middleware/auth.ts:validateToken",
|
||||||
|
"src/auth/PasswordReset.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,7 +82,7 @@ All task files use this simplified 5-field schema (aligned with workflow-archite
|
|||||||
**Components**:
|
**Components**:
|
||||||
- **pre_analysis**: Array of sequential process steps
|
- **pre_analysis**: Array of sequential process steps
|
||||||
- **implementation_approach**: Task execution strategy
|
- **implementation_approach**: Task execution strategy
|
||||||
- **target_files**: Specific files to modify in "file:function:lines" format
|
- **target_files**: Files to modify/create - existing files in `file:function:lines` format, new files as `file` only
|
||||||
|
|
||||||
**Step Structure**:
|
**Step Structure**:
|
||||||
```json
|
```json
|
||||||
|
|||||||
@@ -175,7 +175,8 @@ All task files use this unified 5-field schema with optional artifacts enhanceme
|
|||||||
},
|
},
|
||||||
"target_files": [
|
"target_files": [
|
||||||
"src/auth/login.ts:handleLogin:75-120",
|
"src/auth/login.ts:handleLogin:75-120",
|
||||||
"src/middleware/auth.ts:validateToken"
|
"src/middleware/auth.ts:validateToken",
|
||||||
|
"src/auth/PasswordReset.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -219,7 +220,7 @@ The **flow_control** field manages task execution with two main components:
|
|||||||
- **task_description**: Comprehensive implementation description
|
- **task_description**: Comprehensive implementation description
|
||||||
- **modification_points**: Specific code modification targets
|
- **modification_points**: Specific code modification targets
|
||||||
- **logic_flow**: Business logic execution sequence
|
- **logic_flow**: Business logic execution sequence
|
||||||
- **target_files**: Target file list in `file:function:lines` format
|
- **target_files**: Target file list - existing files in `file:function:lines` format, new files as `file` only
|
||||||
|
|
||||||
#### Tool Reference
|
#### Tool Reference
|
||||||
**Command Types Available**:
|
**Command Types Available**:
|
||||||
|
|||||||
119
CHANGELOG.md
119
CHANGELOG.md
@@ -5,6 +5,125 @@ 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.2.3] - 2025-10-03
|
||||||
|
|
||||||
|
### ✨ Version Management System
|
||||||
|
|
||||||
|
This release introduces a comprehensive version management and upgrade notification system.
|
||||||
|
|
||||||
|
#### Added
|
||||||
|
|
||||||
|
**New Command: `/version`**:
|
||||||
|
- **Purpose**: Display version information and check for updates from GitHub
|
||||||
|
- **Features**:
|
||||||
|
- Shows local and global installation versions
|
||||||
|
- Fetches latest stable release from GitHub API
|
||||||
|
- Displays latest development commit from main branch
|
||||||
|
- Compares installed versions with remote versions
|
||||||
|
- Provides upgrade recommendations with installation commands
|
||||||
|
- Supports both stable and development version tracking
|
||||||
|
|
||||||
|
**Version Information Display**:
|
||||||
|
- **Local Version**: Shows project-specific installation (if exists)
|
||||||
|
- **Global Version**: Shows `~/.claude` installation with tracking mode
|
||||||
|
- **Latest Stable**: Displays latest release tag, name, and publish date
|
||||||
|
- **Latest Dev**: Shows latest commit hash, message, and date
|
||||||
|
- **Status Assessment**: Automatic version comparison and upgrade suggestions
|
||||||
|
|
||||||
|
**Version Tracking Files**:
|
||||||
|
- **`.claude/version.json`**: Local project version tracking
|
||||||
|
- **`~/.claude/version.json`**: Global installation version tracking
|
||||||
|
- **Fields**:
|
||||||
|
- `version`: Version number or "latest" for main branch tracking
|
||||||
|
- `installation_mode`: "Local" or "Global"
|
||||||
|
- `installation_path`: Installation directory
|
||||||
|
- `source_branch`: Source branch (usually "main")
|
||||||
|
- `installation_date_utc`: ISO 8601 timestamp
|
||||||
|
|
||||||
|
**GitHub API Integration**:
|
||||||
|
- **Latest Release**: `https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest`
|
||||||
|
- Extracts: `tag_name`, `name`, `published_at`
|
||||||
|
- **Latest Commit**: `https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main`
|
||||||
|
- Extracts: `sha`, `commit.message`, `commit.author.date`
|
||||||
|
- **Timeout**: 30-second timeout for slow connections
|
||||||
|
- **Error Handling**: Graceful fallback for network errors
|
||||||
|
|
||||||
|
**Command Output Scenarios**:
|
||||||
|
|
||||||
|
1. **Up to date**:
|
||||||
|
```
|
||||||
|
✅ You are on the latest stable version (3.2.3)
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Upgrade available**:
|
||||||
|
```
|
||||||
|
⬆️ A newer stable version is available: v3.2.3
|
||||||
|
Your version: 3.2.2
|
||||||
|
|
||||||
|
To upgrade:
|
||||||
|
PowerShell: iex (iwr -useb https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.ps1)
|
||||||
|
Bash: bash <(curl -fsSL https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.sh)
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Development version**:
|
||||||
|
```
|
||||||
|
✨ You are running a development version (3.3.0-dev)
|
||||||
|
This is newer than the latest stable release (v3.2.3)
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Changed
|
||||||
|
|
||||||
|
**Documentation Updates**:
|
||||||
|
- Added `/version` command reference to README.md
|
||||||
|
- Added version management documentation to README_CN.md
|
||||||
|
- Created comprehensive `.claude/commands/version.md` implementation guide
|
||||||
|
- Updated command tables with version management examples
|
||||||
|
|
||||||
|
**Installation Scripts Enhancement**:
|
||||||
|
- Installation scripts now create `version.json` files automatically
|
||||||
|
- Track installation mode (local vs global)
|
||||||
|
- Record installation timestamp
|
||||||
|
- Support version tracking for both stable and development installations
|
||||||
|
|
||||||
|
#### Technical Details
|
||||||
|
|
||||||
|
**Implementation**:
|
||||||
|
- Uses simple bash commands (no jq dependency required)
|
||||||
|
- Fallback to grep/sed for JSON parsing
|
||||||
|
- Network calls with curl and error suppression
|
||||||
|
- Version comparison using `sort -V` for semantic versioning
|
||||||
|
- Cross-platform compatible (Windows Git Bash, Linux, macOS)
|
||||||
|
|
||||||
|
**Command Structure**:
|
||||||
|
```bash
|
||||||
|
/version # Display version and check for updates
|
||||||
|
```
|
||||||
|
|
||||||
|
**No parameters required** - command automatically:
|
||||||
|
1. Checks local version file (`./.claude/version.json`)
|
||||||
|
2. Checks global version file (`~/.claude/version.json`)
|
||||||
|
3. Fetches latest release from GitHub
|
||||||
|
4. Fetches latest commit from main branch
|
||||||
|
5. Compares versions and provides recommendations
|
||||||
|
|
||||||
|
#### Benefits
|
||||||
|
|
||||||
|
**User Experience**:
|
||||||
|
- 🔍 Quick version check with single command
|
||||||
|
- 📊 Comprehensive version information display
|
||||||
|
- 🔄 Automatic upgrade notifications
|
||||||
|
- 📈 Development version tracking support
|
||||||
|
- 🌐 GitHub API integration for latest updates
|
||||||
|
|
||||||
|
**DevOps**:
|
||||||
|
- 📁 Version tracking in both local and global installations
|
||||||
|
- 🕐 Installation timestamp for audit trails
|
||||||
|
- 🔀 Support for both stable and development branches
|
||||||
|
- ⚡ Fast execution with 30-second network timeout
|
||||||
|
- 🛡️ Graceful error handling for offline scenarios
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## [3.2.0] - 2025-10-02
|
## [3.2.0] - 2025-10-02
|
||||||
|
|
||||||
### 🔄 Test-Fix Workflow & Agent Architecture Simplification
|
### 🔄 Test-Fix Workflow & Agent Architecture Simplification
|
||||||
|
|||||||
@@ -19,11 +19,14 @@ For all CLI tool usage, command syntax, and integration guidelines:
|
|||||||
|
|
||||||
### Core Beliefs
|
### Core Beliefs
|
||||||
|
|
||||||
|
- **Pursue good taste** - Eliminate edge cases to make code logic natural and elegant
|
||||||
|
- **Embrace extreme simplicity** - Complexity is the root of all evil
|
||||||
|
- **Be pragmatic** - Code must solve real-world problems, not hypothetical ones
|
||||||
|
- **Data structures first** - Bad programmers worry about code; good programmers worry about data structures
|
||||||
|
- **Never break backward compatibility** - Existing functionality is sacred and inviolable
|
||||||
- **Incremental progress over big bangs** - Small changes that compile and pass tests
|
- **Incremental progress over big bangs** - Small changes that compile and pass tests
|
||||||
- **Learning from existing code** - Study and plan before implementing
|
- **Learning from existing code** - Study and plan before implementing
|
||||||
- **Pragmatic over dogmatic** - Adapt to project reality
|
|
||||||
- **Clear intent over clever code** - Be boring and obvious
|
- **Clear intent over clever code** - Be boring and obvious
|
||||||
- **Simple solutions over complex architectures** - Avoid over-engineering and premature optimization
|
|
||||||
- **Follow existing code style** - Match import patterns, naming conventions, and formatting of existing codebase
|
- **Follow existing code style** - Match import patterns, naming conventions, and formatting of existing codebase
|
||||||
|
|
||||||
### Simplicity Means
|
### Simplicity Means
|
||||||
|
|||||||
@@ -59,7 +59,11 @@ param(
|
|||||||
|
|
||||||
[switch]$BackupAll,
|
[switch]$BackupAll,
|
||||||
|
|
||||||
[switch]$NoBackup
|
[switch]$NoBackup,
|
||||||
|
|
||||||
|
[string]$SourceVersion = "",
|
||||||
|
|
||||||
|
[string]$SourceBranch = ""
|
||||||
)
|
)
|
||||||
|
|
||||||
# Set encoding for proper Unicode support
|
# Set encoding for proper Unicode support
|
||||||
@@ -622,6 +626,37 @@ function Merge-DirectoryContents {
|
|||||||
return $true
|
return $true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Create-VersionJson {
|
||||||
|
param(
|
||||||
|
[string]$TargetClaudeDir,
|
||||||
|
[string]$InstallationMode
|
||||||
|
)
|
||||||
|
|
||||||
|
# Determine version from source or default
|
||||||
|
$versionNumber = if ($SourceVersion) { $SourceVersion } else { $Version }
|
||||||
|
$sourceBranch = if ($SourceBranch) { $SourceBranch } else { "unknown" }
|
||||||
|
|
||||||
|
# Create version.json content
|
||||||
|
$versionInfo = @{
|
||||||
|
version = $versionNumber
|
||||||
|
installation_mode = $InstallationMode
|
||||||
|
installation_path = $TargetClaudeDir
|
||||||
|
installation_date_utc = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
|
||||||
|
source_branch = $sourceBranch
|
||||||
|
}
|
||||||
|
|
||||||
|
$versionJsonPath = Join-Path $TargetClaudeDir "version.json"
|
||||||
|
|
||||||
|
try {
|
||||||
|
$versionInfo | ConvertTo-Json | Out-File -FilePath $versionJsonPath -Encoding utf8 -Force
|
||||||
|
Write-ColorOutput "Created version.json: $versionNumber ($InstallationMode)" $ColorSuccess
|
||||||
|
return $true
|
||||||
|
} catch {
|
||||||
|
Write-ColorOutput "WARNING: Failed to create version.json: $($_.Exception.Message)" $ColorWarning
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function Install-Global {
|
function Install-Global {
|
||||||
Write-ColorOutput "Installing Claude Code Workflow System globally..." $ColorInfo
|
Write-ColorOutput "Installing Claude Code Workflow System globally..." $ColorInfo
|
||||||
|
|
||||||
@@ -682,6 +717,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
|
||||||
|
|
||||||
|
# Create version.json in global .claude directory
|
||||||
|
Write-ColorOutput "Creating version.json..." $ColorInfo
|
||||||
|
Create-VersionJson -TargetClaudeDir $globalClaudeDir -InstallationMode "Global"
|
||||||
|
|
||||||
if ($backupFolder -and (Test-Path $backupFolder)) {
|
if ($backupFolder -and (Test-Path $backupFolder)) {
|
||||||
$backupFiles = Get-ChildItem $backupFolder -Recurse -File -ErrorAction SilentlyContinue
|
$backupFiles = Get-ChildItem $backupFolder -Recurse -File -ErrorAction SilentlyContinue
|
||||||
if (-not $backupFiles -or ($backupFiles | Measure-Object).Count -eq 0) {
|
if (-not $backupFiles -or ($backupFiles | Measure-Object).Count -eq 0) {
|
||||||
@@ -819,6 +858,14 @@ 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
|
||||||
|
|
||||||
|
# Create version.json in local .claude directory
|
||||||
|
Write-ColorOutput "Creating version.json in local directory..." $ColorInfo
|
||||||
|
Create-VersionJson -TargetClaudeDir $localClaudeDir -InstallationMode "Path"
|
||||||
|
|
||||||
|
# Also create version.json in global .claude directory
|
||||||
|
Write-ColorOutput "Creating version.json in global directory..." $ColorInfo
|
||||||
|
Create-VersionJson -TargetClaudeDir $globalClaudeDir -InstallationMode "Global"
|
||||||
|
|
||||||
if ($backupFolder -and (Test-Path $backupFolder)) {
|
if ($backupFolder -and (Test-Path $backupFolder)) {
|
||||||
$backupFiles = Get-ChildItem $backupFolder -Recurse -File -ErrorAction SilentlyContinue
|
$backupFiles = Get-ChildItem $backupFolder -Recurse -File -ErrorAction SilentlyContinue
|
||||||
if (-not $backupFiles -or ($backupFiles | Measure-Object).Count -eq 0) {
|
if (-not $backupFiles -or ($backupFiles | Measure-Object).Count -eq 0) {
|
||||||
|
|||||||
99
README.md
99
README.md
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
[](https://github.com/catlog22/Claude-Code-Workflow/releases)
|
[](https://github.com/catlog22/Claude-Code-Workflow/releases)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
[]()
|
[]()
|
||||||
[](https://github.com/modelcontextprotocol)
|
[](https://github.com/modelcontextprotocol)
|
||||||
@@ -15,13 +15,14 @@
|
|||||||
|
|
||||||
**Claude Code Workflow (CCW)** is a next-generation multi-agent automation framework that orchestrates complex software development tasks through intelligent workflow management and autonomous execution.
|
**Claude Code Workflow (CCW)** is a next-generation multi-agent automation framework that orchestrates complex software development tasks through intelligent workflow management and autonomous execution.
|
||||||
|
|
||||||
> **🎉 Latest: v3.2.0** - Simplified agent architecture with "Tests Are the Review" philosophy. See [CHANGELOG.md](CHANGELOG.md) for details.
|
> **🎉 Latest: v3.2.3** - Version management system with upgrade notifications. See [CHANGELOG.md](CHANGELOG.md) for details.
|
||||||
>
|
>
|
||||||
> **What's New in v3.2.0**:
|
> **What's New in v3.2.3**:
|
||||||
> - 🔄 Simplified from 3 agents to 2 core agents (`@code-developer`, `@test-fix-agent`)
|
> - 🔍 New `/version` command for checking installed versions
|
||||||
> - ✅ "Tests Are the Review" - Passing tests = approved code
|
> - 📊 GitHub API integration for latest release detection
|
||||||
> - 🧪 Enhanced test-fix workflow with automatic execution and fixing
|
> - 🔄 Automatic upgrade notifications and recommendations
|
||||||
> - 📦 Interactive installation with version selection menu
|
> - 📁 Version tracking in both local and global installations
|
||||||
|
> - ⚡ Quick version check with comprehensive status display
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -94,17 +95,51 @@ Select version to install (1-3, default: 1):
|
|||||||
|
|
||||||
> 💡 **Pro Tip**: The installer automatically detects and displays the latest version numbers and release dates from GitHub. Just press Enter to select the recommended stable release.
|
> 💡 **Pro Tip**: The installer automatically detects and displays the latest version numbers and release dates from GitHub. Just press Enter to select the recommended stable release.
|
||||||
|
|
||||||
|
### **📦 Local Installation (Install-Claude.ps1)**
|
||||||
|
|
||||||
|
For local installation without network access, use the bundled PowerShell installer:
|
||||||
|
|
||||||
|
**Installation Modes:**
|
||||||
|
```powershell
|
||||||
|
# Interactive mode with prompts (recommended)
|
||||||
|
.\Install-Claude.ps1
|
||||||
|
|
||||||
|
# Quick install with automatic backup
|
||||||
|
.\Install-Claude.ps1 -Force -BackupAll
|
||||||
|
|
||||||
|
# Non-interactive install
|
||||||
|
.\Install-Claude.ps1 -NonInteractive -Force
|
||||||
|
```
|
||||||
|
|
||||||
|
**Installation Options:**
|
||||||
|
|
||||||
|
| Mode | Description | Installs To |
|
||||||
|
|------|-------------|-------------|
|
||||||
|
| **Global** | System-wide installation (default) | `~/.claude/`, `~/.codex/`, `~/.gemini/` |
|
||||||
|
| **Path** | Custom directory + global hybrid | Local: `agents/`, `commands/`<br>Global: `workflows/`, `scripts/` |
|
||||||
|
|
||||||
|
**Backup Behavior:**
|
||||||
|
- **Default**: Automatic backup enabled (`-BackupAll`)
|
||||||
|
- **Disable**: Use `-NoBackup` flag (⚠️ overwrites without backup)
|
||||||
|
- **Backup location**: `claude-backup-{timestamp}/` in installation directory
|
||||||
|
|
||||||
|
**⚠️ Important Warnings:**
|
||||||
|
- `-Force -BackupAll`: Silent file overwrite (with backup)
|
||||||
|
- `-NoBackup -Force`: Permanent file overwrite (no recovery)
|
||||||
|
- Global mode modifies user profile directories
|
||||||
|
|
||||||
### **✅ Verify Installation**
|
### **✅ Verify Installation**
|
||||||
After installation, run the following command to ensure CCW is working:
|
After installation, run the following command to ensure CCW is working:
|
||||||
```bash
|
```bash
|
||||||
/workflow:session:list
|
/workflow:session:list
|
||||||
```
|
```
|
||||||
|
|
||||||
> **📝 Important Notes:**
|
> **📝 Installation Notes:**
|
||||||
> - The installer will automatically install/update `.codex/` and `.gemini/` directories
|
> - The installer will automatically install/update `.codex/` and `.gemini/` directories
|
||||||
> - **Global mode**: Installs to `~/.codex` and `~/.gemini`
|
> - **Global mode**: Installs to `~/.codex` and `~/.gemini`
|
||||||
> - **Path mode**: Installs to your specified directory (e.g., `project/.codex`, `project/.gemini`)
|
> - **Path mode**: Installs to your specified directory (e.g., `project/.codex`, `project/.gemini`)
|
||||||
> - Existing files will be backed up automatically before installation
|
> - **Backup**: Existing files are backed up by default to `claude-backup-{timestamp}/`
|
||||||
|
> - **Safety**: Use interactive mode for first-time installation to review changes
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -142,9 +177,9 @@ After installation, run the following command to ensure CCW is working:
|
|||||||
|
|
||||||
**Phase 4: Testing & Quality Assurance**
|
**Phase 4: Testing & Quality Assurance**
|
||||||
```bash
|
```bash
|
||||||
# Generate comprehensive test suite (standard workflow)
|
# Generate independent test-fix workflow (v3.2.2+)
|
||||||
/workflow:test-gen
|
/workflow:test-gen WFS-auth # Creates WFS-test-auth session
|
||||||
/workflow:execute
|
/workflow:execute # Runs test validation
|
||||||
|
|
||||||
# OR verify TDD compliance (TDD workflow)
|
# OR verify TDD compliance (TDD workflow)
|
||||||
/workflow:tdd-verify
|
/workflow:tdd-verify
|
||||||
@@ -217,7 +252,7 @@ After installation, run the following command to ensure CCW is working:
|
|||||||
| `/workflow:tdd-plan` | Create a Test-Driven Development workflow with Red-Green-Refactor cycles. |
|
| `/workflow:tdd-plan` | Create a Test-Driven Development workflow with Red-Green-Refactor cycles. |
|
||||||
| `/workflow:execute` | Execute the current workflow plan autonomously. |
|
| `/workflow:execute` | Execute the current workflow plan autonomously. |
|
||||||
| `/workflow:status` | Display the current status of the workflow. |
|
| `/workflow:status` | Display the current status of the workflow. |
|
||||||
| `/workflow:test-gen` | Automatically generate a test plan from the implementation. |
|
| `/workflow:test-gen` | Create independent test-fix workflow for validating completed implementation. |
|
||||||
| `/workflow:tdd-verify` | Verify TDD compliance and generate quality report. |
|
| `/workflow:tdd-verify` | Verify TDD compliance and generate quality report. |
|
||||||
| `/workflow:review` | **Optional** manual review (only use when explicitly needed - passing tests = approved code). |
|
| `/workflow:review` | **Optional** manual review (only use when explicitly needed - passing tests = approved code). |
|
||||||
|
|
||||||
@@ -228,11 +263,47 @@ After installation, run the following command to ensure CCW is working:
|
|||||||
| `/task:*` | Manage individual tasks (`create`, `breakdown`, `execute`, `replan`). |
|
| `/task:*` | Manage individual tasks (`create`, `breakdown`, `execute`, `replan`). |
|
||||||
| `/update-memory-full` | Re-index the entire project documentation. |
|
| `/update-memory-full` | Re-index the entire project documentation. |
|
||||||
| `/update-memory-related` | Update documentation related to recent changes. |
|
| `/update-memory-related` | Update documentation related to recent changes. |
|
||||||
|
| `/version` | Display version information and check for updates from GitHub. |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ⚙️ Configuration
|
## ⚙️ Configuration
|
||||||
|
|
||||||
|
### **Prerequisites: Required Tools**
|
||||||
|
|
||||||
|
Before using CCW, install the following command-line tools:
|
||||||
|
|
||||||
|
#### **Core CLI Tools**
|
||||||
|
|
||||||
|
| Tool | Purpose | Installation |
|
||||||
|
|------|---------|--------------|
|
||||||
|
| **Gemini CLI** | AI analysis & documentation | `npm install -g @google/gemini-cli` ([GitHub](https://github.com/google-gemini/gemini-cli)) |
|
||||||
|
| **Codex CLI** | AI development & implementation | `npm install -g @openai/codex` ([GitHub](https://github.com/openai/codex)) |
|
||||||
|
| **Qwen Code** | AI architecture & code generation | `npm install -g @qwen-code/qwen-code` ([Docs](https://github.com/QwenLM/qwen-code)) |
|
||||||
|
|
||||||
|
#### **System Utilities**
|
||||||
|
|
||||||
|
| Tool | Purpose | Installation |
|
||||||
|
|------|---------|--------------|
|
||||||
|
| **ripgrep (rg)** | Fast code search | [Download](https://github.com/BurntSushi/ripgrep/releases) or `brew install ripgrep` (macOS), `apt install ripgrep` (Ubuntu) |
|
||||||
|
| **jq** | JSON processing | [Download](https://jqlang.github.io/jq/download/) or `brew install jq` (macOS), `apt install jq` (Ubuntu) |
|
||||||
|
|
||||||
|
**Quick Install (All Tools):**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# macOS
|
||||||
|
brew install ripgrep jq
|
||||||
|
npm install -g @google/gemini-cli @openai/codex @qwen-code/qwen-code
|
||||||
|
|
||||||
|
# Ubuntu/Debian
|
||||||
|
sudo apt install ripgrep jq
|
||||||
|
npm install -g @google/gemini-cli @openai/codex @qwen-code/qwen-code
|
||||||
|
|
||||||
|
# Windows (Chocolatey)
|
||||||
|
choco install ripgrep jq
|
||||||
|
npm install -g @google/gemini-cli @openai/codex @qwen-code/qwen-code
|
||||||
|
```
|
||||||
|
|
||||||
### **Essential: Gemini CLI Setup**
|
### **Essential: Gemini CLI Setup**
|
||||||
|
|
||||||
Configure Gemini CLI for optimal integration:
|
Configure Gemini CLI for optimal integration:
|
||||||
@@ -240,7 +311,7 @@ Configure Gemini CLI for optimal integration:
|
|||||||
```json
|
```json
|
||||||
// ~/.gemini/settings.json
|
// ~/.gemini/settings.json
|
||||||
{
|
{
|
||||||
"contextFileName": "CLAUDE.md"
|
"contextFileName": ["CLAUDE.md", "GEMINI.md"]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
102
README_CN.md
102
README_CN.md
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
[](https://github.com/catlog22/Claude-Code-Workflow/releases)
|
[](https://github.com/catlog22/Claude-Code-Workflow/releases)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
[]()
|
[]()
|
||||||
[](https://github.com/modelcontextprotocol)
|
[](https://github.com/modelcontextprotocol)
|
||||||
@@ -15,13 +15,14 @@
|
|||||||
|
|
||||||
**Claude Code Workflow (CCW)** 是一个新一代的多智能体自动化开发框架,通过智能工作流管理和自主执行来协调复杂的软件开发任务。
|
**Claude Code Workflow (CCW)** 是一个新一代的多智能体自动化开发框架,通过智能工作流管理和自主执行来协调复杂的软件开发任务。
|
||||||
|
|
||||||
> **🎉 最新版本: v3.2.0** - 采用"测试即审查"理念简化智能体架构。详见 [CHANGELOG.md](CHANGELOG.md)。
|
> **🎉 最新版本: v3.2.3** - 版本管理系统与升级通知。详见 [CHANGELOG.md](CHANGELOG.md)。
|
||||||
>
|
>
|
||||||
> **v3.2.0 版本新特性**:
|
> **v3.2.3 版本新特性**:
|
||||||
> - 🔄 从 3 个智能体简化为 2 个核心智能体(`@code-developer`、`@test-fix-agent`)
|
> - 🔍 新增 `/version` 命令用于检查已安装版本
|
||||||
> - ✅ "测试即审查" - 测试通过 = 代码批准
|
> - 📊 GitHub API 集成,获取最新版本信息
|
||||||
> - 🧪 增强的测试修复工作流,支持自动执行和修复
|
> - 🔄 自动升级通知与建议
|
||||||
> - 📦 交互式安装,包含版本选择菜单
|
> - 📁 支持本地和全局安装的版本跟踪
|
||||||
|
> - ⚡ 一键版本检查,全面展示状态信息
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -94,17 +95,51 @@ bash <(curl -fsSL https://raw.githubusercontent.com/catlog22/Claude-Code-Workflo
|
|||||||
|
|
||||||
> 💡 **提示**:安装程序会自动从 GitHub 检测并显示最新的版本号和发布日期。只需按 Enter 键即可选择推荐的稳定版本。
|
> 💡 **提示**:安装程序会自动从 GitHub 检测并显示最新的版本号和发布日期。只需按 Enter 键即可选择推荐的稳定版本。
|
||||||
|
|
||||||
|
### **📦 本地安装 (Install-Claude.ps1)**
|
||||||
|
|
||||||
|
无需网络访问时,使用内置的 PowerShell 安装脚本:
|
||||||
|
|
||||||
|
**安装模式:**
|
||||||
|
```powershell
|
||||||
|
# 交互式安装(推荐)
|
||||||
|
.\Install-Claude.ps1
|
||||||
|
|
||||||
|
# 快速安装(自动备份)
|
||||||
|
.\Install-Claude.ps1 -Force -BackupAll
|
||||||
|
|
||||||
|
# 非交互式安装
|
||||||
|
.\Install-Claude.ps1 -NonInteractive -Force
|
||||||
|
```
|
||||||
|
|
||||||
|
**安装选项:**
|
||||||
|
|
||||||
|
| 模式 | 描述 | 安装位置 |
|
||||||
|
|------|------|----------|
|
||||||
|
| **Global** | 系统级安装(默认) | `~/.claude/`、`~/.codex/`、`~/.gemini/` |
|
||||||
|
| **Path** | 自定义目录 + 全局混合 | 本地:`agents/`、`commands/`<br>全局:`workflows/`、`scripts/` |
|
||||||
|
|
||||||
|
**备份行为:**
|
||||||
|
- **默认**:自动备份启用(`-BackupAll`)
|
||||||
|
- **禁用**:使用 `-NoBackup` 标志(⚠️ 无备份覆盖)
|
||||||
|
- **备份位置**:安装目录中的 `claude-backup-{timestamp}/`
|
||||||
|
|
||||||
|
**⚠️ 重要警告:**
|
||||||
|
- `-Force -BackupAll`:静默文件覆盖(带备份)
|
||||||
|
- `-NoBackup -Force`:永久文件覆盖(无法恢复)
|
||||||
|
- Global 模式会修改用户配置目录
|
||||||
|
|
||||||
### **✅ 验证安装**
|
### **✅ 验证安装**
|
||||||
安装后,运行以下命令以确保 CCW 正常工作:
|
安装后,运行以下命令以确保 CCW 正常工作:
|
||||||
```bash
|
```bash
|
||||||
/workflow:session:list
|
/workflow:session:list
|
||||||
```
|
```
|
||||||
|
|
||||||
> **📝 重要说明:**
|
> **📝 安装说明:**
|
||||||
> - 安装程序将自动安装/更新 `.codex/` 和 `.gemini/` 目录
|
> - 安装程序将自动安装/更新 `.codex/` 和 `.gemini/` 目录
|
||||||
> - **全局模式**:安装到 `~/.codex` 和 `~/.gemini`
|
> - **全局模式**:安装到 `~/.codex` 和 `~/.gemini`
|
||||||
> - **路径模式**:安装到指定目录(例如 `project/.codex`、`project/.gemini`)
|
> - **路径模式**:安装到指定目录(例如 `project/.codex`、`project/.gemini`)
|
||||||
> - 安装前会自动备份现有文件
|
> - **备份**:默认自动备份现有文件到 `claude-backup-{timestamp}/`
|
||||||
|
> - **安全**:首次安装建议使用交互式模式以审查更改
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -142,15 +177,12 @@ bash <(curl -fsSL https://raw.githubusercontent.com/catlog22/Claude-Code-Workflo
|
|||||||
|
|
||||||
**阶段 4:测试与质量保证**
|
**阶段 4:测试与质量保证**
|
||||||
```bash
|
```bash
|
||||||
# 生成全面测试套件(标准工作流)
|
# 生成独立测试修复工作流(v3.2.2+)
|
||||||
/workflow:test-gen
|
/workflow:test-gen WFS-auth # 创建 WFS-test-auth 会话
|
||||||
/workflow:execute
|
/workflow:execute # 运行测试验证
|
||||||
|
|
||||||
# 或验证 TDD 合规性(TDD 工作流)
|
# 或验证 TDD 合规性(TDD 工作流)
|
||||||
/workflow:tdd-verify
|
/workflow:tdd-verify
|
||||||
|
|
||||||
# 可选:手动审查(仅在明确需要时使用)
|
|
||||||
# /workflow:review # 测试通过 = 代码已批准
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### 简单任务快速入门
|
### 简单任务快速入门
|
||||||
@@ -220,7 +252,7 @@ bash <(curl -fsSL https://raw.githubusercontent.com/catlog22/Claude-Code-Workflo
|
|||||||
| `/workflow:tdd-plan` | 创建测试驱动开发工作流,包含 Red-Green-Refactor 循环。 |
|
| `/workflow:tdd-plan` | 创建测试驱动开发工作流,包含 Red-Green-Refactor 循环。 |
|
||||||
| `/workflow:execute` | 自主执行当前的工作流计划。 |
|
| `/workflow:execute` | 自主执行当前的工作流计划。 |
|
||||||
| `/workflow:status` | 显示工作流的当前状态。 |
|
| `/workflow:status` | 显示工作流的当前状态。 |
|
||||||
| `/workflow:test-gen` | 从实现中自动生成测试计划。 |
|
| `/workflow:test-gen` | 创建独立测试修复工作流,用于验证已完成的实现。 |
|
||||||
| `/workflow:tdd-verify` | 验证 TDD 合规性并生成质量报告。 |
|
| `/workflow:tdd-verify` | 验证 TDD 合规性并生成质量报告。 |
|
||||||
| `/workflow:review` | **可选** 手动审查(仅在明确需要时使用,测试通过即代表代码已批准)。 |
|
| `/workflow:review` | **可选** 手动审查(仅在明确需要时使用,测试通过即代表代码已批准)。 |
|
||||||
|
|
||||||
@@ -231,11 +263,47 @@ bash <(curl -fsSL https://raw.githubusercontent.com/catlog22/Claude-Code-Workflo
|
|||||||
| `/task:*` | 管理单个任务(`create`, `breakdown`, `execute`, `replan`)。 |
|
| `/task:*` | 管理单个任务(`create`, `breakdown`, `execute`, `replan`)。 |
|
||||||
| `/update-memory-full` | 重新索引整个项目文档。 |
|
| `/update-memory-full` | 重新索引整个项目文档。 |
|
||||||
| `/update-memory-related` | 更新与最近更改相关的文档。 |
|
| `/update-memory-related` | 更新与最近更改相关的文档。 |
|
||||||
|
| `/version` | 显示版本信息并检查 GitHub 更新。 |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ⚙️ 配置
|
## ⚙️ 配置
|
||||||
|
|
||||||
|
### **前置要求:必需工具**
|
||||||
|
|
||||||
|
在使用 CCW 之前,请安装以下命令行工具:
|
||||||
|
|
||||||
|
#### **核心 CLI 工具**
|
||||||
|
|
||||||
|
| 工具 | 用途 | 安装方式 |
|
||||||
|
|------|------|----------|
|
||||||
|
| **Gemini CLI** | AI 分析与文档生成 | `npm install -g @google/gemini-cli` ([GitHub](https://github.com/google-gemini/gemini-cli)) |
|
||||||
|
| **Codex CLI** | AI 开发与实现 | `npm install -g @openai/codex` ([GitHub](https://github.com/openai/codex)) |
|
||||||
|
| **Qwen Code** | AI 架构与代码生成 | `npm install -g @qwen-code/qwen-code` ([文档](https://github.com/QwenLM/qwen-code)) |
|
||||||
|
|
||||||
|
#### **系统实用工具**
|
||||||
|
|
||||||
|
| 工具 | 用途 | 安装方式 |
|
||||||
|
|------|------|----------|
|
||||||
|
| **ripgrep (rg)** | 快速代码搜索 | [下载](https://github.com/BurntSushi/ripgrep/releases) 或 `brew install ripgrep` (macOS), `apt install ripgrep` (Ubuntu) |
|
||||||
|
| **jq** | JSON 处理 | [下载](https://jqlang.github.io/jq/download/) 或 `brew install jq` (macOS), `apt install jq` (Ubuntu) |
|
||||||
|
|
||||||
|
**快速安装(所有工具):**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# macOS
|
||||||
|
brew install ripgrep jq
|
||||||
|
npm install -g @google/gemini-cli @openai/codex @qwen-code/qwen-code
|
||||||
|
|
||||||
|
# Ubuntu/Debian
|
||||||
|
sudo apt install ripgrep jq
|
||||||
|
npm install -g @google/gemini-cli @openai/codex @qwen-code/qwen-code
|
||||||
|
|
||||||
|
# Windows (Chocolatey)
|
||||||
|
choco install ripgrep jq
|
||||||
|
npm install -g @google/gemini-cli @openai/codex @qwen-code/qwen-code
|
||||||
|
```
|
||||||
|
|
||||||
### **必需: Gemini CLI 设置**
|
### **必需: Gemini CLI 设置**
|
||||||
|
|
||||||
配置 Gemini CLI 以实现最佳集成:
|
配置 Gemini CLI 以实现最佳集成:
|
||||||
@@ -243,7 +311,7 @@ bash <(curl -fsSL https://raw.githubusercontent.com/catlog22/Claude-Code-Workflo
|
|||||||
```json
|
```json
|
||||||
// ~/.gemini/settings.json
|
// ~/.gemini/settings.json
|
||||||
{
|
{
|
||||||
"contextFileName": "CLAUDE.md"
|
"contextFileName": ["CLAUDE.md", "GEMINI.md"]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,264 +0,0 @@
|
|||||||
# 🚀 Claude Code Workflow (CCW) v2.0.0 Release Notes
|
|
||||||
|
|
||||||
**Release Date**: September 28, 2025
|
|
||||||
**Release Type**: Major Version Release
|
|
||||||
**Repository**: https://github.com/catlog22/Claude-Code-Workflow
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📋 Overview
|
|
||||||
|
|
||||||
Claude Code Workflow v2.0 represents a **major architectural evolution** with significant enhancements to the multi-agent automation framework. This release introduces a comprehensive four-layer architecture, enhanced workflow lifecycle management, and intelligent tech stack detection.
|
|
||||||
|
|
||||||
> **🎯 Upgrade Recommendation**: This is a **breaking change release** with significant architectural improvements. Review the breaking changes section before upgrading.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🌟 Major Features & Enhancements
|
|
||||||
|
|
||||||
### 🏗️ **Four-Layer Architecture (NEW)**
|
|
||||||
|
|
||||||
CCW now operates through four distinct architectural layers with defined responsibilities and data contracts:
|
|
||||||
|
|
||||||
| Layer | Components | Data Flow | Integration Points |
|
|
||||||
|-------|------------|-----------|-------------------|
|
|
||||||
| **🖥️ Interface Layer** | CLI Commands, Gemini/Codex/Qwen Wrappers | User input → Commands → Agents | External CLI tools, approval modes |
|
|
||||||
| **📋 Session Layer** | `.active-[session]` markers, `workflow-session.json` | Session state → Task discovery | Atomic session switching |
|
|
||||||
| **📊 Task/Data Layer** | `.task/impl-*.json`, hierarchy management | Task definitions → Agent execution | JSON-first model, generated views |
|
|
||||||
| **🤖 Orchestration Layer** | Multi-agent coordination, dependency resolution | Agent outputs → Task updates | Intelligent execution flow |
|
|
||||||
|
|
||||||
### 🔄 **Enhanced Workflow Lifecycle**
|
|
||||||
|
|
||||||
Complete development lifecycle with quality gates at each phase:
|
|
||||||
|
|
||||||
1. **💡 Brainstorm Phase** - Multi-perspective conceptual planning with role-based analysis
|
|
||||||
2. **📋 Plan Phase** - Structured implementation planning with task decomposition
|
|
||||||
3. **✅ Verify Phase** - Pre-execution validation using Gemini (strategic) + Codex (technical)
|
|
||||||
4. **⚡ Execute Phase** - Autonomous implementation with multi-agent orchestration
|
|
||||||
5. **🧪 Test Phase** - Automated test workflow generation with comprehensive coverage
|
|
||||||
6. **🔍 Review Phase** - Quality assurance and completion validation
|
|
||||||
|
|
||||||
### 🧪 **Automated Test Generation**
|
|
||||||
|
|
||||||
Comprehensive test workflow creation:
|
|
||||||
- **Implementation Analysis**: Scans completed IMPL-* tasks for test requirements
|
|
||||||
- **Multi-layered Testing**: Unit, Integration, E2E, Performance, Security tests
|
|
||||||
- **Agent Assignment**: Specialized test agents for different test types
|
|
||||||
- **Dependency Mapping**: Test execution follows implementation dependency chains
|
|
||||||
|
|
||||||
### ✅ **Plan Verification System**
|
|
||||||
|
|
||||||
Dual-engine validation before execution:
|
|
||||||
- **Gemini Strategic Analysis**: High-level feasibility and architectural soundness
|
|
||||||
- **Codex Technical Analysis**: Implementation details and technical feasibility
|
|
||||||
- **Cross-Validation**: Identifies conflicts between strategic vision and technical constraints
|
|
||||||
- **Improvement Suggestions**: Actionable recommendations before implementation begins
|
|
||||||
|
|
||||||
### 🧠 **Smart Tech Stack Detection**
|
|
||||||
|
|
||||||
Intelligent task-based loading of technology guidelines:
|
|
||||||
- **Automatic Detection**: Only loads tech stacks for development and code review tasks
|
|
||||||
- **Multi-Language Support**: TypeScript, React, Python, Java, Go, JavaScript
|
|
||||||
- **Performance Optimized**: Skips detection for non-relevant tasks
|
|
||||||
- **Context-Aware**: Applies appropriate tech stack principles to development work
|
|
||||||
|
|
||||||
### 🔮 **Qwen CLI Integration**
|
|
||||||
|
|
||||||
Full integration of Qwen CLI for architecture analysis and code generation:
|
|
||||||
- **Architecture Analysis**: System design patterns and code quality assessment
|
|
||||||
- **Code Generation**: Implementation scaffolding and component creation
|
|
||||||
- **Intelligent Modes**: Auto template selection and precise architectural planning
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📊 New Commands & Capabilities
|
|
||||||
|
|
||||||
### **Issue Management Commands**
|
|
||||||
- `➕ /workflow:issue:create` - Create new project issues with priority and type
|
|
||||||
- `📋 /workflow:issue:list` - List and filter issues by status and assignment
|
|
||||||
- `📝 /workflow:issue:update` - Update existing issue status and assignments
|
|
||||||
- `✅ /workflow:issue:close` - Close completed issues with resolution reasons
|
|
||||||
|
|
||||||
### **Enhanced Workflow Commands**
|
|
||||||
- `✅ /workflow:plan-verify` - Pre-execution validation using dual analysis
|
|
||||||
- `🧪 /workflow:test-gen` - Generate comprehensive test workflows
|
|
||||||
- `🎨 /workflow:brainstorm:artifacts` - Generate structured planning documents
|
|
||||||
- `🔍 /workflow:plan-deep` - Deep technical planning with Gemini analysis
|
|
||||||
|
|
||||||
### **Qwen CLI Commands**
|
|
||||||
- `🔍 /qwen:analyze` - Architecture analysis and code quality assessment
|
|
||||||
- `💬 /qwen:chat` - Direct Qwen interaction for design discussions
|
|
||||||
- `⚡ /qwen:execute` - Intelligent implementation with YOLO permissions
|
|
||||||
- `🚀 /qwen:mode:auto` - Auto template selection and execution
|
|
||||||
- `🐛 /qwen:mode:bug-index` - Bug analysis and fix suggestions
|
|
||||||
- `📋 /qwen:mode:plan` - Architecture planning and analysis
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔧 Technical Improvements
|
|
||||||
|
|
||||||
### **Script & Tool Enhancements**
|
|
||||||
- **gemini-wrapper**: Improved token management and path handling
|
|
||||||
- **qwen-wrapper**: Streamlined execution and simplified interface
|
|
||||||
- **Cross-Platform**: Enhanced Windows path compatibility with proper quoting
|
|
||||||
- **Directory Navigation**: Intelligent context optimization for focused analysis
|
|
||||||
|
|
||||||
### **Agent Improvements**
|
|
||||||
- **Flow Control**: Enhanced sequential execution with context accumulation
|
|
||||||
- **Context Assessment**: Smart tech stack loading for relevant tasks only
|
|
||||||
- **Error Handling**: Improved per-step error strategies
|
|
||||||
- **Variable Passing**: Context transfer between execution steps
|
|
||||||
|
|
||||||
### **Documentation Overhaul**
|
|
||||||
- **Unified Structure**: Aligned English and Chinese documentation
|
|
||||||
- **Command Standardization**: Consistent syntax across all commands
|
|
||||||
- **Architecture Clarity**: Clear data flow and integration point descriptions
|
|
||||||
- **Version Synchronization**: Both language versions now reflect v2.0 features
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📈 Performance & Compatibility
|
|
||||||
|
|
||||||
### **Performance Metrics**
|
|
||||||
| Metric | Performance | Details |
|
|
||||||
|--------|-------------|---------|
|
|
||||||
| 🔄 **Session Switching** | <10ms | Atomic marker file operations |
|
|
||||||
| 📊 **JSON Queries** | <1ms | Direct JSON access, no parsing overhead |
|
|
||||||
| 📝 **Doc Updates** | <30s | Medium projects, intelligent targeting |
|
|
||||||
| 🔍 **Context Loading** | <5s | Complex codebases with caching |
|
|
||||||
| ⚡ **Task Execution** | 10min timeout | Complex operations with error handling |
|
|
||||||
|
|
||||||
### **System Requirements**
|
|
||||||
- **🖥️ OS**: Windows 10+, Ubuntu 18.04+, macOS 10.15+
|
|
||||||
- **📦 Dependencies**: Git, Node.js (Gemini), Python 3.8+ (Codex)
|
|
||||||
- **💾 Storage**: ~50MB core + variable project data
|
|
||||||
- **🧠 Memory**: 512MB minimum, 2GB recommended
|
|
||||||
|
|
||||||
### **Integration Requirements**
|
|
||||||
- **🔍 Gemini CLI**: Required for analysis and strategic planning workflows
|
|
||||||
- **🤖 Codex CLI**: Required for autonomous development and bug fixing
|
|
||||||
- **🔮 Qwen CLI**: Required for architecture analysis and code generation
|
|
||||||
- **📂 Git Repository**: Required for change tracking and version control
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ⚠️ Breaking Changes
|
|
||||||
|
|
||||||
### **Removed Components**
|
|
||||||
- **Python CLI Backend**: All `pycli` references and related scripts removed
|
|
||||||
- **Deprecated Scripts**: `install_pycli.sh`, `pycli`, `pycli.conf`, `tech-stack-loader.sh`
|
|
||||||
- **Legacy Commands**: Old path reading scripts and unused Python tools
|
|
||||||
|
|
||||||
### **Command Syntax Changes**
|
|
||||||
- **Session Commands**: `/workflow:session list` → `/workflow:session:list`
|
|
||||||
- **File Naming**: Standardized to lowercase `.task/impl-*.json`
|
|
||||||
- **Session Markers**: Unified format `.active-[session]`
|
|
||||||
|
|
||||||
### **Architecture Changes**
|
|
||||||
- **Data Model**: Migrated to JSON-first architecture
|
|
||||||
- **Session Management**: Atomic marker-based system
|
|
||||||
- **Task Structure**: Standardized hierarchy and status management
|
|
||||||
|
|
||||||
### **Configuration Updates**
|
|
||||||
Required Gemini CLI configuration:
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"contextFileName": "CLAUDE.md"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🚀 Migration Guide
|
|
||||||
|
|
||||||
### **From v1.x to v2.0**
|
|
||||||
|
|
||||||
1. **Update Configuration**:
|
|
||||||
```bash
|
|
||||||
# Update Gemini CLI settings
|
|
||||||
echo '{"contextFileName": "CLAUDE.md"}' > ~/.gemini/settings.json
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Clean Legacy Files**:
|
|
||||||
```bash
|
|
||||||
# Remove old Python CLI references
|
|
||||||
rm -f .claude/scripts/pycli*
|
|
||||||
rm -f .claude/scripts/install_pycli.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Update Command Usage**:
|
|
||||||
```bash
|
|
||||||
# Old syntax
|
|
||||||
/workflow:session list
|
|
||||||
|
|
||||||
# New syntax
|
|
||||||
/workflow:session:list
|
|
||||||
```
|
|
||||||
|
|
||||||
4. **Verify Installation**:
|
|
||||||
```bash
|
|
||||||
/workflow:session:list
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📚 Documentation & Resources
|
|
||||||
|
|
||||||
### **Updated Documentation**
|
|
||||||
- **README.md**: Complete v2.0 feature documentation
|
|
||||||
- **README_CN.md**: Chinese documentation with v2.0 alignment
|
|
||||||
- **Architecture Guides**: Four-layer system documentation
|
|
||||||
- **Command Reference**: Comprehensive CLI command tables
|
|
||||||
|
|
||||||
### **Quick Start**
|
|
||||||
```bash
|
|
||||||
# Install CCW v2.0
|
|
||||||
Invoke-Expression (Invoke-WebRequest -Uri "https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.ps1" -UseBasicParsing).Content
|
|
||||||
|
|
||||||
# Verify installation
|
|
||||||
/workflow:session:list
|
|
||||||
|
|
||||||
# Start first workflow
|
|
||||||
/workflow:session:start "My First Project"
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🤝 Contributing & Support
|
|
||||||
|
|
||||||
### **Development**
|
|
||||||
- **GitHub**: https://github.com/catlog22/Claude-Code-Workflow
|
|
||||||
- **Issues**: https://github.com/catlog22/Claude-Code-Workflow/issues
|
|
||||||
- **Discussions**: https://github.com/catlog22/Claude-Code-Workflow/discussions
|
|
||||||
|
|
||||||
### **Community**
|
|
||||||
- **Documentation**: [Project Wiki](https://github.com/catlog22/Claude-Code-Workflow/wiki)
|
|
||||||
- **Changelog**: [Release History](CHANGELOG.md)
|
|
||||||
- **License**: MIT License
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🙏 Acknowledgments
|
|
||||||
|
|
||||||
Special thanks to the community for feedback and contributions that made v2.0 possible. This release represents a significant step forward in automated development workflow capabilities.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**🚀 Claude Code Workflow v2.0**
|
|
||||||
|
|
||||||
*Professional software development workflow automation through intelligent multi-agent coordination and autonomous execution capabilities.*
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📝 Commit History Summary
|
|
||||||
|
|
||||||
This release includes 15+ commits spanning major architectural improvements:
|
|
||||||
|
|
||||||
- **5d08c53**: Smart tech stack detection for agents
|
|
||||||
- **b956943**: Workflow architecture documentation updates
|
|
||||||
- **8baca52**: README v2.0 alignment and four-layer architecture
|
|
||||||
- **0756682**: Python CLI cleanup and modernization
|
|
||||||
- **be4db94**: Concept evaluation framework addition
|
|
||||||
- **817f51c**: Qwen CLI integration and task commands
|
|
||||||
|
|
||||||
For complete commit history, see: [GitHub Commits](https://github.com/catlog22/Claude-Code-Workflow/commits/main)
|
|
||||||
@@ -1,142 +0,0 @@
|
|||||||
# 🔧 Claude Code Workflow (CCW) v3.2.1 Release Notes
|
|
||||||
|
|
||||||
**Release Date**: October 2, 2025
|
|
||||||
**Release Type**: Patch Release - Documentation Fix
|
|
||||||
**Repository**: https://github.com/catlog22/Claude-Code-Workflow
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📋 Overview
|
|
||||||
|
|
||||||
CCW v3.2.1 is a critical documentation fix release that corrects `workflow-session.json` path references throughout the brainstorming workflow documentation. This ensures consistency with the architecture specification defined in `workflow-architecture.md`.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🐛 Bug Fixes
|
|
||||||
|
|
||||||
### **Documentation Path Corrections**
|
|
||||||
|
|
||||||
**Issue**: Documentation incorrectly referenced `workflow-session.json` inside the `.brainstorming/` subdirectory
|
|
||||||
|
|
||||||
**Impact**:
|
|
||||||
- Confusing path references in 9 brainstorming role documentation files
|
|
||||||
- Inconsistency with architectural specifications
|
|
||||||
- Potential runtime errors when commands attempt to read session metadata
|
|
||||||
|
|
||||||
**Fixed Files** (9 total):
|
|
||||||
1. ✅ `data-architect.md`
|
|
||||||
2. ✅ `product-manager.md`
|
|
||||||
3. ✅ `product-owner.md`
|
|
||||||
4. ✅ `scrum-master.md`
|
|
||||||
5. ✅ `subject-matter-expert.md`
|
|
||||||
6. ✅ `ui-designer.md`
|
|
||||||
7. ✅ `ux-expert.md`
|
|
||||||
8. ✅ `auto-parallel.md`
|
|
||||||
9. ✅ `artifacts.md`
|
|
||||||
|
|
||||||
**Corrections Applied**:
|
|
||||||
- ❌ **Incorrect**: `.workflow/WFS-{session}/.brainstorming/workflow-session.json`
|
|
||||||
- ✅ **Correct**: `.workflow/WFS-{session}/workflow-session.json`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📐 Architecture Alignment
|
|
||||||
|
|
||||||
### Confirmed Standard Structure
|
|
||||||
```
|
|
||||||
.workflow/WFS-[topic-slug]/
|
|
||||||
├── workflow-session.json # ✅ Session metadata (root level)
|
|
||||||
├── .brainstorming/ # Brainstorming artifacts subdirectory
|
|
||||||
│ └── topic-framework.md
|
|
||||||
├── IMPL_PLAN.md
|
|
||||||
├── TODO_LIST.md
|
|
||||||
└── .task/
|
|
||||||
└── IMPL-*.json
|
|
||||||
```
|
|
||||||
|
|
||||||
### Key Points
|
|
||||||
- `workflow-session.json` is **always at session root level**
|
|
||||||
- `.brainstorming/` directory contains **only** framework and analysis files
|
|
||||||
- No session metadata files inside subdirectories
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📊 Changes Summary
|
|
||||||
|
|
||||||
| Category | Files Changed | Lines Modified |
|
|
||||||
|----------|--------------|----------------|
|
|
||||||
| Documentation Fixes | 9 | 19 insertions, 18 deletions |
|
|
||||||
| Path Corrections | 8 role files | 2 corrections per file |
|
|
||||||
| Structure Clarifications | 1 artifacts file | Added architectural note |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ✅ Verification
|
|
||||||
|
|
||||||
**Pre-Release Checks**:
|
|
||||||
- ✅ No incorrect `.brainstorming/workflow-session.json` references
|
|
||||||
- ✅ No legacy `session.json` references
|
|
||||||
- ✅ All brainstorming roles use correct paths
|
|
||||||
- ✅ Architecture consistency verified with Gemini analysis
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔄 Upgrade Instructions
|
|
||||||
|
|
||||||
### For Existing Users
|
|
||||||
|
|
||||||
**No action required** - This is a documentation-only fix.
|
|
||||||
|
|
||||||
1. Pull the latest changes:
|
|
||||||
```bash
|
|
||||||
git pull origin main
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Review updated documentation:
|
|
||||||
- `.claude/commands/workflow/brainstorm/*.md`
|
|
||||||
|
|
||||||
### For New Users
|
|
||||||
|
|
||||||
Simply clone the repository with the correct documentation:
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/catlog22/Claude-Code-Workflow.git
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📚 Related Documentation
|
|
||||||
|
|
||||||
- **Architecture Reference**: `.claude/workflows/workflow-architecture.md`
|
|
||||||
- **Brainstorming Commands**: `.claude/commands/workflow/brainstorm/`
|
|
||||||
- **Session Management**: `.claude/commands/workflow/session/`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🙏 Acknowledgments
|
|
||||||
|
|
||||||
Special thanks to the analysis tools used in this fix:
|
|
||||||
- **Gemini CLI**: Path verification and consistency checking
|
|
||||||
- **Codex**: Initial codebase analysis
|
|
||||||
- **Claude Code**: Documentation review and corrections
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔗 Links
|
|
||||||
|
|
||||||
- **Full Changelog**: [v3.2.0...v3.2.1](https://github.com/catlog22/Claude-Code-Workflow/compare/v3.2.0...v3.2.1)
|
|
||||||
- **Issues Fixed**: Documentation consistency issue
|
|
||||||
- **Previous Release**: [v3.2.0 Release Notes](RELEASE_NOTES_v3.2.0.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📝 Notes
|
|
||||||
|
|
||||||
- This is a **non-breaking change** - existing workflows will continue to function
|
|
||||||
- Documentation now correctly reflects the implemented architecture
|
|
||||||
- No code changes were necessary - this was purely a documentation correction
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Contributors**: Claude Code Development Team
|
|
||||||
**License**: MIT
|
|
||||||
**Support**: [GitHub Issues](https://github.com/catlog22/Claude-Code-Workflow/issues)
|
|
||||||
252
RELEASE_NOTES_v3.2.3.md
Normal file
252
RELEASE_NOTES_v3.2.3.md
Normal file
@@ -0,0 +1,252 @@
|
|||||||
|
# v3.2.3 - Version Management System
|
||||||
|
|
||||||
|
## 🎉 Release Date
|
||||||
|
2025-10-03
|
||||||
|
|
||||||
|
## ✨ Overview
|
||||||
|
|
||||||
|
This release introduces a comprehensive version management and upgrade notification system, making it easy to track your Claude Code Workflow installation and stay up-to-date with the latest releases.
|
||||||
|
|
||||||
|
## 🆕 New Features
|
||||||
|
|
||||||
|
### `/version` Command
|
||||||
|
|
||||||
|
A powerful new command that provides complete version information and automatic update checking:
|
||||||
|
|
||||||
|
**Features:**
|
||||||
|
- 📊 **Version Display**: Shows both local and global installation versions
|
||||||
|
- 🌐 **GitHub Integration**: Fetches latest stable release and development commits
|
||||||
|
- 🔄 **Smart Comparison**: Automatically compares installed version with latest available
|
||||||
|
- 💡 **Upgrade Recommendations**: Provides installation commands for easy upgrading
|
||||||
|
- ⚡ **Fast Execution**: 30-second timeout for network calls, graceful offline handling
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
```bash
|
||||||
|
/version
|
||||||
|
```
|
||||||
|
|
||||||
|
**Example Output:**
|
||||||
|
```
|
||||||
|
Installation Status:
|
||||||
|
- Local: No project-specific installation
|
||||||
|
- Global: ✅ Installed at ~/.claude
|
||||||
|
- Version: v3.2.3
|
||||||
|
- Installed: 2025-10-03T05:01:34Z
|
||||||
|
|
||||||
|
Latest Releases:
|
||||||
|
- Stable: v3.2.3 (2025-10-03T04:10:08Z)
|
||||||
|
- v3.2.3: Version Management System
|
||||||
|
- Latest Commit: c5c36a2 (2025-10-03T05:00:06Z)
|
||||||
|
- fix: Optimize version command API calls and data extraction
|
||||||
|
|
||||||
|
Status: ✅ You are on the latest stable version (3.2.3)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Version Tracking System
|
||||||
|
|
||||||
|
**Version Files:**
|
||||||
|
- `.claude/version.json` - Local project installation tracking
|
||||||
|
- `~/.claude/version.json` - Global installation tracking
|
||||||
|
|
||||||
|
**Tracked Information:**
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"version": "v3.2.3",
|
||||||
|
"installation_mode": "Global",
|
||||||
|
"installation_path": "C:\\Users\\username\\.claude",
|
||||||
|
"source_branch": "main",
|
||||||
|
"installation_date_utc": "2025-10-03T05:01:34Z"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### GitHub API Integration
|
||||||
|
|
||||||
|
**Endpoints Used:**
|
||||||
|
- **Latest Release**: `https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest`
|
||||||
|
- Extracts: tag_name, release name, published date
|
||||||
|
- **Latest Commit**: `https://api.github.com/repos/catlog22/Claude-Code-Workflow/commits/main`
|
||||||
|
- Extracts: commit SHA, message, author date
|
||||||
|
|
||||||
|
**Network Handling:**
|
||||||
|
- 30-second timeout for slow connections
|
||||||
|
- Graceful error handling for offline scenarios
|
||||||
|
- No external dependencies (uses curl and grep/sed)
|
||||||
|
|
||||||
|
## 🔄 What's Changed
|
||||||
|
|
||||||
|
### Documentation Updates
|
||||||
|
|
||||||
|
**Updated Files:**
|
||||||
|
- ✅ `CHANGELOG.md` - Added comprehensive v3.2.3 release notes
|
||||||
|
- ✅ `README.md` - Updated version badge to v3.2.3, added `/version` command
|
||||||
|
- ✅ `README_CN.md` - Updated version badge and command reference (Chinese)
|
||||||
|
- ✅ `.claude/commands/version.md` - Complete implementation guide
|
||||||
|
|
||||||
|
**Version References:**
|
||||||
|
- All version badges updated from v3.2.2 to v3.2.3
|
||||||
|
- "What's New" sections updated with v3.2.3 features
|
||||||
|
- Command reference tables include `/version` command
|
||||||
|
|
||||||
|
### Installation Scripts Enhancement
|
||||||
|
|
||||||
|
**Future Enhancement** (for next release):
|
||||||
|
- Installation scripts will automatically create `version.json` files
|
||||||
|
- Track installation mode (local vs global)
|
||||||
|
- Record installation timestamp
|
||||||
|
- Support version tracking for both stable and development installations
|
||||||
|
|
||||||
|
## 📋 Version Comparison Scenarios
|
||||||
|
|
||||||
|
### Scenario 1: Up to Date
|
||||||
|
```
|
||||||
|
✅ You are on the latest stable version (3.2.3)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Scenario 2: Upgrade Available
|
||||||
|
```
|
||||||
|
⬆️ A newer stable version is available: v3.2.4
|
||||||
|
Your version: 3.2.3
|
||||||
|
|
||||||
|
To upgrade:
|
||||||
|
PowerShell: iex (iwr -useb https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.ps1)
|
||||||
|
Bash: bash <(curl -fsSL https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.sh)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Scenario 3: Development Version
|
||||||
|
```
|
||||||
|
✨ You are running a development version (3.3.0-dev)
|
||||||
|
This is newer than the latest stable release (v3.2.3)
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🛠️ Technical Details
|
||||||
|
|
||||||
|
### Implementation Highlights
|
||||||
|
|
||||||
|
**Simple Bash Commands:**
|
||||||
|
- No jq dependency required (uses grep/sed for JSON parsing)
|
||||||
|
- Cross-platform compatible (Windows Git Bash, Linux, macOS)
|
||||||
|
- Version comparison using `sort -V` for semantic versioning
|
||||||
|
- Direct API access using curl with error suppression
|
||||||
|
|
||||||
|
**Command Structure:**
|
||||||
|
```bash
|
||||||
|
# Check local version
|
||||||
|
test -f ./.claude/version.json && cat ./.claude/version.json
|
||||||
|
|
||||||
|
# Check global version
|
||||||
|
test -f ~/.claude/version.json && cat ~/.claude/version.json
|
||||||
|
|
||||||
|
# Fetch latest release (with timeout)
|
||||||
|
curl -fsSL "https://api.github.com/repos/catlog22/Claude-Code-Workflow/releases/latest" 2>/dev/null
|
||||||
|
|
||||||
|
# Extract version
|
||||||
|
grep -o '"tag_name": *"[^"]*"' | cut -d'"' -f4
|
||||||
|
|
||||||
|
# Compare versions
|
||||||
|
printf "%s\n%s" "3.2.2" "3.2.3" | sort -V | tail -n 1
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📊 Benefits
|
||||||
|
|
||||||
|
### User Experience
|
||||||
|
- 🔍 **Quick version check** with single command
|
||||||
|
- 📊 **Comprehensive information** display (local, global, stable, dev)
|
||||||
|
- 🔄 **Automatic upgrade notifications** when new versions available
|
||||||
|
- 📈 **Development version tracking** for cutting-edge features
|
||||||
|
- 🌐 **GitHub integration** for latest updates
|
||||||
|
|
||||||
|
### DevOps
|
||||||
|
- 📁 **Version tracking** in both local and global installations
|
||||||
|
- 🕐 **Installation timestamp** for audit trails
|
||||||
|
- 🔀 **Support for both stable and development** branches
|
||||||
|
- ⚡ **Fast execution** with 30-second network timeout
|
||||||
|
- 🛡️ **Graceful error handling** for offline scenarios
|
||||||
|
|
||||||
|
## 🔗 Related Commands
|
||||||
|
|
||||||
|
- `/cli:cli-init` - Initialize CLI tool configurations
|
||||||
|
- `/workflow:session:list` - List workflow sessions
|
||||||
|
- `/update-memory-full` - Update project documentation
|
||||||
|
|
||||||
|
## 📦 Installation
|
||||||
|
|
||||||
|
### Fresh Installation
|
||||||
|
|
||||||
|
**Windows (PowerShell):**
|
||||||
|
```powershell
|
||||||
|
iex (iwr -useb https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.ps1)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Linux/macOS (Bash):**
|
||||||
|
```bash
|
||||||
|
bash <(curl -fsSL https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.sh)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Upgrade from v3.2.2
|
||||||
|
|
||||||
|
Use the same installation commands above. The installer will automatically:
|
||||||
|
1. Detect your existing installation
|
||||||
|
2. Back up current files (if using `-BackupAll`)
|
||||||
|
3. Update to v3.2.3
|
||||||
|
4. Create/update `version.json` files
|
||||||
|
|
||||||
|
## 🐛 Bug Fixes
|
||||||
|
|
||||||
|
- Fixed commit message extraction to handle JSON escape sequences
|
||||||
|
- Improved API endpoint from `/branches/main` to `/commits/main` for reliable commit info
|
||||||
|
- Added 30-second timeout to all network calls for slow connections
|
||||||
|
- Enhanced release name and published date extraction
|
||||||
|
|
||||||
|
## 📚 Documentation
|
||||||
|
|
||||||
|
### New Documentation
|
||||||
|
- `.claude/commands/version.md` - Complete command implementation guide
|
||||||
|
- API endpoints and usage
|
||||||
|
- Timeout configuration
|
||||||
|
- Error handling scenarios
|
||||||
|
- Simple bash command examples
|
||||||
|
|
||||||
|
### Updated Documentation
|
||||||
|
- `CHANGELOG.md` - v3.2.3 release notes
|
||||||
|
- `README.md` - Version badge and command reference
|
||||||
|
- `README_CN.md` - Chinese version updates
|
||||||
|
|
||||||
|
## 🙏 Credits
|
||||||
|
|
||||||
|
This release includes contributions and improvements based on:
|
||||||
|
- GitHub API integration for version detection
|
||||||
|
- Cross-platform bash command compatibility
|
||||||
|
- User feedback on installation and upgrade processes
|
||||||
|
|
||||||
|
## 📝 Notes
|
||||||
|
|
||||||
|
- **Backward Compatible**: All existing commands and workflows continue to work
|
||||||
|
- **No Breaking Changes**: This is a minor release with new features only
|
||||||
|
- **Optional Feature**: `/version` command is entirely optional, existing workflows unaffected
|
||||||
|
|
||||||
|
## 🚀 What's Next
|
||||||
|
|
||||||
|
**Planned for v3.2.4:**
|
||||||
|
- Enhanced installation script to auto-create version.json
|
||||||
|
- Version tracking in all installation modes
|
||||||
|
- Automatic version detection during installation
|
||||||
|
|
||||||
|
**Future Enhancements:**
|
||||||
|
- Auto-update functionality (opt-in)
|
||||||
|
- Version comparison in workflow sessions
|
||||||
|
- Release notes display in CLI
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Full Changelog**: [v3.2.2...v3.2.3](https://github.com/catlog22/Claude-Code-Workflow/compare/v3.2.2...v3.2.3)
|
||||||
|
|
||||||
|
**Installation:**
|
||||||
|
```bash
|
||||||
|
# One-line install (recommended)
|
||||||
|
bash <(curl -fsSL https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.sh)
|
||||||
|
|
||||||
|
# Or use specific version tag
|
||||||
|
git clone -b v3.2.3 https://github.com/catlog22/Claude-Code-Workflow.git
|
||||||
|
```
|
||||||
|
|
||||||
|
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
||||||
@@ -258,23 +258,25 @@ function Extract-Repository {
|
|||||||
|
|
||||||
function Invoke-LocalInstaller {
|
function Invoke-LocalInstaller {
|
||||||
param(
|
param(
|
||||||
[string]$RepoDir
|
[string]$RepoDir,
|
||||||
|
[string]$VersionInfo = "",
|
||||||
|
[string]$BranchInfo = ""
|
||||||
)
|
)
|
||||||
|
|
||||||
$installerPath = Join-Path $RepoDir "Install-Claude.ps1"
|
$installerPath = Join-Path $RepoDir "Install-Claude.ps1"
|
||||||
|
|
||||||
if (-not (Test-Path $installerPath)) {
|
if (-not (Test-Path $installerPath)) {
|
||||||
Write-ColorOutput "ERROR: Install-Claude.ps1 not found" $ColorError
|
Write-ColorOutput "ERROR: Install-Claude.ps1 not found" $ColorError
|
||||||
return $false
|
return $false
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-ColorOutput "Running local installer..." $ColorInfo
|
Write-ColorOutput "Running local installer..." $ColorInfo
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|
||||||
# Build parameters for local installer
|
# Build parameters for local installer
|
||||||
$params = @{}
|
$params = @{}
|
||||||
if ($Global) { $params["InstallMode"] = "Global" }
|
if ($Global) { $params["InstallMode"] = "Global" }
|
||||||
if ($Directory) {
|
if ($Directory) {
|
||||||
$params["InstallMode"] = "Custom"
|
$params["InstallMode"] = "Custom"
|
||||||
$params["TargetPath"] = $Directory
|
$params["TargetPath"] = $Directory
|
||||||
}
|
}
|
||||||
@@ -282,11 +284,15 @@ function Invoke-LocalInstaller {
|
|||||||
if ($NoBackup) { $params["NoBackup"] = $NoBackup }
|
if ($NoBackup) { $params["NoBackup"] = $NoBackup }
|
||||||
if ($NonInteractive) { $params["NonInteractive"] = $NonInteractive }
|
if ($NonInteractive) { $params["NonInteractive"] = $NonInteractive }
|
||||||
if ($BackupAll) { $params["BackupAll"] = $BackupAll }
|
if ($BackupAll) { $params["BackupAll"] = $BackupAll }
|
||||||
|
|
||||||
|
# Pass version and branch information
|
||||||
|
if ($VersionInfo) { $params["SourceVersion"] = $VersionInfo }
|
||||||
|
if ($BranchInfo) { $params["SourceBranch"] = $BranchInfo }
|
||||||
|
|
||||||
try {
|
try {
|
||||||
# Change to repo directory and run installer
|
# Change to repo directory and run installer
|
||||||
Push-Location $RepoDir
|
Push-Location $RepoDir
|
||||||
|
|
||||||
if ($params.Count -gt 0) {
|
if ($params.Count -gt 0) {
|
||||||
$paramList = ($params.GetEnumerator() | ForEach-Object { "-$($_.Key) $($_.Value)" }) -join " "
|
$paramList = ($params.GetEnumerator() | ForEach-Object { "-$($_.Key) $($_.Value)" }) -join " "
|
||||||
Write-ColorOutput "Executing: & `"$installerPath`" $paramList" $ColorInfo
|
Write-ColorOutput "Executing: & `"$installerPath`" $paramList" $ColorInfo
|
||||||
@@ -295,7 +301,7 @@ function Invoke-LocalInstaller {
|
|||||||
Write-ColorOutput "Executing: & `"$installerPath`"" $ColorInfo
|
Write-ColorOutput "Executing: & `"$installerPath`"" $ColorInfo
|
||||||
& $installerPath
|
& $installerPath
|
||||||
}
|
}
|
||||||
|
|
||||||
Pop-Location
|
Pop-Location
|
||||||
return $true
|
return $true
|
||||||
} catch {
|
} catch {
|
||||||
@@ -542,26 +548,32 @@ function Main {
|
|||||||
# Create temp directory
|
# Create temp directory
|
||||||
$tempDir = Get-TempDirectory
|
$tempDir = Get-TempDirectory
|
||||||
Write-ColorOutput "Temporary directory: $tempDir" $ColorInfo
|
Write-ColorOutput "Temporary directory: $tempDir" $ColorInfo
|
||||||
|
|
||||||
try {
|
try {
|
||||||
# Download repository
|
# Download repository
|
||||||
$zipPath = Download-Repository -TempDir $tempDir -Version $Version -Branch $Branch -Tag $Tag
|
$zipPath = Download-Repository -TempDir $tempDir -Version $Version -Branch $Branch -Tag $Tag
|
||||||
if (-not $zipPath) {
|
if (-not $zipPath) {
|
||||||
throw "Download failed"
|
throw "Download failed"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Extract repository
|
# Extract repository
|
||||||
$repoDir = Extract-Repository $zipPath $tempDir
|
$repoDir = Extract-Repository $zipPath $tempDir
|
||||||
if (-not $repoDir) {
|
if (-not $repoDir) {
|
||||||
throw "Extraction failed"
|
throw "Extraction failed"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run local installer
|
# Determine version and branch information to pass
|
||||||
$success = Invoke-LocalInstaller $repoDir
|
$versionToPass = if ($Tag) { $Tag } else { "latest" }
|
||||||
|
$branchToPass = if ($Version -eq "branch") { $Branch } elseif ($Version -eq "latest") { "main" } elseif ($Tag) { $Tag } else { "main" }
|
||||||
|
|
||||||
|
Write-ColorOutput "Version info: $versionToPass (branch: $branchToPass)" $ColorInfo
|
||||||
|
|
||||||
|
# Run local installer with version information
|
||||||
|
$success = Invoke-LocalInstaller -RepoDir $repoDir -VersionInfo $versionToPass -BranchInfo $branchToPass
|
||||||
if (-not $success) {
|
if (-not $success) {
|
||||||
throw "Installation script failed"
|
throw "Installation script failed"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
Write-ColorOutput "Remote installation completed successfully!" $ColorSuccess
|
Write-ColorOutput "Remote installation completed successfully!" $ColorSuccess
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user