claude-code-workflow 6.0.0 → 6.0.1
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/review-fix.md +18 -58
- package/.claude/commands/workflow/review-module-cycle.md +20 -50
- package/.claude/commands/workflow/review-session-cycle.md +19 -48
- package/README.md +76 -10
- package/ccw/src/core/server.js +22 -1
- package/ccw/src/templates/dashboard-js/views/review-session.js +319 -0
- package/ccw/src/templates/dashboard.css +271 -0
- package/package.json +7 -7
- package/.claude/commands/workflow/status.md +0 -352
|
@@ -46,8 +46,7 @@ Automated fix orchestrator with **two-phase architecture**: AI-powered planning
|
|
|
46
46
|
1. **Intelligent Planning**: AI-powered analysis identifies optimal grouping and execution strategy
|
|
47
47
|
2. **Multi-stage Coordination**: Supports complex parallel + serial execution with dependency management
|
|
48
48
|
3. **Conservative Safety**: Mandatory test verification with automatic rollback on failure
|
|
49
|
-
4. **
|
|
50
|
-
5. **Resume Support**: Checkpoint-based recovery for interrupted sessions
|
|
49
|
+
4. **Resume Support**: Checkpoint-based recovery for interrupted sessions
|
|
51
50
|
|
|
52
51
|
### Orchestrator Boundary (CRITICAL)
|
|
53
52
|
- **ONLY command** for automated review finding fixes
|
|
@@ -59,14 +58,14 @@ Automated fix orchestrator with **two-phase architecture**: AI-powered planning
|
|
|
59
58
|
|
|
60
59
|
```
|
|
61
60
|
Phase 1: Discovery & Initialization
|
|
62
|
-
└─ Validate export file, create fix session structure, initialize state files
|
|
61
|
+
└─ Validate export file, create fix session structure, initialize state files
|
|
63
62
|
|
|
64
63
|
Phase 2: Planning Coordination (@cli-planning-agent)
|
|
65
64
|
├─ Analyze findings for patterns and dependencies
|
|
66
65
|
├─ Group by file + dimension + root cause similarity
|
|
67
66
|
├─ Determine execution strategy (parallel/serial/hybrid)
|
|
68
67
|
├─ Generate fix timeline with stages
|
|
69
|
-
└─ Output: fix-plan.json
|
|
68
|
+
└─ Output: fix-plan.json
|
|
70
69
|
|
|
71
70
|
Phase 3: Execution Orchestration (Stage-based)
|
|
72
71
|
For each timeline stage:
|
|
@@ -198,12 +197,10 @@ if (result.passRate < 100%) {
|
|
|
198
197
|
- Session creation: Generate fix-session-id (`fix-{timestamp}`)
|
|
199
198
|
- Directory structure: Create `{review-dir}/fixes/{fix-session-id}/` with subdirectories
|
|
200
199
|
- State files: Initialize active-fix-session.json (session marker)
|
|
201
|
-
- Dashboard generation: Create fix-dashboard.html from template (see Dashboard Generation below)
|
|
202
200
|
- TodoWrite initialization: Set up 4-phase tracking
|
|
203
201
|
|
|
204
202
|
**Phase 2: Planning Coordination**
|
|
205
203
|
- Launch @cli-planning-agent with findings data and project context
|
|
206
|
-
- Monitor planning progress (dashboard shows "Planning fixes..." indicator)
|
|
207
204
|
- Validate fix-plan.json output (schema conformance, includes metadata with session status)
|
|
208
205
|
- Load plan into memory for execution phase
|
|
209
206
|
- TodoWrite update: Mark planning complete, start execution
|
|
@@ -216,7 +213,6 @@ if (result.passRate < 100%) {
|
|
|
216
213
|
- Assign agent IDs (agents update their fix-progress-{N}.json)
|
|
217
214
|
- Handle agent failures gracefully (mark group as failed, continue)
|
|
218
215
|
- Advance to next stage only when current stage complete
|
|
219
|
-
- Dashboard polls and aggregates fix-progress-{N}.json files for display
|
|
220
216
|
|
|
221
217
|
**Phase 4: Completion & Aggregation**
|
|
222
218
|
- Collect final status from all fix-progress-{N}.json files
|
|
@@ -224,7 +220,7 @@ if (result.passRate < 100%) {
|
|
|
224
220
|
- Update fix-history.json with new session entry
|
|
225
221
|
- Remove active-fix-session.json
|
|
226
222
|
- TodoWrite completion: Mark all phases done
|
|
227
|
-
- Output summary to user
|
|
223
|
+
- Output summary to user
|
|
228
224
|
|
|
229
225
|
**Phase 5: Session Completion (Optional)**
|
|
230
226
|
- If all findings fixed successfully (no failures):
|
|
@@ -234,53 +230,12 @@ if (result.passRate < 100%) {
|
|
|
234
230
|
- Output: "Some findings failed. Review fix-summary.md before completing session."
|
|
235
231
|
- Do NOT auto-complete session
|
|
236
232
|
|
|
237
|
-
### Dashboard Generation
|
|
238
|
-
|
|
239
|
-
**MANDATORY**: Dashboard MUST be generated from template during Phase 1 initialization
|
|
240
|
-
|
|
241
|
-
**Template Location**: `~/.claude/templates/fix-dashboard.html`
|
|
242
|
-
|
|
243
|
-
**⚠️ POST-GENERATION**: Orchestrator and agents MUST NOT read/write/modify fix-dashboard.html after creation
|
|
244
|
-
|
|
245
|
-
**Generation Steps**:
|
|
246
|
-
|
|
247
|
-
```bash
|
|
248
|
-
# 1. Copy template to fix session directory
|
|
249
|
-
cp ~/.claude/templates/fix-dashboard.html ${sessionDir}/fixes/${fixSessionId}/fix-dashboard.html
|
|
250
|
-
|
|
251
|
-
# 2. Replace SESSION_ID placeholder
|
|
252
|
-
sed -i "s|{{SESSION_ID}}|${sessionId}|g" ${sessionDir}/fixes/${fixSessionId}/fix-dashboard.html
|
|
253
|
-
|
|
254
|
-
# 3. Replace REVIEW_DIR placeholder
|
|
255
|
-
sed -i "s|{{REVIEW_DIR}}|${reviewDir}|g" ${sessionDir}/fixes/${fixSessionId}/fix-dashboard.html
|
|
256
|
-
|
|
257
|
-
# 4. Start local server and output dashboard URL
|
|
258
|
-
cd ${sessionDir}/fixes/${fixSessionId} && python -m http.server 8766 --bind 127.0.0.1 &
|
|
259
|
-
echo "🔧 Fix Dashboard: http://127.0.0.1:8766/fix-dashboard.html"
|
|
260
|
-
echo " (Press Ctrl+C to stop server when done)"
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
**Dashboard Features**:
|
|
264
|
-
- Real-time progress tracking via JSON polling (3-second interval)
|
|
265
|
-
- Stage timeline visualization with parallel/serial execution modes
|
|
266
|
-
- Active groups and agents monitoring
|
|
267
|
-
- Flow control steps tracking for each agent
|
|
268
|
-
- Fix history drawer with session summaries
|
|
269
|
-
- Consumes new JSON structure (fix-plan.json with metadata + fix-progress-{N}.json)
|
|
270
|
-
|
|
271
|
-
**JSON Consumption**:
|
|
272
|
-
- `fix-plan.json`: Reads metadata field for session info, timeline stages, groups configuration
|
|
273
|
-
- `fix-progress-{N}.json`: Polls all progress files to aggregate real-time status
|
|
274
|
-
- `active-fix-session.json`: Detects active session on load
|
|
275
|
-
- `fix-history.json`: Loads historical fix sessions
|
|
276
|
-
|
|
277
233
|
### Output File Structure
|
|
278
234
|
|
|
279
235
|
```
|
|
280
236
|
.workflow/active/WFS-{session-id}/.review/
|
|
281
237
|
├── fix-export-{timestamp}.json # Exported findings (input)
|
|
282
238
|
└── fixes/{fix-session-id}/
|
|
283
|
-
├── fix-dashboard.html # Interactive dashboard (generated once, auto-polls JSON)
|
|
284
239
|
├── fix-plan.json # Planning agent output (execution plan with metadata)
|
|
285
240
|
├── fix-progress-1.json # Group 1 progress (planning agent init → agent updates)
|
|
286
241
|
├── fix-progress-2.json # Group 2 progress (planning agent init → agent updates)
|
|
@@ -291,10 +246,8 @@ echo " (Press Ctrl+C to stop server when done)"
|
|
|
291
246
|
```
|
|
292
247
|
|
|
293
248
|
**File Producers**:
|
|
294
|
-
- **Orchestrator**: `fix-dashboard.html` (generated once from template during Phase 1)
|
|
295
249
|
- **Planning Agent**: `fix-plan.json` (with metadata), all `fix-progress-*.json` (initial state)
|
|
296
250
|
- **Execution Agents**: Update assigned `fix-progress-{N}.json` in real-time
|
|
297
|
-
- **Dashboard (Browser)**: Reads `fix-plan.json` + all `fix-progress-*.json`, aggregates in-memory every 3 seconds via JavaScript polling
|
|
298
251
|
|
|
299
252
|
|
|
300
253
|
### Agent Invocation Template
|
|
@@ -347,7 +300,7 @@ For each group (G1, G2, G3, ...), generate fix-progress-{N}.json following templ
|
|
|
347
300
|
- Flow control: Empty implementation_approach array
|
|
348
301
|
- Errors: Empty array
|
|
349
302
|
|
|
350
|
-
**CRITICAL**: Ensure complete template structure
|
|
303
|
+
**CRITICAL**: Ensure complete template structure - all fields must be present.
|
|
351
304
|
|
|
352
305
|
## Analysis Requirements
|
|
353
306
|
|
|
@@ -419,7 +372,7 @@ Task({
|
|
|
419
372
|
description: `Fix ${group.findings.length} issues: ${group.group_name}`,
|
|
420
373
|
prompt: `
|
|
421
374
|
## Task Objective
|
|
422
|
-
Execute fixes for code review findings in group ${group.group_id}. Update progress file in real-time with flow control tracking
|
|
375
|
+
Execute fixes for code review findings in group ${group.group_id}. Update progress file in real-time with flow control tracking.
|
|
423
376
|
|
|
424
377
|
## Assignment
|
|
425
378
|
- Group ID: ${group.group_id}
|
|
@@ -549,7 +502,6 @@ When all findings processed:
|
|
|
549
502
|
|
|
550
503
|
### Progress File Updates
|
|
551
504
|
- **MUST update after every significant action** (before/after each step)
|
|
552
|
-
- **Dashboard polls every 3 seconds** - ensure writes are atomic
|
|
553
505
|
- **Always maintain complete structure** - never write partial updates
|
|
554
506
|
- **Use ISO 8601 timestamps** - e.g., "2025-01-25T14:36:00Z"
|
|
555
507
|
|
|
@@ -638,9 +590,17 @@ TodoWrite({
|
|
|
638
590
|
1. **Trust AI Planning**: Planning agent's grouping and execution strategy are based on dependency analysis
|
|
639
591
|
2. **Conservative Approach**: Test verification is mandatory - no fixes kept without passing tests
|
|
640
592
|
3. **Parallel Efficiency**: Default 3 concurrent agents balances speed and resource usage
|
|
641
|
-
4. **
|
|
642
|
-
5. **
|
|
643
|
-
6. **
|
|
644
|
-
|
|
593
|
+
4. **Resume Support**: Fix sessions can resume from checkpoints after interruption
|
|
594
|
+
5. **Manual Review**: Always review failed fixes manually - may require architectural changes
|
|
595
|
+
6. **Incremental Fixing**: Start with small batches (5-10 findings) before large-scale fixes
|
|
596
|
+
|
|
597
|
+
## Related Commands
|
|
598
|
+
|
|
599
|
+
### View Fix Progress
|
|
600
|
+
Use `ccw view` to open the workflow dashboard in browser:
|
|
601
|
+
|
|
602
|
+
```bash
|
|
603
|
+
ccw view
|
|
604
|
+
```
|
|
645
605
|
|
|
646
606
|
|
|
@@ -51,14 +51,12 @@ Independent multi-dimensional code review orchestrator with **hybrid parallel-it
|
|
|
51
51
|
2. **Session-Integrated**: Review results tracked within workflow session for unified management
|
|
52
52
|
3. **Comprehensive Coverage**: Same 7 specialized dimensions as session review
|
|
53
53
|
4. **Intelligent Prioritization**: Automatic identification of critical issues and cross-cutting concerns
|
|
54
|
-
5. **
|
|
55
|
-
6. **Unified Archive**: Review results archived with session for historical reference
|
|
54
|
+
5. **Unified Archive**: Review results archived with session for historical reference
|
|
56
55
|
|
|
57
56
|
### Orchestrator Boundary (CRITICAL)
|
|
58
57
|
- **ONLY command** for independent multi-dimensional module review
|
|
59
58
|
- Manages: dimension coordination, aggregation, iteration control, progress tracking
|
|
60
59
|
- Delegates: Code exploration and analysis to @cli-explore-agent, dimension-specific reviews via Deep Scan mode
|
|
61
|
-
- **⚠️ DASHBOARD CONSTRAINT**: Dashboard is generated ONCE during Phase 1 initialization. After initialization, orchestrator and agents MUST NOT read, write, or modify dashboard.html - it remains static for user interaction only.
|
|
62
60
|
|
|
63
61
|
## How It Works
|
|
64
62
|
|
|
@@ -66,7 +64,7 @@ Independent multi-dimensional code review orchestrator with **hybrid parallel-it
|
|
|
66
64
|
|
|
67
65
|
```
|
|
68
66
|
Phase 1: Discovery & Initialization
|
|
69
|
-
└─ Resolve file patterns, validate paths, initialize state, create output structure
|
|
67
|
+
└─ Resolve file patterns, validate paths, initialize state, create output structure
|
|
70
68
|
|
|
71
69
|
Phase 2: Parallel Reviews (for each dimension)
|
|
72
70
|
├─ Launch 7 review agents simultaneously
|
|
@@ -90,7 +88,7 @@ Phase 4: Iterative Deep-Dive (optional)
|
|
|
90
88
|
└─ Loop until no critical findings OR max iterations
|
|
91
89
|
|
|
92
90
|
Phase 5: Completion
|
|
93
|
-
└─ Finalize review-progress.json
|
|
91
|
+
└─ Finalize review-progress.json
|
|
94
92
|
```
|
|
95
93
|
|
|
96
94
|
### Agent Roles
|
|
@@ -219,37 +217,9 @@ done
|
|
|
219
217
|
|
|
220
218
|
**Step 4: Initialize Review State**
|
|
221
219
|
- State initialization: Create `review-state.json` with metadata, dimensions, max_iterations, resolved_files (merged metadata + state)
|
|
222
|
-
- Progress tracking: Create `review-progress.json` for
|
|
220
|
+
- Progress tracking: Create `review-progress.json` for progress tracking
|
|
223
221
|
|
|
224
|
-
**Step 5:
|
|
225
|
-
|
|
226
|
-
**Constraints**:
|
|
227
|
-
- **MANDATORY**: Dashboard MUST be generated from template: `~/.claude/templates/review-cycle-dashboard.html`
|
|
228
|
-
- **PROHIBITED**: Direct creation or custom generation without template
|
|
229
|
-
- **POST-GENERATION**: Orchestrator and agents MUST NOT read/write/modify dashboard.html after creation
|
|
230
|
-
|
|
231
|
-
**Generation Commands** (3 independent steps):
|
|
232
|
-
```bash
|
|
233
|
-
# Step 1: Copy template to output location
|
|
234
|
-
cp ~/.claude/templates/review-cycle-dashboard.html ${sessionDir}/.review/dashboard.html
|
|
235
|
-
|
|
236
|
-
# Step 2: Replace SESSION_ID placeholder
|
|
237
|
-
sed -i "s|{{SESSION_ID}}|${sessionId}|g" ${sessionDir}/.review/dashboard.html
|
|
238
|
-
|
|
239
|
-
# Step 3: Replace REVIEW_TYPE placeholder
|
|
240
|
-
sed -i "s|{{REVIEW_TYPE}}|module|g" ${sessionDir}/.review/dashboard.html
|
|
241
|
-
|
|
242
|
-
# Step 4: Replace REVIEW_DIR placeholder
|
|
243
|
-
sed -i "s|{{REVIEW_DIR}}|${reviewDir}|g" ${sessionDir}/.review/dashboard.html
|
|
244
|
-
|
|
245
|
-
# Output: Start local server and output dashboard URL
|
|
246
|
-
# Use Python HTTP server (available on most systems)
|
|
247
|
-
cd ${sessionDir}/.review && python -m http.server 8765 --bind 127.0.0.1 &
|
|
248
|
-
echo "📊 Dashboard: http://127.0.0.1:8765/dashboard.html"
|
|
249
|
-
echo " (Press Ctrl+C to stop server when done)"
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
**Step 6: TodoWrite Initialization**
|
|
222
|
+
**Step 5: TodoWrite Initialization**
|
|
253
223
|
- Set up progress tracking with hierarchical structure
|
|
254
224
|
- Mark Phase 1 completed, Phase 2 in_progress
|
|
255
225
|
|
|
@@ -280,7 +250,6 @@ echo " (Press Ctrl+C to stop server when done)"
|
|
|
280
250
|
- Finalize review-progress.json with completion statistics
|
|
281
251
|
- Update review-state.json with completion_time and phase=complete
|
|
282
252
|
- TodoWrite completion: Mark all tasks done
|
|
283
|
-
- Output: Dashboard path to user
|
|
284
253
|
|
|
285
254
|
|
|
286
255
|
|
|
@@ -301,12 +270,11 @@ echo " (Press Ctrl+C to stop server when done)"
|
|
|
301
270
|
├── iterations/ # Deep-dive results
|
|
302
271
|
│ ├── iteration-1-finding-{uuid}.json
|
|
303
272
|
│ └── iteration-2-finding-{uuid}.json
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
└── dashboard.html # Interactive dashboard (primary output)
|
|
273
|
+
└── reports/ # Human-readable reports
|
|
274
|
+
├── security-analysis.md
|
|
275
|
+
├── security-cli-output.txt
|
|
276
|
+
├── deep-dive-1-{uuid}.md
|
|
277
|
+
└── ...
|
|
310
278
|
```
|
|
311
279
|
|
|
312
280
|
**Session Context**:
|
|
@@ -772,23 +740,25 @@ TodoWrite({
|
|
|
772
740
|
3. **Use Glob Wisely**: `src/auth/**` is more efficient than `src/**` with lots of irrelevant files
|
|
773
741
|
4. **Trust Aggregation Logic**: Auto-selection based on proven heuristics
|
|
774
742
|
5. **Monitor Logs**: Check reports/ directory for CLI analysis insights
|
|
775
|
-
6. **Dashboard Polling**: Refresh every 5 seconds for real-time updates
|
|
776
|
-
7. **Export Results**: Use dashboard export for external tracking tools
|
|
777
743
|
|
|
778
744
|
## Related Commands
|
|
779
745
|
|
|
746
|
+
### View Review Progress
|
|
747
|
+
Use `ccw view` to open the review dashboard in browser:
|
|
748
|
+
|
|
749
|
+
```bash
|
|
750
|
+
ccw view
|
|
751
|
+
```
|
|
752
|
+
|
|
780
753
|
### Automated Fix Workflow
|
|
781
|
-
After completing a module review, use the
|
|
754
|
+
After completing a module review, use the generated findings JSON for automated fixing:
|
|
782
755
|
|
|
783
756
|
```bash
|
|
784
757
|
# Step 1: Complete review (this command)
|
|
785
758
|
/workflow:review-module-cycle src/auth/**
|
|
786
759
|
|
|
787
|
-
# Step 2:
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
# Step 3: Run automated fixes
|
|
791
|
-
/workflow:review-fix .workflow/active/WFS-{session-id}/.review/fix-export-{timestamp}.json
|
|
760
|
+
# Step 2: Run automated fixes using dimension findings
|
|
761
|
+
/workflow:review-fix .workflow/active/WFS-{session-id}/.review/
|
|
792
762
|
```
|
|
793
763
|
|
|
794
764
|
See `/workflow:review-fix` for automated fixing with smart grouping, parallel execution, and test verification.
|
|
@@ -45,13 +45,11 @@ Session-based multi-dimensional code review orchestrator with **hybrid parallel-
|
|
|
45
45
|
1. **Comprehensive Coverage**: 7 specialized dimensions analyze all quality aspects simultaneously
|
|
46
46
|
2. **Intelligent Prioritization**: Automatic identification of critical issues and cross-cutting concerns
|
|
47
47
|
3. **Actionable Insights**: Deep-dive iterations provide step-by-step remediation plans
|
|
48
|
-
4. **Real-time Visibility**: JSON-based progress tracking with interactive HTML dashboard
|
|
49
48
|
|
|
50
49
|
### Orchestrator Boundary (CRITICAL)
|
|
51
50
|
- **ONLY command** for comprehensive multi-dimensional review
|
|
52
51
|
- Manages: dimension coordination, aggregation, iteration control, progress tracking
|
|
53
52
|
- Delegates: Code exploration and analysis to @cli-explore-agent, dimension-specific reviews via Deep Scan mode
|
|
54
|
-
- **⚠️ DASHBOARD CONSTRAINT**: Dashboard is generated ONCE during Phase 1 initialization. After initialization, orchestrator and agents MUST NOT read, write, or modify dashboard.html - it remains static for user interaction only.
|
|
55
53
|
|
|
56
54
|
## How It Works
|
|
57
55
|
|
|
@@ -59,7 +57,7 @@ Session-based multi-dimensional code review orchestrator with **hybrid parallel-
|
|
|
59
57
|
|
|
60
58
|
```
|
|
61
59
|
Phase 1: Discovery & Initialization
|
|
62
|
-
└─ Validate session, initialize state, create output structure
|
|
60
|
+
└─ Validate session, initialize state, create output structure
|
|
63
61
|
|
|
64
62
|
Phase 2: Parallel Reviews (for each dimension)
|
|
65
63
|
├─ Launch 7 review agents simultaneously
|
|
@@ -83,7 +81,7 @@ Phase 4: Iterative Deep-Dive (optional)
|
|
|
83
81
|
└─ Loop until no critical findings OR max iterations
|
|
84
82
|
|
|
85
83
|
Phase 5: Completion
|
|
86
|
-
└─ Finalize review-progress.json
|
|
84
|
+
└─ Finalize review-progress.json
|
|
87
85
|
```
|
|
88
86
|
|
|
89
87
|
### Agent Roles
|
|
@@ -199,36 +197,9 @@ git log --since="${sessionCreatedAt}" --name-only --pretty=format: | sort -u
|
|
|
199
197
|
|
|
200
198
|
**Step 5: Initialize Review State**
|
|
201
199
|
- State initialization: Create `review-state.json` with metadata, dimensions, max_iterations (merged metadata + state)
|
|
202
|
-
- Progress tracking: Create `review-progress.json` for
|
|
200
|
+
- Progress tracking: Create `review-progress.json` for progress tracking
|
|
203
201
|
|
|
204
|
-
**Step 6:
|
|
205
|
-
|
|
206
|
-
**Constraints**:
|
|
207
|
-
- **MANDATORY**: Dashboard MUST be generated from template: `~/.claude/templates/review-cycle-dashboard.html`
|
|
208
|
-
- **PROHIBITED**: Direct creation or custom generation without template
|
|
209
|
-
- **POST-GENERATION**: Orchestrator and agents MUST NOT read/write/modify dashboard.html after creation
|
|
210
|
-
|
|
211
|
-
**Generation Commands** (3 independent steps):
|
|
212
|
-
```bash
|
|
213
|
-
# Step 1: Copy template to output location
|
|
214
|
-
cp ~/.claude/templates/review-cycle-dashboard.html ${sessionDir}/.review/dashboard.html
|
|
215
|
-
|
|
216
|
-
# Step 2: Replace SESSION_ID placeholder
|
|
217
|
-
sed -i "s|{{SESSION_ID}}|${sessionId}|g" ${sessionDir}/.review/dashboard.html
|
|
218
|
-
|
|
219
|
-
# Step 3: Replace REVIEW_TYPE placeholder
|
|
220
|
-
sed -i "s|{{REVIEW_TYPE}}|session|g" ${sessionDir}/.review/dashboard.html
|
|
221
|
-
|
|
222
|
-
# Step 4: Replace REVIEW_DIR placeholder
|
|
223
|
-
sed -i "s|{{REVIEW_DIR}}|${reviewDir}|g" ${sessionDir}/.review/dashboard.html
|
|
224
|
-
|
|
225
|
-
# Output: Start local server and output dashboard URL
|
|
226
|
-
cd ${sessionDir}/.review && python -m http.server 8765 --bind 127.0.0.1 &
|
|
227
|
-
echo "📊 Dashboard: http://127.0.0.1:8765/dashboard.html"
|
|
228
|
-
echo " (Press Ctrl+C to stop server when done)"
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
**Step 7: TodoWrite Initialization**
|
|
202
|
+
**Step 6: TodoWrite Initialization**
|
|
232
203
|
- Set up progress tracking with hierarchical structure
|
|
233
204
|
- Mark Phase 1 completed, Phase 2 in_progress
|
|
234
205
|
|
|
@@ -259,7 +230,6 @@ echo " (Press Ctrl+C to stop server when done)"
|
|
|
259
230
|
- Finalize review-progress.json with completion statistics
|
|
260
231
|
- Update review-state.json with completion_time and phase=complete
|
|
261
232
|
- TodoWrite completion: Mark all tasks done
|
|
262
|
-
- Output: Dashboard path to user
|
|
263
233
|
|
|
264
234
|
|
|
265
235
|
|
|
@@ -280,12 +250,11 @@ echo " (Press Ctrl+C to stop server when done)"
|
|
|
280
250
|
├── iterations/ # Deep-dive results
|
|
281
251
|
│ ├── iteration-1-finding-{uuid}.json
|
|
282
252
|
│ └── iteration-2-finding-{uuid}.json
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
└── dashboard.html # Interactive dashboard (primary output)
|
|
253
|
+
└── reports/ # Human-readable reports
|
|
254
|
+
├── security-analysis.md
|
|
255
|
+
├── security-cli-output.txt
|
|
256
|
+
├── deep-dive-1-{uuid}.md
|
|
257
|
+
└── ...
|
|
289
258
|
```
|
|
290
259
|
|
|
291
260
|
**Session Context**:
|
|
@@ -782,23 +751,25 @@ TodoWrite({
|
|
|
782
751
|
2. **Parallel Execution**: ~60 minutes for full initial review (7 dimensions)
|
|
783
752
|
3. **Trust Aggregation Logic**: Auto-selection based on proven heuristics
|
|
784
753
|
4. **Monitor Logs**: Check reports/ directory for CLI analysis insights
|
|
785
|
-
5. **Dashboard Polling**: Refresh every 5 seconds for real-time updates
|
|
786
|
-
6. **Export Results**: Use dashboard export for external tracking tools
|
|
787
754
|
|
|
788
755
|
## Related Commands
|
|
789
756
|
|
|
757
|
+
### View Review Progress
|
|
758
|
+
Use `ccw view` to open the review dashboard in browser:
|
|
759
|
+
|
|
760
|
+
```bash
|
|
761
|
+
ccw view
|
|
762
|
+
```
|
|
763
|
+
|
|
790
764
|
### Automated Fix Workflow
|
|
791
|
-
After completing a review, use the
|
|
765
|
+
After completing a review, use the generated findings JSON for automated fixing:
|
|
792
766
|
|
|
793
767
|
```bash
|
|
794
768
|
# Step 1: Complete review (this command)
|
|
795
769
|
/workflow:review-session-cycle
|
|
796
770
|
|
|
797
|
-
# Step 2:
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
# Step 3: Run automated fixes
|
|
801
|
-
/workflow:review-fix .workflow/active/WFS-{session-id}/.review/fix-export-{timestamp}.json
|
|
771
|
+
# Step 2: Run automated fixes using dimension findings
|
|
772
|
+
/workflow:review-fix .workflow/active/WFS-{session-id}/.review/
|
|
802
773
|
```
|
|
803
774
|
|
|
804
775
|
See `/workflow:review-fix` for automated fixing with smart grouping, parallel execution, and test verification.
|
package/README.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-
[](https://github.com/catlog22/Claude-Code-Workflow/releases)
|
|
6
|
+
[](https://www.npmjs.com/package/claude-code-workflow)
|
|
6
7
|
[](LICENSE)
|
|
7
8
|
[]()
|
|
8
9
|
|
|
@@ -12,16 +13,15 @@
|
|
|
12
13
|
|
|
13
14
|
---
|
|
14
15
|
|
|
15
|
-
**Claude Code Workflow (CCW)**
|
|
16
|
+
**Claude Code Workflow (CCW)** is a JSON-driven multi-agent development framework with intelligent CLI orchestration (Gemini/Qwen/Codex), context-first architecture, and automated workflow execution. It transforms AI development from simple prompt chaining into a powerful orchestration system.
|
|
16
17
|
|
|
17
|
-
> **🎉 Version
|
|
18
|
+
> **🎉 Version 6.0.0: npm Package & Simplified Installation**
|
|
18
19
|
>
|
|
19
20
|
> **Core Improvements**:
|
|
20
|
-
> -
|
|
21
|
-
> -
|
|
22
|
-
> -
|
|
23
|
-
> -
|
|
24
|
-
> - 🧠 **Intelligent Test Cycles**: Improved the `test-cycle-execute` command with smart iteration strategies and a universal `@test-fix-agent` for more effective testing.
|
|
21
|
+
> - 📦 **npm Package**: Now available as `claude-code-workflow` on npm for simplified global installation
|
|
22
|
+
> - 🖥️ **CCW CLI Tool**: New `ccw` command with dashboard viewer, installation management, and workflow visualization
|
|
23
|
+
> - 🎯 **Simplified Install Flow**: Unified installation via npm with local-only operation (no GitHub API dependency)
|
|
24
|
+
> - ✨ **Enhanced Dashboard**: MCP manager, review session improvements, and UI enhancements
|
|
25
25
|
>
|
|
26
26
|
> See [CHANGELOG.md](CHANGELOG.md) for complete details.
|
|
27
27
|
|
|
@@ -44,9 +44,26 @@ CCW is built on a set of core principles that distinguish it from traditional AI
|
|
|
44
44
|
|
|
45
45
|
## ⚙️ Installation
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
### **📦 npm Install (Recommended)**
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Install globally via npm:
|
|
50
|
+
```bash
|
|
51
|
+
npm install -g claude-code-workflow
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Then install workflow files to your system:
|
|
55
|
+
```bash
|
|
56
|
+
# Interactive installation
|
|
57
|
+
ccw install
|
|
58
|
+
|
|
59
|
+
# Global installation (to ~/.claude)
|
|
60
|
+
ccw install -m Global
|
|
61
|
+
|
|
62
|
+
# Project-specific installation
|
|
63
|
+
ccw install -m Path -p /path/to/project
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### **🚀 Alternative: One-Click Script Install**
|
|
50
67
|
|
|
51
68
|
**Windows (PowerShell):**
|
|
52
69
|
```powershell
|
|
@@ -67,6 +84,55 @@ If slash commands (e.g., `/workflow:*`) are recognized, the installation was suc
|
|
|
67
84
|
|
|
68
85
|
---
|
|
69
86
|
|
|
87
|
+
## 🖥️ CCW CLI Tool
|
|
88
|
+
|
|
89
|
+
The `ccw` command provides a powerful CLI for managing your Claude Code Workflow installation:
|
|
90
|
+
|
|
91
|
+
### **Commands**
|
|
92
|
+
|
|
93
|
+
| Command | Description |
|
|
94
|
+
|---------|-------------|
|
|
95
|
+
| `ccw install` | Install workflow files to Global (~/.claude) or specific Path |
|
|
96
|
+
| `ccw upgrade` | Upgrade existing installations to current package version |
|
|
97
|
+
| `ccw uninstall` | Remove workflow files from an installation |
|
|
98
|
+
| `ccw view` | Open the workflow dashboard in browser |
|
|
99
|
+
| `ccw serve` | Start dashboard server without opening browser |
|
|
100
|
+
| `ccw list` | List all managed installations |
|
|
101
|
+
|
|
102
|
+
### **Usage Examples**
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Install globally
|
|
106
|
+
ccw install -m Global
|
|
107
|
+
|
|
108
|
+
# Install to specific project
|
|
109
|
+
ccw install -m Path -p ./my-project
|
|
110
|
+
|
|
111
|
+
# Open dashboard
|
|
112
|
+
ccw view
|
|
113
|
+
|
|
114
|
+
# Start dashboard server on custom port
|
|
115
|
+
ccw serve -p 8080
|
|
116
|
+
|
|
117
|
+
# Upgrade all installations
|
|
118
|
+
ccw upgrade -a
|
|
119
|
+
|
|
120
|
+
# List installations
|
|
121
|
+
ccw list
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### **Dashboard Features**
|
|
125
|
+
|
|
126
|
+
The CCW Dashboard (`ccw view`) provides:
|
|
127
|
+
- 📊 **Session Overview**: View all workflow sessions with status and progress
|
|
128
|
+
- 📋 **Task Management**: Track task execution and completion
|
|
129
|
+
- 🔍 **Review Sessions**: Manage code review cycles
|
|
130
|
+
- ⚙️ **MCP Manager**: Configure and monitor MCP servers
|
|
131
|
+
- 🪝 **Hook Manager**: Manage Claude Code hooks
|
|
132
|
+
- 📁 **Project Explorer**: Navigate project structure and artifacts
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
70
136
|
## 🛠️ Command Reference
|
|
71
137
|
|
|
72
138
|
CCW provides a rich set of commands for managing workflows, tasks, and interactions with AI tools. For a complete list and detailed descriptions of all available commands, please refer to the [**COMMAND_REFERENCE.md**](COMMAND_REFERENCE.md) file.
|
package/ccw/src/core/server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import http from 'http';
|
|
2
2
|
import { URL } from 'url';
|
|
3
|
-
import { readFileSync, writeFileSync, existsSync, readdirSync, mkdirSync } from 'fs';
|
|
3
|
+
import { readFileSync, writeFileSync, existsSync, readdirSync, mkdirSync, promises as fsPromises } from 'fs';
|
|
4
4
|
import { join, dirname } from 'path';
|
|
5
5
|
import { homedir } from 'os';
|
|
6
6
|
import { createHash } from 'crypto';
|
|
@@ -139,6 +139,27 @@ export async function startServer(options = {}) {
|
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
// API: Read a JSON file (for fix progress tracking)
|
|
143
|
+
if (pathname === '/api/file') {
|
|
144
|
+
const filePath = url.searchParams.get('path');
|
|
145
|
+
if (!filePath) {
|
|
146
|
+
res.writeHead(400, { 'Content-Type': 'application/json' });
|
|
147
|
+
res.end(JSON.stringify({ error: 'File path is required' }));
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
try {
|
|
152
|
+
const content = await fsPromises.readFile(filePath, 'utf-8');
|
|
153
|
+
const json = JSON.parse(content);
|
|
154
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
155
|
+
res.end(JSON.stringify(json));
|
|
156
|
+
} catch (err) {
|
|
157
|
+
res.writeHead(404, { 'Content-Type': 'application/json' });
|
|
158
|
+
res.end(JSON.stringify({ error: 'File not found or invalid JSON' }));
|
|
159
|
+
}
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
|
|
142
163
|
// API: Get session detail data (context, summaries, impl-plan, review)
|
|
143
164
|
if (pathname === '/api/session-detail') {
|
|
144
165
|
const sessionPath = url.searchParams.get('path');
|