Skip to content

Commit 65763c7

Browse files
author
catlog22
committed
Add TDD Structure Validation and Verification Phases with Comprehensive Reporting
- Introduced Phase 6: TDD Structure Validation to ensure compliance with TDD workflow standards, including task structure validation, dependency checks, and user configuration verification. - Implemented Phase 7: TDD Verification for full compliance checks, including task chain structure validation, coverage analysis, and TDD cycle verification. - Generated detailed TDD compliance reports with quality gate recommendations based on objective criteria. - Added documentation for new commands and workflows in the Claude Commands index.
1 parent 4a89f62 commit 65763c7

92 files changed

Lines changed: 643 additions & 525 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ccw/workflows/cli-templates/planning-roles/synthesis-role.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ Document known constraints that affect planning:
301301

302302
[Continue for all major feature groups]
303303

304-
**Note**: Detailed task breakdown into executable work items is handled by `/workflow:plan``IMPL_PLAN.md`
304+
**Note**: Detailed task breakdown into executable work items is handled by `/workflow-plan``IMPL_PLAN.md`
305305

306306
---
307307

.ccw/workflows/cli-templates/prompts/workflow-impl-plan-template.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Core requirements, objectives, technical approach summary (2-3 paragraphs max).
4343

4444
**Quality Gates**:
4545
- concept-verify: ✅ Passed (0 ambiguities remaining) | ⏭️ Skipped (user decision) | ⏳ Pending
46-
- plan-verify: ⏳ Pending (recommended before /workflow:execute)
46+
- plan-verify: ⏳ Pending (recommended before /workflow-execute)
4747

4848
**Context Package Summary**:
4949
- **Focus Paths**: {list key directories from context-package.json}

.ccw/workflows/workflow-architecture.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ All workflows use the same file structure definition regardless of complexity. *
711711
│ ├── [.chat/] # CLI interaction sessions (created when analysis is run)
712712
│ │ ├── chat-*.md # Saved chat sessions
713713
│ │ └── analysis-*.md # Analysis results
714-
│ ├── [.process/] # Planning analysis results (created by /workflow:plan)
714+
│ ├── [.process/] # Planning analysis results (created by /workflow-plan)
715715
│ │ └── ANALYSIS_RESULTS.md # Analysis results and planning artifacts
716716
│ ├── IMPL_PLAN.md # Planning document (REQUIRED)
717717
│ ├── TODO_LIST.md # Progress tracking (REQUIRED)
@@ -783,7 +783,7 @@ All workflows use the same file structure definition regardless of complexity. *
783783
**Examples**:
784784

785785
*Workflow Commands (lightweight):*
786-
- `/workflow:lite-plan "feature idea"` (exploratory) → `.scratchpad/lite-plan-feature-idea-20250105-143110.md`
786+
- `/workflow-lite-plan "feature idea"` (exploratory) → `.scratchpad/lite-plan-feature-idea-20250105-143110.md`
787787
- `/workflow:lite-fix "bug description"` (bug fixing) → `.scratchpad/lite-fix-bug-20250105-143130.md`
788788

789789
> **Note**: Direct CLI commands (`/cli:analyze`, `/cli:execute`, etc.) have been replaced by semantic invocation and workflow commands.

.claude/agents/code-developer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ function buildCliCommand(task, cliTool, cliPrompt) {
455455
456456
**Auto-Check Workflow Context**:
457457
- Verify session context paths are provided in agent prompt
458-
- If missing, request session context from workflow:execute
458+
- If missing, request session context from workflow-execute
459459
- Never assume default paths without explicit session context
460460
461461
### 5. Problem-Solving

.claude/commands/ccw-coordinator.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Interactive orchestration tool: analyze task → discover commands → recommend
2222
| `workflow-execute` | execute |
2323
| `workflow-multi-cli-plan` | multi-cli-plan |
2424
| `workflow-test-fix` | test-fix-gen, test-cycle-execute |
25-
| `workflow-tdd` | tdd-plan, tdd-verify |
25+
| `workflow-tdd-plan` | tdd-plan, tdd-verify |
2626
| `review-cycle` | review-session-cycle, review-module-cycle, review-cycle-fix |
2727
| `brainstorm` | auto-parallel, artifacts, role-analysis, synthesis |
2828
| `workflow:collaborative-plan-with-file` | understanding agent → parallel agents → plan-note.md |
@@ -257,7 +257,7 @@ Each command has input/output ports (tags) for pipeline composition:
257257
// workflow-execute (execute),
258258
// workflow-multi-cli-plan (multi-cli-plan),
259259
// workflow-test-fix (test-fix-gen, test-cycle-execute),
260-
// workflow-tdd (tdd-plan, tdd-verify),
260+
// workflow-tdd-plan (tdd-plan, tdd-verify),
261261
// review-cycle (review-session-cycle, review-module-cycle, review-cycle-fix)
262262
// command: debug, test-gen, review, workflow:brainstorm-with-file,
263263
// workflow:debug-with-file, workflow:analyze-with-file, issue:*
@@ -646,9 +646,9 @@ Pipeline (管道视图):
646646
需求 → lite-plan → 计划 → lite-execute → 代码 → test-cycle-execute → 测试通过
647647

648648
Commands (命令列表):
649-
1. /workflow:lite-plan
649+
1. /workflow-lite-plan
650650
2. /workflow:lite-execute
651-
3. /workflow:test-cycle-execute
651+
3. /workflow-test-fix
652652

653653
Proceed? [Confirm / Show Details / Adjust / Cancel]
654654
```
@@ -737,7 +737,7 @@ async function executeCommandChain(chain, analysis) {
737737
// Execute CLI command in background and stop
738738
// Format: ccw cli -p "PROMPT" --tool <tool> --mode <mode>
739739
// Note: -y is a command parameter INSIDE the prompt, not a ccw cli parameter
740-
// Example prompt: "/workflow:plan -y \"task description here\""
740+
// Example prompt: "/workflow-plan -y \"task description here\""
741741
try {
742742
const taskId = Bash(
743743
`ccw cli -p "${escapePrompt(prompt)}" --tool claude --mode write`,
@@ -1000,31 +1000,31 @@ function parseOutput(output) {
10001000
"command_chain": [
10011001
{
10021002
"index": 0,
1003-
"command": "/workflow:plan",
1003+
"command": "/workflow-plan",
10041004
"name": "plan",
10051005
"description": "Detailed planning",
10061006
"argumentHint": "[--explore] \"task\"",
10071007
"status": "completed"
10081008
},
10091009
{
10101010
"index": 1,
1011-
"command": "/workflow:execute",
1011+
"command": "/workflow-execute",
10121012
"name": "execute",
10131013
"description": "Execute with state resume",
10141014
"argumentHint": "[--resume-session=\"WFS-xxx\"]",
10151015
"status": "completed"
10161016
},
10171017
{
10181018
"index": 2,
1019-
"command": "/workflow:test-cycle-execute",
1019+
"command": "/workflow-test-fix",
10201020
"name": "test-cycle-execute",
10211021
"status": "pending"
10221022
}
10231023
],
10241024
"execution_results": [
10251025
{
10261026
"index": 0,
1027-
"command": "/workflow:plan",
1027+
"command": "/workflow-plan",
10281028
"status": "completed",
10291029
"task_id": "task-001",
10301030
"session_id": "WFS-plan-20250124",
@@ -1034,7 +1034,7 @@ function parseOutput(output) {
10341034
},
10351035
{
10361036
"index": 1,
1037-
"command": "/workflow:execute",
1037+
"command": "/workflow-execute",
10381038
"status": "in-progress",
10391039
"task_id": "task-002",
10401040
"session_id": null,
@@ -1046,13 +1046,13 @@ function parseOutput(output) {
10461046
"prompts_used": [
10471047
{
10481048
"index": 0,
1049-
"command": "/workflow:plan",
1050-
"prompt": "/workflow:plan -y \"Implement user registration...\"\n\nTask: Implement user registration..."
1049+
"command": "/workflow-plan",
1050+
"prompt": "/workflow-plan -y \"Implement user registration...\"\n\nTask: Implement user registration..."
10511051
},
10521052
{
10531053
"index": 1,
1054-
"command": "/workflow:execute",
1055-
"prompt": "/workflow:execute -y --resume-session=\"WFS-plan-20250124\"\n\nTask: Implement user registration\n\nPrevious results:\n- /workflow:plan: WFS-plan-20250124 (IMPL_PLAN.md)"
1054+
"command": "/workflow-execute",
1055+
"prompt": "/workflow-execute -y --resume-session=\"WFS-plan-20250124\"\n\nTask: Implement user registration\n\nPrevious results:\n- /workflow-plan: WFS-plan-20250124 (IMPL_PLAN.md)"
10561056
}
10571057
]
10581058
}
@@ -1131,40 +1131,40 @@ Task: <task_description>
11311131
| `-y` | Auto-confirm flag (inside prompt) | Always include for automation |
11321132
| `<command_parameters>` | Command-specific parameters | Task description, session ID, flags |
11331133
| `<task_description>` | Brief task description | "Implement user authentication", "Fix memory leak" |
1134-
| `<optional_previous_results>` | Context from previous commands | "Previous results:\n- /workflow:plan: WFS-xxx" |
1134+
| `<optional_previous_results>` | Context from previous commands | "Previous results:\n- /workflow-plan: WFS-xxx" |
11351135
11361136
### Command Parameter Patterns
11371137
11381138
| Command Type | Parameter Pattern | Example |
11391139
|--------------|------------------|---------|
1140-
| **Planning** | `"task description"` | `/workflow:plan -y "Implement OAuth2"` |
1141-
| **Execution (with plan)** | `--resume-session="WFS-xxx"` | `/workflow:execute -y --resume-session="WFS-plan-001"` |
1140+
| **Planning** | `"task description"` | `/workflow-plan -y "Implement OAuth2"` |
1141+
| **Execution (with plan)** | `--resume-session="WFS-xxx"` | `/workflow-execute -y --resume-session="WFS-plan-001"` |
11421142
| **Execution (standalone)** | `--in-memory` or `"task"` | `/workflow:lite-execute -y --in-memory` |
1143-
| **Session-based** | `--session="WFS-xxx"` | `/workflow:test-fix-gen -y --session="WFS-impl-001"` |
1144-
| **Fix/Debug** | `--bugfix "problem description"` | `/workflow:lite-plan -y --bugfix "Fix timeout bug"` |
1143+
| **Session-based** | `--session="WFS-xxx"` | `/workflow-test-fix -y --session="WFS-impl-001"` |
1144+
| **Fix/Debug** | `--bugfix "problem description"` | `/workflow-lite-plan -y --bugfix "Fix timeout bug"` |
11451145
11461146
### Complete Examples
11471147
11481148
**Planning Command**:
11491149
```bash
1150-
ccw cli -p '/workflow:plan -y "Implement user registration with email validation"
1150+
ccw cli -p '/workflow-plan -y "Implement user registration with email validation"
11511151
11521152
Task: Implement user registration' --tool claude --mode write
11531153
```
11541154
11551155
**Execution with Context**:
11561156
```bash
1157-
ccw cli -p '/workflow:execute -y --resume-session="WFS-plan-20250124"
1157+
ccw cli -p '/workflow-execute -y --resume-session="WFS-plan-20250124"
11581158
11591159
Task: Implement user registration
11601160
11611161
Previous results:
1162-
- /workflow:plan: WFS-plan-20250124 (IMPL_PLAN.md)' --tool claude --mode write
1162+
- /workflow-plan: WFS-plan-20250124 (IMPL_PLAN.md)' --tool claude --mode write
11631163
```
11641164
11651165
**Standalone Lite Execution**:
11661166
```bash
1167-
ccw cli -p '/workflow:lite-plan -y --bugfix "Fix login timeout in auth module"
1167+
ccw cli -p '/workflow-lite-plan -y --bugfix "Fix login timeout in auth module"
11681168
11691169
Task: Fix login timeout' --tool claude --mode write
11701170
```
@@ -1232,17 +1232,17 @@ Task: <description>
12321232
**Examples**:
12331233
```bash
12341234
# Planning command
1235-
ccw cli -p '/workflow:plan -y "Implement user registration feature"
1235+
ccw cli -p '/workflow-plan -y "Implement user registration feature"
12361236
12371237
Task: Implement user registration' --tool claude --mode write
12381238
12391239
# Execution command (with session reference)
1240-
ccw cli -p '/workflow:execute -y --resume-session="WFS-plan-20250124"
1240+
ccw cli -p '/workflow-execute -y --resume-session="WFS-plan-20250124"
12411241
12421242
Task: Implement user registration
12431243
12441244
Previous results:
1245-
- /workflow:plan: WFS-plan-20250124' --tool claude --mode write
1245+
- /workflow-plan: WFS-plan-20250124' --tool claude --mode write
12461246
12471247
# Lite execution (in-memory from previous plan)
12481248
ccw cli -p '/workflow:lite-execute -y --in-memory
@@ -1261,7 +1261,7 @@ Task: Implement user registration' --tool claude --mode write
12611261
12621262
```javascript
12631263
// Example: Execute command and stop
1264-
const prompt = '/workflow:plan -y "Implement user authentication"\n\nTask: Implement user auth system';
1264+
const prompt = '/workflow-plan -y "Implement user authentication"\n\nTask: Implement user auth system';
12651265
const taskId = Bash(`ccw cli -p "${prompt}" --tool claude --mode write`, { run_in_background: true }).task_id;
12661266
state.execution_results.push({ status: 'in-progress', task_id: taskId, ... });
12671267
Write(`${stateDir}/state.json`, JSON.stringify(state, null, 2));
@@ -1283,7 +1283,7 @@ break; // ⚠️ STOP HERE - DO NOT use TaskOutput polling
12831283
| `workflow-execute` | execute |
12841284
| `workflow-multi-cli-plan` | multi-cli-plan |
12851285
| `workflow-test-fix` | test-fix-gen, test-cycle-execute |
1286-
| `workflow-tdd` | tdd-plan, tdd-verify |
1286+
| `workflow-tdd-plan` | tdd-plan, tdd-verify |
12871287
| `review-cycle` | review-session-cycle, review-module-cycle, review-cycle-fix |
12881288
| `brainstorm` | auto-parallel, artifacts, role-analysis, synthesis |
12891289
| `team-planex` | planner + executor wave pipeline |

.claude/commands/ccw.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Main process orchestrator: intent analysis → workflow selection → command ch
1818
| `workflow-lite-plan` | explore → plan → confirm → execute |
1919
| `workflow-plan` | session → context → convention → gen → verify/replan |
2020
| `workflow-execute` | session discovery → task processing → commit |
21-
| `workflow-tdd` | 6-phase TDD plan → verify |
21+
| `workflow-tdd-plan` | 6-phase TDD plan → verify |
2222
| `workflow-test-fix` | session → context → analysis → gen → cycle |
2323
| `workflow-multi-cli-plan` | ACE context → CLI discussion → plan → execute |
2424
| `review-cycle` | session/module review → fix orchestration |
@@ -53,7 +53,7 @@ Main process orchestrator: intent analysis → workflow selection → command ch
5353
|---------|-------|------|
5454
| 轻量 Plan+Execute | `workflow-lite-plan` | 内部完成 plan→execute |
5555
| 标准 Planning | `workflow-plan``workflow-execute` | plan 和 execute 是独立 Skill |
56-
| TDD Planning | `workflow-tdd``workflow-execute` | tdd-plan 和 execute 是独立 Skill |
56+
| TDD Planning | `workflow-tdd-plan``workflow-execute` | tdd-plan 和 execute 是独立 Skill |
5757
| 测试流水线 | `workflow-test-fix` | 内部完成 gen→cycle |
5858
| 代码审查 | `review-cycle` | 内部完成 review→fix |
5959
| 多CLI协作 | `workflow-multi-cli-plan` | ACE context → CLI discussion → plan → execute |
@@ -339,7 +339,7 @@ function buildCommandChain(workflow, analysis) {
339339
],
340340

341341
'tdd': [
342-
{ cmd: 'workflow-tdd', args: `"${analysis.goal}"` },
342+
{ cmd: 'workflow-tdd-plan', args: `"${analysis.goal}"` },
343343
{ cmd: 'workflow-execute', args: '' }
344344
],
345345

@@ -649,7 +649,7 @@ Phase 5: Execute Command Chain
649649
| "重构 auth 模块" | refactor | 3 | workflow:refactor-cycle |
650650
| "multi-cli plan: API设计" | multi-cli-plan | 3 | workflow-multi-cli-plan → workflow-test-fix |
651651
| "OAuth2 system" | feature (high) | 3 | workflow-plan → workflow-execute → review-cycle → workflow-test-fix |
652-
| "Implement with TDD" | tdd | 3 | workflow-tdd → workflow-execute |
652+
| "Implement with TDD" | tdd | 3 | workflow-tdd-plan → workflow-execute |
653653
| "Uncertain: real-time" | exploration | 4 | brainstorm → workflow-plan → workflow-execute → workflow-test-fix |
654654
| "team planex: 用户系统" | team-planex | Team | team-planex |
655655
| "迭代开发团队: 支付模块" | team-iterdev | Team | team-iterdev |

0 commit comments

Comments
 (0)