Files
Claude-Code-Workflow/CHANGELOG-v4.1.0.md
catlog22 ad32e7f4a2 docs: move CHANGELOG files to root directory
Move version changelogs to project root for better visibility:
- CHANGELOG-v4.1.0.md (Pure matrix mode + path corrections)
- CHANGELOG-v4.1.1.md (Windows symlink fix + agent optimization)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 11:37:25 +08:00

303 lines
7.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# UI Design Workflow v4.1.0 - 纯矩阵模式 + 路径修正
## 📋 发布日期
2025-10-09
## 🎯 核心变更
### 1. 矩阵模式成为唯一模式
- ❌ 移除 standard/creative 模式选择
- ✅ 3×3 矩阵生成为默认且唯一模式
- ✅ 直接支持 `--style-variants``--layout-variants` 参数
### 2. 路径符合workflow架构
- ✅ 有session: `.workflow/WFS-{session_id}/runs/run-xxx/`
- ✅ 无session: `.workflow/.scratchpad/{session_id}/runs/run-xxx/`
- ✅ 模板移至全局: `~/.claude/workflows/_template-compare-matrix.html`
---
## 📝 文件修改清单
### 核心命令文件
| 文件 | 主要变更 | 状态 |
|------|---------|------|
| **auto.md** | 删除模式选择简化Phase 3修正路径 | ✅ 已完成 |
| **generate.md** | 完全重构为矩阵模式,集成模板 | ✅ 已完成 |
| **consolidate.md** | 修正standalone路径 | ✅ 已完成 |
| **extract.md** | 修正standalone路径 | ✅ 已完成 |
| **update.md** | 仅session模式无需修改 | ✅ 保持不变 |
### 新增文件
-`~/.claude/workflows/_template-compare-matrix.html` - 交互式矩阵可视化模板
---
## 🔄 参数变更
### 旧参数(废弃)
```bash
--variants <count> # 统一变种数
--creative-variants <count> # 创意变种数
--matrix-mode # 模式标志
```
### 新参数v4.1.0
```bash
--style-variants <count> # 风格变种数默认3
--layout-variants <count> # 布局变种数默认3
# 矩阵为默认模式,无需标志
```
---
## 🚀 工作流对比
### v4.0.x旧版
```bash
/workflow:ui-design:auto --variants 3 --creative-variants 4
# 问题:
# - 参数混淆variants vs creative-variants
# - 模式选择复杂
# - standalone输出到项目根目录
```
### v4.1.0(新版)
```bash
/workflow:ui-design:auto --style-variants 3 --layout-variants 3
# 优势:
# - 参数语义清晰
# - 唯一矩阵模式
# - 输出到 .workflow/.scratchpad/
# - 总计: 3×3×N 个原型
```
---
## 📊 路径架构
### Standalone模式无session
```
.workflow/.scratchpad/
└── design-session-20251009-101530/
└── runs/
├── run-20251009-101530/
│ └── .design/
│ ├── style-extraction/style-cards.json
│ ├── style-consolidation/
│ │ ├── style-1/design-tokens.json
│ │ ├── style-2/design-tokens.json
│ │ └── style-3/design-tokens.json
│ └── prototypes/
│ ├── compare.html (交互式3×3矩阵)
│ ├── index.html
│ └── {page}-style-{s}-layout-{l}.html
└── latest -> run-20251009-101530/
```
### 集成模式有session
```
.workflow/WFS-auth-system/
├── workflow-session.json
├── IMPL_PLAN.md
├── .brainstorming/synthesis-specification.md
└── runs/
├── run-20251009-101530/
│ └── .design/ (同上)
└── latest -> run-20251009-101530/
```
---
## 🔧 核心改进
### 1. 简化架构
- **auto.md Phase 3**: 从复杂并行Task循环简化为单一命令
```bash
# 旧方式30+行)
FOR style_id IN range(...):
Task(conceptual-planning-agent): "..."
# 新方式3行
command = "/workflow:ui-design:generate --style-variants {s} --layout-variants {l}"
SlashCommand(command=command)
```
### 2. 路径规范化
```bash
# auto.md - Phase 0b
IF --session:
base_path = ".workflow/WFS-{session_id}/runs/${run_id}"
ELSE:
base_path = ".workflow/.scratchpad/${session_id}/runs/${run_id}"
# generate/consolidate/extract
base_path = find_latest_design_session(".workflow/.scratchpad/")
```
### 3. 可视化增强
- 集成高级 `_template-compare-matrix.html` 模板
- 3×3 网格矩阵视图
- 同步滚动 + 缩放控制
- 全屏模式 + 选择导出
---
## ⚠️ 破坏性变更
### 1. 参数废弃
```bash
# ❌ 不再支持
--variants <count>
--creative-variants <count>
# ✅ 必须使用
--style-variants <count>
--layout-variants <count>
```
### 2. 文件命名强制统一
```bash
# ❌ 旧格式不再生成
{page}-variant-{n}.html
{page}-creative-variant-{n}.html
# ✅ 强制新格式
{page}-style-{s}-layout-{l}.html
```
### 3. Standalone路径变更
```bash
# ❌ v4.0.x
./design-session-xxx/ (项目根目录)
# ✅ v4.1.0
.workflow/.scratchpad/design-session-xxx/
```
---
## 📖 迁移指南
### 从 v4.0.x 迁移
#### 1. 更新命令参数
```bash
# 旧方式
/workflow:ui-design:auto --variants 3 --creative-variants 4
# 新方式
/workflow:ui-design:auto --style-variants 3 --layout-variants 4
# 或依赖智能解析
/workflow:ui-design:auto --prompt "Generate 3 styles with 4 layouts"
```
#### 2. 更新路径引用
```bash
# 旧standalone输出
./design-session-xxx/
# 新standalone输出
.workflow/.scratchpad/design-session-xxx/
# 迁移建议: 手动移动旧目录或保留为历史
mv ./design-session-* .workflow/.scratchpad/
```
#### 3. 预览文件
```bash
# 保持不变
{base_path}/.design/prototypes/compare.html
{base_path}/.design/prototypes/index.html
```
---
## ✅ 向后兼容性
### 完全兼容
-`--session` 参数
-`--pages` 参数
-`--prompt` 参数
-`--images` 参数
-`--batch-plan` 标志
- ✅ 智能prompt解析
### 不兼容
- ❌ standard/creative 模式选择
- ❌ 旧参数 `--variants`, `--creative-variants`
- ❌ 旧文件命名格式
---
## 🧪 测试清单
### 功能测试
- [ ] 默认3×3矩阵生成
- [ ] 自定义矩阵2×2, 4×3等
- [ ] 智能prompt解析
- [ ] 文件命名正确性
- [ ] compare.html 可视化
### 路径测试
- [ ] Standalone输出到 `.scratchpad`
- [ ] Session输出到 `WFS-{id}`
- [ ] latest symlink正确
- [ ] 跨命令路径传递
### 集成测试
- [ ] auto → extract → consolidate → generate → update
- [ ] 模板正确加载
- [ ] 设计token引用正确
---
## 📚 相关文档
- **workflow-architecture.md**: Workflow系统架构标准
- **_run-manager.md**: Run-based文件管理文档如果需要
- **~/.claude/workflows/_template-compare-matrix.html**: 可视化模板
---
## 🔮 未来增强
### 计划中
- [ ] 自定义布局策略(覆盖默认 Classic/Modern/Minimal
- [ ] compare.html 运行历史对比
- [ ] Scratchpad自动清理策略
- [ ] Session升级工作流scratchpad → WFS
### 待讨论
- [ ] 非矩形矩阵支持2×3
- [ ] 恢复 creative 模式(可选)
- [ ] 更多布局变种(>5
---
## 📝 总结
**v4.1.0 核心价值**:
1. **极简哲学**: 移除模式选择,矩阵为唯一模式
2. **清晰参数**: `--style-variants``--layout-variants` 语义明确
3. **架构规范**: 严格遵循 workflow-architecture.md 标准
4. **集中管理**: 所有输出在 `.workflow/`
5. **可视化增强**: 高级交互式矩阵界面
**升级理由**:
- ✅ 系统化设计探索(风格×布局矩阵)
- ✅ 简化工作流、减少参数困惑
- ✅ 符合workflow架构标准
- ✅ 避免项目根目录污染
---
**发布者**: Claude Code
**版本**: v4.1.0
**类型**: Major Refactoring + Path Corrections
**日期**: 2025-10-09