계획 계약 명세서 정의 및 검증 기준 분석 #1
1 changed files with 82 additions and 0 deletions
82
planning-contract/types.ts
Normal file
82
planning-contract/types.ts
Normal 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;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue