refactor: split review responsibilities — code review in lite-execute, convergence review in lite-test-review

- lite-plan LP-Phase 4: split single "Review" into two selections (Code Review + Convergence Review)
- lite-execute: add Step 4 Code Review (agent/codex/gemini) with code-review.md artifact, Step 5 passes convergenceReviewTool
- lite-test-review: rename reviewTool → convergenceReviewTool, TR-Phase 2 focused on convergence criteria verification
- All autoYes paths default both reviews to Skip
- Data structures updated across all three files for consistency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
catlog22
2026-03-21 17:18:20 +08:00
parent fab07c2e97
commit fcd0b9a2c4
3 changed files with 172 additions and 51 deletions

View File

@@ -492,8 +492,8 @@ ${tasks.map((t, i) => `${i+1}. ${t.title} (${t.scope || t.files?.[0]?.path || ''
let userSelection
if (workflowPreferences.autoYes) {
console.log(`[Auto] Allow & Execute | Auto | Skip`)
userSelection = { confirmation: "Allow", execution_method: "Auto", code_review_tool: "Skip" }
console.log(`[Auto] Allow & Execute | Auto | Skip + Skip`)
userSelection = { confirmation: "Allow", execution_method: "Auto", code_review_tool: "Skip", convergence_review_tool: "Skip" }
} else {
// "Other" in Execution allows specifying CLI tools from ~/.claude/cli-tools.json
userSelection = AskUserQuestion({
@@ -519,14 +519,25 @@ if (workflowPreferences.autoYes) {
]
},
{
question: "Code review after execution?",
header: "Review",
question: "Code review after execution? (runs in lite-execute)",
header: "Code Review",
multiSelect: false,
options: [
{ label: "Gemini Review", description: "Gemini CLI review" },
{ label: "Codex Review", description: "Git-aware review (prompt OR --uncommitted)" },
{ label: "Gemini Review", description: "Gemini CLI: git diff quality review" },
{ label: "Codex Review", description: "Codex CLI: git-aware code review (--mode review)" },
{ label: "Agent Review", description: "@code-reviewer agent" },
{ label: "Skip", description: "No review" }
{ label: "Skip", description: "No code review" }
]
},
{
question: "Convergence review in test-review phase?",
header: "Convergence Review",
multiSelect: false,
options: [
{ label: "Agent", description: "Agent: verify convergence criteria against implementation" },
{ label: "Gemini", description: "Gemini CLI: convergence verification" },
{ label: "Codex", description: "Codex CLI: convergence verification" },
{ label: "Skip", description: "Skip convergence review, run tests only" }
]
}
]
@@ -534,7 +545,7 @@ if (workflowPreferences.autoYes) {
}
```
// TodoWrite: Phase 4 → completed `[${userSelection.execution_method} + ${userSelection.code_review_tool}]`, Phase 5 → in_progress
// TodoWrite: Phase 4 → completed `[${userSelection.execution_method} | CR:${userSelection.code_review_tool} | CVR:${userSelection.convergence_review_tool}]`, Phase 5 → in_progress
## 10. LP-Phase 5: Handoff to Execution
@@ -561,6 +572,7 @@ executionContext = {
clarificationContext: clarificationContext || null,
executionMethod: userSelection.execution_method,
codeReviewTool: userSelection.code_review_tool,
convergenceReviewTool: userSelection.convergence_review_tool,
originalUserInput: task_description,
executorAssignments: executorAssignments, // { taskId: { executor, reason } } — overrides executionMethod
session: {
@@ -588,7 +600,7 @@ TodoWrite({ todos: [
{ content: "LP-Phase 1: Exploration", status: "completed" },
{ content: "LP-Phase 2: Clarification", status: "completed" },
{ content: "LP-Phase 3: Planning", status: "completed" },
{ content: `LP-Phase 4: Confirmed [${userSelection.execution_method}]`, status: "completed" },
{ content: `LP-Phase 4: Confirmed [${userSelection.execution_method} | CR:${userSelection.code_review_tool} | CVR:${userSelection.convergence_review_tool}]`, status: "completed" },
{ content: `LP-Phase 5: Handoff → lite-execute`, status: "completed" },
{ content: `LE-Phase 1: Task Loading [${taskCount} tasks]`, status: "in_progress", activeForm: "Loading tasks" }
]})
@@ -605,6 +617,7 @@ Skill("lite-execute")
├── explorations-manifest.json # Exploration index
├── planning-context.md # Evidence paths + understanding
├── plan.json # Plan overview (task_ids[])
├── code-review.md # Generated by lite-execute Step 4
├── test-checklist.json # Generated by lite-test-review
├── test-review.md # Generated by lite-test-review
└── .task/
@@ -618,9 +631,12 @@ Skill("lite-execute")
```
lite-plan (LP-Phase 1-5)
└─ Skill("lite-execute") ← executionContext (global)
├─ Step 1-4: Execute + Review
├─ Step 1-3: Task Execution
├─ Step 4: Code Review (quality/correctness/security)
└─ Step 5: Skill("lite-test-review") ← testReviewContext (global)
├─ TR-Phase 1-4: Test + Fix
├─ TR-Phase 1: Detect test framework
├─ TR-Phase 2: Convergence verification (plan criteria)
├─ TR-Phase 3-4: Run tests + Auto-fix
└─ TR-Phase 5: Report + Sync specs
```