UNPKG

@jmkim85/dev-flow-mcp

Version:

MCP-based Dev Flow - AI-powered development workflow management with 13 essential tools for TDD and context management

183 lines 4.44 kB
/** * Core types for Dev Flow MCP */ export interface DevFlowState { current_task: string | null; current_stage: "analyze" | "write_tests" | "implement" | "refactor" | "complete"; current_workflow?: string | null; stage_iterations?: Record<string, number>; context_files: string[]; checkpoints: Checkpoint[]; mistakes: MistakePattern[]; created_at: string; updated_at: string; } export interface Task { id: string; title: string; description: string; /** * Success criteria in natural language (legacy). * Use `completion_conditions` for machine-checkable rules. */ success_criteria: string; /** * NEW IN v2.1.1 * Array of machine-readable completion rules, e.g. * - "tests_pass" * - "coverage>80" * - "eslint=0" * - "build_success" * - "no_todos" */ completion_conditions?: string[]; test_command?: string; dependencies: string[]; phases: string[]; status: "pending" | "in_progress" | "completed" | "failed" | "blocked"; priority: "low" | "medium" | "high"; created_at: string; updated_at: string; parent_task_id?: string; auto_generated?: boolean; generation_reason?: string; } export interface Checkpoint { id: string; task_id: string; stage: string; message: string; files: string[]; timestamp: string; git_commit?: string; } export interface MistakePattern { id: string; pattern: string; context: string; frequency: number; last_occurred: string; solutions: string[]; } export interface MistakeWarning { pattern: string; message: string; solutions: string[]; } export interface ValidationResult { allowed: boolean; reason?: string; failed_tests?: string[]; } export interface TestResult { all_passed: boolean; output: string; failures: string[]; exit_code: number; } export interface ProjectType { name: string; test_command: string; file_patterns: string[]; setup_commands?: string[]; } export interface ContextData { current: { task: string; stage: string; files: string[]; }; instructions: string; recent_mistakes: Array<{ pattern: string; frequency: number; avoid: string; }>; test_command?: string; success_criteria: string; } export interface TasksConfig { tasks: Task[]; project_type?: string; global_settings?: { max_retries: number; auto_advance: boolean; require_tests: boolean; }; } export interface Workflow { id: string; name: string; description: string; stages: WorkflowStage[]; task_definition_path?: string; validation_rules: ValidationRule[]; created_at: string; updated_at: string; } export interface WorkflowStage { id: string; name: string; instructions: string; entry_criteria: string[]; exit_criteria: string[]; max_iterations?: number; required_outputs?: string[]; } export interface ValidationRule { id: string; description: string; pattern?: string; stage?: string; check?: string; severity: "warning" | "error"; } export interface MasterPlan { id: string; title: string; overview: string; phases: Phase[]; current_phase: string; task_definition_paths: Record<string, string>; created_at: string; updated_at: string; } export interface Phase { id: string; name: string; description: string; tasks: string[]; dependencies: string[]; status: "pending" | "in_progress" | "completed"; completion_criteria: string[]; } export interface RewardHackingCheck { allowed: boolean; reason?: string; suspicious_patterns?: string[]; } export interface ContextSnapshot { task_id: string; summary: string; progress_percentage: number; key_decisions: string[]; blockers: string[]; recent_events: Event[]; relevant_files: FileInfo[]; created_at: string; } export interface Event { id: string; task_id: string; type: "checkpoint" | "stage_change" | "test_run" | "mistake" | "completion"; description: string; timestamp: string; metadata?: Record<string, any>; } export interface FileInfo { path: string; summary: string; last_modified: string; relevance_score: number; } //# sourceMappingURL=types.d.ts.map