mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-13 02:41:50 +08:00
refactor: standardize UI design workflow folder naming and add absolute path conversion
Unified folder naming format across all UI design commands:
- Session mode: .workflow/WFS-{session}/design-run-YYYYMMDD-RANDOM
- Standalone mode: .workflow/.design/design-run-YYYYMMDD-RANDOM
Key changes:
- Standardized run directory naming to design-run-* format
- Added absolute path conversion for all base_path variables
- Updated path discovery patterns from design-* to design-run-*
- Maintained backward compatibility for existing directory discovery
Modified commands (10 files):
- explore-auto.md, imitate-auto.md: Unified standalone path format
- explore-layers.md: Changed from design-layers-* to design-run-*
- capture.md: Added design- prefix to standalone mode
- animation-extract.md, style-extract.md, layout-extract.md,
generate.md, batch-generate.md: Added absolute path conversion
- update.md: Updated path discovery pattern
Technical improvements:
- Eliminates path ambiguity between command and agent execution contexts
- Ensures all file operations use absolute paths for reliability
- Provides consistent directory structure across workflows
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -38,17 +38,21 @@ IF depth NOT IN [1, 2, 3, 4, 5]:
|
||||
|
||||
### Step 2: Determine Base Path
|
||||
```bash
|
||||
bash(if [ -n "$BASE_PATH" ]; then
|
||||
relative_path=$(if [ -n "$BASE_PATH" ]; then
|
||||
echo "$BASE_PATH"
|
||||
elif [ -n "$SESSION_ID" ]; then
|
||||
find .workflow/WFS-$SESSION_ID/design-* -type d | head -1 || \
|
||||
echo ".workflow/WFS-$SESSION_ID/design-layers-$(date +%Y%m%d-%H%M%S)"
|
||||
echo ".workflow/WFS-$SESSION_ID/design-run-$(date +%Y%m%d)-$RANDOM"
|
||||
else
|
||||
echo ".workflow/.design/layers-$(date +%Y%m%d-%H%M%S)"
|
||||
echo ".workflow/.design/design-run-$(date +%Y%m%d)-$RANDOM"
|
||||
fi)
|
||||
|
||||
# Create directory structure and convert to absolute path
|
||||
bash(mkdir -p "$relative_path")
|
||||
base_path=$(cd "$relative_path" && pwd)
|
||||
|
||||
# Create depth directories
|
||||
bash(for i in $(seq 1 $depth); do mkdir -p $BASE_PATH/screenshots/depth-$i; done)
|
||||
bash(for i in $(seq 1 $depth); do mkdir -p "$base_path"/screenshots/depth-$i; done)
|
||||
```
|
||||
|
||||
**Output**: `url`, `depth`, `base_path`
|
||||
|
||||
Reference in New Issue
Block a user