claude-code-workflow 6.0.5 → 6.1.0

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.
Files changed (117) hide show
  1. package/.claude/agents/action-planning-agent.md +1 -1
  2. package/.claude/agents/cli-execution-agent.md +269 -269
  3. package/.claude/agents/cli-explore-agent.md +182 -182
  4. package/.claude/agents/context-search-agent.md +582 -582
  5. package/.claude/agents/memory-bridge.md +93 -93
  6. package/.claude/commands/cli/cli-init.md +1 -1
  7. package/.claude/commands/memory/docs-full-cli.md +471 -471
  8. package/.claude/commands/memory/docs-related-cli.md +386 -386
  9. package/.claude/commands/memory/docs.md +615 -615
  10. package/.claude/commands/memory/load.md +1 -1
  11. package/.claude/commands/memory/update-full.md +332 -332
  12. package/.claude/commands/memory/update-related.md +5 -5
  13. package/.claude/commands/workflow/init.md +1 -1
  14. package/.claude/commands/workflow/lite-fix.md +621 -621
  15. package/.claude/commands/workflow/lite-plan.md +592 -592
  16. package/.claude/commands/workflow/tools/context-gather.md +434 -434
  17. package/.claude/commands/workflow/ui-design/generate.md +504 -504
  18. package/.claude/commands/workflow/ui-design/import-from-code.md +537 -537
  19. package/.claude/scripts/classify-folders.sh +4 -0
  20. package/.claude/scripts/convert_tokens_to_css.sh +4 -0
  21. package/.claude/scripts/detect_changed_modules.sh +5 -1
  22. package/.claude/scripts/discover-design-files.sh +87 -83
  23. package/.claude/scripts/generate_module_docs.sh +717 -713
  24. package/.claude/scripts/get_modules_by_depth.sh +5 -1
  25. package/.claude/scripts/ui-generate-preview.sh +4 -0
  26. package/.claude/scripts/ui-instantiate-prototypes.sh +4 -0
  27. package/.claude/scripts/update_module_claude.sh +4 -0
  28. package/.claude/skills/command-guide/index/all-commands.json +1 -12
  29. package/.claude/skills/command-guide/index/by-category.json +1 -12
  30. package/.claude/skills/command-guide/index/by-use-case.json +1 -12
  31. package/.claude/skills/command-guide/index/essential-commands.json +1 -12
  32. package/.claude/skills/command-guide/reference/agents/action-planning-agent.md +127 -71
  33. package/.claude/skills/command-guide/reference/agents/cli-execution-agent.md +269 -269
  34. package/.claude/skills/command-guide/reference/agents/cli-explore-agent.md +182 -182
  35. package/.claude/skills/command-guide/reference/agents/conceptual-planning-agent.md +18 -38
  36. package/.claude/skills/command-guide/reference/agents/context-search-agent.md +582 -577
  37. package/.claude/skills/command-guide/reference/agents/memory-bridge.md +93 -93
  38. package/.claude/skills/command-guide/reference/commands/cli/cli-init.md +1 -1
  39. package/.claude/skills/command-guide/reference/commands/memory/docs-full-cli.md +471 -471
  40. package/.claude/skills/command-guide/reference/commands/memory/docs-related-cli.md +386 -386
  41. package/.claude/skills/command-guide/reference/commands/memory/docs.md +615 -610
  42. package/.claude/skills/command-guide/reference/commands/memory/load.md +1 -1
  43. package/.claude/skills/command-guide/reference/commands/memory/update-full.md +332 -332
  44. package/.claude/skills/command-guide/reference/commands/memory/update-related.md +5 -5
  45. package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/artifacts.md +299 -451
  46. package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/auto-parallel.md +14 -37
  47. package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/synthesis.md +252 -350
  48. package/.claude/skills/command-guide/reference/commands/workflow/init.md +2 -2
  49. package/.claude/skills/command-guide/reference/commands/workflow/lite-execute.md +52 -0
  50. package/.claude/skills/command-guide/reference/commands/workflow/lite-fix.md +621 -602
  51. package/.claude/skills/command-guide/reference/commands/workflow/lite-plan.md +46 -36
  52. package/.claude/skills/command-guide/reference/commands/workflow/review-fix.md +18 -58
  53. package/.claude/skills/command-guide/reference/commands/workflow/review-module-cycle.md +22 -52
  54. package/.claude/skills/command-guide/reference/commands/workflow/review-session-cycle.md +19 -48
  55. package/.claude/skills/command-guide/reference/commands/workflow/session/start.md +25 -5
  56. package/.claude/skills/command-guide/reference/commands/workflow/tdd-plan.md +1 -1
  57. package/.claude/skills/command-guide/reference/commands/workflow/test-fix-gen.md +7 -7
  58. package/.claude/skills/command-guide/reference/commands/workflow/tools/context-gather.md +434 -434
  59. package/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-agent.md +151 -11
  60. package/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-tdd.md +4 -4
  61. package/.claude/skills/command-guide/reference/commands/workflow/tools/test-task-generate.md +1 -1
  62. package/.claude/skills/command-guide/reference/commands/workflow/ui-design/generate.md +504 -504
  63. package/.claude/skills/command-guide/reference/commands/workflow/ui-design/import-from-code.md +537 -537
  64. package/.claude/workflows/context-search-strategy.md +77 -77
  65. package/.claude/workflows/tool-strategy.md +90 -71
  66. package/.claude/workflows/workflow-architecture.md +1 -1
  67. package/ccw/src/cli.js +7 -0
  68. package/ccw/src/commands/tool.js +181 -0
  69. package/ccw/src/core/dashboard-generator.js +18 -3
  70. package/ccw/src/core/lite-scanner.js +35 -11
  71. package/ccw/src/core/server.js +531 -46
  72. package/ccw/src/templates/dashboard-css/01-base.css +161 -0
  73. package/ccw/src/templates/dashboard-css/02-session.css +726 -0
  74. package/ccw/src/templates/dashboard-css/03-tasks.css +512 -0
  75. package/ccw/src/templates/dashboard-css/04-lite-tasks.css +843 -0
  76. package/ccw/src/templates/dashboard-css/05-context.css +2206 -0
  77. package/ccw/src/templates/dashboard-css/06-cards.css +1570 -0
  78. package/ccw/src/templates/dashboard-css/07-managers.css +936 -0
  79. package/ccw/src/templates/dashboard-css/08-review.css +1266 -0
  80. package/ccw/src/templates/dashboard-css/09-explorer.css +1397 -0
  81. package/ccw/src/templates/dashboard-js/components/global-notifications.js +219 -0
  82. package/ccw/src/templates/dashboard-js/components/hook-manager.js +10 -0
  83. package/ccw/src/templates/dashboard-js/components/mcp-manager.js +11 -1
  84. package/ccw/src/templates/dashboard-js/components/navigation.js +11 -5
  85. package/ccw/src/templates/dashboard-js/components/tabs-context.js +20 -20
  86. package/ccw/src/templates/dashboard-js/components/tabs-other.js +11 -11
  87. package/ccw/src/templates/dashboard-js/components/theme.js +29 -1
  88. package/ccw/src/templates/dashboard-js/main.js +4 -0
  89. package/ccw/src/templates/dashboard-js/state.js +5 -0
  90. package/ccw/src/templates/dashboard-js/views/explorer.js +852 -0
  91. package/ccw/src/templates/dashboard-js/views/home.js +13 -9
  92. package/ccw/src/templates/dashboard-js/views/hook-manager.js +8 -5
  93. package/ccw/src/templates/dashboard-js/views/lite-tasks.js +21 -16
  94. package/ccw/src/templates/dashboard-js/views/mcp-manager.js +90 -19
  95. package/ccw/src/templates/dashboard-js/views/project-overview.js +15 -11
  96. package/ccw/src/templates/dashboard-js/views/review-session.js +3 -3
  97. package/ccw/src/templates/dashboard-js/views/session-detail.js +38 -28
  98. package/ccw/src/templates/dashboard.html +129 -28
  99. package/ccw/src/tools/classify-folders.js +204 -0
  100. package/ccw/src/tools/convert-tokens-to-css.js +250 -0
  101. package/ccw/src/tools/detect-changed-modules.js +288 -0
  102. package/ccw/src/tools/discover-design-files.js +134 -0
  103. package/ccw/src/tools/edit-file.js +266 -0
  104. package/ccw/src/tools/generate-module-docs.js +416 -0
  105. package/ccw/src/tools/get-modules-by-depth.js +308 -0
  106. package/ccw/src/tools/index.js +176 -0
  107. package/ccw/src/tools/ui-generate-preview.js +327 -0
  108. package/ccw/src/tools/ui-instantiate-prototypes.js +301 -0
  109. package/ccw/src/tools/update-module-claude.js +380 -0
  110. package/package.json +1 -1
  111. package/.claude/skills/command-guide/reference/commands/workflow/status.md +0 -352
  112. package/ccw/src/core/server.js.bak +0 -385
  113. package/ccw/src/core/server_original.bak +0 -385
  114. package/ccw/src/templates/dashboard.css +0 -8187
  115. package/ccw/src/templates/dashboard_tailwind.html +0 -42
  116. package/ccw/src/templates/dashboard_test.html +0 -37
  117. package/ccw/src/templates/tailwind-base.css +0 -212
@@ -14,8 +14,8 @@ Generate implementation planning documents (IMPL_PLAN.md, task JSONs, TODO_LIST.
14
14
  ## Core Philosophy
15
15
  - **Planning Only**: Generate planning documents (IMPL_PLAN.md, task JSONs, TODO_LIST.md) - does NOT implement code
16
16
  - **Agent-Driven Document Generation**: Delegate plan generation to action-planning-agent
17
+ - **N+1 Parallel Planning**: Auto-detect multi-module projects, enable parallel planning (2+1 or 3+1 mode)
17
18
  - **Progressive Loading**: Load context incrementally (Core → Selective → On-Demand) due to analysis.md file size
18
- - **Two-Phase Flow**: Discovery (context gathering) → Output (planning document generation)
19
19
  - **Memory-First**: Reuse loaded documents from conversation memory
20
20
  - **Smart Selection**: Load synthesis_output OR guidance + relevant role analyses, NOT all role analyses
21
21
  - **MCP-Enhanced**: Use MCP tools for advanced code analysis and research
@@ -28,22 +28,38 @@ Input Parsing:
28
28
  ├─ Parse flags: --session
29
29
  └─ Validation: session_id REQUIRED
30
30
 
31
- Phase 1: Context Preparation (Command)
31
+ Phase 1: Context Preparation & Module Detection (Command)
32
32
  ├─ Assemble session paths (metadata, context package, output dirs)
33
- └─ Provide metadata (session_id, execution_mode, mcp_capabilities)
33
+ ├─ Provide metadata (session_id, execution_mode, mcp_capabilities)
34
+ ├─ Auto-detect modules from context-package + directory structure
35
+ └─ Decision:
36
+ ├─ modules.length == 1 → Single Agent Mode (Phase 2A)
37
+ └─ modules.length >= 2 → Parallel Mode (Phase 2B + Phase 3)
34
38
 
35
- Phase 2: Planning Document Generation (Agent)
39
+ Phase 2A: Single Agent Planning (Original Flow)
36
40
  ├─ Load context package (progressive loading strategy)
37
41
  ├─ Generate Task JSON Files (.task/IMPL-*.json)
38
42
  ├─ Create IMPL_PLAN.md
39
43
  └─ Generate TODO_LIST.md
44
+
45
+ Phase 2B: N Parallel Planning (Multi-Module)
46
+ ├─ Launch N action-planning-agents simultaneously (one per module)
47
+ ├─ Each agent generates module-scoped tasks (IMPL-{prefix}{seq}.json)
48
+ ├─ Task ID format: IMPL-A1, IMPL-A2... / IMPL-B1, IMPL-B2...
49
+ └─ Each module limited to ≤9 tasks
50
+
51
+ Phase 3: Integration (+1 Coordinator, Multi-Module Only)
52
+ ├─ Collect all module task JSONs
53
+ ├─ Resolve cross-module dependencies (CROSS::{module}::{pattern} → actual ID)
54
+ ├─ Generate unified IMPL_PLAN.md (grouped by module)
55
+ └─ Generate TODO_LIST.md (hierarchical: module → tasks)
40
56
  ```
41
57
 
42
58
  ## Document Generation Lifecycle
43
59
 
44
- ### Phase 1: Context Preparation (Command Responsibility)
60
+ ### Phase 1: Context Preparation & Module Detection (Command Responsibility)
45
61
 
46
- **Command prepares session paths and metadata for planning document generation.**
62
+ **Command prepares session paths, metadata, and detects module structure.**
47
63
 
48
64
  **Session Path Structure**:
49
65
  ```
@@ -52,8 +68,12 @@ Phase 2: Planning Document Generation (Agent)
52
68
  ├── .process/
53
69
  │ └── context-package.json # Context package with artifact catalog
54
70
  ├── .task/ # Output: Task JSON files
55
- ├── IMPL_PLAN.md # Output: Implementation plan
56
- └── TODO_LIST.md # Output: TODO list
71
+ ├── IMPL-A1.json # Multi-module: prefixed by module
72
+ │ ├── IMPL-A2.json
73
+ │ ├── IMPL-B1.json
74
+ │ └── ...
75
+ ├── IMPL_PLAN.md # Output: Implementation plan (grouped by module)
76
+ └── TODO_LIST.md # Output: TODO list (hierarchical)
57
77
  ```
58
78
 
59
79
  **Command Preparation**:
@@ -66,9 +86,40 @@ Phase 2: Planning Document Generation (Agent)
66
86
  - `session_id`
67
87
  - `mcp_capabilities` (available MCP tools)
68
88
 
89
+ 3. **Auto Module Detection** (determines single vs parallel mode):
90
+ ```javascript
91
+ function autoDetectModules(contextPackage, projectRoot) {
92
+ // Priority 1: Explicit frontend/backend separation
93
+ if (exists('src/frontend') && exists('src/backend')) {
94
+ return [
95
+ { name: 'frontend', prefix: 'A', paths: ['src/frontend'] },
96
+ { name: 'backend', prefix: 'B', paths: ['src/backend'] }
97
+ ];
98
+ }
99
+
100
+ // Priority 2: Monorepo structure
101
+ if (exists('packages/*') || exists('apps/*')) {
102
+ return detectMonorepoModules(); // Returns 2-3 main packages
103
+ }
104
+
105
+ // Priority 3: Context-package dependency clustering
106
+ const modules = clusterByDependencies(contextPackage.dependencies?.internal);
107
+ if (modules.length >= 2) return modules.slice(0, 3);
108
+
109
+ // Default: Single module (original flow)
110
+ return [{ name: 'main', prefix: '', paths: ['.'] }];
111
+ }
112
+ ```
113
+
114
+ **Decision Logic**:
115
+ - `modules.length == 1` → Phase 2A (Single Agent, original flow)
116
+ - `modules.length >= 2` → Phase 2B + Phase 3 (N+1 Parallel)
117
+
69
118
  **Note**: CLI tool usage is now determined semantically by action-planning-agent based on user's task description, not by flags.
70
119
 
71
- ### Phase 2: Planning Document Generation (Agent Responsibility)
120
+ ### Phase 2A: Single Agent Planning (Original Flow)
121
+
122
+ **Condition**: `modules.length == 1` (no multi-module detected)
72
123
 
73
124
  **Purpose**: Generate IMPL_PLAN.md, task JSONs, and TODO_LIST.md - planning documents only, NOT code implementation.
74
125
 
@@ -132,7 +183,7 @@ Determine CLI tool usage per-step based on user's task description:
132
183
 
133
184
  ## QUALITY STANDARDS
134
185
  Hard Constraints:
135
- - Task count <= 12 (hard limit - request re-scope if exceeded)
186
+ - Task count <= 18 (hard limit - request re-scope if exceeded)
136
187
  - All requirements quantified (explicit counts and enumerated lists)
137
188
  - Acceptance criteria measurable (include verification commands)
138
189
  - Artifact references mapped from context package
@@ -148,4 +199,93 @@ Hard Constraints:
148
199
  )
149
200
  ```
150
201
 
151
-
202
+ ### Phase 2B: N Parallel Planning (Multi-Module)
203
+
204
+ **Condition**: `modules.length >= 2` (multi-module detected)
205
+
206
+ **Purpose**: Launch N action-planning-agents simultaneously, one per module, for parallel task generation.
207
+
208
+ **Parallel Agent Invocation**:
209
+ ```javascript
210
+ // Launch N agents in parallel (one per module)
211
+ const planningTasks = modules.map(module =>
212
+ Task(
213
+ subagent_type="action-planning-agent",
214
+ description=`Plan ${module.name} module`,
215
+ prompt=`
216
+ ## SCOPE
217
+ - Module: ${module.name} (${module.type})
218
+ - Focus Paths: ${module.paths.join(', ')}
219
+ - Task ID Prefix: IMPL-${module.prefix}
220
+ - Task Limit: ≤9 tasks
221
+ - Other Modules: ${otherModules.join(', ')}
222
+ - Cross-module deps format: "CROSS::{module}::{pattern}"
223
+
224
+ ## SESSION PATHS
225
+ Input:
226
+ - Context Package: .workflow/active/{session-id}/.process/context-package.json
227
+ Output:
228
+ - Task Dir: .workflow/active/{session-id}/.task/
229
+
230
+ ## INSTRUCTIONS
231
+ - Generate tasks ONLY for ${module.name} module
232
+ - Use task ID format: IMPL-${module.prefix}1, IMPL-${module.prefix}2, ...
233
+ - For cross-module dependencies, use: depends_on: ["CROSS::B::api-endpoint"]
234
+ - Maximum 9 tasks per module
235
+ `
236
+ )
237
+ );
238
+
239
+ // Execute all in parallel
240
+ await Promise.all(planningTasks);
241
+ ```
242
+
243
+ **Output Structure** (direct to .task/):
244
+ ```
245
+ .task/
246
+ ├── IMPL-A1.json # Module A (e.g., frontend)
247
+ ├── IMPL-A2.json
248
+ ├── IMPL-B1.json # Module B (e.g., backend)
249
+ ├── IMPL-B2.json
250
+ └── IMPL-C1.json # Module C (e.g., shared)
251
+ ```
252
+
253
+ **Task ID Naming**:
254
+ - Format: `IMPL-{prefix}{seq}.json`
255
+ - Prefix: A, B, C... (assigned by detection order)
256
+ - Sequence: 1, 2, 3... (per-module increment)
257
+
258
+ ### Phase 3: Integration (+1 Coordinator, Multi-Module Only)
259
+
260
+ **Condition**: Only executed when `modules.length >= 2`
261
+
262
+ **Purpose**: Collect all module tasks, resolve cross-module dependencies, generate unified documents.
263
+
264
+ **Integration Logic**:
265
+ ```javascript
266
+ // 1. Collect all module task JSONs
267
+ const allTasks = glob('.task/IMPL-*.json').map(loadJson);
268
+
269
+ // 2. Resolve cross-module dependencies
270
+ for (const task of allTasks) {
271
+ if (task.depends_on) {
272
+ task.depends_on = task.depends_on.map(dep => {
273
+ if (dep.startsWith('CROSS::')) {
274
+ // CROSS::B::api-endpoint → find matching IMPL-B* task
275
+ const [, targetModule, pattern] = dep.match(/CROSS::(\w+)::(.+)/);
276
+ return findTaskByModuleAndPattern(allTasks, targetModule, pattern);
277
+ }
278
+ return dep;
279
+ });
280
+ }
281
+ }
282
+
283
+ // 3. Generate unified IMPL_PLAN.md (grouped by module)
284
+ generateIMPL_PLAN(allTasks, modules);
285
+
286
+ // 4. Generate TODO_LIST.md (hierarchical structure)
287
+ generateTODO_LIST(allTasks, modules);
288
+ ```
289
+
290
+ **Note**: IMPL_PLAN.md and TODO_LIST.md structure definitions are in `action-planning-agent.md`.
291
+
@@ -42,10 +42,10 @@ Autonomous TDD task JSON and IMPL_PLAN.md generation using action-planning-agent
42
42
  - Different tech stacks or domains within feature
43
43
 
44
44
  ### Task Limits
45
- - **Maximum 10 tasks** (hard limit for TDD workflows)
45
+ - **Maximum 18 tasks** (hard limit for TDD workflows)
46
46
  - **Feature-based**: Complete functional units with internal TDD cycles
47
47
  - **Hierarchy**: Flat (≤5 simple features) | Two-level (6-10 for complex features with sub-features)
48
- - **Re-scope**: If >10 tasks needed, break project into multiple TDD workflow sessions
48
+ - **Re-scope**: If >18 tasks needed, break project into multiple TDD workflow sessions
49
49
 
50
50
  ### TDD Cycle Mapping
51
51
  - **Old approach**: 1 feature = 3 tasks (TEST-N.M, IMPL-N.M, REFACTOR-N.M)
@@ -249,7 +249,7 @@ Refer to: @.claude/agents/action-planning-agent.md for:
249
249
  - Each task executes Red-Green-Refactor phases sequentially
250
250
  - Task count = Feature count (typically 5 features = 5 tasks)
251
251
  - Subtasks only when complexity >2500 lines or >6 files per cycle
252
- - **Maximum 10 tasks** (hard limit for TDD workflows)
252
+ - **Maximum 18 tasks** (hard limit for TDD workflows)
253
253
 
254
254
  #### TDD Cycle Mapping
255
255
  - **Simple features**: IMPL-N with internal Red-Green-Refactor phases
@@ -318,7 +318,7 @@ Refer to: @.claude/agents/action-planning-agent.md for:
318
318
 
319
319
  **Quality Gates** (Full checklist in action-planning-agent.md):
320
320
  - ✓ Quantification requirements enforced (explicit counts, measurable acceptance, exact targets)
321
- - ✓ Task count ≤10 (hard limit)
321
+ - ✓ Task count ≤18 (hard limit)
322
322
  - ✓ Each task has meta.tdd_workflow: true
323
323
  - ✓ Each task has exactly 3 implementation steps with tdd_phase field
324
324
  - ✓ Green phase includes test-fix cycle logic
@@ -212,7 +212,7 @@ PRIMARY requirements source - extract and map to task JSONs:
212
212
 
213
213
  ## QUALITY STANDARDS
214
214
  Hard Constraints:
215
- - Task count: minimum 2, maximum 12
215
+ - Task count: minimum 2, maximum 18
216
216
  - All requirements quantified from TEST_ANALYSIS_RESULTS.md
217
217
  - Test framework matches existing project framework
218
218
  - flow_control includes reusable_test_tools and test_commands from project