claude-code-workflow 6.0.0 → 6.0.2
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/package.json +47 -0
- 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 +8 -7
- package/.claude/commands/workflow/status.md +0 -352
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: workflow:status
|
|
3
|
-
description: Generate on-demand views for project overview and workflow tasks with optional task-id filtering for detailed view
|
|
4
|
-
argument-hint: "[optional: --project|task-id|--validate|--dashboard]"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Workflow Status Command (/workflow:status)
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
10
|
-
Generates on-demand views from project and session data. Supports multiple modes:
|
|
11
|
-
1. **Project Overview** (`--project`): Shows completed features and project statistics
|
|
12
|
-
2. **Workflow Tasks** (default): Shows current session task progress
|
|
13
|
-
3. **HTML Dashboard** (`--dashboard`): Generates interactive HTML task board with active and archived sessions
|
|
14
|
-
|
|
15
|
-
No synchronization needed - all views are calculated from current JSON state.
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
```bash
|
|
19
|
-
/workflow:status # Show current workflow session overview
|
|
20
|
-
/workflow:status --project # Show project-level feature registry
|
|
21
|
-
/workflow:status impl-1 # Show specific task details
|
|
22
|
-
/workflow:status --validate # Validate workflow integrity
|
|
23
|
-
/workflow:status --dashboard # Generate HTML dashboard board
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Execution Process
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
Input Parsing:
|
|
30
|
-
└─ Decision (mode detection):
|
|
31
|
-
├─ --project flag → Project Overview Mode
|
|
32
|
-
├─ --dashboard flag → Dashboard Mode
|
|
33
|
-
├─ task-id argument → Task Details Mode
|
|
34
|
-
└─ No flags → Workflow Session Mode (default)
|
|
35
|
-
|
|
36
|
-
Project Overview Mode:
|
|
37
|
-
├─ Check project.json exists
|
|
38
|
-
├─ Read project data
|
|
39
|
-
├─ Parse and display overview + features
|
|
40
|
-
└─ Show recent archived sessions
|
|
41
|
-
|
|
42
|
-
Workflow Session Mode (default):
|
|
43
|
-
├─ Find active session
|
|
44
|
-
├─ Load session data
|
|
45
|
-
├─ Scan task files
|
|
46
|
-
└─ Display task progress
|
|
47
|
-
|
|
48
|
-
Dashboard Mode:
|
|
49
|
-
├─ Collect active sessions
|
|
50
|
-
├─ Collect archived sessions
|
|
51
|
-
├─ Generate HTML from template
|
|
52
|
-
└─ Write dashboard.html
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Implementation Flow
|
|
56
|
-
|
|
57
|
-
### Mode Selection
|
|
58
|
-
|
|
59
|
-
**Check for --project flag**:
|
|
60
|
-
- If `--project` flag present → Execute **Project Overview Mode**
|
|
61
|
-
- Otherwise → Execute **Workflow Session Mode** (default)
|
|
62
|
-
|
|
63
|
-
## Project Overview Mode
|
|
64
|
-
|
|
65
|
-
### Step 1: Check Project State
|
|
66
|
-
```bash
|
|
67
|
-
bash(test -f .workflow/project.json && echo "EXISTS" || echo "NOT_FOUND")
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**If NOT_FOUND**:
|
|
71
|
-
```
|
|
72
|
-
No project state found.
|
|
73
|
-
Run /workflow:session:start to initialize project.
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Step 2: Read Project Data
|
|
77
|
-
```bash
|
|
78
|
-
bash(cat .workflow/project.json)
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### Step 3: Parse and Display
|
|
82
|
-
|
|
83
|
-
**Data Processing**:
|
|
84
|
-
```javascript
|
|
85
|
-
const projectData = JSON.parse(Read('.workflow/project.json'));
|
|
86
|
-
const features = projectData.features || [];
|
|
87
|
-
const stats = projectData.statistics || {};
|
|
88
|
-
const overview = projectData.overview || null;
|
|
89
|
-
|
|
90
|
-
// Sort features by implementation date (newest first)
|
|
91
|
-
const sortedFeatures = features.sort((a, b) =>
|
|
92
|
-
new Date(b.implemented_at) - new Date(a.implemented_at)
|
|
93
|
-
);
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
**Output Format** (with extended overview):
|
|
97
|
-
```
|
|
98
|
-
## Project: ${projectData.project_name}
|
|
99
|
-
Initialized: ${projectData.initialized_at}
|
|
100
|
-
|
|
101
|
-
${overview ? `
|
|
102
|
-
### Overview
|
|
103
|
-
${overview.description}
|
|
104
|
-
|
|
105
|
-
**Technology Stack**:
|
|
106
|
-
${overview.technology_stack.languages.map(l => `- ${l.name}${l.primary ? ' (primary)' : ''}: ${l.file_count} files`).join('\n')}
|
|
107
|
-
Frameworks: ${overview.technology_stack.frameworks.join(', ')}
|
|
108
|
-
|
|
109
|
-
**Architecture**:
|
|
110
|
-
Style: ${overview.architecture.style}
|
|
111
|
-
Patterns: ${overview.architecture.patterns.join(', ')}
|
|
112
|
-
|
|
113
|
-
**Key Components** (${overview.key_components.length}):
|
|
114
|
-
${overview.key_components.map(c => `- ${c.name} (${c.path})\n ${c.description}`).join('\n')}
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
` : ''}
|
|
118
|
-
|
|
119
|
-
### Completed Features (${stats.total_features})
|
|
120
|
-
|
|
121
|
-
${sortedFeatures.map(f => `
|
|
122
|
-
- ${f.title} (${f.timeline?.implemented_at || f.implemented_at})
|
|
123
|
-
${f.description}
|
|
124
|
-
Tags: ${f.tags?.join(', ') || 'none'}
|
|
125
|
-
Session: ${f.traceability?.session_id || f.session_id}
|
|
126
|
-
Archive: ${f.traceability?.archive_path || 'unknown'}
|
|
127
|
-
${f.traceability?.commit_hash ? `Commit: ${f.traceability.commit_hash}` : ''}
|
|
128
|
-
`).join('\n')}
|
|
129
|
-
|
|
130
|
-
### Project Statistics
|
|
131
|
-
- Total Features: ${stats.total_features}
|
|
132
|
-
- Total Sessions: ${stats.total_sessions}
|
|
133
|
-
- Last Updated: ${stats.last_updated}
|
|
134
|
-
|
|
135
|
-
### Quick Access
|
|
136
|
-
- View session details: /workflow:status
|
|
137
|
-
- Archive query: jq '.archives[] | select(.session_id == "SESSION_ID")' .workflow/archives/manifest.json
|
|
138
|
-
- Documentation: .workflow/docs/${projectData.project_name}/
|
|
139
|
-
|
|
140
|
-
### Query Commands
|
|
141
|
-
# Find by tag
|
|
142
|
-
cat .workflow/project.json | jq '.features[] | select(.tags[] == "auth")'
|
|
143
|
-
|
|
144
|
-
# View archive
|
|
145
|
-
cat ${feature.traceability.archive_path}/IMPL_PLAN.md
|
|
146
|
-
|
|
147
|
-
# List all tags
|
|
148
|
-
cat .workflow/project.json | jq -r '.features[].tags[]' | sort -u
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
**Empty State**:
|
|
152
|
-
```
|
|
153
|
-
## Project: ${projectData.project_name}
|
|
154
|
-
Initialized: ${projectData.initialized_at}
|
|
155
|
-
|
|
156
|
-
No features completed yet.
|
|
157
|
-
|
|
158
|
-
Complete your first workflow session to add features:
|
|
159
|
-
1. /workflow:plan "feature description"
|
|
160
|
-
2. /workflow:execute
|
|
161
|
-
3. /workflow:session:complete
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
### Step 4: Show Recent Sessions (Optional)
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
# List 5 most recent archived sessions
|
|
168
|
-
bash(ls -1t .workflow/archives/WFS-* 2>/dev/null | head -5 | xargs -I {} basename {})
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
**Output**:
|
|
172
|
-
```
|
|
173
|
-
### Recent Sessions
|
|
174
|
-
- WFS-auth-system (archived)
|
|
175
|
-
- WFS-payment-flow (archived)
|
|
176
|
-
- WFS-user-dashboard (archived)
|
|
177
|
-
|
|
178
|
-
Use /workflow:session:complete to archive current session.
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## Workflow Session Mode (Default)
|
|
182
|
-
|
|
183
|
-
### Step 1: Find Active Session
|
|
184
|
-
```bash
|
|
185
|
-
find .workflow/active/ -name "WFS-*" -type d 2>/dev/null | head -1
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### Step 2: Load Session Data
|
|
189
|
-
```bash
|
|
190
|
-
cat .workflow/active/WFS-session/workflow-session.json
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
### Step 3: Scan Task Files
|
|
194
|
-
```bash
|
|
195
|
-
find .workflow/active/WFS-session/.task/ -name "*.json" -type f 2>/dev/null
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
### Step 4: Generate Task Status
|
|
199
|
-
```bash
|
|
200
|
-
cat .workflow/active/WFS-session/.task/impl-1.json | jq -r '.status'
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
### Step 5: Count Task Progress
|
|
204
|
-
```bash
|
|
205
|
-
find .workflow/active/WFS-session/.task/ -name "*.json" -type f | wc -l
|
|
206
|
-
find .workflow/active/WFS-session/.summaries/ -name "*.md" -type f 2>/dev/null | wc -l
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
### Step 6: Display Overview
|
|
210
|
-
```markdown
|
|
211
|
-
# Workflow Overview
|
|
212
|
-
**Session**: WFS-session-name
|
|
213
|
-
**Progress**: 3/8 tasks completed
|
|
214
|
-
|
|
215
|
-
## Active Tasks
|
|
216
|
-
- [IN PROGRESS] impl-1: Current task in progress
|
|
217
|
-
- [ ] impl-2: Next pending task
|
|
218
|
-
|
|
219
|
-
## Completed Tasks
|
|
220
|
-
- [COMPLETED] impl-0: Setup completed
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
## Dashboard Mode (HTML Board)
|
|
224
|
-
|
|
225
|
-
### Step 1: Check for --dashboard flag
|
|
226
|
-
```bash
|
|
227
|
-
# If --dashboard flag present → Execute Dashboard Mode
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
### Step 2: Collect Workflow Data
|
|
231
|
-
|
|
232
|
-
**Collect Active Sessions**:
|
|
233
|
-
```bash
|
|
234
|
-
# Find all active sessions
|
|
235
|
-
find .workflow/active/ -name "WFS-*" -type d 2>/dev/null
|
|
236
|
-
|
|
237
|
-
# For each active session, read metadata and tasks
|
|
238
|
-
for session in $(find .workflow/active/ -name "WFS-*" -type d 2>/dev/null); do
|
|
239
|
-
cat "$session/workflow-session.json"
|
|
240
|
-
find "$session/.task/" -name "*.json" -type f 2>/dev/null
|
|
241
|
-
done
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
**Collect Archived Sessions**:
|
|
245
|
-
```bash
|
|
246
|
-
# Find all archived sessions
|
|
247
|
-
find .workflow/archives/ -name "WFS-*" -type d 2>/dev/null
|
|
248
|
-
|
|
249
|
-
# Read manifest if exists
|
|
250
|
-
cat .workflow/archives/manifest.json 2>/dev/null
|
|
251
|
-
|
|
252
|
-
# For each archived session, read metadata
|
|
253
|
-
for archive in $(find .workflow/archives/ -name "WFS-*" -type d 2>/dev/null); do
|
|
254
|
-
cat "$archive/workflow-session.json" 2>/dev/null
|
|
255
|
-
# Count completed tasks
|
|
256
|
-
find "$archive/.task/" -name "*.json" -type f 2>/dev/null | wc -l
|
|
257
|
-
done
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### Step 3: Process and Structure Data
|
|
261
|
-
|
|
262
|
-
**Build data structure for dashboard**:
|
|
263
|
-
```javascript
|
|
264
|
-
const dashboardData = {
|
|
265
|
-
activeSessions: [],
|
|
266
|
-
archivedSessions: [],
|
|
267
|
-
generatedAt: new Date().toISOString()
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
// Process active sessions
|
|
271
|
-
for each active_session in active_sessions:
|
|
272
|
-
const sessionData = JSON.parse(Read(active_session/workflow-session.json));
|
|
273
|
-
const tasks = [];
|
|
274
|
-
|
|
275
|
-
// Load all tasks for this session
|
|
276
|
-
for each task_file in find(active_session/.task/*.json):
|
|
277
|
-
const taskData = JSON.parse(Read(task_file));
|
|
278
|
-
tasks.push({
|
|
279
|
-
task_id: taskData.task_id,
|
|
280
|
-
title: taskData.title,
|
|
281
|
-
status: taskData.status,
|
|
282
|
-
type: taskData.type
|
|
283
|
-
});
|
|
284
|
-
|
|
285
|
-
dashboardData.activeSessions.push({
|
|
286
|
-
session_id: sessionData.session_id,
|
|
287
|
-
project: sessionData.project,
|
|
288
|
-
status: sessionData.status,
|
|
289
|
-
created_at: sessionData.created_at || sessionData.initialized_at,
|
|
290
|
-
tasks: tasks
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
// Process archived sessions
|
|
294
|
-
for each archived_session in archived_sessions:
|
|
295
|
-
const sessionData = JSON.parse(Read(archived_session/workflow-session.json));
|
|
296
|
-
const taskCount = bash(find archived_session/.task/*.json | wc -l);
|
|
297
|
-
|
|
298
|
-
dashboardData.archivedSessions.push({
|
|
299
|
-
session_id: sessionData.session_id,
|
|
300
|
-
project: sessionData.project,
|
|
301
|
-
archived_at: sessionData.completed_at || sessionData.archived_at,
|
|
302
|
-
taskCount: parseInt(taskCount),
|
|
303
|
-
archive_path: archived_session
|
|
304
|
-
});
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
### Step 4: Generate HTML from Template
|
|
308
|
-
|
|
309
|
-
**Load template and inject data**:
|
|
310
|
-
```javascript
|
|
311
|
-
// Read the HTML template
|
|
312
|
-
const template = Read("~/.claude/templates/workflow-dashboard.html");
|
|
313
|
-
|
|
314
|
-
// Prepare data for injection
|
|
315
|
-
const dataJson = JSON.stringify(dashboardData, null, 2);
|
|
316
|
-
|
|
317
|
-
// Replace placeholder with actual data
|
|
318
|
-
const htmlContent = template.replace('{{WORKFLOW_DATA}}', dataJson);
|
|
319
|
-
|
|
320
|
-
// Ensure .workflow directory exists
|
|
321
|
-
bash(mkdir -p .workflow);
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
### Step 5: Write HTML File
|
|
325
|
-
|
|
326
|
-
```bash
|
|
327
|
-
# Write the generated HTML to .workflow/dashboard.html
|
|
328
|
-
Write({
|
|
329
|
-
file_path: ".workflow/dashboard.html",
|
|
330
|
-
content: htmlContent
|
|
331
|
-
})
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
### Step 6: Display Success Message
|
|
335
|
-
|
|
336
|
-
```markdown
|
|
337
|
-
Dashboard generated successfully!
|
|
338
|
-
|
|
339
|
-
Location: .workflow/dashboard.html
|
|
340
|
-
|
|
341
|
-
Open in browser:
|
|
342
|
-
file://$(pwd)/.workflow/dashboard.html
|
|
343
|
-
|
|
344
|
-
Features:
|
|
345
|
-
- 📊 Active sessions overview
|
|
346
|
-
- 📦 Archived sessions history
|
|
347
|
-
- 🔍 Search and filter
|
|
348
|
-
- 📈 Progress tracking
|
|
349
|
-
- 🎨 Dark/light theme
|
|
350
|
-
|
|
351
|
-
Refresh data: Re-run /workflow:status --dashboard
|
|
352
|
-
```
|