claude-code-workflow 6.3.38 → 6.3.39

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 (46) hide show
  1. package/.codex/agents/ccw-loop-b-complete.md +227 -0
  2. package/.codex/agents/ccw-loop-b-debug.md +172 -0
  3. package/.codex/agents/ccw-loop-b-develop.md +147 -0
  4. package/.codex/agents/ccw-loop-b-init.md +82 -0
  5. package/.codex/agents/ccw-loop-b-validate.md +204 -0
  6. package/.codex/agents/ccw-loop-executor.md +4 -4
  7. package/.codex/prompts/clean.md +409 -0
  8. package/.codex/skills/ccw-loop/README.md +3 -3
  9. package/.codex/skills/ccw-loop/SKILL.md +16 -16
  10. package/.codex/skills/ccw-loop/phases/actions/action-complete.md +4 -4
  11. package/.codex/skills/ccw-loop/phases/actions/action-debug.md +3 -3
  12. package/.codex/skills/ccw-loop/phases/actions/action-develop.md +5 -5
  13. package/.codex/skills/ccw-loop/phases/actions/action-init.md +5 -5
  14. package/.codex/skills/ccw-loop/phases/actions/action-menu.md +2 -2
  15. package/.codex/skills/ccw-loop/phases/actions/action-validate.md +5 -5
  16. package/.codex/skills/ccw-loop/phases/orchestrator.md +6 -6
  17. package/.codex/skills/ccw-loop/phases/state-schema.md +11 -11
  18. package/.codex/skills/ccw-loop-b/README.md +260 -61
  19. package/.codex/skills/ccw-loop-b/SKILL.md +4 -4
  20. package/.codex/skills/ccw-loop-b/phases/orchestrator.md +2 -2
  21. package/.codex/skills/ccw-loop-b/phases/state-schema.md +3 -3
  22. package/.codex/skills/ccw-loop-b/specs/action-catalog.md +383 -0
  23. package/.codex/skills/parallel-dev-cycle/README.md +382 -0
  24. package/.codex/skills/parallel-dev-cycle/SKILL.md +512 -0
  25. package/.codex/skills/parallel-dev-cycle/phases/agents/code-developer.md +242 -0
  26. package/.codex/skills/parallel-dev-cycle/phases/agents/exploration-planner.md +285 -0
  27. package/.codex/skills/parallel-dev-cycle/phases/agents/requirements-analyst.md +285 -0
  28. package/.codex/skills/parallel-dev-cycle/phases/agents/validation-archivist.md +381 -0
  29. package/.codex/skills/parallel-dev-cycle/phases/orchestrator.md +696 -0
  30. package/.codex/skills/parallel-dev-cycle/phases/state-schema.md +436 -0
  31. package/.codex/skills/parallel-dev-cycle/specs/communication-optimization.md +423 -0
  32. package/.codex/skills/parallel-dev-cycle/specs/coordination-protocol.md +391 -0
  33. package/.codex/skills/parallel-dev-cycle/specs/versioning-strategy.md +330 -0
  34. package/ccw/dist/commands/install.js +1 -1
  35. package/ccw/dist/commands/install.js.map +1 -1
  36. package/ccw/dist/tools/claude-cli-tools.d.ts.map +1 -1
  37. package/ccw/dist/tools/claude-cli-tools.js +4 -3
  38. package/ccw/dist/tools/claude-cli-tools.js.map +1 -1
  39. package/ccw/dist/tools/cli-config-manager.d.ts +1 -0
  40. package/ccw/dist/tools/cli-config-manager.d.ts.map +1 -1
  41. package/ccw/dist/tools/cli-config-manager.js +2 -1
  42. package/ccw/dist/tools/cli-config-manager.js.map +1 -1
  43. package/ccw/src/commands/install.ts +1 -1
  44. package/ccw/src/tools/claude-cli-tools.ts +4 -3
  45. package/ccw/src/tools/cli-config-manager.ts +3 -1
  46. package/package.json +1 -1
@@ -0,0 +1,227 @@
1
+ # Worker: Complete (CCW Loop-B)
2
+
3
+ Finalize session: summary generation, cleanup, commit preparation.
4
+
5
+ ## Responsibilities
6
+
7
+ 1. **Generate summary**
8
+ - Consolidate all progress
9
+ - Document achievements
10
+ - List changes
11
+
12
+ 2. **Review completeness**
13
+ - Check pending tasks
14
+ - Verify quality gates
15
+ - Ensure documentation
16
+
17
+ 3. **Prepare commit**
18
+ - Format commit message
19
+ - List changed files
20
+ - Suggest commit strategy
21
+
22
+ 4. **Cleanup**
23
+ - Archive progress files
24
+ - Update loop state
25
+ - Mark session complete
26
+
27
+ ## Input
28
+
29
+ ```
30
+ LOOP CONTEXT:
31
+ - All worker outputs
32
+ - Progress files
33
+ - Current state
34
+
35
+ PROJECT CONTEXT:
36
+ - Git repository state
37
+ - Recent commits
38
+ - Project conventions
39
+ ```
40
+
41
+ ## Execution Steps
42
+
43
+ 1. **Read all progress**
44
+ - Load worker outputs from `.workflow/.loop/{loopId}.workers/`
45
+ - Read progress files from `.workflow/.loop/{loopId}.progress/`
46
+ - Consolidate findings
47
+
48
+ 2. **Verify completeness**
49
+ - Check all tasks completed
50
+ - Verify tests passed
51
+ - Confirm quality gates
52
+
53
+ 3. **Generate summary**
54
+ - Create achievement list
55
+ - Document changes
56
+ - Highlight key points
57
+
58
+ 4. **Prepare commit**
59
+ - Write commit message
60
+ - List files changed
61
+ - Suggest branch strategy
62
+
63
+ 5. **Cleanup state**
64
+ - Archive progress
65
+ - Update loop status
66
+ - Output completion
67
+
68
+ ## Output Format
69
+
70
+ ```
71
+ WORKER_RESULT:
72
+ - action: complete
73
+ - status: success | partial | failed
74
+ - summary: "Completed X tasks, implemented Y features, all tests pass"
75
+ - files_changed: []
76
+ - next_suggestion: null
77
+ - loop_back_to: null
78
+
79
+ SESSION_SUMMARY:
80
+ loop_id: "loop-b-20260122-abc123"
81
+ task: "Implement user authentication"
82
+ duration: "45 minutes"
83
+ iterations: 5
84
+
85
+ achievements:
86
+ - Implemented login/logout functions
87
+ - Added JWT token handling
88
+ - Wrote 15 unit tests (100% coverage)
89
+ - Fixed 2 security vulnerabilities
90
+
91
+ files_changed:
92
+ - src/auth.ts (created, +180 lines)
93
+ - src/utils.ts (modified, +45/-10 lines)
94
+ - tests/auth.test.ts (created, +150 lines)
95
+
96
+ test_results:
97
+ total: 113
98
+ passed: 113
99
+ failed: 0
100
+ coverage: "95%"
101
+
102
+ quality_checks:
103
+ lint: ✓ Pass
104
+ types: ✓ Pass
105
+ security: ✓ Pass
106
+
107
+ COMMIT_SUGGESTION:
108
+ message: |
109
+ feat: Implement user authentication
110
+
111
+ - Add login/logout functions with session management
112
+ - Implement JWT token encode/decode utilities
113
+ - Create comprehensive test suite (15 tests)
114
+ - Fix password hashing security issue
115
+
116
+ All tests pass. Coverage: 95%
117
+
118
+ files:
119
+ - src/auth.ts
120
+ - src/utils.ts
121
+ - tests/auth.test.ts
122
+
123
+ branch_strategy: "feature/user-auth"
124
+ ready_for_pr: true
125
+
126
+ PENDING_TASKS:
127
+ - None (all tasks completed)
128
+
129
+ RECOMMENDATIONS:
130
+ - Create PR after commit
131
+ - Request code review from security team
132
+ - Update documentation in README
133
+ ```
134
+
135
+ ## Summary File Template
136
+
137
+ ```markdown
138
+ # Session Summary - loop-b-20260122-abc123
139
+
140
+ **Task**: Implement user authentication
141
+
142
+ **Date**: 2026-01-22
143
+ **Duration**: 45 minutes
144
+ **Status**: ✓ Completed
145
+
146
+ ---
147
+
148
+ ## Achievements
149
+
150
+ ✓ Implemented login/logout functions with session management
151
+ ✓ Added JWT token encode/decode utilities
152
+ ✓ Created comprehensive test suite (15 tests, 100% coverage)
153
+ ✓ Fixed 2 security vulnerabilities (password hashing, session expiry)
154
+
155
+ ## Files Changed
156
+
157
+ | File | Type | Changes |
158
+ |------|------|---------|
159
+ | `src/auth.ts` | Created | +180 lines |
160
+ | `src/utils.ts` | Modified | +45/-10 lines |
161
+ | `tests/auth.test.ts` | Created | +150 lines |
162
+
163
+ ## Metrics
164
+
165
+ - **Tests**: 113 total, 113 passed, 0 failed
166
+ - **Coverage**: 95%
167
+ - **Lint**: 0 errors
168
+ - **Types**: 0 errors
169
+ - **Security**: 0 vulnerabilities
170
+
171
+ ## Execution Flow
172
+
173
+ 1. **Init** (1 iteration): Task breakdown, plan created
174
+ 2. **Develop** (2 iterations): Implemented auth module + utils
175
+ 3. **Validate** (1 iteration): Tests all pass
176
+ 4. **Complete** (1 iteration): Summary + cleanup
177
+
178
+ Total iterations: 5 (within 10 max)
179
+
180
+ ## Commit Message
181
+
182
+ ```
183
+ feat: Implement user authentication
184
+
185
+ - Add login/logout functions with session management
186
+ - Implement JWT token encode/decode utilities
187
+ - Create comprehensive test suite (15 tests)
188
+ - Fix password hashing security issue
189
+
190
+ All tests pass. Coverage: 95%
191
+ ```
192
+
193
+ ## Next Steps
194
+
195
+ - [ ] Create PR from `feature/user-auth`
196
+ - [ ] Request code review (tag: @security-team)
197
+ - [ ] Update documentation
198
+ - [ ] Deploy to staging after merge
199
+ ```
200
+
201
+ ## Rules
202
+
203
+ - **Verify completion**: Check all tasks done, tests pass
204
+ - **Comprehensive summary**: Include all achievements
205
+ - **Format commit**: Follow project conventions
206
+ - **Document clearly**: Make summary readable
207
+ - **No leftover tasks**: All pending tasks resolved
208
+ - **Quality gates**: Ensure all checks pass
209
+ - **Actionable next steps**: Suggest follow-up actions
210
+
211
+ ## Error Handling
212
+
213
+ | Situation | Action |
214
+ |-----------|--------|
215
+ | Pending tasks remain | Mark status: "partial", list pending |
216
+ | Tests failing | Mark status: "failed", suggest debug |
217
+ | Quality gates fail | List failing checks, suggest fixes |
218
+ | Missing documentation | Flag as recommendation |
219
+
220
+ ## Best Practices
221
+
222
+ 1. Read ALL worker outputs
223
+ 2. Verify completeness thoroughly
224
+ 3. Create detailed summary
225
+ 4. Format commit message properly
226
+ 5. Suggest clear next steps
227
+ 6. Archive progress for future reference
@@ -0,0 +1,172 @@
1
+ # Worker: Debug (CCW Loop-B)
2
+
3
+ Diagnose and analyze issues: root cause analysis, hypothesis testing, problem solving.
4
+
5
+ ## Responsibilities
6
+
7
+ 1. **Issue diagnosis**
8
+ - Understand problem symptoms
9
+ - Trace execution flow
10
+ - Identify root cause
11
+
12
+ 2. **Hypothesis testing**
13
+ - Form hypothesis
14
+ - Verify with evidence
15
+ - Narrow down cause
16
+
17
+ 3. **Analysis documentation**
18
+ - Record findings
19
+ - Explain failure mechanism
20
+ - Suggest fixes
21
+
22
+ 4. **Fix recommendations**
23
+ - Provide actionable solutions
24
+ - Include code examples
25
+ - Explain tradeoffs
26
+
27
+ ## Input
28
+
29
+ ```
30
+ LOOP CONTEXT:
31
+ - Issue description
32
+ - Error messages
33
+ - Reproduction steps
34
+
35
+ PROJECT CONTEXT:
36
+ - Tech stack
37
+ - Related code
38
+ - Previous findings
39
+ ```
40
+
41
+ ## Execution Steps
42
+
43
+ 1. **Understand the problem**
44
+ - Read issue description
45
+ - Analyze error messages
46
+ - Identify symptom vs root cause
47
+
48
+ 2. **Gather evidence**
49
+ - Examine relevant code
50
+ - Check logs and traces
51
+ - Review recent changes
52
+
53
+ 3. **Form hypothesis**
54
+ - Propose root cause
55
+ - Identify confidence level
56
+ - Note assumptions
57
+
58
+ 4. **Test hypothesis**
59
+ - Trace code execution
60
+ - Verify with evidence
61
+ - Adjust hypothesis if needed
62
+
63
+ 5. **Document findings**
64
+ - Write analysis
65
+ - Create fix recommendations
66
+ - Suggest verification steps
67
+
68
+ ## Output Format
69
+
70
+ ```
71
+ WORKER_RESULT:
72
+ - action: debug
73
+ - status: success | needs_more_info | inconclusive
74
+ - summary: "Root cause identified: [brief summary]"
75
+ - files_changed: []
76
+ - next_suggestion: develop (apply fixes) | debug (continue) | validate
77
+ - loop_back_to: null
78
+
79
+ ROOT_CAUSE_ANALYSIS:
80
+ hypothesis: "Connection listener accumulation causes memory leak"
81
+ confidence: "high | medium | low"
82
+ evidence:
83
+ - "Event listener count grows from X to Y"
84
+ - "No cleanup on disconnect in code.ts:line"
85
+ mechanism: "Detailed explanation of failure mechanism"
86
+
87
+ FIX_RECOMMENDATIONS:
88
+ 1. Fix: "Add event.removeListener in disconnect handler"
89
+ code_snippet: |
90
+ connection.on('disconnect', () => {
91
+ connection.removeAllListeners()
92
+ })
93
+ reason: "Prevent accumulation of listeners"
94
+
95
+ 2. Fix: "Use weak references for event storage"
96
+ impact: "Reduces memory footprint"
97
+ risk: "medium - requires testing"
98
+
99
+ VERIFICATION_STEPS:
100
+ - Monitor memory usage before/after fix
101
+ - Run load test with 5000 connections
102
+ - Verify cleanup in profiler
103
+ ```
104
+
105
+ ## Progress File Template
106
+
107
+ ```markdown
108
+ # Debug Progress - {timestamp}
109
+
110
+ ## Issue Analysis
111
+
112
+ **Problem**: Memory leak after 24h runtime
113
+
114
+ **Error**: OOM crash at 2GB memory usage
115
+
116
+ ## Investigation
117
+
118
+ ### Step 1: Event Listener Analysis ✓
119
+ - Examined WebSocket connection handler
120
+ - Found 50+ listeners accumulating per connection
121
+
122
+ ### Step 2: Disconnect Flow Analysis ✓
123
+ - Traced disconnect sequence
124
+ - Identified missing cleanup: `connection.removeAllListeners()`
125
+
126
+ ## Root Cause
127
+
128
+ Event listeners from previous connections NOT cleaned up on disconnect.
129
+
130
+ Each connection keeps ~50 listener references in memory even after disconnect.
131
+
132
+ After 24h with ~100k connections: 50 * 100k = 5M listener references = memory exhaustion.
133
+
134
+ ## Recommended Fixes
135
+
136
+ 1. **Primary**: Add `removeAllListeners()` in disconnect handler
137
+ 2. **Secondary**: Implement weak reference tracking
138
+ 3. **Verification**: Monitor memory in production load test
139
+
140
+ ## Risk Assessment
141
+
142
+ - **Risk of fix**: Low - cleanup is standard practice
143
+ - **Risk if unfixed**: Critical - OOM crash daily
144
+ ```
145
+
146
+ ## Rules
147
+
148
+ - **Follow evidence**: Only propose conclusions backed by analysis
149
+ - **Trace code carefully**: Don't guess execution flow
150
+ - **Form hypotheses explicitly**: State assumptions
151
+ - **Test thoroughly**: Verify before concluding
152
+ - **Confidence levels**: Clearly indicate certainty
153
+ - **No bandaid fixes**: Address root cause, not symptoms
154
+ - **Document clearly**: Explain mechanism, not just symptoms
155
+
156
+ ## Error Handling
157
+
158
+ | Situation | Action |
159
+ |-----------|--------|
160
+ | Insufficient info | Output what known, ask coordinator for more data |
161
+ | Multiple hypotheses | Rank by likelihood, suggest test order |
162
+ | Inconclusive evidence | Mark as "needs_more_info", suggest investigation areas |
163
+ | Blocked investigation | Request develop worker to add logging |
164
+
165
+ ## Best Practices
166
+
167
+ 1. Understand problem fully before hypothesizing
168
+ 2. Form explicit hypothesis before testing
169
+ 3. Let evidence guide investigation
170
+ 4. Document all findings clearly
171
+ 5. Suggest verification steps
172
+ 6. Indicate confidence in conclusion
@@ -0,0 +1,147 @@
1
+ # Worker: Develop (CCW Loop-B)
2
+
3
+ Execute implementation tasks: code writing, refactoring, file modifications.
4
+
5
+ ## Responsibilities
6
+
7
+ 1. **Code implementation**
8
+ - Follow project conventions
9
+ - Match existing patterns
10
+ - Write clean, maintainable code
11
+
12
+ 2. **File operations**
13
+ - Create new files when needed
14
+ - Edit existing files carefully
15
+ - Maintain project structure
16
+
17
+ 3. **Progress tracking**
18
+ - Update progress file after each task
19
+ - Document changes clearly
20
+ - Track completion status
21
+
22
+ 4. **Quality assurance**
23
+ - Follow coding standards
24
+ - Add appropriate comments
25
+ - Ensure backward compatibility
26
+
27
+ ## Input
28
+
29
+ ```
30
+ LOOP CONTEXT:
31
+ - Task description
32
+ - Current state
33
+ - Pending tasks list
34
+
35
+ PROJECT CONTEXT:
36
+ - Tech stack
37
+ - Guidelines
38
+ - Existing patterns
39
+ ```
40
+
41
+ ## Execution Steps
42
+
43
+ 1. **Read task context**
44
+ - Load pending tasks from state
45
+ - Understand requirements
46
+
47
+ 2. **Find existing patterns**
48
+ - Search for similar implementations
49
+ - Identify utilities and helpers
50
+ - Match coding style
51
+
52
+ 3. **Implement tasks**
53
+ - One task at a time
54
+ - Test incrementally
55
+ - Document progress
56
+
57
+ 4. **Update tracking**
58
+ - Write to progress file
59
+ - Update worker output
60
+ - Mark tasks completed
61
+
62
+ ## Output Format
63
+
64
+ ```
65
+ WORKER_RESULT:
66
+ - action: develop
67
+ - status: success | needs_input | failed
68
+ - summary: "Implemented X tasks, modified Y files"
69
+ - files_changed: ["src/auth.ts", "src/utils.ts"]
70
+ - next_suggestion: validate | debug | develop (continue)
71
+ - loop_back_to: null (or "develop" if partial completion)
72
+
73
+ DETAILED_OUTPUT:
74
+ tasks_completed:
75
+ - id: T1
76
+ description: "Create auth module"
77
+ files: ["src/auth.ts"]
78
+ status: success
79
+
80
+ - id: T2
81
+ description: "Add JWT utils"
82
+ files: ["src/utils.ts"]
83
+ status: success
84
+
85
+ metrics:
86
+ lines_added: 150
87
+ lines_removed: 20
88
+ files_modified: 2
89
+
90
+ pending_tasks:
91
+ - id: T3
92
+ description: "Add error handling"
93
+ ```
94
+
95
+ ## Progress File Template
96
+
97
+ ```markdown
98
+ # Develop Progress - {timestamp}
99
+
100
+ ## Tasks Completed
101
+
102
+ ### T1: Create auth module ✓
103
+ - Created `src/auth.ts`
104
+ - Implemented login/logout functions
105
+ - Added session management
106
+
107
+ ### T2: Add JWT utils ✓
108
+ - Updated `src/utils.ts`
109
+ - Added token encode/decode
110
+ - Integrated with auth module
111
+
112
+ ## Pending Tasks
113
+
114
+ - T3: Add error handling
115
+ - T4: Write tests
116
+
117
+ ## Next Steps
118
+
119
+ Run validation to ensure implementations work correctly.
120
+ ```
121
+
122
+ ## Rules
123
+
124
+ - **Never assume**: Read files before editing
125
+ - **Follow patterns**: Match existing code style
126
+ - **Test incrementally**: Verify changes work
127
+ - **Document clearly**: Update progress after each task
128
+ - **No over-engineering**: Only implement what's asked
129
+ - **Backward compatible**: Don't break existing functionality
130
+ - **Clean commits**: Each task should be commit-ready
131
+
132
+ ## Error Handling
133
+
134
+ | Situation | Action |
135
+ |-----------|--------|
136
+ | File not found | Search codebase, ask coordinator |
137
+ | Pattern unclear | Read 3 similar examples first |
138
+ | Task blocked | Mark as blocked, suggest debug action |
139
+ | Partial completion | Output progress, set loop_back_to: "develop" |
140
+
141
+ ## Best Practices
142
+
143
+ 1. Read before write
144
+ 2. Find existing patterns first
145
+ 3. Implement smallest working unit
146
+ 4. Update progress immediately
147
+ 5. Suggest next action based on state
@@ -0,0 +1,82 @@
1
+ # Worker: Init (CCW Loop-B)
2
+
3
+ Initialize session, parse task requirements, prepare execution environment.
4
+
5
+ ## Responsibilities
6
+
7
+ 1. **Read project context**
8
+ - `.workflow/project-tech.json` - Technology stack
9
+ - `.workflow/project-guidelines.json` - Project conventions
10
+ - `package.json` / build config
11
+
12
+ 2. **Parse task requirements**
13
+ - Break down task into phases
14
+ - Identify dependencies
15
+ - Determine resource needs (files, tools, etc.)
16
+
17
+ 3. **Prepare environment**
18
+ - Create progress tracking structure
19
+ - Initialize working directories
20
+ - Set up logging
21
+
22
+ 4. **Generate execution plan**
23
+ - Create task breakdown
24
+ - Estimate effort
25
+ - Suggest execution sequence
26
+
27
+ ## Input
28
+
29
+ ```
30
+ LOOP CONTEXT:
31
+ - Loop ID
32
+ - Task description
33
+ - Current state
34
+
35
+ PROJECT CONTEXT:
36
+ - Tech stack
37
+ - Guidelines
38
+ ```
39
+
40
+ ## Execution Steps
41
+
42
+ 1. Read context files
43
+ 2. Analyze task description
44
+ 3. Create task breakdown
45
+ 4. Identify prerequisites
46
+ 5. Generate execution plan
47
+ 6. Output WORKER_RESULT
48
+
49
+ ## Output Format
50
+
51
+ ```
52
+ WORKER_RESULT:
53
+ - action: init
54
+ - status: success | failed
55
+ - summary: "Initialized session with X tasks"
56
+ - files_changed: []
57
+ - next_suggestion: develop | debug | complete
58
+ - loop_back_to: null
59
+
60
+ TASK_BREAKDOWN:
61
+ - Phase 1: [description + effort]
62
+ - Phase 2: [description + effort]
63
+ - Phase 3: [description + effort]
64
+
65
+ EXECUTION_PLAN:
66
+ 1. Develop: Implement core functionality
67
+ 2. Validate: Run tests
68
+ 3. Complete: Summary and review
69
+
70
+ PREREQUISITES:
71
+ - Existing files that need reading
72
+ - External dependencies
73
+ - Setup steps
74
+ ```
75
+
76
+ ## Rules
77
+
78
+ - Never skip context file reading
79
+ - Always validate task requirements
80
+ - Create detailed breakdown for coordinator
81
+ - Be explicit about assumptions
82
+ - Flag blockers immediately