claude-code-workflow 7.2.29 → 7.2.30

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 (124) hide show
  1. package/.ccw/workflows/cli-templates/schemas/plan-overview-base-schema.json +2 -2
  2. package/.ccw/workflows/cli-templates/schemas/task-schema.json +14 -7
  3. package/.claude/agents/action-planning-agent.md +7 -4
  4. package/.claude/agents/cli-explore-agent.md +77 -63
  5. package/.claude/agents/cli-lite-planning-agent.md +11 -10
  6. package/.claude/agents/issue-plan-agent.md +421 -426
  7. package/.claude/commands/workflow/spec/setup.md +1 -1
  8. package/.claude/skills/ccw-chain/SKILL.md +119 -0
  9. package/.claude/skills/ccw-chain/chains/ccw-cycle.json +21 -0
  10. package/.claude/skills/ccw-chain/chains/ccw-exploration.json +47 -0
  11. package/.claude/skills/ccw-chain/chains/ccw-issue.json +33 -0
  12. package/.claude/skills/ccw-chain/chains/ccw-lightweight.json +57 -0
  13. package/.claude/skills/ccw-chain/chains/ccw-main.json +52 -0
  14. package/.claude/skills/ccw-chain/chains/ccw-standard.json +39 -0
  15. package/.claude/skills/ccw-chain/chains/ccw-team.json +10 -0
  16. package/.claude/skills/ccw-chain/chains/ccw-with-file.json +31 -0
  17. package/.claude/skills/ccw-chain/phases/analyze-with-file.md +788 -0
  18. package/.claude/skills/ccw-chain/phases/brainstorm/SKILL.md +408 -0
  19. package/.claude/skills/ccw-chain/phases/brainstorm/phases/01-mode-routing.md +207 -0
  20. package/.claude/skills/ccw-chain/phases/brainstorm/phases/02-artifacts.md +567 -0
  21. package/.claude/skills/ccw-chain/phases/brainstorm/phases/03-role-analysis.md +748 -0
  22. package/.claude/skills/ccw-chain/phases/brainstorm/phases/04-synthesis.md +827 -0
  23. package/.claude/skills/ccw-chain/phases/brainstorm-with-file.md +482 -0
  24. package/.claude/skills/ccw-chain/phases/collaborative-plan-with-file.md +639 -0
  25. package/.claude/skills/ccw-chain/phases/debug-with-file.md +656 -0
  26. package/.claude/skills/ccw-chain/phases/integration-test-cycle.md +936 -0
  27. package/.claude/skills/ccw-chain/phases/issue-convert-to-plan.md +720 -0
  28. package/.claude/skills/ccw-chain/phases/issue-discover.md +483 -0
  29. package/.claude/skills/ccw-chain/phases/issue-execute.md +629 -0
  30. package/.claude/skills/ccw-chain/phases/issue-from-brainstorm.md +382 -0
  31. package/.claude/skills/ccw-chain/phases/issue-plan.md +343 -0
  32. package/.claude/skills/ccw-chain/phases/issue-queue.md +464 -0
  33. package/.claude/skills/ccw-chain/phases/refactor-cycle.md +852 -0
  34. package/.claude/skills/ccw-chain/phases/review-cycle/SKILL.md +132 -0
  35. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-fix.md +760 -0
  36. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-module.md +764 -0
  37. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-session.md +775 -0
  38. package/.claude/skills/ccw-chain/phases/roadmap-with-file.md +544 -0
  39. package/.claude/skills/ccw-chain/phases/spec-generator/SKILL.md +338 -0
  40. package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-5-requirement-clarification.md +404 -0
  41. package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-discovery.md +257 -0
  42. package/.claude/skills/ccw-chain/phases/spec-generator/phases/02-product-brief.md +274 -0
  43. package/.claude/skills/ccw-chain/phases/spec-generator/phases/03-requirements.md +184 -0
  44. package/.claude/skills/ccw-chain/phases/spec-generator/phases/04-architecture.md +248 -0
  45. package/.claude/skills/ccw-chain/phases/spec-generator/phases/05-epics-stories.md +178 -0
  46. package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-5-auto-fix.md +144 -0
  47. package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-readiness-check.md +480 -0
  48. package/.claude/skills/ccw-chain/phases/team-planex.md +123 -0
  49. package/.claude/skills/ccw-chain/phases/ui-design-explore-auto.md +678 -0
  50. package/.claude/skills/ccw-chain/phases/unified-execute-with-file.md +870 -0
  51. package/.claude/skills/ccw-chain/phases/workflow-execute/SKILL.md +625 -0
  52. package/.claude/skills/ccw-chain/phases/workflow-execute/phases/06-review.md +215 -0
  53. package/.claude/skills/ccw-chain/phases/workflow-lite-plan.md +616 -0
  54. package/.claude/skills/ccw-chain/phases/workflow-multi-cli-plan.md +424 -0
  55. package/.claude/skills/ccw-chain/phases/workflow-plan/SKILL.md +466 -0
  56. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/01-session-discovery.md +99 -0
  57. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/02-context-gathering.md +338 -0
  58. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/03-conflict-resolution.md +422 -0
  59. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/04-task-generation.md +440 -0
  60. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/05-plan-verify.md +395 -0
  61. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/06-replan.md +594 -0
  62. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/SKILL.md +527 -0
  63. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/01-session-discovery.md +57 -0
  64. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/02-context-gathering.md +407 -0
  65. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/03-test-coverage-analysis.md +172 -0
  66. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/04-conflict-resolution.md +426 -0
  67. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/05-tdd-task-generation.md +473 -0
  68. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/06-tdd-structure-validation.md +189 -0
  69. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/07-tdd-verify.md +635 -0
  70. package/.claude/skills/ccw-chain/phases/workflow-test-fix/SKILL.md +482 -0
  71. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/01-session-start.md +60 -0
  72. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/02-test-context-gather.md +493 -0
  73. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/03-test-concept-enhanced.md +150 -0
  74. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/04-test-task-generate.md +346 -0
  75. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/05-test-cycle-execute.md +538 -0
  76. package/.claude/skills/ccw-chain/specs/auto-mode.md +47 -0
  77. package/.claude/skills/ccw-chain/specs/intent-patterns.md +60 -0
  78. package/.claude/skills/chain-loader/SKILL.md +78 -0
  79. package/.claude/skills/chain-loader/phases/01-analyze-skill.md +53 -0
  80. package/.claude/skills/chain-loader/phases/02-design-graph.md +73 -0
  81. package/.claude/skills/chain-loader/phases/03-generate-validate.md +75 -0
  82. package/.claude/skills/chain-loader/specs/chain-schema.md +99 -0
  83. package/.claude/skills/chain-loader/specs/design-patterns.md +99 -0
  84. package/.claude/skills/chain-loader/templates/chain-json.md +63 -0
  85. package/.claude/skills/review-cycle/phases/review-module.md +764 -764
  86. package/.claude/skills/review-cycle/phases/review-session.md +775 -775
  87. package/.claude/skills/workflow-multi-cli-plan/SKILL.md +2 -2
  88. package/.claude/skills/workflow-plan/phases/03-conflict-resolution.md +422 -422
  89. package/.claude/skills/workflow-plan/phases/05-plan-verify.md +395 -395
  90. package/.claude/skills/workflow-tdd-plan/phases/02-context-gathering.md +407 -407
  91. package/.claude/skills/workflow-tdd-plan/phases/04-conflict-resolution.md +426 -426
  92. package/.claude/skills/workflow-test-fix/phases/02-test-context-gather.md +493 -493
  93. package/README.md +14 -0
  94. package/ccw/dist/core/routes/litellm-api-routes.d.ts.map +1 -1
  95. package/ccw/dist/core/routes/litellm-api-routes.js +0 -23
  96. package/ccw/dist/core/routes/litellm-api-routes.js.map +1 -1
  97. package/ccw/dist/tools/chain-loader.d.ts +10 -0
  98. package/ccw/dist/tools/chain-loader.d.ts.map +1 -0
  99. package/ccw/dist/tools/chain-loader.js +642 -0
  100. package/ccw/dist/tools/chain-loader.js.map +1 -0
  101. package/ccw/dist/tools/index.d.ts.map +1 -1
  102. package/ccw/dist/tools/index.js +2 -0
  103. package/ccw/dist/tools/index.js.map +1 -1
  104. package/ccw/dist/tools/json-builder.js +20 -0
  105. package/ccw/dist/tools/json-builder.js.map +1 -1
  106. package/ccw/dist/types/chain-types.d.ts +72 -0
  107. package/ccw/dist/types/chain-types.d.ts.map +1 -0
  108. package/ccw/dist/types/chain-types.js +5 -0
  109. package/ccw/dist/types/chain-types.js.map +1 -0
  110. package/ccw/scripts/prepublish-clean.mjs +0 -1
  111. package/package.json +1 -3
  112. package/ccw-litellm/README.md +0 -180
  113. package/ccw-litellm/pyproject.toml +0 -35
  114. package/ccw-litellm/src/ccw_litellm/__init__.py +0 -47
  115. package/ccw-litellm/src/ccw_litellm/cli.py +0 -108
  116. package/ccw-litellm/src/ccw_litellm/clients/__init__.py +0 -12
  117. package/ccw-litellm/src/ccw_litellm/clients/litellm_embedder.py +0 -270
  118. package/ccw-litellm/src/ccw_litellm/clients/litellm_llm.py +0 -198
  119. package/ccw-litellm/src/ccw_litellm/config/__init__.py +0 -22
  120. package/ccw-litellm/src/ccw_litellm/config/loader.py +0 -343
  121. package/ccw-litellm/src/ccw_litellm/config/models.py +0 -162
  122. package/ccw-litellm/src/ccw_litellm/interfaces/__init__.py +0 -14
  123. package/ccw-litellm/src/ccw_litellm/interfaces/embedder.py +0 -52
  124. package/ccw-litellm/src/ccw_litellm/interfaces/llm.py +0 -45
@@ -0,0 +1,346 @@
1
+ # Phase 4: Test Task Generate (test-task-generate)
2
+
3
+ Generate test task JSONs via test-action-planning-agent.
4
+
5
+ ## Objective
6
+
7
+ - Generate test-specific IMPL_PLAN.md and task JSONs based on TEST_ANALYSIS_RESULTS.md
8
+ - Create minimum 4 tasks covering test generation, code validation, quality review, and test execution
9
+
10
+ ## Execution
11
+
12
+ ### Step 1.4: Generate Test Tasks
13
+
14
+ #### Phase 1: Context Preparation
15
+
16
+ **Purpose**: Assemble test session paths, load test analysis context, and create test-planning-notes.md.
17
+
18
+ **Execution Steps**:
19
+ 1. Parse `--session` flag to get test session ID
20
+ 2. Load `workflow-session.json` for session metadata
21
+ 3. Verify `TEST_ANALYSIS_RESULTS.md` exists (from test-concept-enhanced)
22
+ 4. Load `test-context-package.json` for coverage data
23
+ 5. Create `test-planning-notes.md` with initial context
24
+
25
+ **After Phase 1**: Initialize test-planning-notes.md
26
+
27
+ ```javascript
28
+ // Create test-planning-notes.md with N+1 context support
29
+ const testPlanningNotesPath = `.workflow/active/${testSessionId}/test-planning-notes.md`
30
+ const sessionMetadata = JSON.parse(Read(`.workflow/active/${testSessionId}/workflow-session.json`))
31
+ const testAnalysis = Read(`.workflow/active/${testSessionId}/.process/TEST_ANALYSIS_RESULTS.md`)
32
+ const sourceSessionId = sessionMetadata.source_session_id || 'N/A'
33
+
34
+ // Extract key info from TEST_ANALYSIS_RESULTS.md
35
+ const projectType = testAnalysis.match(/Project Type:\s*(.+)/)?.[1] || 'Unknown'
36
+ const testFramework = testAnalysis.match(/Test Framework:\s*(.+)/)?.[1] || 'Unknown'
37
+ const coverageTarget = testAnalysis.match(/Coverage Target:\s*(.+)/)?.[1] || '80%'
38
+
39
+ Write(testPlanningNotesPath, `# Test Planning Notes
40
+
41
+ **Session**: ${testSessionId}
42
+ **Source Session**: ${sourceSessionId}
43
+ **Created**: ${new Date().toISOString()}
44
+
45
+ ## Test Intent (Phase 1)
46
+
47
+ - **PROJECT_TYPE**: ${projectType}
48
+ - **TEST_FRAMEWORK**: ${testFramework}
49
+ - **COVERAGE_TARGET**: ${coverageTarget}
50
+ - **SOURCE_SESSION**: ${sourceSessionId}
51
+
52
+ ---
53
+
54
+ ## Context Findings (Phase 1)
55
+
56
+ ### Files with Coverage Gaps
57
+ (Extracted from TEST_ANALYSIS_RESULTS.md)
58
+
59
+ ### Test Framework & Conventions
60
+ - Framework: ${testFramework}
61
+ - Coverage Target: ${coverageTarget}
62
+
63
+ ---
64
+
65
+ ## Gemini Enhancement (Phase 1.5)
66
+ (To be filled by Gemini analysis)
67
+
68
+ ### Enhanced Test Suggestions
69
+ - **L1 (Unit)**: (Pending)
70
+ - **L2.1 (Integration)**: (Pending)
71
+ - **L2.2 (API Contracts)**: (Pending)
72
+ - **L2.4 (External APIs)**: (Pending)
73
+ - **L2.5 (Failure Modes)**: (Pending)
74
+
75
+ ### Gemini Analysis Summary
76
+ (Pending enrichment)
77
+
78
+ ---
79
+
80
+ ## Consolidated Test Requirements (Phase 2 Input)
81
+ 1. [Context] ${testFramework} framework conventions
82
+ 2. [Context] ${coverageTarget} coverage target
83
+
84
+ ---
85
+
86
+ ## Task Generation (Phase 2)
87
+ (To be filled by test-action-planning-agent)
88
+
89
+ ## N+1 Context
90
+ ### Decisions
91
+ | Decision | Rationale | Revisit? |
92
+ |----------|-----------|----------|
93
+
94
+ ### Deferred
95
+ - [ ] (For N+1)
96
+ `)
97
+ ```
98
+
99
+ ---
100
+
101
+ #### Phase 1.5: Gemini Test Enhancement
102
+
103
+ **Purpose**: Enrich test specifications with comprehensive test suggestions and record to test-planning-notes.md.
104
+
105
+ **Execution Steps**:
106
+ 1. Load TEST_ANALYSIS_RESULTS.md from `.workflow/active/{test-session-id}/.process/`
107
+ 2. Invoke `cli-execution-agent` with Gemini for test enhancement analysis
108
+ 3. Use template: `~/.ccw/workflows/cli-templates/prompts/test-suggestions-enhancement.txt`
109
+ 4. Gemini generates enriched test suggestions across L1-L3 layers -> gemini-enriched-suggestions.md
110
+ 5. Record enriched suggestions to test-planning-notes.md (Gemini Enhancement section)
111
+
112
+ ```javascript
113
+ Task(
114
+ subagent_type="cli-execution-agent",
115
+ run_in_background=false,
116
+ description="Enhance test specifications with Gemini analysis",
117
+ prompt=`
118
+ ## Task Objective
119
+ Analyze TEST_ANALYSIS_RESULTS.md and generate enriched test suggestions using Gemini CLI
120
+
121
+ ## Input Files
122
+ - Read: .workflow/active/{test-session-id}/.process/TEST_ANALYSIS_RESULTS.md
123
+ - Extract: Project type, test framework, coverage gaps, identified files
124
+
125
+ ## Gemini Analysis Execution
126
+ Execute Gemini with comprehensive test enhancement prompt:
127
+ ccw cli -p "[comprehensive test prompt]" --tool gemini --mode analysis --rule analysis-test-strategy-enhancement --cd .workflow/active/{test-session-id}/.process
128
+
129
+ ## Expected Output
130
+ Generate gemini-enriched-suggestions.md with structured test enhancements:
131
+ - L1 (Unit Tests): Edge cases, boundaries, error paths
132
+ - L2.1 (Integration): Module interactions, dependency injection
133
+ - L2.2 (API Contracts): Request/response, validation, error responses
134
+ - L2.4 (External APIs): Mock strategies, failure scenarios, timeouts
135
+ - L2.5 (Failure Modes): Exception handling, error propagation, recovery
136
+
137
+ ## Validation
138
+ - gemini-enriched-suggestions.md created and complete
139
+ - Suggestions are actionable and specific (not generic)
140
+ - All L1-L3 layers covered
141
+ `
142
+ )
143
+ ```
144
+
145
+ **Output**: gemini-enriched-suggestions.md (complete Gemini analysis)
146
+
147
+ **After Phase 1.5**: Update test-planning-notes.md with Gemini enhancement findings
148
+
149
+ ```javascript
150
+ // Read enriched suggestions from gemini-enriched-suggestions.md
151
+ const enrichedSuggestionsPath = `.workflow/active/${testSessionId}/.process/gemini-enriched-suggestions.md`
152
+ const enrichedSuggestions = Read(enrichedSuggestionsPath)
153
+
154
+ // Update Phase 1.5 section in test-planning-notes.md with full enriched suggestions
155
+ Edit(testPlanningNotesPath, {
156
+ old: '## Gemini Enhancement (Phase 1.5)\n(To be filled by Gemini analysis)\n\n### Enhanced Test Suggestions\n- **L1 (Unit)**: (Pending)\n- **L2.1 (Integration)**: (Pending)\n- **L2.2 (API Contracts)**: (Pending)\n- **L2.4 (External APIs)**: (Pending)\n- **L2.5 (Failure Modes)**: (Pending)\n\n### Gemini Analysis Summary\n(Pending enrichment)',
157
+ new: `## Gemini Enhancement (Phase 1.5)
158
+
159
+ **Analysis Timestamp**: ${new Date().toISOString()}
160
+ **Template**: test-suggestions-enhancement.txt
161
+ **Output File**: .process/gemini-enriched-suggestions.md
162
+
163
+ ### Enriched Test Suggestions (Complete Gemini Analysis)
164
+
165
+ ${enrichedSuggestions}
166
+
167
+ ### Gemini Analysis Summary
168
+ - **Status**: Enrichment complete
169
+ - **Layers Covered**: L1, L2.1, L2.2, L2.4, L2.5
170
+ - **Focus Areas**: API contracts, integration patterns, error scenarios, edge cases
171
+ - **Output Stored**: Full analysis in gemini-enriched-suggestions.md`
172
+ })
173
+
174
+ // Append Gemini constraints to consolidated test requirements
175
+ const geminiConstraints = [
176
+ '[Gemini] Implement all suggested L1 edge cases and boundary tests',
177
+ '[Gemini] Apply L2.1 module interaction patterns from analysis',
178
+ '[Gemini] Follow L2.2 API contract test matrix from analysis',
179
+ '[Gemini] Use L2.4 external API mock strategies from analysis',
180
+ '[Gemini] Cover L2.5 error scenarios from analysis'
181
+ ]
182
+
183
+ const currentNotes = Read(testPlanningNotesPath)
184
+ const constraintCount = (currentNotes.match(/^\d+\./gm) || []).length
185
+
186
+ Edit(testPlanningNotesPath, {
187
+ old: '## Consolidated Test Requirements (Phase 2 Input)',
188
+ new: `## Consolidated Test Requirements (Phase 2 Input)
189
+ 1. [Context] ${testFramework} framework conventions
190
+ 2. [Context] ${coverageTarget} coverage target
191
+ ${geminiConstraints.map((c, i) => `${i + 3}. ${c}`).join('\n')}`
192
+ })
193
+ ```
194
+
195
+ ---
196
+
197
+ #### Phase 2: Test Document Generation (Agent)
198
+
199
+ **Agent Specialization**: This invokes `@test-action-planning-agent` - a specialized variant of action-planning-agent with:
200
+ - Progressive L0-L3 test layers (Static, Unit, Integration, E2E)
201
+ - AI code issue detection (L0.5) with severity levels
202
+ - Project type templates (React, Node API, CLI, Library, Monorepo)
203
+ - Test anti-pattern detection with quality gates
204
+ - Layer completeness thresholds and coverage targets
205
+
206
+ **See**: `d:\Claude_dms3\.claude\agents\test-action-planning-agent.md` for complete test specifications.
207
+
208
+ ```javascript
209
+ Task(
210
+ subagent_type="test-action-planning-agent",
211
+ run_in_background=false,
212
+ description="Generate test planning documents",
213
+ prompt=`
214
+ ## TASK OBJECTIVE
215
+ Generate test planning documents (IMPL_PLAN.md, task JSONs, TODO_LIST.md) for test workflow session
216
+
217
+ IMPORTANT: This is TEST PLANNING ONLY - you are generating planning documents, NOT executing tests.
218
+
219
+ ## SESSION PATHS
220
+ Input:
221
+ - Session Metadata: .workflow/active/{test-session-id}/workflow-session.json
222
+ - TEST_ANALYSIS_RESULTS: .workflow/active/{test-session-id}/.process/TEST_ANALYSIS_RESULTS.md (REQUIRED)
223
+ - Test Planning Notes: .workflow/active/{test-session-id}/test-planning-notes.md (REQUIRED - contains Gemini enhancement findings)
224
+ - Test Context Package: .workflow/active/{test-session-id}/.process/test-context-package.json
225
+ - Context Package: .workflow/active/{test-session-id}/.process/context-package.json
226
+ - Enriched Suggestions: .workflow/active/{test-session-id}/.process/gemini-enriched-suggestions.md (for reference)
227
+ - Source Session Summaries: .workflow/active/{source-session-id}/.summaries/IMPL-*.md (if exists)
228
+
229
+ Output:
230
+ - Task Dir: .workflow/active/{test-session-id}/.task/
231
+ - IMPL_PLAN: .workflow/active/{test-session-id}/IMPL_PLAN.md
232
+ - TODO_LIST: .workflow/active/{test-session-id}/TODO_LIST.md
233
+
234
+ ## CONTEXT METADATA
235
+ Session ID: {test-session-id}
236
+ Workflow Type: test_session
237
+ Source Session: {source-session-id} (if exists)
238
+ MCP Capabilities: {exa_code, exa_web, code_index}
239
+
240
+ ## CONSOLIDATED CONTEXT
241
+ **From test-planning-notes.md**:
242
+ - Test Intent: Project type, test framework, coverage target
243
+ - Context Findings: Coverage gaps, file analysis
244
+ - Gemini Enhancement: Complete enriched test suggestions (L1-L3 layers)
245
+ * Full analysis embedded in planning-notes.md
246
+ * API contracts, integration patterns, error scenarios
247
+ - Consolidated Requirements: Combined constraints from all phases
248
+
249
+ ## YOUR SPECIFICATIONS
250
+ You are @test-action-planning-agent. Your complete test specifications are defined in:
251
+ d:\Claude_dms3\.claude\agents\test-action-planning-agent.md
252
+
253
+ This includes:
254
+ - Progressive Test Layers (L0-L3) with L0.1-L0.5, L1.1-L1.5, L2.1-L2.5, L3.1-L3.4
255
+ - AI Code Issue Detection (L0.5) with 7 categories and severity levels
256
+ - Project Type Detection & Templates (6 project types)
257
+ - Test Anti-Pattern Detection (5 categories)
258
+ - Layer Completeness & Quality Metrics (thresholds and gate decisions)
259
+ - Task JSON structure requirements (minimum 4 tasks)
260
+ - Quality validation rules
261
+
262
+ **Follow your specification exactly** when generating test task JSONs.
263
+
264
+ ## EXPECTED DELIVERABLES
265
+ 1. Test Task JSON Files (.task/IMPL-*.json) - Minimum 4:
266
+ - IMPL-001.json: Test generation (L1-L3 layers per spec)
267
+ - IMPL-001.3-validation.json: Code validation gate (L0 + AI issues per spec)
268
+ - IMPL-001.5-review.json: Test quality gate (anti-patterns + coverage per spec)
269
+ - IMPL-002.json: Test execution & fix cycle
270
+
271
+ 2. IMPL_PLAN.md: Test implementation plan with quality gates
272
+
273
+ 3. TODO_LIST.md: Hierarchical task list with test phase indicators
274
+
275
+ ## SUCCESS CRITERIA
276
+ - All test planning documents generated successfully
277
+ - Task count: minimum 4 (expandable for complex projects)
278
+ - Test framework: {detected from project}
279
+ - Coverage targets: L0 zero errors, L1 80%+, L2 70%+
280
+ - L0-L3 layers explicitly defined per spec
281
+ - AI issue detection configured per spec
282
+ - Quality gates with measurable thresholds
283
+ `
284
+ )
285
+ ```
286
+
287
+ **Input**: `testSessionId` from Phase 1
288
+
289
+ **Note**: test-action-planning-agent generates test-specific IMPL_PLAN.md and task JSONs based on TEST_ANALYSIS_RESULTS.md.
290
+
291
+ **Expected Output** (minimum 4 tasks):
292
+
293
+ | Task | Type | Agent | Purpose |
294
+ |------|------|-------|---------|
295
+ | IMPL-001 | test-gen | @code-developer | Test understanding & generation (L1-L3) |
296
+ | IMPL-001.3 | code-validation | @test-fix-agent | Code validation gate (L0 + AI issues) |
297
+ | IMPL-001.5 | test-quality-review | @test-fix-agent | Test quality gate |
298
+ | IMPL-002 | test-fix | @test-fix-agent | Test execution & fix cycle |
299
+
300
+ **Validation**:
301
+ - `.workflow/active/[testSessionId]/.task/IMPL-001.json` exists
302
+ - `.workflow/active/[testSessionId]/.task/IMPL-001.3-validation.json` exists
303
+ - `.workflow/active/[testSessionId]/.task/IMPL-001.5-review.json` exists
304
+ - `.workflow/active/[testSessionId]/.task/IMPL-002.json` exists
305
+ - `.workflow/active/[testSessionId]/IMPL_PLAN.md` exists
306
+ - `.workflow/active/[testSessionId]/TODO_LIST.md` exists
307
+
308
+ ## Test-Specific Execution Modes
309
+
310
+ ### Test Generation (IMPL-001)
311
+ - **Agent Mode** (default): @code-developer generates tests within agent context
312
+ - **CLI Mode**: Use CLI tools when `command` field present in implementation_approach
313
+
314
+ ### Test Execution & Fix (IMPL-002+)
315
+ - **Agent Mode** (default): Gemini diagnosis -> agent applies fixes
316
+ - **CLI Mode**: Gemini diagnosis -> CLI applies fixes (when `command` field present)
317
+
318
+ **CLI Tool Selection**: Determined semantically from user's task description (e.g., "use Codex for fixes")
319
+
320
+ ## Output Directory Structure
321
+
322
+ ```
323
+ .workflow/active/WFS-test-[session]/
324
+ |-- workflow-session.json # Session metadata
325
+ |-- IMPL_PLAN.md # Test implementation plan
326
+ |-- TODO_LIST.md # Task checklist
327
+ |-- test-planning-notes.md # Consolidated planning notes with full Gemini analysis
328
+ |-- .task/
329
+ | |-- IMPL-001.json # Test generation (L1-L3)
330
+ | |-- IMPL-001.3-validation.json # Code validation gate (L0 + AI)
331
+ | |-- IMPL-001.5-review.json # Test quality gate
332
+ | +-- IMPL-002.json # Test execution & fix cycle
333
+ +-- .process/
334
+ |-- test-context-package.json # Test coverage and patterns
335
+ |-- gemini-enriched-suggestions.md # Gemini-generated test enhancements
336
+ +-- TEST_ANALYSIS_RESULTS.md # L0-L3 requirements (from test-concept-enhanced)
337
+ ```
338
+
339
+ ## Output
340
+
341
+ - **Files**: IMPL_PLAN.md, IMPL-*.json (4+), TODO_LIST.md
342
+ - **TodoWrite**: Mark Phase 1-4 completed, Phase 5 in_progress
343
+
344
+ ## Next Phase
345
+
346
+ Return to orchestrator for summary output, then auto-continue to [Phase 5: Test Cycle Execute](05-test-cycle-execute.md).