claude-code-workflow 6.3.42 → 6.3.43

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.
@@ -55,11 +55,11 @@ Unified planning command using **issue-plan-agent** that combines exploration an
55
55
  ## Execution Process
56
56
 
57
57
  ```
58
- Phase 1: Issue Loading
58
+ Phase 1: Issue Loading & Intelligent Grouping
59
59
  ├─ Parse input (single, comma-separated, or --all-pending)
60
60
  ├─ Fetch issue metadata (ID, title, tags)
61
61
  ├─ Validate issues exist (create if needed)
62
- └─ Create batches by size (max 3 per batch by default)
62
+ └─ Intelligent grouping via Gemini (semantic similarity, max 3 per batch)
63
63
 
64
64
  Phase 2: Unified Explore + Plan (issue-plan-agent)
65
65
  ├─ Launch issue-plan-agent per batch
@@ -119,17 +119,11 @@ if (useAllPending) {
119
119
  }
120
120
  // Note: Agent fetches full issue content via `ccw issue status <id> --json`
121
121
 
122
- // Simple size-based batching (max batchSize issues per group)
123
- function createBatches(issues, batchSize) {
124
- const batches = [];
125
- for (let i = 0; i < issues.length; i += batchSize) {
126
- batches.push(issues.slice(i, i + batchSize));
127
- }
128
- return batches;
129
- }
122
+ // Intelligent grouping: Analyze issues by title/tags, group semantically similar ones
123
+ // Strategy: Same module/component, related bugs, feature clusters
124
+ // Constraint: Max ${batchSize} issues per batch
130
125
 
131
- const batches = createBatches(issues, batchSize);
132
- console.log(`Processing ${issues.length} issues in ${batches.length} batch(es) (max ${batchSize} issues/agent)`);
126
+ console.log(`Processing ${issues.length} issues in ${batches.length} batch(es)`);
133
127
 
134
128
  TodoWrite({
135
129
  todos: batches.map((_, i) => ({
@@ -7,7 +7,7 @@ Multi-agent parallel development cycle using Codex subagent pattern with continu
7
7
  This skill implements a **single-file-per-agent** development workflow:
8
8
 
9
9
  - **RA**: `requirements.md` (all requirements + edge cases + history)
10
- - **EP**: `plan.md` (architecture + tasks + integration points)
10
+ - **EP**: `exploration.md`, `architecture.md`, `plan.json` (codebase exploration + architecture + structured tasks)
11
11
  - **CD**: `implementation.md` (progress + files + decisions + testing)
12
12
  - **VAS**: `summary.md` (validation + test results + recommendations)
13
13
 
@@ -49,7 +49,9 @@ Creates:
49
49
  │ ├── requirements.md (v1.0.0)
50
50
  │ └── changes.log (NDJSON)
51
51
  ├── ep/
52
- │ ├── plan.md (v1.0.0)
52
+ │ ├── exploration.md (v1.0.0)
53
+ │ ├── architecture.md (v1.0.0)
54
+ │ ├── plan.json (v1.0.0)
53
55
  │ └── changes.log (NDJSON)
54
56
  ├── cd/
55
57
  │ ├── implementation.md (v1.0.0)
@@ -113,20 +115,19 @@ When iteration completes, next extends to v1.1.0:
113
115
  ```
114
116
  Current State (v1.0.0)
115
117
  ├── requirements.md (v1.0.0)
116
- ├── plan.md (v1.0.0)
118
+ ├── plan.json (v1.0.0)
117
119
  ├── implementation.md (v1.0.0)
118
120
  └── summary.md (v1.0.0)
119
121
 
120
122
  User: "Add GitHub provider"
121
123
 
122
124
  Archive Old Write New
123
- ├── history/requirements-v1.0.0.md
124
- ├── history/plan-v1.0.0.md requirements.md (v1.1.0) - REWRITTEN
125
- ├── history/impl-v1.0.0.md plan.md (v1.1.0) - REWRITTEN
126
- └── history/summary-v1.0.0.md implementation.md (v1.1.0) - REWRITTEN
127
- → summary.md (v1.1.0) - REWRITTEN
128
-
129
- Append to changes.log (NDJSON)
125
+ ├── history/requirements-v1.0.0.md → requirements.md (v1.1.0) - REWRITTEN
126
+ ├── history/plan-v1.0.0.json plan.json (v1.1.0) - REWRITTEN
127
+ ├── history/impl-v1.0.0.md implementation.md (v1.1.0) - REWRITTEN
128
+ └── history/summary-v1.0.0.md summary.md (v1.1.0) - REWRITTEN
129
+
130
+ Append to changes.log (NDJSON)
130
131
  ```
131
132
 
132
133
  ## Session Files
@@ -142,11 +143,13 @@ ra/ - Requirements Analyst
142
143
  └── requirements-v1.1.0.md
143
144
 
144
145
  ep/ - Exploration & Planning
145
- ├── plan.md # v1.2.0 (current)
146
+ ├── exploration.md # v1.2.0 (codebase exploration)
147
+ ├── architecture.md # v1.2.0 (architecture design)
148
+ ├── plan.json # v1.2.0 (structured task list, current)
146
149
  ├── changes.log # NDJSON audit trail
147
150
  └── history/
148
- ├── plan-v1.0.0.md
149
- └── plan-v1.1.0.md
151
+ ├── plan-v1.0.0.json
152
+ └── plan-v1.1.0.json
150
153
 
151
154
  cd/ - Code Developer
152
155
  ├── implementation.md # v1.2.0 (current)
@@ -203,7 +206,7 @@ vas/ - Validation & Archival
203
206
  | Agent | File | Contains | Size |
204
207
  |-------|------|----------|------|
205
208
  | **RA** | requirements.md | All FR, NFR, edge cases, history summary | ~2-5KB |
206
- | **EP** | plan.md | Architecture, all tasks, critical path, history | ~3-8KB |
209
+ | **EP** | exploration.md + architecture.md + plan.json | Codebase exploration, architecture design, structured task list | ~5-10KB total |
207
210
  | **CD** | implementation.md | Completed tasks, files changed, decisions, tests | ~4-10KB |
208
211
  | **VAS** | summary.md | Test results, coverage, issues, recommendations | ~5-12KB |
209
212
 
@@ -362,14 +365,14 @@ Orchestrator (main coordinator)
362
365
 
363
366
  All write to:
364
367
  - requirements.md (v1.x.0)
365
- - plan.md (v1.x.0)
368
+ - exploration.md, architecture.md, plan.json (v1.x.0)
366
369
  - implementation.md (v1.x.0)
367
370
  - summary.md (v1.x.0)
368
371
  - changes.log (NDJSON append)
369
372
 
370
373
  [Automatic archival]
371
374
  - history/requirements-v1.{x-1}.0.md
372
- - history/plan-v1.{x-1}.0.md
375
+ - history/plan-v1.{x-1}.0.json
373
376
  - etc...
374
377
 
375
378
  Orchestrator: Next iteration?
@@ -28,7 +28,7 @@ The Code Developer is responsible for implementing features according to the pla
28
28
  - Document all file modifications
29
29
  - Log changes in NDJSON format
30
30
  - Track which iteration introduced which changes
31
- - Update code-changes.log
31
+ - Update changes.log
32
32
 
33
33
  4. **Report Issues**
34
34
  - Document development blockers
@@ -43,7 +43,7 @@ The Code Developer is responsible for implementing features according to the pla
43
43
  - Test code before submitting
44
44
  - Document code changes clearly
45
45
  - Track blockers and issues
46
- - Append to code-changes.log, never overwrite
46
+ - Append to changes.log, never overwrite
47
47
  - Reference requirements in code comments
48
48
  - Use meaningful commit messages in implementation notes
49
49
 
@@ -90,7 +90,7 @@ For each task in the plan:
90
90
  - Reference requirements
91
91
 
92
92
  3. **Track Changes**
93
- - Log each file modification to code-changes.log
93
+ - Log each file modification to changes.log
94
94
  - Format: `{timestamp, iteration, file, action, description}`
95
95
  - Include reason for change
96
96
 
@@ -99,12 +99,96 @@ For each task in the plan:
99
99
  - Verify integration
100
100
  - Test error cases
101
101
  - Check performance
102
+ - **If tests fail**: Initiate Debug Workflow (see Debug Workflow section)
102
103
 
103
104
  5. **Report Progress**
104
105
  - Update implementation.md
105
106
  - Log any issues or blockers
106
107
  - Note decisions made
107
108
 
109
+ ## Debug Workflow
110
+
111
+ When tests fail during implementation, the CD agent MUST initiate the hypothesis-driven debug workflow. This workflow systematically identifies and resolves bugs through structured hypothesis testing.
112
+
113
+ ### Debug Triggers
114
+
115
+ | Trigger | Condition | Action |
116
+ |---------|-----------|--------|
117
+ | **Test Failure** | Automated tests fail during implementation | Start debug workflow |
118
+ | **Integration Conflict** | Blockers logged in `issues.md` | Start debug workflow |
119
+ | **VAS Feedback** | Orchestrator provides validation failure feedback | Start debug workflow |
120
+
121
+ ### Debug Workflow Phases
122
+
123
+ 1. **Isolate Failure**
124
+ - Pinpoint the specific test or condition that is failing
125
+ - Extract exact error message and stack trace
126
+ - Identify the failing component/function
127
+
128
+ 2. **Formulate Hypothesis**
129
+ - Generate a specific, testable hypothesis about the root cause
130
+ - Example: "Error is caused by null value passed from function X"
131
+ - Log hypothesis in `debug-log.ndjson`
132
+ - Prioritize hypotheses based on: error messages > recent changes > dependency relationships > edge cases
133
+
134
+ 3. **Design Experiment**
135
+ - Determine minimal change to test hypothesis
136
+ - Options: add logging, create minimal unit test, inspect variable, add breakpoint
137
+ - Document experiment design
138
+
139
+ 4. **Execute & Observe**
140
+ - Apply the change and run the test
141
+ - Capture inputs, actions taken, and observed outcomes
142
+ - Log structured results in `debug-log.ndjson`
143
+
144
+ 5. **Analyze & Conclude**
145
+ - Compare outcome to hypothesis
146
+ - If **confirmed**: Proceed to implement fix (Phase 6)
147
+ - If **refuted**: Log finding and formulate new hypothesis (return to Phase 2)
148
+ - If **inconclusive**: Refine experiment and repeat
149
+
150
+ 6. **Implement Fix**
151
+ - Once root cause confirmed, implement necessary code changes
152
+ - Document fix rationale in implementation.md
153
+ - Log fix in changes.log
154
+
155
+ 7. **Verify Fix**
156
+ - Run all relevant tests to ensure fix is effective
157
+ - Verify no regressions introduced
158
+ - Mark issue as resolved in issues.md
159
+
160
+ ### Debug Log Format (NDJSON)
161
+
162
+ File: `.workflow/.cycle/{cycleId}.progress/cd/debug-log.ndjson`
163
+
164
+ Schema:
165
+ ```json
166
+ {
167
+ "timestamp": "2026-01-23T10:00:00+08:00",
168
+ "iteration": 1,
169
+ "issue_id": "BUG-001",
170
+ "file": "src/auth/oauth.ts",
171
+ "hypothesis": "OAuth token refresh fails due to expired refresh_token not handled",
172
+ "action": "Added logging to capture refresh_token expiry",
173
+ "observation": "Refresh token is expired but code doesn't check expiry before use",
174
+ "outcome": "confirmed"
175
+ }
176
+ ```
177
+
178
+ Outcome values: `confirmed | refuted | inconclusive`
179
+
180
+ ### Hypothesis Priority Order
181
+
182
+ 1. **Direct Error Messages/Stack Traces**: Most reliable starting point
183
+ 2. **Recent Changes**: Check `changes.log` for recent modifications
184
+ 3. **Dependency Relationships**: Analyze relationships between failing component and its dependencies
185
+ 4. **Edge Cases**: Review `edge-cases.md` for documented edge cases
186
+
187
+ ### Output
188
+
189
+ Debug workflow generates an additional file:
190
+ - **debug-log.ndjson**: NDJSON log of all hypothesis-test cycles
191
+
108
192
  ### Phase 3: Output
109
193
 
110
194
  Generate files in `.workflow/.cycle/{cycleId}.progress/cd/`:
@@ -150,7 +234,7 @@ Overview of what was implemented in this iteration.
150
234
  - Code review and merge
151
235
  ```
152
236
 
153
- **code-changes.log** (NDJSON):
237
+ **changes.log** (NDJSON):
154
238
  ```
155
239
  {"timestamp":"2026-01-22T10:30:00+08:00","iteration":1,"file":"src/config/oauth.ts","action":"create","task":"TASK-001","description":"Created OAuth configuration","lines_added":45,"lines_removed":0}
156
240
  {"timestamp":"2026-01-22T10:45:00+08:00","iteration":1,"file":"src/models/User.ts","action":"modify","task":"TASK-002","description":"Added oauth_id and oauth_provider fields","lines_added":8,"lines_removed":0}
@@ -190,11 +274,12 @@ Overview of what was implemented in this iteration.
190
274
  PHASE_RESULT:
191
275
  - phase: cd
192
276
  - status: success | failed | partial
193
- - files_written: [implementation.md, code-changes.log, issues.md]
277
+ - files_written: [implementation.md, changes.log, debug-log.ndjson (if debug executed), issues.md]
194
278
  - summary: N tasks completed, M files modified, X blockers identified
195
279
  - tasks_completed: N
196
280
  - files_modified: M
197
281
  - tests_passing: X/Y
282
+ - debug_cycles: Z (if debug executed)
198
283
  - blockers: []
199
284
  - issues: [list of open issues]
200
285
  ```
@@ -59,13 +59,24 @@ The Requirements Analyst maintains **a single file** (`requirements.md`) contain
59
59
  - Task description from state
60
60
  - Project tech stack and guidelines
61
61
 
62
- 2. **Analyze Requirements**
63
- - Functional requirements
64
- - Non-functional requirements
62
+ 2. **Analyze Explicit Requirements**
63
+ - Functional requirements from user task
64
+ - Non-functional requirements (explicit)
65
65
  - Constraints and assumptions
66
66
  - Edge cases
67
67
 
68
- 3. **Generate Single File**
68
+ 3. **Proactive Enhancement** (NEW - Self-Enhancement Phase)
69
+ - Execute enhancement strategies based on triggers
70
+ - Scan codebase for implied requirements
71
+ - Analyze peer agent outputs (EP, CD, VAS from previous iteration)
72
+ - Suggest associated features and NFR scaffolding
73
+
74
+ 4. **Consolidate & Finalize**
75
+ - Merge explicit requirements with proactively generated ones
76
+ - Mark enhanced items with "(ENHANCED v1.0.0 by RA)"
77
+ - Add optional "## Proactive Enhancements" section with justification
78
+
79
+ 5. **Generate Single File**
69
80
  - Write `requirements.md` v1.0.0
70
81
  - Include all sections in one document
71
82
  - Add version header
@@ -283,3 +294,77 @@ appendNDJSON('changes.log', {
283
294
  5. **Audit Trail**: Changes.log tracks every modification
284
295
  6. **Readability First**: File should be clear and concise
285
296
  7. **Version Markers**: Mark new items with "(NEW v1.x.0)"
297
+ 8. **Proactive Enhancement**: Always apply self-enhancement phase
298
+
299
+ ## Self-Enhancement Mechanism
300
+
301
+ The RA agent proactively extends requirements based on context analysis.
302
+
303
+ ### Enhancement Triggers
304
+
305
+ | Trigger | Condition | Action |
306
+ |---------|-----------|--------|
307
+ | **Initial Analysis** | First iteration (v1.0.0) | Expand vague or high-level requests |
308
+ | **Implicit Context** | Key config files detected (package.json, Dockerfile, CI config) | Infer NFRs and constraints |
309
+ | **Cross-Agent Feedback** | Previous iteration has `exploration.identified_risks`, `cd.blockers`, or `vas.test_results.failed_tests` | Cover uncovered requirements |
310
+
311
+ ### Enhancement Strategies
312
+
313
+ 1. **Codebase Analysis**
314
+ - Scan key project files (package.json, Dockerfile, CI/CD configs)
315
+ - Infer technological constraints and dependencies
316
+ - Identify operational requirements
317
+ - Example: Detecting `storybook` dependency → suggest component-driven UI process
318
+
319
+ 2. **Peer Output Mining**
320
+ - Analyze EP agent's `exploration.architecture_summary`
321
+ - Review CD agent's blockers and issues
322
+ - Examine VAS agent's `test_results.failed_tests`
323
+ - Formalize insights as new requirements
324
+
325
+ 3. **Common Feature Association**
326
+ - Based on functional requirements, suggest associated features
327
+ - Example: "build user login" → suggest "password reset", "MFA"
328
+ - Mark as enhancement candidates for user confirmation
329
+
330
+ 4. **NFR Scaffolding**
331
+ - For each major functional requirement, add standard NFRs
332
+ - Categories: Performance, Security, Scalability, Accessibility
333
+ - Set initial values as "TBD" to ensure consideration
334
+
335
+ ### Output Format for Enhanced Requirements
336
+
337
+ Enhanced requirements are integrated directly into `requirements.md`:
338
+
339
+ ```markdown
340
+ ## Functional Requirements
341
+
342
+ ### FR-001: OAuth Authentication
343
+ User can authenticate via OAuth providers.
344
+ **Status**: Defined (v1.0.0)
345
+ **Priority**: High
346
+
347
+ ### FR-002: Password Reset (ENHANCED v1.0.0 by RA)
348
+ Users can reset their password via email link.
349
+ **Status**: Enhanced (auto-suggested)
350
+ **Priority**: Medium
351
+ **Trigger**: Common Feature Association (FR-001 → password reset)
352
+
353
+ ---
354
+
355
+ ## Proactive Enhancements
356
+
357
+ This section documents auto-generated requirements by the RA agent.
358
+
359
+ | ID | Trigger | Strategy | Justification |
360
+ |----|---------|----------|---------------|
361
+ | FR-002 | FR-001 requires login | Common Feature Association | Standard auth feature set |
362
+ | NFR-003 | package.json has `jest` | Codebase Analysis | Test framework implies testability NFR |
363
+ ```
364
+
365
+ ### Integration Notes
366
+
367
+ - Self-enhancement is **internal to RA agent** - no orchestrator changes needed
368
+ - Read-only access to codebase and cycle state required
369
+ - Enhanced requirements are **transparently marked** for user review
370
+ - User can accept, modify, or reject enhanced requirements in next iteration