계획 계약 명세서 정의 및 검증 기준 분석 #1

Open
forge-bot wants to merge 7 commits from forge/iss-6da9ba883259-attempt-1-run-99a8b746f8fa into main
Showing only changes of commit 022ec6616c - Show all commits

View file

@ -0,0 +1,82 @@
/**
*
*/
/** 계약 등급 */
export type ContractGrade = 'A' | 'B' | 'C' | 'D' | 'F';
/** 조항 검증 결과 */
export interface ClauseResult {
passed: boolean;
issues: string[];
}
/** 목표 정의 */
export interface Goal {
description: string;
criteria: string[];
produces?: string[];
subGoals?: string[];
}
/** 계획 단계 */
export interface PlanStep {
id: string;
description: string;
command?: string;
dependencies?: string[];
requiredResources?: string[];
timeout?: number;
expectedOutcome?: string;
assertions?: string[];
produces?: string[];
}
/** 리스크 정의 */
export interface Risk {
id: string;
description: string;
severity: 'low' | 'medium' | 'high' | 'critical';
mitigation?: string;
alternativePath?: string;
}
/** 롤백 명령 */
export interface RollbackCommand {
id: string;
command: string;
order: number;
verification?: string;
}
/** 계획 */
export interface Plan {
id: string;
goal: Goal;
steps: PlanStep[];
risks?: Risk[];
estimatedDuration?: number;
timeoutStrategy?: string;
rollbackCommands?: RollbackCommand[];
}
/** 에피타이드 (실행 결과 기록) */
export interface Epitaph {
planId: string;
timestamp: string;
grade: ContractGrade;
clauses: {
goalClarity: ClauseResult;
stepCompleteness: ClauseResult;
executability: ClauseResult;
riskAssessment: ClauseResult;
verifiability: ClauseResult;
temporalConstraints: ClauseResult;
rollbackCapability: ClauseResult;
};
executionResult: {
status: 'success' | 'partial' | 'failure';
duration: number;
deviationFromPlan?: string | null;
};
}