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.
This commit is contained in:
catlog22
2026-02-28 20:41:06 +08:00
parent 4a89f626fc
commit 65763c76e9
92 changed files with 643 additions and 525 deletions

View File

@@ -113,7 +113,7 @@ async function startAction(taskId: string, options: { session?: string }): Promi
sessionDir = findActiveSession(currentCwd);
if (!sessionDir) {
console.error(chalk.red('\n Error: No active workflow session found.'));
console.error(chalk.gray(' Run "ccw workflow:plan" first to create a session.\n'));
console.error(chalk.gray(' Run "ccw workflow-plan" first to create a session.\n'));
process.exit(1);
}
}

View File

@@ -225,7 +225,7 @@ invalid yaml content without colons
expect(result).toEqual({
name: 'lite-plan',
command: '/workflow:lite-plan',
command: '/workflow-lite-plan',
description: 'Quick planning for simple features',
argumentHint: '"feature description"',
allowedTools: ['Task(*)', 'Read(*)', 'Write(*)', 'Bash(*)'],
@@ -239,7 +239,7 @@ invalid yaml content without colons
mockReadFileSync.mockReturnValue(sampleLitePlanYaml);
const registry = new CommandRegistry(cmdDir);
const result = registry.getCommand('/workflow:lite-plan');
const result = registry.getCommand('/workflow-lite-plan');
expect(result?.name).toBe('lite-plan');
});
@@ -330,8 +330,8 @@ description: Minimal command
const result = registry.getCommands(['lite-plan', 'execute', 'nonexistent']);
expect(result.size).toBe(2);
expect(result.has('/workflow:lite-plan')).toBe(true);
expect(result.has('/workflow:execute')).toBe(true);
expect(result.has('/workflow-lite-plan')).toBe(true);
expect(result.has('/workflow-execute')).toBe(true);
});
it('should skip nonexistent commands', () => {
@@ -362,7 +362,7 @@ description: Minimal command
const result = registry.getAllCommandsSummary();
expect(result.size).toBe(3);
expect(result.get('/workflow:lite-plan')).toEqual({
expect(result.get('/workflow-lite-plan')).toEqual({
name: 'lite-plan',
description: 'Quick planning for simple features'
});
@@ -483,9 +483,9 @@ allowed-tools: Task(*)
const json = registry.toJSON();
expect(json['/workflow:lite-plan']).toEqual({
expect(json['/workflow-lite-plan']).toEqual({
name: 'lite-plan',
command: '/workflow:lite-plan',
command: '/workflow-lite-plan',
description: 'Quick planning for simple features',
argumentHint: '"feature description"',
allowedTools: ['Task(*)', 'Read(*)', 'Write(*)', 'Bash(*)'],
@@ -508,8 +508,8 @@ allowed-tools: Task(*)
const json = registry.toJSON();
expect(Object.keys(json).length).toBe(1);
expect(json['/workflow:lite-plan']).toBeDefined();
expect(json['/workflow:execute']).toBeUndefined();
expect(json['/workflow-lite-plan']).toBeDefined();
expect(json['/workflow-execute']).toBeUndefined();
});
});

View File

@@ -118,7 +118,7 @@ export class CommandRegistry {
/**
* Get single command metadata
* @param commandName Command name (e.g., "lite-plan" or "/workflow:lite-plan")
* @param commandName Command name (e.g., "lite-plan" or "/workflow-lite-plan")
* @returns Command metadata or null
*/
public getCommand(commandName: string): CommandMetadata | null {