feat(#136): build Completion Verification Engine
Implement verification engine to determine if AI agent work is truly complete by analyzing outputs and detecting deferred work patterns. Strategies: - FileChangeStrategy: Detect TODO/FIXME, placeholders, stubs - TestOutputStrategy: Validate pass rates, coverage (85%), skipped tests - BuildOutputStrategy: Detect TS errors, ESLint errors, build failures Deferred work detection patterns: - "follow-up", "to be added later" - "incremental improvement", "future enhancement" - "TODO: complete", "placeholder implementation" - "stub", "work in progress", "partially implemented" Features: - Confidence scoring (0-100%) - Verdict system: complete/incomplete/needs-review - Actionable suggestions for improvements - Strategy-based extensibility Integration: - Complements Quality Orchestrator (#134) - Uses Quality Gate Config (#135) Tests: 46 passing with 95.27% coverage Fixes #136 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2
apps/api/src/completion-verification/interfaces/index.ts
Normal file
2
apps/api/src/completion-verification/interfaces/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from "./verification-context.interface";
|
||||
export * from "./verification-result.interface";
|
||||
@@ -0,0 +1,19 @@
|
||||
export interface VerificationContext {
|
||||
taskId: string;
|
||||
workspaceId: string;
|
||||
agentId: string;
|
||||
claimMessage: string;
|
||||
filesChanged: string[];
|
||||
outputLogs: string;
|
||||
testResults?: TestResults;
|
||||
buildOutput?: string;
|
||||
previousAttempts: number;
|
||||
}
|
||||
|
||||
export interface TestResults {
|
||||
total: number;
|
||||
passed: number;
|
||||
failed: number;
|
||||
skipped: number;
|
||||
coverage?: number;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
export interface VerificationResult {
|
||||
isComplete: boolean;
|
||||
confidence: number; // 0-100
|
||||
issues: VerificationIssue[];
|
||||
suggestions: string[];
|
||||
verdict: "complete" | "incomplete" | "needs-review";
|
||||
}
|
||||
|
||||
export interface VerificationIssue {
|
||||
type:
|
||||
| "test-failure"
|
||||
| "build-error"
|
||||
| "missing-files"
|
||||
| "low-coverage"
|
||||
| "incomplete-implementation"
|
||||
| "deferred-work";
|
||||
severity: "error" | "warning" | "info";
|
||||
message: string;
|
||||
evidence?: string;
|
||||
}
|
||||
|
||||
export interface StrategyResult {
|
||||
strategyName: string;
|
||||
passed: boolean;
|
||||
confidence: number;
|
||||
issues: VerificationIssue[];
|
||||
}
|
||||
Reference in New Issue
Block a user