claude-code-workflow 7.2.11 → 7.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/workflow/analyze-with-file.md +108 -54
- package/.claude/commands/workflow-tune.md +811 -0
- package/.claude/skills/workflow-lite-execute/SKILL.md +106 -14
- package/.claude/skills/workflow-lite-plan/SKILL.md +34 -72
- package/.claude/skills/workflow-lite-test-review/SKILL.md +39 -26
- package/package.json +1 -1
- package/.claude/commands/ddd/auto.md +0 -359
- package/.claude/commands/ddd/doc-generate.md +0 -222
- package/.claude/commands/ddd/doc-refresh.md +0 -218
- package/.claude/commands/ddd/execute.md +0 -416
- package/.claude/commands/ddd/index-build.md +0 -212
- package/.claude/commands/ddd/plan.md +0 -611
- package/.claude/commands/ddd/scan.md +0 -365
- package/.claude/commands/ddd/sync.md +0 -353
- package/.claude/commands/ddd/update.md +0 -160
- package/.claude/commands/idaw/add.md +0 -287
- package/.claude/commands/idaw/resume.md +0 -442
- package/.claude/commands/idaw/run-coordinate.md +0 -648
- package/.claude/commands/idaw/run.md +0 -539
- package/.claude/commands/idaw/status.md +0 -182
- package/.claude/skills/workflow-tune/SKILL.md +0 -487
- package/.claude/skills/workflow-tune/phases/01-setup.md +0 -548
- package/.claude/skills/workflow-tune/phases/02-step-execute.md +0 -197
- package/.claude/skills/workflow-tune/phases/03-step-analyze.md +0 -386
- package/.claude/skills/workflow-tune/phases/04-synthesize.md +0 -257
- package/.claude/skills/workflow-tune/phases/05-optimize-report.md +0 -246
- package/.claude/skills/workflow-tune/specs/workflow-eval-criteria.md +0 -57
- package/.claude/skills/workflow-tune/templates/step-analysis-prompt.md +0 -88
- package/.claude/skills/workflow-tune/templates/synthesis-prompt.md +0 -90
|
@@ -74,7 +74,7 @@ function selectExecutionOptions() {
|
|
|
74
74
|
const autoYes = workflowPreferences?.autoYes ?? false
|
|
75
75
|
|
|
76
76
|
if (autoYes) {
|
|
77
|
-
return { execution_method: "Auto", code_review_tool: "Skip" }
|
|
77
|
+
return { execution_method: "Auto", code_review_tool: "Skip", convergence_review_tool: "Skip" }
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
return AskUserQuestion({
|
|
@@ -90,14 +90,25 @@ function selectExecutionOptions() {
|
|
|
90
90
|
]
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
|
-
question: "
|
|
94
|
-
header: "Review
|
|
93
|
+
question: "Code review after execution? (runs here in lite-execute)",
|
|
94
|
+
header: "Code Review",
|
|
95
95
|
multiSelect: false,
|
|
96
96
|
options: [
|
|
97
|
-
{ label: "
|
|
98
|
-
{ label: "
|
|
99
|
-
{ label: "
|
|
100
|
-
{ label: "Skip", description: "
|
|
97
|
+
{ label: "Gemini Review", description: "Gemini CLI: git diff quality review" },
|
|
98
|
+
{ label: "Codex Review", description: "Codex CLI: git-aware code review (--mode review)" },
|
|
99
|
+
{ label: "Agent Review", description: "@code-reviewer agent" },
|
|
100
|
+
{ label: "Skip", description: "No code review" }
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
question: "Convergence review in test-review phase?",
|
|
105
|
+
header: "Convergence Review",
|
|
106
|
+
multiSelect: false,
|
|
107
|
+
options: [
|
|
108
|
+
{ label: "Agent", description: "Agent: verify convergence criteria" },
|
|
109
|
+
{ label: "Gemini", description: "Gemini CLI: convergence verification" },
|
|
110
|
+
{ label: "Codex", description: "Codex CLI: convergence verification" },
|
|
111
|
+
{ label: "Skip", description: "Skip convergence review, run tests only" }
|
|
101
112
|
]
|
|
102
113
|
}
|
|
103
114
|
]
|
|
@@ -117,7 +128,8 @@ if (executionContext) {
|
|
|
117
128
|
console.log(`
|
|
118
129
|
Execution Strategy (from lite-plan):
|
|
119
130
|
Method: ${executionContext.executionMethod}
|
|
120
|
-
Review: ${executionContext.codeReviewTool}
|
|
131
|
+
Code Review: ${executionContext.codeReviewTool}
|
|
132
|
+
Convergence Review: ${executionContext.convergenceReviewTool}
|
|
121
133
|
Tasks: ${getTasks(executionContext.planObject).length}
|
|
122
134
|
Complexity: ${executionContext.planObject.complexity}
|
|
123
135
|
${executionContext.executorAssignments ? ` Assignments: ${JSON.stringify(executionContext.executorAssignments)}` : ''}
|
|
@@ -367,18 +379,97 @@ ${(t.test?.success_metrics || []).length > 0 ? `**Success metrics**: ${t.test.su
|
|
|
367
379
|
}
|
|
368
380
|
```
|
|
369
381
|
|
|
370
|
-
### Step 4:
|
|
382
|
+
### Step 4: Code Review
|
|
371
383
|
|
|
372
|
-
|
|
384
|
+
**Skip if**: `codeReviewTool === 'Skip'`
|
|
373
385
|
|
|
374
|
-
**
|
|
386
|
+
**Resolve review tool**: From `executionContext.codeReviewTool` (Mode 1) or `userSelection.code_review_tool` (Mode 2/3).
|
|
375
387
|
|
|
376
388
|
```javascript
|
|
377
|
-
|
|
389
|
+
const codeReviewTool = executionContext?.codeReviewTool || userSelection?.code_review_tool || 'Skip'
|
|
390
|
+
const resolvedTool = (() => {
|
|
378
391
|
if (!codeReviewTool || codeReviewTool === 'Skip') return 'skip'
|
|
379
392
|
if (/gemini/i.test(codeReviewTool)) return 'gemini'
|
|
380
393
|
if (/codex/i.test(codeReviewTool)) return 'codex'
|
|
381
394
|
return 'agent'
|
|
395
|
+
})()
|
|
396
|
+
|
|
397
|
+
if (resolvedTool === 'skip') {
|
|
398
|
+
console.log('[Code Review] Skipped')
|
|
399
|
+
} else {
|
|
400
|
+
// proceed with review
|
|
401
|
+
}
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
**Agent Code Review** (resolvedTool === 'agent'):
|
|
405
|
+
|
|
406
|
+
```javascript
|
|
407
|
+
Agent({
|
|
408
|
+
subagent_type: "code-reviewer",
|
|
409
|
+
run_in_background: false,
|
|
410
|
+
description: `Code review: ${planObject.summary}`,
|
|
411
|
+
prompt: `## Code Review — Post-Execution Quality Check
|
|
412
|
+
|
|
413
|
+
**Goal**: ${originalUserInput}
|
|
414
|
+
**Plan Summary**: ${planObject.summary}
|
|
415
|
+
|
|
416
|
+
### Changed Files
|
|
417
|
+
Run \`git diff --name-only HEAD~${getTasks(planObject).length}..HEAD\` to identify changes.
|
|
418
|
+
|
|
419
|
+
### Review Focus
|
|
420
|
+
1. **Code quality**: Readability, naming, structure, dead code
|
|
421
|
+
2. **Correctness**: Logic errors, off-by-one, null handling, edge cases
|
|
422
|
+
3. **Patterns**: Consistency with existing codebase conventions
|
|
423
|
+
4. **Security**: Injection, XSS, auth bypass, secrets exposure
|
|
424
|
+
5. **Performance**: Unnecessary loops, N+1 queries, missing indexes
|
|
425
|
+
|
|
426
|
+
### Instructions
|
|
427
|
+
1. Run git diff to see actual changes
|
|
428
|
+
2. Read changed files for full context
|
|
429
|
+
3. For each issue found: severity (Critical/High/Medium/Low) + file:line + description + fix suggestion
|
|
430
|
+
4. Return structured review: issues[], summary, overall verdict (PASS/WARN/FAIL)`
|
|
431
|
+
})
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
**CLI Code Review — Codex** (resolvedTool === 'codex'):
|
|
435
|
+
|
|
436
|
+
```javascript
|
|
437
|
+
const reviewId = `${sessionId}-code-review`
|
|
438
|
+
Bash(`ccw cli -p "Review code changes for quality, correctness, security, and pattern compliance. Focus: ${planObject.summary}" --tool codex --mode review --id ${reviewId}`, { run_in_background: true })
|
|
439
|
+
// STOP - wait for hook callback
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
**CLI Code Review — Gemini** (resolvedTool === 'gemini'):
|
|
443
|
+
|
|
444
|
+
```javascript
|
|
445
|
+
const reviewId = `${sessionId}-code-review`
|
|
446
|
+
Bash(`ccw cli -p "PURPOSE: Post-execution code quality review for: ${planObject.summary}
|
|
447
|
+
TASK: • Run git diff to identify all changes • Review each changed file for quality, correctness, security • Check pattern compliance with existing codebase • Identify potential bugs, edge cases, performance issues
|
|
448
|
+
MODE: analysis
|
|
449
|
+
CONTEXT: @**/* | Memory: lite-execute completed, reviewing code quality
|
|
450
|
+
EXPECTED: Per-file review with severity levels (Critical/High/Medium/Low), file:line references, fix suggestions, overall verdict
|
|
451
|
+
CONSTRAINTS: Read-only | Focus on code quality not convergence" --tool gemini --mode analysis --rule analysis-review-code-quality --id ${reviewId}`, { run_in_background: true })
|
|
452
|
+
// STOP - wait for hook callback
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
**Write review artifact** (if session folder exists):
|
|
456
|
+
```javascript
|
|
457
|
+
if (executionContext?.session?.folder) {
|
|
458
|
+
Write(`${executionContext.session.folder}/code-review.md`, codeReviewOutput)
|
|
459
|
+
}
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
### Step 5: Chain to Test Review & Post-Completion
|
|
463
|
+
|
|
464
|
+
**Resolve convergence review tool**: From `executionContext.convergenceReviewTool` (Mode 1) or `userSelection.convergence_review_tool` (Mode 2/3).
|
|
465
|
+
|
|
466
|
+
```javascript
|
|
467
|
+
function resolveConvergenceTool(ctx, selection) {
|
|
468
|
+
const raw = ctx?.convergenceReviewTool || selection?.convergence_review_tool || 'skip'
|
|
469
|
+
if (!raw || raw === 'Skip') return 'skip'
|
|
470
|
+
if (/gemini/i.test(raw)) return 'gemini'
|
|
471
|
+
if (/codex/i.test(raw)) return 'codex'
|
|
472
|
+
return 'agent'
|
|
382
473
|
}
|
|
383
474
|
```
|
|
384
475
|
|
|
@@ -389,7 +480,7 @@ testReviewContext = {
|
|
|
389
480
|
planObject: planObject,
|
|
390
481
|
taskFiles: executionContext?.taskFiles
|
|
391
482
|
|| getTasks(planObject).map(t => ({ id: t.id, path: `${executionContext?.session?.folder}/.task/${t.id}.json` })),
|
|
392
|
-
|
|
483
|
+
convergenceReviewTool: resolveConvergenceTool(executionContext, userSelection),
|
|
393
484
|
executionResults: previousExecutionResults,
|
|
394
485
|
originalUserInput: originalUserInput,
|
|
395
486
|
session: executionContext?.session || {
|
|
@@ -442,7 +533,8 @@ Skill("lite-test-review")
|
|
|
442
533
|
explorationManifest: {...} | null,
|
|
443
534
|
clarificationContext: {...} | null,
|
|
444
535
|
executionMethod: "Agent" | "Codex" | "Auto",
|
|
445
|
-
codeReviewTool: "Skip" | "Gemini Review" | "
|
|
536
|
+
codeReviewTool: "Skip" | "Gemini Review" | "Codex Review" | "Agent Review",
|
|
537
|
+
convergenceReviewTool: "Skip" | "Agent" | "Gemini" | "Codex",
|
|
446
538
|
originalUserInput: string,
|
|
447
539
|
executorAssignments: { // per-task override, priority over executionMethod
|
|
448
540
|
[taskId]: { executor: "gemini" | "codex" | "agent", reason: string }
|
|
@@ -40,7 +40,7 @@ Produces exploration results, a structured plan (plan.json), independent task fi
|
|
|
40
40
|
|
|
41
41
|
**Output Directory**: `.workflow/.lite-plan/{task-slug}-{YYYY-MM-DD}/`
|
|
42
42
|
|
|
43
|
-
**Agent Usage**:
|
|
43
|
+
**Agent Usage**: All complexities → `cli-lite-planning-agent`
|
|
44
44
|
|
|
45
45
|
**Schema Reference**: `~/.ccw/workflows/cli-templates/schemas/plan-overview-base-schema.json`
|
|
46
46
|
|
|
@@ -51,7 +51,7 @@ Produces exploration results, a structured plan (plan.json), independent task fi
|
|
|
51
51
|
| LP-0 | Initialize workflowPreferences | autoYes, forceExplore |
|
|
52
52
|
| LP-1 | Complexity assessment → parallel cli-explore-agents (1-4) | exploration-*.json + manifest |
|
|
53
53
|
| LP-2 | Aggregate + dedup clarification_needs → multi-round AskUserQuestion | clarificationContext (in-memory) |
|
|
54
|
-
| LP-3 |
|
|
54
|
+
| LP-3 | cli-lite-planning-agent | plan.json + .task/TASK-*.json |
|
|
55
55
|
| LP-4 | Display plan → AskUserQuestion (Confirm + Execution + Review) | userSelection |
|
|
56
56
|
| LP-5 | Build executionContext → Skill("lite-execute") | handoff (Mode 1) |
|
|
57
57
|
|
|
@@ -85,7 +85,7 @@ bash(`mkdir -p ${sessionFolder} && test -d ${sessionFolder} && echo "SUCCESS: ${
|
|
|
85
85
|
TodoWrite({ todos: [
|
|
86
86
|
{ content: `LP-Phase 1: Exploration [${complexity}] ${selectedAngles.length} angles`, status: "in_progress", activeForm: `Exploring: ${selectedAngles.join(', ')}` },
|
|
87
87
|
{ content: "LP-Phase 2: Clarification", status: "pending" },
|
|
88
|
-
{ content:
|
|
88
|
+
{ content: "LP-Phase 3: Planning [cli-lite-planning-agent]", status: "pending" },
|
|
89
89
|
{ content: "LP-Phase 4: Confirmation", status: "pending" },
|
|
90
90
|
{ content: "LP-Phase 5: Execution", status: "pending" }
|
|
91
91
|
]})
|
|
@@ -154,12 +154,7 @@ function selectAngles(taskDescription, count) {
|
|
|
154
154
|
|
|
155
155
|
const selectedAngles = selectAngles(task_description, complexity === 'High' ? 4 : (complexity === 'Medium' ? 3 : 1))
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
const planningStrategy = (
|
|
159
|
-
complexity === 'Low' && !hasPriorAnalysis && selectedAngles.length <= 1
|
|
160
|
-
) ? 'Direct Claude Planning' : 'cli-lite-planning-agent'
|
|
161
|
-
|
|
162
|
-
console.log(`Exploration Plan: ${complexity} | ${selectedAngles.join(', ')} | ${planningStrategy}`)
|
|
157
|
+
console.log(`Exploration Plan: ${complexity} | ${selectedAngles.join(', ')} | cli-lite-planning-agent`)
|
|
163
158
|
```
|
|
164
159
|
|
|
165
160
|
**Launch Parallel Explorations**:
|
|
@@ -328,56 +323,7 @@ taskFiles.forEach(taskPath => {
|
|
|
328
323
|
})
|
|
329
324
|
```
|
|
330
325
|
|
|
331
|
-
**
|
|
332
|
-
```javascript
|
|
333
|
-
const schema = Bash(`cat ~/.ccw/workflows/cli-templates/schemas/plan-overview-base-schema.json`)
|
|
334
|
-
|
|
335
|
-
const manifest = file_exists(`${sessionFolder}/explorations-manifest.json`)
|
|
336
|
-
? JSON.parse(Read(`${sessionFolder}/explorations-manifest.json`))
|
|
337
|
-
: { explorations: [] }
|
|
338
|
-
manifest.explorations.forEach(exp => {
|
|
339
|
-
console.log(`\n### Exploration: ${exp.angle}\n${Read(exp.path)}`)
|
|
340
|
-
})
|
|
341
|
-
|
|
342
|
-
// When handoffSpec exists, use it as primary planning input
|
|
343
|
-
// implementation_scope[].acceptance_criteria -> convergence.criteria
|
|
344
|
-
// implementation_scope[].target_files -> files[]
|
|
345
|
-
// implementation_scope[].objective -> task title/description
|
|
346
|
-
if (handoffSpec) {
|
|
347
|
-
console.log(`\n### Handoff Spec from ${handoffSpec.source}`)
|
|
348
|
-
console.log(`Scope items: ${handoffSpec.implementation_scope.length}`)
|
|
349
|
-
handoffSpec.implementation_scope.forEach((item, i) => {
|
|
350
|
-
console.log(` ${i+1}. ${item.objective} [${item.priority}] — Done when: ${item.acceptance_criteria.join('; ')}`)
|
|
351
|
-
})
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
// Generate tasks — MUST incorporate exploration insights OR handoff spec
|
|
355
|
-
// When handoffSpec: map implementation_scope[] → tasks[] (1:1 or group by context)
|
|
356
|
-
// Field names: convergence.criteria (not acceptance), files[].change (not modification_points), test (not verification)
|
|
357
|
-
const tasks = [
|
|
358
|
-
{
|
|
359
|
-
id: "TASK-001", title: "...", description: "...", depends_on: [],
|
|
360
|
-
convergence: { criteria: ["..."] }, // From handoffSpec: item.acceptance_criteria
|
|
361
|
-
files: [{ path: "...", change: "..." }], // From handoffSpec: item.target_files + item.change_summary
|
|
362
|
-
implementation: ["..."], test: "..."
|
|
363
|
-
}
|
|
364
|
-
]
|
|
365
|
-
|
|
366
|
-
const taskDir = `${sessionFolder}/.task`
|
|
367
|
-
Bash(`mkdir -p "${taskDir}"`)
|
|
368
|
-
tasks.forEach(task => Write(`${taskDir}/${task.id}.json`, JSON.stringify(task, null, 2)))
|
|
369
|
-
|
|
370
|
-
const plan = {
|
|
371
|
-
summary: "...", approach: "...",
|
|
372
|
-
task_ids: tasks.map(t => t.id), task_count: tasks.length,
|
|
373
|
-
complexity: "Low", estimated_time: "...", recommended_execution: "Agent",
|
|
374
|
-
_metadata: { timestamp: getUtc8ISOString(), source: "direct-planning", planning_mode: "direct", plan_type: "feature" }
|
|
375
|
-
}
|
|
376
|
-
Write(`${sessionFolder}/plan.json`, JSON.stringify(plan, null, 2))
|
|
377
|
-
// MUST continue to LP-Phase 4 — DO NOT execute code here
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
**Medium/High Complexity** — Invoke cli-lite-planning-agent:
|
|
326
|
+
**Invoke cli-lite-planning-agent**:
|
|
381
327
|
|
|
382
328
|
```javascript
|
|
383
329
|
Task(
|
|
@@ -492,8 +438,8 @@ ${tasks.map((t, i) => `${i+1}. ${t.title} (${t.scope || t.files?.[0]?.path || ''
|
|
|
492
438
|
let userSelection
|
|
493
439
|
|
|
494
440
|
if (workflowPreferences.autoYes) {
|
|
495
|
-
console.log(`[Auto] Allow & Execute | Auto | Skip`)
|
|
496
|
-
userSelection = { confirmation: "Allow", execution_method: "Auto", code_review_tool: "Skip" }
|
|
441
|
+
console.log(`[Auto] Allow & Execute | Auto | Skip + Skip`)
|
|
442
|
+
userSelection = { confirmation: "Allow", execution_method: "Auto", code_review_tool: "Skip", convergence_review_tool: "Skip" }
|
|
497
443
|
} else {
|
|
498
444
|
// "Other" in Execution allows specifying CLI tools from ~/.claude/cli-tools.json
|
|
499
445
|
userSelection = AskUserQuestion({
|
|
@@ -519,14 +465,25 @@ if (workflowPreferences.autoYes) {
|
|
|
519
465
|
]
|
|
520
466
|
},
|
|
521
467
|
{
|
|
522
|
-
question: "Code review after execution?",
|
|
523
|
-
header: "Review",
|
|
468
|
+
question: "Code review after execution? (runs in lite-execute)",
|
|
469
|
+
header: "Code Review",
|
|
524
470
|
multiSelect: false,
|
|
525
471
|
options: [
|
|
526
|
-
{ label: "Gemini Review", description: "Gemini CLI review" },
|
|
527
|
-
{ label: "Codex Review", description: "
|
|
472
|
+
{ label: "Gemini Review", description: "Gemini CLI: git diff quality review" },
|
|
473
|
+
{ label: "Codex Review", description: "Codex CLI: git-aware code review (--mode review)" },
|
|
528
474
|
{ label: "Agent Review", description: "@code-reviewer agent" },
|
|
529
|
-
{ label: "Skip", description: "No review" }
|
|
475
|
+
{ label: "Skip", description: "No code review" }
|
|
476
|
+
]
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
question: "Convergence review in test-review phase?",
|
|
480
|
+
header: "Convergence Review",
|
|
481
|
+
multiSelect: false,
|
|
482
|
+
options: [
|
|
483
|
+
{ label: "Agent", description: "Agent: verify convergence criteria against implementation" },
|
|
484
|
+
{ label: "Gemini", description: "Gemini CLI: convergence verification" },
|
|
485
|
+
{ label: "Codex", description: "Codex CLI: convergence verification" },
|
|
486
|
+
{ label: "Skip", description: "Skip convergence review, run tests only" }
|
|
530
487
|
]
|
|
531
488
|
}
|
|
532
489
|
]
|
|
@@ -534,7 +491,7 @@ if (workflowPreferences.autoYes) {
|
|
|
534
491
|
}
|
|
535
492
|
```
|
|
536
493
|
|
|
537
|
-
// TodoWrite: Phase 4 → completed `[${userSelection.execution_method}
|
|
494
|
+
// TodoWrite: Phase 4 → completed `[${userSelection.execution_method} | CR:${userSelection.code_review_tool} | CVR:${userSelection.convergence_review_tool}]`, Phase 5 → in_progress
|
|
538
495
|
|
|
539
496
|
## 10. LP-Phase 5: Handoff to Execution
|
|
540
497
|
|
|
@@ -561,6 +518,7 @@ executionContext = {
|
|
|
561
518
|
clarificationContext: clarificationContext || null,
|
|
562
519
|
executionMethod: userSelection.execution_method,
|
|
563
520
|
codeReviewTool: userSelection.code_review_tool,
|
|
521
|
+
convergenceReviewTool: userSelection.convergence_review_tool,
|
|
564
522
|
originalUserInput: task_description,
|
|
565
523
|
executorAssignments: executorAssignments, // { taskId: { executor, reason } } — overrides executionMethod
|
|
566
524
|
session: {
|
|
@@ -588,7 +546,7 @@ TodoWrite({ todos: [
|
|
|
588
546
|
{ content: "LP-Phase 1: Exploration", status: "completed" },
|
|
589
547
|
{ content: "LP-Phase 2: Clarification", status: "completed" },
|
|
590
548
|
{ content: "LP-Phase 3: Planning", status: "completed" },
|
|
591
|
-
{ content: `LP-Phase 4: Confirmed [${userSelection.execution_method}]`, status: "completed" },
|
|
549
|
+
{ content: `LP-Phase 4: Confirmed [${userSelection.execution_method} | CR:${userSelection.code_review_tool} | CVR:${userSelection.convergence_review_tool}]`, status: "completed" },
|
|
592
550
|
{ content: `LP-Phase 5: Handoff → lite-execute`, status: "completed" },
|
|
593
551
|
{ content: `LE-Phase 1: Task Loading [${taskCount} tasks]`, status: "in_progress", activeForm: "Loading tasks" }
|
|
594
552
|
]})
|
|
@@ -605,6 +563,7 @@ Skill("lite-execute")
|
|
|
605
563
|
├── explorations-manifest.json # Exploration index
|
|
606
564
|
├── planning-context.md # Evidence paths + understanding
|
|
607
565
|
├── plan.json # Plan overview (task_ids[])
|
|
566
|
+
├── code-review.md # Generated by lite-execute Step 4
|
|
608
567
|
├── test-checklist.json # Generated by lite-test-review
|
|
609
568
|
├── test-review.md # Generated by lite-test-review
|
|
610
569
|
└── .task/
|
|
@@ -618,9 +577,12 @@ Skill("lite-execute")
|
|
|
618
577
|
```
|
|
619
578
|
lite-plan (LP-Phase 1-5)
|
|
620
579
|
└─ Skill("lite-execute") ← executionContext (global)
|
|
621
|
-
├─ Step 1-
|
|
580
|
+
├─ Step 1-3: Task Execution
|
|
581
|
+
├─ Step 4: Code Review (quality/correctness/security)
|
|
622
582
|
└─ Step 5: Skill("lite-test-review") ← testReviewContext (global)
|
|
623
|
-
├─ TR-Phase 1
|
|
583
|
+
├─ TR-Phase 1: Detect test framework
|
|
584
|
+
├─ TR-Phase 2: Convergence verification (plan criteria)
|
|
585
|
+
├─ TR-Phase 3-4: Run tests + Auto-fix
|
|
624
586
|
└─ TR-Phase 5: Report + Sync specs
|
|
625
587
|
```
|
|
626
588
|
|
|
@@ -629,7 +591,7 @@ lite-plan (LP-Phase 1-5)
|
|
|
629
591
|
| Error | Resolution |
|
|
630
592
|
|-------|------------|
|
|
631
593
|
| Exploration agent failure | Skip exploration, continue with task description only |
|
|
632
|
-
| Planning agent failure |
|
|
594
|
+
| Planning agent failure | Retry with reduced complexity or suggest breaking task |
|
|
633
595
|
| Clarification timeout | Use exploration findings as-is |
|
|
634
596
|
| Confirmation timeout | Save context, display resume instructions |
|
|
635
597
|
| Modify loop > 3 times | Suggest breaking task or using /workflow-plan |
|
|
@@ -649,7 +611,7 @@ Auto mode authorizes the complete plan-and-execute workflow with a single confir
|
|
|
649
611
|
- [ ] Parallel exploration agents launched with run_in_background=false
|
|
650
612
|
- [ ] Explorations manifest built from auto-discovered files
|
|
651
613
|
- [ ] Clarification needs aggregated, deduped, and presented in batches of 4
|
|
652
|
-
- [ ] Plan generated via
|
|
614
|
+
- [ ] Plan generated via cli-lite-planning-agent
|
|
653
615
|
- [ ] Plan output as two-layer: plan.json (task_ids[]) + .task/TASK-*.json
|
|
654
616
|
- [ ] User confirmation collected (or auto-approved in auto mode)
|
|
655
617
|
- [ ] executionContext fully built with all artifacts and session references
|
|
@@ -31,31 +31,31 @@ Test review and fix engine for lite-execute chain or standalone invocation.
|
|
|
31
31
|
|
|
32
32
|
**Input Source**: `testReviewContext` global variable set by lite-execute Step 4
|
|
33
33
|
|
|
34
|
-
**Behavior**: Skip session discovery, inherit
|
|
34
|
+
**Behavior**: Skip session discovery, inherit convergenceReviewTool from execution chain, proceed directly to TR-Phase 1.
|
|
35
35
|
|
|
36
|
-
> **Note**: lite-execute Step
|
|
36
|
+
> **Note**: lite-execute Step 5 is the chain gate. Mode 1 invocation means execution + code review are complete — proceed with convergence verification + tests.
|
|
37
37
|
|
|
38
38
|
### Mode 2: Standalone
|
|
39
39
|
|
|
40
40
|
**Trigger**: User calls with session path or `--last`
|
|
41
41
|
|
|
42
|
-
**Behavior**: Discover session → load plan + tasks → `
|
|
42
|
+
**Behavior**: Discover session → load plan + tasks → `convergenceReviewTool = 'agent'` → proceed to TR-Phase 1.
|
|
43
43
|
|
|
44
44
|
```javascript
|
|
45
|
-
let sessionPath, plan, taskFiles,
|
|
45
|
+
let sessionPath, plan, taskFiles, convergenceReviewTool
|
|
46
46
|
|
|
47
47
|
if (testReviewContext) {
|
|
48
48
|
// Mode 1: from lite-execute chain
|
|
49
49
|
sessionPath = testReviewContext.session.folder
|
|
50
50
|
plan = testReviewContext.planObject
|
|
51
51
|
taskFiles = testReviewContext.taskFiles.map(tf => JSON.parse(Read(tf.path)))
|
|
52
|
-
|
|
52
|
+
convergenceReviewTool = testReviewContext.convergenceReviewTool || 'agent'
|
|
53
53
|
} else {
|
|
54
54
|
// Mode 2: standalone — find last session or use provided path
|
|
55
55
|
sessionPath = resolveSessionPath($ARGUMENTS) // Glob('.workflow/.lite-plan/*/plan.json'), take last
|
|
56
56
|
plan = JSON.parse(Read(`${sessionPath}/plan.json`))
|
|
57
57
|
taskFiles = plan.task_ids.map(id => JSON.parse(Read(`${sessionPath}/.task/${id}.json`)))
|
|
58
|
-
|
|
58
|
+
convergenceReviewTool = 'agent'
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
const skipFix = $ARGUMENTS?.includes('--skip-fix') || false
|
|
@@ -66,7 +66,7 @@ const skipFix = $ARGUMENTS?.includes('--skip-fix') || false
|
|
|
66
66
|
| Phase | Core Action | Output |
|
|
67
67
|
|-------|-------------|--------|
|
|
68
68
|
| TR-Phase 1 | Detect test framework + gather changes | testConfig, changedFiles |
|
|
69
|
-
| TR-Phase 2 |
|
|
69
|
+
| TR-Phase 2 | Convergence verification against plan criteria | reviewResults[] |
|
|
70
70
|
| TR-Phase 3 | Run tests + generate checklist | test-checklist.json |
|
|
71
71
|
| TR-Phase 4 | Auto-fix failures (iterative, max 3 rounds) | Fixed code + updated checklist |
|
|
72
72
|
| TR-Phase 5 | Output report + chain to session:sync | test-review.md |
|
|
@@ -93,32 +93,45 @@ Output: `testConfig = { command, framework, type }` + `changedFiles[]`
|
|
|
93
93
|
|
|
94
94
|
// TodoWrite: Phase 1 → completed, Phase 2 → in_progress
|
|
95
95
|
|
|
96
|
-
## TR-Phase 2:
|
|
96
|
+
## TR-Phase 2: Convergence Verification
|
|
97
97
|
|
|
98
|
-
**Skip if**: `
|
|
98
|
+
**Skip if**: `convergenceReviewTool === 'skip'` — set all tasks to PASS, proceed to Phase 3.
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
Verify each task's convergence criteria are met in the implementation and identify test gaps.
|
|
101
101
|
|
|
102
|
-
**Agent Review** (
|
|
102
|
+
**Agent Convergence Review** (convergenceReviewTool === 'agent', default):
|
|
103
103
|
|
|
104
104
|
For each task in taskFiles:
|
|
105
|
-
1. Extract `convergence.criteria[]`
|
|
106
|
-
2.
|
|
107
|
-
3. Read matched
|
|
108
|
-
4. Check test coverage:
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
1. Extract `convergence.criteria[]` from the task
|
|
106
|
+
2. Match `task.files[].path` against `changedFiles` to find actually-changed files
|
|
107
|
+
3. Read each matched file, verify each convergence criterion with file:line evidence
|
|
108
|
+
4. Check test coverage gaps:
|
|
109
|
+
- If `task.test.unit` defined but no matching test files in changedFiles → mark as test gap
|
|
110
|
+
- If `task.test.integration` defined but no integration test in changedFiles → mark as test gap
|
|
111
|
+
5. Build `reviewResult = { taskId, title, criteria_met[], criteria_unmet[], test_gaps[], files_reviewed[] }`
|
|
111
112
|
|
|
112
|
-
**
|
|
113
|
+
**Verdict logic**:
|
|
114
|
+
- PASS = all `convergence.criteria` met + no test gaps
|
|
115
|
+
- PARTIAL = some criteria met OR has test gaps
|
|
116
|
+
- FAIL = no criteria met
|
|
117
|
+
|
|
118
|
+
**CLI Convergence Review** (convergenceReviewTool === 'gemini' or 'codex'):
|
|
113
119
|
|
|
114
120
|
```javascript
|
|
115
|
-
const reviewId = `${sessionId}-
|
|
116
|
-
|
|
117
|
-
|
|
121
|
+
const reviewId = `${sessionId}-convergence`
|
|
122
|
+
const taskCriteria = taskFiles.map(t => `${t.id}: [${(t.convergence?.criteria || []).join(' | ')}]`).join('\n')
|
|
123
|
+
Bash(`ccw cli -p "PURPOSE: Convergence verification — check each task's completion criteria against actual implementation
|
|
124
|
+
TASK: • For each task below, verify every convergence criterion is satisfied in the changed files • Mark each criterion as MET (with file:line evidence) or UNMET (with what's missing) • Identify test coverage gaps (planned tests not found in changes)
|
|
125
|
+
|
|
126
|
+
TASK CRITERIA:
|
|
127
|
+
${taskCriteria}
|
|
128
|
+
|
|
129
|
+
CHANGED FILES: ${changedFiles.join(', ')}
|
|
130
|
+
|
|
118
131
|
MODE: analysis
|
|
119
|
-
CONTEXT: @${sessionPath}/plan.json @${sessionPath}/.task/*.json @**/* | Memory: lite-execute completed
|
|
120
|
-
EXPECTED: Per-task verdict
|
|
121
|
-
CONSTRAINTS: Read-only | Focus on convergence verification" --tool ${
|
|
132
|
+
CONTEXT: @${sessionPath}/plan.json @${sessionPath}/.task/*.json @**/* | Memory: lite-execute completed
|
|
133
|
+
EXPECTED: Per-task verdict (PASS/PARTIAL/FAIL) with per-criterion evidence + test gap list
|
|
134
|
+
CONSTRAINTS: Read-only | Focus strictly on convergence criteria verification, NOT code quality (code review already done in lite-execute)" --tool ${convergenceReviewTool} --mode analysis --id ${reviewId}`, { run_in_background: true })
|
|
122
135
|
// STOP - wait for hook callback, then parse CLI output into reviewResults format
|
|
123
136
|
```
|
|
124
137
|
|
|
@@ -207,13 +220,13 @@ Skill({ skill: "workflow:session:sync", args: `-y "Test review: ${testChecklist.
|
|
|
207
220
|
|
|
208
221
|
## Data Structures
|
|
209
222
|
|
|
210
|
-
### testReviewContext (Input - Mode 1, set by lite-execute)
|
|
223
|
+
### testReviewContext (Input - Mode 1, set by lite-execute Step 5)
|
|
211
224
|
|
|
212
225
|
```javascript
|
|
213
226
|
{
|
|
214
227
|
planObject: { /* same as executionContext.planObject */ },
|
|
215
228
|
taskFiles: [{ id: string, path: string }],
|
|
216
|
-
|
|
229
|
+
convergenceReviewTool: "skip" | "agent" | "gemini" | "codex",
|
|
217
230
|
executionResults: [...],
|
|
218
231
|
originalUserInput: string,
|
|
219
232
|
session: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-workflow",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.12",
|
|
4
4
|
"description": "JSON-driven multi-agent development framework with intelligent CLI orchestration (Gemini/Qwen/Codex), context-first architecture, and automated workflow execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "ccw/dist/index.js",
|