import { JiraTicket } from '@nihal1983/context-gatherer'; import { SeverityLevel } from '@nihal1983/core'; /** * PR Context - all information about a pull request */ export interface PRContext { pr: { number: number; title: string; description: string; branch: string; base_branch?: string; }; ticket: JiraTicket | null; files: FileChange[]; diff?: string; } /** * File change information */ export interface FileChange { path: string; status: 'added' | 'modified' | 'deleted' | 'renamed'; additions: number; deletions: number; content?: string; } /** * Policy violation */ export interface Violation { ruleId: string; severity: SeverityLevel; message: string; location?: string; suggestion?: string; reference?: string; } /** * Validation result */ export interface ValidationResult { status: 'PASS' | 'WARN' | 'BLOCK'; violations: Violation[]; timestamp: Date; metadata?: { total_checks: number; checks_passed: number; checks_failed: number; }; } /** * Checker interface - all checkers must implement this */ export interface Checker { name: string; check(context: PRContext): Promise; }