Implement quality orchestration service to enforce standards on AI agent work and prevent premature completion claims. Components: - QualityOrchestratorService: Core validation and gate execution - QualityGate interface: Extensible gate definitions - CompletionClaim/Validation: Track claims and verdicts - OrchestrationConfig: Per-workspace configuration Features: - Validate completions against quality gates (build/lint/test/coverage) - Run gates with command execution and output validation - Support string and RegExp output pattern matching - Smart continuation logic with attempt tracking - Generate actionable feedback for failed gates - Strict/lenient mode for gate enforcement - 5-minute timeout, 10MB output buffer per gate Default gates: - Build Check (required) - Lint Check (required) - Test Suite (required) - Coverage Check (optional, 85% threshold) Tests: 21 passing with 85.98% coverage Fixes #134 Co-Authored-By: Claude Opus 4.5 <[email protected]>
31 lines
517 B
TypeScript
31 lines
517 B
TypeScript
import { IsString, IsArray, IsDateString, IsNotEmpty, ArrayMinSize } from "class-validator";
|
|
|
|
/**
|
|
* DTO for validating a completion claim
|
|
*/
|
|
export class ValidateCompletionDto {
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
taskId!: string;
|
|
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
agentId!: string;
|
|
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
workspaceId!: string;
|
|
|
|
@IsDateString()
|
|
claimedAt!: string;
|
|
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
message!: string;
|
|
|
|
@IsArray()
|
|
@ArrayMinSize(0)
|
|
@IsString({ each: true })
|
|
filesChanged!: string[];
|
|
}
|