mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
feat: update review commands to use review-cycle-fix for automated fixing
This commit is contained in:
@@ -47,8 +47,8 @@ Interactive orchestration tool: analyze task → discover commands → recommend
|
||||
|
||||
| Unit Name | Commands | Purpose | Output |
|
||||
|-----------|----------|---------|--------|
|
||||
| **Code Review (Session)** | review-session-cycle → review-fix | Complete review cycle and apply fixes | Fixed code |
|
||||
| **Code Review (Module)** | review-module-cycle → review-fix | Module review cycle and apply fixes | Fixed code |
|
||||
| **Code Review (Session)** | review-session-cycle → review-cycle-fix | Complete review cycle and apply fixes | Fixed code |
|
||||
| **Code Review (Module)** | review-module-cycle → review-cycle-fix | Module review cycle and apply fixes | Fixed code |
|
||||
|
||||
**Issue Units** (Issue单元):
|
||||
|
||||
@@ -77,8 +77,8 @@ Interactive orchestration tool: analyze task → discover commands → recommend
|
||||
| replan | execute | Replanning + Execution |
|
||||
| test-gen | execute | Test Generation + Execution |
|
||||
| tdd-plan | execute | TDD Planning + Execution |
|
||||
| review-session-cycle | review-fix | Code Review (Session) |
|
||||
| review-module-cycle | review-fix | Code Review (Module) |
|
||||
| review-session-cycle | review-cycle-fix | Code Review (Session) |
|
||||
| review-module-cycle | review-cycle-fix | Code Review (Module) |
|
||||
| test-fix-gen | test-cycle-execute | Test Validation |
|
||||
| issue:discover | issue:plan | Issue Workflow |
|
||||
| issue:plan | issue:queue | Issue Workflow |
|
||||
@@ -281,8 +281,8 @@ const commandPorts = {
|
||||
output: ['review-findings'],
|
||||
tags: ['review']
|
||||
},
|
||||
'review-fix': {
|
||||
name: 'review-fix',
|
||||
'review-cycle-fix': {
|
||||
name: 'review-cycle-fix',
|
||||
input: ['review-findings', 'review-verified'], // Accept output from review-session-cycle or review-module-cycle
|
||||
output: ['fixed-code'],
|
||||
tags: ['review'],
|
||||
@@ -306,14 +306,14 @@ const commandPorts = {
|
||||
input: ['code', 'session'], // 可接受代码或会话
|
||||
output: ['review-verified'], // 输出端口:审查通过
|
||||
tags: ['review'],
|
||||
atomic_group: 'code-review' // 最小单元:与 review-fix 绑定
|
||||
atomic_group: 'code-review' // 最小单元:与 review-cycle-fix 绑定
|
||||
},
|
||||
'review-module-cycle': {
|
||||
name: 'review-module-cycle',
|
||||
input: ['module-pattern'], // 输入端口:模块模式
|
||||
output: ['review-verified'], // 输出端口:审查通过
|
||||
tags: ['review'],
|
||||
atomic_group: 'code-review' // 最小单元:与 review-fix 绑定
|
||||
atomic_group: 'code-review' // 最小单元:与 review-cycle-fix 绑定
|
||||
},
|
||||
|
||||
// Issue workflow commands
|
||||
@@ -635,7 +635,7 @@ function formatCommand(cmd, previousResults, analysis) {
|
||||
if (latest?.session_id) prompt += ` --session="${latest.session_id}"`;
|
||||
|
||||
// Review fix - takes session from review
|
||||
} else if (name === 'review-fix') {
|
||||
} else if (name === 'review-cycle-fix') {
|
||||
const review = previousResults.find(r => r.command.includes('review'));
|
||||
const latest = review || previousResults.filter(r => r.session_id).pop();
|
||||
if (latest?.session_id) prompt += ` --session="${latest.session_id}"`;
|
||||
@@ -1033,7 +1033,7 @@ All from `~/.claude/commands/workflow/` and `~/.claude/commands/issue/`:
|
||||
**Planning**: lite-plan, plan, multi-cli-plan, plan-verify, tdd-plan
|
||||
**Execution**: lite-execute, execute, develop-with-file
|
||||
**Testing**: test-cycle-execute, test-gen, test-fix-gen, tdd-verify
|
||||
**Review**: review, review-session-cycle, review-module-cycle, review-fix
|
||||
**Review**: review, review-session-cycle, review-module-cycle, review-cycle-fix
|
||||
**Bug Fixes**: lite-fix, debug, debug-with-file
|
||||
**Brainstorming**: brainstorm:auto-parallel, brainstorm:artifacts, brainstorm:synthesis
|
||||
**Design**: ui-design:*, animation-extract, layout-extract, style-extract, codify-style
|
||||
@@ -1067,7 +1067,7 @@ All from `~/.claude/commands/workflow/` and `~/.claude/commands/issue/`:
|
||||
| **tdd** | 需求 → tdd-plan → TDD任务 → execute → 代码 → tdd-verify | TDD Planning + Execution |
|
||||
| **test-fix** | 失败测试 →【test-fix-gen → test-cycle-execute】→ 测试通过 | Test Validation |
|
||||
| **test-gen** | 代码/会话 →【test-gen → execute】→ 测试通过 | Test Generation + Execution |
|
||||
| **review** | 代码 →【review-* → review-fix】→ 修复代码 →【test-fix-gen → test-cycle-execute】→ 测试通过 | Code Review + Testing |
|
||||
| **review** | 代码 →【review-* → review-cycle-fix】→ 修复代码 →【test-fix-gen → test-cycle-execute】→ 测试通过 | Code Review + Testing |
|
||||
| **brainstorm** | 探索主题 → brainstorm → 分析 →【plan → plan-verify】→ execute → test | Exploration + Planning + Execution |
|
||||
| **multi-cli** | 需求 → multi-cli-plan → 对比分析 → lite-execute → test | Multi-Perspective + Testing |
|
||||
| **issue-batch** | 代码库 →【discover → plan → queue → execute】→ 完成 issues | Issue Workflow |
|
||||
|
||||
@@ -24,7 +24,7 @@ Main process orchestrator: intent analysis → workflow selection → command ch
|
||||
|-----------|---------|---------|
|
||||
| **Planning + Execution** | plan-cmd → execute-cmd | lite-plan → lite-execute |
|
||||
| **Testing** | test-gen-cmd → test-exec-cmd | test-fix-gen → test-cycle-execute |
|
||||
| **Review** | review-cmd → fix-cmd | review-session-cycle → review-fix |
|
||||
| **Review** | review-cmd → fix-cmd | review-session-cycle → review-cycle-fix |
|
||||
|
||||
**Atomic Rules**:
|
||||
1. CCW automatically groups commands into minimum units - never splits them
|
||||
@@ -129,7 +129,7 @@ function selectWorkflow(analysis) {
|
||||
'ui-design': { level: analysis.complexity === 'high' ? 4 : 3, flow: 'ui' },
|
||||
'tdd': { level: 3, flow: 'tdd' },
|
||||
'test-fix': { level: 3, flow: 'test-fix-gen' },
|
||||
'review': { level: 3, flow: 'review-fix' },
|
||||
'review': { level: 3, flow: 'review-cycle-fix' },
|
||||
'documentation': { level: 2, flow: 'docs' },
|
||||
'feature': { level: analysis.complexity === 'high' ? 3 : 2, flow: analysis.complexity === 'high' ? 'coupled' : 'rapid' }
|
||||
};
|
||||
@@ -223,9 +223,9 @@ function buildCommandChain(workflow, analysis) {
|
||||
{ cmd: '/workflow:plan-verify', args: '', unit: 'verified-planning' },
|
||||
// Execution
|
||||
{ cmd: '/workflow:execute', args: '' },
|
||||
// Unit: Code Review【review-session-cycle → review-fix】
|
||||
// Unit: Code Review【review-session-cycle → review-cycle-fix】
|
||||
{ cmd: '/workflow:review-session-cycle', args: '', unit: 'code-review' },
|
||||
{ cmd: '/workflow:review-fix', args: '', unit: 'code-review' },
|
||||
{ cmd: '/workflow:review-cycle-fix', args: '', unit: 'code-review' },
|
||||
// Unit: Test Validation【test-fix-gen → test-cycle-execute】
|
||||
...(analysis.constraints?.includes('skip-tests') ? [] : [
|
||||
{ cmd: '/workflow:test-fix-gen', args: '', unit: 'test-validation' },
|
||||
@@ -247,10 +247,10 @@ function buildCommandChain(workflow, analysis) {
|
||||
{ cmd: '/workflow:test-cycle-execute', args: '', unit: 'test-validation' }
|
||||
],
|
||||
|
||||
'review-fix': [
|
||||
// Unit: Code Review【review-session-cycle → review-fix】
|
||||
'review-cycle-fix': [
|
||||
// Unit: Code Review【review-session-cycle → review-cycle-fix】
|
||||
{ cmd: '/workflow:review-session-cycle', args: '', unit: 'code-review' },
|
||||
{ cmd: '/workflow:review-fix', args: '', unit: 'code-review' },
|
||||
{ cmd: '/workflow:review-cycle-fix', args: '', unit: 'code-review' },
|
||||
// Unit: Test Validation【test-fix-gen → test-cycle-execute】
|
||||
{ cmd: '/workflow:test-fix-gen', args: '', unit: 'test-validation' },
|
||||
{ cmd: '/workflow:test-cycle-execute', args: '', unit: 'test-validation' }
|
||||
@@ -450,7 +450,7 @@ Phase 5: Execute Command Chain
|
||||
| "头脑风暴: 通知系统重构" | brainstorm | 4 | brainstorm-with-file → (built-in post-completion) |
|
||||
| "深度调试 WebSocket 连接断开" | debug-file | 3 | debug-with-file → (hypothesis iteration) |
|
||||
| "协作分析: 认证架构优化" | analyze-file | 3 | analyze-with-file → (multi-round discussion) |
|
||||
| "OAuth2 system" | feature (high) | 3 |【plan → plan-verify】→ execute →【review-session-cycle → review-fix】→【test-fix-gen → test-cycle-execute】|
|
||||
| "OAuth2 system" | feature (high) | 3 |【plan → plan-verify】→ execute →【review-session-cycle → review-cycle-fix】→【test-fix-gen → test-cycle-execute】|
|
||||
| "Implement with TDD" | tdd | 3 |【tdd-plan → execute】→ tdd-verify |
|
||||
| "Uncertain: real-time arch" | exploration | 4 | brainstorm:auto-parallel →【plan → plan-verify】→ execute →【test-fix-gen → test-cycle-execute】|
|
||||
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
---
|
||||
name: review-fix
|
||||
name: review-cycle-fix
|
||||
description: Automated fixing of code review findings with AI-powered planning and coordinated execution. Uses intelligent grouping, multi-stage timeline coordination, and test-driven verification.
|
||||
argument-hint: "<export-file|review-dir> [--resume] [--max-iterations=N]"
|
||||
allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*), Task(*), Edit(*), Write(*)
|
||||
---
|
||||
|
||||
# Workflow Review-Fix Command
|
||||
# Workflow Review-Cycle-Fix Command
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
# Fix from exported findings file (session-based path)
|
||||
/workflow:review-fix .workflow/active/WFS-123/.review/fix-export-1706184622000.json
|
||||
/workflow:review-cycle-fix .workflow/active/WFS-123/.review/fix-export-1706184622000.json
|
||||
|
||||
# Fix from review directory (auto-discovers latest export)
|
||||
/workflow:review-fix .workflow/active/WFS-123/.review/
|
||||
/workflow:review-cycle-fix .workflow/active/WFS-123/.review/
|
||||
|
||||
# Resume interrupted fix session
|
||||
/workflow:review-fix --resume
|
||||
/workflow:review-cycle-fix --resume
|
||||
|
||||
# Custom max retry attempts per finding
|
||||
/workflow:review-fix .workflow/active/WFS-123/.review/ --max-iterations=5
|
||||
/workflow:review-cycle-fix .workflow/active/WFS-123/.review/ --max-iterations=5
|
||||
```
|
||||
|
||||
**Fix Source**: Exported findings from review cycle dashboard
|
||||
@@ -764,8 +764,8 @@ After completing a module review, use the generated findings JSON for automated
|
||||
/workflow:review-module-cycle src/auth/**
|
||||
|
||||
# Step 2: Run automated fixes using dimension findings
|
||||
/workflow:review-fix .workflow/active/WFS-{session-id}/.review/
|
||||
/workflow:review-cycle-fix .workflow/active/WFS-{session-id}/.review/
|
||||
```
|
||||
|
||||
See `/workflow:review-fix` for automated fixing with smart grouping, parallel execution, and test verification.
|
||||
See `/workflow:review-cycle-fix` for automated fixing with smart grouping, parallel execution, and test verification.
|
||||
|
||||
|
||||
@@ -775,8 +775,8 @@ After completing a review, use the generated findings JSON for automated fixing:
|
||||
/workflow:review-session-cycle
|
||||
|
||||
# Step 2: Run automated fixes using dimension findings
|
||||
/workflow:review-fix .workflow/active/WFS-{session-id}/.review/
|
||||
/workflow:review-cycle-fix .workflow/active/WFS-{session-id}/.review/
|
||||
```
|
||||
|
||||
See `/workflow:review-fix` for automated fixing with smart grouping, parallel execution, and test verification.
|
||||
See `/workflow:review-cycle-fix` for automated fixing with smart grouping, parallel execution, and test verification.
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
"essential": true,
|
||||
"flow": {
|
||||
"prerequisites": ["/workflow:execute"],
|
||||
"next_steps": ["/workflow:review-fix"]
|
||||
"next_steps": ["/workflow:review-cycle-fix"]
|
||||
},
|
||||
"source": "../../../commands/workflow/review-session-cycle.md"
|
||||
},
|
||||
@@ -271,8 +271,8 @@
|
||||
"source": "../../../commands/workflow/review-module-cycle.md"
|
||||
},
|
||||
{
|
||||
"name": "review-fix",
|
||||
"command": "/workflow:review-fix",
|
||||
"name": "review-cycle-fix",
|
||||
"command": "/workflow:review-cycle-fix",
|
||||
"description": "Automated fixing of review findings",
|
||||
"arguments": "<export-file|review-dir>",
|
||||
"category": "workflow",
|
||||
@@ -280,7 +280,7 @@
|
||||
"flow": {
|
||||
"prerequisites": ["/workflow:review-session-cycle", "/workflow:review-module-cycle"]
|
||||
},
|
||||
"source": "../../../commands/workflow/review-fix.md"
|
||||
"source": "../../../commands/workflow/review-cycle-fix.md"
|
||||
},
|
||||
{
|
||||
"name": "test-gen",
|
||||
|
||||
Reference in New Issue
Block a user